{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/underscore/underscore.js","webpack:///(webpack)/buildin/global.js","webpack:///(webpack)/buildin/module.js","webpack:///./designsafe/static/scripts/nco/components/nco-scheduler/nco-scheduler.template.html","webpack:///./designsafe/static/scripts/nco/components/nco-scheduler-filters/nco-scheduler-filters.template.html","webpack:///./designsafe/static/scripts/nco/components/nco-scheduler-list/nco-scheduler-list.template.html","webpack:///./designsafe/static/scripts/nco/components/nco-scheduler-pagination/nco-scheduler-pagination.component.html","webpack:///./designsafe/static/scripts/nco/components/nco-ttc-grants/nco-ttc-grants.template.html","webpack:///./designsafe/static/scripts/nco/components/modals/ttc-abstract-modal.template.html","webpack:///./designsafe/static/scripts/nco/components/nco-scheduler/nco-scheduler.component.js","webpack:///./designsafe/static/scripts/nco/components/nco-scheduler-filters/nco-scheduler-filters.component.js","webpack:///./designsafe/static/scripts/nco/components/nco-scheduler-list/nco-scheduler-list.component.js","webpack:///./designsafe/static/scripts/nco/components/nco-scheduler-pagination/nco-scheduler-pagination.components.js","webpack:///./designsafe/static/scripts/nco/components/nco-ttc-grants/nco-ttc-grants.component.js","webpack:///./designsafe/static/scripts/nco/components/modals/ttc-abstract-modal.component.js","webpack:///./designsafe/static/scripts/nco/components/index.js","webpack:///./designsafe/static/scripts/nco/app.js","webpack:///external \"angular\""],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","root","self","global","this","previousUnderscore","_","ArrayProto","Array","ObjProto","SymbolProto","push","slice","toString","nativeIsArray","isArray","nativeKeys","keys","nativeCreate","Ctor","obj","_wrapped","nodeType","VERSION","builtinIteratee","optimizeCb","func","context","argCount","index","collection","accumulator","apply","arguments","cb","iteratee","identity","isFunction","isObject","matcher","Infinity","restArguments","startIndex","length","Math","max","rest","args","baseCreate","result","shallowProperty","has","path","deepGet","MAX_ARRAY_INDEX","pow","getLength","isArrayLike","each","forEach","map","collect","results","currentKey","createReduce","dir","reducer","memo","initial","reduce","foldl","inject","reduceRight","foldr","find","detect","predicate","findIndex","findKey","filter","select","list","reject","negate","every","all","some","any","contains","includes","include","item","fromIndex","guard","values","indexOf","invoke","contextPath","method","pluck","where","attrs","findWhere","computed","lastComputed","v","min","shuffle","sample","random","clone","last","rand","temp","sortBy","criteria","sort","left","right","a","b","group","behavior","partition","groupBy","indexBy","countBy","reStrSymbol","toArray","isString","match","size","pass","first","head","take","array","tail","drop","compact","Boolean","flatten","input","shallow","strict","output","idx","isArguments","j","len","without","otherArrays","difference","uniq","unique","isSorted","isBoolean","seen","union","arrays","intersection","argsLength","unzip","zip","createPredicateIndexFinder","findLastIndex","sortedIndex","low","high","mid","floor","createIndexFinder","predicateFind","isNaN","lastIndexOf","range","start","stop","step","ceil","chunk","count","executeBound","sourceFunc","boundFunc","callingContext","TypeError","bound","callArgs","concat","partial","boundArgs","placeholder","position","bindAll","Error","memoize","hasher","cache","address","delay","wait","setTimeout","defer","throttle","options","timeout","previous","later","leading","now","throttled","remaining","clearTimeout","trailing","cancel","debounce","immediate","debounced","callNow","wrap","wrapper","compose","after","times","before","once","hasEnumBug","propertyIsEnumerable","nonEnumerableProps","collectNonEnumProps","nonEnumIdx","constructor","proto","prop","allKeys","mapObject","pairs","invert","functions","methods","names","createAssigner","keysFunc","defaults","source","extend","extendOwn","assign","eq","deepEq","keyInObj","pick","omit","String","props","tap","interceptor","isMatch","aStack","bStack","type","className","valueOf","areArrays","aCtor","bCtor","pop","isEqual","isEmpty","isElement","nodelist","document","childNodes","Int8Array","isFinite","isSymbol","parseFloat","isNumber","isNull","isUndefined","noConflict","constant","noop","propertyOf","matches","accum","Date","getTime","escapeMap","unescapeMap","createEscaper","escaper","join","testRegexp","RegExp","replaceRegexp","string","test","replace","escape","unescape","fallback","idCounter","uniqueId","prefix","id","templateSettings","evaluate","interpolate","noMatch","escapes","escapeRegExp","escapeChar","template","text","settings","oldSettings","render","offset","variable","Function","e","data","argument","chain","instance","_chain","chainResult","mixin","toJSON","g","window","webpackPolyfill","deprecate","paths","children","NcoSchedulerComponent","controller","$http","_ui","loading","filters","sorts","loadProjects","then","resp","err","error","message","initialized","params","events","response","evt","dateEnd","$date","dateStart","total","parseInt","pageNumber","pageSize","page","controllerAs","NcoSchedulerTemplate","bindings","NcoSchedulerFiltersComponent","filterValues","timeFilters","sortby","historyEnabled","filterName","filterSel","filterAndSort","applyFilterAndSort","NcoSchedulerFiltersTemplate","NcoSchedulerListComponent","NcoSchedulerListTemplate","NcoSchedulerPaginationComponent","checkNextAndPrev","next","prev","onNextPage","onPrevPage","NcoSchedulerPaginationTemplate","NcoTtcGrantsComponent","$uibModal","initialParams","selectedSort","grantsLoading","facilitiesLoading","grantTypesLoading","hazardTypesLoading","loadGrants","grantsError","loadFacilities","facilitiesError","loadGrantTypes","grantTypesError","loadHazardTypes","hazardTypesError","sortOptions","grantList","facilitiesList","grantTypes","hazardTypes","grant","open","component","resolve","facility","selectedFacility","hazard_type","selectedHazardType","grant_type","selectedGrantType","text_search","textSearch","NcoTtcGrantsTemplate","TtcAbstractModalCtrl","TtcAbstractModalComponent","TtcAbstractModalTemplate","close","dismiss","ncoComponents","angular","ncoModule","config","$httpProvider","$locationProvider","$stateProvider","$urlRouterProvider","$urlMatcherFactoryProvider","Django","toastrConfig","headers","common","xsrfCookieName","xsrfHeaderName","html5Mode","strictMode","positionClass","timeOut","state","url","requires","WSBusServiceProvider","setUrl","location","protocol","hostname","port"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,G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QC,OAAO,oBAAsB,iBAC5DR,EAAcxL,SAASiM,eAAiB,YACxCT,EAAcxL,SAASkM,eAAiB,cACxCT,EAAkBU,WAAU,GAC5BP,EAA2BQ,YAAW,GAEtCf,IAAQnL,OAAO4L,EAAc,CACzBO,cAAe,oBACfC,QAAS,MAGbZ,EACKa,MAAM,MAAO,CACVC,IAAK,OACLlI,SAAU,4CAhDtBgH,EAAUmB,SAASlb,KACf,YACA,eACA,iBACA,mBACA,WACA,SACA,UACA,kBACA,cAEJ8Z,IAAQzc,OAAO,qBAAqB6d,SAASlb,KAAK,OAyClD+Z,EACKC,OAAO,CACJ,gBACA,oBACA,iBACA,qBACA,6BACA,SACA,eACAA,IAGRD,EAAUC,OAAO,CACb,uBACA,SAASmB,GACLA,EAAqBC,QACa,WAA7BnH,OAAOoH,SAASC,SAAwB,SAAW,SAChDrH,OAAOoH,SAASE,UACftH,OAAOoH,SAASG,KAAO,IAAMvH,OAAOoH,SAASG,KAAO,IACrD,yDAIDzB,a,gBChFf1c,EAAOD,QAAU0c","file":"nco.bundle.f412b488cc11ad54ce74.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/static/build/\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 352);\n","//     Underscore.js 1.9.1\n//     http://underscorejs.org\n//     (c) 2009-2018 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n//     Underscore may be freely distributed under the MIT license.\n\n(function() {\n\n  // Baseline setup\n  // --------------\n\n  // Establish the root object, `window` (`self`) in the browser, `global`\n  // on the server, or `this` in some virtual machines. We use `self`\n  // instead of `window` for `WebWorker` support.\n  var root = typeof self == 'object' && self.self === self && self ||\n            typeof global == 'object' && global.global === global && global ||\n            this ||\n            {};\n\n  // Save the previous value of the `_` variable.\n  var previousUnderscore = root._;\n\n  // Save bytes in the minified (but not gzipped) version:\n  var ArrayProto = Array.prototype, ObjProto = Object.prototype;\n  var SymbolProto = typeof Symbol !== 'undefined' ? Symbol.prototype : null;\n\n  // Create quick reference variables for speed access to core prototypes.\n  var push = ArrayProto.push,\n      slice = ArrayProto.slice,\n      toString = ObjProto.toString,\n      hasOwnProperty = ObjProto.hasOwnProperty;\n\n  // All **ECMAScript 5** native function implementations that we hope to use\n  // are declared here.\n  var nativeIsArray = Array.isArray,\n      nativeKeys = Object.keys,\n      nativeCreate = Object.create;\n\n  // Naked function reference for surrogate-prototype-swapping.\n  var Ctor = function(){};\n\n  // Create a safe reference to the Underscore object for use below.\n  var _ = function(obj) {\n    if (obj instanceof _) return obj;\n    if (!(this instanceof _)) return new _(obj);\n    this._wrapped = obj;\n  };\n\n  // Export the Underscore object for **Node.js**, with\n  // backwards-compatibility for their old module API. If we're in\n  // the browser, add `_` as a global object.\n  // (`nodeType` is checked to ensure that `module`\n  // and `exports` are not HTML elements.)\n  if (typeof exports != 'undefined' && !exports.nodeType) {\n    if (typeof module != 'undefined' && !module.nodeType && module.exports) {\n      exports = module.exports = _;\n    }\n    exports._ = _;\n  } else {\n    root._ = _;\n  }\n\n  // Current version.\n  _.VERSION = '1.9.1';\n\n  // Internal function that returns an efficient (for current engines) version\n  // of the passed-in callback, to be repeatedly applied in other Underscore\n  // functions.\n  var optimizeCb = function(func, context, argCount) {\n    if (context === void 0) return func;\n    switch (argCount == null ? 3 : argCount) {\n      case 1: return function(value) {\n        return func.call(context, value);\n      };\n      // The 2-argument case is omitted because we’re not using it.\n      case 3: return function(value, index, collection) {\n        return func.call(context, value, index, collection);\n      };\n      case 4: return function(accumulator, value, index, collection) {\n        return func.call(context, accumulator, value, index, collection);\n      };\n    }\n    return function() {\n      return func.apply(context, arguments);\n    };\n  };\n\n  var builtinIteratee;\n\n  // An internal function to generate callbacks that can be applied to each\n  // element in a collection, returning the desired result — either `identity`,\n  // an arbitrary callback, a property matcher, or a property accessor.\n  var cb = function(value, context, argCount) {\n    if (_.iteratee !== builtinIteratee) return _.iteratee(value, context);\n    if (value == null) return _.identity;\n    if (_.isFunction(value)) return optimizeCb(value, context, argCount);\n    if (_.isObject(value) && !_.isArray(value)) return _.matcher(value);\n    return _.property(value);\n  };\n\n  // External wrapper for our callback generator. Users may customize\n  // `_.iteratee` if they want additional predicate/iteratee shorthand styles.\n  // This abstraction hides the internal-only argCount argument.\n  _.iteratee = builtinIteratee = function(value, context) {\n    return cb(value, context, Infinity);\n  };\n\n  // Some functions take a variable number of arguments, or a few expected\n  // arguments at the beginning and then a variable number of values to operate\n  // on. This helper accumulates all remaining arguments past the function’s\n  // argument length (or an explicit `startIndex`), into an array that becomes\n  // the last argument. Similar to ES6’s \"rest parameter\".\n  var restArguments = function(func, startIndex) {\n    startIndex = startIndex == null ? func.length - 1 : +startIndex;\n    return function() {\n      var length = Math.max(arguments.length - startIndex, 0),\n          rest = Array(length),\n          index = 0;\n      for (; index < length; index++) {\n        rest[index] = arguments[index + startIndex];\n      }\n      switch (startIndex) {\n        case 0: return func.call(this, rest);\n        case 1: return func.call(this, arguments[0], rest);\n        case 2: return func.call(this, arguments[0], arguments[1], rest);\n      }\n      var args = Array(startIndex + 1);\n      for (index = 0; index < startIndex; index++) {\n        args[index] = arguments[index];\n      }\n      args[startIndex] = rest;\n      return func.apply(this, args);\n    };\n  };\n\n  // An internal function for creating a new object that inherits from another.\n  var baseCreate = function(prototype) {\n    if (!_.isObject(prototype)) return {};\n    if (nativeCreate) return nativeCreate(prototype);\n    Ctor.prototype = prototype;\n    var result = new Ctor;\n    Ctor.prototype = null;\n    return result;\n  };\n\n  var shallowProperty = function(key) {\n    return function(obj) {\n      return obj == null ? void 0 : obj[key];\n    };\n  };\n\n  var has = function(obj, path) {\n    return obj != null && hasOwnProperty.call(obj, path);\n  }\n\n  var deepGet = function(obj, path) {\n    var length = path.length;\n    for (var i = 0; i < length; i++) {\n      if (obj == null) return void 0;\n      obj = obj[path[i]];\n    }\n    return length ? obj : void 0;\n  };\n\n  // Helper for collection methods to determine whether a collection\n  // should be iterated as an array or as an object.\n  // Related: http://people.mozilla.org/~jorendorff/es6-draft.html#sec-tolength\n  // Avoids a very nasty iOS 8 JIT bug on ARM-64. #2094\n  var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;\n  var getLength = shallowProperty('length');\n  var isArrayLike = function(collection) {\n    var length = getLength(collection);\n    return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;\n  };\n\n  // Collection Functions\n  // --------------------\n\n  // The cornerstone, an `each` implementation, aka `forEach`.\n  // Handles raw objects in addition to array-likes. Treats all\n  // sparse array-likes as if they were dense.\n  _.each = _.forEach = function(obj, iteratee, context) {\n    iteratee = optimizeCb(iteratee, context);\n    var i, length;\n    if (isArrayLike(obj)) {\n      for (i = 0, length = obj.length; i < length; i++) {\n        iteratee(obj[i], i, obj);\n      }\n    } else {\n      var keys = _.keys(obj);\n      for (i = 0, length = keys.length; i < length; i++) {\n        iteratee(obj[keys[i]], keys[i], obj);\n      }\n    }\n    return obj;\n  };\n\n  // Return the results of applying the iteratee to each element.\n  _.map = _.collect = function(obj, iteratee, context) {\n    iteratee = cb(iteratee, context);\n    var keys = !isArrayLike(obj) && _.keys(obj),\n        length = (keys || obj).length,\n        results = Array(length);\n    for (var index = 0; index < length; index++) {\n      var currentKey = keys ? keys[index] : index;\n      results[index] = iteratee(obj[currentKey], currentKey, obj);\n    }\n    return results;\n  };\n\n  // Create a reducing function iterating left or right.\n  var createReduce = function(dir) {\n    // Wrap code that reassigns argument variables in a separate function than\n    // the one that accesses `arguments.length` to avoid a perf hit. (#1991)\n    var reducer = function(obj, iteratee, memo, initial) {\n      var keys = !isArrayLike(obj) && _.keys(obj),\n          length = (keys || obj).length,\n          index = dir > 0 ? 0 : length - 1;\n      if (!initial) {\n        memo = obj[keys ? keys[index] : index];\n        index += dir;\n      }\n      for (; index >= 0 && index < length; index += dir) {\n        var currentKey = keys ? keys[index] : index;\n        memo = iteratee(memo, obj[currentKey], currentKey, obj);\n      }\n      return memo;\n    };\n\n    return function(obj, iteratee, memo, context) {\n      var initial = arguments.length >= 3;\n      return reducer(obj, optimizeCb(iteratee, context, 4), memo, initial);\n    };\n  };\n\n  // **Reduce** builds up a single result from a list of values, aka `inject`,\n  // or `foldl`.\n  _.reduce = _.foldl = _.inject = createReduce(1);\n\n  // The right-associative version of reduce, also known as `foldr`.\n  _.reduceRight = _.foldr = createReduce(-1);\n\n  // Return the first value which passes a truth test. Aliased as `detect`.\n  _.find = _.detect = function(obj, predicate, context) {\n    var keyFinder = isArrayLike(obj) ? _.findIndex : _.findKey;\n    var key = keyFinder(obj, predicate, context);\n    if (key !== void 0 && key !== -1) return obj[key];\n  };\n\n  // Return all the elements that pass a truth test.\n  // Aliased as `select`.\n  _.filter = _.select = function(obj, predicate, context) {\n    var results = [];\n    predicate = cb(predicate, context);\n    _.each(obj, function(value, index, list) {\n      if (predicate(value, index, list)) results.push(value);\n    });\n    return results;\n  };\n\n  // Return all the elements for which a truth test fails.\n  _.reject = function(obj, predicate, context) {\n    return _.filter(obj, _.negate(cb(predicate)), context);\n  };\n\n  // Determine whether all of the elements match a truth test.\n  // Aliased as `all`.\n  _.every = _.all = function(obj, predicate, context) {\n    predicate = cb(predicate, context);\n    var keys = !isArrayLike(obj) && _.keys(obj),\n        length = (keys || obj).length;\n    for (var index = 0; index < length; index++) {\n      var currentKey = keys ? keys[index] : index;\n      if (!predicate(obj[currentKey], currentKey, obj)) return false;\n    }\n    return true;\n  };\n\n  // Determine if at least one element in the object matches a truth test.\n  // Aliased as `any`.\n  _.some = _.any = function(obj, predicate, context) {\n    predicate = cb(predicate, context);\n    var keys = !isArrayLike(obj) && _.keys(obj),\n        length = (keys || obj).length;\n    for (var index = 0; index < length; index++) {\n      var currentKey = keys ? keys[index] : index;\n      if (predicate(obj[currentKey], currentKey, obj)) return true;\n    }\n    return false;\n  };\n\n  // Determine if the array or object contains a given item (using `===`).\n  // Aliased as `includes` and `include`.\n  _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {\n    if (!isArrayLike(obj)) obj = _.values(obj);\n    if (typeof fromIndex != 'number' || guard) fromIndex = 0;\n    return _.indexOf(obj, item, fromIndex) >= 0;\n  };\n\n  // Invoke a method (with arguments) on every item in a collection.\n  _.invoke = restArguments(function(obj, path, args) {\n    var contextPath, func;\n    if (_.isFunction(path)) {\n      func = path;\n    } else if (_.isArray(path)) {\n      contextPath = path.slice(0, -1);\n      path = path[path.length - 1];\n    }\n    return _.map(obj, function(context) {\n      var method = func;\n      if (!method) {\n        if (contextPath && contextPath.length) {\n          context = deepGet(context, contextPath);\n        }\n        if (context == null) return void 0;\n        method = context[path];\n      }\n      return method == null ? method : method.apply(context, args);\n    });\n  });\n\n  // Convenience version of a common use case of `map`: fetching a property.\n  _.pluck = function(obj, key) {\n    return _.map(obj, _.property(key));\n  };\n\n  // Convenience version of a common use case of `filter`: selecting only objects\n  // containing specific `key:value` pairs.\n  _.where = function(obj, attrs) {\n    return _.filter(obj, _.matcher(attrs));\n  };\n\n  // Convenience version of a common use case of `find`: getting the first object\n  // containing specific `key:value` pairs.\n  _.findWhere = function(obj, attrs) {\n    return _.find(obj, _.matcher(attrs));\n  };\n\n  // Return the maximum element (or element-based computation).\n  _.max = function(obj, iteratee, context) {\n    var result = -Infinity, lastComputed = -Infinity,\n        value, computed;\n    if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n      obj = isArrayLike(obj) ? obj : _.values(obj);\n      for (var i = 0, length = obj.length; i < length; i++) {\n        value = obj[i];\n        if (value != null && value > result) {\n          result = value;\n        }\n      }\n    } else {\n      iteratee = cb(iteratee, context);\n      _.each(obj, function(v, index, list) {\n        computed = iteratee(v, index, list);\n        if (computed > lastComputed || computed === -Infinity && result === -Infinity) {\n          result = v;\n          lastComputed = computed;\n        }\n      });\n    }\n    return result;\n  };\n\n  // Return the minimum element (or element-based computation).\n  _.min = function(obj, iteratee, context) {\n    var result = Infinity, lastComputed = Infinity,\n        value, computed;\n    if (iteratee == null || typeof iteratee == 'number' && typeof obj[0] != 'object' && obj != null) {\n      obj = isArrayLike(obj) ? obj : _.values(obj);\n      for (var i = 0, length = obj.length; i < length; i++) {\n        value = obj[i];\n        if (value != null && value < result) {\n          result = value;\n        }\n      }\n    } else {\n      iteratee = cb(iteratee, context);\n      _.each(obj, function(v, index, list) {\n        computed = iteratee(v, index, list);\n        if (computed < lastComputed || computed === Infinity && result === Infinity) {\n          result = v;\n          lastComputed = computed;\n        }\n      });\n    }\n    return result;\n  };\n\n  // Shuffle a collection.\n  _.shuffle = function(obj) {\n    return _.sample(obj, Infinity);\n  };\n\n  // Sample **n** random values from a collection using the modern version of the\n  // [Fisher-Yates shuffle](http://en.wikipedia.org/wiki/Fisher–Yates_shuffle).\n  // If **n** is not specified, returns a single random element.\n  // The internal `guard` argument allows it to work with `map`.\n  _.sample = function(obj, n, guard) {\n    if (n == null || guard) {\n      if (!isArrayLike(obj)) obj = _.values(obj);\n      return obj[_.random(obj.length - 1)];\n    }\n    var sample = isArrayLike(obj) ? _.clone(obj) : _.values(obj);\n    var length = getLength(sample);\n    n = Math.max(Math.min(n, length), 0);\n    var last = length - 1;\n    for (var index = 0; index < n; index++) {\n      var rand = _.random(index, last);\n      var temp = sample[index];\n      sample[index] = sample[rand];\n      sample[rand] = temp;\n    }\n    return sample.slice(0, n);\n  };\n\n  // Sort the object's values by a criterion produced by an iteratee.\n  _.sortBy = function(obj, iteratee, context) {\n    var index = 0;\n    iteratee = cb(iteratee, context);\n    return _.pluck(_.map(obj, function(value, key, list) {\n      return {\n        value: value,\n        index: index++,\n        criteria: iteratee(value, key, list)\n      };\n    }).sort(function(left, right) {\n      var a = left.criteria;\n      var b = right.criteria;\n      if (a !== b) {\n        if (a > b || a === void 0) return 1;\n        if (a < b || b === void 0) return -1;\n      }\n      return left.index - right.index;\n    }), 'value');\n  };\n\n  // An internal function used for aggregate \"group by\" operations.\n  var group = function(behavior, partition) {\n    return function(obj, iteratee, context) {\n      var result = partition ? [[], []] : {};\n      iteratee = cb(iteratee, context);\n      _.each(obj, function(value, index) {\n        var key = iteratee(value, index, obj);\n        behavior(result, value, key);\n      });\n      return result;\n    };\n  };\n\n  // Groups the object's values by a criterion. Pass either a string attribute\n  // to group by, or a function that returns the criterion.\n  _.groupBy = group(function(result, value, key) {\n    if (has(result, key)) result[key].push(value); else result[key] = [value];\n  });\n\n  // Indexes the object's values by a criterion, similar to `groupBy`, but for\n  // when you know that your index values will be unique.\n  _.indexBy = group(function(result, value, key) {\n    result[key] = value;\n  });\n\n  // Counts instances of an object that group by a certain criterion. Pass\n  // either a string attribute to count by, or a function that returns the\n  // criterion.\n  _.countBy = group(function(result, value, key) {\n    if (has(result, key)) result[key]++; else result[key] = 1;\n  });\n\n  var reStrSymbol = /[^\\ud800-\\udfff]|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\ud800-\\udfff]/g;\n  // Safely create a real, live array from anything iterable.\n  _.toArray = function(obj) {\n    if (!obj) return [];\n    if (_.isArray(obj)) return slice.call(obj);\n    if (_.isString(obj)) {\n      // Keep surrogate pair characters together\n      return obj.match(reStrSymbol);\n    }\n    if (isArrayLike(obj)) return _.map(obj, _.identity);\n    return _.values(obj);\n  };\n\n  // Return the number of elements in an object.\n  _.size = function(obj) {\n    if (obj == null) return 0;\n    return isArrayLike(obj) ? obj.length : _.keys(obj).length;\n  };\n\n  // Split a collection into two arrays: one whose elements all satisfy the given\n  // predicate, and one whose elements all do not satisfy the predicate.\n  _.partition = group(function(result, value, pass) {\n    result[pass ? 0 : 1].push(value);\n  }, true);\n\n  // Array Functions\n  // ---------------\n\n  // Get the first element of an array. Passing **n** will return the first N\n  // values in the array. Aliased as `head` and `take`. The **guard** check\n  // allows it to work with `_.map`.\n  _.first = _.head = _.take = function(array, n, guard) {\n    if (array == null || array.length < 1) return n == null ? void 0 : [];\n    if (n == null || guard) return array[0];\n    return _.initial(array, array.length - n);\n  };\n\n  // Returns everything but the last entry of the array. Especially useful on\n  // the arguments object. Passing **n** will return all the values in\n  // the array, excluding the last N.\n  _.initial = function(array, n, guard) {\n    return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));\n  };\n\n  // Get the last element of an array. Passing **n** will return the last N\n  // values in the array.\n  _.last = function(array, n, guard) {\n    if (array == null || array.length < 1) return n == null ? void 0 : [];\n    if (n == null || guard) return array[array.length - 1];\n    return _.rest(array, Math.max(0, array.length - n));\n  };\n\n  // Returns everything but the first entry of the array. Aliased as `tail` and `drop`.\n  // Especially useful on the arguments object. Passing an **n** will return\n  // the rest N values in the array.\n  _.rest = _.tail = _.drop = function(array, n, guard) {\n    return slice.call(array, n == null || guard ? 1 : n);\n  };\n\n  // Trim out all falsy values from an array.\n  _.compact = function(array) {\n    return _.filter(array, Boolean);\n  };\n\n  // Internal implementation of a recursive `flatten` function.\n  var flatten = function(input, shallow, strict, output) {\n    output = output || [];\n    var idx = output.length;\n    for (var i = 0, length = getLength(input); i < length; i++) {\n      var value = input[i];\n      if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {\n        // Flatten current level of array or arguments object.\n        if (shallow) {\n          var j = 0, len = value.length;\n          while (j < len) output[idx++] = value[j++];\n        } else {\n          flatten(value, shallow, strict, output);\n          idx = output.length;\n        }\n      } else if (!strict) {\n        output[idx++] = value;\n      }\n    }\n    return output;\n  };\n\n  // Flatten out an array, either recursively (by default), or just one level.\n  _.flatten = function(array, shallow) {\n    return flatten(array, shallow, false);\n  };\n\n  // Return a version of the array that does not contain the specified value(s).\n  _.without = restArguments(function(array, otherArrays) {\n    return _.difference(array, otherArrays);\n  });\n\n  // Produce a duplicate-free version of the array. If the array has already\n  // been sorted, you have the option of using a faster algorithm.\n  // The faster algorithm will not work with an iteratee if the iteratee\n  // is not a one-to-one function, so providing an iteratee will disable\n  // the faster algorithm.\n  // Aliased as `unique`.\n  _.uniq = _.unique = function(array, isSorted, iteratee, context) {\n    if (!_.isBoolean(isSorted)) {\n      context = iteratee;\n      iteratee = isSorted;\n      isSorted = false;\n    }\n    if (iteratee != null) iteratee = cb(iteratee, context);\n    var result = [];\n    var seen = [];\n    for (var i = 0, length = getLength(array); i < length; i++) {\n      var value = array[i],\n          computed = iteratee ? iteratee(value, i, array) : value;\n      if (isSorted && !iteratee) {\n        if (!i || seen !== computed) result.push(value);\n        seen = computed;\n      } else if (iteratee) {\n        if (!_.contains(seen, computed)) {\n          seen.push(computed);\n          result.push(value);\n        }\n      } else if (!_.contains(result, value)) {\n        result.push(value);\n      }\n    }\n    return result;\n  };\n\n  // Produce an array that contains the union: each distinct element from all of\n  // the passed-in arrays.\n  _.union = restArguments(function(arrays) {\n    return _.uniq(flatten(arrays, true, true));\n  });\n\n  // Produce an array that contains every item shared between all the\n  // passed-in arrays.\n  _.intersection = function(array) {\n    var result = [];\n    var argsLength = arguments.length;\n    for (var i = 0, length = getLength(array); i < length; i++) {\n      var item = array[i];\n      if (_.contains(result, item)) continue;\n      var j;\n      for (j = 1; j < argsLength; j++) {\n        if (!_.contains(arguments[j], item)) break;\n      }\n      if (j === argsLength) result.push(item);\n    }\n    return result;\n  };\n\n  // Take the difference between one array and a number of other arrays.\n  // Only the elements present in just the first array will remain.\n  _.difference = restArguments(function(array, rest) {\n    rest = flatten(rest, true, true);\n    return _.filter(array, function(value){\n      return !_.contains(rest, value);\n    });\n  });\n\n  // Complement of _.zip. Unzip accepts an array of arrays and groups\n  // each array's elements on shared indices.\n  _.unzip = function(array) {\n    var length = array && _.max(array, getLength).length || 0;\n    var result = Array(length);\n\n    for (var index = 0; index < length; index++) {\n      result[index] = _.pluck(array, index);\n    }\n    return result;\n  };\n\n  // Zip together multiple lists into a single array -- elements that share\n  // an index go together.\n  _.zip = restArguments(_.unzip);\n\n  // Converts lists into objects. Pass either a single array of `[key, value]`\n  // pairs, or two parallel arrays of the same length -- one of keys, and one of\n  // the corresponding values. Passing by pairs is the reverse of _.pairs.\n  _.object = function(list, values) {\n    var result = {};\n    for (var i = 0, length = getLength(list); i < length; i++) {\n      if (values) {\n        result[list[i]] = values[i];\n      } else {\n        result[list[i][0]] = list[i][1];\n      }\n    }\n    return result;\n  };\n\n  // Generator function to create the findIndex and findLastIndex functions.\n  var createPredicateIndexFinder = function(dir) {\n    return function(array, predicate, context) {\n      predicate = cb(predicate, context);\n      var length = getLength(array);\n      var index = dir > 0 ? 0 : length - 1;\n      for (; index >= 0 && index < length; index += dir) {\n        if (predicate(array[index], index, array)) return index;\n      }\n      return -1;\n    };\n  };\n\n  // Returns the first index on an array-like that passes a predicate test.\n  _.findIndex = createPredicateIndexFinder(1);\n  _.findLastIndex = createPredicateIndexFinder(-1);\n\n  // Use a comparator function to figure out the smallest index at which\n  // an object should be inserted so as to maintain order. Uses binary search.\n  _.sortedIndex = function(array, obj, iteratee, context) {\n    iteratee = cb(iteratee, context, 1);\n    var value = iteratee(obj);\n    var low = 0, high = getLength(array);\n    while (low < high) {\n      var mid = Math.floor((low + high) / 2);\n      if (iteratee(array[mid]) < value) low = mid + 1; else high = mid;\n    }\n    return low;\n  };\n\n  // Generator function to create the indexOf and lastIndexOf functions.\n  var createIndexFinder = function(dir, predicateFind, sortedIndex) {\n    return function(array, item, idx) {\n      var i = 0, length = getLength(array);\n      if (typeof idx == 'number') {\n        if (dir > 0) {\n          i = idx >= 0 ? idx : Math.max(idx + length, i);\n        } else {\n          length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;\n        }\n      } else if (sortedIndex && idx && length) {\n        idx = sortedIndex(array, item);\n        return array[idx] === item ? idx : -1;\n      }\n      if (item !== item) {\n        idx = predicateFind(slice.call(array, i, length), _.isNaN);\n        return idx >= 0 ? idx + i : -1;\n      }\n      for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {\n        if (array[idx] === item) return idx;\n      }\n      return -1;\n    };\n  };\n\n  // Return the position of the first occurrence of an item in an array,\n  // or -1 if the item is not included in the array.\n  // If the array is large and already in sort order, pass `true`\n  // for **isSorted** to use binary search.\n  _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex);\n  _.lastIndexOf = createIndexFinder(-1, _.findLastIndex);\n\n  // Generate an integer Array containing an arithmetic progression. A port of\n  // the native Python `range()` function. See\n  // [the Python documentation](http://docs.python.org/library/functions.html#range).\n  _.range = function(start, stop, step) {\n    if (stop == null) {\n      stop = start || 0;\n      start = 0;\n    }\n    if (!step) {\n      step = stop < start ? -1 : 1;\n    }\n\n    var length = Math.max(Math.ceil((stop - start) / step), 0);\n    var range = Array(length);\n\n    for (var idx = 0; idx < length; idx++, start += step) {\n      range[idx] = start;\n    }\n\n    return range;\n  };\n\n  // Chunk a single array into multiple arrays, each containing `count` or fewer\n  // items.\n  _.chunk = function(array, count) {\n    if (count == null || count < 1) return [];\n    var result = [];\n    var i = 0, length = array.length;\n    while (i < length) {\n      result.push(slice.call(array, i, i += count));\n    }\n    return result;\n  };\n\n  // Function (ahem) Functions\n  // ------------------\n\n  // Determines whether to execute a function as a constructor\n  // or a normal function with the provided arguments.\n  var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {\n    if (!(callingContext instanceof boundFunc)) return sourceFunc.apply(context, args);\n    var self = baseCreate(sourceFunc.prototype);\n    var result = sourceFunc.apply(self, args);\n    if (_.isObject(result)) return result;\n    return self;\n  };\n\n  // Create a function bound to a given object (assigning `this`, and arguments,\n  // optionally). Delegates to **ECMAScript 5**'s native `Function.bind` if\n  // available.\n  _.bind = restArguments(function(func, context, args) {\n    if (!_.isFunction(func)) throw new TypeError('Bind must be called on a function');\n    var bound = restArguments(function(callArgs) {\n      return executeBound(func, bound, context, this, args.concat(callArgs));\n    });\n    return bound;\n  });\n\n  // Partially apply a function by creating a version that has had some of its\n  // arguments pre-filled, without changing its dynamic `this` context. _ acts\n  // as a placeholder by default, allowing any combination of arguments to be\n  // pre-filled. Set `_.partial.placeholder` for a custom placeholder argument.\n  _.partial = restArguments(function(func, boundArgs) {\n    var placeholder = _.partial.placeholder;\n    var bound = function() {\n      var position = 0, length = boundArgs.length;\n      var args = Array(length);\n      for (var i = 0; i < length; i++) {\n        args[i] = boundArgs[i] === placeholder ? arguments[position++] : boundArgs[i];\n      }\n      while (position < arguments.length) args.push(arguments[position++]);\n      return executeBound(func, bound, this, this, args);\n    };\n    return bound;\n  });\n\n  _.partial.placeholder = _;\n\n  // Bind a number of an object's methods to that object. Remaining arguments\n  // are the method names to be bound. Useful for ensuring that all callbacks\n  // defined on an object belong to it.\n  _.bindAll = restArguments(function(obj, keys) {\n    keys = flatten(keys, false, false);\n    var index = keys.length;\n    if (index < 1) throw new Error('bindAll must be passed function names');\n    while (index--) {\n      var key = keys[index];\n      obj[key] = _.bind(obj[key], obj);\n    }\n  });\n\n  // Memoize an expensive function by storing its results.\n  _.memoize = function(func, hasher) {\n    var memoize = function(key) {\n      var cache = memoize.cache;\n      var address = '' + (hasher ? hasher.apply(this, arguments) : key);\n      if (!has(cache, address)) cache[address] = func.apply(this, arguments);\n      return cache[address];\n    };\n    memoize.cache = {};\n    return memoize;\n  };\n\n  // Delays a function for the given number of milliseconds, and then calls\n  // it with the arguments supplied.\n  _.delay = restArguments(function(func, wait, args) {\n    return setTimeout(function() {\n      return func.apply(null, args);\n    }, wait);\n  });\n\n  // Defers a function, scheduling it to run after the current call stack has\n  // cleared.\n  _.defer = _.partial(_.delay, _, 1);\n\n  // Returns a function, that, when invoked, will only be triggered at most once\n  // during a given window of time. Normally, the throttled function will run\n  // as much as it can, without ever going more than once per `wait` duration;\n  // but if you'd like to disable the execution on the leading edge, pass\n  // `{leading: false}`. To disable execution on the trailing edge, ditto.\n  _.throttle = function(func, wait, options) {\n    var timeout, context, args, result;\n    var previous = 0;\n    if (!options) options = {};\n\n    var later = function() {\n      previous = options.leading === false ? 0 : _.now();\n      timeout = null;\n      result = func.apply(context, args);\n      if (!timeout) context = args = null;\n    };\n\n    var throttled = function() {\n      var now = _.now();\n      if (!previous && options.leading === false) previous = now;\n      var remaining = wait - (now - previous);\n      context = this;\n      args = arguments;\n      if (remaining <= 0 || remaining > wait) {\n        if (timeout) {\n          clearTimeout(timeout);\n          timeout = null;\n        }\n        previous = now;\n        result = func.apply(context, args);\n        if (!timeout) context = args = null;\n      } else if (!timeout && options.trailing !== false) {\n        timeout = setTimeout(later, remaining);\n      }\n      return result;\n    };\n\n    throttled.cancel = function() {\n      clearTimeout(timeout);\n      previous = 0;\n      timeout = context = args = null;\n    };\n\n    return throttled;\n  };\n\n  // Returns a function, that, as long as it continues to be invoked, will not\n  // be triggered. The function will be called after it stops being called for\n  // N milliseconds. If `immediate` is passed, trigger the function on the\n  // leading edge, instead of the trailing.\n  _.debounce = function(func, wait, immediate) {\n    var timeout, result;\n\n    var later = function(context, args) {\n      timeout = null;\n      if (args) result = func.apply(context, args);\n    };\n\n    var debounced = restArguments(function(args) {\n      if (timeout) clearTimeout(timeout);\n      if (immediate) {\n        var callNow = !timeout;\n        timeout = setTimeout(later, wait);\n        if (callNow) result = func.apply(this, args);\n      } else {\n        timeout = _.delay(later, wait, this, args);\n      }\n\n      return result;\n    });\n\n    debounced.cancel = function() {\n      clearTimeout(timeout);\n      timeout = null;\n    };\n\n    return debounced;\n  };\n\n  // Returns the first function passed as an argument to the second,\n  // allowing you to adjust arguments, run code before and after, and\n  // conditionally execute the original function.\n  _.wrap = function(func, wrapper) {\n    return _.partial(wrapper, func);\n  };\n\n  // Returns a negated version of the passed-in predicate.\n  _.negate = function(predicate) {\n    return function() {\n      return !predicate.apply(this, arguments);\n    };\n  };\n\n  // Returns a function that is the composition of a list of functions, each\n  // consuming the return value of the function that follows.\n  _.compose = function() {\n    var args = arguments;\n    var start = args.length - 1;\n    return function() {\n      var i = start;\n      var result = args[start].apply(this, arguments);\n      while (i--) result = args[i].call(this, result);\n      return result;\n    };\n  };\n\n  // Returns a function that will only be executed on and after the Nth call.\n  _.after = function(times, func) {\n    return function() {\n      if (--times < 1) {\n        return func.apply(this, arguments);\n      }\n    };\n  };\n\n  // Returns a function that will only be executed up to (but not including) the Nth call.\n  _.before = function(times, func) {\n    var memo;\n    return function() {\n      if (--times > 0) {\n        memo = func.apply(this, arguments);\n      }\n      if (times <= 1) func = null;\n      return memo;\n    };\n  };\n\n  // Returns a function that will be executed at most one time, no matter how\n  // often you call it. Useful for lazy initialization.\n  _.once = _.partial(_.before, 2);\n\n  _.restArguments = restArguments;\n\n  // Object Functions\n  // ----------------\n\n  // Keys in IE < 9 that won't be iterated by `for key in ...` and thus missed.\n  var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');\n  var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString',\n    'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n\n  var collectNonEnumProps = function(obj, keys) {\n    var nonEnumIdx = nonEnumerableProps.length;\n    var constructor = obj.constructor;\n    var proto = _.isFunction(constructor) && constructor.prototype || ObjProto;\n\n    // Constructor is a special case.\n    var prop = 'constructor';\n    if (has(obj, prop) && !_.contains(keys, prop)) keys.push(prop);\n\n    while (nonEnumIdx--) {\n      prop = nonEnumerableProps[nonEnumIdx];\n      if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {\n        keys.push(prop);\n      }\n    }\n  };\n\n  // Retrieve the names of an object's own properties.\n  // Delegates to **ECMAScript 5**'s native `Object.keys`.\n  _.keys = function(obj) {\n    if (!_.isObject(obj)) return [];\n    if (nativeKeys) return nativeKeys(obj);\n    var keys = [];\n    for (var key in obj) if (has(obj, key)) keys.push(key);\n    // Ahem, IE < 9.\n    if (hasEnumBug) collectNonEnumProps(obj, keys);\n    return keys;\n  };\n\n  // Retrieve all the property names of an object.\n  _.allKeys = function(obj) {\n    if (!_.isObject(obj)) return [];\n    var keys = [];\n    for (var key in obj) keys.push(key);\n    // Ahem, IE < 9.\n    if (hasEnumBug) collectNonEnumProps(obj, keys);\n    return keys;\n  };\n\n  // Retrieve the values of an object's properties.\n  _.values = function(obj) {\n    var keys = _.keys(obj);\n    var length = keys.length;\n    var values = Array(length);\n    for (var i = 0; i < length; i++) {\n      values[i] = obj[keys[i]];\n    }\n    return values;\n  };\n\n  // Returns the results of applying the iteratee to each element of the object.\n  // In contrast to _.map it returns an object.\n  _.mapObject = function(obj, iteratee, context) {\n    iteratee = cb(iteratee, context);\n    var keys = _.keys(obj),\n        length = keys.length,\n        results = {};\n    for (var index = 0; index < length; index++) {\n      var currentKey = keys[index];\n      results[currentKey] = iteratee(obj[currentKey], currentKey, obj);\n    }\n    return results;\n  };\n\n  // Convert an object into a list of `[key, value]` pairs.\n  // The opposite of _.object.\n  _.pairs = function(obj) {\n    var keys = _.keys(obj);\n    var length = keys.length;\n    var pairs = Array(length);\n    for (var i = 0; i < length; i++) {\n      pairs[i] = [keys[i], obj[keys[i]]];\n    }\n    return pairs;\n  };\n\n  // Invert the keys and values of an object. The values must be serializable.\n  _.invert = function(obj) {\n    var result = {};\n    var keys = _.keys(obj);\n    for (var i = 0, length = keys.length; i < length; i++) {\n      result[obj[keys[i]]] = keys[i];\n    }\n    return result;\n  };\n\n  // Return a sorted list of the function names available on the object.\n  // Aliased as `methods`.\n  _.functions = _.methods = function(obj) {\n    var names = [];\n    for (var key in obj) {\n      if (_.isFunction(obj[key])) names.push(key);\n    }\n    return names.sort();\n  };\n\n  // An internal function for creating assigner functions.\n  var createAssigner = function(keysFunc, defaults) {\n    return function(obj) {\n      var length = arguments.length;\n      if (defaults) obj = Object(obj);\n      if (length < 2 || obj == null) return obj;\n      for (var index = 1; index < length; index++) {\n        var source = arguments[index],\n            keys = keysFunc(source),\n            l = keys.length;\n        for (var i = 0; i < l; i++) {\n          var key = keys[i];\n          if (!defaults || obj[key] === void 0) obj[key] = source[key];\n        }\n      }\n      return obj;\n    };\n  };\n\n  // Extend a given object with all the properties in passed-in object(s).\n  _.extend = createAssigner(_.allKeys);\n\n  // Assigns a given object with all the own properties in the passed-in object(s).\n  // (https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object/assign)\n  _.extendOwn = _.assign = createAssigner(_.keys);\n\n  // Returns the first key on an object that passes a predicate test.\n  _.findKey = function(obj, predicate, context) {\n    predicate = cb(predicate, context);\n    var keys = _.keys(obj), key;\n    for (var i = 0, length = keys.length; i < length; i++) {\n      key = keys[i];\n      if (predicate(obj[key], key, obj)) return key;\n    }\n  };\n\n  // Internal pick helper function to determine if `obj` has key `key`.\n  var keyInObj = function(value, key, obj) {\n    return key in obj;\n  };\n\n  // Return a copy of the object only containing the whitelisted properties.\n  _.pick = restArguments(function(obj, keys) {\n    var result = {}, iteratee = keys[0];\n    if (obj == null) return result;\n    if (_.isFunction(iteratee)) {\n      if (keys.length > 1) iteratee = optimizeCb(iteratee, keys[1]);\n      keys = _.allKeys(obj);\n    } else {\n      iteratee = keyInObj;\n      keys = flatten(keys, false, false);\n      obj = Object(obj);\n    }\n    for (var i = 0, length = keys.length; i < length; i++) {\n      var key = keys[i];\n      var value = obj[key];\n      if (iteratee(value, key, obj)) result[key] = value;\n    }\n    return result;\n  });\n\n  // Return a copy of the object without the blacklisted properties.\n  _.omit = restArguments(function(obj, keys) {\n    var iteratee = keys[0], context;\n    if (_.isFunction(iteratee)) {\n      iteratee = _.negate(iteratee);\n      if (keys.length > 1) context = keys[1];\n    } else {\n      keys = _.map(flatten(keys, false, false), String);\n      iteratee = function(value, key) {\n        return !_.contains(keys, key);\n      };\n    }\n    return _.pick(obj, iteratee, context);\n  });\n\n  // Fill in a given object with default properties.\n  _.defaults = createAssigner(_.allKeys, true);\n\n  // Creates an object that inherits from the given prototype object.\n  // If additional properties are provided then they will be added to the\n  // created object.\n  _.create = function(prototype, props) {\n    var result = baseCreate(prototype);\n    if (props) _.extendOwn(result, props);\n    return result;\n  };\n\n  // Create a (shallow-cloned) duplicate of an object.\n  _.clone = function(obj) {\n    if (!_.isObject(obj)) return obj;\n    return _.isArray(obj) ? obj.slice() : _.extend({}, obj);\n  };\n\n  // Invokes interceptor with the obj, and then returns obj.\n  // The primary purpose of this method is to \"tap into\" a method chain, in\n  // order to perform operations on intermediate results within the chain.\n  _.tap = function(obj, interceptor) {\n    interceptor(obj);\n    return obj;\n  };\n\n  // Returns whether an object has a given set of `key:value` pairs.\n  _.isMatch = function(object, attrs) {\n    var keys = _.keys(attrs), length = keys.length;\n    if (object == null) return !length;\n    var obj = Object(object);\n    for (var i = 0; i < length; i++) {\n      var key = keys[i];\n      if (attrs[key] !== obj[key] || !(key in obj)) return false;\n    }\n    return true;\n  };\n\n\n  // Internal recursive comparison function for `isEqual`.\n  var eq, deepEq;\n  eq = function(a, b, aStack, bStack) {\n    // Identical objects are equal. `0 === -0`, but they aren't identical.\n    // See the [Harmony `egal` proposal](http://wiki.ecmascript.org/doku.php?id=harmony:egal).\n    if (a === b) return a !== 0 || 1 / a === 1 / b;\n    // `null` or `undefined` only equal to itself (strict comparison).\n    if (a == null || b == null) return false;\n    // `NaN`s are equivalent, but non-reflexive.\n    if (a !== a) return b !== b;\n    // Exhaust primitive checks\n    var type = typeof a;\n    if (type !== 'function' && type !== 'object' && typeof b != 'object') return false;\n    return deepEq(a, b, aStack, bStack);\n  };\n\n  // Internal recursive comparison function for `isEqual`.\n  deepEq = function(a, b, aStack, bStack) {\n    // Unwrap any wrapped objects.\n    if (a instanceof _) a = a._wrapped;\n    if (b instanceof _) b = b._wrapped;\n    // Compare `[[Class]]` names.\n    var className = toString.call(a);\n    if (className !== toString.call(b)) return false;\n    switch (className) {\n      // Strings, numbers, regular expressions, dates, and booleans are compared by value.\n      case '[object RegExp]':\n      // RegExps are coerced to strings for comparison (Note: '' + /a/i === '/a/i')\n      case '[object String]':\n        // Primitives and their corresponding object wrappers are equivalent; thus, `\"5\"` is\n        // equivalent to `new String(\"5\")`.\n        return '' + a === '' + b;\n      case '[object Number]':\n        // `NaN`s are equivalent, but non-reflexive.\n        // Object(NaN) is equivalent to NaN.\n        if (+a !== +a) return +b !== +b;\n        // An `egal` comparison is performed for other numeric values.\n        return +a === 0 ? 1 / +a === 1 / b : +a === +b;\n      case '[object Date]':\n      case '[object Boolean]':\n        // Coerce dates and booleans to numeric primitive values. Dates are compared by their\n        // millisecond representations. Note that invalid dates with millisecond representations\n        // of `NaN` are not equivalent.\n        return +a === +b;\n      case '[object Symbol]':\n        return SymbolProto.valueOf.call(a) === SymbolProto.valueOf.call(b);\n    }\n\n    var areArrays = className === '[object Array]';\n    if (!areArrays) {\n      if (typeof a != 'object' || typeof b != 'object') return false;\n\n      // Objects with different constructors are not equivalent, but `Object`s or `Array`s\n      // from different frames are.\n      var aCtor = a.constructor, bCtor = b.constructor;\n      if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor &&\n                               _.isFunction(bCtor) && bCtor instanceof bCtor)\n                          && ('constructor' in a && 'constructor' in b)) {\n        return false;\n      }\n    }\n    // Assume equality for cyclic structures. The algorithm for detecting cyclic\n    // structures is adapted from ES 5.1 section 15.12.3, abstract operation `JO`.\n\n    // Initializing stack of traversed objects.\n    // It's done here since we only need them for objects and arrays comparison.\n    aStack = aStack || [];\n    bStack = bStack || [];\n    var length = aStack.length;\n    while (length--) {\n      // Linear search. Performance is inversely proportional to the number of\n      // unique nested structures.\n      if (aStack[length] === a) return bStack[length] === b;\n    }\n\n    // Add the first object to the stack of traversed objects.\n    aStack.push(a);\n    bStack.push(b);\n\n    // Recursively compare objects and arrays.\n    if (areArrays) {\n      // Compare array lengths to determine if a deep comparison is necessary.\n      length = a.length;\n      if (length !== b.length) return false;\n      // Deep compare the contents, ignoring non-numeric properties.\n      while (length--) {\n        if (!eq(a[length], b[length], aStack, bStack)) return false;\n      }\n    } else {\n      // Deep compare objects.\n      var keys = _.keys(a), key;\n      length = keys.length;\n      // Ensure that both objects contain the same number of properties before comparing deep equality.\n      if (_.keys(b).length !== length) return false;\n      while (length--) {\n        // Deep compare each member\n        key = keys[length];\n        if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;\n      }\n    }\n    // Remove the first object from the stack of traversed objects.\n    aStack.pop();\n    bStack.pop();\n    return true;\n  };\n\n  // Perform a deep comparison to check if two objects are equal.\n  _.isEqual = function(a, b) {\n    return eq(a, b);\n  };\n\n  // Is a given array, string, or object empty?\n  // An \"empty\" object has no enumerable own-properties.\n  _.isEmpty = function(obj) {\n    if (obj == null) return true;\n    if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj))) return obj.length === 0;\n    return _.keys(obj).length === 0;\n  };\n\n  // Is a given value a DOM element?\n  _.isElement = function(obj) {\n    return !!(obj && obj.nodeType === 1);\n  };\n\n  // Is a given value an array?\n  // Delegates to ECMA5's native Array.isArray\n  _.isArray = nativeIsArray || function(obj) {\n    return toString.call(obj) === '[object Array]';\n  };\n\n  // Is a given variable an object?\n  _.isObject = function(obj) {\n    var type = typeof obj;\n    return type === 'function' || type === 'object' && !!obj;\n  };\n\n  // Add some isType methods: isArguments, isFunction, isString, isNumber, isDate, isRegExp, isError, isMap, isWeakMap, isSet, isWeakSet.\n  _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error', 'Symbol', 'Map', 'WeakMap', 'Set', 'WeakSet'], function(name) {\n    _['is' + name] = function(obj) {\n      return toString.call(obj) === '[object ' + name + ']';\n    };\n  });\n\n  // Define a fallback version of the method in browsers (ahem, IE < 9), where\n  // there isn't any inspectable \"Arguments\" type.\n  if (!_.isArguments(arguments)) {\n    _.isArguments = function(obj) {\n      return has(obj, 'callee');\n    };\n  }\n\n  // Optimize `isFunction` if appropriate. Work around some typeof bugs in old v8,\n  // IE 11 (#1621), Safari 8 (#1929), and PhantomJS (#2236).\n  var nodelist = root.document && root.document.childNodes;\n  if (typeof /./ != 'function' && typeof Int8Array != 'object' && typeof nodelist != 'function') {\n    _.isFunction = function(obj) {\n      return typeof obj == 'function' || false;\n    };\n  }\n\n  // Is a given object a finite number?\n  _.isFinite = function(obj) {\n    return !_.isSymbol(obj) && isFinite(obj) && !isNaN(parseFloat(obj));\n  };\n\n  // Is the given value `NaN`?\n  _.isNaN = function(obj) {\n    return _.isNumber(obj) && isNaN(obj);\n  };\n\n  // Is a given value a boolean?\n  _.isBoolean = function(obj) {\n    return obj === true || obj === false || toString.call(obj) === '[object Boolean]';\n  };\n\n  // Is a given value equal to null?\n  _.isNull = function(obj) {\n    return obj === null;\n  };\n\n  // Is a given variable undefined?\n  _.isUndefined = function(obj) {\n    return obj === void 0;\n  };\n\n  // Shortcut function for checking if an object has a given property directly\n  // on itself (in other words, not on a prototype).\n  _.has = function(obj, path) {\n    if (!_.isArray(path)) {\n      return has(obj, path);\n    }\n    var length = path.length;\n    for (var i = 0; i < length; i++) {\n      var key = path[i];\n      if (obj == null || !hasOwnProperty.call(obj, key)) {\n        return false;\n      }\n      obj = obj[key];\n    }\n    return !!length;\n  };\n\n  // Utility Functions\n  // -----------------\n\n  // Run Underscore.js in *noConflict* mode, returning the `_` variable to its\n  // previous owner. Returns a reference to the Underscore object.\n  _.noConflict = function() {\n    root._ = previousUnderscore;\n    return this;\n  };\n\n  // Keep the identity function around for default iteratees.\n  _.identity = function(value) {\n    return value;\n  };\n\n  // Predicate-generating functions. Often useful outside of Underscore.\n  _.constant = function(value) {\n    return function() {\n      return value;\n    };\n  };\n\n  _.noop = function(){};\n\n  // Creates a function that, when passed an object, will traverse that object’s\n  // properties down the given `path`, specified as an array of keys or indexes.\n  _.property = function(path) {\n    if (!_.isArray(path)) {\n      return shallowProperty(path);\n    }\n    return function(obj) {\n      return deepGet(obj, path);\n    };\n  };\n\n  // Generates a function for a given object that returns a given property.\n  _.propertyOf = function(obj) {\n    if (obj == null) {\n      return function(){};\n    }\n    return function(path) {\n      return !_.isArray(path) ? obj[path] : deepGet(obj, path);\n    };\n  };\n\n  // Returns a predicate for checking whether an object has a given set of\n  // `key:value` pairs.\n  _.matcher = _.matches = function(attrs) {\n    attrs = _.extendOwn({}, attrs);\n    return function(obj) {\n      return _.isMatch(obj, attrs);\n    };\n  };\n\n  // Run a function **n** times.\n  _.times = function(n, iteratee, context) {\n    var accum = Array(Math.max(0, n));\n    iteratee = optimizeCb(iteratee, context, 1);\n    for (var i = 0; i < n; i++) accum[i] = iteratee(i);\n    return accum;\n  };\n\n  // Return a random integer between min and max (inclusive).\n  _.random = function(min, max) {\n    if (max == null) {\n      max = min;\n      min = 0;\n    }\n    return min + Math.floor(Math.random() * (max - min + 1));\n  };\n\n  // A (possibly faster) way to get the current timestamp as an integer.\n  _.now = Date.now || function() {\n    return new Date().getTime();\n  };\n\n  // List of HTML entities for escaping.\n  var escapeMap = {\n    '&': '&amp;',\n    '<': '&lt;',\n    '>': '&gt;',\n    '\"': '&quot;',\n    \"'\": '&#x27;',\n    '`': '&#x60;'\n  };\n  var unescapeMap = _.invert(escapeMap);\n\n  // Functions for escaping and unescaping strings to/from HTML interpolation.\n  var createEscaper = function(map) {\n    var escaper = function(match) {\n      return map[match];\n    };\n    // Regexes for identifying a key that needs to be escaped.\n    var source = '(?:' + _.keys(map).join('|') + ')';\n    var testRegexp = RegExp(source);\n    var replaceRegexp = RegExp(source, 'g');\n    return function(string) {\n      string = string == null ? '' : '' + string;\n      return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;\n    };\n  };\n  _.escape = createEscaper(escapeMap);\n  _.unescape = createEscaper(unescapeMap);\n\n  // Traverses the children of `obj` along `path`. If a child is a function, it\n  // is invoked with its parent as context. Returns the value of the final\n  // child, or `fallback` if any child is undefined.\n  _.result = function(obj, path, fallback) {\n    if (!_.isArray(path)) path = [path];\n    var length = path.length;\n    if (!length) {\n      return _.isFunction(fallback) ? fallback.call(obj) : fallback;\n    }\n    for (var i = 0; i < length; i++) {\n      var prop = obj == null ? void 0 : obj[path[i]];\n      if (prop === void 0) {\n        prop = fallback;\n        i = length; // Ensure we don't continue iterating.\n      }\n      obj = _.isFunction(prop) ? prop.call(obj) : prop;\n    }\n    return obj;\n  };\n\n  // Generate a unique integer id (unique within the entire client session).\n  // Useful for temporary DOM ids.\n  var idCounter = 0;\n  _.uniqueId = function(prefix) {\n    var id = ++idCounter + '';\n    return prefix ? prefix + id : id;\n  };\n\n  // By default, Underscore uses ERB-style template delimiters, change the\n  // following template settings to use alternative delimiters.\n  _.templateSettings = {\n    evaluate: /<%([\\s\\S]+?)%>/g,\n    interpolate: /<%=([\\s\\S]+?)%>/g,\n    escape: /<%-([\\s\\S]+?)%>/g\n  };\n\n  // When customizing `templateSettings`, if you don't want to define an\n  // interpolation, evaluation or escaping regex, we need one that is\n  // guaranteed not to match.\n  var noMatch = /(.)^/;\n\n  // Certain characters need to be escaped so that they can be put into a\n  // string literal.\n  var escapes = {\n    \"'\": \"'\",\n    '\\\\': '\\\\',\n    '\\r': 'r',\n    '\\n': 'n',\n    '\\u2028': 'u2028',\n    '\\u2029': 'u2029'\n  };\n\n  var escapeRegExp = /\\\\|'|\\r|\\n|\\u2028|\\u2029/g;\n\n  var escapeChar = function(match) {\n    return '\\\\' + escapes[match];\n  };\n\n  // JavaScript micro-templating, similar to John Resig's implementation.\n  // Underscore templating handles arbitrary delimiters, preserves whitespace,\n  // and correctly escapes quotes within interpolated code.\n  // NB: `oldSettings` only exists for backwards compatibility.\n  _.template = function(text, settings, oldSettings) {\n    if (!settings && oldSettings) settings = oldSettings;\n    settings = _.defaults({}, settings, _.templateSettings);\n\n    // Combine delimiters into one regular expression via alternation.\n    var matcher = RegExp([\n      (settings.escape || noMatch).source,\n      (settings.interpolate || noMatch).source,\n      (settings.evaluate || noMatch).source\n    ].join('|') + '|$', 'g');\n\n    // Compile the template source, escaping string literals appropriately.\n    var index = 0;\n    var source = \"__p+='\";\n    text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {\n      source += text.slice(index, offset).replace(escapeRegExp, escapeChar);\n      index = offset + match.length;\n\n      if (escape) {\n        source += \"'+\\n((__t=(\" + escape + \"))==null?'':_.escape(__t))+\\n'\";\n      } else if (interpolate) {\n        source += \"'+\\n((__t=(\" + interpolate + \"))==null?'':__t)+\\n'\";\n      } else if (evaluate) {\n        source += \"';\\n\" + evaluate + \"\\n__p+='\";\n      }\n\n      // Adobe VMs need the match returned to produce the correct offset.\n      return match;\n    });\n    source += \"';\\n\";\n\n    // If a variable is not specified, place data values in local scope.\n    if (!settings.variable) source = 'with(obj||{}){\\n' + source + '}\\n';\n\n    source = \"var __t,__p='',__j=Array.prototype.join,\" +\n      \"print=function(){__p+=__j.call(arguments,'');};\\n\" +\n      source + 'return __p;\\n';\n\n    var render;\n    try {\n      render = new Function(settings.variable || 'obj', '_', source);\n    } catch (e) {\n      e.source = source;\n      throw e;\n    }\n\n    var template = function(data) {\n      return render.call(this, data, _);\n    };\n\n    // Provide the compiled source as a convenience for precompilation.\n    var argument = settings.variable || 'obj';\n    template.source = 'function(' + argument + '){\\n' + source + '}';\n\n    return template;\n  };\n\n  // Add a \"chain\" function. Start chaining a wrapped Underscore object.\n  _.chain = function(obj) {\n    var instance = _(obj);\n    instance._chain = true;\n    return instance;\n  };\n\n  // OOP\n  // ---------------\n  // If Underscore is called as a function, it returns a wrapped object that\n  // can be used OO-style. This wrapper holds altered versions of all the\n  // underscore functions. Wrapped objects may be chained.\n\n  // Helper function to continue chaining intermediate results.\n  var chainResult = function(instance, obj) {\n    return instance._chain ? _(obj).chain() : obj;\n  };\n\n  // Add your own custom functions to the Underscore object.\n  _.mixin = function(obj) {\n    _.each(_.functions(obj), function(name) {\n      var func = _[name] = obj[name];\n      _.prototype[name] = function() {\n        var args = [this._wrapped];\n        push.apply(args, arguments);\n        return chainResult(this, func.apply(_, args));\n      };\n    });\n    return _;\n  };\n\n  // Add all of the Underscore functions to the wrapper object.\n  _.mixin(_);\n\n  // Add all mutator Array functions to the wrapper.\n  _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {\n    var method = ArrayProto[name];\n    _.prototype[name] = function() {\n      var obj = this._wrapped;\n      method.apply(obj, arguments);\n      if ((name === 'shift' || name === 'splice') && obj.length === 0) delete obj[0];\n      return chainResult(this, obj);\n    };\n  });\n\n  // Add all accessor Array functions to the wrapper.\n  _.each(['concat', 'join', 'slice'], function(name) {\n    var method = ArrayProto[name];\n    _.prototype[name] = function() {\n      return chainResult(this, method.apply(this._wrapped, arguments));\n    };\n  });\n\n  // Extracts the result from a wrapped and chained object.\n  _.prototype.value = function() {\n    return this._wrapped;\n  };\n\n  // Provide unwrapping proxy for some methods used in engine operations\n  // such as arithmetic and JSON stringification.\n  _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;\n\n  _.prototype.toString = function() {\n    return String(this._wrapped);\n  };\n\n  // AMD registration happens at the end for compatibility with AMD loaders\n  // that may not enforce next-turn semantics on modules. Even though general\n  // practice for AMD registration is to be anonymous, underscore registers\n  // as a named module because, like jQuery, it is a base library that is\n  // popular enough to be bundled in a third party lib, but not be part of\n  // an AMD load request. Those cases could generate an error when an\n  // anonymous define() is called outside of a loader request.\n  if (typeof define == 'function' && define.amd) {\n    define('underscore', [], function() {\n      return _;\n    });\n  }\n}());\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","module.exports = function(module) {\n\tif (!module.webpackPolyfill) {\n\t\tmodule.deprecate = function() {};\n\t\tmodule.paths = [];\n\t\t// module.parent = undefined by default\n\t\tif (!module.children) module.children = [];\n\t\tObject.defineProperty(module, \"loaded\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.l;\n\t\t\t}\n\t\t});\n\t\tObject.defineProperty(module, \"id\", {\n\t\t\tenumerable: true,\n\t\t\tget: function() {\n\t\t\t\treturn module.i;\n\t\t\t}\n\t\t});\n\t\tmodule.webpackPolyfill = 1;\n\t}\n\treturn module;\n};\n","module.exports = \"<div class=\\\"nco-scheduler-component\\\">\\n    <span class=\\\"bg-info text-info\\\" data-ng-if=\\\"$ctrl._ui.loading\\\">\\n        <i role=\\\"none\\\" class=\\\"fa fa-spinner fa-spin\\\">&nbsp;</i> Loading...\\n    </span>\\n    <nco-scheduler-filters\\n        data-filter-and-sort=\\\"$ctrl.filterAndSort(filters, sort)\\\">&nbsp;</nco-scheduler-filters>\\n    <nco-scheduler-list\\n        data-events=\\\"$ctrl.events\\\"\\n        data-ng-if=\\\"!$ctrl._ui.loading\\\">&nbsp;</nco-scheduler-list>\\n    <nco-scheduler-pagination\\n        data-filter-and-sort=\\\"$ctrl.filterAndSort()\\\"\\n        data-total=\\\"$ctrl._ui.total\\\"\\n        data-page-number=\\\"$ctrl._ui.pageNumber\\\"\\n        data-page-size=\\\"$ctrl._ui.pageSize\\\"\\n        data-on-next-page=\\\"$ctrl.nextPage()\\\"\\n        data-on-prev-page=\\\"$ctrl.prevPage()\\\"\\n        data-ng-if=\\\"!$ctrl._ui.loading\\\">&nbsp;</nco-scheduler-pagination>\\n</div>\\n\";","module.exports = \"<div class=\\\"nco-scheduler-filters\\\">\\n    <h3 class=\\\"sort-title\\\">Filters:</h3>\\n    <div class=\\\"filter form-group\\\"\\n         data-ng-repeat=\\\"filter in $ctrl.filterValues\\\">\\n        <select name=\\\"{{filter.name}}\\\"\\n                id=\\\"filter-{{filter.name}}\\\"\\n                data-ng-model=\\\"$ctrl.filterSel[filter.name]\\\"\\n                data-ng-options=\\\"name for name in filter.value\\\"\\n                data-ng-change=\\\"$ctrl.applyFilterAndSort()\\\"\\n                class=\\\"form-control\\\">\\n            <option value=\\\"\\\">-- Filter by {{filter.name}} --</option>\\n        </select>\\n    </div>\\n    <div class=\\\"filter form-group\\\">\\n        <span class=\\\"fa-stack fa-lg\\\" style=\\\"margin: -8px;\\\" ng-if=\\\"$ctrl.historyEnabled\\\" data-ng-click=\\\"$ctrl.toggleHistory()\\\">\\n            <i role=\\\"none\\\" class=\\\"fa fa-square fa-stack-1x\\\" style=\\\"color: white;\\\"></i>\\n            <i role=\\\"none\\\" class=\\\"fa fa-check-square fa-stack-1x\\\" style=\\\"color: #1CB500;\\\"></i>\\n        </span>\\n        <span class=\\\"fa-stack fa-lg\\\" style=\\\"margin: -8px;\\\" ng-if=\\\"!$ctrl.historyEnabled\\\" data-ng-click=\\\"$ctrl.toggleHistory()\\\">\\n            <i role=\\\"none\\\" class=\\\"fa fa-square fa-stack-1x\\\" style=\\\"color: white;\\\"></i>\\n            <i role=\\\"none\\\" class=\\\"fa fa-square-o fa-stack-1x\\\" style=\\\"color: lightgray;\\\"></i>\\n        </span>\\n        <label date-ng-click=\\\"$ctrl.toggleHistory()\\\">Show Past Events</label>\\n    </div>\\n    <span style=\\\"width: 75px; display: inline-block;\\\">&nbsp;</span>\\n    <h3 class=\\\"sort-title\\\">Sort by:</h3>\\n    <div class=\\\"sort form-group\\\">\\n        <select name=\\\"sort-by\\\"\\n                id=\\\"sort-by\\\"\\n                data-ng-model=\\\"$ctrl.sortby\\\"\\n                data-ng-options=\\\"name for name in $ctrl._ui.sortBy\\\"\\n                data-ng-change=\\\"$ctrl.applyFilterAndSort()\\\"\\n                class=\\\"form-control\\\">\\n            <option value=\\\"\\\">-- Select a sorting option --</option>\\n        </select>\\n    </div>\\n</div>\\n\";","module.exports = \"<div class=\\\"nco-scheduler-list\\\">\\n    <div data-ng-if=\\\"$ctrl.events==[]\\\">Error: No events found</div>\\n    <table>\\n        <tr>\\n            <th>Estimated Start Date</th>\\n            <th>Estimated End Date</th>\\n            <th>Facility</th>\\n            <th>Award</th>\\n            <th>Event Description</th>\\n            <th>Actions</th>\\n        </tr>\\n        <tr data-ng-repeat=\\\"event in $ctrl.events\\\">\\n            <td class=\\\"date-start\\\">{{event.dateStart|date:\\\"M/d/y\\\"}}</td>\\n            <td class=\\\"date-end\\\">{{event.dateEnd|date:\\\"M/d/y\\\"}}</td>\\n            <td class=\\\"event-fac\\\">{{event.facility}}</td>\\n\\t    <td class=\\\"event-title-prj\\\"><!-- we want to show both, but not enough data points have both yet.\\n\\t                                     <p class=\\\"event-title\\\">{{event.eventTitle}}</p>\\n\\t\\t                             <p class=\\\"project-title\\\">Award Title</p> -->\\n\\t\\t\\t\\t        <p class=\\\"event-title\\\">{{event.awardTitle}}</p>\\n\\t\\t\\t\\t\\t<p data-ng-if=\\\"event.awardNumber\\\"><a class=\\\"nsf\\\" href=\\\"https://www.nsf.gov/awardsearch/showAward?AWD_ID={{event.awardNumber}}\\\" target=\\\"_blank\\\" aria-describedby=\\\"msg-open-ext-site-new-window\\\">NSF {{event.directorate || ''}} #{{event.awardNumber}}</a></p>\\n\\t\\t\\t\\t\\t<span class=\\\"pi-name\\\">PI: {{event.piName || 'not reported'}}</span></td>\\n\\t    <td class=\\\"event-desc\\\">{{event.awardDescription || 'Not available' }}\\n\\t\\t                        <p data-ng-if=\\\"event.depotProject\\\"><br/>Data Depot: <a href=\\\"/data/browser/public/designsafe.storage.published/{{event.depotProject}}\\\">{{event.depotProject}}</a></p></td>\\n\\t    <td class=\\\"event-action\\\">\\n\\t       <div class=\\\"a-fac\\\"><span><a href=\\\"mailto:zehner2@purdue.edu?subject=Requesting Contact with {{event.facility}}&body=Contact Request for {{event.facility}}%0D%0A%0D%0APlease provide details about why you would like to be placed in contact with the {{event.facility}} experimental facility and how best to contact you if not via a reply to this email address.%0D%0A%0D%0A--------------------%0D%0A%0D%0A\\\">Contact Facility</a></span></div>\\n\\t      <div class=\\\"a-payload\\\"><span><a href=\\\"mailto:zehner2@purdue.edu?subject=Payload Request for Award #{{event.awardNumber || ' N/A'}}&body=PAYLOAD REQUEST%0D%0A%0D%0AProject: {{event.awardTitle}}%0D%0AAward #{{event.awardNumber || ' N/A'}}%0D%0AFacility: {{event.facility}}%0D%0AStart Date: {{event.dateStart}}%0D%0AEnd Date: {{event.dateEnd}}%0D%0APlease provide details about your payload project for the award listed above and how best to contact you.%0D%0A%0D%0A--------------------%0D%0A%0D%0A\\\">Request Payload</a></span></div>\\n\\t       <!-- TODO: create a generic FSOC forwarding email address or load it from a variable -->\\n\\t    </td>\\n        </tr>\\n    </table>\\n</div>\\n\";","module.exports = \"<div class=\\\"nco-scheduler-pagination\\\">\\n    <button class=\\\"btn btn-link pull-left\\\"\\n            data-ng-disabled=\\\"!$ctrl.prev\\\"\\n            data-ng-click=\\\"$ctrl.prevPage()\\\">\\n        Previous\\n    </button>\\n    <button class=\\\"btn btn-link pull-right\\\"\\n            data-ng-disabled=\\\"!$ctrl.next\\\"\\n            data-ng-click=\\\"$ctrl.nextPage()\\\">\\n        Next\\n    </button>\\n</div>\\n\";","module.exports = \"<div class=\\\"nco-ttc-grants\\\">\\n    <!-- search -->\\n    <div>Please make your selections and click the Search button to change the listing.</div>\\n    <div class=\\\"ttc-search\\\">\\n        <!--facility-->\\n        <form class=\\\"filter-group ttc-facility-filter\\\">\\n            <label for=\\\"ttc-facility-options\\\">Filter by Facility/Group:</label>\\n            <select name=\\\"ttc-facility-options\\\" ng-model=\\\"$ctrl.selectedFacility\\\">\\n                <option value=\\\"\\\">All Facilities</option>\\n                <option ng-repeat=\\\"facility in $ctrl.facilitiesList\\\" value=\\\"{{facility}}\\\">{{facility}}</option>\\n            </select>\\n        </form>\\n        <!--date sorting-->\\n        <form class=\\\"filter-group ttc-sort-filter\\\">\\n            <label for=\\\"ttc-sort-options\\\">Sort by:</label>\\n            <select name=\\\"ttc-sort-options\\\" ng-model=\\\"$ctrl.selectedSort\\\">\\n                <option ng-repeat=\\\"sort in $ctrl.sortOptions\\\" value=\\\"{{sort}}\\\">{{sort}}</option>\\n            </select>\\n        </form>\\n        <br />\\n        <!--grant type-->\\n        <form class=\\\"filter-group ttc-grant-type-filter\\\">\\n            <label for=\\\"ttc-category-options\\\">Select a Grant Type:</label>\\n            <select name=\\\"ttc-category-options\\\" ng-model=\\\"$ctrl.selectedGrantType\\\">\\n                <option value=\\\"\\\">All Types</option>\\n                <option ng-repeat=\\\"type in $ctrl.grantTypes\\\" value=\\\"{{type}}\\\">{{type}}</option>\\n            </select>\\n        </form>\\n        <!--hazard type-->\\n        <form class=\\\"filter-group ttc-hazard-type-filter\\\">\\n            <label for=\\\"ttc-category-options\\\">Select a Hazard Type:</label>\\n            <select name=\\\"ttc-category-options\\\" ng-model=\\\"$ctrl.selectedHazardType\\\">\\n                <option value=\\\"\\\">All Types</option>\\n                <option ng-repeat=\\\"hazard in $ctrl.hazardTypes\\\" value=\\\"{{hazard}}\\\">{{hazard}}</option>\\n            </select>\\n        </form>\\n        <!--text input-->\\n        <form class=\\\"filter-group ttc-text-search\\\">\\n            <label for=\\\"ttc-text-search\\\">Search Title/Abstract/PI/Co-PI:</label>\\n            <input type=\\\"text\\\" name=\\\"ttc-text-search\\\" ng-model=\\\"$ctrl.textSearch\\\" />\\n        </form>\\n        <br />\\n        <!--search button-->\\n        <div class=\\\"btn btn-primary ttc-search-button\\\" ng-click=\\\"$ctrl.filterSearch()\\\">Search</div>\\n    </div>\\n    <!-- end search -->\\n\\n    <br />\\n\\n    <span class=\\\"bg-info text-info\\\" data-ng-if=\\\"$ctrl._ui.loading\\\">\\n        <i role=\\\"none\\\" class=\\\"fa fa-spinner fa-spin\\\">&nbsp;</i> Loading...\\n    </span>\\n\\n    <table class=\\\"nco-ttc-grants\\\">\\n        <!-- header labels -->\\n        <tr class=\\\"ttc-row\\\">\\n            <th class=\\\"ttc-data\\\">Award Number</th>\\n            <th class=\\\"ttc-data\\\">Title</th>\\n            <th class=\\\"ttc-data\\\">End Date</th>\\n            <th class=\\\"ttc-data\\\">PI / Co-PI</th>\\n            <th class=\\\"ttc-data\\\">Grant Org</th>\\n            <th class=\\\"ttc-data\\\">NHERI Facility</th>\\n            <th class=\\\"ttc-data\\\">Details</th>\\n        </tr>\\n        <!-- end header labels-->\\n\\n        <!-- list of grants -->\\n        <tr class=\\\"ttc-row ttc-grant-item\\\" ng-repeat=\\\"grant in $ctrl.grantList\\\">\\n            <td class=\\\"ttc-data\\\">\\n                <a href=\\\"https://www.nsf.gov/awardsearch/showAward?AWD_ID={{grant.AwardNumber}}\\\">\\n                    {{grant.AwardNumber}}\\n                </a>\\n            </td>\\n            <td class=\\\"ttc-title ttc-data\\\">{{grant.Title}}</td>\\n            <td class=\\\"ttc-data\\\">{{grant.EndDate.$date | date}}</td>\\n            <td class=\\\"ttc-data\\\">\\n                {{grant.PiName}} <span ng-if=\\\"grant.CoPiNames\\\"> / {{grant.CoPiNames}}</span>\\n            </td>\\n            <td class=\\\"ttc-data\\\">{{grant.Org}}</td>\\n            <td class=\\\"ttc-data\\\" ng-if=\\\"grant.NheriFacility\\\">{{grant.NheriFacility}}</td>\\n            <td class=\\\"ttc-data\\\" ng-if=\\\"!grant.NheriFacility\\\">No Facility Listed</td>\\n            <td class=\\\"ttc-abstract ttc-data btn btn-default\\\" ng-click=\\\"$ctrl.showAbstract(grant)\\\">View Details</td>\\n        </tr>\\n    </table>\\n</div>\";","module.exports = \"<div class=\\\"modal-header\\\">\\n    <h4 class=\\\"modal-title\\\">Grant Details</h4>\\n</div>\\n<div class=\\\"modal-body\\\">\\n    <div class=\\\"ttc-data\\\">Title: {{$ctrl.grant.Title}}</div>\\n    <div class=\\\"ttc-data\\\">\\n        Award Number:\\n        <a href=\\\"https://www.nsf.gov/awardsearch/showAward?AWD_ID={{grant.AwardNumber}}\\\">\\n            {{$ctrl.grant.AwardNumber}}\\n        </a>\\n    </div>\\n    <div class=\\\"ttc-data\\\">Start Date: {{$ctrl.grant.StartDate.$date | date}}</div>\\n    <div class=\\\"ttc-data\\\">End Date: {{$ctrl.grant.EndDate.$date | date}}</div>\\n    <div class=\\\"ttc-data\\\">\\n        PI: {{$ctrl.grant.PiName}}\\n        <span ng-if=\\\"$ctrl.grant.CoPiNames\\\">\\n            <br/>\\n            Co-PI(s): {{$ctrl.grant.CoPiNames}}\\n        </span>\\n    </div>\\n    <div class=\\\"ttc-data\\\">Grant Org: {{$ctrl.grant.Org}}</div>\\n    <div class=\\\"ttc-data\\\" ng-if=\\\"$ctrl.grant.NheriFacility\\\">NHERI Facility: {{$ctrl.grant.NheriFacility}}</div>\\n    <div class=\\\"ttc-data\\\" ng-if=\\\"!$ctrl.grant.NheriFacility\\\">NHERI Facility: No Facility Listed</div>\\n    <div class=\\\"ttc-data\\\">Hazard Type: {{$ctrl.grant.Hazard}}</div>\\n    <div class=\\\"ttc-data\\\">Grant Type: {{$ctrl.grant.Type}}</div>\\n    <div class=\\\"ttc-data\\\">Keywords:\\n        <ul>\\n            <li ng-repeat=\\\"keyword in $ctrl.grant.Subjects\\\">{{keyword}}</li>\\n        </ul>\\n    </div>\\n    <hr />\\n    <div>\\n        Abstract:\\n        <br />\\n        {{ $ctrl.grant.Abstract }}\\n    </div>\\n</div>\\n<div class=\\\"modal-footer\\\">\\n    <button class=\\\"btn btn-info btn-sm pull-right\\\" ng-click=\\\"$ctrl.close()\\\">\\n        Close\\n    </button>\\n</div>\\n\";","import _ from 'underscore';\nimport NcoSchedulerTemplate from './nco-scheduler.template.html';\nclass NcoSchedulerCtrl {\n    constructor($http) {\n        'ngInject';\n        this.$http = $http;\n    }\n\n    $onInit() {\n        this._ui = { loading: true };\n        this.filters = [];\n        this.sorts = [];\n\n        this.filters.push( { name: \"time\", value: \"No History\" } );\n        this.sorts.push( \"Start Date - oldest first\" );\n\n        this.loadProjects({ filters: this.filters, sorts: this.sorts })\n            .then((resp) => {\n                return resp;\n            }, (err) => {\n                this._ui.error = err.message;\n            }).finally( () => {\n                this._ui.loading = false;\n                this.initialized = true;\n            });\n    }\n\n    /*\n     * Loads projects from DB.\n     * @param {Object} params Extra parameters for listing.\n     * @param {int} params.pageNumber 0-based page number.\n     * @param {Object[]} params.filters Array in the form\n     *  {\"name\": \"filter name\", \"value\": \"filter value\"}\n     * @param {Object[]} params.sorts Array in the form\n     *  {\"name\": \"key name\", \"value\": 1}\n     */\n    loadProjects(params){\n        this._ui.loading = true;\n        return this.$http.get('/nco/api/projects', { params: params })\n            .then((resp) => {\n                this.events = _.map(\n                    resp.data.response,\n                    (evt) => {\n                        if (evt.dateEnd && evt.dateEnd.$date) {\n                            let dateEnd = new Date(evt.dateEnd.$date);\n                            delete evt.dateEnd;\n                            evt.dateEnd = dateEnd;\n                        }\n                        if (evt.dateStart && evt.dateStart.$date) {\n                            let dateStart = new Date(evt.dateStart.$date);\n                            delete evt.dateStart;\n                            evt.dateStart = dateStart;\n                        }\n                        return evt;\n                    });\n                this._ui.total = parseInt(resp.data.total);\n                this._ui.pageNumber = parseInt(resp.data.pageNumber);\n                this._ui.pageSize = parseInt(resp.data.pageSize);\n                return this.events;\n            }, (err) => {\n                this._ui.error = err.message;\n            }).finally( () => {\n                this._ui.loading = false;\n            });\n    }\n\n    /*\n     * Loads next page of projects.\n     */\n    nextPage(){\n        let page = this._ui.pageNumber + 1;\n        return this.loadProjects({\n            pageNumber: page,\n            filters: this.filters,\n            sorts: this.sorts,\n        });\n    }\n\n    /*\n     * Loads prev page of projects.\n     */\n    prevPage(){\n        let page = this._ui.pageNumber - 1;\n        return this.loadProjects({\n            pageNumber: page,\n            filters: this.filters,\n            sorts: this.sorts,\n        });\n    }\n\n    /*\n     * Filters and/or sorts projects.\n     *\n     * param {Object[]} filters Array of filters.\n     * param {Object[]} sort Array of sort.\n     */\n    filterAndSort(filters, sort){\n        let params = {\n            filters: filters,\n            sorts: sort,\n        };\n        this.filters = filters;\n        this.sorts = sort;\n        this.loadProjects(params);\n    }\n}\n\nexport const NcoSchedulerComponent = {\n    controller: NcoSchedulerCtrl,\n    controllerAs: '$ctrl',\n    template: NcoSchedulerTemplate,\n    bindings: {\n    },\n};\n","import NcoSchedulerFiltersTemplate from './nco-scheduler-filters.template.html';\nclass NcoSchedulerFiltersCtrl {\n    constructor($http) {\n        'ngInject';\n        this.$http = $http;\n    }\n\n    $onInit(){\n        this._ui = {};\n        this.$http.get('/nco/api/filters')\n            .then((resp) => {\n                this.filterValues = resp.data.response;\n            }, (err) => {\n                this._ui.error = err.message;\n            });\n        this._ui.sortBy = [\n            'Start Date - newest first',\n            'Start Date - oldest first',\n            'Award Number',\n            'Facility',\n            'PI Name'\n        ];\n        this._ui.timeFilters = [\n            'Event Started Last 7 Days',\n            'Event Started Last 14 Days',\n            'Event Started Last 30 Days',\n            'Event Started Last 90 Days',\n            'Event Will Start in 7 Days',\n            'Event Will Start in 14 Days',\n            'Event Will Start in 30 Days',\n            'Event Will Start in 90 Days',\n            'Happening This Week',\n            'Happening This Month',\n        ];\n        this.sortby = 'Start Date - oldest first';\n        this.historyEnabled = false;\n    }\n\n    applyFilterAndSort(){\n        this.filters = [];\n        this.sort = [];\n        for (let filterName in this.filterSel){\n            if (this.filterSel[filterName]) {\n                this.filters.push({\n                    name: filterName, value: this.filterSel[filterName]\n                });\n            }\n        }\n        if (! this.historyEnabled) {\n            this.filters.push({ name: \"time\", value: \"No History\" });\n        }\n        if (this.sortby){\n            this.sort.push(this.sortby);\n        }\n        this.filterAndSort({ filters: this.filters, sort:this.sort });\n    }\n\n    toggleHistory() {\n        this.historyEnabled = !this.historyEnabled;\n        this.applyFilterAndSort();\n    }\n}\n\nexport const NcoSchedulerFiltersComponent = {\n    controller: NcoSchedulerFiltersCtrl,\n    controllerAs: '$ctrl',\n    template: NcoSchedulerFiltersTemplate,\n    bindings: {\n        filterAndSort: '&',\n    },\n};\n","import NcoSchedulerListTemplate from './nco-scheduler-list.template.html';\n\nclass NcoSchedulerListCtrl {\n    constructor($http) {\n        'ngInject';\n        this.$http = $http;\n    }\n\n    $onInit() {\n    }\n}\n\nexport const NcoSchedulerListComponent = {\n    controller: NcoSchedulerListCtrl,\n    controllerAs: '$ctrl',\n    template: NcoSchedulerListTemplate,\n    bindings: {\n        events: '=',\n    },\n};\n","import NcoSchedulerPaginationTemplate from './nco-scheduler-pagination.component.html';\nclass NcoSchedulerPaginationCtrl {\n    constructor() {\n        'ngInject';\n    }\n\n    $onInit(){\n        this.checkNextAndPrev();\n    }\n\n    checkNextAndPrev(){\n        let lastItem = (this.pageNumber+1) * this.pageSize;\n        if (lastItem >= this.total){\n            this.next = false;\n        } else {\n            this.next = true;\n        }\n        this.prev = this.pageNumber;\n    }\n\n    nextPage(){\n        this.onNextPage()\n            .then( () => {\n                this.checkNextAndPrev();\n            });\n    }\n\n    prevPage(){\n        this.onPrevPage()\n            .then( () => {\n                this.checkNextAndPrev();\n            });\n    }\n}\n\nexport const NcoSchedulerPaginationComponent = {\n    controller: NcoSchedulerPaginationCtrl,\n    controllerAs: '$ctrl',\n    template: NcoSchedulerPaginationTemplate,\n    bindings: {\n        onNextPage: '&',\n        onPrevPage: '&',\n        total: '<',\n        pageNumber: '<',\n        pageSize: '<',\n    },\n};\n","import _ from 'underscore';\nimport NcoTtcGrantsTemplate from './nco-ttc-grants.template.html';\n\nclass NcoTtcGrantsCtrl {\n    constructor($http, $uibModal) {\n        'ngInject';\n        this.$http = $http;\n        this.$uibModal = $uibModal;\n    }\n\n    $onInit() {\n        this.initialParams = {\n            sort: 'End Date Descending',\n        };\n        // default intitial sorting\n        this.selectedSort = 'End Date Descending';\n        this._ui = {\n            grantsLoading: true,\n            facilitiesLoading: false,\n            grantTypesLoading: false,\n            hazardTypesLoading: false,\n        };\n\n        this.loadGrants(this.initialParams)\n            .then((resp) => {\n                return resp;\n            }, (err) => {\n                this._ui.grantsError = err.message;\n            }).finally( () => {\n                this._ui.grantsLoading = false;\n                this.initialized = true;\n            });\n\n        this.loadFacilities({})\n            .then((resp) => {\n                return resp;\n            }, (err) => {\n                this._ui.facilitiesError = err.message;\n            }).finally( () => {\n                this._ui.facilitiesLoading = false;\n            });\n\n        this.loadGrantTypes({})\n            .then((resp) => {\n                return resp;\n            }, (err) => {\n                this._ui.grantTypesError = err.message;\n            }).finally( () => {\n                this._ui.grantTypesLoading = false;\n            });\n\n        this.loadHazardTypes({})\n            .then((resp) => {\n                return resp;\n            }, (err) => {\n                this._ui.hazardTypesError = err.message;\n            }).finally( () => {\n                this._ui.hazardTypesLoading = false;\n            });\n\n        this.sortOptions = [\n            \"End Date Descending\",\n            \"End Date Ascending\",\n        ];\n    }\n\n    loadGrants(params){\n        this._ui.grantsLoading = true;\n        return this.$http.get('/nco/api/ttc_grants', { params: params })\n            .then((resp) => {\n                this.grantList = _.map(\n                    resp.data.response,\n                );\n                return this.grantList;\n            }, (err) => {\n                this._ui.grantsError = err.message;\n            }).finally ( () => {\n                this._ui.grantsLoading = false;\n            });\n    }\n\n    loadFacilities(){\n        this._ui.facilitiesLoading = true;\n        return this.$http.get('/nco/api/ttc_facilities')\n            .then((resp) => {\n                this.facilitiesList = _.map(\n                    resp.data.response,\n                );\n                return this.facilitiesList;\n            }, (err) => {\n                this._ui.facilitiesError = err.message;\n            }).finally ( () => {\n                this._ui.facilitiesLoading = false;\n            });\n    }\n\n    loadGrantTypes(){\n        this._ui.grantTypesLoading = true;\n        return this.$http.get('/nco/api/ttc_grant_types')\n        .then((resp) => {\n            this.grantTypes = _.map(\n                resp.data.response,\n            );\n            return this.grantTypes;\n        }, (err) => {\n            this._ui.grantTypesError = err.message;\n        }).finally ( () => {\n            this._ui.grantTypesLoading = false;\n        });\n    }\n\n    loadHazardTypes(){\n        this._ui.hazardTypesLoading = true;\n        return this.$http.get('/nco/api/ttc_hazard_types')\n        .then((resp) => {\n            this.hazardTypes = _.map(\n                resp.data.response,\n            );\n            return this.hazardTypes;\n        }, (err) => {\n            this._ui.hazardTypesError = err.message;\n        }).finally ( () => {\n            this._ui.hazardTypesLoading = false;\n        });\n    }\n\n    //view details\n    showAbstract(grant) {\n        this.$uibModal.open({\n            component: 'ncoTtcAbstract',\n            resolve: {\n                grant: () => grant\n            },\n            size: 'lg',\n        });\n    }\n\n    filterSearch(){\n        var params = {\n            facility: this.selectedFacility,\n            sort: this.selectedSort,\n            hazard_type: this.selectedHazardType,\n            grant_type: this.selectedGrantType,\n            text_search: this.textSearch,\n        };\n        this.loadGrants(params);\n    }\n}\n\nexport const NcoTtcGrantsComponent = {\n    controller: NcoTtcGrantsCtrl,\n    controllerAs: '$ctrl',\n    template: NcoTtcGrantsTemplate,\n    bindings: {\n    },\n};\n","import TtcAbstractModalTemplate from './ttc-abstract-modal.template.html';\n\nclass TtcAbstractModalCtrl {\n    constructor () {\n    }\n\n    $onInit() {\n        this.grant = this.resolve.grant;\n    }\n\n    close() {\n        return;\n    }\n}\n\nexport const TtcAbstractModalComponent = {\n    template: TtcAbstractModalTemplate,\n    controller: TtcAbstractModalCtrl,\n    controllerAs: '$ctrl',\n    bindings: {\n        resolve: '<',\n        close: '&',\n        dismiss: '&'\n    },\n};\n","import { NcoSchedulerComponent } from './nco-scheduler/nco-scheduler.component';\nimport { NcoSchedulerFiltersComponent } from './nco-scheduler-filters/nco-scheduler-filters.component.js';\nimport { NcoSchedulerListComponent } from './nco-scheduler-list/nco-scheduler-list.component.js';\nimport { NcoSchedulerPaginationComponent } from './nco-scheduler-pagination/nco-scheduler-pagination.components.js';\nimport { NcoTtcGrantsComponent } from './nco-ttc-grants/nco-ttc-grants.component.js';\nimport { TtcAbstractModalComponent } from './modals/ttc-abstract-modal.component.js';\n\nlet ncoComponents = angular.module('nco.components', []);\n\n//scheduler components\nncoComponents.component('ncoScheduler', NcoSchedulerComponent);\nncoComponents.component('ncoSchedulerFilters', NcoSchedulerFiltersComponent);\nncoComponents.component('ncoSchedulerList', NcoSchedulerListComponent);\nncoComponents.component('ncoSchedulerPagination', NcoSchedulerPaginationComponent);\n\n//ttc_grants components\nncoComponents.component('ncoTtcGrants', NcoTtcGrantsComponent);\nncoComponents.component('ncoTtcAbstract', TtcAbstractModalComponent);\n\nexport default ncoComponents;\n","import angular from 'angular';\n\nimport './components';\n\nlet ncoModule = angular.module('nco', ['designsafe', 'nco.components']);\nncoModule.requires.push(\n    'ui.router',\n    'ui.bootstrap',\n    'django.context',\n    'ds.notifications',\n    'ds.wsBus',\n    'toastr',\n    'logging',\n    'ui.customSelect',\n    'ngSanitize'\n);\nangular.module('designsafe.portal').requires.push('nco');\n\n\n/**\n * @function\n * @param {Object} $httpProvider\n * @param {Object} $locationProvider\n * @param {Object} $stateProvider\n * @param {Object} $urlRouterProvider\n * @param {Object} Django\n * @param {Object} toastrConfig\n */\nfunction config(\n    $httpProvider,\n    $locationProvider,\n    $stateProvider,\n    $urlRouterProvider,\n    $urlMatcherFactoryProvider,\n    Django,\n    toastrConfig\n) {\n    'ngInject';\n\n    $httpProvider.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';\n    $httpProvider.defaults.xsrfCookieName = 'csrftoken';\n    $httpProvider.defaults.xsrfHeaderName = 'X-CSRFToken';\n    $locationProvider.html5Mode(true);\n    $urlMatcherFactoryProvider.strictMode(false);\n\n    angular.extend(toastrConfig, {\n        positionClass: 'toast-bottom-left',\n        timeOut: 20000,\n    });\n\n    $stateProvider\n        .state('nco', {\n            url: '/nco',\n            template: '<pre>local/trainingMaterials.html</pre>',\n        });\n}\n\nncoModule\n    .config([\n        '$httpProvider',\n        '$locationProvider',\n        '$stateProvider',\n        '$urlRouterProvider',\n        '$urlMatcherFactoryProvider',\n        'Django',\n        'toastrConfig',\n        config,\n    ]);\n\nncoModule.config([\n    'WSBusServiceProvider',\n    function(WSBusServiceProvider) {\n        WSBusServiceProvider.setUrl(\n            (window.location.protocol === 'https:' ? 'wss://' : 'ws://') +\n                window.location.hostname +\n                (window.location.port ? ':' + window.location.port : '') +\n                '/ws/websockets/?subscribe-broadcast&subscribe-user'\n        );\n    },\n]);\nexport default ncoModule;\n","module.exports = angular;"],"sourceRoot":""}