@ninetailed/experience.js-react 3.0.1-beta.3 → 3.0.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,69 +1,14 @@
1
- import React, { createContext, useMemo, useContext, useState, useEffect, useCallback } from 'react';
2
- import { Ninetailed, selectVariant, selectDistribution, selectHasExperienceVariants, selectActiveExperiments, selectExperience, selectExperienceVariant } from '@ninetailed/experience.js';
1
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
+ import React, { createContext, useContext, useCallback, useMemo, useState, useRef, useEffect, createElement as createElement$1 } from 'react';
3
+ import { selectActiveExperiments, Ninetailed, selectVariant, selectDistribution, selectHasExperienceVariants, selectExperience, selectExperienceVariant } from '@ninetailed/experience.js';
4
+ import _debounce from 'lodash/debounce';
5
+ import values$1 from 'lodash/values';
6
+ import { logger, isBrowser } from '@ninetailed/experience.js-shared';
7
+ import isEqual from 'lodash/isEqual';
3
8
  import { useInView } from 'react-intersection-observer';
4
- import { isBrowser } from '@ninetailed/experience.js-shared';
5
9
  import get$1 from 'lodash/get';
6
10
  import has$1 from 'lodash/has';
7
11
 
8
- const NinetailedContext = /*#__PURE__*/createContext(undefined);
9
-
10
- const ExperimentsContext = /*#__PURE__*/createContext(undefined);
11
-
12
- const ExperimentsProvider = ({
13
- experiments,
14
- children
15
- }) => {
16
- return /*#__PURE__*/React.createElement(ExperimentsContext.Provider, {
17
- value: {
18
- experiments
19
- }
20
- }, children);
21
- };
22
-
23
- const NinetailedProvider = ({
24
- children,
25
- clientId,
26
- experiments: _experiments = [],
27
- environment,
28
- preview,
29
- url,
30
- profile,
31
- locale,
32
- requestTimeout,
33
- plugins: _plugins = [],
34
- onLog,
35
- onError
36
- }) => {
37
- const ninetailed = useMemo(() => new Ninetailed({
38
- clientId,
39
- environment,
40
- preview
41
- }, {
42
- url,
43
- plugins: _plugins,
44
- profile,
45
- locale,
46
- requestTimeout,
47
- onLog,
48
- onError
49
- }), []);
50
- return /*#__PURE__*/React.createElement(NinetailedContext.Provider, {
51
- value: ninetailed
52
- }, /*#__PURE__*/React.createElement(ExperimentsProvider, {
53
- experiments: _experiments
54
- }, children));
55
- };
56
-
57
- const useNinetailed = () => {
58
- const ninetailed = useContext(NinetailedContext);
59
-
60
- if (ninetailed === undefined) {
61
- throw new Error('The component using the the context must be a descendant of the NinetailedProvider');
62
- }
63
-
64
- return ninetailed;
65
- };
66
-
67
12
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
68
13
 
