@dotcms/experiments 1.5.6 → 1.6.0-next.36

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 CHANGED
@@ -1,7 +1,6 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import { createContext, useContext, useState, useEffect, useRef, useCallback } from 'react';
2
- import { UVE_MODE } from '@dotcms/types';
3
3
  import { getUVEState } from '@dotcms/uve';
4
- import { jsx } from 'react/jsx-runtime';
5
4
  import { jitsuClient } from '@jitsu/sdk-js';
6
5
 
7
6
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -24,7 +23,7 @@ var global$q =
24
23
 
25
24
  var objectGetOwnPropertyDescriptor = {};
26
25
 
27
- var fails$o = function (exec) {
26
+ var fails$p = function (exec) {
28
27
  try {
29
28
  return !!exec();
30
29
  } catch (error) {
@@ -32,17 +31,17 @@ var fails$o = function (exec) {
32
31
  }
33
32
  };
34
33
 
35
- var fails$n = fails$o;
34
+ var fails$o = fails$p;
36
35
 
37
36
  // Detect IE8's incomplete defineProperty implementation
38
- var descriptors = !fails$n(function () {
37
+ var descriptors = !fails$o(function () {
39
38
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
40
39
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
41
40
  });
42
41
 
43
- var fails$m = fails$o;
42
+ var fails$n = fails$p;
44
43
 
45
- var functionBindNative = !fails$m(function () {
44
+ var functionBindNative = !fails$n(function () {
46
45
  // eslint-disable-next-line es/no-function-prototype-bind -- safe
47
46
  var test = (function () { /* empty */ }).bind();
48
47
  // eslint-disable-next-line no-prototype-builtins -- safe
@@ -104,14 +103,14 @@ var classofRaw$2 = function (it) {
104
103
  };
105
104
 
106
105
  var uncurryThis$q = functionUncurryThis;
107
- var fails$l = fails$o;
106
+ var fails$m = fails$p;
108
107
  var classof$b = classofRaw$2;
109
108
 
110
109
  var $Object$4 = Object;
111
110
  var split$3 = uncurryThis$q(''.split);
112
111
 
113
112
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
114
- var indexedObject = fails$l(function () {
113
+ var indexedObject = fails$m(function () {
115
114
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
116
115
  // eslint-disable-next-line no-prototype-builtins -- safe
117
116
  return !$Object$4('z').propertyIsEnumerable(0);
@@ -150,26 +149,26 @@ var documentAll = typeof document == 'object' && document.all;
150
149
  // `IsCallable` abstract operation
151
150
  // https://tc39.es/ecma262/#sec-iscallable
152
151
  // eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
153
- var isCallable$q = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
152
+ var isCallable$r = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
154
153
  return typeof argument == 'function' || argument === documentAll;
155
154
  } : function (argument) {
156
155
  return typeof argument == 'function';
157
156
  };
158
157
 
159
- var isCallable$p = isCallable$q;
158
+ var isCallable$q = isCallable$r;
160
159
 
161
160
  var isObject$e = function (it) {
162
- return typeof it == 'object' ? it !== null : isCallable$p(it);
161
+ return typeof it == 'object' ? it !== null : isCallable$q(it);
163
162
  };
164
163
 
165
164
  var global$p = global$q;
166
- var isCallable$o = isCallable$q;
165
+ var isCallable$p = isCallable$r;
167
166
 
168
167
  var aFunction = function (argument) {
169
- return isCallable$o(argument) ? argument : undefined;
168
+ return isCallable$p(argument) ? argument : undefined;
170
169
  };
171
170
 
172
- var getBuiltIn$9 = function (namespace, method) {
171
+ var getBuiltIn$a = function (namespace, method) {
173
172
  return arguments.length < 2 ? aFunction(global$p[namespace]) : global$p[namespace] && global$p[namespace][method];
174
173
  };
175
174
 
@@ -209,13 +208,13 @@ var engineV8Version = version;
209
208
 
210
209
  /* eslint-disable es/no-symbol -- required for testing */
211
210
  var V8_VERSION$1 = engineV8Version;
212
- var fails$k = fails$o;
211
+ var fails$l = fails$p;
213
212
  var global$n = global$q;
214
213
 
215
214
  var $String$6 = global$n.String;
216
215
 
217
216
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
218
- var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$k(function () {
217
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$l(function () {
219
218
  var symbol = Symbol('symbol detection');
220
219
  // Chrome 38 Symbol has incorrect toString conversion
221
220
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -233,8 +232,8 @@ var useSymbolAsUid = NATIVE_SYMBOL$2
233
232
  && !Symbol.sham
234
233
  && typeof Symbol.iterator == 'symbol';
235
234
 
236
- var getBuiltIn$8 = getBuiltIn$9;
237
- var isCallable$n = isCallable$q;
235
+ var getBuiltIn$9 = getBuiltIn$a;
236
+ var isCallable$o = isCallable$r;
238
237
  var isPrototypeOf$5 = objectIsPrototypeOf;
239
238
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
240
239
 
@@ -243,8 +242,8 @@ var $Object$3 = Object;
243
242
  var isSymbol$3 = USE_SYMBOL_AS_UID$1 ? function (it) {
244
243
  return typeof it == 'symbol';
245
244
  } : function (it) {
246
- var $Symbol = getBuiltIn$8('Symbol');
247
- return isCallable$n($Symbol) && isPrototypeOf$5($Symbol.prototype, $Object$3(it));
245
+ var $Symbol = getBuiltIn$9('Symbol');
246
+ return isCallable$o($Symbol) && isPrototypeOf$5($Symbol.prototype, $Object$3(it));
248
247
  };
249
248
 
250
249
  var $String$5 = String;
@@ -257,14 +256,14 @@ var tryToString$4 = function (argument) {
257
256
  }
258
257
  };
259
258
 
260
- var isCallable$m = isCallable$q;
259
+ var isCallable$n = isCallable$r;
261
260
  var tryToString$3 = tryToString$4;
262
261
 
263
262
  var $TypeError$f = TypeError;
264
263
 
265
264
  // `Assert: IsCallable(argument) is true`
266
265
  var aCallable$c = function (argument) {
267
- if (isCallable$m(argument)) return argument;
266
+ if (isCallable$n(argument)) return argument;
268
267
  throw new $TypeError$f(tryToString$3(argument) + ' is not a function');
269
268
  };
270
269
 
@@ -279,7 +278,7 @@ var getMethod$5 = function (V, P) {
279
278
  };
280
279
 
281
280
  var call$o = functionCall;
282
- var isCallable$l = isCallable$q;
281
+ var isCallable$m = isCallable$r;
283
282
  var isObject$d = isObject$e;
284
283
 
285
284
  var $TypeError$e = TypeError;
@@ -288,9 +287,9 @@ var $TypeError$e = TypeError;
288
287
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
289
288
  var ordinaryToPrimitive$1 = function (input, pref) {
290
289
  var fn, val;
291
- if (pref === 'string' && isCallable$l(fn = input.toString) && !isObject$d(val = call$o(fn, input))) return val;
292
- if (isCallable$l(fn = input.valueOf) && !isObject$d(val = call$o(fn, input))) return val;
293
- if (pref !== 'string' && isCallable$l(fn = input.toString) && !isObject$d(val = call$o(fn, input))) return val;
290
+ if (pref === 'string' && isCallable$m(fn = input.toString) && !isObject$d(val = call$o(fn, input))) return val;
291
+ if (isCallable$m(fn = input.valueOf) && !isObject$d(val = call$o(fn, input))) return val;
292
+ if (pref !== 'string' && isCallable$m(fn = input.toString) && !isObject$d(val = call$o(fn, input))) return val;
294
293
  throw new $TypeError$e("Can't convert object to primitive value");
295
294
  };
296
295
 
@@ -432,11 +431,11 @@ var documentCreateElement$2 = function (it) {
432
431
  };
433
432
 
434
433
  var DESCRIPTORS$k = descriptors;
435
- var fails$j = fails$o;
434
+ var fails$k = fails$p;
436
435
  var createElement$1 = documentCreateElement$2;
437
436
 
438
437
  // Thanks to IE8 for its funny defineProperty
439
- var ie8DomDefine = !DESCRIPTORS$k && !fails$j(function () {
438
+ var ie8DomDefine = !DESCRIPTORS$k && !fails$k(function () {
440
439
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
441
440
  return Object.defineProperty(createElement$1('div'), 'a', {
442
441
  get: function () { return 7; }
@@ -469,11 +468,11 @@ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$j ? $getOwnPropertyDescriptor$1 :
469
468
  var objectDefineProperty = {};
470
469
 
471
470
  var DESCRIPTORS$i = descriptors;
472
- var fails$i = fails$o;
471
+ var fails$j = fails$p;
473
472
 
474
473
  // V8 ~ Chrome 36-
475
474
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
476
- var v8PrototypeDefineBug = DESCRIPTORS$i && fails$i(function () {
475
+ var v8PrototypeDefineBug = DESCRIPTORS$i && fails$j(function () {
477
476
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
478
477
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
479
478
  value: 42,
@@ -562,18 +561,19 @@ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'somethin
562
561
  var CONFIGURABLE = EXISTS && (!DESCRIPTORS$f || (DESCRIPTORS$f && getDescriptor(FunctionPrototype$1, 'name').configurable));
563
562
 
564
563
  var functionName = {
564
+ EXISTS: EXISTS,
565
565
  PROPER: PROPER,
566
566
  CONFIGURABLE: CONFIGURABLE
567
567
  };
568
568
 
569
569
  var uncurryThis$m = functionUncurryThis;
570
- var isCallable$k = isCallable$q;
570
+ var isCallable$l = isCallable$r;
571
571
  var store$1 = sharedStoreExports;
572
572
 
573
573
  var functionToString = uncurryThis$m(Function.toString);
574
574
 
575
575
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
576
- if (!isCallable$k(store$1.inspectSource)) {
576
+ if (!isCallable$l(store$1.inspectSource)) {
577
577
  store$1.inspectSource = function (it) {
578
578
  return functionToString(it);
579
579
  };
@@ -582,11 +582,11 @@ if (!isCallable$k(store$1.inspectSource)) {
582
582
  var inspectSource$3 = store$1.inspectSource;
583
583
 
584
584
  var global$j = global$q;
585
- var isCallable$j = isCallable$q;
585
+ var isCallable$k = isCallable$r;
586
586
 
587
587
  var WeakMap$1 = global$j.WeakMap;
588
588
 
589
- var weakMapBasicDetection = isCallable$j(WeakMap$1) && /native code/.test(String(WeakMap$1));
589
+ var weakMapBasicDetection = isCallable$k(WeakMap$1) && /native code/.test(String(WeakMap$1));
590
590
 
591
591
  var shared$2 = shared$4;
592
592
  var uid = uid$2;
@@ -671,8 +671,8 @@ var internalState = {
671
671
  };
672
672
 
673
673
  var uncurryThis$l = functionUncurryThis;
674
- var fails$h = fails$o;
675
- var isCallable$i = isCallable$q;
674
+ var fails$i = fails$p;
675
+ var isCallable$j = isCallable$r;
676
676
  var hasOwn$b = hasOwnProperty_1;
677
677
  var DESCRIPTORS$e = descriptors;
678
678
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
@@ -688,7 +688,7 @@ var stringSlice$5 = uncurryThis$l(''.slice);
688
688
  var replace$7 = uncurryThis$l(''.replace);
689
689
  var join$3 = uncurryThis$l([].join);
690
690
 
691
- var CONFIGURABLE_LENGTH = DESCRIPTORS$e && !fails$h(function () {
691
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$e && !fails$i(function () {
692
692
  return defineProperty$6(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
693
693
  });
694
694
 
@@ -722,21 +722,21 @@ var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
722
722
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
723
723
  // eslint-disable-next-line no-extend-native -- required
724
724
  Function.prototype.toString = makeBuiltIn$2(function toString() {
725
- return isCallable$i(this) && getInternalState$4(this).source || inspectSource$2(this);
725
+ return isCallable$j(this) && getInternalState$4(this).source || inspectSource$2(this);
726
726
  }, 'toString');
727
727
 
728
728
  var makeBuiltInExports = makeBuiltIn$3.exports;
729
729
 
730
- var isCallable$h = isCallable$q;
730
+ var isCallable$i = isCallable$r;
731
731
  var definePropertyModule$3 = objectDefineProperty;
732
732
  var makeBuiltIn$1 = makeBuiltInExports;
733
733
  var defineGlobalProperty$1 = defineGlobalProperty$3;
734
734
 
735
- var defineBuiltIn$d = function (O, key, value, options) {
735
+ var defineBuiltIn$e = function (O, key, value, options) {
736
736
  if (!options) options = {};
737
737
  var simple = options.enumerable;
738
738
  var name = options.name !== undefined ? options.name : key;
739
- if (isCallable$h(value)) makeBuiltIn$1(value, name, options);
739
+ if (isCallable$i(value)) makeBuiltIn$1(value, name, options);
740
740
  if (options.global) {
741
741
  if (simple) O[key] = value;
742
742
  else defineGlobalProperty$1(key, value);
@@ -893,7 +893,7 @@ var objectGetOwnPropertySymbols = {};
893
893
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
894
894
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
895
895
 
896
- var getBuiltIn$7 = getBuiltIn$9;
896
+ var getBuiltIn$8 = getBuiltIn$a;
897
897
  var uncurryThis$j = functionUncurryThis;
898
898
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
899
899
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
@@ -902,7 +902,7 @@ var anObject$j = anObject$l;
902
902
  var concat$1 = uncurryThis$j([].concat);
903
903
 
904
904
  // all object keys, includes non-enumerable and symbols
905
- var ownKeys$1 = getBuiltIn$7('Reflect', 'ownKeys') || function ownKeys(it) {
905
+ var ownKeys$1 = getBuiltIn$8('Reflect', 'ownKeys') || function ownKeys(it) {
906
906
  var keys = getOwnPropertyNamesModule.f(anObject$j(it));
907
907
  var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
908
908
  return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
@@ -925,8 +925,8 @@ var copyConstructorProperties$2 = function (target, source, exceptions) {
925
925
  }
926
926
  };
927
927
 
928
- var fails$g = fails$o;
929
- var isCallable$g = isCallable$q;
928
+ var fails$h = fails$p;
929
+ var isCallable$h = isCallable$r;
930
930
 
931
931
  var replacement = /#|\.prototype\./;
932
932
 
@@ -934,7 +934,7 @@ var isForced$3 = function (feature, detection) {
934
934
  var value = data[normalize(feature)];
935
935
  return value === POLYFILL ? true
936
936
  : value === NATIVE ? false
937
- : isCallable$g(detection) ? fails$g(detection)
937
+ : isCallable$h(detection) ? fails$h(detection)
938
938
  : !!detection;
939
939
  };
940
940
 
@@ -951,7 +951,7 @@ var isForced_1 = isForced$3;
951
951
  var global$h = global$q;
952
952
  var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
953
953
  var createNonEnumerableProperty$8 = createNonEnumerableProperty$a;
954
- var defineBuiltIn$c = defineBuiltIn$d;
954
+ var defineBuiltIn$d = defineBuiltIn$e;
955
955
  var defineGlobalProperty = defineGlobalProperty$3;
956
956
  var copyConstructorProperties$1 = copyConstructorProperties$2;
957
957
  var isForced$2 = isForced_1;
@@ -999,7 +999,7 @@ var _export = function (options, source) {
999
999
  if (options.sham || (targetProperty && targetProperty.sham)) {
1000
1000
  createNonEnumerableProperty$8(sourceProperty, 'sham', true);
1001
1001
  }
1002
- defineBuiltIn$c(target, key, sourceProperty, options);
1002
+ defineBuiltIn$d(target, key, sourceProperty, options);
1003
1003
  }
1004
1004
  };
1005
1005
 
@@ -1016,7 +1016,7 @@ var objectKeys$2 = Object.keys || function keys(O) {
1016
1016
  var DESCRIPTORS$d = descriptors;
1017
1017
  var uncurryThis$i = functionUncurryThis;
1018
1018
  var call$l = functionCall;
1019
- var fails$f = fails$o;
1019
+ var fails$g = fails$p;
1020
1020
  var objectKeys$1 = objectKeys$2;
1021
1021
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1022
1022
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
@@ -1031,7 +1031,7 @@ var concat = uncurryThis$i([].concat);
1031
1031
 
1032
1032
  // `Object.assign` method
1033
1033
  // https://tc39.es/ecma262/#sec-object.assign
1034
- var objectAssign = !$assign || fails$f(function () {
1034
+ var objectAssign = !$assign || fails$g(function () {
1035
1035
  // should have correct order of operations (Edge bug)
1036
1036
  if (DESCRIPTORS$d && $assign({ b: 1 }, $assign(defineProperty$5({}, 'a', {
1037
1037
  enumerable: true,
@@ -1070,13 +1070,13 @@ var objectAssign = !$assign || fails$f(function () {
1070
1070
  } return T;
1071
1071
  } : $assign;
1072
1072
 
1073
- var $$l = _export;
1073
+ var $$m = _export;
1074
1074
  var assign$1 = objectAssign;
1075
1075
 
1076
1076
  // `Object.assign` method
1077
1077
  // https://tc39.es/ecma262/#sec-object.assign
1078
1078
  // eslint-disable-next-line es/no-object-assign -- required for testing
1079
- $$l({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign$1 }, {
1079
+ $$m({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign$1 }, {
1080
1080
  assign: assign$1
1081
1081
  });
1082
1082
 
@@ -1113,9 +1113,9 @@ objectDefineProperties.f = DESCRIPTORS$c && !V8_PROTOTYPE_DEFINE_BUG ? Object.de
1113
1113
  return O;
1114
1114
  };
1115
1115
 
1116
- var getBuiltIn$6 = getBuiltIn$9;
1116
+ var getBuiltIn$7 = getBuiltIn$a;
1117
1117
 
1118
- var html$2 = getBuiltIn$6('document', 'documentElement');
1118
+ var html$2 = getBuiltIn$7('document', 'documentElement');
1119
1119
 
1120
1120
  /* global ActiveXObject -- old IE, WSH */
1121
1121
  var anObject$h = anObject$l;
@@ -1224,9 +1224,9 @@ var addToUnscopables$2 = function (key) {
1224
1224
 
1225
1225
  var iterators = {};
1226
1226
 
1227
- var fails$e = fails$o;
1227
+ var fails$f = fails$p;
1228
1228
 
1229
- var correctPrototypeGetter = !fails$e(function () {
1229
+ var correctPrototypeGetter = !fails$f(function () {
1230
1230
  function F() { /* empty */ }
1231
1231
  F.prototype.constructor = null;
1232
1232
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
@@ -1234,7 +1234,7 @@ var correctPrototypeGetter = !fails$e(function () {
1234
1234
  });
1235
1235
 
1236
1236
  var hasOwn$8 = hasOwnProperty_1;
1237
- var isCallable$f = isCallable$q;
1237
+ var isCallable$g = isCallable$r;
1238
1238
  var toObject$1 = toObject$4;
1239
1239
  var sharedKey = sharedKey$3;
1240
1240
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
@@ -1250,16 +1250,16 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
1250
1250
  var object = toObject$1(O);
1251
1251
  if (hasOwn$8(object, IE_PROTO)) return object[IE_PROTO];
1252
1252
  var constructor = object.constructor;
1253
- if (isCallable$f(constructor) && object instanceof constructor) {
1253
+ if (isCallable$g(constructor) && object instanceof constructor) {
1254
1254
  return constructor.prototype;
1255
1255
  } return object instanceof $Object$1 ? ObjectPrototype : null;
1256
1256
  };
1257
1257
 
1258
- var fails$d = fails$o;
1259
- var isCallable$e = isCallable$q;
1258
+ var fails$e = fails$p;
1259
+ var isCallable$f = isCallable$r;
1260
1260
  var isObject$8 = isObject$e;
1261
1261
  var getPrototypeOf$2 = objectGetPrototypeOf;
1262
- var defineBuiltIn$b = defineBuiltIn$d;
1262
+ var defineBuiltIn$c = defineBuiltIn$e;
1263
1263
  var wellKnownSymbol$j = wellKnownSymbol$m;
1264
1264
 
1265
1265
  var ITERATOR$8 = wellKnownSymbol$j('iterator');
@@ -1280,7 +1280,7 @@ if ([].keys) {
1280
1280
  }
1281
1281
  }
1282
1282
 
1283
- var NEW_ITERATOR_PROTOTYPE = !isObject$8(IteratorPrototype$4) || fails$d(function () {
1283
+ var NEW_ITERATOR_PROTOTYPE = !isObject$8(IteratorPrototype$4) || fails$e(function () {
1284
1284
  var test = {};
1285
1285
  // FF44- legacy iterators case
1286
1286
  return IteratorPrototype$4[ITERATOR$8].call(test) !== test;
@@ -1290,8 +1290,8 @@ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$4 = {};
1290
1290
 
1291
1291
  // `%IteratorPrototype%[@@iterator]()` method
1292
1292
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1293
- if (!isCallable$e(IteratorPrototype$4[ITERATOR$8])) {
1294
- defineBuiltIn$b(IteratorPrototype$4, ITERATOR$8, function () {
1293
+ if (!isCallable$f(IteratorPrototype$4[ITERATOR$8])) {
1294
+ defineBuiltIn$c(IteratorPrototype$4, ITERATOR$8, function () {
1295
1295
  return this;
1296
1296
  });
1297
1297
  }
@@ -1385,16 +1385,16 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1385
1385
  };
1386
1386
  }() : undefined);
1387
1387
 
1388
- var $$k = _export;
1388
+ var $$l = _export;
1389
1389
  var call$k = functionCall;
1390
1390
  var FunctionName = functionName;
1391
- var isCallable$d = isCallable$q;
1391
+ var isCallable$e = isCallable$r;
1392
1392
  var createIteratorConstructor$1 = iteratorCreateConstructor;
1393
1393
  var getPrototypeOf$1 = objectGetPrototypeOf;
1394
1394
  var setPrototypeOf$3 = objectSetPrototypeOf;
1395
1395
  var setToStringTag$4 = setToStringTag$6;
1396
1396
  var createNonEnumerableProperty$7 = createNonEnumerableProperty$a;
1397
- var defineBuiltIn$a = defineBuiltIn$d;
1397
+ var defineBuiltIn$b = defineBuiltIn$e;
1398
1398
  var wellKnownSymbol$h = wellKnownSymbol$m;
1399
1399
  var Iterators$3 = iterators;
1400
1400
  var IteratorsCore = iteratorsCore;
@@ -1443,8 +1443,8 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1443
1443
  if (getPrototypeOf$1(CurrentIteratorPrototype) !== IteratorPrototype$2) {
1444
1444
  if (setPrototypeOf$3) {
1445
1445
  setPrototypeOf$3(CurrentIteratorPrototype, IteratorPrototype$2);
1446
- } else if (!isCallable$d(CurrentIteratorPrototype[ITERATOR$7])) {
1447
- defineBuiltIn$a(CurrentIteratorPrototype, ITERATOR$7, returnThis);
1446
+ } else if (!isCallable$e(CurrentIteratorPrototype[ITERATOR$7])) {
1447
+ defineBuiltIn$b(CurrentIteratorPrototype, ITERATOR$7, returnThis);
1448
1448
  }
1449
1449
  }
1450
1450
  // Set @@toStringTag to native iterators
@@ -1471,14 +1471,14 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
1471
1471
  };
1472
1472
  if (FORCED) for (KEY in methods) {
1473
1473
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1474
- defineBuiltIn$a(IterablePrototype, KEY, methods[KEY]);
1474
+ defineBuiltIn$b(IterablePrototype, KEY, methods[KEY]);
1475
1475
  }
1476
- } else $$k({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1476
+ } else $$l({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1477
1477
  }
1478
1478
 
1479
1479
  // define iterator
1480
1480
  if (IterablePrototype[ITERATOR$7] !== defaultIterator) {
1481
- defineBuiltIn$a(IterablePrototype, ITERATOR$7, defaultIterator, { name: DEFAULT });
1481
+ defineBuiltIn$b(IterablePrototype, ITERATOR$7, defaultIterator, { name: DEFAULT });
1482
1482
  }
1483
1483
  Iterators$3[NAME] = defaultIterator;
1484
1484
 
@@ -1664,20 +1664,18 @@ const useExperimentVariant = data => {
1664
1664
  viewAs
1665
1665
  } = data;
1666
1666
  const variantId = viewAs == null ? void 0 : viewAs.variantId;
1667
-
1668
1667
  // By default, wait for the variant
1669
1668
  const [shouldWaitForVariant, setShouldWaitForVariant] = useState(true);
1670
1669
  useEffect(() => {
1671
1670
  var _getUVEState;
1672
- const isInsideEditor = ((_getUVEState = getUVEState()) == null ? void 0 : _getUVEState.mode) === UVE_MODE.EDIT;
1671
+ // Any UVE mode counts as "inside the editor" - must match DotExperimentsProvider's check.
1672
+ const isInsideEditor = !!((_getUVEState = getUVEState()) != null && _getUVEState.mode);
1673
1673
  if (isInsideEditor || !runningExperimentId) {
1674
1674
  setShouldWaitForVariant(false);
1675
1675
  return;
1676
1676
  }
1677
-
1678
1677
  // If variantId is not provided, show content and warn
1679
1678
  if (!variantId) {
1680
- // eslint-disable-next-line no-console
1681
1679
  console.warn('[DotExperiments] variantId is required but missing. ' + 'Please ensure the page data includes variantId in viewAs. ' + 'Showing content to prevent blank screen.');
1682
1680
  setShouldWaitForVariant(false);
1683
1681
  return;
@@ -1721,59 +1719,60 @@ const DotExperimentHandlingComponent = _ref => {
1721
1719
  shouldWaitForVariant
1722
1720
  } = useExperimentVariant(props.page);
1723
1721
  if (shouldWaitForVariant) {
1724
- return /*#__PURE__*/jsx("div", {
1722
+ return jsx("div", {
1725
1723
  style: {
1726
1724
  visibility: 'hidden'
1727
1725
  },
1728
- children: /*#__PURE__*/jsx(WrappedComponent, Object.assign({}, props))
1726
+ children: jsx(WrappedComponent, Object.assign({}, props))
1729
1727
  });
1730
1728
  }
1731
- return /*#__PURE__*/jsx(WrappedComponent, Object.assign({}, props));
1729
+ return jsx(WrappedComponent, Object.assign({}, props));
1732
1730
  };
1733
1731
 
1734
- var NATIVE_BIND$1 = functionBindNative;
1732
+ var global$f = global$q;
1733
+ var classof$a = classofRaw$2;
1735
1734
 
1736
- var FunctionPrototype = Function.prototype;
1737
- var apply$3 = FunctionPrototype.apply;
1738
- var call$j = FunctionPrototype.call;
1735
+ var engineIsNode = classof$a(global$f.process) === 'process';
1739
1736
 
1740
- // eslint-disable-next-line es/no-reflect -- safe
1741
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$j.bind(apply$3) : function () {
1742
- return call$j.apply(apply$3, arguments);
1743
- });
1737
+ var makeBuiltIn = makeBuiltInExports;
1738
+ var defineProperty$1 = objectDefineProperty;
1744
1739
 
1745
- var defineProperty$1 = objectDefineProperty.f;
1740
+ var defineBuiltInAccessor$6 = function (target, name, descriptor) {
1741
+ if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
1742
+ if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
1743
+ return defineProperty$1.f(target, name, descriptor);
1744
+ };
1746
1745
 
1747
- var proxyAccessor$2 = function (Target, Source, key) {
1748
- key in Target || defineProperty$1(Target, key, {
1749
- configurable: true,
1750
- get: function () { return Source[key]; },
1751
- set: function (it) { Source[key] = it; }
1752
- });
1746
+ var getBuiltIn$6 = getBuiltIn$a;
1747
+ var defineBuiltInAccessor$5 = defineBuiltInAccessor$6;
1748
+ var wellKnownSymbol$f = wellKnownSymbol$m;
1749
+ var DESCRIPTORS$a = descriptors;
1750
+
1751
+ var SPECIES$3 = wellKnownSymbol$f('species');
1752
+
1753
+ var setSpecies$2 = function (CONSTRUCTOR_NAME) {
1754
+ var Constructor = getBuiltIn$6(CONSTRUCTOR_NAME);
1755
+
1756
+ if (DESCRIPTORS$a && Constructor && !Constructor[SPECIES$3]) {
1757
+ defineBuiltInAccessor$5(Constructor, SPECIES$3, {
1758
+ configurable: true,
1759
+ get: function () { return this; }
1760
+ });
1761
+ }
1753
1762
  };
1754
1763
 
1755
- var isCallable$c = isCallable$q;
1756
- var isObject$5 = isObject$e;
1757
- var setPrototypeOf$2 = objectSetPrototypeOf;
1764
+ var isPrototypeOf$4 = objectIsPrototypeOf;
1758
1765
 
1759
- // makes subclassing work correct for wrapped built-ins
1760
- var inheritIfRequired$2 = function ($this, dummy, Wrapper) {
1761
- var NewTarget, NewTargetPrototype;
1762
- if (
1763
- // it can work only with native `setPrototypeOf`
1764
- setPrototypeOf$2 &&
1765
- // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
1766
- isCallable$c(NewTarget = dummy.constructor) &&
1767
- NewTarget !== Wrapper &&
1768
- isObject$5(NewTargetPrototype = NewTarget.prototype) &&
1769
- NewTargetPrototype !== Wrapper.prototype
1770
- ) setPrototypeOf$2($this, NewTargetPrototype);
1771
- return $this;
1766
+ var $TypeError$9 = TypeError;
1767
+
1768
+ var anInstance$4 = function (it, Prototype) {
1769
+ if (isPrototypeOf$4(Prototype, it)) return it;
1770
+ throw new $TypeError$9('Incorrect invocation');
1772
1771
  };
1773
1772
 
1774
- var wellKnownSymbol$f = wellKnownSymbol$m;
1773
+ var wellKnownSymbol$e = wellKnownSymbol$m;
1775
1774
 
1776
- var TO_STRING_TAG$3 = wellKnownSymbol$f('toStringTag');
1775
+ var TO_STRING_TAG$3 = wellKnownSymbol$e('toStringTag');
1777
1776
  var test = {};
1778
1777
 
1779
1778
  test[TO_STRING_TAG$3] = 'z';
@@ -1781,11 +1780,11 @@ test[TO_STRING_TAG$3] = 'z';
1781
1780
  var toStringTagSupport = String(test) === '[object z]';
1782
1781
 
1783
1782
  var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1784
- var isCallable$b = isCallable$q;
1783
+ var isCallable$d = isCallable$r;
1785
1784
  var classofRaw$1 = classofRaw$2;
1786
- var wellKnownSymbol$e = wellKnownSymbol$m;
1785
+ var wellKnownSymbol$d = wellKnownSymbol$m;
1787
1786
 
1788
- var TO_STRING_TAG$2 = wellKnownSymbol$e('toStringTag');
1787
+ var TO_STRING_TAG$2 = wellKnownSymbol$d('toStringTag');
1789
1788
  var $Object = Object;
1790
1789
 
1791
1790
  // ES3 wrong here
@@ -1799,7 +1798,7 @@ var tryGet = function (it, key) {
1799
1798
  };
1800
1799
 
1801
1800
  // getting tag from ES6+ `Object.prototype.toString`
1802
- var classof$a = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1801
+ var classof$9 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1803
1802
  var O, tag, result;
1804
1803
  return it === undefined ? 'Undefined' : it === null ? 'Null'
1805
1804
  // @@toStringTag case
@@ -1807,501 +1806,170 @@ var classof$a = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1807
1806
  // builtinTag case
1808
1807
  : CORRECT_ARGUMENTS ? classofRaw$1(O)
1809
1808
  // ES3 arguments fallback
1810
- : (result = classofRaw$1(O)) === 'Object' && isCallable$b(O.callee) ? 'Arguments' : result;
1809
+ : (result = classofRaw$1(O)) === 'Object' && isCallable$d(O.callee) ? 'Arguments' : result;
1811
1810
  };
1812
1811
 
1813
- var classof$9 = classof$a;
1814
-
1815
- var $String$1 = String;
1816
-
1817
- var toString$b = function (argument) {
1818
- if (classof$9(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
1819
- return $String$1(argument);
1820
- };
1812
+ var uncurryThis$g = functionUncurryThis;
1813
+ var fails$d = fails$p;
1814
+ var isCallable$c = isCallable$r;
1815
+ var classof$8 = classof$9;
1816
+ var getBuiltIn$5 = getBuiltIn$a;
1817
+ var inspectSource$1 = inspectSource$3;
1821
1818
 
1822
- var toString$a = toString$b;
1819
+ var noop = function () { /* empty */ };
1820
+ var construct = getBuiltIn$5('Reflect', 'construct');
1821
+ var constructorRegExp = /^\s*(?:class|function)\b/;
1822
+ var exec$5 = uncurryThis$g(constructorRegExp.exec);
1823
+ var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
1823
1824
 
1824
- var normalizeStringArgument$1 = function (argument, $default) {
1825
- return argument === undefined ? arguments.length < 2 ? '' : $default : toString$a(argument);
1825
+ var isConstructorModern = function isConstructor(argument) {
1826
+ if (!isCallable$c(argument)) return false;
1827
+ try {
1828
+ construct(noop, [], argument);
1829
+ return true;
1830
+ } catch (error) {
1831
+ return false;
1832
+ }
1826
1833
  };
1827
1834
 
1828
- var isObject$4 = isObject$e;
1829
- var createNonEnumerableProperty$5 = createNonEnumerableProperty$a;
1830
-
1831
- // `InstallErrorCause` abstract operation
1832
- // https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
1833
- var installErrorCause$1 = function (O, options) {
1834
- if (isObject$4(options) && 'cause' in options) {
1835
- createNonEnumerableProperty$5(O, 'cause', options.cause);
1835
+ var isConstructorLegacy = function isConstructor(argument) {
1836
+ if (!isCallable$c(argument)) return false;
1837
+ switch (classof$8(argument)) {
1838
+ case 'AsyncFunction':
1839
+ case 'GeneratorFunction':
1840
+ case 'AsyncGeneratorFunction': return false;
1841
+ }
1842
+ try {
1843
+ // we can't check .prototype since constructors produced by .bind haven't it
1844
+ // `Function#toString` throws on some built-it function in some legacy engines
1845
+ // (for example, `DOMQuad` and similar in FF41-)
1846
+ return INCORRECT_TO_STRING || !!exec$5(constructorRegExp, inspectSource$1(argument));
1847
+ } catch (error) {
1848
+ return true;
1836
1849
  }
1837
1850
  };
1838
1851
 
1839
- var uncurryThis$g = functionUncurryThis;
1840
-
1841
- var $Error = Error;
1842
- var replace$6 = uncurryThis$g(''.replace);
1852
+ isConstructorLegacy.sham = true;
1843
1853
 
1844
- var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
1845
- // eslint-disable-next-line redos/no-vulnerable -- safe
1846
- var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
1847
- var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
1854
+ // `IsConstructor` abstract operation
1855
+ // https://tc39.es/ecma262/#sec-isconstructor
1856
+ var isConstructor$2 = !construct || fails$d(function () {
1857
+ var called;
1858
+ return isConstructorModern(isConstructorModern.call)
1859
+ || !isConstructorModern(Object)
1860
+ || !isConstructorModern(function () { called = true; })
1861
+ || called;
1862
+ }) ? isConstructorLegacy : isConstructorModern;
1848
1863
 
1849
- var errorStackClear = function (stack, dropEntries) {
1850
- if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
1851
- while (dropEntries--) stack = replace$6(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
1852
- } return stack;
1853
- };
1864
+ var isConstructor$1 = isConstructor$2;
1865
+ var tryToString$2 = tryToString$4;
1854
1866
 
1855
- var fails$c = fails$o;
1856
- var createPropertyDescriptor$2 = createPropertyDescriptor$6;
1867
+ var $TypeError$8 = TypeError;
1857
1868
 
1858
- var errorStackInstallable = !fails$c(function () {
1859
- var error = new Error('a');
1860
- if (!('stack' in error)) return true;
1861
- // eslint-disable-next-line es/no-object-defineproperty -- safe
1862
- Object.defineProperty(error, 'stack', createPropertyDescriptor$2(1, 7));
1863
- return error.stack !== 7;
1864
- });
1869
+ // `Assert: IsConstructor(argument) is true`
1870
+ var aConstructor$1 = function (argument) {
1871
+ if (isConstructor$1(argument)) return argument;
1872
+ throw new $TypeError$8(tryToString$2(argument) + ' is not a constructor');
1873
+ };
1865
1874
 
1866
- var createNonEnumerableProperty$4 = createNonEnumerableProperty$a;
1867
- var clearErrorStack = errorStackClear;
1868
- var ERROR_STACK_INSTALLABLE = errorStackInstallable;
1875
+ var anObject$g = anObject$l;
1876
+ var aConstructor = aConstructor$1;
1877
+ var isNullOrUndefined$2 = isNullOrUndefined$5;
1878
+ var wellKnownSymbol$c = wellKnownSymbol$m;
1869
1879
 
1870
- // non-standard V8
1871
- var captureStackTrace = Error.captureStackTrace;
1880
+ var SPECIES$2 = wellKnownSymbol$c('species');
1872
1881
 
1873
- var errorStackInstall = function (error, C, stack, dropEntries) {
1874
- if (ERROR_STACK_INSTALLABLE) {
1875
- if (captureStackTrace) captureStackTrace(error, C);
1876
- else createNonEnumerableProperty$4(error, 'stack', clearErrorStack(stack, dropEntries));
1877
- }
1882
+ // `SpeciesConstructor` abstract operation
1883
+ // https://tc39.es/ecma262/#sec-speciesconstructor
1884
+ var speciesConstructor$2 = function (O, defaultConstructor) {
1885
+ var C = anObject$g(O).constructor;
1886
+ var S;
1887
+ return C === undefined || isNullOrUndefined$2(S = anObject$g(C)[SPECIES$2]) ? defaultConstructor : aConstructor(S);
1878
1888
  };
1879
1889
 
1880
- var getBuiltIn$5 = getBuiltIn$9;
1881
- var hasOwn$6 = hasOwnProperty_1;
1882
- var createNonEnumerableProperty$3 = createNonEnumerableProperty$a;
1883
- var isPrototypeOf$4 = objectIsPrototypeOf;
1884
- var setPrototypeOf$1 = objectSetPrototypeOf;
1885
- var copyConstructorProperties = copyConstructorProperties$2;
1886
- var proxyAccessor$1 = proxyAccessor$2;
1887
- var inheritIfRequired$1 = inheritIfRequired$2;
1888
- var normalizeStringArgument = normalizeStringArgument$1;
1889
- var installErrorCause = installErrorCause$1;
1890
- var installErrorStack = errorStackInstall;
1891
- var DESCRIPTORS$a = descriptors;
1892
-
1893
- var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
1894
- var STACK_TRACE_LIMIT = 'stackTraceLimit';
1895
- var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
1896
- var path = FULL_NAME.split('.');
1897
- var ERROR_NAME = path[path.length - 1];
1898
- var OriginalError = getBuiltIn$5.apply(null, path);
1890
+ var NATIVE_BIND$1 = functionBindNative;
1899
1891
 
1900
- if (!OriginalError) return;
1892
+ var FunctionPrototype = Function.prototype;
1893
+ var apply$3 = FunctionPrototype.apply;
1894
+ var call$j = FunctionPrototype.call;
1901
1895
 
1902
- var OriginalErrorPrototype = OriginalError.prototype;
1896
+ // eslint-disable-next-line es/no-reflect -- safe
1897
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND$1 ? call$j.bind(apply$3) : function () {
1898
+ return call$j.apply(apply$3, arguments);
1899
+ });
1903
1900
 
1904
- // V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
1905
- if (hasOwn$6(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
1901
+ var classofRaw = classofRaw$2;
1902
+ var uncurryThis$f = functionUncurryThis;
1906
1903
 
1907
- if (!FORCED) return OriginalError;
1904
+ var functionUncurryThisClause = function (fn) {
1905
+ // Nashorn bug:
1906
+ // https://github.com/zloirock/core-js/issues/1128
1907
+ // https://github.com/zloirock/core-js/issues/1130
1908
+ if (classofRaw(fn) === 'Function') return uncurryThis$f(fn);
1909
+ };
1908
1910
 
1909
- var BaseError = getBuiltIn$5('Error');
1911
+ var uncurryThis$e = functionUncurryThisClause;
1912
+ var aCallable$9 = aCallable$c;
1913
+ var NATIVE_BIND = functionBindNative;
1910
1914
 
1911
- var WrappedError = wrapper(function (a, b) {
1912
- var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
1913
- var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
1914
- if (message !== undefined) createNonEnumerableProperty$3(result, 'message', message);
1915
- installErrorStack(result, WrappedError, result.stack, 2);
1916
- if (this && isPrototypeOf$4(OriginalErrorPrototype, this)) inheritIfRequired$1(result, this, WrappedError);
1917
- if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
1918
- return result;
1919
- });
1915
+ var bind$7 = uncurryThis$e(uncurryThis$e.bind);
1920
1916
 
1921
- WrappedError.prototype = OriginalErrorPrototype;
1917
+ // optional / simple context binding
1918
+ var functionBindContext = function (fn, that) {
1919
+ aCallable$9(fn);
1920
+ return that === undefined ? fn : NATIVE_BIND ? bind$7(fn, that) : function (/* ...args */) {
1921
+ return fn.apply(that, arguments);
1922
+ };
1923
+ };
1922
1924
 
1923
- if (ERROR_NAME !== 'Error') {
1924
- if (setPrototypeOf$1) setPrototypeOf$1(WrappedError, BaseError);
1925
- else copyConstructorProperties(WrappedError, BaseError, { name: true });
1926
- } else if (DESCRIPTORS$a && STACK_TRACE_LIMIT in OriginalError) {
1927
- proxyAccessor$1(WrappedError, OriginalError, STACK_TRACE_LIMIT);
1928
- proxyAccessor$1(WrappedError, OriginalError, 'prepareStackTrace');
1929
- }
1925
+ var uncurryThis$d = functionUncurryThis;
1930
1926
 
1931
- copyConstructorProperties(WrappedError, OriginalError);
1927
+ var arraySlice$4 = uncurryThis$d([].slice);
1932
1928
 
1933
- try {
1934
- // Safari 13- bug: WebAssembly errors does not have a proper `.name`
1935
- if (OriginalErrorPrototype.name !== ERROR_NAME) {
1936
- createNonEnumerableProperty$3(OriginalErrorPrototype, 'name', ERROR_NAME);
1937
- }
1938
- OriginalErrorPrototype.constructor = WrappedError;
1939
- } catch (error) { /* empty */ }
1929
+ var $TypeError$7 = TypeError;
1940
1930
 
1941
- return WrappedError;
1931
+ var validateArgumentsLength$5 = function (passed, required) {
1932
+ if (passed < required) throw new $TypeError$7('Not enough arguments');
1933
+ return passed;
1942
1934
  };
1943
1935
 
1944
- /* eslint-disable no-unused-vars -- required for functions `.length` */
1945
- var $$j = _export;
1946
- var global$f = global$q;
1947
- var apply$2 = functionApply;
1948
- var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
1936
+ var userAgent$2 = engineUserAgent;
1949
1937
 
1950
- var WEB_ASSEMBLY = 'WebAssembly';
1951
- var WebAssembly = global$f[WEB_ASSEMBLY];
1938
+ // eslint-disable-next-line redos/no-vulnerable -- safe
1939
+ var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
1952
1940
 
1953
- // eslint-disable-next-line es/no-error-cause -- feature detection
1954
- var FORCED$1 = new Error('e', { cause: 7 }).cause !== 7;
1941
+ var global$e = global$q;
1942
+ var apply$2 = functionApply;
1943
+ var bind$6 = functionBindContext;
1944
+ var isCallable$b = isCallable$r;
1945
+ var hasOwn$6 = hasOwnProperty_1;
1946
+ var fails$c = fails$p;
1947
+ var html = html$2;
1948
+ var arraySlice$3 = arraySlice$4;
1949
+ var createElement = documentCreateElement$2;
1950
+ var validateArgumentsLength$4 = validateArgumentsLength$5;
1951
+ var IS_IOS$1 = engineIsIos;
1952
+ var IS_NODE$3 = engineIsNode;
1955
1953
 
1956
- var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
1957
- var O = {};
1958
- O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$1);
1959
- $$j({ global: true, constructor: true, arity: 1, forced: FORCED$1 }, O);
1960
- };
1954
+ var set = global$e.setImmediate;
1955
+ var clear = global$e.clearImmediate;
1956
+ var process$2 = global$e.process;
1957
+ var Dispatch = global$e.Dispatch;
1958
+ var Function$1 = global$e.Function;
1959
+ var MessageChannel = global$e.MessageChannel;
1960
+ var String$1 = global$e.String;
1961
+ var counter = 0;
1962
+ var queue$2 = {};
1963
+ var ONREADYSTATECHANGE = 'onreadystatechange';
1964
+ var $location, defer, channel, port;
1961
1965
 
1962
- var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
1963
- if (WebAssembly && WebAssembly[ERROR_NAME]) {
1964
- var O = {};
1965
- O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$1);
1966
- $$j({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED$1 }, O);
1967
- }
1968
- };
1969
-
1970
- // https://tc39.es/ecma262/#sec-nativeerror
1971
- exportGlobalErrorCauseWrapper('Error', function (init) {
1972
- return function Error(message) { return apply$2(init, this, arguments); };
1973
- });
1974
- exportGlobalErrorCauseWrapper('EvalError', function (init) {
1975
- return function EvalError(message) { return apply$2(init, this, arguments); };
1976
- });
1977
- exportGlobalErrorCauseWrapper('RangeError', function (init) {
1978
- return function RangeError(message) { return apply$2(init, this, arguments); };
1979
- });
1980
- exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
1981
- return function ReferenceError(message) { return apply$2(init, this, arguments); };
1982
- });
1983
- exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
1984
- return function SyntaxError(message) { return apply$2(init, this, arguments); };
1985
- });
1986
- exportGlobalErrorCauseWrapper('TypeError', function (init) {
1987
- return function TypeError(message) { return apply$2(init, this, arguments); };
1988
- });
1989
- exportGlobalErrorCauseWrapper('URIError', function (init) {
1990
- return function URIError(message) { return apply$2(init, this, arguments); };
1991
- });
1992
- exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
1993
- return function CompileError(message) { return apply$2(init, this, arguments); };
1994
- });
1995
- exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
1996
- return function LinkError(message) { return apply$2(init, this, arguments); };
1997
- });
1998
- exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
1999
- return function RuntimeError(message) { return apply$2(init, this, arguments); };
2000
- });
2001
-
2002
- var uncurryThis$f = functionUncurryThis;
2003
-
2004
- var arraySlice$4 = uncurryThis$f([].slice);
2005
-
2006
- var classof$8 = classofRaw$2;
2007
-
2008
- // `IsArray` abstract operation
2009
- // https://tc39.es/ecma262/#sec-isarray
2010
- // eslint-disable-next-line es/no-array-isarray -- safe
2011
- var isArray$1 = Array.isArray || function isArray(argument) {
2012
- return classof$8(argument) === 'Array';
2013
- };
2014
-
2015
- var uncurryThis$e = functionUncurryThis;
2016
- var isArray = isArray$1;
2017
- var isCallable$a = isCallable$q;
2018
- var classof$7 = classofRaw$2;
2019
- var toString$9 = toString$b;
2020
-
2021
- var push$4 = uncurryThis$e([].push);
2022
-
2023
- var getJsonReplacerFunction = function (replacer) {
2024
- if (isCallable$a(replacer)) return replacer;
2025
- if (!isArray(replacer)) return;
2026
- var rawLength = replacer.length;
2027
- var keys = [];
2028
- for (var i = 0; i < rawLength; i++) {
2029
- var element = replacer[i];
2030
- if (typeof element == 'string') push$4(keys, element);
2031
- else if (typeof element == 'number' || classof$7(element) === 'Number' || classof$7(element) === 'String') push$4(keys, toString$9(element));
2032
- }
2033
- var keysLength = keys.length;
2034
- var root = true;
2035
- return function (key, value) {
2036
- if (root) {
2037
- root = false;
2038
- return value;
2039
- }
2040
- if (isArray(this)) return value;
2041
- for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value;
2042
- };
2043
- };
2044
-
2045
- var $$i = _export;
2046
- var getBuiltIn$4 = getBuiltIn$9;
2047
- var apply$1 = functionApply;
2048
- var call$i = functionCall;
2049
- var uncurryThis$d = functionUncurryThis;
2050
- var fails$b = fails$o;
2051
- var isCallable$9 = isCallable$q;
2052
- var isSymbol = isSymbol$3;
2053
- var arraySlice$3 = arraySlice$4;
2054
- var getReplacerFunction = getJsonReplacerFunction;
2055
- var NATIVE_SYMBOL = symbolConstructorDetection;
2056
-
2057
- var $String = String;
2058
- var $stringify = getBuiltIn$4('JSON', 'stringify');
2059
- var exec$5 = uncurryThis$d(/./.exec);
2060
- var charAt$6 = uncurryThis$d(''.charAt);
2061
- var charCodeAt$2 = uncurryThis$d(''.charCodeAt);
2062
- var replace$5 = uncurryThis$d(''.replace);
2063
- var numberToString$1 = uncurryThis$d(1.0.toString);
2064
-
2065
- var tester = /[\uD800-\uDFFF]/g;
2066
- var low = /^[\uD800-\uDBFF]$/;
2067
- var hi = /^[\uDC00-\uDFFF]$/;
2068
-
2069
- var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails$b(function () {
2070
- var symbol = getBuiltIn$4('Symbol')('stringify detection');
2071
- // MS Edge converts symbol values to JSON as {}
2072
- return $stringify([symbol]) !== '[null]'
2073
- // WebKit converts symbol values to JSON as null
2074
- || $stringify({ a: symbol }) !== '{}'
2075
- // V8 throws on boxed symbols
2076
- || $stringify(Object(symbol)) !== '{}';
2077
- });
2078
-
2079
- // https://github.com/tc39/proposal-well-formed-stringify
2080
- var ILL_FORMED_UNICODE = fails$b(function () {
2081
- return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"'
2082
- || $stringify('\uDEAD') !== '"\\udead"';
2083
- });
2084
-
2085
- var stringifyWithSymbolsFix = function (it, replacer) {
2086
- var args = arraySlice$3(arguments);
2087
- var $replacer = getReplacerFunction(replacer);
2088
- if (!isCallable$9($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined
2089
- args[1] = function (key, value) {
2090
- // some old implementations (like WebKit) could pass numbers as keys
2091
- if (isCallable$9($replacer)) value = call$i($replacer, this, $String(key), value);
2092
- if (!isSymbol(value)) return value;
2093
- };
2094
- return apply$1($stringify, null, args);
2095
- };
2096
-
2097
- var fixIllFormed = function (match, offset, string) {
2098
- var prev = charAt$6(string, offset - 1);
2099
- var next = charAt$6(string, offset + 1);
2100
- if ((exec$5(low, match) && !exec$5(hi, next)) || (exec$5(hi, match) && !exec$5(low, prev))) {
2101
- return '\\u' + numberToString$1(charCodeAt$2(match, 0), 16);
2102
- } return match;
2103
- };
2104
-
2105
- if ($stringify) {
2106
- // `JSON.stringify` method
2107
- // https://tc39.es/ecma262/#sec-json.stringify
2108
- $$i({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
2109
- // eslint-disable-next-line no-unused-vars -- required for `.length`
2110
- stringify: function stringify(it, replacer, space) {
2111
- var args = arraySlice$3(arguments);
2112
- var result = apply$1(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);
2113
- return ILL_FORMED_UNICODE && typeof result == 'string' ? replace$5(result, tester, fixIllFormed) : result;
2114
- }
2115
- });
2116
- }
2117
-
2118
- var global$e = global$q;
2119
- var classof$6 = classofRaw$2;
2120
-
2121
- var engineIsNode = classof$6(global$e.process) === 'process';
2122
-
2123
- var makeBuiltIn = makeBuiltInExports;
2124
- var defineProperty = objectDefineProperty;
2125
-
2126
- var defineBuiltInAccessor$6 = function (target, name, descriptor) {
2127
- if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
2128
- if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
2129
- return defineProperty.f(target, name, descriptor);
2130
- };
2131
-
2132
- var getBuiltIn$3 = getBuiltIn$9;
2133
- var defineBuiltInAccessor$5 = defineBuiltInAccessor$6;
2134
- var wellKnownSymbol$d = wellKnownSymbol$m;
2135
- var DESCRIPTORS$9 = descriptors;
2136
-
2137
- var SPECIES$3 = wellKnownSymbol$d('species');
2138
-
2139
- var setSpecies$2 = function (CONSTRUCTOR_NAME) {
2140
- var Constructor = getBuiltIn$3(CONSTRUCTOR_NAME);
2141
-
2142
- if (DESCRIPTORS$9 && Constructor && !Constructor[SPECIES$3]) {
2143
- defineBuiltInAccessor$5(Constructor, SPECIES$3, {
2144
- configurable: true,
2145
- get: function () { return this; }
2146
- });
2147
- }
2148
- };
2149
-
2150
- var isPrototypeOf$3 = objectIsPrototypeOf;
2151
-
2152
- var $TypeError$9 = TypeError;
2153
-
2154
- var anInstance$4 = function (it, Prototype) {
2155
- if (isPrototypeOf$3(Prototype, it)) return it;
2156
- throw new $TypeError$9('Incorrect invocation');
2157
- };
2158
-
2159
- var uncurryThis$c = functionUncurryThis;
2160
- var fails$a = fails$o;
2161
- var isCallable$8 = isCallable$q;
2162
- var classof$5 = classof$a;
2163
- var getBuiltIn$2 = getBuiltIn$9;
2164
- var inspectSource$1 = inspectSource$3;
2165
-
2166
- var noop = function () { /* empty */ };
2167
- var construct = getBuiltIn$2('Reflect', 'construct');
2168
- var constructorRegExp = /^\s*(?:class|function)\b/;
2169
- var exec$4 = uncurryThis$c(constructorRegExp.exec);
2170
- var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
2171
-
2172
- var isConstructorModern = function isConstructor(argument) {
2173
- if (!isCallable$8(argument)) return false;
2174
- try {
2175
- construct(noop, [], argument);
2176
- return true;
2177
- } catch (error) {
2178
- return false;
2179
- }
2180
- };
2181
-
2182
- var isConstructorLegacy = function isConstructor(argument) {
2183
- if (!isCallable$8(argument)) return false;
2184
- switch (classof$5(argument)) {
2185
- case 'AsyncFunction':
2186
- case 'GeneratorFunction':
2187
- case 'AsyncGeneratorFunction': return false;
2188
- }
2189
- try {
2190
- // we can't check .prototype since constructors produced by .bind haven't it
2191
- // `Function#toString` throws on some built-it function in some legacy engines
2192
- // (for example, `DOMQuad` and similar in FF41-)
2193
- return INCORRECT_TO_STRING || !!exec$4(constructorRegExp, inspectSource$1(argument));
2194
- } catch (error) {
2195
- return true;
2196
- }
2197
- };
2198
-
2199
- isConstructorLegacy.sham = true;
2200
-
2201
- // `IsConstructor` abstract operation
2202
- // https://tc39.es/ecma262/#sec-isconstructor
2203
- var isConstructor$2 = !construct || fails$a(function () {
2204
- var called;
2205
- return isConstructorModern(isConstructorModern.call)
2206
- || !isConstructorModern(Object)
2207
- || !isConstructorModern(function () { called = true; })
2208
- || called;
2209
- }) ? isConstructorLegacy : isConstructorModern;
2210
-
2211
- var isConstructor$1 = isConstructor$2;
2212
- var tryToString$2 = tryToString$4;
2213
-
2214
- var $TypeError$8 = TypeError;
2215
-
2216
- // `Assert: IsConstructor(argument) is true`
2217
- var aConstructor$1 = function (argument) {
2218
- if (isConstructor$1(argument)) return argument;
2219
- throw new $TypeError$8(tryToString$2(argument) + ' is not a constructor');
2220
- };
2221
-
2222
- var anObject$g = anObject$l;
2223
- var aConstructor = aConstructor$1;
2224
- var isNullOrUndefined$2 = isNullOrUndefined$5;
2225
- var wellKnownSymbol$c = wellKnownSymbol$m;
2226
-
2227
- var SPECIES$2 = wellKnownSymbol$c('species');
2228
-
2229
- // `SpeciesConstructor` abstract operation
2230
- // https://tc39.es/ecma262/#sec-speciesconstructor
2231
- var speciesConstructor$1 = function (O, defaultConstructor) {
2232
- var C = anObject$g(O).constructor;
2233
- var S;
2234
- return C === undefined || isNullOrUndefined$2(S = anObject$g(C)[SPECIES$2]) ? defaultConstructor : aConstructor(S);
2235
- };
2236
-
2237
- var classofRaw = classofRaw$2;
2238
- var uncurryThis$b = functionUncurryThis;
2239
-
2240
- var functionUncurryThisClause = function (fn) {
2241
- // Nashorn bug:
2242
- // https://github.com/zloirock/core-js/issues/1128
2243
- // https://github.com/zloirock/core-js/issues/1130
2244
- if (classofRaw(fn) === 'Function') return uncurryThis$b(fn);
2245
- };
2246
-
2247
- var uncurryThis$a = functionUncurryThisClause;
2248
- var aCallable$9 = aCallable$c;
2249
- var NATIVE_BIND = functionBindNative;
2250
-
2251
- var bind$7 = uncurryThis$a(uncurryThis$a.bind);
2252
-
2253
- // optional / simple context binding
2254
- var functionBindContext = function (fn, that) {
2255
- aCallable$9(fn);
2256
- return that === undefined ? fn : NATIVE_BIND ? bind$7(fn, that) : function (/* ...args */) {
2257
- return fn.apply(that, arguments);
2258
- };
2259
- };
2260
-
2261
- var $TypeError$7 = TypeError;
2262
-
2263
- var validateArgumentsLength$5 = function (passed, required) {
2264
- if (passed < required) throw new $TypeError$7('Not enough arguments');
2265
- return passed;
2266
- };
2267
-
2268
- var userAgent$2 = engineUserAgent;
2269
-
2270
- // eslint-disable-next-line redos/no-vulnerable -- safe
2271
- var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
2272
-
2273
- var global$d = global$q;
2274
- var apply = functionApply;
2275
- var bind$6 = functionBindContext;
2276
- var isCallable$7 = isCallable$q;
2277
- var hasOwn$5 = hasOwnProperty_1;
2278
- var fails$9 = fails$o;
2279
- var html = html$2;
2280
- var arraySlice$2 = arraySlice$4;
2281
- var createElement = documentCreateElement$2;
2282
- var validateArgumentsLength$4 = validateArgumentsLength$5;
2283
- var IS_IOS$1 = engineIsIos;
2284
- var IS_NODE$3 = engineIsNode;
2285
-
2286
- var set = global$d.setImmediate;
2287
- var clear = global$d.clearImmediate;
2288
- var process$2 = global$d.process;
2289
- var Dispatch = global$d.Dispatch;
2290
- var Function$1 = global$d.Function;
2291
- var MessageChannel = global$d.MessageChannel;
2292
- var String$1 = global$d.String;
2293
- var counter = 0;
2294
- var queue$2 = {};
2295
- var ONREADYSTATECHANGE = 'onreadystatechange';
2296
- var $location, defer, channel, port;
2297
-
2298
- fails$9(function () {
1966
+ fails$c(function () {
2299
1967
  // Deno throws a ReferenceError on `location` access without `--location` flag
2300
- $location = global$d.location;
1968
+ $location = global$e.location;
2301
1969
  });
2302
1970
 
2303
1971
  var run = function (id) {
2304
- if (hasOwn$5(queue$2, id)) {
1972
+ if (hasOwn$6(queue$2, id)) {
2305
1973
  var fn = queue$2[id];
2306
1974
  delete queue$2[id];
2307
1975
  fn();
@@ -2320,17 +1988,17 @@ var eventListener = function (event) {
2320
1988
 
2321
1989
  var globalPostMessageDefer = function (id) {
2322
1990
  // old engines have not location.origin
2323
- global$d.postMessage(String$1(id), $location.protocol + '//' + $location.host);
1991
+ global$e.postMessage(String$1(id), $location.protocol + '//' + $location.host);
2324
1992
  };
2325
1993
 
2326
1994
  // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
2327
1995
  if (!set || !clear) {
2328
1996
  set = function setImmediate(handler) {
2329
1997
  validateArgumentsLength$4(arguments.length, 1);
2330
- var fn = isCallable$7(handler) ? handler : Function$1(handler);
2331
- var args = arraySlice$2(arguments, 1);
1998
+ var fn = isCallable$b(handler) ? handler : Function$1(handler);
1999
+ var args = arraySlice$3(arguments, 1);
2332
2000
  queue$2[++counter] = function () {
2333
- apply(fn, undefined, args);
2001
+ apply$2(fn, undefined, args);
2334
2002
  };
2335
2003
  defer(counter);
2336
2004
  return counter;
@@ -2358,14 +2026,14 @@ if (!set || !clear) {
2358
2026
  // Browsers with postMessage, skip WebWorkers
2359
2027
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
2360
2028
  } else if (
2361
- global$d.addEventListener &&
2362
- isCallable$7(global$d.postMessage) &&
2363
- !global$d.importScripts &&
2029
+ global$e.addEventListener &&
2030
+ isCallable$b(global$e.postMessage) &&
2031
+ !global$e.importScripts &&
2364
2032
  $location && $location.protocol !== 'file:' &&
2365
- !fails$9(globalPostMessageDefer)
2033
+ !fails$c(globalPostMessageDefer)
2366
2034
  ) {
2367
2035
  defer = globalPostMessageDefer;
2368
- global$d.addEventListener('message', eventListener, false);
2036
+ global$e.addEventListener('message', eventListener, false);
2369
2037
  // IE8-
2370
2038
  } else if (ONREADYSTATECHANGE in createElement('script')) {
2371
2039
  defer = function (id) {
@@ -2383,18 +2051,20 @@ if (!set || !clear) {
2383
2051
  }
2384
2052
 
2385
2053
  var task$1 = {
2386
- set: set};
2054
+ set: set,
2055
+ clear: clear
2056
+ };
2387
2057
 
2388
- var global$c = global$q;
2389
- var DESCRIPTORS$8 = descriptors;
2058
+ var global$d = global$q;
2059
+ var DESCRIPTORS$9 = descriptors;
2390
2060
 
2391
2061
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
2392
2062
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
2393
2063
 
2394
2064
  // Avoid NodeJS experimental warning
2395
2065
  var safeGetBuiltIn$2 = function (name) {
2396
- if (!DESCRIPTORS$8) return global$c[name];
2397
- var descriptor = getOwnPropertyDescriptor(global$c, name);
2066
+ if (!DESCRIPTORS$9) return global$d[name];
2067
+ var descriptor = getOwnPropertyDescriptor(global$d, name);
2398
2068
  return descriptor && descriptor.value;
2399
2069
  };
2400
2070
 
@@ -2431,7 +2101,7 @@ var userAgent = engineUserAgent;
2431
2101
 
2432
2102
  var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
2433
2103
 
2434
- var global$b = global$q;
2104
+ var global$c = global$q;
2435
2105
  var safeGetBuiltIn$1 = safeGetBuiltIn$2;
2436
2106
  var bind$5 = functionBindContext;
2437
2107
  var macrotask = task$1.set;
@@ -2441,10 +2111,10 @@ var IS_IOS_PEBBLE = engineIsIosPebble;
2441
2111
  var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
2442
2112
  var IS_NODE$2 = engineIsNode;
2443
2113
 
2444
- var MutationObserver = global$b.MutationObserver || global$b.WebKitMutationObserver;
2445
- var document$2 = global$b.document;
2446
- var process$1 = global$b.process;
2447
- var Promise$1 = global$b.Promise;
2114
+ var MutationObserver = global$c.MutationObserver || global$c.WebKitMutationObserver;
2115
+ var document$2 = global$c.document;
2116
+ var process$1 = global$c.process;
2117
+ var Promise$1 = global$c.Promise;
2448
2118
  var microtask$1 = safeGetBuiltIn$1('queueMicrotask');
2449
2119
  var notify$1, toggle, node, promise, then;
2450
2120
 
@@ -2496,7 +2166,7 @@ if (!microtask$1) {
2496
2166
  // - setTimeout
2497
2167
  } else {
2498
2168
  // `webpack` dev server bug on IE global methods - use bind(fn, global)
2499
- macrotask = bind$5(macrotask, global$b);
2169
+ macrotask = bind$5(macrotask, global$c);
2500
2170
  notify$1 = function () {
2501
2171
  macrotask(flush);
2502
2172
  };
@@ -2525,9 +2195,9 @@ var perform$3 = function (exec) {
2525
2195
  }
2526
2196
  };
2527
2197
 
2528
- var global$a = global$q;
2198
+ var global$b = global$q;
2529
2199
 
2530
- var promiseNativeConstructor = global$a.Promise;
2200
+ var promiseNativeConstructor = global$b.Promise;
2531
2201
 
2532
2202
  /* global Deno -- Deno case */
2533
2203
  var engineIsDeno = typeof Deno == 'object' && Deno && typeof Deno.version == 'object';
@@ -2539,9 +2209,9 @@ var engineIsBrowser = !IS_DENO$1 && !IS_NODE$1
2539
2209
  && typeof window == 'object'
2540
2210
  && typeof document == 'object';
2541
2211
 
2542
- var global$9 = global$q;
2543
- var NativePromiseConstructor$3 = promiseNativeConstructor;
2544
- var isCallable$6 = isCallable$q;
2212
+ var global$a = global$q;
2213
+ var NativePromiseConstructor$4 = promiseNativeConstructor;
2214
+ var isCallable$a = isCallable$r;
2545
2215
  var isForced$1 = isForced_1;
2546
2216
  var inspectSource = inspectSource$3;
2547
2217
  var wellKnownSymbol$b = wellKnownSymbol$m;
@@ -2549,14 +2219,14 @@ var IS_BROWSER = engineIsBrowser;
2549
2219
  var IS_DENO = engineIsDeno;
2550
2220
  var V8_VERSION = engineV8Version;
2551
2221
 
2552
- NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
2222
+ NativePromiseConstructor$4 && NativePromiseConstructor$4.prototype;
2553
2223
  var SPECIES$1 = wellKnownSymbol$b('species');
2554
2224
  var SUBCLASSING = false;
2555
- var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$6(global$9.PromiseRejectionEvent);
2225
+ var NATIVE_PROMISE_REJECTION_EVENT$1 = isCallable$a(global$a.PromiseRejectionEvent);
2556
2226
 
2557
2227
  var FORCED_PROMISE_CONSTRUCTOR$5 = isForced$1('Promise', function () {
2558
- var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$3);
2559
- var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$3);
2228
+ var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(NativePromiseConstructor$4);
2229
+ var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(NativePromiseConstructor$4);
2560
2230
  // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables
2561
2231
  // https://bugs.chromium.org/p/chromium/issues/detail?id=830565
2562
2232
  // We can't detect it synchronously, so just check versions
@@ -2566,7 +2236,7 @@ var FORCED_PROMISE_CONSTRUCTOR$5 = isForced$1('Promise', function () {
2566
2236
  // https://github.com/zloirock/core-js/issues/679
2567
2237
  if (!V8_VERSION || V8_VERSION < 51 || !/native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) {
2568
2238
  // Detect correctness of subclassing with @@species support
2569
- var promise = new NativePromiseConstructor$3(function (resolve) { resolve(1); });
2239
+ var promise = new NativePromiseConstructor$4(function (resolve) { resolve(1); });
2570
2240
  var FakePromise = function (exec) {
2571
2241
  exec(function () { /* empty */ }, function () { /* empty */ });
2572
2242
  };
@@ -2607,26 +2277,26 @@ newPromiseCapability$2.f = function (C) {
2607
2277
  return new PromiseCapability(C);
2608
2278
  };
2609
2279
 
2610
- var $$h = _export;
2280
+ var $$k = _export;
2611
2281
  var IS_NODE = engineIsNode;
2612
- var global$8 = global$q;
2613
- var call$h = functionCall;
2614
- var defineBuiltIn$9 = defineBuiltIn$d;
2615
- var setPrototypeOf = objectSetPrototypeOf;
2282
+ var global$9 = global$q;
2283
+ var call$i = functionCall;
2284
+ var defineBuiltIn$a = defineBuiltIn$e;
2285
+ var setPrototypeOf$2 = objectSetPrototypeOf;
2616
2286
  var setToStringTag$2 = setToStringTag$6;
2617
2287
  var setSpecies$1 = setSpecies$2;
2618
2288
  var aCallable$7 = aCallable$c;
2619
- var isCallable$5 = isCallable$q;
2620
- var isObject$3 = isObject$e;
2289
+ var isCallable$9 = isCallable$r;
2290
+ var isObject$5 = isObject$e;
2621
2291
  var anInstance$3 = anInstance$4;
2622
- var speciesConstructor = speciesConstructor$1;
2292
+ var speciesConstructor$1 = speciesConstructor$2;
2623
2293
  var task = task$1.set;
2624
2294
  var microtask = microtask_1;
2625
2295
  var hostReportErrors = hostReportErrors$1;
2626
2296
  var perform$2 = perform$3;
2627
2297
  var Queue = queue$1;
2628
2298
  var InternalStateModule$4 = internalState;
2629
- var NativePromiseConstructor$2 = promiseNativeConstructor;
2299
+ var NativePromiseConstructor$3 = promiseNativeConstructor;
2630
2300
  var PromiseConstructorDetection = promiseConstructorDetection;
2631
2301
  var newPromiseCapabilityModule$3 = newPromiseCapability$2;
2632
2302
 
@@ -2636,16 +2306,16 @@ var NATIVE_PROMISE_REJECTION_EVENT = PromiseConstructorDetection.REJECTION_EVENT
2636
2306
  var NATIVE_PROMISE_SUBCLASSING = PromiseConstructorDetection.SUBCLASSING;
2637
2307
  var getInternalPromiseState = InternalStateModule$4.getterFor(PROMISE);
2638
2308
  var setInternalState$4 = InternalStateModule$4.set;
2639
- var NativePromisePrototype$1 = NativePromiseConstructor$2 && NativePromiseConstructor$2.prototype;
2640
- var PromiseConstructor = NativePromiseConstructor$2;
2641
- var PromisePrototype = NativePromisePrototype$1;
2642
- var TypeError$3 = global$8.TypeError;
2643
- var document$1 = global$8.document;
2644
- var process = global$8.process;
2309
+ var NativePromisePrototype$2 = NativePromiseConstructor$3 && NativePromiseConstructor$3.prototype;
2310
+ var PromiseConstructor = NativePromiseConstructor$3;
2311
+ var PromisePrototype = NativePromisePrototype$2;
2312
+ var TypeError$3 = global$9.TypeError;
2313
+ var document$1 = global$9.document;
2314
+ var process = global$9.process;
2645
2315
  var newPromiseCapability$1 = newPromiseCapabilityModule$3.f;
2646
2316
  var newGenericPromiseCapability = newPromiseCapability$1;
2647
2317
 
2648
- var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$8.dispatchEvent);
2318
+ var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$9.dispatchEvent);
2649
2319
  var UNHANDLED_REJECTION = 'unhandledrejection';
2650
2320
  var REJECTION_HANDLED = 'rejectionhandled';
2651
2321
  var PENDING = 0;
@@ -2659,7 +2329,7 @@ var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen;
2659
2329
  // helpers
2660
2330
  var isThenable = function (it) {
2661
2331
  var then;
2662
- return isObject$3(it) && isCallable$5(then = it.then) ? then : false;
2332
+ return isObject$5(it) && isCallable$9(then = it.then) ? then : false;
2663
2333
  };
2664
2334
 
2665
2335
  var callReaction = function (reaction, state) {
@@ -2688,7 +2358,7 @@ var callReaction = function (reaction, state) {
2688
2358
  if (result === reaction.promise) {
2689
2359
  reject(new TypeError$3('Promise-chain cycle'));
2690
2360
  } else if (then = isThenable(result)) {
2691
- call$h(then, result, resolve, reject);
2361
+ call$i(then, result, resolve, reject);
2692
2362
  } else resolve(result);
2693
2363
  } else reject(value);
2694
2364
  } catch (error) {
@@ -2718,14 +2388,14 @@ var dispatchEvent = function (name, promise, reason) {
2718
2388
  event.promise = promise;
2719
2389
  event.reason = reason;
2720
2390
  event.initEvent(name, false, true);
2721
- global$8.dispatchEvent(event);
2391
+ global$9.dispatchEvent(event);
2722
2392
  } else event = { promise: promise, reason: reason };
2723
- if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$8['on' + name])) handler(event);
2393
+ if (!NATIVE_PROMISE_REJECTION_EVENT && (handler = global$9['on' + name])) handler(event);
2724
2394
  else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
2725
2395
  };
2726
2396
 
2727
2397
  var onUnhandled = function (state) {
2728
- call$h(task, global$8, function () {
2398
+ call$i(task, global$9, function () {
2729
2399
  var promise = state.facade;
2730
2400
  var value = state.value;
2731
2401
  var IS_UNHANDLED = isUnhandled(state);
@@ -2748,7 +2418,7 @@ var isUnhandled = function (state) {
2748
2418
  };
2749
2419
 
2750
2420
  var onHandleUnhandled = function (state) {
2751
- call$h(task, global$8, function () {
2421
+ call$i(task, global$9, function () {
2752
2422
  var promise = state.facade;
2753
2423
  if (IS_NODE) {
2754
2424
  process.emit('rejectionHandled', promise);
@@ -2782,7 +2452,7 @@ var internalResolve = function (state, value, unwrap) {
2782
2452
  microtask(function () {
2783
2453
  var wrapper = { done: false };
2784
2454
  try {
2785
- call$h(then, value,
2455
+ call$i(then, value,
2786
2456
  bind$4(internalResolve, wrapper, state),
2787
2457
  bind$4(internalReject, wrapper, state)
2788
2458
  );
@@ -2806,7 +2476,7 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
2806
2476
  PromiseConstructor = function Promise(executor) {
2807
2477
  anInstance$3(this, PromisePrototype);
2808
2478
  aCallable$7(executor);
2809
- call$h(Internal, this);
2479
+ call$i(Internal, this);
2810
2480
  var state = getInternalPromiseState(this);
2811
2481
  try {
2812
2482
  executor(bind$4(internalResolve, state), bind$4(internalReject, state));
@@ -2833,12 +2503,12 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
2833
2503
 
2834
2504
  // `Promise.prototype.then` method
2835
2505
  // https://tc39.es/ecma262/#sec-promise.prototype.then
2836
- Internal.prototype = defineBuiltIn$9(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
2506
+ Internal.prototype = defineBuiltIn$a(PromisePrototype, 'then', function then(onFulfilled, onRejected) {
2837
2507
  var state = getInternalPromiseState(this);
2838
- var reaction = newPromiseCapability$1(speciesConstructor(this, PromiseConstructor));
2508
+ var reaction = newPromiseCapability$1(speciesConstructor$1(this, PromiseConstructor));
2839
2509
  state.parent = true;
2840
- reaction.ok = isCallable$5(onFulfilled) ? onFulfilled : true;
2841
- reaction.fail = isCallable$5(onRejected) && onRejected;
2510
+ reaction.ok = isCallable$9(onFulfilled) ? onFulfilled : true;
2511
+ reaction.fail = isCallable$9(onRejected) && onRejected;
2842
2512
  reaction.domain = IS_NODE ? process.domain : undefined;
2843
2513
  if (state.state === PENDING) state.reactions.add(reaction);
2844
2514
  else microtask(function () {
@@ -2861,15 +2531,15 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
2861
2531
  : newGenericPromiseCapability(C);
2862
2532
  };
2863
2533
 
2864
- if (isCallable$5(NativePromiseConstructor$2) && NativePromisePrototype$1 !== Object.prototype) {
2865
- nativeThen = NativePromisePrototype$1.then;
2534
+ if (isCallable$9(NativePromiseConstructor$3) && NativePromisePrototype$2 !== Object.prototype) {
2535
+ nativeThen = NativePromisePrototype$2.then;
2866
2536
 
2867
2537
  if (!NATIVE_PROMISE_SUBCLASSING) {
2868
2538
  // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
2869
- defineBuiltIn$9(NativePromisePrototype$1, 'then', function then(onFulfilled, onRejected) {
2539
+ defineBuiltIn$a(NativePromisePrototype$2, 'then', function then(onFulfilled, onRejected) {
2870
2540
  var that = this;
2871
2541
  return new PromiseConstructor(function (resolve, reject) {
2872
- call$h(nativeThen, that, resolve, reject);
2542
+ call$i(nativeThen, that, resolve, reject);
2873
2543
  }).then(onFulfilled, onRejected);
2874
2544
  // https://github.com/zloirock/core-js/issues/640
2875
2545
  }, { unsafe: true });
@@ -2877,17 +2547,17 @@ if (FORCED_PROMISE_CONSTRUCTOR$4) {
2877
2547
 
2878
2548
  // make `.constructor === Promise` work for native promise-based APIs
2879
2549
  try {
2880
- delete NativePromisePrototype$1.constructor;
2550
+ delete NativePromisePrototype$2.constructor;
2881
2551
  } catch (error) { /* empty */ }
2882
2552
 
2883
2553
  // make `instanceof Promise` work for native promise-based APIs
2884
- if (setPrototypeOf) {
2885
- setPrototypeOf(NativePromisePrototype$1, PromisePrototype);
2554
+ if (setPrototypeOf$2) {
2555
+ setPrototypeOf$2(NativePromisePrototype$2, PromisePrototype);
2886
2556
  }
2887
2557
  }
2888
2558
  }
2889
2559
 
2890
- $$h({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
2560
+ $$k({ global: true, constructor: true, wrap: true, forced: FORCED_PROMISE_CONSTRUCTOR$4 }, {
2891
2561
  Promise: PromiseConstructor
2892
2562
  });
2893
2563
 
@@ -2905,7 +2575,7 @@ var isArrayIteratorMethod$2 = function (it) {
2905
2575
  return it !== undefined && (Iterators$1.Array === it || ArrayPrototype[ITERATOR$5] === it);
2906
2576
  };
2907
2577
 
2908
- var classof$4 = classof$a;
2578
+ var classof$7 = classof$9;
2909
2579
  var getMethod$3 = getMethod$5;
2910
2580
  var isNullOrUndefined$1 = isNullOrUndefined$5;
2911
2581
  var Iterators = iterators;
@@ -2916,10 +2586,10 @@ var ITERATOR$4 = wellKnownSymbol$9('iterator');
2916
2586
  var getIteratorMethod$4 = function (it) {
2917
2587
  if (!isNullOrUndefined$1(it)) return getMethod$3(it, ITERATOR$4)
2918
2588
  || getMethod$3(it, '@@iterator')
2919
- || Iterators[classof$4(it)];
2589
+ || Iterators[classof$7(it)];
2920
2590
  };
2921
2591
 
2922
- var call$g = functionCall;
2592
+ var call$h = functionCall;
2923
2593
  var aCallable$6 = aCallable$c;
2924
2594
  var anObject$f = anObject$l;
2925
2595
  var tryToString$1 = tryToString$4;
@@ -2929,11 +2599,11 @@ var $TypeError$5 = TypeError;
2929
2599
 
2930
2600
  var getIterator$3 = function (argument, usingIterator) {
2931
2601
  var iteratorMethod = arguments.length < 2 ? getIteratorMethod$3(argument) : usingIterator;
2932
- if (aCallable$6(iteratorMethod)) return anObject$f(call$g(iteratorMethod, argument));
2602
+ if (aCallable$6(iteratorMethod)) return anObject$f(call$h(iteratorMethod, argument));
2933
2603
  throw new $TypeError$5(tryToString$1(argument) + ' is not iterable');
2934
2604
  };
2935
2605
 
2936
- var call$f = functionCall;
2606
+ var call$g = functionCall;
2937
2607
  var anObject$e = anObject$l;
2938
2608
  var getMethod$2 = getMethod$5;
2939
2609
 
@@ -2946,7 +2616,7 @@ var iteratorClose$3 = function (iterator, kind, value) {
2946
2616
  if (kind === 'throw') throw value;
2947
2617
  return value;
2948
2618
  }
2949
- innerResult = call$f(innerResult, iterator);
2619
+ innerResult = call$g(innerResult, iterator);
2950
2620
  } catch (error) {
2951
2621
  innerError = true;
2952
2622
  innerResult = error;
@@ -2958,12 +2628,12 @@ var iteratorClose$3 = function (iterator, kind, value) {
2958
2628
  };
2959
2629
 
2960
2630
  var bind$3 = functionBindContext;
2961
- var call$e = functionCall;
2631
+ var call$f = functionCall;
2962
2632
  var anObject$d = anObject$l;
2963
2633
  var tryToString = tryToString$4;
2964
2634
  var isArrayIteratorMethod$1 = isArrayIteratorMethod$2;
2965
2635
  var lengthOfArrayLike$1 = lengthOfArrayLike$3;
2966
- var isPrototypeOf$2 = objectIsPrototypeOf;
2636
+ var isPrototypeOf$3 = objectIsPrototypeOf;
2967
2637
  var getIterator$2 = getIterator$3;
2968
2638
  var getIteratorMethod$2 = getIteratorMethod$4;
2969
2639
  var iteratorClose$2 = iteratorClose$3;
@@ -3009,20 +2679,20 @@ var iterate$4 = function (iterable, unboundFunction, options) {
3009
2679
  if (isArrayIteratorMethod$1(iterFn)) {
3010
2680
  for (index = 0, length = lengthOfArrayLike$1(iterable); length > index; index++) {
3011
2681
  result = callFn(iterable[index]);
3012
- if (result && isPrototypeOf$2(ResultPrototype, result)) return result;
2682
+ if (result && isPrototypeOf$3(ResultPrototype, result)) return result;
3013
2683
  } return new Result(false);
3014
2684
  }
3015
2685
  iterator = getIterator$2(iterable, iterFn);
3016
2686
  }
3017
2687
 
3018
2688
  next = IS_RECORD ? iterable.next : iterator.next;
3019
- while (!(step = call$e(next, iterator)).done) {
2689
+ while (!(step = call$f(next, iterator)).done) {
3020
2690
  try {
3021
2691
  result = callFn(step.value);
3022
2692
  } catch (error) {
3023
2693
  iteratorClose$2(iterator, 'throw', error);
3024
2694
  }
3025
- if (typeof result == 'object' && result && isPrototypeOf$2(ResultPrototype, result)) return result;
2695
+ if (typeof result == 'object' && result && isPrototypeOf$3(ResultPrototype, result)) return result;
3026
2696
  } return new Result(false);
3027
2697
  };
3028
2698
 
@@ -3067,16 +2737,16 @@ var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
3067
2737
  return ITERATION_SUPPORT;
3068
2738
  };
3069
2739
 
3070
- var NativePromiseConstructor$1 = promiseNativeConstructor;
2740
+ var NativePromiseConstructor$2 = promiseNativeConstructor;
3071
2741
  var checkCorrectnessOfIteration = checkCorrectnessOfIteration$1;
3072
2742
  var FORCED_PROMISE_CONSTRUCTOR$3 = promiseConstructorDetection.CONSTRUCTOR;
3073
2743
 
3074
2744
  var promiseStaticsIncorrectIteration = FORCED_PROMISE_CONSTRUCTOR$3 || !checkCorrectnessOfIteration(function (iterable) {
3075
- NativePromiseConstructor$1.all(iterable).then(undefined, function () { /* empty */ });
2745
+ NativePromiseConstructor$2.all(iterable).then(undefined, function () { /* empty */ });
3076
2746
  });
3077
2747
 
3078
- var $$g = _export;
3079
- var call$d = functionCall;
2748
+ var $$j = _export;
2749
+ var call$e = functionCall;
3080
2750
  var aCallable$5 = aCallable$c;
3081
2751
  var newPromiseCapabilityModule$2 = newPromiseCapability$2;
3082
2752
  var perform$1 = perform$3;
@@ -3085,7 +2755,7 @@ var PROMISE_STATICS_INCORRECT_ITERATION$1 = promiseStaticsIncorrectIteration;
3085
2755
 
3086
2756
  // `Promise.all` method
3087
2757
  // https://tc39.es/ecma262/#sec-promise.all
3088
- $$g({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
2758
+ $$j({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION$1 }, {
3089
2759
  all: function all(iterable) {
3090
2760
  var C = this;
3091
2761
  var capability = newPromiseCapabilityModule$2.f(C);
@@ -3100,7 +2770,7 @@ $$g({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
3100
2770
  var index = counter++;
3101
2771
  var alreadyCalled = false;
3102
2772
  remaining++;
3103
- call$d($promiseResolve, C, promise).then(function (value) {
2773
+ call$e($promiseResolve, C, promise).then(function (value) {
3104
2774
  if (alreadyCalled) return;
3105
2775
  alreadyCalled = true;
3106
2776
  values[index] = value;
@@ -3114,100 +2784,472 @@ $$g({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION
3114
2784
  }
3115
2785
  });
3116
2786
 
3117
- var $$f = _export;
3118
- var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
3119
- var NativePromiseConstructor = promiseNativeConstructor;
3120
- var getBuiltIn$1 = getBuiltIn$9;
3121
- var isCallable$4 = isCallable$q;
3122
- var defineBuiltIn$8 = defineBuiltIn$d;
2787
+ var $$i = _export;
2788
+ var FORCED_PROMISE_CONSTRUCTOR$2 = promiseConstructorDetection.CONSTRUCTOR;
2789
+ var NativePromiseConstructor$1 = promiseNativeConstructor;
2790
+ var getBuiltIn$4 = getBuiltIn$a;
2791
+ var isCallable$8 = isCallable$r;
2792
+ var defineBuiltIn$9 = defineBuiltIn$e;
2793
+
2794
+ var NativePromisePrototype$1 = NativePromiseConstructor$1 && NativePromiseConstructor$1.prototype;
2795
+
2796
+ // `Promise.prototype.catch` method
2797
+ // https://tc39.es/ecma262/#sec-promise.prototype.catch
2798
+ $$i({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
2799
+ 'catch': function (onRejected) {
2800
+ return this.then(undefined, onRejected);
2801
+ }
2802
+ });
2803
+
2804
+ // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
2805
+ if (isCallable$8(NativePromiseConstructor$1)) {
2806
+ var method$1 = getBuiltIn$4('Promise').prototype['catch'];
2807
+ if (NativePromisePrototype$1['catch'] !== method$1) {
2808
+ defineBuiltIn$9(NativePromisePrototype$1, 'catch', method$1, { unsafe: true });
2809
+ }
2810
+ }
2811
+
2812
+ var $$h = _export;
2813
+ var call$d = functionCall;
2814
+ var aCallable$4 = aCallable$c;
2815
+ var newPromiseCapabilityModule$1 = newPromiseCapability$2;
2816
+ var perform = perform$3;
2817
+ var iterate$2 = iterate$4;
2818
+ var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
2819
+
2820
+ // `Promise.race` method
2821
+ // https://tc39.es/ecma262/#sec-promise.race
2822
+ $$h({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
2823
+ race: function race(iterable) {
2824
+ var C = this;
2825
+ var capability = newPromiseCapabilityModule$1.f(C);
2826
+ var reject = capability.reject;
2827
+ var result = perform(function () {
2828
+ var $promiseResolve = aCallable$4(C.resolve);
2829
+ iterate$2(iterable, function (promise) {
2830
+ call$d($promiseResolve, C, promise).then(capability.resolve, reject);
2831
+ });
2832
+ });
2833
+ if (result.error) reject(result.value);
2834
+ return capability.promise;
2835
+ }
2836
+ });
2837
+
2838
+ var $$g = _export;
2839
+ var newPromiseCapabilityModule = newPromiseCapability$2;
2840
+ var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
2841
+
2842
+ // `Promise.reject` method
2843
+ // https://tc39.es/ecma262/#sec-promise.reject
2844
+ $$g({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
2845
+ reject: function reject(r) {
2846
+ var capability = newPromiseCapabilityModule.f(this);
2847
+ var capabilityReject = capability.reject;
2848
+ capabilityReject(r);
2849
+ return capability.promise;
2850
+ }
2851
+ });
2852
+
2853
+ var anObject$c = anObject$l;
2854
+ var isObject$4 = isObject$e;
2855
+ var newPromiseCapability = newPromiseCapability$2;
2856
+
2857
+ var promiseResolve$2 = function (C, x) {
2858
+ anObject$c(C);
2859
+ if (isObject$4(x) && x.constructor === C) return x;
2860
+ var promiseCapability = newPromiseCapability.f(C);
2861
+ var resolve = promiseCapability.resolve;
2862
+ resolve(x);
2863
+ return promiseCapability.promise;
2864
+ };
2865
+
2866
+ var $$f = _export;
2867
+ var getBuiltIn$3 = getBuiltIn$a;
2868
+ var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
2869
+ var promiseResolve$1 = promiseResolve$2;
2870
+
2871
+ getBuiltIn$3('Promise');
2872
+
2873
+ // `Promise.resolve` method
2874
+ // https://tc39.es/ecma262/#sec-promise.resolve
2875
+ $$f({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
2876
+ resolve: function resolve(x) {
2877
+ return promiseResolve$1(this, x);
2878
+ }
2879
+ });
2880
+
2881
+ var $$e = _export;
2882
+ var NativePromiseConstructor = promiseNativeConstructor;
2883
+ var fails$b = fails$p;
2884
+ var getBuiltIn$2 = getBuiltIn$a;
2885
+ var isCallable$7 = isCallable$r;
2886
+ var speciesConstructor = speciesConstructor$2;
2887
+ var promiseResolve = promiseResolve$2;
2888
+ var defineBuiltIn$8 = defineBuiltIn$e;
2889
+
2890
+ var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
2891
+
2892
+ // Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829
2893
+ var NON_GENERIC = !!NativePromiseConstructor && fails$b(function () {
2894
+ // eslint-disable-next-line unicorn/no-thenable -- required for testing
2895
+ NativePromisePrototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ });
2896
+ });
2897
+
2898
+ // `Promise.prototype.finally` method
2899
+ // https://tc39.es/ecma262/#sec-promise.prototype.finally
2900
+ $$e({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, {
2901
+ 'finally': function (onFinally) {
2902
+ var C = speciesConstructor(this, getBuiltIn$2('Promise'));
2903
+ var isFunction = isCallable$7(onFinally);
2904
+ return this.then(
2905
+ isFunction ? function (x) {
2906
+ return promiseResolve(C, onFinally()).then(function () { return x; });
2907
+ } : onFinally,
2908
+ isFunction ? function (e) {
2909
+ return promiseResolve(C, onFinally()).then(function () { throw e; });
2910
+ } : onFinally
2911
+ );
2912
+ }
2913
+ });
2914
+
2915
+ // makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then`
2916
+ if (isCallable$7(NativePromiseConstructor)) {
2917
+ var method = getBuiltIn$2('Promise').prototype['finally'];
2918
+ if (NativePromisePrototype['finally'] !== method) {
2919
+ defineBuiltIn$8(NativePromisePrototype, 'finally', method, { unsafe: true });
2920
+ }
2921
+ }
2922
+
2923
+ var defineProperty = objectDefineProperty.f;
2924
+
2925
+ var proxyAccessor$2 = function (Target, Source, key) {
2926
+ key in Target || defineProperty(Target, key, {
2927
+ configurable: true,
2928
+ get: function () { return Source[key]; },
2929
+ set: function (it) { Source[key] = it; }
2930
+ });
2931
+ };
2932
+
2933
+ var isCallable$6 = isCallable$r;
2934
+ var isObject$3 = isObject$e;
2935
+ var setPrototypeOf$1 = objectSetPrototypeOf;
2936
+
2937
+ // makes subclassing work correct for wrapped built-ins
2938
+ var inheritIfRequired$2 = function ($this, dummy, Wrapper) {
2939
+ var NewTarget, NewTargetPrototype;
2940
+ if (
2941
+ // it can work only with native `setPrototypeOf`
2942
+ setPrototypeOf$1 &&
2943
+ // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
2944
+ isCallable$6(NewTarget = dummy.constructor) &&
2945
+ NewTarget !== Wrapper &&
2946
+ isObject$3(NewTargetPrototype = NewTarget.prototype) &&
2947
+ NewTargetPrototype !== Wrapper.prototype
2948
+ ) setPrototypeOf$1($this, NewTargetPrototype);
2949
+ return $this;
2950
+ };
2951
+
2952
+ var classof$6 = classof$9;
2953
+
2954
+ var $String$1 = String;
2955
+
2956
+ var toString$b = function (argument) {
2957
+ if (classof$6(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
2958
+ return $String$1(argument);
2959
+ };
2960
+
2961
+ var toString$a = toString$b;
2962
+
2963
+ var normalizeStringArgument$1 = function (argument, $default) {
2964
+ return argument === undefined ? arguments.length < 2 ? '' : $default : toString$a(argument);
2965
+ };
2966
+
2967
+ var isObject$2 = isObject$e;
2968
+ var createNonEnumerableProperty$5 = createNonEnumerableProperty$a;
2969
+
2970
+ // `InstallErrorCause` abstract operation
2971
+ // https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
2972
+ var installErrorCause$1 = function (O, options) {
2973
+ if (isObject$2(options) && 'cause' in options) {
2974
+ createNonEnumerableProperty$5(O, 'cause', options.cause);
2975
+ }
2976
+ };
2977
+
2978
+ var uncurryThis$c = functionUncurryThis;
2979
+
2980
+ var $Error = Error;
2981
+ var replace$6 = uncurryThis$c(''.replace);
2982
+
2983
+ var TEST = (function (arg) { return String(new $Error(arg).stack); })('zxcasd');
2984
+ // eslint-disable-next-line redos/no-vulnerable -- safe
2985
+ var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/;
2986
+ var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST);
2987
+
2988
+ var errorStackClear = function (stack, dropEntries) {
2989
+ if (IS_V8_OR_CHAKRA_STACK && typeof stack == 'string' && !$Error.prepareStackTrace) {
2990
+ while (dropEntries--) stack = replace$6(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
2991
+ } return stack;
2992
+ };
2993
+
2994
+ var fails$a = fails$p;
2995
+ var createPropertyDescriptor$2 = createPropertyDescriptor$6;
2996
+
2997
+ var errorStackInstallable = !fails$a(function () {
2998
+ var error = new Error('a');
2999
+ if (!('stack' in error)) return true;
3000
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
3001
+ Object.defineProperty(error, 'stack', createPropertyDescriptor$2(1, 7));
3002
+ return error.stack !== 7;
3003
+ });
3004
+
3005
+ var createNonEnumerableProperty$4 = createNonEnumerableProperty$a;
3006
+ var clearErrorStack = errorStackClear;
3007
+ var ERROR_STACK_INSTALLABLE = errorStackInstallable;
3008
+
3009
+ // non-standard V8
3010
+ var captureStackTrace = Error.captureStackTrace;
3011
+
3012
+ var errorStackInstall = function (error, C, stack, dropEntries) {
3013
+ if (ERROR_STACK_INSTALLABLE) {
3014
+ if (captureStackTrace) captureStackTrace(error, C);
3015
+ else createNonEnumerableProperty$4(error, 'stack', clearErrorStack(stack, dropEntries));
3016
+ }
3017
+ };
3018
+
3019
+ var getBuiltIn$1 = getBuiltIn$a;
3020
+ var hasOwn$5 = hasOwnProperty_1;
3021
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$a;
3022
+ var isPrototypeOf$2 = objectIsPrototypeOf;
3023
+ var setPrototypeOf = objectSetPrototypeOf;
3024
+ var copyConstructorProperties = copyConstructorProperties$2;
3025
+ var proxyAccessor$1 = proxyAccessor$2;
3026
+ var inheritIfRequired$1 = inheritIfRequired$2;
3027
+ var normalizeStringArgument = normalizeStringArgument$1;
3028
+ var installErrorCause = installErrorCause$1;
3029
+ var installErrorStack = errorStackInstall;
3030
+ var DESCRIPTORS$8 = descriptors;
3031
+
3032
+ var wrapErrorConstructorWithCause$1 = function (FULL_NAME, wrapper, FORCED, IS_AGGREGATE_ERROR) {
3033
+ var STACK_TRACE_LIMIT = 'stackTraceLimit';
3034
+ var OPTIONS_POSITION = IS_AGGREGATE_ERROR ? 2 : 1;
3035
+ var path = FULL_NAME.split('.');
3036
+ var ERROR_NAME = path[path.length - 1];
3037
+ var OriginalError = getBuiltIn$1.apply(null, path);
3038
+
3039
+ if (!OriginalError) return;
3040
+
3041
+ var OriginalErrorPrototype = OriginalError.prototype;
3042
+
3043
+ // V8 9.3- bug https://bugs.chromium.org/p/v8/issues/detail?id=12006
3044
+ if (hasOwn$5(OriginalErrorPrototype, 'cause')) delete OriginalErrorPrototype.cause;
3045
+
3046
+ if (!FORCED) return OriginalError;
3047
+
3048
+ var BaseError = getBuiltIn$1('Error');
3049
+
3050
+ var WrappedError = wrapper(function (a, b) {
3051
+ var message = normalizeStringArgument(IS_AGGREGATE_ERROR ? b : a, undefined);
3052
+ var result = IS_AGGREGATE_ERROR ? new OriginalError(a) : new OriginalError();
3053
+ if (message !== undefined) createNonEnumerableProperty$3(result, 'message', message);
3054
+ installErrorStack(result, WrappedError, result.stack, 2);
3055
+ if (this && isPrototypeOf$2(OriginalErrorPrototype, this)) inheritIfRequired$1(result, this, WrappedError);
3056
+ if (arguments.length > OPTIONS_POSITION) installErrorCause(result, arguments[OPTIONS_POSITION]);
3057
+ return result;
3058
+ });
3059
+
3060
+ WrappedError.prototype = OriginalErrorPrototype;
3061
+
3062
+ if (ERROR_NAME !== 'Error') {
3063
+ if (setPrototypeOf) setPrototypeOf(WrappedError, BaseError);
3064
+ else copyConstructorProperties(WrappedError, BaseError, { name: true });
3065
+ } else if (DESCRIPTORS$8 && STACK_TRACE_LIMIT in OriginalError) {
3066
+ proxyAccessor$1(WrappedError, OriginalError, STACK_TRACE_LIMIT);
3067
+ proxyAccessor$1(WrappedError, OriginalError, 'prepareStackTrace');
3068
+ }
3069
+
3070
+ copyConstructorProperties(WrappedError, OriginalError);
3071
+
3072
+ try {
3073
+ // Safari 13- bug: WebAssembly errors does not have a proper `.name`
3074
+ if (OriginalErrorPrototype.name !== ERROR_NAME) {
3075
+ createNonEnumerableProperty$3(OriginalErrorPrototype, 'name', ERROR_NAME);
3076
+ }
3077
+ OriginalErrorPrototype.constructor = WrappedError;
3078
+ } catch (error) { /* empty */ }
3079
+
3080
+ return WrappedError;
3081
+ };
3123
3082
 
3124
- var NativePromisePrototype = NativePromiseConstructor && NativePromiseConstructor.prototype;
3083
+ /* eslint-disable no-unused-vars -- required for functions `.length` */
3084
+ var $$d = _export;
3085
+ var global$8 = global$q;
3086
+ var apply$1 = functionApply;
3087
+ var wrapErrorConstructorWithCause = wrapErrorConstructorWithCause$1;
3125
3088
 
3126
- // `Promise.prototype.catch` method
3127
- // https://tc39.es/ecma262/#sec-promise.prototype.catch
3128
- $$f({ target: 'Promise', proto: true, forced: FORCED_PROMISE_CONSTRUCTOR$2, real: true }, {
3129
- 'catch': function (onRejected) {
3130
- return this.then(undefined, onRejected);
3131
- }
3132
- });
3089
+ var WEB_ASSEMBLY = 'WebAssembly';
3090
+ var WebAssembly = global$8[WEB_ASSEMBLY];
3133
3091
 
3134
- // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
3135
- if (isCallable$4(NativePromiseConstructor)) {
3136
- var method = getBuiltIn$1('Promise').prototype['catch'];
3137
- if (NativePromisePrototype['catch'] !== method) {
3138
- defineBuiltIn$8(NativePromisePrototype, 'catch', method, { unsafe: true });
3139
- }
3140
- }
3092
+ // eslint-disable-next-line es/no-error-cause -- feature detection
3093
+ var FORCED$1 = new Error('e', { cause: 7 }).cause !== 7;
3141
3094
 
3142
- var $$e = _export;
3143
- var call$c = functionCall;
3144
- var aCallable$4 = aCallable$c;
3145
- var newPromiseCapabilityModule$1 = newPromiseCapability$2;
3146
- var perform = perform$3;
3147
- var iterate$2 = iterate$4;
3148
- var PROMISE_STATICS_INCORRECT_ITERATION = promiseStaticsIncorrectIteration;
3095
+ var exportGlobalErrorCauseWrapper = function (ERROR_NAME, wrapper) {
3096
+ var O = {};
3097
+ O[ERROR_NAME] = wrapErrorConstructorWithCause(ERROR_NAME, wrapper, FORCED$1);
3098
+ $$d({ global: true, constructor: true, arity: 1, forced: FORCED$1 }, O);
3099
+ };
3149
3100
 
3150
- // `Promise.race` method
3151
- // https://tc39.es/ecma262/#sec-promise.race
3152
- $$e({ target: 'Promise', stat: true, forced: PROMISE_STATICS_INCORRECT_ITERATION }, {
3153
- race: function race(iterable) {
3154
- var C = this;
3155
- var capability = newPromiseCapabilityModule$1.f(C);
3156
- var reject = capability.reject;
3157
- var result = perform(function () {
3158
- var $promiseResolve = aCallable$4(C.resolve);
3159
- iterate$2(iterable, function (promise) {
3160
- call$c($promiseResolve, C, promise).then(capability.resolve, reject);
3161
- });
3162
- });
3163
- if (result.error) reject(result.value);
3164
- return capability.promise;
3101
+ var exportWebAssemblyErrorCauseWrapper = function (ERROR_NAME, wrapper) {
3102
+ if (WebAssembly && WebAssembly[ERROR_NAME]) {
3103
+ var O = {};
3104
+ O[ERROR_NAME] = wrapErrorConstructorWithCause(WEB_ASSEMBLY + '.' + ERROR_NAME, wrapper, FORCED$1);
3105
+ $$d({ target: WEB_ASSEMBLY, stat: true, constructor: true, arity: 1, forced: FORCED$1 }, O);
3165
3106
  }
3107
+ };
3108
+
3109
+ // https://tc39.es/ecma262/#sec-nativeerror
3110
+ exportGlobalErrorCauseWrapper('Error', function (init) {
3111
+ return function Error(message) { return apply$1(init, this, arguments); };
3112
+ });
3113
+ exportGlobalErrorCauseWrapper('EvalError', function (init) {
3114
+ return function EvalError(message) { return apply$1(init, this, arguments); };
3115
+ });
3116
+ exportGlobalErrorCauseWrapper('RangeError', function (init) {
3117
+ return function RangeError(message) { return apply$1(init, this, arguments); };
3118
+ });
3119
+ exportGlobalErrorCauseWrapper('ReferenceError', function (init) {
3120
+ return function ReferenceError(message) { return apply$1(init, this, arguments); };
3121
+ });
3122
+ exportGlobalErrorCauseWrapper('SyntaxError', function (init) {
3123
+ return function SyntaxError(message) { return apply$1(init, this, arguments); };
3124
+ });
3125
+ exportGlobalErrorCauseWrapper('TypeError', function (init) {
3126
+ return function TypeError(message) { return apply$1(init, this, arguments); };
3127
+ });
3128
+ exportGlobalErrorCauseWrapper('URIError', function (init) {
3129
+ return function URIError(message) { return apply$1(init, this, arguments); };
3130
+ });
3131
+ exportWebAssemblyErrorCauseWrapper('CompileError', function (init) {
3132
+ return function CompileError(message) { return apply$1(init, this, arguments); };
3133
+ });
3134
+ exportWebAssemblyErrorCauseWrapper('LinkError', function (init) {
3135
+ return function LinkError(message) { return apply$1(init, this, arguments); };
3136
+ });
3137
+ exportWebAssemblyErrorCauseWrapper('RuntimeError', function (init) {
3138
+ return function RuntimeError(message) { return apply$1(init, this, arguments); };
3166
3139
  });
3167
3140
 
3168
- var $$d = _export;
3169
- var newPromiseCapabilityModule = newPromiseCapability$2;
3170
- var FORCED_PROMISE_CONSTRUCTOR$1 = promiseConstructorDetection.CONSTRUCTOR;
3141
+ var classof$5 = classofRaw$2;
3171
3142
 
3172
- // `Promise.reject` method
3173
- // https://tc39.es/ecma262/#sec-promise.reject
3174
- $$d({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR$1 }, {
3175
- reject: function reject(r) {
3176
- var capability = newPromiseCapabilityModule.f(this);
3177
- var capabilityReject = capability.reject;
3178
- capabilityReject(r);
3179
- return capability.promise;
3180
- }
3181
- });
3143
+ // `IsArray` abstract operation
3144
+ // https://tc39.es/ecma262/#sec-isarray
3145
+ // eslint-disable-next-line es/no-array-isarray -- safe
3146
+ var isArray$1 = Array.isArray || function isArray(argument) {
3147
+ return classof$5(argument) === 'Array';
3148
+ };
3182
3149
 
3183
- var anObject$c = anObject$l;
3184
- var isObject$2 = isObject$e;
3185
- var newPromiseCapability = newPromiseCapability$2;
3150
+ var uncurryThis$b = functionUncurryThis;
3151
+ var isArray = isArray$1;
3152
+ var isCallable$5 = isCallable$r;
3153
+ var classof$4 = classofRaw$2;
3154
+ var toString$9 = toString$b;
3186
3155
 
3187
- var promiseResolve$1 = function (C, x) {
3188
- anObject$c(C);
3189
- if (isObject$2(x) && x.constructor === C) return x;
3190
- var promiseCapability = newPromiseCapability.f(C);
3191
- var resolve = promiseCapability.resolve;
3192
- resolve(x);
3193
- return promiseCapability.promise;
3156
+ var push$4 = uncurryThis$b([].push);
3157
+
3158
+ var getJsonReplacerFunction = function (replacer) {
3159
+ if (isCallable$5(replacer)) return replacer;
3160
+ if (!isArray(replacer)) return;
3161
+ var rawLength = replacer.length;
3162
+ var keys = [];
3163
+ for (var i = 0; i < rawLength; i++) {
3164
+ var element = replacer[i];
3165
+ if (typeof element == 'string') push$4(keys, element);
3166
+ else if (typeof element == 'number' || classof$4(element) === 'Number' || classof$4(element) === 'String') push$4(keys, toString$9(element));
3167
+ }
3168
+ var keysLength = keys.length;
3169
+ var root = true;
3170
+ return function (key, value) {
3171
+ if (root) {
3172
+ root = false;
3173
+ return value;
3174
+ }
3175
+ if (isArray(this)) return value;
3176
+ for (var j = 0; j < keysLength; j++) if (keys[j] === key) return value;
3177
+ };
3194
3178
  };
3195
3179
 
3196
3180
  var $$c = _export;
3197
- var getBuiltIn = getBuiltIn$9;
3198
- var FORCED_PROMISE_CONSTRUCTOR = promiseConstructorDetection.CONSTRUCTOR;
3199
- var promiseResolve = promiseResolve$1;
3181
+ var getBuiltIn = getBuiltIn$a;
3182
+ var apply = functionApply;
3183
+ var call$c = functionCall;
3184
+ var uncurryThis$a = functionUncurryThis;
3185
+ var fails$9 = fails$p;
3186
+ var isCallable$4 = isCallable$r;
3187
+ var isSymbol = isSymbol$3;
3188
+ var arraySlice$2 = arraySlice$4;
3189
+ var getReplacerFunction = getJsonReplacerFunction;
3190
+ var NATIVE_SYMBOL = symbolConstructorDetection;
3191
+
3192
+ var $String = String;
3193
+ var $stringify = getBuiltIn('JSON', 'stringify');
3194
+ var exec$4 = uncurryThis$a(/./.exec);
3195
+ var charAt$6 = uncurryThis$a(''.charAt);
3196
+ var charCodeAt$2 = uncurryThis$a(''.charCodeAt);
3197
+ var replace$5 = uncurryThis$a(''.replace);
3198
+ var numberToString$1 = uncurryThis$a(1.0.toString);
3200
3199
 
3201
- getBuiltIn('Promise');
3200
+ var tester = /[\uD800-\uDFFF]/g;
3201
+ var low = /^[\uD800-\uDBFF]$/;
3202
+ var hi = /^[\uDC00-\uDFFF]$/;
3202
3203
 
3203
- // `Promise.resolve` method
3204
- // https://tc39.es/ecma262/#sec-promise.resolve
3205
- $$c({ target: 'Promise', stat: true, forced: FORCED_PROMISE_CONSTRUCTOR }, {
3206
- resolve: function resolve(x) {
3207
- return promiseResolve(this, x);
3208
- }
3204
+ var WRONG_SYMBOLS_CONVERSION = !NATIVE_SYMBOL || fails$9(function () {
3205
+ var symbol = getBuiltIn('Symbol')('stringify detection');
3206
+ // MS Edge converts symbol values to JSON as {}
3207
+ return $stringify([symbol]) !== '[null]'
3208
+ // WebKit converts symbol values to JSON as null
3209
+ || $stringify({ a: symbol }) !== '{}'
3210
+ // V8 throws on boxed symbols
3211
+ || $stringify(Object(symbol)) !== '{}';
3212
+ });
3213
+
3214
+ // https://github.com/tc39/proposal-well-formed-stringify
3215
+ var ILL_FORMED_UNICODE = fails$9(function () {
3216
+ return $stringify('\uDF06\uD834') !== '"\\udf06\\ud834"'
3217
+ || $stringify('\uDEAD') !== '"\\udead"';
3209
3218
  });
3210
3219
 
3220
+ var stringifyWithSymbolsFix = function (it, replacer) {
3221
+ var args = arraySlice$2(arguments);
3222
+ var $replacer = getReplacerFunction(replacer);
3223
+ if (!isCallable$4($replacer) && (it === undefined || isSymbol(it))) return; // IE8 returns string on undefined
3224
+ args[1] = function (key, value) {
3225
+ // some old implementations (like WebKit) could pass numbers as keys
3226
+ if (isCallable$4($replacer)) value = call$c($replacer, this, $String(key), value);
3227
+ if (!isSymbol(value)) return value;
3228
+ };
3229
+ return apply($stringify, null, args);
3230
+ };
3231
+
3232
+ var fixIllFormed = function (match, offset, string) {
3233
+ var prev = charAt$6(string, offset - 1);
3234
+ var next = charAt$6(string, offset + 1);
3235
+ if ((exec$4(low, match) && !exec$4(hi, next)) || (exec$4(hi, match) && !exec$4(low, prev))) {
3236
+ return '\\u' + numberToString$1(charCodeAt$2(match, 0), 16);
3237
+ } return match;
3238
+ };
3239
+
3240
+ if ($stringify) {
3241
+ // `JSON.stringify` method
3242
+ // https://tc39.es/ecma262/#sec-json.stringify
3243
+ $$c({ target: 'JSON', stat: true, arity: 3, forced: WRONG_SYMBOLS_CONVERSION || ILL_FORMED_UNICODE }, {
3244
+ // eslint-disable-next-line no-unused-vars -- required for `.length`
3245
+ stringify: function stringify(it, replacer, space) {
3246
+ var args = arraySlice$2(arguments);
3247
+ var result = apply(WRONG_SYMBOLS_CONVERSION ? stringifyWithSymbolsFix : $stringify, null, args);
3248
+ return ILL_FORMED_UNICODE && typeof result == 'string' ? replace$5(result, tester, fixIllFormed) : result;
3249
+ }
3250
+ });
3251
+ }
3252
+
3211
3253
  var anObject$b = anObject$l;
3212
3254
 
3213
3255
  // `RegExp.prototype.flags` getter implementation
@@ -3226,7 +3268,7 @@ var regexpFlags$1 = function () {
3226
3268
  return result;
3227
3269
  };
3228
3270
 
3229
- var fails$8 = fails$o;
3271
+ var fails$8 = fails$p;
3230
3272
  var global$7 = global$q;
3231
3273
 
3232
3274
  // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
@@ -3257,7 +3299,7 @@ var regexpStickyHelpers = {
3257
3299
  UNSUPPORTED_Y: UNSUPPORTED_Y$2
3258
3300
  };
3259
3301
 
3260
- var fails$7 = fails$o;
3302
+ var fails$7 = fails$p;
3261
3303
  var global$6 = global$q;
3262
3304
 
3263
3305
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
@@ -3268,7 +3310,7 @@ var regexpUnsupportedDotAll = fails$7(function () {
3268
3310
  return !(re.dotAll && re.test('\n') && re.flags === 's');
3269
3311
  });
3270
3312
 
3271
- var fails$6 = fails$o;
3313
+ var fails$6 = fails$p;
3272
3314
  var global$5 = global$q;
3273
3315
 
3274
3316
  // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
@@ -3409,9 +3451,9 @@ $$b({ target: 'RegExp', proto: true, forced: /./.exec !== exec$3 }, {
3409
3451
  // TODO: Remove from `core-js@4` since it's moved to entry points
3410
3452
 
3411
3453
  var call$a = functionCall;
3412
- var defineBuiltIn$7 = defineBuiltIn$d;
3454
+ var defineBuiltIn$7 = defineBuiltIn$e;
3413
3455
  var regexpExec$1 = regexpExec$2;
3414
- var fails$5 = fails$o;
3456
+ var fails$5 = fails$p;
3415
3457
  var wellKnownSymbol$7 = wellKnownSymbol$m;
3416
3458
  var createNonEnumerableProperty$2 = createNonEnumerableProperty$a;
3417
3459
 
@@ -3492,7 +3534,7 @@ var sameValue$1 = Object.is || function is(x, y) {
3492
3534
 
3493
3535
  var call$9 = functionCall;
3494
3536
  var anObject$a = anObject$l;
3495
- var isCallable$3 = isCallable$q;
3537
+ var isCallable$3 = isCallable$r;
3496
3538
  var classof$3 = classofRaw$2;
3497
3539
  var regexpExec = regexpExec$2;
3498
3540
 
@@ -3562,11 +3604,11 @@ var $$a = _export;
3562
3604
  var global$4 = global$q;
3563
3605
  var anInstance$2 = anInstance$4;
3564
3606
  var anObject$8 = anObject$l;
3565
- var isCallable$2 = isCallable$q;
3607
+ var isCallable$2 = isCallable$r;
3566
3608
  var getPrototypeOf = objectGetPrototypeOf;
3567
3609
  var defineBuiltInAccessor$4 = defineBuiltInAccessor$6;
3568
3610
  var createProperty$1 = createProperty$2;
3569
- var fails$4 = fails$o;
3611
+ var fails$4 = fails$p;
3570
3612
  var hasOwn$4 = hasOwnProperty_1;
3571
3613
  var wellKnownSymbol$6 = wellKnownSymbol$m;
3572
3614
  var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
@@ -3671,7 +3713,7 @@ $$8({ target: 'Iterator', proto: true, real: true }, {
3671
3713
  }
3672
3714
  });
3673
3715
 
3674
- var fails$3 = fails$o;
3716
+ var fails$3 = fails$p;
3675
3717
  var wellKnownSymbol$5 = wellKnownSymbol$m;
3676
3718
  var DESCRIPTORS$5 = descriptors;
3677
3719
  var IS_PURE$2 = isPure;
@@ -3713,7 +3755,7 @@ var urlConstructorDetection = !fails$3(function () {
3713
3755
  || new URL('http://x', undefined).host !== 'x';
3714
3756
  });
3715
3757
 
3716
- var defineBuiltIn$6 = defineBuiltIn$d;
3758
+ var defineBuiltIn$6 = defineBuiltIn$e;
3717
3759
 
3718
3760
  var defineBuiltIns$2 = function (target, src, options) {
3719
3761
  for (var key in src) defineBuiltIn$6(target, key, src[key], options);
@@ -3771,17 +3813,17 @@ var call$7 = functionCall;
3771
3813
  var uncurryThis$8 = functionUncurryThis;
3772
3814
  var DESCRIPTORS$4 = descriptors;
3773
3815
  var USE_NATIVE_URL$1 = urlConstructorDetection;
3774
- var defineBuiltIn$5 = defineBuiltIn$d;
3816
+ var defineBuiltIn$5 = defineBuiltIn$e;
3775
3817
  var defineBuiltInAccessor$3 = defineBuiltInAccessor$6;
3776
3818
  var defineBuiltIns$1 = defineBuiltIns$2;
3777
3819
  var setToStringTag$1 = setToStringTag$6;
3778
3820
  var createIteratorConstructor = iteratorCreateConstructor;
3779
3821
  var InternalStateModule$3 = internalState;
3780
3822
  var anInstance$1 = anInstance$4;
3781
- var isCallable$1 = isCallable$q;
3823
+ var isCallable$1 = isCallable$r;
3782
3824
  var hasOwn$3 = hasOwnProperty_1;
3783
3825
  var bind$2 = functionBindContext;
3784
- var classof$2 = classof$a;
3826
+ var classof$2 = classof$9;
3785
3827
  var anObject$5 = anObject$l;
3786
3828
  var isObject$1 = isObject$e;
3787
3829
  var $toString$2 = toString$b;
@@ -4178,7 +4220,7 @@ var web_urlSearchParams_constructor = {
4178
4220
  getState: getInternalParamsState
4179
4221
  };
4180
4222
 
4181
- var defineBuiltIn$4 = defineBuiltIn$d;
4223
+ var defineBuiltIn$4 = defineBuiltIn$e;
4182
4224
  var uncurryThis$7 = functionUncurryThis;
4183
4225
  var toString$6 = toString$b;
4184
4226
  var validateArgumentsLength$2 = validateArgumentsLength$5;
@@ -4227,7 +4269,7 @@ if (params$1 + '' !== 'a=2') {
4227
4269
  }, { enumerable: true, unsafe: true });
4228
4270
  }
4229
4271
 
4230
- var defineBuiltIn$3 = defineBuiltIn$d;
4272
+ var defineBuiltIn$3 = defineBuiltIn$e;
4231
4273
  var uncurryThis$6 = functionUncurryThis;
4232
4274
  var toString$5 = toString$b;
4233
4275
  var validateArgumentsLength$1 = validateArgumentsLength$5;
@@ -4281,7 +4323,6 @@ if (DESCRIPTORS$3 && !('size' in URLSearchParamsPrototype)) {
4281
4323
  *
4282
4324
  * @constant {string}
4283
4325
  */
4284
-
4285
4326
  /**
4286
4327
  * The default variant name for an experiment.
4287
4328
  *
@@ -4289,14 +4330,12 @@ if (DESCRIPTORS$3 && !('size' in URLSearchParamsPrototype)) {
4289
4330
  * @constant
4290
4331
  */
4291
4332
  const EXPERIMENT_DEFAULT_VARIANT_NAME = 'DEFAULT';
4292
-
4293
4333
  /**
4294
4334
  * The key used to store or retrieve the information in the SessionStore
4295
4335
  *
4296
4336
  * @constant {string}
4297
4337
  */
4298
4338
  const EXPERIMENT_QUERY_PARAM_KEY = 'variantName';
4299
-
4300
4339
  /**
4301
4340
  * The key used to store or retrieve the information in the SessionStore
4302
4341
  * indicating whether an experiment has already been checked.
@@ -4304,7 +4343,6 @@ const EXPERIMENT_QUERY_PARAM_KEY = 'variantName';
4304
4343
  * @constant {string}
4305
4344
  */
4306
4345
  const EXPERIMENT_ALREADY_CHECKED_KEY = 'experimentAlreadyCheck';
4307
-
4308
4346
  /**
4309
4347
  * EXPERIMENT_FETCH_EXPIRE_TIME is a constant that represents the name of the variable used to store
4310
4348
  * the expire time for experiment fetching. It is a string value 'experimentFetchExpireTime'.
@@ -4312,7 +4350,6 @@ const EXPERIMENT_ALREADY_CHECKED_KEY = 'experimentAlreadyCheck';
4312
4350
  * @constant {string}
4313
4351
  */
4314
4352
  const EXPERIMENT_FETCH_EXPIRE_TIME_KEY = 'experimentFetchExpireTime';
4315
-
4316
4353
  /**
4317
4354
  * The duration in milliseconds for which data should be stored in the local storage.
4318
4355
  *
@@ -4322,7 +4359,6 @@ const EXPERIMENT_FETCH_EXPIRE_TIME_KEY = 'experimentFetchExpireTime';
4322
4359
  *
4323
4360
  */
4324
4361
  const LOCAL_STORAGE_TIME_DURATION_MILLISECONDS = 86400 * 1000;
4325
-
4326
4362
  /**
4327
4363
  * API_EXPERIMENTS_URL
4328
4364
  *
@@ -4332,7 +4368,6 @@ const LOCAL_STORAGE_TIME_DURATION_MILLISECONDS = 86400 * 1000;
4332
4368
  * @constant
4333
4369
  */
4334
4370
  const API_EXPERIMENTS_URL = 'api/v1/experiments/isUserIncluded';
4335
-
4336
4371
  /**
4337
4372
  * The name of the experiment database store in indexDB.
4338
4373
  *
@@ -4340,31 +4375,29 @@ const API_EXPERIMENTS_URL = 'api/v1/experiments/isUserIncluded';
4340
4375
  * @constant
4341
4376
  */
4342
4377
  const EXPERIMENT_DB_STORE_NAME = 'dotExperimentStore';
4343
-
4344
4378
  /**
4345
4379
  * The path to the key in the database IndexDB representing the running experiment data.
4346
4380
  * @type {string}
4347
4381
  */
4348
4382
  const EXPERIMENT_DB_KEY_PATH = 'running_experiment';
4349
-
4350
4383
  /**
4351
4384
  * Enumeration of debug levels.
4352
4385
  *
4353
4386
  * @enum {string}
4354
4387
  * @readonly
4355
4388
  */
4356
- let DEBUG_LEVELS = /*#__PURE__*/function (DEBUG_LEVELS) {
4389
+ var DEBUG_LEVELS;
4390
+ (function (DEBUG_LEVELS) {
4357
4391
  DEBUG_LEVELS["NONE"] = "NONE";
4358
4392
  DEBUG_LEVELS["DEBUG"] = "DEBUG";
4359
4393
  DEBUG_LEVELS["WARN"] = "WARN";
4360
4394
  DEBUG_LEVELS["ERROR"] = "ERROR";
4361
- return DEBUG_LEVELS;
4362
- }({});
4395
+ })(DEBUG_LEVELS || (DEBUG_LEVELS = {}));
4363
4396
  const PAGE_VIEW_EVENT_NAME = 'pageview';
4364
4397
 
4365
4398
  var $$6 = _export;
4366
4399
  var $includes = arrayIncludes.includes;
4367
- var fails$2 = fails$o;
4400
+ var fails$2 = fails$p;
4368
4401
  var addToUnscopables = addToUnscopables$2;
4369
4402
 
4370
4403
  // FF99+ bug
@@ -4424,8 +4457,8 @@ var toString$4 = toString$b;
4424
4457
  var getRegExpFlags$1 = regexpGetFlags;
4425
4458
  var stickyHelpers = regexpStickyHelpers;
4426
4459
  var proxyAccessor = proxyAccessor$2;
4427
- var defineBuiltIn$2 = defineBuiltIn$d;
4428
- var fails$1 = fails$o;
4460
+ var defineBuiltIn$2 = defineBuiltIn$e;
4461
+ var fails$1 = fails$p;
4429
4462
  var hasOwn$1 = hasOwnProperty_1;
4430
4463
  var enforceInternalState = internalState.enforce;
4431
4464
  var setSpecies = setSpecies$2;
@@ -4632,7 +4665,7 @@ if (DESCRIPTORS$1 && UNSUPPORTED_DOT_ALL) {
4632
4665
 
4633
4666
  var $$5 = _export;
4634
4667
  var call$5 = functionCall;
4635
- var isCallable = isCallable$q;
4668
+ var isCallable = isCallable$r;
4636
4669
  var anObject$4 = anObject$l;
4637
4670
  var toString$3 = toString$b;
4638
4671
 
@@ -4664,10 +4697,10 @@ $$5({ target: 'RegExp', proto: true, forced: !DELEGATES_TO_EXEC }, {
4664
4697
  });
4665
4698
 
4666
4699
  var PROPER_FUNCTION_NAME = functionName.PROPER;
4667
- var defineBuiltIn$1 = defineBuiltIn$d;
4700
+ var defineBuiltIn$1 = defineBuiltIn$e;
4668
4701
  var anObject$3 = anObject$l;
4669
4702
  var $toString$1 = toString$b;
4670
- var fails = fails$o;
4703
+ var fails = fails$p;
4671
4704
  var getRegExpFlags = regexpGetFlags;
4672
4705
 
4673
4706
  var TO_STRING = 'toString';
@@ -5196,7 +5229,7 @@ var USE_NATIVE_URL = urlConstructorDetection;
5196
5229
  var global$1 = global$q;
5197
5230
  var bind = functionBindContext;
5198
5231
  var uncurryThis = functionUncurryThis;
5199
- var defineBuiltIn = defineBuiltIn$d;
5232
+ var defineBuiltIn = defineBuiltIn$e;
5200
5233
  var defineBuiltInAccessor = defineBuiltInAccessor$6;
5201
5234
  var anInstance = anInstance$4;
5202
5235
  var hasOwn = hasOwnProperty_1;
@@ -6280,7 +6313,6 @@ const parseDataForAnalytics = (experiments, location) => {
6280
6313
  }))
6281
6314
  };
6282
6315
  };
6283
-
6284
6316
  /**
6285
6317
  * This utility function performs regular expression (regex) matching on a supplied URL.
6286
6318
  *
@@ -6302,7 +6334,6 @@ const verifyRegex = (regexToCheck, href) => {
6302
6334
  return false;
6303
6335
  }
6304
6336
  };
6305
-
6306
6337
  /**
6307
6338
  * This function merges newly fetched data with the data stored from IndexedDB, preparing it for re-storage in IndexedDB.
6308
6339
  *
@@ -6342,7 +6373,6 @@ const parseData = (fetchExperiments, storedExperiments) => {
6342
6373
  }
6343
6374
  return dataToStorage;
6344
6375
  };
6345
-
6346
6376
  /**
6347
6377
  * Retrieves the array of experiment IDs from the given AssignedExperiments..
6348
6378
  *
@@ -6350,7 +6380,6 @@ const parseData = (fetchExperiments, storedExperiments) => {
6350
6380
  * @param experiments
6351
6381
  */
6352
6382
  const getExperimentsIds = experiments => experiments.map(experiment => experiment.id) || [];
6353
-
6354
6383
  /**
6355
6384
  * Sets the expire time for new experiments based on the current time.
6356
6385
  * The expire time is calculated by adding the expireMillis value of each experiment's lookBackWindow to the current time (Date.now()).
@@ -6366,7 +6395,6 @@ const addExpireTimeToExperiments = experiments => {
6366
6395
  })
6367
6396
  }));
6368
6397
  };
6369
-
6370
6398
  /**
6371
6399
  * Returns an array of experiments that have not expired yet.
6372
6400
  *
@@ -6383,11 +6411,6 @@ const getUnexpiredExperiments = (experiments, excludedExperimentIdsEnded) => {
6383
6411
  });
6384
6412
  };
6385
6413
 
6386
- /**
6387
- * Represents the configuration for a database connection.
6388
- * @interface
6389
- */
6390
-
6391
6414
  /**
6392
6415
  * The default version of the database.
6393
6416
  *
@@ -6395,7 +6418,6 @@ const getUnexpiredExperiments = (experiments, excludedExperimentIdsEnded) => {
6395
6418
  * @constant
6396
6419
  */
6397
6420
  const DB_DEFAULT_VERSION = 1;
6398
-
6399
6421
  /**
6400
6422
  * The `DatabaseHandler` class offers specific methods to store and get data
6401
6423
  * from IndexedDB.
@@ -6413,7 +6435,6 @@ const DB_DEFAULT_VERSION = 1;
6413
6435
  * await DatabaseHandler.persistData(anAssignedExperiment);
6414
6436
  *
6415
6437
  */
6416
-
6417
6438
  class IndexDBDatabaseHandler {
6418
6439
  constructor(config) {
6419
6440
  this.config = config;
@@ -6435,7 +6456,6 @@ class IndexDBDatabaseHandler {
6435
6456
  throw new Error("'db_key_path' is required in config");
6436
6457
  }
6437
6458
  }
6438
-
6439
6459
  /**
6440
6460
  * Saves the provided data to indexDB.
6441
6461
  *
@@ -6457,7 +6477,6 @@ class IndexDBDatabaseHandler {
6457
6477
  };
6458
6478
  });
6459
6479
  }
6460
-
6461
6480
  /**
6462
6481
  * Retrieves data from the database using a specific key.
6463
6482
  *
@@ -6474,7 +6493,6 @@ class IndexDBDatabaseHandler {
6474
6493
  request.onerror = () => reject(request.error);
6475
6494
  });
6476
6495
  }
6477
-
6478
6496
  /**
6479
6497
  * Deletes all the data from the IndexedDB store.
6480
6498
  *
@@ -6491,7 +6509,6 @@ class IndexDBDatabaseHandler {
6491
6509
  request.onerror = () => reject(request.error);
6492
6510
  });
6493
6511
  }
6494
-
6495
6512
  /**
6496
6513
  * Sets the flag indicating that the experiment has already been checked.
6497
6514
  *
@@ -6501,7 +6518,6 @@ class IndexDBDatabaseHandler {
6501
6518
  setFlagExperimentAlreadyChecked() {
6502
6519
  sessionStorage.setItem(EXPERIMENT_ALREADY_CHECKED_KEY, 'true');
6503
6520
  }
6504
-
6505
6521
  /**
6506
6522
  * Sets the fetch expired time in the local storage.
6507
6523
  *
@@ -6511,7 +6527,6 @@ class IndexDBDatabaseHandler {
6511
6527
  const expireTime = Date.now() + LOCAL_STORAGE_TIME_DURATION_MILLISECONDS;
6512
6528
  localStorage.setItem(EXPERIMENT_FETCH_EXPIRE_TIME_KEY, expireTime.toString());
6513
6529
  }
6514
-
6515
6530
  /**
6516
6531
  * Builds an error message based on the provided error object.
6517
6532
  * @param {DOMException | null} error - The error object to build the message from.
@@ -6526,7 +6541,6 @@ class IndexDBDatabaseHandler {
6526
6541
  }
6527
6542
  return errorMessage;
6528
6543
  }
6529
-
6530
6544
  /**
6531
6545
  * Creates or opens a IndexedDB database with the specified version.
6532
6546
  *
@@ -6553,7 +6567,6 @@ class IndexDBDatabaseHandler {
6553
6567
  };
6554
6568
  });
6555
6569
  }
6556
-
6557
6570
  /**
6558
6571
  * Retrieves the result of a database request from an Event object.
6559
6572
  *
@@ -6570,8 +6583,6 @@ class IndexDBDatabaseHandler {
6570
6583
  */
6571
6584
  class DotLogger {
6572
6585
  constructor(isDebug, packageName) {
6573
- this.isDebug = void 0;
6574
- this.packageName = void 0;
6575
6586
  this.isDebug = isDebug;
6576
6587
  this.packageName = packageName;
6577
6588
  }
@@ -6625,7 +6636,6 @@ const checkFlagExperimentAlreadyChecked = () => {
6625
6636
  const flag = sessionStorage.getItem(EXPERIMENT_ALREADY_CHECKED_KEY);
6626
6637
  return flag === 'true';
6627
6638
  };
6628
-
6629
6639
  /**
6630
6640
  * Checks if the data needs to be invalidated based on the creation date.
6631
6641
  *
@@ -6643,7 +6653,6 @@ const isDataCreateValid = () => {
6643
6653
  return false;
6644
6654
  }
6645
6655
  };
6646
-
6647
6656
  /**
6648
6657
  * Ad to an absolute path the baseUrl depending on the location.
6649
6658
  *
@@ -6665,7 +6674,6 @@ const isFullUrl = url => {
6665
6674
  const pattern = /^https?:\/\//i;
6666
6675
  return pattern.test(url);
6667
6676
  };
6668
-
6669
6677
  /**
6670
6678
  * Updates the URL with the queryParam with the experiment variant name.
6671
6679
  *
@@ -6683,7 +6691,6 @@ const updateUrlWithExperimentVariant = (location, variant) => {
6683
6691
  }
6684
6692
  return url.toString();
6685
6693
  };
6686
-
6687
6694
  /**
6688
6695
  * Check if two arrays of Experiment objects are equal.
6689
6696
  *
@@ -6697,7 +6704,6 @@ const objectsAreEqual = (obj1, obj2) => {
6697
6704
  }
6698
6705
  return JSON.stringify(obj1) === JSON.stringify(obj2);
6699
6706
  };
6700
-
6701
6707
  /**
6702
6708
  * A function to redirect the user to a new URL.
6703
6709
  *
@@ -6734,27 +6740,11 @@ class DotExperiments {
6734
6740
  * @private
6735
6741
  */
6736
6742
  this.initializationPromise = null;
6737
- /**
6738
- * Represents the analytics client for Analytics.
6739
- * @private
6740
- */
6741
- this.analytics = void 0;
6742
- /**
6743
- * Class representing a database handler for IndexDB.
6744
- * @class
6745
- */
6746
- this.persistenceHandler = void 0;
6747
6743
  /**
6748
6744
  * Represents the stored data in the IndexedDB.
6749
6745
  * @private
6750
6746
  */
6751
6747
  this.experimentsAssigned = [];
6752
- /**
6753
- * A logger utility for logging messages.
6754
- *
6755
- * @class
6756
- */
6757
- this.logger = void 0;
6758
6748
  /**
6759
6749
  * Represents the current location.
6760
6750
  * @private
@@ -6777,7 +6767,6 @@ class DotExperiments {
6777
6767
  }
6778
6768
  this.logger = new DotLogger(this.config.debug, 'DotExperiment');
6779
6769
  }
6780
-
6781
6770
  /**
6782
6771
  * Retrieves the array of experiments assigned to an instance of the class.
6783
6772
  *
@@ -6786,7 +6775,6 @@ class DotExperiments {
6786
6775
  get experiments() {
6787
6776
  return this.experimentsAssigned;
6788
6777
  }
6789
-
6790
6778
  /**
6791
6779
  * Returns a custom redirect function. If a custom redirect function is not configured,
6792
6780
  * the default redirect function will be used.
@@ -6798,7 +6786,6 @@ class DotExperiments {
6798
6786
  var _this$config$redirect;
6799
6787
  return (_this$config$redirect = this.config.redirectFn) != null ? _this$config$redirect : defaultRedirectFn;
6800
6788
  }
6801
-
6802
6789
  /**
6803
6790
  * Retrieves the current location.
6804
6791
  *
@@ -6807,7 +6794,6 @@ class DotExperiments {
6807
6794
  get location() {
6808
6795
  return this.currentLocation;
6809
6796
  }
6810
-
6811
6797
  /**
6812
6798
  * Retrieves instance of DotExperiments class if it doesn't exist create a new one.
6813
6799
  * If the instance does not exist, it creates a new instance with the provided configuration and calls the `getExperimentData` method.
@@ -6828,7 +6814,6 @@ class DotExperiments {
6828
6814
  }
6829
6815
  return DotExperiments.instance;
6830
6816
  }
6831
-
6832
6817
  /**
6833
6818
  * Waits for the initialization process to be completed.
6834
6819
  *
@@ -6838,7 +6823,6 @@ class DotExperiments {
6838
6823
  var _this$initializationP;
6839
6824
  return (_this$initializationP = this.initializationPromise) != null ? _this$initializationP : Promise.resolve();
6840
6825
  }
6841
-
6842
6826
  /**
6843
6827
  * This method appends variant parameters to navigation links based on the provided navClass.
6844
6828
  *
@@ -6882,7 +6866,6 @@ class DotExperiments {
6882
6866
  });
6883
6867
  }
6884
6868
  }
6885
-
6886
6869
  /**
6887
6870
  * Retrieves the current debug status.
6888
6871
  *
@@ -6892,7 +6875,6 @@ class DotExperiments {
6892
6875
  getIsDebugActive() {
6893
6876
  return this.config.debug;
6894
6877
  }
6895
-
6896
6878
  /**
6897
6879
  * Updates the current location and checks if a variant should be applied.
6898
6880
  * Redirects to the variant URL if necessary.
@@ -6929,7 +6911,6 @@ class DotExperiments {
6929
6911
  this.logger.timeEnd('Total location changed');
6930
6912
  this.logger.groupEnd();
6931
6913
  }
6932
-
6933
6914
  /**
6934
6915
  * Tracks a page view event in the analytics system.
6935
6916
  *
@@ -6939,7 +6920,6 @@ class DotExperiments {
6939
6920
  this.track(PAGE_VIEW_EVENT_NAME);
6940
6921
  this.prevLocation = this.currentLocation.href;
6941
6922
  }
6942
-
6943
6923
  /**
6944
6924
  * This method is used to retrieve the variant associated with a given URL.
6945
6925
  *
@@ -6958,7 +6938,6 @@ class DotExperiments {
6958
6938
  });
6959
6939
  return (experiment == null ? void 0 : experiment.variant) || null;
6960
6940
  }
6961
-
6962
6941
  /**
6963
6942
  * Returns the experiment variant name as a URL search parameter.
6964
6943
  *
@@ -6981,7 +6960,6 @@ class DotExperiments {
6981
6960
  }
6982
6961
  return new URLSearchParams(params);
6983
6962
  }
6984
-
6985
6963
  /**
6986
6964
  * Determines whether a page view should be tracked.
6987
6965
  *
@@ -6997,7 +6975,6 @@ class DotExperiments {
6997
6975
  this.logger.log(`No send pageView. No experiments to track.`);
6998
6976
  return false;
6999
6977
  }
7000
-
7001
6978
  // If the previous location is the same as the current location, we don't need to track the page view
7002
6979
  if (this.prevLocation === this.currentLocation.href) {
7003
6980
  this.logger.log(`No send pageView. Same location.`);
@@ -7005,7 +6982,6 @@ class DotExperiments {
7005
6982
  }
7006
6983
  return true;
7007
6984
  }
7008
-
7009
6985
  /**
7010
6986
  * Tracks an event using the analytics service.
7011
6987
  *
@@ -7018,7 +6994,6 @@ class DotExperiments {
7018
6994
  this.logger.log(`${typeName} event sent`);
7019
6995
  });
7020
6996
  }
7021
-
7022
6997
  /**
7023
6998
  * Initializes the application using lazy initialization. This method performs
7024
6999
  * necessary setup steps and should be invoked to ensure proper execution of the application.
@@ -7051,7 +7026,6 @@ class DotExperiments {
7051
7026
  }();
7052
7027
  }
7053
7028
  }
7054
-
7055
7029
  /**
7056
7030
  * Fetches experiments from the server.
7057
7031
  *
@@ -7097,7 +7071,6 @@ class DotExperiments {
7097
7071
  this.logger.groupEnd();
7098
7072
  }
7099
7073
  }
7100
-
7101
7074
  /**
7102
7075
  * This method is responsible for retrieving and persisting experiment data from the server to the local indexDB database.
7103
7076
  *
@@ -7120,13 +7093,11 @@ class DotExperiments {
7120
7093
  experiments: []
7121
7094
  };
7122
7095
  const storedExperiments = this.experimentsAssigned ? this.experimentsAssigned : [];
7123
-
7124
7096
  // Checks whether fetching experiment data from the server is necessary.
7125
7097
  if (this.shouldFetchNewData()) {
7126
7098
  fetchedExperiments = await this.getExperimentsFromServer();
7127
7099
  }
7128
7100
  const dataToPersist = parseData(fetchedExperiments, storedExperiments);
7129
-
7130
7101
  // If my stored data is equal to my parsed data, I don't need to persist again
7131
7102
  if (!objectsAreEqual(dataToPersist, storedExperiments)) {
7132
7103
  this.experimentsAssigned = await this.persistExperiments(dataToPersist);
@@ -7136,7 +7107,6 @@ class DotExperiments {
7136
7107
  throw Error(`Error persisting experiments to indexDB, ${e}`);
7137
7108
  }
7138
7109
  }
7139
-
7140
7110
  /**
7141
7111
  * Persists the parsed experiment data into the indexDB database.
7142
7112
  *
@@ -7175,7 +7145,6 @@ class DotExperiments {
7175
7145
  this.logger.groupEnd();
7176
7146
  }
7177
7147
  }
7178
-
7179
7148
  /**
7180
7149
  * Initializes the database handler.
7181
7150
  *
@@ -7191,7 +7160,6 @@ class DotExperiments {
7191
7160
  db_key_path: EXPERIMENT_DB_KEY_PATH
7192
7161
  });
7193
7162
  }
7194
-
7195
7163
  /**
7196
7164
  * Initializes the Jitsu analytics client.
7197
7165
  *
@@ -7215,7 +7183,6 @@ class DotExperiments {
7215
7183
  this.logger.log(`Error creating/updating analytics client: ${error}`);
7216
7184
  }
7217
7185
  }
7218
-
7219
7186
  /**
7220
7187
  * Updates the analytics client's data using the experiments data
7221
7188
  * currently available in the IndexDB database, based on the current location.
@@ -7244,14 +7211,12 @@ class DotExperiments {
7244
7211
  });
7245
7212
  this.logger.log('No experiments data available to update analytics client.');
7246
7213
  }
7247
-
7248
7214
  // trigger the page view event
7249
7215
  if (this.shouldTrackPageView()) {
7250
7216
  this.trackPageView();
7251
7217
  return;
7252
7218
  }
7253
7219
  }
7254
-
7255
7220
  /**
7256
7221
  * Determines whether analytics should be checked.
7257
7222
  *
@@ -7275,7 +7240,6 @@ class DotExperiments {
7275
7240
  this.logger.log(`Not should Check Analytics by now...`);
7276
7241
  return false;
7277
7242
  }
7278
-
7279
7243
  /**
7280
7244
  * Retrieves persisted data from the database.
7281
7245
  *
@@ -7302,11 +7266,6 @@ class DotExperiments {
7302
7266
  return storedData;
7303
7267
  }
7304
7268
  }
7305
- /**
7306
- * The instance of the DotExperiments class.
7307
- * @private
7308
- */
7309
- DotExperiments.instance = void 0;
7310
7269
  /**
7311
7270
  * Represents the default configuration for the DotExperiment library.
7312
7271
  * @property {boolean} trackPageView - Specifies whether to track page view or not. Default value is true.
@@ -7349,7 +7308,6 @@ const useExperiments = instance => {
7349
7308
  }
7350
7309
  }
7351
7310
  }, [instance]);
7352
-
7353
7311
  /**
7354
7312
  * This effect sets a click handler on the document.
7355
7313
  * It captures click events and redirects to a new URL if the clicked anchor has a variant assigned,
@@ -7367,23 +7325,19 @@ const useExperiments = instance => {
7367
7325
  const clickedHref = target.getAttribute('href');
7368
7326
  if (clickedHref) {
7369
7327
  const modifiedUrl = new URL(clickedHref, instance.location.href);
7370
-
7371
7328
  // Remove the experiment query param from the URL
7372
7329
  modifiedUrl.searchParams.delete(EXPERIMENT_QUERY_PARAM_KEY);
7373
7330
  event.preventDefault();
7374
-
7375
7331
  // Get the variant from the href of the clicked anchor
7376
7332
  const variant = instance.getVariantFromHref(clickedHref);
7377
7333
  if (variant && variant.name !== EXPERIMENT_DEFAULT_VARIANT_NAME) {
7378
7334
  // Set the experiment query param in the URL if the variant is not the default one
7379
7335
  modifiedUrl.searchParams.set(EXPERIMENT_QUERY_PARAM_KEY, variant.name);
7380
7336
  }
7381
-
7382
7337
  // Redirect to the new URL using the custom redirect function
7383
7338
  instance.customRedirectFn(modifiedUrl.toString());
7384
7339
  }
7385
7340
  };
7386
-
7387
7341
  // Register the click handler to all elements in the document
7388
7342
  document.addEventListener('click', customClickHandler);
7389
7343
  return () => {
@@ -7394,60 +7348,33 @@ const useExperiments = instance => {
7394
7348
  };
7395
7349
 
7396
7350
  /**
7397
- * `DotExperimentsProvider` is a component that uses React's Context API to provide
7398
- * an instance of `DotExperiments` to all of its descendants.
7399
- *
7400
- *
7401
- * @component
7402
- * @example
7403
- * ```jsx
7351
+ * Internal React context provider used by `withExperiments`.
7404
7352
  *
7405
- * // Your application component
7406
- * function App() {
7353
+ * @internal Do not import or use directly — use `withExperiments` from the package entry point.
7407
7354
  *
7408
- * // Configuration options could be taken from environment variables or can send you own.
7409
- * const experimentConfig = {
7410
- * apiKey: process.env.NEXT_PUBLIC_EXPERIMENTS_API_KEY ,
7411
- * server: process.env.NEXT_PUBLIC_DOTCMS_HOST ,
7412
- * debug: process.env.NEXT_PUBLIC_EXPERIMENTS_DEBUG,
7413
- * redirectFn: YourRedirectFunction
7414
- * };
7415
- *
7416
- * return (
7417
- * <DotExperimentsProvider config={experimentConfig}>
7418
- * <Header>
7419
- * <Navigation items={nav} />
7420
- * </Header>
7421
- * <DotcmsLayout entity={{...}} config={{...}} />
7422
- * </DotExperimentsProvider>
7423
- * );
7424
- * }
7425
- * ```
7426
- *
7427
- * @param {object} props - The properties that define the `DotExperimentsProvider`.
7428
- * @param {ReactNode} props.children - The descendants of this provider, which will
7429
- * have access to the provided `DotExperiments` instance.
7430
- * @param {DotExperimentConfig} props.config - The configuration object for `DotExperiments`.
7431
- *
7432
- * @returns {ReactElement} The provider component, which should wrap the components
7433
- * that need access to the `DotExperiments` instance.
7355
+ * @param props.children - Descendants that need access to the `DotExperiments` instance.
7356
+ * @param props.config - Configuration object for `DotExperiments`.
7357
+ * @returns The provider component.
7434
7358
  */
7435
7359
  const DotExperimentsProvider = ({
7436
7360
  children,
7437
7361
  config
7438
7362
  }) => {
7439
7363
  const [instance, setInstance] = useState(null);
7440
-
7441
7364
  // Run Experiments detection
7442
7365
  useExperiments(instance);
7443
-
7444
7366
  // Initialize the DotExperiments instance
7445
7367
  useEffect(() => {
7446
7368
  var _getUVEState;
7447
7369
  const insideEditor = (_getUVEState = getUVEState()) == null ? void 0 : _getUVEState.mode;
7448
7370
  if (!insideEditor) {
7449
7371
  const dotExperimentsInstance = DotExperiments.getInstance(config);
7450
- dotExperimentsInstance.ready().then(() => {
7372
+ dotExperimentsInstance.ready().catch(error => {
7373
+ if (config.debug) {
7374
+ console.error('DotExperimentsProvider: failed to initialize DotExperiments instance.', error);
7375
+ }
7376
+ }).finally(() => {
7377
+ // Expose the instance even on failure, so consumers stop waiting and render.
7451
7378
  setInstance(dotExperimentsInstance);
7452
7379
  });
7453
7380
  } else {
@@ -7456,7 +7383,7 @@ const DotExperimentsProvider = ({
7456
7383
  }
7457
7384
  }
7458
7385
  }, [config]);
7459
- return /*#__PURE__*/jsx(DotExperimentsContext.Provider, {
7386
+ return jsx(DotExperimentsContext.Provider, {
7460
7387
  value: instance,
7461
7388
  children: children
7462
7389
  });
@@ -7487,7 +7414,6 @@ function shallowEqual(objA, objB) {
7487
7414
  }
7488
7415
  return true;
7489
7416
  }
7490
-
7491
7417
  /**
7492
7418
  * Memoizes an object and returns the memoized object.
7493
7419
  * Mantaing the same reference if the object is the same independently if is called inside any component.
@@ -7520,9 +7446,9 @@ const withExperiments = (WrappedComponent, config) => {
7520
7446
  // in each render, causing the experiment handling to be reinitialized.
7521
7447
  const memoizedConfig = useMemoizedObject(config);
7522
7448
  return useCallback(props => {
7523
- return /*#__PURE__*/jsx(DotExperimentsProvider, {
7449
+ return jsx(DotExperimentsProvider, {
7524
7450
  config: memoizedConfig,
7525
- children: /*#__PURE__*/jsx(DotExperimentHandlingComponent, Object.assign({}, props, {
7451
+ children: jsx(DotExperimentHandlingComponent, Object.assign({}, props, {
7526
7452
  WrappedComponent: WrappedComponent
7527
7453
  }))
7528
7454
  });