|
|
/* Disable minification (remove `.min` from URL path) for more info */
|
|
|
|
|
|
(function(undefined) {
|
|
|
if (
|
|
|
!(
|
|
|
// In IE8, defineProperty could only act on DOM elements, so full support
|
|
|
// for the feature requires the ability to set a property on an arbitrary object
|
|
|
(
|
|
|
'defineProperty' in Object &&
|
|
|
(function() {
|
|
|
try {
|
|
|
var a = {};
|
|
|
Object.defineProperty(a, 'test', { value: 42 });
|
|
|
return true;
|
|
|
} catch (e) {
|
|
|
return false;
|
|
|
}
|
|
|
})()
|
|
|
)
|
|
|
)
|
|
|
) {
|
|
|
!(function(e) {
|
|
|
var t = Object.prototype.hasOwnProperty('__defineGetter__'),
|
|
|
r = 'A property cannot both have accessors and be writable or have a value';
|
|
|
Object.defineProperty = function(n, o, i) {
|
|
|
if (
|
|
|
e &&
|
|
|
(n === window || n === document || n === Element.prototype || n instanceof Element)
|
|
|
)
|
|
|
return e(n, o, i);
|
|
|
if (null === n || !(n instanceof Object || 'object' == typeof n))
|
|
|
throw new TypeError('Object.defineProperty called on non-object');
|
|
|
if (!(i instanceof Object)) throw new TypeError('Property description must be an object');
|
|
|
var c = String(o),
|
|
|
a = 'value' in i || 'writable' in i,
|
|
|
f = 'get' in i && typeof i.get,
|
|
|
p = 'set' in i && typeof i.set;
|
|
|
if (f) {
|
|
|
if ('function' !== f) throw new TypeError('Getter must be a function');
|
|
|
if (!t)
|
|
|
throw new TypeError('Getters & setters cannot be defined on this javascript engine');
|
|
|
if (a) throw new TypeError(r);
|
|
|
Object.__defineGetter__.call(n, c, i.get);
|
|
|
} else n[c] = i.value;
|
|
|
if (p) {
|
|
|
if ('function' !== p) throw new TypeError('Setter must be a function');
|
|
|
if (!t)
|
|
|
throw new TypeError('Getters & setters cannot be defined on this javascript engine');
|
|
|
if (a) throw new TypeError(r);
|
|
|
Object.__defineSetter__.call(n, c, i.set);
|
|
|
}
|
|
|
return 'value' in i && (n[c] = i.value), n;
|
|
|
};
|
|
|
})(Object.defineProperty);
|
|
|
}
|
|
|
if (!('isArray' in Array)) {
|
|
|
!(function(r) {
|
|
|
Object.defineProperty(Array, 'isArray', {
|
|
|
configurable: !0,
|
|
|
value: function(t) {
|
|
|
return '[object Array]' === r.call(t);
|
|
|
},
|
|
|
writable: !0,
|
|
|
});
|
|
|
})(Object.prototype.toString);
|
|
|
}
|
|
|
if (!('indexOf' in Array.prototype)) {
|
|
|
Array.prototype.indexOf = function(t) {
|
|
|
if (this === undefined || null === this) throw new TypeError(this + ' is not an object');
|
|
|
var i = this instanceof String ? this.split('') : this,
|
|
|
n = Math.max(Math.min(i.length, 9007199254740991), 0) || 0,
|
|
|
r = Number(arguments[1]) || 0;
|
|
|
for (r = (r < 0 ? Math.max(n + r, 0) : r) - 1; ++r < n; ) if (r in i && i[r] === t) return r;
|
|
|
return -1;
|
|
|
};
|
|
|
}
|
|
|
if (!('forEach' in Array.prototype)) {
|
|
|
Array.prototype.forEach = function(t) {
|
|
|
if (this === undefined || null === this) throw new TypeError(this + ' is not an object');
|
|
|
if ('function' != typeof t) throw new TypeError(t + ' is not a function');
|
|
|
for (
|
|
|
var n = Object(this),
|
|
|
i = arguments[1],
|
|
|
o = n instanceof String ? n.split('') : n,
|
|
|
r = Math.max(Math.min(o.length, 9007199254740991), 0) || 0,
|
|
|
e = -1;
|
|
|
++e < r;
|
|
|
|
|
|
)
|
|
|
e in o && t.call(i, o[e], e, n);
|
|
|
};
|
|
|
}
|
|
|
if (!('filter' in Array.prototype)) {
|
|
|
Array.prototype.filter = function(t) {
|
|
|
if (this === undefined || null === this) throw new TypeError(this + ' is not an object');
|
|
|
if ('function' != typeof t) throw new TypeError(t + ' is not a function');
|
|
|
for (
|
|
|
var n,
|
|
|
i = Object(this),
|
|
|
r = arguments[1],
|
|
|
o = i instanceof String ? i.split('') : i,
|
|
|
e = Math.max(Math.min(o.length, 9007199254740991), 0) || 0,
|
|
|
f = -1,
|
|
|
h = [];
|
|
|
++f < e;
|
|
|
|
|
|
)
|
|
|
(n = o[f]), f in o && t.call(r, n, f, i) && h.push(n);
|
|
|
return h;
|
|
|
};
|
|
|
}
|
|
|
if (!('map' in Array.prototype)) {
|
|
|
Array.prototype.map = function(t) {
|
|
|
if (this === undefined || null === this) throw new TypeError(this + ' is not an object');
|
|
|
if ('function' != typeof t) throw new TypeError(t + ' is not a function');
|
|
|
for (
|
|
|
var n = Object(this),
|
|
|
i = arguments[1],
|
|
|
r = n instanceof String ? n.split('') : n,
|
|
|
o = Math.max(Math.min(r.length, 9007199254740991), 0) || 0,
|
|
|
e = -1,
|
|
|
a = [];
|
|
|
++e < o;
|
|
|
|
|
|
)
|
|
|
e in r && (a[e] = t.call(i, r[e], e, n));
|
|
|
return a;
|
|
|
};
|
|
|
}
|
|
|
if (!('defineProperties' in Object)) {
|
|
|
Object.defineProperties = function(e, r) {
|
|
|
for (var n in r) r.hasOwnProperty(n) && Object.defineProperty(e, n, r[n]);
|
|
|
return e;
|
|
|
};
|
|
|
}
|
|
|
if (!('create' in Object)) {
|
|
|
!(function() {
|
|
|
function t(t) {
|
|
|
return null == t || ('object' != typeof t && 'function' != typeof t);
|
|
|
}
|
|
|
Object.create = function(e, n) {
|
|
|
if (null !== e && t(e))
|
|
|
throw new TypeError('Object prototype may only be an Object or null');
|
|
|
var o = new Function('e', 'function Object() {}Object.prototype=e;return new Object')(e);
|
|
|
return (o.constructor.prototype = e), 1 in arguments && Object.defineProperties(o, n), o;
|
|
|
};
|
|
|
})();
|
|
|
}
|
|
|
if (!('getOwnPropertyNames' in Object)) {
|
|
|
Object.getOwnPropertyNames = function(e) {
|
|
|
var r,
|
|
|
n = [],
|
|
|
t = ['length', 'name', 'arguments', 'caller', 'prototype', 'observe', 'unobserve'];
|
|
|
if (void 0 === e || null === e)
|
|
|
throw new TypeError('Cannot convert undefined or null to object');
|
|
|
e = Object(e);
|
|
|
for (r in e) Object.prototype.hasOwnProperty.call(e, r) && n.push(r);
|
|
|
for (var o = 0, l = t.length; o < l; o++) t[o] in e && n.push(t[o]);
|
|
|
return n;
|
|
|
};
|
|
|
}
|
|
|
if (!('bind' in Function.prototype)) {
|
|
|
Object.defineProperty(Function.prototype, 'bind', {
|
|
|
value: function(t) {
|
|
|
var n,
|
|
|
o = Array,
|
|
|
r = Object,
|
|
|
e = r.prototype,
|
|
|
i = o.prototype,
|
|
|
c = function() {},
|
|
|
p = e.toString,
|
|
|
l = 'function' == typeof Symbol && 'symbol' == typeof Symbol.toStringTag,
|
|
|
a = Function.prototype.toString,
|
|
|
u = function(t) {
|
|
|
try {
|
|
|
return a.call(t), !0;
|
|
|
} catch (n) {
|
|
|
return !1;
|
|
|
}
|
|
|
};
|
|
|
n = function(t) {
|
|
|
if ('function' != typeof t) return !1;
|
|
|
if (l) return u(t);
|
|
|
var n = p.call(t);
|
|
|
return '[object Function]' === n || '[object GeneratorFunction]' === n;
|
|
|
};
|
|
|
var y = i.slice,
|
|
|
f = i.concat,
|
|
|
b = i.push,
|
|
|
h = Math.max,
|
|
|
s = this;
|
|
|
if (!n(s)) throw new TypeError('Function.prototype.bind called on incompatible ' + s);
|
|
|
for (
|
|
|
var g,
|
|
|
d = y.call(arguments, 1),
|
|
|
m = function() {
|
|
|
if (this instanceof g) {
|
|
|
var n = s.apply(this, f.call(d, y.call(arguments)));
|
|
|
return r(n) === n ? n : this;
|
|
|
}
|
|
|
return s.apply(t, f.call(d, y.call(arguments)));
|
|
|
},
|
|
|
v = h(0, s.length - d.length),
|
|
|
F = [],
|
|
|
j = 0;
|
|
|
j < v;
|
|
|
j++
|
|
|
)
|
|
|
b.call(F, '$' + j);
|
|
|
return (
|
|
|
(g = Function(
|
|
|
'binder',
|
|
|
'return function (' + F.join(',') + '){ return binder.apply(this, arguments); }',
|
|
|
)(m)),
|
|
|
s.prototype &&
|
|
|
((c.prototype = s.prototype), (g.prototype = new c()), (c.prototype = null)),
|
|
|
g
|
|
|
);
|
|
|
},
|
|
|
});
|
|
|
}
|
|
|
if (
|
|
|
!(
|
|
|
'getOwnPropertyDescriptor' in Object &&
|
|
|
typeof Object.getOwnPropertyDescriptor === 'function' &&
|
|
|
(function() {
|
|
|
try {
|
|
|
var object = {};
|
|
|
object.test = 0;
|
|
|
return Object.getOwnPropertyDescriptor(object, 'test').value === 0;
|
|
|
} catch (exception) {
|
|
|
return false;
|
|
|
}
|
|
|
})()
|
|
|
)
|
|
|
) {
|
|
|
!(function() {
|
|
|
function e(e) {
|
|
|
try {
|
|
|
return (e.sentinel = 0), 0 === Object.getOwnPropertyDescriptor(e, 'sentinel').value;
|
|
|
} catch (t) {}
|
|
|
}
|
|
|
var t,
|
|
|
r,
|
|
|
o,
|
|
|
n = Function.prototype.call,
|
|
|
c = Object.prototype,
|
|
|
i = n.bind(c.hasOwnProperty);
|
|
|
if (
|
|
|
((o = i(c, '__defineGetter__')) &&
|
|
|
((t = n.bind(c.__lookupGetter__)), (r = n.bind(c.__lookupSetter__))),
|
|
|
Object.defineProperty)
|
|
|
) {
|
|
|
var p = e({});
|
|
|
if (!('undefined' == typeof document || e(document.createElement('div'))) || !p)
|
|
|
var _ = Object.getOwnPropertyDescriptor;
|
|
|
}
|
|
|
if (!Object.getOwnPropertyDescriptor || _) {
|
|
|
Object.getOwnPropertyDescriptor = function(e, n) {
|
|
|
if (('object' != typeof e && 'function' != typeof e) || null === e)
|
|
|
throw new TypeError('Object.getOwnPropertyDescriptor called on a non-object: ' + e);
|
|
|
if (_)
|
|
|
try {
|
|
|
return _.call(Object, e, n);
|
|
|
} catch (l) {}
|
|
|
if (i(e, n)) {
|
|
|
var p = { enumerable: !0, configurable: !0 };
|
|
|
if (o) {
|
|
|
var a = e.__proto__;
|
|
|
e.__proto__ = c;
|
|
|
var f = t(e, n),
|
|
|
u = r(e, n);
|
|
|
if (((e.__proto__ = a), f || u)) return f && (p.get = f), u && (p.set = u), p;
|
|
|
}
|
|
|
return (p.value = e[n]), (p.writable = !0), p;
|
|
|
}
|
|
|
};
|
|
|
}
|
|
|
})();
|
|
|
}
|
|
|
if (!('freeze' in Object)) {
|
|
|
Object.freeze = function(e) {
|
|
|
return e;
|
|
|
};
|
|
|
}
|
|
|
if (
|
|
|
!(
|
|
|
'keys' in Object &&
|
|
|
(function() {
|
|
|
// Safari 5.0 bug where Object.keys doesn't work with arguments
|
|
|
return Object.keys(arguments).length === 2;
|
|
|
})(1, 2) &&
|
|
|
(function() {
|
|
|
try {
|
|
|
// In ES6 Object.keys works on all object except `null` and `undefined`.
|
|
|
Object.keys('');
|
|
|
return true;
|
|
|
} catch (e) {
|
|
|
return false;
|
|
|
}
|
|
|
})()
|
|
|
)
|
|
|
) {
|
|
|
Object.keys = (function() {
|
|
|
'use strict';
|
|
|
function t(t) {
|
|
|
var e = r.call(t),
|
|
|
n = '[object Arguments]' === e;
|
|
|
return (
|
|
|
n ||
|
|
|
(n =
|
|
|
'[object Array]' !== e &&
|
|
|
null !== t &&
|
|
|
'object' == typeof t &&
|
|
|
'number' == typeof t.length &&
|
|
|
t.length >= 0 &&
|
|
|
'[object Function]' === r.call(t.callee)),
|
|
|
n
|
|
|
);
|
|
|
}
|
|
|
var e = Object.prototype.hasOwnProperty,
|
|
|
r = Object.prototype.toString,
|
|
|
n = Object.prototype.propertyIsEnumerable,
|
|
|
o = !n.call({ toString: null }, 'toString'),
|
|
|
l = n.call(function() {}, 'prototype'),
|
|
|
c = [
|
|
|
'toString',
|
|
|
'toLocaleString',
|
|
|
'valueOf',
|
|
|
'hasOwnProperty',
|
|
|
'isPrototypeOf',
|
|
|
'propertyIsEnumerable',
|
|
|
'constructor',
|
|
|
],
|
|
|
i = function(t) {
|
|
|
var e = t.constructor;
|
|
|
return e && e.prototype === t;
|
|
|
},
|
|
|
u = {
|
|
|
$console: !0,
|
|
|
$external: !0,
|
|
|
$frame: !0,
|
|
|
$frameElement: !0,
|
|
|
$frames: !0,
|
|
|
$innerHeight: !0,
|
|
|
$innerWidth: !0,
|
|
|
$outerHeight: !0,
|
|
|
$outerWidth: !0,
|
|
|
$pageXOffset: !0,
|
|
|
$pageYOffset: !0,
|
|
|
$parent: !0,
|
|
|
$scrollLeft: !0,
|
|
|
$scrollTop: !0,
|
|
|
$scrollX: !0,
|
|
|
$scrollY: !0,
|
|
|
$self: !0,
|
|
|
$webkitIndexedDB: !0,
|
|
|
$webkitStorageInfo: !0,
|
|
|
$window: !0,
|
|
|
},
|
|
|
a = (function() {
|
|
|
if ('undefined' == typeof window) return !1;
|
|
|
for (var t in window)
|
|
|
try {
|
|
|
if (
|
|
|
!u['$' + t] &&
|
|
|
e.call(window, t) &&
|
|
|
null !== window[t] &&
|
|
|
'object' == typeof window[t]
|
|
|
)
|
|
|
try {
|
|
|
i(window[t]);
|
|
|
} catch (r) {
|
|
|
return !0;
|
|
|
}
|
|
|
} catch (r) {
|
|
|
return !0;
|
|
|
}
|
|
|
return !1;
|
|
|
})(),
|
|
|
f = function(t) {
|
|
|
if ('undefined' == typeof window || !a) return i(t);
|
|
|
try {
|
|
|
return i(t);
|
|
|
} catch (e) {
|
|
|
return !1;
|
|
|
}
|
|
|
};
|
|
|
return function(n) {
|
|
|
var i = '[object Function]' === r.call(n),
|
|
|
u = t(n),
|
|
|
a = '[object String]' === r.call(n),
|
|
|
p = [];
|
|
|
if (n === undefined || null === n)
|
|
|
throw new TypeError('Cannot convert undefined or null to object');
|
|
|
var s = l && i;
|
|
|
if (a && n.length > 0 && !e.call(n, 0))
|
|
|
for (var g = 0; g < n.length; ++g) p.push(String(g));
|
|
|
if (u && n.length > 0) for (var w = 0; w < n.length; ++w) p.push(String(w));
|
|
|
else for (var y in n) (s && 'prototype' === y) || !e.call(n, y) || p.push(String(y));
|
|
|
if (o)
|
|
|
for (var h = f(n), $ = 0; $ < c.length; ++$)
|
|
|
(h && 'constructor' === c[$]) || !e.call(n, c[$]) || p.push(c[$]);
|
|
|
return p;
|
|
|
};
|
|
|
})();
|
|
|
}
|
|
|
if (!('Symbol' in this)) {
|
|
|
!(function(e, n, t) {
|
|
|
var r,
|
|
|
o = 0,
|
|
|
u = '' + Math.random(),
|
|
|
a = '__symbol:',
|
|
|
c = a.length,
|
|
|
l = '__symbol@@' + u,
|
|
|
i = 'defineProperty',
|
|
|
f = 'defineProperties',
|
|
|
v = 'getOwnPropertyNames',
|
|
|
s = 'getOwnPropertyDescriptor',
|
|
|
b = 'propertyIsEnumerable',
|
|
|
y = e.prototype,
|
|
|
h = y.hasOwnProperty,
|
|
|
m = y[b],
|
|
|
p = y.toString,
|
|
|
w = Array.prototype.concat,
|
|
|
g = 'object' == typeof window ? e.getOwnPropertyNames(window) : [],
|
|
|
d = e[v],
|
|
|
P = function(e) {
|
|
|
if ('[object Window]' === p.call(e))
|
|
|
try {
|
|
|
return d(e);
|
|
|
} catch (n) {
|
|
|
return w.call([], g);
|
|
|
}
|
|
|
return d(e);
|
|
|
},
|
|
|
S = e[s],
|
|
|
O = e.create,
|
|
|
j = e.keys,
|
|
|
E = e.freeze || e,
|
|
|
_ = e[i],
|
|
|
k = e[f],
|
|
|
N = S(e, v),
|
|
|
T = function(e, n, t) {
|
|
|
if (!h.call(e, l))
|
|
|
try {
|
|
|
_(e, l, { enumerable: !1, configurable: !1, writable: !1, value: {} });
|
|
|
} catch (r) {
|
|
|
e[l] = {};
|
|
|
}
|
|
|
e[l]['@@' + n] = t;
|
|
|
},
|
|
|
z = function(e, n) {
|
|
|
var t = O(e);
|
|
|
return (
|
|
|
P(n).forEach(function(e) {
|
|
|
M.call(n, e) && G(t, e, n[e]);
|
|
|
}),
|
|
|
t
|
|
|
);
|
|
|
},
|
|
|
A = function(e) {
|
|
|
var n = O(e);
|
|
|
return (n.enumerable = !1), n;
|
|
|
},
|
|
|
D = function() {},
|
|
|
F = function(e) {
|
|
|
return e != l && !h.call(x, e);
|
|
|
},
|
|
|
I = function(e) {
|
|
|
return e != l && h.call(x, e);
|
|
|
},
|
|
|
M = function(e) {
|
|
|
var n = '' + e;
|
|
|
return I(n) ? h.call(this, n) && this[l]['@@' + n] : m.call(this, e);
|
|
|
},
|
|
|
W = function(n) {
|
|
|
var t = {
|
|
|
enumerable: !1,
|
|
|
configurable: !0,
|
|
|
get: D,
|
|
|
set: function(e) {
|
|
|
r(this, n, { enumerable: !1, configurable: !0, writable: !0, value: e }),
|
|
|
T(this, n, !0);
|
|
|
},
|
|
|
};
|
|
|
try {
|
|
|
_(y, n, t);
|
|
|
} catch (o) {
|
|
|
y[n] = t.value;
|
|
|
}
|
|
|
return E((x[n] = _(e(n), 'constructor', B)));
|
|
|
},
|
|
|
q = function K(e) {
|
|
|
if (this instanceof K) throw new TypeError('Symbol is not a constructor');
|
|
|
return W(a.concat(e || '', u, ++o));
|
|
|
},
|
|
|
x = O(null),
|
|
|
B = { value: q },
|
|
|
C = function(e) {
|
|
|
return x[e];
|
|
|
},
|
|
|
G = function(e, n, t) {
|
|
|
var o = '' + n;
|
|
|
return I(o) ? (r(e, o, t.enumerable ? A(t) : t), T(e, o, !!t.enumerable)) : _(e, n, t), e;
|
|
|
},
|
|
|
H = function(e) {
|
|
|
return function(n) {
|
|
|
return h.call(e, l) && h.call(e[l], '@@' + n);
|
|
|
};
|
|
|
},
|
|
|
J = function(e) {
|
|
|
return P(e)
|
|
|
.filter(e === y ? H(e) : I)
|
|
|
.map(C);
|
|
|
};
|
|
|
(N.value = G),
|
|
|
_(e, i, N),
|
|
|
(N.value = J),
|
|
|
_(e, 'getOwnPropertySymbols', N),
|
|
|
(N.value = function(e) {
|
|
|
return P(e).filter(F);
|
|
|
}),
|
|
|
_(e, v, N),
|
|
|
(N.value = function(e, n) {
|
|
|
var t = J(n);
|
|
|
return (
|
|
|
t.length
|
|
|
? j(n)
|
|
|
.concat(t)
|
|
|
.forEach(function(t) {
|
|
|
M.call(n, t) && G(e, t, n[t]);
|
|
|
})
|
|
|
: k(e, n),
|
|
|
e
|
|
|
);
|
|
|
}),
|
|
|
_(e, f, N),
|
|
|
(N.value = M),
|
|
|
_(y, b, N),
|
|
|
(N.value = q),
|
|
|
_(t, 'Symbol', N),
|
|
|
(N.value = function(e) {
|
|
|
var n = a.concat(a, e, u);
|
|
|
return n in y ? x[n] : W(n);
|
|
|
}),
|
|
|
_(q, 'for', N),
|
|
|
(N.value = function(e) {
|
|
|
if (F(e)) throw new TypeError(e + ' is not a symbol');
|
|
|
return h.call(x, e) ? e.slice(2 * c, -u.length) : void 0;
|
|
|
}),
|
|
|
_(q, 'keyFor', N),
|
|
|
(N.value = function(e, n) {
|
|
|
var t = S(e, n);
|
|
|
return t && I(n) && (t.enumerable = M.call(e, n)), t;
|
|
|
}),
|
|
|
_(e, s, N),
|
|
|
(N.value = function(e, n) {
|
|
|
return 1 === arguments.length || void 0 === n ? O(e) : z(e, n);
|
|
|
}),
|
|
|
_(e, 'create', N),
|
|
|
(N.value = function() {
|
|
|
var e = p.call(this);
|
|
|
return '[object String]' === e && I(this) ? '[object Symbol]' : e;
|
|
|
}),
|
|
|
_(y, 'toString', N),
|
|
|
(r = function(e, n, t) {
|
|
|
var r = S(y, n);
|
|
|
delete y[n], _(e, n, t), e !== y && _(y, n, r);
|
|
|
});
|
|
|
})(Object, 0, this);
|
|
|
}
|
|
|
if (!('Symbol' in this && 'iterator' in this.Symbol)) {
|
|
|
Object.defineProperty(Symbol, 'iterator', { value: Symbol('iterator') });
|
|
|
}
|
|
|
if (!('Symbol' in this && 'species' in this.Symbol)) {
|
|
|
Object.defineProperty(Symbol, 'species', { value: Symbol('species') });
|
|
|
}
|
|
|
if (!('getPrototypeOf' in Object)) {
|
|
|
Object.getPrototypeOf = function(t) {
|
|
|
if (t !== Object(t)) throw new TypeError('Object.getPrototypeOf called on non-object');
|
|
|
var o = t.__proto__;
|
|
|
return o || null === o
|
|
|
? o
|
|
|
: 'function' == typeof t.constructor && t instanceof t.constructor
|
|
|
? t.constructor.prototype
|
|
|
: t instanceof Object
|
|
|
? Object.prototype
|
|
|
: null;
|
|
|
};
|
|
|
}
|
|
|
if (!('isNaN' in Number)) {
|
|
|
Number.isNaN =
|
|
|
Number.isNaN ||
|
|
|
function(N) {
|
|
|
return 'number' == typeof N && isNaN(N);
|
|
|
};
|
|
|
}
|
|
|
if (
|
|
|
!(
|
|
|
'Map' in this &&
|
|
|
(function() {
|
|
|
try {
|
|
|
return (
|
|
|
new Map([
|
|
|
[1, 1],
|
|
|
[2, 2],
|
|
|
]).size === 2
|
|
|
);
|
|
|
} catch (e) {
|
|
|
return false;
|
|
|
}
|
|
|
})()
|
|
|
)
|
|
|
) {
|
|
|
!(function(e) {
|
|
|
function t(e, t) {
|
|
|
var r = e[t];
|
|
|
if (null === r || r === undefined) return undefined;
|
|
|
if ('function' != typeof r) throw new TypeError('Method not callable: ' + t);
|
|
|
return r;
|
|
|
}
|
|
|
function r(e) {
|
|
|
if (!(1 in arguments)) var r = t(e, Symbol.iterator);
|
|
|
var o = r.call(e);
|
|
|
if ('object' != typeof o) throw new TypeError('bad iterator');
|
|
|
var n = o.next,
|
|
|
a = Object.create(null);
|
|
|
return (a['[[Iterator]]'] = o), (a['[[NextMethod]]'] = n), (a['[[Done]]'] = !1), a;
|
|
|
}
|
|
|
function o(e) {
|
|
|
if (1 in arguments) var t = e['[[NextMethod]]'].call(e['[[Iterator]]'], arguments[1]);
|
|
|
else var t = e['[[NextMethod]]'].call(e['[[Iterator]]']);
|
|
|
if ('object' != typeof t) throw new TypeError('bad iterator');
|
|
|
return t;
|
|
|
}
|
|
|
function n(e) {
|
|
|
if ('object' != typeof e)
|
|
|
throw new Error(Object.prototype.toString.call(e) + 'is not an Object.');
|
|
|
return Boolean(e.done);
|
|
|
}
|
|
|
function a(e) {
|
|
|
if ('object' != typeof e)
|
|
|
throw new Error(Object.prototype.toString.call(e) + 'is not an Object.');
|
|
|
return e.value;
|
|
|
}
|
|
|
function i(e) {
|
|
|
var t = o(e);
|
|
|
return !0 !== n(t) && t;
|
|
|
}
|
|
|
function l(e, r) {
|
|
|
if ('object' != typeof e['[[Iterator]]'])
|
|
|
throw new Error(Object.prototype.toString.call(e['[[Iterator]]']) + 'is not an Object.');
|
|
|
var o = e['[[Iterator]]'],
|
|
|
n = t(o, 'return');
|
|
|
if (n === undefined) return r;
|
|
|
try {
|
|
|
var a = n.call(o);
|
|
|
} catch (l) {
|
|
|
var i = l;
|
|
|
}
|
|
|
if (r) return r;
|
|
|
if (i) throw i;
|
|
|
if ('object' == typeof a)
|
|
|
throw new TypeError("Iterator's return method returned a non-object.");
|
|
|
return r;
|
|
|
}
|
|
|
function c(e, t) {
|
|
|
if ('boolean' != typeof t) throw new Error();
|
|
|
var r = {};
|
|
|
return (r.value = e), (r.done = t), r;
|
|
|
}
|
|
|
function p(e, t) {
|
|
|
if ('object' != typeof e)
|
|
|
throw new TypeError(
|
|
|
'createMapIterator called on incompatible receiver ' +
|
|
|
Object.prototype.toString.call(e),
|
|
|
);
|
|
|
if (!0 !== e._es6Map)
|
|
|
throw new TypeError(
|
|
|
'createMapIterator called on incompatible receiver ' +
|
|
|
Object.prototype.toString.call(e),
|
|
|
);
|
|
|
var r = Object.create(v);
|
|
|
return (
|
|
|
Object.defineProperty(r, '[[Map]]', {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
writable: !0,
|
|
|
value: e,
|
|
|
}),
|
|
|
Object.defineProperty(r, '[[MapNextIndex]]', {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
writable: !0,
|
|
|
value: 0,
|
|
|
}),
|
|
|
Object.defineProperty(r, '[[MapIterationKind]]', {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
writable: !0,
|
|
|
value: t,
|
|
|
}),
|
|
|
r
|
|
|
);
|
|
|
}
|
|
|
var u = function(e, t) {
|
|
|
return (
|
|
|
typeof e == typeof t &&
|
|
|
('number' == typeof e
|
|
|
? !(!isNaN(e) || !isNaN(t)) ||
|
|
|
(0 === e && -0 === t) || (-0 === e && 0 === t) || e === t
|
|
|
: e === t)
|
|
|
);
|
|
|
},
|
|
|
f = function(e, t) {
|
|
|
var r = arguments[2] || {},
|
|
|
o = Object.getPrototypeOf(e),
|
|
|
n = Object.create(o);
|
|
|
for (var a in r)
|
|
|
Object.prototype.hasOwnProperty.call(r, a) &&
|
|
|
Object.defineProperty(n, a, {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
writable: !0,
|
|
|
value: r[a],
|
|
|
});
|
|
|
return n;
|
|
|
},
|
|
|
y = Symbol('undef'),
|
|
|
b = (function() {
|
|
|
try {
|
|
|
var e = {};
|
|
|
return (
|
|
|
Object.defineProperty(e, 't', {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
get: function() {
|
|
|
return !0;
|
|
|
},
|
|
|
set: undefined,
|
|
|
}),
|
|
|
!!e.t
|
|
|
);
|
|
|
} catch (t) {
|
|
|
return !1;
|
|
|
}
|
|
|
})(),
|
|
|
s = function(e) {
|
|
|
return 'function' == typeof e;
|
|
|
},
|
|
|
d = function w() {
|
|
|
if (!(this instanceof w)) throw new TypeError('Constructor Map requires "new"');
|
|
|
var e = f(this, '%MapPrototype%', { _keys: [], _values: [], _size: 0, _es6Map: !0 });
|
|
|
b ||
|
|
|
Object.defineProperty(e, 'size', {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
writable: !0,
|
|
|
value: 0,
|
|
|
});
|
|
|
var t = arguments[0] || undefined;
|
|
|
if (null === t || t === undefined) return e;
|
|
|
var o = e.set;
|
|
|
if (!s(o)) throw new TypeError('Map.prototype.set is not a function');
|
|
|
try {
|
|
|
for (var n = r(t); ; ) {
|
|
|
var c = i(n);
|
|
|
if (!1 === c) return e;
|
|
|
var p = a(c);
|
|
|
if ('object' != typeof p)
|
|
|
try {
|
|
|
throw new TypeError('Iterator value ' + p + ' is not an entry object');
|
|
|
} catch (h) {
|
|
|
return l(n, h);
|
|
|
}
|
|
|
try {
|
|
|
var u = p[0],
|
|
|
y = p[1];
|
|
|
o.call(e, u, y);
|
|
|
} catch (j) {
|
|
|
return l(n, j);
|
|
|
}
|
|
|
}
|
|
|
} catch (j) {
|
|
|
if (
|
|
|
Array.isArray(t) ||
|
|
|
'[object Arguments]' === Object.prototype.toString.call(t) ||
|
|
|
t.callee
|
|
|
) {
|
|
|
var d,
|
|
|
v = t.length;
|
|
|
for (d = 0; d < v; d++) o.call(e, t[d][0], t[d][1]);
|
|
|
}
|
|
|
}
|
|
|
return e;
|
|
|
};
|
|
|
Object.defineProperty(d, 'prototype', {
|
|
|
configurable: !1,
|
|
|
enumerable: !1,
|
|
|
writable: !1,
|
|
|
value: {},
|
|
|
}),
|
|
|
b
|
|
|
? Object.defineProperty(d, Symbol.species, {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
get: function() {
|
|
|
return this;
|
|
|
},
|
|
|
set: undefined,
|
|
|
})
|
|
|
: Object.defineProperty(d, Symbol.species, {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
writable: !0,
|
|
|
value: d,
|
|
|
}),
|
|
|
Object.defineProperty(d.prototype, 'clear', {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
writable: !0,
|
|
|
value: function() {
|
|
|
var e = this;
|
|
|
if ('object' != typeof e)
|
|
|
throw new TypeError(
|
|
|
'Method Map.prototype.clear called on incompatible receiver ' +
|
|
|
Object.prototype.toString.call(e),
|
|
|
);
|
|
|
if (!0 !== e._es6Map)
|
|
|
throw new TypeError(
|
|
|
'Method Map.prototype.clear called on incompatible receiver ' +
|
|
|
Object.prototype.toString.call(e),
|
|
|
);
|
|
|
for (var t = e._keys, r = 0; r < t.length; r++) (e._keys[r] = y), (e._values[r] = y);
|
|
|
return (this._size = 0), b || (this.size = this._size), undefined;
|
|
|
},
|
|
|
}),
|
|
|
Object.defineProperty(d.prototype, 'constructor', {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
writable: !0,
|
|
|
value: d,
|
|
|
}),
|
|
|
Object.defineProperty(d.prototype, 'delete', {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
writable: !0,
|
|
|
value: function(e) {
|
|
|
var t = this;
|
|
|
if ('object' != typeof t)
|
|
|
throw new TypeError(
|
|
|
'Method Map.prototype.clear called on incompatible receiver ' +
|
|
|
Object.prototype.toString.call(t),
|
|
|
);
|
|
|
if (!0 !== t._es6Map)
|
|
|
throw new TypeError(
|
|
|
'Method Map.prototype.clear called on incompatible receiver ' +
|
|
|
Object.prototype.toString.call(t),
|
|
|
);
|
|
|
for (var r = t._keys, o = 0; o < r.length; o++)
|
|
|
if (t._keys[o] !== y && u(t._keys[o], e))
|
|
|
return (
|
|
|
(this._keys[o] = y),
|
|
|
(this._values[o] = y),
|
|
|
--this._size,
|
|
|
b || (this.size = this._size),
|
|
|
!0
|
|
|
);
|
|
|
return !1;
|
|
|
},
|
|
|
}),
|
|
|
Object.defineProperty(d.prototype, 'entries', {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
writable: !0,
|
|
|
value: function() {
|
|
|
return p(this, 'key+value');
|
|
|
},
|
|
|
}),
|
|
|
Object.defineProperty(d.prototype, 'forEach', {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
writable: !0,
|
|
|
value: function(e) {
|
|
|
var t = this;
|
|
|
if ('object' != typeof t)
|
|
|
throw new TypeError(
|
|
|
'Method Map.prototype.forEach called on incompatible receiver ' +
|
|
|
Object.prototype.toString.call(t),
|
|
|
);
|
|
|
if (!0 !== t._es6Map)
|
|
|
throw new TypeError(
|
|
|
'Method Map.prototype.forEach called on incompatible receiver ' +
|
|
|
Object.prototype.toString.call(t),
|
|
|
);
|
|
|
if (!s(e))
|
|
|
throw new TypeError(Object.prototype.toString.call(e) + ' is not a function.');
|
|
|
if (arguments[1]) var r = arguments[1];
|
|
|
for (var o = t._keys, n = 0; n < o.length; n++)
|
|
|
t._keys[n] !== y && t._values[n] !== y && e.call(r, t._values[n], t._keys[n], t);
|
|
|
return undefined;
|
|
|
},
|
|
|
}),
|
|
|
Object.defineProperty(d.prototype, 'get', {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
writable: !0,
|
|
|
value: function(e) {
|
|
|
var t = this;
|
|
|
if ('object' != typeof t)
|
|
|
throw new TypeError(
|
|
|
'Method Map.prototype.get called on incompatible receiver ' +
|
|
|
Object.prototype.toString.call(t),
|
|
|
);
|
|
|
if (!0 !== t._es6Map)
|
|
|
throw new TypeError(
|
|
|
'Method Map.prototype.get called on incompatible receiver ' +
|
|
|
Object.prototype.toString.call(t),
|
|
|
);
|
|
|
for (var r = t._keys, o = 0; o < r.length; o++)
|
|
|
if (t._keys[o] !== y && u(t._keys[o], e)) return t._values[o];
|
|
|
return undefined;
|
|
|
},
|
|
|
}),
|
|
|
Object.defineProperty(d.prototype, 'has', {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
writable: !0,
|
|
|
value: function(e) {
|
|
|
var t = this;
|
|
|
if ('object' != typeof t)
|
|
|
throw new TypeError(
|
|
|
'Method Map.prototype.has called on incompatible receiver ' +
|
|
|
Object.prototype.toString.call(t),
|
|
|
);
|
|
|
if (!0 !== t._es6Map)
|
|
|
throw new TypeError(
|
|
|
'Method Map.prototype.has called on incompatible receiver ' +
|
|
|
Object.prototype.toString.call(t),
|
|
|
);
|
|
|
for (var r = t._keys, o = 0; o < r.length; o++)
|
|
|
if (t._keys[o] !== y && u(t._keys[o], e)) return !0;
|
|
|
return !1;
|
|
|
},
|
|
|
}),
|
|
|
Object.defineProperty(d.prototype, 'keys', {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
writable: !0,
|
|
|
value: function() {
|
|
|
return p(this, 'key');
|
|
|
},
|
|
|
}),
|
|
|
Object.defineProperty(d.prototype, 'set', {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
writable: !0,
|
|
|
value: function(e, t) {
|
|
|
var r = this;
|
|
|
if ('object' != typeof r)
|
|
|
throw new TypeError(
|
|
|
'Method Map.prototype.set called on incompatible receiver ' +
|
|
|
Object.prototype.toString.call(r),
|
|
|
);
|
|
|
if (!0 !== r._es6Map)
|
|
|
throw new TypeError(
|
|
|
'Method Map.prototype.set called on incompatible receiver ' +
|
|
|
Object.prototype.toString.call(r),
|
|
|
);
|
|
|
for (var o = r._keys, n = 0; n < o.length; n++)
|
|
|
if (r._keys[n] !== y && u(r._keys[n], e)) return (r._values[n] = t), r;
|
|
|
-0 === e && (e = 0);
|
|
|
var a = {};
|
|
|
return (
|
|
|
(a['[[Key]]'] = e),
|
|
|
(a['[[Value]]'] = t),
|
|
|
r._keys.push(a['[[Key]]']),
|
|
|
r._values.push(a['[[Value]]']),
|
|
|
++r._size,
|
|
|
b || (r.size = r._size),
|
|
|
r
|
|
|
);
|
|
|
},
|
|
|
}),
|
|
|
b &&
|
|
|
Object.defineProperty(d.prototype, 'size', {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
get: function() {
|
|
|
var e = this;
|
|
|
if ('object' != typeof e)
|
|
|
throw new TypeError(
|
|
|
'Method Map.prototype.size called on incompatible receiver ' +
|
|
|
Object.prototype.toString.call(e),
|
|
|
);
|
|
|
if (!0 !== e._es6Map)
|
|
|
throw new TypeError(
|
|
|
'Method Map.prototype.size called on incompatible receiver ' +
|
|
|
Object.prototype.toString.call(e),
|
|
|
);
|
|
|
for (var t = e._keys, r = 0, o = 0; o < t.length; o++) e._keys[o] !== y && (r += 1);
|
|
|
return r;
|
|
|
},
|
|
|
set: undefined,
|
|
|
}),
|
|
|
Object.defineProperty(d.prototype, 'values', {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
writable: !0,
|
|
|
value: function() {
|
|
|
return p(this, 'value');
|
|
|
},
|
|
|
}),
|
|
|
Object.defineProperty(d.prototype, Symbol.iterator, {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
writable: !0,
|
|
|
value: d.prototype.entries,
|
|
|
}),
|
|
|
'name' in d ||
|
|
|
Object.defineProperty(d, 'name', {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
writable: !1,
|
|
|
value: 'Map',
|
|
|
});
|
|
|
var v = {
|
|
|
isMapIterator: !0,
|
|
|
next: function() {
|
|
|
var e = this;
|
|
|
if ('object' != typeof e)
|
|
|
throw new TypeError(
|
|
|
'Method %MapIteratorPrototype%.next called on incompatible receiver ' +
|
|
|
Object.prototype.toString.call(e),
|
|
|
);
|
|
|
if (!e.isMapIterator)
|
|
|
throw new TypeError(
|
|
|
'Method %MapIteratorPrototype%.next called on incompatible receiver ' +
|
|
|
Object.prototype.toString.call(e),
|
|
|
);
|
|
|
var t = e['[[Map]]'],
|
|
|
r = e['[[MapNextIndex]]'],
|
|
|
o = e['[[MapIterationKind]]'];
|
|
|
if (t === undefined) return c(undefined, !0);
|
|
|
if (!t._es6Map) throw new Error();
|
|
|
for (var n = t._keys, a = n.length; r < a; ) {
|
|
|
var i = Object.create(null);
|
|
|
if (
|
|
|
((i['[[Key]]'] = t._keys[r]),
|
|
|
(i['[[Value]]'] = t._values[r]),
|
|
|
(r += 1),
|
|
|
(e['[[MapNextIndex]]'] = r),
|
|
|
i['[[Key]]'] !== y)
|
|
|
) {
|
|
|
if ('key' === o) var l = i['[[Key]]'];
|
|
|
else if ('value' === o) var l = i['[[Value]]'];
|
|
|
else {
|
|
|
if ('key+value' !== o) throw new Error();
|
|
|
var l = [i['[[Key]]'], i['[[Value]]']];
|
|
|
}
|
|
|
return c(l, !1);
|
|
|
}
|
|
|
}
|
|
|
return (e['[[Map]]'] = undefined), c(undefined, !0);
|
|
|
},
|
|
|
};
|
|
|
Object.defineProperty(v, Symbol.iterator, {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
writable: !0,
|
|
|
value: function() {
|
|
|
return this;
|
|
|
},
|
|
|
});
|
|
|
try {
|
|
|
Object.defineProperty(e, 'Map', {
|
|
|
configurable: !0,
|
|
|
enumerable: !1,
|
|
|
writable: !0,
|
|
|
value: d,
|
|
|
});
|
|
|
} catch (h) {
|
|
|
e.Map = d;
|
|
|
}
|
|
|
})(this);
|
|
|
}
|
|
|
if (
|
|
|
!(
|
|
|
'Set' in this &&
|
|
|
(function() {
|
|
|
return new Set([1, 2]).size === 2;
|
|
|
})()
|
|
|
)
|
|
|
) {
|
|
|
!(function(t) {
|
|
|
function e(t) {
|
|
|
return Number.isNaN(t) ? r : t;
|
|
|
}
|
|
|
function i(t) {
|
|
|
return t === r ? NaN : t;
|
|
|
}
|
|
|
function n(t, e) {
|
|
|
var i = 0;
|
|
|
return {
|
|
|
next: function() {
|
|
|
for (; t._values[i] === o; ) i++;
|
|
|
return i === t._values.length
|
|
|
? { value: void 0, done: !0 }
|
|
|
: { value: e.call(t, i++), done: !1 };
|
|
|
},
|
|
|
};
|
|
|
}
|
|
|
var o = Symbol('undef'),
|
|
|
r = Symbol('NaN'),
|
|
|
s = function() {
|
|
|
var t = arguments[0];
|
|
|
(this._values = []),
|
|
|
(this.size = this._size = 0),
|
|
|
t &&
|
|
|
'function' == typeof t.forEach &&
|
|
|
t.forEach(function(t) {
|
|
|
this.add.call(this, t);
|
|
|
}, this);
|
|
|
};
|
|
|
try {
|
|
|
Object.defineProperty(s.prototype, 'size', {
|
|
|
get: function() {
|
|
|
return this._size;
|
|
|
},
|
|
|
});
|
|
|
} catch (u) {}
|
|
|
(s.prototype.add = function(t) {
|
|
|
return (
|
|
|
(t = e(t)),
|
|
|
-1 === this._values.indexOf(t) && (this._values.push(t), (this.size = ++this._size)),
|
|
|
this
|
|
|
);
|
|
|
}),
|
|
|
(s.prototype.has = function(t) {
|
|
|
return -1 !== this._values.indexOf(e(t));
|
|
|
}),
|
|
|
(s.prototype['delete'] = function(t) {
|
|
|
var i = this._values.indexOf(e(t));
|
|
|
return -1 !== i && ((this._values[i] = o), (this.size = --this._size), !0);
|
|
|
}),
|
|
|
(s.prototype.clear = function() {
|
|
|
(this._values = []), (this.size = this._size = 0);
|
|
|
}),
|
|
|
(s.prototype[Symbol.iterator] = s.prototype.values = s.prototype.keys = function() {
|
|
|
var t = n(this, function(t) {
|
|
|
return i(this._values[t]);
|
|
|
});
|
|
|
return (t[Symbol.iterator] = this.keys.bind(this)), t;
|
|
|
}),
|
|
|
(s.prototype.entries = function() {
|
|
|
var t = n(this, function(t) {
|
|
|
return [i(this._values[t]), i(this._values[t])];
|
|
|
});
|
|
|
return (t[Symbol.iterator] = this.entries.bind(this)), t;
|
|
|
}),
|
|
|
(s.prototype.forEach = function(e, i) {
|
|
|
i = i || t;
|
|
|
for (var n = this.entries(), o = n.next(); !1 === o.done; )
|
|
|
e.call(i, o.value[1], o.value[0], this), (o = n.next());
|
|
|
}),
|
|
|
(s.prototype.constructor = s.prototype[Symbol.species] = s),
|
|
|
(s.prototype.constructor = s),
|
|
|
(s.name = 'Set'),
|
|
|
(t.Set = s);
|
|
|
})(this);
|
|
|
}
|
|
|
}.call(
|
|
|
('object' === typeof window && window) ||
|
|
|
('object' === typeof self && self) ||
|
|
|
('object' === typeof global && global) ||
|
|
|
{},
|
|
|
));
|