Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- System.registerDynamic("npm:[email protected]/modules/$.fails", [], true, function($__require, exports, module) {
- ;
- var global = this,
- __define = global.define;
- global.define = undefined;
- module.exports = function(exec) {
- try {
- return !!exec();
- } catch (e) {
- return true;
- }
- };
- global.define = __define;
- return module.exports;
- });
- System.registerDynamic("npm:[email protected]/modules/$.descriptors", ["npm:[email protected]/modules/$.fails"], true, function($__require, exports, module) {
- ;
- var global = this,
- __define = global.define;
- global.define = undefined;
- module.exports = !$__require('npm:[email protected]/modules/$.fails')(function() {
- return Object.defineProperty({}, 'a', {get: function() {
- return 7;
- }}).a != 7;
- });
- global.define = __define;
- return module.exports;
- });
- System.registerDynamic("npm:[email protected]/modules/$.property-desc", [], true, function($__require, exports, module) {
- ;
- var global = this,
- __define = global.define;
- global.define = undefined;
- module.exports = function(bitmap, value) {
- return {
- enumerable: !(bitmap & 1),
- configurable: !(bitmap & 2),
- writable: !(bitmap & 4),
- value: value
- };
- };
- global.define = __define;
- return module.exports;
- });
- System.registerDynamic("npm:[email protected]/modules/$.hide", ["npm:[email protected]/modules/$", "npm:[email protected]/modules/$.property-desc", "npm:[email protected]/modules/$.descriptors"], true, function($__require, exports, module) {
- ;
- var global = this,
- __define = global.define;
- global.define = undefined;
- var $ = $__require('npm:[email protected]/modules/$'),
- createDesc = $__require('npm:[email protected]/modules/$.property-desc');
- module.exports = $__require('npm:[email protected]/modules/$.descriptors') ? function(object, key, value) {
- return $.setDesc(object, key, createDesc(1, value));
- } : function(object, key, value) {
- object[key] = value;
- return object;
- };
- global.define = __define;
- return module.exports;
- });
- System.registerDynamic("npm:[email protected]/modules/$.core", [], true, function($__require, exports, module) {
- ;
- var global = this,
- __define = global.define;
- global.define = undefined;
- var core = module.exports = {version: '1.2.6'};
- if (typeof __e == 'number')
- __e = core;
- global.define = __define;
- return module.exports;
- });
- System.registerDynamic("npm:[email protected]/modules/$.global", [], true, function($__require, exports, module) {
- ;
- var global = this,
- __define = global.define;
- global.define = undefined;
- var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self : Function('return this')();
- if (typeof __g == 'number')
- __g = global;
- global.define = __define;
- return module.exports;
- });
- System.registerDynamic("npm:[email protected]/modules/$.export", ["npm:[email protected]/modules/$.global", "npm:[email protected]/modules/$.core", "npm:[email protected]/modules/$.hide", "npm:[email protected]/modules/$.redefine", "npm:[email protected]/modules/$.ctx"], true, function($__require, exports, module) {
- ;
- var global = this,
- __define = global.define;
- global.define = undefined;
- var global = $__require('npm:[email protected]/modules/$.global'),
- core = $__require('npm:[email protected]/modules/$.core'),
- hide = $__require('npm:[email protected]/modules/$.hide'),
- redefine = $__require('npm:[email protected]/modules/$.redefine'),
- ctx = $__require('npm:[email protected]/modules/$.ctx'),
- PROTOTYPE = 'prototype';
- var $export = function(type, name, source) {
- var IS_FORCED = type & $export.F,
- IS_GLOBAL = type & $export.G,
- IS_STATIC = type & $export.S,
- IS_PROTO = type & $export.P,
- IS_BIND = type & $export.B,
- target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE],
- exports = IS_GLOBAL ? core : core[name] || (core[name] = {}),
- expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}),
- key,
- own,
- out,
- exp;
- if (IS_GLOBAL)
- source = name;
- for (key in source) {
- own = !IS_FORCED && target && key in target;
- out = (own ? target : source)[key];
- exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out;
- if (target && !own)
- redefine(target, key, out);
- if (exports[key] != out)
- hide(exports, key, exp);
- if (IS_PROTO && expProto[key] != out)
- expProto[key] = out;
- }
- };
- global.core = core;
- $export.F = 1;
- $export.G = 2;
- $export.S = 4;
- $export.P = 8;
- $export.B = 16;
- $export.W = 32;
- module.exports = $export;
- global.define = __define;
- return module.exports;
- });
- System.registerDynamic("npm:[email protected]/modules/$", [], true, function($__require, exports, module) {
- ;
- var global = this,
- __define = global.define;
- global.define = undefined;
- var $Object = Object;
- module.exports = {
- create: $Object.create,
- getProto: $Object.getPrototypeOf,
- isEnum: {}.propertyIsEnumerable,
- getDesc: $Object.getOwnPropertyDescriptor,
- setDesc: $Object.defineProperty,
- setDescs: $Object.defineProperties,
- getKeys: $Object.keys,
- getNames: $Object.getOwnPropertyNames,
- getSymbols: $Object.getOwnPropertySymbols,
- each: [].forEach
- };
- global.define = __define;
- return module.exports;
- });
- System.registerDynamic("npm:[email protected]/modules/es5", ["npm:[email protected]/modules/$", "npm:[email protected]/modules/$.export", "npm:[email protected]/modules/$.descriptors", "npm:[email protected]/modules/$.property-desc", "npm:[email protected]/modules/$.html", "npm:[email protected]/modules/$.dom-create", "npm:[email protected]/modules/$.has", "npm:[email protected]/modules/$.cof", "npm:[email protected]/modules/$.invoke", "npm:[email protected]/modules/$.fails", "npm:[email protected]/modules/$.an-object", "npm:[email protected]/modules/$.a-function", "npm:[email protected]/modules/$.is-object", "npm:[email protected]/modules/$.to-object", "npm:[email protected]/modules/$.to-iobject", "npm:[email protected]/modules/$.to-integer", "npm:[email protected]/modules/$.to-index", "npm:[email protected]/modules/$.to-length", "npm:[email protected]/modules/$.iobject", "npm:[email protected]/modules/$.uid", "npm:[email protected]/modules/$.array-methods", "npm:[email protected]/modules/$.array-includes", "npm:[email protected]/modules/$.is-array"], true, function($__require, exports, module) {
- "use strict";
- ;
- var global = this,
- __define = global.define;
- global.define = undefined;
- var $ = $__require('npm:[email protected]/modules/$'),
- $export = $__require('npm:[email protected]/modules/$.export'),
- DESCRIPTORS = $__require('npm:[email protected]/modules/$.descriptors'),
- createDesc = $__require('npm:[email protected]/modules/$.property-desc'),
- html = $__require('npm:[email protected]/modules/$.html'),
- cel = $__require('npm:[email protected]/modules/$.dom-create'),
- has = $__require('npm:[email protected]/modules/$.has'),
- cof = $__require('npm:[email protected]/modules/$.cof'),
- invoke = $__require('npm:[email protected]/modules/$.invoke'),
- fails = $__require('npm:[email protected]/modules/$.fails'),
- anObject = $__require('npm:[email protected]/modules/$.an-object'),
- aFunction = $__require('npm:[email protected]/modules/$.a-function'),
- isObject = $__require('npm:[email protected]/modules/$.is-object'),
- toObject = $__require('npm:[email protected]/modules/$.to-object'),
- toIObject = $__require('npm:[email protected]/modules/$.to-iobject'),
- toInteger = $__require('npm:[email protected]/modules/$.to-integer'),
- toIndex = $__require('npm:[email protected]/modules/$.to-index'),
- toLength = $__require('npm:[email protected]/modules/$.to-length'),
- IObject = $__require('npm:[email protected]/modules/$.iobject'),
- IE_PROTO = $__require('npm:[email protected]/modules/$.uid')('__proto__'),
- createArrayMethod = $__require('npm:[email protected]/modules/$.array-methods'),
- arrayIndexOf = $__require('npm:[email protected]/modules/$.array-includes')(false),
- ObjectProto = Object.prototype,
- ArrayProto = Array.prototype,
- arraySlice = ArrayProto.slice,
- arrayJoin = ArrayProto.join,
- defineProperty = $.setDesc,
- getOwnDescriptor = $.getDesc,
- defineProperties = $.setDescs,
- factories = {},
- IE8_DOM_DEFINE;
- if (!DESCRIPTORS) {
- IE8_DOM_DEFINE = !fails(function() {
- return defineProperty(cel('div'), 'a', {get: function() {
- return 7;
- }}).a != 7;
- });
- $.setDesc = function(O, P, Attributes) {
- if (IE8_DOM_DEFINE)
- try {
- return defineProperty(O, P, Attributes);
- } catch (e) {}
- if ('get' in Attributes || 'set' in Attributes)
- throw TypeError('Accessors not supported!');
- if ('value' in Attributes)
- anObject(O)[P] = Attributes.value;
- return O;
- };
- $.getDesc = function(O, P) {
- if (IE8_DOM_DEFINE)
- try {
- return getOwnDescriptor(O, P);
- } catch (e) {}
- if (has(O, P))
- return createDesc(!ObjectProto.propertyIsEnumerable.call(O, P), O[P]);
- };
- $.setDescs = defineProperties = function(O, Properties) {
- anObject(O);
- var keys = $.getKeys(Properties),
- length = keys.length,
- i = 0,
- P;
- while (length > i)
- $.setDesc(O, P = keys[i++], Properties[P]);
- return O;
- };
- }
- $export($export.S + $export.F * !DESCRIPTORS, 'Object', {
- getOwnPropertyDescriptor: $.getDesc,
- defineProperty: $.setDesc,
- defineProperties: defineProperties
- });
- var keys1 = ('constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,' + 'toLocaleString,toString,valueOf').split(','),
- keys2 = keys1.concat('length', 'prototype'),
- keysLen1 = keys1.length;
- var createDict = function() {
- var iframe = cel('iframe'),
- i = keysLen1,
- gt = '>',
- iframeDocument;
- iframe.style.display = 'none';
- html.appendChild(iframe);
- iframe.src = 'javascript:';
- iframeDocument = iframe.contentWindow.document;
- iframeDocument.open();
- iframeDocument.write('<script>document.F=Object</script' + gt);
- iframeDocument.close();
- createDict = iframeDocument.F;
- while (i--)
- delete createDict.prototype[keys1[i]];
- return createDict();
- };
- var createGetKeys = function(names, length) {
- return function(object) {
- var O = toIObject(object),
- i = 0,
- result = [],
- key;
- for (key in O)
- if (key != IE_PROTO)
- has(O, key) && result.push(key);
- while (length > i)
- if (has(O, key = names[i++])) {
- ~arrayIndexOf(result, key) || result.push(key);
- }
- return result;
- };
- };
- var Empty = function() {};
- $export($export.S, 'Object', {
- getPrototypeOf: $.getProto = $.getProto || function(O) {
- O = toObject(O);
- if (has(O, IE_PROTO))
- return O[IE_PROTO];
- if (typeof O.constructor == 'function' && O instanceof O.constructor) {
- return O.constructor.prototype;
- }
- return O instanceof Object ? ObjectProto : null;
- },
- getOwnPropertyNames: $.getNames = $.getNames || createGetKeys(keys2, keys2.length, true),
- create: $.create = $.create || function(O, Properties) {
- var result;
- if (O !== null) {
- Empty.prototype = anObject(O);
- result = new Empty();
- Empty.prototype = null;
- result[IE_PROTO] = O;
- } else
- result = createDict();
- return Properties === undefined ? result : defineProperties(result, Properties);
- },
- keys: $.getKeys = $.getKeys || createGetKeys(keys1, keysLen1, false)
- });
- var construct = function(F, len, args) {
- if (!(len in factories)) {
- for (var n = [],
- i = 0; i < len; i++)
- n[i] = 'a[' + i + ']';
- factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')');
- }
- return factories[len](F, args);
- };
- $export($export.P, 'Function', {bind: function bind(that) {
- var fn = aFunction(this),
- partArgs = arraySlice.call(arguments, 1);
- var bound = function() {
- var args = partArgs.concat(arraySlice.call(arguments));
- return this instanceof bound ? construct(fn, args.length, args) : invoke(fn, args, that);
- };
- if (isObject(fn.prototype))
- bound.prototype = fn.prototype;
- return bound;
- }});
- $export($export.P + $export.F * fails(function() {
- if (html)
- arraySlice.call(html);
- }), 'Array', {slice: function(begin, end) {
- var len = toLength(this.length),
- klass = cof(this);
- end = end === undefined ? len : end;
- if (klass == 'Array')
- return arraySlice.call(this, begin, end);
- var start = toIndex(begin, len),
- upTo = toIndex(end, len),
- size = toLength(upTo - start),
- cloned = Array(size),
- i = 0;
- for (; i < size; i++)
- cloned[i] = klass == 'String' ? this.charAt(start + i) : this[start + i];
- return cloned;
- }});
- $export($export.P + $export.F * (IObject != Object), 'Array', {join: function join(separator) {
- return arrayJoin.call(IObject(this), separator === undefined ? ',' : separator);
- }});
- $export($export.S, 'Array', {isArray: $__require('npm:[email protected]/modules/$.is-array')});
- var createArrayReduce = function(isRight) {
- return function(callbackfn, memo) {
- aFunction(callbackfn);
- var O = IObject(this),
- length = toLength(O.length),
- index = isRight ? length - 1 : 0,
- i = isRight ? -1 : 1;
- if (arguments.length < 2)
- for (; ; ) {
- if (index in O) {
- memo = O[index];
- index += i;
- break;
- }
- index += i;
- if (isRight ? index < 0 : length <= index) {
- throw TypeError('Reduce of empty array with no initial value');
- }
- }
- for (; isRight ? index >= 0 : length > index; index += i)
- if (index in O) {
- memo = callbackfn(memo, O[index], index, this);
- }
- return memo;
- };
- };
- var methodize = function($fn) {
- return function(arg1) {
- return $fn(this, arg1, arguments[1]);
- };
- };
- $export($export.P, 'Array', {
- forEach: $.each = $.each || methodize(createArrayMethod(0)),
- map: methodize(createArrayMethod(1)),
- filter: methodize(createArrayMethod(2)),
- some: methodize(createArrayMethod(3)),
- every: methodize(createArrayMethod(4)),
- reduce: createArrayReduce(false),
- reduceRight: createArrayReduce(true),
- indexOf: methodize(arrayIndexOf),
- lastIndexOf: function(el, fromIndex) {
- var O = toIObject(this),
- length = toLength(O.length),
- index = length - 1;
- if (arguments.length > 1)
- index = Math.min(index, toInteger(fromIndex));
- if (index < 0)
- index = toLength(length + index);
- for (; index >= 0; index--)
- if (index in O)
- if (O[index] === el)
- return index;
- return -1;
- }
- });
- $export($export.S, 'Date', {now: function() {
- return +new Date;
- }});
- var lz = function(num) {
- return num > 9 ? num : '0' + num;
- };
- $export($export.P + $export.F * (fails(function() {
- return new Date(-5e13 - 1).toISOString() != '0385-07-25T07:06:39.999Z';
- }) || !fails(function() {
- new Date(NaN).toISOString();
- })), 'Date', {toISOString: function toISOString() {
- if (!isFinite(this))
- throw RangeError('Invalid time value');
- var d = this,
- y = d.getUTCFullYear(),
- m = d.getUTCMilliseconds(),
- s = y < 0 ? '-' : y > 9999 ? '+' : '';
- return s + ('00000' + Math.abs(y)).slice(s ? -6 : -4) + '-' + lz(d.getUTCMonth() + 1) + '-' + lz(d.getUTCDate()) + 'T' + lz(d.getUTCHours()) + ':' + lz(d.getUTCMinutes()) + ':' + lz(d.getUTCSeconds()) + '.' + (m > 99 ? m : '0' + lz(m)) + 'Z';
- }});
- global.define = __define;
- return module.exports;
- });
- System.registerDynamic("npm:[email protected]/shim", ["npm:[email protected]/modules/es5", "npm:[email protected]/modules/es6.symbol", "npm:[email protected]/modules/es6.object.assign", "npm:[email protected]/modules/es6.object.is", "npm:[email protected]/modules/es6.object.set-prototype-of", "npm:[email protected]/modules/es6.object.to-string", "npm:[email protected]/modules/es6.object.freeze", "npm:[email protected]/modules/es6.object.seal", "npm:[email protected]/modules/es6.object.prevent-extensions", "npm:[email protected]/modules/es6.object.is-frozen", "npm:[email protected]/modules/es6.object.is-sealed", "npm:[email protected]/modules/es6.object.is-extensible", "npm:[email protected]/modules/es6.object.get-own-property-descriptor", "npm:[email protected]/modules/es6.object.get-prototype-of", "npm:[email protected]/modules/es6.object.keys", "npm:[email protected]/modules/es6.object.get-own-property-names", "npm:[email protected]/modules/es6.function.name", "npm:[email protected]/modules/es6.function.has-instance", "npm:[email protected]/modules/es6.number.constructor", "npm:[email protected]/modules/es6.number.epsilon", "npm:[email protected]/modules/es6.number.is-finite", "npm:[email protected]/modules/es6.number.is-integer", "npm:[email protected]/modules/es6.number.is-nan", "npm:[email protected]/modules/es6.number.is-safe-integer", "npm:[email protected]/modules/es6.number.max-safe-integer", "npm:[email protected]/modules/es6.number.min-safe-integer", "npm:[email protected]/modules/es6.number.parse-float", "npm:[email protected]/modules/es6.number.parse-int", "npm:[email protected]/modules/es6.math.acosh", "npm:[email protected]/modules/es6.math.asinh", "npm:[email protected]/modules/es6.math.atanh", "npm:[email protected]/modules/es6.math.cbrt", "npm:[email protected]/modules/es6.math.clz32", "npm:[email protected]/modules/es6.math.cosh", "npm:[email protected]/modules/es6.math.expm1", "npm:[email protected]/modules/es6.math.fround", "npm:[email protected]/modules/es6.math.hypot", "npm:[email protected]/modules/es6.math.imul", "npm:[email protected]/modules/es6.math.log10", "npm:[email protected]/modules/es6.math.log1p", "npm:[email protected]/modules/es6.math.log2", "npm:[email protected]/modules/es6.math.sign", "npm:[email protected]/modules/es6.math.sinh", "npm:[email protected]/modules/es6.math.tanh", "npm:[email protected]/modules/es6.math.trunc", "npm:[email protected]/modules/es6.string.from-code-point", "npm:[email protected]/modules/es6.string.raw", "npm:[email protected]/modules/es6.string.trim", "npm:[email protected]/modules/es6.string.iterator", "npm:[email protected]/modules/es6.string.code-point-at", "npm:[email protected]/modules/es6.string.ends-with", "npm:[email protected]/modules/es6.string.includes", "npm:[email protected]/modules/es6.string.repeat", "npm:[email protected]/modules/es6.string.starts-with", "npm:[email protected]/modules/es6.array.from", "npm:[email protected]/modules/es6.array.of", "npm:[email protected]/modules/es6.array.iterator", "npm:[email protected]/modules/es6.array.species", "npm:[email protected]/modules/es6.array.copy-within", "npm:[email protected]/modules/es6.array.fill", "npm:[email protected]/modules/es6.array.find", "npm:[email protected]/modules/es6.array.find-index", "npm:[email protected]/modules/es6.regexp.constructor", "npm:[email protected]/modules/es6.regexp.flags", "npm:[email protected]/modules/es6.regexp.match", "npm:[email protected]/modules/es6.regexp.replace", "npm:[email protected]/modules/es6.regexp.search", "npm:[email protected]/modules/es6.regexp.split", "npm:[email protected]/modules/es6.promise", "npm:[email protected]/modules/es6.map", "npm:[email protected]/modules/es6.set", "npm:[email protected]/modules/es6.weak-map", "npm:[email protected]/modules/es6.weak-set", "npm:[email protected]/modules/es6.reflect.apply", "npm:[email protected]/modules/es6.reflect.construct", "npm:[email protected]/modules/es6.reflect.define-property", "npm:[email protected]/modules/es6.reflect.delete-property", "npm:[email protected]/modules/es6.reflect.enumerate", "npm:[email protected]/modules/es6.reflect.get", "npm:[email protected]/modules/es6.reflect.get-own-property-descriptor", "npm:[email protected]/modules/es6.reflect.get-prototype-of", "npm:[email protected]/modules/es6.reflect.has", "npm:[email protected]/modules/es6.reflect.is-extensible", "npm:[email protected]/modules/es6.reflect.own-keys", "npm:[email protected]/modules/es6.reflect.prevent-extensions", "npm:[email protected]/modules/es6.reflect.set", "npm:[email protected]/modules/es6.reflect.set-prototype-of", "npm:[email protected]/modules/es7.array.includes", "npm:[email protected]/modules/es7.string.at", "npm:[email protected]/modules/es7.string.pad-left", "npm:[email protected]/modules/es7.string.pad-right", "npm:[email protected]/modules/es7.string.trim-left", "npm:[email protected]/modules/es7.string.trim-right", "npm:[email protected]/modules/es7.regexp.escape", "npm:[email protected]/modules/es7.object.get-own-property-descriptors", "npm:[email protected]/modules/es7.object.values", "npm:[email protected]/modules/es7.object.entries", "npm:[email protected]/modules/es7.map.to-json", "npm:[email protected]/modules/es7.set.to-json", "npm:[email protected]/modules/js.array.statics", "npm:[email protected]/modules/web.timers", "npm:[email protected]/modules/web.immediate", "npm:[email protected]/modules/web.dom.iterable", "npm:[email protected]/modules/$.core"], true, function($__require, exports, module) {
- ;
- var global = this,
- __define = global.define;
- global.define = undefined;
- $__require('npm:[email protected]/modules/es5');
- $__require('npm:[email protected]/modules/es6.symbol');
- $__require('npm:[email protected]/modules/es6.object.assign');
- $__require('npm:[email protected]/modules/es6.object.is');
- $__require('npm:[email protected]/modules/es6.object.set-prototype-of');
- $__require('npm:[email protected]/modules/es6.object.to-string');
- $__require('npm:[email protected]/modules/es6.object.freeze');
- $__require('npm:[email protected]/modules/es6.object.seal');
- $__require('npm:[email protected]/modules/es6.object.prevent-extensions');
- $__require('npm:[email protected]/modules/es6.object.is-frozen');
- $__require('npm:[email protected]/modules/es6.object.is-sealed');
- $__require('npm:[email protected]/modules/es6.object.is-extensible');
- $__require('npm:[email protected]/modules/es6.object.get-own-property-descriptor');
- $__require('npm:[email protected]/modules/es6.object.get-prototype-of');
- $__require('npm:[email protected]/modules/es6.object.keys');
- $__require('npm:[email protected]/modules/es6.object.get-own-property-names');
- $__require('npm:[email protected]/modules/es6.function.name');
- $__require('npm:[email protected]/modules/es6.function.has-instance');
- $__require('npm:[email protected]/modules/es6.number.constructor');
- $__require('npm:[email protected]/modules/es6.number.epsilon');
- $__require('npm:[email protected]/modules/es6.number.is-finite');
- $__require('npm:[email protected]/modules/es6.number.is-integer');
- $__require('npm:[email protected]/modules/es6.number.is-nan');
- $__require('npm:[email protected]/modules/es6.number.is-safe-integer');
- $__require('npm:[email protected]/modules/es6.number.max-safe-integer');
- $__require('npm:[email protected]/modules/es6.number.min-safe-integer');
- $__require('npm:[email protected]/modules/es6.number.parse-float');
- $__require('npm:[email protected]/modules/es6.number.parse-int');
- $__require('npm:[email protected]/modules/es6.math.acosh');
- $__require('npm:[email protected]/modules/es6.math.asinh');
- $__require('npm:[email protected]/modules/es6.math.atanh');
- $__require('npm:[email protected]/modules/es6.math.cbrt');
- $__require('npm:[email protected]/modules/es6.math.clz32');
- $__require('npm:[email protected]/modules/es6.math.cosh');
- $__require('npm:[email protected]/modules/es6.math.expm1');
- $__require('npm:[email protected]/modules/es6.math.fround');
- $__require('npm:[email protected]/modules/es6.math.hypot');
- $__require('npm:[email protected]/modules/es6.math.imul');
- $__require('npm:[email protected]/modules/es6.math.log10');
- $__require('npm:[email protected]/modules/es6.math.log1p');
- $__require('npm:[email protected]/modules/es6.math.log2');
- $__require('npm:[email protected]/modules/es6.math.sign');
- $__require('npm:[email protected]/modules/es6.math.sinh');
- $__require('npm:[email protected]/modules/es6.math.tanh');
- $__require('npm:[email protected]/modules/es6.math.trunc');
- $__require('npm:[email protected]/modules/es6.string.from-code-point');
- $__require('npm:[email protected]/modules/es6.string.raw');
- $__require('npm:[email protected]/modules/es6.string.trim');
- $__require('npm:[email protected]/modules/es6.string.iterator');
- $__require('npm:[email protected]/modules/es6.string.code-point-at');
- $__require('npm:[email protected]/modules/es6.string.ends-with');
- $__require('npm:[email protected]/modules/es6.string.includes');
- $__require('npm:[email protected]/modules/es6.string.repeat');
- $__require('npm:[email protected]/modules/es6.string.starts-with');
- $__require('npm:[email protected]/modules/es6.array.from');
- $__require('npm:[email protected]/modules/es6.array.of');
- $__require('npm:[email protected]/modules/es6.array.iterator');
- $__require('npm:[email protected]/modules/es6.array.species');
- $__require('npm:[email protected]/modules/es6.array.copy-within');
- $__require('npm:[email protected]/modules/es6.array.fill');
- $__require('npm:[email protected]/modules/es6.array.find');
- $__require('npm:[email protected]/modules/es6.array.find-index');
- $__require('npm:[email protected]/modules/es6.regexp.constructor');
- $__require('npm:[email protected]/modules/es6.regexp.flags');
- $__require('npm:[email protected]/modules/es6.regexp.match');
- $__require('npm:[email protected]/modules/es6.regexp.replace');
- $__require('npm:[email protected]/modules/es6.regexp.search');
- $__require('npm:[email protected]/modules/es6.regexp.split');
- $__require('npm:[email protected]/modules/es6.promise');
- $__require('npm:[email protected]/modules/es6.map');
- $__require('npm:[email protected]/modules/es6.set');
- $__require('npm:[email protected]/modules/es6.weak-map');
- $__require('npm:[email protected]/modules/es6.weak-set');
- $__require('npm:[email protected]/modules/es6.reflect.apply');
- $__require('npm:[email protected]/modules/es6.reflect.construct');
- $__require('npm:[email protected]/modules/es6.reflect.define-property');
- $__require('npm:[email protected]/modules/es6.reflect.delete-property');
- $__require('npm:[email protected]/modules/es6.reflect.enumerate');
- $__require('npm:[email protected]/modules/es6.reflect.get');
- $__require('npm:[email protected]/modules/es6.reflect.get-own-property-descriptor');
- $__require('npm:[email protected]/modules/es6.reflect.get-prototype-of');
- $__require('npm:[email protected]/modules/es6.reflect.has');
- $__require('npm:[email protected]/modules/es6.reflect.is-extensible');
- $__require('npm:[email protected]/modules/es6.reflect.own-keys');
- $__require('npm:[email protected]/modules/es6.reflect.prevent-extensions');
- $__require('npm:[email protected]/modules/es6.reflect.set');
- $__require('npm:[email protected]/modules/es6.reflect.set-prototype-of');
- $__require('npm:[email protected]/modules/es7.array.includes');
- $__require('npm:[email protected]/modules/es7.string.at');
- $__require('npm:[email protected]/modules/es7.string.pad-left');
- $__require('npm:[email protected]/modules/es7.string.pad-right');
- $__require('npm:[email protected]/modules/es7.string.trim-left');
- $__require('npm:[email protected]/modules/es7.string.trim-right');
- $__require('npm:[email protected]/modules/es7.regexp.escape');
- $__require('npm:[email protected]/modules/es7.object.get-own-property-descriptors');
- $__require('npm:[email protected]/modules/es7.object.values');
- $__require('npm:[email protected]/modules/es7.object.entries');
- $__require('npm:[email protected]/modules/es7.map.to-json');
- $__require('npm:[email protected]/modules/es7.set.to-json');
- $__require('npm:[email protected]/modules/js.array.statics');
- $__require('npm:[email protected]/modules/web.timers');
- $__require('npm:[email protected]/modules/web.immediate');
- $__require('npm:[email protected]/modules/web.dom.iterable');
- module.exports = $__require('npm:[email protected]/modules/$.core');
- global.define = __define;
- return module.exports;
- });
- System.registerDynamic("npm:[email protected]/lib/polyfill", ["npm:[email protected]/shim", "npm:[email protected]/regenerator/runtime"], true, function($__require, exports, module) {
- "use strict";
- ;
- var global = this,
- __define = global.define;
- global.define = undefined;
- "format cjs";
- $__require('npm:[email protected]/shim');
- $__require('npm:[email protected]/regenerator/runtime');
- if (global._babelPolyfill) {
- throw new Error("only one instance of babel/polyfill is allowed");
- }
- global._babelPolyfill = true;
- global.define = __define;
- return module.exports;
- });
- System.registerDynamic("npm:[email protected]/polyfill", ["npm:[email protected]/lib/polyfill"], true, function($__require, exports, module) {
- ;
- var global = this,
- __define = global.define;
- global.define = undefined;
- "format cjs";
- module.exports = $__require('npm:[email protected]/lib/polyfill');
- global.define = __define;
- return module.exports;
- });
- System.registerDynamic("npm:[email protected]/underscore", [], true, function($__require, exports, module) {
- ;
- var global = this,
- __define = global.define;
- global.define = undefined;
- "format cjs";
- (function() {
- var root = this;
- var previousUnderscore = root._;
- var ArrayProto = Array.prototype,
- ObjProto = Object.prototype,
- FuncProto = Function.prototype;
- var push = ArrayProto.push,
- slice = ArrayProto.slice,
- toString = ObjProto.toString,
- hasOwnProperty = ObjProto.hasOwnProperty;
- var nativeIsArray = Array.isArray,
- nativeKeys = Object.keys,
- nativeBind = FuncProto.bind,
- nativeCreate = Object.create;
- var Ctor = function() {};
- var _ = function(obj) {
- if (obj instanceof _)
- return obj;
- if (!(this instanceof _))
- return new _(obj);
- this._wrapped = obj;
- };
- if (typeof exports !== 'undefined') {
- if (typeof module !== 'undefined' && module.exports) {
- exports = module.exports = _;
- }
- exports._ = _;
- } else {
- root._ = _;
- }
- _.VERSION = '1.8.3';
- var optimizeCb = function(func, context, argCount) {
- if (context === void 0)
- return func;
- switch (argCount == null ? 3 : argCount) {
- case 1:
- return function(value) {
- return func.call(context, value);
- };
- case 2:
- return function(value, other) {
- return func.call(context, value, other);
- };
- case 3:
- return function(value, index, collection) {
- return func.call(context, value, index, collection);
- };
- case 4:
- return function(accumulator, value, index, collection) {
- return func.call(context, accumulator, value, index, collection);
- };
- }
- return function() {
- return func.apply(context, arguments);
- };
- };
- var cb = function(value, context, argCount) {
- if (value == null)
- return _.identity;
- if (_.isFunction(value))
- return optimizeCb(value, context, argCount);
- if (_.isObject(value))
- return _.matcher(value);
- return _.property(value);
- };
- _.iteratee = function(value, context) {
- return cb(value, context, Infinity);
- };
- var createAssigner = function(keysFunc, undefinedOnly) {
- return function(obj) {
- var length = arguments.length;
- if (length < 2 || obj == null)
- return obj;
- for (var index = 1; index < length; index++) {
- var source = arguments[index],
- keys = keysFunc(source),
- l = keys.length;
- for (var i = 0; i < l; i++) {
- var key = keys[i];
- if (!undefinedOnly || obj[key] === void 0)
- obj[key] = source[key];
- }
- }
- return obj;
- };
- };
- var baseCreate = function(prototype) {
- if (!_.isObject(prototype))
- return {};
- if (nativeCreate)
- return nativeCreate(prototype);
- Ctor.prototype = prototype;
- var result = new Ctor;
- Ctor.prototype = null;
- return result;
- };
- var property = function(key) {
- return function(obj) {
- return obj == null ? void 0 : obj[key];
- };
- };
- var MAX_ARRAY_INDEX = Math.pow(2, 53) - 1;
- var getLength = property('length');
- var isArrayLike = function(collection) {
- var length = getLength(collection);
- return typeof length == 'number' && length >= 0 && length <= MAX_ARRAY_INDEX;
- };
- _.each = _.forEach = function(obj, iteratee, context) {
- iteratee = optimizeCb(iteratee, context);
- var i,
- length;
- if (isArrayLike(obj)) {
- for (i = 0, length = obj.length; i < length; i++) {
- iteratee(obj[i], i, obj);
- }
- } else {
- var keys = _.keys(obj);
- for (i = 0, length = keys.length; i < length; i++) {
- iteratee(obj[keys[i]], keys[i], obj);
- }
- }
- return obj;
- };
- _.map = _.collect = function(obj, iteratee, context) {
- iteratee = cb(iteratee, context);
- var keys = !isArrayLike(obj) && _.keys(obj),
- length = (keys || obj).length,
- results = Array(length);
- for (var index = 0; index < length; index++) {
- var currentKey = keys ? keys[index] : index;
- results[index] = iteratee(obj[currentKey], currentKey, obj);
- }
- return results;
- };
- function createReduce(dir) {
- function iterator(obj, iteratee, memo, keys, index, length) {
- for (; index >= 0 && index < length; index += dir) {
- var currentKey = keys ? keys[index] : index;
- memo = iteratee(memo, obj[currentKey], currentKey, obj);
- }
- return memo;
- }
- return function(obj, iteratee, memo, context) {
- iteratee = optimizeCb(iteratee, context, 4);
- var keys = !isArrayLike(obj) && _.keys(obj),
- length = (keys || obj).length,
- index = dir > 0 ? 0 : length - 1;
- if (arguments.length < 3) {
- memo = obj[keys ? keys[index] : index];
- index += dir;
- }
- return iterator(obj, iteratee, memo, keys, index, length);
- };
- }
- _.reduce = _.foldl = _.inject = createReduce(1);
- _.reduceRight = _.foldr = createReduce(-1);
- _.find = _.detect = function(obj, predicate, context) {
- var key;
- if (isArrayLike(obj)) {
- key = _.findIndex(obj, predicate, context);
- } else {
- key = _.findKey(obj, predicate, context);
- }
- if (key !== void 0 && key !== -1)
- return obj[key];
- };
- _.filter = _.select = function(obj, predicate, context) {
- var results = [];
- predicate = cb(predicate, context);
- _.each(obj, function(value, index, list) {
- if (predicate(value, index, list))
- results.push(value);
- });
- return results;
- };
- _.reject = function(obj, predicate, context) {
- return _.filter(obj, _.negate(cb(predicate)), context);
- };
- _.every = _.all = function(obj, predicate, context) {
- predicate = cb(predicate, context);
- var keys = !isArrayLike(obj) && _.keys(obj),
- length = (keys || obj).length;
- for (var index = 0; index < length; index++) {
- var currentKey = keys ? keys[index] : index;
- if (!predicate(obj[currentKey], currentKey, obj))
- return false;
- }
- return true;
- };
- _.some = _.any = function(obj, predicate, context) {
- predicate = cb(predicate, context);
- var keys = !isArrayLike(obj) && _.keys(obj),
- length = (keys || obj).length;
- for (var index = 0; index < length; index++) {
- var currentKey = keys ? keys[index] : index;
- if (predicate(obj[currentKey], currentKey, obj))
- return true;
- }
- return false;
- };
- _.contains = _.includes = _.include = function(obj, item, fromIndex, guard) {
- if (!isArrayLike(obj))
- obj = _.values(obj);
- if (typeof fromIndex != 'number' || guard)
- fromIndex = 0;
- return _.indexOf(obj, item, fromIndex) >= 0;
- };
- _.invoke = function(obj, method) {
- var args = slice.call(arguments, 2);
- var isFunc = _.isFunction(method);
- return _.map(obj, function(value) {
- var func = isFunc ? method : value[method];
- return func == null ? func : func.apply(value, args);
- });
- };
- _.pluck = function(obj, key) {
- return _.map(obj, _.property(key));
- };
- _.where = function(obj, attrs) {
- return _.filter(obj, _.matcher(attrs));
- };
- _.findWhere = function(obj, attrs) {
- return _.find(obj, _.matcher(attrs));
- };
- _.max = function(obj, iteratee, context) {
- var result = -Infinity,
- lastComputed = -Infinity,
- value,
- computed;
- if (iteratee == null && obj != null) {
- obj = isArrayLike(obj) ? obj : _.values(obj);
- for (var i = 0,
- length = obj.length; i < length; i++) {
- value = obj[i];
- if (value > result) {
- result = value;
- }
- }
- } else {
- iteratee = cb(iteratee, context);
- _.each(obj, function(value, index, list) {
- computed = iteratee(value, index, list);
- if (computed > lastComputed || computed === -Infinity && result === -Infinity) {
- result = value;
- lastComputed = computed;
- }
- });
- }
- return result;
- };
- _.min = function(obj, iteratee, context) {
- var result = Infinity,
- lastComputed = Infinity,
- value,
- computed;
- if (iteratee == null && obj != null) {
- obj = isArrayLike(obj) ? obj : _.values(obj);
- for (var i = 0,
- length = obj.length; i < length; i++) {
- value = obj[i];
- if (value < result) {
- result = value;
- }
- }
- } else {
- iteratee = cb(iteratee, context);
- _.each(obj, function(value, index, list) {
- computed = iteratee(value, index, list);
- if (computed < lastComputed || computed === Infinity && result === Infinity) {
- result = value;
- lastComputed = computed;
- }
- });
- }
- return result;
- };
- _.shuffle = function(obj) {
- var set = isArrayLike(obj) ? obj : _.values(obj);
- var length = set.length;
- var shuffled = Array(length);
- for (var index = 0,
- rand; index < length; index++) {
- rand = _.random(0, index);
- if (rand !== index)
- shuffled[index] = shuffled[rand];
- shuffled[rand] = set[index];
- }
- return shuffled;
- };
- _.sample = function(obj, n, guard) {
- if (n == null || guard) {
- if (!isArrayLike(obj))
- obj = _.values(obj);
- return obj[_.random(obj.length - 1)];
- }
- return _.shuffle(obj).slice(0, Math.max(0, n));
- };
- _.sortBy = function(obj, iteratee, context) {
- iteratee = cb(iteratee, context);
- return _.pluck(_.map(obj, function(value, index, list) {
- return {
- value: value,
- index: index,
- criteria: iteratee(value, index, list)
- };
- }).sort(function(left, right) {
- var a = left.criteria;
- var b = right.criteria;
- if (a !== b) {
- if (a > b || a === void 0)
- return 1;
- if (a < b || b === void 0)
- return -1;
- }
- return left.index - right.index;
- }), 'value');
- };
- var group = function(behavior) {
- return function(obj, iteratee, context) {
- var result = {};
- iteratee = cb(iteratee, context);
- _.each(obj, function(value, index) {
- var key = iteratee(value, index, obj);
- behavior(result, value, key);
- });
- return result;
- };
- };
- _.groupBy = group(function(result, value, key) {
- if (_.has(result, key))
- result[key].push(value);
- else
- result[key] = [value];
- });
- _.indexBy = group(function(result, value, key) {
- result[key] = value;
- });
- _.countBy = group(function(result, value, key) {
- if (_.has(result, key))
- result[key]++;
- else
- result[key] = 1;
- });
- _.toArray = function(obj) {
- if (!obj)
- return [];
- if (_.isArray(obj))
- return slice.call(obj);
- if (isArrayLike(obj))
- return _.map(obj, _.identity);
- return _.values(obj);
- };
- _.size = function(obj) {
- if (obj == null)
- return 0;
- return isArrayLike(obj) ? obj.length : _.keys(obj).length;
- };
- _.partition = function(obj, predicate, context) {
- predicate = cb(predicate, context);
- var pass = [],
- fail = [];
- _.each(obj, function(value, key, obj) {
- (predicate(value, key, obj) ? pass : fail).push(value);
- });
- return [pass, fail];
- };
- _.first = _.head = _.take = function(array, n, guard) {
- if (array == null)
- return void 0;
- if (n == null || guard)
- return array[0];
- return _.initial(array, array.length - n);
- };
- _.initial = function(array, n, guard) {
- return slice.call(array, 0, Math.max(0, array.length - (n == null || guard ? 1 : n)));
- };
- _.last = function(array, n, guard) {
- if (array == null)
- return void 0;
- if (n == null || guard)
- return array[array.length - 1];
- return _.rest(array, Math.max(0, array.length - n));
- };
- _.rest = _.tail = _.drop = function(array, n, guard) {
- return slice.call(array, n == null || guard ? 1 : n);
- };
- _.compact = function(array) {
- return _.filter(array, _.identity);
- };
- var flatten = function(input, shallow, strict, startIndex) {
- var output = [],
- idx = 0;
- for (var i = startIndex || 0,
- length = getLength(input); i < length; i++) {
- var value = input[i];
- if (isArrayLike(value) && (_.isArray(value) || _.isArguments(value))) {
- if (!shallow)
- value = flatten(value, shallow, strict);
- var j = 0,
- len = value.length;
- output.length += len;
- while (j < len) {
- output[idx++] = value[j++];
- }
- } else if (!strict) {
- output[idx++] = value;
- }
- }
- return output;
- };
- _.flatten = function(array, shallow) {
- return flatten(array, shallow, false);
- };
- _.without = function(array) {
- return _.difference(array, slice.call(arguments, 1));
- };
- _.uniq = _.unique = function(array, isSorted, iteratee, context) {
- if (!_.isBoolean(isSorted)) {
- context = iteratee;
- iteratee = isSorted;
- isSorted = false;
- }
- if (iteratee != null)
- iteratee = cb(iteratee, context);
- var result = [];
- var seen = [];
- for (var i = 0,
- length = getLength(array); i < length; i++) {
- var value = array[i],
- computed = iteratee ? iteratee(value, i, array) : value;
- if (isSorted) {
- if (!i || seen !== computed)
- result.push(value);
- seen = computed;
- } else if (iteratee) {
- if (!_.contains(seen, computed)) {
- seen.push(computed);
- result.push(value);
- }
- } else if (!_.contains(result, value)) {
- result.push(value);
- }
- }
- return result;
- };
- _.union = function() {
- return _.uniq(flatten(arguments, true, true));
- };
- _.intersection = function(array) {
- var result = [];
- var argsLength = arguments.length;
- for (var i = 0,
- length = getLength(array); i < length; i++) {
- var item = array[i];
- if (_.contains(result, item))
- continue;
- for (var j = 1; j < argsLength; j++) {
- if (!_.contains(arguments[j], item))
- break;
- }
- if (j === argsLength)
- result.push(item);
- }
- return result;
- };
- _.difference = function(array) {
- var rest = flatten(arguments, true, true, 1);
- return _.filter(array, function(value) {
- return !_.contains(rest, value);
- });
- };
- _.zip = function() {
- return _.unzip(arguments);
- };
- _.unzip = function(array) {
- var length = array && _.max(array, getLength).length || 0;
- var result = Array(length);
- for (var index = 0; index < length; index++) {
- result[index] = _.pluck(array, index);
- }
- return result;
- };
- _.object = function(list, values) {
- var result = {};
- for (var i = 0,
- length = getLength(list); i < length; i++) {
- if (values) {
- result[list[i]] = values[i];
- } else {
- result[list[i][0]] = list[i][1];
- }
- }
- return result;
- };
- function createPredicateIndexFinder(dir) {
- return function(array, predicate, context) {
- predicate = cb(predicate, context);
- var length = getLength(array);
- var index = dir > 0 ? 0 : length - 1;
- for (; index >= 0 && index < length; index += dir) {
- if (predicate(array[index], index, array))
- return index;
- }
- return -1;
- };
- }
- _.findIndex = createPredicateIndexFinder(1);
- _.findLastIndex = createPredicateIndexFinder(-1);
- _.sortedIndex = function(array, obj, iteratee, context) {
- iteratee = cb(iteratee, context, 1);
- var value = iteratee(obj);
- var low = 0,
- high = getLength(array);
- while (low < high) {
- var mid = Math.floor((low + high) / 2);
- if (iteratee(array[mid]) < value)
- low = mid + 1;
- else
- high = mid;
- }
- return low;
- };
- function createIndexFinder(dir, predicateFind, sortedIndex) {
- return function(array, item, idx) {
- var i = 0,
- length = getLength(array);
- if (typeof idx == 'number') {
- if (dir > 0) {
- i = idx >= 0 ? idx : Math.max(idx + length, i);
- } else {
- length = idx >= 0 ? Math.min(idx + 1, length) : idx + length + 1;
- }
- } else if (sortedIndex && idx && length) {
- idx = sortedIndex(array, item);
- return array[idx] === item ? idx : -1;
- }
- if (item !== item) {
- idx = predicateFind(slice.call(array, i, length), _.isNaN);
- return idx >= 0 ? idx + i : -1;
- }
- for (idx = dir > 0 ? i : length - 1; idx >= 0 && idx < length; idx += dir) {
- if (array[idx] === item)
- return idx;
- }
- return -1;
- };
- }
- _.indexOf = createIndexFinder(1, _.findIndex, _.sortedIndex);
- _.lastIndexOf = createIndexFinder(-1, _.findLastIndex);
- _.range = function(start, stop, step) {
- if (stop == null) {
- stop = start || 0;
- start = 0;
- }
- step = step || 1;
- var length = Math.max(Math.ceil((stop - start) / step), 0);
- var range = Array(length);
- for (var idx = 0; idx < length; idx++, start += step) {
- range[idx] = start;
- }
- return range;
- };
- var executeBound = function(sourceFunc, boundFunc, context, callingContext, args) {
- if (!(callingContext instanceof boundFunc))
- return sourceFunc.apply(context, args);
- var self = baseCreate(sourceFunc.prototype);
- var result = sourceFunc.apply(self, args);
- if (_.isObject(result))
- return result;
- return self;
- };
- _.bind = function(func, context) {
- if (nativeBind && func.bind === nativeBind)
- return nativeBind.apply(func, slice.call(arguments, 1));
- if (!_.isFunction(func))
- throw new TypeError('Bind must be called on a function');
- var args = slice.call(arguments, 2);
- var bound = function() {
- return executeBound(func, bound, context, this, args.concat(slice.call(arguments)));
- };
- return bound;
- };
- _.partial = function(func) {
- var boundArgs = slice.call(arguments, 1);
- var bound = function() {
- var position = 0,
- length = boundArgs.length;
- var args = Array(length);
- for (var i = 0; i < length; i++) {
- args[i] = boundArgs[i] === _ ? arguments[position++] : boundArgs[i];
- }
- while (position < arguments.length)
- args.push(arguments[position++]);
- return executeBound(func, bound, this, this, args);
- };
- return bound;
- };
- _.bindAll = function(obj) {
- var i,
- length = arguments.length,
- key;
- if (length <= 1)
- throw new Error('bindAll must be passed function names');
- for (i = 1; i < length; i++) {
- key = arguments[i];
- obj[key] = _.bind(obj[key], obj);
- }
- return obj;
- };
- _.memoize = function(func, hasher) {
- var memoize = function(key) {
- var cache = memoize.cache;
- var address = '' + (hasher ? hasher.apply(this, arguments) : key);
- if (!_.has(cache, address))
- cache[address] = func.apply(this, arguments);
- return cache[address];
- };
- memoize.cache = {};
- return memoize;
- };
- _.delay = function(func, wait) {
- var args = slice.call(arguments, 2);
- return setTimeout(function() {
- return func.apply(null, args);
- }, wait);
- };
- _.defer = _.partial(_.delay, _, 1);
- _.throttle = function(func, wait, options) {
- var context,
- args,
- result;
- var timeout = null;
- var previous = 0;
- if (!options)
- options = {};
- var later = function() {
- previous = options.leading === false ? 0 : _.now();
- timeout = null;
- result = func.apply(context, args);
- if (!timeout)
- context = args = null;
- };
- return function() {
- var now = _.now();
- if (!previous && options.leading === false)
- previous = now;
- var remaining = wait - (now - previous);
- context = this;
- args = arguments;
- if (remaining <= 0 || remaining > wait) {
- if (timeout) {
- clearTimeout(timeout);
- timeout = null;
- }
- previous = now;
- result = func.apply(context, args);
- if (!timeout)
- context = args = null;
- } else if (!timeout && options.trailing !== false) {
- timeout = setTimeout(later, remaining);
- }
- return result;
- };
- };
- _.debounce = function(func, wait, immediate) {
- var timeout,
- args,
- context,
- timestamp,
- result;
- var later = function() {
- var last = _.now() - timestamp;
- if (last < wait && last >= 0) {
- timeout = setTimeout(later, wait - last);
- } else {
- timeout = null;
- if (!immediate) {
- result = func.apply(context, args);
- if (!timeout)
- context = args = null;
- }
- }
- };
- return function() {
- context = this;
- args = arguments;
- timestamp = _.now();
- var callNow = immediate && !timeout;
- if (!timeout)
- timeout = setTimeout(later, wait);
- if (callNow) {
- result = func.apply(context, args);
- context = args = null;
- }
- return result;
- };
- };
- _.wrap = function(func, wrapper) {
- return _.partial(wrapper, func);
- };
- _.negate = function(predicate) {
- return function() {
- return !predicate.apply(this, arguments);
- };
- };
- _.compose = function() {
- var args = arguments;
- var start = args.length - 1;
- return function() {
- var i = start;
- var result = args[start].apply(this, arguments);
- while (i--)
- result = args[i].call(this, result);
- return result;
- };
- };
- _.after = function(times, func) {
- return function() {
- if (--times < 1) {
- return func.apply(this, arguments);
- }
- };
- };
- _.before = function(times, func) {
- var memo;
- return function() {
- if (--times > 0) {
- memo = func.apply(this, arguments);
- }
- if (times <= 1)
- func = null;
- return memo;
- };
- };
- _.once = _.partial(_.before, 2);
- var hasEnumBug = !{toString: null}.propertyIsEnumerable('toString');
- var nonEnumerableProps = ['valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];
- function collectNonEnumProps(obj, keys) {
- var nonEnumIdx = nonEnumerableProps.length;
- var constructor = obj.constructor;
- var proto = (_.isFunction(constructor) && constructor.prototype) || ObjProto;
- var prop = 'constructor';
- if (_.has(obj, prop) && !_.contains(keys, prop))
- keys.push(prop);
- while (nonEnumIdx--) {
- prop = nonEnumerableProps[nonEnumIdx];
- if (prop in obj && obj[prop] !== proto[prop] && !_.contains(keys, prop)) {
- keys.push(prop);
- }
- }
- }
- _.keys = function(obj) {
- if (!_.isObject(obj))
- return [];
- if (nativeKeys)
- return nativeKeys(obj);
- var keys = [];
- for (var key in obj)
- if (_.has(obj, key))
- keys.push(key);
- if (hasEnumBug)
- collectNonEnumProps(obj, keys);
- return keys;
- };
- _.allKeys = function(obj) {
- if (!_.isObject(obj))
- return [];
- var keys = [];
- for (var key in obj)
- keys.push(key);
- if (hasEnumBug)
- collectNonEnumProps(obj, keys);
- return keys;
- };
- _.values = function(obj) {
- var keys = _.keys(obj);
- var length = keys.length;
- var values = Array(length);
- for (var i = 0; i < length; i++) {
- values[i] = obj[keys[i]];
- }
- return values;
- };
- _.mapObject = function(obj, iteratee, context) {
- iteratee = cb(iteratee, context);
- var keys = _.keys(obj),
- length = keys.length,
- results = {},
- currentKey;
- for (var index = 0; index < length; index++) {
- currentKey = keys[index];
- results[currentKey] = iteratee(obj[currentKey], currentKey, obj);
- }
- return results;
- };
- _.pairs = function(obj) {
- var keys = _.keys(obj);
- var length = keys.length;
- var pairs = Array(length);
- for (var i = 0; i < length; i++) {
- pairs[i] = [keys[i], obj[keys[i]]];
- }
- return pairs;
- };
- _.invert = function(obj) {
- var result = {};
- var keys = _.keys(obj);
- for (var i = 0,
- length = keys.length; i < length; i++) {
- result[obj[keys[i]]] = keys[i];
- }
- return result;
- };
- _.functions = _.methods = function(obj) {
- var names = [];
- for (var key in obj) {
- if (_.isFunction(obj[key]))
- names.push(key);
- }
- return names.sort();
- };
- _.extend = createAssigner(_.allKeys);
- _.extendOwn = _.assign = createAssigner(_.keys);
- _.findKey = function(obj, predicate, context) {
- predicate = cb(predicate, context);
- var keys = _.keys(obj),
- key;
- for (var i = 0,
- length = keys.length; i < length; i++) {
- key = keys[i];
- if (predicate(obj[key], key, obj))
- return key;
- }
- };
- _.pick = function(object, oiteratee, context) {
- var result = {},
- obj = object,
- iteratee,
- keys;
- if (obj == null)
- return result;
- if (_.isFunction(oiteratee)) {
- keys = _.allKeys(obj);
- iteratee = optimizeCb(oiteratee, context);
- } else {
- keys = flatten(arguments, false, false, 1);
- iteratee = function(value, key, obj) {
- return key in obj;
- };
- obj = Object(obj);
- }
- for (var i = 0,
- length = keys.length; i < length; i++) {
- var key = keys[i];
- var value = obj[key];
- if (iteratee(value, key, obj))
- result[key] = value;
- }
- return result;
- };
- _.omit = function(obj, iteratee, context) {
- if (_.isFunction(iteratee)) {
- iteratee = _.negate(iteratee);
- } else {
- var keys = _.map(flatten(arguments, false, false, 1), String);
- iteratee = function(value, key) {
- return !_.contains(keys, key);
- };
- }
- return _.pick(obj, iteratee, context);
- };
- _.defaults = createAssigner(_.allKeys, true);
- _.create = function(prototype, props) {
- var result = baseCreate(prototype);
- if (props)
- _.extendOwn(result, props);
- return result;
- };
- _.clone = function(obj) {
- if (!_.isObject(obj))
- return obj;
- return _.isArray(obj) ? obj.slice() : _.extend({}, obj);
- };
- _.tap = function(obj, interceptor) {
- interceptor(obj);
- return obj;
- };
- _.isMatch = function(object, attrs) {
- var keys = _.keys(attrs),
- length = keys.length;
- if (object == null)
- return !length;
- var obj = Object(object);
- for (var i = 0; i < length; i++) {
- var key = keys[i];
- if (attrs[key] !== obj[key] || !(key in obj))
- return false;
- }
- return true;
- };
- var eq = function(a, b, aStack, bStack) {
- if (a === b)
- return a !== 0 || 1 / a === 1 / b;
- if (a == null || b == null)
- return a === b;
- if (a instanceof _)
- a = a._wrapped;
- if (b instanceof _)
- b = b._wrapped;
- var className = toString.call(a);
- if (className !== toString.call(b))
- return false;
- switch (className) {
- case '[object RegExp]':
- case '[object String]':
- return '' + a === '' + b;
- case '[object Number]':
- if (+a !== +a)
- return +b !== +b;
- return +a === 0 ? 1 / +a === 1 / b : +a === +b;
- case '[object Date]':
- case '[object Boolean]':
- return +a === +b;
- }
- var areArrays = className === '[object Array]';
- if (!areArrays) {
- if (typeof a != 'object' || typeof b != 'object')
- return false;
- var aCtor = a.constructor,
- bCtor = b.constructor;
- if (aCtor !== bCtor && !(_.isFunction(aCtor) && aCtor instanceof aCtor && _.isFunction(bCtor) && bCtor instanceof bCtor) && ('constructor' in a && 'constructor' in b)) {
- return false;
- }
- }
- aStack = aStack || [];
- bStack = bStack || [];
- var length = aStack.length;
- while (length--) {
- if (aStack[length] === a)
- return bStack[length] === b;
- }
- aStack.push(a);
- bStack.push(b);
- if (areArrays) {
- length = a.length;
- if (length !== b.length)
- return false;
- while (length--) {
- if (!eq(a[length], b[length], aStack, bStack))
- return false;
- }
- } else {
- var keys = _.keys(a),
- key;
- length = keys.length;
- if (_.keys(b).length !== length)
- return false;
- while (length--) {
- key = keys[length];
- if (!(_.has(b, key) && eq(a[key], b[key], aStack, bStack)))
- return false;
- }
- }
- aStack.pop();
- bStack.pop();
- return true;
- };
- _.isEqual = function(a, b) {
- return eq(a, b);
- };
- _.isEmpty = function(obj) {
- if (obj == null)
- return true;
- if (isArrayLike(obj) && (_.isArray(obj) || _.isString(obj) || _.isArguments(obj)))
- return obj.length === 0;
- return _.keys(obj).length === 0;
- };
- _.isElement = function(obj) {
- return !!(obj && obj.nodeType === 1);
- };
- _.isArray = nativeIsArray || function(obj) {
- return toString.call(obj) === '[object Array]';
- };
- _.isObject = function(obj) {
- var type = typeof obj;
- return type === 'function' || type === 'object' && !!obj;
- };
- _.each(['Arguments', 'Function', 'String', 'Number', 'Date', 'RegExp', 'Error'], function(name) {
- _['is' + name] = function(obj) {
- return toString.call(obj) === '[object ' + name + ']';
- };
- });
- if (!_.isArguments(arguments)) {
- _.isArguments = function(obj) {
- return _.has(obj, 'callee');
- };
- }
- if (typeof/./ != 'function' && typeof Int8Array != 'object') {
- _.isFunction = function(obj) {
- return typeof obj == 'function' || false;
- };
- }
- _.isFinite = function(obj) {
- return isFinite(obj) && !isNaN(parseFloat(obj));
- };
- _.isNaN = function(obj) {
- return _.isNumber(obj) && obj !== +obj;
- };
- _.isBoolean = function(obj) {
- return obj === true || obj === false || toString.call(obj) === '[object Boolean]';
- };
- _.isNull = function(obj) {
- return obj === null;
- };
- _.isUndefined = function(obj) {
- return obj === void 0;
- };
- _.has = function(obj, key) {
- return obj != null && hasOwnProperty.call(obj, key);
- };
- _.noConflict = function() {
- root._ = previousUnderscore;
- return this;
- };
- _.identity = function(value) {
- return value;
- };
- _.constant = function(value) {
- return function() {
- return value;
- };
- };
- _.noop = function() {};
- _.property = property;
- _.propertyOf = function(obj) {
- return obj == null ? function() {} : function(key) {
- return obj[key];
- };
- };
- _.matcher = _.matches = function(attrs) {
- attrs = _.extendOwn({}, attrs);
- return function(obj) {
- return _.isMatch(obj, attrs);
- };
- };
- _.times = function(n, iteratee, context) {
- var accum = Array(Math.max(0, n));
- iteratee = optimizeCb(iteratee, context, 1);
- for (var i = 0; i < n; i++)
- accum[i] = iteratee(i);
- return accum;
- };
- _.random = function(min, max) {
- if (max == null) {
- max = min;
- min = 0;
- }
- return min + Math.floor(Math.random() * (max - min + 1));
- };
- _.now = Date.now || function() {
- return new Date().getTime();
- };
- var escapeMap = {
- '&': '&',
- '<': '<',
- '>': '>',
- '"': '"',
- "'": ''',
- '`': '`'
- };
- var unescapeMap = _.invert(escapeMap);
- var createEscaper = function(map) {
- var escaper = function(match) {
- return map[match];
- };
- var source = '(?:' + _.keys(map).join('|') + ')';
- var testRegexp = RegExp(source);
- var replaceRegexp = RegExp(source, 'g');
- return function(string) {
- string = string == null ? '' : '' + string;
- return testRegexp.test(string) ? string.replace(replaceRegexp, escaper) : string;
- };
- };
- _.escape = createEscaper(escapeMap);
- _.unescape = createEscaper(unescapeMap);
- _.result = function(object, property, fallback) {
- var value = object == null ? void 0 : object[property];
- if (value === void 0) {
- value = fallback;
- }
- return _.isFunction(value) ? value.call(object) : value;
- };
- var idCounter = 0;
- _.uniqueId = function(prefix) {
- var id = ++idCounter + '';
- return prefix ? prefix + id : id;
- };
- _.templateSettings = {
- evaluate: /<%([\s\S]+?)%>/g,
- interpolate: /<%=([\s\S]+?)%>/g,
- escape: /<%-([\s\S]+?)%>/g
- };
- var noMatch = /(.)^/;
- var escapes = {
- "'": "'",
- '\\': '\\',
- '\r': 'r',
- '\n': 'n',
- '\u2028': 'u2028',
- '\u2029': 'u2029'
- };
- var escaper = /\\|'|\r|\n|\u2028|\u2029/g;
- var escapeChar = function(match) {
- return '\\' + escapes[match];
- };
- _.template = function(text, settings, oldSettings) {
- if (!settings && oldSettings)
- settings = oldSettings;
- settings = _.defaults({}, settings, _.templateSettings);
- var matcher = RegExp([(settings.escape || noMatch).source, (settings.interpolate || noMatch).source, (settings.evaluate || noMatch).source].join('|') + '|$', 'g');
- var index = 0;
- var source = "__p+='";
- text.replace(matcher, function(match, escape, interpolate, evaluate, offset) {
- source += text.slice(index, offset).replace(escaper, escapeChar);
- index = offset + match.length;
- if (escape) {
- source += "'+\n((__t=(" + escape + "))==null?'':_.escape(__t))+\n'";
- } else if (interpolate) {
- source += "'+\n((__t=(" + interpolate + "))==null?'':__t)+\n'";
- } else if (evaluate) {
- source += "';\n" + evaluate + "\n__p+='";
- }
- return match;
- });
- source += "';\n";
- if (!settings.variable)
- source = 'with(obj||{}){\n' + source + '}\n';
- source = "var __t,__p='',__j=Array.prototype.join," + "print=function(){__p+=__j.call(arguments,'');};\n" + source + 'return __p;\n';
- try {
- var render = new Function(settings.variable || 'obj', '_', source);
- } catch (e) {
- e.source = source;
- throw e;
- }
- var template = function(data) {
- return render.call(this, data, _);
- };
- var argument = settings.variable || 'obj';
- template.source = 'function(' + argument + '){\n' + source + '}';
- return template;
- };
- _.chain = function(obj) {
- var instance = _(obj);
- instance._chain = true;
- return instance;
- };
- var result = function(instance, obj) {
- return instance._chain ? _(obj).chain() : obj;
- };
- _.mixin = function(obj) {
- _.each(_.functions(obj), function(name) {
- var func = _[name] = obj[name];
- _.prototype[name] = function() {
- var args = [this._wrapped];
- push.apply(args, arguments);
- return result(this, func.apply(_, args));
- };
- });
- };
- _.mixin(_);
- _.each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
- var method = ArrayProto[name];
- _.prototype[name] = function() {
- var obj = this._wrapped;
- method.apply(obj, arguments);
- if ((name === 'shift' || name === 'splice') && obj.length === 0)
- delete obj[0];
- return result(this, obj);
- };
- });
- _.each(['concat', 'join', 'slice'], function(name) {
- var method = ArrayProto[name];
- _.prototype[name] = function() {
- return result(this, method.apply(this._wrapped, arguments));
- };
- });
- _.prototype.value = function() {
- return this._wrapped;
- };
- _.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
- _.prototype.toString = function() {
- return '' + this._wrapped;
- };
- if (typeof define === 'function' && define.amd) {
- define('underscore', [], function() {
- return _;
- });
- }
- }.call(this));
- global.define = __define;
- return module.exports;
- });
- System.registerDynamic("npm:[email protected]", ["npm:[email protected]/underscore"], true, function($__require, exports, module) {
- ;
- var global = this,
- __define = global.define;
- global.define = undefined;
- module.exports = $__require('npm:[email protected]/underscore');
- global.define = __define;
- return module.exports;
- });
- System.register("app/lib/util/UnderscoreMixins.js", ["npm:[email protected]"], function (_export) {
- "use strict";
- var _;
- return {
- setters: [function (_npmUnderscore183) {
- _ = _npmUnderscore183["default"];
- }],
- execute: function () {
- _.mixin({
- deepClone: function deepClone(input) {
- return JSON.parse(JSON.stringify(input));
- },
- deepEqual: function deepEqual(a, b) {
- return JSON.stringify(a) === JSON.stringify(b);
- },
- split: function split(array, segments) {
- var len = array.length,
- out = [],
- i = 0;
- while (i < len) {
- var size = Math.ceil((len - i) / segments--);
- out.push(array.slice(i, i += size));
- }
- return out;
- },
- paginate: function paginate(array, pageSize) {
- var out = [];
- var pagesNumber = Math.ceil(array.length / pageSize);
- _.range(0, pagesNumber).forEach(function (start) {
- out.push(array.slice(start * pageSize, start * pageSize + pageSize));
- });
- return out;
- }
- });
- }
- };
- });
Advertisement
Add Comment
Please, Sign In to add comment