@ninetailed/experience.js 6.4.0-beta.4 → 6.4.0-beta.7

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.
package/index.cjs CHANGED
@@ -14,6 +14,2502 @@ const HAS_SEEN_COMPONENT = 'has_seen_component';
14
14
  const HAS_SEEN_ELEMENT = 'has_seen_element';
15
15
  const PAGE_HIDDEN = 'page_hidden';
16
16
 
17
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
18
+
19
+ var check = function (it) {
20
+ return it && it.Math == Math && it;
21
+ };
22
+
23
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
24
+ var global$k =
25
+ // eslint-disable-next-line es/no-global-this -- safe
26
+ check(typeof globalThis == 'object' && globalThis) ||
27
+ check(typeof window == 'object' && window) ||
28
+ // eslint-disable-next-line no-restricted-globals -- safe
29
+ check(typeof self == 'object' && self) ||
30
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
31
+ // eslint-disable-next-line no-new-func -- fallback
32
+ (function () { return this; })() || Function('return this')();
33
+
34
+ var objectGetOwnPropertyDescriptor = {};
35
+
36
+ var fails$h = function (exec) {
37
+ try {
38
+ return !!exec();
39
+ } catch (error) {
40
+ return true;
41
+ }
42
+ };
43
+
44
+ var fails$g = fails$h;
45
+
46
+ // Detect IE8's incomplete defineProperty implementation
47
+ var descriptors = !fails$g(function () {
48
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
49
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
50
+ });
51
+
52
+ var fails$f = fails$h;
53
+
54
+ var functionBindNative = !fails$f(function () {
55
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
56
+ var test = (function () { /* empty */ }).bind();
57
+ // eslint-disable-next-line no-prototype-builtins -- safe
58
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
59
+ });
60
+
61
+ var NATIVE_BIND$3 = functionBindNative;
62
+
63
+ var call$f = Function.prototype.call;
64
+
65
+ var functionCall = NATIVE_BIND$3 ? call$f.bind(call$f) : function () {
66
+ return call$f.apply(call$f, arguments);
67
+ };
68
+
69
+ var objectPropertyIsEnumerable = {};
70
+
71
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
72
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
73
+ var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
74
+
75
+ // Nashorn ~ JDK8 bug
76
+ var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
77
+
78
+ // `Object.prototype.propertyIsEnumerable` method implementation
79
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
80
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
81
+ var descriptor = getOwnPropertyDescriptor$2(this, V);
82
+ return !!descriptor && descriptor.enumerable;
83
+ } : $propertyIsEnumerable;
84
+
85
+ var createPropertyDescriptor$3 = function (bitmap, value) {
86
+ return {
87
+ enumerable: !(bitmap & 1),
88
+ configurable: !(bitmap & 2),
89
+ writable: !(bitmap & 4),
90
+ value: value
91
+ };
92
+ };
93
+
94
+ var NATIVE_BIND$2 = functionBindNative;
95
+
96
+ var FunctionPrototype$2 = Function.prototype;
97
+ var call$e = FunctionPrototype$2.call;
98
+ var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$e, call$e);
99
+
100
+ var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
101
+ return function () {
102
+ return call$e.apply(fn, arguments);
103
+ };
104
+ };
105
+
106
+ var uncurryThis$g = functionUncurryThis;
107
+
108
+ var toString$5 = uncurryThis$g({}.toString);
109
+ var stringSlice = uncurryThis$g(''.slice);
110
+
111
+ var classofRaw$2 = function (it) {
112
+ return stringSlice(toString$5(it), 8, -1);
113
+ };
114
+
115
+ var uncurryThis$f = functionUncurryThis;
116
+ var fails$e = fails$h;
117
+ var classof$7 = classofRaw$2;
118
+
119
+ var $Object$4 = Object;
120
+ var split = uncurryThis$f(''.split);
121
+
122
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
123
+ var indexedObject = fails$e(function () {
124
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
125
+ // eslint-disable-next-line no-prototype-builtins -- safe
126
+ return !$Object$4('z').propertyIsEnumerable(0);
127
+ }) ? function (it) {
128
+ return classof$7(it) == 'String' ? split(it, '') : $Object$4(it);
129
+ } : $Object$4;
130
+
131
+ // we can't use just `it == null` since of `document.all` special case
132
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
133
+ var isNullOrUndefined$4 = function (it) {
134
+ return it === null || it === undefined;
135
+ };
136
+
137
+ var isNullOrUndefined$3 = isNullOrUndefined$4;
138
+
139
+ var $TypeError$f = TypeError;
140
+
141
+ // `RequireObjectCoercible` abstract operation
142
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
143
+ var requireObjectCoercible$4 = function (it) {
144
+ if (isNullOrUndefined$3(it)) throw $TypeError$f("Can't call method on " + it);
145
+ return it;
146
+ };
147
+
148
+ // toObject with fallback for non-array-like ES3 strings
149
+ var IndexedObject$2 = indexedObject;
150
+ var requireObjectCoercible$3 = requireObjectCoercible$4;
151
+
152
+ var toIndexedObject$5 = function (it) {
153
+ return IndexedObject$2(requireObjectCoercible$3(it));
154
+ };
155
+
156
+ var documentAll$2 = typeof document == 'object' && document.all;
157
+
158
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
159
+ var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
160
+
161
+ var documentAll_1 = {
162
+ all: documentAll$2,
163
+ IS_HTMLDDA: IS_HTMLDDA
164
+ };
165
+
166
+ var $documentAll$1 = documentAll_1;
167
+
168
+ var documentAll$1 = $documentAll$1.all;
169
+
170
+ // `IsCallable` abstract operation
171
+ // https://tc39.es/ecma262/#sec-iscallable
172
+ var isCallable$k = $documentAll$1.IS_HTMLDDA ? function (argument) {
173
+ return typeof argument == 'function' || argument === documentAll$1;
174
+ } : function (argument) {
175
+ return typeof argument == 'function';
176
+ };
177
+
178
+ var isCallable$j = isCallable$k;
179
+ var $documentAll = documentAll_1;
180
+
181
+ var documentAll = $documentAll.all;
182
+
183
+ var isObject$a = $documentAll.IS_HTMLDDA ? function (it) {
184
+ return typeof it == 'object' ? it !== null : isCallable$j(it) || it === documentAll;
185
+ } : function (it) {
186
+ return typeof it == 'object' ? it !== null : isCallable$j(it);
187
+ };
188
+
189
+ var global$j = global$k;
190
+ var isCallable$i = isCallable$k;
191
+
192
+ var aFunction = function (argument) {
193
+ return isCallable$i(argument) ? argument : undefined;
194
+ };
195
+
196
+ var getBuiltIn$8 = function (namespace, method) {
197
+ return arguments.length < 2 ? aFunction(global$j[namespace]) : global$j[namespace] && global$j[namespace][method];
198
+ };
199
+
200
+ var uncurryThis$e = functionUncurryThis;
201
+
202
+ var objectIsPrototypeOf = uncurryThis$e({}.isPrototypeOf);
203
+
204
+ var getBuiltIn$7 = getBuiltIn$8;
205
+
206
+ var engineUserAgent = getBuiltIn$7('navigator', 'userAgent') || '';
207
+
208
+ var global$i = global$k;
209
+ var userAgent$3 = engineUserAgent;
210
+
211
+ var process$3 = global$i.process;
212
+ var Deno$1 = global$i.Deno;
213
+ var versions = process$3 && process$3.versions || Deno$1 && Deno$1.version;
214
+ var v8 = versions && versions.v8;
215
+ var match, version;
216
+
217
+ if (v8) {
218
+ match = v8.split('.');
219
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
220
+ // but their correct versions are not interesting for us
221
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
222
+ }
223
+
224
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
225
+ // so check `userAgent` even if `.v8` exists, but 0
226
+ if (!version && userAgent$3) {
227
+ match = userAgent$3.match(/Edge\/(\d+)/);
228
+ if (!match || match[1] >= 74) {
229
+ match = userAgent$3.match(/Chrome\/(\d+)/);
230
+ if (match) version = +match[1];
231
+ }
232
+ }
233
+
234
+ var engineV8Version = version;
235
+
236
+ /* eslint-disable es/no-symbol -- required for testing */
237
+
238
+ var V8_VERSION$1 = engineV8Version;
239
+ var fails$d = fails$h;
240
+
241
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
242
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$d(function () {
243
+ var symbol = Symbol();
244
+ // Chrome 38 Symbol has incorrect toString conversion
245
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
246
+ return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
247
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
248
+ !Symbol.sham && V8_VERSION$1 && V8_VERSION$1 < 41;
249
+ });
250
+
251
+ /* eslint-disable es/no-symbol -- required for testing */
252
+
253
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
254
+
255
+ var useSymbolAsUid = NATIVE_SYMBOL$1
256
+ && !Symbol.sham
257
+ && typeof Symbol.iterator == 'symbol';
258
+
259
+ var getBuiltIn$6 = getBuiltIn$8;
260
+ var isCallable$h = isCallable$k;
261
+ var isPrototypeOf$3 = objectIsPrototypeOf;
262
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
263
+
264
+ var $Object$3 = Object;
265
+
266
+ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
267
+ return typeof it == 'symbol';
268
+ } : function (it) {
269
+ var $Symbol = getBuiltIn$6('Symbol');
270
+ return isCallable$h($Symbol) && isPrototypeOf$3($Symbol.prototype, $Object$3(it));
271
+ };
272
+
273
+ var $String$3 = String;
274
+
275
+ var tryToString$4 = function (argument) {
276
+ try {
277
+ return $String$3(argument);
278
+ } catch (error) {
279
+ return 'Object';
280
+ }
281
+ };
282
+
283
+ var isCallable$g = isCallable$k;
284
+ var tryToString$3 = tryToString$4;
285
+
286
+ var $TypeError$e = TypeError;
287
+
288
+ // `Assert: IsCallable(argument) is true`
289
+ var aCallable$8 = function (argument) {
290
+ if (isCallable$g(argument)) return argument;
291
+ throw $TypeError$e(tryToString$3(argument) + ' is not a function');
292
+ };
293
+
294
+ var aCallable$7 = aCallable$8;
295
+ var isNullOrUndefined$2 = isNullOrUndefined$4;
296
+
297
+ // `GetMethod` abstract operation
298
+ // https://tc39.es/ecma262/#sec-getmethod
299
+ var getMethod$3 = function (V, P) {
300
+ var func = V[P];
301
+ return isNullOrUndefined$2(func) ? undefined : aCallable$7(func);
302
+ };
303
+
304
+ var call$d = functionCall;
305
+ var isCallable$f = isCallable$k;
306
+ var isObject$9 = isObject$a;
307
+
308
+ var $TypeError$d = TypeError;
309
+
310
+ // `OrdinaryToPrimitive` abstract operation
311
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
312
+ var ordinaryToPrimitive$1 = function (input, pref) {
313
+ var fn, val;
314
+ if (pref === 'string' && isCallable$f(fn = input.toString) && !isObject$9(val = call$d(fn, input))) return val;
315
+ if (isCallable$f(fn = input.valueOf) && !isObject$9(val = call$d(fn, input))) return val;
316
+ if (pref !== 'string' && isCallable$f(fn = input.toString) && !isObject$9(val = call$d(fn, input))) return val;
317
+ throw $TypeError$d("Can't convert object to primitive value");
318
+ };
319
+
320
+ var shared$3 = {exports: {}};
321
+
322
+ var global$h = global$k;
323
+
324
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
325
+ var defineProperty$5 = Object.defineProperty;
326
+
327
+ var defineGlobalProperty$3 = function (key, value) {
328
+ try {
329
+ defineProperty$5(global$h, key, { value: value, configurable: true, writable: true });
330
+ } catch (error) {
331
+ global$h[key] = value;
332
+ } return value;
333
+ };
334
+
335
+ var global$g = global$k;
336
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
337
+
338
+ var SHARED = '__core-js_shared__';
339
+ var store$3 = global$g[SHARED] || defineGlobalProperty$2(SHARED, {});
340
+
341
+ var sharedStore = store$3;
342
+
343
+ var store$2 = sharedStore;
344
+
345
+ (shared$3.exports = function (key, value) {
346
+ return store$2[key] || (store$2[key] = value !== undefined ? value : {});
347
+ })('versions', []).push({
348
+ version: '3.26.1',
349
+ mode: 'global',
350
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
351
+ license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',
352
+ source: 'https://github.com/zloirock/core-js'
353
+ });
354
+
355
+ var requireObjectCoercible$2 = requireObjectCoercible$4;
356
+
357
+ var $Object$2 = Object;
358
+
359
+ // `ToObject` abstract operation
360
+ // https://tc39.es/ecma262/#sec-toobject
361
+ var toObject$5 = function (argument) {
362
+ return $Object$2(requireObjectCoercible$2(argument));
363
+ };
364
+
365
+ var uncurryThis$d = functionUncurryThis;
366
+ var toObject$4 = toObject$5;
367
+
368
+ var hasOwnProperty = uncurryThis$d({}.hasOwnProperty);
369
+
370
+ // `HasOwnProperty` abstract operation
371
+ // https://tc39.es/ecma262/#sec-hasownproperty
372
+ // eslint-disable-next-line es/no-object-hasown -- safe
373
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
374
+ return hasOwnProperty(toObject$4(it), key);
375
+ };
376
+
377
+ var uncurryThis$c = functionUncurryThis;
378
+
379
+ var id = 0;
380
+ var postfix = Math.random();
381
+ var toString$4 = uncurryThis$c(1.0.toString);
382
+
383
+ var uid$2 = function (key) {
384
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
385
+ };
386
+
387
+ var global$f = global$k;
388
+ var shared$2 = shared$3.exports;
389
+ var hasOwn$a = hasOwnProperty_1;
390
+ var uid$1 = uid$2;
391
+ var NATIVE_SYMBOL = symbolConstructorDetection;
392
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
393
+
394
+ var WellKnownSymbolsStore = shared$2('wks');
395
+ var Symbol$2 = global$f.Symbol;
396
+ var symbolFor = Symbol$2 && Symbol$2['for'];
397
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$2 : Symbol$2 && Symbol$2.withoutSetter || uid$1;
398
+
399
+ var wellKnownSymbol$h = function (name) {
400
+ if (!hasOwn$a(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
401
+ var description = 'Symbol.' + name;
402
+ if (NATIVE_SYMBOL && hasOwn$a(Symbol$2, name)) {
403
+ WellKnownSymbolsStore[name] = Symbol$2[name];
404
+ } else if (USE_SYMBOL_AS_UID && symbolFor) {
405
+ WellKnownSymbolsStore[name] = symbolFor(description);
406
+ } else {
407
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
408
+ }
409
+ } return WellKnownSymbolsStore[name];
410
+ };
411
+
412
+ var call$c = functionCall;
413
+ var isObject$8 = isObject$a;
414
+ var isSymbol$1 = isSymbol$2;
415
+ var getMethod$2 = getMethod$3;
416
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
417
+ var wellKnownSymbol$g = wellKnownSymbol$h;
418
+
419
+ var $TypeError$c = TypeError;
420
+ var TO_PRIMITIVE = wellKnownSymbol$g('toPrimitive');
421
+
422
+ // `ToPrimitive` abstract operation
423
+ // https://tc39.es/ecma262/#sec-toprimitive
424
+ var toPrimitive$1 = function (input, pref) {
425
+ if (!isObject$8(input) || isSymbol$1(input)) return input;
426
+ var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
427
+ var result;
428
+ if (exoticToPrim) {
429
+ if (pref === undefined) pref = 'default';
430
+ result = call$c(exoticToPrim, input, pref);
431
+ if (!isObject$8(result) || isSymbol$1(result)) return result;
432
+ throw $TypeError$c("Can't convert object to primitive value");
433
+ }
434
+ if (pref === undefined) pref = 'number';
435
+ return ordinaryToPrimitive(input, pref);
436
+ };
437
+
438
+ var toPrimitive = toPrimitive$1;
439
+ var isSymbol = isSymbol$2;
440
+
441
+ // `ToPropertyKey` abstract operation
442
+ // https://tc39.es/ecma262/#sec-topropertykey
443
+ var toPropertyKey$2 = function (argument) {
444
+ var key = toPrimitive(argument, 'string');
445
+ return isSymbol(key) ? key : key + '';
446
+ };
447
+
448
+ var global$e = global$k;
449
+ var isObject$7 = isObject$a;
450
+
451
+ var document$3 = global$e.document;
452
+ // typeof document.createElement is 'object' in old IE
453
+ var EXISTS$1 = isObject$7(document$3) && isObject$7(document$3.createElement);
454
+
455
+ var documentCreateElement$2 = function (it) {
456
+ return EXISTS$1 ? document$3.createElement(it) : {};
457
+ };
458
+
459
+ var DESCRIPTORS$a = descriptors;
460
+ var fails$c = fails$h;
461
+ var createElement$1 = documentCreateElement$2;
462
+
463
+ // Thanks to IE8 for its funny defineProperty
464
+ var ie8DomDefine = !DESCRIPTORS$a && !fails$c(function () {
465
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
466
+ return Object.defineProperty(createElement$1('div'), 'a', {
467
+ get: function () { return 7; }
468
+ }).a != 7;
469
+ });
470
+
471
+ var DESCRIPTORS$9 = descriptors;
472
+ var call$b = functionCall;
473
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
474
+ var createPropertyDescriptor$2 = createPropertyDescriptor$3;
475
+ var toIndexedObject$4 = toIndexedObject$5;
476
+ var toPropertyKey$1 = toPropertyKey$2;
477
+ var hasOwn$9 = hasOwnProperty_1;
478
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
479
+
480
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
481
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
482
+
483
+ // `Object.getOwnPropertyDescriptor` method
484
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
485
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$9 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
486
+ O = toIndexedObject$4(O);
487
+ P = toPropertyKey$1(P);
488
+ if (IE8_DOM_DEFINE$1) try {
489
+ return $getOwnPropertyDescriptor$1(O, P);
490
+ } catch (error) { /* empty */ }
491
+ if (hasOwn$9(O, P)) return createPropertyDescriptor$2(!call$b(propertyIsEnumerableModule$1.f, O, P), O[P]);
492
+ };
493
+
494
+ var objectDefineProperty = {};
495
+
496
+ var DESCRIPTORS$8 = descriptors;
497
+ var fails$b = fails$h;
498
+
499
+ // V8 ~ Chrome 36-
500
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
501
+ var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$b(function () {
502
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
503
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
504
+ value: 42,
505
+ writable: false
506
+ }).prototype != 42;
507
+ });
508
+
509
+ var isObject$6 = isObject$a;
510
+
511
+ var $String$2 = String;
512
+ var $TypeError$b = TypeError;
513
+
514
+ // `Assert: Type(argument) is Object`
515
+ var anObject$c = function (argument) {
516
+ if (isObject$6(argument)) return argument;
517
+ throw $TypeError$b($String$2(argument) + ' is not an object');
518
+ };
519
+
520
+ var DESCRIPTORS$7 = descriptors;
521
+ var IE8_DOM_DEFINE = ie8DomDefine;
522
+ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
523
+ var anObject$b = anObject$c;
524
+ var toPropertyKey = toPropertyKey$2;
525
+
526
+ var $TypeError$a = TypeError;
527
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
528
+ var $defineProperty = Object.defineProperty;
529
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
530
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
531
+ var ENUMERABLE = 'enumerable';
532
+ var CONFIGURABLE$1 = 'configurable';
533
+ var WRITABLE = 'writable';
534
+
535
+ // `Object.defineProperty` method
536
+ // https://tc39.es/ecma262/#sec-object.defineproperty
537
+ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
538
+ anObject$b(O);
539
+ P = toPropertyKey(P);
540
+ anObject$b(Attributes);
541
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
542
+ var current = $getOwnPropertyDescriptor(O, P);
543
+ if (current && current[WRITABLE]) {
544
+ O[P] = Attributes.value;
545
+ Attributes = {
546
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
547
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
548
+ writable: false
549
+ };
550
+ }
551
+ } return $defineProperty(O, P, Attributes);
552
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
553
+ anObject$b(O);
554
+ P = toPropertyKey(P);
555
+ anObject$b(Attributes);
556
+ if (IE8_DOM_DEFINE) try {
557
+ return $defineProperty(O, P, Attributes);
558
+ } catch (error) { /* empty */ }
559
+ if ('get' in Attributes || 'set' in Attributes) throw $TypeError$a('Accessors not supported');
560
+ if ('value' in Attributes) O[P] = Attributes.value;
561
+ return O;
562
+ };
563
+
564
+ var DESCRIPTORS$6 = descriptors;
565
+ var definePropertyModule$4 = objectDefineProperty;
566
+ var createPropertyDescriptor$1 = createPropertyDescriptor$3;
567
+
568
+ var createNonEnumerableProperty$4 = DESCRIPTORS$6 ? function (object, key, value) {
569
+ return definePropertyModule$4.f(object, key, createPropertyDescriptor$1(1, value));
570
+ } : function (object, key, value) {
571
+ object[key] = value;
572
+ return object;
573
+ };
574
+
575
+ var makeBuiltIn$2 = {exports: {}};
576
+
577
+ var DESCRIPTORS$5 = descriptors;
578
+ var hasOwn$8 = hasOwnProperty_1;
579
+
580
+ var FunctionPrototype$1 = Function.prototype;
581
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
582
+ var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
583
+
584
+ var EXISTS = hasOwn$8(FunctionPrototype$1, 'name');
585
+ // additional protection from minified / mangled / dropped function names
586
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
587
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype$1, 'name').configurable));
588
+
589
+ var functionName = {
590
+ EXISTS: EXISTS,
591
+ PROPER: PROPER,
592
+ CONFIGURABLE: CONFIGURABLE
593
+ };
594
+
595
+ var uncurryThis$b = functionUncurryThis;
596
+ var isCallable$e = isCallable$k;
597
+ var store$1 = sharedStore;
598
+
599
+ var functionToString = uncurryThis$b(Function.toString);
600
+
601
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
602
+ if (!isCallable$e(store$1.inspectSource)) {
603
+ store$1.inspectSource = function (it) {
604
+ return functionToString(it);
605
+ };
606
+ }
607
+
608
+ var inspectSource$3 = store$1.inspectSource;
609
+
610
+ var global$d = global$k;
611
+ var isCallable$d = isCallable$k;
612
+
613
+ var WeakMap$2 = global$d.WeakMap;
614
+
615
+ var weakMapBasicDetection = isCallable$d(WeakMap$2) && /native code/.test(String(WeakMap$2));
616
+
617
+ var shared$1 = shared$3.exports;
618
+ var uid = uid$2;
619
+
620
+ var keys = shared$1('keys');
621
+
622
+ var sharedKey$3 = function (key) {
623
+ return keys[key] || (keys[key] = uid(key));
624
+ };
625
+
626
+ var hiddenKeys$4 = {};
627
+
628
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
629
+ var global$c = global$k;
630
+ var isObject$5 = isObject$a;
631
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
632
+ var hasOwn$7 = hasOwnProperty_1;
633
+ var shared = sharedStore;
634
+ var sharedKey$2 = sharedKey$3;
635
+ var hiddenKeys$3 = hiddenKeys$4;
636
+
637
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
638
+ var TypeError$2 = global$c.TypeError;
639
+ var WeakMap$1 = global$c.WeakMap;
640
+ var set$1, get, has;
641
+
642
+ var enforce = function (it) {
643
+ return has(it) ? get(it) : set$1(it, {});
644
+ };
645
+
646
+ var getterFor = function (TYPE) {
647
+ return function (it) {
648
+ var state;
649
+ if (!isObject$5(it) || (state = get(it)).type !== TYPE) {
650
+ throw TypeError$2('Incompatible receiver, ' + TYPE + ' required');
651
+ } return state;
652
+ };
653
+ };
654
+
655
+ if (NATIVE_WEAK_MAP || shared.state) {
656
+ var store = shared.state || (shared.state = new WeakMap$1());
657
+ /* eslint-disable no-self-assign -- prototype methods protection */
658
+ store.get = store.get;
659
+ store.has = store.has;
660
+ store.set = store.set;
661
+ /* eslint-enable no-self-assign -- prototype methods protection */
662
+ set$1 = function (it, metadata) {
663
+ if (store.has(it)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
664
+ metadata.facade = it;
665
+ store.set(it, metadata);
666
+ return metadata;
667
+ };
668
+ get = function (it) {
669
+ return store.get(it) || {};
670
+ };
671
+ has = function (it) {
672
+ return store.has(it);
673
+ };
674
+ } else {
675
+ var STATE = sharedKey$2('state');
676
+ hiddenKeys$3[STATE] = true;
677
+ set$1 = function (it, metadata) {
678
+ if (hasOwn$7(it, STATE)) throw TypeError$2(OBJECT_ALREADY_INITIALIZED);
679
+ metadata.facade = it;
680
+ createNonEnumerableProperty$3(it, STATE, metadata);
681
+ return metadata;
682
+ };
683
+ get = function (it) {
684
+ return hasOwn$7(it, STATE) ? it[STATE] : {};
685
+ };
686
+ has = function (it) {
687
+ return hasOwn$7(it, STATE);
688
+ };
689
+ }
690
+
691
+ var internalState = {
692
+ set: set$1,
693
+ get: get,
694
+ has: has,
695
+ enforce: enforce,
696
+ getterFor: getterFor
697
+ };
698
+
699
+ var fails$a = fails$h;
700
+ var isCallable$c = isCallable$k;
701
+ var hasOwn$6 = hasOwnProperty_1;
702
+ var DESCRIPTORS$4 = descriptors;
703
+ var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
704
+ var inspectSource$2 = inspectSource$3;
705
+ var InternalStateModule$2 = internalState;
706
+
707
+ var enforceInternalState = InternalStateModule$2.enforce;
708
+ var getInternalState$1 = InternalStateModule$2.get;
709
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
710
+ var defineProperty$4 = Object.defineProperty;
711
+
712
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$a(function () {
713
+ return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
714
+ });
715
+
716
+ var TEMPLATE = String(String).split('String');
717
+
718
+ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
719
+ if (String(name).slice(0, 7) === 'Symbol(') {
720
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
721
+ }
722
+ if (options && options.getter) name = 'get ' + name;
723
+ if (options && options.setter) name = 'set ' + name;
724
+ if (!hasOwn$6(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
725
+ if (DESCRIPTORS$4) defineProperty$4(value, 'name', { value: name, configurable: true });
726
+ else value.name = name;
727
+ }
728
+ if (CONFIGURABLE_LENGTH && options && hasOwn$6(options, 'arity') && value.length !== options.arity) {
729
+ defineProperty$4(value, 'length', { value: options.arity });
730
+ }
731
+ try {
732
+ if (options && hasOwn$6(options, 'constructor') && options.constructor) {
733
+ if (DESCRIPTORS$4) defineProperty$4(value, 'prototype', { writable: false });
734
+ // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
735
+ } else if (value.prototype) value.prototype = undefined;
736
+ } catch (error) { /* empty */ }
737
+ var state = enforceInternalState(value);
738
+ if (!hasOwn$6(state, 'source')) {
739
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
740
+ } return value;
741
+ };
742
+
743
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
744
+ // eslint-disable-next-line no-extend-native -- required
745
+ Function.prototype.toString = makeBuiltIn$1(function toString() {
746
+ return isCallable$c(this) && getInternalState$1(this).source || inspectSource$2(this);
747
+ }, 'toString');
748
+
749
+ var isCallable$b = isCallable$k;
750
+ var definePropertyModule$3 = objectDefineProperty;
751
+ var makeBuiltIn = makeBuiltIn$2.exports;
752
+ var defineGlobalProperty$1 = defineGlobalProperty$3;
753
+
754
+ var defineBuiltIn$6 = function (O, key, value, options) {
755
+ if (!options) options = {};
756
+ var simple = options.enumerable;
757
+ var name = options.name !== undefined ? options.name : key;
758
+ if (isCallable$b(value)) makeBuiltIn(value, name, options);
759
+ if (options.global) {
760
+ if (simple) O[key] = value;
761
+ else defineGlobalProperty$1(key, value);
762
+ } else {
763
+ try {
764
+ if (!options.unsafe) delete O[key];
765
+ else if (O[key]) simple = true;
766
+ } catch (error) { /* empty */ }
767
+ if (simple) O[key] = value;
768
+ else definePropertyModule$3.f(O, key, {
769
+ value: value,
770
+ enumerable: false,
771
+ configurable: !options.nonConfigurable,
772
+ writable: !options.nonWritable
773
+ });
774
+ } return O;
775
+ };
776
+
777
+ var objectGetOwnPropertyNames = {};
778
+
779
+ var ceil = Math.ceil;
780
+ var floor = Math.floor;
781
+
782
+ // `Math.trunc` method
783
+ // https://tc39.es/ecma262/#sec-math.trunc
784
+ // eslint-disable-next-line es/no-math-trunc -- safe
785
+ var mathTrunc = Math.trunc || function trunc(x) {
786
+ var n = +x;
787
+ return (n > 0 ? floor : ceil)(n);
788
+ };
789
+
790
+ var trunc = mathTrunc;
791
+
792
+ // `ToIntegerOrInfinity` abstract operation
793
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
794
+ var toIntegerOrInfinity$3 = function (argument) {
795
+ var number = +argument;
796
+ // eslint-disable-next-line no-self-compare -- NaN check
797
+ return number !== number || number === 0 ? 0 : trunc(number);
798
+ };
799
+
800
+ var toIntegerOrInfinity$2 = toIntegerOrInfinity$3;
801
+
802
+ var max = Math.max;
803
+ var min$1 = Math.min;
804
+
805
+ // Helper for a popular repeating case of the spec:
806
+ // Let integer be ? ToInteger(index).
807
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
808
+ var toAbsoluteIndex$1 = function (index, length) {
809
+ var integer = toIntegerOrInfinity$2(index);
810
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
811
+ };
812
+
813
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$3;
814
+
815
+ var min = Math.min;
816
+
817
+ // `ToLength` abstract operation
818
+ // https://tc39.es/ecma262/#sec-tolength
819
+ var toLength$1 = function (argument) {
820
+ return argument > 0 ? min(toIntegerOrInfinity$1(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
821
+ };
822
+
823
+ var toLength = toLength$1;
824
+
825
+ // `LengthOfArrayLike` abstract operation
826
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
827
+ var lengthOfArrayLike$5 = function (obj) {
828
+ return toLength(obj.length);
829
+ };
830
+
831
+ var toIndexedObject$3 = toIndexedObject$5;
832
+ var toAbsoluteIndex = toAbsoluteIndex$1;
833
+ var lengthOfArrayLike$4 = lengthOfArrayLike$5;
834
+
835
+ // `Array.prototype.{ indexOf, includes }` methods implementation
836
+ var createMethod$2 = function (IS_INCLUDES) {
837
+ return function ($this, el, fromIndex) {
838
+ var O = toIndexedObject$3($this);
839
+ var length = lengthOfArrayLike$4(O);
840
+ var index = toAbsoluteIndex(fromIndex, length);
841
+ var value;
842
+ // Array#includes uses SameValueZero equality algorithm
843
+ // eslint-disable-next-line no-self-compare -- NaN check
844
+ if (IS_INCLUDES && el != el) while (length > index) {
845
+ value = O[index++];
846
+ // eslint-disable-next-line no-self-compare -- NaN check
847
+ if (value != value) return true;
848
+ // Array#indexOf ignores holes, Array#includes - not
849
+ } else for (;length > index; index++) {
850
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
851
+ } return !IS_INCLUDES && -1;
852
+ };
853
+ };
854
+
855
+ var arrayIncludes = {
856
+ // `Array.prototype.includes` method
857
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
858
+ includes: createMethod$2(true),
859
+ // `Array.prototype.indexOf` method
860
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
861
+ indexOf: createMethod$2(false)
862
+ };
863
+
864
+ var uncurryThis$a = functionUncurryThis;
865
+ var hasOwn$5 = hasOwnProperty_1;
866
+ var toIndexedObject$2 = toIndexedObject$5;
867
+ var indexOf = arrayIncludes.indexOf;
868
+ var hiddenKeys$2 = hiddenKeys$4;
869
+
870
+ var push = uncurryThis$a([].push);
871
+
872
+ var objectKeysInternal = function (object, names) {
873
+ var O = toIndexedObject$2(object);
874
+ var i = 0;
875
+ var result = [];
876
+ var key;
877
+ for (key in O) !hasOwn$5(hiddenKeys$2, key) && hasOwn$5(O, key) && push(result, key);
878
+ // Don't enum bug & hidden keys
879
+ while (names.length > i) if (hasOwn$5(O, key = names[i++])) {
880
+ ~indexOf(result, key) || push(result, key);
881
+ }
882
+ return result;
883
+ };
884
+
885
+ // IE8- don't enum bug keys
886
+ var enumBugKeys$3 = [
887
+ 'constructor',
888
+ 'hasOwnProperty',
889
+ 'isPrototypeOf',
890
+ 'propertyIsEnumerable',
891
+ 'toLocaleString',
892
+ 'toString',
893
+ 'valueOf'
894
+ ];
895
+
896
+ var internalObjectKeys$1 = objectKeysInternal;
897
+ var enumBugKeys$2 = enumBugKeys$3;
898
+
899
+ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
900
+
901
+ // `Object.getOwnPropertyNames` method
902
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
903
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
904
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
905
+ return internalObjectKeys$1(O, hiddenKeys$1);
906
+ };
907
+
908
+ var objectGetOwnPropertySymbols = {};
909
+
910
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
911
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
912
+
913
+ var getBuiltIn$5 = getBuiltIn$8;
914
+ var uncurryThis$9 = functionUncurryThis;
915
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
916
+ var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
917
+ var anObject$a = anObject$c;
918
+
919
+ var concat$1 = uncurryThis$9([].concat);
920
+
921
+ // all object keys, includes non-enumerable and symbols
922
+ var ownKeys$1 = getBuiltIn$5('Reflect', 'ownKeys') || function ownKeys(it) {
923
+ var keys = getOwnPropertyNamesModule.f(anObject$a(it));
924
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
925
+ return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
926
+ };
927
+
928
+ var hasOwn$4 = hasOwnProperty_1;
929
+ var ownKeys = ownKeys$1;
930
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
931
+ var definePropertyModule$2 = objectDefineProperty;
932
+
933
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
934
+ var keys = ownKeys(source);
935
+ var defineProperty = definePropertyModule$2.f;
936
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
937
+ for (var i = 0; i < keys.length; i++) {
938
+ var key = keys[i];
939
+ if (!hasOwn$4(target, key) && !(exceptions && hasOwn$4(exceptions, key))) {
940
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
941
+ }
942
+ }
943
+ };
944
+
945
+ var fails$9 = fails$h;
946
+ var isCallable$a = isCallable$k;
947
+
948
+ var replacement = /#|\.prototype\./;
949
+
950
+ var isForced$2 = function (feature, detection) {
951
+ var value = data[normalize(feature)];
952
+ return value == POLYFILL ? true
953
+ : value == NATIVE ? false
954
+ : isCallable$a(detection) ? fails$9(detection)
955
+ : !!detection;
956
+ };
957
+
958
+ var normalize = isForced$2.normalize = function (string) {
959
+ return String(string).replace(replacement, '.').toLowerCase();
960
+ };
961
+
962
+ var data = isForced$2.data = {};
963
+ var NATIVE = isForced$2.NATIVE = 'N';
964
+ var POLYFILL = isForced$2.POLYFILL = 'P';
965
+
966
+ var isForced_1 = isForced$2;
967
+
968
+ var global$b = global$k;
969
+ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
970
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
971
+ var defineBuiltIn$5 = defineBuiltIn$6;
972
+ var defineGlobalProperty = defineGlobalProperty$3;
973
+ var copyConstructorProperties = copyConstructorProperties$1;
974
+ var isForced$1 = isForced_1;
975
+
976
+ /*
977
+ options.target - name of the target object
978
+ options.global - target is the global object
979
+ options.stat - export as static methods of target
980
+ options.proto - export as prototype methods of target
981
+ options.real - real prototype method for the `pure` version
982
+ options.forced - export even if the native feature is available
983
+ options.bind - bind methods to the target, required for the `pure` version
984
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
985
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
986
+ options.sham - add a flag to not completely full polyfills
987
+ options.enumerable - export as enumerable property
988
+ options.dontCallGetSet - prevent calling a getter on target
989
+ options.name - the .name of the function if it does not match the key
990
+ */
991
+ var _export = function (options, source) {
992
+ var TARGET = options.target;
993
+ var GLOBAL = options.global;
994
+ var STATIC = options.stat;
995
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
996
+ if (GLOBAL) {
997
+ target = global$b;
998
+ } else if (STATIC) {
999
+ target = global$b[TARGET] || defineGlobalProperty(TARGET, {});
1000
+ } else {
1001
+ target = (global$b[TARGET] || {}).prototype;
1002
+ }
1003
+ if (target) for (key in source) {
1004
+ sourceProperty = source[key];
1005
+ if (options.dontCallGetSet) {
1006
+ descriptor = getOwnPropertyDescriptor$1(target, key);
1007
+ targetProperty = descriptor && descriptor.value;
1008
+ } else targetProperty = target[key];
1009
+ FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1010
+ // contained in target
1011
+ if (!FORCED && targetProperty !== undefined) {
1012
+ if (typeof sourceProperty == typeof targetProperty) continue;
1013
+ copyConstructorProperties(sourceProperty, targetProperty);
1014
+ }
1015
+ // add a flag to not completely full polyfills
1016
+ if (options.sham || (targetProperty && targetProperty.sham)) {
1017
+ createNonEnumerableProperty$2(sourceProperty, 'sham', true);
1018
+ }
1019
+ defineBuiltIn$5(target, key, sourceProperty, options);
1020
+ }
1021
+ };
1022
+
1023
+ var classof$6 = classofRaw$2;
1024
+ var global$a = global$k;
1025
+
1026
+ var engineIsNode = classof$6(global$a.process) == 'process';
1027
+
1028
+ var isCallable$9 = isCallable$k;
1029
+
1030
+ var $String$1 = String;
1031
+ var $TypeError$9 = TypeError;
1032
+
1033
+ var aPossiblePrototype$1 = function (argument) {
1034
+ if (typeof argument == 'object' || isCallable$9(argument)) return argument;
1035
+ throw $TypeError$9("Can't set " + $String$1(argument) + ' as a prototype');
1036
+ };
1037
+
1038
+ /* eslint-disable no-proto -- safe */
1039
+
1040
+ var uncurryThis$8 = functionUncurryThis;
1041
+ var anObject$9 = anObject$c;
1042
+ var aPossiblePrototype = aPossiblePrototype$1;
1043
+
1044
+ // `Object.setPrototypeOf` method
1045
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
1046
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
1047
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
1048
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1049
+ var CORRECT_SETTER = false;
1050
+ var test = {};
1051
+ var setter;
1052
+ try {
1053
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1054
+ setter = uncurryThis$8(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1055
+ setter(test, []);
1056
+ CORRECT_SETTER = test instanceof Array;
1057
+ } catch (error) { /* empty */ }
1058
+ return function setPrototypeOf(O, proto) {
1059
+ anObject$9(O);
1060
+ aPossiblePrototype(proto);
1061
+ if (CORRECT_SETTER) setter(O, proto);
1062
+ else O.__proto__ = proto;
1063
+ return O;
1064
+ };
1065
+ }() : undefined);
1066
+
1067
+ var defineProperty$3 = objectDefineProperty.f;
1068
+ var hasOwn$3 = hasOwnProperty_1;
1069
+ var wellKnownSymbol$f = wellKnownSymbol$h;
1070
+
1071
+ var TO_STRING_TAG$3 = wellKnownSymbol$f('toStringTag');
1072
+
1073
+ var setToStringTag$3 = function (target, TAG, STATIC) {
1074
+ if (target && !STATIC) target = target.prototype;
1075
+ if (target && !hasOwn$3(target, TO_STRING_TAG$3)) {
1076
+ defineProperty$3(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1077
+ }
1078
+ };
1079
+
1080
+ var getBuiltIn$4 = getBuiltIn$8;
1081
+ var definePropertyModule$1 = objectDefineProperty;
1082
+ var wellKnownSymbol$e = wellKnownSymbol$h;
1083
+ var DESCRIPTORS$3 = descriptors;
1084
+
1085
+ var SPECIES$3 = wellKnownSymbol$e('species');
1086
+
1087
+ var setSpecies$1 = function (CONSTRUCTOR_NAME) {
1088
+ var Constructor = getBuiltIn$4(CONSTRUCTOR_NAME);
1089
+ var defineProperty = definePropertyModule$1.f;
1090
+
1091
+ if (DESCRIPTORS$3 && Constructor && !Constructor[SPECIES$3]) {
1092
+ defineProperty(Constructor, SPECIES$3, {
1093
+ configurable: true,
1094
+ get: function () { return this; }
1095
+ });
1096
+ }
1097
+ };
1098
+
1099
+ var isPrototypeOf$2 = objectIsPrototypeOf;
1100
+
1101
+ var $TypeError$8 = TypeError;
1102
+
1103
+ var anInstance$1 = function (it, Prototype) {
1104
+ if (isPrototypeOf$2(Prototype, it)) return it;
1105
+ throw $TypeError$8('Incorrect invocation');
1106
+ };
1107
+
1108
+ var wellKnownSymbol$d = wellKnownSymbol$h;
1109
+
1110
+ var TO_STRING_TAG$2 = wellKnownSymbol$d('toStringTag');
1111
+ var test = {};
1112
+
1113
+ test[TO_STRING_TAG$2] = 'z';
1114
+
1115
+ var toStringTagSupport = String(test) === '[object z]';
1116
+
1117
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1118
+ var isCallable$8 = isCallable$k;
1119
+ var classofRaw$1 = classofRaw$2;
1120
+ var wellKnownSymbol$c = wellKnownSymbol$h;
1121
+
1122
+ var TO_STRING_TAG$1 = wellKnownSymbol$c('toStringTag');
1123
+ var $Object$1 = Object;
1124
+
1125
+ // ES3 wrong here
1126
+ var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) == 'Arguments';
1127
+
1128
+ // fallback for IE11 Script Access Denied error
1129
+ var tryGet = function (it, key) {
1130
+ try {
1131
+ return it[key];
1132
+ } catch (error) { /* empty */ }
1133
+ };
1134
+
1135
+ // getting tag from ES6+ `Object.prototype.toString`
1136
+ var classof$5 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1137
+ var O, tag, result;
1138
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1139
+ // @@toStringTag case
1140
+ : typeof (tag = tryGet(O = $Object$1(it), TO_STRING_TAG$1)) == 'string' ? tag
1141
+ // builtinTag case
1142
+ : CORRECT_ARGUMENTS ? classofRaw$1(O)
1143
+ // ES3 arguments fallback
1144
+ : (result = classofRaw$1(O)) == 'Object' && isCallable$8(O.callee) ? 'Arguments' : result;
1145
+ };
1146
+
1147
+ var uncurryThis$7 = functionUncurryThis;
1148
+ var fails$8 = fails$h;
1149
+ var isCallable$7 = isCallable$k;
1150
+ var classof$4 = classof$5;
1151
+ var getBuiltIn$3 = getBuiltIn$8;
1152
+ var inspectSource$1 = inspectSource$3;
1153
+
1154
+ var noop = function () { /* empty */ };
1155
+ var empty = [];
1156
+ var construct = getBuiltIn$3('Reflect', 'construct');
1157
+ var constructorRegExp = /^\s*(?:class|function)\b/;
1158
+ var exec$1 = uncurryThis$7(constructorRegExp.exec);
1159
+ var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
1160
+
1161
+ var isConstructorModern = function isConstructor(argument) {
1162
+ if (!isCallable$7(argument)) return false;
1163
+ try {
1164
+ construct(noop, empty, argument);
1165
+ return true;
1166
+ } catch (error) {
1167
+ return false;
1168
+ }
1169
+ };
1170
+
1171
+ var isConstructorLegacy = function isConstructor(argument) {
1172
+ if (!isCallable$7(argument)) return false;
1173
+ switch (classof$4(argument)) {
1174
+ case 'AsyncFunction':
1175
+ case 'GeneratorFunction':
1176
+ case 'AsyncGeneratorFunction': return false;
1177
+ }
1178
+ try {
1179
+ // we can't check .prototype since constructors produced by .bind haven't it
1180
+ // `Function#toString` throws on some built-it function in some legacy engines
1181
+ // (for example, `DOMQuad` and similar in FF41-)
1182
+ return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource$1(argument));
1183
+ } catch (error) {
1184
+ return true;
1185
+ }
1186
+ };
1187
+
1188
+ isConstructorLegacy.sham = true;
1189
+
1190
+ // `IsConstructor` abstract operation
1191
+ // https://tc39.es/ecma262/#sec-isconstructor
1192
+ var isConstructor$2 = !construct || fails$8(function () {
1193
+ var called;
1194
+ return isConstructorModern(isConstructorModern.call)
1195
+ || !isConstructorModern(Object)
1196
+ || !isConstructorModern(function () { called = true; })
1197
+ || called;
1198
+ }) ? isConstructorLegacy : isConstructorModern;
1199
+
1200
+ var isConstructor$1 = isConstructor$2;
1201
+ var tryToString$2 = tryToString$4;
1202
+
1203
+ var $TypeError$7 = TypeError;
1204
+
1205
+ // `Assert: IsConstructor(argument) is true`
1206
+ var aConstructor$1 = function (argument) {
1207
+ if (isConstructor$1(argument)) return argument;
1208
+ throw $TypeError$7(tryToString$2(argument) + ' is not a constructor');
1209
+ };
1210
+
1211
+ var anObject$8 = anObject$c;
1212
+ var aConstructor = aConstructor$1;
1213
+ var isNullOrUndefined$1 = isNullOrUndefined$4;
1214
+ var wellKnownSymbol$b = wellKnownSymbol$h;
1215
+
1216
+ var SPECIES$2 = wellKnownSymbol$b('species');
1217
+
1218
+ // `SpeciesConstructor` abstract operation
1219
+ // https://tc39.es/ecma262/#sec-speciesconstructor
1220
+ var speciesConstructor$1 = function (O, defaultConstructor) {
1221
+ var C = anObject$8(O).constructor;
1222
+ var S;
1223
+ return C === undefined || isNullOrUndefined$1(S = anObject$8(C)[SPECIES$2]) ? defaultConstructor : aConstructor(S);
1224
+ };
1225
+
1226
+ var NATIVE_BIND$1 = functionBindNative;
1227
+
1228
+ var FunctionPrototype = Function.prototype;
1229
+ var apply$1 = FunctionPrototype.apply;
1230
+ var call$a = FunctionPrototype.call;
1231
+
1232
+ // eslint-disable-next-line es/no-reflect -- safe
1233
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$a.bind(apply$1) : function () {
1234
+ return call$a.apply(apply$1, arguments);
1235
+ });
1236
+
1237
+ var classofRaw = classofRaw$2;
1238
+ var uncurryThis$6 = functionUncurryThis;
1239
+
1240
+ var functionUncurryThisClause = function (fn) {
1241
+ // Nashorn bug:
1242
+ // https://github.com/zloirock/core-js/issues/1128
1243
+ // https://github.com/zloirock/core-js/issues/1130
1244
+ if (classofRaw(fn) === 'Function') return uncurryThis$6(fn);
1245
+ };
1246
+
1247
+ var uncurryThis$5 = functionUncurryThisClause;
1248
+ var aCallable$6 = aCallable$8;
1249
+ var NATIVE_BIND = functionBindNative;
1250
+
1251
+ var bind$5 = uncurryThis$5(uncurryThis$5.bind);
1252
+
1253
+ // optional / simple context binding
1254
+ var functionBindContext = function (fn, that) {
1255
+ aCallable$6(fn);
1256
+ return that === undefined ? fn : NATIVE_BIND ? bind$5(fn, that) : function (/* ...args */) {
1257
+ return fn.apply(that, arguments);
1258
+ };
1259
+ };
1260
+
1261
+ var getBuiltIn$2 = getBuiltIn$8;
1262
+
1263
+ var html$2 = getBuiltIn$2('document', 'documentElement');
1264
+
1265
+ var uncurryThis$4 = functionUncurryThis;
1266
+
1267
+ var arraySlice$1 = uncurryThis$4([].slice);
1268
+
1269
+ var $TypeError$6 = TypeError;
1270
+
1271
+ var validateArgumentsLength$1 = function (passed, required) {
1272
+ if (passed < required) throw $TypeError$6('Not enough arguments');
1273
+ return passed;
1274
+ };
1275
+
1276
+ var userAgent$2 = engineUserAgent;
1277
+
1278
+ var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
1279
+
1280
+ var global$9 = global$k;
1281
+ var apply = functionApply;
1282
+ var bind$4 = functionBindContext;
1283
+ var isCallable$6 = isCallable$k;
1284
+ var hasOwn$2 = hasOwnProperty_1;
1285
+ var fails$7 = fails$h;
1286
+ var html$1 = html$2;
1287
+ var arraySlice = arraySlice$1;
1288
+ var createElement = documentCreateElement$2;
1289
+ var validateArgumentsLength = validateArgumentsLength$1;
1290
+ var IS_IOS$1 = engineIsIos;
1291
+ var IS_NODE$4 = engineIsNode;
1292
+
1293
+ var set = global$9.setImmediate;
1294
+ var clear = global$9.clearImmediate;
1295
+ var process$2 = global$9.process;
1296
+ var Dispatch = global$9.Dispatch;
1297
+ var Function$1 = global$9.Function;
1298
+ var MessageChannel = global$9.MessageChannel;
1299
+ var String$1 = global$9.String;
1300
+ var counter = 0;
1301
+ var queue$1 = {};
1302
+ var ONREADYSTATECHANGE = 'onreadystatechange';
1303
+ var $location, defer, channel, port;
1304
+
1305
+ try {
1306
+ // Deno throws a ReferenceError on `location` access without `--location` flag
1307
+ $location = global$9.location;
1308
+ } catch (error) { /* empty */ }
1309
+
1310
+ var run = function (id) {
1311
+ if (hasOwn$2(queue$1, id)) {
1312
+ var fn = queue$1[id];
1313
+ delete queue$1[id];
1314
+ fn();
1315
+ }
1316
+ };
1317
+
1318
+ var runner = function (id) {
1319
+ return function () {
1320
+ run(id);
1321
+ };
1322
+ };
1323
+
1324
+ var listener = function (event) {
1325
+ run(event.data);
1326
+ };
1327
+
1328
+ var post = function (id) {
1329
+ // old engines have not location.origin
1330
+ global$9.postMessage(String$1(id), $location.protocol + '//' + $location.host);
1331
+ };
1332
+
1333
+ // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
1334
+ if (!set || !clear) {
1335
+ set = function setImmediate(handler) {
1336
+ validateArgumentsLength(arguments.length, 1);
1337
+ var fn = isCallable$6(handler) ? handler : Function$1(handler);
1338
+ var args = arraySlice(arguments, 1);
1339
+ queue$1[++counter] = function () {
1340
+ apply(fn, undefined, args);
1341
+ };
1342
+ defer(counter);
1343
+ return counter;
1344
+ };
1345
+ clear = function clearImmediate(id) {
1346
+ delete queue$1[id];
1347
+ };
1348
+ // Node.js 0.8-
1349
+ if (IS_NODE$4) {
1350
+ defer = function (id) {
1351
+ process$2.nextTick(runner(id));
1352
+ };
1353
+ // Sphere (JS game engine) Dispatch API
1354
+ } else if (Dispatch && Dispatch.now) {
1355
+ defer = function (id) {
1356
+ Dispatch.now(runner(id));
1357
+ };
1358
+ // Browsers with MessageChannel, includes WebWorkers
1359
+ // except iOS - https://github.com/zloirock/core-js/issues/624
1360
+ } else if (MessageChannel && !IS_IOS$1) {
1361
+ channel = new MessageChannel();
1362
+ port = channel.port2;
1363
+ channel.port1.onmessage = listener;
1364
+ defer = bind$4(port.postMessage, port);
1365
+ // Browsers with postMessage, skip WebWorkers
1366
+ // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
1367
+ } else if (
1368
+ global$9.addEventListener &&
1369
+ isCallable$6(global$9.postMessage) &&
1370
+ !global$9.importScripts &&
1371
+ $location && $location.protocol !== 'file:' &&
1372
+ !fails$7(post)
1373
+ ) {
1374
+ defer = post;
1375
+ global$9.addEventListener('message', listener, false);
1376
+ // IE8-
1377
+ } else if (ONREADYSTATECHANGE in createElement('script')) {
1378
+ defer = function (id) {
1379
+ html$1.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
1380
+ html$1.removeChild(this);
1381
+ run(id);
1382
+ };
1383
+ };
1384
+ // Rest old browsers
1385
+ } else {
1386
+ defer = function (id) {
1387
+ setTimeout(runner(id), 0);
1388
+ };
1389
+ }
1390
+ }
1391
+
1392
+ var task$1 = {
1393
+ set: set,
1394
+ clear: clear
1395
+ };
1396
+
1397
+ var userAgent$1 = engineUserAgent;
1398
+ var global$8 = global$k;
1399
+
1400
+ var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$8.Pebble !== undefined;
1401
+
1402
+ var userAgent = engineUserAgent;
1403
+
1404
+ var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
1405
+
1406
+ var global$7 = global$k;
1407
+ var bind$3 = functionBindContext;
1408
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1409
+ var macrotask = task$1.set;
1410
+ var IS_IOS = engineIsIos;
1411
+ var IS_IOS_PEBBLE = engineIsIosPebble;
1412
+ var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
1413
+ var IS_NODE$3 = engineIsNode;
1414
+
1415
+ var MutationObserver = global$7.MutationObserver || global$7.WebKitMutationObserver;
1416
+ var document$2 = global$7.document;
1417
+ var process$1 = global$7.process;
1418
+ var Promise$1 = global$7.Promise;
1419
+ // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
1420
+ var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$7, 'queueMicrotask');
1421
+ var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
1422
+
1423
+ var flush, head, last, notify$1, toggle, node, promise, then;
1424
+
1425
+ // modern engines have queueMicrotask method
1426
+ if (!queueMicrotask) {
1427
+ flush = function () {
1428
+ var parent, fn;
1429
+ if (IS_NODE$3 && (parent = process$1.domain)) parent.exit();
1430
+ while (head) {
1431
+ fn = head.fn;
1432
+ head = head.next;
1433
+ try {
1434
+ fn();
1435
+ } catch (error) {
1436
+ if (head) notify$1();
1437
+ else last = undefined;
1438
+ throw error;
1439
+ }
1440
+ } last = undefined;
1441
+ if (parent) parent.enter();
1442
+ };
1443
+
1444
+ // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
1445
+ // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
1446
+ if (!IS_IOS && !IS_NODE$3 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
1447
+ toggle = true;
1448
+ node = document$2.createTextNode('');
1449
+ new MutationObserver(flush).observe(node, { characterData: true });
1450
+ notify$1 = function () {
1451
+ node.data = toggle = !toggle;
1452
+ };
1453
+ // environments with maybe non-completely correct, but existent Promise
1454
+ } else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
1455
+ // Promise.resolve without an argument throws an error in LG WebOS 2
1456
+ promise = Promise$1.resolve(undefined);
1457
+ // workaround of WebKit ~ iOS Safari 10.1 bug
1458
+ promise.constructor = Promise$1;
1459
+ then = bind$3(promise.then, promise);
1460
+ notify$1 = function () {
1461
+ then(flush);
1462
+ };
1463
+ // Node.js without promises
1464
+ } else if (IS_NODE$3) {
1465
+ notify$1 = function () {
1466
+ process$1.nextTick(flush);
1467
+ };
1468
+ // for other environments - macrotask based on:
1469
+ // - setImmediate
1470
+ // - MessageChannel
1471
+ // - window.postMessage
1472
+ // - onreadystatechange
1473
+ // - setTimeout
1474
+ } else {
1475
+ // strange IE + webpack dev server bug - use .bind(global)
1476
+ macrotask = bind$3(macrotask, global$7);
1477
+ notify$1 = function () {
1478
+ macrotask(flush);
1479
+ };
1480
+ }
1481
+ }
1482
+
1483
+ var microtask$1 = queueMicrotask || function (fn) {
1484
+ var task = { fn: fn, next: undefined };
1485
+ if (last) last.next = task;
1486
+ if (!head) {
1487
+ head = task;
1488
+ notify$1();
1489
+ } last = task;
1490
+ };
1491
+
1492
+ var global$6 = global$k;
1493
+
1494
+ var hostReportErrors$1 = function (a, b) {
1495
+ var console = global$6.console;
1496
+ if (console && console.error) {
1497
+ arguments.length == 1 ? console.error(a) : console.error(a, b);
1498
+ }
1499
+ };
1500
+
1501
+ var perform$3 = function (exec) {
1502
+ try {
1503
+ return { error: false, value: exec() };
1504
+ } catch (error) {
1505
+ return { error: true, value: error };
1506
+ }
1507
+ };
1508
+
1509
+ var Queue$1 = function () {
1510
+ this.head = null;
1511
+ this.tail = null;
1512
+ };
1513
+
1514
+ Queue$1.prototype = {
1515
+ add: function (item) {
1516
+ var entry = { item: item, next: null };
1517
+ if (this.head) this.tail.next = entry;
1518
+ else this.head = entry;
1519
+ this.tail = entry;
1520
+ },
1521
+ get: function () {
1522
+ var entry = this.head;
1523
+ if (entry) {
1524
+ this.head = entry.next;
1525
+ if (this.tail === entry) this.tail = null;
1526
+ return entry.item;
1527
+ }
1528
+ }
1529
+ };
1530
+
1531
+ var queue = Queue$1;
1532
+
1533
+ var global$5 = global$k;
1534
+
1535
+ var promiseNativeConstructor = global$5.Promise;
1536
+
1537
+ /* global Deno -- Deno case */
1538
+
1539
+ var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
1540
+
1541
+ var IS_DENO$1 = engineIsDeno;
1542
+ var IS_NODE$2 = engineIsNode;
1543
+
1544
+ var engineIsBrowser = !IS_DENO$1 && !IS_NODE$2
1545
+ && typeof window == 'object'
1546
+ && typeof document == 'object';
1547
+
1548
+ var global$4 = global$k;
1549
+ var NativePromiseConstructor$3 = promiseNativeConstructor;
1550
+ var isCallable$5 = isCallable$k;
1551
+ var isForced = isForced_1;
1552
+ var inspectSource = inspectSource$3;
1553
+ var wellKnownSymbol$a = wellKnownSymbol$h;
1554
+ var IS_BROWSER = engineIsBrowser;
1555
+ var IS_DENO = engineIsDeno;
1556
+ var V8_VERSION = engineV8Version;
1557
+
1558
+ NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
1559
+ var SPECIES$1 = wellKnownSymbol$a('species');
1560
+ var SUBCLASSING = false;
1561
+ var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$5(global$4.PromiseRejectionEvent);
1562
+
1563
+ var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
1564
+ var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
1565
+ var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
1566
+ // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
1567
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
1568
+ // We can't detect it synchronously, so just check versions
1569
+ if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
1570
+ // We can't use @@species feature detection in V8 since it causes
1571
+ // deoptimization and performance degradation
1572
+ // https://github.com/zloirock/core-js/issues/679
1573
+ if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
1574
+ // Detect correctness of subclassing with @@species support
1575
+ var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
1576
+ var FakePromise = function (exec) {
1577
+ exec(function () { /* empty */ }, function () { /* empty */ });
1578
+ };
1579
+ var constructor = promise.constructor = {};
1580
+ constructor[SPECIES$1] = FakePromise;
1581
+ SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
1582
+ if (!SUBCLASSING) return true;
1583
+ // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
1584
+ } return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT$1;
1585
+ });
1586
+
1587
+ var promiseConstructorDetection = {
1588
+ CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
1589
+ REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
1590
+ SUBCLASSING: SUBCLASSING
1591
+ };
1592
+
1593
+ var newPromiseCapability$2 = {};
1594
+
1595
+ var aCallable$5 = aCallable$8;
1596
+
1597
+ var $TypeError$5 = TypeError;
1598
+
1599
+ var PromiseCapability = function (C) {
1600
+ var resolve, reject;
1601
+ this.promise = new C(function ($$resolve, $$reject) {
1602
+ if (resolve !== undefined || reject !== undefined) throw $TypeError$5('Bad Promise constructor');
1603
+ resolve = $$resolve;
1604
+ reject = $$reject;
1605
+ });
1606
+ this.resolve = aCallable$5(resolve);
1607
+ this.reject = aCallable$5(reject);
1608
+ };
1609
+
1610
+ // `NewPromiseCapability` abstract operation
1611
+ // https://tc39.es/ecma262/#sec-newpromisecapability
1612
+ newPromiseCapability$2.f = function (C) {
1613
+ return new PromiseCapability(C);
1614
+ };
1615
+
1616
+ var $$c = _export;
1617
+ var IS_NODE$1 = engineIsNode;
1618
+ var global$3 = global$k;
1619
+ var call$9 = functionCall;
1620
+ var defineBuiltIn$4 = defineBuiltIn$6;
1621
+ var setPrototypeOf$1 = objectSetPrototypeOf;
1622
+ var setToStringTag$2 = setToStringTag$3;
1623
+ var setSpecies = setSpecies$1;
1624
+ var aCallable$4 = aCallable$8;
1625
+ var isCallable$4 = isCallable$k;
1626
+ var isObject$4 = isObject$a;
1627
+ var anInstance = anInstance$1;
1628
+ var speciesConstructor = speciesConstructor$1;
1629
+ var task = task$1.set;
1630
+ var microtask = microtask$1;
1631
+ var hostReportErrors = hostReportErrors$1;
1632
+ var perform$2 = perform$3;
1633
+ var Queue = queue;
1634
+ var InternalStateModule$1 = internalState;
1635
+ var NativePromiseConstructor$2 = promiseNativeConstructor;
1636
+ var PromiseConstructorDetection = promiseConstructorDetection;
1637
+ var newPromiseCapabilityModule$3 = newPromiseCapability$2;
1638
+
1639
+ var PROMISE = 'Promise';
1640
+ var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
1641
+ var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
1642
+ var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
1643
+ var getInternalPromiseState = InternalStateModule$1.getterFor(PROMISE);
1644
+ var setInternalState$1 = InternalStateModule$1.set;
1645
+ var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
1646
+ var PromiseConstructor = NativePromiseConstructor$2;
1647
+ var PromisePrototype = NativePromisePrototype$1;
1648
+ var TypeError$1 = global$3.TypeError;
1649
+ var document$1 = global$3.document;
1650
+ var process = global$3.process;
1651
+ var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
1652
+ var newGenericPromiseCapability = newPromiseCapability$1;
1653
+
1654
+ var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$3.dispatchEvent);
1655
+ var UNHANDLED_REJECTION = 'unhandledrejection';
1656
+ var REJECTION_HANDLED = 'rejectionhandled';
1657
+ var PENDING = 0;
1658
+ var FULFILLED = 1;
1659
+ var REJECTED = 2;
1660
+ var HANDLED = 1;
1661
+ var UNHANDLED = 2;
1662
+
1663
+ var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
1664
+
1665
+ // helpers
1666
+ var isThenable = function (it) {
1667
+ var then;
1668
+ return isObject$4(it) && isCallable$4(then = it.then) ? then : false;
1669
+ };
1670
+
1671
+ var callReaction = function (reaction, state) {
1672
+ var value = state.value;
1673
+ var ok = state.state == FULFILLED;
1674
+ var handler = ok ? reaction.ok : reaction.fail;
1675
+ var resolve = reaction.resolve;
1676
+ var reject = reaction.reject;
1677
+ var domain = reaction.domain;
1678
+ var result, then, exited;
1679
+ try {
1680
+ if (handler) {
1681
+ if (!ok) {
1682
+ if (state.rejection === UNHANDLED) onHandleUnhandled(state);
1683
+ state.rejection = HANDLED;
1684
+ }
1685
+ if (handler === true) result = value;
1686
+ else {
1687
+ if (domain) domain.enter();
1688
+ result = handler(value); // can throw
1689
+ if (domain) {
1690
+ domain.exit();
1691
+ exited = true;
1692
+ }
1693
+ }
1694
+ if (result === reaction.promise) {
1695
+ reject(TypeError$1('Promise-chain cycle'));
1696
+ } else if (then = isThenable(result)) {
1697
+ call$9(then, result, resolve, reject);
1698
+ } else resolve(result);
1699
+ } else reject(value);
1700
+ } catch (error) {
1701
+ if (domain && !exited) domain.exit();
1702
+ reject(error);
1703
+ }
1704
+ };
1705
+
1706
+ var notify = function (state, isReject) {
1707
+ if (state.notified) return;
1708
+ state.notified = true;
1709
+ microtask(function () {
1710
+ var reactions = state.reactions;
1711
+ var reaction;
1712
+ while (reaction = reactions.get()) {
1713
+ callReaction(reaction, state);
1714
+ }
1715
+ state.notified = false;
1716
+ if (isReject && !state.rejection) onUnhandled(state);
1717
+ });
1718
+ };
1719
+
1720
+ var dispatchEvent = function (name, promise, reason) {
1721
+ var event, handler;
1722
+ if (DISPATCH_EVENT) {
1723
+ event = document$1.createEvent('Event');
1724
+ event.promise = promise;
1725
+ event.reason = reason;
1726
+ event.initEvent(name, false, true);
1727
+ global$3.dispatchEvent(event);
1728
+ } else event = { promise: promise, reason: reason };
1729
+ if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$3['on' + name])) handler(event);
1730
+ else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
1731
+ };
1732
+
1733
+ var onUnhandled = function (state) {
1734
+ call$9(task, global$3, function () {
1735
+ var promise = state.facade;
1736
+ var value = state.value;
1737
+ var IS_UNHANDLED = isUnhandled(state);
1738
+ var result;
1739
+ if (IS_UNHANDLED) {
1740
+ result = perform$2(function () {
1741
+ if (IS_NODE$1) {
1742
+ process.emit('unhandledRejection', value, promise);
1743
+ } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
1744
+ });
1745
+ // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
1746
+ state.rejection = IS_NODE$1 || isUnhandled(state) ? UNHANDLED : HANDLED;
1747
+ if (result.error) throw result.value;
1748
+ }
1749
+ });
1750
+ };
1751
+
1752
+ var isUnhandled = function (state) {
1753
+ return state.rejection !== HANDLED && !state.parent;
1754
+ };
1755
+
1756
+ var onHandleUnhandled = function (state) {
1757
+ call$9(task, global$3, function () {
1758
+ var promise = state.facade;
1759
+ if (IS_NODE$1) {
1760
+ process.emit('rejectionHandled', promise);
1761
+ } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
1762
+ });
1763
+ };
1764
+
1765
+ var bind$2 = function (fn, state, unwrap) {
1766
+ return function (value) {
1767
+ fn(state, value, unwrap);
1768
+ };
1769
+ };
1770
+
1771
+ var internalReject = function (state, value, unwrap) {
1772
+ if (state.done) return;
1773
+ state.done = true;
1774
+ if (unwrap) state = unwrap;
1775
+ state.value = value;
1776
+ state.state = REJECTED;
1777
+ notify(state, true);
1778
+ };
1779
+
1780
+ var internalResolve = function (state, value, unwrap) {
1781
+ if (state.done) return;
1782
+ state.done = true;
1783
+ if (unwrap) state = unwrap;
1784
+ try {
1785
+ if (state.facade === value) throw TypeError$1("Promise can't be resolved itself");
1786
+ var then = isThenable(value);
1787
+ if (then) {
1788
+ microtask(function () {
1789
+ var wrapper = { done: false };
1790
+ try {
1791
+ call$9(then, value,
1792
+ bind$2(internalResolve, wrapper, state),
1793
+ bind$2(internalReject, wrapper, state)
1794
+ );
1795
+ } catch (error) {
1796
+ internalReject(wrapper, error, state);
1797
+ }
1798
+ });
1799
+ } else {
1800
+ state.value = value;
1801
+ state.state = FULFILLED;
1802
+ notify(state, false);
1803
+ }
1804
+ } catch (error) {
1805
+ internalReject({ done: false }, error, state);
1806
+ }
1807
+ };
1808
+
1809
+ // constructor polyfill
1810
+ if (FORCED_PROMISE_CONSTRUCTOR$4) {
1811
+ // 25.4.3.1 Promise(executor)
1812
+ PromiseConstructor = function Promise(executor) {
1813
+ anInstance(this, PromisePrototype);
1814
+ aCallable$4(executor);
1815
+ call$9(Internal, this);
1816
+ var state = getInternalPromiseState(this);
1817
+ try {
1818
+ executor(bind$2(internalResolve, state), bind$2(internalReject, state));
1819
+ } catch (error) {
1820
+ internalReject(state, error);
1821
+ }
1822
+ };
1823
+
1824
+ PromisePrototype = PromiseConstructor.prototype;
1825
+
1826
+ // eslint-disable-next-line no-unused-vars -- required for `.length`
1827
+ Internal = function Promise(executor) {
1828
+ setInternalState$1(this, {
1829
+ type: PROMISE,
1830
+ done: false,
1831
+ notified: false,
1832
+ parent: false,
1833
+ reactions: new Queue(),
1834
+ rejection: false,
1835
+ state: PENDING,
1836
+ value: undefined
1837
+ });
1838
+ };
1839
+
1840
+ // `Promise.prototype.then` method
1841
+ // https://tc39.es/ecma262/#sec-promise.prototype.then
1842
+ Internal.prototype = defineBuiltIn$4(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
1843
+ var state = getInternalPromiseState(this);
1844
+ var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
1845
+ state.parent = true;
1846
+ reaction.ok = isCallable$4(onFulfilled) ? onFulfilled : true;
1847
+ reaction.fail = isCallable$4(onRejected) && onRejected;
1848
+ reaction.domain = IS_NODE$1 ? process.domain : undefined;
1849
+ if (state.state == PENDING) state.reactions.add(reaction);
1850
+ else microtask(function () {
1851
+ callReaction(reaction, state);
1852
+ });
1853
+ return reaction.promise;
1854
+ });
1855
+
1856
+ OwnPromiseCapability = function () {
1857
+ var promise = new Internal();
1858
+ var state = getInternalPromiseState(promise);
1859
+ this.promise = promise;
1860
+ this.resolve = bind$2(internalResolve, state);
1861
+ this.reject = bind$2(internalReject, state);
1862
+ };
1863
+
1864
+ newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
1865
+ return C === PromiseConstructor || C === PromiseWrapper
1866
+ ? new OwnPromiseCapability(C)
1867
+ : newGenericPromiseCapability(C);
1868
+ };
1869
+
1870
+ if (isCallable$4(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
1871
+ nativeThen = NativePromisePrototype$1.then;
1872
+
1873
+ if (!NATIVE_PROMISE_SUBCLASSING) {
1874
+ // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
1875
+ defineBuiltIn$4(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
1876
+ var that = this;
1877
+ return new PromiseConstructor(function (resolve, reject) {
1878
+ call$9(nativeThen, that, resolve, reject);
1879
+ }).then(onFulfilled, onRejected);
1880
+ // https://github.com/zloirock/core-js/issues/640
1881
+ }, { unsafe: true });
1882
+ }
1883
+
1884
+ // make `.constructor === Promise` work for native promise-based APIs
1885
+ try {
1886
+ delete NativePromisePrototype$1.constructor;
1887
+ } catch (error) { /* empty */ }
1888
+
1889
+ // make `instanceof Promise` work for native promise-based APIs
1890
+ if (setPrototypeOf$1) {
1891
+ setPrototypeOf$1(NativePromisePrototype$1, PromisePrototype);
1892
+ }
1893
+ }
1894
+ }
1895
+
1896
+ $$c({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
1897
+ Promise: PromiseConstructor
1898
+ });
1899
+
1900
+ setToStringTag$2(PromiseConstructor, PROMISE, false);
1901
+ setSpecies(PROMISE);
1902
+
1903
+ var iterators = {};
1904
+
1905
+ var wellKnownSymbol$9 = wellKnownSymbol$h;
1906
+ var Iterators$4 = iterators;
1907
+
1908
+ var ITERATOR$6 = wellKnownSymbol$9('iterator');
1909
+ var ArrayPrototype$1 = Array.prototype;
1910
+
1911
+ // check on default Array iterator
1912
+ var isArrayIteratorMethod$1 = function (it) {
1913
+ return it !== undefined && (Iterators$4.Array === it || ArrayPrototype$1[ITERATOR$6] === it);
1914
+ };
1915
+
1916
+ var classof$3 = classof$5;
1917
+ var getMethod$1 = getMethod$3;
1918
+ var isNullOrUndefined = isNullOrUndefined$4;
1919
+ var Iterators$3 = iterators;
1920
+ var wellKnownSymbol$8 = wellKnownSymbol$h;
1921
+
1922
+ var ITERATOR$5 = wellKnownSymbol$8('iterator');
1923
+
1924
+ var getIteratorMethod$2 = function (it) {
1925
+ if (!isNullOrUndefined(it)) return getMethod$1(it, ITERATOR$5)
1926
+ || getMethod$1(it, '@@iterator')
1927
+ || Iterators$3[classof$3(it)];
1928
+ };
1929
+
1930
+ var call$8 = functionCall;
1931
+ var aCallable$3 = aCallable$8;
1932
+ var anObject$7 = anObject$c;
1933
+ var tryToString$1 = tryToString$4;
1934
+ var getIteratorMethod$1 = getIteratorMethod$2;
1935
+
1936
+ var $TypeError$4 = TypeError;
1937
+
1938
+ var getIterator$1 = function (argument, usingIterator) {
1939
+ var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
1940
+ if (aCallable$3(iteratorMethod)) return anObject$7(call$8(iteratorMethod, argument));
1941
+ throw $TypeError$4(tryToString$1(argument) + ' is not iterable');
1942
+ };
1943
+
1944
+ var call$7 = functionCall;
1945
+ var anObject$6 = anObject$c;
1946
+ var getMethod = getMethod$3;
1947
+
1948
+ var iteratorClose$1 = function (iterator, kind, value) {
1949
+ var innerResult, innerError;
1950
+ anObject$6(iterator);
1951
+ try {
1952
+ innerResult = getMethod(iterator, 'return');
1953
+ if (!innerResult) {
1954
+ if (kind === 'throw') throw value;
1955
+ return value;
1956
+ }
1957
+ innerResult = call$7(innerResult, iterator);
1958
+ } catch (error) {
1959
+ innerError = true;
1960
+ innerResult = error;
1961
+ }
1962
+ if (kind === 'throw') throw value;
1963
+ if (innerError) throw innerResult;
1964
+ anObject$6(innerResult);
1965
+ return value;
1966
+ };
1967
+
1968
+ var bind$1 = functionBindContext;
1969
+ var call$6 = functionCall;
1970
+ var anObject$5 = anObject$c;
1971
+ var tryToString = tryToString$4;
1972
+ var isArrayIteratorMethod = isArrayIteratorMethod$1;
1973
+ var lengthOfArrayLike$3 = lengthOfArrayLike$5;
1974
+ var isPrototypeOf$1 = objectIsPrototypeOf;
1975
+ var getIterator = getIterator$1;
1976
+ var getIteratorMethod = getIteratorMethod$2;
1977
+ var iteratorClose = iteratorClose$1;
1978
+
1979
+ var $TypeError$3 = TypeError;
1980
+
1981
+ var Result = function (stopped, result) {
1982
+ this.stopped = stopped;
1983
+ this.result = result;
1984
+ };
1985
+
1986
+ var ResultPrototype = Result.prototype;
1987
+
1988
+ var iterate$2 = function (iterable, unboundFunction, options) {
1989
+ var that = options && options.that;
1990
+ var AS_ENTRIES = !!(options && options.AS_ENTRIES);
1991
+ var IS_RECORD = !!(options && options.IS_RECORD);
1992
+ var IS_ITERATOR = !!(options && options.IS_ITERATOR);
1993
+ var INTERRUPTED = !!(options && options.INTERRUPTED);
1994
+ var fn = bind$1(unboundFunction, that);
1995
+ var iterator, iterFn, index, length, result, next, step;
1996
+
1997
+ var stop = function (condition) {
1998
+ if (iterator) iteratorClose(iterator, 'normal', condition);
1999
+ return new Result(true, condition);
2000
+ };
2001
+
2002
+ var callFn = function (value) {
2003
+ if (AS_ENTRIES) {
2004
+ anObject$5(value);
2005
+ return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
2006
+ } return INTERRUPTED ? fn(value, stop) : fn(value);
2007
+ };
2008
+
2009
+ if (IS_RECORD) {
2010
+ iterator = iterable.iterator;
2011
+ } else if (IS_ITERATOR) {
2012
+ iterator = iterable;
2013
+ } else {
2014
+ iterFn = getIteratorMethod(iterable);
2015
+ if (!iterFn) throw $TypeError$3(tryToString(iterable) + ' is not iterable');
2016
+ // optimisation for array iterators
2017
+ if (isArrayIteratorMethod(iterFn)) {
2018
+ for (index = 0, length = lengthOfArrayLike$3(iterable); length > index; index++) {
2019
+ result = callFn(iterable[index]);
2020
+ if (result && isPrototypeOf$1(ResultPrototype, result)) return result;
2021
+ } return new Result(false);
2022
+ }
2023
+ iterator = getIterator(iterable, iterFn);
2024
+ }
2025
+
2026
+ next = IS_RECORD ? iterable.next : iterator.next;
2027
+ while (!(step = call$6(next, iterator)).done) {
2028
+ try {
2029
+ result = callFn(step.value);
2030
+ } catch (error) {
2031
+ iteratorClose(iterator, 'throw', error);
2032
+ }
2033
+ if (typeof result == 'object' && result && isPrototypeOf$1(ResultPrototype, result)) return result;
2034
+ } return new Result(false);
2035
+ };
2036
+
2037
+ var wellKnownSymbol$7 = wellKnownSymbol$h;
2038
+
2039
+ var ITERATOR$4 = wellKnownSymbol$7('iterator');
2040
+ var SAFE_CLOSING = false;
2041
+
2042
+ try {
2043
+ var called = 0;
2044
+ var iteratorWithReturn = {
2045
+ next: function () {
2046
+ return { done: !!called++ };
2047
+ },
2048
+ 'return': function () {
2049
+ SAFE_CLOSING = true;
2050
+ }
2051
+ };
2052
+ iteratorWithReturn[ITERATOR$4] = function () {
2053
+ return this;
2054
+ };
2055
+ // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
2056
+ Array.from(iteratorWithReturn, function () { throw 2; });
2057
+ } catch (error) { /* empty */ }
2058
+
2059
+ var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
2060
+ if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
2061
+ var ITERATION_SUPPORT = false;
2062
+ try {
2063
+ var object = {};
2064
+ object[ITERATOR$4] = function () {
2065
+ return {
2066
+ next: function () {
2067
+ return { done: ITERATION_SUPPORT = true };
2068
+ }
2069
+ };
2070
+ };
2071
+ exec(object);
2072
+ } catch (error) { /* empty */ }
2073
+ return ITERATION_SUPPORT;
2074
+ };
2075
+
2076
+ var NativePromiseConstructor$1 = promiseNativeConstructor;
2077
+ var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
2078
+ var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
2079
+
2080
+ var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
2081
+ NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
2082
+ });
2083
+
2084
+ var $$b = _export;
2085
+ var call$5 = functionCall;
2086
+ var aCallable$2 = aCallable$8;
2087
+ var newPromiseCapabilityModule$2 = newPromiseCapability$2;
2088
+ var perform$1 = perform$3;
2089
+ var iterate$1 = iterate$2;
2090
+ var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
2091
+
2092
+ // `Promise.all` method
2093
+ // https://tc39.es/ecma262/#sec-promise.all
2094
+ $$b({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
2095
+ all: function all(iterable) {
2096
+ var C = this;
2097
+ var capability = newPromiseCapabilityModule$2.f(C);
2098
+ var resolve = capability.resolve;
2099
+ var reject = capability.reject;
2100
+ var result = perform$1(function () {
2101
+ var $promiseResolve = aCallable$2(C.resolve);
2102
+ var values = [];
2103
+ var counter = 0;
2104
+ var remaining = 1;
2105
+ iterate$1(iterable, function (promise) {
2106
+ var index = counter++;
2107
+ var alreadyCalled = false;
2108
+ remaining++;
2109
+ call$5($promiseResolve, C, promise).then(function (value) {
2110
+ if (alreadyCalled) return;
2111
+ alreadyCalled = true;
2112
+ values[index] = value;
2113
+ --remaining || resolve(values);
2114
+ }, reject);
2115
+ });
2116
+ --remaining || resolve(values);
2117
+ });
2118
+ if (result.error) reject(result.value);
2119
+ return capability.promise;
2120
+ }
2121
+ });
2122
+
2123
+ var $$a = _export;
2124
+ var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
2125
+ var NativePromiseConstructor = promiseNativeConstructor;
2126
+ var getBuiltIn$1 = getBuiltIn$8;
2127
+ var isCallable$3 = isCallable$k;
2128
+ var defineBuiltIn$3 = defineBuiltIn$6;
2129
+
2130
+ var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
2131
+
2132
+ // `Promise.prototype.catch` method
2133
+ // https://tc39.es/ecma262/#sec-promise.prototype.catch
2134
+ $$a({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
2135
+ 'catch': function (onRejected) {
2136
+ return this.then(undefined, onRejected);
2137
+ }
2138
+ });
2139
+
2140
+ // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
2141
+ if (isCallable$3(NativePromiseConstructor)) {
2142
+ var method = getBuiltIn$1('Promise').prototype['catch'];
2143
+ if (NativePromisePrototype['catch'] !== method) {
2144
+ defineBuiltIn$3(NativePromisePrototype, 'catch', method, { unsafe: true });
2145
+ }
2146
+ }
2147
+
2148
+ var $$9 = _export;
2149
+ var call$4 = functionCall;
2150
+ var aCallable$1 = aCallable$8;
2151
+ var newPromiseCapabilityModule$1 = newPromiseCapability$2;
2152
+ var perform = perform$3;
2153
+ var iterate = iterate$2;
2154
+ var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
2155
+
2156
+ // `Promise.race` method
2157
+ // https://tc39.es/ecma262/#sec-promise.race
2158
+ $$9({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
2159
+ race: function race(iterable) {
2160
+ var C = this;
2161
+ var capability = newPromiseCapabilityModule$1.f(C);
2162
+ var reject = capability.reject;
2163
+ var result = perform(function () {
2164
+ var $promiseResolve = aCallable$1(C.resolve);
2165
+ iterate(iterable, function (promise) {
2166
+ call$4($promiseResolve, C, promise).then(capability.resolve, reject);
2167
+ });
2168
+ });
2169
+ if (result.error) reject(result.value);
2170
+ return capability.promise;
2171
+ }
2172
+ });
2173
+
2174
+ var $$8 = _export;
2175
+ var call$3 = functionCall;
2176
+ var newPromiseCapabilityModule = newPromiseCapability$2;
2177
+ var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
2178
+
2179
+ // `Promise.reject` method
2180
+ // https://tc39.es/ecma262/#sec-promise.reject
2181
+ $$8({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
2182
+ reject: function reject(r) {
2183
+ var capability = newPromiseCapabilityModule.f(this);
2184
+ call$3(capability.reject, undefined, r);
2185
+ return capability.promise;
2186
+ }
2187
+ });
2188
+
2189
+ var anObject$4 = anObject$c;
2190
+ var isObject$3 = isObject$a;
2191
+ var newPromiseCapability = newPromiseCapability$2;
2192
+
2193
+ var promiseResolve$1 = function (C, x) {
2194
+ anObject$4(C);
2195
+ if (isObject$3(x) && x.constructor === C) return x;
2196
+ var promiseCapability = newPromiseCapability.f(C);
2197
+ var resolve = promiseCapability.resolve;
2198
+ resolve(x);
2199
+ return promiseCapability.promise;
2200
+ };
2201
+
2202
+ var $$7 = _export;
2203
+ var getBuiltIn = getBuiltIn$8;
2204
+ var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
2205
+ var promiseResolve = promiseResolve$1;
2206
+
2207
+ getBuiltIn('Promise');
2208
+
2209
+ // `Promise.resolve` method
2210
+ // https://tc39.es/ecma262/#sec-promise.resolve
2211
+ $$7({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
2212
+ resolve: function resolve(x) {
2213
+ return promiseResolve(this, x);
2214
+ }
2215
+ });
2216
+
2217
+ var internalObjectKeys = objectKeysInternal;
2218
+ var enumBugKeys$1 = enumBugKeys$3;
2219
+
2220
+ // `Object.keys` method
2221
+ // https://tc39.es/ecma262/#sec-object.keys
2222
+ // eslint-disable-next-line es/no-object-keys -- safe
2223
+ var objectKeys$2 = Object.keys || function keys(O) {
2224
+ return internalObjectKeys(O, enumBugKeys$1);
2225
+ };
2226
+
2227
+ var DESCRIPTORS$2 = descriptors;
2228
+ var uncurryThis$3 = functionUncurryThis;
2229
+ var call$2 = functionCall;
2230
+ var fails$6 = fails$h;
2231
+ var objectKeys$1 = objectKeys$2;
2232
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
2233
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
2234
+ var toObject$3 = toObject$5;
2235
+ var IndexedObject$1 = indexedObject;
2236
+
2237
+ // eslint-disable-next-line es/no-object-assign -- safe
2238
+ var $assign = Object.assign;
2239
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
2240
+ var defineProperty$2 = Object.defineProperty;
2241
+ var concat = uncurryThis$3([].concat);
2242
+
2243
+ // `Object.assign` method
2244
+ // https://tc39.es/ecma262/#sec-object.assign
2245
+ var objectAssign = !$assign || fails$6(function () {
2246
+ // should have correct order of operations (Edge bug)
2247
+ if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$2({}, 'a', {
2248
+ enumerable: true,
2249
+ get: function () {
2250
+ defineProperty$2(this, 'b', {
2251
+ value: 3,
2252
+ enumerable: false
2253
+ });
2254
+ }
2255
+ }), { b: 2 })).b !== 1) return true;
2256
+ // should work with symbols and should have deterministic property order (V8 bug)
2257
+ var A = {};
2258
+ var B = {};
2259
+ // eslint-disable-next-line es/no-symbol -- safe
2260
+ var symbol = Symbol();
2261
+ var alphabet = 'abcdefghijklmnopqrst';
2262
+ A[symbol] = 7;
2263
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
2264
+ return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
2265
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
2266
+ var T = toObject$3(target);
2267
+ var argumentsLength = arguments.length;
2268
+ var index = 1;
2269
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
2270
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
2271
+ while (argumentsLength > index) {
2272
+ var S = IndexedObject$1(arguments[index++]);
2273
+ var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
2274
+ var length = keys.length;
2275
+ var j = 0;
2276
+ var key;
2277
+ while (length > j) {
2278
+ key = keys[j++];
2279
+ if (!DESCRIPTORS$2 || call$2(propertyIsEnumerable, S, key)) T[key] = S[key];
2280
+ }
2281
+ } return T;
2282
+ } : $assign;
2283
+
2284
+ var $$6 = _export;
2285
+ var assign = objectAssign;
2286
+
2287
+ // `Object.assign` method
2288
+ // https://tc39.es/ecma262/#sec-object.assign
2289
+ // eslint-disable-next-line es/no-object-assign -- required for testing
2290
+ $$6({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
2291
+ assign: assign
2292
+ });
2293
+
2294
+ var objectDefineProperties = {};
2295
+
2296
+ var DESCRIPTORS$1 = descriptors;
2297
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
2298
+ var definePropertyModule = objectDefineProperty;
2299
+ var anObject$3 = anObject$c;
2300
+ var toIndexedObject$1 = toIndexedObject$5;
2301
+ var objectKeys = objectKeys$2;
2302
+
2303
+ // `Object.defineProperties` method
2304
+ // https://tc39.es/ecma262/#sec-object.defineproperties
2305
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
2306
+ objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
2307
+ anObject$3(O);
2308
+ var props = toIndexedObject$1(Properties);
2309
+ var keys = objectKeys(Properties);
2310
+ var length = keys.length;
2311
+ var index = 0;
2312
+ var key;
2313
+ while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
2314
+ return O;
2315
+ };
2316
+
2317
+ /* global ActiveXObject -- old IE, WSH */
2318
+
2319
+ var anObject$2 = anObject$c;
2320
+ var definePropertiesModule = objectDefineProperties;
2321
+ var enumBugKeys = enumBugKeys$3;
2322
+ var hiddenKeys = hiddenKeys$4;
2323
+ var html = html$2;
2324
+ var documentCreateElement$1 = documentCreateElement$2;
2325
+ var sharedKey$1 = sharedKey$3;
2326
+
2327
+ var GT = '>';
2328
+ var LT = '<';
2329
+ var PROTOTYPE = 'prototype';
2330
+ var SCRIPT = 'script';
2331
+ var IE_PROTO$1 = sharedKey$1('IE_PROTO');
2332
+
2333
+ var EmptyConstructor = function () { /* empty */ };
2334
+
2335
+ var scriptTag = function (content) {
2336
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
2337
+ };
2338
+
2339
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
2340
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
2341
+ activeXDocument.write(scriptTag(''));
2342
+ activeXDocument.close();
2343
+ var temp = activeXDocument.parentWindow.Object;
2344
+ activeXDocument = null; // avoid memory leak
2345
+ return temp;
2346
+ };
2347
+
2348
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
2349
+ var NullProtoObjectViaIFrame = function () {
2350
+ // Thrash, waste and sodomy: IE GC bug
2351
+ var iframe = documentCreateElement$1('iframe');
2352
+ var JS = 'java' + SCRIPT + ':';
2353
+ var iframeDocument;
2354
+ iframe.style.display = 'none';
2355
+ html.appendChild(iframe);
2356
+ // https://github.com/zloirock/core-js/issues/475
2357
+ iframe.src = String(JS);
2358
+ iframeDocument = iframe.contentWindow.document;
2359
+ iframeDocument.open();
2360
+ iframeDocument.write(scriptTag('document.F=Object'));
2361
+ iframeDocument.close();
2362
+ return iframeDocument.F;
2363
+ };
2364
+
2365
+ // Check for document.domain and active x support
2366
+ // No need to use active x approach when document.domain is not set
2367
+ // see https://github.com/es-shims/es5-shim/issues/150
2368
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
2369
+ // avoid IE GC bug
2370
+ var activeXDocument;
2371
+ var NullProtoObject = function () {
2372
+ try {
2373
+ activeXDocument = new ActiveXObject('htmlfile');
2374
+ } catch (error) { /* ignore */ }
2375
+ NullProtoObject = typeof document != 'undefined'
2376
+ ? document.domain && activeXDocument
2377
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
2378
+ : NullProtoObjectViaIFrame()
2379
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
2380
+ var length = enumBugKeys.length;
2381
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
2382
+ return NullProtoObject();
2383
+ };
2384
+
2385
+ hiddenKeys[IE_PROTO$1] = true;
2386
+
2387
+ // `Object.create` method
2388
+ // https://tc39.es/ecma262/#sec-object.create
2389
+ // eslint-disable-next-line es/no-object-create -- safe
2390
+ var objectCreate = Object.create || function create(O, Properties) {
2391
+ var result;
2392
+ if (O !== null) {
2393
+ EmptyConstructor[PROTOTYPE] = anObject$2(O);
2394
+ result = new EmptyConstructor();
2395
+ EmptyConstructor[PROTOTYPE] = null;
2396
+ // add "__proto__" for Object.getPrototypeOf polyfill
2397
+ result[IE_PROTO$1] = O;
2398
+ } else result = NullProtoObject();
2399
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
2400
+ };
2401
+
2402
+ var wellKnownSymbol$6 = wellKnownSymbol$h;
2403
+ var create$1 = objectCreate;
2404
+ var defineProperty$1 = objectDefineProperty.f;
2405
+
2406
+ var UNSCOPABLES = wellKnownSymbol$6('unscopables');
2407
+ var ArrayPrototype = Array.prototype;
2408
+
2409
+ // Array.prototype[@@unscopables]
2410
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2411
+ if (ArrayPrototype[UNSCOPABLES] == undefined) {
2412
+ defineProperty$1(ArrayPrototype, UNSCOPABLES, {
2413
+ configurable: true,
2414
+ value: create$1(null)
2415
+ });
2416
+ }
2417
+
2418
+ // add a key to Array.prototype[@@unscopables]
2419
+ var addToUnscopables$3 = function (key) {
2420
+ ArrayPrototype[UNSCOPABLES][key] = true;
2421
+ };
2422
+
2423
+ var $$5 = _export;
2424
+ var $includes = arrayIncludes.includes;
2425
+ var fails$5 = fails$h;
2426
+ var addToUnscopables$2 = addToUnscopables$3;
2427
+
2428
+ // FF99+ bug
2429
+ var BROKEN_ON_SPARSE = fails$5(function () {
2430
+ return !Array(1).includes();
2431
+ });
2432
+
2433
+ // `Array.prototype.includes` method
2434
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
2435
+ $$5({ target: 'Array', proto: true, forced: BROKEN_ON_SPARSE }, {
2436
+ includes: function includes(el /* , fromIndex = 0 */) {
2437
+ return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined);
2438
+ }
2439
+ });
2440
+
2441
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2442
+ addToUnscopables$2('includes');
2443
+
2444
+ var isObject$2 = isObject$a;
2445
+ var classof$2 = classofRaw$2;
2446
+ var wellKnownSymbol$5 = wellKnownSymbol$h;
2447
+
2448
+ var MATCH$1 = wellKnownSymbol$5('match');
2449
+
2450
+ // `IsRegExp` abstract operation
2451
+ // https://tc39.es/ecma262/#sec-isregexp
2452
+ var isRegexp = function (it) {
2453
+ var isRegExp;
2454
+ return isObject$2(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$2(it) == 'RegExp');
2455
+ };
2456
+
2457
+ var isRegExp = isRegexp;
2458
+
2459
+ var $TypeError$2 = TypeError;
2460
+
2461
+ var notARegexp = function (it) {
2462
+ if (isRegExp(it)) {
2463
+ throw $TypeError$2("The method doesn't accept regular expressions");
2464
+ } return it;
2465
+ };
2466
+
2467
+ var classof$1 = classof$5;
2468
+
2469
+ var $String = String;
2470
+
2471
+ var toString$3 = function (argument) {
2472
+ if (classof$1(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
2473
+ return $String(argument);
2474
+ };
2475
+
2476
+ var wellKnownSymbol$4 = wellKnownSymbol$h;
2477
+
2478
+ var MATCH = wellKnownSymbol$4('match');
2479
+
2480
+ var correctIsRegexpLogic = function (METHOD_NAME) {
2481
+ var regexp = /./;
2482
+ try {
2483
+ '/./'[METHOD_NAME](regexp);
2484
+ } catch (error1) {
2485
+ try {
2486
+ regexp[MATCH] = false;
2487
+ return '/./'[METHOD_NAME](regexp);
2488
+ } catch (error2) { /* empty */ }
2489
+ } return false;
2490
+ };
2491
+
2492
+ var $$4 = _export;
2493
+ var uncurryThis$2 = functionUncurryThis;
2494
+ var notARegExp = notARegexp;
2495
+ var requireObjectCoercible$1 = requireObjectCoercible$4;
2496
+ var toString$2 = toString$3;
2497
+ var correctIsRegExpLogic = correctIsRegexpLogic;
2498
+
2499
+ var stringIndexOf = uncurryThis$2(''.indexOf);
2500
+
2501
+ // `String.prototype.includes` method
2502
+ // https://tc39.es/ecma262/#sec-string.prototype.includes
2503
+ $$4({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, {
2504
+ includes: function includes(searchString /* , position = 0 */) {
2505
+ return !!~stringIndexOf(
2506
+ toString$2(requireObjectCoercible$1(this)),
2507
+ toString$2(notARegExp(searchString)),
2508
+ arguments.length > 1 ? arguments[1] : undefined
2509
+ );
2510
+ }
2511
+ });
2512
+
17
2513
  /******************************************************************************
18
2514
  Copyright (c) Microsoft Corporation.
19
2515
 
@@ -125,7 +2621,7 @@ const ninetailedPlugin = ({
125
2621
  };
126
2622
  }
127
2623
  try {
128
- const anonymousId = _instance.storage.getItem(ANONYMOUS_ID);
2624
+ const anonymousId = yield _instance.storage.getItem(ANONYMOUS_ID);
129
2625
  const profile = yield apiClient.upsertProfile({
130
2626
  profileId: anonymousId,
131
2627
  events
@@ -133,8 +2629,8 @@ const ninetailedPlugin = ({
133
2629
  locale,
134
2630
  enabledFeatures
135
2631
  });
136
- _instance.storage.setItem(ANONYMOUS_ID, profile.id);
137
- _instance.storage.setItem(PROFILE_FALLBACK_CACHE, profile);
2632
+ yield _instance.storage.setItem(ANONYMOUS_ID, profile.id);
2633
+ yield _instance.storage.setItem(PROFILE_FALLBACK_CACHE, profile);
138
2634
  experience_jsShared.logger.debug('Profile from api: ', profile);
139
2635
  _instance.dispatch({
140
2636
  type: PROFILE_CHANGE,
@@ -146,7 +2642,7 @@ const ninetailedPlugin = ({
146
2642
  };
147
2643
  } catch (error) {
148
2644
  experience_jsShared.logger.debug('An error occurred during flushing the events: ', error);
149
- const fallbackProfile = _instance.storage.getItem(PROFILE_FALLBACK_CACHE);
2645
+ const fallbackProfile = yield _instance.storage.getItem(PROFILE_FALLBACK_CACHE);
150
2646
  if (fallbackProfile) {
151
2647
  experience_jsShared.logger.debug('Found a fallback profile - will use this.');
152
2648
  _instance.dispatch({
@@ -187,21 +2683,21 @@ const ninetailedPlugin = ({
187
2683
  config: {},
188
2684
  initialize: ({
189
2685
  instance
190
- }) => {
2686
+ }) => __awaiter(void 0, void 0, void 0, function* () {
191
2687
  _instance = instance;
192
- if (instance.storage.getItem(DEBUG_FLAG)) {
2688
+ if (yield instance.storage.getItem(DEBUG_FLAG)) {
193
2689
  experience_jsShared.logger.addSink(new experience_jsShared.ConsoleLogSink());
194
2690
  experience_jsShared.logger.info('Ninetailed Debug Mode is enabled.');
195
2691
  }
196
2692
  // legacy support for the old anonymousId
197
- const legacyAnonymousId = instance.storage.getItem(LEGACY_ANONYMOUS_ID);
2693
+ const legacyAnonymousId = yield instance.storage.getItem(LEGACY_ANONYMOUS_ID);
198
2694
  if (legacyAnonymousId) {
199
2695
  experience_jsShared.logger.debug('Found legacy anonymousId, migrating to new one.', legacyAnonymousId);
200
- instance.storage.setItem(ANONYMOUS_ID, legacyAnonymousId);
201
- instance.storage.removeItem(LEGACY_ANONYMOUS_ID);
2696
+ yield instance.storage.setItem(ANONYMOUS_ID, legacyAnonymousId);
2697
+ yield instance.storage.removeItem(LEGACY_ANONYMOUS_ID);
202
2698
  }
203
2699
  if (profile) {
204
- instance.storage.setItem(ANONYMOUS_ID, profile.id);
2700
+ yield instance.storage.setItem(ANONYMOUS_ID, profile.id);
205
2701
  }
206
2702
  instance.on(SET_ENABLED_FEATURES, ({
207
2703
  payload
@@ -209,7 +2705,7 @@ const ninetailedPlugin = ({
209
2705
  enabledFeatures = payload.features || [];
210
2706
  });
211
2707
  experience_jsShared.logger.debug('Ninetailed Core plugin initialized.');
212
- },
2708
+ }),
213
2709
  flush: asyncThrottle(flush),
214
2710
  pageStart: params => {
215
2711
  return abortNonClientEvents(params);
@@ -279,9 +2775,10 @@ const ninetailedPlugin = ({
279
2775
  instance.dispatch({
280
2776
  type: PROFILE_RESET
281
2777
  });
282
- instance.storage.removeItem(ANONYMOUS_ID);
283
- instance.storage.removeItem(PROFILE_FALLBACK_CACHE);
2778
+ yield instance.storage.removeItem(ANONYMOUS_ID);
2779
+ yield instance.storage.removeItem(PROFILE_FALLBACK_CACHE);
284
2780
  experience_jsShared.logger.debug('Removed old profile data from localstorage.');
2781
+ // TODO replace with a proper event instead of abusing the track event ssystem.
285
2782
  yield ninetailed.track('nt_reset');
286
2783
  experience_jsShared.logger.info('Profile reset successful.');
287
2784
  yield delay(10);
@@ -291,11 +2788,11 @@ const ninetailedPlugin = ({
291
2788
  const instance = args[args.length - 1];
292
2789
  const consoleLogSink = new experience_jsShared.ConsoleLogSink();
293
2790
  if (enabled) {
294
- instance.storage.setItem(DEBUG_FLAG, true);
2791
+ yield instance.storage.setItem(DEBUG_FLAG, true);
295
2792
  experience_jsShared.logger.addSink(consoleLogSink);
296
2793
  experience_jsShared.logger.info('Debug mode enabled.');
297
2794
  } else {
298
- instance.storage.removeItem(DEBUG_FLAG);
2795
+ yield instance.storage.removeItem(DEBUG_FLAG);
299
2796
  experience_jsShared.logger.info('Debug mode disabled.');
300
2797
  experience_jsShared.logger.removeSink(consoleLogSink.name);
301
2798
  }
@@ -304,6 +2801,512 @@ const ninetailedPlugin = ({
304
2801
  };
305
2802
  };
306
2803
 
2804
+ var anObject$1 = anObject$c;
2805
+
2806
+ // `RegExp.prototype.flags` getter implementation
2807
+ // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
2808
+ var regexpFlags = function () {
2809
+ var that = anObject$1(this);
2810
+ var result = '';
2811
+ if (that.hasIndices) result += 'd';
2812
+ if (that.global) result += 'g';
2813
+ if (that.ignoreCase) result += 'i';
2814
+ if (that.multiline) result += 'm';
2815
+ if (that.dotAll) result += 's';
2816
+ if (that.unicode) result += 'u';
2817
+ if (that.unicodeSets) result += 'v';
2818
+ if (that.sticky) result += 'y';
2819
+ return result;
2820
+ };
2821
+
2822
+ var call$1 = functionCall;
2823
+ var hasOwn$1 = hasOwnProperty_1;
2824
+ var isPrototypeOf = objectIsPrototypeOf;
2825
+ var regExpFlags = regexpFlags;
2826
+
2827
+ var RegExpPrototype$1 = RegExp.prototype;
2828
+
2829
+ var regexpGetFlags = function (R) {
2830
+ var flags = R.flags;
2831
+ return flags === undefined && !('flags' in RegExpPrototype$1) && !hasOwn$1(R, 'flags') && isPrototypeOf(RegExpPrototype$1, R)
2832
+ ? call$1(regExpFlags, R) : flags;
2833
+ };
2834
+
2835
+ var PROPER_FUNCTION_NAME$1 = functionName.PROPER;
2836
+ var defineBuiltIn$2 = defineBuiltIn$6;
2837
+ var anObject = anObject$c;
2838
+ var $toString = toString$3;
2839
+ var fails$4 = fails$h;
2840
+ var getRegExpFlags = regexpGetFlags;
2841
+
2842
+ var TO_STRING = 'toString';
2843
+ var RegExpPrototype = RegExp.prototype;
2844
+ var nativeToString = RegExpPrototype[TO_STRING];
2845
+
2846
+ var NOT_GENERIC = fails$4(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
2847
+ // FF44- RegExp#toString has a wrong name
2848
+ var INCORRECT_NAME = PROPER_FUNCTION_NAME$1 && nativeToString.name != TO_STRING;
2849
+
2850
+ // `RegExp.prototype.toString` method
2851
+ // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
2852
+ if (NOT_GENERIC || INCORRECT_NAME) {
2853
+ defineBuiltIn$2(RegExp.prototype, TO_STRING, function toString() {
2854
+ var R = anObject(this);
2855
+ var pattern = $toString(R.source);
2856
+ var flags = $toString(getRegExpFlags(R));
2857
+ return '/' + pattern + '/' + flags;
2858
+ }, { unsafe: true });
2859
+ }
2860
+
2861
+ var classof = classofRaw$2;
2862
+
2863
+ // `IsArray` abstract operation
2864
+ // https://tc39.es/ecma262/#sec-isarray
2865
+ // eslint-disable-next-line es/no-array-isarray -- safe
2866
+ var isArray$2 = Array.isArray || function isArray(argument) {
2867
+ return classof(argument) == 'Array';
2868
+ };
2869
+
2870
+ var $TypeError$1 = TypeError;
2871
+ var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; // 2 ** 53 - 1 == 9007199254740991
2872
+
2873
+ var doesNotExceedSafeInteger$1 = function (it) {
2874
+ if (it > MAX_SAFE_INTEGER) throw $TypeError$1('Maximum allowed index exceeded');
2875
+ return it;
2876
+ };
2877
+
2878
+ var isArray$1 = isArray$2;
2879
+ var lengthOfArrayLike$2 = lengthOfArrayLike$5;
2880
+ var doesNotExceedSafeInteger = doesNotExceedSafeInteger$1;
2881
+ var bind = functionBindContext;
2882
+
2883
+ // `FlattenIntoArray` abstract operation
2884
+ // https://tc39.github.io/proposal-flatMap/#sec-FlattenIntoArray
2885
+ var flattenIntoArray$1 = function (target, original, source, sourceLen, start, depth, mapper, thisArg) {
2886
+ var targetIndex = start;
2887
+ var sourceIndex = 0;
2888
+ var mapFn = mapper ? bind(mapper, thisArg) : false;
2889
+ var element, elementLen;
2890
+
2891
+ while (sourceIndex < sourceLen) {
2892
+ if (sourceIndex in source) {
2893
+ element = mapFn ? mapFn(source[sourceIndex], sourceIndex, original) : source[sourceIndex];
2894
+
2895
+ if (depth > 0 && isArray$1(element)) {
2896
+ elementLen = lengthOfArrayLike$2(element);
2897
+ targetIndex = flattenIntoArray$1(target, original, element, elementLen, targetIndex, depth - 1) - 1;
2898
+ } else {
2899
+ doesNotExceedSafeInteger(targetIndex + 1);
2900
+ target[targetIndex] = element;
2901
+ }
2902
+
2903
+ targetIndex++;
2904
+ }
2905
+ sourceIndex++;
2906
+ }
2907
+ return targetIndex;
2908
+ };
2909
+
2910
+ var flattenIntoArray_1 = flattenIntoArray$1;
2911
+
2912
+ var isArray = isArray$2;
2913
+ var isConstructor = isConstructor$2;
2914
+ var isObject$1 = isObject$a;
2915
+ var wellKnownSymbol$3 = wellKnownSymbol$h;
2916
+
2917
+ var SPECIES = wellKnownSymbol$3('species');
2918
+ var $Array = Array;
2919
+
2920
+ // a part of `ArraySpeciesCreate` abstract operation
2921
+ // https://tc39.es/ecma262/#sec-arrayspeciescreate
2922
+ var arraySpeciesConstructor$1 = function (originalArray) {
2923
+ var C;
2924
+ if (isArray(originalArray)) {
2925
+ C = originalArray.constructor;
2926
+ // cross-realm fallback
2927
+ if (isConstructor(C) && (C === $Array || isArray(C.prototype))) C = undefined;
2928
+ else if (isObject$1(C)) {
2929
+ C = C[SPECIES];
2930
+ if (C === null) C = undefined;
2931
+ }
2932
+ } return C === undefined ? $Array : C;
2933
+ };
2934
+
2935
+ var arraySpeciesConstructor = arraySpeciesConstructor$1;
2936
+
2937
+ // `ArraySpeciesCreate` abstract operation
2938
+ // https://tc39.es/ecma262/#sec-arrayspeciescreate
2939
+ var arraySpeciesCreate$1 = function (originalArray, length) {
2940
+ return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length);
2941
+ };
2942
+
2943
+ var $$3 = _export;
2944
+ var flattenIntoArray = flattenIntoArray_1;
2945
+ var toObject$2 = toObject$5;
2946
+ var lengthOfArrayLike$1 = lengthOfArrayLike$5;
2947
+ var toIntegerOrInfinity = toIntegerOrInfinity$3;
2948
+ var arraySpeciesCreate = arraySpeciesCreate$1;
2949
+
2950
+ // `Array.prototype.flat` method
2951
+ // https://tc39.es/ecma262/#sec-array.prototype.flat
2952
+ $$3({ target: 'Array', proto: true }, {
2953
+ flat: function flat(/* depthArg = 1 */) {
2954
+ var depthArg = arguments.length ? arguments[0] : undefined;
2955
+ var O = toObject$2(this);
2956
+ var sourceLen = lengthOfArrayLike$1(O);
2957
+ var A = arraySpeciesCreate(O, 0);
2958
+ A.length = flattenIntoArray(A, O, O, sourceLen, 0, depthArg === undefined ? 1 : toIntegerOrInfinity(depthArg));
2959
+ return A;
2960
+ }
2961
+ });
2962
+
2963
+ // this method was added to unscopables after implementation
2964
+ // in popular engines, so it's moved to a separate module
2965
+ var addToUnscopables$1 = addToUnscopables$3;
2966
+
2967
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
2968
+ addToUnscopables$1('flat');
2969
+
2970
+ var fails$3 = fails$h;
2971
+
2972
+ var correctPrototypeGetter = !fails$3(function () {
2973
+ function F() { /* empty */ }
2974
+ F.prototype.constructor = null;
2975
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
2976
+ return Object.getPrototypeOf(new F()) !== F.prototype;
2977
+ });
2978
+
2979
+ var hasOwn = hasOwnProperty_1;
2980
+ var isCallable$2 = isCallable$k;
2981
+ var toObject$1 = toObject$5;
2982
+ var sharedKey = sharedKey$3;
2983
+ var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
2984
+
2985
+ var IE_PROTO = sharedKey('IE_PROTO');
2986
+ var $Object = Object;
2987
+ var ObjectPrototype = $Object.prototype;
2988
+
2989
+ // `Object.getPrototypeOf` method
2990
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
2991
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
2992
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
2993
+ var object = toObject$1(O);
2994
+ if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
2995
+ var constructor = object.constructor;
2996
+ if (isCallable$2(constructor) && object instanceof constructor) {
2997
+ return constructor.prototype;
2998
+ } return object instanceof $Object ? ObjectPrototype : null;
2999
+ };
3000
+
3001
+ var fails$2 = fails$h;
3002
+ var isCallable$1 = isCallable$k;
3003
+ var isObject = isObject$a;
3004
+ var getPrototypeOf$1 = objectGetPrototypeOf;
3005
+ var defineBuiltIn$1 = defineBuiltIn$6;
3006
+ var wellKnownSymbol$2 = wellKnownSymbol$h;
3007
+
3008
+ var ITERATOR$3 = wellKnownSymbol$2('iterator');
3009
+ var BUGGY_SAFARI_ITERATORS$1 = false;
3010
+
3011
+ // `%IteratorPrototype%` object
3012
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
3013
+ var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
3014
+
3015
+ /* eslint-disable es/no-array-prototype-keys -- safe */
3016
+ if ([].keys) {
3017
+ arrayIterator = [].keys();
3018
+ // Safari 8 has buggy iterators w/o `next`
3019
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS$1 = true;
3020
+ else {
3021
+ PrototypeOfArrayIteratorPrototype = getPrototypeOf$1(getPrototypeOf$1(arrayIterator));
3022
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype$2 = PrototypeOfArrayIteratorPrototype;
3023
+ }
3024
+ }
3025
+
3026
+ var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$2) || fails$2(function () {
3027
+ var test = {};
3028
+ // FF44- legacy iterators case
3029
+ return IteratorPrototype$2[ITERATOR$3].call(test) !== test;
3030
+ });
3031
+
3032
+ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
3033
+
3034
+ // `%IteratorPrototype%[@@iterator]()` method
3035
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
3036
+ if (!isCallable$1(IteratorPrototype$2[ITERATOR$3])) {
3037
+ defineBuiltIn$1(IteratorPrototype$2, ITERATOR$3, function () {
3038
+ return this;
3039
+ });
3040
+ }
3041
+
3042
+ var iteratorsCore = {
3043
+ IteratorPrototype: IteratorPrototype$2,
3044
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
3045
+ };
3046
+
3047
+ var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
3048
+ var create = objectCreate;
3049
+ var createPropertyDescriptor = createPropertyDescriptor$3;
3050
+ var setToStringTag$1 = setToStringTag$3;
3051
+ var Iterators$2 = iterators;
3052
+
3053
+ var returnThis$1 = function () { return this; };
3054
+
3055
+ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
3056
+ var TO_STRING_TAG = NAME + ' Iterator';
3057
+ IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
3058
+ setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
3059
+ Iterators$2[TO_STRING_TAG] = returnThis$1;
3060
+ return IteratorConstructor;
3061
+ };
3062
+
3063
+ var $$2 = _export;
3064
+ var call = functionCall;
3065
+ var FunctionName = functionName;
3066
+ var isCallable = isCallable$k;
3067
+ var createIteratorConstructor = iteratorCreateConstructor;
3068
+ var getPrototypeOf = objectGetPrototypeOf;
3069
+ var setPrototypeOf = objectSetPrototypeOf;
3070
+ var setToStringTag = setToStringTag$3;
3071
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
3072
+ var defineBuiltIn = defineBuiltIn$6;
3073
+ var wellKnownSymbol$1 = wellKnownSymbol$h;
3074
+ var Iterators$1 = iterators;
3075
+ var IteratorsCore = iteratorsCore;
3076
+
3077
+ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
3078
+ var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
3079
+ var IteratorPrototype = IteratorsCore.IteratorPrototype;
3080
+ var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
3081
+ var ITERATOR$2 = wellKnownSymbol$1('iterator');
3082
+ var KEYS = 'keys';
3083
+ var VALUES = 'values';
3084
+ var ENTRIES = 'entries';
3085
+
3086
+ var returnThis = function () { return this; };
3087
+
3088
+ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
3089
+ createIteratorConstructor(IteratorConstructor, NAME, next);
3090
+
3091
+ var getIterationMethod = function (KIND) {
3092
+ if (KIND === DEFAULT && defaultIterator) return defaultIterator;
3093
+ if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];
3094
+ switch (KIND) {
3095
+ case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };
3096
+ case VALUES: return function values() { return new IteratorConstructor(this, KIND); };
3097
+ case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };
3098
+ } return function () { return new IteratorConstructor(this); };
3099
+ };
3100
+
3101
+ var TO_STRING_TAG = NAME + ' Iterator';
3102
+ var INCORRECT_VALUES_NAME = false;
3103
+ var IterablePrototype = Iterable.prototype;
3104
+ var nativeIterator = IterablePrototype[ITERATOR$2]
3105
+ || IterablePrototype['@@iterator']
3106
+ || DEFAULT && IterablePrototype[DEFAULT];
3107
+ var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
3108
+ var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;
3109
+ var CurrentIteratorPrototype, methods, KEY;
3110
+
3111
+ // fix native
3112
+ if (anyNativeIterator) {
3113
+ CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));
3114
+ if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
3115
+ if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
3116
+ if (setPrototypeOf) {
3117
+ setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
3118
+ } else if (!isCallable(CurrentIteratorPrototype[ITERATOR$2])) {
3119
+ defineBuiltIn(CurrentIteratorPrototype, ITERATOR$2, returnThis);
3120
+ }
3121
+ }
3122
+ // Set @@toStringTag to native iterators
3123
+ setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
3124
+ }
3125
+ }
3126
+
3127
+ // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
3128
+ if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
3129
+ if (CONFIGURABLE_FUNCTION_NAME) {
3130
+ createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
3131
+ } else {
3132
+ INCORRECT_VALUES_NAME = true;
3133
+ defaultIterator = function values() { return call(nativeIterator, this); };
3134
+ }
3135
+ }
3136
+
3137
+ // export additional methods
3138
+ if (DEFAULT) {
3139
+ methods = {
3140
+ values: getIterationMethod(VALUES),
3141
+ keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),
3142
+ entries: getIterationMethod(ENTRIES)
3143
+ };
3144
+ if (FORCED) for (KEY in methods) {
3145
+ if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
3146
+ defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
3147
+ }
3148
+ } else $$2({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
3149
+ }
3150
+
3151
+ // define iterator
3152
+ if (IterablePrototype[ITERATOR$2] !== defaultIterator) {
3153
+ defineBuiltIn(IterablePrototype, ITERATOR$2, defaultIterator, { name: DEFAULT });
3154
+ }
3155
+ Iterators$1[NAME] = defaultIterator;
3156
+
3157
+ return methods;
3158
+ };
3159
+
3160
+ // `CreateIterResultObject` abstract operation
3161
+ // https://tc39.es/ecma262/#sec-createiterresultobject
3162
+ var createIterResultObject$1 = function (value, done) {
3163
+ return { value: value, done: done };
3164
+ };
3165
+
3166
+ var toIndexedObject = toIndexedObject$5;
3167
+ var addToUnscopables = addToUnscopables$3;
3168
+ var Iterators = iterators;
3169
+ var InternalStateModule = internalState;
3170
+ var defineProperty = objectDefineProperty.f;
3171
+ var defineIterator = iteratorDefine;
3172
+ var createIterResultObject = createIterResultObject$1;
3173
+ var DESCRIPTORS = descriptors;
3174
+
3175
+ var ARRAY_ITERATOR = 'Array Iterator';
3176
+ var setInternalState = InternalStateModule.set;
3177
+ var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
3178
+
3179
+ // `Array.prototype.entries` method
3180
+ // https://tc39.es/ecma262/#sec-array.prototype.entries
3181
+ // `Array.prototype.keys` method
3182
+ // https://tc39.es/ecma262/#sec-array.prototype.keys
3183
+ // `Array.prototype.values` method
3184
+ // https://tc39.es/ecma262/#sec-array.prototype.values
3185
+ // `Array.prototype[@@iterator]` method
3186
+ // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
3187
+ // `CreateArrayIterator` internal method
3188
+ // https://tc39.es/ecma262/#sec-createarrayiterator
3189
+ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind) {
3190
+ setInternalState(this, {
3191
+ type: ARRAY_ITERATOR,
3192
+ target: toIndexedObject(iterated), // target
3193
+ index: 0, // next index
3194
+ kind: kind // kind
3195
+ });
3196
+ // `%ArrayIteratorPrototype%.next` method
3197
+ // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
3198
+ }, function () {
3199
+ var state = getInternalState(this);
3200
+ var target = state.target;
3201
+ var kind = state.kind;
3202
+ var index = state.index++;
3203
+ if (!target || index >= target.length) {
3204
+ state.target = undefined;
3205
+ return createIterResultObject(undefined, true);
3206
+ }
3207
+ if (kind == 'keys') return createIterResultObject(index, false);
3208
+ if (kind == 'values') return createIterResultObject(target[index], false);
3209
+ return createIterResultObject([index, target[index]], false);
3210
+ }, 'values');
3211
+
3212
+ // argumentsList[@@iterator] is %ArrayProto_values%
3213
+ // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
3214
+ // https://tc39.es/ecma262/#sec-createmappedargumentsobject
3215
+ var values = Iterators.Arguments = Iterators.Array;
3216
+
3217
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
3218
+ addToUnscopables('keys');
3219
+ addToUnscopables('values');
3220
+ addToUnscopables('entries');
3221
+
3222
+ // V8 ~ Chrome 45- bug
3223
+ if (DESCRIPTORS && values.name !== 'values') try {
3224
+ defineProperty(values, 'name', { value: 'values' });
3225
+ } catch (error) { /* empty */ }
3226
+
3227
+ // iterable DOM collections
3228
+ // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
3229
+ var domIterables = {
3230
+ CSSRuleList: 0,
3231
+ CSSStyleDeclaration: 0,
3232
+ CSSValueList: 0,
3233
+ ClientRectList: 0,
3234
+ DOMRectList: 0,
3235
+ DOMStringList: 0,
3236
+ DOMTokenList: 1,
3237
+ DataTransferItemList: 0,
3238
+ FileList: 0,
3239
+ HTMLAllCollection: 0,
3240
+ HTMLCollection: 0,
3241
+ HTMLFormElement: 0,
3242
+ HTMLSelectElement: 0,
3243
+ MediaList: 0,
3244
+ MimeTypeArray: 0,
3245
+ NamedNodeMap: 0,
3246
+ NodeList: 1,
3247
+ PaintRequestList: 0,
3248
+ Plugin: 0,
3249
+ PluginArray: 0,
3250
+ SVGLengthList: 0,
3251
+ SVGNumberList: 0,
3252
+ SVGPathSegList: 0,
3253
+ SVGPointList: 0,
3254
+ SVGStringList: 0,
3255
+ SVGTransformList: 0,
3256
+ SourceBufferList: 0,
3257
+ StyleSheetList: 0,
3258
+ TextTrackCueList: 0,
3259
+ TextTrackList: 0,
3260
+ TouchList: 0
3261
+ };
3262
+
3263
+ // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList`
3264
+ var documentCreateElement = documentCreateElement$2;
3265
+
3266
+ var classList = documentCreateElement('span').classList;
3267
+ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.constructor.prototype;
3268
+
3269
+ var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
3270
+
3271
+ var global$2 = global$k;
3272
+ var DOMIterables = domIterables;
3273
+ var DOMTokenListPrototype = domTokenListPrototype;
3274
+ var ArrayIteratorMethods = es_array_iterator;
3275
+ var createNonEnumerableProperty = createNonEnumerableProperty$4;
3276
+ var wellKnownSymbol = wellKnownSymbol$h;
3277
+
3278
+ var ITERATOR$1 = wellKnownSymbol('iterator');
3279
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
3280
+ var ArrayValues = ArrayIteratorMethods.values;
3281
+
3282
+ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
3283
+ if (CollectionPrototype) {
3284
+ // some Chrome versions have non-configurable methods on DOMTokenList
3285
+ if (CollectionPrototype[ITERATOR$1] !== ArrayValues) try {
3286
+ createNonEnumerableProperty(CollectionPrototype, ITERATOR$1, ArrayValues);
3287
+ } catch (error) {
3288
+ CollectionPrototype[ITERATOR$1] = ArrayValues;
3289
+ }
3290
+ if (!CollectionPrototype[TO_STRING_TAG]) {
3291
+ createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
3292
+ }
3293
+ if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
3294
+ // some Chrome versions have non-configurable methods on DOMTokenList
3295
+ if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
3296
+ createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
3297
+ } catch (error) {
3298
+ CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
3299
+ }
3300
+ }
3301
+ }
3302
+ };
3303
+
3304
+ for (var COLLECTION_NAME in DOMIterables) {
3305
+ handlePrototype(global$2[COLLECTION_NAME] && global$2[COLLECTION_NAME].prototype, COLLECTION_NAME);
3306
+ }
3307
+
3308
+ handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
3309
+
307
3310
  class ElementSeenObserver {
308
3311
  constructor(_options) {
309
3312
  this._options = _options;
@@ -362,7 +3365,8 @@ class Ninetailed {
362
3365
  onLog,
363
3366
  onError,
364
3367
  buildClientContext,
365
- componentViewTrackingThreshold = 2000
3368
+ componentViewTrackingThreshold = 2000,
3369
+ storage
366
3370
  } = {}) {
367
3371
  this.isInitialized = false;
368
3372
  this.page = (data, options) => __awaiter(this, void 0, void 0, function* () {
@@ -570,10 +3574,12 @@ class Ninetailed {
570
3574
  buildClientContext,
571
3575
  ninetailed: this
572
3576
  });
573
- this.instance = Analytics__default["default"]({
3577
+ this.instance = Analytics__default["default"](Object.assign({
574
3578
  app: 'ninetailed',
575
3579
  plugins: [...this.plugins, this.eventQueue]
576
- });
3580
+ }, storage ? {
3581
+ storage
3582
+ } : {}));
577
3583
  const detachOnReadyListener = this.instance.on('ready', () => {
578
3584
  this.isInitialized = true;
579
3585
  experience_jsShared.logger.info('Ninetailed Experience.js SDK is completely initialized.');
@@ -745,6 +3751,147 @@ const ElementSeenPayloadSchema = zod.z.object({
745
3751
  variantIndex: zod.z.number()
746
3752
  });
747
3753
 
3754
+ var aCallable = aCallable$8;
3755
+ var toObject = toObject$5;
3756
+ var IndexedObject = indexedObject;
3757
+ var lengthOfArrayLike = lengthOfArrayLike$5;
3758
+
3759
+ var $TypeError = TypeError;
3760
+
3761
+ // `Array.prototype.{ reduce, reduceRight }` methods implementation
3762
+ var createMethod$1 = function (IS_RIGHT) {
3763
+ return function (that, callbackfn, argumentsLength, memo) {
3764
+ aCallable(callbackfn);
3765
+ var O = toObject(that);
3766
+ var self = IndexedObject(O);
3767
+ var length = lengthOfArrayLike(O);
3768
+ var index = IS_RIGHT ? length - 1 : 0;
3769
+ var i = IS_RIGHT ? -1 : 1;
3770
+ if (argumentsLength < 2) while (true) {
3771
+ if (index in self) {
3772
+ memo = self[index];
3773
+ index += i;
3774
+ break;
3775
+ }
3776
+ index += i;
3777
+ if (IS_RIGHT ? index < 0 : length <= index) {
3778
+ throw $TypeError('Reduce of empty array with no initial value');
3779
+ }
3780
+ }
3781
+ for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
3782
+ memo = callbackfn(memo, self[index], index, O);
3783
+ }
3784
+ return memo;
3785
+ };
3786
+ };
3787
+
3788
+ var arrayReduce = {
3789
+ // `Array.prototype.reduce` method
3790
+ // https://tc39.es/ecma262/#sec-array.prototype.reduce
3791
+ left: createMethod$1(false),
3792
+ // `Array.prototype.reduceRight` method
3793
+ // https://tc39.es/ecma262/#sec-array.prototype.reduceright
3794
+ right: createMethod$1(true)
3795
+ };
3796
+
3797
+ var fails$1 = fails$h;
3798
+
3799
+ var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
3800
+ var method = [][METHOD_NAME];
3801
+ return !!method && fails$1(function () {
3802
+ // eslint-disable-next-line no-useless-call -- required for testing
3803
+ method.call(null, argument || function () { return 1; }, 1);
3804
+ });
3805
+ };
3806
+
3807
+ var $$1 = _export;
3808
+ var $reduce = arrayReduce.left;
3809
+ var arrayMethodIsStrict = arrayMethodIsStrict$1;
3810
+ var CHROME_VERSION = engineV8Version;
3811
+ var IS_NODE = engineIsNode;
3812
+
3813
+ var STRICT_METHOD = arrayMethodIsStrict('reduce');
3814
+ // Chrome 80-82 has a critical bug
3815
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
3816
+ var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
3817
+
3818
+ // `Array.prototype.reduce` method
3819
+ // https://tc39.es/ecma262/#sec-array.prototype.reduce
3820
+ $$1({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {
3821
+ reduce: function reduce(callbackfn /* , initialValue */) {
3822
+ var length = arguments.length;
3823
+ return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
3824
+ }
3825
+ });
3826
+
3827
+ // a string of all valid unicode whitespaces
3828
+ var whitespaces$2 = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' +
3829
+ '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF';
3830
+
3831
+ var uncurryThis$1 = functionUncurryThis;
3832
+ var requireObjectCoercible = requireObjectCoercible$4;
3833
+ var toString$1 = toString$3;
3834
+ var whitespaces$1 = whitespaces$2;
3835
+
3836
+ var replace = uncurryThis$1(''.replace);
3837
+ var whitespace = '[' + whitespaces$1 + ']';
3838
+ var ltrim = RegExp('^' + whitespace + whitespace + '*');
3839
+ var rtrim = RegExp(whitespace + whitespace + '*$');
3840
+
3841
+ // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
3842
+ var createMethod = function (TYPE) {
3843
+ return function ($this) {
3844
+ var string = toString$1(requireObjectCoercible($this));
3845
+ if (TYPE & 1) string = replace(string, ltrim, '');
3846
+ if (TYPE & 2) string = replace(string, rtrim, '');
3847
+ return string;
3848
+ };
3849
+ };
3850
+
3851
+ var stringTrim = {
3852
+ // `String.prototype.{ trimLeft, trimStart }` methods
3853
+ // https://tc39.es/ecma262/#sec-string.prototype.trimstart
3854
+ start: createMethod(1),
3855
+ // `String.prototype.{ trimRight, trimEnd }` methods
3856
+ // https://tc39.es/ecma262/#sec-string.prototype.trimend
3857
+ end: createMethod(2),
3858
+ // `String.prototype.trim` method
3859
+ // https://tc39.es/ecma262/#sec-string.prototype.trim
3860
+ trim: createMethod(3)
3861
+ };
3862
+
3863
+ var global$1 = global$k;
3864
+ var fails = fails$h;
3865
+ var uncurryThis = functionUncurryThis;
3866
+ var toString = toString$3;
3867
+ var trim = stringTrim.trim;
3868
+ var whitespaces = whitespaces$2;
3869
+
3870
+ var $parseInt$1 = global$1.parseInt;
3871
+ var Symbol$1 = global$1.Symbol;
3872
+ var ITERATOR = Symbol$1 && Symbol$1.iterator;
3873
+ var hex = /^[+-]?0x/i;
3874
+ var exec = uncurryThis(hex.exec);
3875
+ var FORCED = $parseInt$1(whitespaces + '08') !== 8 || $parseInt$1(whitespaces + '0x16') !== 22
3876
+ // MS Edge 18- broken with boxed symbols
3877
+ || (ITERATOR && !fails(function () { $parseInt$1(Object(ITERATOR)); }));
3878
+
3879
+ // `parseInt` method
3880
+ // https://tc39.es/ecma262/#sec-parseint-string-radix
3881
+ var numberParseInt = FORCED ? function parseInt(string, radix) {
3882
+ var S = trim(toString(string));
3883
+ return $parseInt$1(S, (radix >>> 0) || (exec(hex, S) ? 16 : 10));
3884
+ } : $parseInt$1;
3885
+
3886
+ var $ = _export;
3887
+ var $parseInt = numberParseInt;
3888
+
3889
+ // `parseInt` method
3890
+ // https://tc39.es/ecma262/#sec-parseint-string-radix
3891
+ $({ global: true, forced: parseInt != $parseInt }, {
3892
+ parseInt: $parseInt
3893
+ });
3894
+
748
3895
  const decodeExperienceVariantsMap = encodedExperienceVariantsMap => {
749
3896
  return encodedExperienceVariantsMap.split(',').map(experienceIdWithVariant => {
750
3897
  const [experienceId, _variantIndex] = experienceIdWithVariant.split('=');
@@ -860,40 +4007,40 @@ const makeExperienceSelectMiddleware = ({
860
4007
  };
861
4008
 
862
4009
  Object.defineProperty(exports, 'EXPERIENCE_TRAIT_PREFIX', {
863
- enumerable: true,
864
- get: function () { return experience_jsShared.EXPERIENCE_TRAIT_PREFIX; }
4010
+ enumerable: true,
4011
+ get: function () { return experience_jsShared.EXPERIENCE_TRAIT_PREFIX; }
865
4012
  });
866
4013
  Object.defineProperty(exports, 'isExperienceMatch', {
867
- enumerable: true,
868
- get: function () { return experience_jsShared.isExperienceMatch; }
4014
+ enumerable: true,
4015
+ get: function () { return experience_jsShared.isExperienceMatch; }
869
4016
  });
870
4017
  Object.defineProperty(exports, 'selectActiveExperiments', {
871
- enumerable: true,
872
- get: function () { return experience_jsShared.selectActiveExperiments; }
4018
+ enumerable: true,
4019
+ get: function () { return experience_jsShared.selectActiveExperiments; }
873
4020
  });
874
4021
  Object.defineProperty(exports, 'selectDistribution', {
875
- enumerable: true,
876
- get: function () { return experience_jsShared.selectDistribution; }
4022
+ enumerable: true,
4023
+ get: function () { return experience_jsShared.selectDistribution; }
877
4024
  });
878
4025
  Object.defineProperty(exports, 'selectExperience', {
879
- enumerable: true,
880
- get: function () { return experience_jsShared.selectExperience; }
4026
+ enumerable: true,
4027
+ get: function () { return experience_jsShared.selectExperience; }
881
4028
  });
882
4029
  Object.defineProperty(exports, 'selectExperienceBaselineWithVariants', {
883
- enumerable: true,
884
- get: function () { return experience_jsShared.selectBaselineWithVariants; }
4030
+ enumerable: true,
4031
+ get: function () { return experience_jsShared.selectBaselineWithVariants; }
885
4032
  });
886
4033
  Object.defineProperty(exports, 'selectExperienceVariant', {
887
- enumerable: true,
888
- get: function () { return experience_jsShared.selectVariant; }
4034
+ enumerable: true,
4035
+ get: function () { return experience_jsShared.selectVariant; }
889
4036
  });
890
4037
  Object.defineProperty(exports, 'selectExperienceVariants', {
891
- enumerable: true,
892
- get: function () { return experience_jsShared.selectVariants; }
4038
+ enumerable: true,
4039
+ get: function () { return experience_jsShared.selectVariants; }
893
4040
  });
894
4041
  Object.defineProperty(exports, 'selectHasExperienceVariants', {
895
- enumerable: true,
896
- get: function () { return experience_jsShared.selectHasVariants; }
4042
+ enumerable: true,
4043
+ get: function () { return experience_jsShared.selectHasVariants; }
897
4044
  });
898
4045
  exports.ANONYMOUS_ID = ANONYMOUS_ID;
899
4046
  exports.CONSENT = CONSENT;