@dereekb/browser 10.0.4 → 10.0.6

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.esm.js ADDED
@@ -0,0 +1,2813 @@
1
+ import { tapFirst, filterMaybe } from '@dereekb/rxjs';
2
+ import { BehaviorSubject, shareReplay, switchMap, from, firstValueFrom } from 'rxjs';
3
+
4
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
5
+
6
+ var check = function (it) {
7
+ return it && it.Math === Math && it;
8
+ };
9
+
10
+ // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
11
+ var global$l =
12
+ // eslint-disable-next-line es/no-global-this -- safe
13
+ check(typeof globalThis == 'object' && globalThis) ||
14
+ check(typeof window == 'object' && window) ||
15
+ // eslint-disable-next-line no-restricted-globals -- safe
16
+ check(typeof self == 'object' && self) ||
17
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
18
+ check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
19
+ // eslint-disable-next-line no-new-func -- fallback
20
+ (function () { return this; })() || Function('return this')();
21
+
22
+ var objectGetOwnPropertyDescriptor = {};
23
+
24
+ var fails$e = function (exec) {
25
+ try {
26
+ return !!exec();
27
+ } catch (error) {
28
+ return true;
29
+ }
30
+ };
31
+
32
+ var fails$d = fails$e;
33
+
34
+ // Detect IE8's incomplete defineProperty implementation
35
+ var descriptors = !fails$d(function () {
36
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
37
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
38
+ });
39
+
40
+ var fails$c = fails$e;
41
+
42
+ var functionBindNative = !fails$c(function () {
43
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
44
+ var test = (function () { /* empty */ }).bind();
45
+ // eslint-disable-next-line no-prototype-builtins -- safe
46
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
47
+ });
48
+
49
+ var NATIVE_BIND$3 = functionBindNative;
50
+
51
+ var call$e = Function.prototype.call;
52
+
53
+ var functionCall = NATIVE_BIND$3 ? call$e.bind(call$e) : function () {
54
+ return call$e.apply(call$e, arguments);
55
+ };
56
+
57
+ var objectPropertyIsEnumerable = {};
58
+
59
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
60
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
61
+ var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
62
+
63
+ // Nashorn ~ JDK8 bug
64
+ var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
65
+
66
+ // `Object.prototype.propertyIsEnumerable` method implementation
67
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
68
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
69
+ var descriptor = getOwnPropertyDescriptor$2(this, V);
70
+ return !!descriptor && descriptor.enumerable;
71
+ } : $propertyIsEnumerable;
72
+
73
+ var createPropertyDescriptor$2 = function (bitmap, value) {
74
+ return {
75
+ enumerable: !(bitmap & 1),
76
+ configurable: !(bitmap & 2),
77
+ writable: !(bitmap & 4),
78
+ value: value
79
+ };
80
+ };
81
+
82
+ var NATIVE_BIND$2 = functionBindNative;
83
+
84
+ var FunctionPrototype$2 = Function.prototype;
85
+ var call$d = FunctionPrototype$2.call;
86
+ var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$d, call$d);
87
+
88
+ var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
89
+ return function () {
90
+ return call$d.apply(fn, arguments);
91
+ };
92
+ };
93
+
94
+ var uncurryThis$f = functionUncurryThis;
95
+
96
+ var toString$4 = uncurryThis$f({}.toString);
97
+ var stringSlice$2 = uncurryThis$f(''.slice);
98
+
99
+ var classofRaw$2 = function (it) {
100
+ return stringSlice$2(toString$4(it), 8, -1);
101
+ };
102
+
103
+ var uncurryThis$e = functionUncurryThis;
104
+ var fails$b = fails$e;
105
+ var classof$6 = classofRaw$2;
106
+
107
+ var $Object$3 = Object;
108
+ var split = uncurryThis$e(''.split);
109
+
110
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
111
+ var indexedObject = fails$b(function () {
112
+ // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
113
+ // eslint-disable-next-line no-prototype-builtins -- safe
114
+ return !$Object$3('z').propertyIsEnumerable(0);
115
+ }) ? function (it) {
116
+ return classof$6(it) === 'String' ? split(it, '') : $Object$3(it);
117
+ } : $Object$3;
118
+
119
+ // we can't use just `it == null` since of `document.all` special case
120
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
121
+ var isNullOrUndefined$5 = function (it) {
122
+ return it === null || it === undefined;
123
+ };
124
+
125
+ var isNullOrUndefined$4 = isNullOrUndefined$5;
126
+
127
+ var $TypeError$d = TypeError;
128
+
129
+ // `RequireObjectCoercible` abstract operation
130
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
131
+ var requireObjectCoercible$3 = function (it) {
132
+ if (isNullOrUndefined$4(it)) throw new $TypeError$d("Can't call method on " + it);
133
+ return it;
134
+ };
135
+
136
+ // toObject with fallback for non-array-like ES3 strings
137
+ var IndexedObject = indexedObject;
138
+ var requireObjectCoercible$2 = requireObjectCoercible$3;
139
+
140
+ var toIndexedObject$4 = function (it) {
141
+ return IndexedObject(requireObjectCoercible$2(it));
142
+ };
143
+
144
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
145
+ var documentAll = typeof document == 'object' && document.all;
146
+
147
+ // `IsCallable` abstract operation
148
+ // https://tc39.es/ecma262/#sec-iscallable
149
+ // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
150
+ var isCallable$h = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
151
+ return typeof argument == 'function' || argument === documentAll;
152
+ } : function (argument) {
153
+ return typeof argument == 'function';
154
+ };
155
+
156
+ var isCallable$g = isCallable$h;
157
+
158
+ var isObject$8 = function (it) {
159
+ return typeof it == 'object' ? it !== null : isCallable$g(it);
160
+ };
161
+
162
+ var global$k = global$l;
163
+ var isCallable$f = isCallable$h;
164
+
165
+ var aFunction = function (argument) {
166
+ return isCallable$f(argument) ? argument : undefined;
167
+ };
168
+
169
+ var getBuiltIn$7 = function (namespace, method) {
170
+ return arguments.length < 2 ? aFunction(global$k[namespace]) : global$k[namespace] && global$k[namespace][method];
171
+ };
172
+
173
+ var uncurryThis$d = functionUncurryThis;
174
+
175
+ var objectIsPrototypeOf = uncurryThis$d({}.isPrototypeOf);
176
+
177
+ var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
178
+
179
+ var global$j = global$l;
180
+ var userAgent$3 = engineUserAgent;
181
+
182
+ var process$3 = global$j.process;
183
+ var Deno$1 = global$j.Deno;
184
+ var versions = process$3 && process$3.versions || Deno$1 && Deno$1.version;
185
+ var v8 = versions && versions.v8;
186
+ var match, version;
187
+
188
+ if (v8) {
189
+ match = v8.split('.');
190
+ // in old Chrome, versions of V8 isn't V8 = Chrome / 10
191
+ // but their correct versions are not interesting for us
192
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
193
+ }
194
+
195
+ // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
196
+ // so check `userAgent` even if `.v8` exists, but 0
197
+ if (!version && userAgent$3) {
198
+ match = userAgent$3.match(/Edge\/(\d+)/);
199
+ if (!match || match[1] >= 74) {
200
+ match = userAgent$3.match(/Chrome\/(\d+)/);
201
+ if (match) version = +match[1];
202
+ }
203
+ }
204
+
205
+ var engineV8Version = version;
206
+
207
+ /* eslint-disable es/no-symbol -- required for testing */
208
+ var V8_VERSION$1 = engineV8Version;
209
+ var fails$a = fails$e;
210
+ var global$i = global$l;
211
+
212
+ var $String$5 = global$i.String;
213
+
214
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
215
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$a(function () {
216
+ var symbol = Symbol('symbol detection');
217
+ // Chrome 38 Symbol has incorrect toString conversion
218
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
219
+ // nb: Do not call `String` directly to avoid this being optimized out to `symbol+''` which will,
220
+ // of course, fail.
221
+ return !$String$5(symbol) || !(Object(symbol) instanceof Symbol) ||
222
+ // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
223
+ !Symbol.sham && V8_VERSION$1 && V8_VERSION$1 < 41;
224
+ });
225
+
226
+ /* eslint-disable es/no-symbol -- required for testing */
227
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
228
+
229
+ var useSymbolAsUid = NATIVE_SYMBOL$1
230
+ && !Symbol.sham
231
+ && typeof Symbol.iterator == 'symbol';
232
+
233
+ var getBuiltIn$6 = getBuiltIn$7;
234
+ var isCallable$e = isCallable$h;
235
+ var isPrototypeOf$2 = objectIsPrototypeOf;
236
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
237
+
238
+ var $Object$2 = Object;
239
+
240
+ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
241
+ return typeof it == 'symbol';
242
+ } : function (it) {
243
+ var $Symbol = getBuiltIn$6('Symbol');
244
+ return isCallable$e($Symbol) && isPrototypeOf$2($Symbol.prototype, $Object$2(it));
245
+ };
246
+
247
+ var $String$4 = String;
248
+
249
+ var tryToString$4 = function (argument) {
250
+ try {
251
+ return $String$4(argument);
252
+ } catch (error) {
253
+ return 'Object';
254
+ }
255
+ };
256
+
257
+ var isCallable$d = isCallable$h;
258
+ var tryToString$3 = tryToString$4;
259
+
260
+ var $TypeError$c = TypeError;
261
+
262
+ // `Assert: IsCallable(argument) is true`
263
+ var aCallable$8 = function (argument) {
264
+ if (isCallable$d(argument)) return argument;
265
+ throw new $TypeError$c(tryToString$3(argument) + ' is not a function');
266
+ };
267
+
268
+ var aCallable$7 = aCallable$8;
269
+ var isNullOrUndefined$3 = isNullOrUndefined$5;
270
+
271
+ // `GetMethod` abstract operation
272
+ // https://tc39.es/ecma262/#sec-getmethod
273
+ var getMethod$4 = function (V, P) {
274
+ var func = V[P];
275
+ return isNullOrUndefined$3(func) ? undefined : aCallable$7(func);
276
+ };
277
+
278
+ var call$c = functionCall;
279
+ var isCallable$c = isCallable$h;
280
+ var isObject$7 = isObject$8;
281
+
282
+ var $TypeError$b = TypeError;
283
+
284
+ // `OrdinaryToPrimitive` abstract operation
285
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
286
+ var ordinaryToPrimitive$1 = function (input, pref) {
287
+ var fn, val;
288
+ if (pref === 'string' && isCallable$c(fn = input.toString) && !isObject$7(val = call$c(fn, input))) return val;
289
+ if (isCallable$c(fn = input.valueOf) && !isObject$7(val = call$c(fn, input))) return val;
290
+ if (pref !== 'string' && isCallable$c(fn = input.toString) && !isObject$7(val = call$c(fn, input))) return val;
291
+ throw new $TypeError$b("Can't convert object to primitive value");
292
+ };
293
+
294
+ var shared$4 = {exports: {}};
295
+
296
+ var global$h = global$l;
297
+
298
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
299
+ var defineProperty$3 = Object.defineProperty;
300
+
301
+ var defineGlobalProperty$3 = function (key, value) {
302
+ try {
303
+ defineProperty$3(global$h, key, { value: value, configurable: true, writable: true });
304
+ } catch (error) {
305
+ global$h[key] = value;
306
+ } return value;
307
+ };
308
+
309
+ var global$g = global$l;
310
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
311
+
312
+ var SHARED = '__core-js_shared__';
313
+ var store$3 = global$g[SHARED] || defineGlobalProperty$2(SHARED, {});
314
+
315
+ var sharedStore = store$3;
316
+
317
+ var store$2 = sharedStore;
318
+
319
+ (shared$4.exports = function (key, value) {
320
+ return store$2[key] || (store$2[key] = value !== undefined ? value : {});
321
+ })('versions', []).push({
322
+ version: '3.35.0',
323
+ mode: 'global',
324
+ copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
325
+ license: 'https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE',
326
+ source: 'https://github.com/zloirock/core-js'
327
+ });
328
+
329
+ var requireObjectCoercible$1 = requireObjectCoercible$3;
330
+
331
+ var $Object$1 = Object;
332
+
333
+ // `ToObject` abstract operation
334
+ // https://tc39.es/ecma262/#sec-toobject
335
+ var toObject$1 = function (argument) {
336
+ return $Object$1(requireObjectCoercible$1(argument));
337
+ };
338
+
339
+ var uncurryThis$c = functionUncurryThis;
340
+ var toObject = toObject$1;
341
+
342
+ var hasOwnProperty = uncurryThis$c({}.hasOwnProperty);
343
+
344
+ // `HasOwnProperty` abstract operation
345
+ // https://tc39.es/ecma262/#sec-hasownproperty
346
+ // eslint-disable-next-line es/no-object-hasown -- safe
347
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
348
+ return hasOwnProperty(toObject(it), key);
349
+ };
350
+
351
+ var uncurryThis$b = functionUncurryThis;
352
+
353
+ var id = 0;
354
+ var postfix = Math.random();
355
+ var toString$3 = uncurryThis$b(1.0.toString);
356
+
357
+ var uid$2 = function (key) {
358
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
359
+ };
360
+
361
+ var global$f = global$l;
362
+ var shared$3 = shared$4.exports;
363
+ var hasOwn$8 = hasOwnProperty_1;
364
+ var uid$1 = uid$2;
365
+ var NATIVE_SYMBOL = symbolConstructorDetection;
366
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
367
+
368
+ var Symbol$1 = global$f.Symbol;
369
+ var WellKnownSymbolsStore = shared$3('wks');
370
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
371
+
372
+ var wellKnownSymbol$b = function (name) {
373
+ if (!hasOwn$8(WellKnownSymbolsStore, name)) {
374
+ WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)
375
+ ? Symbol$1[name]
376
+ : createWellKnownSymbol('Symbol.' + name);
377
+ } return WellKnownSymbolsStore[name];
378
+ };
379
+
380
+ var call$b = functionCall;
381
+ var isObject$6 = isObject$8;
382
+ var isSymbol$1 = isSymbol$2;
383
+ var getMethod$3 = getMethod$4;
384
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
385
+ var wellKnownSymbol$a = wellKnownSymbol$b;
386
+
387
+ var $TypeError$a = TypeError;
388
+ var TO_PRIMITIVE = wellKnownSymbol$a('toPrimitive');
389
+
390
+ // `ToPrimitive` abstract operation
391
+ // https://tc39.es/ecma262/#sec-toprimitive
392
+ var toPrimitive$1 = function (input, pref) {
393
+ if (!isObject$6(input) || isSymbol$1(input)) return input;
394
+ var exoticToPrim = getMethod$3(input, TO_PRIMITIVE);
395
+ var result;
396
+ if (exoticToPrim) {
397
+ if (pref === undefined) pref = 'default';
398
+ result = call$b(exoticToPrim, input, pref);
399
+ if (!isObject$6(result) || isSymbol$1(result)) return result;
400
+ throw new $TypeError$a("Can't convert object to primitive value");
401
+ }
402
+ if (pref === undefined) pref = 'number';
403
+ return ordinaryToPrimitive(input, pref);
404
+ };
405
+
406
+ var toPrimitive = toPrimitive$1;
407
+ var isSymbol = isSymbol$2;
408
+
409
+ // `ToPropertyKey` abstract operation
410
+ // https://tc39.es/ecma262/#sec-topropertykey
411
+ var toPropertyKey$2 = function (argument) {
412
+ var key = toPrimitive(argument, 'string');
413
+ return isSymbol(key) ? key : key + '';
414
+ };
415
+
416
+ var global$e = global$l;
417
+ var isObject$5 = isObject$8;
418
+
419
+ var document$3 = global$e.document;
420
+ // typeof document.createElement is 'object' in old IE
421
+ var EXISTS$1 = isObject$5(document$3) && isObject$5(document$3.createElement);
422
+
423
+ var documentCreateElement$1 = function (it) {
424
+ return EXISTS$1 ? document$3.createElement(it) : {};
425
+ };
426
+
427
+ var DESCRIPTORS$9 = descriptors;
428
+ var fails$9 = fails$e;
429
+ var createElement$1 = documentCreateElement$1;
430
+
431
+ // Thanks to IE8 for its funny defineProperty
432
+ var ie8DomDefine = !DESCRIPTORS$9 && !fails$9(function () {
433
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
434
+ return Object.defineProperty(createElement$1('div'), 'a', {
435
+ get: function () { return 7; }
436
+ }).a !== 7;
437
+ });
438
+
439
+ var DESCRIPTORS$8 = descriptors;
440
+ var call$a = functionCall;
441
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
442
+ var createPropertyDescriptor$1 = createPropertyDescriptor$2;
443
+ var toIndexedObject$3 = toIndexedObject$4;
444
+ var toPropertyKey$1 = toPropertyKey$2;
445
+ var hasOwn$7 = hasOwnProperty_1;
446
+ var IE8_DOM_DEFINE$1 = ie8DomDefine;
447
+
448
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
449
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
450
+
451
+ // `Object.getOwnPropertyDescriptor` method
452
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
453
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
454
+ O = toIndexedObject$3(O);
455
+ P = toPropertyKey$1(P);
456
+ if (IE8_DOM_DEFINE$1) try {
457
+ return $getOwnPropertyDescriptor$1(O, P);
458
+ } catch (error) { /* empty */ }
459
+ if (hasOwn$7(O, P)) return createPropertyDescriptor$1(!call$a(propertyIsEnumerableModule.f, O, P), O[P]);
460
+ };
461
+
462
+ var objectDefineProperty = {};
463
+
464
+ var DESCRIPTORS$7 = descriptors;
465
+ var fails$8 = fails$e;
466
+
467
+ // V8 ~ Chrome 36-
468
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
469
+ var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$8(function () {
470
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
471
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
472
+ value: 42,
473
+ writable: false
474
+ }).prototype !== 42;
475
+ });
476
+
477
+ var isObject$4 = isObject$8;
478
+
479
+ var $String$3 = String;
480
+ var $TypeError$9 = TypeError;
481
+
482
+ // `Assert: Type(argument) is Object`
483
+ var anObject$d = function (argument) {
484
+ if (isObject$4(argument)) return argument;
485
+ throw new $TypeError$9($String$3(argument) + ' is not an object');
486
+ };
487
+
488
+ var DESCRIPTORS$6 = descriptors;
489
+ var IE8_DOM_DEFINE = ie8DomDefine;
490
+ var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
491
+ var anObject$c = anObject$d;
492
+ var toPropertyKey = toPropertyKey$2;
493
+
494
+ var $TypeError$8 = TypeError;
495
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
496
+ var $defineProperty = Object.defineProperty;
497
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
498
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
499
+ var ENUMERABLE = 'enumerable';
500
+ var CONFIGURABLE$1 = 'configurable';
501
+ var WRITABLE = 'writable';
502
+
503
+ // `Object.defineProperty` method
504
+ // https://tc39.es/ecma262/#sec-object.defineproperty
505
+ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
506
+ anObject$c(O);
507
+ P = toPropertyKey(P);
508
+ anObject$c(Attributes);
509
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
510
+ var current = $getOwnPropertyDescriptor(O, P);
511
+ if (current && current[WRITABLE]) {
512
+ O[P] = Attributes.value;
513
+ Attributes = {
514
+ configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
515
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
516
+ writable: false
517
+ };
518
+ }
519
+ } return $defineProperty(O, P, Attributes);
520
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
521
+ anObject$c(O);
522
+ P = toPropertyKey(P);
523
+ anObject$c(Attributes);
524
+ if (IE8_DOM_DEFINE) try {
525
+ return $defineProperty(O, P, Attributes);
526
+ } catch (error) { /* empty */ }
527
+ if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$8('Accessors not supported');
528
+ if ('value' in Attributes) O[P] = Attributes.value;
529
+ return O;
530
+ };
531
+
532
+ var DESCRIPTORS$5 = descriptors;
533
+ var definePropertyModule$3 = objectDefineProperty;
534
+ var createPropertyDescriptor = createPropertyDescriptor$2;
535
+
536
+ var createNonEnumerableProperty$3 = DESCRIPTORS$5 ? function (object, key, value) {
537
+ return definePropertyModule$3.f(object, key, createPropertyDescriptor(1, value));
538
+ } : function (object, key, value) {
539
+ object[key] = value;
540
+ return object;
541
+ };
542
+
543
+ var makeBuiltIn$3 = {exports: {}};
544
+
545
+ var DESCRIPTORS$4 = descriptors;
546
+ var hasOwn$6 = hasOwnProperty_1;
547
+
548
+ var FunctionPrototype$1 = Function.prototype;
549
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
550
+ var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
551
+
552
+ var EXISTS = hasOwn$6(FunctionPrototype$1, 'name');
553
+ // additional protection from minified / mangled / dropped function names
554
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
555
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype$1, 'name').configurable));
556
+
557
+ var functionName = {
558
+ EXISTS: EXISTS,
559
+ PROPER: PROPER,
560
+ CONFIGURABLE: CONFIGURABLE
561
+ };
562
+
563
+ var uncurryThis$a = functionUncurryThis;
564
+ var isCallable$b = isCallable$h;
565
+ var store$1 = sharedStore;
566
+
567
+ var functionToString = uncurryThis$a(Function.toString);
568
+
569
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
570
+ if (!isCallable$b(store$1.inspectSource)) {
571
+ store$1.inspectSource = function (it) {
572
+ return functionToString(it);
573
+ };
574
+ }
575
+
576
+ var inspectSource$3 = store$1.inspectSource;
577
+
578
+ var global$d = global$l;
579
+ var isCallable$a = isCallable$h;
580
+
581
+ var WeakMap$1 = global$d.WeakMap;
582
+
583
+ var weakMapBasicDetection = isCallable$a(WeakMap$1) && /native code/.test(String(WeakMap$1));
584
+
585
+ var shared$2 = shared$4.exports;
586
+ var uid = uid$2;
587
+
588
+ var keys = shared$2('keys');
589
+
590
+ var sharedKey$2 = function (key) {
591
+ return keys[key] || (keys[key] = uid(key));
592
+ };
593
+
594
+ var hiddenKeys$4 = {};
595
+
596
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
597
+ var global$c = global$l;
598
+ var isObject$3 = isObject$8;
599
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$3;
600
+ var hasOwn$5 = hasOwnProperty_1;
601
+ var shared$1 = sharedStore;
602
+ var sharedKey$1 = sharedKey$2;
603
+ var hiddenKeys$3 = hiddenKeys$4;
604
+
605
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
606
+ var TypeError$2 = global$c.TypeError;
607
+ var WeakMap = global$c.WeakMap;
608
+ var set$1, get, has;
609
+
610
+ var enforce = function (it) {
611
+ return has(it) ? get(it) : set$1(it, {});
612
+ };
613
+
614
+ var getterFor = function (TYPE) {
615
+ return function (it) {
616
+ var state;
617
+ if (!isObject$3(it) || (state = get(it)).type !== TYPE) {
618
+ throw new TypeError$2('Incompatible receiver, ' + TYPE + ' required');
619
+ } return state;
620
+ };
621
+ };
622
+
623
+ if (NATIVE_WEAK_MAP || shared$1.state) {
624
+ var store = shared$1.state || (shared$1.state = new WeakMap());
625
+ /* eslint-disable no-self-assign -- prototype methods protection */
626
+ store.get = store.get;
627
+ store.has = store.has;
628
+ store.set = store.set;
629
+ /* eslint-enable no-self-assign -- prototype methods protection */
630
+ set$1 = function (it, metadata) {
631
+ if (store.has(it)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
632
+ metadata.facade = it;
633
+ store.set(it, metadata);
634
+ return metadata;
635
+ };
636
+ get = function (it) {
637
+ return store.get(it) || {};
638
+ };
639
+ has = function (it) {
640
+ return store.has(it);
641
+ };
642
+ } else {
643
+ var STATE = sharedKey$1('state');
644
+ hiddenKeys$3[STATE] = true;
645
+ set$1 = function (it, metadata) {
646
+ if (hasOwn$5(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
647
+ metadata.facade = it;
648
+ createNonEnumerableProperty$2(it, STATE, metadata);
649
+ return metadata;
650
+ };
651
+ get = function (it) {
652
+ return hasOwn$5(it, STATE) ? it[STATE] : {};
653
+ };
654
+ has = function (it) {
655
+ return hasOwn$5(it, STATE);
656
+ };
657
+ }
658
+
659
+ var internalState = {
660
+ set: set$1,
661
+ get: get,
662
+ has: has,
663
+ enforce: enforce,
664
+ getterFor: getterFor
665
+ };
666
+
667
+ var uncurryThis$9 = functionUncurryThis;
668
+ var fails$7 = fails$e;
669
+ var isCallable$9 = isCallable$h;
670
+ var hasOwn$4 = hasOwnProperty_1;
671
+ var DESCRIPTORS$3 = descriptors;
672
+ var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
673
+ var inspectSource$2 = inspectSource$3;
674
+ var InternalStateModule$1 = internalState;
675
+
676
+ var enforceInternalState = InternalStateModule$1.enforce;
677
+ var getInternalState$1 = InternalStateModule$1.get;
678
+ var $String$2 = String;
679
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
680
+ var defineProperty$2 = Object.defineProperty;
681
+ var stringSlice$1 = uncurryThis$9(''.slice);
682
+ var replace$1 = uncurryThis$9(''.replace);
683
+ var join = uncurryThis$9([].join);
684
+
685
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$7(function () {
686
+ return defineProperty$2(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
687
+ });
688
+
689
+ var TEMPLATE = String(String).split('String');
690
+
691
+ var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
692
+ if (stringSlice$1($String$2(name), 0, 7) === 'Symbol(') {
693
+ name = '[' + replace$1($String$2(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
694
+ }
695
+ if (options && options.getter) name = 'get ' + name;
696
+ if (options && options.setter) name = 'set ' + name;
697
+ if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
698
+ if (DESCRIPTORS$3) defineProperty$2(value, 'name', { value: name, configurable: true });
699
+ else value.name = name;
700
+ }
701
+ if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
702
+ defineProperty$2(value, 'length', { value: options.arity });
703
+ }
704
+ try {
705
+ if (options && hasOwn$4(options, 'constructor') && options.constructor) {
706
+ if (DESCRIPTORS$3) defineProperty$2(value, 'prototype', { writable: false });
707
+ // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
708
+ } else if (value.prototype) value.prototype = undefined;
709
+ } catch (error) { /* empty */ }
710
+ var state = enforceInternalState(value);
711
+ if (!hasOwn$4(state, 'source')) {
712
+ state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
713
+ } return value;
714
+ };
715
+
716
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
717
+ // eslint-disable-next-line no-extend-native -- required
718
+ Function.prototype.toString = makeBuiltIn$2(function toString() {
719
+ return isCallable$9(this) && getInternalState$1(this).source || inspectSource$2(this);
720
+ }, 'toString');
721
+
722
+ var isCallable$8 = isCallable$h;
723
+ var definePropertyModule$2 = objectDefineProperty;
724
+ var makeBuiltIn$1 = makeBuiltIn$3.exports;
725
+ var defineGlobalProperty$1 = defineGlobalProperty$3;
726
+
727
+ var defineBuiltIn$4 = function (O, key, value, options) {
728
+ if (!options) options = {};
729
+ var simple = options.enumerable;
730
+ var name = options.name !== undefined ? options.name : key;
731
+ if (isCallable$8(value)) makeBuiltIn$1(value, name, options);
732
+ if (options.global) {
733
+ if (simple) O[key] = value;
734
+ else defineGlobalProperty$1(key, value);
735
+ } else {
736
+ try {
737
+ if (!options.unsafe) delete O[key];
738
+ else if (O[key]) simple = true;
739
+ } catch (error) { /* empty */ }
740
+ if (simple) O[key] = value;
741
+ else definePropertyModule$2.f(O, key, {
742
+ value: value,
743
+ enumerable: false,
744
+ configurable: !options.nonConfigurable,
745
+ writable: !options.nonWritable
746
+ });
747
+ } return O;
748
+ };
749
+
750
+ var objectGetOwnPropertyNames = {};
751
+
752
+ var ceil = Math.ceil;
753
+ var floor = Math.floor;
754
+
755
+ // `Math.trunc` method
756
+ // https://tc39.es/ecma262/#sec-math.trunc
757
+ // eslint-disable-next-line es/no-math-trunc -- safe
758
+ var mathTrunc = Math.trunc || function trunc(x) {
759
+ var n = +x;
760
+ return (n > 0 ? floor : ceil)(n);
761
+ };
762
+
763
+ var trunc = mathTrunc;
764
+
765
+ // `ToIntegerOrInfinity` abstract operation
766
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
767
+ var toIntegerOrInfinity$2 = function (argument) {
768
+ var number = +argument;
769
+ // eslint-disable-next-line no-self-compare -- NaN check
770
+ return number !== number || number === 0 ? 0 : trunc(number);
771
+ };
772
+
773
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
774
+
775
+ var max = Math.max;
776
+ var min$1 = Math.min;
777
+
778
+ // Helper for a popular repeating case of the spec:
779
+ // Let integer be ? ToInteger(index).
780
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
781
+ var toAbsoluteIndex$1 = function (index, length) {
782
+ var integer = toIntegerOrInfinity$1(index);
783
+ return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
784
+ };
785
+
786
+ var toIntegerOrInfinity = toIntegerOrInfinity$2;
787
+
788
+ var min = Math.min;
789
+
790
+ // `ToLength` abstract operation
791
+ // https://tc39.es/ecma262/#sec-tolength
792
+ var toLength$1 = function (argument) {
793
+ return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
794
+ };
795
+
796
+ var toLength = toLength$1;
797
+
798
+ // `LengthOfArrayLike` abstract operation
799
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
800
+ var lengthOfArrayLike$2 = function (obj) {
801
+ return toLength(obj.length);
802
+ };
803
+
804
+ var toIndexedObject$2 = toIndexedObject$4;
805
+ var toAbsoluteIndex = toAbsoluteIndex$1;
806
+ var lengthOfArrayLike$1 = lengthOfArrayLike$2;
807
+
808
+ // `Array.prototype.{ indexOf, includes }` methods implementation
809
+ var createMethod = function (IS_INCLUDES) {
810
+ return function ($this, el, fromIndex) {
811
+ var O = toIndexedObject$2($this);
812
+ var length = lengthOfArrayLike$1(O);
813
+ var index = toAbsoluteIndex(fromIndex, length);
814
+ var value;
815
+ // Array#includes uses SameValueZero equality algorithm
816
+ // eslint-disable-next-line no-self-compare -- NaN check
817
+ if (IS_INCLUDES && el !== el) while (length > index) {
818
+ value = O[index++];
819
+ // eslint-disable-next-line no-self-compare -- NaN check
820
+ if (value !== value) return true;
821
+ // Array#indexOf ignores holes, Array#includes - not
822
+ } else for (;length > index; index++) {
823
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
824
+ } return !IS_INCLUDES && -1;
825
+ };
826
+ };
827
+
828
+ var arrayIncludes = {
829
+ // `Array.prototype.includes` method
830
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
831
+ includes: createMethod(true),
832
+ // `Array.prototype.indexOf` method
833
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
834
+ indexOf: createMethod(false)
835
+ };
836
+
837
+ var uncurryThis$8 = functionUncurryThis;
838
+ var hasOwn$3 = hasOwnProperty_1;
839
+ var toIndexedObject$1 = toIndexedObject$4;
840
+ var indexOf$1 = arrayIncludes.indexOf;
841
+ var hiddenKeys$2 = hiddenKeys$4;
842
+
843
+ var push = uncurryThis$8([].push);
844
+
845
+ var objectKeysInternal = function (object, names) {
846
+ var O = toIndexedObject$1(object);
847
+ var i = 0;
848
+ var result = [];
849
+ var key;
850
+ for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push(result, key);
851
+ // Don't enum bug & hidden keys
852
+ while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
853
+ ~indexOf$1(result, key) || push(result, key);
854
+ }
855
+ return result;
856
+ };
857
+
858
+ // IE8- don't enum bug keys
859
+ var enumBugKeys$3 = [
860
+ 'constructor',
861
+ 'hasOwnProperty',
862
+ 'isPrototypeOf',
863
+ 'propertyIsEnumerable',
864
+ 'toLocaleString',
865
+ 'toString',
866
+ 'valueOf'
867
+ ];
868
+
869
+ var internalObjectKeys$1 = objectKeysInternal;
870
+ var enumBugKeys$2 = enumBugKeys$3;
871
+
872
+ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
873
+
874
+ // `Object.getOwnPropertyNames` method
875
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
876
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
877
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
878
+ return internalObjectKeys$1(O, hiddenKeys$1);
879
+ };
880
+
881
+ var objectGetOwnPropertySymbols = {};
882
+
883
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
884
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
885
+
886
+ var getBuiltIn$5 = getBuiltIn$7;
887
+ var uncurryThis$7 = functionUncurryThis;
888
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
889
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
890
+ var anObject$b = anObject$d;
891
+
892
+ var concat = uncurryThis$7([].concat);
893
+
894
+ // all object keys, includes non-enumerable and symbols
895
+ var ownKeys$1 = getBuiltIn$5('Reflect', 'ownKeys') || function ownKeys(it) {
896
+ var keys = getOwnPropertyNamesModule.f(anObject$b(it));
897
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
898
+ return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
899
+ };
900
+
901
+ var hasOwn$2 = hasOwnProperty_1;
902
+ var ownKeys = ownKeys$1;
903
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
904
+ var definePropertyModule$1 = objectDefineProperty;
905
+
906
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
907
+ var keys = ownKeys(source);
908
+ var defineProperty = definePropertyModule$1.f;
909
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
910
+ for (var i = 0; i < keys.length; i++) {
911
+ var key = keys[i];
912
+ if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
913
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
914
+ }
915
+ }
916
+ };
917
+
918
+ var fails$6 = fails$e;
919
+ var isCallable$7 = isCallable$h;
920
+
921
+ var replacement = /#|\.prototype\./;
922
+
923
+ var isForced$2 = function (feature, detection) {
924
+ var value = data[normalize(feature)];
925
+ return value === POLYFILL ? true
926
+ : value === NATIVE ? false
927
+ : isCallable$7(detection) ? fails$6(detection)
928
+ : !!detection;
929
+ };
930
+
931
+ var normalize = isForced$2.normalize = function (string) {
932
+ return String(string).replace(replacement, '.').toLowerCase();
933
+ };
934
+
935
+ var data = isForced$2.data = {};
936
+ var NATIVE = isForced$2.NATIVE = 'N';
937
+ var POLYFILL = isForced$2.POLYFILL = 'P';
938
+
939
+ var isForced_1 = isForced$2;
940
+
941
+ var global$b = global$l;
942
+ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
943
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$3;
944
+ var defineBuiltIn$3 = defineBuiltIn$4;
945
+ var defineGlobalProperty = defineGlobalProperty$3;
946
+ var copyConstructorProperties = copyConstructorProperties$1;
947
+ var isForced$1 = isForced_1;
948
+
949
+ /*
950
+ options.target - name of the target object
951
+ options.global - target is the global object
952
+ options.stat - export as static methods of target
953
+ options.proto - export as prototype methods of target
954
+ options.real - real prototype method for the `pure` version
955
+ options.forced - export even if the native feature is available
956
+ options.bind - bind methods to the target, required for the `pure` version
957
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
958
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
959
+ options.sham - add a flag to not completely full polyfills
960
+ options.enumerable - export as enumerable property
961
+ options.dontCallGetSet - prevent calling a getter on target
962
+ options.name - the .name of the function if it does not match the key
963
+ */
964
+ var _export = function (options, source) {
965
+ var TARGET = options.target;
966
+ var GLOBAL = options.global;
967
+ var STATIC = options.stat;
968
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
969
+ if (GLOBAL) {
970
+ target = global$b;
971
+ } else if (STATIC) {
972
+ target = global$b[TARGET] || defineGlobalProperty(TARGET, {});
973
+ } else {
974
+ target = (global$b[TARGET] || {}).prototype;
975
+ }
976
+ if (target) for (key in source) {
977
+ sourceProperty = source[key];
978
+ if (options.dontCallGetSet) {
979
+ descriptor = getOwnPropertyDescriptor$1(target, key);
980
+ targetProperty = descriptor && descriptor.value;
981
+ } else targetProperty = target[key];
982
+ FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
983
+ // contained in target
984
+ if (!FORCED && targetProperty !== undefined) {
985
+ if (typeof sourceProperty == typeof targetProperty) continue;
986
+ copyConstructorProperties(sourceProperty, targetProperty);
987
+ }
988
+ // add a flag to not completely full polyfills
989
+ if (options.sham || (targetProperty && targetProperty.sham)) {
990
+ createNonEnumerableProperty$1(sourceProperty, 'sham', true);
991
+ }
992
+ defineBuiltIn$3(target, key, sourceProperty, options);
993
+ }
994
+ };
995
+
996
+ var global$a = global$l;
997
+ var classof$5 = classofRaw$2;
998
+
999
+ var engineIsNode = classof$5(global$a.process) === 'process';
1000
+
1001
+ var uncurryThis$6 = functionUncurryThis;
1002
+ var aCallable$6 = aCallable$8;
1003
+
1004
+ var functionUncurryThisAccessor = function (object, key, method) {
1005
+ try {
1006
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1007
+ return uncurryThis$6(aCallable$6(Object.getOwnPropertyDescriptor(object, key)[method]));
1008
+ } catch (error) { /* empty */ }
1009
+ };
1010
+
1011
+ var isObject$2 = isObject$8;
1012
+
1013
+ var isPossiblePrototype$1 = function (argument) {
1014
+ return isObject$2(argument) || argument === null;
1015
+ };
1016
+
1017
+ var isPossiblePrototype = isPossiblePrototype$1;
1018
+
1019
+ var $String$1 = String;
1020
+ var $TypeError$7 = TypeError;
1021
+
1022
+ var aPossiblePrototype$1 = function (argument) {
1023
+ if (isPossiblePrototype(argument)) return argument;
1024
+ throw new $TypeError$7("Can't set " + $String$1(argument) + ' as a prototype');
1025
+ };
1026
+
1027
+ /* eslint-disable no-proto -- safe */
1028
+ var uncurryThisAccessor = functionUncurryThisAccessor;
1029
+ var anObject$a = anObject$d;
1030
+ var aPossiblePrototype = aPossiblePrototype$1;
1031
+
1032
+ // `Object.setPrototypeOf` method
1033
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
1034
+ // Works with __proto__ only. Old v8 can't work with null proto objects.
1035
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
1036
+ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1037
+ var CORRECT_SETTER = false;
1038
+ var test = {};
1039
+ var setter;
1040
+ try {
1041
+ setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
1042
+ setter(test, []);
1043
+ CORRECT_SETTER = test instanceof Array;
1044
+ } catch (error) { /* empty */ }
1045
+ return function setPrototypeOf(O, proto) {
1046
+ anObject$a(O);
1047
+ aPossiblePrototype(proto);
1048
+ if (CORRECT_SETTER) setter(O, proto);
1049
+ else O.__proto__ = proto;
1050
+ return O;
1051
+ };
1052
+ }() : undefined);
1053
+
1054
+ var defineProperty$1 = objectDefineProperty.f;
1055
+ var hasOwn$1 = hasOwnProperty_1;
1056
+ var wellKnownSymbol$9 = wellKnownSymbol$b;
1057
+
1058
+ var TO_STRING_TAG$2 = wellKnownSymbol$9('toStringTag');
1059
+
1060
+ var setToStringTag$1 = function (target, TAG, STATIC) {
1061
+ if (target && !STATIC) target = target.prototype;
1062
+ if (target && !hasOwn$1(target, TO_STRING_TAG$2)) {
1063
+ defineProperty$1(target, TO_STRING_TAG$2, { configurable: true, value: TAG });
1064
+ }
1065
+ };
1066
+
1067
+ var makeBuiltIn = makeBuiltIn$3.exports;
1068
+ var defineProperty = objectDefineProperty;
1069
+
1070
+ var defineBuiltInAccessor$1 = function (target, name, descriptor) {
1071
+ if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
1072
+ if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
1073
+ return defineProperty.f(target, name, descriptor);
1074
+ };
1075
+
1076
+ var getBuiltIn$4 = getBuiltIn$7;
1077
+ var defineBuiltInAccessor = defineBuiltInAccessor$1;
1078
+ var wellKnownSymbol$8 = wellKnownSymbol$b;
1079
+ var DESCRIPTORS$2 = descriptors;
1080
+
1081
+ var SPECIES$3 = wellKnownSymbol$8('species');
1082
+
1083
+ var setSpecies$1 = function (CONSTRUCTOR_NAME) {
1084
+ var Constructor = getBuiltIn$4(CONSTRUCTOR_NAME);
1085
+
1086
+ if (DESCRIPTORS$2 && Constructor && !Constructor[SPECIES$3]) {
1087
+ defineBuiltInAccessor(Constructor, SPECIES$3, {
1088
+ configurable: true,
1089
+ get: function () { return this; }
1090
+ });
1091
+ }
1092
+ };
1093
+
1094
+ var isPrototypeOf$1 = objectIsPrototypeOf;
1095
+
1096
+ var $TypeError$6 = TypeError;
1097
+
1098
+ var anInstance$1 = function (it, Prototype) {
1099
+ if (isPrototypeOf$1(Prototype, it)) return it;
1100
+ throw new $TypeError$6('Incorrect invocation');
1101
+ };
1102
+
1103
+ var wellKnownSymbol$7 = wellKnownSymbol$b;
1104
+
1105
+ var TO_STRING_TAG$1 = wellKnownSymbol$7('toStringTag');
1106
+ var test = {};
1107
+
1108
+ test[TO_STRING_TAG$1] = 'z';
1109
+
1110
+ var toStringTagSupport = String(test) === '[object z]';
1111
+
1112
+ var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1113
+ var isCallable$6 = isCallable$h;
1114
+ var classofRaw$1 = classofRaw$2;
1115
+ var wellKnownSymbol$6 = wellKnownSymbol$b;
1116
+
1117
+ var TO_STRING_TAG = wellKnownSymbol$6('toStringTag');
1118
+ var $Object = Object;
1119
+
1120
+ // ES3 wrong here
1121
+ var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) === 'Arguments';
1122
+
1123
+ // fallback for IE11 Script Access Denied error
1124
+ var tryGet = function (it, key) {
1125
+ try {
1126
+ return it[key];
1127
+ } catch (error) { /* empty */ }
1128
+ };
1129
+
1130
+ // getting tag from ES6+ `Object.prototype.toString`
1131
+ var classof$4 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1132
+ var O, tag, result;
1133
+ return it === undefined ? 'Undefined' : it === null ? 'Null'
1134
+ // @@toStringTag case
1135
+ : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1136
+ // builtinTag case
1137
+ : CORRECT_ARGUMENTS ? classofRaw$1(O)
1138
+ // ES3 arguments fallback
1139
+ : (result = classofRaw$1(O)) === 'Object' && isCallable$6(O.callee) ? 'Arguments' : result;
1140
+ };
1141
+
1142
+ var uncurryThis$5 = functionUncurryThis;
1143
+ var fails$5 = fails$e;
1144
+ var isCallable$5 = isCallable$h;
1145
+ var classof$3 = classof$4;
1146
+ var getBuiltIn$3 = getBuiltIn$7;
1147
+ var inspectSource$1 = inspectSource$3;
1148
+
1149
+ var noop = function () { /* empty */ };
1150
+ var empty = [];
1151
+ var construct = getBuiltIn$3('Reflect', 'construct');
1152
+ var constructorRegExp = /^\s*(?:class|function)\b/;
1153
+ var exec$1 = uncurryThis$5(constructorRegExp.exec);
1154
+ var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
1155
+
1156
+ var isConstructorModern = function isConstructor(argument) {
1157
+ if (!isCallable$5(argument)) return false;
1158
+ try {
1159
+ construct(noop, empty, argument);
1160
+ return true;
1161
+ } catch (error) {
1162
+ return false;
1163
+ }
1164
+ };
1165
+
1166
+ var isConstructorLegacy = function isConstructor(argument) {
1167
+ if (!isCallable$5(argument)) return false;
1168
+ switch (classof$3(argument)) {
1169
+ case 'AsyncFunction':
1170
+ case 'GeneratorFunction':
1171
+ case 'AsyncGeneratorFunction': return false;
1172
+ }
1173
+ try {
1174
+ // we can't check .prototype since constructors produced by .bind haven't it
1175
+ // `Function#toString` throws on some built-it function in some legacy engines
1176
+ // (for example, `DOMQuad` and similar in FF41-)
1177
+ return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource$1(argument));
1178
+ } catch (error) {
1179
+ return true;
1180
+ }
1181
+ };
1182
+
1183
+ isConstructorLegacy.sham = true;
1184
+
1185
+ // `IsConstructor` abstract operation
1186
+ // https://tc39.es/ecma262/#sec-isconstructor
1187
+ var isConstructor$1 = !construct || fails$5(function () {
1188
+ var called;
1189
+ return isConstructorModern(isConstructorModern.call)
1190
+ || !isConstructorModern(Object)
1191
+ || !isConstructorModern(function () { called = true; })
1192
+ || called;
1193
+ }) ? isConstructorLegacy : isConstructorModern;
1194
+
1195
+ var isConstructor = isConstructor$1;
1196
+ var tryToString$2 = tryToString$4;
1197
+
1198
+ var $TypeError$5 = TypeError;
1199
+
1200
+ // `Assert: IsConstructor(argument) is true`
1201
+ var aConstructor$1 = function (argument) {
1202
+ if (isConstructor(argument)) return argument;
1203
+ throw new $TypeError$5(tryToString$2(argument) + ' is not a constructor');
1204
+ };
1205
+
1206
+ var anObject$9 = anObject$d;
1207
+ var aConstructor = aConstructor$1;
1208
+ var isNullOrUndefined$2 = isNullOrUndefined$5;
1209
+ var wellKnownSymbol$5 = wellKnownSymbol$b;
1210
+
1211
+ var SPECIES$2 = wellKnownSymbol$5('species');
1212
+
1213
+ // `SpeciesConstructor` abstract operation
1214
+ // https://tc39.es/ecma262/#sec-speciesconstructor
1215
+ var speciesConstructor$1 = function (O, defaultConstructor) {
1216
+ var C = anObject$9(O).constructor;
1217
+ var S;
1218
+ return C === undefined || isNullOrUndefined$2(S = anObject$9(C)[SPECIES$2]) ? defaultConstructor : aConstructor(S);
1219
+ };
1220
+
1221
+ var NATIVE_BIND$1 = functionBindNative;
1222
+
1223
+ var FunctionPrototype = Function.prototype;
1224
+ var apply$1 = FunctionPrototype.apply;
1225
+ var call$9 = FunctionPrototype.call;
1226
+
1227
+ // eslint-disable-next-line es/no-reflect -- safe
1228
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$9.bind(apply$1) : function () {
1229
+ return call$9.apply(apply$1, arguments);
1230
+ });
1231
+
1232
+ var classofRaw = classofRaw$2;
1233
+ var uncurryThis$4 = functionUncurryThis;
1234
+
1235
+ var functionUncurryThisClause = function (fn) {
1236
+ // Nashorn bug:
1237
+ // https://github.com/zloirock/core-js/issues/1128
1238
+ // https://github.com/zloirock/core-js/issues/1130
1239
+ if (classofRaw(fn) === 'Function') return uncurryThis$4(fn);
1240
+ };
1241
+
1242
+ var uncurryThis$3 = functionUncurryThisClause;
1243
+ var aCallable$5 = aCallable$8;
1244
+ var NATIVE_BIND = functionBindNative;
1245
+
1246
+ var bind$4 = uncurryThis$3(uncurryThis$3.bind);
1247
+
1248
+ // optional / simple context binding
1249
+ var functionBindContext = function (fn, that) {
1250
+ aCallable$5(fn);
1251
+ return that === undefined ? fn : NATIVE_BIND ? bind$4(fn, that) : function (/* ...args */) {
1252
+ return fn.apply(that, arguments);
1253
+ };
1254
+ };
1255
+
1256
+ var getBuiltIn$2 = getBuiltIn$7;
1257
+
1258
+ var html$2 = getBuiltIn$2('document', 'documentElement');
1259
+
1260
+ var uncurryThis$2 = functionUncurryThis;
1261
+
1262
+ var arraySlice$1 = uncurryThis$2([].slice);
1263
+
1264
+ var $TypeError$4 = TypeError;
1265
+
1266
+ var validateArgumentsLength$1 = function (passed, required) {
1267
+ if (passed < required) throw new $TypeError$4('Not enough arguments');
1268
+ return passed;
1269
+ };
1270
+
1271
+ var userAgent$2 = engineUserAgent;
1272
+
1273
+ // eslint-disable-next-line redos/no-vulnerable -- safe
1274
+ var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
1275
+
1276
+ var global$9 = global$l;
1277
+ var apply = functionApply;
1278
+ var bind$3 = functionBindContext;
1279
+ var isCallable$4 = isCallable$h;
1280
+ var hasOwn = hasOwnProperty_1;
1281
+ var fails$4 = fails$e;
1282
+ var html$1 = html$2;
1283
+ var arraySlice = arraySlice$1;
1284
+ var createElement = documentCreateElement$1;
1285
+ var validateArgumentsLength = validateArgumentsLength$1;
1286
+ var IS_IOS$1 = engineIsIos;
1287
+ var IS_NODE$3 = engineIsNode;
1288
+
1289
+ var set = global$9.setImmediate;
1290
+ var clear = global$9.clearImmediate;
1291
+ var process$2 = global$9.process;
1292
+ var Dispatch = global$9.Dispatch;
1293
+ var Function$1 = global$9.Function;
1294
+ var MessageChannel = global$9.MessageChannel;
1295
+ var String$1 = global$9.String;
1296
+ var counter = 0;
1297
+ var queue$2 = {};
1298
+ var ONREADYSTATECHANGE = 'onreadystatechange';
1299
+ var $location, defer, channel, port;
1300
+
1301
+ fails$4(function () {
1302
+ // Deno throws a ReferenceError on `location` access without `--location` flag
1303
+ $location = global$9.location;
1304
+ });
1305
+
1306
+ var run = function (id) {
1307
+ if (hasOwn(queue$2, id)) {
1308
+ var fn = queue$2[id];
1309
+ delete queue$2[id];
1310
+ fn();
1311
+ }
1312
+ };
1313
+
1314
+ var runner = function (id) {
1315
+ return function () {
1316
+ run(id);
1317
+ };
1318
+ };
1319
+
1320
+ var eventListener = function (event) {
1321
+ run(event.data);
1322
+ };
1323
+
1324
+ var globalPostMessageDefer = function (id) {
1325
+ // old engines have not location.origin
1326
+ global$9.postMessage(String$1(id), $location.protocol + '//' + $location.host);
1327
+ };
1328
+
1329
+ // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
1330
+ if (!set || !clear) {
1331
+ set = function setImmediate(handler) {
1332
+ validateArgumentsLength(arguments.length, 1);
1333
+ var fn = isCallable$4(handler) ? handler : Function$1(handler);
1334
+ var args = arraySlice(arguments, 1);
1335
+ queue$2[++counter] = function () {
1336
+ apply(fn, undefined, args);
1337
+ };
1338
+ defer(counter);
1339
+ return counter;
1340
+ };
1341
+ clear = function clearImmediate(id) {
1342
+ delete queue$2[id];
1343
+ };
1344
+ // Node.js 0.8-
1345
+ if (IS_NODE$3) {
1346
+ defer = function (id) {
1347
+ process$2.nextTick(runner(id));
1348
+ };
1349
+ // Sphere (JS game engine) Dispatch API
1350
+ } else if (Dispatch && Dispatch.now) {
1351
+ defer = function (id) {
1352
+ Dispatch.now(runner(id));
1353
+ };
1354
+ // Browsers with MessageChannel, includes WebWorkers
1355
+ // except iOS - https://github.com/zloirock/core-js/issues/624
1356
+ } else if (MessageChannel && !IS_IOS$1) {
1357
+ channel = new MessageChannel();
1358
+ port = channel.port2;
1359
+ channel.port1.onmessage = eventListener;
1360
+ defer = bind$3(port.postMessage, port);
1361
+ // Browsers with postMessage, skip WebWorkers
1362
+ // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
1363
+ } else if (
1364
+ global$9.addEventListener &&
1365
+ isCallable$4(global$9.postMessage) &&
1366
+ !global$9.importScripts &&
1367
+ $location && $location.protocol !== 'file:' &&
1368
+ !fails$4(globalPostMessageDefer)
1369
+ ) {
1370
+ defer = globalPostMessageDefer;
1371
+ global$9.addEventListener('message', eventListener, false);
1372
+ // IE8-
1373
+ } else if (ONREADYSTATECHANGE in createElement('script')) {
1374
+ defer = function (id) {
1375
+ html$1.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () {
1376
+ html$1.removeChild(this);
1377
+ run(id);
1378
+ };
1379
+ };
1380
+ // Rest old browsers
1381
+ } else {
1382
+ defer = function (id) {
1383
+ setTimeout(runner(id), 0);
1384
+ };
1385
+ }
1386
+ }
1387
+
1388
+ var task$1 = {
1389
+ set: set,
1390
+ clear: clear
1391
+ };
1392
+
1393
+ var global$8 = global$l;
1394
+ var DESCRIPTORS$1 = descriptors;
1395
+
1396
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1397
+ var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
1398
+
1399
+ // Avoid NodeJS experimental warning
1400
+ var safeGetBuiltIn$1 = function (name) {
1401
+ if (!DESCRIPTORS$1) return global$8[name];
1402
+ var descriptor = getOwnPropertyDescriptor(global$8, name);
1403
+ return descriptor && descriptor.value;
1404
+ };
1405
+
1406
+ var Queue$2 = function () {
1407
+ this.head = null;
1408
+ this.tail = null;
1409
+ };
1410
+
1411
+ Queue$2.prototype = {
1412
+ add: function (item) {
1413
+ var entry = { item: item, next: null };
1414
+ var tail = this.tail;
1415
+ if (tail) tail.next = entry;
1416
+ else this.head = entry;
1417
+ this.tail = entry;
1418
+ },
1419
+ get: function () {
1420
+ var entry = this.head;
1421
+ if (entry) {
1422
+ var next = this.head = entry.next;
1423
+ if (next === null) this.tail = null;
1424
+ return entry.item;
1425
+ }
1426
+ }
1427
+ };
1428
+
1429
+ var queue$1 = Queue$2;
1430
+
1431
+ var userAgent$1 = engineUserAgent;
1432
+
1433
+ var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && typeof Pebble != 'undefined';
1434
+
1435
+ var userAgent = engineUserAgent;
1436
+
1437
+ var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
1438
+
1439
+ var global$7 = global$l;
1440
+ var safeGetBuiltIn = safeGetBuiltIn$1;
1441
+ var bind$2 = functionBindContext;
1442
+ var macrotask = task$1.set;
1443
+ var Queue$1 = queue$1;
1444
+ var IS_IOS = engineIsIos;
1445
+ var IS_IOS_PEBBLE = engineIsIosPebble;
1446
+ var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
1447
+ var IS_NODE$2 = engineIsNode;
1448
+
1449
+ var MutationObserver = global$7.MutationObserver || global$7.WebKitMutationObserver;
1450
+ var document$2 = global$7.document;
1451
+ var process$1 = global$7.process;
1452
+ var Promise$1 = global$7.Promise;
1453
+ var microtask$1 = safeGetBuiltIn('queueMicrotask');
1454
+ var notify$1, toggle, node, promise, then;
1455
+
1456
+ // modern engines have queueMicrotask method
1457
+ if (!microtask$1) {
1458
+ var queue = new Queue$1();
1459
+
1460
+ var flush = function () {
1461
+ var parent, fn;
1462
+ if (IS_NODE$2 && (parent = process$1.domain)) parent.exit();
1463
+ while (fn = queue.get()) try {
1464
+ fn();
1465
+ } catch (error) {
1466
+ if (queue.head) notify$1();
1467
+ throw error;
1468
+ }
1469
+ if (parent) parent.enter();
1470
+ };
1471
+
1472
+ // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
1473
+ // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
1474
+ if (!IS_IOS && !IS_NODE$2 && !IS_WEBOS_WEBKIT && MutationObserver && document$2) {
1475
+ toggle = true;
1476
+ node = document$2.createTextNode('');
1477
+ new MutationObserver(flush).observe(node, { characterData: true });
1478
+ notify$1 = function () {
1479
+ node.data = toggle = !toggle;
1480
+ };
1481
+ // environments with maybe non-completely correct, but existent Promise
1482
+ } else if (!IS_IOS_PEBBLE && Promise$1 && Promise$1.resolve) {
1483
+ // Promise.resolve without an argument throws an error in LG WebOS 2
1484
+ promise = Promise$1.resolve(undefined);
1485
+ // workaround of WebKit ~ iOS Safari 10.1 bug
1486
+ promise.constructor = Promise$1;
1487
+ then = bind$2(promise.then, promise);
1488
+ notify$1 = function () {
1489
+ then(flush);
1490
+ };
1491
+ // Node.js without promises
1492
+ } else if (IS_NODE$2) {
1493
+ notify$1 = function () {
1494
+ process$1.nextTick(flush);
1495
+ };
1496
+ // for other environments - macrotask based on:
1497
+ // - setImmediate
1498
+ // - MessageChannel
1499
+ // - window.postMessage
1500
+ // - onreadystatechange
1501
+ // - setTimeout
1502
+ } else {
1503
+ // `webpack` dev server bug on IE global methods - use bind(fn, global)
1504
+ macrotask = bind$2(macrotask, global$7);
1505
+ notify$1 = function () {
1506
+ macrotask(flush);
1507
+ };
1508
+ }
1509
+
1510
+ microtask$1 = function (fn) {
1511
+ if (!queue.head) notify$1();
1512
+ queue.add(fn);
1513
+ };
1514
+ }
1515
+
1516
+ var microtask_1 = microtask$1;
1517
+
1518
+ var hostReportErrors$1 = function (a, b) {
1519
+ try {
1520
+ // eslint-disable-next-line no-console -- safe
1521
+ arguments.length === 1 ? console.error(a) : console.error(a, b);
1522
+ } catch (error) { /* empty */ }
1523
+ };
1524
+
1525
+ var perform$3 = function (exec) {
1526
+ try {
1527
+ return { error: false, value: exec() };
1528
+ } catch (error) {
1529
+ return { error: true, value: error };
1530
+ }
1531
+ };
1532
+
1533
+ var global$6 = global$l;
1534
+
1535
+ var promiseNativeConstructor = global$6.Promise;
1536
+
1537
+ /* global Deno -- Deno case */
1538
+ var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
1539
+
1540
+ var IS_DENO$1 = engineIsDeno;
1541
+ var IS_NODE$1 = engineIsNode;
1542
+
1543
+ var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
1544
+ && typeof window == 'object'
1545
+ && typeof document == 'object';
1546
+
1547
+ var global$5 = global$l;
1548
+ var NativePromiseConstructor$3 = promiseNativeConstructor;
1549
+ var isCallable$3 = isCallable$h;
1550
+ var isForced = isForced_1;
1551
+ var inspectSource = inspectSource$3;
1552
+ var wellKnownSymbol$4 = wellKnownSymbol$b;
1553
+ var IS_BROWSER = engineIsBrowser;
1554
+ var IS_DENO = engineIsDeno;
1555
+ var V8_VERSION = engineV8Version;
1556
+
1557
+ NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
1558
+ var SPECIES$1 = wellKnownSymbol$4('species');
1559
+ var SUBCLASSING = false;
1560
+ var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$3(global$5.PromiseRejectionEvent);
1561
+
1562
+ var FORCED_PROMISE_CONSTRUCTOR$5 = isForced('Promise', function () {
1563
+ var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
1564
+ var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
1565
+ // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
1566
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
1567
+ // We can't detect it synchronously, so just check versions
1568
+ if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true;
1569
+ // We can't use @@species feature detection in V8 since it causes
1570
+ // deoptimization and performance degradation
1571
+ // https://github.com/zloirock/core-js/issues/679
1572
+ if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
1573
+ // Detect correctness of subclassing with @@species support
1574
+ var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
1575
+ var FakePromise = function (exec) {
1576
+ exec(function () { /* empty */ }, function () { /* empty */ });
1577
+ };
1578
+ var constructor = promise.constructor = {};
1579
+ constructor[SPECIES$1] = FakePromise;
1580
+ SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
1581
+ if (!SUBCLASSING) return true;
1582
+ // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
1583
+ } return !GLOBAL_CORE_JS_PROMISE && (IS_BROWSER || IS_DENO) && !NATIVE_PROMISE_REJECTION_EVENT$1;
1584
+ });
1585
+
1586
+ var promiseConstructorDetection = {
1587
+ CONSTRUCTOR: FORCED_PROMISE_CONSTRUCTOR$5,
1588
+ REJECTION_EVENT: NATIVE_PROMISE_REJECTION_EVENT$1,
1589
+ SUBCLASSING: SUBCLASSING
1590
+ };
1591
+
1592
+ var newPromiseCapability$2 = {};
1593
+
1594
+ var aCallable$4 = aCallable$8;
1595
+
1596
+ var $TypeError$3 = TypeError;
1597
+
1598
+ var PromiseCapability = function (C) {
1599
+ var resolve, reject;
1600
+ this.promise = new C(function ($$resolve, $$reject) {
1601
+ if (resolve !== undefined || reject !== undefined) throw new $TypeError$3('Bad Promise constructor');
1602
+ resolve = $$resolve;
1603
+ reject = $$reject;
1604
+ });
1605
+ this.resolve = aCallable$4(resolve);
1606
+ this.reject = aCallable$4(reject);
1607
+ };
1608
+
1609
+ // `NewPromiseCapability` abstract operation
1610
+ // https://tc39.es/ecma262/#sec-newpromisecapability
1611
+ newPromiseCapability$2.f = function (C) {
1612
+ return new PromiseCapability(C);
1613
+ };
1614
+
1615
+ var $$6 = _export;
1616
+ var IS_NODE = engineIsNode;
1617
+ var global$4 = global$l;
1618
+ var call$8 = functionCall;
1619
+ var defineBuiltIn$2 = defineBuiltIn$4;
1620
+ var setPrototypeOf = objectSetPrototypeOf;
1621
+ var setToStringTag = setToStringTag$1;
1622
+ var setSpecies = setSpecies$1;
1623
+ var aCallable$3 = aCallable$8;
1624
+ var isCallable$2 = isCallable$h;
1625
+ var isObject$1 = isObject$8;
1626
+ var anInstance = anInstance$1;
1627
+ var speciesConstructor = speciesConstructor$1;
1628
+ var task = task$1.set;
1629
+ var microtask = microtask_1;
1630
+ var hostReportErrors = hostReportErrors$1;
1631
+ var perform$2 = perform$3;
1632
+ var Queue = queue$1;
1633
+ var InternalStateModule = internalState;
1634
+ var NativePromiseConstructor$2 = promiseNativeConstructor;
1635
+ var PromiseConstructorDetection = promiseConstructorDetection;
1636
+ var newPromiseCapabilityModule$3 = newPromiseCapability$2;
1637
+
1638
+ var PROMISE = 'Promise';
1639
+ var FORCED_PROMISE_CONSTRUCTOR$4 = PromiseConstructorDetection.CONSTRUCTOR;
1640
+ var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT;
1641
+ var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
1642
+ var getInternalPromiseState = InternalStateModule.getterFor(PROMISE);
1643
+ var setInternalState = InternalStateModule.set;
1644
+ var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
1645
+ var PromiseConstructor = NativePromiseConstructor$2;
1646
+ var PromisePrototype = NativePromisePrototype$1;
1647
+ var TypeError$1 = global$4.TypeError;
1648
+ var document$1 = global$4.document;
1649
+ var process = global$4.process;
1650
+ var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
1651
+ var newGenericPromiseCapability = newPromiseCapability$1;
1652
+
1653
+ var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$4.dispatchEvent);
1654
+ var UNHANDLED_REJECTION = 'unhandledrejection';
1655
+ var REJECTION_HANDLED = 'rejectionhandled';
1656
+ var PENDING = 0;
1657
+ var FULFILLED = 1;
1658
+ var REJECTED = 2;
1659
+ var HANDLED = 1;
1660
+ var UNHANDLED = 2;
1661
+
1662
+ var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
1663
+
1664
+ // helpers
1665
+ var isThenable = function (it) {
1666
+ var then;
1667
+ return isObject$1(it) && isCallable$2(then = it.then) ? then : false;
1668
+ };
1669
+
1670
+ var callReaction = function (reaction, state) {
1671
+ var value = state.value;
1672
+ var ok = state.state === FULFILLED;
1673
+ var handler = ok ? reaction.ok : reaction.fail;
1674
+ var resolve = reaction.resolve;
1675
+ var reject = reaction.reject;
1676
+ var domain = reaction.domain;
1677
+ var result, then, exited;
1678
+ try {
1679
+ if (handler) {
1680
+ if (!ok) {
1681
+ if (state.rejection === UNHANDLED) onHandleUnhandled(state);
1682
+ state.rejection = HANDLED;
1683
+ }
1684
+ if (handler === true) result = value;
1685
+ else {
1686
+ if (domain) domain.enter();
1687
+ result = handler(value); // can throw
1688
+ if (domain) {
1689
+ domain.exit();
1690
+ exited = true;
1691
+ }
1692
+ }
1693
+ if (result === reaction.promise) {
1694
+ reject(new TypeError$1('Promise-chain cycle'));
1695
+ } else if (then = isThenable(result)) {
1696
+ call$8(then, result, resolve, reject);
1697
+ } else resolve(result);
1698
+ } else reject(value);
1699
+ } catch (error) {
1700
+ if (domain && !exited) domain.exit();
1701
+ reject(error);
1702
+ }
1703
+ };
1704
+
1705
+ var notify = function (state, isReject) {
1706
+ if (state.notified) return;
1707
+ state.notified = true;
1708
+ microtask(function () {
1709
+ var reactions = state.reactions;
1710
+ var reaction;
1711
+ while (reaction = reactions.get()) {
1712
+ callReaction(reaction, state);
1713
+ }
1714
+ state.notified = false;
1715
+ if (isReject && !state.rejection) onUnhandled(state);
1716
+ });
1717
+ };
1718
+
1719
+ var dispatchEvent = function (name, promise, reason) {
1720
+ var event, handler;
1721
+ if (DISPATCH_EVENT) {
1722
+ event = document$1.createEvent('Event');
1723
+ event.promise = promise;
1724
+ event.reason = reason;
1725
+ event.initEvent(name, false, true);
1726
+ global$4.dispatchEvent(event);
1727
+ } else event = { promise: promise, reason: reason };
1728
+ if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$4['on' + name])) handler(event);
1729
+ else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
1730
+ };
1731
+
1732
+ var onUnhandled = function (state) {
1733
+ call$8(task, global$4, function () {
1734
+ var promise = state.facade;
1735
+ var value = state.value;
1736
+ var IS_UNHANDLED = isUnhandled(state);
1737
+ var result;
1738
+ if (IS_UNHANDLED) {
1739
+ result = perform$2(function () {
1740
+ if (IS_NODE) {
1741
+ process.emit('unhandledRejection', value, promise);
1742
+ } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
1743
+ });
1744
+ // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
1745
+ state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED;
1746
+ if (result.error) throw result.value;
1747
+ }
1748
+ });
1749
+ };
1750
+
1751
+ var isUnhandled = function (state) {
1752
+ return state.rejection !== HANDLED && !state.parent;
1753
+ };
1754
+
1755
+ var onHandleUnhandled = function (state) {
1756
+ call$8(task, global$4, function () {
1757
+ var promise = state.facade;
1758
+ if (IS_NODE) {
1759
+ process.emit('rejectionHandled', promise);
1760
+ } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
1761
+ });
1762
+ };
1763
+
1764
+ var bind$1 = function (fn, state, unwrap) {
1765
+ return function (value) {
1766
+ fn(state, value, unwrap);
1767
+ };
1768
+ };
1769
+
1770
+ var internalReject = function (state, value, unwrap) {
1771
+ if (state.done) return;
1772
+ state.done = true;
1773
+ if (unwrap) state = unwrap;
1774
+ state.value = value;
1775
+ state.state = REJECTED;
1776
+ notify(state, true);
1777
+ };
1778
+
1779
+ var internalResolve = function (state, value, unwrap) {
1780
+ if (state.done) return;
1781
+ state.done = true;
1782
+ if (unwrap) state = unwrap;
1783
+ try {
1784
+ if (state.facade === value) throw new TypeError$1("Promise can't be resolved itself");
1785
+ var then = isThenable(value);
1786
+ if (then) {
1787
+ microtask(function () {
1788
+ var wrapper = { done: false };
1789
+ try {
1790
+ call$8(then, value,
1791
+ bind$1(internalResolve, wrapper, state),
1792
+ bind$1(internalReject, wrapper, state)
1793
+ );
1794
+ } catch (error) {
1795
+ internalReject(wrapper, error, state);
1796
+ }
1797
+ });
1798
+ } else {
1799
+ state.value = value;
1800
+ state.state = FULFILLED;
1801
+ notify(state, false);
1802
+ }
1803
+ } catch (error) {
1804
+ internalReject({ done: false }, error, state);
1805
+ }
1806
+ };
1807
+
1808
+ // constructor polyfill
1809
+ if (FORCED_PROMISE_CONSTRUCTOR$4) {
1810
+ // 25.4.3.1 Promise(executor)
1811
+ PromiseConstructor = function Promise(executor) {
1812
+ anInstance(this, PromisePrototype);
1813
+ aCallable$3(executor);
1814
+ call$8(Internal, this);
1815
+ var state = getInternalPromiseState(this);
1816
+ try {
1817
+ executor(bind$1(internalResolve, state), bind$1(internalReject, state));
1818
+ } catch (error) {
1819
+ internalReject(state, error);
1820
+ }
1821
+ };
1822
+
1823
+ PromisePrototype = PromiseConstructor.prototype;
1824
+
1825
+ // eslint-disable-next-line no-unused-vars -- required for `.length`
1826
+ Internal = function Promise(executor) {
1827
+ setInternalState(this, {
1828
+ type: PROMISE,
1829
+ done: false,
1830
+ notified: false,
1831
+ parent: false,
1832
+ reactions: new Queue(),
1833
+ rejection: false,
1834
+ state: PENDING,
1835
+ value: undefined
1836
+ });
1837
+ };
1838
+
1839
+ // `Promise.prototype.then` method
1840
+ // https://tc39.es/ecma262/#sec-promise.prototype.then
1841
+ Internal.prototype = defineBuiltIn$2(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
1842
+ var state = getInternalPromiseState(this);
1843
+ var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
1844
+ state.parent = true;
1845
+ reaction.ok = isCallable$2(onFulfilled) ? onFulfilled : true;
1846
+ reaction.fail = isCallable$2(onRejected) && onRejected;
1847
+ reaction.domain = IS_NODE ? process.domain : undefined;
1848
+ if (state.state === PENDING) state.reactions.add(reaction);
1849
+ else microtask(function () {
1850
+ callReaction(reaction, state);
1851
+ });
1852
+ return reaction.promise;
1853
+ });
1854
+
1855
+ OwnPromiseCapability = function () {
1856
+ var promise = new Internal();
1857
+ var state = getInternalPromiseState(promise);
1858
+ this.promise = promise;
1859
+ this.resolve = bind$1(internalResolve, state);
1860
+ this.reject = bind$1(internalReject, state);
1861
+ };
1862
+
1863
+ newPromiseCapabilityModule$3.f = newPromiseCapability$1 = function (C) {
1864
+ return C === PromiseConstructor || C === PromiseWrapper
1865
+ ? new OwnPromiseCapability(C)
1866
+ : newGenericPromiseCapability(C);
1867
+ };
1868
+
1869
+ if (isCallable$2(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
1870
+ nativeThen = NativePromisePrototype$1.then;
1871
+
1872
+ if (!NATIVE_PROMISE_SUBCLASSING) {
1873
+ // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
1874
+ defineBuiltIn$2(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
1875
+ var that = this;
1876
+ return new PromiseConstructor(function (resolve, reject) {
1877
+ call$8(nativeThen, that, resolve, reject);
1878
+ }).then(onFulfilled, onRejected);
1879
+ // https://github.com/zloirock/core-js/issues/640
1880
+ }, { unsafe: true });
1881
+ }
1882
+
1883
+ // make `.constructor === Promise` work for native promise-based APIs
1884
+ try {
1885
+ delete NativePromisePrototype$1.constructor;
1886
+ } catch (error) { /* empty */ }
1887
+
1888
+ // make `instanceof Promise` work for native promise-based APIs
1889
+ if (setPrototypeOf) {
1890
+ setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
1891
+ }
1892
+ }
1893
+ }
1894
+
1895
+ $$6({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
1896
+ Promise: PromiseConstructor
1897
+ });
1898
+
1899
+ setToStringTag(PromiseConstructor, PROMISE, false);
1900
+ setSpecies(PROMISE);
1901
+
1902
+ var iterators = {};
1903
+
1904
+ var wellKnownSymbol$3 = wellKnownSymbol$b;
1905
+ var Iterators$1 = iterators;
1906
+
1907
+ var ITERATOR$2 = wellKnownSymbol$3('iterator');
1908
+ var ArrayPrototype = Array.prototype;
1909
+
1910
+ // check on default Array iterator
1911
+ var isArrayIteratorMethod$1 = function (it) {
1912
+ return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$2] === it);
1913
+ };
1914
+
1915
+ var classof$2 = classof$4;
1916
+ var getMethod$2 = getMethod$4;
1917
+ var isNullOrUndefined$1 = isNullOrUndefined$5;
1918
+ var Iterators = iterators;
1919
+ var wellKnownSymbol$2 = wellKnownSymbol$b;
1920
+
1921
+ var ITERATOR$1 = wellKnownSymbol$2('iterator');
1922
+
1923
+ var getIteratorMethod$2 = function (it) {
1924
+ if (!isNullOrUndefined$1(it)) return getMethod$2(it, ITERATOR$1)
1925
+ || getMethod$2(it, '@@iterator')
1926
+ || Iterators[classof$2(it)];
1927
+ };
1928
+
1929
+ var call$7 = functionCall;
1930
+ var aCallable$2 = aCallable$8;
1931
+ var anObject$8 = anObject$d;
1932
+ var tryToString$1 = tryToString$4;
1933
+ var getIteratorMethod$1 = getIteratorMethod$2;
1934
+
1935
+ var $TypeError$2 = TypeError;
1936
+
1937
+ var getIterator$1 = function (argument, usingIterator) {
1938
+ var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
1939
+ if (aCallable$2(iteratorMethod)) return anObject$8(call$7(iteratorMethod, argument));
1940
+ throw new $TypeError$2(tryToString$1(argument) + ' is not iterable');
1941
+ };
1942
+
1943
+ var call$6 = functionCall;
1944
+ var anObject$7 = anObject$d;
1945
+ var getMethod$1 = getMethod$4;
1946
+
1947
+ var iteratorClose$1 = function (iterator, kind, value) {
1948
+ var innerResult, innerError;
1949
+ anObject$7(iterator);
1950
+ try {
1951
+ innerResult = getMethod$1(iterator, 'return');
1952
+ if (!innerResult) {
1953
+ if (kind === 'throw') throw value;
1954
+ return value;
1955
+ }
1956
+ innerResult = call$6(innerResult, iterator);
1957
+ } catch (error) {
1958
+ innerError = true;
1959
+ innerResult = error;
1960
+ }
1961
+ if (kind === 'throw') throw value;
1962
+ if (innerError) throw innerResult;
1963
+ anObject$7(innerResult);
1964
+ return value;
1965
+ };
1966
+
1967
+ var bind = functionBindContext;
1968
+ var call$5 = functionCall;
1969
+ var anObject$6 = anObject$d;
1970
+ var tryToString = tryToString$4;
1971
+ var isArrayIteratorMethod = isArrayIteratorMethod$1;
1972
+ var lengthOfArrayLike = lengthOfArrayLike$2;
1973
+ var isPrototypeOf = objectIsPrototypeOf;
1974
+ var getIterator = getIterator$1;
1975
+ var getIteratorMethod = getIteratorMethod$2;
1976
+ var iteratorClose = iteratorClose$1;
1977
+
1978
+ var $TypeError$1 = TypeError;
1979
+
1980
+ var Result = function (stopped, result) {
1981
+ this.stopped = stopped;
1982
+ this.result = result;
1983
+ };
1984
+
1985
+ var ResultPrototype = Result.prototype;
1986
+
1987
+ var iterate$2 = function (iterable, unboundFunction, options) {
1988
+ var that = options && options.that;
1989
+ var AS_ENTRIES = !!(options && options.AS_ENTRIES);
1990
+ var IS_RECORD = !!(options && options.IS_RECORD);
1991
+ var IS_ITERATOR = !!(options && options.IS_ITERATOR);
1992
+ var INTERRUPTED = !!(options && options.INTERRUPTED);
1993
+ var fn = bind(unboundFunction, that);
1994
+ var iterator, iterFn, index, length, result, next, step;
1995
+
1996
+ var stop = function (condition) {
1997
+ if (iterator) iteratorClose(iterator, 'normal', condition);
1998
+ return new Result(true, condition);
1999
+ };
2000
+
2001
+ var callFn = function (value) {
2002
+ if (AS_ENTRIES) {
2003
+ anObject$6(value);
2004
+ return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
2005
+ } return INTERRUPTED ? fn(value, stop) : fn(value);
2006
+ };
2007
+
2008
+ if (IS_RECORD) {
2009
+ iterator = iterable.iterator;
2010
+ } else if (IS_ITERATOR) {
2011
+ iterator = iterable;
2012
+ } else {
2013
+ iterFn = getIteratorMethod(iterable);
2014
+ if (!iterFn) throw new $TypeError$1(tryToString(iterable) + ' is not iterable');
2015
+ // optimisation for array iterators
2016
+ if (isArrayIteratorMethod(iterFn)) {
2017
+ for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
2018
+ result = callFn(iterable[index]);
2019
+ if (result && isPrototypeOf(ResultPrototype, result)) return result;
2020
+ } return new Result(false);
2021
+ }
2022
+ iterator = getIterator(iterable, iterFn);
2023
+ }
2024
+
2025
+ next = IS_RECORD ? iterable.next : iterator.next;
2026
+ while (!(step = call$5(next, iterator)).done) {
2027
+ try {
2028
+ result = callFn(step.value);
2029
+ } catch (error) {
2030
+ iteratorClose(iterator, 'throw', error);
2031
+ }
2032
+ if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result;
2033
+ } return new Result(false);
2034
+ };
2035
+
2036
+ var wellKnownSymbol$1 = wellKnownSymbol$b;
2037
+
2038
+ var ITERATOR = wellKnownSymbol$1('iterator');
2039
+ var SAFE_CLOSING = false;
2040
+
2041
+ try {
2042
+ var called = 0;
2043
+ var iteratorWithReturn = {
2044
+ next: function () {
2045
+ return { done: !!called++ };
2046
+ },
2047
+ 'return': function () {
2048
+ SAFE_CLOSING = true;
2049
+ }
2050
+ };
2051
+ iteratorWithReturn[ITERATOR] = function () {
2052
+ return this;
2053
+ };
2054
+ // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
2055
+ Array.from(iteratorWithReturn, function () { throw 2; });
2056
+ } catch (error) { /* empty */ }
2057
+
2058
+ var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
2059
+ try {
2060
+ if (!SKIP_CLOSING && !SAFE_CLOSING) return false;
2061
+ } catch (error) { return false; } // workaround of old WebKit + `eval` bug
2062
+ var ITERATION_SUPPORT = false;
2063
+ try {
2064
+ var object = {};
2065
+ object[ITERATOR] = function () {
2066
+ return {
2067
+ next: function () {
2068
+ return { done: ITERATION_SUPPORT = true };
2069
+ }
2070
+ };
2071
+ };
2072
+ exec(object);
2073
+ } catch (error) { /* empty */ }
2074
+ return ITERATION_SUPPORT;
2075
+ };
2076
+
2077
+ var NativePromiseConstructor$1 = promiseNativeConstructor;
2078
+ var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
2079
+ var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
2080
+
2081
+ var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
2082
+ NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
2083
+ });
2084
+
2085
+ var $$5 = _export;
2086
+ var call$4 = functionCall;
2087
+ var aCallable$1 = aCallable$8;
2088
+ var newPromiseCapabilityModule$2 = newPromiseCapability$2;
2089
+ var perform$1 = perform$3;
2090
+ var iterate$1 = iterate$2;
2091
+ var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
2092
+
2093
+ // `Promise.all` method
2094
+ // https://tc39.es/ecma262/#sec-promise.all
2095
+ $$5({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
2096
+ all: function all(iterable) {
2097
+ var C = this;
2098
+ var capability = newPromiseCapabilityModule$2.f(C);
2099
+ var resolve = capability.resolve;
2100
+ var reject = capability.reject;
2101
+ var result = perform$1(function () {
2102
+ var $promiseResolve = aCallable$1(C.resolve);
2103
+ var values = [];
2104
+ var counter = 0;
2105
+ var remaining = 1;
2106
+ iterate$1(iterable, function (promise) {
2107
+ var index = counter++;
2108
+ var alreadyCalled = false;
2109
+ remaining++;
2110
+ call$4($promiseResolve, C, promise).then(function (value) {
2111
+ if (alreadyCalled) return;
2112
+ alreadyCalled = true;
2113
+ values[index] = value;
2114
+ --remaining || resolve(values);
2115
+ }, reject);
2116
+ });
2117
+ --remaining || resolve(values);
2118
+ });
2119
+ if (result.error) reject(result.value);
2120
+ return capability.promise;
2121
+ }
2122
+ });
2123
+
2124
+ var $$4 = _export;
2125
+ var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
2126
+ var NativePromiseConstructor = promiseNativeConstructor;
2127
+ var getBuiltIn$1 = getBuiltIn$7;
2128
+ var isCallable$1 = isCallable$h;
2129
+ var defineBuiltIn$1 = defineBuiltIn$4;
2130
+
2131
+ var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
2132
+
2133
+ // `Promise.prototype.catch` method
2134
+ // https://tc39.es/ecma262/#sec-promise.prototype.catch
2135
+ $$4({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
2136
+ 'catch': function (onRejected) {
2137
+ return this.then(undefined, onRejected);
2138
+ }
2139
+ });
2140
+
2141
+ // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
2142
+ if (isCallable$1(NativePromiseConstructor)) {
2143
+ var method = getBuiltIn$1('Promise').prototype['catch'];
2144
+ if (NativePromisePrototype['catch'] !== method) {
2145
+ defineBuiltIn$1(NativePromisePrototype, 'catch', method, { unsafe: true });
2146
+ }
2147
+ }
2148
+
2149
+ var $$3 = _export;
2150
+ var call$3 = functionCall;
2151
+ var aCallable = aCallable$8;
2152
+ var newPromiseCapabilityModule$1 = newPromiseCapability$2;
2153
+ var perform = perform$3;
2154
+ var iterate = iterate$2;
2155
+ var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
2156
+
2157
+ // `Promise.race` method
2158
+ // https://tc39.es/ecma262/#sec-promise.race
2159
+ $$3({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
2160
+ race: function race(iterable) {
2161
+ var C = this;
2162
+ var capability = newPromiseCapabilityModule$1.f(C);
2163
+ var reject = capability.reject;
2164
+ var result = perform(function () {
2165
+ var $promiseResolve = aCallable(C.resolve);
2166
+ iterate(iterable, function (promise) {
2167
+ call$3($promiseResolve, C, promise).then(capability.resolve, reject);
2168
+ });
2169
+ });
2170
+ if (result.error) reject(result.value);
2171
+ return capability.promise;
2172
+ }
2173
+ });
2174
+
2175
+ var $$2 = _export;
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
+ $$2({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
2182
+ reject: function reject(r) {
2183
+ var capability = newPromiseCapabilityModule.f(this);
2184
+ var capabilityReject = capability.reject;
2185
+ capabilityReject(r);
2186
+ return capability.promise;
2187
+ }
2188
+ });
2189
+
2190
+ var anObject$5 = anObject$d;
2191
+ var isObject = isObject$8;
2192
+ var newPromiseCapability = newPromiseCapability$2;
2193
+
2194
+ var promiseResolve$1 = function (C, x) {
2195
+ anObject$5(C);
2196
+ if (isObject(x) && x.constructor === C) return x;
2197
+ var promiseCapability = newPromiseCapability.f(C);
2198
+ var resolve = promiseCapability.resolve;
2199
+ resolve(x);
2200
+ return promiseCapability.promise;
2201
+ };
2202
+
2203
+ var $$1 = _export;
2204
+ var getBuiltIn = getBuiltIn$7;
2205
+ var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
2206
+ var promiseResolve = promiseResolve$1;
2207
+
2208
+ getBuiltIn('Promise');
2209
+
2210
+ // `Promise.resolve` method
2211
+ // https://tc39.es/ecma262/#sec-promise.resolve
2212
+ $$1({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
2213
+ resolve: function resolve(x) {
2214
+ return promiseResolve(this, x);
2215
+ }
2216
+ });
2217
+
2218
+ /**
2219
+ * Used for loading services in the browser that are imported from other scripts, such as Facebook, Segment, Stripe, etc.
2220
+ */
2221
+ class AbstractAsyncWindowLoadedService {
2222
+ /**
2223
+ * @param _windowKey Key that is attached to the window for the object that is the service when finished loading.
2224
+ * @param _callbackKey Optional key attached to window that is a function that is executed when the setup is complete.
2225
+ */
2226
+ constructor(_windowKey, _callbackKey, _serviceName = _windowKey, preload = true) {
2227
+ this._windowKey = _windowKey;
2228
+ this._callbackKey = _callbackKey;
2229
+ this._serviceName = _serviceName;
2230
+ this._loading = new BehaviorSubject(undefined);
2231
+ this.loading$ = this._loading.pipe(tapFirst(() => this.loadService()), filterMaybe(), shareReplay(1));
2232
+ this.service$ = this.loading$.pipe(switchMap(x => from(x)), shareReplay(1));
2233
+ if (preload) {
2234
+ // Begin loading the service immediately.
2235
+ setTimeout(() => this.loadService().catch());
2236
+ }
2237
+ }
2238
+ destroy() {
2239
+ this._loading.complete();
2240
+ }
2241
+ getService() {
2242
+ return firstValueFrom(this.service$);
2243
+ }
2244
+
2245
+ // MARK: Loading
2246
+ loadService() {
2247
+ if (!this._loading.value) {
2248
+ const loadingPromise = new Promise((resolve, reject) => {
2249
+ let loadTry = 0;
2250
+ const rejectWithError = () => {
2251
+ reject(new Error(`Service "${this._serviceName}" failed loading with windowKey "${this._windowKey}"`));
2252
+ };
2253
+ const tryLoad = () => {
2254
+ const windowRef = window;
2255
+
2256
+ // Loaded before the promise.
2257
+ if (windowRef[this._windowKey]) {
2258
+ // Not yet finished loading async. Intercept the function.
2259
+ // console.log('Window key.');
2260
+ return resolve(this.completeLoadingService());
2261
+ } else if (this._callbackKey && windowRef[this._callbackKey]) {
2262
+ // console.log('Callback key.');
2263
+ windowRef[this._callbackKey] = () => resolve(this.completeLoadingService());
2264
+ } else if (loadTry < 10) {
2265
+ loadTry += 1;
2266
+ // console.log('Try reload...');
2267
+ setTimeout(() => tryLoad(), 1000);
2268
+ } else {
2269
+ const retry = this._onLoadServiceFailure();
2270
+ if (retry) {
2271
+ retry.then(x => resolve(x)).catch(() => rejectWithError());
2272
+ } else {
2273
+ rejectWithError();
2274
+ }
2275
+ }
2276
+ };
2277
+ tryLoad();
2278
+ });
2279
+ this._loading.next(loadingPromise);
2280
+ }
2281
+ return this._loading.value;
2282
+ }
2283
+ _onLoadServiceFailure() {
2284
+ // override in parent if needed.
2285
+ }
2286
+ async completeLoadingService() {
2287
+ await this._prepareCompleteLoadingService();
2288
+ const service = window[this._windowKey];
2289
+ if (!service) {
2290
+ throw new Error(`Service "${this._serviceName}" could not complete loading.`);
2291
+ }
2292
+
2293
+ // Init the API
2294
+ const initializedService = await this._initService(service);
2295
+ return initializedService != null ? initializedService : service;
2296
+ }
2297
+ _prepareCompleteLoadingService() {
2298
+ return Promise.resolve();
2299
+ }
2300
+ _initService(service) {
2301
+ return Promise.resolve(service);
2302
+ }
2303
+ }
2304
+
2305
+ // https://dev.to/maciejtrzcinski/100vh-problem-with-ios-safari-3ge9
2306
+
2307
+ const DEFAULT_VH100_VARIABLE_NAME = 'vh100';
2308
+ function refreshVh100Function(cssVariableName = DEFAULT_VH100_VARIABLE_NAME) {
2309
+ const cssProperty = `--${cssVariableName}`;
2310
+ return () => {
2311
+ const doc = document.documentElement;
2312
+ doc.style.setProperty(cssProperty, `${window.innerHeight}px`);
2313
+ };
2314
+ }
2315
+
2316
+ /**
2317
+ * Adds window event listeners to populate the css variable `vh100`, or another input variable name, with the current window height.
2318
+ */
2319
+ function watchWindowAndUpdateVh100StyleProperty(cssVariableName) {
2320
+ const refreshPropertyValue = refreshVh100Function(cssVariableName);
2321
+ window.addEventListener('resize', refreshPropertyValue);
2322
+ window.addEventListener('orientationchange', refreshPropertyValue);
2323
+ refreshPropertyValue();
2324
+ }
2325
+
2326
+ var classof$1 = classof$4;
2327
+
2328
+ var $String = String;
2329
+
2330
+ var toString$2 = function (argument) {
2331
+ if (classof$1(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
2332
+ return $String(argument);
2333
+ };
2334
+
2335
+ var anObject$4 = anObject$d;
2336
+
2337
+ // `RegExp.prototype.flags` getter implementation
2338
+ // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
2339
+ var regexpFlags$1 = function () {
2340
+ var that = anObject$4(this);
2341
+ var result = '';
2342
+ if (that.hasIndices) result += 'd';
2343
+ if (that.global) result += 'g';
2344
+ if (that.ignoreCase) result += 'i';
2345
+ if (that.multiline) result += 'm';
2346
+ if (that.dotAll) result += 's';
2347
+ if (that.unicode) result += 'u';
2348
+ if (that.unicodeSets) result += 'v';
2349
+ if (that.sticky) result += 'y';
2350
+ return result;
2351
+ };
2352
+
2353
+ var fails$3 = fails$e;
2354
+ var global$3 = global$l;
2355
+
2356
+ // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
2357
+ var $RegExp$2 = global$3.RegExp;
2358
+
2359
+ var UNSUPPORTED_Y$1 = fails$3(function () {
2360
+ var re = $RegExp$2('a', 'y');
2361
+ re.lastIndex = 2;
2362
+ return re.exec('abcd') !== null;
2363
+ });
2364
+
2365
+ // UC Browser bug
2366
+ // https://github.com/zloirock/core-js/issues/1008
2367
+ var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$3(function () {
2368
+ return !$RegExp$2('a', 'y').sticky;
2369
+ });
2370
+
2371
+ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$3(function () {
2372
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
2373
+ var re = $RegExp$2('^r', 'gy');
2374
+ re.lastIndex = 2;
2375
+ return re.exec('str') !== null;
2376
+ });
2377
+
2378
+ var regexpStickyHelpers = {
2379
+ BROKEN_CARET: BROKEN_CARET,
2380
+ MISSED_STICKY: MISSED_STICKY,
2381
+ UNSUPPORTED_Y: UNSUPPORTED_Y$1
2382
+ };
2383
+
2384
+ var objectDefineProperties = {};
2385
+
2386
+ var internalObjectKeys = objectKeysInternal;
2387
+ var enumBugKeys$1 = enumBugKeys$3;
2388
+
2389
+ // `Object.keys` method
2390
+ // https://tc39.es/ecma262/#sec-object.keys
2391
+ // eslint-disable-next-line es/no-object-keys -- safe
2392
+ var objectKeys$1 = Object.keys || function keys(O) {
2393
+ return internalObjectKeys(O, enumBugKeys$1);
2394
+ };
2395
+
2396
+ var DESCRIPTORS = descriptors;
2397
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
2398
+ var definePropertyModule = objectDefineProperty;
2399
+ var anObject$3 = anObject$d;
2400
+ var toIndexedObject = toIndexedObject$4;
2401
+ var objectKeys = objectKeys$1;
2402
+
2403
+ // `Object.defineProperties` method
2404
+ // https://tc39.es/ecma262/#sec-object.defineproperties
2405
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
2406
+ objectDefineProperties.f = DESCRIPTORS && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
2407
+ anObject$3(O);
2408
+ var props = toIndexedObject(Properties);
2409
+ var keys = objectKeys(Properties);
2410
+ var length = keys.length;
2411
+ var index = 0;
2412
+ var key;
2413
+ while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
2414
+ return O;
2415
+ };
2416
+
2417
+ /* global ActiveXObject -- old IE, WSH */
2418
+ var anObject$2 = anObject$d;
2419
+ var definePropertiesModule = objectDefineProperties;
2420
+ var enumBugKeys = enumBugKeys$3;
2421
+ var hiddenKeys = hiddenKeys$4;
2422
+ var html = html$2;
2423
+ var documentCreateElement = documentCreateElement$1;
2424
+ var sharedKey = sharedKey$2;
2425
+
2426
+ var GT = '>';
2427
+ var LT = '<';
2428
+ var PROTOTYPE = 'prototype';
2429
+ var SCRIPT = 'script';
2430
+ var IE_PROTO = sharedKey('IE_PROTO');
2431
+
2432
+ var EmptyConstructor = function () { /* empty */ };
2433
+
2434
+ var scriptTag = function (content) {
2435
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
2436
+ };
2437
+
2438
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
2439
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
2440
+ activeXDocument.write(scriptTag(''));
2441
+ activeXDocument.close();
2442
+ var temp = activeXDocument.parentWindow.Object;
2443
+ activeXDocument = null; // avoid memory leak
2444
+ return temp;
2445
+ };
2446
+
2447
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
2448
+ var NullProtoObjectViaIFrame = function () {
2449
+ // Thrash, waste and sodomy: IE GC bug
2450
+ var iframe = documentCreateElement('iframe');
2451
+ var JS = 'java' + SCRIPT + ':';
2452
+ var iframeDocument;
2453
+ iframe.style.display = 'none';
2454
+ html.appendChild(iframe);
2455
+ // https://github.com/zloirock/core-js/issues/475
2456
+ iframe.src = String(JS);
2457
+ iframeDocument = iframe.contentWindow.document;
2458
+ iframeDocument.open();
2459
+ iframeDocument.write(scriptTag('document.F=Object'));
2460
+ iframeDocument.close();
2461
+ return iframeDocument.F;
2462
+ };
2463
+
2464
+ // Check for document.domain and active x support
2465
+ // No need to use active x approach when document.domain is not set
2466
+ // see https://github.com/es-shims/es5-shim/issues/150
2467
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
2468
+ // avoid IE GC bug
2469
+ var activeXDocument;
2470
+ var NullProtoObject = function () {
2471
+ try {
2472
+ activeXDocument = new ActiveXObject('htmlfile');
2473
+ } catch (error) { /* ignore */ }
2474
+ NullProtoObject = typeof document != 'undefined'
2475
+ ? document.domain && activeXDocument
2476
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
2477
+ : NullProtoObjectViaIFrame()
2478
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
2479
+ var length = enumBugKeys.length;
2480
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
2481
+ return NullProtoObject();
2482
+ };
2483
+
2484
+ hiddenKeys[IE_PROTO] = true;
2485
+
2486
+ // `Object.create` method
2487
+ // https://tc39.es/ecma262/#sec-object.create
2488
+ // eslint-disable-next-line es/no-object-create -- safe
2489
+ var objectCreate = Object.create || function create(O, Properties) {
2490
+ var result;
2491
+ if (O !== null) {
2492
+ EmptyConstructor[PROTOTYPE] = anObject$2(O);
2493
+ result = new EmptyConstructor();
2494
+ EmptyConstructor[PROTOTYPE] = null;
2495
+ // add "__proto__" for Object.getPrototypeOf polyfill
2496
+ result[IE_PROTO] = O;
2497
+ } else result = NullProtoObject();
2498
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
2499
+ };
2500
+
2501
+ var fails$2 = fails$e;
2502
+ var global$2 = global$l;
2503
+
2504
+ // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
2505
+ var $RegExp$1 = global$2.RegExp;
2506
+
2507
+ var regexpUnsupportedDotAll = fails$2(function () {
2508
+ var re = $RegExp$1('.', 's');
2509
+ return !(re.dotAll && re.test('\n') && re.flags === 's');
2510
+ });
2511
+
2512
+ var fails$1 = fails$e;
2513
+ var global$1 = global$l;
2514
+
2515
+ // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
2516
+ var $RegExp = global$1.RegExp;
2517
+
2518
+ var regexpUnsupportedNcg = fails$1(function () {
2519
+ var re = $RegExp('(?<a>b)', 'g');
2520
+ return re.exec('b').groups.a !== 'b' ||
2521
+ 'b'.replace(re, '$<a>c') !== 'bc';
2522
+ });
2523
+
2524
+ /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
2525
+ /* eslint-disable regexp/no-useless-quantifier -- testing */
2526
+ var call$2 = functionCall;
2527
+ var uncurryThis$1 = functionUncurryThis;
2528
+ var toString$1 = toString$2;
2529
+ var regexpFlags = regexpFlags$1;
2530
+ var stickyHelpers = regexpStickyHelpers;
2531
+ var shared = shared$4.exports;
2532
+ var create = objectCreate;
2533
+ var getInternalState = internalState.get;
2534
+ var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
2535
+ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
2536
+
2537
+ var nativeReplace = shared('native-string-replace', String.prototype.replace);
2538
+ var nativeExec = RegExp.prototype.exec;
2539
+ var patchedExec = nativeExec;
2540
+ var charAt = uncurryThis$1(''.charAt);
2541
+ var indexOf = uncurryThis$1(''.indexOf);
2542
+ var replace = uncurryThis$1(''.replace);
2543
+ var stringSlice = uncurryThis$1(''.slice);
2544
+
2545
+ var UPDATES_LAST_INDEX_WRONG = (function () {
2546
+ var re1 = /a/;
2547
+ var re2 = /b*/g;
2548
+ call$2(nativeExec, re1, 'a');
2549
+ call$2(nativeExec, re2, 'a');
2550
+ return re1.lastIndex !== 0 || re2.lastIndex !== 0;
2551
+ })();
2552
+
2553
+ var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
2554
+
2555
+ // nonparticipating capturing group, copied from es5-shim's String#split patch.
2556
+ var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
2557
+
2558
+ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
2559
+
2560
+ if (PATCH) {
2561
+ patchedExec = function exec(string) {
2562
+ var re = this;
2563
+ var state = getInternalState(re);
2564
+ var str = toString$1(string);
2565
+ var raw = state.raw;
2566
+ var result, reCopy, lastIndex, match, i, object, group;
2567
+
2568
+ if (raw) {
2569
+ raw.lastIndex = re.lastIndex;
2570
+ result = call$2(patchedExec, raw, str);
2571
+ re.lastIndex = raw.lastIndex;
2572
+ return result;
2573
+ }
2574
+
2575
+ var groups = state.groups;
2576
+ var sticky = UNSUPPORTED_Y && re.sticky;
2577
+ var flags = call$2(regexpFlags, re);
2578
+ var source = re.source;
2579
+ var charsAdded = 0;
2580
+ var strCopy = str;
2581
+
2582
+ if (sticky) {
2583
+ flags = replace(flags, 'y', '');
2584
+ if (indexOf(flags, 'g') === -1) {
2585
+ flags += 'g';
2586
+ }
2587
+
2588
+ strCopy = stringSlice(str, re.lastIndex);
2589
+ // Support anchored sticky behavior.
2590
+ if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) {
2591
+ source = '(?: ' + source + ')';
2592
+ strCopy = ' ' + strCopy;
2593
+ charsAdded++;
2594
+ }
2595
+ // ^(? + rx + ) is needed, in combination with some str slicing, to
2596
+ // simulate the 'y' flag.
2597
+ reCopy = new RegExp('^(?:' + source + ')', flags);
2598
+ }
2599
+
2600
+ if (NPCG_INCLUDED) {
2601
+ reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
2602
+ }
2603
+ if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
2604
+
2605
+ match = call$2(nativeExec, sticky ? reCopy : re, strCopy);
2606
+
2607
+ if (sticky) {
2608
+ if (match) {
2609
+ match.input = stringSlice(match.input, charsAdded);
2610
+ match[0] = stringSlice(match[0], charsAdded);
2611
+ match.index = re.lastIndex;
2612
+ re.lastIndex += match[0].length;
2613
+ } else re.lastIndex = 0;
2614
+ } else if (UPDATES_LAST_INDEX_WRONG && match) {
2615
+ re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
2616
+ }
2617
+ if (NPCG_INCLUDED && match && match.length > 1) {
2618
+ // Fix browsers whose `exec` methods don't consistently return `undefined`
2619
+ // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
2620
+ call$2(nativeReplace, match[0], reCopy, function () {
2621
+ for (i = 1; i < arguments.length - 2; i++) {
2622
+ if (arguments[i] === undefined) match[i] = undefined;
2623
+ }
2624
+ });
2625
+ }
2626
+
2627
+ if (match && groups) {
2628
+ match.groups = object = create(null);
2629
+ for (i = 0; i < groups.length; i++) {
2630
+ group = groups[i];
2631
+ object[group[0]] = match[group[1]];
2632
+ }
2633
+ }
2634
+
2635
+ return match;
2636
+ };
2637
+ }
2638
+
2639
+ var regexpExec$2 = patchedExec;
2640
+
2641
+ var $ = _export;
2642
+ var exec = regexpExec$2;
2643
+
2644
+ // `RegExp.prototype.exec` method
2645
+ // https://tc39.es/ecma262/#sec-regexp.prototype.exec
2646
+ $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
2647
+ exec: exec
2648
+ });
2649
+
2650
+ // TODO: Remove from `core-js@4` since it's moved to entry points
2651
+
2652
+ var uncurryThis = functionUncurryThisClause;
2653
+ var defineBuiltIn = defineBuiltIn$4;
2654
+ var regexpExec$1 = regexpExec$2;
2655
+ var fails = fails$e;
2656
+ var wellKnownSymbol = wellKnownSymbol$b;
2657
+ var createNonEnumerableProperty = createNonEnumerableProperty$3;
2658
+
2659
+ var SPECIES = wellKnownSymbol('species');
2660
+ var RegExpPrototype = RegExp.prototype;
2661
+
2662
+ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2663
+ var SYMBOL = wellKnownSymbol(KEY);
2664
+
2665
+ var DELEGATES_TO_SYMBOL = !fails(function () {
2666
+ // String methods call symbol-named RegEp methods
2667
+ var O = {};
2668
+ O[SYMBOL] = function () { return 7; };
2669
+ return ''[KEY](O) !== 7;
2670
+ });
2671
+
2672
+ var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {
2673
+ // Symbol-named RegExp methods call .exec
2674
+ var execCalled = false;
2675
+ var re = /a/;
2676
+
2677
+ if (KEY === 'split') {
2678
+ // We can't use real regex here since it causes deoptimization
2679
+ // and serious performance degradation in V8
2680
+ // https://github.com/zloirock/core-js/issues/306
2681
+ re = {};
2682
+ // RegExp[@@split] doesn't call the regex's exec method, but first creates
2683
+ // a new one. We need to return the patched regex when creating the new one.
2684
+ re.constructor = {};
2685
+ re.constructor[SPECIES] = function () { return re; };
2686
+ re.flags = '';
2687
+ re[SYMBOL] = /./[SYMBOL];
2688
+ }
2689
+
2690
+ re.exec = function () {
2691
+ execCalled = true;
2692
+ return null;
2693
+ };
2694
+
2695
+ re[SYMBOL]('');
2696
+ return !execCalled;
2697
+ });
2698
+
2699
+ if (
2700
+ !DELEGATES_TO_SYMBOL ||
2701
+ !DELEGATES_TO_EXEC ||
2702
+ FORCED
2703
+ ) {
2704
+ var uncurriedNativeRegExpMethod = uncurryThis(/./[SYMBOL]);
2705
+ var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
2706
+ var uncurriedNativeMethod = uncurryThis(nativeMethod);
2707
+ var $exec = regexp.exec;
2708
+ if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
2709
+ if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
2710
+ // The native String method already delegates to @@method (this
2711
+ // polyfilled function), leasing to infinite recursion.
2712
+ // We avoid it by directly calling the native @@method method.
2713
+ return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
2714
+ }
2715
+ return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
2716
+ }
2717
+ return { done: false };
2718
+ });
2719
+
2720
+ defineBuiltIn(String.prototype, KEY, methods[0]);
2721
+ defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
2722
+ }
2723
+
2724
+ if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
2725
+ };
2726
+
2727
+ // `SameValue` abstract operation
2728
+ // https://tc39.es/ecma262/#sec-samevalue
2729
+ // eslint-disable-next-line es/no-object-is -- safe
2730
+ var sameValue$1 = Object.is || function is(x, y) {
2731
+ // eslint-disable-next-line no-self-compare -- NaN check
2732
+ return x === y ? x !== 0 || 1 / x === 1 / y : x !== x && y !== y;
2733
+ };
2734
+
2735
+ var call$1 = functionCall;
2736
+ var anObject$1 = anObject$d;
2737
+ var isCallable = isCallable$h;
2738
+ var classof = classofRaw$2;
2739
+ var regexpExec = regexpExec$2;
2740
+
2741
+ var $TypeError = TypeError;
2742
+
2743
+ // `RegExpExec` abstract operation
2744
+ // https://tc39.es/ecma262/#sec-regexpexec
2745
+ var regexpExecAbstract = function (R, S) {
2746
+ var exec = R.exec;
2747
+ if (isCallable(exec)) {
2748
+ var result = call$1(exec, R, S);
2749
+ if (result !== null) anObject$1(result);
2750
+ return result;
2751
+ }
2752
+ if (classof(R) === 'RegExp') return call$1(regexpExec, R, S);
2753
+ throw new $TypeError('RegExp#exec called on incompatible receiver');
2754
+ };
2755
+
2756
+ var call = functionCall;
2757
+ var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
2758
+ var anObject = anObject$d;
2759
+ var isNullOrUndefined = isNullOrUndefined$5;
2760
+ var requireObjectCoercible = requireObjectCoercible$3;
2761
+ var sameValue = sameValue$1;
2762
+ var toString = toString$2;
2763
+ var getMethod = getMethod$4;
2764
+ var regExpExec = regexpExecAbstract;
2765
+
2766
+ // @@search logic
2767
+ fixRegExpWellKnownSymbolLogic('search', function (SEARCH, nativeSearch, maybeCallNative) {
2768
+ return [
2769
+ // `String.prototype.search` method
2770
+ // https://tc39.es/ecma262/#sec-string.prototype.search
2771
+ function search(regexp) {
2772
+ var O = requireObjectCoercible(this);
2773
+ var searcher = isNullOrUndefined(regexp) ? undefined : getMethod(regexp, SEARCH);
2774
+ return searcher ? call(searcher, regexp, O) : new RegExp(regexp)[SEARCH](toString(O));
2775
+ },
2776
+ // `RegExp.prototype[@@search]` method
2777
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@search
2778
+ function (string) {
2779
+ var rx = anObject(this);
2780
+ var S = toString(string);
2781
+ var res = maybeCallNative(nativeSearch, rx, S);
2782
+
2783
+ if (res.done) return res.value;
2784
+
2785
+ var previousLastIndex = rx.lastIndex;
2786
+ if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;
2787
+ var result = regExpExec(rx, S);
2788
+ if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;
2789
+ return result === null ? -1 : result.index;
2790
+ }
2791
+ ];
2792
+ });
2793
+
2794
+ // MARK: Window Location Utiltiies
2795
+
2796
+ /**
2797
+ * Whether or not the current host is localhost. Useful for determining local dev environments.
2798
+ */
2799
+ function isLocalhost() {
2800
+ return window.location.hostname === 'localhost';
2801
+ }
2802
+ function makeWindowPath(path) {
2803
+ return `${getBaseWindowUrl()}${path}`;
2804
+ }
2805
+ function getBaseWindowUrl() {
2806
+ const port = window.location.port ? ':' + window.location.port : '';
2807
+ return `${window.location.protocol}//${window.location.hostname}${port}`;
2808
+ }
2809
+ function getWindowPathNameWithQuery() {
2810
+ return window.location.pathname + window.location.search;
2811
+ }
2812
+
2813
+ export { AbstractAsyncWindowLoadedService, DEFAULT_VH100_VARIABLE_NAME, getBaseWindowUrl, getWindowPathNameWithQuery, isLocalhost, makeWindowPath, refreshVh100Function, watchWindowAndUpdateVh100StyleProperty };