cd549714a8214e8b32a77fffd1fe761e88b82e3a
[rails.git] / vendor / assets / iD / iD.js
1 (function () {
2         var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
3
4         function commonjsRequire () {
5                 throw new Error('Dynamic requires are not currently supported by rollup-plugin-commonjs');
6         }
7
8         function unwrapExports (x) {
9                 return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
10         }
11
12         function createCommonjsModule(fn, module) {
13                 return module = { exports: {} }, fn(module, module.exports), module.exports;
14         }
15
16         function getCjsExportFromNamespace (n) {
17                 return n && n['default'] || n;
18         }
19
20         var isImplemented = function () {
21                 var set, iterator, result;
22                 if (typeof Set !== 'function') { return false; }
23                 set = new Set(['raz', 'dwa', 'trzy']);
24                 if (String(set) !== '[object Set]') { return false; }
25                 if (set.size !== 3) { return false; }
26                 if (typeof set.add !== 'function') { return false; }
27                 if (typeof set.clear !== 'function') { return false; }
28                 if (typeof set.delete !== 'function') { return false; }
29                 if (typeof set.entries !== 'function') { return false; }
30                 if (typeof set.forEach !== 'function') { return false; }
31                 if (typeof set.has !== 'function') { return false; }
32                 if (typeof set.keys !== 'function') { return false; }
33                 if (typeof set.values !== 'function') { return false; }
34
35                 iterator = set.values();
36                 result = iterator.next();
37                 if (result.done !== false) { return false; }
38                 if (result.value !== 'raz') { return false; }
39
40                 return true;
41         };
42
43         // eslint-disable-next-line no-empty-function
44         var noop = function () {};
45
46         var _undefined = noop(); // Support ES3 engines
47
48         var isValue = function (val) { return val !== _undefined && val !== null; };
49
50         var validValue = function (value) {
51                 if (!isValue(value)) { throw new TypeError("Cannot use null or undefined"); }
52                 return value;
53         };
54
55         var clear = function () {
56                 validValue(this).length = 0;
57                 return this;
58         };
59
60         var isImplemented$1 = function () {
61                 var numberIsNaN = Number.isNaN;
62                 if (typeof numberIsNaN !== "function") { return false; }
63                 return !numberIsNaN({}) && numberIsNaN(NaN) && !numberIsNaN(34);
64         };
65
66         var shim = function (value) {
67                 // eslint-disable-next-line no-self-compare
68                 return value !== value;
69         };
70
71         var isNan = isImplemented$1() ? Number.isNaN : shim;
72
73         var isImplemented$2 = function () {
74                 var sign = Math.sign;
75                 if (typeof sign !== "function") { return false; }
76                 return sign(10) === 1 && sign(-20) === -1;
77         };
78
79         var shim$1 = function (value) {
80                 value = Number(value);
81                 if (isNaN(value) || value === 0) { return value; }
82                 return value > 0 ? 1 : -1;
83         };
84
85         var sign = isImplemented$2() ? Math.sign : shim$1;
86
87         var abs   = Math.abs
88           , floor = Math.floor;
89
90         var toInteger = function (value) {
91                 if (isNaN(value)) { return 0; }
92                 value = Number(value);
93                 if (value === 0 || !isFinite(value)) { return value; }
94                 return sign(value) * floor(abs(value));
95         };
96
97         var max       = Math.max;
98
99         var toPosInteger = function (value) { return max(0, toInteger(value)); };
100
101         var indexOf           = Array.prototype.indexOf
102           , objHasOwnProperty = Object.prototype.hasOwnProperty
103           , abs$1               = Math.abs
104           , floor$1             = Math.floor;
105
106         var eIndexOf = function (searchElement/*, fromIndex*/) {
107                 var i, length, fromIndex, val;
108                 if (!isNan(searchElement)) { return indexOf.apply(this, arguments); }
109
110                 length = toPosInteger(validValue(this).length);
111                 fromIndex = arguments[1];
112                 if (isNaN(fromIndex)) { fromIndex = 0; }
113                 else if (fromIndex >= 0) { fromIndex = floor$1(fromIndex); }
114                 else { fromIndex = toPosInteger(this.length) - floor$1(abs$1(fromIndex)); }
115
116                 for (i = fromIndex; i < length; ++i) {
117                         if (objHasOwnProperty.call(this, i)) {
118                                 val = this[i];
119                                 if (isNan(val)) { return i; } // Jslint: ignore
120                         }
121                 }
122                 return -1;
123         };
124
125         var create = Object.create, getPrototypeOf = Object.getPrototypeOf, plainObject = {};
126
127         var isImplemented$3 = function (/* CustomCreate*/) {
128                 var setPrototypeOf = Object.setPrototypeOf, customCreate = arguments[0] || create;
129                 if (typeof setPrototypeOf !== "function") { return false; }
130                 return getPrototypeOf(setPrototypeOf(customCreate(null), plainObject)) === plainObject;
131         };
132
133         var map = { function: true, object: true };
134
135         var isObject = function (value) { return (isValue(value) && map[typeof value]) || false; };
136
137         var create$1 = Object.create, shim$2;
138
139         if (!isImplemented$3()) {
140                 shim$2 = shim$3;
141         }
142
143         var create_1 = (function () {
144                 var nullObject, polyProps, desc;
145                 if (!shim$2) { return create$1; }
146                 if (shim$2.level !== 1) { return create$1; }
147
148                 nullObject = {};
149                 polyProps = {};
150                 desc = { configurable: false, enumerable: false, writable: true, value: undefined };
151                 Object.getOwnPropertyNames(Object.prototype).forEach(function (name) {
152                         if (name === "__proto__") {
153                                 polyProps[name] = {
154                                         configurable: true,
155                                         enumerable: false,
156                                         writable: true,
157                                         value: undefined
158                                 };
159                                 return;
160                         }
161                         polyProps[name] = desc;
162                 });
163                 Object.defineProperties(nullObject, polyProps);
164
165                 Object.defineProperty(shim$2, "nullPolyfill", {
166                         configurable: false,
167                         enumerable: false,
168                         writable: false,
169                         value: nullObject
170                 });
171
172                 return function (prototype, props) {
173                         return create$1(prototype === null ? nullObject : prototype, props);
174                 };
175         })();
176
177         var objIsPrototypeOf = Object.prototype.isPrototypeOf
178           , defineProperty   = Object.defineProperty
179           , nullDesc         = { configurable: true, enumerable: false, writable: true, value: undefined }
180           , validate;
181
182         validate = function (obj, prototype) {
183                 validValue(obj);
184                 if (prototype === null || isObject(prototype)) { return obj; }
185                 throw new TypeError("Prototype must be null or an object");
186         };
187
188         var shim$3 = (function (status) {
189                 var fn, set;
190                 if (!status) { return null; }
191                 if (status.level === 2) {
192                         if (status.set) {
193                                 set = status.set;
194                                 fn = function (obj, prototype) {
195                                         set.call(validate(obj, prototype), prototype);
196                                         return obj;
197                                 };
198                         } else {
199                                 fn = function (obj, prototype) {
200                                         validate(obj, prototype).__proto__ = prototype;
201                                         return obj;
202                                 };
203                         }
204                 } else {
205                         fn = function self(obj, prototype) {
206                                 var isNullBase;
207                                 validate(obj, prototype);
208                                 isNullBase = objIsPrototypeOf.call(self.nullPolyfill, obj);
209                                 if (isNullBase) { delete self.nullPolyfill.__proto__; }
210                                 if (prototype === null) { prototype = self.nullPolyfill; }
211                                 obj.__proto__ = prototype;
212                                 if (isNullBase) { defineProperty(self.nullPolyfill, "__proto__", nullDesc); }
213                                 return obj;
214                         };
215                 }
216                 return Object.defineProperty(fn, "level", {
217                         configurable: false,
218                         enumerable: false,
219                         writable: false,
220                         value: status.level
221                 });
222         })(
223                 (function () {
224                         var tmpObj1 = Object.create(null)
225                           , tmpObj2 = {}
226                           , set
227                           , desc = Object.getOwnPropertyDescriptor(Object.prototype, "__proto__");
228
229                         if (desc) {
230                                 try {
231                                         set = desc.set; // Opera crashes at this point
232                                         set.call(tmpObj1, tmpObj2);
233                                 } catch (ignore) {}
234                                 if (Object.getPrototypeOf(tmpObj1) === tmpObj2) { return { set: set, level: 2 }; }
235                         }
236
237                         tmpObj1.__proto__ = tmpObj2;
238                         if (Object.getPrototypeOf(tmpObj1) === tmpObj2) { return { level: 2 }; }
239
240                         tmpObj1 = {};
241                         tmpObj1.__proto__ = tmpObj2;
242                         if (Object.getPrototypeOf(tmpObj1) === tmpObj2) { return { level: 1 }; }
243
244                         return false;
245                 })()
246         );
247
248         var setPrototypeOf = isImplemented$3() ? Object.setPrototypeOf : shim$3;
249
250         var validCallable = function (fn) {
251                 if (typeof fn !== "function") { throw new TypeError(fn + " is not a function"); }
252                 return fn;
253         };
254
255         // ES3 safe
256         var _undefined$1 = void 0;
257
258         var is = function (value) { return value !== _undefined$1 && value !== null; };
259
260         // prettier-ignore
261         var possibleTypes = { "object": true, "function": true, "undefined": true /* document.all */ };
262
263         var is$1 = function (value) {
264                 if (!is(value)) { return false; }
265                 return hasOwnProperty.call(possibleTypes, typeof value);
266         };
267
268         var is$2 = function (value) {
269                 if (!is$1(value)) { return false; }
270                 try {
271                         if (!value.constructor) { return false; }
272                         return value.constructor.prototype === value;
273                 } catch (error) {
274                         return false;
275                 }
276         };
277
278         var is$3 = function (value) {
279                 if (typeof value !== "function") { return false; }
280
281                 if (!hasOwnProperty.call(value, "length")) { return false; }
282
283                 try {
284                         if (typeof value.length !== "number") { return false; }
285                         if (typeof value.call !== "function") { return false; }
286                         if (typeof value.apply !== "function") { return false; }
287                 } catch (error) {
288                         return false;
289                 }
290
291                 return !is$2(value);
292         };
293
294         var classRe = /^\s*class[\s{/}]/, functionToString = Function.prototype.toString;
295
296         var is$4 = function (value) {
297                 if (!is$3(value)) { return false; }
298                 if (classRe.test(functionToString.call(value))) { return false; }
299                 return true;
300         };
301
302         var isImplemented$4 = function () {
303                 var assign = Object.assign, obj;
304                 if (typeof assign !== "function") { return false; }
305                 obj = { foo: "raz" };
306                 assign(obj, { bar: "dwa" }, { trzy: "trzy" });
307                 return obj.foo + obj.bar + obj.trzy === "razdwatrzy";
308         };
309
310         var isImplemented$5 = function () {
311                 try {
312                         Object.keys("primitive");
313                         return true;
314                 } catch (e) {
315                         return false;
316                 }
317         };
318
319         var keys = Object.keys;
320
321         var shim$4 = function (object) { return keys(isValue(object) ? Object(object) : object); };
322
323         var keys$1 = isImplemented$5() ? Object.keys : shim$4;
324
325         var max$1   = Math.max;
326
327         var shim$5 = function (dest, src/*, …srcn*/) {
328                 var arguments$1 = arguments;
329
330                 var error, i, length = max$1(arguments.length, 2), assign;
331                 dest = Object(validValue(dest));
332                 assign = function (key) {
333                         try {
334                                 dest[key] = src[key];
335                         } catch (e) {
336                                 if (!error) { error = e; }
337                         }
338                 };
339                 for (i = 1; i < length; ++i) {
340                         src = arguments$1[i];
341                         keys$1(src).forEach(assign);
342                 }
343                 if (error !== undefined) { throw error; }
344                 return dest;
345         };
346
347         var assign = isImplemented$4() ? Object.assign : shim$5;
348
349         var forEach = Array.prototype.forEach, create$2 = Object.create;
350
351         var process$1 = function (src, obj) {
352                 var key;
353                 for (key in src) { obj[key] = src[key]; }
354         };
355
356         // eslint-disable-next-line no-unused-vars
357         var normalizeOptions = function (opts1/*, …options*/) {
358                 var result = create$2(null);
359                 forEach.call(arguments, function (options) {
360                         if (!isValue(options)) { return; }
361                         process$1(Object(options), result);
362                 });
363                 return result;
364         };
365
366         var str = "razdwatrzy";
367
368         var isImplemented$6 = function () {
369                 if (typeof str.contains !== "function") { return false; }
370                 return str.contains("dwa") === true && str.contains("foo") === false;
371         };
372
373         var indexOf$1 = String.prototype.indexOf;
374
375         var shim$6 = function (searchString/*, position*/) {
376                 return indexOf$1.call(this, searchString, arguments[1]) > -1;
377         };
378
379         var contains = isImplemented$6() ? String.prototype.contains : shim$6;
380
381         var d_1 = createCommonjsModule(function (module) {
382
383
384
385         var d = (module.exports = function (dscr, value/*, options*/) {
386                 var c, e, w, options, desc;
387                 if (arguments.length < 2 || typeof dscr !== "string") {
388                         options = value;
389                         value = dscr;
390                         dscr = null;
391                 } else {
392                         options = arguments[2];
393                 }
394                 if (is(dscr)) {
395                         c = contains.call(dscr, "c");
396                         e = contains.call(dscr, "e");
397                         w = contains.call(dscr, "w");
398                 } else {
399                         c = w = true;
400                         e = false;
401                 }
402
403                 desc = { value: value, configurable: c, enumerable: e, writable: w };
404                 return !options ? desc : assign(normalizeOptions(options), desc);
405         });
406
407         d.gs = function (dscr, get, set/*, options*/) {
408                 var c, e, options, desc;
409                 if (typeof dscr !== "string") {
410                         options = set;
411                         set = get;
412                         get = dscr;
413                         dscr = null;
414                 } else {
415                         options = arguments[3];
416                 }
417                 if (!is(get)) {
418                         get = undefined;
419                 } else if (!is$4(get)) {
420                         options = get;
421                         get = set = undefined;
422                 } else if (!is(set)) {
423                         set = undefined;
424                 } else if (!is$4(set)) {
425                         options = set;
426                         set = undefined;
427                 }
428                 if (is(dscr)) {
429                         c = contains.call(dscr, "c");
430                         e = contains.call(dscr, "e");
431                 } else {
432                         c = true;
433                         e = false;
434                 }
435
436                 desc = { get: get, set: set, configurable: c, enumerable: e };
437                 return !options ? desc : assign(normalizeOptions(options), desc);
438         };
439         });
440
441         var eventEmitter = createCommonjsModule(function (module, exports) {
442
443         var apply = Function.prototype.apply, call = Function.prototype.call
444           , create = Object.create, defineProperty = Object.defineProperty
445           , defineProperties = Object.defineProperties
446           , hasOwnProperty = Object.prototype.hasOwnProperty
447           , descriptor = { configurable: true, enumerable: false, writable: true }
448
449           , on, once, off, emit, methods, descriptors, base;
450
451         on = function (type, listener) {
452                 var data;
453
454                 validCallable(listener);
455
456                 if (!hasOwnProperty.call(this, '__ee__')) {
457                         data = descriptor.value = create(null);
458                         defineProperty(this, '__ee__', descriptor);
459                         descriptor.value = null;
460                 } else {
461                         data = this.__ee__;
462                 }
463                 if (!data[type]) { data[type] = listener; }
464                 else if (typeof data[type] === 'object') { data[type].push(listener); }
465                 else { data[type] = [data[type], listener]; }
466
467                 return this;
468         };
469
470         once = function (type, listener) {
471                 var once, self;
472
473                 validCallable(listener);
474                 self = this;
475                 on.call(this, type, once = function () {
476                         off.call(self, type, once);
477                         apply.call(listener, this, arguments);
478                 });
479
480                 once.__eeOnceListener__ = listener;
481                 return this;
482         };
483
484         off = function (type, listener) {
485                 var data, listeners, candidate, i;
486
487                 validCallable(listener);
488
489                 if (!hasOwnProperty.call(this, '__ee__')) { return this; }
490                 data = this.__ee__;
491                 if (!data[type]) { return this; }
492                 listeners = data[type];
493
494                 if (typeof listeners === 'object') {
495                         for (i = 0; (candidate = listeners[i]); ++i) {
496                                 if ((candidate === listener) ||
497                                                 (candidate.__eeOnceListener__ === listener)) {
498                                         if (listeners.length === 2) { data[type] = listeners[i ? 0 : 1]; }
499                                         else { listeners.splice(i, 1); }
500                                 }
501                         }
502                 } else {
503                         if ((listeners === listener) ||
504                                         (listeners.__eeOnceListener__ === listener)) {
505                                 delete data[type];
506                         }
507                 }
508
509                 return this;
510         };
511
512         emit = function (type) {
513                 var arguments$1 = arguments;
514
515                 var i, l, listener, listeners, args;
516
517                 if (!hasOwnProperty.call(this, '__ee__')) { return; }
518                 listeners = this.__ee__[type];
519                 if (!listeners) { return; }
520
521                 if (typeof listeners === 'object') {
522                         l = arguments.length;
523                         args = new Array(l - 1);
524                         for (i = 1; i < l; ++i) { args[i - 1] = arguments$1[i]; }
525
526                         listeners = listeners.slice();
527                         for (i = 0; (listener = listeners[i]); ++i) {
528                                 apply.call(listener, this, args);
529                         }
530                 } else {
531                         switch (arguments.length) {
532                         case 1:
533                                 call.call(listeners, this);
534                                 break;
535                         case 2:
536                                 call.call(listeners, this, arguments[1]);
537                                 break;
538                         case 3:
539                                 call.call(listeners, this, arguments[1], arguments[2]);
540                                 break;
541                         default:
542                                 l = arguments.length;
543                                 args = new Array(l - 1);
544                                 for (i = 1; i < l; ++i) {
545                                         args[i - 1] = arguments$1[i];
546                                 }
547                                 apply.call(listeners, this, args);
548                         }
549                 }
550         };
551
552         methods = {
553                 on: on,
554                 once: once,
555                 off: off,
556                 emit: emit
557         };
558
559         descriptors = {
560                 on: d_1(on),
561                 once: d_1(once),
562                 off: d_1(off),
563                 emit: d_1(emit)
564         };
565
566         base = defineProperties({}, descriptors);
567
568         module.exports = exports = function (o) {
569                 return (o == null) ? create(base) : defineProperties(Object(o), descriptors);
570         };
571         exports.methods = methods;
572         });
573         var eventEmitter_1 = eventEmitter.methods;
574
575         var validTypes = { object: true, symbol: true };
576
577         var isImplemented$7 = function () {
578                 var symbol;
579                 if (typeof Symbol !== 'function') { return false; }
580                 symbol = Symbol('test symbol');
581                 try { String(symbol); } catch (e) { return false; }
582
583                 // Return 'true' also for polyfills
584                 if (!validTypes[typeof Symbol.iterator]) { return false; }
585                 if (!validTypes[typeof Symbol.toPrimitive]) { return false; }
586                 if (!validTypes[typeof Symbol.toStringTag]) { return false; }
587
588                 return true;
589         };
590
591         var isSymbol = function (x) {
592                 if (!x) { return false; }
593                 if (typeof x === 'symbol') { return true; }
594                 if (!x.constructor) { return false; }
595                 if (x.constructor.name !== 'Symbol') { return false; }
596                 return (x[x.constructor.toStringTag] === 'Symbol');
597         };
598
599         var validateSymbol = function (value) {
600                 if (!isSymbol(value)) { throw new TypeError(value + " is not a symbol"); }
601                 return value;
602         };
603
604         var create$3 = Object.create, defineProperties = Object.defineProperties
605           , defineProperty$1 = Object.defineProperty, objPrototype = Object.prototype
606           , NativeSymbol, SymbolPolyfill, HiddenSymbol, globalSymbols = create$3(null)
607           , isNativeSafe;
608
609         if (typeof Symbol === 'function') {
610                 NativeSymbol = Symbol;
611                 try {
612                         String(NativeSymbol());
613                         isNativeSafe = true;
614                 } catch (ignore) {}
615         }
616
617         var generateName = (function () {
618                 var created = create$3(null);
619                 return function (desc) {
620                         var postfix = 0, name, ie11BugWorkaround;
621                         while (created[desc + (postfix || '')]) { ++postfix; }
622                         desc += (postfix || '');
623                         created[desc] = true;
624                         name = '@@' + desc;
625                         defineProperty$1(objPrototype, name, d_1.gs(null, function (value) {
626                                 // For IE11 issue see:
627                                 // https://connect.microsoft.com/IE/feedbackdetail/view/1928508/
628                                 //    ie11-broken-getters-on-dom-objects
629                                 // https://github.com/medikoo/es6-symbol/issues/12
630                                 if (ie11BugWorkaround) { return; }
631                                 ie11BugWorkaround = true;
632                                 defineProperty$1(this, name, d_1(value));
633                                 ie11BugWorkaround = false;
634                         }));
635                         return name;
636                 };
637         }());
638
639         // Internal constructor (not one exposed) for creating Symbol instances.
640         // This one is used to ensure that `someSymbol instanceof Symbol` always return false
641         HiddenSymbol = function Symbol(description) {
642                 if (this instanceof HiddenSymbol) { throw new TypeError('Symbol is not a constructor'); }
643                 return SymbolPolyfill(description);
644         };
645
646         // Exposed `Symbol` constructor
647         // (returns instances of HiddenSymbol)
648         var polyfill = SymbolPolyfill = function Symbol(description) {
649                 var symbol;
650                 if (this instanceof Symbol) { throw new TypeError('Symbol is not a constructor'); }
651                 if (isNativeSafe) { return NativeSymbol(description); }
652                 symbol = create$3(HiddenSymbol.prototype);
653                 description = (description === undefined ? '' : String(description));
654                 return defineProperties(symbol, {
655                         __description__: d_1('', description),
656                         __name__: d_1('', generateName(description))
657                 });
658         };
659         defineProperties(SymbolPolyfill, {
660                 for: d_1(function (key) {
661                         if (globalSymbols[key]) { return globalSymbols[key]; }
662                         return (globalSymbols[key] = SymbolPolyfill(String(key)));
663                 }),
664                 keyFor: d_1(function (s) {
665                         var key;
666                         validateSymbol(s);
667                         for (key in globalSymbols) { if (globalSymbols[key] === s) { return key; } }
668                 }),
669
670                 // To ensure proper interoperability with other native functions (e.g. Array.from)
671                 // fallback to eventual native implementation of given symbol
672                 hasInstance: d_1('', (NativeSymbol && NativeSymbol.hasInstance) || SymbolPolyfill('hasInstance')),
673                 isConcatSpreadable: d_1('', (NativeSymbol && NativeSymbol.isConcatSpreadable) ||
674                         SymbolPolyfill('isConcatSpreadable')),
675                 iterator: d_1('', (NativeSymbol && NativeSymbol.iterator) || SymbolPolyfill('iterator')),
676                 match: d_1('', (NativeSymbol && NativeSymbol.match) || SymbolPolyfill('match')),
677                 replace: d_1('', (NativeSymbol && NativeSymbol.replace) || SymbolPolyfill('replace')),
678                 search: d_1('', (NativeSymbol && NativeSymbol.search) || SymbolPolyfill('search')),
679                 species: d_1('', (NativeSymbol && NativeSymbol.species) || SymbolPolyfill('species')),
680                 split: d_1('', (NativeSymbol && NativeSymbol.split) || SymbolPolyfill('split')),
681                 toPrimitive: d_1('', (NativeSymbol && NativeSymbol.toPrimitive) || SymbolPolyfill('toPrimitive')),
682                 toStringTag: d_1('', (NativeSymbol && NativeSymbol.toStringTag) || SymbolPolyfill('toStringTag')),
683                 unscopables: d_1('', (NativeSymbol && NativeSymbol.unscopables) || SymbolPolyfill('unscopables'))
684         });
685
686         // Internal tweaks for real symbol producer
687         defineProperties(HiddenSymbol.prototype, {
688                 constructor: d_1(SymbolPolyfill),
689                 toString: d_1('', function () { return this.__name__; })
690         });
691
692         // Proper implementation of methods exposed on Symbol.prototype
693         // They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype
694         defineProperties(SymbolPolyfill.prototype, {
695                 toString: d_1(function () { return 'Symbol (' + validateSymbol(this).__description__ + ')'; }),
696                 valueOf: d_1(function () { return validateSymbol(this); })
697         });
698         defineProperty$1(SymbolPolyfill.prototype, SymbolPolyfill.toPrimitive, d_1('', function () {
699                 var symbol = validateSymbol(this);
700                 if (typeof symbol === 'symbol') { return symbol; }
701                 return symbol.toString();
702         }));
703         defineProperty$1(SymbolPolyfill.prototype, SymbolPolyfill.toStringTag, d_1('c', 'Symbol'));
704
705         // Proper implementaton of toPrimitive and toStringTag for returned symbol instances
706         defineProperty$1(HiddenSymbol.prototype, SymbolPolyfill.toStringTag,
707                 d_1('c', SymbolPolyfill.prototype[SymbolPolyfill.toStringTag]));
708
709         // Note: It's important to define `toPrimitive` as last one, as some implementations
710         // implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols)
711         // And that may invoke error in definition flow:
712         // See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149
713         defineProperty$1(HiddenSymbol.prototype, SymbolPolyfill.toPrimitive,
714                 d_1('c', SymbolPolyfill.prototype[SymbolPolyfill.toPrimitive]));
715
716         var es6Symbol = isImplemented$7() ? Symbol : polyfill;
717
718         var objToString = Object.prototype.toString
719           , id = objToString.call((function () { return arguments; })());
720
721         var isArguments = function (value) { return objToString.call(value) === id; };
722
723         var objToString$1 = Object.prototype.toString, id$1 = objToString$1.call("");
724
725         var isString = function (value) {
726                 return (
727                         typeof value === "string" ||
728                         (value &&
729                                 typeof value === "object" &&
730                                 (value instanceof String || objToString$1.call(value) === id$1)) ||
731                         false
732                 );
733         };
734
735         var isImplemented$8 = function () {
736                 if (typeof globalThis !== "object") { return false; }
737                 if (!globalThis) { return false; }
738                 return globalThis.Array === Array;
739         };
740
741         var naiveFallback = function () {
742                 if (typeof self === "object" && self) { return self; }
743                 if (typeof window === "object" && window) { return window; }
744                 throw new Error("Unable to resolve global `this`");
745         };
746
747         var implementation = (function () {
748                 if (this) { return this; }
749
750                 // Unexpected strict mode (may happen if e.g. bundled into ESM module)
751
752                 // Thanks @mathiasbynens -> https://mathiasbynens.be/notes/globalthis
753                 // In all ES5+ engines global object inherits from Object.prototype
754                 // (if you approached one that doesn't please report)
755                 try {
756                         Object.defineProperty(Object.prototype, "__global__", {
757                                 get: function () { return this; },
758                                 configurable: true
759                         });
760                 } catch (error) {
761                         // Unfortunate case of Object.prototype being sealed (via preventExtensions, seal or freeze)
762                         return naiveFallback();
763                 }
764                 try {
765                         // Safari case (window.__global__ is resolved with global context, but __global__ does not)
766                         if (!__global__) { return naiveFallback(); }
767                         return __global__;
768                 } finally {
769                         delete Object.prototype.__global__;
770                 }
771         })();
772
773         var globalThis_1 = isImplemented$8() ? globalThis : implementation;
774
775         var validTypes$1 = { object: true, symbol: true };
776
777         var isImplemented$9 = function () {
778                 var Symbol = globalThis_1.Symbol;
779                 var symbol;
780                 if (typeof Symbol !== "function") { return false; }
781                 symbol = Symbol("test symbol");
782                 try { String(symbol); }
783                 catch (e) { return false; }
784
785                 // Return 'true' also for polyfills
786                 if (!validTypes$1[typeof Symbol.iterator]) { return false; }
787                 if (!validTypes$1[typeof Symbol.toPrimitive]) { return false; }
788                 if (!validTypes$1[typeof Symbol.toStringTag]) { return false; }
789
790                 return true;
791         };
792
793         var isSymbol$1 = function (value) {
794                 if (!value) { return false; }
795                 if (typeof value === "symbol") { return true; }
796                 if (!value.constructor) { return false; }
797                 if (value.constructor.name !== "Symbol") { return false; }
798                 return value[value.constructor.toStringTag] === "Symbol";
799         };
800
801         var validateSymbol$1 = function (value) {
802                 if (!isSymbol$1(value)) { throw new TypeError(value + " is not a symbol"); }
803                 return value;
804         };
805
806         var create$4 = Object.create, defineProperty$2 = Object.defineProperty, objPrototype$1 = Object.prototype;
807
808         var created = create$4(null);
809         var generateName$1 = function (desc) {
810                 var postfix = 0, name, ie11BugWorkaround;
811                 while (created[desc + (postfix || "")]) { ++postfix; }
812                 desc += postfix || "";
813                 created[desc] = true;
814                 name = "@@" + desc;
815                 defineProperty$2(
816                         objPrototype$1,
817                         name,
818                         d_1.gs(null, function (value) {
819                                 // For IE11 issue see:
820                                 // https://connect.microsoft.com/IE/feedbackdetail/view/1928508/
821                                 //    ie11-broken-getters-on-dom-objects
822                                 // https://github.com/medikoo/es6-symbol/issues/12
823                                 if (ie11BugWorkaround) { return; }
824                                 ie11BugWorkaround = true;
825                                 defineProperty$2(this, name, d_1(value));
826                                 ie11BugWorkaround = false;
827                         })
828                 );
829                 return name;
830         };
831
832         var NativeSymbol$1 = globalThis_1.Symbol;
833
834         var standardSymbols = function (SymbolPolyfill) {
835                 return Object.defineProperties(SymbolPolyfill, {
836                         // To ensure proper interoperability with other native functions (e.g. Array.from)
837                         // fallback to eventual native implementation of given symbol
838                         hasInstance: d_1(
839                                 "", (NativeSymbol$1 && NativeSymbol$1.hasInstance) || SymbolPolyfill("hasInstance")
840                         ),
841                         isConcatSpreadable: d_1(
842                                 "",
843                                 (NativeSymbol$1 && NativeSymbol$1.isConcatSpreadable) ||
844                                         SymbolPolyfill("isConcatSpreadable")
845                         ),
846                         iterator: d_1("", (NativeSymbol$1 && NativeSymbol$1.iterator) || SymbolPolyfill("iterator")),
847                         match: d_1("", (NativeSymbol$1 && NativeSymbol$1.match) || SymbolPolyfill("match")),
848                         replace: d_1("", (NativeSymbol$1 && NativeSymbol$1.replace) || SymbolPolyfill("replace")),
849                         search: d_1("", (NativeSymbol$1 && NativeSymbol$1.search) || SymbolPolyfill("search")),
850                         species: d_1("", (NativeSymbol$1 && NativeSymbol$1.species) || SymbolPolyfill("species")),
851                         split: d_1("", (NativeSymbol$1 && NativeSymbol$1.split) || SymbolPolyfill("split")),
852                         toPrimitive: d_1(
853                                 "", (NativeSymbol$1 && NativeSymbol$1.toPrimitive) || SymbolPolyfill("toPrimitive")
854                         ),
855                         toStringTag: d_1(
856                                 "", (NativeSymbol$1 && NativeSymbol$1.toStringTag) || SymbolPolyfill("toStringTag")
857                         ),
858                         unscopables: d_1(
859                                 "", (NativeSymbol$1 && NativeSymbol$1.unscopables) || SymbolPolyfill("unscopables")
860                         )
861                 });
862         };
863
864         var registry = Object.create(null);
865
866         var symbolRegistry = function (SymbolPolyfill) {
867                 return Object.defineProperties(SymbolPolyfill, {
868                         for: d_1(function (key) {
869                                 if (registry[key]) { return registry[key]; }
870                                 return (registry[key] = SymbolPolyfill(String(key)));
871                         }),
872                         keyFor: d_1(function (symbol) {
873                                 var key;
874                                 validateSymbol$1(symbol);
875                                 for (key in registry) {
876                                         if (registry[key] === symbol) { return key; }
877                                 }
878                                 return undefined;
879                         })
880                 });
881         };
882
883         var NativeSymbol$2         = globalThis_1.Symbol;
884
885         var create$5 = Object.create
886           , defineProperties$1 = Object.defineProperties
887           , defineProperty$3 = Object.defineProperty;
888
889         var SymbolPolyfill$1, HiddenSymbol$1, isNativeSafe$1;
890
891         if (typeof NativeSymbol$2 === "function") {
892                 try {
893                         String(NativeSymbol$2());
894                         isNativeSafe$1 = true;
895                 } catch (ignore) {}
896         } else {
897                 NativeSymbol$2 = null;
898         }
899
900         // Internal constructor (not one exposed) for creating Symbol instances.
901         // This one is used to ensure that `someSymbol instanceof Symbol` always return false
902         HiddenSymbol$1 = function Symbol(description) {
903                 if (this instanceof HiddenSymbol$1) { throw new TypeError("Symbol is not a constructor"); }
904                 return SymbolPolyfill$1(description);
905         };
906
907         // Exposed `Symbol` constructor
908         // (returns instances of HiddenSymbol)
909         var polyfill$1 = SymbolPolyfill$1 = function Symbol(description) {
910                 var symbol;
911                 if (this instanceof Symbol) { throw new TypeError("Symbol is not a constructor"); }
912                 if (isNativeSafe$1) { return NativeSymbol$2(description); }
913                 symbol = create$5(HiddenSymbol$1.prototype);
914                 description = description === undefined ? "" : String(description);
915                 return defineProperties$1(symbol, {
916                         __description__: d_1("", description),
917                         __name__: d_1("", generateName$1(description))
918                 });
919         };
920
921         standardSymbols(SymbolPolyfill$1);
922         symbolRegistry(SymbolPolyfill$1);
923
924         // Internal tweaks for real symbol producer
925         defineProperties$1(HiddenSymbol$1.prototype, {
926                 constructor: d_1(SymbolPolyfill$1),
927                 toString: d_1("", function () { return this.__name__; })
928         });
929
930         // Proper implementation of methods exposed on Symbol.prototype
931         // They won't be accessible on produced symbol instances as they derive from HiddenSymbol.prototype
932         defineProperties$1(SymbolPolyfill$1.prototype, {
933                 toString: d_1(function () { return "Symbol (" + validateSymbol$1(this).__description__ + ")"; }),
934                 valueOf: d_1(function () { return validateSymbol$1(this); })
935         });
936         defineProperty$3(
937                 SymbolPolyfill$1.prototype,
938                 SymbolPolyfill$1.toPrimitive,
939                 d_1("", function () {
940                         var symbol = validateSymbol$1(this);
941                         if (typeof symbol === "symbol") { return symbol; }
942                         return symbol.toString();
943                 })
944         );
945         defineProperty$3(SymbolPolyfill$1.prototype, SymbolPolyfill$1.toStringTag, d_1("c", "Symbol"));
946
947         // Proper implementaton of toPrimitive and toStringTag for returned symbol instances
948         defineProperty$3(
949                 HiddenSymbol$1.prototype, SymbolPolyfill$1.toStringTag,
950                 d_1("c", SymbolPolyfill$1.prototype[SymbolPolyfill$1.toStringTag])
951         );
952
953         // Note: It's important to define `toPrimitive` as last one, as some implementations
954         // implement `toPrimitive` natively without implementing `toStringTag` (or other specified symbols)
955         // And that may invoke error in definition flow:
956         // See: https://github.com/medikoo/es6-symbol/issues/13#issuecomment-164146149
957         defineProperty$3(
958                 HiddenSymbol$1.prototype, SymbolPolyfill$1.toPrimitive,
959                 d_1("c", SymbolPolyfill$1.prototype[SymbolPolyfill$1.toPrimitive])
960         );
961
962         var es6Symbol$1 = isImplemented$9()
963                 ? globalThis_1.Symbol
964                 : polyfill$1;
965
966         var iteratorSymbol = es6Symbol$1.iterator
967           , isArray        = Array.isArray;
968
969         var isIterable = function (value) {
970                 if (!isValue(value)) { return false; }
971                 if (isArray(value)) { return true; }
972                 if (isString(value)) { return true; }
973                 if (isArguments(value)) { return true; }
974                 return typeof value[iteratorSymbol] === "function";
975         };
976
977         var validIterable = function (value) {
978                 if (!isIterable(value)) { throw new TypeError(value + " is not iterable"); }
979                 return value;
980         };
981
982         var objectToString = Object.prototype.toString;
983
984         var coerce = function (value) {
985                 if (!is(value)) { return null; }
986                 if (is$1(value)) {
987                         // Reject Object.prototype.toString coercion
988                         var valueToString = value.toString;
989                         if (typeof valueToString !== "function") { return null; }
990                         if (valueToString === objectToString) { return null; }
991                         // Note: It can be object coming from other realm, still as there's no ES3 and CSP compliant
992                         // way to resolve its realm's Object.prototype.toString it's left as not addressed edge case
993                 }
994                 try {
995                         return "" + value; // Ensure implicit coercion
996                 } catch (error) {
997                         return null;
998                 }
999         };
1000
1001         var safeToString = function (value) {
1002                 try {
1003                         return value.toString();
1004                 } catch (error) {
1005                         try { return String(value); }
1006                         catch (error2) { return null; }
1007                 }
1008         };
1009
1010         var reNewLine = /[\n\r\u2028\u2029]/g;
1011
1012         var toShortString = function (value) {
1013                 var string = safeToString(value);
1014                 if (string === null) { return "<Non-coercible to string value>"; }
1015                 // Trim if too long
1016                 if (string.length > 100) { string = string.slice(0, 99) + "…"; }
1017                 // Replace eventual new lines
1018                 string = string.replace(reNewLine, function (char) {
1019                         switch (char) {
1020                                 case "\n":
1021                                         return "\\n";
1022                                 case "\r":
1023                                         return "\\r";
1024                                 case "\u2028":
1025                                         return "\\u2028";
1026                                 case "\u2029":
1027                                         return "\\u2029";
1028                                 /* istanbul ignore next */
1029                                 default:
1030                                         throw new Error("Unexpected character");
1031                         }
1032                 });
1033                 return string;
1034         };
1035
1036         var resolveMessage = function (message, value) {
1037                 return message.replace("%v", toShortString(value));
1038         };
1039
1040         var resolveException = function (value, defaultMessage, inputOptions) {
1041                 if (!is$1(inputOptions)) { throw new TypeError(resolveMessage(defaultMessage, value)); }
1042                 if (!is(value)) {
1043                         if ("default" in inputOptions) { return inputOptions["default"]; }
1044                         if (inputOptions.isOptional) { return null; }
1045                 }
1046                 var errorMessage = coerce(inputOptions.errorMessage);
1047                 if (!is(errorMessage)) { errorMessage = defaultMessage; }
1048                 throw new TypeError(resolveMessage(errorMessage, value));
1049         };
1050
1051         var ensure = function (value/*, options*/) {
1052                 if (is(value)) { return value; }
1053                 return resolveException(value, "Cannot use %v", arguments[1]);
1054         };
1055
1056         var ensure$1 = function (value/*, options*/) {
1057                 if (is$4(value)) { return value; }
1058                 return resolveException(value, "%v is not a plain function", arguments[1]);
1059         };
1060
1061         var isImplemented$a = function () {
1062                 var from = Array.from, arr, result;
1063                 if (typeof from !== "function") { return false; }
1064                 arr = ["raz", "dwa"];
1065                 result = from(arr);
1066                 return Boolean(result && result !== arr && result[1] === "dwa");
1067         };
1068
1069         var objToString$2 = Object.prototype.toString
1070           , isFunctionStringTag = RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);
1071
1072         var isFunction = function (value) {
1073                 return typeof value === "function" && isFunctionStringTag(objToString$2.call(value));
1074         };
1075
1076         var iteratorSymbol$1 = es6Symbol$1.iterator
1077           , isArray$1        = Array.isArray
1078           , call           = Function.prototype.call
1079           , desc           = { configurable: true, enumerable: true, writable: true, value: null }
1080           , defineProperty$4 = Object.defineProperty;
1081
1082         // eslint-disable-next-line complexity, max-lines-per-function
1083         var shim$7 = function (arrayLike/*, mapFn, thisArg*/) {
1084                 var mapFn = arguments[1]
1085                   , thisArg = arguments[2]
1086                   , Context
1087                   , i
1088                   , j
1089                   , arr
1090                   , length
1091                   , code
1092                   , iterator
1093                   , result
1094                   , getIterator
1095                   , value;
1096
1097                 arrayLike = Object(validValue(arrayLike));
1098
1099                 if (isValue(mapFn)) { validCallable(mapFn); }
1100                 if (!this || this === Array || !isFunction(this)) {
1101                         // Result: Plain array
1102                         if (!mapFn) {
1103                                 if (isArguments(arrayLike)) {
1104                                         // Source: Arguments
1105                                         length = arrayLike.length;
1106                                         if (length !== 1) { return Array.apply(null, arrayLike); }
1107                                         arr = new Array(1);
1108                                         arr[0] = arrayLike[0];
1109                                         return arr;
1110                                 }
1111                                 if (isArray$1(arrayLike)) {
1112                                         // Source: Array
1113                                         arr = new Array((length = arrayLike.length));
1114                                         for (i = 0; i < length; ++i) { arr[i] = arrayLike[i]; }
1115                                         return arr;
1116                                 }
1117                         }
1118                         arr = [];
1119                 } else {
1120                         // Result: Non plain array
1121                         Context = this;
1122                 }
1123
1124                 if (!isArray$1(arrayLike)) {
1125                         if ((getIterator = arrayLike[iteratorSymbol$1]) !== undefined) {
1126                                 // Source: Iterator
1127                                 iterator = validCallable(getIterator).call(arrayLike);
1128                                 if (Context) { arr = new Context(); }
1129                                 result = iterator.next();
1130                                 i = 0;
1131                                 while (!result.done) {
1132                                         value = mapFn ? call.call(mapFn, thisArg, result.value, i) : result.value;
1133                                         if (Context) {
1134                                                 desc.value = value;
1135                                                 defineProperty$4(arr, i, desc);
1136                                         } else {
1137                                                 arr[i] = value;
1138                                         }
1139                                         result = iterator.next();
1140                                         ++i;
1141                                 }
1142                                 length = i;
1143                         } else if (isString(arrayLike)) {
1144                                 // Source: String
1145                                 length = arrayLike.length;
1146                                 if (Context) { arr = new Context(); }
1147                                 for (i = 0, j = 0; i < length; ++i) {
1148                                         value = arrayLike[i];
1149                                         if (i + 1 < length) {
1150                                                 code = value.charCodeAt(0);
1151                                                 // eslint-disable-next-line max-depth
1152                                                 if (code >= 0xd800 && code <= 0xdbff) { value += arrayLike[++i]; }
1153                                         }
1154                                         value = mapFn ? call.call(mapFn, thisArg, value, j) : value;
1155                                         if (Context) {
1156                                                 desc.value = value;
1157                                                 defineProperty$4(arr, j, desc);
1158                                         } else {
1159                                                 arr[j] = value;
1160                                         }
1161                                         ++j;
1162                                 }
1163                                 length = j;
1164                         }
1165                 }
1166                 if (length === undefined) {
1167                         // Source: array or array-like
1168                         length = toPosInteger(arrayLike.length);
1169                         if (Context) { arr = new Context(length); }
1170                         for (i = 0; i < length; ++i) {
1171                                 value = mapFn ? call.call(mapFn, thisArg, arrayLike[i], i) : arrayLike[i];
1172                                 if (Context) {
1173                                         desc.value = value;
1174                                         defineProperty$4(arr, i, desc);
1175                                 } else {
1176                                         arr[i] = value;
1177                                 }
1178                         }
1179                 }
1180                 if (Context) {
1181                         desc.value = null;
1182                         arr.length = length;
1183                 }
1184                 return arr;
1185         };
1186
1187         var from_1 = isImplemented$a() ? Array.from : shim$7;
1188
1189         var copy = function (obj/*, propertyNames, options*/) {
1190                 var copy = Object(validValue(obj)), propertyNames = arguments[1], options = Object(arguments[2]);
1191                 if (copy !== obj && !propertyNames) { return copy; }
1192                 var result = {};
1193                 if (propertyNames) {
1194                         from_1(propertyNames, function (propertyName) {
1195                                 if (options.ensure || propertyName in obj) { result[propertyName] = obj[propertyName]; }
1196                         });
1197                 } else {
1198                         assign(result, obj);
1199                 }
1200                 return result;
1201         };
1202
1203         var bind                    = Function.prototype.bind
1204           , call$1                    = Function.prototype.call
1205           , keys$2                    = Object.keys
1206           , objPropertyIsEnumerable = Object.prototype.propertyIsEnumerable;
1207
1208         var _iterate = function (method, defVal) {
1209                 return function (obj, cb/*, thisArg, compareFn*/) {
1210                         var list, thisArg = arguments[2], compareFn = arguments[3];
1211                         obj = Object(validValue(obj));
1212                         validCallable(cb);
1213
1214                         list = keys$2(obj);
1215                         if (compareFn) {
1216                                 list.sort(typeof compareFn === "function" ? bind.call(compareFn, obj) : undefined);
1217                         }
1218                         if (typeof method !== "function") { method = list[method]; }
1219                         return call$1.call(method, list, function (key, index) {
1220                                 if (!objPropertyIsEnumerable.call(obj, key)) { return defVal; }
1221                                 return call$1.call(cb, thisArg, obj[key], key, obj, index);
1222                         });
1223                 };
1224         };
1225
1226         var forEach$1 = _iterate("forEach");
1227
1228         var call$2     = Function.prototype.call;
1229
1230         var map$1 = function (obj, cb/*, thisArg*/) {
1231                 var result = {}, thisArg = arguments[2];
1232                 validCallable(cb);
1233                 forEach$1(obj, function (value, key, targetObj, index) {
1234                         result[key] = call$2.call(cb, thisArg, value, key, targetObj, index);
1235                 });
1236                 return result;
1237         };
1238
1239         var bind$1 = Function.prototype.bind
1240           , defineProperty$5 = Object.defineProperty
1241           , hasOwnProperty$1 = Object.prototype.hasOwnProperty
1242           , define;
1243
1244         define = function (name, desc, options) {
1245                 var value = ensure(desc) && ensure$1(desc.value), dgs;
1246                 dgs = copy(desc);
1247                 delete dgs.writable;
1248                 delete dgs.value;
1249                 dgs.get = function () {
1250                         if (!options.overwriteDefinition && hasOwnProperty$1.call(this, name)) { return value; }
1251                         desc.value = bind$1.call(value, options.resolveContext ? options.resolveContext(this) : this);
1252                         defineProperty$5(this, name, desc);
1253                         return this[name];
1254                 };
1255                 return dgs;
1256         };
1257
1258         var autoBind = function (props/*, options*/) {
1259                 var options = normalizeOptions(arguments[1]);
1260                 if (is(options.resolveContext)) { ensure$1(options.resolveContext); }
1261                 return map$1(props, function (desc, name) { return define(name, desc, options); });
1262         };
1263
1264         var defineProperty$6 = Object.defineProperty, defineProperties$2 = Object.defineProperties, Iterator;
1265
1266         var es6Iterator = Iterator = function (list, context) {
1267                 if (!(this instanceof Iterator)) { throw new TypeError("Constructor requires 'new'"); }
1268                 defineProperties$2(this, {
1269                         __list__: d_1("w", validValue(list)),
1270                         __context__: d_1("w", context),
1271                         __nextIndex__: d_1("w", 0)
1272                 });
1273                 if (!context) { return; }
1274                 validCallable(context.on);
1275                 context.on("_add", this._onAdd);
1276                 context.on("_delete", this._onDelete);
1277                 context.on("_clear", this._onClear);
1278         };
1279
1280         // Internal %IteratorPrototype% doesn't expose its constructor
1281         delete Iterator.prototype.constructor;
1282
1283         defineProperties$2(
1284                 Iterator.prototype,
1285                 assign(
1286                         {
1287                                 _next: d_1(function () {
1288                                         var i;
1289                                         if (!this.__list__) { return undefined; }
1290                                         if (this.__redo__) {
1291                                                 i = this.__redo__.shift();
1292                                                 if (i !== undefined) { return i; }
1293                                         }
1294                                         if (this.__nextIndex__ < this.__list__.length) { return this.__nextIndex__++; }
1295                                         this._unBind();
1296                                         return undefined;
1297                                 }),
1298                                 next: d_1(function () {
1299                                         return this._createResult(this._next());
1300                                 }),
1301                                 _createResult: d_1(function (i) {
1302                                         if (i === undefined) { return { done: true, value: undefined }; }
1303                                         return { done: false, value: this._resolve(i) };
1304                                 }),
1305                                 _resolve: d_1(function (i) {
1306                                         return this.__list__[i];
1307                                 }),
1308                                 _unBind: d_1(function () {
1309                                         this.__list__ = null;
1310                                         delete this.__redo__;
1311                                         if (!this.__context__) { return; }
1312                                         this.__context__.off("_add", this._onAdd);
1313                                         this.__context__.off("_delete", this._onDelete);
1314                                         this.__context__.off("_clear", this._onClear);
1315                                         this.__context__ = null;
1316                                 }),
1317                                 toString: d_1(function () {
1318                                         return "[object " + (this[es6Symbol$1.toStringTag] || "Object") + "]";
1319                                 })
1320                         },
1321                         autoBind({
1322                                 _onAdd: d_1(function (index) {
1323                                         if (index >= this.__nextIndex__) { return; }
1324                                         ++this.__nextIndex__;
1325                                         if (!this.__redo__) {
1326                                                 defineProperty$6(this, "__redo__", d_1("c", [index]));
1327                                                 return;
1328                                         }
1329                                         this.__redo__.forEach(function (redo, i) {
1330                                                 if (redo >= index) { this.__redo__[i] = ++redo; }
1331                                         }, this);
1332                                         this.__redo__.push(index);
1333                                 }),
1334                                 _onDelete: d_1(function (index) {
1335                                         var i;
1336                                         if (index >= this.__nextIndex__) { return; }
1337                                         --this.__nextIndex__;
1338                                         if (!this.__redo__) { return; }
1339                                         i = this.__redo__.indexOf(index);
1340                                         if (i !== -1) { this.__redo__.splice(i, 1); }
1341                                         this.__redo__.forEach(function (redo, j) {
1342                                                 if (redo > index) { this.__redo__[j] = --redo; }
1343                                         }, this);
1344                                 }),
1345                                 _onClear: d_1(function () {
1346                                         if (this.__redo__) { clear.call(this.__redo__); }
1347                                         this.__nextIndex__ = 0;
1348                                 })
1349                         })
1350                 )
1351         );
1352
1353         defineProperty$6(
1354                 Iterator.prototype,
1355                 es6Symbol$1.iterator,
1356                 d_1(function () {
1357                         return this;
1358                 })
1359         );
1360
1361         var array = createCommonjsModule(function (module) {
1362
1363
1364
1365         var defineProperty = Object.defineProperty, ArrayIterator;
1366
1367         ArrayIterator = module.exports = function (arr, kind) {
1368                 if (!(this instanceof ArrayIterator)) { throw new TypeError("Constructor requires 'new'"); }
1369                 es6Iterator.call(this, arr);
1370                 if (!kind) { kind = "value"; }
1371                 else if (contains.call(kind, "key+value")) { kind = "key+value"; }
1372                 else if (contains.call(kind, "key")) { kind = "key"; }
1373                 else { kind = "value"; }
1374                 defineProperty(this, "__kind__", d_1("", kind));
1375         };
1376         if (setPrototypeOf) { setPrototypeOf(ArrayIterator, es6Iterator); }
1377
1378         // Internal %ArrayIteratorPrototype% doesn't expose its constructor
1379         delete ArrayIterator.prototype.constructor;
1380
1381         ArrayIterator.prototype = Object.create(es6Iterator.prototype, {
1382                 _resolve: d_1(function (i) {
1383                         if (this.__kind__ === "value") { return this.__list__[i]; }
1384                         if (this.__kind__ === "key+value") { return [i, this.__list__[i]]; }
1385                         return i;
1386                 })
1387         });
1388         defineProperty(ArrayIterator.prototype, es6Symbol$1.toStringTag, d_1("c", "Array Iterator"));
1389         });
1390
1391         var string = createCommonjsModule(function (module) {
1392
1393
1394
1395         var defineProperty = Object.defineProperty, StringIterator;
1396
1397         StringIterator = module.exports = function (str) {
1398                 if (!(this instanceof StringIterator)) { throw new TypeError("Constructor requires 'new'"); }
1399                 str = String(str);
1400                 es6Iterator.call(this, str);
1401                 defineProperty(this, "__length__", d_1("", str.length));
1402         };
1403         if (setPrototypeOf) { setPrototypeOf(StringIterator, es6Iterator); }
1404
1405         // Internal %ArrayIteratorPrototype% doesn't expose its constructor
1406         delete StringIterator.prototype.constructor;
1407
1408         StringIterator.prototype = Object.create(es6Iterator.prototype, {
1409                 _next: d_1(function () {
1410                         if (!this.__list__) { return undefined; }
1411                         if (this.__nextIndex__ < this.__length__) { return this.__nextIndex__++; }
1412                         this._unBind();
1413                         return undefined;
1414                 }),
1415                 _resolve: d_1(function (i) {
1416                         var char = this.__list__[i], code;
1417                         if (this.__nextIndex__ === this.__length__) { return char; }
1418                         code = char.charCodeAt(0);
1419                         if (code >= 0xd800 && code <= 0xdbff) { return char + this.__list__[this.__nextIndex__++]; }
1420                         return char;
1421                 })
1422         });
1423         defineProperty(StringIterator.prototype, es6Symbol$1.toStringTag, d_1("c", "String Iterator"));
1424         });
1425
1426         var iteratorSymbol$2 = es6Symbol$1.iterator;
1427
1428         var get = function (obj) {
1429                 if (typeof validIterable(obj)[iteratorSymbol$2] === "function") { return obj[iteratorSymbol$2](); }
1430                 if (isArguments(obj)) { return new array(obj); }
1431                 if (isString(obj)) { return new string(obj); }
1432                 return new array(obj);
1433         };
1434
1435         var isArray$2 = Array.isArray, call$3 = Function.prototype.call, some = Array.prototype.some;
1436
1437         var forOf = function (iterable, cb /*, thisArg*/) {
1438                 var mode, thisArg = arguments[2], result, doBreak, broken, i, length, char, code;
1439                 if (isArray$2(iterable) || isArguments(iterable)) { mode = "array"; }
1440                 else if (isString(iterable)) { mode = "string"; }
1441                 else { iterable = get(iterable); }
1442
1443                 validCallable(cb);
1444                 doBreak = function () {
1445                         broken = true;
1446                 };
1447                 if (mode === "array") {
1448                         some.call(iterable, function (value) {
1449                                 call$3.call(cb, thisArg, value, doBreak);
1450                                 return broken;
1451                         });
1452                         return;
1453                 }
1454                 if (mode === "string") {
1455                         length = iterable.length;
1456                         for (i = 0; i < length; ++i) {
1457                                 char = iterable[i];
1458                                 if (i + 1 < length) {
1459                                         code = char.charCodeAt(0);
1460                                         if (code >= 0xd800 && code <= 0xdbff) { char += iterable[++i]; }
1461                                 }
1462                                 call$3.call(cb, thisArg, char, doBreak);
1463                                 if (broken) { break; }
1464                         }
1465                         return;
1466                 }
1467                 result = iterable.next();
1468
1469                 while (!result.done) {
1470                         call$3.call(cb, thisArg, result.value, doBreak);
1471                         if (broken) { return; }
1472                         result = iterable.next();
1473                 }
1474         };
1475
1476         var iterator = createCommonjsModule(function (module) {
1477
1478         var toStringTagSymbol = es6Symbol.toStringTag
1479
1480           , defineProperty = Object.defineProperty
1481           , SetIterator;
1482
1483         SetIterator = module.exports = function (set, kind) {
1484                 if (!(this instanceof SetIterator)) { return new SetIterator(set, kind); }
1485                 es6Iterator.call(this, set.__setData__, set);
1486                 if (!kind) { kind = 'value'; }
1487                 else if (contains.call(kind, 'key+value')) { kind = 'key+value'; }
1488                 else { kind = 'value'; }
1489                 defineProperty(this, '__kind__', d_1('', kind));
1490         };
1491         if (setPrototypeOf) { setPrototypeOf(SetIterator, es6Iterator); }
1492
1493         SetIterator.prototype = Object.create(es6Iterator.prototype, {
1494                 constructor: d_1(SetIterator),
1495                 _resolve: d_1(function (i) {
1496                         if (this.__kind__ === 'value') { return this.__list__[i]; }
1497                         return [this.__list__[i], this.__list__[i]];
1498                 }),
1499                 toString: d_1(function () { return '[object Set Iterator]'; })
1500         });
1501         defineProperty(SetIterator.prototype, toStringTagSymbol, d_1('c', 'Set Iterator'));
1502         });
1503
1504         // Exports true if environment provides native `Set` implementation,
1505
1506         var isNativeImplemented = (function () {
1507                 if (typeof Set === 'undefined') { return false; }
1508                 return (Object.prototype.toString.call(Set.prototype) === '[object Set]');
1509         }());
1510
1511         var iterator$1       = validIterable
1512
1513           , call$4 = Function.prototype.call
1514           , defineProperty$7 = Object.defineProperty, getPrototypeOf$1 = Object.getPrototypeOf
1515           , SetPoly, getValues, NativeSet;
1516
1517         if (isNativeImplemented) { NativeSet = Set; }
1518
1519         var polyfill$2 = SetPoly = function Set(/*iterable*/) {
1520                 var iterable = arguments[0], self;
1521                 if (!(this instanceof SetPoly)) { throw new TypeError('Constructor requires \'new\''); }
1522                 if (isNativeImplemented && setPrototypeOf) { self = setPrototypeOf(new NativeSet(), getPrototypeOf$1(this)); }
1523                 else { self = this; }
1524                 if (iterable != null) { iterator$1(iterable); }
1525                 defineProperty$7(self, '__setData__', d_1('c', []));
1526                 if (!iterable) { return self; }
1527                 forOf(iterable, function (value) {
1528                         if (eIndexOf.call(this, value) !== -1) { return; }
1529                         this.push(value);
1530                 }, self.__setData__);
1531                 return self;
1532         };
1533
1534         if (isNativeImplemented) {
1535                 if (setPrototypeOf) { setPrototypeOf(SetPoly, NativeSet); }
1536                 SetPoly.prototype = Object.create(NativeSet.prototype, { constructor: d_1(SetPoly) });
1537         }
1538
1539         eventEmitter(Object.defineProperties(SetPoly.prototype, {
1540                 add: d_1(function (value) {
1541                         if (this.has(value)) { return this; }
1542                         this.emit('_add', this.__setData__.push(value) - 1, value);
1543                         return this;
1544                 }),
1545                 clear: d_1(function () {
1546                         if (!this.__setData__.length) { return; }
1547                         clear.call(this.__setData__);
1548                         this.emit('_clear');
1549                 }),
1550                 delete: d_1(function (value) {
1551                         var index = eIndexOf.call(this.__setData__, value);
1552                         if (index === -1) { return false; }
1553                         this.__setData__.splice(index, 1);
1554                         this.emit('_delete', index, value);
1555                         return true;
1556                 }),
1557                 entries: d_1(function () { return new iterator(this, 'key+value'); }),
1558                 forEach: d_1(function (cb/*, thisArg*/) {
1559                         var thisArg = arguments[1], iterator, result, value;
1560                         validCallable(cb);
1561                         iterator = this.values();
1562                         result = iterator._next();
1563                         while (result !== undefined) {
1564                                 value = iterator._resolve(result);
1565                                 call$4.call(cb, thisArg, value, value, this);
1566                                 result = iterator._next();
1567                         }
1568                 }),
1569                 has: d_1(function (value) {
1570                         return (eIndexOf.call(this.__setData__, value) !== -1);
1571                 }),
1572                 keys: d_1(getValues = function () { return this.values(); }),
1573                 size: d_1.gs(function () { return this.__setData__.length; }),
1574                 values: d_1(function () { return new iterator(this); }),
1575                 toString: d_1(function () { return '[object Set]'; })
1576         }));
1577         defineProperty$7(SetPoly.prototype, es6Symbol.iterator, d_1(getValues));
1578         defineProperty$7(SetPoly.prototype, es6Symbol.toStringTag, d_1('c', 'Set'));
1579
1580         var es6Set = isImplemented() ? Set : polyfill$2;
1581
1582         var isImplemented$b = function () {
1583                 var map, iterator, result;
1584                 if (typeof Map !== 'function') { return false; }
1585                 try {
1586                         // WebKit doesn't support arguments and crashes
1587                         map = new Map([['raz', 'one'], ['dwa', 'two'], ['trzy', 'three']]);
1588                 } catch (e) {
1589                         return false;
1590                 }
1591                 if (String(map) !== '[object Map]') { return false; }
1592                 if (map.size !== 3) { return false; }
1593                 if (typeof map.clear !== 'function') { return false; }
1594                 if (typeof map.delete !== 'function') { return false; }
1595                 if (typeof map.entries !== 'function') { return false; }
1596                 if (typeof map.forEach !== 'function') { return false; }
1597                 if (typeof map.get !== 'function') { return false; }
1598                 if (typeof map.has !== 'function') { return false; }
1599                 if (typeof map.keys !== 'function') { return false; }
1600                 if (typeof map.set !== 'function') { return false; }
1601                 if (typeof map.values !== 'function') { return false; }
1602
1603                 iterator = map.entries();
1604                 result = iterator.next();
1605                 if (result.done !== false) { return false; }
1606                 if (!result.value) { return false; }
1607                 if (result.value[0] !== 'raz') { return false; }
1608                 if (result.value[1] !== 'one') { return false; }
1609
1610                 return true;
1611         };
1612
1613         var forEach$2 = Array.prototype.forEach, create$6 = Object.create;
1614
1615         // eslint-disable-next-line no-unused-vars
1616         var primitiveSet = function (arg/*, …args*/) {
1617                 var set = create$6(null);
1618                 forEach$2.call(arguments, function (name) { set[name] = true; });
1619                 return set;
1620         };
1621
1622         var iteratorKinds = primitiveSet('key',
1623                 'value', 'key+value');
1624
1625         var iterator$2 = createCommonjsModule(function (module) {
1626
1627         var toStringTagSymbol = es6Symbol$1.toStringTag
1628
1629           , defineProperties = Object.defineProperties
1630           , unBind = es6Iterator.prototype._unBind
1631           , MapIterator;
1632
1633         MapIterator = module.exports = function (map, kind) {
1634                 if (!(this instanceof MapIterator)) { return new MapIterator(map, kind); }
1635                 es6Iterator.call(this, map.__mapKeysData__, map);
1636                 if (!kind || !iteratorKinds[kind]) { kind = 'key+value'; }
1637                 defineProperties(this, {
1638                         __kind__: d_1('', kind),
1639                         __values__: d_1('w', map.__mapValuesData__)
1640                 });
1641         };
1642         if (setPrototypeOf) { setPrototypeOf(MapIterator, es6Iterator); }
1643
1644         MapIterator.prototype = Object.create(es6Iterator.prototype, {
1645                 constructor: d_1(MapIterator),
1646                 _resolve: d_1(function (i) {
1647                         if (this.__kind__ === 'value') { return this.__values__[i]; }
1648                         if (this.__kind__ === 'key') { return this.__list__[i]; }
1649                         return [this.__list__[i], this.__values__[i]];
1650                 }),
1651                 _unBind: d_1(function () {
1652                         this.__values__ = null;
1653                         unBind.call(this);
1654                 }),
1655                 toString: d_1(function () { return '[object Map Iterator]'; })
1656         });
1657         Object.defineProperty(MapIterator.prototype, toStringTagSymbol,
1658                 d_1('c', 'Map Iterator'));
1659         });
1660
1661         // Exports true if environment provides native `Map` implementation,
1662
1663         var isNativeImplemented$1 = (function () {
1664                 if (typeof Map === 'undefined') { return false; }
1665                 return (Object.prototype.toString.call(new Map()) === '[object Map]');
1666         }());
1667
1668         var iterator$3       = validIterable
1669
1670           , call$5 = Function.prototype.call
1671           , defineProperties$3 = Object.defineProperties, getPrototypeOf$2 = Object.getPrototypeOf
1672           , MapPoly;
1673
1674         var polyfill$3 = MapPoly = function (/*iterable*/) {
1675                 var iterable = arguments[0], keys, values, self;
1676                 if (!(this instanceof MapPoly)) { throw new TypeError('Constructor requires \'new\''); }
1677                 if (isNativeImplemented$1 && setPrototypeOf && (Map !== MapPoly)) {
1678                         self = setPrototypeOf(new Map(), getPrototypeOf$2(this));
1679                 } else {
1680                         self = this;
1681                 }
1682                 if (iterable != null) { iterator$3(iterable); }
1683                 defineProperties$3(self, {
1684                         __mapKeysData__: d_1('c', keys = []),
1685                         __mapValuesData__: d_1('c', values = [])
1686                 });
1687                 if (!iterable) { return self; }
1688                 forOf(iterable, function (value) {
1689                         var key = validValue(value)[0];
1690                         value = value[1];
1691                         if (eIndexOf.call(keys, key) !== -1) { return; }
1692                         keys.push(key);
1693                         values.push(value);
1694                 }, self);
1695                 return self;
1696         };
1697
1698         if (isNativeImplemented$1) {
1699                 if (setPrototypeOf) { setPrototypeOf(MapPoly, Map); }
1700                 MapPoly.prototype = Object.create(Map.prototype, {
1701                         constructor: d_1(MapPoly)
1702                 });
1703         }
1704
1705         eventEmitter(defineProperties$3(MapPoly.prototype, {
1706                 clear: d_1(function () {
1707                         if (!this.__mapKeysData__.length) { return; }
1708                         clear.call(this.__mapKeysData__);
1709                         clear.call(this.__mapValuesData__);
1710                         this.emit('_clear');
1711                 }),
1712                 delete: d_1(function (key) {
1713                         var index = eIndexOf.call(this.__mapKeysData__, key);
1714                         if (index === -1) { return false; }
1715                         this.__mapKeysData__.splice(index, 1);
1716                         this.__mapValuesData__.splice(index, 1);
1717                         this.emit('_delete', index, key);
1718                         return true;
1719                 }),
1720                 entries: d_1(function () { return new iterator$2(this, 'key+value'); }),
1721                 forEach: d_1(function (cb/*, thisArg*/) {
1722                         var thisArg = arguments[1], iterator, result;
1723                         validCallable(cb);
1724                         iterator = this.entries();
1725                         result = iterator._next();
1726                         while (result !== undefined) {
1727                                 call$5.call(cb, thisArg, this.__mapValuesData__[result],
1728                                         this.__mapKeysData__[result], this);
1729                                 result = iterator._next();
1730                         }
1731                 }),
1732                 get: d_1(function (key) {
1733                         var index = eIndexOf.call(this.__mapKeysData__, key);
1734                         if (index === -1) { return; }
1735                         return this.__mapValuesData__[index];
1736                 }),
1737                 has: d_1(function (key) {
1738                         return (eIndexOf.call(this.__mapKeysData__, key) !== -1);
1739                 }),
1740                 keys: d_1(function () { return new iterator$2(this, 'key'); }),
1741                 set: d_1(function (key, value) {
1742                         var index = eIndexOf.call(this.__mapKeysData__, key), emit;
1743                         if (index === -1) {
1744                                 index = this.__mapKeysData__.push(key) - 1;
1745                                 emit = true;
1746                         }
1747                         this.__mapValuesData__[index] = value;
1748                         if (emit) { this.emit('_add', index, key); }
1749                         return this;
1750                 }),
1751                 size: d_1.gs(function () { return this.__mapKeysData__.length; }),
1752                 values: d_1(function () { return new iterator$2(this, 'value'); }),
1753                 toString: d_1(function () { return '[object Map]'; })
1754         }));
1755         Object.defineProperty(MapPoly.prototype, es6Symbol$1.iterator, d_1(function () {
1756                 return this.entries();
1757         }));
1758         Object.defineProperty(MapPoly.prototype, es6Symbol$1.toStringTag, d_1('c', 'Map'));
1759
1760         var es6Map = isImplemented$b() ? Map : polyfill$3;
1761
1762         var toStr = Object.prototype.toString;
1763
1764         var isArguments$1 = function isArguments(value) {
1765                 var str = toStr.call(value);
1766                 var isArgs = str === '[object Arguments]';
1767                 if (!isArgs) {
1768                         isArgs = str !== '[object Array]' &&
1769                                 value !== null &&
1770                                 typeof value === 'object' &&
1771                                 typeof value.length === 'number' &&
1772                                 value.length >= 0 &&
1773                                 toStr.call(value.callee) === '[object Function]';
1774                 }
1775                 return isArgs;
1776         };
1777
1778         var keysShim;
1779         if (!Object.keys) {
1780                 // modified from https://github.com/es-shims/es5-shim
1781                 var has = Object.prototype.hasOwnProperty;
1782                 var toStr$1 = Object.prototype.toString;
1783                 var isArgs = isArguments$1; // eslint-disable-line global-require
1784                 var isEnumerable = Object.prototype.propertyIsEnumerable;
1785                 var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString');
1786                 var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype');
1787                 var dontEnums = [
1788                         'toString',
1789                         'toLocaleString',
1790                         'valueOf',
1791                         'hasOwnProperty',
1792                         'isPrototypeOf',
1793                         'propertyIsEnumerable',
1794                         'constructor'
1795                 ];
1796                 var equalsConstructorPrototype = function (o) {
1797                         var ctor = o.constructor;
1798                         return ctor && ctor.prototype === o;
1799                 };
1800                 var excludedKeys = {
1801                         $applicationCache: true,
1802                         $console: true,
1803                         $external: true,
1804                         $frame: true,
1805                         $frameElement: true,
1806                         $frames: true,
1807                         $innerHeight: true,
1808                         $innerWidth: true,
1809                         $onmozfullscreenchange: true,
1810                         $onmozfullscreenerror: true,
1811                         $outerHeight: true,
1812                         $outerWidth: true,
1813                         $pageXOffset: true,
1814                         $pageYOffset: true,
1815                         $parent: true,
1816                         $scrollLeft: true,
1817                         $scrollTop: true,
1818                         $scrollX: true,
1819                         $scrollY: true,
1820                         $self: true,
1821                         $webkitIndexedDB: true,
1822                         $webkitStorageInfo: true,
1823                         $window: true
1824                 };
1825                 var hasAutomationEqualityBug = (function () {
1826                         /* global window */
1827                         if (typeof window === 'undefined') { return false; }
1828                         for (var k in window) {
1829                                 try {
1830                                         if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') {
1831                                                 try {
1832                                                         equalsConstructorPrototype(window[k]);
1833                                                 } catch (e) {
1834                                                         return true;
1835                                                 }
1836                                         }
1837                                 } catch (e) {
1838                                         return true;
1839                                 }
1840                         }
1841                         return false;
1842                 }());
1843                 var equalsConstructorPrototypeIfNotBuggy = function (o) {
1844                         /* global window */
1845                         if (typeof window === 'undefined' || !hasAutomationEqualityBug) {
1846                                 return equalsConstructorPrototype(o);
1847                         }
1848                         try {
1849                                 return equalsConstructorPrototype(o);
1850                         } catch (e) {
1851                                 return false;
1852                         }
1853                 };
1854
1855                 keysShim = function keys(object) {
1856                         var isObject = object !== null && typeof object === 'object';
1857                         var isFunction = toStr$1.call(object) === '[object Function]';
1858                         var isArguments = isArgs(object);
1859                         var isString = isObject && toStr$1.call(object) === '[object String]';
1860                         var theKeys = [];
1861
1862                         if (!isObject && !isFunction && !isArguments) {
1863                                 throw new TypeError('Object.keys called on a non-object');
1864                         }
1865
1866                         var skipProto = hasProtoEnumBug && isFunction;
1867                         if (isString && object.length > 0 && !has.call(object, 0)) {
1868                                 for (var i = 0; i < object.length; ++i) {
1869                                         theKeys.push(String(i));
1870                                 }
1871                         }
1872
1873                         if (isArguments && object.length > 0) {
1874                                 for (var j = 0; j < object.length; ++j) {
1875                                         theKeys.push(String(j));
1876                                 }
1877                         } else {
1878                                 for (var name in object) {
1879                                         if (!(skipProto && name === 'prototype') && has.call(object, name)) {
1880                                                 theKeys.push(String(name));
1881                                         }
1882                                 }
1883                         }
1884
1885                         if (hasDontEnumBug) {
1886                                 var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object);
1887
1888                                 for (var k = 0; k < dontEnums.length; ++k) {
1889                                         if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
1890                                                 theKeys.push(dontEnums[k]);
1891                                         }
1892                                 }
1893                         }
1894                         return theKeys;
1895                 };
1896         }
1897         var implementation$1 = keysShim;
1898
1899         var slice = Array.prototype.slice;
1900
1901
1902         var origKeys = Object.keys;
1903         var keysShim$1 = origKeys ? function keys(o) { return origKeys(o); } : implementation$1;
1904
1905         var originalKeys = Object.keys;
1906
1907         keysShim$1.shim = function shimObjectKeys() {
1908                 if (Object.keys) {
1909                         var keysWorksWithArguments = (function () {
1910                                 // Safari 5.0 bug
1911                                 var args = Object.keys(arguments);
1912                                 return args && args.length === arguments.length;
1913                         }(1, 2));
1914                         if (!keysWorksWithArguments) {
1915                                 Object.keys = function keys(object) { // eslint-disable-line func-name-matching
1916                                         if (isArguments$1(object)) {
1917                                                 return originalKeys(slice.call(object));
1918                                         }
1919                                         return originalKeys(object);
1920                                 };
1921                         }
1922                 } else {
1923                         Object.keys = keysShim$1;
1924                 }
1925                 return Object.keys || keysShim$1;
1926         };
1927
1928         var objectKeys = keysShim$1;
1929
1930         var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol';
1931
1932         var toStr$2 = Object.prototype.toString;
1933         var concat = Array.prototype.concat;
1934         var origDefineProperty = Object.defineProperty;
1935
1936         var isFunction$1 = function (fn) {
1937                 return typeof fn === 'function' && toStr$2.call(fn) === '[object Function]';
1938         };
1939
1940         var arePropertyDescriptorsSupported = function () {
1941                 var obj = {};
1942                 try {
1943                         origDefineProperty(obj, 'x', { enumerable: false, value: obj });
1944                         // eslint-disable-next-line no-unused-vars, no-restricted-syntax
1945                         for (var _ in obj) { // jscs:ignore disallowUnusedVariables
1946                                 return false;
1947                         }
1948                         return obj.x === obj;
1949                 } catch (e) { /* this is IE 8. */
1950                         return false;
1951                 }
1952         };
1953         var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported();
1954
1955         var defineProperty$8 = function (object, name, value, predicate) {
1956                 if (name in object && (!isFunction$1(predicate) || !predicate())) {
1957                         return;
1958                 }
1959                 if (supportsDescriptors) {
1960                         origDefineProperty(object, name, {
1961                                 configurable: true,
1962                                 enumerable: false,
1963                                 value: value,
1964                                 writable: true
1965                         });
1966                 } else {
1967                         object[name] = value;
1968                 }
1969         };
1970
1971         var defineProperties$4 = function (object, map) {
1972                 var predicates = arguments.length > 2 ? arguments[2] : {};
1973                 var props = objectKeys(map);
1974                 if (hasSymbols) {
1975                         props = concat.call(props, Object.getOwnPropertySymbols(map));
1976                 }
1977                 for (var i = 0; i < props.length; i += 1) {
1978                         defineProperty$8(object, props[i], map[props[i]], predicates[props[i]]);
1979                 }
1980         };
1981
1982         defineProperties$4.supportsDescriptors = !!supportsDescriptors;
1983
1984         var defineProperties_1 = defineProperties$4;
1985
1986         /* eslint no-invalid-this: 1 */
1987
1988         var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
1989         var slice$1 = Array.prototype.slice;
1990         var toStr$3 = Object.prototype.toString;
1991         var funcType = '[object Function]';
1992
1993         var implementation$2 = function bind(that) {
1994             var target = this;
1995             if (typeof target !== 'function' || toStr$3.call(target) !== funcType) {
1996                 throw new TypeError(ERROR_MESSAGE + target);
1997             }
1998             var args = slice$1.call(arguments, 1);
1999
2000             var bound;
2001             var binder = function () {
2002                 if (this instanceof bound) {
2003                     var result = target.apply(
2004                         this,
2005                         args.concat(slice$1.call(arguments))
2006                     );
2007                     if (Object(result) === result) {
2008                         return result;
2009                     }
2010                     return this;
2011                 } else {
2012                     return target.apply(
2013                         that,
2014                         args.concat(slice$1.call(arguments))
2015                     );
2016                 }
2017             };
2018
2019             var boundLength = Math.max(0, target.length - args.length);
2020             var boundArgs = [];
2021             for (var i = 0; i < boundLength; i++) {
2022                 boundArgs.push('$' + i);
2023             }
2024
2025             bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
2026
2027             if (target.prototype) {
2028                 var Empty = function Empty() {};
2029                 Empty.prototype = target.prototype;
2030                 bound.prototype = new Empty();
2031                 Empty.prototype = null;
2032             }
2033
2034             return bound;
2035         };
2036
2037         var functionBind = Function.prototype.bind || implementation$2;
2038
2039         var src = functionBind.call(Function.call, Object.prototype.hasOwnProperty);
2040
2041         var isPrimitive = function isPrimitive(value) {
2042                 return value === null || (typeof value !== 'function' && typeof value !== 'object');
2043         };
2044
2045         var fnToStr = Function.prototype.toString;
2046
2047         var constructorRegex = /^\s*class\b/;
2048         var isES6ClassFn = function isES6ClassFunction(value) {
2049                 try {
2050                         var fnStr = fnToStr.call(value);
2051                         return constructorRegex.test(fnStr);
2052                 } catch (e) {
2053                         return false; // not a function
2054                 }
2055         };
2056
2057         var tryFunctionObject = function tryFunctionToStr(value) {
2058                 try {
2059                         if (isES6ClassFn(value)) { return false; }
2060                         fnToStr.call(value);
2061                         return true;
2062                 } catch (e) {
2063                         return false;
2064                 }
2065         };
2066         var toStr$4 = Object.prototype.toString;
2067         var fnClass = '[object Function]';
2068         var genClass = '[object GeneratorFunction]';
2069         var hasToStringTag = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
2070
2071         var isCallable = function isCallable(value) {
2072                 if (!value) { return false; }
2073                 if (typeof value !== 'function' && typeof value !== 'object') { return false; }
2074                 if (typeof value === 'function' && !value.prototype) { return true; }
2075                 if (hasToStringTag) { return tryFunctionObject(value); }
2076                 if (isES6ClassFn(value)) { return false; }
2077                 var strClass = toStr$4.call(value);
2078                 return strClass === fnClass || strClass === genClass;
2079         };
2080
2081         var getDay = Date.prototype.getDay;
2082         var tryDateObject = function tryDateObject(value) {
2083                 try {
2084                         getDay.call(value);
2085                         return true;
2086                 } catch (e) {
2087                         return false;
2088                 }
2089         };
2090
2091         var toStr$5 = Object.prototype.toString;
2092         var dateClass = '[object Date]';
2093         var hasToStringTag$1 = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
2094
2095         var isDateObject = function isDateObject(value) {
2096                 if (typeof value !== 'object' || value === null) { return false; }
2097                 return hasToStringTag$1 ? tryDateObject(value) : toStr$5.call(value) === dateClass;
2098         };
2099
2100         /* eslint complexity: [2, 17], max-statements: [2, 33] */
2101         var shams = function hasSymbols() {
2102                 if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
2103                 if (typeof Symbol.iterator === 'symbol') { return true; }
2104
2105                 var obj = {};
2106                 var sym = Symbol('test');
2107                 var symObj = Object(sym);
2108                 if (typeof sym === 'string') { return false; }
2109
2110                 if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
2111                 if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
2112
2113                 // temp disabled per https://github.com/ljharb/object.assign/issues/17
2114                 // if (sym instanceof Symbol) { return false; }
2115                 // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
2116                 // if (!(symObj instanceof Symbol)) { return false; }
2117
2118                 // if (typeof Symbol.prototype.toString !== 'function') { return false; }
2119                 // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
2120
2121                 var symVal = 42;
2122                 obj[sym] = symVal;
2123                 for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax
2124                 if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
2125
2126                 if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
2127
2128                 var syms = Object.getOwnPropertySymbols(obj);
2129                 if (syms.length !== 1 || syms[0] !== sym) { return false; }
2130
2131                 if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
2132
2133                 if (typeof Object.getOwnPropertyDescriptor === 'function') {
2134                         var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
2135                         if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
2136                 }
2137
2138                 return true;
2139         };
2140
2141         var origSymbol = commonjsGlobal.Symbol;
2142
2143
2144         var hasSymbols$1 = function hasNativeSymbols() {
2145                 if (typeof origSymbol !== 'function') { return false; }
2146                 if (typeof Symbol !== 'function') { return false; }
2147                 if (typeof origSymbol('foo') !== 'symbol') { return false; }
2148                 if (typeof Symbol('bar') !== 'symbol') { return false; }
2149
2150                 return shams();
2151         };
2152
2153         var isSymbol$2 = createCommonjsModule(function (module) {
2154
2155         var toStr = Object.prototype.toString;
2156         var hasSymbols = hasSymbols$1();
2157
2158         if (hasSymbols) {
2159                 var symToStr = Symbol.prototype.toString;
2160                 var symStringRegex = /^Symbol\(.*\)$/;
2161                 var isSymbolObject = function isRealSymbolObject(value) {
2162                         if (typeof value.valueOf() !== 'symbol') {
2163                                 return false;
2164                         }
2165                         return symStringRegex.test(symToStr.call(value));
2166                 };
2167
2168                 module.exports = function isSymbol(value) {
2169                         if (typeof value === 'symbol') {
2170                                 return true;
2171                         }
2172                         if (toStr.call(value) !== '[object Symbol]') {
2173                                 return false;
2174                         }
2175                         try {
2176                                 return isSymbolObject(value);
2177                         } catch (e) {
2178                                 return false;
2179                         }
2180                 };
2181         } else {
2182
2183                 module.exports = function isSymbol(value) {
2184                         // this environment does not support Symbols.
2185                         return false ;
2186                 };
2187         }
2188         });
2189
2190         var hasSymbols$2 = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol';
2191
2192
2193
2194
2195
2196
2197         var ordinaryToPrimitive = function OrdinaryToPrimitive(O, hint) {
2198                 if (typeof O === 'undefined' || O === null) {
2199                         throw new TypeError('Cannot call method on ' + O);
2200                 }
2201                 if (typeof hint !== 'string' || (hint !== 'number' && hint !== 'string')) {
2202                         throw new TypeError('hint must be "string" or "number"');
2203                 }
2204                 var methodNames = hint === 'string' ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
2205                 var method, result, i;
2206                 for (i = 0; i < methodNames.length; ++i) {
2207                         method = O[methodNames[i]];
2208                         if (isCallable(method)) {
2209                                 result = method.call(O);
2210                                 if (isPrimitive(result)) {
2211                                         return result;
2212                                 }
2213                         }
2214                 }
2215                 throw new TypeError('No default value');
2216         };
2217
2218         var GetMethod = function GetMethod(O, P) {
2219                 var func = O[P];
2220                 if (func !== null && typeof func !== 'undefined') {
2221                         if (!isCallable(func)) {
2222                                 throw new TypeError(func + ' returned for property ' + P + ' of object ' + O + ' is not a function');
2223                         }
2224                         return func;
2225                 }
2226                 return void 0;
2227         };
2228
2229         // http://www.ecma-international.org/ecma-262/6.0/#sec-toprimitive
2230         var es2015 = function ToPrimitive(input) {
2231                 if (isPrimitive(input)) {
2232                         return input;
2233                 }
2234                 var hint = 'default';
2235                 if (arguments.length > 1) {
2236                         if (arguments[1] === String) {
2237                                 hint = 'string';
2238                         } else if (arguments[1] === Number) {
2239                                 hint = 'number';
2240                         }
2241                 }
2242
2243                 var exoticToPrim;
2244                 if (hasSymbols$2) {
2245                         if (Symbol.toPrimitive) {
2246                                 exoticToPrim = GetMethod(input, Symbol.toPrimitive);
2247                         } else if (isSymbol$2(input)) {
2248                                 exoticToPrim = Symbol.prototype.valueOf;
2249                         }
2250                 }
2251                 if (typeof exoticToPrim !== 'undefined') {
2252                         var result = exoticToPrim.call(input, hint);
2253                         if (isPrimitive(result)) {
2254                                 return result;
2255                         }
2256                         throw new TypeError('unable to convert exotic object to primitive');
2257                 }
2258                 if (hint === 'default' && (isDateObject(input) || isSymbol$2(input))) {
2259                         hint = 'string';
2260                 }
2261                 return ordinaryToPrimitive(input, hint === 'default' ? 'number' : hint);
2262         };
2263
2264         var es6 = es2015;
2265
2266         var objectInspect = function inspect_ (obj, opts, depth, seen) {
2267             if (!opts) { opts = {}; }
2268             
2269             var maxDepth = opts.depth === undefined ? 5 : opts.depth;
2270             if (depth === undefined) { depth = 0; }
2271             if (depth > maxDepth && maxDepth > 0) { return '...'; }
2272             
2273             if (seen === undefined) { seen = []; }
2274             else if (indexOf$2(seen, obj) >= 0) {
2275                 return '[Circular]';
2276             }
2277             
2278             function inspect (value, from) {
2279                 if (from) {
2280                     seen = seen.slice();
2281                     seen.push(from);
2282                 }
2283                 return inspect_(value, opts, depth + 1, seen);
2284             }
2285             
2286             if (typeof obj === 'string') {
2287                 return inspectString(obj);
2288             }
2289             else if (typeof obj === 'function') {
2290                 var name = nameOf(obj);
2291                 return '[Function' + (name ? ': ' + name : '') + ']';
2292             }
2293             else if (obj === null) {
2294                 return 'null';
2295             }
2296             else if (isElement(obj)) {
2297                 var s = '<' + String(obj.nodeName).toLowerCase();
2298                 var attrs = obj.attributes || [];
2299                 for (var i = 0; i < attrs.length; i++) {
2300                     s += ' ' + attrs[i].name + '="' + quote(attrs[i].value) + '"';
2301                 }
2302                 s += '>';
2303                 if (obj.childNodes && obj.childNodes.length) { s += '...'; }
2304                 s += '</' + String(obj.tagName).toLowerCase() + '>';
2305                 return s;
2306             }
2307             else if (isArray$3(obj)) {
2308                 if (obj.length === 0) { return '[]'; }
2309                 var xs = Array(obj.length);
2310                 for (var i = 0; i < obj.length; i++) {
2311                     xs[i] = has$1(obj, i) ? inspect(obj[i], obj) : '';
2312                 }
2313                 return '[ ' + xs.join(', ') + ' ]';
2314             }
2315             else if (typeof obj === 'object' && typeof obj.inspect === 'function') {
2316                 return obj.inspect();
2317             }
2318             else if (typeof obj === 'object' && !isDate(obj) && !isRegExp(obj)) {
2319                 var xs = [], keys = [];
2320                 for (var key in obj) {
2321                     if (has$1(obj, key)) { keys.push(key); }
2322                 }
2323                 keys.sort();
2324                 for (var i = 0; i < keys.length; i++) {
2325                     var key = keys[i];
2326                     if (/[^\w$]/.test(key)) {
2327                         xs.push(inspect(key) + ': ' + inspect(obj[key], obj));
2328                     }
2329                     else { xs.push(key + ': ' + inspect(obj[key], obj)); }
2330                 }
2331                 if (xs.length === 0) { return '{}'; }
2332                 return '{ ' + xs.join(', ') + ' }';
2333             }
2334             else { return String(obj); }
2335         };
2336
2337         function quote (s) {
2338             return String(s).replace(/"/g, '&quot;');
2339         }
2340
2341         function isArray$3 (obj) {
2342             return {}.toString.call(obj) === '[object Array]';
2343         }
2344
2345         function isDate (obj) {
2346             return {}.toString.call(obj) === '[object Date]';
2347         }
2348
2349         function isRegExp (obj) {
2350             return {}.toString.call(obj) === '[object RegExp]';
2351         }
2352
2353         function has$1 (obj, key) {
2354             if (!{}.hasOwnProperty) { return key in obj; }
2355             return {}.hasOwnProperty.call(obj, key);
2356         }
2357
2358         function nameOf (f) {
2359             if (f.name) { return f.name; }
2360             var m = f.toString().match(/^function\s*([\w$]+)/);
2361             if (m) { return m[1]; }
2362         }
2363
2364         function indexOf$2 (xs, x) {
2365             if (xs.indexOf) { return xs.indexOf(x); }
2366             for (var i = 0, l = xs.length; i < l; i++) {
2367                 if (xs[i] === x) { return i; }
2368             }
2369             return -1;
2370         }
2371
2372         function isElement (x) {
2373             if (!x || typeof x !== 'object') { return false; }
2374             if (typeof HTMLElement !== 'undefined') {
2375                 return x instanceof HTMLElement;
2376             }
2377             else { return typeof x.nodeName === 'string'
2378                 && typeof x.getAttribute === 'function'
2379             ; }
2380         }
2381
2382         function inspectString (str) {
2383             var s = str.replace(/(['\\])/g, '\\$1').replace(/[\x00-\x1f]/g, lowbyte);
2384             return "'" + s + "'";
2385             
2386             function lowbyte (c) {
2387                 var n = c.charCodeAt(0);
2388                 var x = { 8: 'b', 9: 't', 10: 'n', 12: 'f', 13: 'r' }[n];
2389                 if (x) { return '\\' + x; }
2390                 return '\\x' + (n < 0x10 ? '0' : '') + n.toString(16);
2391             }
2392         }
2393
2394         /* globals
2395                 Atomics,
2396                 SharedArrayBuffer,
2397         */
2398
2399         var undefined$1; // eslint-disable-line no-shadow-restricted-names
2400
2401         var $TypeError = TypeError;
2402
2403         var ThrowTypeError = Object.getOwnPropertyDescriptor
2404                 ? (function () { return Object.getOwnPropertyDescriptor(arguments, 'callee').get; }())
2405                 : function () { throw new $TypeError(); };
2406
2407         var hasSymbols$3 = hasSymbols$1();
2408
2409         var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
2410         var generatorFunction =  undefined$1;
2411         var asyncFunction =  undefined$1;
2412         var asyncGenFunction =  undefined$1;
2413
2414         var TypedArray = typeof Uint8Array === 'undefined' ? undefined$1 : getProto(Uint8Array);
2415
2416         var INTRINSICS = {
2417                 '$ %Array%': Array,
2418                 '$ %ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
2419                 '$ %ArrayBufferPrototype%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer.prototype,
2420                 '$ %ArrayIteratorPrototype%': hasSymbols$3 ? getProto([][Symbol.iterator]()) : undefined$1,
2421                 '$ %ArrayPrototype%': Array.prototype,
2422                 '$ %ArrayProto_entries%': Array.prototype.entries,
2423                 '$ %ArrayProto_forEach%': Array.prototype.forEach,
2424                 '$ %ArrayProto_keys%': Array.prototype.keys,
2425                 '$ %ArrayProto_values%': Array.prototype.values,
2426                 '$ %AsyncFromSyncIteratorPrototype%': undefined$1,
2427                 '$ %AsyncFunction%': asyncFunction,
2428                 '$ %AsyncFunctionPrototype%':  undefined$1,
2429                 '$ %AsyncGenerator%':  undefined$1,
2430                 '$ %AsyncGeneratorFunction%': asyncGenFunction,
2431                 '$ %AsyncGeneratorPrototype%':  undefined$1,
2432                 '$ %AsyncIteratorPrototype%':  undefined$1,
2433                 '$ %Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
2434                 '$ %Boolean%': Boolean,
2435                 '$ %BooleanPrototype%': Boolean.prototype,
2436                 '$ %DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
2437                 '$ %DataViewPrototype%': typeof DataView === 'undefined' ? undefined$1 : DataView.prototype,
2438                 '$ %Date%': Date,
2439                 '$ %DatePrototype%': Date.prototype,
2440                 '$ %decodeURI%': decodeURI,
2441                 '$ %decodeURIComponent%': decodeURIComponent,
2442                 '$ %encodeURI%': encodeURI,
2443                 '$ %encodeURIComponent%': encodeURIComponent,
2444                 '$ %Error%': Error,
2445                 '$ %ErrorPrototype%': Error.prototype,
2446                 '$ %eval%': eval, // eslint-disable-line no-eval
2447                 '$ %EvalError%': EvalError,
2448                 '$ %EvalErrorPrototype%': EvalError.prototype,
2449                 '$ %Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
2450                 '$ %Float32ArrayPrototype%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array.prototype,
2451                 '$ %Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
2452                 '$ %Float64ArrayPrototype%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array.prototype,
2453                 '$ %Function%': Function,
2454                 '$ %FunctionPrototype%': Function.prototype,
2455                 '$ %Generator%':  undefined$1,
2456                 '$ %GeneratorFunction%': generatorFunction,
2457                 '$ %GeneratorPrototype%':  undefined$1,
2458                 '$ %Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
2459                 '$ %Int8ArrayPrototype%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array.prototype,
2460                 '$ %Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
2461                 '$ %Int16ArrayPrototype%': typeof Int16Array === 'undefined' ? undefined$1 : Int8Array.prototype,
2462                 '$ %Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
2463                 '$ %Int32ArrayPrototype%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array.prototype,
2464                 '$ %isFinite%': isFinite,
2465                 '$ %isNaN%': isNaN,
2466                 '$ %IteratorPrototype%': hasSymbols$3 ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
2467                 '$ %JSON%': JSON,
2468                 '$ %JSONParse%': JSON.parse,
2469                 '$ %Map%': typeof Map === 'undefined' ? undefined$1 : Map,
2470                 '$ %MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols$3 ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
2471                 '$ %MapPrototype%': typeof Map === 'undefined' ? undefined$1 : Map.prototype,
2472                 '$ %Math%': Math,
2473                 '$ %Number%': Number,
2474                 '$ %NumberPrototype%': Number.prototype,
2475                 '$ %Object%': Object,
2476                 '$ %ObjectPrototype%': Object.prototype,
2477                 '$ %ObjProto_toString%': Object.prototype.toString,
2478                 '$ %ObjProto_valueOf%': Object.prototype.valueOf,
2479                 '$ %parseFloat%': parseFloat,
2480                 '$ %parseInt%': parseInt,
2481                 '$ %Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
2482                 '$ %PromisePrototype%': typeof Promise === 'undefined' ? undefined$1 : Promise.prototype,
2483                 '$ %PromiseProto_then%': typeof Promise === 'undefined' ? undefined$1 : Promise.prototype.then,
2484                 '$ %Promise_all%': typeof Promise === 'undefined' ? undefined$1 : Promise.all,
2485                 '$ %Promise_reject%': typeof Promise === 'undefined' ? undefined$1 : Promise.reject,
2486                 '$ %Promise_resolve%': typeof Promise === 'undefined' ? undefined$1 : Promise.resolve,
2487                 '$ %Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
2488                 '$ %RangeError%': RangeError,
2489                 '$ %RangeErrorPrototype%': RangeError.prototype,
2490                 '$ %ReferenceError%': ReferenceError,
2491                 '$ %ReferenceErrorPrototype%': ReferenceError.prototype,
2492                 '$ %Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
2493                 '$ %RegExp%': RegExp,
2494                 '$ %RegExpPrototype%': RegExp.prototype,
2495                 '$ %Set%': typeof Set === 'undefined' ? undefined$1 : Set,
2496                 '$ %SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols$3 ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
2497                 '$ %SetPrototype%': typeof Set === 'undefined' ? undefined$1 : Set.prototype,
2498                 '$ %SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
2499                 '$ %SharedArrayBufferPrototype%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer.prototype,
2500                 '$ %String%': String,
2501                 '$ %StringIteratorPrototype%': hasSymbols$3 ? getProto(''[Symbol.iterator]()) : undefined$1,
2502                 '$ %StringPrototype%': String.prototype,
2503                 '$ %Symbol%': hasSymbols$3 ? Symbol : undefined$1,
2504                 '$ %SymbolPrototype%': hasSymbols$3 ? Symbol.prototype : undefined$1,
2505                 '$ %SyntaxError%': SyntaxError,
2506                 '$ %SyntaxErrorPrototype%': SyntaxError.prototype,
2507                 '$ %ThrowTypeError%': ThrowTypeError,
2508                 '$ %TypedArray%': TypedArray,
2509                 '$ %TypedArrayPrototype%': TypedArray ? TypedArray.prototype : undefined$1,
2510                 '$ %TypeError%': $TypeError,
2511                 '$ %TypeErrorPrototype%': $TypeError.prototype,
2512                 '$ %Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
2513                 '$ %Uint8ArrayPrototype%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array.prototype,
2514                 '$ %Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
2515                 '$ %Uint8ClampedArrayPrototype%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray.prototype,
2516                 '$ %Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
2517                 '$ %Uint16ArrayPrototype%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array.prototype,
2518                 '$ %Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
2519                 '$ %Uint32ArrayPrototype%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array.prototype,
2520                 '$ %URIError%': URIError,
2521                 '$ %URIErrorPrototype%': URIError.prototype,
2522                 '$ %WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
2523                 '$ %WeakMapPrototype%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap.prototype,
2524                 '$ %WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet,
2525                 '$ %WeakSetPrototype%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet.prototype
2526         };
2527
2528
2529         var $replace = functionBind.call(Function.call, String.prototype.replace);
2530
2531         /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
2532         var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
2533         var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
2534         var stringToPath = function stringToPath(string) {
2535                 var result = [];
2536                 $replace(string, rePropName, function (match, number, quote, subString) {
2537                         result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : (number || match);
2538                 });
2539                 return result;
2540         };
2541         /* end adaptation */
2542
2543         var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
2544                 var key = '$ ' + name;
2545                 if (!(key in INTRINSICS)) {
2546                         throw new SyntaxError('intrinsic ' + name + ' does not exist!');
2547                 }
2548
2549                 // istanbul ignore if // hopefully this is impossible to test :-)
2550                 if (typeof INTRINSICS[key] === 'undefined' && !allowMissing) {
2551                         throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
2552                 }
2553
2554                 return INTRINSICS[key];
2555         };
2556
2557         var GetIntrinsic = function GetIntrinsic(name, allowMissing) {
2558                 if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
2559                         throw new TypeError('"allowMissing" argument must be a boolean');
2560                 }
2561
2562                 var parts = stringToPath(name);
2563
2564                 if (parts.length === 0) {
2565                         return getBaseIntrinsic(name, allowMissing);
2566                 }
2567
2568                 var value = getBaseIntrinsic('%' + parts[0] + '%', allowMissing);
2569                 for (var i = 1; i < parts.length; i += 1) {
2570                         if (value != null) {
2571                                 value = value[parts[i]];
2572                         }
2573                 }
2574                 return value;
2575         };
2576
2577         var $TypeError$1 = GetIntrinsic('%TypeError%');
2578         var $SyntaxError = GetIntrinsic('%SyntaxError%');
2579
2580
2581
2582         var predicates = {
2583                 // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type
2584                 'Property Descriptor': function isPropertyDescriptor(ES, Desc) {
2585                         if (ES.Type(Desc) !== 'Object') {
2586                                 return false;
2587                         }
2588                         var allowed = {
2589                                 '[[Configurable]]': true,
2590                                 '[[Enumerable]]': true,
2591                                 '[[Get]]': true,
2592                                 '[[Set]]': true,
2593                                 '[[Value]]': true,
2594                                 '[[Writable]]': true
2595                         };
2596
2597                         for (var key in Desc) { // eslint-disable-line
2598                                 if (src(Desc, key) && !allowed[key]) {
2599                                         return false;
2600                                 }
2601                         }
2602
2603                         var isData = src(Desc, '[[Value]]');
2604                         var IsAccessor = src(Desc, '[[Get]]') || src(Desc, '[[Set]]');
2605                         if (isData && IsAccessor) {
2606                                 throw new $TypeError$1('Property Descriptors may not be both accessor and data descriptors');
2607                         }
2608                         return true;
2609                 }
2610         };
2611
2612         var assertRecord = function assertRecord(ES, recordType, argumentName, value) {
2613                 var predicate = predicates[recordType];
2614                 if (typeof predicate !== 'function') {
2615                         throw new $SyntaxError('unknown record type: ' + recordType);
2616                 }
2617                 if (!predicate(ES, value)) {
2618                         throw new $TypeError$1(argumentName + ' must be a ' + recordType);
2619                 }
2620         };
2621
2622         var _isNaN = Number.isNaN || function isNaN(a) {
2623                 return a !== a;
2624         };
2625
2626         var $isNaN = Number.isNaN || function (a) { return a !== a; };
2627
2628         var _isFinite = Number.isFinite || function (x) { return typeof x === 'number' && !$isNaN(x) && x !== Infinity && x !== -Infinity; };
2629
2630         var $Math = GetIntrinsic('%Math%');
2631         var $Number = GetIntrinsic('%Number%');
2632
2633         var maxSafeInteger = $Number.MAX_SAFE_INTEGER || $Math.pow(2, 53) - 1;
2634
2635         var $assign = GetIntrinsic('%Object%').assign;
2636
2637         var assign$1 = function assign(target, source) {
2638                 if ($assign) {
2639                         return $assign(target, source);
2640                 }
2641
2642                 // eslint-disable-next-line no-restricted-syntax
2643                 for (var key in source) {
2644                         if (src(source, key)) {
2645                                 target[key] = source[key];
2646                         }
2647                 }
2648                 return target;
2649         };
2650
2651         var sign$1 = function sign(number) {
2652                 return number >= 0 ? 1 : -1;
2653         };
2654
2655         var mod = function mod(number, modulo) {
2656                 var remain = number % modulo;
2657                 return Math.floor(remain >= 0 ? remain : remain + modulo);
2658         };
2659
2660         var isPrimitive$1 = function isPrimitive(value) {
2661                 return value === null || (typeof value !== 'function' && typeof value !== 'object');
2662         };
2663
2664         var forEach$3 = function forEach(array, callback) {
2665                 for (var i = 0; i < array.length; i += 1) {
2666                         callback(array[i], i, array); // eslint-disable-line callback-return
2667                 }
2668         };
2669
2670         var every = function every(array, predicate) {
2671                 for (var i = 0; i < array.length; i += 1) {
2672                         if (!predicate(array[i], i, array)) {
2673                                 return false;
2674                         }
2675                 }
2676                 return true;
2677         };
2678
2679         var isSamePropertyDescriptor = function isSamePropertyDescriptor(ES, D1, D2) {
2680                 var fields = [
2681                         '[[Configurable]]',
2682                         '[[Enumerable]]',
2683                         '[[Get]]',
2684                         '[[Set]]',
2685                         '[[Value]]',
2686                         '[[Writable]]'
2687                 ];
2688                 return every(fields, function (field) {
2689                         if ((field in D1) !== (field in D2)) {
2690                                 return false;
2691                         }
2692                         return ES.SameValue(D1[field], D2[field]);
2693                 });
2694         };
2695
2696         var $TypeError$2 = GetIntrinsic('%TypeError%');
2697
2698         var isPropertyDescriptor = function IsPropertyDescriptor(ES, Desc) {
2699                 if (ES.Type(Desc) !== 'Object') {
2700                         return false;
2701                 }
2702                 var allowed = {
2703                         '[[Configurable]]': true,
2704                         '[[Enumerable]]': true,
2705                         '[[Get]]': true,
2706                         '[[Set]]': true,
2707                         '[[Value]]': true,
2708                         '[[Writable]]': true
2709                 };
2710
2711             for (var key in Desc) { // eslint-disable-line
2712                         if (src(Desc, key) && !allowed[key]) {
2713                                 return false;
2714                         }
2715                 }
2716
2717                 if (ES.IsDataDescriptor(Desc) && ES.IsAccessorDescriptor(Desc)) {
2718                         throw new $TypeError$2('Property Descriptors may not be both accessor and data descriptors');
2719                 }
2720                 return true;
2721         };
2722
2723         var $Function = GetIntrinsic('%Function%');
2724         var $apply = $Function.apply;
2725         var $call = $Function.call;
2726
2727         var callBind = function callBind() {
2728                 return functionBind.apply($call, arguments);
2729         };
2730
2731         var apply = function applyBind() {
2732                 return functionBind.apply($apply, arguments);
2733         };
2734         callBind.apply = apply;
2735
2736         var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
2737
2738         var callBound = function callBoundIntrinsic(name, allowMissing) {
2739                 var intrinsic = GetIntrinsic(name, !!allowMissing);
2740                 if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.')) {
2741                         return callBind(intrinsic);
2742                 }
2743                 return intrinsic;
2744         };
2745
2746         var $test = GetIntrinsic('RegExp.prototype.test');
2747
2748
2749
2750         var regexTester = function regexTester(regex) {
2751                 return callBind($test, regex);
2752         };
2753
2754         var hasSymbols$4 = hasSymbols$1();
2755
2756
2757
2758         var $iterator = GetIntrinsic('%Symbol.iterator%', true);
2759         var $arraySlice = callBound('Array.prototype.slice');
2760         var $arrayJoin = callBound('Array.prototype.join');
2761
2762         var getIteratorMethod = function getIteratorMethod(ES, iterable) {
2763                 var usingIterator;
2764                 if (hasSymbols$4) {
2765                         usingIterator = ES.GetMethod(iterable, $iterator);
2766                 } else if (ES.IsArray(iterable)) {
2767                         usingIterator = function () {
2768                                 var i = -1;
2769                                 var arr = this; // eslint-disable-line no-invalid-this
2770                                 return {
2771                                         next: function () {
2772                                                 i += 1;
2773                                                 return {
2774                                                         done: i >= arr.length,
2775                                                         value: arr[i]
2776                                                 };
2777                                         }
2778                                 };
2779                         };
2780                 } else if (ES.Type(iterable) === 'String') {
2781                         usingIterator = function () {
2782                                 var i = 0;
2783                                 return {
2784                                         next: function () {
2785                                                 var nextIndex = ES.AdvanceStringIndex(iterable, i, true);
2786                                                 var value = $arrayJoin($arraySlice(iterable, i, nextIndex), '');
2787                                                 i = nextIndex;
2788                                                 return {
2789                                                         done: nextIndex > iterable.length,
2790                                                         value: value
2791                                                 };
2792                                         }
2793                                 };
2794                         };
2795                 }
2796                 return usingIterator;
2797         };
2798
2799         var getInferredName;
2800         try {
2801                 // eslint-disable-next-line no-new-func
2802                 getInferredName = Function('s', 'return { [s]() {} }[s].name;');
2803         } catch (e) {}
2804
2805         var inferred = function () {};
2806         var getInferredName_1 = getInferredName && inferred.name === 'inferred' ? getInferredName : null;
2807
2808         var $SyntaxError$1 = GetIntrinsic('%SyntaxError%');
2809         var symToStr = callBound('Symbol.prototype.toString', true);
2810
2811
2812
2813         var getSymbolDescription = function getSymbolDescription(symbol) {
2814                 if (!symToStr) {
2815                         throw new $SyntaxError$1('Symbols are not supported in this environment');
2816                 }
2817                 var str = symToStr(symbol); // will throw if not a symbol
2818
2819                 if (getInferredName_1) {
2820                         var name = getInferredName_1(symbol);
2821                         if (name === '') { return; }
2822                         // eslint-disable-next-line consistent-return
2823                         return name.slice(1, -1); // name.slice('['.length, -']'.length);
2824                 }
2825
2826                 var desc = str.slice(7, -1); // str.slice('Symbol('.length, -')'.length);
2827                 if (desc) {
2828                         // eslint-disable-next-line consistent-return
2829                         return desc;
2830                 }
2831         };
2832
2833         var originalSetProto = GetIntrinsic('%Object.setPrototypeOf%', true);
2834         var $ArrayProto = GetIntrinsic('%Array.prototype%');
2835
2836         var setProto = originalSetProto || (
2837                 // eslint-disable-next-line no-proto, no-negated-condition
2838                 [].__proto__ !== $ArrayProto
2839                         ? null
2840                         : function (O, proto) {
2841                                 O.__proto__ = proto; // eslint-disable-line no-proto
2842                                 return O;
2843                         }
2844         );
2845
2846         var $strSlice = callBound('String.prototype.slice');
2847
2848         var isPrefixOf = function isPrefixOf(prefix, string) {
2849                 if (prefix === string) {
2850                         return true;
2851                 }
2852                 if (prefix.length > string.length) {
2853                         return false;
2854                 }
2855                 return $strSlice(string, 0, prefix.length) === prefix;
2856         };
2857
2858         var toStr$6 = Object.prototype.toString;
2859
2860
2861
2862
2863
2864         // http://ecma-international.org/ecma-262/5.1/#sec-8.12.8
2865         var ES5internalSlots = {
2866                 '[[DefaultValue]]': function (O) {
2867                         var actualHint;
2868                         if (arguments.length > 1) {
2869                                 actualHint = arguments[1];
2870                         } else {
2871                                 actualHint = toStr$6.call(O) === '[object Date]' ? String : Number;
2872                         }
2873
2874                         if (actualHint === String || actualHint === Number) {
2875                                 var methods = actualHint === String ? ['toString', 'valueOf'] : ['valueOf', 'toString'];
2876                                 var value, i;
2877                                 for (i = 0; i < methods.length; ++i) {
2878                                         if (isCallable(O[methods[i]])) {
2879                                                 value = O[methods[i]]();
2880                                                 if (isPrimitive(value)) {
2881                                                         return value;
2882                                                 }
2883                                         }
2884                                 }
2885                                 throw new TypeError('No default value');
2886                         }
2887                         throw new TypeError('invalid [[DefaultValue]] hint supplied');
2888                 }
2889         };
2890
2891         // http://ecma-international.org/ecma-262/5.1/#sec-9.1
2892         var es5 = function ToPrimitive(input) {
2893                 if (isPrimitive(input)) {
2894                         return input;
2895                 }
2896                 if (arguments.length > 1) {
2897                         return ES5internalSlots['[[DefaultValue]]'](input, arguments[1]);
2898                 }
2899                 return ES5internalSlots['[[DefaultValue]]'](input);
2900         };
2901
2902         var $Object = GetIntrinsic('%Object%');
2903         var $EvalError = GetIntrinsic('%EvalError%');
2904         var $TypeError$3 = GetIntrinsic('%TypeError%');
2905         var $String = GetIntrinsic('%String%');
2906         var $Date = GetIntrinsic('%Date%');
2907         var $Number$1 = GetIntrinsic('%Number%');
2908         var $floor = GetIntrinsic('%Math.floor%');
2909         var $DateUTC = GetIntrinsic('%Date.UTC%');
2910         var $abs = GetIntrinsic('%Math.abs%');
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926         var $getUTCFullYear = callBound('Date.prototype.getUTCFullYear');
2927
2928         var HoursPerDay = 24;
2929         var MinutesPerHour = 60;
2930         var SecondsPerMinute = 60;
2931         var msPerSecond = 1e3;
2932         var msPerMinute = msPerSecond * SecondsPerMinute;
2933         var msPerHour = msPerMinute * MinutesPerHour;
2934         var msPerDay = 86400000;
2935
2936         // https://es5.github.io/#x9
2937         var ES5 = {
2938                 ToPrimitive: es5,
2939
2940                 ToBoolean: function ToBoolean(value) {
2941                         return !!value;
2942                 },
2943                 ToNumber: function ToNumber(value) {
2944                         return +value; // eslint-disable-line no-implicit-coercion
2945                 },
2946                 ToInteger: function ToInteger(value) {
2947                         var number = this.ToNumber(value);
2948                         if (_isNaN(number)) { return 0; }
2949                         if (number === 0 || !_isFinite(number)) { return number; }
2950                         return sign$1(number) * Math.floor(Math.abs(number));
2951                 },
2952                 ToInt32: function ToInt32(x) {
2953                         return this.ToNumber(x) >> 0;
2954                 },
2955                 ToUint32: function ToUint32(x) {
2956                         return this.ToNumber(x) >>> 0;
2957                 },
2958                 ToUint16: function ToUint16(value) {
2959                         var number = this.ToNumber(value);
2960                         if (_isNaN(number) || number === 0 || !_isFinite(number)) { return 0; }
2961                         var posInt = sign$1(number) * Math.floor(Math.abs(number));
2962                         return mod(posInt, 0x10000);
2963                 },
2964                 ToString: function ToString(value) {
2965                         return $String(value);
2966                 },
2967                 ToObject: function ToObject(value) {
2968                         this.CheckObjectCoercible(value);
2969                         return $Object(value);
2970                 },
2971                 CheckObjectCoercible: function CheckObjectCoercible(value, optMessage) {
2972                         /* jshint eqnull:true */
2973                         if (value == null) {
2974                                 throw new $TypeError$3(optMessage || 'Cannot call method on ' + value);
2975                         }
2976                         return value;
2977                 },
2978                 IsCallable: isCallable,
2979                 SameValue: function SameValue(x, y) {
2980                         if (x === y) { // 0 === -0, but they are not identical.
2981                                 if (x === 0) { return 1 / x === 1 / y; }
2982                                 return true;
2983                         }
2984                         return _isNaN(x) && _isNaN(y);
2985                 },
2986
2987                 // https://ecma-international.org/ecma-262/5.1/#sec-8
2988                 Type: function Type(x) {
2989                         if (x === null) {
2990                                 return 'Null';
2991                         }
2992                         if (typeof x === 'undefined') {
2993                                 return 'Undefined';
2994                         }
2995                         if (typeof x === 'function' || typeof x === 'object') {
2996                                 return 'Object';
2997                         }
2998                         if (typeof x === 'number') {
2999                                 return 'Number';
3000                         }
3001                         if (typeof x === 'boolean') {
3002                                 return 'Boolean';
3003                         }
3004                         if (typeof x === 'string') {
3005                                 return 'String';
3006                         }
3007                 },
3008
3009                 // https://ecma-international.org/ecma-262/6.0/#sec-property-descriptor-specification-type
3010                 IsPropertyDescriptor: function IsPropertyDescriptor(Desc) {
3011                         return isPropertyDescriptor(this, Desc);
3012                 },
3013
3014                 // https://ecma-international.org/ecma-262/5.1/#sec-8.10.1
3015                 IsAccessorDescriptor: function IsAccessorDescriptor(Desc) {
3016                         if (typeof Desc === 'undefined') {
3017                                 return false;
3018                         }
3019
3020                         assertRecord(this, 'Property Descriptor', 'Desc', Desc);
3021
3022                         if (!src(Desc, '[[Get]]') && !src(Desc, '[[Set]]')) {
3023                                 return false;
3024                         }
3025
3026                         return true;
3027                 },
3028
3029                 // https://ecma-international.org/ecma-262/5.1/#sec-8.10.2
3030                 IsDataDescriptor: function IsDataDescriptor(Desc) {
3031                         if (typeof Desc === 'undefined') {
3032                                 return false;
3033                         }
3034
3035                         assertRecord(this, 'Property Descriptor', 'Desc', Desc);
3036
3037                         if (!src(Desc, '[[Value]]') && !src(Desc, '[[Writable]]')) {
3038                                 return false;
3039                         }
3040
3041                         return true;
3042                 },
3043
3044                 // https://ecma-international.org/ecma-262/5.1/#sec-8.10.3
3045                 IsGenericDescriptor: function IsGenericDescriptor(Desc) {
3046                         if (typeof Desc === 'undefined') {
3047                                 return false;
3048                         }
3049
3050                         assertRecord(this, 'Property Descriptor', 'Desc', Desc);
3051
3052                         if (!this.IsAccessorDescriptor(Desc) && !this.IsDataDescriptor(Desc)) {
3053                                 return true;
3054                         }
3055
3056                         return false;
3057                 },
3058
3059                 // https://ecma-international.org/ecma-262/5.1/#sec-8.10.4
3060                 FromPropertyDescriptor: function FromPropertyDescriptor(Desc) {
3061                         if (typeof Desc === 'undefined') {
3062                                 return Desc;
3063                         }
3064
3065                         assertRecord(this, 'Property Descriptor', 'Desc', Desc);
3066
3067                         if (this.IsDataDescriptor(Desc)) {
3068                                 return {
3069                                         value: Desc['[[Value]]'],
3070                                         writable: !!Desc['[[Writable]]'],
3071                                         enumerable: !!Desc['[[Enumerable]]'],
3072                                         configurable: !!Desc['[[Configurable]]']
3073                                 };
3074                         } else if (this.IsAccessorDescriptor(Desc)) {
3075                                 return {
3076                                         get: Desc['[[Get]]'],
3077                                         set: Desc['[[Set]]'],
3078                                         enumerable: !!Desc['[[Enumerable]]'],
3079                                         configurable: !!Desc['[[Configurable]]']
3080                                 };
3081                         } else {
3082                                 throw new $TypeError$3('FromPropertyDescriptor must be called with a fully populated Property Descriptor');
3083                         }
3084                 },
3085
3086                 // https://ecma-international.org/ecma-262/5.1/#sec-8.10.5
3087                 ToPropertyDescriptor: function ToPropertyDescriptor(Obj) {
3088                         if (this.Type(Obj) !== 'Object') {
3089                                 throw new $TypeError$3('ToPropertyDescriptor requires an object');
3090                         }
3091
3092                         var desc = {};
3093                         if (src(Obj, 'enumerable')) {
3094                                 desc['[[Enumerable]]'] = this.ToBoolean(Obj.enumerable);
3095                         }
3096                         if (src(Obj, 'configurable')) {
3097                                 desc['[[Configurable]]'] = this.ToBoolean(Obj.configurable);
3098                         }
3099                         if (src(Obj, 'value')) {
3100                                 desc['[[Value]]'] = Obj.value;
3101                         }
3102                         if (src(Obj, 'writable')) {
3103                                 desc['[[Writable]]'] = this.ToBoolean(Obj.writable);
3104                         }
3105                         if (src(Obj, 'get')) {
3106                                 var getter = Obj.get;
3107                                 if (typeof getter !== 'undefined' && !this.IsCallable(getter)) {
3108                                         throw new TypeError('getter must be a function');
3109                                 }
3110                                 desc['[[Get]]'] = getter;
3111                         }
3112                         if (src(Obj, 'set')) {
3113                                 var setter = Obj.set;
3114                                 if (typeof setter !== 'undefined' && !this.IsCallable(setter)) {
3115                                         throw new $TypeError$3('setter must be a function');
3116                                 }
3117                                 desc['[[Set]]'] = setter;
3118                         }
3119
3120                         if ((src(desc, '[[Get]]') || src(desc, '[[Set]]')) && (src(desc, '[[Value]]') || src(desc, '[[Writable]]'))) {
3121                                 throw new $TypeError$3('Invalid property descriptor. Cannot both specify accessors and a value or writable attribute');
3122                         }
3123                         return desc;
3124                 },
3125
3126                 // https://ecma-international.org/ecma-262/5.1/#sec-11.9.3
3127                 'Abstract Equality Comparison': function AbstractEqualityComparison(x, y) {
3128                         var xType = this.Type(x);
3129                         var yType = this.Type(y);
3130                         if (xType === yType) {
3131                                 return x === y; // ES6+ specified this shortcut anyways.
3132                         }
3133                         if (x == null && y == null) {
3134                                 return true;
3135                         }
3136                         if (xType === 'Number' && yType === 'String') {
3137                                 return this['Abstract Equality Comparison'](x, this.ToNumber(y));
3138                         }
3139                         if (xType === 'String' && yType === 'Number') {
3140                                 return this['Abstract Equality Comparison'](this.ToNumber(x), y);
3141                         }
3142                         if (xType === 'Boolean') {
3143                                 return this['Abstract Equality Comparison'](this.ToNumber(x), y);
3144                         }
3145                         if (yType === 'Boolean') {
3146                                 return this['Abstract Equality Comparison'](x, this.ToNumber(y));
3147                         }
3148                         if ((xType === 'String' || xType === 'Number') && yType === 'Object') {
3149                                 return this['Abstract Equality Comparison'](x, this.ToPrimitive(y));
3150                         }
3151                         if (xType === 'Object' && (yType === 'String' || yType === 'Number')) {
3152                                 return this['Abstract Equality Comparison'](this.ToPrimitive(x), y);
3153                         }
3154                         return false;
3155                 },
3156
3157                 // https://ecma-international.org/ecma-262/5.1/#sec-11.9.6
3158                 'Strict Equality Comparison': function StrictEqualityComparison(x, y) {
3159                         var xType = this.Type(x);
3160                         var yType = this.Type(y);
3161                         if (xType !== yType) {
3162                                 return false;
3163                         }
3164                         if (xType === 'Undefined' || xType === 'Null') {
3165                                 return true;
3166                         }
3167                         return x === y; // shortcut for steps 4-7
3168                 },
3169
3170                 // https://ecma-international.org/ecma-262/5.1/#sec-11.8.5
3171                 // eslint-disable-next-line max-statements
3172                 'Abstract Relational Comparison': function AbstractRelationalComparison(x, y, LeftFirst) {
3173                         if (this.Type(LeftFirst) !== 'Boolean') {
3174                                 throw new $TypeError$3('Assertion failed: LeftFirst argument must be a Boolean');
3175                         }
3176                         var px;
3177                         var py;
3178                         if (LeftFirst) {
3179                                 px = this.ToPrimitive(x, $Number$1);
3180                                 py = this.ToPrimitive(y, $Number$1);
3181                         } else {
3182                                 py = this.ToPrimitive(y, $Number$1);
3183                                 px = this.ToPrimitive(x, $Number$1);
3184                         }
3185                         var bothStrings = this.Type(px) === 'String' && this.Type(py) === 'String';
3186                         if (!bothStrings) {
3187                                 var nx = this.ToNumber(px);
3188                                 var ny = this.ToNumber(py);
3189                                 if (_isNaN(nx) || _isNaN(ny)) {
3190                                         return undefined;
3191                                 }
3192                                 if (_isFinite(nx) && _isFinite(ny) && nx === ny) {
3193                                         return false;
3194                                 }
3195                                 if (nx === 0 && ny === 0) {
3196                                         return false;
3197                                 }
3198                                 if (nx === Infinity) {
3199                                         return false;
3200                                 }
3201                                 if (ny === Infinity) {
3202                                         return true;
3203                                 }
3204                                 if (ny === -Infinity) {
3205                                         return false;
3206                                 }
3207                                 if (nx === -Infinity) {
3208                                         return true;
3209                                 }
3210                                 return nx < ny; // by now, these are both nonzero, finite, and not equal
3211                         }
3212                         if (isPrefixOf(py, px)) {
3213                                 return false;
3214                         }
3215                         if (isPrefixOf(px, py)) {
3216                                 return true;
3217                         }
3218                         return px < py; // both strings, neither a prefix of the other. shortcut for steps c-f
3219                 },
3220
3221                 // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.10
3222                 msFromTime: function msFromTime(t) {
3223                         return mod(t, msPerSecond);
3224                 },
3225
3226                 // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.10
3227                 SecFromTime: function SecFromTime(t) {
3228                         return mod($floor(t / msPerSecond), SecondsPerMinute);
3229                 },
3230
3231                 // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.10
3232                 MinFromTime: function MinFromTime(t) {
3233                         return mod($floor(t / msPerMinute), MinutesPerHour);
3234                 },
3235
3236                 // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.10
3237                 HourFromTime: function HourFromTime(t) {
3238                         return mod($floor(t / msPerHour), HoursPerDay);
3239                 },
3240
3241                 // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.2
3242                 Day: function Day(t) {
3243                         return $floor(t / msPerDay);
3244                 },
3245
3246                 // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.2
3247                 TimeWithinDay: function TimeWithinDay(t) {
3248                         return mod(t, msPerDay);
3249                 },
3250
3251                 // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.3
3252                 DayFromYear: function DayFromYear(y) {
3253                         return (365 * (y - 1970)) + $floor((y - 1969) / 4) - $floor((y - 1901) / 100) + $floor((y - 1601) / 400);
3254                 },
3255
3256                 // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.3
3257                 TimeFromYear: function TimeFromYear(y) {
3258                         return msPerDay * this.DayFromYear(y);
3259                 },
3260
3261                 // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.3
3262                 YearFromTime: function YearFromTime(t) {
3263                         // largest y such that this.TimeFromYear(y) <= t
3264                         return $getUTCFullYear(new $Date(t));
3265                 },
3266
3267                 // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.6
3268                 WeekDay: function WeekDay(t) {
3269                         return mod(this.Day(t) + 4, 7);
3270                 },
3271
3272                 // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.3
3273                 DaysInYear: function DaysInYear(y) {
3274                         if (mod(y, 4) !== 0) {
3275                                 return 365;
3276                         }
3277                         if (mod(y, 100) !== 0) {
3278                                 return 366;
3279                         }
3280                         if (mod(y, 400) !== 0) {
3281                                 return 365;
3282                         }
3283                         return 366;
3284                 },
3285
3286                 // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.3
3287                 InLeapYear: function InLeapYear(t) {
3288                         var days = this.DaysInYear(this.YearFromTime(t));
3289                         if (days === 365) {
3290                                 return 0;
3291                         }
3292                         if (days === 366) {
3293                                 return 1;
3294                         }
3295                         throw new $EvalError('Assertion failed: there are not 365 or 366 days in a year, got: ' + days);
3296                 },
3297
3298                 // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.4
3299                 DayWithinYear: function DayWithinYear(t) {
3300                         return this.Day(t) - this.DayFromYear(this.YearFromTime(t));
3301                 },
3302
3303                 // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.4
3304                 MonthFromTime: function MonthFromTime(t) {
3305                         var day = this.DayWithinYear(t);
3306                         if (0 <= day && day < 31) {
3307                                 return 0;
3308                         }
3309                         var leap = this.InLeapYear(t);
3310                         if (31 <= day && day < (59 + leap)) {
3311                                 return 1;
3312                         }
3313                         if ((59 + leap) <= day && day < (90 + leap)) {
3314                                 return 2;
3315                         }
3316                         if ((90 + leap) <= day && day < (120 + leap)) {
3317                                 return 3;
3318                         }
3319                         if ((120 + leap) <= day && day < (151 + leap)) {
3320                                 return 4;
3321                         }
3322                         if ((151 + leap) <= day && day < (181 + leap)) {
3323                                 return 5;
3324                         }
3325                         if ((181 + leap) <= day && day < (212 + leap)) {
3326                                 return 6;
3327                         }
3328                         if ((212 + leap) <= day && day < (243 + leap)) {
3329                                 return 7;
3330                         }
3331                         if ((243 + leap) <= day && day < (273 + leap)) {
3332                                 return 8;
3333                         }
3334                         if ((273 + leap) <= day && day < (304 + leap)) {
3335                                 return 9;
3336                         }
3337                         if ((304 + leap) <= day && day < (334 + leap)) {
3338                                 return 10;
3339                         }
3340                         if ((334 + leap) <= day && day < (365 + leap)) {
3341                                 return 11;
3342                         }
3343                 },
3344
3345                 // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.5
3346                 DateFromTime: function DateFromTime(t) {
3347                         var m = this.MonthFromTime(t);
3348                         var d = this.DayWithinYear(t);
3349                         if (m === 0) {
3350                                 return d + 1;
3351                         }
3352                         if (m === 1) {
3353                                 return d - 30;
3354                         }
3355                         var leap = this.InLeapYear(t);
3356                         if (m === 2) {
3357                                 return d - 58 - leap;
3358                         }
3359                         if (m === 3) {
3360                                 return d - 89 - leap;
3361                         }
3362                         if (m === 4) {
3363                                 return d - 119 - leap;
3364                         }
3365                         if (m === 5) {
3366                                 return d - 150 - leap;
3367                         }
3368                         if (m === 6) {
3369                                 return d - 180 - leap;
3370                         }
3371                         if (m === 7) {
3372                                 return d - 211 - leap;
3373                         }
3374                         if (m === 8) {
3375                                 return d - 242 - leap;
3376                         }
3377                         if (m === 9) {
3378                                 return d - 272 - leap;
3379                         }
3380                         if (m === 10) {
3381                                 return d - 303 - leap;
3382                         }
3383                         if (m === 11) {
3384                                 return d - 333 - leap;
3385                         }
3386                         throw new $EvalError('Assertion failed: MonthFromTime returned an impossible value: ' + m);
3387                 },
3388
3389                 // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.12
3390                 MakeDay: function MakeDay(year, month, date) {
3391                         if (!_isFinite(year) || !_isFinite(month) || !_isFinite(date)) {
3392                                 return NaN;
3393                         }
3394                         var y = this.ToInteger(year);
3395                         var m = this.ToInteger(month);
3396                         var dt = this.ToInteger(date);
3397                         var ym = y + $floor(m / 12);
3398                         var mn = mod(m, 12);
3399                         var t = $DateUTC(ym, mn, 1);
3400                         if (this.YearFromTime(t) !== ym || this.MonthFromTime(t) !== mn || this.DateFromTime(t) !== 1) {
3401                                 return NaN;
3402                         }
3403                         return this.Day(t) + dt - 1;
3404                 },
3405
3406                 // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.13
3407                 MakeDate: function MakeDate(day, time) {
3408                         if (!_isFinite(day) || !_isFinite(time)) {
3409                                 return NaN;
3410                         }
3411                         return (day * msPerDay) + time;
3412                 },
3413
3414                 // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.11
3415                 MakeTime: function MakeTime(hour, min, sec, ms) {
3416                         if (!_isFinite(hour) || !_isFinite(min) || !_isFinite(sec) || !_isFinite(ms)) {
3417                                 return NaN;
3418                         }
3419                         var h = this.ToInteger(hour);
3420                         var m = this.ToInteger(min);
3421                         var s = this.ToInteger(sec);
3422                         var milli = this.ToInteger(ms);
3423                         var t = (h * msPerHour) + (m * msPerMinute) + (s * msPerSecond) + milli;
3424                         return t;
3425                 },
3426
3427                 // https://ecma-international.org/ecma-262/5.1/#sec-15.9.1.14
3428                 TimeClip: function TimeClip(time) {
3429                         if (!_isFinite(time) || $abs(time) > 8.64e15) {
3430                                 return NaN;
3431                         }
3432                         return $Number$1(new $Date(this.ToNumber(time)));
3433                 },
3434
3435                 // https://ecma-international.org/ecma-262/5.1/#sec-5.2
3436                 modulo: function modulo(x, y) {
3437                         return mod(x, y);
3438                 }
3439         };
3440
3441         var es5$1 = ES5;
3442
3443         var regexExec = RegExp.prototype.exec;
3444         var gOPD = Object.getOwnPropertyDescriptor;
3445
3446         var tryRegexExecCall = function tryRegexExec(value) {
3447                 try {
3448                         var lastIndex = value.lastIndex;
3449                         value.lastIndex = 0;
3450
3451                         regexExec.call(value);
3452                         return true;
3453                 } catch (e) {
3454                         return false;
3455                 } finally {
3456                         value.lastIndex = lastIndex;
3457                 }
3458         };
3459         var toStr$7 = Object.prototype.toString;
3460         var regexClass = '[object RegExp]';
3461         var hasToStringTag$2 = typeof Symbol === 'function' && typeof Symbol.toStringTag === 'symbol';
3462
3463         var isRegex = function isRegex(value) {
3464                 if (!value || typeof value !== 'object') {
3465                         return false;
3466                 }
3467                 if (!hasToStringTag$2) {
3468                         return toStr$7.call(value) === regexClass;
3469                 }
3470
3471                 var descriptor = gOPD(value, 'lastIndex');
3472