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