UNPKG

@moomfe/zenjs

Version:

ZenJS 是一个高性能的 JavaScript 工具库。

1,728 lines (1,627 loc) 262 kB
(function () { function e(t, n, r) { function s(o, u) { if (!n[o]) { if (!t[o]) { var a = typeof require == "function" && require; if (!u && a) return a(o, !0); if (i) return i(o, !0); var f = new Error("Cannot find module '" + o + "'"); throw f.code = "MODULE_NOT_FOUND", f } var l = n[o] = { exports: {} }; t[o][0].call(l.exports, function (e) { var n = t[o][1][e]; return s(n ? n : e) }, l, l.exports, e, t, n, r) } return n[o].exports } var i = typeof require == "function" && require; for (var o = 0; o < r.length; o++) s(r[o]); return s } return e })()({ 1: [function (_dereq_, module, exports) { (function (global) { "use strict"; _dereq_(2); _dereq_(3); _dereq_(9); _dereq_(8); _dereq_(10); _dereq_(5); _dereq_(6); _dereq_(4); _dereq_(7); _dereq_(275); _dereq_(276); if (global._babelPolyfill && typeof console !== "undefined" && console.warn) { console.warn("@babel/polyfill is loaded more than once on this page. This is probably not desirable/intended " + "and may have consequences if different versions of the polyfills are applied sequentially. " + "If you do need to load the polyfill more than once, use @babel/polyfill/noConflict " + "instead to bypass the warning."); } global._babelPolyfill = true; }).call(this, typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {}) }, { "10": 10, "2": 2, "275": 275, "276": 276, "3": 3, "4": 4, "5": 5, "6": 6, "7": 7, "8": 8, "9": 9 }], 2: [function (_dereq_, module, exports) { _dereq_(250); _dereq_(187); _dereq_(189); _dereq_(188); _dereq_(191); _dereq_(193); _dereq_(198); _dereq_(192); _dereq_(190); _dereq_(200); _dereq_(199); _dereq_(195); _dereq_(196); _dereq_(194); _dereq_(186); _dereq_(197); _dereq_(201); _dereq_(202); _dereq_(153); _dereq_(155); _dereq_(154); _dereq_(204); _dereq_(203); _dereq_(174); _dereq_(184); _dereq_(185); _dereq_(175); _dereq_(176); _dereq_(177); _dereq_(178); _dereq_(179); _dereq_(180); _dereq_(181); _dereq_(182); _dereq_(183); _dereq_(157); _dereq_(158); _dereq_(159); _dereq_(160); _dereq_(161); _dereq_(162); _dereq_(163); _dereq_(164); _dereq_(165); _dereq_(166); _dereq_(167); _dereq_(168); _dereq_(169); _dereq_(170); _dereq_(171); _dereq_(172); _dereq_(173); _dereq_(237); _dereq_(242); _dereq_(249); _dereq_(240); _dereq_(232); _dereq_(233); _dereq_(238); _dereq_(243); _dereq_(245); _dereq_(228); _dereq_(229); _dereq_(230); _dereq_(231); _dereq_(234); _dereq_(235); _dereq_(236); _dereq_(239); _dereq_(241); _dereq_(244); _dereq_(246); _dereq_(247); _dereq_(248); _dereq_(148); _dereq_(150); _dereq_(149); _dereq_(152); _dereq_(151); _dereq_(136); _dereq_(134); _dereq_(141); _dereq_(138); _dereq_(144); _dereq_(146); _dereq_(133); _dereq_(140); _dereq_(130); _dereq_(145); _dereq_(128); _dereq_(143); _dereq_(142); _dereq_(135); _dereq_(139); _dereq_(127); _dereq_(129); _dereq_(132); _dereq_(131); _dereq_(147); _dereq_(137); _dereq_(220); _dereq_(226); _dereq_(221); _dereq_(222); _dereq_(223); _dereq_(224); _dereq_(225); _dereq_(205); _dereq_(156); _dereq_(227); _dereq_(262); _dereq_(263); _dereq_(251); _dereq_(252); _dereq_(257); _dereq_(260); _dereq_(261); _dereq_(255); _dereq_(258); _dereq_(256); _dereq_(259); _dereq_(253); _dereq_(254); _dereq_(206); _dereq_(207); _dereq_(208); _dereq_(209); _dereq_(210); _dereq_(213); _dereq_(211); _dereq_(212); _dereq_(214); _dereq_(215); _dereq_(216); _dereq_(217); _dereq_(219); _dereq_(218); module.exports = _dereq_(29); }, { "127": 127, "128": 128, "129": 129, "130": 130, "131": 131, "132": 132, "133": 133, "134": 134, "135": 135, "136": 136, "137": 137, "138": 138, "139": 139, "140": 140, "141": 141, "142": 142, "143": 143, "144": 144, "145": 145, "146": 146, "147": 147, "148": 148, "149": 149, "150": 150, "151": 151, "152": 152, "153": 153, "154": 154, "155": 155, "156": 156, "157": 157, "158": 158, "159": 159, "160": 160, "161": 161, "162": 162, "163": 163, "164": 164, "165": 165, "166": 166, "167": 167, "168": 168, "169": 169, "170": 170, "171": 171, "172": 172, "173": 173, "174": 174, "175": 175, "176": 176, "177": 177, "178": 178, "179": 179, "180": 180, "181": 181, "182": 182, "183": 183, "184": 184, "185": 185, "186": 186, "187": 187, "188": 188, "189": 189, "190": 190, "191": 191, "192": 192, "193": 193, "194": 194, "195": 195, "196": 196, "197": 197, "198": 198, "199": 199, "200": 200, "201": 201, "202": 202, "203": 203, "204": 204, "205": 205, "206": 206, "207": 207, "208": 208, "209": 209, "210": 210, "211": 211, "212": 212, "213": 213, "214": 214, "215": 215, "216": 216, "217": 217, "218": 218, "219": 219, "220": 220, "221": 221, "222": 222, "223": 223, "224": 224, "225": 225, "226": 226, "227": 227, "228": 228, "229": 229, "230": 230, "231": 231, "232": 232, "233": 233, "234": 234, "235": 235, "236": 236, "237": 237, "238": 238, "239": 239, "240": 240, "241": 241, "242": 242, "243": 243, "244": 244, "245": 245, "246": 246, "247": 247, "248": 248, "249": 249, "250": 250, "251": 251, "252": 252, "253": 253, "254": 254, "255": 255, "256": 256, "257": 257, "258": 258, "259": 259, "260": 260, "261": 261, "262": 262, "263": 263, "29": 29 }], 3: [function (_dereq_, module, exports) { _dereq_(264); module.exports = _dereq_(29).Array.includes; }, { "264": 264, "29": 29 }], 4: [function (_dereq_, module, exports) { _dereq_(265); module.exports = _dereq_(29).Object.entries; }, { "265": 265, "29": 29 }], 5: [function (_dereq_, module, exports) { _dereq_(266); module.exports = _dereq_(29).Object.getOwnPropertyDescriptors; }, { "266": 266, "29": 29 }], 6: [function (_dereq_, module, exports) { _dereq_(267); module.exports = _dereq_(29).Object.values; }, { "267": 267, "29": 29 }], 7: [function (_dereq_, module, exports) { 'use strict'; _dereq_(205); _dereq_(268); module.exports = _dereq_(29).Promise['finally']; }, { "205": 205, "268": 268, "29": 29 }], 8: [function (_dereq_, module, exports) { _dereq_(269); module.exports = _dereq_(29).String.padEnd; }, { "269": 269, "29": 29 }], 9: [function (_dereq_, module, exports) { _dereq_(270); module.exports = _dereq_(29).String.padStart; }, { "270": 270, "29": 29 }], 10: [function (_dereq_, module, exports) { _dereq_(271); module.exports = _dereq_(124).f('asyncIterator'); }, { "124": 124, "271": 271 }], 11: [function (_dereq_, module, exports) { module.exports = function (it) { if (typeof it != 'function') throw TypeError(it + ' is not a function!'); return it; }; }, {}], 12: [function (_dereq_, module, exports) { var cof = _dereq_(25); module.exports = function (it, msg) { if (typeof it != 'number' && cof(it) != 'Number') throw TypeError(msg); return +it; }; }, { "25": 25 }], 13: [function (_dereq_, module, exports) { // 22.1.3.31 Array.prototype[@@unscopables] var UNSCOPABLES = _dereq_(125)('unscopables'); var ArrayProto = Array.prototype; if (ArrayProto[UNSCOPABLES] == undefined) _dereq_(47)(ArrayProto, UNSCOPABLES, {}); module.exports = function (key) { ArrayProto[UNSCOPABLES][key] = true; }; }, { "125": 125, "47": 47 }], 14: [function (_dereq_, module, exports) { module.exports = function (it, Constructor, name, forbiddenField) { if (!(it instanceof Constructor) || (forbiddenField !== undefined && forbiddenField in it)) { throw TypeError(name + ': incorrect invocation!'); } return it; }; }, {}], 15: [function (_dereq_, module, exports) { var isObject = _dereq_(56); module.exports = function (it) { if (!isObject(it)) throw TypeError(it + ' is not an object!'); return it; }; }, { "56": 56 }], 16: [function (_dereq_, module, exports) { // 22.1.3.3 Array.prototype.copyWithin(target, start, end = this.length) 'use strict'; var toObject = _dereq_(115); var toAbsoluteIndex = _dereq_(110); var toLength = _dereq_(114); module.exports = [].copyWithin || function copyWithin(target /* = 0 */ , start /* = 0, end = @length */ ) { var O = toObject(this); var len = toLength(O.length); var to = toAbsoluteIndex(target, len); var from = toAbsoluteIndex(start, len); var end = arguments.length > 2 ? arguments[2] : undefined; var count = Math.min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); var inc = 1; if (from < to && to < from + count) { inc = -1; from += count - 1; to += count - 1; } while (count-- > 0) { if (from in O) O[to] = O[from]; else delete O[to]; to += inc; from += inc; } return O; }; }, { "110": 110, "114": 114, "115": 115 }], 17: [function (_dereq_, module, exports) { // 22.1.3.6 Array.prototype.fill(value, start = 0, end = this.length) 'use strict'; var toObject = _dereq_(115); var toAbsoluteIndex = _dereq_(110); var toLength = _dereq_(114); module.exports = function fill(value /* , start = 0, end = @length */ ) { var O = toObject(this); var length = toLength(O.length); var aLen = arguments.length; var index = toAbsoluteIndex(aLen > 1 ? arguments[1] : undefined, length); var end = aLen > 2 ? arguments[2] : undefined; var endPos = end === undefined ? length : toAbsoluteIndex(end, length); while (endPos > index) O[index++] = value; return O; }; }, { "110": 110, "114": 114, "115": 115 }], 18: [function (_dereq_, module, exports) { // false -> Array#indexOf // true -> Array#includes var toIObject = _dereq_(113); var toLength = _dereq_(114); var toAbsoluteIndex = _dereq_(110); module.exports = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIObject($this); var length = toLength(O.length); var index = toAbsoluteIndex(fromIndex, length); var value; // Array#includes uses SameValueZero equality algorithm // eslint-disable-next-line no-self-compare if (IS_INCLUDES && el != el) while (length > index) { value = O[index++]; // eslint-disable-next-line no-self-compare if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not } else for (; length > index; index++) if (IS_INCLUDES || index in O) { if (O[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; }, { "110": 110, "113": 113, "114": 114 }], 19: [function (_dereq_, module, exports) { // 0 -> Array#forEach // 1 -> Array#map // 2 -> Array#filter // 3 -> Array#some // 4 -> Array#every // 5 -> Array#find // 6 -> Array#findIndex var ctx = _dereq_(31); var IObject = _dereq_(52); var toObject = _dereq_(115); var toLength = _dereq_(114); var asc = _dereq_(22); module.exports = function (TYPE, $create) { var IS_MAP = TYPE == 1; var IS_FILTER = TYPE == 2; var IS_SOME = TYPE == 3; var IS_EVERY = TYPE == 4; var IS_FIND_INDEX = TYPE == 6; var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; var create = $create || asc; return function ($this, callbackfn, that) { var O = toObject($this); var self = IObject(O); var f = ctx(callbackfn, that, 3); var length = toLength(self.length); var index = 0; var result = IS_MAP ? create($this, length) : IS_FILTER ? create($this, 0) : undefined; var val, res; for (; length > index; index++) if (NO_HOLES || index in self) { val = self[index]; res = f(val, index, O); if (TYPE) { if (IS_MAP) result[index] = res; // map else if (res) switch (TYPE) { case 3: return true; // some case 5: return val; // find case 6: return index; // findIndex case 2: result.push(val); // filter } else if (IS_EVERY) return false; // every } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : result; }; }; }, { "114": 114, "115": 115, "22": 22, "31": 31, "52": 52 }], 20: [function (_dereq_, module, exports) { var aFunction = _dereq_(11); var toObject = _dereq_(115); var IObject = _dereq_(52); var toLength = _dereq_(114); module.exports = function (that, callbackfn, aLen, memo, isRight) { aFunction(callbackfn); var O = toObject(that); var self = IObject(O); var length = toLength(O.length); var index = isRight ? length - 1 : 0; var i = isRight ? -1 : 1; if (aLen < 2) for (;;) { if (index in self) { memo = self[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 self) { memo = callbackfn(memo, self[index], index, O); } return memo; }; }, { "11": 11, "114": 114, "115": 115, "52": 52 }], 21: [function (_dereq_, module, exports) { var isObject = _dereq_(56); var isArray = _dereq_(54); var SPECIES = _dereq_(125)('species'); module.exports = function (original) { var C; if (isArray(original)) { C = original.constructor; // cross-realm fallback if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined; if (isObject(C)) { C = C[SPECIES]; if (C === null) C = undefined; } } return C === undefined ? Array : C; }; }, { "125": 125, "54": 54, "56": 56 }], 22: [function (_dereq_, module, exports) { // 9.4.2.3 ArraySpeciesCreate(originalArray, length) var speciesConstructor = _dereq_(21); module.exports = function (original, length) { return new(speciesConstructor(original))(length); }; }, { "21": 21 }], 23: [function (_dereq_, module, exports) { 'use strict'; var aFunction = _dereq_(11); var isObject = _dereq_(56); var invoke = _dereq_(51); var arraySlice = [].slice; var factories = {}; var construct = function (F, len, args) { if (!(len in factories)) { for (var n = [], i = 0; i < len; i++) n[i] = 'a[' + i + ']'; // eslint-disable-next-line no-new-func factories[len] = Function('F,a', 'return new F(' + n.join(',') + ')'); } return factories[len](F, args); }; module.exports = Function.bind || function bind(that /* , ...args */ ) { var fn = aFunction(this); var partArgs = arraySlice.call(arguments, 1); var bound = function ( /* args... */ ) { 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; }; }, { "11": 11, "51": 51, "56": 56 }], 24: [function (_dereq_, module, exports) { // getting tag from 19.1.3.6 Object.prototype.toString() var cof = _dereq_(25); var TAG = _dereq_(125)('toStringTag'); // ES3 wrong here var ARG = cof(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (e) { /* empty */ } }; module.exports = function (it) { var O, T, B; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (T = tryGet(O = Object(it), TAG)) == 'string' ? T // builtinTag case : ARG ? cof(O) // ES3 arguments fallback : (B = cof(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : B; }; }, { "125": 125, "25": 25 }], 25: [function (_dereq_, module, exports) { var toString = {}.toString; module.exports = function (it) { return toString.call(it).slice(8, -1); }; }, {}], 26: [function (_dereq_, module, exports) { 'use strict'; var dP = _dereq_(74).f; var create = _dereq_(73); var redefineAll = _dereq_(92); var ctx = _dereq_(31); var anInstance = _dereq_(14); var forOf = _dereq_(44); var $iterDefine = _dereq_(60); var step = _dereq_(62); var setSpecies = _dereq_(96); var DESCRIPTORS = _dereq_(35); var fastKey = _dereq_(69).fastKey; var validate = _dereq_(122); var SIZE = DESCRIPTORS ? '_s' : 'size'; var getEntry = function (that, key) { // fast case var index = fastKey(key); var entry; if (index !== 'F') return that._i[index]; // frozen object case for (entry = that._f; entry; entry = entry.n) { if (entry.k == key) return entry; } }; module.exports = { getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { var C = wrapper(function (that, iterable) { anInstance(that, C, NAME, '_i'); that._t = NAME; // collection type that._i = create(null); // index that._f = undefined; // first entry that._l = undefined; // last entry that[SIZE] = 0; // size if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.1.3.1 Map.prototype.clear() // 23.2.3.2 Set.prototype.clear() clear: function clear() { for (var that = validate(this, NAME), data = that._i, entry = that._f; entry; entry = entry.n) { entry.r = true; if (entry.p) entry.p = entry.p.n = undefined; delete data[entry.i]; } that._f = that._l = undefined; that[SIZE] = 0; }, // 23.1.3.3 Map.prototype.delete(key) // 23.2.3.4 Set.prototype.delete(value) 'delete': function (key) { var that = validate(this, NAME); var entry = getEntry(that, key); if (entry) { var next = entry.n; var prev = entry.p; delete that._i[entry.i]; entry.r = true; if (prev) prev.n = next; if (next) next.p = prev; if (that._f == entry) that._f = next; if (that._l == entry) that._l = prev; that[SIZE]--; } return !!entry; }, // 23.2.3.6 Set.prototype.forEach(callbackfn, thisArg = undefined) // 23.1.3.5 Map.prototype.forEach(callbackfn, thisArg = undefined) forEach: function forEach(callbackfn /* , that = undefined */ ) { validate(this, NAME); var f = ctx(callbackfn, arguments.length > 1 ? arguments[1] : undefined, 3); var entry; while (entry = entry ? entry.n : this._f) { f(entry.v, entry.k, this); // revert to the last existing entry while (entry && entry.r) entry = entry.p; } }, // 23.1.3.7 Map.prototype.has(key) // 23.2.3.7 Set.prototype.has(value) has: function has(key) { return !!getEntry(validate(this, NAME), key); } }); if (DESCRIPTORS) dP(C.prototype, 'size', { get: function () { return validate(this, NAME)[SIZE]; } }); return C; }, def: function (that, key, value) { var entry = getEntry(that, key); var prev, index; // change existing entry if (entry) { entry.v = value; // create new entry } else { that._l = entry = { i: index = fastKey(key, true), // <- index k: key, // <- key v: value, // <- value p: prev = that._l, // <- previous entry n: undefined, // <- next entry r: false // <- removed }; if (!that._f) that._f = entry; if (prev) prev.n = entry; that[SIZE]++; // add to index if (index !== 'F') that._i[index] = entry; } return that; }, getEntry: getEntry, setStrong: function (C, NAME, IS_MAP) { // add .keys, .values, .entries, [@@iterator] // 23.1.3.4, 23.1.3.8, 23.1.3.11, 23.1.3.12, 23.2.3.5, 23.2.3.8, 23.2.3.10, 23.2.3.11 $iterDefine(C, NAME, function (iterated, kind) { this._t = validate(iterated, NAME); // target this._k = kind; // kind this._l = undefined; // previous }, function () { var that = this; var kind = that._k; var entry = that._l; // revert to the last existing entry while (entry && entry.r) entry = entry.p; // get next entry if (!that._t || !(that._l = entry = entry ? entry.n : that._t._f)) { // or finish the iteration that._t = undefined; return step(1); } // return step by kind if (kind == 'keys') return step(0, entry.k); if (kind == 'values') return step(0, entry.v); return step(0, [entry.k, entry.v]); }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); // add [@@species], 23.1.2.2, 23.2.2.2 setSpecies(NAME); } }; }, { "122": 122, "14": 14, "31": 31, "35": 35, "44": 44, "60": 60, "62": 62, "69": 69, "73": 73, "74": 74, "92": 92, "96": 96 }], 27: [function (_dereq_, module, exports) { 'use strict'; var redefineAll = _dereq_(92); var getWeak = _dereq_(69).getWeak; var anObject = _dereq_(15); var isObject = _dereq_(56); var anInstance = _dereq_(14); var forOf = _dereq_(44); var createArrayMethod = _dereq_(19); var $has = _dereq_(46); var validate = _dereq_(122); var arrayFind = createArrayMethod(5); var arrayFindIndex = createArrayMethod(6); var id = 0; // fallback for uncaught frozen keys var uncaughtFrozenStore = function (that) { return that._l || (that._l = new UncaughtFrozenStore()); }; var UncaughtFrozenStore = function () { this.a = []; }; var findUncaughtFrozen = function (store, key) { return arrayFind(store.a, function (it) { return it[0] === key; }); }; UncaughtFrozenStore.prototype = { get: function (key) { var entry = findUncaughtFrozen(this, key); if (entry) return entry[1]; }, has: function (key) { return !!findUncaughtFrozen(this, key); }, set: function (key, value) { var entry = findUncaughtFrozen(this, key); if (entry) entry[1] = value; else this.a.push([key, value]); }, 'delete': function (key) { var index = arrayFindIndex(this.a, function (it) { return it[0] === key; }); if (~index) this.a.splice(index, 1); return !!~index; } }; module.exports = { getConstructor: function (wrapper, NAME, IS_MAP, ADDER) { var C = wrapper(function (that, iterable) { anInstance(that, C, NAME, '_i'); that._t = NAME; // collection type that._i = id++; // collection id that._l = undefined; // leak store for uncaught frozen objects if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); }); redefineAll(C.prototype, { // 23.3.3.2 WeakMap.prototype.delete(key) // 23.4.3.3 WeakSet.prototype.delete(value) 'delete': function (key) { if (!isObject(key)) return false; var data = getWeak(key); if (data === true) return uncaughtFrozenStore(validate(this, NAME))['delete'](key); return data && $has(data, this._i) && delete data[this._i]; }, // 23.3.3.4 WeakMap.prototype.has(key) // 23.4.3.4 WeakSet.prototype.has(value) has: function has(key) { if (!isObject(key)) return false; var data = getWeak(key); if (data === true) return uncaughtFrozenStore(validate(this, NAME)).has(key); return data && $has(data, this._i); } }); return C; }, def: function (that, key, value) { var data = getWeak(anObject(key), true); if (data === true) uncaughtFrozenStore(that).set(key, value); else data[that._i] = value; return that; }, ufstore: uncaughtFrozenStore }; }, { "122": 122, "14": 14, "15": 15, "19": 19, "44": 44, "46": 46, "56": 56, "69": 69, "92": 92 }], 28: [function (_dereq_, module, exports) { 'use strict'; var global = _dereq_(45); var $export = _dereq_(39); var redefine = _dereq_(93); var redefineAll = _dereq_(92); var meta = _dereq_(69); var forOf = _dereq_(44); var anInstance = _dereq_(14); var isObject = _dereq_(56); var fails = _dereq_(41); var $iterDetect = _dereq_(61); var setToStringTag = _dereq_(97); var inheritIfRequired = _dereq_(50); module.exports = function (NAME, wrapper, methods, common, IS_MAP, IS_WEAK) { var Base = global[NAME]; var C = Base; var ADDER = IS_MAP ? 'set' : 'add'; var proto = C && C.prototype; var O = {}; var fixMethod = function (KEY) { var fn = proto[KEY]; redefine(proto, KEY, KEY == 'delete' ? function (a) { return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); } : KEY == 'has' ? function has(a) { return IS_WEAK && !isObject(a) ? false : fn.call(this, a === 0 ? 0 : a); } : KEY == 'get' ? function get(a) { return IS_WEAK && !isObject(a) ? undefined : fn.call(this, a === 0 ? 0 : a); } : KEY == 'add' ? function add(a) { fn.call(this, a === 0 ? 0 : a); return this; } : function set(a, b) { fn.call(this, a === 0 ? 0 : a, b); return this; } ); }; if (typeof C != 'function' || !(IS_WEAK || proto.forEach && !fails(function () { new C().entries().next(); }))) { // create collection constructor C = common.getConstructor(wrapper, NAME, IS_MAP, ADDER); redefineAll(C.prototype, methods); meta.NEED = true; } else { var instance = new C(); // early implementations not supports chaining var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); // most early implementations doesn't supports iterables, most modern - not close it correctly var ACCEPT_ITERABLES = $iterDetect(function (iter) { new C(iter); }); // eslint-disable-line no-new // for early implementations -0 and +0 not the same var BUGGY_ZERO = !IS_WEAK && fails(function () { // V8 ~ Chromium 42- fails only with 5+ elements var $instance = new C(); var index = 5; while (index--) $instance[ADDER](index, index); return !$instance.has(-0); }); if (!ACCEPT_ITERABLES) { C = wrapper(function (target, iterable) { anInstance(target, C, NAME); var that = inheritIfRequired(new Base(), target, C); if (iterable != undefined) forOf(iterable, IS_MAP, that[ADDER], that); return that; }); C.prototype = proto; proto.constructor = C; } if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { fixMethod('delete'); fixMethod('has'); IS_MAP && fixMethod('get'); } if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); // weak collections should not contains .clear method if (IS_WEAK && proto.clear) delete proto.clear; } setToStringTag(C, NAME); O[NAME] = C; $export($export.G + $export.W + $export.F * (C != Base), O); if (!IS_WEAK) common.setStrong(C, NAME, IS_MAP); return C; }; }, { "14": 14, "39": 39, "41": 41, "44": 44, "45": 45, "50": 50, "56": 56, "61": 61, "69": 69, "92": 92, "93": 93, "97": 97 }], 29: [function (_dereq_, module, exports) { var core = module.exports = { version: '2.5.7' }; if (typeof __e == 'number') __e = core; // eslint-disable-line no-undef }, {}], 30: [function (_dereq_, module, exports) { 'use strict'; var $defineProperty = _dereq_(74); var createDesc = _dereq_(91); module.exports = function (object, index, value) { if (index in object) $defineProperty.f(object, index, createDesc(0, value)); else object[index] = value; }; }, { "74": 74, "91": 91 }], 31: [function (_dereq_, module, exports) { // optional / simple context binding var aFunction = _dereq_(11); module.exports = function (fn, that, length) { aFunction(fn); if (that === undefined) return fn; switch (length) { case 1: return function (a) { return fn.call(that, a); }; case 2: return function (a, b) { return fn.call(that, a, b); }; case 3: return function (a, b, c) { return fn.call(that, a, b, c); }; } return function ( /* ...args */ ) { return fn.apply(that, arguments); }; }; }, { "11": 11 }], 32: [function (_dereq_, module, exports) { 'use strict'; // 20.3.4.36 / 15.9.5.43 Date.prototype.toISOString() var fails = _dereq_(41); var getTime = Date.prototype.getTime; var $toISOString = Date.prototype.toISOString; var lz = function (num) { return num > 9 ? num : '0' + num; }; // PhantomJS / old WebKit has a broken implementations module.exports = (fails(function () { return $toISOString.call(new Date(-5e13 - 1)) != '0385-07-25T07:06:39.999Z'; }) || !fails(function () { $toISOString.call(new Date(NaN)); })) ? function toISOString() { if (!isFinite(getTime.call(this))) throw RangeError('Invalid time value'); var d = this; var y = d.getUTCFullYear(); var m = d.getUTCMilliseconds(); var 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'; } : $toISOString; }, { "41": 41 }], 33: [function (_dereq_, module, exports) { 'use strict'; var anObject = _dereq_(15); var toPrimitive = _dereq_(116); var NUMBER = 'number'; module.exports = function (hint) { if (hint !== 'string' && hint !== NUMBER && hint !== 'default') throw TypeError('Incorrect hint'); return toPrimitive(anObject(this), hint != NUMBER); }; }, { "116": 116, "15": 15 }], 34: [function (_dereq_, module, exports) { // 7.2.1 RequireObjectCoercible(argument) module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; }, {}], 35: [function (_dereq_, module, exports) { // Thank's IE8 for his funny defineProperty module.exports = !_dereq_(41)(function () { return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7; }); }, { "41": 41 }], 36: [function (_dereq_, module, exports) { var isObject = _dereq_(56); var document = _dereq_(45).document; // typeof document.createElement is 'object' in old IE var is = isObject(document) && isObject(document.createElement); module.exports = function (it) { return is ? document.createElement(it) : {}; }; }, { "45": 45, "56": 56 }], 37: [function (_dereq_, module, exports) { // IE 8- don't enum bug keys module.exports = ( 'constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf' ).split(','); }, {}], 38: [function (_dereq_, module, exports) { // all enumerable object keys, includes symbols var getKeys = _dereq_(82); var gOPS = _dereq_(79); var pIE = _dereq_(83); module.exports = function (it) { var result = getKeys(it); var getSymbols = gOPS.f; if (getSymbols) { var symbols = getSymbols(it); var isEnum = pIE.f; var i = 0; var key; while (symbols.length > i) if (isEnum.call(it, key = symbols[i++])) result.push(key); } return result; }; }, { "79": 79, "82": 82, "83": 83 }], 39: [function (_dereq_, module, exports) { var global = _dereq_(45); var core = _dereq_(29); var hide = _dereq_(47); var redefine = _dereq_(93); var ctx = _dereq_(31); var PROTOTYPE = 'prototype'; var $export = function (type, name, source) { var IS_FORCED = type & $export.F; var IS_GLOBAL = type & $export.G; var IS_STATIC = type & $export.S; var IS_PROTO = type & $export.P; var IS_BIND = type & $export.B; var target = IS_GLOBAL ? global : IS_STATIC ? global[name] || (global[name] = {}) : (global[name] || {})[PROTOTYPE]; var exports = IS_GLOBAL ? core : core[name] || (core[name] = {}); var expProto = exports[PROTOTYPE] || (exports[PROTOTYPE] = {}); var key, own, out, exp; if (IS_GLOBAL) source = name; for (key in source) { // contains in native own = !IS_FORCED && target && target[key] !== undefined; // export native or passed out = (own ? target : source)[key]; // bind timers to global for call from export context exp = IS_BIND && own ? ctx(out, global) : IS_PROTO && typeof out == 'function' ? ctx(Function.call, out) : out; // extend global if (target) redefine(target, key, out, type & $export.U); // export if (exports[key] != out) hide(exports, key, exp); if (IS_PROTO && expProto[key] != out) expProto[key] = out; } }; global.core = core; // type bitmap $export.F = 1; // forced $export.G = 2; // global $export.S = 4; // static $export.P = 8; // proto $export.B = 16; // bind $export.W = 32; // wrap $export.U = 64; // safe $export.R = 128; // real proto method for `library` module.exports = $export; }, { "29": 29, "31": 31, "45": 45, "47": 47, "93": 93 }], 40: [function (_dereq_, module, exports) { var MATCH = _dereq_(125)('match'); module.exports = function (KEY) { var re = /./; try { '/./' [KEY](re); } catch (e) { try { re[MATCH] = false; return !'/./' [KEY](re); } catch (f) { /* empty */ } } return true; }; }, { "125": 125 }], 41: [function (_dereq_, module, exports) { module.exports = function (exec) { try { return !!exec(); } catch (e) { return true; } }; }, {}], 42: [function (_dereq_, module, exports) { 'use strict'; var hide = _dereq_(47); var redefine = _dereq_(93); var fails = _dereq_(41); var defined = _dereq_(34); var wks = _dereq_(125); module.exports = function (KEY, length, exec) { var SYMBOL = wks(KEY); var fns = exec(defined, SYMBOL, '' [KEY]); var strfn = fns[0]; var rxfn = fns[1]; if (fails(function () { var O = {}; O[SYMBOL] = function () { return 7; }; return '' [KEY](O) != 7; })) { redefine(String.prototype, KEY, strfn); hide(RegExp.prototype, SYMBOL, length == 2 // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue) // 21.2.5.11 RegExp.prototype[@@split](string, limit) ? function (string, arg) { return rxfn.call(string, this, arg); } // 21.2.5.6 RegExp.prototype[@@match](string) // 21.2.5.9 RegExp.prototype[@@search](string) : function (string) { return rxfn.call(string, this); } ); } }; }, { "125": 125, "34": 34, "41": 41, "47": 47, "93": 93 }], 43: [function (_dereq_, module, exports) { 'use strict'; // 21.2.5.3 get RegExp.prototype.flags var anObject = _dereq_(15); module.exports = function () { var that = anObject(this); var result = ''; if (that.global) result += 'g'; if (that.ignoreCase) result += 'i'; if (that.multiline) result += 'm'; if (that.unicode) result += 'u'; if (that.sticky) result += 'y'; return result; }; }, { "15": 15 }], 44: [function (_dereq_, module, exports) { var ctx = _dereq_(31); var call = _dereq_(58); var isArrayIter = _dereq_(53); var anObject = _dereq_(15); var toLength = _dereq_(114); var getIterFn = _dereq_(126); var BREAK = {}; var RETURN = {}; var exports = module.exports = function (iterable, entries, fn, that, ITERATOR) { var iterFn = ITERATOR ? function () { return iterable; } : getIterFn(iterable); var f = ctx(fn, that, entries ? 2 : 1); var index = 0; var length, step, iterator, result; if (typeof iterFn != 'function') throw TypeError(iterable + ' is not iterable!'); // fast case for arrays with default iterator if (isArrayIter(iterFn)) for (length = toLength(iterable.length); length > index; index++) { result = entries ? f(anObject(step = iterable[index])[0], step[1]) : f(iterable[index]); if (result === BREAK || result === RETURN) return result; } else for (iterator = iterFn.call(iterable); !(step = iterator.next()).done;) { result = call(iterator, f, step.value, entries); if (result === BREAK || result === RETURN) return result; } }; exports.BREAK = BREAK; exports.RETURN = RETURN; }, { "114": 114, "126": 126, "15": 15, "31": 31, "53": 53, "58": 58 }], 45: [function (_dereq_, module, exports) { // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self // eslint-disable-next-line no-new-func : Function('return this')(); if (typeof __g == 'number') __g = global; // eslint-disable-line no-undef }, {}], 46: [function (_dereq_, module, exports) { var hasOwnProperty = {}.hasOwnProperty; module.exports = function (it, key) { return hasOwnProperty.call(it, key); }; }, {}], 47: [function (_dereq_, module, exports) { var dP = _dereq_(74); var createDesc = _dereq_(91); module.exports = _dereq_(35) ? function (object, key, value) { return dP.f(object, key, createDesc(1, value)); } : function (object, key, value) { object[key] = value; return object; }; }, { "35": 35, "74": 74, "91": 91 }], 48: [function (_dereq_, module, exports) { var document = _dereq_(45).document; module.exports = document && document.documentElement; }, { "45": 45 }], 49: [function (_dereq_, module, exports) { module.exports = !_dereq_(35) && !_dereq_(41)(function () { return Object.defineProperty(_dereq_(36)('div'), 'a', { get: function () { return 7; } }).a != 7; }); }, { "35": 35, "36": 36, "41": 41 }], 50: [function (_dereq_, module, exports) { var isObject = _dereq_(56); var setPrototypeOf = _dereq_(95).set; module.exports = function (that, target, C) { var S = target.constructor; var P; if (S !== C && typeof S == 'function' && (P = S.prototype) !== C.prototype && isObject(P) && setPrototypeOf) { setPrototypeOf(that, P); } return that; }; }, { "56": 56, "95": 95 }], 51: [function (_dereq_, module, exports) { // fast apply, http://jsperf.lnkit.com/fast-apply/5 module.exports = function (fn, args, that) { var un = that === undefined; switch (args.length) { case 0: return un ? fn() : fn.call(that); case 1: return un ? fn(args[0]) : fn.call(that, args[0]); case 2: return un ? fn(args[0], args[1]) : fn.call(that, args[0], args[1]); case 3: return un ? fn(args[0], args[1], args[2]) : fn.call(that, args[0], args[1], args[2]); case 4: return un ? fn(args[0], args[1], args[2], args[3]) : fn.call(that, args[0], args[1], args[2], args[3]); } return fn.apply(that, args); }; }, {}], 52: [function (_dereq_, module, exports) { // fallback for non-array-like ES3 and non-enumerable old V8 strings var cof = _dereq_(25); // eslint-disable-next-line no-prototype-builtins module.exports = Object('z').propertyIsEnumerable(0) ? Object : function (it) { return cof(it) == 'String' ? it.split('') : Object(it); }; }, { "25": 25 }], 53: [function (_dereq_, module, exports) { // check on default Array iterator var Iterators = _dereq_(63); var ITERATOR = _dereq_(125)('iterator'); var ArrayProto = Array.prototype; module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it); }; }, { "125": 125, "63": 63 }], 54: [function (_dereq_, module, exports) { // 7.2.2 IsArray(argument) var cof = _dereq_(25); module.exports = Array.isArray || function isArray(arg) { return cof(arg) == 'Array'; }; }, { "25": 25 }], 55: [function (_dereq_, module, exports) { // 20.1.2.3 Number.isInteger(number) var isObject = _dereq_(56); var floor = Math.floor; module.exports = function isInteger(it) { return !isObject(it) && isFinite(it) && floor(it) === it; }; }, { "56": 56 }], 56: [function (_dereq_, module, exports) { module.exports = function (it) { return typeof it === 'object' ? it !== null : typeof it === 'function'; }; }, {}], 57: [function (_dereq_, module, exports) { // 7.2.8 IsRegExp(argument) var isObject = _dereq_(56); var cof = _dereq_(25); var MATCH = _dereq_(125)('match'); module.exports = function (it) { var isRegExp; return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : cof(it) == 'RegExp'); }; }, { "125": 125, "25": 25, "56": 56 }], 58: [function (_dereq_, module, exports) { // call something on iterator step with safe closing on error var anObject = _dereq_(15); module.exports = function (iterator, fn, value, entries) { try { return entries ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion) } catch (e) { var ret = iterator['return']; if (ret !== undefined) anObject(ret.call(iterator)); throw e; } }; }, { "15": 15 }], 59: [function (_dereq_, module, exports) { 'use strict'; var create = _dereq_(73); var descriptor = _dereq_(91); var setToStringTag = _dereq_(97); var IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]() _dereq_(47)(IteratorPrototype, _dereq_(125)('iterator'), function () { return this; }); module.exports = function (Constructor, NAME, next) { Constructor.prototype = create(IteratorPrototype, { next: descriptor(1, next) }); setToStringTag(Constructor, NAME + ' Iterator'); }; }, { "125": 125, "47": 47, "73": 73, "91": 91, "97": 97 }], 60: [function (_dereq_, module, exports) { 'use strict'; var LIBRARY = _dereq_(64); var $export = _dereq_(39); var redefine = _dereq_(93); var hide = _dereq_(47); var Iterators = _dereq_(63); var $iterCreate = _dereq_(59); var setToStringTag = _dereq_(97); var getPrototypeOf = _dereq_(80); var ITERATOR = _dereq_(125)('iterator'); var BUGGY = !([].keys && 'next' in [].keys()); // Safari has buggy iterators w/o `next` var FF_ITERATOR = '@@iterator'; var KEYS = 'keys'; var VALUES = 'values'; var returnThis = function () { return this; }; module.exports = function (Base, NAME, Constructor, next, DEFAULT, IS_SET, FORCED) { $iterCreate(Constructor, NAME, next); var getMethod = function (kind) { if (!BUGGY && kind in proto) return proto[kind]; switch (kind) { case KEYS: return function keys() { return new Constructor(this, kind); }; case VALUES: return function values() { return new Constructor(this, kind); }; } return function entries() { return new Constructor(this, kind); }; }; var TAG = NAME + ' Iterator'; var DEF_VALUES = DEFAULT == VALUES; var VALUES_BUG = false; var proto = Base.prototype; var $native = proto[ITERATOR] || proto[FF_ITERATOR] || DEFAULT && proto[DEFAULT]; var $default = $native || getMethod(DEFAULT); var $entries = DEFAULT ? !DEF_VALUES ? $default : getMethod('entries') : undefined; var $anyNative = NAME == 'Array' ? proto.entries || $native : $native; var methods, key, IteratorPrototype; // Fix