@ninetailed/experience.js-react 5.0.0-beta.3 → 6.0.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs +303 -408
- package/index.js +308 -412
- package/lib/Experience/ComponentMarker.d.ts +2 -0
- package/lib/Experience/index.d.ts +0 -1
- package/lib/Experience/useExperience.d.ts +9 -6
- package/lib/Experience/useExperienceSelectionMiddleware.d.ts +3 -2
- package/lib/NinetailedProvider.d.ts +1 -0
- package/lib/index.d.ts +1 -2
- package/lib/useProfile.d.ts +8 -1
- package/package.json +5 -5
- package/lib/Experience/TrackExperience.d.ts +0 -12
- package/lib/RenderPlugin/ComponentWrapper.d.ts +0 -9
- package/lib/RenderPlugin/RenderPlugin.d.ts +0 -13
package/index.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { jsxs, Fragment
|
|
2
|
-
import React, { createContext, useContext,
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import React, { createContext, useContext, useState, useRef, useEffect, useMemo, forwardRef, createElement as createElement$1, useCallback } from 'react';
|
|
3
|
+
import { makeExperienceSelectMiddleware, selectHasExperienceVariants, selectActiveExperiments, selectExperience, selectExperienceVariant, Ninetailed, selectVariant } from '@ninetailed/experience.js';
|
|
4
|
+
import { isForwardRef } from 'react-is';
|
|
5
|
+
import { logger, isBrowser } from '@ninetailed/experience.js-shared';
|
|
6
6
|
import { isEqual, debounce as debounce$1, get as get$1 } from 'radash';
|
|
7
|
+
import { useInView } from 'react-intersection-observer';
|
|
7
8
|
|
|
8
9
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
9
10
|
|
|
@@ -12,7 +13,7 @@ var check = function (it) {
|
|
|
12
13
|
};
|
|
13
14
|
|
|
14
15
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
15
|
-
var global$
|
|
16
|
+
var global$c =
|
|
16
17
|
// eslint-disable-next-line es/no-global-this -- safe
|
|
17
18
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
18
19
|
check(typeof window == 'object' && window) ||
|
|
@@ -94,30 +95,30 @@ var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
|
|
|
94
95
|
};
|
|
95
96
|
};
|
|
96
97
|
|
|
97
|
-
var uncurryThis$
|
|
98
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
98
99
|
|
|
99
|
-
var toString$
|
|
100
|
-
var stringSlice
|
|
100
|
+
var toString$1 = uncurryThis$9({}.toString);
|
|
101
|
+
var stringSlice = uncurryThis$9(''.slice);
|
|
101
102
|
|
|
102
|
-
var classofRaw
|
|
103
|
-
return stringSlice
|
|
103
|
+
var classofRaw = function (it) {
|
|
104
|
+
return stringSlice(toString$1(it), 8, -1);
|
|
104
105
|
};
|
|
105
106
|
|
|
106
|
-
var uncurryThis$
|
|
107
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
107
108
|
var fails$9 = fails$c;
|
|
108
|
-
var classof$
|
|
109
|
+
var classof$1 = classofRaw;
|
|
109
110
|
|
|
110
|
-
var $Object$
|
|
111
|
-
var split = uncurryThis$
|
|
111
|
+
var $Object$3 = Object;
|
|
112
|
+
var split = uncurryThis$8(''.split);
|
|
112
113
|
|
|
113
114
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
114
115
|
var indexedObject = fails$9(function () {
|
|
115
116
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
116
117
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
117
|
-
return !$Object$
|
|
118
|
+
return !$Object$3('z').propertyIsEnumerable(0);
|
|
118
119
|
}) ? function (it) {
|
|
119
|
-
return classof$
|
|
120
|
-
} : $Object$
|
|
120
|
+
return classof$1(it) == 'String' ? split(it, '') : $Object$3(it);
|
|
121
|
+
} : $Object$3;
|
|
121
122
|
|
|
122
123
|
// we can't use just `it == null` since of `document.all` special case
|
|
123
124
|
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
@@ -160,47 +161,47 @@ var documentAll$1 = $documentAll$1.all;
|
|
|
160
161
|
|
|
161
162
|
// `IsCallable` abstract operation
|
|
162
163
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
163
|
-
var isCallable$
|
|
164
|
+
var isCallable$e = $documentAll$1.IS_HTMLDDA ? function (argument) {
|
|
164
165
|
return typeof argument == 'function' || argument === documentAll$1;
|
|
165
166
|
} : function (argument) {
|
|
166
167
|
return typeof argument == 'function';
|
|
167
168
|
};
|
|
168
169
|
|
|
169
|
-
var isCallable$
|
|
170
|
+
var isCallable$d = isCallable$e;
|
|
170
171
|
var $documentAll = documentAll_1;
|
|
171
172
|
|
|
172
173
|
var documentAll = $documentAll.all;
|
|
173
174
|
|
|
174
175
|
var isObject$6 = $documentAll.IS_HTMLDDA ? function (it) {
|
|
175
|
-
return typeof it == 'object' ? it !== null : isCallable$
|
|
176
|
+
return typeof it == 'object' ? it !== null : isCallable$d(it) || it === documentAll;
|
|
176
177
|
} : function (it) {
|
|
177
|
-
return typeof it == 'object' ? it !== null : isCallable$
|
|
178
|
+
return typeof it == 'object' ? it !== null : isCallable$d(it);
|
|
178
179
|
};
|
|
179
180
|
|
|
180
|
-
var global$
|
|
181
|
-
var isCallable$
|
|
181
|
+
var global$b = global$c;
|
|
182
|
+
var isCallable$c = isCallable$e;
|
|
182
183
|
|
|
183
184
|
var aFunction = function (argument) {
|
|
184
|
-
return isCallable$
|
|
185
|
+
return isCallable$c(argument) ? argument : undefined;
|
|
185
186
|
};
|
|
186
187
|
|
|
187
188
|
var getBuiltIn$4 = function (namespace, method) {
|
|
188
|
-
return arguments.length < 2 ? aFunction(global$
|
|
189
|
+
return arguments.length < 2 ? aFunction(global$b[namespace]) : global$b[namespace] && global$b[namespace][method];
|
|
189
190
|
};
|
|
190
191
|
|
|
191
|
-
var uncurryThis$
|
|
192
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
192
193
|
|
|
193
|
-
var objectIsPrototypeOf = uncurryThis$
|
|
194
|
+
var objectIsPrototypeOf = uncurryThis$7({}.isPrototypeOf);
|
|
194
195
|
|
|
195
196
|
var getBuiltIn$3 = getBuiltIn$4;
|
|
196
197
|
|
|
197
198
|
var engineUserAgent = getBuiltIn$3('navigator', 'userAgent') || '';
|
|
198
199
|
|
|
199
|
-
var global$
|
|
200
|
+
var global$a = global$c;
|
|
200
201
|
var userAgent = engineUserAgent;
|
|
201
202
|
|
|
202
|
-
var process = global$
|
|
203
|
-
var Deno = global$
|
|
203
|
+
var process = global$a.process;
|
|
204
|
+
var Deno = global$a.Deno;
|
|
204
205
|
var versions = process && process.versions || Deno && Deno.version;
|
|
205
206
|
var v8 = versions && versions.v8;
|
|
206
207
|
var match, version;
|
|
@@ -241,44 +242,44 @@ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$8(func
|
|
|
241
242
|
|
|
242
243
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
243
244
|
|
|
244
|
-
var NATIVE_SYMBOL$
|
|
245
|
+
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
245
246
|
|
|
246
|
-
var useSymbolAsUid = NATIVE_SYMBOL$
|
|
247
|
+
var useSymbolAsUid = NATIVE_SYMBOL$1
|
|
247
248
|
&& !Symbol.sham
|
|
248
249
|
&& typeof Symbol.iterator == 'symbol';
|
|
249
250
|
|
|
250
251
|
var getBuiltIn$2 = getBuiltIn$4;
|
|
251
|
-
var isCallable$
|
|
252
|
-
var isPrototypeOf
|
|
252
|
+
var isCallable$b = isCallable$e;
|
|
253
|
+
var isPrototypeOf = objectIsPrototypeOf;
|
|
253
254
|
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
254
255
|
|
|
255
|
-
var $Object$
|
|
256
|
+
var $Object$2 = Object;
|
|
256
257
|
|
|
257
258
|
var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
258
259
|
return typeof it == 'symbol';
|
|
259
260
|
} : function (it) {
|
|
260
261
|
var $Symbol = getBuiltIn$2('Symbol');
|
|
261
|
-
return isCallable$
|
|
262
|
+
return isCallable$b($Symbol) && isPrototypeOf($Symbol.prototype, $Object$2(it));
|
|
262
263
|
};
|
|
263
264
|
|
|
264
|
-
var $String$
|
|
265
|
+
var $String$2 = String;
|
|
265
266
|
|
|
266
267
|
var tryToString$1 = function (argument) {
|
|
267
268
|
try {
|
|
268
|
-
return $String$
|
|
269
|
+
return $String$2(argument);
|
|
269
270
|
} catch (error) {
|
|
270
271
|
return 'Object';
|
|
271
272
|
}
|
|
272
273
|
};
|
|
273
274
|
|
|
274
|
-
var isCallable$
|
|
275
|
+
var isCallable$a = isCallable$e;
|
|
275
276
|
var tryToString = tryToString$1;
|
|
276
277
|
|
|
277
278
|
var $TypeError$6 = TypeError;
|
|
278
279
|
|
|
279
280
|
// `Assert: IsCallable(argument) is true`
|
|
280
281
|
var aCallable$2 = function (argument) {
|
|
281
|
-
if (isCallable$
|
|
282
|
+
if (isCallable$a(argument)) return argument;
|
|
282
283
|
throw $TypeError$6(tryToString(argument) + ' is not a function');
|
|
283
284
|
};
|
|
284
285
|
|
|
@@ -293,7 +294,7 @@ var getMethod$1 = function (V, P) {
|
|
|
293
294
|
};
|
|
294
295
|
|
|
295
296
|
var call$4 = functionCall;
|
|
296
|
-
var isCallable$
|
|
297
|
+
var isCallable$9 = isCallable$e;
|
|
297
298
|
var isObject$5 = isObject$6;
|
|
298
299
|
|
|
299
300
|
var $TypeError$5 = TypeError;
|
|
@@ -302,32 +303,32 @@ var $TypeError$5 = TypeError;
|
|
|
302
303
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
303
304
|
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
304
305
|
var fn, val;
|
|
305
|
-
if (pref === 'string' && isCallable$
|
|
306
|
-
if (isCallable$
|
|
307
|
-
if (pref !== 'string' && isCallable$
|
|
306
|
+
if (pref === 'string' && isCallable$9(fn = input.toString) && !isObject$5(val = call$4(fn, input))) return val;
|
|
307
|
+
if (isCallable$9(fn = input.valueOf) && !isObject$5(val = call$4(fn, input))) return val;
|
|
308
|
+
if (pref !== 'string' && isCallable$9(fn = input.toString) && !isObject$5(val = call$4(fn, input))) return val;
|
|
308
309
|
throw $TypeError$5("Can't convert object to primitive value");
|
|
309
310
|
};
|
|
310
311
|
|
|
311
312
|
var shared$3 = {exports: {}};
|
|
312
313
|
|
|
313
|
-
var global$
|
|
314
|
+
var global$9 = global$c;
|
|
314
315
|
|
|
315
316
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
316
|
-
var defineProperty$
|
|
317
|
+
var defineProperty$5 = Object.defineProperty;
|
|
317
318
|
|
|
318
319
|
var defineGlobalProperty$3 = function (key, value) {
|
|
319
320
|
try {
|
|
320
|
-
defineProperty$
|
|
321
|
+
defineProperty$5(global$9, key, { value: value, configurable: true, writable: true });
|
|
321
322
|
} catch (error) {
|
|
322
|
-
global$
|
|
323
|
+
global$9[key] = value;
|
|
323
324
|
} return value;
|
|
324
325
|
};
|
|
325
326
|
|
|
326
|
-
var global$
|
|
327
|
+
var global$8 = global$c;
|
|
327
328
|
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
328
329
|
|
|
329
330
|
var SHARED = '__core-js_shared__';
|
|
330
|
-
var store$3 = global$
|
|
331
|
+
var store$3 = global$8[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
331
332
|
|
|
332
333
|
var sharedStore = store$3;
|
|
333
334
|
|
|
@@ -345,18 +346,18 @@ var store$2 = sharedStore;
|
|
|
345
346
|
|
|
346
347
|
var requireObjectCoercible = requireObjectCoercible$2;
|
|
347
348
|
|
|
348
|
-
var $Object$
|
|
349
|
+
var $Object$1 = Object;
|
|
349
350
|
|
|
350
351
|
// `ToObject` abstract operation
|
|
351
352
|
// https://tc39.es/ecma262/#sec-toobject
|
|
352
353
|
var toObject$4 = function (argument) {
|
|
353
|
-
return $Object$
|
|
354
|
+
return $Object$1(requireObjectCoercible(argument));
|
|
354
355
|
};
|
|
355
356
|
|
|
356
|
-
var uncurryThis$
|
|
357
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
357
358
|
var toObject$3 = toObject$4;
|
|
358
359
|
|
|
359
|
-
var hasOwnProperty = uncurryThis$
|
|
360
|
+
var hasOwnProperty = uncurryThis$6({}.hasOwnProperty);
|
|
360
361
|
|
|
361
362
|
// `HasOwnProperty` abstract operation
|
|
362
363
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
@@ -365,32 +366,32 @@ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
|
365
366
|
return hasOwnProperty(toObject$3(it), key);
|
|
366
367
|
};
|
|
367
368
|
|
|
368
|
-
var uncurryThis$
|
|
369
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
369
370
|
|
|
370
371
|
var id = 0;
|
|
371
372
|
var postfix = Math.random();
|
|
372
|
-
var toString
|
|
373
|
+
var toString = uncurryThis$5(1.0.toString);
|
|
373
374
|
|
|
374
375
|
var uid$2 = function (key) {
|
|
375
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString
|
|
376
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
|
376
377
|
};
|
|
377
378
|
|
|
378
|
-
var global$
|
|
379
|
+
var global$7 = global$c;
|
|
379
380
|
var shared$2 = shared$3.exports;
|
|
380
|
-
var hasOwn$
|
|
381
|
+
var hasOwn$8 = hasOwnProperty_1;
|
|
381
382
|
var uid$1 = uid$2;
|
|
382
|
-
var NATIVE_SYMBOL
|
|
383
|
+
var NATIVE_SYMBOL = symbolConstructorDetection;
|
|
383
384
|
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
384
385
|
|
|
385
386
|
var WellKnownSymbolsStore = shared$2('wks');
|
|
386
|
-
var Symbol$1 = global$
|
|
387
|
+
var Symbol$1 = global$7.Symbol;
|
|
387
388
|
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
388
389
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
389
390
|
|
|
390
|
-
var wellKnownSymbol$
|
|
391
|
-
if (!hasOwn$
|
|
391
|
+
var wellKnownSymbol$6 = function (name) {
|
|
392
|
+
if (!hasOwn$8(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
392
393
|
var description = 'Symbol.' + name;
|
|
393
|
-
if (NATIVE_SYMBOL
|
|
394
|
+
if (NATIVE_SYMBOL && hasOwn$8(Symbol$1, name)) {
|
|
394
395
|
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
395
396
|
} else if (USE_SYMBOL_AS_UID && symbolFor) {
|
|
396
397
|
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
@@ -405,10 +406,10 @@ var isObject$4 = isObject$6;
|
|
|
405
406
|
var isSymbol$1 = isSymbol$2;
|
|
406
407
|
var getMethod = getMethod$1;
|
|
407
408
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
408
|
-
var wellKnownSymbol$
|
|
409
|
+
var wellKnownSymbol$5 = wellKnownSymbol$6;
|
|
409
410
|
|
|
410
411
|
var $TypeError$4 = TypeError;
|
|
411
|
-
var TO_PRIMITIVE = wellKnownSymbol$
|
|
412
|
+
var TO_PRIMITIVE = wellKnownSymbol$5('toPrimitive');
|
|
412
413
|
|
|
413
414
|
// `ToPrimitive` abstract operation
|
|
414
415
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
@@ -436,10 +437,10 @@ var toPropertyKey$2 = function (argument) {
|
|
|
436
437
|
return isSymbol(key) ? key : key + '';
|
|
437
438
|
};
|
|
438
439
|
|
|
439
|
-
var global$
|
|
440
|
+
var global$6 = global$c;
|
|
440
441
|
var isObject$3 = isObject$6;
|
|
441
442
|
|
|
442
|
-
var document$1 = global$
|
|
443
|
+
var document$1 = global$6.document;
|
|
443
444
|
// typeof document.createElement is 'object' in old IE
|
|
444
445
|
var EXISTS$1 = isObject$3(document$1) && isObject$3(document$1.createElement);
|
|
445
446
|
|
|
@@ -447,25 +448,25 @@ var documentCreateElement$2 = function (it) {
|
|
|
447
448
|
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
448
449
|
};
|
|
449
450
|
|
|
450
|
-
var DESCRIPTORS$
|
|
451
|
+
var DESCRIPTORS$9 = descriptors;
|
|
451
452
|
var fails$7 = fails$c;
|
|
452
453
|
var createElement = documentCreateElement$2;
|
|
453
454
|
|
|
454
455
|
// Thanks to IE8 for its funny defineProperty
|
|
455
|
-
var ie8DomDefine = !DESCRIPTORS$
|
|
456
|
+
var ie8DomDefine = !DESCRIPTORS$9 && !fails$7(function () {
|
|
456
457
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
457
458
|
return Object.defineProperty(createElement('div'), 'a', {
|
|
458
459
|
get: function () { return 7; }
|
|
459
460
|
}).a != 7;
|
|
460
461
|
});
|
|
461
462
|
|
|
462
|
-
var DESCRIPTORS$
|
|
463
|
+
var DESCRIPTORS$8 = descriptors;
|
|
463
464
|
var call$2 = functionCall;
|
|
464
465
|
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
465
466
|
var createPropertyDescriptor$2 = createPropertyDescriptor$3;
|
|
466
467
|
var toIndexedObject$4 = toIndexedObject$5;
|
|
467
468
|
var toPropertyKey$1 = toPropertyKey$2;
|
|
468
|
-
var hasOwn$
|
|
469
|
+
var hasOwn$7 = hasOwnProperty_1;
|
|
469
470
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
470
471
|
|
|
471
472
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
@@ -473,23 +474,23 @@ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
|
473
474
|
|
|
474
475
|
// `Object.getOwnPropertyDescriptor` method
|
|
475
476
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
476
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$
|
|
477
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
477
478
|
O = toIndexedObject$4(O);
|
|
478
479
|
P = toPropertyKey$1(P);
|
|
479
480
|
if (IE8_DOM_DEFINE$1) try {
|
|
480
481
|
return $getOwnPropertyDescriptor$1(O, P);
|
|
481
482
|
} catch (error) { /* empty */ }
|
|
482
|
-
if (hasOwn$
|
|
483
|
+
if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
483
484
|
};
|
|
484
485
|
|
|
485
486
|
var objectDefineProperty = {};
|
|
486
487
|
|
|
487
|
-
var DESCRIPTORS$
|
|
488
|
+
var DESCRIPTORS$7 = descriptors;
|
|
488
489
|
var fails$6 = fails$c;
|
|
489
490
|
|
|
490
491
|
// V8 ~ Chrome 36-
|
|
491
492
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
492
|
-
var v8PrototypeDefineBug = DESCRIPTORS$
|
|
493
|
+
var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$6(function () {
|
|
493
494
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
494
495
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
495
496
|
value: 42,
|
|
@@ -499,16 +500,16 @@ var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$6(function () {
|
|
|
499
500
|
|
|
500
501
|
var isObject$2 = isObject$6;
|
|
501
502
|
|
|
502
|
-
var $String$
|
|
503
|
+
var $String$1 = String;
|
|
503
504
|
var $TypeError$3 = TypeError;
|
|
504
505
|
|
|
505
506
|
// `Assert: Type(argument) is Object`
|
|
506
507
|
var anObject$5 = function (argument) {
|
|
507
508
|
if (isObject$2(argument)) return argument;
|
|
508
|
-
throw $TypeError$3($String$
|
|
509
|
+
throw $TypeError$3($String$1(argument) + ' is not an object');
|
|
509
510
|
};
|
|
510
511
|
|
|
511
|
-
var DESCRIPTORS$
|
|
512
|
+
var DESCRIPTORS$6 = descriptors;
|
|
512
513
|
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
513
514
|
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
514
515
|
var anObject$4 = anObject$5;
|
|
@@ -525,7 +526,7 @@ var WRITABLE = 'writable';
|
|
|
525
526
|
|
|
526
527
|
// `Object.defineProperty` method
|
|
527
528
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
528
|
-
objectDefineProperty.f = DESCRIPTORS$
|
|
529
|
+
objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
529
530
|
anObject$4(O);
|
|
530
531
|
P = toPropertyKey(P);
|
|
531
532
|
anObject$4(Attributes);
|
|
@@ -552,11 +553,11 @@ objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
552
553
|
return O;
|
|
553
554
|
};
|
|
554
555
|
|
|
555
|
-
var DESCRIPTORS$
|
|
556
|
+
var DESCRIPTORS$5 = descriptors;
|
|
556
557
|
var definePropertyModule$3 = objectDefineProperty;
|
|
557
558
|
var createPropertyDescriptor$1 = createPropertyDescriptor$3;
|
|
558
559
|
|
|
559
|
-
var createNonEnumerableProperty$4 = DESCRIPTORS$
|
|
560
|
+
var createNonEnumerableProperty$4 = DESCRIPTORS$5 ? function (object, key, value) {
|
|
560
561
|
return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
|
|
561
562
|
} : function (object, key, value) {
|
|
562
563
|
object[key] = value;
|
|
@@ -565,17 +566,17 @@ var createNonEnumerableProperty$4 = DESCRIPTORS$6 ? function (object, key, value
|
|
|
565
566
|
|
|
566
567
|
var makeBuiltIn$2 = {exports: {}};
|
|
567
568
|
|
|
568
|
-
var DESCRIPTORS$
|
|
569
|
-
var hasOwn$
|
|
569
|
+
var DESCRIPTORS$4 = descriptors;
|
|
570
|
+
var hasOwn$6 = hasOwnProperty_1;
|
|
570
571
|
|
|
571
572
|
var FunctionPrototype = Function.prototype;
|
|
572
573
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
573
|
-
var getDescriptor = DESCRIPTORS$
|
|
574
|
+
var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
|
|
574
575
|
|
|
575
|
-
var EXISTS = hasOwn$
|
|
576
|
+
var EXISTS = hasOwn$6(FunctionPrototype, 'name');
|
|
576
577
|
// additional protection from minified / mangled / dropped function names
|
|
577
578
|
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
578
|
-
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$
|
|
579
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
579
580
|
|
|
580
581
|
var functionName = {
|
|
581
582
|
EXISTS: EXISTS,
|
|
@@ -583,14 +584,14 @@ var functionName = {
|
|
|
583
584
|
CONFIGURABLE: CONFIGURABLE
|
|
584
585
|
};
|
|
585
586
|
|
|
586
|
-
var uncurryThis$
|
|
587
|
-
var isCallable$
|
|
587
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
588
|
+
var isCallable$8 = isCallable$e;
|
|
588
589
|
var store$1 = sharedStore;
|
|
589
590
|
|
|
590
|
-
var functionToString = uncurryThis$
|
|
591
|
+
var functionToString = uncurryThis$4(Function.toString);
|
|
591
592
|
|
|
592
593
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
593
|
-
if (!isCallable$
|
|
594
|
+
if (!isCallable$8(store$1.inspectSource)) {
|
|
594
595
|
store$1.inspectSource = function (it) {
|
|
595
596
|
return functionToString(it);
|
|
596
597
|
};
|
|
@@ -598,12 +599,12 @@ if (!isCallable$a(store$1.inspectSource)) {
|
|
|
598
599
|
|
|
599
600
|
var inspectSource$1 = store$1.inspectSource;
|
|
600
601
|
|
|
601
|
-
var global$
|
|
602
|
-
var isCallable$
|
|
602
|
+
var global$5 = global$c;
|
|
603
|
+
var isCallable$7 = isCallable$e;
|
|
603
604
|
|
|
604
|
-
var WeakMap$1 = global$
|
|
605
|
+
var WeakMap$1 = global$5.WeakMap;
|
|
605
606
|
|
|
606
|
-
var weakMapBasicDetection = isCallable$
|
|
607
|
+
var weakMapBasicDetection = isCallable$7(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
607
608
|
|
|
608
609
|
var shared$1 = shared$3.exports;
|
|
609
610
|
var uid = uid$2;
|
|
@@ -617,17 +618,17 @@ var sharedKey$3 = function (key) {
|
|
|
617
618
|
var hiddenKeys$4 = {};
|
|
618
619
|
|
|
619
620
|
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
620
|
-
var global$
|
|
621
|
+
var global$4 = global$c;
|
|
621
622
|
var isObject$1 = isObject$6;
|
|
622
623
|
var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
|
|
623
|
-
var hasOwn$
|
|
624
|
+
var hasOwn$5 = hasOwnProperty_1;
|
|
624
625
|
var shared = sharedStore;
|
|
625
626
|
var sharedKey$2 = sharedKey$3;
|
|
626
627
|
var hiddenKeys$3 = hiddenKeys$4;
|
|
627
628
|
|
|
628
629
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
629
|
-
var TypeError$1 = global$
|
|
630
|
-
var WeakMap = global$
|
|
630
|
+
var TypeError$1 = global$4.TypeError;
|
|
631
|
+
var WeakMap = global$4.WeakMap;
|
|
631
632
|
var set, get, has;
|
|
632
633
|
|
|
633
634
|
var enforce = function (it) {
|
|
@@ -666,16 +667,16 @@ if (NATIVE_WEAK_MAP || shared.state) {
|
|
|
666
667
|
var STATE = sharedKey$2('state');
|
|
667
668
|
hiddenKeys$3[STATE] = true;
|
|
668
669
|
set = function (it, metadata) {
|
|
669
|
-
if (hasOwn$
|
|
670
|
+
if (hasOwn$5(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
670
671
|
metadata.facade = it;
|
|
671
672
|
createNonEnumerableProperty$3(it, STATE, metadata);
|
|
672
673
|
return metadata;
|
|
673
674
|
};
|
|
674
675
|
get = function (it) {
|
|
675
|
-
return hasOwn$
|
|
676
|
+
return hasOwn$5(it, STATE) ? it[STATE] : {};
|
|
676
677
|
};
|
|
677
678
|
has = function (it) {
|
|
678
|
-
return hasOwn$
|
|
679
|
+
return hasOwn$5(it, STATE);
|
|
679
680
|
};
|
|
680
681
|
}
|
|
681
682
|
|
|
@@ -688,9 +689,9 @@ var internalState = {
|
|
|
688
689
|
};
|
|
689
690
|
|
|
690
691
|
var fails$5 = fails$c;
|
|
691
|
-
var isCallable$
|
|
692
|
-
var hasOwn$
|
|
693
|
-
var DESCRIPTORS$
|
|
692
|
+
var isCallable$6 = isCallable$e;
|
|
693
|
+
var hasOwn$4 = hasOwnProperty_1;
|
|
694
|
+
var DESCRIPTORS$3 = descriptors;
|
|
694
695
|
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
695
696
|
var inspectSource = inspectSource$1;
|
|
696
697
|
var InternalStateModule$1 = internalState;
|
|
@@ -698,10 +699,10 @@ var InternalStateModule$1 = internalState;
|
|
|
698
699
|
var enforceInternalState = InternalStateModule$1.enforce;
|
|
699
700
|
var getInternalState$1 = InternalStateModule$1.get;
|
|
700
701
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
701
|
-
var defineProperty$
|
|
702
|
+
var defineProperty$4 = Object.defineProperty;
|
|
702
703
|
|
|
703
|
-
var CONFIGURABLE_LENGTH = DESCRIPTORS$
|
|
704
|
-
return defineProperty$
|
|
704
|
+
var CONFIGURABLE_LENGTH = DESCRIPTORS$3 && !fails$5(function () {
|
|
705
|
+
return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
705
706
|
});
|
|
706
707
|
|
|
707
708
|
var TEMPLATE = String(String).split('String');
|
|
@@ -712,21 +713,21 @@ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
|
|
712
713
|
}
|
|
713
714
|
if (options && options.getter) name = 'get ' + name;
|
|
714
715
|
if (options && options.setter) name = 'set ' + name;
|
|
715
|
-
if (!hasOwn$
|
|
716
|
-
if (DESCRIPTORS$
|
|
716
|
+
if (!hasOwn$4(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
717
|
+
if (DESCRIPTORS$3) defineProperty$4(value, 'name', { value: name, configurable: true });
|
|
717
718
|
else value.name = name;
|
|
718
719
|
}
|
|
719
|
-
if (CONFIGURABLE_LENGTH && options && hasOwn$
|
|
720
|
-
defineProperty$
|
|
720
|
+
if (CONFIGURABLE_LENGTH && options && hasOwn$4(options, 'arity') && value.length !== options.arity) {
|
|
721
|
+
defineProperty$4(value, 'length', { value: options.arity });
|
|
721
722
|
}
|
|
722
723
|
try {
|
|
723
|
-
if (options && hasOwn$
|
|
724
|
-
if (DESCRIPTORS$
|
|
724
|
+
if (options && hasOwn$4(options, 'constructor') && options.constructor) {
|
|
725
|
+
if (DESCRIPTORS$3) defineProperty$4(value, 'prototype', { writable: false });
|
|
725
726
|
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
726
727
|
} else if (value.prototype) value.prototype = undefined;
|
|
727
728
|
} catch (error) { /* empty */ }
|
|
728
729
|
var state = enforceInternalState(value);
|
|
729
|
-
if (!hasOwn$
|
|
730
|
+
if (!hasOwn$4(state, 'source')) {
|
|
730
731
|
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
731
732
|
} return value;
|
|
732
733
|
};
|
|
@@ -734,10 +735,10 @@ var makeBuiltIn$1 = makeBuiltIn$2.exports = function (value, name, options) {
|
|
|
734
735
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
735
736
|
// eslint-disable-next-line no-extend-native -- required
|
|
736
737
|
Function.prototype.toString = makeBuiltIn$1(function toString() {
|
|
737
|
-
return isCallable$
|
|
738
|
+
return isCallable$6(this) && getInternalState$1(this).source || inspectSource(this);
|
|
738
739
|
}, 'toString');
|
|
739
740
|
|
|
740
|
-
var isCallable$
|
|
741
|
+
var isCallable$5 = isCallable$e;
|
|
741
742
|
var definePropertyModule$2 = objectDefineProperty;
|
|
742
743
|
var makeBuiltIn = makeBuiltIn$2.exports;
|
|
743
744
|
var defineGlobalProperty$1 = defineGlobalProperty$3;
|
|
@@ -746,7 +747,7 @@ var defineBuiltIn$3 = function (O, key, value, options) {
|
|
|
746
747
|
if (!options) options = {};
|
|
747
748
|
var simple = options.enumerable;
|
|
748
749
|
var name = options.name !== undefined ? options.name : key;
|
|
749
|
-
if (isCallable$
|
|
750
|
+
if (isCallable$5(value)) makeBuiltIn(value, name, options);
|
|
750
751
|
if (options.global) {
|
|
751
752
|
if (simple) O[key] = value;
|
|
752
753
|
else defineGlobalProperty$1(key, value);
|
|
@@ -852,22 +853,22 @@ var arrayIncludes = {
|
|
|
852
853
|
indexOf: createMethod$1(false)
|
|
853
854
|
};
|
|
854
855
|
|
|
855
|
-
var uncurryThis$
|
|
856
|
-
var hasOwn$
|
|
856
|
+
var uncurryThis$3 = functionUncurryThis;
|
|
857
|
+
var hasOwn$3 = hasOwnProperty_1;
|
|
857
858
|
var toIndexedObject$2 = toIndexedObject$5;
|
|
858
859
|
var indexOf = arrayIncludes.indexOf;
|
|
859
860
|
var hiddenKeys$2 = hiddenKeys$4;
|
|
860
861
|
|
|
861
|
-
var push = uncurryThis$
|
|
862
|
+
var push = uncurryThis$3([].push);
|
|
862
863
|
|
|
863
864
|
var objectKeysInternal = function (object, names) {
|
|
864
865
|
var O = toIndexedObject$2(object);
|
|
865
866
|
var i = 0;
|
|
866
867
|
var result = [];
|
|
867
868
|
var key;
|
|
868
|
-
for (key in O) !hasOwn$
|
|
869
|
+
for (key in O) !hasOwn$3(hiddenKeys$2, key) && hasOwn$3(O, key) && push(result, key);
|
|
869
870
|
// Don't enum bug & hidden keys
|
|
870
|
-
while (names.length > i) if (hasOwn$
|
|
871
|
+
while (names.length > i) if (hasOwn$3(O, key = names[i++])) {
|
|
871
872
|
~indexOf(result, key) || push(result, key);
|
|
872
873
|
}
|
|
873
874
|
return result;
|
|
@@ -902,12 +903,12 @@ var objectGetOwnPropertySymbols = {};
|
|
|
902
903
|
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
903
904
|
|
|
904
905
|
var getBuiltIn$1 = getBuiltIn$4;
|
|
905
|
-
var uncurryThis$
|
|
906
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
906
907
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
907
908
|
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
908
909
|
var anObject$3 = anObject$5;
|
|
909
910
|
|
|
910
|
-
var concat$1 = uncurryThis$
|
|
911
|
+
var concat$1 = uncurryThis$2([].concat);
|
|
911
912
|
|
|
912
913
|
// all object keys, includes non-enumerable and symbols
|
|
913
914
|
var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
@@ -916,25 +917,25 @@ var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
|
916
917
|
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
917
918
|
};
|
|
918
919
|
|
|
919
|
-
var hasOwn$
|
|
920
|
+
var hasOwn$2 = hasOwnProperty_1;
|
|
920
921
|
var ownKeys = ownKeys$1;
|
|
921
922
|
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
922
923
|
var definePropertyModule$1 = objectDefineProperty;
|
|
923
924
|
|
|
924
|
-
var copyConstructorProperties$
|
|
925
|
+
var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
925
926
|
var keys = ownKeys(source);
|
|
926
927
|
var defineProperty = definePropertyModule$1.f;
|
|
927
928
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
928
929
|
for (var i = 0; i < keys.length; i++) {
|
|
929
930
|
var key = keys[i];
|
|
930
|
-
if (!hasOwn$
|
|
931
|
+
if (!hasOwn$2(target, key) && !(exceptions && hasOwn$2(exceptions, key))) {
|
|
931
932
|
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
932
933
|
}
|
|
933
934
|
}
|
|
934
935
|
};
|
|
935
936
|
|
|
936
937
|
var fails$4 = fails$c;
|
|
937
|
-
var isCallable$
|
|
938
|
+
var isCallable$4 = isCallable$e;
|
|
938
939
|
|
|
939
940
|
var replacement = /#|\.prototype\./;
|
|
940
941
|
|
|
@@ -942,7 +943,7 @@ var isForced$1 = function (feature, detection) {
|
|
|
942
943
|
var value = data[normalize(feature)];
|
|
943
944
|
return value == POLYFILL ? true
|
|
944
945
|
: value == NATIVE ? false
|
|
945
|
-
: isCallable$
|
|
946
|
+
: isCallable$4(detection) ? fails$4(detection)
|
|
946
947
|
: !!detection;
|
|
947
948
|
};
|
|
948
949
|
|
|
@@ -956,12 +957,12 @@ var POLYFILL = isForced$1.POLYFILL = 'P';
|
|
|
956
957
|
|
|
957
958
|
var isForced_1 = isForced$1;
|
|
958
959
|
|
|
959
|
-
var global$
|
|
960
|
+
var global$3 = global$c;
|
|
960
961
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
961
962
|
var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
|
|
962
963
|
var defineBuiltIn$2 = defineBuiltIn$3;
|
|
963
964
|
var defineGlobalProperty = defineGlobalProperty$3;
|
|
964
|
-
var copyConstructorProperties
|
|
965
|
+
var copyConstructorProperties = copyConstructorProperties$1;
|
|
965
966
|
var isForced = isForced_1;
|
|
966
967
|
|
|
967
968
|
/*
|
|
@@ -985,11 +986,11 @@ var _export = function (options, source) {
|
|
|
985
986
|
var STATIC = options.stat;
|
|
986
987
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
987
988
|
if (GLOBAL) {
|
|
988
|
-
target = global$
|
|
989
|
+
target = global$3;
|
|
989
990
|
} else if (STATIC) {
|
|
990
|
-
target = global$
|
|
991
|
+
target = global$3[TARGET] || defineGlobalProperty(TARGET, {});
|
|
991
992
|
} else {
|
|
992
|
-
target = (global$
|
|
993
|
+
target = (global$3[TARGET] || {}).prototype;
|
|
993
994
|
}
|
|
994
995
|
if (target) for (key in source) {
|
|
995
996
|
sourceProperty = source[key];
|
|
@@ -1001,7 +1002,7 @@ var _export = function (options, source) {
|
|
|
1001
1002
|
// contained in target
|
|
1002
1003
|
if (!FORCED && targetProperty !== undefined) {
|
|
1003
1004
|
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
1004
|
-
copyConstructorProperties
|
|
1005
|
+
copyConstructorProperties(sourceProperty, targetProperty);
|
|
1005
1006
|
}
|
|
1006
1007
|
// add a flag to not completely full polyfills
|
|
1007
1008
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
@@ -1021,8 +1022,8 @@ var objectKeys$2 = Object.keys || function keys(O) {
|
|
|
1021
1022
|
return internalObjectKeys(O, enumBugKeys$1);
|
|
1022
1023
|
};
|
|
1023
1024
|
|
|
1024
|
-
var DESCRIPTORS$
|
|
1025
|
-
var uncurryThis$
|
|
1025
|
+
var DESCRIPTORS$2 = descriptors;
|
|
1026
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
1026
1027
|
var call$1 = functionCall;
|
|
1027
1028
|
var fails$3 = fails$c;
|
|
1028
1029
|
var objectKeys$1 = objectKeys$2;
|
|
@@ -1034,17 +1035,17 @@ var IndexedObject$1 = indexedObject;
|
|
|
1034
1035
|
// eslint-disable-next-line es/no-object-assign -- safe
|
|
1035
1036
|
var $assign = Object.assign;
|
|
1036
1037
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1037
|
-
var defineProperty$
|
|
1038
|
-
var concat = uncurryThis$
|
|
1038
|
+
var defineProperty$3 = Object.defineProperty;
|
|
1039
|
+
var concat = uncurryThis$1([].concat);
|
|
1039
1040
|
|
|
1040
1041
|
// `Object.assign` method
|
|
1041
1042
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
1042
1043
|
var objectAssign = !$assign || fails$3(function () {
|
|
1043
1044
|
// should have correct order of operations (Edge bug)
|
|
1044
|
-
if (DESCRIPTORS$
|
|
1045
|
+
if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
|
|
1045
1046
|
enumerable: true,
|
|
1046
1047
|
get: function () {
|
|
1047
|
-
defineProperty$
|
|
1048
|
+
defineProperty$3(this, 'b', {
|
|
1048
1049
|
value: 3,
|
|
1049
1050
|
enumerable: false
|
|
1050
1051
|
});
|
|
@@ -1073,18 +1074,18 @@ var objectAssign = !$assign || fails$3(function () {
|
|
|
1073
1074
|
var key;
|
|
1074
1075
|
while (length > j) {
|
|
1075
1076
|
key = keys[j++];
|
|
1076
|
-
if (!DESCRIPTORS$
|
|
1077
|
+
if (!DESCRIPTORS$2 || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1077
1078
|
}
|
|
1078
1079
|
} return T;
|
|
1079
1080
|
} : $assign;
|
|
1080
1081
|
|
|
1081
|
-
var $$
|
|
1082
|
+
var $$2 = _export;
|
|
1082
1083
|
var assign = objectAssign;
|
|
1083
1084
|
|
|
1084
1085
|
// `Object.assign` method
|
|
1085
1086
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
1086
1087
|
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
1087
|
-
$$
|
|
1088
|
+
$$2({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
1088
1089
|
assign: assign
|
|
1089
1090
|
});
|
|
1090
1091
|
|
|
@@ -1092,7 +1093,7 @@ const NinetailedContext = /*#__PURE__*/createContext(undefined);
|
|
|
1092
1093
|
|
|
1093
1094
|
var objectDefineProperties = {};
|
|
1094
1095
|
|
|
1095
|
-
var DESCRIPTORS$
|
|
1096
|
+
var DESCRIPTORS$1 = descriptors;
|
|
1096
1097
|
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
1097
1098
|
var definePropertyModule = objectDefineProperty;
|
|
1098
1099
|
var anObject$2 = anObject$5;
|
|
@@ -1102,7 +1103,7 @@ var objectKeys = objectKeys$2;
|
|
|
1102
1103
|
// `Object.defineProperties` method
|
|
1103
1104
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
1104
1105
|
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
1105
|
-
objectDefineProperties.f = DESCRIPTORS$
|
|
1106
|
+
objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1106
1107
|
anObject$2(O);
|
|
1107
1108
|
var props = toIndexedObject$1(Properties);
|
|
1108
1109
|
var keys = objectKeys(Properties);
|
|
@@ -1202,17 +1203,17 @@ var objectCreate = Object.create || function create(O, Properties) {
|
|
|
1202
1203
|
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
1203
1204
|
};
|
|
1204
1205
|
|
|
1205
|
-
var wellKnownSymbol$
|
|
1206
|
+
var wellKnownSymbol$4 = wellKnownSymbol$6;
|
|
1206
1207
|
var create$1 = objectCreate;
|
|
1207
|
-
var defineProperty$
|
|
1208
|
+
var defineProperty$2 = objectDefineProperty.f;
|
|
1208
1209
|
|
|
1209
|
-
var UNSCOPABLES = wellKnownSymbol$
|
|
1210
|
+
var UNSCOPABLES = wellKnownSymbol$4('unscopables');
|
|
1210
1211
|
var ArrayPrototype = Array.prototype;
|
|
1211
1212
|
|
|
1212
1213
|
// Array.prototype[@@unscopables]
|
|
1213
1214
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1214
1215
|
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
1215
|
-
defineProperty$
|
|
1216
|
+
defineProperty$2(ArrayPrototype, UNSCOPABLES, {
|
|
1216
1217
|
configurable: true,
|
|
1217
1218
|
value: create$1(null)
|
|
1218
1219
|
});
|
|
@@ -1234,36 +1235,36 @@ var correctPrototypeGetter = !fails$2(function () {
|
|
|
1234
1235
|
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
1235
1236
|
});
|
|
1236
1237
|
|
|
1237
|
-
var hasOwn$
|
|
1238
|
-
var isCallable$
|
|
1238
|
+
var hasOwn$1 = hasOwnProperty_1;
|
|
1239
|
+
var isCallable$3 = isCallable$e;
|
|
1239
1240
|
var toObject$1 = toObject$4;
|
|
1240
1241
|
var sharedKey = sharedKey$3;
|
|
1241
1242
|
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
1242
1243
|
|
|
1243
1244
|
var IE_PROTO = sharedKey('IE_PROTO');
|
|
1244
|
-
var $Object
|
|
1245
|
-
var ObjectPrototype = $Object
|
|
1245
|
+
var $Object = Object;
|
|
1246
|
+
var ObjectPrototype = $Object.prototype;
|
|
1246
1247
|
|
|
1247
1248
|
// `Object.getPrototypeOf` method
|
|
1248
1249
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1249
1250
|
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
1250
|
-
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object
|
|
1251
|
+
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
|
|
1251
1252
|
var object = toObject$1(O);
|
|
1252
|
-
if (hasOwn$
|
|
1253
|
+
if (hasOwn$1(object, IE_PROTO)) return object[IE_PROTO];
|
|
1253
1254
|
var constructor = object.constructor;
|
|
1254
|
-
if (isCallable$
|
|
1255
|
+
if (isCallable$3(constructor) && object instanceof constructor) {
|
|
1255
1256
|
return constructor.prototype;
|
|
1256
|
-
} return object instanceof $Object
|
|
1257
|
+
} return object instanceof $Object ? ObjectPrototype : null;
|
|
1257
1258
|
};
|
|
1258
1259
|
|
|
1259
1260
|
var fails$1 = fails$c;
|
|
1260
|
-
var isCallable$
|
|
1261
|
+
var isCallable$2 = isCallable$e;
|
|
1261
1262
|
var isObject = isObject$6;
|
|
1262
1263
|
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
1263
1264
|
var defineBuiltIn$1 = defineBuiltIn$3;
|
|
1264
|
-
var wellKnownSymbol$
|
|
1265
|
+
var wellKnownSymbol$3 = wellKnownSymbol$6;
|
|
1265
1266
|
|
|
1266
|
-
var ITERATOR$2 = wellKnownSymbol$
|
|
1267
|
+
var ITERATOR$2 = wellKnownSymbol$3('iterator');
|
|
1267
1268
|
var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
1268
1269
|
|
|
1269
1270
|
// `%IteratorPrototype%` object
|
|
@@ -1291,7 +1292,7 @@ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
|
|
|
1291
1292
|
|
|
1292
1293
|
// `%IteratorPrototype%[@@iterator]()` method
|
|
1293
1294
|
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
1294
|
-
if (!isCallable$
|
|
1295
|
+
if (!isCallable$2(IteratorPrototype$2[ITERATOR$2])) {
|
|
1295
1296
|
defineBuiltIn$1(IteratorPrototype$2, ITERATOR$2, function () {
|
|
1296
1297
|
return this;
|
|
1297
1298
|
});
|
|
@@ -1302,16 +1303,16 @@ var iteratorsCore = {
|
|
|
1302
1303
|
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
|
|
1303
1304
|
};
|
|
1304
1305
|
|
|
1305
|
-
var defineProperty$
|
|
1306
|
-
var hasOwn
|
|
1307
|
-
var wellKnownSymbol$
|
|
1306
|
+
var defineProperty$1 = objectDefineProperty.f;
|
|
1307
|
+
var hasOwn = hasOwnProperty_1;
|
|
1308
|
+
var wellKnownSymbol$2 = wellKnownSymbol$6;
|
|
1308
1309
|
|
|
1309
|
-
var TO_STRING_TAG$
|
|
1310
|
+
var TO_STRING_TAG$1 = wellKnownSymbol$2('toStringTag');
|
|
1310
1311
|
|
|
1311
1312
|
var setToStringTag$2 = function (target, TAG, STATIC) {
|
|
1312
1313
|
if (target && !STATIC) target = target.prototype;
|
|
1313
|
-
if (target && !hasOwn
|
|
1314
|
-
defineProperty$
|
|
1314
|
+
if (target && !hasOwn(target, TO_STRING_TAG$1)) {
|
|
1315
|
+
defineProperty$1(target, TO_STRING_TAG$1, { configurable: true, value: TAG });
|
|
1315
1316
|
}
|
|
1316
1317
|
};
|
|
1317
1318
|
|
|
@@ -1331,19 +1332,19 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
|
|
|
1331
1332
|
return IteratorConstructor;
|
|
1332
1333
|
};
|
|
1333
1334
|
|
|
1334
|
-
var isCallable$
|
|
1335
|
+
var isCallable$1 = isCallable$e;
|
|
1335
1336
|
|
|
1336
|
-
var $String
|
|
1337
|
+
var $String = String;
|
|
1337
1338
|
var $TypeError$1 = TypeError;
|
|
1338
1339
|
|
|
1339
1340
|
var aPossiblePrototype$1 = function (argument) {
|
|
1340
|
-
if (typeof argument == 'object' || isCallable$
|
|
1341
|
-
throw $TypeError$1("Can't set " + $String
|
|
1341
|
+
if (typeof argument == 'object' || isCallable$1(argument)) return argument;
|
|
1342
|
+
throw $TypeError$1("Can't set " + $String(argument) + ' as a prototype');
|
|
1342
1343
|
};
|
|
1343
1344
|
|
|
1344
1345
|
/* eslint-disable no-proto -- safe */
|
|
1345
1346
|
|
|
1346
|
-
var uncurryThis
|
|
1347
|
+
var uncurryThis = functionUncurryThis;
|
|
1347
1348
|
var anObject = anObject$5;
|
|
1348
1349
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1349
1350
|
|
|
@@ -1357,7 +1358,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1357
1358
|
var setter;
|
|
1358
1359
|
try {
|
|
1359
1360
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1360
|
-
setter = uncurryThis
|
|
1361
|
+
setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
1361
1362
|
setter(test, []);
|
|
1362
1363
|
CORRECT_SETTER = test instanceof Array;
|
|
1363
1364
|
} catch (error) { /* empty */ }
|
|
@@ -1370,17 +1371,17 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1370
1371
|
};
|
|
1371
1372
|
}() : undefined);
|
|
1372
1373
|
|
|
1373
|
-
var $$
|
|
1374
|
+
var $$1 = _export;
|
|
1374
1375
|
var call = functionCall;
|
|
1375
1376
|
var FunctionName = functionName;
|
|
1376
|
-
var isCallable
|
|
1377
|
+
var isCallable = isCallable$e;
|
|
1377
1378
|
var createIteratorConstructor = iteratorCreateConstructor;
|
|
1378
1379
|
var getPrototypeOf = objectGetPrototypeOf;
|
|
1379
1380
|
var setPrototypeOf = objectSetPrototypeOf;
|
|
1380
1381
|
var setToStringTag = setToStringTag$2;
|
|
1381
1382
|
var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
|
|
1382
1383
|
var defineBuiltIn = defineBuiltIn$3;
|
|
1383
|
-
var wellKnownSymbol$
|
|
1384
|
+
var wellKnownSymbol$1 = wellKnownSymbol$6;
|
|
1384
1385
|
var Iterators$1 = iterators;
|
|
1385
1386
|
var IteratorsCore = iteratorsCore;
|
|
1386
1387
|
|
|
@@ -1388,7 +1389,7 @@ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
|
|
|
1388
1389
|
var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
|
|
1389
1390
|
var IteratorPrototype = IteratorsCore.IteratorPrototype;
|
|
1390
1391
|
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
1391
|
-
var ITERATOR$1 = wellKnownSymbol$
|
|
1392
|
+
var ITERATOR$1 = wellKnownSymbol$1('iterator');
|
|
1392
1393
|
var KEYS = 'keys';
|
|
1393
1394
|
var VALUES = 'values';
|
|
1394
1395
|
var ENTRIES = 'entries';
|
|
@@ -1425,7 +1426,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
1425
1426
|
if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
|
|
1426
1427
|
if (setPrototypeOf) {
|
|
1427
1428
|
setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
|
|
1428
|
-
} else if (!isCallable
|
|
1429
|
+
} else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
|
|
1429
1430
|
defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
|
|
1430
1431
|
}
|
|
1431
1432
|
}
|
|
@@ -1455,7 +1456,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
1455
1456
|
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
1456
1457
|
defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
|
|
1457
1458
|
}
|
|
1458
|
-
} else $$
|
|
1459
|
+
} else $$1({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
1459
1460
|
}
|
|
1460
1461
|
|
|
1461
1462
|
// define iterator
|
|
@@ -1477,10 +1478,10 @@ var toIndexedObject = toIndexedObject$5;
|
|
|
1477
1478
|
var addToUnscopables = addToUnscopables$1;
|
|
1478
1479
|
var Iterators = iterators;
|
|
1479
1480
|
var InternalStateModule = internalState;
|
|
1480
|
-
var defineProperty
|
|
1481
|
+
var defineProperty = objectDefineProperty.f;
|
|
1481
1482
|
var defineIterator = iteratorDefine;
|
|
1482
1483
|
var createIterResultObject = createIterResultObject$1;
|
|
1483
|
-
var DESCRIPTORS
|
|
1484
|
+
var DESCRIPTORS = descriptors;
|
|
1484
1485
|
|
|
1485
1486
|
var ARRAY_ITERATOR = 'Array Iterator';
|
|
1486
1487
|
var setInternalState = InternalStateModule.set;
|
|
@@ -1530,8 +1531,8 @@ addToUnscopables('values');
|
|
|
1530
1531
|
addToUnscopables('entries');
|
|
1531
1532
|
|
|
1532
1533
|
// V8 ~ Chrome 45- bug
|
|
1533
|
-
if (DESCRIPTORS
|
|
1534
|
-
defineProperty
|
|
1534
|
+
if (DESCRIPTORS && values.name !== 'values') try {
|
|
1535
|
+
defineProperty(values, 'name', { value: 'values' });
|
|
1535
1536
|
} catch (error) { /* empty */ }
|
|
1536
1537
|
|
|
1537
1538
|
// iterable DOM collections
|
|
@@ -1578,15 +1579,15 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
|
|
|
1578
1579
|
|
|
1579
1580
|
var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
|
|
1580
1581
|
|
|
1581
|
-
var global$
|
|
1582
|
+
var global$2 = global$c;
|
|
1582
1583
|
var DOMIterables = domIterables;
|
|
1583
1584
|
var DOMTokenListPrototype = domTokenListPrototype;
|
|
1584
1585
|
var ArrayIteratorMethods = es_array_iterator;
|
|
1585
1586
|
var createNonEnumerableProperty = createNonEnumerableProperty$4;
|
|
1586
|
-
var wellKnownSymbol
|
|
1587
|
+
var wellKnownSymbol = wellKnownSymbol$6;
|
|
1587
1588
|
|
|
1588
|
-
var ITERATOR = wellKnownSymbol
|
|
1589
|
-
var TO_STRING_TAG
|
|
1589
|
+
var ITERATOR = wellKnownSymbol('iterator');
|
|
1590
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
1590
1591
|
var ArrayValues = ArrayIteratorMethods.values;
|
|
1591
1592
|
|
|
1592
1593
|
var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
@@ -1597,8 +1598,8 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
|
1597
1598
|
} catch (error) {
|
|
1598
1599
|
CollectionPrototype[ITERATOR] = ArrayValues;
|
|
1599
1600
|
}
|
|
1600
|
-
if (!CollectionPrototype[TO_STRING_TAG
|
|
1601
|
-
createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG
|
|
1601
|
+
if (!CollectionPrototype[TO_STRING_TAG]) {
|
|
1602
|
+
createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
|
|
1602
1603
|
}
|
|
1603
1604
|
if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
|
|
1604
1605
|
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
@@ -1612,7 +1613,7 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
|
1612
1613
|
};
|
|
1613
1614
|
|
|
1614
1615
|
for (var COLLECTION_NAME in DOMIterables) {
|
|
1615
|
-
handlePrototype(global$
|
|
1616
|
+
handlePrototype(global$2[COLLECTION_NAME] && global$2[COLLECTION_NAME].prototype, COLLECTION_NAME);
|
|
1616
1617
|
}
|
|
1617
1618
|
|
|
1618
1619
|
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
@@ -1654,159 +1655,6 @@ function __awaiter(thisArg, _arguments, P, generator) {
|
|
|
1654
1655
|
});
|
|
1655
1656
|
}
|
|
1656
1657
|
|
|
1657
|
-
var wellKnownSymbol$1 = wellKnownSymbol$8;
|
|
1658
|
-
|
|
1659
|
-
var TO_STRING_TAG$1 = wellKnownSymbol$1('toStringTag');
|
|
1660
|
-
var test = {};
|
|
1661
|
-
|
|
1662
|
-
test[TO_STRING_TAG$1] = 'z';
|
|
1663
|
-
|
|
1664
|
-
var toStringTagSupport = String(test) === '[object z]';
|
|
1665
|
-
|
|
1666
|
-
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
1667
|
-
var isCallable$1 = isCallable$g;
|
|
1668
|
-
var classofRaw = classofRaw$1;
|
|
1669
|
-
var wellKnownSymbol = wellKnownSymbol$8;
|
|
1670
|
-
|
|
1671
|
-
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
1672
|
-
var $Object = Object;
|
|
1673
|
-
|
|
1674
|
-
// ES3 wrong here
|
|
1675
|
-
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
1676
|
-
|
|
1677
|
-
// fallback for IE11 Script Access Denied error
|
|
1678
|
-
var tryGet = function (it, key) {
|
|
1679
|
-
try {
|
|
1680
|
-
return it[key];
|
|
1681
|
-
} catch (error) { /* empty */ }
|
|
1682
|
-
};
|
|
1683
|
-
|
|
1684
|
-
// getting tag from ES6+ `Object.prototype.toString`
|
|
1685
|
-
var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
1686
|
-
var O, tag, result;
|
|
1687
|
-
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
1688
|
-
// @@toStringTag case
|
|
1689
|
-
: typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
|
|
1690
|
-
// builtinTag case
|
|
1691
|
-
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
1692
|
-
// ES3 arguments fallback
|
|
1693
|
-
: (result = classofRaw(O)) == 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
|
|
1694
|
-
};
|
|
1695
|
-
|
|
1696
|
-
var classof$1 = classof$2;
|
|
1697
|
-
|
|
1698
|
-
var $String = String;
|
|
1699
|
-
|
|
1700
|
-
var toString$1 = function (argument) {
|
|
1701
|
-
if (classof$1(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
1702
|
-
return $String(argument);
|
|
1703
|
-
};
|
|
1704
|
-
|
|
1705
|
-
var $$1 = _export;
|
|
1706
|
-
var DESCRIPTORS = descriptors;
|
|
1707
|
-
var global$2 = global$d;
|
|
1708
|
-
var uncurryThis = functionUncurryThis;
|
|
1709
|
-
var hasOwn = hasOwnProperty_1;
|
|
1710
|
-
var isCallable = isCallable$g;
|
|
1711
|
-
var isPrototypeOf = objectIsPrototypeOf;
|
|
1712
|
-
var toString = toString$1;
|
|
1713
|
-
var defineProperty = objectDefineProperty.f;
|
|
1714
|
-
var copyConstructorProperties = copyConstructorProperties$2;
|
|
1715
|
-
|
|
1716
|
-
var NativeSymbol = global$2.Symbol;
|
|
1717
|
-
var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
|
|
1718
|
-
|
|
1719
|
-
if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) ||
|
|
1720
|
-
// Safari 12 bug
|
|
1721
|
-
NativeSymbol().description !== undefined
|
|
1722
|
-
)) {
|
|
1723
|
-
var EmptyStringDescriptionStore = {};
|
|
1724
|
-
// wrap Symbol constructor for correct work with undefined description
|
|
1725
|
-
var SymbolWrapper = function Symbol() {
|
|
1726
|
-
var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]);
|
|
1727
|
-
var result = isPrototypeOf(SymbolPrototype, this)
|
|
1728
|
-
? new NativeSymbol(description)
|
|
1729
|
-
// in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
|
|
1730
|
-
: description === undefined ? NativeSymbol() : NativeSymbol(description);
|
|
1731
|
-
if (description === '') EmptyStringDescriptionStore[result] = true;
|
|
1732
|
-
return result;
|
|
1733
|
-
};
|
|
1734
|
-
|
|
1735
|
-
copyConstructorProperties(SymbolWrapper, NativeSymbol);
|
|
1736
|
-
SymbolWrapper.prototype = SymbolPrototype;
|
|
1737
|
-
SymbolPrototype.constructor = SymbolWrapper;
|
|
1738
|
-
|
|
1739
|
-
var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)';
|
|
1740
|
-
var thisSymbolValue = uncurryThis(SymbolPrototype.valueOf);
|
|
1741
|
-
var symbolDescriptiveString = uncurryThis(SymbolPrototype.toString);
|
|
1742
|
-
var regexp = /^Symbol\((.*)\)[^)]+$/;
|
|
1743
|
-
var replace = uncurryThis(''.replace);
|
|
1744
|
-
var stringSlice = uncurryThis(''.slice);
|
|
1745
|
-
|
|
1746
|
-
defineProperty(SymbolPrototype, 'description', {
|
|
1747
|
-
configurable: true,
|
|
1748
|
-
get: function description() {
|
|
1749
|
-
var symbol = thisSymbolValue(this);
|
|
1750
|
-
if (hasOwn(EmptyStringDescriptionStore, symbol)) return '';
|
|
1751
|
-
var string = symbolDescriptiveString(symbol);
|
|
1752
|
-
var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');
|
|
1753
|
-
return desc === '' ? undefined : desc;
|
|
1754
|
-
}
|
|
1755
|
-
});
|
|
1756
|
-
|
|
1757
|
-
$$1({ global: true, constructor: true, forced: true }, {
|
|
1758
|
-
Symbol: SymbolWrapper
|
|
1759
|
-
});
|
|
1760
|
-
}
|
|
1761
|
-
|
|
1762
|
-
const useNinetailed = () => {
|
|
1763
|
-
const ninetailed = useContext(NinetailedContext);
|
|
1764
|
-
if (ninetailed === undefined) {
|
|
1765
|
-
throw new Error('The component using the the context must be a descendant of the NinetailedProvider');
|
|
1766
|
-
}
|
|
1767
|
-
return ninetailed;
|
|
1768
|
-
};
|
|
1769
|
-
|
|
1770
|
-
const TrackExperience = ({
|
|
1771
|
-
children,
|
|
1772
|
-
experience,
|
|
1773
|
-
variant,
|
|
1774
|
-
profile
|
|
1775
|
-
}) => {
|
|
1776
|
-
const ninetailed = useNinetailed();
|
|
1777
|
-
const {
|
|
1778
|
-
ref,
|
|
1779
|
-
inView
|
|
1780
|
-
} = useInView({
|
|
1781
|
-
triggerOnce: true
|
|
1782
|
-
});
|
|
1783
|
-
useEffect(() => {
|
|
1784
|
-
if (isBrowser() && inView) {
|
|
1785
|
-
const distribution = selectDistribution({
|
|
1786
|
-
experience,
|
|
1787
|
-
profile
|
|
1788
|
-
});
|
|
1789
|
-
ninetailed.trackHasSeenExperience({
|
|
1790
|
-
experience: {
|
|
1791
|
-
id: experience.id,
|
|
1792
|
-
type: experience.type,
|
|
1793
|
-
name: experience.name || '',
|
|
1794
|
-
description: experience.description || ''
|
|
1795
|
-
},
|
|
1796
|
-
audience: experience.audience,
|
|
1797
|
-
selectedVariant: variant,
|
|
1798
|
-
selectedVariantIndex: distribution.index
|
|
1799
|
-
});
|
|
1800
|
-
}
|
|
1801
|
-
}, [inView]);
|
|
1802
|
-
return jsxs(Fragment, {
|
|
1803
|
-
children: [jsx("div", {
|
|
1804
|
-
ref: ref,
|
|
1805
|
-
id: "nt-experience-handle"
|
|
1806
|
-
}), children]
|
|
1807
|
-
});
|
|
1808
|
-
};
|
|
1809
|
-
|
|
1810
1658
|
var aCallable = aCallable$2;
|
|
1811
1659
|
var toObject = toObject$4;
|
|
1812
1660
|
var IndexedObject = indexedObject;
|
|
@@ -1860,8 +1708,8 @@ var arrayMethodIsStrict$1 = function (METHOD_NAME, argument) {
|
|
|
1860
1708
|
});
|
|
1861
1709
|
};
|
|
1862
1710
|
|
|
1863
|
-
var classof = classofRaw
|
|
1864
|
-
var global$1 = global$
|
|
1711
|
+
var classof = classofRaw;
|
|
1712
|
+
var global$1 = global$c;
|
|
1865
1713
|
|
|
1866
1714
|
var engineIsNode = classof(global$1.process) == 'process';
|
|
1867
1715
|
|
|
@@ -1885,6 +1733,14 @@ $({ target: 'Array', proto: true, forced: !STRICT_METHOD || CHROME_BUG }, {
|
|
|
1885
1733
|
}
|
|
1886
1734
|
});
|
|
1887
1735
|
|
|
1736
|
+
const useNinetailed = () => {
|
|
1737
|
+
const ninetailed = useContext(NinetailedContext);
|
|
1738
|
+
if (ninetailed === undefined) {
|
|
1739
|
+
throw new Error('The component using the the context must be a descendant of the NinetailedProvider');
|
|
1740
|
+
}
|
|
1741
|
+
return ninetailed;
|
|
1742
|
+
};
|
|
1743
|
+
|
|
1888
1744
|
const useProfile = () => {
|
|
1889
1745
|
const ninetailed = useNinetailed();
|
|
1890
1746
|
const [profileState, setProfileState] = useState(ninetailed.profileState);
|
|
@@ -1988,21 +1844,26 @@ const useExperience = ({
|
|
|
1988
1844
|
const overrideResult = _a => {
|
|
1989
1845
|
var {
|
|
1990
1846
|
experience: originalExperience,
|
|
1991
|
-
variant: originalVariant
|
|
1847
|
+
variant: originalVariant,
|
|
1848
|
+
variantIndex: originalVariantIndex
|
|
1992
1849
|
} = _a,
|
|
1993
|
-
other = __rest(_a, ["experience", "variant"]);
|
|
1850
|
+
other = __rest(_a, ["experience", "variant", "variantIndex"]);
|
|
1994
1851
|
const {
|
|
1995
1852
|
experience,
|
|
1996
|
-
variant
|
|
1853
|
+
variant,
|
|
1854
|
+
variantIndex
|
|
1997
1855
|
} = experienceSelectionMiddleware({
|
|
1998
1856
|
experience: originalExperience,
|
|
1999
|
-
variant: originalVariant
|
|
1857
|
+
variant: originalVariant,
|
|
1858
|
+
variantIndex: originalVariantIndex
|
|
2000
1859
|
});
|
|
2001
1860
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2002
1861
|
// @ts-ignore
|
|
2003
1862
|
return Object.assign(Object.assign({}, other), {
|
|
1863
|
+
audience: (experience === null || experience === void 0 ? void 0 : experience.audience) ? experience.audience : null,
|
|
2004
1864
|
experience,
|
|
2005
|
-
variant
|
|
1865
|
+
variant,
|
|
1866
|
+
variantIndex
|
|
2006
1867
|
});
|
|
2007
1868
|
};
|
|
2008
1869
|
const baseReturn = Object.assign(Object.assign({}, profileState), {
|
|
@@ -2011,7 +1872,8 @@ const useExperience = ({
|
|
|
2011
1872
|
});
|
|
2012
1873
|
const emptyReturn = Object.assign(Object.assign({}, baseReturn), {
|
|
2013
1874
|
experience: null,
|
|
2014
|
-
variant:
|
|
1875
|
+
variant: baseline,
|
|
1876
|
+
variantIndex: 0,
|
|
2015
1877
|
audience: null,
|
|
2016
1878
|
isPersonalized: false,
|
|
2017
1879
|
profile: null
|
|
@@ -2044,31 +1906,22 @@ const useExperience = ({
|
|
|
2044
1906
|
profile
|
|
2045
1907
|
}));
|
|
2046
1908
|
}
|
|
2047
|
-
const
|
|
2048
|
-
|
|
1909
|
+
const {
|
|
1910
|
+
variant,
|
|
1911
|
+
index
|
|
1912
|
+
} = selectExperienceVariant({
|
|
2049
1913
|
baseline,
|
|
2050
1914
|
experience,
|
|
2051
1915
|
profile
|
|
2052
1916
|
});
|
|
2053
|
-
if (!variant) {
|
|
2054
|
-
return overrideResult(Object.assign(Object.assign({}, baseReturn), {
|
|
2055
|
-
status: 'success',
|
|
2056
|
-
loading: false,
|
|
2057
|
-
error: null,
|
|
2058
|
-
experience,
|
|
2059
|
-
variant: null,
|
|
2060
|
-
audience: audience ? audience : null,
|
|
2061
|
-
profile,
|
|
2062
|
-
isPersonalized: false
|
|
2063
|
-
}));
|
|
2064
|
-
}
|
|
2065
1917
|
return overrideResult(Object.assign(Object.assign({}, baseReturn), {
|
|
2066
1918
|
status: 'success',
|
|
2067
1919
|
loading: false,
|
|
2068
1920
|
error: null,
|
|
2069
1921
|
experience,
|
|
2070
1922
|
variant,
|
|
2071
|
-
|
|
1923
|
+
variantIndex: index,
|
|
1924
|
+
audience: experience.audience ? experience.audience : null,
|
|
2072
1925
|
profile,
|
|
2073
1926
|
isPersonalized: true
|
|
2074
1927
|
}));
|
|
@@ -2079,6 +1932,36 @@ const useJoinExperiment = () => {
|
|
|
2079
1932
|
return context.joinExperiment;
|
|
2080
1933
|
};
|
|
2081
1934
|
|
|
1935
|
+
const ComponentMarker = /*#__PURE__*/forwardRef((_, ref) => {
|
|
1936
|
+
const {
|
|
1937
|
+
logger
|
|
1938
|
+
} = useNinetailed();
|
|
1939
|
+
const markerRef = useRef(null);
|
|
1940
|
+
useEffect(() => {
|
|
1941
|
+
// TODO: Create a better message
|
|
1942
|
+
logger.debug('Using fallback mechanism to select component.');
|
|
1943
|
+
}, [logger]);
|
|
1944
|
+
useEffect(() => {
|
|
1945
|
+
if (markerRef.current) {
|
|
1946
|
+
const nextSibling = markerRef.current.nextSibling;
|
|
1947
|
+
if (ref) {
|
|
1948
|
+
if (typeof ref === 'function') {
|
|
1949
|
+
ref(nextSibling);
|
|
1950
|
+
} else {
|
|
1951
|
+
ref.current = nextSibling;
|
|
1952
|
+
}
|
|
1953
|
+
}
|
|
1954
|
+
}
|
|
1955
|
+
}, []);
|
|
1956
|
+
return jsx("div", {
|
|
1957
|
+
className: "nt-cmp-marker",
|
|
1958
|
+
style: {
|
|
1959
|
+
display: 'none !important'
|
|
1960
|
+
},
|
|
1961
|
+
ref: markerRef
|
|
1962
|
+
});
|
|
1963
|
+
});
|
|
1964
|
+
|
|
2082
1965
|
const DefaultExperienceLoadingComponent = _a => {
|
|
2083
1966
|
var {
|
|
2084
1967
|
component: Component,
|
|
@@ -2132,12 +2015,17 @@ const Experience = _a => {
|
|
|
2132
2015
|
passthroughProps
|
|
2133
2016
|
} = _a,
|
|
2134
2017
|
baseline = __rest(_a, ["experiences", "component", "loadingComponent", "passthroughProps"]);
|
|
2018
|
+
const {
|
|
2019
|
+
observeElement,
|
|
2020
|
+
unobserveElement
|
|
2021
|
+
} = useNinetailed();
|
|
2135
2022
|
// TODO we actually could hook into the experience hook here with the plugins
|
|
2136
2023
|
const {
|
|
2137
2024
|
status,
|
|
2138
2025
|
hasVariants,
|
|
2139
2026
|
experience,
|
|
2140
2027
|
variant,
|
|
2028
|
+
variantIndex,
|
|
2141
2029
|
audience,
|
|
2142
2030
|
isPersonalized,
|
|
2143
2031
|
profile
|
|
@@ -2146,6 +2034,10 @@ const Experience = _a => {
|
|
|
2146
2034
|
experiences
|
|
2147
2035
|
});
|
|
2148
2036
|
const joinExperiment = useJoinExperiment();
|
|
2037
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
2038
|
+
// @ts-ignore
|
|
2039
|
+
const isComponentForwardRef = isForwardRef(jsx(Component, {}));
|
|
2040
|
+
const componentRef = useRef(null);
|
|
2149
2041
|
useEffect(() => {
|
|
2150
2042
|
if (status === 'success' && experience && profile) {
|
|
2151
2043
|
joinExperiment({
|
|
@@ -2155,10 +2047,33 @@ const Experience = _a => {
|
|
|
2155
2047
|
});
|
|
2156
2048
|
}
|
|
2157
2049
|
}, [status, experience, profile]);
|
|
2050
|
+
useEffect(() => {
|
|
2051
|
+
const componentElement = componentRef.current;
|
|
2052
|
+
if (componentElement) {
|
|
2053
|
+
observeElement({
|
|
2054
|
+
element: componentElement,
|
|
2055
|
+
experience,
|
|
2056
|
+
audience,
|
|
2057
|
+
variant,
|
|
2058
|
+
variantIndex
|
|
2059
|
+
});
|
|
2060
|
+
}
|
|
2061
|
+
return () => {
|
|
2062
|
+
if (componentElement) {
|
|
2063
|
+
unobserveElement(componentElement);
|
|
2064
|
+
}
|
|
2065
|
+
};
|
|
2066
|
+
}, [observeElement, unobserveElement, experience, baseline, variant, variantIndex, audience]);
|
|
2158
2067
|
if (!hasVariants) {
|
|
2159
|
-
return
|
|
2160
|
-
|
|
2161
|
-
|
|
2068
|
+
return jsxs(Fragment, {
|
|
2069
|
+
children: [!isComponentForwardRef && jsx(ComponentMarker, {
|
|
2070
|
+
ref: componentRef
|
|
2071
|
+
}, `marker-no-variants-${(experience === null || experience === void 0 ? void 0 : experience.id) || 'baseline'}-${variant.id}`), /*#__PURE__*/createElement$1(Component, Object.assign({}, passthroughProps, baseline, {
|
|
2072
|
+
key: baseline.id
|
|
2073
|
+
}, isComponentForwardRef ? {
|
|
2074
|
+
ref: componentRef
|
|
2075
|
+
} : {}))]
|
|
2076
|
+
});
|
|
2162
2077
|
}
|
|
2163
2078
|
if (status === 'loading') {
|
|
2164
2079
|
return /*#__PURE__*/createElement$1(LoadingComponent, Object.assign({}, baseline, {
|
|
@@ -2168,50 +2083,27 @@ const Experience = _a => {
|
|
|
2168
2083
|
component: Component
|
|
2169
2084
|
}));
|
|
2170
2085
|
}
|
|
2171
|
-
if (!experience) {
|
|
2172
|
-
return jsx(Component, Object.assign({}, passthroughProps, baseline, {
|
|
2173
|
-
ninetailed: {
|
|
2174
|
-
isPersonalized: false,
|
|
2175
|
-
audience: {
|
|
2176
|
-
id: 'baseline'
|
|
2177
|
-
}
|
|
2178
|
-
}
|
|
2179
|
-
}));
|
|
2180
|
-
}
|
|
2181
|
-
if (!variant) {
|
|
2182
|
-
return jsx(TrackExperience, Object.assign({
|
|
2183
|
-
experience: experience,
|
|
2184
|
-
variant: baseline,
|
|
2185
|
-
// the profile is definitely defined, otherwise there wouldn't be an experience selected
|
|
2186
|
-
profile: profile
|
|
2187
|
-
}, {
|
|
2188
|
-
children: jsx(Component, Object.assign({}, passthroughProps, baseline, {
|
|
2189
|
-
ninetailed: {
|
|
2190
|
-
isPersonalized: false,
|
|
2191
|
-
audience: {
|
|
2192
|
-
id: (audience === null || audience === void 0 ? void 0 : audience.id) || 'all visitors'
|
|
2193
|
-
}
|
|
2194
|
-
}
|
|
2195
|
-
}))
|
|
2196
|
-
}), baseline.id);
|
|
2197
|
-
}
|
|
2198
2086
|
const isVariantHidden = 'hidden' in variant && variant.hidden;
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
children: !
|
|
2206
|
-
|
|
2087
|
+
if (isVariantHidden) {
|
|
2088
|
+
return jsx(ComponentMarker, {
|
|
2089
|
+
ref: componentRef
|
|
2090
|
+
}, `marker-hidden-${(experience === null || experience === void 0 ? void 0 : experience.id) || 'baseline'}-${variant.id}`);
|
|
2091
|
+
}
|
|
2092
|
+
return jsxs(Fragment, {
|
|
2093
|
+
children: [!isComponentForwardRef && jsx(ComponentMarker, {
|
|
2094
|
+
ref: componentRef
|
|
2095
|
+
}, `marker-${(experience === null || experience === void 0 ? void 0 : experience.id) || 'baseline'}-${variant.id}`), /*#__PURE__*/createElement$1(Component, Object.assign({}, Object.assign(Object.assign({}, passthroughProps), variant), {
|
|
2096
|
+
key: `${(experience === null || experience === void 0 ? void 0 : experience.id) || 'baseline'}-${variant.id}`,
|
|
2207
2097
|
ninetailed: {
|
|
2208
2098
|
isPersonalized,
|
|
2209
2099
|
audience: {
|
|
2210
2100
|
id: (audience === null || audience === void 0 ? void 0 : audience.id) || 'all visitors'
|
|
2211
2101
|
}
|
|
2212
2102
|
}
|
|
2213
|
-
}
|
|
2214
|
-
|
|
2103
|
+
}, isComponentForwardRef ? {
|
|
2104
|
+
ref: componentRef
|
|
2105
|
+
} : {}))]
|
|
2106
|
+
});
|
|
2215
2107
|
};
|
|
2216
2108
|
|
|
2217
2109
|
const ESRContext = /*#__PURE__*/React.createContext(undefined);
|
|
@@ -2382,11 +2274,13 @@ const NinetailedProvider = props => {
|
|
|
2382
2274
|
environment,
|
|
2383
2275
|
preview,
|
|
2384
2276
|
url,
|
|
2277
|
+
profile,
|
|
2385
2278
|
locale,
|
|
2386
2279
|
requestTimeout,
|
|
2387
2280
|
plugins = [],
|
|
2388
2281
|
onLog,
|
|
2389
|
-
onError
|
|
2282
|
+
onError,
|
|
2283
|
+
componentViewTrackingThreshold
|
|
2390
2284
|
} = props;
|
|
2391
2285
|
return new Ninetailed({
|
|
2392
2286
|
clientId,
|
|
@@ -2395,10 +2289,12 @@ const NinetailedProvider = props => {
|
|
|
2395
2289
|
}, {
|
|
2396
2290
|
url,
|
|
2397
2291
|
plugins,
|
|
2292
|
+
profile,
|
|
2398
2293
|
locale,
|
|
2399
2294
|
requestTimeout,
|
|
2400
2295
|
onLog,
|
|
2401
|
-
onError
|
|
2296
|
+
onError,
|
|
2297
|
+
componentViewTrackingThreshold
|
|
2402
2298
|
});
|
|
2403
2299
|
}, []);
|
|
2404
2300
|
const {
|
|
@@ -2543,4 +2439,4 @@ const MergeTag = ({
|
|
|
2543
2439
|
});
|
|
2544
2440
|
};
|
|
2545
2441
|
|
|
2546
|
-
export { DefaultExperienceLoadingComponent, ESRLoadingComponent, ESRProvider, Experience, ExperimentsProvider, MergeTag, NinetailedProvider, Personalize,
|
|
2442
|
+
export { DefaultExperienceLoadingComponent, ESRLoadingComponent, ESRProvider, Experience, ExperimentsProvider, MergeTag, NinetailedProvider, Personalize, TrackHasSeenComponent, useExperience, useExperiments, useJoinExperiment, useNinetailed, usePersonalize, useProfile };
|