69
14
  var check = function (it) {
@@ -71,7 +16,7 @@ var check = function (it) {
71
16
  };
72
17
 
73
18
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
74
- var global$w =
19
+ var global$f =
75
20
  // eslint-disable-next-line es/no-global-this -- safe
76
21
  check(typeof globalThis == 'object' && globalThis) ||
77
22
  check(typeof window == 'object' && window) ||
@@ -81,7 +26,9 @@ var global$w =
81
26
  // eslint-disable-next-line no-new-func -- fallback
82
27
  (function () { return this; })() || Function('return this')();
83
28
 
84
- var fails$g = function (exec) {
29
+ var objectGetOwnPropertyDescriptor = {};
30
+
31
+ var fails$h = function (exec) {
85
32
  try {
86
33
  return !!exec();
87
34
  } catch (error) {
@@ -89,9 +36,18 @@ var fails$g = function (exec) {
89
36
  }
90
37
  };
91
38
 
92
- var fails$f = fails$g;
39
+ var fails$g = fails$h;
40
+
41
+ // Detect IE8's incomplete defineProperty implementation
42
+ var descriptors = !fails$g(function () {
43
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
44
+ return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
45
+ });
46
+
47
+ var fails$f = fails$h;
93
48
 
94
49
  var functionBindNative = !fails$f(function () {
50
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
95
51
  var test = (function () { /* empty */ }).bind();
96
52
  // eslint-disable-next-line no-prototype-builtins -- safe
97
53
  return typeof test != 'function' || test.hasOwnProperty('prototype');
@@ -99,16 +55,46 @@ var functionBindNative = !fails$f(function () {
99
55
 
100
56
  var NATIVE_BIND$2 = functionBindNative;
101
57
 
58
+ var call$a = Function.prototype.call;
59
+
60
+ var functionCall = NATIVE_BIND$2 ? call$a.bind(call$a) : function () {
61
+ return call$a.apply(call$a, arguments);
62
+ };
63
+
64
+ var objectPropertyIsEnumerable = {};
65
+
66
+ var $propertyIsEnumerable = {}.propertyIsEnumerable;
67
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
68
+ var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
69
+
70
+ // Nashorn ~ JDK8 bug
71
+ var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
72
+
73
+ // `Object.prototype.propertyIsEnumerable` method implementation
74
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
75
+ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
76
+ var descriptor = getOwnPropertyDescriptor$1(this, V);
77
+ return !!descriptor && descriptor.enumerable;
78
+ } : $propertyIsEnumerable;
79
+
80
+ var createPropertyDescriptor$3 = function (bitmap, value) {
81
+ return {
82
+ enumerable: !(bitmap & 1),
83
+ configurable: !(bitmap & 2),
84
+ writable: !(bitmap & 4),
85
+ value: value
86
+ };
87
+ };
88
+
89
+ var NATIVE_BIND$1 = functionBindNative;
90
+
102
91
  var FunctionPrototype$2 = Function.prototype;
103
- var bind = FunctionPrototype$2.bind;
104
- var call$a = FunctionPrototype$2.call;
105
- var uncurryThis$g = NATIVE_BIND$2 && bind.bind(call$a, call$a);
106
-
107
- var functionUncurryThis = NATIVE_BIND$2 ? function (fn) {
108
- return fn && uncurryThis$g(fn);
109
- } : function (fn) {
110
- return fn && function () {
111
- return call$a.apply(fn, arguments);
92
+ var call$9 = FunctionPrototype$2.call;
93
+ var uncurryThisWithBind = NATIVE_BIND$1 && FunctionPrototype$2.bind.bind(call$9, call$9);
94
+
95
+ var functionUncurryThis = NATIVE_BIND$1 ? uncurryThisWithBind : function (fn) {
96
+ return function () {
97
+ return call$9.apply(fn, arguments);
112
98
  };
113
99
  };
114
100
 
@@ -117,35 +103,40 @@ var uncurryThis$f = functionUncurryThis;
117
103
  var toString$5 = uncurryThis$f({}.toString);
118
104
  var stringSlice$4 = uncurryThis$f(''.slice);
119
105
 
120
- var classofRaw$1 = function (it) {
106
+ var classofRaw$2 = function (it) {
121
107
  return stringSlice$4(toString$5(it), 8, -1);
122
108
  };
123
109
 
124
- var global$v = global$w;
125
110
  var uncurryThis$e = functionUncurryThis;
126
- var fails$e = fails$g;
127
- var classof$4 = classofRaw$1;
111
+ var fails$e = fails$h;
112
+ var classof$4 = classofRaw$2;
128
113
 
129
- var Object$5 = global$v.Object;
114
+ var $Object$4 = Object;
130
115
  var split = uncurryThis$e(''.split);
131
116
 
132
117
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
133
118
  var indexedObject = fails$e(function () {
134
119
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
135
120
  // eslint-disable-next-line no-prototype-builtins -- safe
136
- return !Object$5('z').propertyIsEnumerable(0);
121
+ return !$Object$4('z').propertyIsEnumerable(0);
137
122
  }) ? function (it) {
138
- return classof$4(it) == 'String' ? split(it, '') : Object$5(it);
139
- } : Object$5;
123
+ return classof$4(it) == 'String' ? split(it, '') : $Object$4(it);
124
+ } : $Object$4;
125
+
126
+ // we can't use just `it == null` since of `document.all` special case
127
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
128
+ var isNullOrUndefined$3 = function (it) {
129
+ return it === null || it === undefined;
130
+ };
140
131
 
141
- var global$u = global$w;
132
+ var isNullOrUndefined$2 = isNullOrUndefined$3;
142
133
 
143
- var TypeError$a = global$u.TypeError;
134
+ var $TypeError$8 = TypeError;
144
135
 
145
136
  // `RequireObjectCoercible` abstract operation
146
137
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
147
138
  var requireObjectCoercible$4 = function (it) {
148
- if (it == undefined) throw TypeError$a("Can't call method on " + it);
139
+ if (isNullOrUndefined$2(it)) throw $TypeError$8("Can't call method on " + it);
149
140
  return it;
150
141
  };
151
142
 
@@ -157,99 +148,63 @@ var toIndexedObject$5 = function (it) {
157
148
  return IndexedObject$2(requireObjectCoercible$3(it));
158
149
  };
159
150
 
160
- var shared$4 = {exports: {}};
161
-
162
- var global$t = global$w;
163
-
164
- // eslint-disable-next-line es/no-object-defineproperty -- safe
165
- var defineProperty$3 = Object.defineProperty;
166
-
167
- var setGlobal$3 = function (key, value) {
168
- try {
169
- defineProperty$3(global$t, key, { value: value, configurable: true, writable: true });
170
- } catch (error) {
171
- global$t[key] = value;
172
- } return value;
173
- };
174
-
175
- var global$s = global$w;
176
- var setGlobal$2 = setGlobal$3;
177
-
178
- var SHARED = '__core-js_shared__';
179
- var store$3 = global$s[SHARED] || setGlobal$2(SHARED, {});
180
-
181
- var sharedStore = store$3;
182
-
183
- var store$2 = sharedStore;
184
-
185
- (shared$4.exports = function (key, value) {
186
- return store$2[key] || (store$2[key] = value !== undefined ? value : {});
187
- })('versions', []).push({
188
- version: '3.21.1',
189
- mode: 'global',
190
- copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
191
- license: 'https://github.com/zloirock/core-js/blob/v3.21.1/LICENSE',
192
- source: 'https://github.com/zloirock/core-js'
193
- });
194
-
195
- var global$r = global$w;
196
- var requireObjectCoercible$2 = requireObjectCoercible$4;
151
+ var documentAll$2 = typeof document == 'object' && document.all;
197
152
 
198
- var Object$4 = global$r.Object;
153
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
154
+ var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
199
155
 
200
- // `ToObject` abstract operation
201
- // https://tc39.es/ecma262/#sec-toobject
202
- var toObject$5 = function (argument) {
203
- return Object$4(requireObjectCoercible$2(argument));
156
+ var documentAll_1 = {
157
+ all: documentAll$2,
158
+ IS_HTMLDDA: IS_HTMLDDA
204
159
  };
205
160
 
206
- var uncurryThis$d = functionUncurryThis;
207
- var toObject$4 = toObject$5;
161
+ var $documentAll$1 = documentAll_1;
208
162
 
209
- var hasOwnProperty = uncurryThis$d({}.hasOwnProperty);
163
+ var documentAll$1 = $documentAll$1.all;
210
164
 
211
- // `HasOwnProperty` abstract operation
212
- // https://tc39.es/ecma262/#sec-hasownproperty
213
- var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
214
- return hasOwnProperty(toObject$4(it), key);
165
+ // `IsCallable` abstract operation
166
+ // https://tc39.es/ecma262/#sec-iscallable
167
+ var isCallable$h = $documentAll$1.IS_HTMLDDA ? function (argument) {
168
+ return typeof argument == 'function' || argument === documentAll$1;
169
+ } : function (argument) {
170
+ return typeof argument == 'function';
215
171
  };
216
172
 
217
- var uncurryThis$c = functionUncurryThis;
218
-
219
- var id = 0;
220
- var postfix = Math.random();
221
- var toString$4 = uncurryThis$c(1.0.toString);
173
+ var isCallable$g = isCallable$h;
174
+ var $documentAll = documentAll_1;
222
175
 
223
- var uid$2 = function (key) {
224
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
225
- };
176
+ var documentAll = $documentAll.all;
226
177
 
227
- // `IsCallable` abstract operation
228
- // https://tc39.es/ecma262/#sec-iscallable
229
- var isCallable$g = function (argument) {
230
- return typeof argument == 'function';
178
+ var isObject$6 = $documentAll.IS_HTMLDDA ? function (it) {
179
+ return typeof it == 'object' ? it !== null : isCallable$g(it) || it === documentAll;
180
+ } : function (it) {
181
+ return typeof it == 'object' ? it !== null : isCallable$g(it);
231
182
  };
232
183
 
233
- var global$q = global$w;
234
- var isCallable$f = isCallable$g;
184
+ var global$e = global$f;
185
+ var isCallable$f = isCallable$h;
235
186
 
236
187
  var aFunction = function (argument) {
237
188
  return isCallable$f(argument) ? argument : undefined;
238
189
  };
239
190
 
240
191
  var getBuiltIn$4 = function (namespace, method) {
241
- return arguments.length < 2 ? aFunction(global$q[namespace]) : global$q[namespace] && global$q[namespace][method];
192
+ return arguments.length < 2 ? aFunction(global$e[namespace]) : global$e[namespace] && global$e[namespace][method];
242
193
  };
243
194
 
195
+ var uncurryThis$d = functionUncurryThis;
196
+
197
+ var objectIsPrototypeOf = uncurryThis$d({}.isPrototypeOf);
198
+
244
199
  var getBuiltIn$3 = getBuiltIn$4;
245
200
 
246
201
  var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
247
202
 
248
- var global$p = global$w;
203
+ var global$d = global$f;
249
204
  var userAgent = engineUserAgent;
250
205
 
251
- var process = global$p.process;
252
- var Deno = global$p.Deno;
206
+ var process = global$d.process;
207
+ var Deno = global$d.Deno;
253
208
  var versions = process && process.versions || Deno && Deno.version;
254
209
  var v8 = versions && versions.v8;
255
210
  var match, version;
@@ -276,10 +231,10 @@ var engineV8Version = version;
276
231
  /* eslint-disable es/no-symbol -- required for testing */
277
232
 
278
233
  var V8_VERSION = engineV8Version;
279
- var fails$d = fails$g;
234
+ var fails$d = fails$h;
280
235
 
281
236
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
282
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$d(function () {
237
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$d(function () {
283
238
  var symbol = Symbol();
284
239
  // Chrome 38 Symbol has incorrect toString conversion
285
240
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -290,229 +245,284 @@ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$d(function () {
290
245
 
291
246
  /* eslint-disable es/no-symbol -- required for testing */
292
247
 
293
- var NATIVE_SYMBOL$1 = nativeSymbol;
248
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
294
249
 
295
250
  var useSymbolAsUid = NATIVE_SYMBOL$1
296
251
  && !Symbol.sham
297
252
  && typeof Symbol.iterator == 'symbol';
298
253
 
299
- var global$o = global$w;
300
- var shared$3 = shared$4.exports;
301
- var hasOwn$8 = hasOwnProperty_1;
302
- var uid$1 = uid$2;
303
- var NATIVE_SYMBOL = nativeSymbol;
304
- var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
305
-
306
- var WellKnownSymbolsStore = shared$3('wks');
307
- var Symbol$1 = global$o.Symbol;
308
- var symbolFor = Symbol$1 && Symbol$1['for'];
309
- var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
310
-
311
- var wellKnownSymbol$a = function (name) {
312
- if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
313
- var description = 'Symbol.' + name;
314
- if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
315
- WellKnownSymbolsStore[name] = Symbol$1[name];
316
- } else if (USE_SYMBOL_AS_UID$1 && symbolFor) {
317
- WellKnownSymbolsStore[name] = symbolFor(description);
318
- } else {
319
- WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
320
- }
321
- } return WellKnownSymbolsStore[name];
322
- };
323
-
324
- var isCallable$e = isCallable$g;
325
-
326
- var isObject$5 = function (it) {
327
- return typeof it == 'object' ? it !== null : isCallable$e(it);
328
- };
329
-
330
- var global$n = global$w;
331
- var isObject$4 = isObject$5;
332
-
333
- var String$4 = global$n.String;
334
- var TypeError$9 = global$n.TypeError;
335
-
336
- // `Assert: Type(argument) is Object`
337
- var anObject$8 = function (argument) {
338
- if (isObject$4(argument)) return argument;
339
- throw TypeError$9(String$4(argument) + ' is not an object');
340
- };
341
-
342
- var objectDefineProperties = {};
343
-
344
- var fails$c = fails$g;
345
-
346
- // Detect IE8's incomplete defineProperty implementation
347
- var descriptors = !fails$c(function () {
348
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
349
- return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
350
- });
351
-
352
- var DESCRIPTORS$8 = descriptors;
353
- var fails$b = fails$g;
354
-
355
- // V8 ~ Chrome 36-
356
- // https://bugs.chromium.org/p/v8/issues/detail?id=3334
357
- var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$b(function () {
358
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
359
- return Object.defineProperty(function () { /* empty */ }, 'prototype', {
360
- value: 42,
361
- writable: false
362
- }).prototype != 42;
363
- });
364
-
365
- var objectDefineProperty = {};
366
-
367
- var global$m = global$w;
368
- var isObject$3 = isObject$5;
369
-
370
- var document$1 = global$m.document;
371
- // typeof document.createElement is 'object' in old IE
372
- var EXISTS$1 = isObject$3(document$1) && isObject$3(document$1.createElement);
373
-
374
- var documentCreateElement$2 = function (it) {
375
- return EXISTS$1 ? document$1.createElement(it) : {};
376
- };
377
-
378
- var DESCRIPTORS$7 = descriptors;
379
- var fails$a = fails$g;
380
- var createElement = documentCreateElement$2;
381
-
382
- // Thanks to IE8 for its funny defineProperty
383
- var ie8DomDefine = !DESCRIPTORS$7 && !fails$a(function () {
384
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
385
- return Object.defineProperty(createElement('div'), 'a', {
386
- get: function () { return 7; }
387
- }).a != 7;
388
- });
389
-
390
- var NATIVE_BIND$1 = functionBindNative;
391
-
392
- var call$9 = Function.prototype.call;
393
-
394
- var functionCall = NATIVE_BIND$1 ? call$9.bind(call$9) : function () {
395
- return call$9.apply(call$9, arguments);
396
- };
397
-
398
- var uncurryThis$b = functionUncurryThis;
399
-
400
- var objectIsPrototypeOf = uncurryThis$b({}.isPrototypeOf);
401
-
402
- var global$l = global$w;
403
254
  var getBuiltIn$2 = getBuiltIn$4;
404
- var isCallable$d = isCallable$g;
255
+ var isCallable$e = isCallable$h;
405
256
  var isPrototypeOf = objectIsPrototypeOf;
406
- var USE_SYMBOL_AS_UID = useSymbolAsUid;
257
+ var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
407
258
 
408
- var Object$3 = global$l.Object;
259
+ var $Object$3 = Object;
409
260
 
410
- var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
261
+ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
411
262
  return typeof it == 'symbol';
412
263
  } : function (it) {
413
264
  var $Symbol = getBuiltIn$2('Symbol');
414
- return isCallable$d($Symbol) && isPrototypeOf($Symbol.prototype, Object$3(it));
265
+ return isCallable$e($Symbol) && isPrototypeOf($Symbol.prototype, $Object$3(it));
415
266
  };
416
267
 
417
- var global$k = global$w;
418
-
419
- var String$3 = global$k.String;
268
+ var $String$3 = String;
420
269
 
421
270
  var tryToString$1 = function (argument) {
422
271
  try {
423
- return String$3(argument);
272
+ return $String$3(argument);
424
273
  } catch (error) {
425
274
  return 'Object';
426
275
  }
427
276
  };
428
277
 
429
- var global$j = global$w;
430
- var isCallable$c = isCallable$g;
278
+ var isCallable$d = isCallable$h;
431
279
  var tryToString = tryToString$1;
432
280
 
433
- var TypeError$8 = global$j.TypeError;
281
+ var $TypeError$7 = TypeError;
434
282
 
435
283
  // `Assert: IsCallable(argument) is true`
436
284
  var aCallable$2 = function (argument) {
437
- if (isCallable$c(argument)) return argument;
438
- throw TypeError$8(tryToString(argument) + ' is not a function');
285
+ if (isCallable$d(argument)) return argument;
286
+ throw $TypeError$7(tryToString(argument) + ' is not a function');
439
287
  };
440
288
 
441
289
  var aCallable$1 = aCallable$2;
290
+ var isNullOrUndefined$1 = isNullOrUndefined$3;
442
291
 
443
292
  // `GetMethod` abstract operation
444
293
  // https://tc39.es/ecma262/#sec-getmethod
445
294
  var getMethod$2 = function (V, P) {
446
295
  var func = V[P];
447
- return func == null ? undefined : aCallable$1(func);
296
+ return isNullOrUndefined$1(func) ? undefined : aCallable$1(func);
448
297
  };
449
298
 
450
- var global$i = global$w;
451
299
  var call$8 = functionCall;
452
- var isCallable$b = isCallable$g;
453
- var isObject$2 = isObject$5;
300
+ var isCallable$c = isCallable$h;
301
+ var isObject$5 = isObject$6;
454
302
 
455
- var TypeError$7 = global$i.TypeError;
303
+ var $TypeError$6 = TypeError;
456
304
 
457
305
  // `OrdinaryToPrimitive` abstract operation
458
306
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
459
307
  var ordinaryToPrimitive$1 = function (input, pref) {
460
308
  var fn, val;
461
- if (pref === 'string' && isCallable$b(fn = input.toString) && !isObject$2(val = call$8(fn, input))) return val;
462
- if (isCallable$b(fn = input.valueOf) && !isObject$2(val = call$8(fn, input))) return val;
463
- if (pref !== 'string' && isCallable$b(fn = input.toString) && !isObject$2(val = call$8(fn, input))) return val;
464
- throw TypeError$7("Can't convert object to primitive value");
309
+ if (pref === 'string' && isCallable$c(fn = input.toString) && !isObject$5(val = call$8(fn, input))) return val;
310
+ if (isCallable$c(fn = input.valueOf) && !isObject$5(val = call$8(fn, input))) return val;
311
+ if (pref !== 'string' && isCallable$c(fn = input.toString) && !isObject$5(val = call$8(fn, input))) return val;
312
+ throw $TypeError$6("Can't convert object to primitive value");
465
313
  };
466
314
 
467
- var global$h = global$w;
468
- var call$7 = functionCall;
469
- var isObject$1 = isObject$5;
470
- var isSymbol$1 = isSymbol$2;
471
- var getMethod$1 = getMethod$2;
472
- var ordinaryToPrimitive = ordinaryToPrimitive$1;
473
- var wellKnownSymbol$9 = wellKnownSymbol$a;
474
-
475
- var TypeError$6 = global$h.TypeError;
476
- var TO_PRIMITIVE = wellKnownSymbol$9('toPrimitive');
315
+ var shared$4 = {exports: {}};
477
316
 
478
- // `ToPrimitive` abstract operation
479
- // https://tc39.es/ecma262/#sec-toprimitive
480
- var toPrimitive$1 = function (input, pref) {
481
- if (!isObject$1(input) || isSymbol$1(input)) return input;
482
- var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
483
- var result;
484
- if (exoticToPrim) {
485
- if (pref === undefined) pref = 'default';
486
- result = call$7(exoticToPrim, input, pref);
487
- if (!isObject$1(result) || isSymbol$1(result)) return result;
488
- throw TypeError$6("Can't convert object to primitive value");
489
- }
490
- if (pref === undefined) pref = 'number';
491
- return ordinaryToPrimitive(input, pref);
492
- };
317
+ var global$c = global$f;
493
318
 
494
- var toPrimitive = toPrimitive$1;
495
- var isSymbol = isSymbol$2;
319
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
320
+ var defineProperty$5 = Object.defineProperty;
496
321
 
497
- // `ToPropertyKey` abstract operation
498
- // https://tc39.es/ecma262/#sec-topropertykey
499
- var toPropertyKey$2 = function (argument) {
500
- var key = toPrimitive(argument, 'string');
501
- return isSymbol(key) ? key : key + '';
322
+ var defineGlobalProperty$3 = function (key, value) {
323
+ try {
324
+ defineProperty$5(global$c, key, { value: value, configurable: true, writable: true });
325
+ } catch (error) {
326
+ global$c[key] = value;
327
+ } return value;
502
328
  };
503
329
 
504
- var global$g = global$w;
505
- var DESCRIPTORS$6 = descriptors;
330
+ var global$b = global$f;
331
+ var defineGlobalProperty$2 = defineGlobalProperty$3;
332
+
333
+ var SHARED = '__core-js_shared__';
334
+ var store$3 = global$b[SHARED] || defineGlobalProperty$2(SHARED, {});
335
+
336
+ var sharedStore = store$3;
337
+
338
+ var store$2 = sharedStore;
339
+
340
+ (shared$4.exports = function (key, value) {
341
+ return store$2[key] || (store$2[key] = value !== undefined ? value : {});
342
+ })('versions', []).push({
343
+ version: '3.26.1',
344
+ mode: 'global',
345
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
346
+ license: 'https://github.com/zloirock/core-js/blob/v3.26.1/LICENSE',
347
+ source: 'https://github.com/zloirock/core-js'
348
+ });
349
+
350
+ var requireObjectCoercible$2 = requireObjectCoercible$4;
351
+
352
+ var $Object$2 = Object;
353
+
354
+ // `ToObject` abstract operation
355
+ // https://tc39.es/ecma262/#sec-toobject
356
+ var toObject$5 = function (argument) {
357
+ return $Object$2(requireObjectCoercible$2(argument));
358
+ };
359
+
360
+ var uncurryThis$c = functionUncurryThis;
361
+ var toObject$4 = toObject$5;
362
+
363
+ var hasOwnProperty = uncurryThis$c({}.hasOwnProperty);
364
+
365
+ // `HasOwnProperty` abstract operation
366
+ // https://tc39.es/ecma262/#sec-hasownproperty
367
+ // eslint-disable-next-line es/no-object-hasown -- safe
368
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
369
+ return hasOwnProperty(toObject$4(it), key);
370
+ };
371
+
372
+ var uncurryThis$b = functionUncurryThis;
373
+
374
+ var id = 0;
375
+ var postfix = Math.random();
376
+ var toString$4 = uncurryThis$b(1.0.toString);
377
+
378
+ var uid$2 = function (key) {
379
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
380
+ };
381
+
382
+ var global$a = global$f;
383
+ var shared$3 = shared$4.exports;
384
+ var hasOwn$8 = hasOwnProperty_1;
385
+ var uid$1 = uid$2;
386
+ var NATIVE_SYMBOL = symbolConstructorDetection;
387
+ var USE_SYMBOL_AS_UID = useSymbolAsUid;
388
+
389
+ var WellKnownSymbolsStore = shared$3('wks');
390
+ var Symbol$1 = global$a.Symbol;
391
+ var symbolFor = Symbol$1 && Symbol$1['for'];
392
+ var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
393
+
394
+ var wellKnownSymbol$a = function (name) {
395
+ if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
396
+ var description = 'Symbol.' + name;
397
+ if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
398
+ WellKnownSymbolsStore[name] = Symbol$1[name];
399
+ } else if (USE_SYMBOL_AS_UID && symbolFor) {
400
+ WellKnownSymbolsStore[name] = symbolFor(description);
401
+ } else {
402
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
403
+ }
404
+ } return WellKnownSymbolsStore[name];
405
+ };
406
+
407
+ var call$7 = functionCall;
408
+ var isObject$4 = isObject$6;
409
+ var isSymbol$1 = isSymbol$2;
410
+ var getMethod$1 = getMethod$2;
411
+ var ordinaryToPrimitive = ordinaryToPrimitive$1;
412
+ var wellKnownSymbol$9 = wellKnownSymbol$a;
413
+
414
+ var $TypeError$5 = TypeError;
415
+ var TO_PRIMITIVE = wellKnownSymbol$9('toPrimitive');
416
+
417
+ // `ToPrimitive` abstract operation
418
+ // https://tc39.es/ecma262/#sec-toprimitive
419
+ var toPrimitive$1 = function (input, pref) {
420
+ if (!isObject$4(input) || isSymbol$1(input)) return input;
421
+ var exoticToPrim = getMethod$1(input, TO_PRIMITIVE);
422
+ var result;
423
+ if (exoticToPrim) {
424
+ if (pref === undefined) pref = 'default';
425
+ result = call$7(exoticToPrim, input, pref);
426
+ if (!isObject$4(result) || isSymbol$1(result)) return result;
427
+ throw $TypeError$5("Can't convert object to primitive value");
428
+ }
429
+ if (pref === undefined) pref = 'number';
430
+ return ordinaryToPrimitive(input, pref);
431
+ };
432
+
433
+ var toPrimitive = toPrimitive$1;
434
+ var isSymbol = isSymbol$2;
435
+
436
+ // `ToPropertyKey` abstract operation
437
+ // https://tc39.es/ecma262/#sec-topropertykey
438
+ var toPropertyKey$2 = function (argument) {
439
+ var key = toPrimitive(argument, 'string');
440
+ return isSymbol(key) ? key : key + '';
441
+ };
442
+
443
+ var global$9 = global$f;
444
+ var isObject$3 = isObject$6;
445
+
446
+ var document$1 = global$9.document;
447
+ // typeof document.createElement is 'object' in old IE
448
+ var EXISTS$1 = isObject$3(document$1) && isObject$3(document$1.createElement);
449
+
450
+ var documentCreateElement$2 = function (it) {
451
+ return EXISTS$1 ? document$1.createElement(it) : {};
452
+ };
453
+
454
+ var DESCRIPTORS$9 = descriptors;
455
+ var fails$c = fails$h;
456
+ var createElement = documentCreateElement$2;
457
+
458
+ // Thanks to IE8 for its funny defineProperty
459
+ var ie8DomDefine = !DESCRIPTORS$9 && !fails$c(function () {
460
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
461
+ return Object.defineProperty(createElement('div'), 'a', {
462
+ get: function () { return 7; }
463
+ }).a != 7;
464
+ });
465
+
466
+ var DESCRIPTORS$8 = descriptors;
467
+ var call$6 = functionCall;
468
+ var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
469
+ var createPropertyDescriptor$2 = createPropertyDescriptor$3;
470
+ var toIndexedObject$4 = toIndexedObject$5;
471
+ var toPropertyKey$1 = toPropertyKey$2;
472
+ var hasOwn$7 = hasOwnProperty_1;
506
473
  var IE8_DOM_DEFINE$1 = ie8DomDefine;
474
+
475
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
476
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
477
+
478
+ // `Object.getOwnPropertyDescriptor` method
479
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
480
+ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
481
+ O = toIndexedObject$4(O);
482
+ P = toPropertyKey$1(P);
483
+ if (IE8_DOM_DEFINE$1) try {
484
+ return $getOwnPropertyDescriptor$1(O, P);
485
+ } catch (error) { /* empty */ }
486
+ if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$6(propertyIsEnumerableModule$1.f, O, P), O[P]);
487
+ };
488
+
489
+ var objectDefineProperty = {};
490
+
491
+ var DESCRIPTORS$7 = descriptors;
492
+ var fails$b = fails$h;
493
+
494
+ // V8 ~ Chrome 36-
495
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
496
+ var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$b(function () {
497
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
498
+ return Object.defineProperty(function () { /* empty */ }, 'prototype', {
499
+ value: 42,
500
+ writable: false
501
+ }).prototype != 42;
502
+ });
503
+
504
+ var isObject$2 = isObject$6;
505
+
506
+ var $String$2 = String;
507
+ var $TypeError$4 = TypeError;
508
+
509
+ // `Assert: Type(argument) is Object`
510
+ var anObject$8 = function (argument) {
511
+ if (isObject$2(argument)) return argument;
512
+ throw $TypeError$4($String$2(argument) + ' is not an object');
513
+ };
514
+
515
+ var DESCRIPTORS$6 = descriptors;
516
+ var IE8_DOM_DEFINE = ie8DomDefine;
507
517
  var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
508
518
  var anObject$7 = anObject$8;
509
- var toPropertyKey$1 = toPropertyKey$2;
519
+ var toPropertyKey = toPropertyKey$2;
510
520
 
511
- var TypeError$5 = global$g.TypeError;
521
+ var $TypeError$3 = TypeError;
512
522
  // eslint-disable-next-line es/no-object-defineproperty -- safe
513
523
  var $defineProperty = Object.defineProperty;
514
524
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
515
- var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
525
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
516
526
  var ENUMERABLE = 'enumerable';
517
527
  var CONFIGURABLE$1 = 'configurable';
518
528
  var WRITABLE = 'writable';
@@ -521,10 +531,10 @@ var WRITABLE = 'writable';
521
531
  // https://tc39.es/ecma262/#sec-object.defineproperty
522
532
  objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
523
533
  anObject$7(O);
524
- P = toPropertyKey$1(P);
534
+ P = toPropertyKey(P);
525
535
  anObject$7(Attributes);
526
536
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
527
- var current = $getOwnPropertyDescriptor$1(O, P);
537
+ var current = $getOwnPropertyDescriptor(O, P);
528
538
  if (current && current[WRITABLE]) {
529
539
  O[P] = Attributes.value;
530
540
  Attributes = {
@@ -536,332 +546,92 @@ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
536
546
  } return $defineProperty(O, P, Attributes);
537
547
  } : $defineProperty : function defineProperty(O, P, Attributes) {
538
548
  anObject$7(O);
539
- P = toPropertyKey$1(P);
549
+ P = toPropertyKey(P);
540
550
  anObject$7(Attributes);
541
- if (IE8_DOM_DEFINE$1) try {
551
+ if (IE8_DOM_DEFINE) try {
542
552
  return $defineProperty(O, P, Attributes);
543
553
  } catch (error) { /* empty */ }
544
- if ('get' in Attributes || 'set' in Attributes) throw TypeError$5('Accessors not supported');
554
+ if ('get' in Attributes || 'set' in Attributes) throw $TypeError$3('Accessors not supported');
545
555
  if ('value' in Attributes) O[P] = Attributes.value;
546
556
  return O;
547
557
  };
548
558
 
549
- var ceil = Math.ceil;
550
- var floor$1 = Math.floor;
559
+ var DESCRIPTORS$5 = descriptors;
560
+ var definePropertyModule$3 = objectDefineProperty;
561
+ var createPropertyDescriptor$1 = createPropertyDescriptor$3;
551
562
 
552
- // `ToIntegerOrInfinity` abstract operation
553
- // https://tc39.es/ecma262/#sec-tointegerorinfinity
554
- var toIntegerOrInfinity$4 = function (argument) {
555
- var number = +argument;
556
- // eslint-disable-next-line no-self-compare -- safe
557
- return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number);
563
+ var createNonEnumerableProperty$5 = DESCRIPTORS$5 ? function (object, key, value) {
564
+ return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
565
+ } : function (object, key, value) {
566
+ object[key] = value;
567
+ return object;
558
568
  };
559
569
 
560
- var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
570
+ var makeBuiltIn$2 = {exports: {}};
561
571
 
562
- var max$1 = Math.max;
563
- var min$2 = Math.min;
572
+ var DESCRIPTORS$4 = descriptors;
573
+ var hasOwn$6 = hasOwnProperty_1;
564
574
 
565
- // Helper for a popular repeating case of the spec:
566
- // Let integer be ? ToInteger(index).
567
- // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
568
- var toAbsoluteIndex$1 = function (index, length) {
569
- var integer = toIntegerOrInfinity$3(index);
570
- return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
575
+ var FunctionPrototype$1 = Function.prototype;
576
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
577
+ var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
578
+
579
+ var EXISTS = hasOwn$6(FunctionPrototype$1, 'name');
580
+ // additional protection from minified / mangled / dropped function names
581
+ var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
582
+ var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype$1, 'name').configurable));
583
+
584
+ var functionName = {
585
+ EXISTS: EXISTS,
586
+ PROPER: PROPER,
587
+ CONFIGURABLE: CONFIGURABLE
571
588
  };
572
589
 
573
- var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
590
+ var uncurryThis$a = functionUncurryThis;
591
+ var isCallable$b = isCallable$h;
592
+ var store$1 = sharedStore;
574
593
 
575
- var min$1 = Math.min;
594
+ var functionToString = uncurryThis$a(Function.toString);
576
595
 
577
- // `ToLength` abstract operation
578
- // https://tc39.es/ecma262/#sec-tolength
579
- var toLength$2 = function (argument) {
580
- return argument > 0 ? min$1(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
581
- };
596
+ // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
597
+ if (!isCallable$b(store$1.inspectSource)) {
598
+ store$1.inspectSource = function (it) {
599
+ return functionToString(it);
600
+ };
601
+ }
582
602
 
583
- var toLength$1 = toLength$2;
603
+ var inspectSource$1 = store$1.inspectSource;
584
604
 
585
- // `LengthOfArrayLike` abstract operation
586
- // https://tc39.es/ecma262/#sec-lengthofarraylike
587
- var lengthOfArrayLike$2 = function (obj) {
588
- return toLength$1(obj.length);
589
- };
605
+ var global$8 = global$f;
606
+ var isCallable$a = isCallable$h;
590
607
 
591
- var toIndexedObject$4 = toIndexedObject$5;
592
- var toAbsoluteIndex = toAbsoluteIndex$1;
593
- var lengthOfArrayLike$1 = lengthOfArrayLike$2;
608
+ var WeakMap$1 = global$8.WeakMap;
594
609
 
595
- // `Array.prototype.{ indexOf, includes }` methods implementation
596
- var createMethod$2 = function (IS_INCLUDES) {
597
- return function ($this, el, fromIndex) {
598
- var O = toIndexedObject$4($this);
599
- var length = lengthOfArrayLike$1(O);
600
- var index = toAbsoluteIndex(fromIndex, length);
601
- var value;
602
- // Array#includes uses SameValueZero equality algorithm
603
- // eslint-disable-next-line no-self-compare -- NaN check
604
- if (IS_INCLUDES && el != el) while (length > index) {
605
- value = O[index++];
606
- // eslint-disable-next-line no-self-compare -- NaN check
607
- if (value != value) return true;
608
- // Array#indexOf ignores holes, Array#includes - not
609
- } else for (;length > index; index++) {
610
- if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
611
- } return !IS_INCLUDES && -1;
612
- };
613
- };
610
+ var weakMapBasicDetection = isCallable$a(WeakMap$1) && /native code/.test(String(WeakMap$1));
614
611
 
615
- var arrayIncludes = {
616
- // `Array.prototype.includes` method
617
- // https://tc39.es/ecma262/#sec-array.prototype.includes
618
- includes: createMethod$2(true),
619
- // `Array.prototype.indexOf` method
620
- // https://tc39.es/ecma262/#sec-array.prototype.indexof
621
- indexOf: createMethod$2(false)
612
+ var shared$2 = shared$4.exports;
613
+ var uid = uid$2;
614
+
615
+ var keys = shared$2('keys');
616
+
617
+ var sharedKey$3 = function (key) {
618
+ return keys[key] || (keys[key] = uid(key));
622
619
  };
623
620
 
624
621
  var hiddenKeys$4 = {};
625
622
 
626
- var uncurryThis$a = functionUncurryThis;
627
- var hasOwn$7 = hasOwnProperty_1;
628
- var toIndexedObject$3 = toIndexedObject$5;
629
- var indexOf$1 = arrayIncludes.indexOf;
623
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
624
+ var global$7 = global$f;
625
+ var isObject$1 = isObject$6;
626
+ var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
627
+ var hasOwn$5 = hasOwnProperty_1;
628
+ var shared$1 = sharedStore;
629
+ var sharedKey$2 = sharedKey$3;
630
630
  var hiddenKeys$3 = hiddenKeys$4;
631
631
 
632
- var push$1 = uncurryThis$a([].push);
633
-
634
- var objectKeysInternal = function (object, names) {
635
- var O = toIndexedObject$3(object);
636
- var i = 0;
637
- var result = [];
638
- var key;
639
- for (key in O) !hasOwn$7(hiddenKeys$3, key) && hasOwn$7(O, key) && push$1(result, key);
640
- // Don't enum bug & hidden keys
641
- while (names.length > i) if (hasOwn$7(O, key = names[i++])) {
642
- ~indexOf$1(result, key) || push$1(result, key);
643
- }
644
- return result;
645
- };
646
-
647
- // IE8- don't enum bug keys
648
- var enumBugKeys$3 = [
649
- 'constructor',
650
- 'hasOwnProperty',
651
- 'isPrototypeOf',
652
- 'propertyIsEnumerable',
653
- 'toLocaleString',
654
- 'toString',
655
- 'valueOf'
656
- ];
657
-
658
- var internalObjectKeys$1 = objectKeysInternal;
659
- var enumBugKeys$2 = enumBugKeys$3;
660
-
661
- // `Object.keys` method
662
- // https://tc39.es/ecma262/#sec-object.keys
663
- // eslint-disable-next-line es/no-object-keys -- safe
664
- var objectKeys$2 = Object.keys || function keys(O) {
665
- return internalObjectKeys$1(O, enumBugKeys$2);
666
- };
667
-
668
- var DESCRIPTORS$5 = descriptors;
669
- var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
670
- var definePropertyModule$3 = objectDefineProperty;
671
- var anObject$6 = anObject$8;
672
- var toIndexedObject$2 = toIndexedObject$5;
673
- var objectKeys$1 = objectKeys$2;
674
-
675
- // `Object.defineProperties` method
676
- // https://tc39.es/ecma262/#sec-object.defineproperties
677
- // eslint-disable-next-line es/no-object-defineproperties -- safe
678
- objectDefineProperties.f = DESCRIPTORS$5 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
679
- anObject$6(O);
680
- var props = toIndexedObject$2(Properties);
681
- var keys = objectKeys$1(Properties);
682
- var length = keys.length;
683
- var index = 0;
684
- var key;
685
- while (length > index) definePropertyModule$3.f(O, key = keys[index++], props[key]);
686
- return O;
687
- };
688
-
689
- var getBuiltIn$1 = getBuiltIn$4;
690
-
691
- var html$1 = getBuiltIn$1('document', 'documentElement');
692
-
693
- var shared$2 = shared$4.exports;
694
- var uid = uid$2;
695
-
696
- var keys = shared$2('keys');
697
-
698
- var sharedKey$3 = function (key) {
699
- return keys[key] || (keys[key] = uid(key));
700
- };
701
-
702
- /* global ActiveXObject -- old IE, WSH */
703
-
704
- var anObject$5 = anObject$8;
705
- var definePropertiesModule = objectDefineProperties;
706
- var enumBugKeys$1 = enumBugKeys$3;
707
- var hiddenKeys$2 = hiddenKeys$4;
708
- var html = html$1;
709
- var documentCreateElement$1 = documentCreateElement$2;
710
- var sharedKey$2 = sharedKey$3;
711
-
712
- var GT = '>';
713
- var LT = '<';
714
- var PROTOTYPE = 'prototype';
715
- var SCRIPT = 'script';
716
- var IE_PROTO$1 = sharedKey$2('IE_PROTO');
717
-
718
- var EmptyConstructor = function () { /* empty */ };
719
-
720
- var scriptTag = function (content) {
721
- return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
722
- };
723
-
724
- // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
725
- var NullProtoObjectViaActiveX = function (activeXDocument) {
726
- activeXDocument.write(scriptTag(''));
727
- activeXDocument.close();
728
- var temp = activeXDocument.parentWindow.Object;
729
- activeXDocument = null; // avoid memory leak
730
- return temp;
731
- };
732
-
733
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
734
- var NullProtoObjectViaIFrame = function () {
735
- // Thrash, waste and sodomy: IE GC bug
736
- var iframe = documentCreateElement$1('iframe');
737
- var JS = 'java' + SCRIPT + ':';
738
- var iframeDocument;
739
- iframe.style.display = 'none';
740
- html.appendChild(iframe);
741
- // https://github.com/zloirock/core-js/issues/475
742
- iframe.src = String(JS);
743
- iframeDocument = iframe.contentWindow.document;
744
- iframeDocument.open();
745
- iframeDocument.write(scriptTag('document.F=Object'));
746
- iframeDocument.close();
747
- return iframeDocument.F;
748
- };
749
-
750
- // Check for document.domain and active x support
751
- // No need to use active x approach when document.domain is not set
752
- // see https://github.com/es-shims/es5-shim/issues/150
753
- // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
754
- // avoid IE GC bug
755
- var activeXDocument;
756
- var NullProtoObject = function () {
757
- try {
758
- activeXDocument = new ActiveXObject('htmlfile');
759
- } catch (error) { /* ignore */ }
760
- NullProtoObject = typeof document != 'undefined'
761
- ? document.domain && activeXDocument
762
- ? NullProtoObjectViaActiveX(activeXDocument) // old IE
763
- : NullProtoObjectViaIFrame()
764
- : NullProtoObjectViaActiveX(activeXDocument); // WSH
765
- var length = enumBugKeys$1.length;
766
- while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys$1[length]];
767
- return NullProtoObject();
768
- };
769
-
770
- hiddenKeys$2[IE_PROTO$1] = true;
771
-
772
- // `Object.create` method
773
- // https://tc39.es/ecma262/#sec-object.create
774
- var objectCreate = Object.create || function create(O, Properties) {
775
- var result;
776
- if (O !== null) {
777
- EmptyConstructor[PROTOTYPE] = anObject$5(O);
778
- result = new EmptyConstructor();
779
- EmptyConstructor[PROTOTYPE] = null;
780
- // add "__proto__" for Object.getPrototypeOf polyfill
781
- result[IE_PROTO$1] = O;
782
- } else result = NullProtoObject();
783
- return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
784
- };
785
-
786
- var wellKnownSymbol$8 = wellKnownSymbol$a;
787
- var create$2 = objectCreate;
788
- var definePropertyModule$2 = objectDefineProperty;
789
-
790
- var UNSCOPABLES = wellKnownSymbol$8('unscopables');
791
- var ArrayPrototype = Array.prototype;
792
-
793
- // Array.prototype[@@unscopables]
794
- // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
795
- if (ArrayPrototype[UNSCOPABLES] == undefined) {
796
- definePropertyModule$2.f(ArrayPrototype, UNSCOPABLES, {
797
- configurable: true,
798
- value: create$2(null)
799
- });
800
- }
801
-
802
- // add a key to Array.prototype[@@unscopables]
803
- var addToUnscopables$1 = function (key) {
804
- ArrayPrototype[UNSCOPABLES][key] = true;
805
- };
806
-
807
- var iterators = {};
808
-
809
- var uncurryThis$9 = functionUncurryThis;
810
- var isCallable$a = isCallable$g;
811
- var store$1 = sharedStore;
812
-
813
- var functionToString = uncurryThis$9(Function.toString);
814
-
815
- // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
816
- if (!isCallable$a(store$1.inspectSource)) {
817
- store$1.inspectSource = function (it) {
818
- return functionToString(it);
819
- };
820
- }
821
-
822
- var inspectSource$2 = store$1.inspectSource;
823
-
824
- var global$f = global$w;
825
- var isCallable$9 = isCallable$g;
826
- var inspectSource$1 = inspectSource$2;
827
-
828
- var WeakMap$1 = global$f.WeakMap;
829
-
830
- var nativeWeakMap = isCallable$9(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
831
-
832
- var createPropertyDescriptor$3 = function (bitmap, value) {
833
- return {
834
- enumerable: !(bitmap & 1),
835
- configurable: !(bitmap & 2),
836
- writable: !(bitmap & 4),
837
- value: value
838
- };
839
- };
840
-
841
- var DESCRIPTORS$4 = descriptors;
842
- var definePropertyModule$1 = objectDefineProperty;
843
- var createPropertyDescriptor$2 = createPropertyDescriptor$3;
844
-
845
- var createNonEnumerableProperty$6 = DESCRIPTORS$4 ? function (object, key, value) {
846
- return definePropertyModule$1.f(object, key, createPropertyDescriptor$2(1, value));
847
- } : function (object, key, value) {
848
- object[key] = value;
849
- return object;
850
- };
851
-
852
- var NATIVE_WEAK_MAP = nativeWeakMap;
853
- var global$e = global$w;
854
- var uncurryThis$8 = functionUncurryThis;
855
- var isObject = isObject$5;
856
- var createNonEnumerableProperty$5 = createNonEnumerableProperty$6;
857
- var hasOwn$6 = hasOwnProperty_1;
858
- var shared$1 = sharedStore;
859
- var sharedKey$1 = sharedKey$3;
860
- var hiddenKeys$1 = hiddenKeys$4;
861
-
862
632
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
863
- var TypeError$4 = global$e.TypeError;
864
- var WeakMap = global$e.WeakMap;
633
+ var TypeError$1 = global$7.TypeError;
634
+ var WeakMap = global$7.WeakMap;
865
635
  var set, get, has;
866
636
 
867
637
  var enforce = function (it) {
@@ -871,43 +641,45 @@ var enforce = function (it) {
871
641
  var getterFor = function (TYPE) {
872
642
  return function (it) {
873
643
  var state;
874
- if (!isObject(it) || (state = get(it)).type !== TYPE) {
875
- throw TypeError$4('Incompatible receiver, ' + TYPE + ' required');
644
+ if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
645
+ throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
876
646
  } return state;
877
647
  };
878
648
  };
879
649
 
880
650
  if (NATIVE_WEAK_MAP || shared$1.state) {
881
651
  var store = shared$1.state || (shared$1.state = new WeakMap());
882
- var wmget = uncurryThis$8(store.get);
883
- var wmhas = uncurryThis$8(store.has);
884
- var wmset = uncurryThis$8(store.set);
652
+ /* eslint-disable no-self-assign -- prototype methods protection */
653
+ store.get = store.get;
654
+ store.has = store.has;
655
+ store.set = store.set;
656
+ /* eslint-enable no-self-assign -- prototype methods protection */
885
657
  set = function (it, metadata) {
886
- if (wmhas(store, it)) throw new TypeError$4(OBJECT_ALREADY_INITIALIZED);
658
+ if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
887
659
  metadata.facade = it;
888
- wmset(store, it, metadata);
660
+ store.set(it, metadata);
889
661
  return metadata;
890
662
  };
891
663
  get = function (it) {
892
- return wmget(store, it) || {};
664
+ return store.get(it) || {};
893
665
  };
894
666
  has = function (it) {
895
- return wmhas(store, it);
667
+ return store.has(it);
896
668
  };
897
669
  } else {
898
- var STATE = sharedKey$1('state');
899
- hiddenKeys$1[STATE] = true;
670
+ var STATE = sharedKey$2('state');
671
+ hiddenKeys$3[STATE] = true;
900
672
  set = function (it, metadata) {
901
- if (hasOwn$6(it, STATE)) throw new TypeError$4(OBJECT_ALREADY_INITIALIZED);
673
+ if (hasOwn$5(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
902
674
  metadata.facade = it;
903
- createNonEnumerableProperty$5(it, STATE, metadata);
675
+ createNonEnumerableProperty$4(it, STATE, metadata);
904
676
  return metadata;
905
677
  };
906
678
  get = function (it) {
907
- return hasOwn$6(it, STATE) ? it[STATE] : {};
679
+ return hasOwn$5(it, STATE) ? it[STATE] : {};
908
680
  };
909
681
  has = function (it) {
910
- return hasOwn$6(it, STATE);
682
+ return hasOwn$5(it, STATE);
911
683
  };
912
684
  }
913
685
 
@@ -919,279 +691,660 @@ var internalState = {
919
691
  getterFor: getterFor
920
692
  };
921
693
 
922
- var objectGetOwnPropertyDescriptor = {};
923
-
924
- var objectPropertyIsEnumerable = {};
925
-
926
- var $propertyIsEnumerable = {}.propertyIsEnumerable;
927
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
928
- var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
929
-
930
- // Nashorn ~ JDK8 bug
931
- var NASHORN_BUG = getOwnPropertyDescriptor$1 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
694
+ var fails$a = fails$h;
695
+ var isCallable$9 = isCallable$h;
696
+ var hasOwn$4 = hasOwnProperty_1;
697
+ var DESCRIPTORS$3 = descriptors;
698
+ var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
699
+ var inspectSource = inspectSource$1;
700
+ var InternalStateModule$1 = internalState;
932
701
 
933
- // `Object.prototype.propertyIsEnumerable` method implementation
934
- // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
935
- objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
936
- var descriptor = getOwnPropertyDescriptor$1(this, V);
937
- return !!descriptor && descriptor.enumerable;
938
- } : $propertyIsEnumerable;
702
+ var enforceInternalState = InternalStateModule$1.enforce;
703
+ var getInternalState$2 = InternalStateModule$1.get;
704
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
705
+ var defineProperty$4 = Object.defineProperty;
939
706
 
940
- var DESCRIPTORS$3 = descriptors;
941
- var call$6 = functionCall;
942
- var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
943
- var createPropertyDescriptor$1 = createPropertyDescriptor$3;
944
- var toIndexedObject$1 = toIndexedObject$5;
945
- var toPropertyKey = toPropertyKey$2;
946
- var hasOwn$5 = hasOwnProperty_1;
947
- var IE8_DOM_DEFINE = ie8DomDefine;
707
+ var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$a(function () {
708
+ return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
709
+ });
948
710
 
949
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
950
- var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
711
+ var TEMPLATE = String(String).split('String');
951
712
 
952
- // `Object.getOwnPropertyDescriptor` method
953
- // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
954
- objectGetOwnPropertyDescriptor.f = DESCRIPTORS$3 ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
955
- O = toIndexedObject$1(O);
956
- P = toPropertyKey(P);
957
- if (IE8_DOM_DEFINE) try {
958
- return $getOwnPropertyDescriptor(O, P);
713
+ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
714
+ if (String(name).slice(0, 7) === 'Symbol(') {
715
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
716
+ }
717
+ if (options && options.getter) name = 'get ' + name;
718
+ if (options && options.setter) name = 'set ' + name;
719
+ if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
720
+ if (DESCRIPTORS$3) defineProperty$4(value, 'name', { value: name, configurable: true });
721
+ else value.name = name;
722
+ }
723
+ if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
724
+ defineProperty$4(value, 'length', { value: options.arity });
725
+ }
726
+ try {
727
+ if (options && hasOwn$4(options, 'constructor') && options.constructor) {
728
+ if (DESCRIPTORS$3) defineProperty$4(value, 'prototype', { writable: false });
729
+ // in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
730
+ } else if (value.prototype) value.prototype = undefined;
959
731
  } catch (error) { /* empty */ }
960
- if (hasOwn$5(O, P)) return createPropertyDescriptor$1(!call$6(propertyIsEnumerableModule$1.f, O, P), O[P]);
732
+ var state = enforceInternalState(value);
733
+ if (!hasOwn$4(state, 'source')) {
734
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
735
+ } return value;
961
736
  };
962
737
 
963
- var redefine$4 = {exports: {}};
738
+ // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
739
+ // eslint-disable-next-line no-extend-native -- required
740
+ Function.prototype.toString = makeBuiltIn$1(function toString() {
741
+ return isCallable$9(this) && getInternalState$2(this).source || inspectSource(this);
742
+ }, 'toString');
964
743
 
965
- var DESCRIPTORS$2 = descriptors;
966
- var hasOwn$4 = hasOwnProperty_1;
744
+ var isCallable$8 = isCallable$h;
745
+ var definePropertyModule$2 = objectDefineProperty;
746
+ var makeBuiltIn = makeBuiltIn$2.exports;
747
+ var defineGlobalProperty$1 = defineGlobalProperty$3;
748
+
749
+ var defineBuiltIn$4 = function (O, key, value, options) {
750
+ if (!options) options = {};
751
+ var simple = options.enumerable;
752
+ var name = options.name !== undefined ? options.name : key;
753
+ if (isCallable$8(value)) makeBuiltIn(value, name, options);
754
+ if (options.global) {
755
+ if (simple) O[key] = value;
756
+ else defineGlobalProperty$1(key, value);
757
+ } else {
758
+ try {
759
+ if (!options.unsafe) delete O[key];
760
+ else if (O[key]) simple = true;
761
+ } catch (error) { /* empty */ }
762
+ if (simple) O[key] = value;
763
+ else definePropertyModule$2.f(O, key, {
764
+ value: value,
765
+ enumerable: false,
766
+ configurable: !options.nonConfigurable,
767
+ writable: !options.nonWritable
768
+ });
769
+ } return O;
770
+ };
967
771
 
968
- var FunctionPrototype$1 = Function.prototype;
969
- // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
970
- var getDescriptor = DESCRIPTORS$2 && Object.getOwnPropertyDescriptor;
772
+ var objectGetOwnPropertyNames = {};
971
773
 
972
- var EXISTS = hasOwn$4(FunctionPrototype$1, 'name');
973
- // additional protection from minified / mangled / dropped function names
974
- var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
975
- var CONFIGURABLE = EXISTS && (!DESCRIPTORS$2 || (DESCRIPTORS$2 && getDescriptor(FunctionPrototype$1, 'name').configurable));
774
+ var ceil = Math.ceil;
775
+ var floor$1 = Math.floor;
976
776
 
977
- var functionName = {
978
- EXISTS: EXISTS,
979
- PROPER: PROPER,
980
- CONFIGURABLE: CONFIGURABLE
777
+ // `Math.trunc` method
778
+ // https://tc39.es/ecma262/#sec-math.trunc
779
+ // eslint-disable-next-line es/no-math-trunc -- safe
780
+ var mathTrunc = Math.trunc || function trunc(x) {
781
+ var n = +x;
782
+ return (n > 0 ? floor$1 : ceil)(n);
783
+ };
784
+
785
+ var trunc = mathTrunc;
786
+
787
+ // `ToIntegerOrInfinity` abstract operation
788
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
789
+ var toIntegerOrInfinity$4 = function (argument) {
790
+ var number = +argument;
791
+ // eslint-disable-next-line no-self-compare -- NaN check
792
+ return number !== number || number === 0 ? 0 : trunc(number);
793
+ };
794
+
795
+ var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
796
+
797
+ var max$1 = Math.max;
798
+ var min$2 = Math.min;
799
+
800
+ // Helper for a popular repeating case of the spec:
801
+ // Let integer be ? ToInteger(index).
802
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
803
+ var toAbsoluteIndex$1 = function (index, length) {
804
+ var integer = toIntegerOrInfinity$3(index);
805
+ return integer < 0 ? max$1(integer + length, 0) : min$2(integer, length);
806
+ };
807
+
808
+ var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
809
+
810
+ var min$1 = Math.min;
811
+
812
+ // `ToLength` abstract operation
813
+ // https://tc39.es/ecma262/#sec-tolength
814
+ var toLength$2 = function (argument) {
815
+ return argument > 0 ? min$1(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
816
+ };
817
+
818
+ var toLength$1 = toLength$2;
819
+
820
+ // `LengthOfArrayLike` abstract operation
821
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
822
+ var lengthOfArrayLike$2 = function (obj) {
823
+ return toLength$1(obj.length);
824
+ };
825
+
826
+ var toIndexedObject$3 = toIndexedObject$5;
827
+ var toAbsoluteIndex = toAbsoluteIndex$1;
828
+ var lengthOfArrayLike$1 = lengthOfArrayLike$2;
829
+
830
+ // `Array.prototype.{ indexOf, includes }` methods implementation
831
+ var createMethod$2 = function (IS_INCLUDES) {
832
+ return function ($this, el, fromIndex) {
833
+ var O = toIndexedObject$3($this);
834
+ var length = lengthOfArrayLike$1(O);
835
+ var index = toAbsoluteIndex(fromIndex, length);
836
+ var value;
837
+ // Array#includes uses SameValueZero equality algorithm
838
+ // eslint-disable-next-line no-self-compare -- NaN check
839
+ if (IS_INCLUDES && el != el) while (length > index) {
840
+ value = O[index++];
841
+ // eslint-disable-next-line no-self-compare -- NaN check
842
+ if (value != value) return true;
843
+ // Array#indexOf ignores holes, Array#includes - not
844
+ } else for (;length > index; index++) {
845
+ if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
846
+ } return !IS_INCLUDES && -1;
847
+ };
981
848
  };
982
849
 
983
- var global$d = global$w;
984
- var isCallable$8 = isCallable$g;
850
+ var arrayIncludes = {
851
+ // `Array.prototype.includes` method
852
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
853
+ includes: createMethod$2(true),
854
+ // `Array.prototype.indexOf` method
855
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
856
+ indexOf: createMethod$2(false)
857
+ };
858
+
859
+ var uncurryThis$9 = functionUncurryThis;
985
860
  var hasOwn$3 = hasOwnProperty_1;
986
- var createNonEnumerableProperty$4 = createNonEnumerableProperty$6;
987
- var setGlobal$1 = setGlobal$3;
988
- var inspectSource = inspectSource$2;
989
- var InternalStateModule$1 = internalState;
990
- var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
861
+ var toIndexedObject$2 = toIndexedObject$5;
862
+ var indexOf$1 = arrayIncludes.indexOf;
863
+ var hiddenKeys$2 = hiddenKeys$4;
991
864
 
992
- var getInternalState$2 = InternalStateModule$1.get;
993
- var enforceInternalState = InternalStateModule$1.enforce;
994
- var TEMPLATE = String(String).split('String');
865
+ var push$1 = uncurryThis$9([].push);
866
+
867
+ var objectKeysInternal = function (object, names) {
868
+ var O = toIndexedObject$2(object);
869
+ var i = 0;
870
+ var result = [];
871
+ var key;
872
+ for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push$1(result, key);
873
+ // Don't enum bug & hidden keys
874
+ while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
875
+ ~indexOf$1(result, key) || push$1(result, key);
876
+ }
877
+ return result;
878
+ };
879
+
880
+ // IE8- don't enum bug keys
881
+ var enumBugKeys$3 = [
882
+ 'constructor',
883
+ 'hasOwnProperty',
884
+ 'isPrototypeOf',
885
+ 'propertyIsEnumerable',
886
+ 'toLocaleString',
887
+ 'toString',
888
+ 'valueOf'
889
+ ];
890
+
891
+ var internalObjectKeys$1 = objectKeysInternal;
892
+ var enumBugKeys$2 = enumBugKeys$3;
893
+
894
+ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
895
+
896
+ // `Object.getOwnPropertyNames` method
897
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
898
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
899
+ objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
900
+ return internalObjectKeys$1(O, hiddenKeys$1);
901
+ };
902
+
903
+ var objectGetOwnPropertySymbols = {};
904
+
905
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
906
+ objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
907
+
908
+ var getBuiltIn$1 = getBuiltIn$4;
909
+ var uncurryThis$8 = functionUncurryThis;
910
+ var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
911
+ var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
912
+ var anObject$6 = anObject$8;
913
+
914
+ var concat$2 = uncurryThis$8([].concat);
915
+
916
+ // all object keys, includes non-enumerable and symbols
917
+ var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
918
+ var keys = getOwnPropertyNamesModule.f(anObject$6(it));
919
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
920
+ return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
921
+ };
995
922
 
996
- (redefine$4.exports = function (O, key, value, options) {
997
- var unsafe = options ? !!options.unsafe : false;
998
- var simple = options ? !!options.enumerable : false;
999
- var noTargetGet = options ? !!options.noTargetGet : false;
1000
- var name = options && options.name !== undefined ? options.name : key;
1001
- var state;
1002
- if (isCallable$8(value)) {
1003
- if (String(name).slice(0, 7) === 'Symbol(') {
1004
- name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
923
+ var hasOwn$2 = hasOwnProperty_1;
924
+ var ownKeys = ownKeys$1;
925
+ var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
926
+ var definePropertyModule$1 = objectDefineProperty;
927
+
928
+ var copyConstructorProperties$1 = function (target, source, exceptions) {
929
+ var keys = ownKeys(source);
930
+ var defineProperty = definePropertyModule$1.f;
931
+ var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
932
+ for (var i = 0; i < keys.length; i++) {
933
+ var key = keys[i];
934
+ if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
935
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1005
936
  }
1006
- if (!hasOwn$3(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
1007
- createNonEnumerableProperty$4(value, 'name', name);
937
+ }
938
+ };
939
+
940
+ var fails$9 = fails$h;
941
+ var isCallable$7 = isCallable$h;
942
+
943
+ var replacement = /#|\.prototype\./;
944
+
945
+ var isForced$1 = function (feature, detection) {
946
+ var value = data[normalize(feature)];
947
+ return value == POLYFILL ? true
948
+ : value == NATIVE ? false
949
+ : isCallable$7(detection) ? fails$9(detection)
950
+ : !!detection;
951
+ };
952
+
953
+ var normalize = isForced$1.normalize = function (string) {
954
+ return String(string).replace(replacement, '.').toLowerCase();
955
+ };
956
+
957
+ var data = isForced$1.data = {};
958
+ var NATIVE = isForced$1.NATIVE = 'N';
959
+ var POLYFILL = isForced$1.POLYFILL = 'P';
960
+
961
+ var isForced_1 = isForced$1;
962
+
963
+ var global$6 = global$f;
964
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
965
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
966
+ var defineBuiltIn$3 = defineBuiltIn$4;
967
+ var defineGlobalProperty = defineGlobalProperty$3;
968
+ var copyConstructorProperties = copyConstructorProperties$1;
969
+ var isForced = isForced_1;
970
+
971
+ /*
972
+ options.target - name of the target object
973
+ options.global - target is the global object
974
+ options.stat - export as static methods of target
975
+ options.proto - export as prototype methods of target
976
+ options.real - real prototype method for the `pure` version
977
+ options.forced - export even if the native feature is available
978
+ options.bind - bind methods to the target, required for the `pure` version
979
+ options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
980
+ options.unsafe - use the simple assignment of property instead of delete + defineProperty
981
+ options.sham - add a flag to not completely full polyfills
982
+ options.enumerable - export as enumerable property
983
+ options.dontCallGetSet - prevent calling a getter on target
984
+ options.name - the .name of the function if it does not match the key
985
+ */
986
+ var _export = function (options, source) {
987
+ var TARGET = options.target;
988
+ var GLOBAL = options.global;
989
+ var STATIC = options.stat;
990
+ var FORCED, target, key, targetProperty, sourceProperty, descriptor;
991
+ if (GLOBAL) {
992
+ target = global$6;
993
+ } else if (STATIC) {
994
+ target = global$6[TARGET] || defineGlobalProperty(TARGET, {});
995
+ } else {
996
+ target = (global$6[TARGET] || {}).prototype;
997
+ }
998
+ if (target) for (key in source) {
999
+ sourceProperty = source[key];
1000
+ if (options.dontCallGetSet) {
1001
+ descriptor = getOwnPropertyDescriptor(target, key);
1002
+ targetProperty = descriptor && descriptor.value;
1003
+ } else targetProperty = target[key];
1004
+ FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1005
+ // contained in target
1006
+ if (!FORCED && targetProperty !== undefined) {
1007
+ if (typeof sourceProperty == typeof targetProperty) continue;
1008
+ copyConstructorProperties(sourceProperty, targetProperty);
1008
1009
  }
1009
- state = enforceInternalState(value);
1010
- if (!state.source) {
1011
- state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
1010
+ // add a flag to not completely full polyfills
1011
+ if (options.sham || (targetProperty && targetProperty.sham)) {
1012
+ createNonEnumerableProperty$3(sourceProperty, 'sham', true);
1012
1013
  }
1014
+ defineBuiltIn$3(target, key, sourceProperty, options);
1013
1015
  }
1014
- if (O === global$d) {
1015
- if (simple) O[key] = value;
1016
- else setGlobal$1(key, value);
1017
- return;
1018
- } else if (!unsafe) {
1019
- delete O[key];
1020
- } else if (!noTargetGet && O[key]) {
1021
- simple = true;
1022
- }
1023
- if (simple) O[key] = value;
1024
- else createNonEnumerableProperty$4(O, key, value);
1025
- // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
1026
- })(Function.prototype, 'toString', function toString() {
1027
- return isCallable$8(this) && getInternalState$2(this).source || inspectSource(this);
1016
+ };
1017
+
1018
+ var internalObjectKeys = objectKeysInternal;
1019
+ var enumBugKeys$1 = enumBugKeys$3;
1020
+
1021
+ // `Object.keys` method
1022
+ // https://tc39.es/ecma262/#sec-object.keys
1023
+ // eslint-disable-next-line es/no-object-keys -- safe
1024
+ var objectKeys$2 = Object.keys || function keys(O) {
1025
+ return internalObjectKeys(O, enumBugKeys$1);
1026
+ };
1027
+
1028
+ var DESCRIPTORS$2 = descriptors;
1029
+ var uncurryThis$7 = functionUncurryThis;
1030
+ var call$5 = functionCall;
1031
+ var fails$8 = fails$h;
1032
+ var objectKeys$1 = objectKeys$2;
1033
+ var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1034
+ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1035
+ var toObject$3 = toObject$5;
1036
+ var IndexedObject$1 = indexedObject;
1037
+
1038
+ // eslint-disable-next-line es/no-object-assign -- safe
1039
+ var $assign = Object.assign;
1040
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1041
+ var defineProperty$3 = Object.defineProperty;
1042
+ var concat$1 = uncurryThis$7([].concat);
1043
+
1044
+ // `Object.assign` method
1045
+ // https://tc39.es/ecma262/#sec-object.assign
1046
+ var objectAssign = !$assign || fails$8(function () {
1047
+ // should have correct order of operations (Edge bug)
1048
+ if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
1049
+ enumerable: true,
1050
+ get: function () {
1051
+ defineProperty$3(this, 'b', {
1052
+ value: 3,
1053
+ enumerable: false
1054
+ });
1055
+ }
1056
+ }), { b: 2 })).b !== 1) return true;
1057
+ // should work with symbols and should have deterministic property order (V8 bug)
1058
+ var A = {};
1059
+ var B = {};
1060
+ // eslint-disable-next-line es/no-symbol -- safe
1061
+ var symbol = Symbol();
1062
+ var alphabet = 'abcdefghijklmnopqrst';
1063
+ A[symbol] = 7;
1064
+ alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1065
+ return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
1066
+ }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1067
+ var T = toObject$3(target);
1068
+ var argumentsLength = arguments.length;
1069
+ var index = 1;
1070
+ var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1071
+ var propertyIsEnumerable = propertyIsEnumerableModule.f;
1072
+ while (argumentsLength > index) {
1073
+ var S = IndexedObject$1(arguments[index++]);
1074
+ var keys = getOwnPropertySymbols ? concat$1(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
1075
+ var length = keys.length;
1076
+ var j = 0;
1077
+ var key;
1078
+ while (length > j) {
1079
+ key = keys[j++];
1080
+ if (!DESCRIPTORS$2 || call$5(propertyIsEnumerable, S, key)) T[key] = S[key];
1081
+ }
1082
+ } return T;
1083
+ } : $assign;
1084
+
1085
+ var $$3 = _export;
1086
+ var assign = objectAssign;
1087
+
1088
+ // `Object.assign` method
1089
+ // https://tc39.es/ecma262/#sec-object.assign
1090
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1091
+ $$3({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1092
+ assign: assign
1028
1093
  });
1029
1094
 
1030
- var objectGetOwnPropertyNames = {};
1095
+ const NinetailedContext = /*#__PURE__*/createContext(undefined);
1031
1096
 
1032
- var internalObjectKeys = objectKeysInternal;
1033
- var enumBugKeys = enumBugKeys$3;
1097
+ const ExperimentsContext = /*#__PURE__*/createContext(undefined);
1034
1098
 
1035
- var hiddenKeys = enumBugKeys.concat('length', 'prototype');
1099
+ var aCallable = aCallable$2;
1100
+ var toObject$2 = toObject$5;
1101
+ var IndexedObject = indexedObject;
1102
+ var lengthOfArrayLike = lengthOfArrayLike$2;
1103
+
1104
+ var $TypeError$2 = TypeError;
1105
+
1106
+ // `Array.prototype.{ reduce, reduceRight }` methods implementation
1107
+ var createMethod$1 = function (IS_RIGHT) {
1108
+ return function (that, callbackfn, argumentsLength, memo) {
1109
+ aCallable(callbackfn);
1110
+ var O = toObject$2(that);
1111
+ var self = IndexedObject(O);
1112
+ var length = lengthOfArrayLike(O);
1113
+ var index = IS_RIGHT ? length - 1 : 0;
1114
+ var i = IS_RIGHT ? -1 : 1;
1115
+ if (argumentsLength < 2) while (true) {
1116
+ if (index in self) {
1117
+ memo = self[index];
1118
+ index += i;
1119
+ break;
1120
+ }
1121
+ index += i;
1122
+ if (IS_RIGHT ? index < 0 : length <= index) {
1123
+ throw $TypeError$2('Reduce of empty array with no initial value');
1124
+ }
1125
+ }
1126
+ for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
1127
+ memo = callbackfn(memo, self[index], index, O);
1128
+ }
1129
+ return memo;
1130
+ };
1131
+ };
1132
+
1133
+ var arrayReduce = {
1134
+ // `Array.prototype.reduce` method
1135
+ // https://tc39.es/ecma262/#sec-array.prototype.reduce
1136
+ left: createMethod$1(false),
1137
+ // `Array.prototype.reduceRight` method
1138
+ // https://tc39.es/ecma262/#sec-array.prototype.reduceright
1139
+ right: createMethod$1(true)
1140
+ };
1141
+
1142
+ var fails$7 = fails$h;
1143
+
1144
+ var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
1145
+ var method = [][METHOD_NAME];
1146
+ return !!method && fails$7(function () {
1147
+ // eslint-disable-next-line no-useless-call -- required for testing
1148
+ method.call(null, argument || function () { return 1; }, 1);
1149
+ });
1150
+ };
1151
+
1152
+ var classof$3 = classofRaw$2;
1153
+ var global$5 = global$f;
1154
+
1155
+ var engineIsNode = classof$3(global$5.process) == 'process';
1156
+
1157
+ var $$2 = _export;
1158
+ var $reduce = arrayReduce.left;
1159
+ var arrayMethodIsStrict = arrayMethodIsStrict$1;
1160
+ var CHROME_VERSION = engineV8Version;
1161
+ var IS_NODE = engineIsNode;
1162
+
1163
+ var STRICT_METHOD = arrayMethodIsStrict('reduce');
1164
+ // Chrome 80-82 has a critical bug
1165
+ // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
1166
+ var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
1167
+
1168
+ // `Array.prototype.reduce` method
1169
+ // https://tc39.es/ecma262/#sec-array.prototype.reduce
1170
+ $$2({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {
1171
+ reduce: function reduce(callbackfn /* , initialValue */) {
1172
+ var length = arguments.length;
1173
+ return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
1174
+ }
1175
+ });
1176
+
1177
+ var objectDefineProperties = {};
1178
+
1179
+ var DESCRIPTORS$1 = descriptors;
1180
+ var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
1181
+ var definePropertyModule = objectDefineProperty;
1182
+ var anObject$5 = anObject$8;
1183
+ var toIndexedObject$1 = toIndexedObject$5;
1184
+ var objectKeys = objectKeys$2;
1036
1185
 
1037
- // `Object.getOwnPropertyNames` method
1038
- // https://tc39.es/ecma262/#sec-object.getownpropertynames
1039
- // eslint-disable-next-line es/no-object-getownpropertynames -- safe
1040
- objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
1041
- return internalObjectKeys(O, hiddenKeys);
1186
+ // `Object.defineProperties` method
1187
+ // https://tc39.es/ecma262/#sec-object.defineproperties
1188
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
1189
+ objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1190
+ anObject$5(O);
1191
+ var props = toIndexedObject$1(Properties);
1192
+ var keys = objectKeys(Properties);
1193
+ var length = keys.length;
1194
+ var index = 0;
1195
+ var key;
1196
+ while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
1197
+ return O;
1042
1198
  };
1043
1199
 
1044
- var objectGetOwnPropertySymbols = {};
1200
+ var getBuiltIn = getBuiltIn$4;
1045
1201
 
1046
- // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
1047
- objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
1202
+ var html$1 = getBuiltIn('document', 'documentElement');
1048
1203
 
1049
- var getBuiltIn = getBuiltIn$4;
1050
- var uncurryThis$7 = functionUncurryThis;
1051
- var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
1052
- var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
1053
- var anObject$4 = anObject$8;
1204
+ /* global ActiveXObject -- old IE, WSH */
1054
1205
 
1055
- var concat$2 = uncurryThis$7([].concat);
1206
+ var anObject$4 = anObject$8;
1207
+ var definePropertiesModule = objectDefineProperties;
1208
+ var enumBugKeys = enumBugKeys$3;
1209
+ var hiddenKeys = hiddenKeys$4;
1210
+ var html = html$1;
1211
+ var documentCreateElement$1 = documentCreateElement$2;
1212
+ var sharedKey$1 = sharedKey$3;
1056
1213
 
1057
- // all object keys, includes non-enumerable and symbols
1058
- var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
1059
- var keys = getOwnPropertyNamesModule.f(anObject$4(it));
1060
- var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
1061
- return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
1062
- };
1214
+ var GT = '>';
1215
+ var LT = '<';
1216
+ var PROTOTYPE = 'prototype';
1217
+ var SCRIPT = 'script';
1218
+ var IE_PROTO$1 = sharedKey$1('IE_PROTO');
1063
1219
 
1064
- var hasOwn$2 = hasOwnProperty_1;
1065
- var ownKeys = ownKeys$1;
1066
- var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
1067
- var definePropertyModule = objectDefineProperty;
1220
+ var EmptyConstructor = function () { /* empty */ };
1068
1221
 
1069
- var copyConstructorProperties$1 = function (target, source, exceptions) {
1070
- var keys = ownKeys(source);
1071
- var defineProperty = definePropertyModule.f;
1072
- var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
1073
- for (var i = 0; i < keys.length; i++) {
1074
- var key = keys[i];
1075
- if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
1076
- defineProperty(target, key, getOwnPropertyDescriptor(source, key));
1077
- }
1078
- }
1222
+ var scriptTag = function (content) {
1223
+ return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
1079
1224
  };
1080
1225
 
1081
- var fails$9 = fails$g;
1082
- var isCallable$7 = isCallable$g;
1226
+ // Create object with fake `null` prototype: use ActiveX Object with cleared prototype
1227
+ var NullProtoObjectViaActiveX = function (activeXDocument) {
1228
+ activeXDocument.write(scriptTag(''));
1229
+ activeXDocument.close();
1230
+ var temp = activeXDocument.parentWindow.Object;
1231
+ activeXDocument = null; // avoid memory leak
1232
+ return temp;
1233
+ };
1083
1234
 
1084
- var replacement = /#|\.prototype\./;
1235
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
1236
+ var NullProtoObjectViaIFrame = function () {
1237
+ // Thrash, waste and sodomy: IE GC bug
1238
+ var iframe = documentCreateElement$1('iframe');
1239
+ var JS = 'java' + SCRIPT + ':';
1240
+ var iframeDocument;
1241
+ iframe.style.display = 'none';
1242
+ html.appendChild(iframe);
1243
+ // https://github.com/zloirock/core-js/issues/475
1244
+ iframe.src = String(JS);
1245
+ iframeDocument = iframe.contentWindow.document;
1246
+ iframeDocument.open();
1247
+ iframeDocument.write(scriptTag('document.F=Object'));
1248
+ iframeDocument.close();
1249
+ return iframeDocument.F;
1250
+ };
1085
1251
 
1086
- var isForced$1 = function (feature, detection) {
1087
- var value = data[normalize(feature)];
1088
- return value == POLYFILL ? true
1089
- : value == NATIVE ? false
1090
- : isCallable$7(detection) ? fails$9(detection)
1091
- : !!detection;
1252
+ // Check for document.domain and active x support
1253
+ // No need to use active x approach when document.domain is not set
1254
+ // see https://github.com/es-shims/es5-shim/issues/150
1255
+ // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
1256
+ // avoid IE GC bug
1257
+ var activeXDocument;
1258
+ var NullProtoObject = function () {
1259
+ try {
1260
+ activeXDocument = new ActiveXObject('htmlfile');
1261
+ } catch (error) { /* ignore */ }
1262
+ NullProtoObject = typeof document != 'undefined'
1263
+ ? document.domain && activeXDocument
1264
+ ? NullProtoObjectViaActiveX(activeXDocument) // old IE
1265
+ : NullProtoObjectViaIFrame()
1266
+ : NullProtoObjectViaActiveX(activeXDocument); // WSH
1267
+ var length = enumBugKeys.length;
1268
+ while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
1269
+ return NullProtoObject();
1092
1270
  };
1093
1271
 
1094
- var normalize = isForced$1.normalize = function (string) {
1095
- return String(string).replace(replacement, '.').toLowerCase();
1272
+ hiddenKeys[IE_PROTO$1] = true;
1273
+
1274
+ // `Object.create` method
1275
+ // https://tc39.es/ecma262/#sec-object.create
1276
+ // eslint-disable-next-line es/no-object-create -- safe
1277
+ var objectCreate = Object.create || function create(O, Properties) {
1278
+ var result;
1279
+ if (O !== null) {
1280
+ EmptyConstructor[PROTOTYPE] = anObject$4(O);
1281
+ result = new EmptyConstructor();
1282
+ EmptyConstructor[PROTOTYPE] = null;
1283
+ // add "__proto__" for Object.getPrototypeOf polyfill
1284
+ result[IE_PROTO$1] = O;
1285
+ } else result = NullProtoObject();
1286
+ return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
1096
1287
  };
1097
1288
 
1098
- var data = isForced$1.data = {};
1099
- var NATIVE = isForced$1.NATIVE = 'N';
1100
- var POLYFILL = isForced$1.POLYFILL = 'P';
1289
+ var wellKnownSymbol$8 = wellKnownSymbol$a;
1290
+ var create$2 = objectCreate;
1291
+ var defineProperty$2 = objectDefineProperty.f;
1101
1292
 
1102
- var isForced_1 = isForced$1;
1293
+ var UNSCOPABLES = wellKnownSymbol$8('unscopables');
1294
+ var ArrayPrototype = Array.prototype;
1103
1295
 
1104
- var global$c = global$w;
1105
- var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1106
- var createNonEnumerableProperty$3 = createNonEnumerableProperty$6;
1107
- var redefine$3 = redefine$4.exports;
1108
- var setGlobal = setGlobal$3;
1109
- var copyConstructorProperties = copyConstructorProperties$1;
1110
- var isForced = isForced_1;
1296
+ // Array.prototype[@@unscopables]
1297
+ // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
1298
+ if (ArrayPrototype[UNSCOPABLES] == undefined) {
1299
+ defineProperty$2(ArrayPrototype, UNSCOPABLES, {
1300
+ configurable: true,
1301
+ value: create$2(null)
1302
+ });
1303
+ }
1111
1304
 
1112
- /*
1113
- options.target - name of the target object
1114
- options.global - target is the global object
1115
- options.stat - export as static methods of target
1116
- options.proto - export as prototype methods of target
1117
- options.real - real prototype method for the `pure` version
1118
- options.forced - export even if the native feature is available
1119
- options.bind - bind methods to the target, required for the `pure` version
1120
- options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
1121
- options.unsafe - use the simple assignment of property instead of delete + defineProperty
1122
- options.sham - add a flag to not completely full polyfills
1123
- options.enumerable - export as enumerable property
1124
- options.noTargetGet - prevent calling a getter on target
1125
- options.name - the .name of the function if it does not match the key
1126
- */
1127
- var _export = function (options, source) {
1128
- var TARGET = options.target;
1129
- var GLOBAL = options.global;
1130
- var STATIC = options.stat;
1131
- var FORCED, target, key, targetProperty, sourceProperty, descriptor;
1132
- if (GLOBAL) {
1133
- target = global$c;
1134
- } else if (STATIC) {
1135
- target = global$c[TARGET] || setGlobal(TARGET, {});
1136
- } else {
1137
- target = (global$c[TARGET] || {}).prototype;
1138
- }
1139
- if (target) for (key in source) {
1140
- sourceProperty = source[key];
1141
- if (options.noTargetGet) {
1142
- descriptor = getOwnPropertyDescriptor(target, key);
1143
- targetProperty = descriptor && descriptor.value;
1144
- } else targetProperty = target[key];
1145
- FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
1146
- // contained in target
1147
- if (!FORCED && targetProperty !== undefined) {
1148
- if (typeof sourceProperty == typeof targetProperty) continue;
1149
- copyConstructorProperties(sourceProperty, targetProperty);
1150
- }
1151
- // add a flag to not completely full polyfills
1152
- if (options.sham || (targetProperty && targetProperty.sham)) {
1153
- createNonEnumerableProperty$3(sourceProperty, 'sham', true);
1154
- }
1155
- // extend global
1156
- redefine$3(target, key, sourceProperty, options);
1157
- }
1305
+ // add a key to Array.prototype[@@unscopables]
1306
+ var addToUnscopables$1 = function (key) {
1307
+ ArrayPrototype[UNSCOPABLES][key] = true;
1158
1308
  };
1159
1309
 
1160
- var fails$8 = fails$g;
1310
+ var iterators = {};
1311
+
1312
+ var fails$6 = fails$h;
1161
1313
 
1162
- var correctPrototypeGetter = !fails$8(function () {
1314
+ var correctPrototypeGetter = !fails$6(function () {
1163
1315
  function F() { /* empty */ }
1164
1316
  F.prototype.constructor = null;
1165
1317
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1166
1318
  return Object.getPrototypeOf(new F()) !== F.prototype;
1167
1319
  });
1168
1320
 
1169
- var global$b = global$w;
1170
1321
  var hasOwn$1 = hasOwnProperty_1;
1171
- var isCallable$6 = isCallable$g;
1172
- var toObject$3 = toObject$5;
1322
+ var isCallable$6 = isCallable$h;
1323
+ var toObject$1 = toObject$5;
1173
1324
  var sharedKey = sharedKey$3;
1174
1325
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
1175
1326
 
1176
1327
  var IE_PROTO = sharedKey('IE_PROTO');
1177
- var Object$2 = global$b.Object;
1178
- var ObjectPrototype = Object$2.prototype;
1328
+ var $Object$1 = Object;
1329
+ var ObjectPrototype = $Object$1.prototype;
1179
1330
 
1180
1331
  // `Object.getPrototypeOf` method
1181
1332
  // https://tc39.es/ecma262/#sec-object.getprototypeof
1182
- var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? Object$2.getPrototypeOf : function (O) {
1183
- var object = toObject$3(O);
1333
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
1334
+ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
1335
+ var object = toObject$1(O);
1184
1336
  if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
1185
1337
  var constructor = object.constructor;
1186
1338
  if (isCallable$6(constructor) && object instanceof constructor) {
1187
1339
  return constructor.prototype;
1188
- } return object instanceof Object$2 ? ObjectPrototype : null;
1340
+ } return object instanceof $Object$1 ? ObjectPrototype : null;
1189
1341
  };
1190
1342
 
1191
- var fails$7 = fails$g;
1192
- var isCallable$5 = isCallable$g;
1343
+ var fails$5 = fails$h;
1344
+ var isCallable$5 = isCallable$h;
1345
+ var isObject = isObject$6;
1193
1346
  var getPrototypeOf$1 = objectGetPrototypeOf;
1194
- var redefine$2 = redefine$4.exports;
1347
+ var defineBuiltIn$2 = defineBuiltIn$4;
1195
1348
  var wellKnownSymbol$7 = wellKnownSymbol$a;
1196
1349
 
1197
1350
  var ITERATOR$2 = wellKnownSymbol$7('iterator');
@@ -1212,7 +1365,7 @@ if ([].keys) {
1212
1365
  }
1213
1366
  }
1214
1367
 
1215
- var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails$7(function () {
1368
+ var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$2) || fails$5(function () {
1216
1369
  var test = {};
1217
1370
  // FF44- legacy iterators case
1218
1371
  return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
@@ -1223,7 +1376,7 @@ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
1223
1376
  // `%IteratorPrototype%[@@iterator]()` method
1224
1377
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1225
1378
  if (!isCallable$5(IteratorPrototype$2[ITERATOR$2])) {
1226
- redefine$2(IteratorPrototype$2, ITERATOR$2, function () {
1379
+ defineBuiltIn$2(IteratorPrototype$2, ITERATOR$2, function () {
1227
1380
  return this;
1228
1381
  });
1229
1382
  }
@@ -1233,7 +1386,7 @@ var iteratorsCore = {
1233
1386
  BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
1234
1387
  };
1235
1388
 
1236
- var defineProperty$2 = objectDefineProperty.f;
1389
+ var defineProperty$1 = objectDefineProperty.f;
1237
1390
  var hasOwn = hasOwnProperty_1;
1238
1391
  var wellKnownSymbol$6 = wellKnownSymbol$a;
1239
1392
 
@@ -1242,7 +1395,7 @@ var TO_STRING_TAG$3 = wellKnownSymbol$6('toStringTag');
1242
1395
  var setToStringTag$2 = function (target, TAG, STATIC) {
1243
1396
  if (target && !STATIC) target = target.prototype;
1244
1397
  if (target && !hasOwn(target, TO_STRING_TAG$3)) {
1245
- defineProperty$2(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1398
+ defineProperty$1(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
1246
1399
  }
1247
1400
  };
1248
1401
 
@@ -1254,7 +1407,7 @@ var Iterators$2 = iterators;
1254
1407
 
1255
1408
  var returnThis$1 = function () { return this; };
1256
1409
 
1257
- var createIteratorConstructor$1 = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1410
+ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1258
1411
  var TO_STRING_TAG = NAME + ' Iterator';
1259
1412
  IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1260
1413
  setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
@@ -1262,15 +1415,14 @@ var createIteratorConstructor$1 = function (IteratorConstructor, NAME, next, ENU
1262
1415
  return IteratorConstructor;
1263
1416
  };
1264
1417
 
1265
- var global$a = global$w;
1266
- var isCallable$4 = isCallable$g;
1418
+ var isCallable$4 = isCallable$h;
1267
1419
 
1268
- var String$2 = global$a.String;
1269
- var TypeError$3 = global$a.TypeError;
1420
+ var $String$1 = String;
1421
+ var $TypeError$1 = TypeError;
1270
1422
 
1271
1423
  var aPossiblePrototype$1 = function (argument) {
1272
1424
  if (typeof argument == 'object' || isCallable$4(argument)) return argument;
1273
- throw TypeError$3("Can't set " + String$2(argument) + ' as a prototype');
1425
+ throw $TypeError$1("Can't set " + $String$1(argument) + ' as a prototype');
1274
1426
  };
1275
1427
 
1276
1428
  /* eslint-disable no-proto -- safe */
@@ -1302,16 +1454,16 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1302
1454
  };
1303
1455
  }() : undefined);
1304
1456
 
1305
- var $$3 = _export;
1306
- var call$5 = functionCall;
1457
+ var $$1 = _export;
1458
+ var call$4 = functionCall;
1307
1459
  var FunctionName = functionName;
1308
- var isCallable$3 = isCallable$g;
1309
- var createIteratorConstructor = createIteratorConstructor$1;
1460
+ var isCallable$3 = isCallable$h;
1461
+ var createIteratorConstructor = iteratorCreateConstructor;
1310
1462
  var getPrototypeOf = objectGetPrototypeOf;
1311
1463
  var setPrototypeOf = objectSetPrototypeOf;
1312
1464
  var setToStringTag = setToStringTag$2;
1313
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$6;
1314
- var redefine$1 = redefine$4.exports;
1465
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
1466
+ var defineBuiltIn$1 = defineBuiltIn$4;
1315
1467
  var wellKnownSymbol$5 = wellKnownSymbol$a;
1316
1468
  var Iterators$1 = iterators;
1317
1469
  var IteratorsCore = iteratorsCore;
@@ -1327,7 +1479,7 @@ var ENTRIES = 'entries';
1327
1479
 
1328
1480
  var returnThis = function () { return this; };
1329
1481
 
1330
- var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1482
+ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1331
1483
  createIteratorConstructor(IteratorConstructor, NAME, next);
1332
1484
 
1333
1485
  var getIterationMethod = function (KIND) {
@@ -1358,7 +1510,7 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
1358
1510
  if (setPrototypeOf) {
1359
1511
  setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
1360
1512
  } else if (!isCallable$3(CurrentIteratorPrototype[ITERATOR$1])) {
1361
- redefine$1(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1513
+ defineBuiltIn$1(CurrentIteratorPrototype, ITERATOR$1, returnThis);
1362
1514
  }
1363
1515
  }
1364
1516
  // Set @@toStringTag to native iterators
@@ -1372,7 +1524,7 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
1372
1524
  createNonEnumerableProperty$2(IterablePrototype, 'name', VALUES);
1373
1525
  } else {
1374
1526
  INCORRECT_VALUES_NAME = true;
1375
- defaultIterator = function values() { return call$5(nativeIterator, this); };
1527
+ defaultIterator = function values() { return call$4(nativeIterator, this); };
1376
1528
  }
1377
1529
  }
1378
1530
 
@@ -1385,27 +1537,34 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
1385
1537
  };
1386
1538
  if (FORCED) for (KEY in methods) {
1387
1539
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
1388
- redefine$1(IterablePrototype, KEY, methods[KEY]);
1540
+ defineBuiltIn$1(IterablePrototype, KEY, methods[KEY]);
1389
1541
  }
1390
- } else $$3({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1542
+ } else $$1({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
1391
1543
  }
1392
1544
 
1393
1545
  // define iterator
1394
1546
  if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
1395
- redefine$1(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1547
+ defineBuiltIn$1(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
1396
1548
  }
1397
1549
  Iterators$1[NAME] = defaultIterator;
1398
1550
 
1399
1551
  return methods;
1400
1552
  };
1401
1553
 
1554
+ // `CreateIterResultObject` abstract operation
1555
+ // https://tc39.es/ecma262/#sec-createiterresultobject
1556
+ var createIterResultObject$1 = function (value, done) {
1557
+ return { value: value, done: done };
1558
+ };
1559
+
1402
1560
  var toIndexedObject = toIndexedObject$5;
1403
1561
  var addToUnscopables = addToUnscopables$1;
1404
1562
  var Iterators = iterators;
1405
1563
  var InternalStateModule = internalState;
1406
- var defineProperty$1 = objectDefineProperty.f;
1407
- var defineIterator = defineIterator$1;
1408
- var DESCRIPTORS$1 = descriptors;
1564
+ var defineProperty = objectDefineProperty.f;
1565
+ var defineIterator = iteratorDefine;
1566
+ var createIterResultObject = createIterResultObject$1;
1567
+ var DESCRIPTORS = descriptors;
1409
1568
 
1410
1569
  var ARRAY_ITERATOR = 'Array Iterator';
1411
1570
  var setInternalState = InternalStateModule.set;
@@ -1437,11 +1596,11 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
1437
1596
  var index = state.index++;
1438
1597
  if (!target || index >= target.length) {
1439
1598
  state.target = undefined;
1440
- return { value: undefined, done: true };
1599
+ return createIterResultObject(undefined, true);
1441
1600
  }
1442
- if (kind == 'keys') return { value: index, done: false };
1443
- if (kind == 'values') return { value: target[index], done: false };
1444
- return { value: [index, target[index]], done: false };
1601
+ if (kind == 'keys') return createIterResultObject(index, false);
1602
+ if (kind == 'values') return createIterResultObject(target[index], false);
1603
+ return createIterResultObject([index, target[index]], false);
1445
1604
  }, 'values');
1446
1605
 
1447
1606
  // argumentsList[@@iterator] is %ArrayProto_values%
@@ -1455,8 +1614,8 @@ addToUnscopables('values');
1455
1614
  addToUnscopables('entries');
1456
1615
 
1457
1616
  // V8 ~ Chrome 45- bug
1458
- if (DESCRIPTORS$1 && values.name !== 'values') try {
1459
- defineProperty$1(values, 'name', { value: 'values' });
1617
+ if (DESCRIPTORS && values.name !== 'values') try {
1618
+ defineProperty(values, 'name', { value: 'values' });
1460
1619
  } catch (error) { /* empty */ }
1461
1620
 
1462
1621
  // iterable DOM collections
@@ -1503,11 +1662,11 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
1503
1662
 
1504
1663
  var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
1505
1664
 
1506
- var global$9 = global$w;
1665
+ var global$4 = global$f;
1507
1666
  var DOMIterables = domIterables;
1508
1667
  var DOMTokenListPrototype = domTokenListPrototype;
1509
1668
  var ArrayIteratorMethods = es_array_iterator;
1510
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$6;
1669
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
1511
1670
  var wellKnownSymbol$4 = wellKnownSymbol$a;
1512
1671
 
1513
1672
  var ITERATOR = wellKnownSymbol$4('iterator');
@@ -1537,86 +1696,198 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
1537
1696
  };
1538
1697
 
1539
1698
  for (var COLLECTION_NAME in DOMIterables) {
1540
- handlePrototype(global$9[COLLECTION_NAME] && global$9[COLLECTION_NAME].prototype, COLLECTION_NAME);
1699
+ handlePrototype(global$4[COLLECTION_NAME] && global$4[COLLECTION_NAME].prototype, COLLECTION_NAME);
1541
1700
  }
1542
1701
 
1543
1702
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
1544
1703
 
1545
- var DESCRIPTORS = descriptors;
1546
- var uncurryThis$5 = functionUncurryThis;
1547
- var call$4 = functionCall;
1548
- var fails$6 = fails$g;
1549
- var objectKeys = objectKeys$2;
1550
- var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
1551
- var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1552
- var toObject$2 = toObject$5;
1553
- var IndexedObject$1 = indexedObject;
1704
+ /******************************************************************************
1705
+ Copyright (c) Microsoft Corporation.
1706
+
1707
+ Permission to use, copy, modify, and/or distribute this software for any
1708
+ purpose with or without fee is hereby granted.
1709
+
1710
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1711
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1712
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1713
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1714
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1715
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1716
+ PERFORMANCE OF THIS SOFTWARE.
1717
+ ***************************************************************************** */
1718
+
1719
+ function __rest(s, e) {
1720
+ var t = {};
1721
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1722
+ t[p] = s[p];
1723
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
1724
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1725
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1726
+ t[p[i]] = s[p[i]];
1727
+ }
1728
+ return t;
1729
+ }
1730
+
1731
+ function __awaiter(thisArg, _arguments, P, generator) {
1732
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
1733
+ return new (P || (P = Promise))(function (resolve, reject) {
1734
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
1735
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
1736
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
1737
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
1738
+ });
1739
+ }
1554
1740
 
1555
- // eslint-disable-next-line es/no-object-assign -- safe
1556
- var $assign = Object.assign;
1557
- // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1558
- var defineProperty = Object.defineProperty;
1559
- var concat$1 = uncurryThis$5([].concat);
1741
+ const EXPERIENCE_TRAIT_PREFIX = 'nt_experiment_';
1560
1742
 
1561
- // `Object.assign` method
1562
- // https://tc39.es/ecma262/#sec-object.assign
1563
- var objectAssign = !$assign || fails$6(function () {
1564
- // should have correct order of operations (Edge bug)
1565
- if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
1566
- enumerable: true,
1567
- get: function () {
1568
- defineProperty(this, 'b', {
1569
- value: 3,
1570
- enumerable: false
1571
- });
1572
- }
1573
- }), { b: 2 })).b !== 1) return true;
1574
- // should work with symbols and should have deterministic property order (V8 bug)
1575
- var A = {};
1576
- var B = {};
1577
- // eslint-disable-next-line es/no-symbol -- safe
1578
- var symbol = Symbol();
1579
- var alphabet = 'abcdefghijklmnopqrst';
1580
- A[symbol] = 7;
1581
- alphabet.split('').forEach(function (chr) { B[chr] = chr; });
1582
- return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;
1583
- }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
1584
- var T = toObject$2(target);
1585
- var argumentsLength = arguments.length;
1586
- var index = 1;
1587
- var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
1588
- var propertyIsEnumerable = propertyIsEnumerableModule.f;
1589
- while (argumentsLength > index) {
1590
- var S = IndexedObject$1(arguments[index++]);
1591
- var keys = getOwnPropertySymbols ? concat$1(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S);
1592
- var length = keys.length;
1593
- var j = 0;
1594
- var key;
1595
- while (length > j) {
1596
- key = keys[j++];
1597
- if (!DESCRIPTORS || call$4(propertyIsEnumerable, S, key)) T[key] = S[key];
1743
+ const useNinetailed = () => {
1744
+ const ninetailed = useContext(NinetailedContext);
1745
+ if (ninetailed === undefined) {
1746
+ throw new Error('The component using the the context must be a descendant of the NinetailedProvider');
1747
+ }
1748
+ return ninetailed;
1749
+ };
1750
+
1751
+ const debounce = (fn, wait, options) => {
1752
+ let debouncedArgs = [];
1753
+ const debouncedFn = _debounce(() => {
1754
+ fn.call(undefined, debouncedArgs);
1755
+ debouncedArgs = [];
1756
+ }, wait, options);
1757
+ return (...args) => {
1758
+ debouncedArgs.push(values$1(args));
1759
+ debouncedFn();
1760
+ };
1761
+ };
1762
+ const useProvideJoinExperiment = ({
1763
+ experiments,
1764
+ maximumActiveExperiments: _maximumActiveExperiments = 1
1765
+ }) => {
1766
+ const {
1767
+ identify
1768
+ } = useNinetailed();
1769
+ const joinExperimentIdentify = debounce(args => {
1770
+ const traits = args.slice(0, _maximumActiveExperiments).reduce((traits, [experimentJoinTraits]) => {
1771
+ return Object.assign(Object.assign({}, experimentJoinTraits), traits);
1772
+ }, {});
1773
+ identify('', traits);
1774
+ });
1775
+ return useCallback(data => __awaiter(void 0, void 0, void 0, function* () {
1776
+ const {
1777
+ experiment,
1778
+ profile
1779
+ } = data;
1780
+ const isExperiment = experiment.type === 'nt_experiment';
1781
+ if (!isExperiment) {
1782
+ logger.warn(`The experience ${experiment.id}, which you tried to join, is not an experiment.`);
1783
+ return;
1598
1784
  }
1599
- } return T;
1600
- } : $assign;
1785
+ const activeExperiments = selectActiveExperiments(experiments, profile);
1786
+ if (activeExperiments.length >= _maximumActiveExperiments) {
1787
+ logger.warn(`The maximum number of active experiments (${_maximumActiveExperiments}) has been reached.`);
1788
+ return;
1789
+ }
1790
+ if (activeExperiments.some(activeExperiment => activeExperiment.id === experiment.id)) {
1791
+ logger.debug(`The user is already part of experiment ${experiment.id}. Won't join again.`);
1792
+ return;
1793
+ }
1794
+ joinExperimentIdentify({
1795
+ [`${EXPERIENCE_TRAIT_PREFIX}${experiment.id}`]: true
1796
+ });
1797
+ logger.debug(`Sent event to join experiment ${experiment.id}.`);
1798
+ }), []);
1799
+ };
1601
1800
 
1602
- var $$2 = _export;
1603
- var assign = objectAssign;
1801
+ const ExperimentsProvider = ({
1802
+ experiments,
1803
+ maximumActiveExperiments: _maximumActiveExperiments = 1,
1804
+ children
1805
+ }) => {
1806
+ const joinExperiment = useProvideJoinExperiment({
1807
+ experiments,
1808
+ maximumActiveExperiments: _maximumActiveExperiments
1809
+ });
1810
+ return jsx(ExperimentsContext.Provider, Object.assign({
1811
+ value: {
1812
+ experiments,
1813
+ joinExperiment
1814
+ }
1815
+ }, {
1816
+ children: children
1817
+ }));
1818
+ };
1604
1819
 
1605
- // `Object.assign` method
1606
- // https://tc39.es/ecma262/#sec-object.assign
1607
- // eslint-disable-next-line es/no-object-assign -- required for testing
1608
- $$2({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
1609
- assign: assign
1610
- });
1820
+ const NinetailedProvider = ({
1821
+ children,
1822
+ clientId,
1823
+ experiments: _experiments = [],
1824
+ maximumActiveExperiments,
1825
+ environment,
1826
+ preview,
1827
+ url,
1828
+ profile,
1829
+ locale,
1830
+ requestTimeout,
1831
+ plugins: _plugins = [],
1832
+ onLog,
1833
+ onError
1834
+ }) => {
1835
+ const ninetailed = useMemo(() => new Ninetailed({
1836
+ clientId,
1837
+ environment,
1838
+ preview
1839
+ }, {
1840
+ url,
1841
+ plugins: _plugins,
1842
+ profile,
1843
+ locale,
1844
+ requestTimeout,
1845
+ onLog,
1846
+ onError
1847
+ }), []);
1848
+ return jsx(NinetailedContext.Provider, Object.assign({
1849
+ value: ninetailed
1850
+ }, {
1851
+ children: jsx(ExperimentsProvider, Object.assign({
1852
+ experiments: _experiments,
1853
+ maximumActiveExperiments: maximumActiveExperiments
1854
+ }, {
1855
+ children: children
1856
+ }))
1857
+ }));
1858
+ };
1611
1859
 
1612
1860
  const useProfile = () => {
1613
1861
  const ninetailed = useNinetailed();
1614
1862
  const [profileState, setProfileState] = useState(ninetailed.profileState);
1863
+ const profileStateRef = useRef({});
1864
+ /**
1865
+ * This effect compares the old and new profile state before updating it.
1866
+ * We use a ref to avoid an infinite loop which can happen when an empty profile state was updated with no changes.
1867
+ * This behaviour occurred as the validation handling on the error property was not set properly in the "CreateProfile" and "UpdateProfile" endpoint types.
1868
+ * Furthermore, it was also observed, that it "only" occurred when the preview plugin was used in parallel.
1869
+ */
1615
1870
  useEffect(() => {
1616
- return ninetailed.onProfileChange(profileState => {
1617
- setProfileState(profileState);
1871
+ ninetailed.onProfileChange(profileState => {
1872
+ if (isEqual(profileState, profileStateRef.current)) {
1873
+ logger.debug('Profile State Did Not Change', profileState);
1874
+ return;
1875
+ } else {
1876
+ setProfileState(profileState);
1877
+ profileStateRef.current = profileState;
1878
+ logger.debug('Profile State Changed', profileState);
1879
+ }
1618
1880
  });
1619
1881
  }, []);
1882
+ /**
1883
+ * Old implementation without profile state deep comparison
1884
+ */
1885
+ /*useEffect(() => {
1886
+ return ninetailed.onProfileChange((profileState) => {
1887
+ console.log('profileState', profileState);
1888
+ setProfileState(profileState);
1889
+ });
1890
+ }, []);*/
1620
1891
  return Object.assign(Object.assign({}, profileState), {
1621
1892
  loading: profileState.status === 'loading'
1622
1893
  });
@@ -1629,33 +1900,6 @@ const usePersonalize = (baseline, variants, options = {
1629
1900
  return selectVariant(baseline, variants, profile, options);
1630
1901
  };
1631
1902
 
1632
- /*! *****************************************************************************
1633
- Copyright (c) Microsoft Corporation.
1634
-
1635
- Permission to use, copy, modify, and/or distribute this software for any
1636
- purpose with or without fee is hereby granted.
1637
-
1638
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
1639
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
1640
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
1641
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
1642
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
1643
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
1644
- PERFORMANCE OF THIS SOFTWARE.
1645
- ***************************************************************************** */
1646
-
1647
- function __rest(s, e) {
1648
- var t = {};
1649
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
1650
- t[p] = s[p];
1651
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
1652
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
1653
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
1654
- t[p[i]] = s[p[i]];
1655
- }
1656
- return t;
1657
- }
1658
-
1659
1903
  const TrackHasSeenComponent = ({
1660
1904
  children,
1661
1905
  variant,
@@ -1678,20 +1922,21 @@ const TrackHasSeenComponent = ({
1678
1922
  });
1679
1923
  }
1680
1924
  }, [inView]);
1681
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
1682
- ref: ref
1683
- }), children);
1925
+ return jsxs(Fragment, {
1926
+ children: [jsx("div", {
1927
+ ref: ref
1928
+ }), children]
1929
+ });
1684
1930
  };
1685
1931
 
1686
1932
  const Personalize = _a => {
1687
1933
  var {
1688
- component: Component,
1689
- loadingComponent: LoadingComponent,
1690
- variants = [],
1691
- holdout = -1
1692
- } = _a,
1693
- baseline = __rest(_a, ["component", "loadingComponent", "variants", "holdout"]);
1694
-
1934
+ component: Component,
1935
+ loadingComponent: LoadingComponent,
1936
+ variants = [],
1937
+ holdout = -1
1938
+ } = _a,
1939
+ baseline = __rest(_a, ["component", "loadingComponent", "variants", "holdout"]);
1695
1940
  const {
1696
1941
  loading,
1697
1942
  variant,
@@ -1701,45 +1946,44 @@ const Personalize = _a => {
1701
1946
  holdout
1702
1947
  });
1703
1948
  const hasVariants = variants.length > 0;
1704
-
1705
1949
  if (!hasVariants) {
1706
- return /*#__PURE__*/React.createElement(Component, Object.assign({}, baseline, {
1950
+ return jsx(Component, Object.assign({}, baseline, {
1707
1951
  ninetailed: {
1708
1952
  isPersonalized,
1709
1953
  audience
1710
1954
  }
1711
1955
  }));
1712
1956
  }
1713
-
1714
1957
  if (loading) {
1715
1958
  if (LoadingComponent) {
1716
- return /*#__PURE__*/React.createElement(LoadingComponent, null);
1959
+ return jsx(LoadingComponent, {});
1717
1960
  }
1718
-
1719
- return /*#__PURE__*/React.createElement("div", {
1720
- key: "hide",
1961
+ return jsx("div", Object.assign({
1721
1962
  style: {
1722
1963
  opacity: 0
1723
1964
  }
1724
- }, /*#__PURE__*/React.createElement(Component, Object.assign({}, variant, {
1725
- ninetailed: {
1726
- isPersonalized,
1727
- audience
1728
- }
1729
- })));
1965
+ }, {
1966
+ children: jsx(Component, Object.assign({}, variant, {
1967
+ ninetailed: {
1968
+ isPersonalized,
1969
+ audience
1970
+ }
1971
+ }))
1972
+ }), "hide");
1730
1973
  }
1731
-
1732
- return /*#__PURE__*/React.createElement(TrackHasSeenComponent, {
1974
+ return jsx(TrackHasSeenComponent, Object.assign({
1733
1975
  variant: variant,
1734
1976
  audience: audience,
1735
1977
  isPersonalized: isPersonalized
1736
- }, /*#__PURE__*/React.createElement(Component, Object.assign({}, variant, {
1737
- key: `${audience.id}-${variant.id}`,
1738
- ninetailed: {
1739
- isPersonalized,
1740
- audience
1741
- }
1742
- })));
1978
+ }, {
1979
+ children: /*#__PURE__*/createElement$1(Component, Object.assign({}, variant, {
1980
+ key: `${audience.id}-${variant.id}`,
1981
+ ninetailed: {
1982
+ isPersonalized,
1983
+ audience
1984
+ }
1985
+ }))
1986
+ }));
1743
1987
  };
1744
1988
 
1745
1989
  var wellKnownSymbol$3 = wellKnownSymbol$a;
@@ -1751,17 +1995,16 @@ test[TO_STRING_TAG$1] = 'z';
1751
1995
 
1752
1996
  var toStringTagSupport = String(test) === '[object z]';
1753
1997
 
1754
- var global$8 = global$w;
1755
1998
  var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1756
- var isCallable$2 = isCallable$g;
1757
- var classofRaw = classofRaw$1;
1999
+ var isCallable$2 = isCallable$h;
2000
+ var classofRaw$1 = classofRaw$2;
1758
2001
  var wellKnownSymbol$2 = wellKnownSymbol$a;
1759
2002
 
1760
2003
  var TO_STRING_TAG = wellKnownSymbol$2('toStringTag');
1761
- var Object$1 = global$8.Object;
2004
+ var $Object = Object;
1762
2005
 
1763
2006
  // ES3 wrong here
1764
- var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
2007
+ var CORRECT_ARGUMENTS = classofRaw$1(function () { return arguments; }()) == 'Arguments';
1765
2008
 
1766
2009
  // fallback for IE11 Script Access Denied error
1767
2010
  var tryGet = function (it, key) {
@@ -1771,25 +2014,24 @@ var tryGet = function (it, key) {
1771
2014
  };
1772
2015
 
1773
2016
  // getting tag from ES6+ `Object.prototype.toString`
1774
- var classof$3 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
2017
+ var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw$1 : function (it) {
1775
2018
  var O, tag, result;
1776
2019
  return it === undefined ? 'Undefined' : it === null ? 'Null'
1777
2020
  // @@toStringTag case
1778
- : typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
2021
+ : typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
1779
2022
  // builtinTag case
1780
- : CORRECT_ARGUMENTS ? classofRaw(O)
2023
+ : CORRECT_ARGUMENTS ? classofRaw$1(O)
1781
2024
  // ES3 arguments fallback
1782
- : (result = classofRaw(O)) == 'Object' && isCallable$2(O.callee) ? 'Arguments' : result;
2025
+ : (result = classofRaw$1(O)) == 'Object' && isCallable$2(O.callee) ? 'Arguments' : result;
1783
2026
  };
1784
2027
 
1785
- var global$7 = global$w;
1786
- var classof$2 = classof$3;
2028
+ var classof$1 = classof$2;
1787
2029
 
1788
- var String$1 = global$7.String;
2030
+ var $String = String;
1789
2031
 
1790
2032
  var toString$3 = function (argument) {
1791
- if (classof$2(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
1792
- return String$1(argument);
2033
+ if (classof$1(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
2034
+ return $String(argument);
1793
2035
  };
1794
2036
 
1795
2037
  var anObject$2 = anObject$8;
@@ -1799,22 +2041,24 @@ var anObject$2 = anObject$8;
1799
2041
  var regexpFlags$1 = function () {
1800
2042
  var that = anObject$2(this);
1801
2043
  var result = '';
2044
+ if (that.hasIndices) result += 'd';
1802
2045
  if (that.global) result += 'g';
1803
2046
  if (that.ignoreCase) result += 'i';
1804
2047
  if (that.multiline) result += 'm';
1805
2048
  if (that.dotAll) result += 's';
1806
2049
  if (that.unicode) result += 'u';
2050
+ if (that.unicodeSets) result += 'v';
1807
2051
  if (that.sticky) result += 'y';
1808
2052
  return result;
1809
2053
  };
1810
2054
 
1811
- var fails$5 = fails$g;
1812
- var global$6 = global$w;
2055
+ var fails$4 = fails$h;
2056
+ var global$3 = global$f;
1813
2057
 
1814
2058
  // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
1815
- var $RegExp$2 = global$6.RegExp;
2059
+ var $RegExp$2 = global$3.RegExp;
1816
2060
 
1817
- var UNSUPPORTED_Y$1 = fails$5(function () {
2061
+ var UNSUPPORTED_Y$1 = fails$4(function () {
1818
2062
  var re = $RegExp$2('a', 'y');
1819
2063
  re.lastIndex = 2;
1820
2064
  return re.exec('abcd') != null;
@@ -1822,11 +2066,11 @@ var UNSUPPORTED_Y$1 = fails$5(function () {
1822
2066
 
1823
2067
  // UC Browser bug
1824
2068
  // https://github.com/zloirock/core-js/issues/1008
1825
- var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$5(function () {
2069
+ var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$4(function () {
1826
2070
  return !$RegExp$2('a', 'y').sticky;
1827
2071
  });
1828
2072
 
1829
- var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$5(function () {
2073
+ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$4(function () {
1830
2074
  // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
1831
2075
  var re = $RegExp$2('^r', 'gy');
1832
2076
  re.lastIndex = 2;
@@ -1839,24 +2083,24 @@ var regexpStickyHelpers = {
1839
2083
  UNSUPPORTED_Y: UNSUPPORTED_Y$1
1840
2084
  };
1841
2085
 
1842
- var fails$4 = fails$g;
1843
- var global$5 = global$w;
2086
+ var fails$3 = fails$h;
2087
+ var global$2 = global$f;
1844
2088
 
1845
2089
  // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
1846
- var $RegExp$1 = global$5.RegExp;
2090
+ var $RegExp$1 = global$2.RegExp;
1847
2091
 
1848
- var regexpUnsupportedDotAll = fails$4(function () {
2092
+ var regexpUnsupportedDotAll = fails$3(function () {
1849
2093
  var re = $RegExp$1('.', 's');
1850
2094
  return !(re.dotAll && re.exec('\n') && re.flags === 's');
1851
2095
  });
1852
2096
 
1853
- var fails$3 = fails$g;
1854
- var global$4 = global$w;
2097
+ var fails$2 = fails$h;
2098
+ var global$1 = global$f;
1855
2099
 
1856
2100
  // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
1857
- var $RegExp = global$4.RegExp;
2101
+ var $RegExp = global$1.RegExp;
1858
2102
 
1859
- var regexpUnsupportedNcg = fails$3(function () {
2103
+ var regexpUnsupportedNcg = fails$2(function () {
1860
2104
  var re = $RegExp('(?<a>b)', 'g');
1861
2105
  return re.exec('b').groups.a !== 'b' ||
1862
2106
  'b'.replace(re, '$<a>c') !== 'bc';
@@ -1865,7 +2109,7 @@ var regexpUnsupportedNcg = fails$3(function () {
1865
2109
  /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
1866
2110
  /* eslint-disable regexp/no-useless-quantifier -- testing */
1867
2111
  var call$3 = functionCall;
1868
- var uncurryThis$4 = functionUncurryThis;
2112
+ var uncurryThis$5 = functionUncurryThis;
1869
2113
  var toString$2 = toString$3;
1870
2114
  var regexpFlags = regexpFlags$1;
1871
2115
  var stickyHelpers = regexpStickyHelpers;
@@ -1878,10 +2122,10 @@ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
1878
2122
  var nativeReplace = shared('native-string-replace', String.prototype.replace);
1879
2123
  var nativeExec = RegExp.prototype.exec;
1880
2124
  var patchedExec = nativeExec;
1881
- var charAt$3 = uncurryThis$4(''.charAt);
1882
- var indexOf = uncurryThis$4(''.indexOf);
1883
- var replace$1 = uncurryThis$4(''.replace);
1884
- var stringSlice$3 = uncurryThis$4(''.slice);
2125
+ var charAt$3 = uncurryThis$5(''.charAt);
2126
+ var indexOf = uncurryThis$5(''.indexOf);
2127
+ var replace$1 = uncurryThis$5(''.replace);
2128
+ var stringSlice$3 = uncurryThis$5(''.slice);
1885
2129
 
1886
2130
  var UPDATES_LAST_INDEX_WRONG = (function () {
1887
2131
  var re1 = /a/;
@@ -1957,7 +2201,7 @@ if (PATCH) {
1957
2201
  }
1958
2202
  if (NPCG_INCLUDED && match && match.length > 1) {
1959
2203
  // Fix browsers whose `exec` methods don't consistently return `undefined`
1960
- // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
2204
+ // for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
1961
2205
  call$3(nativeReplace, match[0], reCopy, function () {
1962
2206
  for (i = 1; i < arguments.length - 2; i++) {
1963
2207
  if (arguments[i] === undefined) match[i] = undefined;
@@ -1979,12 +2223,12 @@ if (PATCH) {
1979
2223
 
1980
2224
  var regexpExec$2 = patchedExec;
1981
2225
 
1982
- var $$1 = _export;
2226
+ var $ = _export;
1983
2227
  var exec = regexpExec$2;
1984
2228
 
1985
2229
  // `RegExp.prototype.exec` method
1986
2230
  // https://tc39.es/ecma262/#sec-regexp.prototype.exec
1987
- $$1({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
2231
+ $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
1988
2232
  exec: exec
1989
2233
  });
1990
2234
 
@@ -1999,14 +2243,24 @@ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND
1999
2243
  return call$2.apply(apply$1, arguments);
2000
2244
  });
2001
2245
 
2246
+ var classofRaw = classofRaw$2;
2247
+ var uncurryThis$4 = functionUncurryThis;
2248
+
2249
+ var functionUncurryThisClause = function (fn) {
2250
+ // Nashorn bug:
2251
+ // https://github.com/zloirock/core-js/issues/1128
2252
+ // https://github.com/zloirock/core-js/issues/1130
2253
+ if (classofRaw(fn) === 'Function') return uncurryThis$4(fn);
2254
+ };
2255
+
2002
2256
  // TODO: Remove from `core-js@4` since it's moved to entry points
2003
2257
 
2004
- var uncurryThis$3 = functionUncurryThis;
2005
- var redefine = redefine$4.exports;
2258
+ var uncurryThis$3 = functionUncurryThisClause;
2259
+ var defineBuiltIn = defineBuiltIn$4;
2006
2260
  var regexpExec$1 = regexpExec$2;
2007
- var fails$2 = fails$g;
2261
+ var fails$1 = fails$h;
2008
2262
  var wellKnownSymbol$1 = wellKnownSymbol$a;
2009
- var createNonEnumerableProperty = createNonEnumerableProperty$6;
2263
+ var createNonEnumerableProperty = createNonEnumerableProperty$5;
2010
2264
 
2011
2265
  var SPECIES = wellKnownSymbol$1('species');
2012
2266
  var RegExpPrototype = RegExp.prototype;
@@ -2014,14 +2268,14 @@ var RegExpPrototype = RegExp.prototype;
2014
2268
  var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2015
2269
  var SYMBOL = wellKnownSymbol$1(KEY);
2016
2270
 
2017
- var DELEGATES_TO_SYMBOL = !fails$2(function () {
2271
+ var DELEGATES_TO_SYMBOL = !fails$1(function () {
2018
2272
  // String methods call symbol-named RegEp methods
2019
2273
  var O = {};
2020
2274
  O[SYMBOL] = function () { return 7; };
2021
2275
  return ''[KEY](O) != 7;
2022
2276
  });
2023
2277
 
2024
- var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$2(function () {
2278
+ var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$1(function () {
2025
2279
  // Symbol-named RegExp methods call .exec
2026
2280
  var execCalled = false;
2027
2281
  var re = /a/;
@@ -2066,8 +2320,8 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
2066
2320
  return { done: false };
2067
2321
  });
2068
2322
 
2069
- redefine(String.prototype, KEY, methods[0]);
2070
- redefine(RegExpPrototype, SYMBOL, methods[1]);
2323
+ defineBuiltIn(String.prototype, KEY, methods[0]);
2324
+ defineBuiltIn(RegExpPrototype, SYMBOL, methods[1]);
2071
2325
  }
2072
2326
 
2073
2327
  if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
@@ -2082,7 +2336,7 @@ var charAt$2 = uncurryThis$2(''.charAt);
2082
2336
  var charCodeAt = uncurryThis$2(''.charCodeAt);
2083
2337
  var stringSlice$2 = uncurryThis$2(''.slice);
2084
2338
 
2085
- var createMethod$1 = function (CONVERT_TO_STRING) {
2339
+ var createMethod = function (CONVERT_TO_STRING) {
2086
2340
  return function ($this, pos) {
2087
2341
  var S = toString$1(requireObjectCoercible$1($this));
2088
2342
  var position = toIntegerOrInfinity$1(pos);
@@ -2104,10 +2358,10 @@ var createMethod$1 = function (CONVERT_TO_STRING) {
2104
2358
  var stringMultibyte = {
2105
2359
  // `String.prototype.codePointAt` method
2106
2360
  // https://tc39.es/ecma262/#sec-string.prototype.codepointat
2107
- codeAt: createMethod$1(false),
2361
+ codeAt: createMethod(false),
2108
2362
  // `String.prototype.at` method
2109
2363
  // https://github.com/mathiasbynens/String.prototype.at
2110
- charAt: createMethod$1(true)
2364
+ charAt: createMethod(true)
2111
2365
  };
2112
2366
 
2113
2367
  var charAt$1 = stringMultibyte.charAt;
@@ -2119,7 +2373,7 @@ var advanceStringIndex$1 = function (S, index, unicode) {
2119
2373
  };
2120
2374
 
2121
2375
  var uncurryThis$1 = functionUncurryThis;
2122
- var toObject$1 = toObject$5;
2376
+ var toObject = toObject$5;
2123
2377
 
2124
2378
  var floor = Math.floor;
2125
2379
  var charAt = uncurryThis$1(''.charAt);
@@ -2135,7 +2389,7 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2135
2389
  var m = captures.length;
2136
2390
  var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
2137
2391
  if (namedCaptures !== undefined) {
2138
- namedCaptures = toObject$1(namedCaptures);
2392
+ namedCaptures = toObject(namedCaptures);
2139
2393
  symbols = SUBSTITUTION_SYMBOLS;
2140
2394
  }
2141
2395
  return replace(replacement, symbols, function (match, ch) {
@@ -2163,14 +2417,13 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
2163
2417
  });
2164
2418
  };
2165
2419
 
2166
- var global$3 = global$w;
2167
2420
  var call$1 = functionCall;
2168
2421
  var anObject$1 = anObject$8;
2169
- var isCallable$1 = isCallable$g;
2170
- var classof$1 = classofRaw$1;
2422
+ var isCallable$1 = isCallable$h;
2423
+ var classof = classofRaw$2;
2171
2424
  var regexpExec = regexpExec$2;
2172
2425
 
2173
- var TypeError$2 = global$3.TypeError;
2426
+ var $TypeError = TypeError;
2174
2427
 
2175
2428
  // `RegExpExec` abstract operation
2176
2429
  // https://tc39.es/ecma262/#sec-regexpexec
@@ -2181,17 +2434,18 @@ var regexpExecAbstract = function (R, S) {
2181
2434
  if (result !== null) anObject$1(result);
2182
2435
  return result;
2183
2436
  }
2184
- if (classof$1(R) === 'RegExp') return call$1(regexpExec, R, S);
2185
- throw TypeError$2('RegExp#exec called on incompatible receiver');
2437
+ if (classof(R) === 'RegExp') return call$1(regexpExec, R, S);
2438
+ throw $TypeError('RegExp#exec called on incompatible receiver');
2186
2439
  };
2187
2440
 
2188
2441
  var apply = functionApply;
2189
2442
  var call = functionCall;
2190
2443
  var uncurryThis = functionUncurryThis;
2191
2444
  var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
2192
- var fails$1 = fails$g;
2445
+ var fails = fails$h;
2193
2446
  var anObject = anObject$8;
2194
- var isCallable = isCallable$g;
2447
+ var isCallable = isCallable$h;
2448
+ var isNullOrUndefined = isNullOrUndefined$3;
2195
2449
  var toIntegerOrInfinity = toIntegerOrInfinity$4;
2196
2450
  var toLength = toLength$2;
2197
2451
  var toString = toString$3;
@@ -2229,7 +2483,7 @@ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
2229
2483
  return false;
2230
2484
  })();
2231
2485
 
2232
- var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$1(function () {
2486
+ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
2233
2487
  var re = /./;
2234
2488
  re.exec = function () {
2235
2489
  var result = [];
@@ -2249,7 +2503,7 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
2249
2503
  // https://tc39.es/ecma262/#sec-string.prototype.replace
2250
2504
  function replace(searchValue, replaceValue) {
2251
2505
  var O = requireObjectCoercible(this);
2252
- var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);
2506
+ var replacer = isNullOrUndefined(searchValue) ? undefined : getMethod(searchValue, REPLACE);
2253
2507
  return replacer
2254
2508
  ? call(replacer, searchValue, O, replaceValue)
2255
2509
  : call(nativeReplace, toString(O), searchValue, replaceValue);
@@ -2328,14 +2582,14 @@ const MergeTag = ({
2328
2582
  loading,
2329
2583
  profile
2330
2584
  } = useProfile();
2331
-
2332
2585
  if (loading || !profile) {
2333
2586
  return null;
2334
2587
  }
2335
-
2336
- const value = get$1(profile, id.replace(/_/g, '.')); // DON'T CHANGE
2337
-
2338
- return /*#__PURE__*/React.createElement(React.Fragment, null, value);
2588
+ const value = get$1(profile, id.replace(/_/g, '.'));
2589
+ // DON'T CHANGE
2590
+ return jsx(Fragment, {
2591
+ children: value
2592
+ });
2339
2593
  };
2340
2594
 
2341
2595
  const TrackExperience = ({
@@ -2357,105 +2611,37 @@ const TrackExperience = ({
2357
2611
  experience,
2358
2612
  profile
2359
2613
  });
2360
- ninetailed.trackExperience({
2361
- experience,
2362
- component: variant,
2363
- variant: distribution.index
2614
+ ninetailed.trackHasSeenExperience({
2615
+ experience: {
2616
+ id: experience.id,
2617
+ type: experience.type,
2618
+ name: '',
2619
+ description: ''
2620
+ },
2621
+ audience: experience.audience,
2622
+ selectedVariant: variant,
2623
+ selectedVariantIndex: distribution.index
2364
2624
  });
2365
2625
  }
2366
2626
  }, [inView]);
2367
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
2368
- ref: ref,
2369
- id: "nt-experience-handle"
2370
- }), children);
2371
- };
2372
-
2373
- var global$2 = global$w;
2374
- var aCallable = aCallable$2;
2375
- var toObject = toObject$5;
2376
- var IndexedObject = indexedObject;
2377
- var lengthOfArrayLike = lengthOfArrayLike$2;
2378
-
2379
- var TypeError$1 = global$2.TypeError;
2380
-
2381
- // `Array.prototype.{ reduce, reduceRight }` methods implementation
2382
- var createMethod = function (IS_RIGHT) {
2383
- return function (that, callbackfn, argumentsLength, memo) {
2384
- aCallable(callbackfn);
2385
- var O = toObject(that);
2386
- var self = IndexedObject(O);
2387
- var length = lengthOfArrayLike(O);
2388
- var index = IS_RIGHT ? length - 1 : 0;
2389
- var i = IS_RIGHT ? -1 : 1;
2390
- if (argumentsLength < 2) while (true) {
2391
- if (index in self) {
2392
- memo = self[index];
2393
- index += i;
2394
- break;
2395
- }
2396
- index += i;
2397
- if (IS_RIGHT ? index < 0 : length <= index) {
2398
- throw TypeError$1('Reduce of empty array with no initial value');
2399
- }
2400
- }
2401
- for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {
2402
- memo = callbackfn(memo, self[index], index, O);
2403
- }
2404
- return memo;
2405
- };
2406
- };
2407
-
2408
- var arrayReduce = {
2409
- // `Array.prototype.reduce` method
2410
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
2411
- left: createMethod(false),
2412
- // `Array.prototype.reduceRight` method
2413
- // https://tc39.es/ecma262/#sec-array.prototype.reduceright
2414
- right: createMethod(true)
2415
- };
2416
-
2417
- var fails = fails$g;
2418
-
2419
- var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
2420
- var method = [][METHOD_NAME];
2421
- return !!method && fails(function () {
2422
- // eslint-disable-next-line no-useless-call -- required for testing
2423
- method.call(null, argument || function () { return 1; }, 1);
2627
+ return jsxs(Fragment, {
2628
+ children: [jsx("div", {
2629
+ ref: ref,
2630
+ id: "nt-experience-handle"
2631
+ }), children]
2424
2632
  });
2425
2633
  };
2426
2634
 
2427
- var classof = classofRaw$1;
2428
- var global$1 = global$w;
2429
-
2430
- var engineIsNode = classof(global$1.process) == 'process';
2431
-
2432
- var $ = _export;
2433
- var $reduce = arrayReduce.left;
2434
- var arrayMethodIsStrict = arrayMethodIsStrict$1;
2435
- var CHROME_VERSION = engineV8Version;
2436
- var IS_NODE = engineIsNode;
2437
-
2438
- var STRICT_METHOD = arrayMethodIsStrict('reduce');
2439
- // Chrome 80-82 has a critical bug
2440
- // https://bugs.chromium.org/p/chromium/issues/detail?id=1049982
2441
- var CHROME_BUG = !IS_NODE && CHROME_VERSION > 79 && CHROME_VERSION < 83;
2442
-
2443
- // `Array.prototype.reduce` method
2444
- // https://tc39.es/ecma262/#sec-array.prototype.reduce
2445
- $({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {
2446
- reduce: function reduce(callbackfn /* , initialValue */) {
2447
- var length = arguments.length;
2448
- return $reduce(this, callbackfn, length, length > 1 ? arguments[1] : undefined);
2449
- }
2450
- });
2451
-
2452
- const useExperiments = () => {
2635
+ const useExperimentsContext = () => {
2453
2636
  const context = useContext(ExperimentsContext);
2454
-
2455
2637
  if (context === undefined) {
2456
2638
  throw new Error('The component using the the context must be a descendant of the ExperimentsProvider');
2457
2639
  }
2640
+ return context;
2641
+ };
2458
2642
 
2643
+ const useExperiments = () => {
2644
+ const context = useExperimentsContext();
2459
2645
  return {
2460
2646
  experiments: context.experiments
2461
2647
  };
@@ -2485,41 +2671,38 @@ const useExperience = ({
2485
2671
  isPersonalized: false,
2486
2672
  profile: null
2487
2673
  });
2488
-
2489
2674
  if (status === 'loading') {
2675
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2490
2676
  // @ts-ignore
2491
2677
  return emptyReturn;
2492
2678
  }
2493
-
2494
2679
  if (status === 'error') {
2680
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2495
2681
  // @ts-ignore
2496
2682
  return emptyReturn;
2497
2683
  }
2498
-
2499
2684
  if (!profile) {
2685
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2500
2686
  // @ts-ignore
2501
2687
  return emptyReturn;
2502
2688
  }
2503
-
2504
2689
  const activeExperiments = selectActiveExperiments(experiments, profile);
2505
2690
  const experience = selectExperience({
2506
2691
  experiences,
2507
2692
  activeExperiments,
2508
2693
  profile
2509
2694
  });
2510
-
2511
2695
  if (!experience) {
2696
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
2512
2697
  // @ts-ignore
2513
2698
  return emptyReturn;
2514
2699
  }
2515
-
2516
2700
  const audience = experience.audience;
2517
2701
  const variant = selectExperienceVariant({
2518
2702
  baseline,
2519
2703
  experience,
2520
2704
  profile
2521
2705
  });
2522
-
2523
2706
  if (!variant) {
2524
2707
  return Object.assign(Object.assign({}, baseReturn), {
2525
2708
  status: 'success',
@@ -2532,7 +2715,6 @@ const useExperience = ({
2532
2715
  isPersonalized: false
2533
2716
  });
2534
2717
  }
2535
-
2536
2718
  return Object.assign(Object.assign({}, baseReturn), {
2537
2719
  status: 'success',
2538
2720
  loading: false,
@@ -2545,38 +2727,18 @@ const useExperience = ({
2545
2727
  });
2546
2728
  };
2547
2729
 
2548
- const EXPERIENCE_TRAIT_PREFIX = 'nt_experiment_';
2549
-
2550
- const useJoinExperiment = ({
2551
- experiences
2552
- }) => {
2553
- const {
2554
- identify
2555
- } = useNinetailed(); // TODO this gets called twice
2556
-
2557
- return useCallback(({
2558
- experiment,
2559
- profile
2560
- }) => {
2561
- const activeExperiments = selectActiveExperiments(experiences, profile);
2562
-
2563
- if (!activeExperiments.length && experiment.type === 'nt_experiment') {
2564
- identify(profile.id, {
2565
- [`${EXPERIENCE_TRAIT_PREFIX}${experiment.id}`]: true
2566
- });
2567
- }
2568
- }, [experiences]);
2730
+ const useJoinExperiment = () => {
2731
+ const context = useExperimentsContext();
2732
+ return context.joinExperiment;
2569
2733
  };
2570
2734
 
2571
2735
  const DefaultExperienceLoadingComponent = _a => {
2572
2736
  var {
2573
- component: Component,
2574
- experiences,
2575
- unhideAfterMs = 5000,
2576
- passthroughProps
2577
- } = _a,
2578
- baseline = __rest(_a, ["component", "experiences", "unhideAfterMs", "passthroughProps"]);
2579
-
2737
+ component: Component,
2738
+ unhideAfterMs = 5000,
2739
+ passthroughProps
2740
+ } = _a,
2741
+ baseline = __rest(_a, ["component", "unhideAfterMs", "passthroughProps"]);
2580
2742
  const {
2581
2743
  logger
2582
2744
  } = useNinetailed();
@@ -2590,24 +2752,23 @@ const DefaultExperienceLoadingComponent = _a => {
2590
2752
  clearTimeout(timer);
2591
2753
  };
2592
2754
  }, []);
2593
-
2594
2755
  if (hidden) {
2595
- return /*#__PURE__*/React.createElement("div", {
2596
- key: "hide",
2756
+ return jsx("div", Object.assign({
2597
2757
  style: {
2598
2758
  opacity: 0
2599
2759
  }
2600
- }, /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline, {
2601
- ninetailed: {
2602
- isPersonalized: false,
2603
- audience: {
2604
- id: 'baseline'
2760
+ }, {
2761
+ children: jsx(Component, Object.assign({}, passthroughProps, baseline, {
2762
+ ninetailed: {
2763
+ isPersonalized: false,
2764
+ audience: {
2765
+ id: 'baseline'
2766
+ }
2605
2767
  }
2606
- }
2607
- })));
2768
+ }))
2769
+ }), "hide");
2608
2770
  }
2609
-
2610
- return /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline, {
2771
+ return jsx(Component, Object.assign({}, passthroughProps, baseline, {
2611
2772
  ninetailed: {
2612
2773
  isPersonalized: false,
2613
2774
  audience: {
@@ -2618,13 +2779,12 @@ const DefaultExperienceLoadingComponent = _a => {
2618
2779
  };
2619
2780
  const Experience = _a => {
2620
2781
  var {
2621
- experiences,
2622
- component: Component,
2623
- loadingComponent: LoadingComponent = DefaultExperienceLoadingComponent,
2624
- passthroughProps
2625
- } = _a,
2626
- baseline = __rest(_a, ["experiences", "component", "loadingComponent", "passthroughProps"]);
2627
-
2782
+ experiences,
2783
+ component: Component,
2784
+ loadingComponent: LoadingComponent = DefaultExperienceLoadingComponent,
2785
+ passthroughProps
2786
+ } = _a,
2787
+ baseline = __rest(_a, ["experiences", "component", "loadingComponent", "passthroughProps"]);
2628
2788
  const {
2629
2789
  status,
2630
2790
  hasVariants,
@@ -2637,32 +2797,28 @@ const Experience = _a => {
2637
2797
  baseline,
2638
2798
  experiences
2639
2799
  });
2640
- const joinExperiment = useJoinExperiment({
2641
- experiences
2642
- });
2800
+ const joinExperiment = useJoinExperiment();
2643
2801
  useEffect(() => {
2644
2802
  if (status === 'success' && experience && profile) {
2645
2803
  joinExperiment({
2804
+ experiences,
2646
2805
  experiment: experience,
2647
2806
  profile
2648
2807
  });
2649
2808
  }
2650
2809
  }, [status, experience, profile]);
2651
-
2652
2810
  if (!hasVariants) {
2653
- return /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline));
2811
+ return jsx(Component, Object.assign({}, passthroughProps, baseline));
2654
2812
  }
2655
-
2656
2813
  if (status === 'loading') {
2657
- return /*#__PURE__*/React.createElement(LoadingComponent, Object.assign({}, baseline, {
2814
+ return jsx(LoadingComponent, Object.assign({}, baseline, {
2658
2815
  passthroughProps: passthroughProps,
2659
2816
  experiences: experiences,
2660
2817
  component: Component
2661
2818
  }));
2662
2819
  }
2663
-
2664
2820
  if (!experience) {
2665
- return /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline, {
2821
+ return /*#__PURE__*/createElement$1(Component, Object.assign({}, passthroughProps, baseline, {
2666
2822
  key: baseline.id,
2667
2823
  ninetailed: {
2668
2824
  isPersonalized: false,
@@ -2672,38 +2828,40 @@ const Experience = _a => {
2672
2828
  }
2673
2829
  }));
2674
2830
  }
2675
-
2676
2831
  if (!variant) {
2677
- return /*#__PURE__*/React.createElement(TrackExperience, {
2832
+ return jsx(TrackExperience, Object.assign({
2678
2833
  experience: experience,
2679
2834
  variant: baseline,
2680
2835
  // the profile is definitely defined, otherwise there wouldn't be an experience selected
2681
2836
  profile: profile
2682
- }, /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline, {
2683
- key: baseline.id,
2684
- ninetailed: {
2685
- isPersonalized: false,
2686
- audience: {
2687
- id: (audience === null || audience === void 0 ? void 0 : audience.id) || 'all visitors'
2837
+ }, {
2838
+ children: /*#__PURE__*/createElement$1(Component, Object.assign({}, passthroughProps, baseline, {
2839
+ key: baseline.id,
2840
+ ninetailed: {
2841
+ isPersonalized: false,
2842
+ audience: {
2843
+ id: (audience === null || audience === void 0 ? void 0 : audience.id) || 'all visitors'
2844
+ }
2688
2845
  }
2689
- }
2690
- })));
2846
+ }))
2847
+ }));
2691
2848
  }
2692
-
2693
- return /*#__PURE__*/React.createElement(TrackExperience, {
2849
+ return jsx(TrackExperience, Object.assign({
2694
2850
  experience: experience,
2695
2851
  variant: variant,
2696
2852
  // the profile is definitely defined, otherwise there wouldn't be an experience selected
2697
2853
  profile: profile
2698
- }, (variant === null || variant === void 0 ? void 0 : variant.hidden) ? null : /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, variant, {
2699
- key: `${experience.id}-${variant.id}`,
2700
- ninetailed: {
2701
- isPersonalized,
2702
- audience: {
2703
- id: (audience === null || audience === void 0 ? void 0 : audience.id) || 'all visitors'
2854
+ }, {
2855
+ children: 'hidden' in variant && variant.hidden ? null : /*#__PURE__*/createElement$1(Component, Object.assign({}, Object.assign(Object.assign({}, passthroughProps), variant), {
2856
+ key: `${experience.id}-${variant.id}`,
2857
+ ninetailed: {
2858
+ isPersonalized,
2859
+ audience: {
2860
+ id: (audience === null || audience === void 0 ? void 0 : audience.id) || 'all visitors'
2861
+ }
2704
2862
  }
2705
- }
2706
- })));
2863
+ }))
2864
+ }));
2707
2865
  };
2708
2866
 
2709
2867
  const ESRContext = /*#__PURE__*/React.createContext(undefined);
@@ -2711,38 +2869,36 @@ const ESRProvider = ({
2711
2869
  experienceVariantsMap,
2712
2870
  children
2713
2871
  }) => {
2714
- return /*#__PURE__*/React.createElement(ESRContext.Provider, {
2872
+ return jsx(ESRContext.Provider, Object.assign({
2715
2873
  value: {
2716
2874
  experienceVariantsMap
2717
2875
  }
2718
- }, children);
2876
+ }, {
2877
+ children: children
2878
+ }));
2719
2879
  };
2720
2880
  const useESR = () => {
2721
2881
  const context = React.useContext(ESRContext);
2722
-
2723
2882
  if (context === undefined) {
2724
2883
  throw new Error('The component using the the context must be a descendant of the ESRProvider');
2725
2884
  }
2726
-
2727
2885
  return {
2728
2886
  experienceVariantsMap: context.experienceVariantsMap
2729
2887
  };
2730
2888
  };
2731
2889
  const ESRLoadingComponent = _a => {
2732
2890
  var {
2733
- experiences,
2734
- component: Component,
2735
- passthroughProps
2736
- } = _a,
2737
- baseline = __rest(_a, ["experiences", "component", "passthroughProps"]);
2738
-
2891
+ experiences,
2892
+ component: Component,
2893
+ passthroughProps
2894
+ } = _a,
2895
+ baseline = __rest(_a, ["experiences", "component", "passthroughProps"]);
2739
2896
  const {
2740
2897
  experienceVariantsMap
2741
2898
  } = useESR();
2742
2899
  const experience = experiences.find(experience => has$1(experienceVariantsMap, experience.id));
2743
-
2744
2900
  if (!experience) {
2745
- return /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline, {
2901
+ return jsx(Component, Object.assign({}, passthroughProps, baseline, {
2746
2902
  ninetailed: {
2747
2903
  isPersonalized: false,
2748
2904
  audience: {
@@ -2751,11 +2907,9 @@ const ESRLoadingComponent = _a => {
2751
2907
  }
2752
2908
  }));
2753
2909
  }
2754
-
2755
2910
  const component = experience.components.find(component => component.baseline.id === baseline.id);
2756
-
2757
2911
  if (!component) {
2758
- return /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline, {
2912
+ return jsx(Component, Object.assign({}, passthroughProps, baseline, {
2759
2913
  ninetailed: {
2760
2914
  isPersonalized: false,
2761
2915
  audience: {
@@ -2764,9 +2918,8 @@ const ESRLoadingComponent = _a => {
2764
2918
  }
2765
2919
  }));
2766
2920
  }
2767
-
2768
2921
  if (experienceVariantsMap[experience.id] === 0) {
2769
- return /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline, {
2922
+ return jsx(Component, Object.assign({}, passthroughProps, baseline, {
2770
2923
  ninetailed: {
2771
2924
  isPersonalized: false,
2772
2925
  audience: {
@@ -2775,11 +2928,9 @@ const ESRLoadingComponent = _a => {
2775
2928
  }
2776
2929
  }));
2777
2930
  }
2778
-
2779
2931
  const variant = component.variants[experienceVariantsMap[experience.id] - 1];
2780
-
2781
2932
  if (!variant) {
2782
- return /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, baseline, {
2933
+ return jsx(Component, Object.assign({}, passthroughProps, baseline, {
2783
2934
  ninetailed: {
2784
2935
  isPersonalized: false,
2785
2936
  audience: {
@@ -2788,8 +2939,7 @@ const ESRLoadingComponent = _a => {
2788
2939
  }
2789
2940
  }));
2790
2941
  }
2791
-
2792
- return /*#__PURE__*/React.createElement(Component, Object.assign({}, passthroughProps, variant, {
2942
+ return jsx(Component, Object.assign({}, passthroughProps, variant, {
2793
2943
  ninetailed: {
2794
2944
  isPersonalized: false,
2795
2945
  audience: {
@@ -2799,4 +2949,4 @@ const ESRLoadingComponent = _a => {
2799
2949
  }));
2800
2950
  };
2801
2951
 
2802
- export { DefaultExperienceLoadingComponent, ESRLoadingComponent, ESRProvider, Experience, MergeTag, NinetailedProvider, Personalize, TrackHasSeenComponent, useNinetailed, usePersonalize, useProfile };
2952
+ export { DefaultExperienceLoadingComponent, ESRLoadingComponent, ESRProvider, Experience, ExperimentsProvider, MergeTag, NinetailedProvider, Personalize, TrackExperience, TrackHasSeenComponent, useExperience, useExperiments, useJoinExperiment, useNinetailed, usePersonalize, useProfile };