@ninetailed/experience.js-plugin-google-analytics 6.4.0-beta.9 → 7.0.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/index.cjs +0 -2200
  2. package/index.js +0 -2200
  3. package/package.json +4 -4
package/index.js CHANGED
@@ -1,2206 +1,6 @@
1
1
  import { NinetailedAnalyticsPlugin } from '@ninetailed/experience.js-plugin-analytics';
2
2
  import { template } from '@ninetailed/experience.js-shared';
3
3
 
4
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
5
-
6
- var check = function (it) {
7
- return it && it.Math == Math && it;
8
- };
9
-
10
- // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
11
- var global$i =
12
- // eslint-disable-next-line es/no-global-this -- safe
13
- check(typeof globalThis == 'object' && globalThis) ||
14
- check(typeof window == 'object' && window) ||
15
- // eslint-disable-next-line no-restricted-globals -- safe
16
- check(typeof self == 'object' && self) ||
17
- check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
18
- // eslint-disable-next-line no-new-func -- fallback
19
- (function () { return this; })() || Function('return this')();
20
-
21
- var objectGetOwnPropertyDescriptor = {};
22
-
23
- var fails$a = function (exec) {
24
- try {
25
- return !!exec();
26
- } catch (error) {
27
- return true;
28
- }
29
- };
30
-
31
- var fails$9 = fails$a;
32
-
33
- // Detect IE8's incomplete defineProperty implementation
34
- var descriptors = !fails$9(function () {
35
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
36
- return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
37
- });
38
-
39
- var fails$8 = fails$a;
40
-
41
- var functionBindNative = !fails$8(function () {
42
- // eslint-disable-next-line es/no-function-prototype-bind -- safe
43
- var test = (function () { /* empty */ }).bind();
44
- // eslint-disable-next-line no-prototype-builtins -- safe
45
- return typeof test != 'function' || test.hasOwnProperty('prototype');
46
- });
47
-
48
- var NATIVE_BIND$3 = functionBindNative;
49
-
50
- var call$c = Function.prototype.call;
51
-
52
- var functionCall = NATIVE_BIND$3 ? call$c.bind(call$c) : function () {
53
- return call$c.apply(call$c, arguments);
54
- };
55
-
56
- var objectPropertyIsEnumerable = {};
57
-
58
- var $propertyIsEnumerable = {}.propertyIsEnumerable;
59
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
60
- var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
61
-
62
- // Nashorn ~ JDK8 bug
63
- var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
64
-
65
- // `Object.prototype.propertyIsEnumerable` method implementation
66
- // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
67
- objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
68
- var descriptor = getOwnPropertyDescriptor$2(this, V);
69
- return !!descriptor && descriptor.enumerable;
70
- } : $propertyIsEnumerable;
71
-
72
- var createPropertyDescriptor$2 = function (bitmap, value) {
73
- return {
74
- enumerable: !(bitmap & 1),
75
- configurable: !(bitmap & 2),
76
- writable: !(bitmap & 4),
77
- value: value
78
- };
79
- };
80
-
81
- var NATIVE_BIND$2 = functionBindNative;
82
-
83
- var FunctionPrototype$2 = Function.prototype;
84
- var call$b = FunctionPrototype$2.call;
85
- var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$b, call$b);
86
-
87
- var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
88
- return function () {
89
- return call$b.apply(fn, arguments);
90
- };
91
- };
92
-
93
- var uncurryThis$c = functionUncurryThis;
94
-
95
- var toString$1 = uncurryThis$c({}.toString);
96
- var stringSlice = uncurryThis$c(''.slice);
97
-
98
- var classofRaw$2 = function (it) {
99
- return stringSlice(toString$1(it), 8, -1);
100
- };
101
-
102
- var uncurryThis$b = functionUncurryThis;
103
- var fails$7 = fails$a;
104
- var classof$4 = classofRaw$2;
105
-
106
- var $Object$3 = Object;
107
- var split = uncurryThis$b(''.split);
108
-
109
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
110
- var indexedObject = fails$7(function () {
111
- // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
112
- // eslint-disable-next-line no-prototype-builtins -- safe
113
- return !$Object$3('z').propertyIsEnumerable(0);
114
- }) ? function (it) {
115
- return classof$4(it) == 'String' ? split(it, '') : $Object$3(it);
116
- } : $Object$3;
117
-
118
- // we can't use just `it == null` since of `document.all` special case
119
- // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
120
- var isNullOrUndefined$4 = function (it) {
121
- return it === null || it === undefined;
122
- };
123
-
124
- var isNullOrUndefined$3 = isNullOrUndefined$4;
125
-
126
- var $TypeError$c = TypeError;
127
-
128
- // `RequireObjectCoercible` abstract operation
129
- // https://tc39.es/ecma262/#sec-requireobjectcoercible
130
- var requireObjectCoercible$2 = function (it) {
131
- if (isNullOrUndefined$3(it)) throw $TypeError$c("Can't call method on " + it);
132
- return it;
133
- };
134
-
135
- // toObject with fallback for non-array-like ES3 strings
136
- var IndexedObject = indexedObject;
137
- var requireObjectCoercible$1 = requireObjectCoercible$2;
138
-
139
- var toIndexedObject$3 = function (it) {
140
- return IndexedObject(requireObjectCoercible$1(it));
141
- };
142
-
143
- var documentAll$2 = typeof document == 'object' && document.all;
144
-
145
- // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
146
- var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
147
-
148
- var documentAll_1 = {
149
- all: documentAll$2,
150
- IS_HTMLDDA: IS_HTMLDDA
151
- };
152
-
153
- var $documentAll$1 = documentAll_1;
154
-
155
- var documentAll$1 = $documentAll$1.all;
156
-
157
- // `IsCallable` abstract operation
158
- // https://tc39.es/ecma262/#sec-iscallable
159
- var isCallable$h = $documentAll$1.IS_HTMLDDA ? function (argument) {
160
- return typeof argument == 'function' || argument === documentAll$1;
161
- } : function (argument) {
162
- return typeof argument == 'function';
163
- };
164
-
165
- var isCallable$g = isCallable$h;
166
- var $documentAll = documentAll_1;
167
-
168
- var documentAll = $documentAll.all;
169
-
170
- var isObject$7 = $documentAll.IS_HTMLDDA ? function (it) {
171
- return typeof it == 'object' ? it !== null : isCallable$g(it) || it === documentAll;
172
- } : function (it) {
173
- return typeof it == 'object' ? it !== null : isCallable$g(it);
174
- };
175
-
176
- var global$h = global$i;
177
- var isCallable$f = isCallable$h;
178
-
179
- var aFunction = function (argument) {
180
- return isCallable$f(argument) ? argument : undefined;
181
- };
182
-
183
- var getBuiltIn$8 = function (namespace, method) {
184
- return arguments.length < 2 ? aFunction(global$h[namespace]) : global$h[namespace] && global$h[namespace][method];
185
- };
186
-
187
- var uncurryThis$a = functionUncurryThis;
188
-
189
- var objectIsPrototypeOf = uncurryThis$a({}.isPrototypeOf);
190
-
191
- var getBuiltIn$7 = getBuiltIn$8;
192
-
193
- var engineUserAgent = getBuiltIn$7('navigator', 'userAgent') || '';
194
-
195
- var global$g = global$i;
196
- var userAgent$3 = engineUserAgent;
197
-
198
- var process$3 = global$g.process;
199
- var Deno$1 = global$g.Deno;
200
- var versions = process$3 && process$3.versions || Deno$1 && Deno$1.version;
201
- var v8 = versions && versions.v8;
202
- var match, version;
203
-
204
- if (v8) {
205
- match = v8.split('.');
206
- // in old Chrome, versions of V8 isn't V8 = Chrome / 10
207
- // but their correct versions are not interesting for us
208
- version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
209
- }
210
-
211
- // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
212
- // so check `userAgent` even if `.v8` exists, but 0
213
- if (!version && userAgent$3) {
214
- match = userAgent$3.match(/Edge\/(\d+)/);
215
- if (!match || match[1] >= 74) {
216
- match = userAgent$3.match(/Chrome\/(\d+)/);
217
- if (match) version = +match[1];
218
- }
219
- }
220
-
221
- var engineV8Version = version;
222
-
223
- /* eslint-disable es/no-symbol -- required for testing */
224
-
225
- var V8_VERSION$1 = engineV8Version;
226
- var fails$6 = fails$a;
227
-
228
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
229
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$6(function () {
230
- var symbol = Symbol();
231
- // Chrome 38 Symbol has incorrect toString conversion
232
- // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
233
- return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
234
- // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
235
- !Symbol.sham && V8_VERSION$1 && V8_VERSION$1 < 41;
236
- });
237
-
238
- /* eslint-disable es/no-symbol -- required for testing */
239
-
240
- var NATIVE_SYMBOL$1 = symbolConstructorDetection;
241
-
242
- var useSymbolAsUid = NATIVE_SYMBOL$1
243
- && !Symbol.sham
244
- && typeof Symbol.iterator == 'symbol';
245
-
246
- var getBuiltIn$6 = getBuiltIn$8;
247
- var isCallable$e = isCallable$h;
248
- var isPrototypeOf$2 = objectIsPrototypeOf;
249
- var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
250
-
251
- var $Object$2 = Object;
252
-
253
- var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
254
- return typeof it == 'symbol';
255
- } : function (it) {
256
- var $Symbol = getBuiltIn$6('Symbol');
257
- return isCallable$e($Symbol) && isPrototypeOf$2($Symbol.prototype, $Object$2(it));
258
- };
259
-
260
- var $String$2 = String;
261
-
262
- var tryToString$4 = function (argument) {
263
- try {
264
- return $String$2(argument);
265
- } catch (error) {
266
- return 'Object';
267
- }
268
- };
269
-
270
- var isCallable$d = isCallable$h;
271
- var tryToString$3 = tryToString$4;
272
-
273
- var $TypeError$b = TypeError;
274
-
275
- // `Assert: IsCallable(argument) is true`
276
- var aCallable$7 = function (argument) {
277
- if (isCallable$d(argument)) return argument;
278
- throw $TypeError$b(tryToString$3(argument) + ' is not a function');
279
- };
280
-
281
- var aCallable$6 = aCallable$7;
282
- var isNullOrUndefined$2 = isNullOrUndefined$4;
283
-
284
- // `GetMethod` abstract operation
285
- // https://tc39.es/ecma262/#sec-getmethod
286
- var getMethod$3 = function (V, P) {
287
- var func = V[P];
288
- return isNullOrUndefined$2(func) ? undefined : aCallable$6(func);
289
- };
290
-
291
- var call$a = functionCall;
292
- var isCallable$c = isCallable$h;
293
- var isObject$6 = isObject$7;
294
-
295
- var $TypeError$a = TypeError;
296
-
297
- // `OrdinaryToPrimitive` abstract operation
298
- // https://tc39.es/ecma262/#sec-ordinarytoprimitive
299
- var ordinaryToPrimitive$1 = function (input, pref) {
300
- var fn, val;
301
- if (pref === 'string' && isCallable$c(fn = input.toString) && !isObject$6(val = call$a(fn, input))) return val;
302
- if (isCallable$c(fn = input.valueOf) && !isObject$6(val = call$a(fn, input))) return val;
303
- if (pref !== 'string' && isCallable$c(fn = input.toString) && !isObject$6(val = call$a(fn, input))) return val;
304
- throw $TypeError$a("Can't convert object to primitive value");
305
- };
306
-
307
- var shared$3 = {exports: {}};
308
-
309
- var global$f = global$i;
310
-
311
- // eslint-disable-next-line es/no-object-defineproperty -- safe
312
- var defineProperty$2 = Object.defineProperty;
313
-
314
- var defineGlobalProperty$3 = function (key, value) {
315
- try {
316
- defineProperty$2(global$f, key, { value: value, configurable: true, writable: true });
317
- } catch (error) {
318
- global$f[key] = value;
319
- } return value;
320
- };
321
-
322
- var global$e = global$i;
323
- var defineGlobalProperty$2 = defineGlobalProperty$3;
324
-
325
- var SHARED = '__core-js_shared__';
326
- var store$3 = global$e[SHARED] || defineGlobalProperty$2(SHARED, {});
327
-
328
- var sharedStore = store$3;
329
-
330
- var store$2 = sharedStore;
331
-
332
- (shared$3.exports = function (key, value) {
333
- return store$2[key] || (store$2[key] = value !== undefined ? value : {});
334
- })('versions', []).push({
335
- version: '3.26.1',
336
- mode: 'global',
337
- copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
338
- license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',
339
- source: 'https://github.com/zloirock/core-js'
340
- });
341
-
342
- var requireObjectCoercible = requireObjectCoercible$2;
343
-
344
- var $Object$1 = Object;
345
-
346
- // `ToObject` abstract operation
347
- // https://tc39.es/ecma262/#sec-toobject
348
- var toObject$1 = function (argument) {
349
- return $Object$1(requireObjectCoercible(argument));
350
- };
351
-
352
- var uncurryThis$9 = functionUncurryThis;
353
- var toObject = toObject$1;
354
-
355
- var hasOwnProperty = uncurryThis$9({}.hasOwnProperty);
356
-
357
- // `HasOwnProperty` abstract operation
358
- // https://tc39.es/ecma262/#sec-hasownproperty
359
- // eslint-disable-next-line es/no-object-hasown -- safe
360
- var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
361
- return hasOwnProperty(toObject(it), key);
362
- };
363
-
364
- var uncurryThis$8 = functionUncurryThis;
365
-
366
- var id = 0;
367
- var postfix = Math.random();
368
- var toString = uncurryThis$8(1.0.toString);
369
-
370
- var uid$2 = function (key) {
371
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
372
- };
373
-
374
- var global$d = global$i;
375
- var shared$2 = shared$3.exports;
376
- var hasOwn$8 = hasOwnProperty_1;
377
- var uid$1 = uid$2;
378
- var NATIVE_SYMBOL = symbolConstructorDetection;
379
- var USE_SYMBOL_AS_UID = useSymbolAsUid;
380
-
381
- var WellKnownSymbolsStore = shared$2('wks');
382
- var Symbol$1 = global$d.Symbol;
383
- var symbolFor = Symbol$1 && Symbol$1['for'];
384
- var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
385
-
386
- var wellKnownSymbol$a = function (name) {
387
- if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
388
- var description = 'Symbol.' + name;
389
- if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
390
- WellKnownSymbolsStore[name] = Symbol$1[name];
391
- } else if (USE_SYMBOL_AS_UID && symbolFor) {
392
- WellKnownSymbolsStore[name] = symbolFor(description);
393
- } else {
394
- WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
395
- }
396
- } return WellKnownSymbolsStore[name];
397
- };
398
-
399
- var call$9 = functionCall;
400
- var isObject$5 = isObject$7;
401
- var isSymbol$1 = isSymbol$2;
402
- var getMethod$2 = getMethod$3;
403
- var ordinaryToPrimitive = ordinaryToPrimitive$1;
404
- var wellKnownSymbol$9 = wellKnownSymbol$a;
405
-
406
- var $TypeError$9 = TypeError;
407
- var TO_PRIMITIVE = wellKnownSymbol$9('toPrimitive');
408
-
409
- // `ToPrimitive` abstract operation
410
- // https://tc39.es/ecma262/#sec-toprimitive
411
- var toPrimitive$1 = function (input, pref) {
412
- if (!isObject$5(input) || isSymbol$1(input)) return input;
413
- var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
414
- var result;
415
- if (exoticToPrim) {
416
- if (pref === undefined) pref = 'default';
417
- result = call$9(exoticToPrim, input, pref);
418
- if (!isObject$5(result) || isSymbol$1(result)) return result;
419
- throw $TypeError$9("Can't convert object to primitive value");
420
- }
421
- if (pref === undefined) pref = 'number';
422
- return ordinaryToPrimitive(input, pref);
423
- };
424
-
425
- var toPrimitive = toPrimitive$1;
426
- var isSymbol = isSymbol$2;
427
-
428
- // `ToPropertyKey` abstract operation
429
- // https://tc39.es/ecma262/#sec-topropertykey
430
- var toPropertyKey$2 = function (argument) {
431
- var key = toPrimitive(argument, 'string');
432
- return isSymbol(key) ? key : key + '';
433
- };
434
-
435
- var global$c = global$i;
436
- var isObject$4 = isObject$7;
437
-
438
- var document$3 = global$c.document;
439
- // typeof document.createElement is 'object' in old IE
440
- var EXISTS$1 = isObject$4(document$3) && isObject$4(document$3.createElement);
441
-
442
- var documentCreateElement = function (it) {
443
- return EXISTS$1 ? document$3.createElement(it) : {};
444
- };
445
-
446
- var DESCRIPTORS$7 = descriptors;
447
- var fails$5 = fails$a;
448
- var createElement$1 = documentCreateElement;
449
-
450
- // Thanks to IE8 for its funny defineProperty
451
- var ie8DomDefine = !DESCRIPTORS$7 && !fails$5(function () {
452
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
453
- return Object.defineProperty(createElement$1('div'), 'a', {
454
- get: function () { return 7; }
455
- }).a != 7;
456
- });
457
-
458
- var DESCRIPTORS$6 = descriptors;
459
- var call$8 = functionCall;
460
- var propertyIsEnumerableModule = objectPropertyIsEnumerable;
461
- var createPropertyDescriptor$1 = createPropertyDescriptor$2;
462
- var toIndexedObject$2 = toIndexedObject$3;
463
- var toPropertyKey$1 = toPropertyKey$2;
464
- var hasOwn$7 = hasOwnProperty_1;
465
- var IE8_DOM_DEFINE$1 = ie8DomDefine;
466
-
467
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
468
- var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
469
-
470
- // `Object.getOwnPropertyDescriptor` method
471
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
472
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$6 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
473
- O = toIndexedObject$2(O);
474
- P = toPropertyKey$1(P);
475
- if (IE8_DOM_DEFINE$1) try {
476
- return $getOwnPropertyDescriptor$1(O, P);
477
- } catch (error) { /* empty */ }
478
- if (hasOwn$7(O, P)) return createPropertyDescriptor$1(!call$8(propertyIsEnumerableModule.f, O, P), O[P]);
479
- };
480
-
481
- var objectDefineProperty = {};
482
-
483
- var DESCRIPTORS$5 = descriptors;
484
- var fails$4 = fails$a;
485
-
486
- // V8 ~ Chrome 36-
487
- // https://bugs.chromium.org/p/v8/issues/detail?id=3334
488
- var v8PrototypeDefineBug = DESCRIPTORS$5 && fails$4(function () {
489
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
490
- return Object.defineProperty(function () { /* empty */ }, 'prototype', {
491
- value: 42,
492
- writable: false
493
- }).prototype != 42;
494
- });
495
-
496
- var isObject$3 = isObject$7;
497
-
498
- var $String$1 = String;
499
- var $TypeError$8 = TypeError;
500
-
501
- // `Assert: Type(argument) is Object`
502
- var anObject$8 = function (argument) {
503
- if (isObject$3(argument)) return argument;
504
- throw $TypeError$8($String$1(argument) + ' is not an object');
505
- };
506
-
507
- var DESCRIPTORS$4 = descriptors;
508
- var IE8_DOM_DEFINE = ie8DomDefine;
509
- var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
510
- var anObject$7 = anObject$8;
511
- var toPropertyKey = toPropertyKey$2;
512
-
513
- var $TypeError$7 = TypeError;
514
- // eslint-disable-next-line es/no-object-defineproperty -- safe
515
- var $defineProperty = Object.defineProperty;
516
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
517
- var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
518
- var ENUMERABLE = 'enumerable';
519
- var CONFIGURABLE$1 = 'configurable';
520
- var WRITABLE = 'writable';
521
-
522
- // `Object.defineProperty` method
523
- // https://tc39.es/ecma262/#sec-object.defineproperty
524
- objectDefineProperty.f = DESCRIPTORS$4 ? V8_PROTOTYPE_DEFINE_BUG ? function defineProperty(O, P, Attributes) {
525
- anObject$7(O);
526
- P = toPropertyKey(P);
527
- anObject$7(Attributes);
528
- if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
529
- var current = $getOwnPropertyDescriptor(O, P);
530
- if (current && current[WRITABLE]) {
531
- O[P] = Attributes.value;
532
- Attributes = {
533
- configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
534
- enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
535
- writable: false
536
- };
537
- }
538
- } return $defineProperty(O, P, Attributes);
539
- } : $defineProperty : function defineProperty(O, P, Attributes) {
540
- anObject$7(O);
541
- P = toPropertyKey(P);
542
- anObject$7(Attributes);
543
- if (IE8_DOM_DEFINE) try {
544
- return $defineProperty(O, P, Attributes);
545
- } catch (error) { /* empty */ }
546
- if ('get' in Attributes || 'set' in Attributes) throw $TypeError$7('Accessors not supported');
547
- if ('value' in Attributes) O[P] = Attributes.value;
548
- return O;
549
- };
550
-
551
- var DESCRIPTORS$3 = descriptors;
552
- var definePropertyModule$3 = objectDefineProperty;
553
- var createPropertyDescriptor = createPropertyDescriptor$2;
554
-
555
- var createNonEnumerableProperty$2 = DESCRIPTORS$3 ? function (object, key, value) {
556
- return definePropertyModule$3.f(object, key, createPropertyDescriptor(1, value));
557
- } : function (object, key, value) {
558
- object[key] = value;
559
- return object;
560
- };
561
-
562
- var makeBuiltIn$2 = {exports: {}};
563
-
564
- var DESCRIPTORS$2 = descriptors;
565
- var hasOwn$6 = hasOwnProperty_1;
566
-
567
- var FunctionPrototype$1 = Function.prototype;
568
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
569
- var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
570
-
571
- var EXISTS = hasOwn$6(FunctionPrototype$1, 'name');
572
- // additional protection from minified / mangled / dropped function names
573
- var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
574
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$2 || (DESCRIPTORS$2 && getDescriptor(FunctionPrototype$1, 'name').configurable));
575
-
576
- var functionName = {
577
- EXISTS: EXISTS,
578
- PROPER: PROPER,
579
- CONFIGURABLE: CONFIGURABLE
580
- };
581
-
582
- var uncurryThis$7 = functionUncurryThis;
583
- var isCallable$b = isCallable$h;
584
- var store$1 = sharedStore;
585
-
586
- var functionToString = uncurryThis$7(Function.toString);
587
-
588
- // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
589
- if (!isCallable$b(store$1.inspectSource)) {
590
- store$1.inspectSource = function (it) {
591
- return functionToString(it);
592
- };
593
- }
594
-
595
- var inspectSource$3 = store$1.inspectSource;
596
-
597
- var global$b = global$i;
598
- var isCallable$a = isCallable$h;
599
-
600
- var WeakMap$1 = global$b.WeakMap;
601
-
602
- var weakMapBasicDetection = isCallable$a(WeakMap$1) && /native code/.test(String(WeakMap$1));
603
-
604
- var shared$1 = shared$3.exports;
605
- var uid = uid$2;
606
-
607
- var keys = shared$1('keys');
608
-
609
- var sharedKey$1 = function (key) {
610
- return keys[key] || (keys[key] = uid(key));
611
- };
612
-
613
- var hiddenKeys$3 = {};
614
-
615
- var NATIVE_WEAK_MAP = weakMapBasicDetection;
616
- var global$a = global$i;
617
- var isObject$2 = isObject$7;
618
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$2;
619
- var hasOwn$5 = hasOwnProperty_1;
620
- var shared = sharedStore;
621
- var sharedKey = sharedKey$1;
622
- var hiddenKeys$2 = hiddenKeys$3;
623
-
624
- var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
625
- var TypeError$2 = global$a.TypeError;
626
- var WeakMap = global$a.WeakMap;
627
- var set$1, get, has;
628
-
629
- var enforce = function (it) {
630
- return has(it) ? get(it) : set$1(it, {});
631
- };
632
-
633
- var getterFor = function (TYPE) {
634
- return function (it) {
635
- var state;
636
- if (!isObject$2(it) || (state = get(it)).type !== TYPE) {
637
- throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
638
- } return state;
639
- };
640
- };
641
-
642
- if (NATIVE_WEAK_MAP || shared.state) {
643
- var store = shared.state || (shared.state = new WeakMap());
644
- /* eslint-disable no-self-assign -- prototype methods protection */
645
- store.get = store.get;
646
- store.has = store.has;
647
- store.set = store.set;
648
- /* eslint-enable no-self-assign -- prototype methods protection */
649
- set$1 = function (it, metadata) {
650
- if (store.has(it)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
651
- metadata.facade = it;
652
- store.set(it, metadata);
653
- return metadata;
654
- };
655
- get = function (it) {
656
- return store.get(it) || {};
657
- };
658
- has = function (it) {
659
- return store.has(it);
660
- };
661
- } else {
662
- var STATE = sharedKey('state');
663
- hiddenKeys$2[STATE] = true;
664
- set$1 = function (it, metadata) {
665
- if (hasOwn$5(it, STATE)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
666
- metadata.facade = it;
667
- createNonEnumerableProperty$1(it, STATE, metadata);
668
- return metadata;
669
- };
670
- get = function (it) {
671
- return hasOwn$5(it, STATE) ? it[STATE] : {};
672
- };
673
- has = function (it) {
674
- return hasOwn$5(it, STATE);
675
- };
676
- }
677
-
678
- var internalState = {
679
- set: set$1,
680
- get: get,
681
- has: has,
682
- enforce: enforce,
683
- getterFor: getterFor
684
- };
685
-
686
- var fails$3 = fails$a;
687
- var isCallable$9 = isCallable$h;
688
- var hasOwn$4 = hasOwnProperty_1;
689
- var DESCRIPTORS$1 = descriptors;
690
- var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
691
- var inspectSource$2 = inspectSource$3;
692
- var InternalStateModule$1 = internalState;
693
-
694
- var enforceInternalState = InternalStateModule$1.enforce;
695
- var getInternalState = InternalStateModule$1.get;
696
- // eslint-disable-next-line es/no-object-defineproperty -- safe
697
- var defineProperty$1 = Object.defineProperty;
698
-
699
- var CONFIGURABLE_LENGTH = DESCRIPTORS$1 && !fails$3(function () {
700
- return defineProperty$1(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
701
- });
702
-
703
- var TEMPLATE = String(String).split('String');
704
-
705
- var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
706
- if (String(name).slice(0, 7) === 'Symbol(') {
707
- name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
708
- }
709
- if (options && options.getter) name = 'get ' + name;
710
- if (options && options.setter) name = 'set ' + name;
711
- if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
712
- if (DESCRIPTORS$1) defineProperty$1(value, 'name', { value: name, configurable: true });
713
- else value.name = name;
714
- }
715
- if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
716
- defineProperty$1(value, 'length', { value: options.arity });
717
- }
718
- try {
719
- if (options && hasOwn$4(options, 'constructor') && options.constructor) {
720
- if (DESCRIPTORS$1) defineProperty$1(value, 'prototype', { writable: false });
721
- // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
722
- } else if (value.prototype) value.prototype = undefined;
723
- } catch (error) { /* empty */ }
724
- var state = enforceInternalState(value);
725
- if (!hasOwn$4(state, 'source')) {
726
- state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
727
- } return value;
728
- };
729
-
730
- // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
731
- // eslint-disable-next-line no-extend-native -- required
732
- Function.prototype.toString = makeBuiltIn$1(function toString() {
733
- return isCallable$9(this) && getInternalState(this).source || inspectSource$2(this);
734
- }, 'toString');
735
-
736
- var isCallable$8 = isCallable$h;
737
- var definePropertyModule$2 = objectDefineProperty;
738
- var makeBuiltIn = makeBuiltIn$2.exports;
739
- var defineGlobalProperty$1 = defineGlobalProperty$3;
740
-
741
- var defineBuiltIn$3 = function (O, key, value, options) {
742
- if (!options) options = {};
743
- var simple = options.enumerable;
744
- var name = options.name !== undefined ? options.name : key;
745
- if (isCallable$8(value)) makeBuiltIn(value, name, options);
746
- if (options.global) {
747
- if (simple) O[key] = value;
748
- else defineGlobalProperty$1(key, value);
749
- } else {
750
- try {
751
- if (!options.unsafe) delete O[key];
752
- else if (O[key]) simple = true;
753
- } catch (error) { /* empty */ }
754
- if (simple) O[key] = value;
755
- else definePropertyModule$2.f(O, key, {
756
- value: value,
757
- enumerable: false,
758
- configurable: !options.nonConfigurable,
759
- writable: !options.nonWritable
760
- });
761
- } return O;
762
- };
763
-
764
- var objectGetOwnPropertyNames = {};
765
-
766
- var ceil = Math.ceil;
767
- var floor = Math.floor;
768
-
769
- // `Math.trunc` method
770
- // https://tc39.es/ecma262/#sec-math.trunc
771
- // eslint-disable-next-line es/no-math-trunc -- safe
772
- var mathTrunc = Math.trunc || function trunc(x) {
773
- var n = +x;
774
- return (n > 0 ? floor : ceil)(n);
775
- };
776
-
777
- var trunc = mathTrunc;
778
-
779
- // `ToIntegerOrInfinity` abstract operation
780
- // https://tc39.es/ecma262/#sec-tointegerorinfinity
781
- var toIntegerOrInfinity$2 = function (argument) {
782
- var number = +argument;
783
- // eslint-disable-next-line no-self-compare -- NaN check
784
- return number !== number || number === 0 ? 0 : trunc(number);
785
- };
786
-
787
- var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
788
-
789
- var max = Math.max;
790
- var min$1 = Math.min;
791
-
792
- // Helper for a popular repeating case of the spec:
793
- // Let integer be ? ToInteger(index).
794
- // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
795
- var toAbsoluteIndex$1 = function (index, length) {
796
- var integer = toIntegerOrInfinity$1(index);
797
- return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
798
- };
799
-
800
- var toIntegerOrInfinity = toIntegerOrInfinity$2;
801
-
802
- var min = Math.min;
803
-
804
- // `ToLength` abstract operation
805
- // https://tc39.es/ecma262/#sec-tolength
806
- var toLength$1 = function (argument) {
807
- return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
808
- };
809
-
810
- var toLength = toLength$1;
811
-
812
- // `LengthOfArrayLike` abstract operation
813
- // https://tc39.es/ecma262/#sec-lengthofarraylike
814
- var lengthOfArrayLike$2 = function (obj) {
815
- return toLength(obj.length);
816
- };
817
-
818
- var toIndexedObject$1 = toIndexedObject$3;
819
- var toAbsoluteIndex = toAbsoluteIndex$1;
820
- var lengthOfArrayLike$1 = lengthOfArrayLike$2;
821
-
822
- // `Array.prototype.{ indexOf, includes }` methods implementation
823
- var createMethod = function (IS_INCLUDES) {
824
- return function ($this, el, fromIndex) {
825
- var O = toIndexedObject$1($this);
826
- var length = lengthOfArrayLike$1(O);
827
- var index = toAbsoluteIndex(fromIndex, length);
828
- var value;
829
- // Array#includes uses SameValueZero equality algorithm
830
- // eslint-disable-next-line no-self-compare -- NaN check
831
- if (IS_INCLUDES && el != el) while (length > index) {
832
- value = O[index++];
833
- // eslint-disable-next-line no-self-compare -- NaN check
834
- if (value != value) return true;
835
- // Array#indexOf ignores holes, Array#includes - not
836
- } else for (;length > index; index++) {
837
- if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
838
- } return !IS_INCLUDES && -1;
839
- };
840
- };
841
-
842
- var arrayIncludes = {
843
- // `Array.prototype.includes` method
844
- // https://tc39.es/ecma262/#sec-array.prototype.includes
845
- includes: createMethod(true),
846
- // `Array.prototype.indexOf` method
847
- // https://tc39.es/ecma262/#sec-array.prototype.indexof
848
- indexOf: createMethod(false)
849
- };
850
-
851
- var uncurryThis$6 = functionUncurryThis;
852
- var hasOwn$3 = hasOwnProperty_1;
853
- var toIndexedObject = toIndexedObject$3;
854
- var indexOf = arrayIncludes.indexOf;
855
- var hiddenKeys$1 = hiddenKeys$3;
856
-
857
- var push = uncurryThis$6([].push);
858
-
859
- var objectKeysInternal = function (object, names) {
860
- var O = toIndexedObject(object);
861
- var i = 0;
862
- var result = [];
863
- var key;
864
- for (key in O) !hasOwn$3(hiddenKeys$1, key) && hasOwn$3(O, key) && push(result, key);
865
- // Don't enum bug & hidden keys
866
- while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
867
- ~indexOf(result, key) || push(result, key);
868
- }
869
- return result;
870
- };
871
-
872
- // IE8- don't enum bug keys
873
- var enumBugKeys$1 = [
874
- 'constructor',
875
- 'hasOwnProperty',
876
- 'isPrototypeOf',
877
- 'propertyIsEnumerable',
878
- 'toLocaleString',
879
- 'toString',
880
- 'valueOf'
881
- ];
882
-
883
- var internalObjectKeys = objectKeysInternal;
884
- var enumBugKeys = enumBugKeys$1;
885
-
886
- var hiddenKeys = enumBugKeys.concat('length', 'prototype');
887
-
888
- // `Object.getOwnPropertyNames` method
889
- // https://tc39.es/ecma262/#sec-object.getownpropertynames
890
- // eslint-disable-next-line es/no-object-getownpropertynames -- safe
891
- objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
892
- return internalObjectKeys(O, hiddenKeys);
893
- };
894
-
895
- var objectGetOwnPropertySymbols = {};
896
-
897
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
898
- objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
899
-
900
- var getBuiltIn$5 = getBuiltIn$8;
901
- var uncurryThis$5 = functionUncurryThis;
902
- var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
903
- var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
904
- var anObject$6 = anObject$8;
905
-
906
- var concat = uncurryThis$5([].concat);
907
-
908
- // all object keys, includes non-enumerable and symbols
909
- var ownKeys$1 = getBuiltIn$5('Reflect', 'ownKeys') || function ownKeys(it) {
910
- var keys = getOwnPropertyNamesModule.f(anObject$6(it));
911
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
912
- return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
913
- };
914
-
915
- var hasOwn$2 = hasOwnProperty_1;
916
- var ownKeys = ownKeys$1;
917
- var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
918
- var definePropertyModule$1 = objectDefineProperty;
919
-
920
- var copyConstructorProperties$1 = function (target, source, exceptions) {
921
- var keys = ownKeys(source);
922
- var defineProperty = definePropertyModule$1.f;
923
- var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
924
- for (var i = 0; i < keys.length; i++) {
925
- var key = keys[i];
926
- if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
927
- defineProperty(target, key, getOwnPropertyDescriptor(source, key));
928
- }
929
- }
930
- };
931
-
932
- var fails$2 = fails$a;
933
- var isCallable$7 = isCallable$h;
934
-
935
- var replacement = /#|\.prototype\./;
936
-
937
- var isForced$2 = function (feature, detection) {
938
- var value = data[normalize(feature)];
939
- return value == POLYFILL ? true
940
- : value == NATIVE ? false
941
- : isCallable$7(detection) ? fails$2(detection)
942
- : !!detection;
943
- };
944
-
945
- var normalize = isForced$2.normalize = function (string) {
946
- return String(string).replace(replacement, '.').toLowerCase();
947
- };
948
-
949
- var data = isForced$2.data = {};
950
- var NATIVE = isForced$2.NATIVE = 'N';
951
- var POLYFILL = isForced$2.POLYFILL = 'P';
952
-
953
- var isForced_1 = isForced$2;
954
-
955
- var global$9 = global$i;
956
- var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
957
- var createNonEnumerableProperty = createNonEnumerableProperty$2;
958
- var defineBuiltIn$2 = defineBuiltIn$3;
959
- var defineGlobalProperty = defineGlobalProperty$3;
960
- var copyConstructorProperties = copyConstructorProperties$1;
961
- var isForced$1 = isForced_1;
962
-
963
- /*
964
- options.target - name of the target object
965
- options.global - target is the global object
966
- options.stat - export as static methods of target
967
- options.proto - export as prototype methods of target
968
- options.real - real prototype method for the `pure` version
969
- options.forced - export even if the native feature is available
970
- options.bind - bind methods to the target, required for the `pure` version
971
- options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
972
- options.unsafe - use the simple assignment of property instead of delete + defineProperty
973
- options.sham - add a flag to not completely full polyfills
974
- options.enumerable - export as enumerable property
975
- options.dontCallGetSet - prevent calling a getter on target
976
- options.name - the .name of the function if it does not match the key
977
- */
978
- var _export = function (options, source) {
979
- var TARGET = options.target;
980
- var GLOBAL = options.global;
981
- var STATIC = options.stat;
982
- var FORCED, target, key, targetProperty, sourceProperty, descriptor;
983
- if (GLOBAL) {
984
- target = global$9;
985
- } else if (STATIC) {
986
- target = global$9[TARGET] || defineGlobalProperty(TARGET, {});
987
- } else {
988
- target = (global$9[TARGET] || {}).prototype;
989
- }
990
- if (target) for (key in source) {
991
- sourceProperty = source[key];
992
- if (options.dontCallGetSet) {
993
- descriptor = getOwnPropertyDescriptor$1(target, key);
994
- targetProperty = descriptor && descriptor.value;
995
- } else targetProperty = target[key];
996
- FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
997
- // contained in target
998
- if (!FORCED && targetProperty !== undefined) {
999
- if (typeof sourceProperty == typeof targetProperty) continue;
1000
- copyConstructorProperties(sourceProperty, targetProperty);
1001
- }
1002
- // add a flag to not completely full polyfills
1003
- if (options.sham || (targetProperty && targetProperty.sham)) {
1004
- createNonEnumerableProperty(sourceProperty, 'sham', true);
1005
- }
1006
- defineBuiltIn$2(target, key, sourceProperty, options);
1007
- }
1008
- };
1009
-
1010
- var classof$3 = classofRaw$2;
1011
- var global$8 = global$i;
1012
-
1013
- var engineIsNode = classof$3(global$8.process) == 'process';
1014
-
1015
- var isCallable$6 = isCallable$h;
1016
-
1017
- var $String = String;
1018
- var $TypeError$6 = TypeError;
1019
-
1020
- var aPossiblePrototype$1 = function (argument) {
1021
- if (typeof argument == 'object' || isCallable$6(argument)) return argument;
1022
- throw $TypeError$6("Can't set " + $String(argument) + ' as a prototype');
1023
- };
1024
-
1025
- /* eslint-disable no-proto -- safe */
1026
-
1027
- var uncurryThis$4 = functionUncurryThis;
1028
- var anObject$5 = anObject$8;
1029
- var aPossiblePrototype = aPossiblePrototype$1;
1030
-
1031
- // `Object.setPrototypeOf` method
1032
- // https://tc39.es/ecma262/#sec-object.setprototypeof
1033
- // Works with __proto__ only. Old v8 can't work with null proto objects.
1034
- // eslint-disable-next-line es/no-object-setprototypeof -- safe
1035
- var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1036
- var CORRECT_SETTER = false;
1037
- var test = {};
1038
- var setter;
1039
- try {
1040
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1041
- setter = uncurryThis$4(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1042
- setter(test, []);
1043
- CORRECT_SETTER = test instanceof Array;
1044
- } catch (error) { /* empty */ }
1045
- return function setPrototypeOf(O, proto) {
1046
- anObject$5(O);
1047
- aPossiblePrototype(proto);
1048
- if (CORRECT_SETTER) setter(O, proto);
1049
- else O.__proto__ = proto;
1050
- return O;
1051
- };
1052
- }() : undefined);
1053
-
1054
- var defineProperty = objectDefineProperty.f;
1055
- var hasOwn$1 = hasOwnProperty_1;
1056
- var wellKnownSymbol$8 = wellKnownSymbol$a;
1057
-
1058
- var TO_STRING_TAG$2 = wellKnownSymbol$8('toStringTag');
1059
-
1060
- var setToStringTag$1 = function (target, TAG, STATIC) {
1061
- if (target && !STATIC) target = target.prototype;
1062
- if (target && !hasOwn$1(target, TO_STRING_TAG$2)) {
1063
- defineProperty(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
1064
- }
1065
- };
1066
-
1067
- var getBuiltIn$4 = getBuiltIn$8;
1068
- var definePropertyModule = objectDefineProperty;
1069
- var wellKnownSymbol$7 = wellKnownSymbol$a;
1070
- var DESCRIPTORS = descriptors;
1071
-
1072
- var SPECIES$2 = wellKnownSymbol$7('species');
1073
-
1074
- var setSpecies$1 = function (CONSTRUCTOR_NAME) {
1075
- var Constructor = getBuiltIn$4(CONSTRUCTOR_NAME);
1076
- var defineProperty = definePropertyModule.f;
1077
-
1078
- if (DESCRIPTORS && Constructor && !Constructor[SPECIES$2]) {
1079
- defineProperty(Constructor, SPECIES$2, {
1080
- configurable: true,
1081
- get: function () { return this; }
1082
- });
1083
- }
1084
- };
1085
-
1086
- var isPrototypeOf$1 = objectIsPrototypeOf;
1087
-
1088
- var $TypeError$5 = TypeError;
1089
-
1090
- var anInstance$1 = function (it, Prototype) {
1091
- if (isPrototypeOf$1(Prototype, it)) return it;
1092
- throw $TypeError$5('Incorrect invocation');
1093
- };
1094
-
1095
- var wellKnownSymbol$6 = wellKnownSymbol$a;
1096
-
1097
- var TO_STRING_TAG$1 = wellKnownSymbol$6('toStringTag');
1098
- var test = {};
1099
-
1100
- test[TO_STRING_TAG$1] = 'z';
1101
-
1102
- var toStringTagSupport = String(test) === '[object z]';
1103
-
1104
- var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1105
- var isCallable$5 = isCallable$h;
1106
- var classofRaw$1 = classofRaw$2;
1107
- var wellKnownSymbol$5 = wellKnownSymbol$a;
1108
-
1109
- var TO_STRING_TAG = wellKnownSymbol$5('toStringTag');
1110
- var $Object = Object;
1111
-
1112
- // ES3 wrong here
1113
- var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) == 'Arguments';
1114
-
1115
- // fallback for IE11 Script Access Denied error
1116
- var tryGet = function (it, key) {
1117
- try {
1118
- return it[key];
1119
- } catch (error) { /* empty */ }
1120
- };
1121
-
1122
- // getting tag from ES6+ `Object.prototype.toString`
1123
- var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1124
- var O, tag, result;
1125
- return it === undefined ? 'Undefined' : it === null ? 'Null'
1126
- // @@toStringTag case
1127
- : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1128
- // builtinTag case
1129
- : CORRECT_ARGUMENTS ? classofRaw$1(O)
1130
- // ES3 arguments fallback
1131
- : (result = classofRaw$1(O)) == 'Object' && isCallable$5(O.callee) ? 'Arguments' : result;
1132
- };
1133
-
1134
- var uncurryThis$3 = functionUncurryThis;
1135
- var fails$1 = fails$a;
1136
- var isCallable$4 = isCallable$h;
1137
- var classof$1 = classof$2;
1138
- var getBuiltIn$3 = getBuiltIn$8;
1139
- var inspectSource$1 = inspectSource$3;
1140
-
1141
- var noop = function () { /* empty */ };
1142
- var empty = [];
1143
- var construct = getBuiltIn$3('Reflect', 'construct');
1144
- var constructorRegExp = /^\s*(?:class|function)\b/;
1145
- var exec = uncurryThis$3(constructorRegExp.exec);
1146
- var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
1147
-
1148
- var isConstructorModern = function isConstructor(argument) {
1149
- if (!isCallable$4(argument)) return false;
1150
- try {
1151
- construct(noop, empty, argument);
1152
- return true;
1153
- } catch (error) {
1154
- return false;
1155
- }
1156
- };
1157
-
1158
- var isConstructorLegacy = function isConstructor(argument) {
1159
- if (!isCallable$4(argument)) return false;
1160
- switch (classof$1(argument)) {
1161
- case 'AsyncFunction':
1162
- case 'GeneratorFunction':
1163
- case 'AsyncGeneratorFunction': return false;
1164
- }
1165
- try {
1166
- // we can't check .prototype since constructors produced by .bind haven't it
1167
- // `Function#toString` throws on some built-it function in some legacy engines
1168
- // (for example, `DOMQuad` and similar in FF41-)
1169
- return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource$1(argument));
1170
- } catch (error) {
1171
- return true;
1172
- }
1173
- };
1174
-
1175
- isConstructorLegacy.sham = true;
1176
-
1177
- // `IsConstructor` abstract operation
1178
- // https://tc39.es/ecma262/#sec-isconstructor
1179
- var isConstructor$1 = !construct || fails$1(function () {
1180
- var called;
1181
- return isConstructorModern(isConstructorModern.call)
1182
- || !isConstructorModern(Object)
1183
- || !isConstructorModern(function () { called = true; })
1184
- || called;
1185
- }) ? isConstructorLegacy : isConstructorModern;
1186
-
1187
- var isConstructor = isConstructor$1;
1188
- var tryToString$2 = tryToString$4;
1189
-
1190
- var $TypeError$4 = TypeError;
1191
-
1192
- // `Assert: IsConstructor(argument) is true`
1193
- var aConstructor$1 = function (argument) {
1194
- if (isConstructor(argument)) return argument;
1195
- throw $TypeError$4(tryToString$2(argument) + ' is not a constructor');
1196
- };
1197
-
1198
- var anObject$4 = anObject$8;
1199
- var aConstructor = aConstructor$1;
1200
- var isNullOrUndefined$1 = isNullOrUndefined$4;
1201
- var wellKnownSymbol$4 = wellKnownSymbol$a;
1202
-
1203
- var SPECIES$1 = wellKnownSymbol$4('species');
1204
-
1205
- // `SpeciesConstructor` abstract operation
1206
- // https://tc39.es/ecma262/#sec-speciesconstructor
1207
- var speciesConstructor$1 = function (O, defaultConstructor) {
1208
- var C = anObject$4(O).constructor;
1209
- var S;
1210
- return C === undefined || isNullOrUndefined$1(S = anObject$4(C)[SPECIES$1]) ? defaultConstructor : aConstructor(S);
1211
- };
1212
-
1213
- var NATIVE_BIND$1 = functionBindNative;
1214
-
1215
- var FunctionPrototype = Function.prototype;
1216
- var apply$1 = FunctionPrototype.apply;
1217
- var call$7 = FunctionPrototype.call;
1218
-
1219
- // eslint-disable-next-line es/no-reflect -- safe
1220
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$7.bind(apply$1) : function () {
1221
- return call$7.apply(apply$1, arguments);
1222
- });
1223
-
1224
- var classofRaw = classofRaw$2;
1225
- var uncurryThis$2 = functionUncurryThis;
1226
-
1227
- var functionUncurryThisClause = function (fn) {
1228
- // Nashorn bug:
1229
- // https://github.com/zloirock/core-js/issues/1128
1230
- // https://github.com/zloirock/core-js/issues/1130
1231
- if (classofRaw(fn) === 'Function') return uncurryThis$2(fn);
1232
- };
1233
-
1234
- var uncurryThis$1 = functionUncurryThisClause;
1235
- var aCallable$5 = aCallable$7;
1236
- var NATIVE_BIND = functionBindNative;
1237
-
1238
- var bind$4 = uncurryThis$1(uncurryThis$1.bind);
1239
-
1240
- // optional / simple context binding
1241
- var functionBindContext = function (fn, that) {
1242
- aCallable$5(fn);
1243
- return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
1244
- return fn.apply(that, arguments);
1245
- };
1246
- };
1247
-
1248
- var getBuiltIn$2 = getBuiltIn$8;
1249
-
1250
- var html$1 = getBuiltIn$2('document', 'documentElement');
1251
-
1252
- var uncurryThis = functionUncurryThis;
1253
-
1254
- var arraySlice$1 = uncurryThis([].slice);
1255
-
1256
- var $TypeError$3 = TypeError;
1257
-
1258
- var validateArgumentsLength$1 = function (passed, required) {
1259
- if (passed < required) throw $TypeError$3('Not enough arguments');
1260
- return passed;
1261
- };
1262
-
1263
- var userAgent$2 = engineUserAgent;
1264
-
1265
- var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
1266
-
1267
- var global$7 = global$i;
1268
- var apply = functionApply;
1269
- var bind$3 = functionBindContext;
1270
- var isCallable$3 = isCallable$h;
1271
- var hasOwn = hasOwnProperty_1;
1272
- var fails = fails$a;
1273
- var html = html$1;
1274
- var arraySlice = arraySlice$1;
1275
- var createElement = documentCreateElement;
1276
- var validateArgumentsLength = validateArgumentsLength$1;
1277
- var IS_IOS$1 = engineIsIos;
1278
- var IS_NODE$3 = engineIsNode;
1279
-
1280
- var set = global$7.setImmediate;
1281
- var clear = global$7.clearImmediate;
1282
- var process$2 = global$7.process;
1283
- var Dispatch = global$7.Dispatch;
1284
- var Function$1 = global$7.Function;
1285
- var MessageChannel = global$7.MessageChannel;
1286
- var String$1 = global$7.String;
1287
- var counter = 0;
1288
- var queue$1 = {};
1289
- var ONREADYSTATECHANGE = 'onreadystatechange';
1290
- var $location, defer, channel, port;
1291
-
1292
- try {
1293
- // Deno throws a ReferenceError on `location` access without `--location` flag
1294
- $location = global$7.location;
1295
- } catch (error) { /* empty */ }
1296
-
1297
- var run = function (id) {
1298
- if (hasOwn(queue$1, id)) {
1299
- var fn = queue$1[id];
1300
- delete queue$1[id];
1301
- fn();
1302
- }
1303
- };
1304
-
1305
- var runner = function (id) {
1306
- return function () {
1307
- run(id);
1308
- };
1309
- };
1310
-
1311
- var listener = function (event) {
1312
- run(event.data);
1313
- };
1314
-
1315
- var post = function (id) {
1316
- // old engines have not location.origin
1317
- global$7.postMessage(String$1(id), $location.protocol + '//' + $location.host);
1318
- };
1319
-
1320
- // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
1321
- if (!set || !clear) {
1322
- set = function setImmediate(handler) {
1323
- validateArgumentsLength(arguments.length, 1);
1324
- var fn = isCallable$3(handler) ? handler : Function$1(handler);
1325
- var args = arraySlice(arguments, 1);
1326
- queue$1[++counter] = function () {
1327
- apply(fn, undefined, args);
1328
- };
1329
- defer(counter);
1330
- return counter;
1331
- };
1332
- clear = function clearImmediate(id) {
1333
- delete queue$1[id];
1334
- };
1335
- // Node.js 0.8-
1336
- if (IS_NODE$3) {
1337
- defer = function (id) {
1338
- process$2.nextTick(runner(id));
1339
- };
1340
- // Sphere (JS game engine) Dispatch API
1341
- } else if (Dispatch && Dispatch.now) {
1342
- defer = function (id) {
1343
- Dispatch.now(runner(id));
1344
- };
1345
- // Browsers with MessageChannel, includes WebWorkers
1346
- // except iOS - https://github.com/zloirock/core-js/issues/624
1347
- } else if (MessageChannel && !IS_IOS$1) {
1348
- channel = new MessageChannel();
1349
- port = channel.port2;
1350
- channel.port1.onmessage = listener;
1351
- defer = bind$3(port.postMessage, port);
1352
- // Browsers with postMessage, skip WebWorkers
1353
- // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
1354
- } else if (
1355
- global$7.addEventListener &&
1356
- isCallable$3(global$7.postMessage) &&
1357
- !global$7.importScripts &&
1358
- $location && $location.protocol !== 'file:' &&
1359
- !fails(post)
1360
- ) {
1361
- defer = post;
1362
- global$7.addEventListener('message', listener, false);
1363
- // IE8-
1364
- } else if (ONREADYSTATECHANGE in createElement('script')) {
1365
- defer = function (id) {
1366
- html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
1367
- html.removeChild(this);
1368
- run(id);
1369
- };
1370
- };
1371
- // Rest old browsers
1372
- } else {
1373
- defer = function (id) {
1374
- setTimeout(runner(id), 0);
1375
- };
1376
- }
1377
- }
1378
-
1379
- var task$1 = {
1380
- set: set,
1381
- clear: clear
1382
- };
1383
-
1384
- var userAgent$1 = engineUserAgent;
1385
- var global$6 = global$i;
1386
-
1387
- var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$6.Pebble !== undefined;
1388
-
1389
- var userAgent = engineUserAgent;
1390
-
1391
- var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
1392
-
1393
- var global$5 = global$i;
1394
- var bind$2 = functionBindContext;
1395
- var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1396
- var macrotask = task$1.set;
1397
- var IS_IOS = engineIsIos;
1398
- var IS_IOS_PEBBLE = engineIsIosPebble;
1399
- var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
1400
- var IS_NODE$2 = engineIsNode;
1401
-
1402
- var MutationObserver = global$5.MutationObserver || global$5.WebKitMutationObserver;
1403
- var document$2 = global$5.document;
1404
- var process$1 = global$5.process;
1405
- var Promise$1 = global$5.Promise;
1406
- // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
1407
- var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$5, 'queueMicrotask');
1408
- var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
1409
-
1410
- var flush, head, last, notify$1, toggle, node, promise, then;
1411
-
1412
- // modern engines have queueMicrotask method
1413
- if (!queueMicrotask) {
1414
- flush = function () {
1415
- var parent, fn;
1416
- if (IS_NODE$2 && (parent = process$1.domain)) parent.exit();
1417
- while (head) {
1418
- fn = head.fn;
1419
- head = head.next;
1420
- try {
1421
- fn();
1422
- } catch (error) {
1423
- if (head) notify$1();
1424
- else last = undefined;
1425
- throw error;
1426
- }
1427
- } last = undefined;
1428
- if (parent) parent.enter();
1429
- };
1430
-
1431
- // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
1432
- // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
1433
- if (!IS_IOS && !IS_NODE$2 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
1434
- toggle = true;
1435
- node = document$2.createTextNode('');
1436
- new MutationObserver(flush).observe(node, { characterData: true });
1437
- notify$1 = function () {
1438
- node.data = toggle = !toggle;
1439
- };
1440
- // environments with maybe non-completely correct, but existent Promise
1441
- } else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
1442
- // Promise.resolve without an argument throws an error in LG WebOS 2
1443
- promise = Promise$1.resolve(undefined);
1444
- // workaround of WebKit ~ iOS Safari 10.1 bug
1445
- promise.constructor = Promise$1;
1446
- then = bind$2(promise.then, promise);
1447
- notify$1 = function () {
1448
- then(flush);
1449
- };
1450
- // Node.js without promises
1451
- } else if (IS_NODE$2) {
1452
- notify$1 = function () {
1453
- process$1.nextTick(flush);
1454
- };
1455
- // for other environments - macrotask based on:
1456
- // - setImmediate
1457
- // - MessageChannel
1458
- // - window.postMessage
1459
- // - onreadystatechange
1460
- // - setTimeout
1461
- } else {
1462
- // strange IE + webpack dev server bug - use .bind(global)
1463
- macrotask = bind$2(macrotask, global$5);
1464
- notify$1 = function () {
1465
- macrotask(flush);
1466
- };
1467
- }
1468
- }
1469
-
1470
- var microtask$1 = queueMicrotask || function (fn) {
1471
- var task = { fn: fn, next: undefined };
1472
- if (last) last.next = task;
1473
- if (!head) {
1474
- head = task;
1475
- notify$1();
1476
- } last = task;
1477
- };
1478
-
1479
- var global$4 = global$i;
1480
-
1481
- var hostReportErrors$1 = function (a, b) {
1482
- var console = global$4.console;
1483
- if (console && console.error) {
1484
- arguments.length == 1 ? console.error(a) : console.error(a, b);
1485
- }
1486
- };
1487
-
1488
- var perform$3 = function (exec) {
1489
- try {
1490
- return { error: false, value: exec() };
1491
- } catch (error) {
1492
- return { error: true, value: error };
1493
- }
1494
- };
1495
-
1496
- var Queue$1 = function () {
1497
- this.head = null;
1498
- this.tail = null;
1499
- };
1500
-
1501
- Queue$1.prototype = {
1502
- add: function (item) {
1503
- var entry = { item: item, next: null };
1504
- if (this.head) this.tail.next = entry;
1505
- else this.head = entry;
1506
- this.tail = entry;
1507
- },
1508
- get: function () {
1509
- var entry = this.head;
1510
- if (entry) {
1511
- this.head = entry.next;
1512
- if (this.tail === entry) this.tail = null;
1513
- return entry.item;
1514
- }
1515
- }
1516
- };
1517
-
1518
- var queue = Queue$1;
1519
-
1520
- var global$3 = global$i;
1521
-
1522
- var promiseNativeConstructor = global$3.Promise;
1523
-
1524
- /* global Deno -- Deno case */
1525
-
1526
- var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
1527
-
1528
- var IS_DENO$1 = engineIsDeno;
1529
- var IS_NODE$1 = engineIsNode;
1530
-
1531
- var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
1532
- && typeof window == 'object'
1533
- && typeof document == 'object';
1534
-
1535
- var global$2 = global$i;
1536
- var NativePromiseConstructor$3 = promiseNativeConstructor;
1537
- var isCallable$2 = isCallable$h;
1538
- var isForced = isForced_1;
1539
- var inspectSource = inspectSource$3;
1540
- var wellKnownSymbol$3 = wellKnownSymbol$a;
1541
- var IS_BROWSER = engineIsBrowser;
1542
- var IS_DENO = engineIsDeno;
1543
- var V8_VERSION = engineV8Version;
1544
-
1545
- NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
1546
- var SPECIES = wellKnownSymbol$3('species');
1547
- var SUBCLASSING = false;
1548
- var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$2(global$2.PromiseRejectionEvent);
1549
-
1550
- var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
1551
- var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
1552
- var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
1553
- // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
1554
- // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
1555
- // We can't detect it synchronously, so just check versions
1556
- if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
1557
- // We can't use @@species feature detection in V8 since it causes
1558
- // deoptimization and performance degradation
1559
- // https://github.com/zloirock/core-js/issues/679
1560
- if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
1561
- // Detect correctness of subclassing with @@species support
1562
- var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
1563
- var FakePromise = function (exec) {
1564
- exec(function () { /* empty */ }, function () { /* empty */ });
1565
- };
1566
- var constructor = promise.constructor = {};
1567
- constructor[SPECIES] = FakePromise;
1568
- SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
1569
- if (!SUBCLASSING) return true;
1570
- // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
1571
- } return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT$1;
1572
- });
1573
-
1574
- var promiseConstructorDetection = {
1575
- CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
1576
- REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
1577
- SUBCLASSING: SUBCLASSING
1578
- };
1579
-
1580
- var newPromiseCapability$2 = {};
1581
-
1582
- var aCallable$4 = aCallable$7;
1583
-
1584
- var $TypeError$2 = TypeError;
1585
-
1586
- var PromiseCapability = function (C) {
1587
- var resolve, reject;
1588
- this.promise = new C(function ($$resolve, $$reject) {
1589
- if (resolve !== undefined || reject !== undefined) throw $TypeError$2('Bad Promise constructor');
1590
- resolve = $$resolve;
1591
- reject = $$reject;
1592
- });
1593
- this.resolve = aCallable$4(resolve);
1594
- this.reject = aCallable$4(reject);
1595
- };
1596
-
1597
- // `NewPromiseCapability` abstract operation
1598
- // https://tc39.es/ecma262/#sec-newpromisecapability
1599
- newPromiseCapability$2.f = function (C) {
1600
- return new PromiseCapability(C);
1601
- };
1602
-
1603
- var $$5 = _export;
1604
- var IS_NODE = engineIsNode;
1605
- var global$1 = global$i;
1606
- var call$6 = functionCall;
1607
- var defineBuiltIn$1 = defineBuiltIn$3;
1608
- var setPrototypeOf = objectSetPrototypeOf;
1609
- var setToStringTag = setToStringTag$1;
1610
- var setSpecies = setSpecies$1;
1611
- var aCallable$3 = aCallable$7;
1612
- var isCallable$1 = isCallable$h;
1613
- var isObject$1 = isObject$7;
1614
- var anInstance = anInstance$1;
1615
- var speciesConstructor = speciesConstructor$1;
1616
- var task = task$1.set;
1617
- var microtask = microtask$1;
1618
- var hostReportErrors = hostReportErrors$1;
1619
- var perform$2 = perform$3;
1620
- var Queue = queue;
1621
- var InternalStateModule = internalState;
1622
- var NativePromiseConstructor$2 = promiseNativeConstructor;
1623
- var PromiseConstructorDetection = promiseConstructorDetection;
1624
- var newPromiseCapabilityModule$3 = newPromiseCapability$2;
1625
-
1626
- var PROMISE = 'Promise';
1627
- var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
1628
- var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
1629
- var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
1630
- var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
1631
- var setInternalState = InternalStateModule.set;
1632
- var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
1633
- var PromiseConstructor = NativePromiseConstructor$2;
1634
- var PromisePrototype = NativePromisePrototype$1;
1635
- var TypeError$1 = global$1.TypeError;
1636
- var document$1 = global$1.document;
1637
- var process = global$1.process;
1638
- var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
1639
- var newGenericPromiseCapability = newPromiseCapability$1;
1640
-
1641
- var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$1.dispatchEvent);
1642
- var UNHANDLED_REJECTION = 'unhandledrejection';
1643
- var REJECTION_HANDLED = 'rejectionhandled';
1644
- var PENDING = 0;
1645
- var FULFILLED = 1;
1646
- var REJECTED = 2;
1647
- var HANDLED = 1;
1648
- var UNHANDLED = 2;
1649
-
1650
- var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
1651
-
1652
- // helpers
1653
- var isThenable = function (it) {
1654
- var then;
1655
- return isObject$1(it) && isCallable$1(then = it.then) ? then : false;
1656
- };
1657
-
1658
- var callReaction = function (reaction, state) {
1659
- var value = state.value;
1660
- var ok = state.state == FULFILLED;
1661
- var handler = ok ? reaction.ok : reaction.fail;
1662
- var resolve = reaction.resolve;
1663
- var reject = reaction.reject;
1664
- var domain = reaction.domain;
1665
- var result, then, exited;
1666
- try {
1667
- if (handler) {
1668
- if (!ok) {
1669
- if (state.rejection === UNHANDLED) onHandleUnhandled(state);
1670
- state.rejection = HANDLED;
1671
- }
1672
- if (handler === true) result = value;
1673
- else {
1674
- if (domain) domain.enter();
1675
- result = handler(value); // can throw
1676
- if (domain) {
1677
- domain.exit();
1678
- exited = true;
1679
- }
1680
- }
1681
- if (result === reaction.promise) {
1682
- reject(TypeError$1('Promise-chain cycle'));
1683
- } else if (then = isThenable(result)) {
1684
- call$6(then, result, resolve, reject);
1685
- } else resolve(result);
1686
- } else reject(value);
1687
- } catch (error) {
1688
- if (domain && !exited) domain.exit();
1689
- reject(error);
1690
- }
1691
- };
1692
-
1693
- var notify = function (state, isReject) {
1694
- if (state.notified) return;
1695
- state.notified = true;
1696
- microtask(function () {
1697
- var reactions = state.reactions;
1698
- var reaction;
1699
- while (reaction = reactions.get()) {
1700
- callReaction(reaction, state);
1701
- }
1702
- state.notified = false;
1703
- if (isReject && !state.rejection) onUnhandled(state);
1704
- });
1705
- };
1706
-
1707
- var dispatchEvent = function (name, promise, reason) {
1708
- var event, handler;
1709
- if (DISPATCH_EVENT) {
1710
- event = document$1.createEvent('Event');
1711
- event.promise = promise;
1712
- event.reason = reason;
1713
- event.initEvent(name, false, true);
1714
- global$1.dispatchEvent(event);
1715
- } else event = { promise: promise, reason: reason };
1716
- if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$1['on' + name])) handler(event);
1717
- else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
1718
- };
1719
-
1720
- var onUnhandled = function (state) {
1721
- call$6(task, global$1, function () {
1722
- var promise = state.facade;
1723
- var value = state.value;
1724
- var IS_UNHANDLED = isUnhandled(state);
1725
- var result;
1726
- if (IS_UNHANDLED) {
1727
- result = perform$2(function () {
1728
- if (IS_NODE) {
1729
- process.emit('unhandledRejection', value, promise);
1730
- } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
1731
- });
1732
- // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
1733
- state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
1734
- if (result.error) throw result.value;
1735
- }
1736
- });
1737
- };
1738
-
1739
- var isUnhandled = function (state) {
1740
- return state.rejection !== HANDLED && !state.parent;
1741
- };
1742
-
1743
- var onHandleUnhandled = function (state) {
1744
- call$6(task, global$1, function () {
1745
- var promise = state.facade;
1746
- if (IS_NODE) {
1747
- process.emit('rejectionHandled', promise);
1748
- } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
1749
- });
1750
- };
1751
-
1752
- var bind$1 = function (fn, state, unwrap) {
1753
- return function (value) {
1754
- fn(state, value, unwrap);
1755
- };
1756
- };
1757
-
1758
- var internalReject = function (state, value, unwrap) {
1759
- if (state.done) return;
1760
- state.done = true;
1761
- if (unwrap) state = unwrap;
1762
- state.value = value;
1763
- state.state = REJECTED;
1764
- notify(state, true);
1765
- };
1766
-
1767
- var internalResolve = function (state, value, unwrap) {
1768
- if (state.done) return;
1769
- state.done = true;
1770
- if (unwrap) state = unwrap;
1771
- try {
1772
- if (state.facade === value) throw TypeError$1("Promise can't be resolved itself");
1773
- var then = isThenable(value);
1774
- if (then) {
1775
- microtask(function () {
1776
- var wrapper = { done: false };
1777
- try {
1778
- call$6(then, value,
1779
- bind$1(internalResolve, wrapper, state),
1780
- bind$1(internalReject, wrapper, state)
1781
- );
1782
- } catch (error) {
1783
- internalReject(wrapper, error, state);
1784
- }
1785
- });
1786
- } else {
1787
- state.value = value;
1788
- state.state = FULFILLED;
1789
- notify(state, false);
1790
- }
1791
- } catch (error) {
1792
- internalReject({ done: false }, error, state);
1793
- }
1794
- };
1795
-
1796
- // constructor polyfill
1797
- if (FORCED_PROMISE_CONSTRUCTOR$4) {
1798
- // 25.4.3.1 Promise(executor)
1799
- PromiseConstructor = function Promise(executor) {
1800
- anInstance(this, PromisePrototype);
1801
- aCallable$3(executor);
1802
- call$6(Internal, this);
1803
- var state = getInternalPromiseState(this);
1804
- try {
1805
- executor(bind$1(internalResolve, state), bind$1(internalReject, state));
1806
- } catch (error) {
1807
- internalReject(state, error);
1808
- }
1809
- };
1810
-
1811
- PromisePrototype = PromiseConstructor.prototype;
1812
-
1813
- // eslint-disable-next-line no-unused-vars -- required for `.length`
1814
- Internal = function Promise(executor) {
1815
- setInternalState(this, {
1816
- type: PROMISE,
1817
- done: false,
1818
- notified: false,
1819
- parent: false,
1820
- reactions: new Queue(),
1821
- rejection: false,
1822
- state: PENDING,
1823
- value: undefined
1824
- });
1825
- };
1826
-
1827
- // `Promise.prototype.then` method
1828
- // https://tc39.es/ecma262/#sec-promise.prototype.then
1829
- Internal.prototype = defineBuiltIn$1(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
1830
- var state = getInternalPromiseState(this);
1831
- var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
1832
- state.parent = true;
1833
- reaction.ok = isCallable$1(onFulfilled) ? onFulfilled : true;
1834
- reaction.fail = isCallable$1(onRejected) && onRejected;
1835
- reaction.domain = IS_NODE ? process.domain : undefined;
1836
- if (state.state == PENDING) state.reactions.add(reaction);
1837
- else microtask(function () {
1838
- callReaction(reaction, state);
1839
- });
1840
- return reaction.promise;
1841
- });
1842
-
1843
- OwnPromiseCapability = function () {
1844
- var promise = new Internal();
1845
- var state = getInternalPromiseState(promise);
1846
- this.promise = promise;
1847
- this.resolve = bind$1(internalResolve, state);
1848
- this.reject = bind$1(internalReject, state);
1849
- };
1850
-
1851
- newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
1852
- return C === PromiseConstructor || C === PromiseWrapper
1853
- ? new OwnPromiseCapability(C)
1854
- : newGenericPromiseCapability(C);
1855
- };
1856
-
1857
- if (isCallable$1(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
1858
- nativeThen = NativePromisePrototype$1.then;
1859
-
1860
- if (!NATIVE_PROMISE_SUBCLASSING) {
1861
- // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
1862
- defineBuiltIn$1(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
1863
- var that = this;
1864
- return new PromiseConstructor(function (resolve, reject) {
1865
- call$6(nativeThen, that, resolve, reject);
1866
- }).then(onFulfilled, onRejected);
1867
- // https://github.com/zloirock/core-js/issues/640
1868
- }, { unsafe: true });
1869
- }
1870
-
1871
- // make `.constructor === Promise` work for native promise-based APIs
1872
- try {
1873
- delete NativePromisePrototype$1.constructor;
1874
- } catch (error) { /* empty */ }
1875
-
1876
- // make `instanceof Promise` work for native promise-based APIs
1877
- if (setPrototypeOf) {
1878
- setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
1879
- }
1880
- }
1881
- }
1882
-
1883
- $$5({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
1884
- Promise: PromiseConstructor
1885
- });
1886
-
1887
- setToStringTag(PromiseConstructor, PROMISE, false);
1888
- setSpecies(PROMISE);
1889
-
1890
- var iterators = {};
1891
-
1892
- var wellKnownSymbol$2 = wellKnownSymbol$a;
1893
- var Iterators$1 = iterators;
1894
-
1895
- var ITERATOR$2 = wellKnownSymbol$2('iterator');
1896
- var ArrayPrototype = Array.prototype;
1897
-
1898
- // check on default Array iterator
1899
- var isArrayIteratorMethod$1 = function (it) {
1900
- return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
1901
- };
1902
-
1903
- var classof = classof$2;
1904
- var getMethod$1 = getMethod$3;
1905
- var isNullOrUndefined = isNullOrUndefined$4;
1906
- var Iterators = iterators;
1907
- var wellKnownSymbol$1 = wellKnownSymbol$a;
1908
-
1909
- var ITERATOR$1 = wellKnownSymbol$1('iterator');
1910
-
1911
- var getIteratorMethod$2 = function (it) {
1912
- if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$1)
1913
- || getMethod$1(it, '@@iterator')
1914
- || Iterators[classof(it)];
1915
- };
1916
-
1917
- var call$5 = functionCall;
1918
- var aCallable$2 = aCallable$7;
1919
- var anObject$3 = anObject$8;
1920
- var tryToString$1 = tryToString$4;
1921
- var getIteratorMethod$1 = getIteratorMethod$2;
1922
-
1923
- var $TypeError$1 = TypeError;
1924
-
1925
- var getIterator$1 = function (argument, usingIterator) {
1926
- var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
1927
- if (aCallable$2(iteratorMethod)) return anObject$3(call$5(iteratorMethod, argument));
1928
- throw $TypeError$1(tryToString$1(argument) + ' is not iterable');
1929
- };
1930
-
1931
- var call$4 = functionCall;
1932
- var anObject$2 = anObject$8;
1933
- var getMethod = getMethod$3;
1934
-
1935
- var iteratorClose$1 = function (iterator, kind, value) {
1936
- var innerResult, innerError;
1937
- anObject$2(iterator);
1938
- try {
1939
- innerResult = getMethod(iterator, 'return');
1940
- if (!innerResult) {
1941
- if (kind === 'throw') throw value;
1942
- return value;
1943
- }
1944
- innerResult = call$4(innerResult, iterator);
1945
- } catch (error) {
1946
- innerError = true;
1947
- innerResult = error;
1948
- }
1949
- if (kind === 'throw') throw value;
1950
- if (innerError) throw innerResult;
1951
- anObject$2(innerResult);
1952
- return value;
1953
- };
1954
-
1955
- var bind = functionBindContext;
1956
- var call$3 = functionCall;
1957
- var anObject$1 = anObject$8;
1958
- var tryToString = tryToString$4;
1959
- var isArrayIteratorMethod = isArrayIteratorMethod$1;
1960
- var lengthOfArrayLike = lengthOfArrayLike$2;
1961
- var isPrototypeOf = objectIsPrototypeOf;
1962
- var getIterator = getIterator$1;
1963
- var getIteratorMethod = getIteratorMethod$2;
1964
- var iteratorClose = iteratorClose$1;
1965
-
1966
- var $TypeError = TypeError;
1967
-
1968
- var Result = function (stopped, result) {
1969
- this.stopped = stopped;
1970
- this.result = result;
1971
- };
1972
-
1973
- var ResultPrototype = Result.prototype;
1974
-
1975
- var iterate$2 = function (iterable, unboundFunction, options) {
1976
- var that = options && options.that;
1977
- var AS_ENTRIES = !!(options && options.AS_ENTRIES);
1978
- var IS_RECORD = !!(options && options.IS_RECORD);
1979
- var IS_ITERATOR = !!(options && options.IS_ITERATOR);
1980
- var INTERRUPTED = !!(options && options.INTERRUPTED);
1981
- var fn = bind(unboundFunction, that);
1982
- var iterator, iterFn, index, length, result, next, step;
1983
-
1984
- var stop = function (condition) {
1985
- if (iterator) iteratorClose(iterator, 'normal', condition);
1986
- return new Result(true, condition);
1987
- };
1988
-
1989
- var callFn = function (value) {
1990
- if (AS_ENTRIES) {
1991
- anObject$1(value);
1992
- return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
1993
- } return INTERRUPTED ? fn(value, stop) : fn(value);
1994
- };
1995
-
1996
- if (IS_RECORD) {
1997
- iterator = iterable.iterator;
1998
- } else if (IS_ITERATOR) {
1999
- iterator = iterable;
2000
- } else {
2001
- iterFn = getIteratorMethod(iterable);
2002
- if (!iterFn) throw $TypeError(tryToString(iterable) + ' is not iterable');
2003
- // optimisation for array iterators
2004
- if (isArrayIteratorMethod(iterFn)) {
2005
- for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
2006
- result = callFn(iterable[index]);
2007
- if (result && isPrototypeOf(ResultPrototype, result)) return result;
2008
- } return new Result(false);
2009
- }
2010
- iterator = getIterator(iterable, iterFn);
2011
- }
2012
-
2013
- next = IS_RECORD ? iterable.next : iterator.next;
2014
- while (!(step = call$3(next, iterator)).done) {
2015
- try {
2016
- result = callFn(step.value);
2017
- } catch (error) {
2018
- iteratorClose(iterator, 'throw', error);
2019
- }
2020
- if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
2021
- } return new Result(false);
2022
- };
2023
-
2024
- var wellKnownSymbol = wellKnownSymbol$a;
2025
-
2026
- var ITERATOR = wellKnownSymbol('iterator');
2027
- var SAFE_CLOSING = false;
2028
-
2029
- try {
2030
- var called = 0;
2031
- var iteratorWithReturn = {
2032
- next: function () {
2033
- return { done: !!called++ };
2034
- },
2035
- 'return': function () {
2036
- SAFE_CLOSING = true;
2037
- }
2038
- };
2039
- iteratorWithReturn[ITERATOR] = function () {
2040
- return this;
2041
- };
2042
- // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
2043
- Array.from(iteratorWithReturn, function () { throw 2; });
2044
- } catch (error) { /* empty */ }
2045
-
2046
- var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
2047
- if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
2048
- var ITERATION_SUPPORT = false;
2049
- try {
2050
- var object = {};
2051
- object[ITERATOR] = function () {
2052
- return {
2053
- next: function () {
2054
- return { done: ITERATION_SUPPORT = true };
2055
- }
2056
- };
2057
- };
2058
- exec(object);
2059
- } catch (error) { /* empty */ }
2060
- return ITERATION_SUPPORT;
2061
- };
2062
-
2063
- var NativePromiseConstructor$1 = promiseNativeConstructor;
2064
- var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
2065
- var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
2066
-
2067
- var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
2068
- NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
2069
- });
2070
-
2071
- var $$4 = _export;
2072
- var call$2 = functionCall;
2073
- var aCallable$1 = aCallable$7;
2074
- var newPromiseCapabilityModule$2 = newPromiseCapability$2;
2075
- var perform$1 = perform$3;
2076
- var iterate$1 = iterate$2;
2077
- var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
2078
-
2079
- // `Promise.all` method
2080
- // https://tc39.es/ecma262/#sec-promise.all
2081
- $$4({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
2082
- all: function all(iterable) {
2083
- var C = this;
2084
- var capability = newPromiseCapabilityModule$2.f(C);
2085
- var resolve = capability.resolve;
2086
- var reject = capability.reject;
2087
- var result = perform$1(function () {
2088
- var $promiseResolve = aCallable$1(C.resolve);
2089
- var values = [];
2090
- var counter = 0;
2091
- var remaining = 1;
2092
- iterate$1(iterable, function (promise) {
2093
- var index = counter++;
2094
- var alreadyCalled = false;
2095
- remaining++;
2096
- call$2($promiseResolve, C, promise).then(function (value) {
2097
- if (alreadyCalled) return;
2098
- alreadyCalled = true;
2099
- values[index] = value;
2100
- --remaining || resolve(values);
2101
- }, reject);
2102
- });
2103
- --remaining || resolve(values);
2104
- });
2105
- if (result.error) reject(result.value);
2106
- return capability.promise;
2107
- }
2108
- });
2109
-
2110
- var $$3 = _export;
2111
- var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
2112
- var NativePromiseConstructor = promiseNativeConstructor;
2113
- var getBuiltIn$1 = getBuiltIn$8;
2114
- var isCallable = isCallable$h;
2115
- var defineBuiltIn = defineBuiltIn$3;
2116
-
2117
- var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
2118
-
2119
- // `Promise.prototype.catch` method
2120
- // https://tc39.es/ecma262/#sec-promise.prototype.catch
2121
- $$3({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
2122
- 'catch': function (onRejected) {
2123
- return this.then(undefined, onRejected);
2124
- }
2125
- });
2126
-
2127
- // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
2128
- if (isCallable(NativePromiseConstructor)) {
2129
- var method = getBuiltIn$1('Promise').prototype['catch'];
2130
- if (NativePromisePrototype['catch'] !== method) {
2131
- defineBuiltIn(NativePromisePrototype, 'catch', method, { unsafe: true });
2132
- }
2133
- }
2134
-
2135
- var $$2 = _export;
2136
- var call$1 = functionCall;
2137
- var aCallable = aCallable$7;
2138
- var newPromiseCapabilityModule$1 = newPromiseCapability$2;
2139
- var perform = perform$3;
2140
- var iterate = iterate$2;
2141
- var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
2142
-
2143
- // `Promise.race` method
2144
- // https://tc39.es/ecma262/#sec-promise.race
2145
- $$2({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
2146
- race: function race(iterable) {
2147
- var C = this;
2148
- var capability = newPromiseCapabilityModule$1.f(C);
2149
- var reject = capability.reject;
2150
- var result = perform(function () {
2151
- var $promiseResolve = aCallable(C.resolve);
2152
- iterate(iterable, function (promise) {
2153
- call$1($promiseResolve, C, promise).then(capability.resolve, reject);
2154
- });
2155
- });
2156
- if (result.error) reject(result.value);
2157
- return capability.promise;
2158
- }
2159
- });
2160
-
2161
- var $$1 = _export;
2162
- var call = functionCall;
2163
- var newPromiseCapabilityModule = newPromiseCapability$2;
2164
- var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
2165
-
2166
- // `Promise.reject` method
2167
- // https://tc39.es/ecma262/#sec-promise.reject
2168
- $$1({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
2169
- reject: function reject(r) {
2170
- var capability = newPromiseCapabilityModule.f(this);
2171
- call(capability.reject, undefined, r);
2172
- return capability.promise;
2173
- }
2174
- });
2175
-
2176
- var anObject = anObject$8;
2177
- var isObject = isObject$7;
2178
- var newPromiseCapability = newPromiseCapability$2;
2179
-
2180
- var promiseResolve$1 = function (C, x) {
2181
- anObject(C);
2182
- if (isObject(x) && x.constructor === C) return x;
2183
- var promiseCapability = newPromiseCapability.f(C);
2184
- var resolve = promiseCapability.resolve;
2185
- resolve(x);
2186
- return promiseCapability.promise;
2187
- };
2188
-
2189
- var $ = _export;
2190
- var getBuiltIn = getBuiltIn$8;
2191
- var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
2192
- var promiseResolve = promiseResolve$1;
2193
-
2194
- getBuiltIn('Promise');
2195
-
2196
- // `Promise.resolve` method
2197
- // https://tc39.es/ecma262/#sec-promise.resolve
2198
- $({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
2199
- resolve: function resolve(x) {
2200
- return promiseResolve(this, x);
2201
- }
2202
- });
2203
-
2204
4
  /******************************************************************************
2205
5
  Copyright (c) Microsoft Corporation.
2206
6