@ninetailed/experience.js 1.8.1 → 2.0.0-beta.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.esm.js CHANGED
@@ -1,10 +1,13 @@
1
1
  import get$2 from 'lodash/get';
2
2
  import unionBy from 'lodash/unionBy';
3
3
  import { buildEmptyCache, buildTrackEvent, buildIdentifyEvent, buildPageEvent } from '@ninetailed/experience.js-shared';
4
+ import * as loglevel from 'loglevel';
4
5
  import Analytics from 'analytics';
5
6
  import flatten from 'lodash/flatten';
6
7
  import find from 'lodash/find';
7
8
  import includes from 'lodash/includes';
9
+ import pickBy from 'lodash/pickBy';
10
+ import { murmur3 } from 'murmurhash-js';
8
11
 
9
12
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
10
13
 
@@ -13,7 +16,7 @@ var check = function (it) {
13
16
  };
14
17
 
15
18
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
16
- var global$B =
19
+ var global$H =
17
20
  // eslint-disable-next-line es/no-global-this -- safe
18
21
  check(typeof globalThis == 'object' && globalThis) ||
19
22
  check(typeof window == 'object' && window) ||
@@ -25,7 +28,7 @@ var global$B =
25
28
 
26
29
  var objectGetOwnPropertyDescriptor = {};
27
30
 
28
- var fails$c = function (exec) {
31
+ var fails$h = function (exec) {
29
32
  try {
30
33
  return !!exec();
31
34
  } catch (error) {
@@ -33,17 +36,17 @@ var fails$c = function (exec) {
33
36
  }
34
37
  };
35
38
 
36
- var fails$b = fails$c;
39
+ var fails$g = fails$h;
37
40
 
38
41
  // Detect IE8's incomplete defineProperty implementation
39
- var descriptors = !fails$b(function () {
42
+ var descriptors = !fails$g(function () {
40
43
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
41
44
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
42
45
  });
43
46
 
44
- var fails$a = fails$c;
47
+ var fails$f = fails$h;
45
48
 
46
- var functionBindNative = !fails$a(function () {
49
+ var functionBindNative = !fails$f(function () {
47
50
  var test = (function () { /* empty */ }).bind();
48
51
  // eslint-disable-next-line no-prototype-builtins -- safe
49
52
  return typeof test != 'function' || test.hasOwnProperty('prototype');
@@ -51,25 +54,25 @@ var functionBindNative = !fails$a(function () {
51
54
 
52
55
  var NATIVE_BIND$3 = functionBindNative;
53
56
 
54
- var call$b = Function.prototype.call;
57
+ var call$e = Function.prototype.call;
55
58
 
56
- var functionCall = NATIVE_BIND$3 ? call$b.bind(call$b) : function () {
57
- return call$b.apply(call$b, arguments);
59
+ var functionCall = NATIVE_BIND$3 ? call$e.bind(call$e) : function () {
60
+ return call$e.apply(call$e, arguments);
58
61
  };
59
62
 
60
63
  var objectPropertyIsEnumerable = {};
61
64
 
62
65
  var $propertyIsEnumerable = {}.propertyIsEnumerable;
63
66
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
64
- var getOwnPropertyDescriptor$2 = Object.getOwnPropertyDescriptor;
67
+ var getOwnPropertyDescriptor$3 = Object.getOwnPropertyDescriptor;
65
68
 
66
69
  // Nashorn ~ JDK8 bug
67
- var NASHORN_BUG = getOwnPropertyDescriptor$2 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
70
+ var NASHORN_BUG = getOwnPropertyDescriptor$3 && !$propertyIsEnumerable.call({ 1: 2 }, 1);
68
71
 
69
72
  // `Object.prototype.propertyIsEnumerable` method implementation
70
73
  // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
71
74
  objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
72
- var descriptor = getOwnPropertyDescriptor$2(this, V);
75
+ var descriptor = getOwnPropertyDescriptor$3(this, V);
73
76
  return !!descriptor && descriptor.enumerable;
74
77
  } : $propertyIsEnumerable;
75
78
 
@@ -86,99 +89,99 @@ var NATIVE_BIND$2 = functionBindNative;
86
89
 
87
90
  var FunctionPrototype$2 = Function.prototype;
88
91
  var bind$5 = FunctionPrototype$2.bind;
89
- var call$a = FunctionPrototype$2.call;
90
- var uncurryThis$e = NATIVE_BIND$2 && bind$5.bind(call$a, call$a);
92
+ var call$d = FunctionPrototype$2.call;
93
+ var uncurryThis$k = NATIVE_BIND$2 && bind$5.bind(call$d, call$d);
91
94
 
92
95
  var functionUncurryThis = NATIVE_BIND$2 ? function (fn) {
93
- return fn && uncurryThis$e(fn);
96
+ return fn && uncurryThis$k(fn);
94
97
  } : function (fn) {
95
98
  return fn && function () {
96
- return call$a.apply(fn, arguments);
99
+ return call$d.apply(fn, arguments);
97
100
  };
98
101
  };
99
102
 
100
- var uncurryThis$d = functionUncurryThis;
103
+ var uncurryThis$j = functionUncurryThis;
101
104
 
102
- var toString$1 = uncurryThis$d({}.toString);
103
- var stringSlice = uncurryThis$d(''.slice);
105
+ var toString$6 = uncurryThis$j({}.toString);
106
+ var stringSlice$5 = uncurryThis$j(''.slice);
104
107
 
105
108
  var classofRaw$1 = function (it) {
106
- return stringSlice(toString$1(it), 8, -1);
109
+ return stringSlice$5(toString$6(it), 8, -1);
107
110
  };
108
111
 
109
- var global$A = global$B;
110
- var uncurryThis$c = functionUncurryThis;
111
- var fails$9 = fails$c;
112
- var classof$4 = classofRaw$1;
112
+ var global$G = global$H;
113
+ var uncurryThis$i = functionUncurryThis;
114
+ var fails$e = fails$h;
115
+ var classof$7 = classofRaw$1;
113
116
 
114
- var Object$5 = global$A.Object;
115
- var split = uncurryThis$c(''.split);
117
+ var Object$5 = global$G.Object;
118
+ var split = uncurryThis$i(''.split);
116
119
 
117
120
  // fallback for non-array-like ES3 and non-enumerable old V8 strings
118
- var indexedObject = fails$9(function () {
121
+ var indexedObject = fails$e(function () {
119
122
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
120
123
  // eslint-disable-next-line no-prototype-builtins -- safe
121
124
  return !Object$5('z').propertyIsEnumerable(0);
122
125
  }) ? function (it) {
123
- return classof$4(it) == 'String' ? split(it, '') : Object$5(it);
126
+ return classof$7(it) == 'String' ? split(it, '') : Object$5(it);
124
127
  } : Object$5;
125
128
 
126
- var global$z = global$B;
129
+ var global$F = global$H;
127
130
 
128
- var TypeError$e = global$z.TypeError;
131
+ var TypeError$g = global$F.TypeError;
129
132
 
130
133
  // `RequireObjectCoercible` abstract operation
131
134
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
132
- var requireObjectCoercible$2 = function (it) {
133
- if (it == undefined) throw TypeError$e("Can't call method on " + it);
135
+ var requireObjectCoercible$5 = function (it) {
136
+ if (it == undefined) throw TypeError$g("Can't call method on " + it);
134
137
  return it;
135
138
  };
136
139
 
137
140
  // toObject with fallback for non-array-like ES3 strings
138
141
  var IndexedObject$1 = indexedObject;
139
- var requireObjectCoercible$1 = requireObjectCoercible$2;
142
+ var requireObjectCoercible$4 = requireObjectCoercible$5;
140
143
 
141
144
  var toIndexedObject$5 = function (it) {
142
- return IndexedObject$1(requireObjectCoercible$1(it));
145
+ return IndexedObject$1(requireObjectCoercible$4(it));
143
146
  };
144
147
 
145
148
  // `IsCallable` abstract operation
146
149
  // https://tc39.es/ecma262/#sec-iscallable
147
- var isCallable$h = function (argument) {
150
+ var isCallable$j = function (argument) {
148
151
  return typeof argument == 'function';
149
152
  };
150
153
 
151
- var isCallable$g = isCallable$h;
154
+ var isCallable$i = isCallable$j;
152
155
 
153
- var isObject$7 = function (it) {
154
- return typeof it == 'object' ? it !== null : isCallable$g(it);
156
+ var isObject$8 = function (it) {
157
+ return typeof it == 'object' ? it !== null : isCallable$i(it);
155
158
  };
156
159
 
157
- var global$y = global$B;
158
- var isCallable$f = isCallable$h;
160
+ var global$E = global$H;
161
+ var isCallable$h = isCallable$j;
159
162
 
160
163
  var aFunction = function (argument) {
161
- return isCallable$f(argument) ? argument : undefined;
164
+ return isCallable$h(argument) ? argument : undefined;
162
165
  };
163
166
 
164
167
  var getBuiltIn$7 = function (namespace, method) {
165
- return arguments.length < 2 ? aFunction(global$y[namespace]) : global$y[namespace] && global$y[namespace][method];
168
+ return arguments.length < 2 ? aFunction(global$E[namespace]) : global$E[namespace] && global$E[namespace][method];
166
169
  };
167
170
 
168
- var uncurryThis$b = functionUncurryThis;
171
+ var uncurryThis$h = functionUncurryThis;
169
172
 
170
- var objectIsPrototypeOf = uncurryThis$b({}.isPrototypeOf);
173
+ var objectIsPrototypeOf = uncurryThis$h({}.isPrototypeOf);
171
174
 
172
175
  var getBuiltIn$6 = getBuiltIn$7;
173
176
 
174
177
  var engineUserAgent = getBuiltIn$6('navigator', 'userAgent') || '';
175
178
 
176
- var global$x = global$B;
179
+ var global$D = global$H;
177
180
  var userAgent$3 = engineUserAgent;
178
181
 
179
- var process$4 = global$x.process;
180
- var Deno = global$x.Deno;
181
- var versions = process$4 && process$4.versions || Deno && Deno.version;
182
+ var process$3 = global$D.process;
183
+ var Deno = global$D.Deno;
184
+ var versions = process$3 && process$3.versions || Deno && Deno.version;
182
185
  var v8 = versions && versions.v8;
183
186
  var match, version;
184
187
 
@@ -204,10 +207,10 @@ var engineV8Version = version;
204
207
  /* eslint-disable es/no-symbol -- required for testing */
205
208
 
206
209
  var V8_VERSION$1 = engineV8Version;
207
- var fails$8 = fails$c;
210
+ var fails$d = fails$h;
208
211
 
209
212
  // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
210
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$8(function () {
213
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$d(function () {
211
214
  var symbol = Symbol();
212
215
  // Chrome 38 Symbol has incorrect toString conversion
213
216
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -224,97 +227,97 @@ var useSymbolAsUid = NATIVE_SYMBOL$1
224
227
  && !Symbol.sham
225
228
  && typeof Symbol.iterator == 'symbol';
226
229
 
227
- var global$w = global$B;
230
+ var global$C = global$H;
228
231
  var getBuiltIn$5 = getBuiltIn$7;
229
- var isCallable$e = isCallable$h;
232
+ var isCallable$g = isCallable$j;
230
233
  var isPrototypeOf$2 = objectIsPrototypeOf;
231
234
  var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
232
235
 
233
- var Object$4 = global$w.Object;
236
+ var Object$4 = global$C.Object;
234
237
 
235
238
  var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
236
239
  return typeof it == 'symbol';
237
240
  } : function (it) {
238
241
  var $Symbol = getBuiltIn$5('Symbol');
239
- return isCallable$e($Symbol) && isPrototypeOf$2($Symbol.prototype, Object$4(it));
242
+ return isCallable$g($Symbol) && isPrototypeOf$2($Symbol.prototype, Object$4(it));
240
243
  };
241
244
 
242
- var global$v = global$B;
245
+ var global$B = global$H;
243
246
 
244
- var String$4 = global$v.String;
247
+ var String$5 = global$B.String;
245
248
 
246
249
  var tryToString$4 = function (argument) {
247
250
  try {
248
- return String$4(argument);
251
+ return String$5(argument);
249
252
  } catch (error) {
250
253
  return 'Object';
251
254
  }
252
255
  };
253
256
 
254
- var global$u = global$B;
255
- var isCallable$d = isCallable$h;
257
+ var global$A = global$H;
258
+ var isCallable$f = isCallable$j;
256
259
  var tryToString$3 = tryToString$4;
257
260
 
258
- var TypeError$d = global$u.TypeError;
261
+ var TypeError$f = global$A.TypeError;
259
262
 
260
263
  // `Assert: IsCallable(argument) is true`
261
264
  var aCallable$5 = function (argument) {
262
- if (isCallable$d(argument)) return argument;
263
- throw TypeError$d(tryToString$3(argument) + ' is not a function');
265
+ if (isCallable$f(argument)) return argument;
266
+ throw TypeError$f(tryToString$3(argument) + ' is not a function');
264
267
  };
265
268
 
266
269
  var aCallable$4 = aCallable$5;
267
270
 
268
271
  // `GetMethod` abstract operation
269
272
  // https://tc39.es/ecma262/#sec-getmethod
270
- var getMethod$3 = function (V, P) {
273
+ var getMethod$4 = function (V, P) {
271
274
  var func = V[P];
272
275
  return func == null ? undefined : aCallable$4(func);
273
276
  };
274
277
 
275
- var global$t = global$B;
276
- var call$9 = functionCall;
277
- var isCallable$c = isCallable$h;
278
- var isObject$6 = isObject$7;
278
+ var global$z = global$H;
279
+ var call$c = functionCall;
280
+ var isCallable$e = isCallable$j;
281
+ var isObject$7 = isObject$8;
279
282
 
280
- var TypeError$c = global$t.TypeError;
283
+ var TypeError$e = global$z.TypeError;
281
284
 
282
285
  // `OrdinaryToPrimitive` abstract operation
283
286
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
284
287
  var ordinaryToPrimitive$1 = function (input, pref) {
285
288
  var fn, val;
286
- if (pref === 'string' && isCallable$c(fn = input.toString) && !isObject$6(val = call$9(fn, input))) return val;
287
- if (isCallable$c(fn = input.valueOf) && !isObject$6(val = call$9(fn, input))) return val;
288
- if (pref !== 'string' && isCallable$c(fn = input.toString) && !isObject$6(val = call$9(fn, input))) return val;
289
- throw TypeError$c("Can't convert object to primitive value");
289
+ if (pref === 'string' && isCallable$e(fn = input.toString) && !isObject$7(val = call$c(fn, input))) return val;
290
+ if (isCallable$e(fn = input.valueOf) && !isObject$7(val = call$c(fn, input))) return val;
291
+ if (pref !== 'string' && isCallable$e(fn = input.toString) && !isObject$7(val = call$c(fn, input))) return val;
292
+ throw TypeError$e("Can't convert object to primitive value");
290
293
  };
291
294
 
292
- var shared$3 = {exports: {}};
295
+ var shared$4 = {exports: {}};
293
296
 
294
- var global$s = global$B;
297
+ var global$y = global$H;
295
298
 
296
299
  // eslint-disable-next-line es/no-object-defineproperty -- safe
297
300
  var defineProperty$3 = Object.defineProperty;
298
301
 
299
302
  var setGlobal$3 = function (key, value) {
300
303
  try {
301
- defineProperty$3(global$s, key, { value: value, configurable: true, writable: true });
304
+ defineProperty$3(global$y, key, { value: value, configurable: true, writable: true });
302
305
  } catch (error) {
303
- global$s[key] = value;
306
+ global$y[key] = value;
304
307
  } return value;
305
308
  };
306
309
 
307
- var global$r = global$B;
310
+ var global$x = global$H;
308
311
  var setGlobal$2 = setGlobal$3;
309
312
 
310
313
  var SHARED = '__core-js_shared__';
311
- var store$3 = global$r[SHARED] || setGlobal$2(SHARED, {});
314
+ var store$3 = global$x[SHARED] || setGlobal$2(SHARED, {});
312
315
 
313
316
  var sharedStore = store$3;
314
317
 
315
318
  var store$2 = sharedStore;
316
319
 
317
- (shared$3.exports = function (key, value) {
320
+ (shared$4.exports = function (key, value) {
318
321
  return store$2[key] || (store$2[key] = value !== undefined ? value : {});
319
322
  })('versions', []).push({
320
323
  version: '3.21.1',
@@ -324,51 +327,51 @@ var store$2 = sharedStore;
324
327
  source: 'https://github.com/zloirock/core-js'
325
328
  });
326
329
 
327
- var global$q = global$B;
328
- var requireObjectCoercible = requireObjectCoercible$2;
330
+ var global$w = global$H;
331
+ var requireObjectCoercible$3 = requireObjectCoercible$5;
329
332
 
330
- var Object$3 = global$q.Object;
333
+ var Object$3 = global$w.Object;
331
334
 
332
335
  // `ToObject` abstract operation
333
336
  // https://tc39.es/ecma262/#sec-toobject
334
- var toObject$3 = function (argument) {
335
- return Object$3(requireObjectCoercible(argument));
337
+ var toObject$4 = function (argument) {
338
+ return Object$3(requireObjectCoercible$3(argument));
336
339
  };
337
340
 
338
- var uncurryThis$a = functionUncurryThis;
339
- var toObject$2 = toObject$3;
341
+ var uncurryThis$g = functionUncurryThis;
342
+ var toObject$3 = toObject$4;
340
343
 
341
- var hasOwnProperty = uncurryThis$a({}.hasOwnProperty);
344
+ var hasOwnProperty = uncurryThis$g({}.hasOwnProperty);
342
345
 
343
346
  // `HasOwnProperty` abstract operation
344
347
  // https://tc39.es/ecma262/#sec-hasownproperty
345
348
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
346
- return hasOwnProperty(toObject$2(it), key);
349
+ return hasOwnProperty(toObject$3(it), key);
347
350
  };
348
351
 
349
- var uncurryThis$9 = functionUncurryThis;
352
+ var uncurryThis$f = functionUncurryThis;
350
353
 
351
354
  var id = 0;
352
355
  var postfix = Math.random();
353
- var toString = uncurryThis$9(1.0.toString);
356
+ var toString$5 = uncurryThis$f(1.0.toString);
354
357
 
355
358
  var uid$2 = function (key) {
356
- return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
359
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$5(++id + postfix, 36);
357
360
  };
358
361
 
359
- var global$p = global$B;
360
- var shared$2 = shared$3.exports;
362
+ var global$v = global$H;
363
+ var shared$3 = shared$4.exports;
361
364
  var hasOwn$9 = hasOwnProperty_1;
362
365
  var uid$1 = uid$2;
363
366
  var NATIVE_SYMBOL = nativeSymbol;
364
367
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
365
368
 
366
- var WellKnownSymbolsStore = shared$2('wks');
367
- var Symbol$1 = global$p.Symbol;
369
+ var WellKnownSymbolsStore = shared$3('wks');
370
+ var Symbol$1 = global$v.Symbol;
368
371
  var symbolFor = Symbol$1 && Symbol$1['for'];
369
372
  var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
370
373
 
371
- var wellKnownSymbol$e = function (name) {
374
+ var wellKnownSymbol$i = function (name) {
372
375
  if (!hasOwn$9(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {
373
376
  var description = 'Symbol.' + name;
374
377
  if (NATIVE_SYMBOL && hasOwn$9(Symbol$1, name)) {
@@ -381,28 +384,28 @@ var wellKnownSymbol$e = function (name) {
381
384
  } return WellKnownSymbolsStore[name];
382
385
  };
383
386
 
384
- var global$o = global$B;
385
- var call$8 = functionCall;
386
- var isObject$5 = isObject$7;
387
+ var global$u = global$H;
388
+ var call$b = functionCall;
389
+ var isObject$6 = isObject$8;
387
390
  var isSymbol$1 = isSymbol$2;
388
- var getMethod$2 = getMethod$3;
391
+ var getMethod$3 = getMethod$4;
389
392
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
390
- var wellKnownSymbol$d = wellKnownSymbol$e;
393
+ var wellKnownSymbol$h = wellKnownSymbol$i;
391
394
 
392
- var TypeError$b = global$o.TypeError;
393
- var TO_PRIMITIVE = wellKnownSymbol$d('toPrimitive');
395
+ var TypeError$d = global$u.TypeError;
396
+ var TO_PRIMITIVE = wellKnownSymbol$h('toPrimitive');
394
397
 
395
398
  // `ToPrimitive` abstract operation
396
399
  // https://tc39.es/ecma262/#sec-toprimitive
397
400
  var toPrimitive$1 = function (input, pref) {
398
- if (!isObject$5(input) || isSymbol$1(input)) return input;
399
- var exoticToPrim = getMethod$2(input, TO_PRIMITIVE);
401
+ if (!isObject$6(input) || isSymbol$1(input)) return input;
402
+ var exoticToPrim = getMethod$3(input, TO_PRIMITIVE);
400
403
  var result;
401
404
  if (exoticToPrim) {
402
405
  if (pref === undefined) pref = 'default';
403
- result = call$8(exoticToPrim, input, pref);
404
- if (!isObject$5(result) || isSymbol$1(result)) return result;
405
- throw TypeError$b("Can't convert object to primitive value");
406
+ result = call$b(exoticToPrim, input, pref);
407
+ if (!isObject$6(result) || isSymbol$1(result)) return result;
408
+ throw TypeError$d("Can't convert object to primitive value");
406
409
  }
407
410
  if (pref === undefined) pref = 'number';
408
411
  return ordinaryToPrimitive(input, pref);
@@ -418,23 +421,23 @@ var toPropertyKey$2 = function (argument) {
418
421
  return isSymbol(key) ? key : key + '';
419
422
  };
420
423
 
421
- var global$n = global$B;
422
- var isObject$4 = isObject$7;
424
+ var global$t = global$H;
425
+ var isObject$5 = isObject$8;
423
426
 
424
- var document$3 = global$n.document;
427
+ var document$3 = global$t.document;
425
428
  // typeof document.createElement is 'object' in old IE
426
- var EXISTS$1 = isObject$4(document$3) && isObject$4(document$3.createElement);
429
+ var EXISTS$1 = isObject$5(document$3) && isObject$5(document$3.createElement);
427
430
 
428
431
  var documentCreateElement$2 = function (it) {
429
432
  return EXISTS$1 ? document$3.createElement(it) : {};
430
433
  };
431
434
 
432
435
  var DESCRIPTORS$9 = descriptors;
433
- var fails$7 = fails$c;
436
+ var fails$c = fails$h;
434
437
  var createElement$1 = documentCreateElement$2;
435
438
 
436
439
  // Thanks to IE8 for its funny defineProperty
437
- var ie8DomDefine = !DESCRIPTORS$9 && !fails$7(function () {
440
+ var ie8DomDefine = !DESCRIPTORS$9 && !fails$c(function () {
438
441
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
439
442
  return Object.defineProperty(createElement$1('div'), 'a', {
440
443
  get: function () { return 7; }
@@ -442,7 +445,7 @@ var ie8DomDefine = !DESCRIPTORS$9 && !fails$7(function () {
442
445
  });
443
446
 
444
447
  var DESCRIPTORS$8 = descriptors;
445
- var call$7 = functionCall;
448
+ var call$a = functionCall;
446
449
  var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
447
450
  var createPropertyDescriptor$2 = createPropertyDescriptor$3;
448
451
  var toIndexedObject$4 = toIndexedObject$5;
@@ -461,17 +464,17 @@ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 :
461
464
  if (IE8_DOM_DEFINE$1) try {
462
465
  return $getOwnPropertyDescriptor$1(O, P);
463
466
  } catch (error) { /* empty */ }
464
- if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$7(propertyIsEnumerableModule$1.f, O, P), O[P]);
467
+ if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$a(propertyIsEnumerableModule$1.f, O, P), O[P]);
465
468
  };
466
469
 
467
470
  var objectDefineProperty = {};
468
471
 
469
472
  var DESCRIPTORS$7 = descriptors;
470
- var fails$6 = fails$c;
473
+ var fails$b = fails$h;
471
474
 
472
475
  // V8 ~ Chrome 36-
473
476
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
474
- var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$6(function () {
477
+ var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$b(function () {
475
478
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
476
479
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
477
480
  value: 42,
@@ -479,26 +482,26 @@ var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$6(function () {
479
482
  }).prototype != 42;
480
483
  });
481
484
 
482
- var global$m = global$B;
483
- var isObject$3 = isObject$7;
485
+ var global$s = global$H;
486
+ var isObject$4 = isObject$8;
484
487
 
485
- var String$3 = global$m.String;
486
- var TypeError$a = global$m.TypeError;
488
+ var String$4 = global$s.String;
489
+ var TypeError$c = global$s.TypeError;
487
490
 
488
491
  // `Assert: Type(argument) is Object`
489
- var anObject$a = function (argument) {
490
- if (isObject$3(argument)) return argument;
491
- throw TypeError$a(String$3(argument) + ' is not an object');
492
+ var anObject$d = function (argument) {
493
+ if (isObject$4(argument)) return argument;
494
+ throw TypeError$c(String$4(argument) + ' is not an object');
492
495
  };
493
496
 
494
- var global$l = global$B;
497
+ var global$r = global$H;
495
498
  var DESCRIPTORS$6 = descriptors;
496
499
  var IE8_DOM_DEFINE = ie8DomDefine;
497
500
  var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
498
- var anObject$9 = anObject$a;
501
+ var anObject$c = anObject$d;
499
502
  var toPropertyKey = toPropertyKey$2;
500
503
 
501
- var TypeError$9 = global$l.TypeError;
504
+ var TypeError$b = global$r.TypeError;
502
505
  // eslint-disable-next-line es/no-object-defineproperty -- safe
503
506
  var $defineProperty = Object.defineProperty;
504
507
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
@@ -510,9 +513,9 @@ var WRITABLE = 'writable';
510
513
  // `Object.defineProperty` method
511
514
  // https://tc39.es/ecma262/#sec-object.defineproperty
512
515
  objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
513
- anObject$9(O);
516
+ anObject$c(O);
514
517
  P = toPropertyKey(P);
515
- anObject$9(Attributes);
518
+ anObject$c(Attributes);
516
519
  if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
517
520
  var current = $getOwnPropertyDescriptor(O, P);
518
521
  if (current && current[WRITABLE]) {
@@ -525,13 +528,13 @@ objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
525
528
  }
526
529
  } return $defineProperty(O, P, Attributes);
527
530
  } : $defineProperty : function defineProperty(O, P, Attributes) {
528
- anObject$9(O);
531
+ anObject$c(O);
529
532
  P = toPropertyKey(P);
530
- anObject$9(Attributes);
533
+ anObject$c(Attributes);
531
534
  if (IE8_DOM_DEFINE) try {
532
535
  return $defineProperty(O, P, Attributes);
533
536
  } catch (error) { /* empty */ }
534
- if ('get' in Attributes || 'set' in Attributes) throw TypeError$9('Accessors not supported');
537
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError$b('Accessors not supported');
535
538
  if ('value' in Attributes) O[P] = Attributes.value;
536
539
  return O;
537
540
  };
@@ -540,23 +543,23 @@ var DESCRIPTORS$5 = descriptors;
540
543
  var definePropertyModule$4 = objectDefineProperty;
541
544
  var createPropertyDescriptor$1 = createPropertyDescriptor$3;
542
545
 
543
- var createNonEnumerableProperty$5 = DESCRIPTORS$5 ? function (object, key, value) {
546
+ var createNonEnumerableProperty$6 = DESCRIPTORS$5 ? function (object, key, value) {
544
547
  return definePropertyModule$4.f(object, key, createPropertyDescriptor$1(1, value));
545
548
  } : function (object, key, value) {
546
549
  object[key] = value;
547
550
  return object;
548
551
  };
549
552
 
550
- var redefine$5 = {exports: {}};
553
+ var redefine$6 = {exports: {}};
551
554
 
552
- var uncurryThis$8 = functionUncurryThis;
553
- var isCallable$b = isCallable$h;
555
+ var uncurryThis$e = functionUncurryThis;
556
+ var isCallable$d = isCallable$j;
554
557
  var store$1 = sharedStore;
555
558
 
556
- var functionToString = uncurryThis$8(Function.toString);
559
+ var functionToString = uncurryThis$e(Function.toString);
557
560
 
558
561
  // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
559
- if (!isCallable$b(store$1.inspectSource)) {
562
+ if (!isCallable$d(store$1.inspectSource)) {
560
563
  store$1.inspectSource = function (it) {
561
564
  return functionToString(it);
562
565
  };
@@ -564,18 +567,18 @@ if (!isCallable$b(store$1.inspectSource)) {
564
567
 
565
568
  var inspectSource$4 = store$1.inspectSource;
566
569
 
567
- var global$k = global$B;
568
- var isCallable$a = isCallable$h;
570
+ var global$q = global$H;
571
+ var isCallable$c = isCallable$j;
569
572
  var inspectSource$3 = inspectSource$4;
570
573
 
571
- var WeakMap$1 = global$k.WeakMap;
574
+ var WeakMap$1 = global$q.WeakMap;
572
575
 
573
- var nativeWeakMap = isCallable$a(WeakMap$1) && /native code/.test(inspectSource$3(WeakMap$1));
576
+ var nativeWeakMap = isCallable$c(WeakMap$1) && /native code/.test(inspectSource$3(WeakMap$1));
574
577
 
575
- var shared$1 = shared$3.exports;
578
+ var shared$2 = shared$4.exports;
576
579
  var uid = uid$2;
577
580
 
578
- var keys = shared$1('keys');
581
+ var keys = shared$2('keys');
579
582
 
580
583
  var sharedKey$3 = function (key) {
581
584
  return keys[key] || (keys[key] = uid(key));
@@ -584,18 +587,18 @@ var sharedKey$3 = function (key) {
584
587
  var hiddenKeys$4 = {};
585
588
 
586
589
  var NATIVE_WEAK_MAP = nativeWeakMap;
587
- var global$j = global$B;
588
- var uncurryThis$7 = functionUncurryThis;
589
- var isObject$2 = isObject$7;
590
- var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
590
+ var global$p = global$H;
591
+ var uncurryThis$d = functionUncurryThis;
592
+ var isObject$3 = isObject$8;
593
+ var createNonEnumerableProperty$5 = createNonEnumerableProperty$6;
591
594
  var hasOwn$7 = hasOwnProperty_1;
592
- var shared = sharedStore;
595
+ var shared$1 = sharedStore;
593
596
  var sharedKey$2 = sharedKey$3;
594
597
  var hiddenKeys$3 = hiddenKeys$4;
595
598
 
596
599
  var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
597
- var TypeError$8 = global$j.TypeError;
598
- var WeakMap = global$j.WeakMap;
600
+ var TypeError$a = global$p.TypeError;
601
+ var WeakMap = global$p.WeakMap;
599
602
  var set$2, get$1, has;
600
603
 
601
604
  var enforce = function (it) {
@@ -605,19 +608,19 @@ var enforce = function (it) {
605
608
  var getterFor = function (TYPE) {
606
609
  return function (it) {
607
610
  var state;
608
- if (!isObject$2(it) || (state = get$1(it)).type !== TYPE) {
609
- throw TypeError$8('Incompatible receiver, ' + TYPE + ' required');
611
+ if (!isObject$3(it) || (state = get$1(it)).type !== TYPE) {
612
+ throw TypeError$a('Incompatible receiver, ' + TYPE + ' required');
610
613
  } return state;
611
614
  };
612
615
  };
613
616
 
614
- if (NATIVE_WEAK_MAP || shared.state) {
615
- var store = shared.state || (shared.state = new WeakMap());
616
- var wmget = uncurryThis$7(store.get);
617
- var wmhas = uncurryThis$7(store.has);
618
- var wmset = uncurryThis$7(store.set);
617
+ if (NATIVE_WEAK_MAP || shared$1.state) {
618
+ var store = shared$1.state || (shared$1.state = new WeakMap());
619
+ var wmget = uncurryThis$d(store.get);
620
+ var wmhas = uncurryThis$d(store.has);
621
+ var wmset = uncurryThis$d(store.set);
619
622
  set$2 = function (it, metadata) {
620
- if (wmhas(store, it)) throw new TypeError$8(OBJECT_ALREADY_INITIALIZED);
623
+ if (wmhas(store, it)) throw new TypeError$a(OBJECT_ALREADY_INITIALIZED);
621
624
  metadata.facade = it;
622
625
  wmset(store, it, metadata);
623
626
  return metadata;
@@ -632,9 +635,9 @@ if (NATIVE_WEAK_MAP || shared.state) {
632
635
  var STATE = sharedKey$2('state');
633
636
  hiddenKeys$3[STATE] = true;
634
637
  set$2 = function (it, metadata) {
635
- if (hasOwn$7(it, STATE)) throw new TypeError$8(OBJECT_ALREADY_INITIALIZED);
638
+ if (hasOwn$7(it, STATE)) throw new TypeError$a(OBJECT_ALREADY_INITIALIZED);
636
639
  metadata.facade = it;
637
- createNonEnumerableProperty$4(it, STATE, metadata);
640
+ createNonEnumerableProperty$5(it, STATE, metadata);
638
641
  return metadata;
639
642
  };
640
643
  get$1 = function (it) {
@@ -671,38 +674,38 @@ var functionName = {
671
674
  CONFIGURABLE: CONFIGURABLE
672
675
  };
673
676
 
674
- var global$i = global$B;
675
- var isCallable$9 = isCallable$h;
677
+ var global$o = global$H;
678
+ var isCallable$b = isCallable$j;
676
679
  var hasOwn$5 = hasOwnProperty_1;
677
- var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
680
+ var createNonEnumerableProperty$4 = createNonEnumerableProperty$6;
678
681
  var setGlobal$1 = setGlobal$3;
679
682
  var inspectSource$2 = inspectSource$4;
680
683
  var InternalStateModule$2 = internalState;
681
684
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
682
685
 
683
- var getInternalState$2 = InternalStateModule$2.get;
686
+ var getInternalState$3 = InternalStateModule$2.get;
684
687
  var enforceInternalState = InternalStateModule$2.enforce;
685
688
  var TEMPLATE = String(String).split('String');
686
689
 
687
- (redefine$5.exports = function (O, key, value, options) {
690
+ (redefine$6.exports = function (O, key, value, options) {
688
691
  var unsafe = options ? !!options.unsafe : false;
689
692
  var simple = options ? !!options.enumerable : false;
690
693
  var noTargetGet = options ? !!options.noTargetGet : false;
691
694
  var name = options && options.name !== undefined ? options.name : key;
692
695
  var state;
693
- if (isCallable$9(value)) {
696
+ if (isCallable$b(value)) {
694
697
  if (String(name).slice(0, 7) === 'Symbol(') {
695
698
  name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
696
699
  }
697
700
  if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
698
- createNonEnumerableProperty$3(value, 'name', name);
701
+ createNonEnumerableProperty$4(value, 'name', name);
699
702
  }
700
703
  state = enforceInternalState(value);
701
704
  if (!state.source) {
702
705
  state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
703
706
  }
704
707
  }
705
- if (O === global$i) {
708
+ if (O === global$o) {
706
709
  if (simple) O[key] = value;
707
710
  else setGlobal$1(key, value);
708
711
  return;
@@ -712,54 +715,54 @@ var TEMPLATE = String(String).split('String');
712
715
  simple = true;
713
716
  }
714
717
  if (simple) O[key] = value;
715
- else createNonEnumerableProperty$3(O, key, value);
718
+ else createNonEnumerableProperty$4(O, key, value);
716
719
  // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
717
720
  })(Function.prototype, 'toString', function toString() {
718
- return isCallable$9(this) && getInternalState$2(this).source || inspectSource$2(this);
721
+ return isCallable$b(this) && getInternalState$3(this).source || inspectSource$2(this);
719
722
  });
720
723
 
721
724
  var objectGetOwnPropertyNames = {};
722
725
 
723
726
  var ceil = Math.ceil;
724
- var floor = Math.floor;
727
+ var floor$1 = Math.floor;
725
728
 
726
729
  // `ToIntegerOrInfinity` abstract operation
727
730
  // https://tc39.es/ecma262/#sec-tointegerorinfinity
728
- var toIntegerOrInfinity$2 = function (argument) {
731
+ var toIntegerOrInfinity$4 = function (argument) {
729
732
  var number = +argument;
730
733
  // eslint-disable-next-line no-self-compare -- safe
731
- return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
734
+ return number !== number || number === 0 ? 0 : (number > 0 ? floor$1 : ceil)(number);
732
735
  };
733
736
 
734
- var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
737
+ var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
735
738
 
736
- var max = Math.max;
737
- var min$1 = Math.min;
739
+ var max$1 = Math.max;
740
+ var min$3 = Math.min;
738
741
 
739
742
  // Helper for a popular repeating case of the spec:
740
743
  // Let integer be ? ToInteger(index).
741
744
  // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
742
745
  var toAbsoluteIndex$1 = function (index, length) {
743
- var integer = toIntegerOrInfinity$1(index);
744
- return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
746
+ var integer = toIntegerOrInfinity$3(index);
747
+ return integer < 0 ? max$1(integer + length, 0) : min$3(integer, length);
745
748
  };
746
749
 
747
- var toIntegerOrInfinity = toIntegerOrInfinity$2;
750
+ var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
748
751
 
749
- var min = Math.min;
752
+ var min$2 = Math.min;
750
753
 
751
754
  // `ToLength` abstract operation
752
755
  // https://tc39.es/ecma262/#sec-tolength
753
- var toLength$1 = function (argument) {
754
- return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
756
+ var toLength$3 = function (argument) {
757
+ return argument > 0 ? min$2(toIntegerOrInfinity$2(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
755
758
  };
756
759
 
757
- var toLength = toLength$1;
760
+ var toLength$2 = toLength$3;
758
761
 
759
762
  // `LengthOfArrayLike` abstract operation
760
763
  // https://tc39.es/ecma262/#sec-lengthofarraylike
761
764
  var lengthOfArrayLike$2 = function (obj) {
762
- return toLength(obj.length);
765
+ return toLength$2(obj.length);
763
766
  };
764
767
 
765
768
  var toIndexedObject$3 = toIndexedObject$5;
@@ -767,7 +770,7 @@ var toAbsoluteIndex = toAbsoluteIndex$1;
767
770
  var lengthOfArrayLike$1 = lengthOfArrayLike$2;
768
771
 
769
772
  // `Array.prototype.{ indexOf, includes }` methods implementation
770
- var createMethod = function (IS_INCLUDES) {
773
+ var createMethod$1 = function (IS_INCLUDES) {
771
774
  return function ($this, el, fromIndex) {
772
775
  var O = toIndexedObject$3($this);
773
776
  var length = lengthOfArrayLike$1(O);
@@ -789,29 +792,29 @@ var createMethod = function (IS_INCLUDES) {
789
792
  var arrayIncludes = {
790
793
  // `Array.prototype.includes` method
791
794
  // https://tc39.es/ecma262/#sec-array.prototype.includes
792
- includes: createMethod(true),
795
+ includes: createMethod$1(true),
793
796
  // `Array.prototype.indexOf` method
794
797
  // https://tc39.es/ecma262/#sec-array.prototype.indexof
795
- indexOf: createMethod(false)
798
+ indexOf: createMethod$1(false)
796
799
  };
797
800
 
798
- var uncurryThis$6 = functionUncurryThis;
801
+ var uncurryThis$c = functionUncurryThis;
799
802
  var hasOwn$4 = hasOwnProperty_1;
800
803
  var toIndexedObject$2 = toIndexedObject$5;
801
- var indexOf = arrayIncludes.indexOf;
804
+ var indexOf$1 = arrayIncludes.indexOf;
802
805
  var hiddenKeys$2 = hiddenKeys$4;
803
806
 
804
- var push = uncurryThis$6([].push);
807
+ var push$1 = uncurryThis$c([].push);
805
808
 
806
809
  var objectKeysInternal = function (object, names) {
807
810
  var O = toIndexedObject$2(object);
808
811
  var i = 0;
809
812
  var result = [];
810
813
  var key;
811
- for (key in O) !hasOwn$4(hiddenKeys$2, key) && hasOwn$4(O, key) && push(result, key);
814
+ for (key in O) !hasOwn$4(hiddenKeys$2, key) && hasOwn$4(O, key) && push$1(result, key);
812
815
  // Don't enum bug & hidden keys
813
816
  while (names.length > i) if (hasOwn$4(O, key = names[i++])) {
814
- ~indexOf(result, key) || push(result, key);
817
+ ~indexOf$1(result, key) || push$1(result, key);
815
818
  }
816
819
  return result;
817
820
  };
@@ -845,18 +848,18 @@ var objectGetOwnPropertySymbols = {};
845
848
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
846
849
 
847
850
  var getBuiltIn$4 = getBuiltIn$7;
848
- var uncurryThis$5 = functionUncurryThis;
851
+ var uncurryThis$b = functionUncurryThis;
849
852
  var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
850
853
  var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
851
- var anObject$8 = anObject$a;
854
+ var anObject$b = anObject$d;
852
855
 
853
- var concat$1 = uncurryThis$5([].concat);
856
+ var concat$2 = uncurryThis$b([].concat);
854
857
 
855
858
  // all object keys, includes non-enumerable and symbols
856
859
  var ownKeys$1 = getBuiltIn$4('Reflect', 'ownKeys') || function ownKeys(it) {
857
- var keys = getOwnPropertyNamesModule.f(anObject$8(it));
860
+ var keys = getOwnPropertyNamesModule.f(anObject$b(it));
858
861
  var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
859
- return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
862
+ return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
860
863
  };
861
864
 
862
865
  var hasOwn$3 = hasOwnProperty_1;
@@ -876,20 +879,20 @@ var copyConstructorProperties$1 = function (target, source, exceptions) {
876
879
  }
877
880
  };
878
881
 
879
- var fails$5 = fails$c;
880
- var isCallable$8 = isCallable$h;
882
+ var fails$a = fails$h;
883
+ var isCallable$a = isCallable$j;
881
884
 
882
885
  var replacement = /#|\.prototype\./;
883
886
 
884
887
  var isForced$2 = function (feature, detection) {
885
- var value = data[normalize(feature)];
888
+ var value = data[normalize$1(feature)];
886
889
  return value == POLYFILL ? true
887
890
  : value == NATIVE ? false
888
- : isCallable$8(detection) ? fails$5(detection)
891
+ : isCallable$a(detection) ? fails$a(detection)
889
892
  : !!detection;
890
893
  };
891
894
 
892
- var normalize = isForced$2.normalize = function (string) {
895
+ var normalize$1 = isForced$2.normalize = function (string) {
893
896
  return String(string).replace(replacement, '.').toLowerCase();
894
897
  };
895
898
 
@@ -899,10 +902,10 @@ var POLYFILL = isForced$2.POLYFILL = 'P';
899
902
 
900
903
  var isForced_1 = isForced$2;
901
904
 
902
- var global$h = global$B;
903
- var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
904
- var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
905
- var redefine$4 = redefine$5.exports;
905
+ var global$n = global$H;
906
+ var getOwnPropertyDescriptor$2 = objectGetOwnPropertyDescriptor.f;
907
+ var createNonEnumerableProperty$3 = createNonEnumerableProperty$6;
908
+ var redefine$5 = redefine$6.exports;
906
909
  var setGlobal = setGlobal$3;
907
910
  var copyConstructorProperties = copyConstructorProperties$1;
908
911
  var isForced$1 = isForced_1;
@@ -928,16 +931,16 @@ var _export = function (options, source) {
928
931
  var STATIC = options.stat;
929
932
  var FORCED, target, key, targetProperty, sourceProperty, descriptor;
930
933
  if (GLOBAL) {
931
- target = global$h;
934
+ target = global$n;
932
935
  } else if (STATIC) {
933
- target = global$h[TARGET] || setGlobal(TARGET, {});
936
+ target = global$n[TARGET] || setGlobal(TARGET, {});
934
937
  } else {
935
- target = (global$h[TARGET] || {}).prototype;
938
+ target = (global$n[TARGET] || {}).prototype;
936
939
  }
937
940
  if (target) for (key in source) {
938
941
  sourceProperty = source[key];
939
942
  if (options.noTargetGet) {
940
- descriptor = getOwnPropertyDescriptor$1(target, key);
943
+ descriptor = getOwnPropertyDescriptor$2(target, key);
941
944
  targetProperty = descriptor && descriptor.value;
942
945
  } else targetProperty = target[key];
943
946
  FORCED = isForced$1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
@@ -948,39 +951,39 @@ var _export = function (options, source) {
948
951
  }
949
952
  // add a flag to not completely full polyfills
950
953
  if (options.sham || (targetProperty && targetProperty.sham)) {
951
- createNonEnumerableProperty$2(sourceProperty, 'sham', true);
954
+ createNonEnumerableProperty$3(sourceProperty, 'sham', true);
952
955
  }
953
956
  // extend global
954
- redefine$4(target, key, sourceProperty, options);
957
+ redefine$5(target, key, sourceProperty, options);
955
958
  }
956
959
  };
957
960
 
958
- var global$g = global$B;
961
+ var global$m = global$H;
959
962
 
960
- var nativePromiseConstructor = global$g.Promise;
963
+ var nativePromiseConstructor = global$m.Promise;
961
964
 
962
- var redefine$3 = redefine$5.exports;
965
+ var redefine$4 = redefine$6.exports;
963
966
 
964
967
  var redefineAll$1 = function (target, src, options) {
965
- for (var key in src) redefine$3(target, key, src[key], options);
968
+ for (var key in src) redefine$4(target, key, src[key], options);
966
969
  return target;
967
970
  };
968
971
 
969
- var global$f = global$B;
970
- var isCallable$7 = isCallable$h;
972
+ var global$l = global$H;
973
+ var isCallable$9 = isCallable$j;
971
974
 
972
- var String$2 = global$f.String;
973
- var TypeError$7 = global$f.TypeError;
975
+ var String$3 = global$l.String;
976
+ var TypeError$9 = global$l.TypeError;
974
977
 
975
978
  var aPossiblePrototype$1 = function (argument) {
976
- if (typeof argument == 'object' || isCallable$7(argument)) return argument;
977
- throw TypeError$7("Can't set " + String$2(argument) + ' as a prototype');
979
+ if (typeof argument == 'object' || isCallable$9(argument)) return argument;
980
+ throw TypeError$9("Can't set " + String$3(argument) + ' as a prototype');
978
981
  };
979
982
 
980
983
  /* eslint-disable no-proto -- safe */
981
984
 
982
- var uncurryThis$4 = functionUncurryThis;
983
- var anObject$7 = anObject$a;
985
+ var uncurryThis$a = functionUncurryThis;
986
+ var anObject$a = anObject$d;
984
987
  var aPossiblePrototype = aPossiblePrototype$1;
985
988
 
986
989
  // `Object.setPrototypeOf` method
@@ -993,12 +996,12 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
993
996
  var setter;
994
997
  try {
995
998
  // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
996
- setter = uncurryThis$4(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
999
+ setter = uncurryThis$a(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
997
1000
  setter(test, []);
998
1001
  CORRECT_SETTER = test instanceof Array;
999
1002
  } catch (error) { /* empty */ }
1000
1003
  return function setPrototypeOf(O, proto) {
1001
- anObject$7(O);
1004
+ anObject$a(O);
1002
1005
  aPossiblePrototype(proto);
1003
1006
  if (CORRECT_SETTER) setter(O, proto);
1004
1007
  else O.__proto__ = proto;
@@ -1008,9 +1011,9 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
1008
1011
 
1009
1012
  var defineProperty$2 = objectDefineProperty.f;
1010
1013
  var hasOwn$2 = hasOwnProperty_1;
1011
- var wellKnownSymbol$c = wellKnownSymbol$e;
1014
+ var wellKnownSymbol$g = wellKnownSymbol$i;
1012
1015
 
1013
- var TO_STRING_TAG$3 = wellKnownSymbol$c('toStringTag');
1016
+ var TO_STRING_TAG$3 = wellKnownSymbol$g('toStringTag');
1014
1017
 
1015
1018
  var setToStringTag$3 = function (target, TAG, STATIC) {
1016
1019
  if (target && !STATIC) target = target.prototype;
@@ -1021,38 +1024,38 @@ var setToStringTag$3 = function (target, TAG, STATIC) {
1021
1024
 
1022
1025
  var getBuiltIn$3 = getBuiltIn$7;
1023
1026
  var definePropertyModule$2 = objectDefineProperty;
1024
- var wellKnownSymbol$b = wellKnownSymbol$e;
1027
+ var wellKnownSymbol$f = wellKnownSymbol$i;
1025
1028
  var DESCRIPTORS$3 = descriptors;
1026
1029
 
1027
- var SPECIES$2 = wellKnownSymbol$b('species');
1030
+ var SPECIES$3 = wellKnownSymbol$f('species');
1028
1031
 
1029
1032
  var setSpecies$1 = function (CONSTRUCTOR_NAME) {
1030
1033
  var Constructor = getBuiltIn$3(CONSTRUCTOR_NAME);
1031
1034
  var defineProperty = definePropertyModule$2.f;
1032
1035
 
1033
- if (DESCRIPTORS$3 && Constructor && !Constructor[SPECIES$2]) {
1034
- defineProperty(Constructor, SPECIES$2, {
1036
+ if (DESCRIPTORS$3 && Constructor && !Constructor[SPECIES$3]) {
1037
+ defineProperty(Constructor, SPECIES$3, {
1035
1038
  configurable: true,
1036
1039
  get: function () { return this; }
1037
1040
  });
1038
1041
  }
1039
1042
  };
1040
1043
 
1041
- var global$e = global$B;
1044
+ var global$k = global$H;
1042
1045
  var isPrototypeOf$1 = objectIsPrototypeOf;
1043
1046
 
1044
- var TypeError$6 = global$e.TypeError;
1047
+ var TypeError$8 = global$k.TypeError;
1045
1048
 
1046
1049
  var anInstance$1 = function (it, Prototype) {
1047
1050
  if (isPrototypeOf$1(Prototype, it)) return it;
1048
- throw TypeError$6('Incorrect invocation');
1051
+ throw TypeError$8('Incorrect invocation');
1049
1052
  };
1050
1053
 
1051
- var uncurryThis$3 = functionUncurryThis;
1054
+ var uncurryThis$9 = functionUncurryThis;
1052
1055
  var aCallable$3 = aCallable$5;
1053
1056
  var NATIVE_BIND$1 = functionBindNative;
1054
1057
 
1055
- var bind$4 = uncurryThis$3(uncurryThis$3.bind);
1058
+ var bind$4 = uncurryThis$9(uncurryThis$9.bind);
1056
1059
 
1057
1060
  // optional / simple context binding
1058
1061
  var functionBindContext = function (fn, that) {
@@ -1064,10 +1067,10 @@ var functionBindContext = function (fn, that) {
1064
1067
 
1065
1068
  var iterators = {};
1066
1069
 
1067
- var wellKnownSymbol$a = wellKnownSymbol$e;
1070
+ var wellKnownSymbol$e = wellKnownSymbol$i;
1068
1071
  var Iterators$4 = iterators;
1069
1072
 
1070
- var ITERATOR$5 = wellKnownSymbol$a('iterator');
1073
+ var ITERATOR$5 = wellKnownSymbol$e('iterator');
1071
1074
  var ArrayPrototype$1 = Array.prototype;
1072
1075
 
1073
1076
  // check on default Array iterator
@@ -1075,23 +1078,23 @@ var isArrayIteratorMethod$1 = function (it) {
1075
1078
  return it !== undefined && (Iterators$4.Array === it || ArrayPrototype$1[ITERATOR$5] === it);
1076
1079
  };
1077
1080
 
1078
- var wellKnownSymbol$9 = wellKnownSymbol$e;
1081
+ var wellKnownSymbol$d = wellKnownSymbol$i;
1079
1082
 
1080
- var TO_STRING_TAG$2 = wellKnownSymbol$9('toStringTag');
1083
+ var TO_STRING_TAG$2 = wellKnownSymbol$d('toStringTag');
1081
1084
  var test = {};
1082
1085
 
1083
1086
  test[TO_STRING_TAG$2] = 'z';
1084
1087
 
1085
1088
  var toStringTagSupport = String(test) === '[object z]';
1086
1089
 
1087
- var global$d = global$B;
1090
+ var global$j = global$H;
1088
1091
  var TO_STRING_TAG_SUPPORT = toStringTagSupport;
1089
- var isCallable$6 = isCallable$h;
1092
+ var isCallable$8 = isCallable$j;
1090
1093
  var classofRaw = classofRaw$1;
1091
- var wellKnownSymbol$8 = wellKnownSymbol$e;
1094
+ var wellKnownSymbol$c = wellKnownSymbol$i;
1092
1095
 
1093
- var TO_STRING_TAG$1 = wellKnownSymbol$8('toStringTag');
1094
- var Object$2 = global$d.Object;
1096
+ var TO_STRING_TAG$1 = wellKnownSymbol$c('toStringTag');
1097
+ var Object$2 = global$j.Object;
1095
1098
 
1096
1099
  // ES3 wrong here
1097
1100
  var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
@@ -1104,7 +1107,7 @@ var tryGet = function (it, key) {
1104
1107
  };
1105
1108
 
1106
1109
  // getting tag from ES6+ `Object.prototype.toString`
1107
- var classof$3 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1110
+ var classof$6 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1108
1111
  var O, tag, result;
1109
1112
  return it === undefined ? 'Undefined' : it === null ? 'Null'
1110
1113
  // @@toStringTag case
@@ -1112,65 +1115,65 @@ var classof$3 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
1112
1115
  // builtinTag case
1113
1116
  : CORRECT_ARGUMENTS ? classofRaw(O)
1114
1117
  // ES3 arguments fallback
1115
- : (result = classofRaw(O)) == 'Object' && isCallable$6(O.callee) ? 'Arguments' : result;
1118
+ : (result = classofRaw(O)) == 'Object' && isCallable$8(O.callee) ? 'Arguments' : result;
1116
1119
  };
1117
1120
 
1118
- var classof$2 = classof$3;
1119
- var getMethod$1 = getMethod$3;
1121
+ var classof$5 = classof$6;
1122
+ var getMethod$2 = getMethod$4;
1120
1123
  var Iterators$3 = iterators;
1121
- var wellKnownSymbol$7 = wellKnownSymbol$e;
1124
+ var wellKnownSymbol$b = wellKnownSymbol$i;
1122
1125
 
1123
- var ITERATOR$4 = wellKnownSymbol$7('iterator');
1126
+ var ITERATOR$4 = wellKnownSymbol$b('iterator');
1124
1127
 
1125
1128
  var getIteratorMethod$2 = function (it) {
1126
- if (it != undefined) return getMethod$1(it, ITERATOR$4)
1127
- || getMethod$1(it, '@@iterator')
1128
- || Iterators$3[classof$2(it)];
1129
+ if (it != undefined) return getMethod$2(it, ITERATOR$4)
1130
+ || getMethod$2(it, '@@iterator')
1131
+ || Iterators$3[classof$5(it)];
1129
1132
  };
1130
1133
 
1131
- var global$c = global$B;
1132
- var call$6 = functionCall;
1134
+ var global$i = global$H;
1135
+ var call$9 = functionCall;
1133
1136
  var aCallable$2 = aCallable$5;
1134
- var anObject$6 = anObject$a;
1137
+ var anObject$9 = anObject$d;
1135
1138
  var tryToString$2 = tryToString$4;
1136
1139
  var getIteratorMethod$1 = getIteratorMethod$2;
1137
1140
 
1138
- var TypeError$5 = global$c.TypeError;
1141
+ var TypeError$7 = global$i.TypeError;
1139
1142
 
1140
1143
  var getIterator$1 = function (argument, usingIterator) {
1141
1144
  var iteratorMethod = arguments.length < 2 ? getIteratorMethod$1(argument) : usingIterator;
1142
- if (aCallable$2(iteratorMethod)) return anObject$6(call$6(iteratorMethod, argument));
1143
- throw TypeError$5(tryToString$2(argument) + ' is not iterable');
1145
+ if (aCallable$2(iteratorMethod)) return anObject$9(call$9(iteratorMethod, argument));
1146
+ throw TypeError$7(tryToString$2(argument) + ' is not iterable');
1144
1147
  };
1145
1148
 
1146
- var call$5 = functionCall;
1147
- var anObject$5 = anObject$a;
1148
- var getMethod = getMethod$3;
1149
+ var call$8 = functionCall;
1150
+ var anObject$8 = anObject$d;
1151
+ var getMethod$1 = getMethod$4;
1149
1152
 
1150
1153
  var iteratorClose$1 = function (iterator, kind, value) {
1151
1154
  var innerResult, innerError;
1152
- anObject$5(iterator);
1155
+ anObject$8(iterator);
1153
1156
  try {
1154
- innerResult = getMethod(iterator, 'return');
1157
+ innerResult = getMethod$1(iterator, 'return');
1155
1158
  if (!innerResult) {
1156
1159
  if (kind === 'throw') throw value;
1157
1160
  return value;
1158
1161
  }
1159
- innerResult = call$5(innerResult, iterator);
1162
+ innerResult = call$8(innerResult, iterator);
1160
1163
  } catch (error) {
1161
1164
  innerError = true;
1162
1165
  innerResult = error;
1163
1166
  }
1164
1167
  if (kind === 'throw') throw value;
1165
1168
  if (innerError) throw innerResult;
1166
- anObject$5(innerResult);
1169
+ anObject$8(innerResult);
1167
1170
  return value;
1168
1171
  };
1169
1172
 
1170
- var global$b = global$B;
1173
+ var global$h = global$H;
1171
1174
  var bind$3 = functionBindContext;
1172
- var call$4 = functionCall;
1173
- var anObject$4 = anObject$a;
1175
+ var call$7 = functionCall;
1176
+ var anObject$7 = anObject$d;
1174
1177
  var tryToString$1 = tryToString$4;
1175
1178
  var isArrayIteratorMethod = isArrayIteratorMethod$1;
1176
1179
  var lengthOfArrayLike = lengthOfArrayLike$2;
@@ -1179,7 +1182,7 @@ var getIterator = getIterator$1;
1179
1182
  var getIteratorMethod = getIteratorMethod$2;
1180
1183
  var iteratorClose = iteratorClose$1;
1181
1184
 
1182
- var TypeError$4 = global$b.TypeError;
1185
+ var TypeError$6 = global$h.TypeError;
1183
1186
 
1184
1187
  var Result = function (stopped, result) {
1185
1188
  this.stopped = stopped;
@@ -1203,7 +1206,7 @@ var iterate$1 = function (iterable, unboundFunction, options) {
1203
1206
 
1204
1207
  var callFn = function (value) {
1205
1208
  if (AS_ENTRIES) {
1206
- anObject$4(value);
1209
+ anObject$7(value);
1207
1210
  return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);
1208
1211
  } return INTERRUPTED ? fn(value, stop) : fn(value);
1209
1212
  };
@@ -1212,7 +1215,7 @@ var iterate$1 = function (iterable, unboundFunction, options) {
1212
1215
  iterator = iterable;
1213
1216
  } else {
1214
1217
  iterFn = getIteratorMethod(iterable);
1215
- if (!iterFn) throw TypeError$4(tryToString$1(iterable) + ' is not iterable');
1218
+ if (!iterFn) throw TypeError$6(tryToString$1(iterable) + ' is not iterable');
1216
1219
  // optimisation for array iterators
1217
1220
  if (isArrayIteratorMethod(iterFn)) {
1218
1221
  for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) {
@@ -1224,7 +1227,7 @@ var iterate$1 = function (iterable, unboundFunction, options) {
1224
1227
  }
1225
1228
 
1226
1229
  next = iterator.next;
1227
- while (!(step = call$4(next, iterator)).done) {
1230
+ while (!(step = call$7(next, iterator)).done) {
1228
1231
  try {
1229
1232
  result = callFn(step.value);
1230
1233
  } catch (error) {
@@ -1234,9 +1237,9 @@ var iterate$1 = function (iterable, unboundFunction, options) {
1234
1237
  } return new Result(false);
1235
1238
  };
1236
1239
 
1237
- var wellKnownSymbol$6 = wellKnownSymbol$e;
1240
+ var wellKnownSymbol$a = wellKnownSymbol$i;
1238
1241
 
1239
- var ITERATOR$3 = wellKnownSymbol$6('iterator');
1242
+ var ITERATOR$3 = wellKnownSymbol$a('iterator');
1240
1243
  var SAFE_CLOSING = false;
1241
1244
 
1242
1245
  try {
@@ -1273,10 +1276,10 @@ var checkCorrectnessOfIteration$1 = function (exec, SKIP_CLOSING) {
1273
1276
  return ITERATION_SUPPORT;
1274
1277
  };
1275
1278
 
1276
- var uncurryThis$2 = functionUncurryThis;
1277
- var fails$4 = fails$c;
1278
- var isCallable$5 = isCallable$h;
1279
- var classof$1 = classof$3;
1279
+ var uncurryThis$8 = functionUncurryThis;
1280
+ var fails$9 = fails$h;
1281
+ var isCallable$7 = isCallable$j;
1282
+ var classof$4 = classof$6;
1280
1283
  var getBuiltIn$2 = getBuiltIn$7;
1281
1284
  var inspectSource$1 = inspectSource$4;
1282
1285
 
@@ -1284,11 +1287,11 @@ var noop = function () { /* empty */ };
1284
1287
  var empty = [];
1285
1288
  var construct = getBuiltIn$2('Reflect', 'construct');
1286
1289
  var constructorRegExp = /^\s*(?:class|function)\b/;
1287
- var exec = uncurryThis$2(constructorRegExp.exec);
1290
+ var exec$1 = uncurryThis$8(constructorRegExp.exec);
1288
1291
  var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
1289
1292
 
1290
1293
  var isConstructorModern = function isConstructor(argument) {
1291
- if (!isCallable$5(argument)) return false;
1294
+ if (!isCallable$7(argument)) return false;
1292
1295
  try {
1293
1296
  construct(noop, empty, argument);
1294
1297
  return true;
@@ -1298,8 +1301,8 @@ var isConstructorModern = function isConstructor(argument) {
1298
1301
  };
1299
1302
 
1300
1303
  var isConstructorLegacy = function isConstructor(argument) {
1301
- if (!isCallable$5(argument)) return false;
1302
- switch (classof$1(argument)) {
1304
+ if (!isCallable$7(argument)) return false;
1305
+ switch (classof$4(argument)) {
1303
1306
  case 'AsyncFunction':
1304
1307
  case 'GeneratorFunction':
1305
1308
  case 'AsyncGeneratorFunction': return false;
@@ -1308,7 +1311,7 @@ var isConstructorLegacy = function isConstructor(argument) {
1308
1311
  // we can't check .prototype since constructors produced by .bind haven't it
1309
1312
  // `Function#toString` throws on some built-it function in some legacy engines
1310
1313
  // (for example, `DOMQuad` and similar in FF41-)
1311
- return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource$1(argument));
1314
+ return INCORRECT_TO_STRING || !!exec$1(constructorRegExp, inspectSource$1(argument));
1312
1315
  } catch (error) {
1313
1316
  return true;
1314
1317
  }
@@ -1318,7 +1321,7 @@ isConstructorLegacy.sham = true;
1318
1321
 
1319
1322
  // `IsConstructor` abstract operation
1320
1323
  // https://tc39.es/ecma262/#sec-isconstructor
1321
- var isConstructor$1 = !construct || fails$4(function () {
1324
+ var isConstructor$1 = !construct || fails$9(function () {
1322
1325
  var called;
1323
1326
  return isConstructorModern(isConstructorModern.call)
1324
1327
  || !isConstructorModern(Object)
@@ -1326,57 +1329,57 @@ var isConstructor$1 = !construct || fails$4(function () {
1326
1329
  || called;
1327
1330
  }) ? isConstructorLegacy : isConstructorModern;
1328
1331
 
1329
- var global$a = global$B;
1332
+ var global$g = global$H;
1330
1333
  var isConstructor = isConstructor$1;
1331
1334
  var tryToString = tryToString$4;
1332
1335
 
1333
- var TypeError$3 = global$a.TypeError;
1336
+ var TypeError$5 = global$g.TypeError;
1334
1337
 
1335
1338
  // `Assert: IsConstructor(argument) is true`
1336
1339
  var aConstructor$1 = function (argument) {
1337
1340
  if (isConstructor(argument)) return argument;
1338
- throw TypeError$3(tryToString(argument) + ' is not a constructor');
1341
+ throw TypeError$5(tryToString(argument) + ' is not a constructor');
1339
1342
  };
1340
1343
 
1341
- var anObject$3 = anObject$a;
1344
+ var anObject$6 = anObject$d;
1342
1345
  var aConstructor = aConstructor$1;
1343
- var wellKnownSymbol$5 = wellKnownSymbol$e;
1346
+ var wellKnownSymbol$9 = wellKnownSymbol$i;
1344
1347
 
1345
- var SPECIES$1 = wellKnownSymbol$5('species');
1348
+ var SPECIES$2 = wellKnownSymbol$9('species');
1346
1349
 
1347
1350
  // `SpeciesConstructor` abstract operation
1348
1351
  // https://tc39.es/ecma262/#sec-speciesconstructor
1349
1352
  var speciesConstructor$1 = function (O, defaultConstructor) {
1350
- var C = anObject$3(O).constructor;
1353
+ var C = anObject$6(O).constructor;
1351
1354
  var S;
1352
- return C === undefined || (S = anObject$3(C)[SPECIES$1]) == undefined ? defaultConstructor : aConstructor(S);
1355
+ return C === undefined || (S = anObject$6(C)[SPECIES$2]) == undefined ? defaultConstructor : aConstructor(S);
1353
1356
  };
1354
1357
 
1355
1358
  var NATIVE_BIND = functionBindNative;
1356
1359
 
1357
1360
  var FunctionPrototype = Function.prototype;
1358
- var apply$1 = FunctionPrototype.apply;
1359
- var call$3 = FunctionPrototype.call;
1361
+ var apply$2 = FunctionPrototype.apply;
1362
+ var call$6 = FunctionPrototype.call;
1360
1363
 
1361
1364
  // eslint-disable-next-line es/no-reflect -- safe
1362
- var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$3.bind(apply$1) : function () {
1363
- return call$3.apply(apply$1, arguments);
1365
+ var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$6.bind(apply$2) : function () {
1366
+ return call$6.apply(apply$2, arguments);
1364
1367
  });
1365
1368
 
1366
1369
  var getBuiltIn$1 = getBuiltIn$7;
1367
1370
 
1368
1371
  var html$2 = getBuiltIn$1('document', 'documentElement');
1369
1372
 
1370
- var uncurryThis$1 = functionUncurryThis;
1373
+ var uncurryThis$7 = functionUncurryThis;
1371
1374
 
1372
- var arraySlice$1 = uncurryThis$1([].slice);
1375
+ var arraySlice$1 = uncurryThis$7([].slice);
1373
1376
 
1374
- var global$9 = global$B;
1377
+ var global$f = global$H;
1375
1378
 
1376
- var TypeError$2 = global$9.TypeError;
1379
+ var TypeError$4 = global$f.TypeError;
1377
1380
 
1378
1381
  var validateArgumentsLength$1 = function (passed, required) {
1379
- if (passed < required) throw TypeError$2('Not enough arguments');
1382
+ if (passed < required) throw TypeError$4('Not enough arguments');
1380
1383
  return passed;
1381
1384
  };
1382
1385
 
@@ -1384,17 +1387,17 @@ var userAgent$2 = engineUserAgent;
1384
1387
 
1385
1388
  var engineIsIos = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent$2);
1386
1389
 
1387
- var classof = classofRaw$1;
1388
- var global$8 = global$B;
1390
+ var classof$3 = classofRaw$1;
1391
+ var global$e = global$H;
1389
1392
 
1390
- var engineIsNode = classof(global$8.process) == 'process';
1393
+ var engineIsNode = classof$3(global$e.process) == 'process';
1391
1394
 
1392
- var global$7 = global$B;
1393
- var apply = functionApply;
1395
+ var global$d = global$H;
1396
+ var apply$1 = functionApply;
1394
1397
  var bind$2 = functionBindContext;
1395
- var isCallable$4 = isCallable$h;
1398
+ var isCallable$6 = isCallable$j;
1396
1399
  var hasOwn$1 = hasOwnProperty_1;
1397
- var fails$3 = fails$c;
1400
+ var fails$8 = fails$h;
1398
1401
  var html$1 = html$2;
1399
1402
  var arraySlice = arraySlice$1;
1400
1403
  var createElement = documentCreateElement$2;
@@ -1402,13 +1405,13 @@ var validateArgumentsLength = validateArgumentsLength$1;
1402
1405
  var IS_IOS$1 = engineIsIos;
1403
1406
  var IS_NODE$2 = engineIsNode;
1404
1407
 
1405
- var set$1 = global$7.setImmediate;
1406
- var clear = global$7.clearImmediate;
1407
- var process$3 = global$7.process;
1408
- var Dispatch = global$7.Dispatch;
1409
- var Function$1 = global$7.Function;
1410
- var MessageChannel = global$7.MessageChannel;
1411
- var String$1 = global$7.String;
1408
+ var set$1 = global$d.setImmediate;
1409
+ var clear = global$d.clearImmediate;
1410
+ var process$2 = global$d.process;
1411
+ var Dispatch = global$d.Dispatch;
1412
+ var Function$1 = global$d.Function;
1413
+ var MessageChannel = global$d.MessageChannel;
1414
+ var String$2 = global$d.String;
1412
1415
  var counter = 0;
1413
1416
  var queue$1 = {};
1414
1417
  var ONREADYSTATECHANGE = 'onreadystatechange';
@@ -1416,7 +1419,7 @@ var location, defer, channel, port;
1416
1419
 
1417
1420
  try {
1418
1421
  // Deno throws a ReferenceError on `location` access without `--location` flag
1419
- location = global$7.location;
1422
+ location = global$d.location;
1420
1423
  } catch (error) { /* empty */ }
1421
1424
 
1422
1425
  var run = function (id) {
@@ -1439,17 +1442,17 @@ var listener = function (event) {
1439
1442
 
1440
1443
  var post = function (id) {
1441
1444
  // old engines have not location.origin
1442
- global$7.postMessage(String$1(id), location.protocol + '//' + location.host);
1445
+ global$d.postMessage(String$2(id), location.protocol + '//' + location.host);
1443
1446
  };
1444
1447
 
1445
1448
  // Node.js 0.9+ & IE10+ has setImmediate, otherwise:
1446
1449
  if (!set$1 || !clear) {
1447
1450
  set$1 = function setImmediate(handler) {
1448
1451
  validateArgumentsLength(arguments.length, 1);
1449
- var fn = isCallable$4(handler) ? handler : Function$1(handler);
1452
+ var fn = isCallable$6(handler) ? handler : Function$1(handler);
1450
1453
  var args = arraySlice(arguments, 1);
1451
1454
  queue$1[++counter] = function () {
1452
- apply(fn, undefined, args);
1455
+ apply$1(fn, undefined, args);
1453
1456
  };
1454
1457
  defer(counter);
1455
1458
  return counter;
@@ -1460,7 +1463,7 @@ if (!set$1 || !clear) {
1460
1463
  // Node.js 0.8-
1461
1464
  if (IS_NODE$2) {
1462
1465
  defer = function (id) {
1463
- process$3.nextTick(runner(id));
1466
+ process$2.nextTick(runner(id));
1464
1467
  };
1465
1468
  // Sphere (JS game engine) Dispatch API
1466
1469
  } else if (Dispatch && Dispatch.now) {
@@ -1477,14 +1480,14 @@ if (!set$1 || !clear) {
1477
1480
  // Browsers with postMessage, skip WebWorkers
1478
1481
  // IE8 has postMessage, but it's sync & typeof its postMessage is 'object'
1479
1482
  } else if (
1480
- global$7.addEventListener &&
1481
- isCallable$4(global$7.postMessage) &&
1482
- !global$7.importScripts &&
1483
+ global$d.addEventListener &&
1484
+ isCallable$6(global$d.postMessage) &&
1485
+ !global$d.importScripts &&
1483
1486
  location && location.protocol !== 'file:' &&
1484
- !fails$3(post)
1487
+ !fails$8(post)
1485
1488
  ) {
1486
1489
  defer = post;
1487
- global$7.addEventListener('message', listener, false);
1490
+ global$d.addEventListener('message', listener, false);
1488
1491
  // IE8-
1489
1492
  } else if (ONREADYSTATECHANGE in createElement('script')) {
1490
1493
  defer = function (id) {
@@ -1507,29 +1510,29 @@ var task$1 = {
1507
1510
  };
1508
1511
 
1509
1512
  var userAgent$1 = engineUserAgent;
1510
- var global$6 = global$B;
1513
+ var global$c = global$H;
1511
1514
 
1512
- var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$6.Pebble !== undefined;
1515
+ var engineIsIosPebble = /ipad|iphone|ipod/i.test(userAgent$1) && global$c.Pebble !== undefined;
1513
1516
 
1514
1517
  var userAgent = engineUserAgent;
1515
1518
 
1516
1519
  var engineIsWebosWebkit = /web0s(?!.*chrome)/i.test(userAgent);
1517
1520
 
1518
- var global$5 = global$B;
1521
+ var global$b = global$H;
1519
1522
  var bind$1 = functionBindContext;
1520
- var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
1523
+ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
1521
1524
  var macrotask = task$1.set;
1522
1525
  var IS_IOS = engineIsIos;
1523
1526
  var IS_IOS_PEBBLE = engineIsIosPebble;
1524
1527
  var IS_WEBOS_WEBKIT = engineIsWebosWebkit;
1525
1528
  var IS_NODE$1 = engineIsNode;
1526
1529
 
1527
- var MutationObserver = global$5.MutationObserver || global$5.WebKitMutationObserver;
1528
- var document$2 = global$5.document;
1529
- var process$2 = global$5.process;
1530
- var Promise$1 = global$5.Promise;
1530
+ var MutationObserver = global$b.MutationObserver || global$b.WebKitMutationObserver;
1531
+ var document$2 = global$b.document;
1532
+ var process$1 = global$b.process;
1533
+ var Promise$1 = global$b.Promise;
1531
1534
  // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask`
1532
- var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global$5, 'queueMicrotask');
1535
+ var queueMicrotaskDescriptor = getOwnPropertyDescriptor$1(global$b, 'queueMicrotask');
1533
1536
  var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value;
1534
1537
 
1535
1538
  var flush, head, last, notify$1, toggle, node, promise, then;
@@ -1538,7 +1541,7 @@ var flush, head, last, notify$1, toggle, node, promise, then;
1538
1541
  if (!queueMicrotask) {
1539
1542
  flush = function () {
1540
1543
  var parent, fn;
1541
- if (IS_NODE$1 && (parent = process$2.domain)) parent.exit();
1544
+ if (IS_NODE$1 && (parent = process$1.domain)) parent.exit();
1542
1545
  while (head) {
1543
1546
  fn = head.fn;
1544
1547
  head = head.next;
@@ -1575,7 +1578,7 @@ if (!queueMicrotask) {
1575
1578
  // Node.js without promises
1576
1579
  } else if (IS_NODE$1) {
1577
1580
  notify$1 = function () {
1578
- process$2.nextTick(flush);
1581
+ process$1.nextTick(flush);
1579
1582
  };
1580
1583
  // for other environments - macrotask based on:
1581
1584
  // - setImmediate
@@ -1585,7 +1588,7 @@ if (!queueMicrotask) {
1585
1588
  // - setTimeout
1586
1589
  } else {
1587
1590
  // strange IE + webpack dev server bug - use .bind(global)
1588
- macrotask = bind$1(macrotask, global$5);
1591
+ macrotask = bind$1(macrotask, global$b);
1589
1592
  notify$1 = function () {
1590
1593
  macrotask(flush);
1591
1594
  };
@@ -1622,23 +1625,23 @@ newPromiseCapability$2.f = function (C) {
1622
1625
  return new PromiseCapability(C);
1623
1626
  };
1624
1627
 
1625
- var anObject$2 = anObject$a;
1626
- var isObject$1 = isObject$7;
1628
+ var anObject$5 = anObject$d;
1629
+ var isObject$2 = isObject$8;
1627
1630
  var newPromiseCapability$1 = newPromiseCapability$2;
1628
1631
 
1629
1632
  var promiseResolve$1 = function (C, x) {
1630
- anObject$2(C);
1631
- if (isObject$1(x) && x.constructor === C) return x;
1633
+ anObject$5(C);
1634
+ if (isObject$2(x) && x.constructor === C) return x;
1632
1635
  var promiseCapability = newPromiseCapability$1.f(C);
1633
1636
  var resolve = promiseCapability.resolve;
1634
1637
  resolve(x);
1635
1638
  return promiseCapability.promise;
1636
1639
  };
1637
1640
 
1638
- var global$4 = global$B;
1641
+ var global$a = global$H;
1639
1642
 
1640
1643
  var hostReportErrors$1 = function (a, b) {
1641
- var console = global$4.console;
1644
+ var console = global$a.console;
1642
1645
  if (console && console.error) {
1643
1646
  arguments.length == 1 ? console.error(a) : console.error(a, b);
1644
1647
  }
@@ -1678,19 +1681,19 @@ var queue = Queue$1;
1678
1681
 
1679
1682
  var engineIsBrowser = typeof window == 'object';
1680
1683
 
1681
- var $$2 = _export;
1682
- var global$3 = global$B;
1684
+ var $$4 = _export;
1685
+ var global$9 = global$H;
1683
1686
  var getBuiltIn = getBuiltIn$7;
1684
- var call$2 = functionCall;
1687
+ var call$5 = functionCall;
1685
1688
  var NativePromise = nativePromiseConstructor;
1686
- var redefine$2 = redefine$5.exports;
1689
+ var redefine$3 = redefine$6.exports;
1687
1690
  var redefineAll = redefineAll$1;
1688
1691
  var setPrototypeOf$1 = objectSetPrototypeOf;
1689
1692
  var setToStringTag$2 = setToStringTag$3;
1690
1693
  var setSpecies = setSpecies$1;
1691
1694
  var aCallable = aCallable$5;
1692
- var isCallable$3 = isCallable$h;
1693
- var isObject = isObject$7;
1695
+ var isCallable$5 = isCallable$j;
1696
+ var isObject$1 = isObject$8;
1694
1697
  var anInstance = anInstance$1;
1695
1698
  var inspectSource = inspectSource$4;
1696
1699
  var iterate = iterate$1;
@@ -1705,28 +1708,28 @@ var perform = perform$1;
1705
1708
  var Queue = queue;
1706
1709
  var InternalStateModule$1 = internalState;
1707
1710
  var isForced = isForced_1;
1708
- var wellKnownSymbol$4 = wellKnownSymbol$e;
1711
+ var wellKnownSymbol$8 = wellKnownSymbol$i;
1709
1712
  var IS_BROWSER = engineIsBrowser;
1710
1713
  var IS_NODE = engineIsNode;
1711
1714
  var V8_VERSION = engineV8Version;
1712
1715
 
1713
- var SPECIES = wellKnownSymbol$4('species');
1716
+ var SPECIES$1 = wellKnownSymbol$8('species');
1714
1717
  var PROMISE = 'Promise';
1715
1718
 
1716
- var getInternalState$1 = InternalStateModule$1.getterFor(PROMISE);
1719
+ var getInternalState$2 = InternalStateModule$1.getterFor(PROMISE);
1717
1720
  var setInternalState$1 = InternalStateModule$1.set;
1718
1721
  var getInternalPromiseState = InternalStateModule$1.getterFor(PROMISE);
1719
1722
  var NativePromisePrototype = NativePromise && NativePromise.prototype;
1720
1723
  var PromiseConstructor = NativePromise;
1721
1724
  var PromisePrototype = NativePromisePrototype;
1722
- var TypeError$1 = global$3.TypeError;
1723
- var document$1 = global$3.document;
1724
- var process$1 = global$3.process;
1725
+ var TypeError$3 = global$9.TypeError;
1726
+ var document$1 = global$9.document;
1727
+ var process = global$9.process;
1725
1728
  var newPromiseCapability = newPromiseCapabilityModule.f;
1726
1729
  var newGenericPromiseCapability = newPromiseCapability;
1727
1730
 
1728
- var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$3.dispatchEvent);
1729
- var NATIVE_REJECTION_EVENT = isCallable$3(global$3.PromiseRejectionEvent);
1731
+ var DISPATCH_EVENT = !!(document$1 && document$1.createEvent && global$9.dispatchEvent);
1732
+ var NATIVE_REJECTION_EVENT = isCallable$5(global$9.PromiseRejectionEvent);
1730
1733
  var UNHANDLED_REJECTION = 'unhandledrejection';
1731
1734
  var REJECTION_HANDLED = 'rejectionhandled';
1732
1735
  var PENDING = 0;
@@ -1755,7 +1758,7 @@ var FORCED = isForced(PROMISE, function () {
1755
1758
  exec(function () { /* empty */ }, function () { /* empty */ });
1756
1759
  };
1757
1760
  var constructor = promise.constructor = {};
1758
- constructor[SPECIES] = FakePromise;
1761
+ constructor[SPECIES$1] = FakePromise;
1759
1762
  SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise;
1760
1763
  if (!SUBCLASSING) return true;
1761
1764
  // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test
@@ -1769,7 +1772,7 @@ var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (itera
1769
1772
  // helpers
1770
1773
  var isThenable = function (it) {
1771
1774
  var then;
1772
- return isObject(it) && isCallable$3(then = it.then) ? then : false;
1775
+ return isObject$1(it) && isCallable$5(then = it.then) ? then : false;
1773
1776
  };
1774
1777
 
1775
1778
  var callReaction = function (reaction, state) {
@@ -1796,9 +1799,9 @@ var callReaction = function (reaction, state) {
1796
1799
  }
1797
1800
  }
1798
1801
  if (result === reaction.promise) {
1799
- reject(TypeError$1('Promise-chain cycle'));
1802
+ reject(TypeError$3('Promise-chain cycle'));
1800
1803
  } else if (then = isThenable(result)) {
1801
- call$2(then, result, resolve, reject);
1804
+ call$5(then, result, resolve, reject);
1802
1805
  } else resolve(result);
1803
1806
  } else reject(value);
1804
1807
  } catch (error) {
@@ -1828,14 +1831,14 @@ var dispatchEvent = function (name, promise, reason) {
1828
1831
  event.promise = promise;
1829
1832
  event.reason = reason;
1830
1833
  event.initEvent(name, false, true);
1831
- global$3.dispatchEvent(event);
1834
+ global$9.dispatchEvent(event);
1832
1835
  } else event = { promise: promise, reason: reason };
1833
- if (!NATIVE_REJECTION_EVENT && (handler = global$3['on' + name])) handler(event);
1836
+ if (!NATIVE_REJECTION_EVENT && (handler = global$9['on' + name])) handler(event);
1834
1837
  else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason);
1835
1838
  };
1836
1839
 
1837
1840
  var onUnhandled = function (state) {
1838
- call$2(task, global$3, function () {
1841
+ call$5(task, global$9, function () {
1839
1842
  var promise = state.facade;
1840
1843
  var value = state.value;
1841
1844
  var IS_UNHANDLED = isUnhandled(state);
@@ -1843,7 +1846,7 @@ var onUnhandled = function (state) {
1843
1846
  if (IS_UNHANDLED) {
1844
1847
  result = perform(function () {
1845
1848
  if (IS_NODE) {
1846
- process$1.emit('unhandledRejection', value, promise);
1849
+ process.emit('unhandledRejection', value, promise);
1847
1850
  } else dispatchEvent(UNHANDLED_REJECTION, promise, value);
1848
1851
  });
1849
1852
  // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
@@ -1858,10 +1861,10 @@ var isUnhandled = function (state) {
1858
1861
  };
1859
1862
 
1860
1863
  var onHandleUnhandled = function (state) {
1861
- call$2(task, global$3, function () {
1864
+ call$5(task, global$9, function () {
1862
1865
  var promise = state.facade;
1863
1866
  if (IS_NODE) {
1864
- process$1.emit('rejectionHandled', promise);
1867
+ process.emit('rejectionHandled', promise);
1865
1868
  } else dispatchEvent(REJECTION_HANDLED, promise, state.value);
1866
1869
  });
1867
1870
  };
@@ -1886,13 +1889,13 @@ var internalResolve = function (state, value, unwrap) {
1886
1889
  state.done = true;
1887
1890
  if (unwrap) state = unwrap;
1888
1891
  try {
1889
- if (state.facade === value) throw TypeError$1("Promise can't be resolved itself");
1892
+ if (state.facade === value) throw TypeError$3("Promise can't be resolved itself");
1890
1893
  var then = isThenable(value);
1891
1894
  if (then) {
1892
1895
  microtask(function () {
1893
1896
  var wrapper = { done: false };
1894
1897
  try {
1895
- call$2(then, value,
1898
+ call$5(then, value,
1896
1899
  bind(internalResolve, wrapper, state),
1897
1900
  bind(internalReject, wrapper, state)
1898
1901
  );
@@ -1916,8 +1919,8 @@ if (FORCED) {
1916
1919
  PromiseConstructor = function Promise(executor) {
1917
1920
  anInstance(this, PromisePrototype);
1918
1921
  aCallable(executor);
1919
- call$2(Internal, this);
1920
- var state = getInternalState$1(this);
1922
+ call$5(Internal, this);
1923
+ var state = getInternalState$2(this);
1921
1924
  try {
1922
1925
  executor(bind(internalResolve, state), bind(internalReject, state));
1923
1926
  } catch (error) {
@@ -1946,9 +1949,9 @@ if (FORCED) {
1946
1949
  var state = getInternalPromiseState(this);
1947
1950
  var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor));
1948
1951
  state.parent = true;
1949
- reaction.ok = isCallable$3(onFulfilled) ? onFulfilled : true;
1950
- reaction.fail = isCallable$3(onRejected) && onRejected;
1951
- reaction.domain = IS_NODE ? process$1.domain : undefined;
1952
+ reaction.ok = isCallable$5(onFulfilled) ? onFulfilled : true;
1953
+ reaction.fail = isCallable$5(onRejected) && onRejected;
1954
+ reaction.domain = IS_NODE ? process.domain : undefined;
1952
1955
  if (state.state == PENDING) state.reactions.add(reaction);
1953
1956
  else microtask(function () {
1954
1957
  callReaction(reaction, state);
@@ -1963,7 +1966,7 @@ if (FORCED) {
1963
1966
  });
1964
1967
  OwnPromiseCapability = function () {
1965
1968
  var promise = new Internal();
1966
- var state = getInternalState$1(promise);
1969
+ var state = getInternalState$2(promise);
1967
1970
  this.promise = promise;
1968
1971
  this.resolve = bind(internalResolve, state);
1969
1972
  this.reject = bind(internalReject, state);
@@ -1974,21 +1977,21 @@ if (FORCED) {
1974
1977
  : newGenericPromiseCapability(C);
1975
1978
  };
1976
1979
 
1977
- if (isCallable$3(NativePromise) && NativePromisePrototype !== Object.prototype) {
1980
+ if (isCallable$5(NativePromise) && NativePromisePrototype !== Object.prototype) {
1978
1981
  nativeThen = NativePromisePrototype.then;
1979
1982
 
1980
1983
  if (!SUBCLASSING) {
1981
1984
  // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
1982
- redefine$2(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
1985
+ redefine$3(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) {
1983
1986
  var that = this;
1984
1987
  return new PromiseConstructor(function (resolve, reject) {
1985
- call$2(nativeThen, that, resolve, reject);
1988
+ call$5(nativeThen, that, resolve, reject);
1986
1989
  }).then(onFulfilled, onRejected);
1987
1990
  // https://github.com/zloirock/core-js/issues/640
1988
1991
  }, { unsafe: true });
1989
1992
 
1990
1993
  // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then`
1991
- redefine$2(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });
1994
+ redefine$3(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true });
1992
1995
  }
1993
1996
 
1994
1997
  // make `.constructor === Promise` work for native promise-based APIs
@@ -2003,7 +2006,7 @@ if (FORCED) {
2003
2006
  }
2004
2007
  }
2005
2008
 
2006
- $$2({ global: true, wrap: true, forced: FORCED }, {
2009
+ $$4({ global: true, wrap: true, forced: FORCED }, {
2007
2010
  Promise: PromiseConstructor
2008
2011
  });
2009
2012
 
@@ -2013,17 +2016,17 @@ setSpecies(PROMISE);
2013
2016
  PromiseWrapper = getBuiltIn(PROMISE);
2014
2017
 
2015
2018
  // statics
2016
- $$2({ target: PROMISE, stat: true, forced: FORCED }, {
2019
+ $$4({ target: PROMISE, stat: true, forced: FORCED }, {
2017
2020
  // `Promise.reject` method
2018
2021
  // https://tc39.es/ecma262/#sec-promise.reject
2019
2022
  reject: function reject(r) {
2020
2023
  var capability = newPromiseCapability(this);
2021
- call$2(capability.reject, undefined, r);
2024
+ call$5(capability.reject, undefined, r);
2022
2025
  return capability.promise;
2023
2026
  }
2024
2027
  });
2025
2028
 
2026
- $$2({ target: PROMISE, stat: true, forced: FORCED }, {
2029
+ $$4({ target: PROMISE, stat: true, forced: FORCED }, {
2027
2030
  // `Promise.resolve` method
2028
2031
  // https://tc39.es/ecma262/#sec-promise.resolve
2029
2032
  resolve: function resolve(x) {
@@ -2031,7 +2034,7 @@ $$2({ target: PROMISE, stat: true, forced: FORCED }, {
2031
2034
  }
2032
2035
  });
2033
2036
 
2034
- $$2({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
2037
+ $$4({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
2035
2038
  // `Promise.all` method
2036
2039
  // https://tc39.es/ecma262/#sec-promise.all
2037
2040
  all: function all(iterable) {
@@ -2048,7 +2051,7 @@ $$2({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
2048
2051
  var index = counter++;
2049
2052
  var alreadyCalled = false;
2050
2053
  remaining++;
2051
- call$2($promiseResolve, C, promise).then(function (value) {
2054
+ call$5($promiseResolve, C, promise).then(function (value) {
2052
2055
  if (alreadyCalled) return;
2053
2056
  alreadyCalled = true;
2054
2057
  values[index] = value;
@@ -2069,7 +2072,7 @@ $$2({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, {
2069
2072
  var result = perform(function () {
2070
2073
  var $promiseResolve = aCallable(C.resolve);
2071
2074
  iterate(iterable, function (promise) {
2072
- call$2($promiseResolve, C, promise).then(capability.resolve, reject);
2075
+ call$5($promiseResolve, C, promise).then(capability.resolve, reject);
2073
2076
  });
2074
2077
  });
2075
2078
  if (result.error) reject(result.value);
@@ -2088,24 +2091,24 @@ var objectKeys$2 = Object.keys || function keys(O) {
2088
2091
  };
2089
2092
 
2090
2093
  var DESCRIPTORS$2 = descriptors;
2091
- var uncurryThis = functionUncurryThis;
2092
- var call$1 = functionCall;
2093
- var fails$2 = fails$c;
2094
+ var uncurryThis$6 = functionUncurryThis;
2095
+ var call$4 = functionCall;
2096
+ var fails$7 = fails$h;
2094
2097
  var objectKeys$1 = objectKeys$2;
2095
2098
  var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
2096
2099
  var propertyIsEnumerableModule = objectPropertyIsEnumerable;
2097
- var toObject$1 = toObject$3;
2100
+ var toObject$2 = toObject$4;
2098
2101
  var IndexedObject = indexedObject;
2099
2102
 
2100
2103
  // eslint-disable-next-line es/no-object-assign -- safe
2101
2104
  var $assign = Object.assign;
2102
2105
  // eslint-disable-next-line es/no-object-defineproperty -- required for testing
2103
2106
  var defineProperty$1 = Object.defineProperty;
2104
- var concat = uncurryThis([].concat);
2107
+ var concat$1 = uncurryThis$6([].concat);
2105
2108
 
2106
2109
  // `Object.assign` method
2107
2110
  // https://tc39.es/ecma262/#sec-object.assign
2108
- var objectAssign = !$assign || fails$2(function () {
2111
+ var objectAssign = !$assign || fails$7(function () {
2109
2112
  // should have correct order of operations (Edge bug)
2110
2113
  if (DESCRIPTORS$2 && $assign({ b: 1 }, $assign(defineProperty$1({}, 'a', {
2111
2114
  enumerable: true,
@@ -2126,31 +2129,31 @@ var objectAssign = !$assign || fails$2(function () {
2126
2129
  alphabet.split('').forEach(function (chr) { B[chr] = chr; });
2127
2130
  return $assign({}, A)[symbol] != 7 || objectKeys$1($assign({}, B)).join('') != alphabet;
2128
2131
  }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`
2129
- var T = toObject$1(target);
2132
+ var T = toObject$2(target);
2130
2133
  var argumentsLength = arguments.length;
2131
2134
  var index = 1;
2132
2135
  var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;
2133
2136
  var propertyIsEnumerable = propertyIsEnumerableModule.f;
2134
2137
  while (argumentsLength > index) {
2135
2138
  var S = IndexedObject(arguments[index++]);
2136
- var keys = getOwnPropertySymbols ? concat(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
2139
+ var keys = getOwnPropertySymbols ? concat$1(objectKeys$1(S), getOwnPropertySymbols(S)) : objectKeys$1(S);
2137
2140
  var length = keys.length;
2138
2141
  var j = 0;
2139
2142
  var key;
2140
2143
  while (length > j) {
2141
2144
  key = keys[j++];
2142
- if (!DESCRIPTORS$2 || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
2145
+ if (!DESCRIPTORS$2 || call$4(propertyIsEnumerable, S, key)) T[key] = S[key];
2143
2146
  }
2144
2147
  } return T;
2145
2148
  } : $assign;
2146
2149
 
2147
- var $$1 = _export;
2150
+ var $$3 = _export;
2148
2151
  var assign = objectAssign;
2149
2152
 
2150
2153
  // `Object.assign` method
2151
2154
  // https://tc39.es/ecma262/#sec-object.assign
2152
2155
  // eslint-disable-next-line es/no-object-assign -- required for testing
2153
- $$1({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
2156
+ $$3({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
2154
2157
  assign: assign
2155
2158
  });
2156
2159
 
@@ -2219,724 +2222,14 @@ const buildClientNinetailedRequestContext = () => ({
2219
2222
  }
2220
2223
  });
2221
2224
 
2222
- var browser = {exports: {}};
2223
-
2224
- /**
2225
- * Helpers.
2226
- */
2227
-
2228
- var s = 1000;
2229
- var m = s * 60;
2230
- var h = m * 60;
2231
- var d = h * 24;
2232
- var w = d * 7;
2233
- var y = d * 365.25;
2234
-
2235
- /**
2236
- * Parse or format the given `val`.
2237
- *
2238
- * Options:
2239
- *
2240
- * - `long` verbose formatting [false]
2241
- *
2242
- * @param {String|Number} val
2243
- * @param {Object} [options]
2244
- * @throws {Error} throw an error if val is not a non-empty string or a number
2245
- * @return {String|Number}
2246
- * @api public
2247
- */
2248
-
2249
- var ms = function(val, options) {
2250
- options = options || {};
2251
- var type = typeof val;
2252
- if (type === 'string' && val.length > 0) {
2253
- return parse(val);
2254
- } else if (type === 'number' && isFinite(val)) {
2255
- return options.long ? fmtLong(val) : fmtShort(val);
2256
- }
2257
- throw new Error(
2258
- 'val is not a non-empty string or a valid number. val=' +
2259
- JSON.stringify(val)
2260
- );
2261
- };
2262
-
2263
- /**
2264
- * Parse the given `str` and return milliseconds.
2265
- *
2266
- * @param {String} str
2267
- * @return {Number}
2268
- * @api private
2269
- */
2270
-
2271
- function parse(str) {
2272
- str = String(str);
2273
- if (str.length > 100) {
2274
- return;
2275
- }
2276
- var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
2277
- str
2278
- );
2279
- if (!match) {
2280
- return;
2281
- }
2282
- var n = parseFloat(match[1]);
2283
- var type = (match[2] || 'ms').toLowerCase();
2284
- switch (type) {
2285
- case 'years':
2286
- case 'year':
2287
- case 'yrs':
2288
- case 'yr':
2289
- case 'y':
2290
- return n * y;
2291
- case 'weeks':
2292
- case 'week':
2293
- case 'w':
2294
- return n * w;
2295
- case 'days':
2296
- case 'day':
2297
- case 'd':
2298
- return n * d;
2299
- case 'hours':
2300
- case 'hour':
2301
- case 'hrs':
2302
- case 'hr':
2303
- case 'h':
2304
- return n * h;
2305
- case 'minutes':
2306
- case 'minute':
2307
- case 'mins':
2308
- case 'min':
2309
- case 'm':
2310
- return n * m;
2311
- case 'seconds':
2312
- case 'second':
2313
- case 'secs':
2314
- case 'sec':
2315
- case 's':
2316
- return n * s;
2317
- case 'milliseconds':
2318
- case 'millisecond':
2319
- case 'msecs':
2320
- case 'msec':
2321
- case 'ms':
2322
- return n;
2323
- default:
2324
- return undefined;
2325
- }
2326
- }
2327
-
2328
- /**
2329
- * Short format for `ms`.
2330
- *
2331
- * @param {Number} ms
2332
- * @return {String}
2333
- * @api private
2334
- */
2335
-
2336
- function fmtShort(ms) {
2337
- var msAbs = Math.abs(ms);
2338
- if (msAbs >= d) {
2339
- return Math.round(ms / d) + 'd';
2340
- }
2341
- if (msAbs >= h) {
2342
- return Math.round(ms / h) + 'h';
2343
- }
2344
- if (msAbs >= m) {
2345
- return Math.round(ms / m) + 'm';
2346
- }
2347
- if (msAbs >= s) {
2348
- return Math.round(ms / s) + 's';
2349
- }
2350
- return ms + 'ms';
2351
- }
2352
-
2353
- /**
2354
- * Long format for `ms`.
2355
- *
2356
- * @param {Number} ms
2357
- * @return {String}
2358
- * @api private
2359
- */
2360
-
2361
- function fmtLong(ms) {
2362
- var msAbs = Math.abs(ms);
2363
- if (msAbs >= d) {
2364
- return plural(ms, msAbs, d, 'day');
2365
- }
2366
- if (msAbs >= h) {
2367
- return plural(ms, msAbs, h, 'hour');
2368
- }
2369
- if (msAbs >= m) {
2370
- return plural(ms, msAbs, m, 'minute');
2371
- }
2372
- if (msAbs >= s) {
2373
- return plural(ms, msAbs, s, 'second');
2374
- }
2375
- return ms + ' ms';
2376
- }
2377
-
2378
- /**
2379
- * Pluralization helper.
2380
- */
2381
-
2382
- function plural(ms, msAbs, n, name) {
2383
- var isPlural = msAbs >= n * 1.5;
2384
- return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
2385
- }
2386
-
2387
- /**
2388
- * This is the common logic for both the Node.js and web browser
2389
- * implementations of `debug()`.
2390
- */
2391
-
2392
- function setup(env) {
2393
- createDebug.debug = createDebug;
2394
- createDebug.default = createDebug;
2395
- createDebug.coerce = coerce;
2396
- createDebug.disable = disable;
2397
- createDebug.enable = enable;
2398
- createDebug.enabled = enabled;
2399
- createDebug.humanize = ms;
2400
- createDebug.destroy = destroy;
2401
-
2402
- Object.keys(env).forEach(key => {
2403
- createDebug[key] = env[key];
2404
- });
2405
-
2406
- /**
2407
- * The currently active debug mode names, and names to skip.
2408
- */
2409
-
2410
- createDebug.names = [];
2411
- createDebug.skips = [];
2412
-
2413
- /**
2414
- * Map of special "%n" handling functions, for the debug "format" argument.
2415
- *
2416
- * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
2417
- */
2418
- createDebug.formatters = {};
2419
-
2420
- /**
2421
- * Selects a color for a debug namespace
2422
- * @param {String} namespace The namespace string for the debug instance to be colored
2423
- * @return {Number|String} An ANSI color code for the given namespace
2424
- * @api private
2425
- */
2426
- function selectColor(namespace) {
2427
- let hash = 0;
2428
-
2429
- for (let i = 0; i < namespace.length; i++) {
2430
- hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
2431
- hash |= 0; // Convert to 32bit integer
2432
- }
2433
-
2434
- return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
2435
- }
2436
- createDebug.selectColor = selectColor;
2437
-
2438
- /**
2439
- * Create a debugger with the given `namespace`.
2440
- *
2441
- * @param {String} namespace
2442
- * @return {Function}
2443
- * @api public
2444
- */
2445
- function createDebug(namespace) {
2446
- let prevTime;
2447
- let enableOverride = null;
2448
- let namespacesCache;
2449
- let enabledCache;
2450
-
2451
- function debug(...args) {
2452
- // Disabled?
2453
- if (!debug.enabled) {
2454
- return;
2455
- }
2456
-
2457
- const self = debug;
2458
-
2459
- // Set `diff` timestamp
2460
- const curr = Number(new Date());
2461
- const ms = curr - (prevTime || curr);
2462
- self.diff = ms;
2463
- self.prev = prevTime;
2464
- self.curr = curr;
2465
- prevTime = curr;
2466
-
2467
- args[0] = createDebug.coerce(args[0]);
2468
-
2469
- if (typeof args[0] !== 'string') {
2470
- // Anything else let's inspect with %O
2471
- args.unshift('%O');
2472
- }
2473
-
2474
- // Apply any `formatters` transformations
2475
- let index = 0;
2476
- args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
2477
- // If we encounter an escaped % then don't increase the array index
2478
- if (match === '%%') {
2479
- return '%';
2480
- }
2481
- index++;
2482
- const formatter = createDebug.formatters[format];
2483
- if (typeof formatter === 'function') {
2484
- const val = args[index];
2485
- match = formatter.call(self, val);
2486
-
2487
- // Now we need to remove `args[index]` since it's inlined in the `format`
2488
- args.splice(index, 1);
2489
- index--;
2490
- }
2491
- return match;
2492
- });
2493
-
2494
- // Apply env-specific formatting (colors, etc.)
2495
- createDebug.formatArgs.call(self, args);
2496
-
2497
- const logFn = self.log || createDebug.log;
2498
- logFn.apply(self, args);
2499
- }
2500
-
2501
- debug.namespace = namespace;
2502
- debug.useColors = createDebug.useColors();
2503
- debug.color = createDebug.selectColor(namespace);
2504
- debug.extend = extend;
2505
- debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
2506
-
2507
- Object.defineProperty(debug, 'enabled', {
2508
- enumerable: true,
2509
- configurable: false,
2510
- get: () => {
2511
- if (enableOverride !== null) {
2512
- return enableOverride;
2513
- }
2514
- if (namespacesCache !== createDebug.namespaces) {
2515
- namespacesCache = createDebug.namespaces;
2516
- enabledCache = createDebug.enabled(namespace);
2517
- }
2518
-
2519
- return enabledCache;
2520
- },
2521
- set: v => {
2522
- enableOverride = v;
2523
- }
2524
- });
2525
-
2526
- // Env-specific initialization logic for debug instances
2527
- if (typeof createDebug.init === 'function') {
2528
- createDebug.init(debug);
2529
- }
2530
-
2531
- return debug;
2532
- }
2533
-
2534
- function extend(namespace, delimiter) {
2535
- const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
2536
- newDebug.log = this.log;
2537
- return newDebug;
2538
- }
2539
-
2540
- /**
2541
- * Enables a debug mode by namespaces. This can include modes
2542
- * separated by a colon and wildcards.
2543
- *
2544
- * @param {String} namespaces
2545
- * @api public
2546
- */
2547
- function enable(namespaces) {
2548
- createDebug.save(namespaces);
2549
- createDebug.namespaces = namespaces;
2550
-
2551
- createDebug.names = [];
2552
- createDebug.skips = [];
2553
-
2554
- let i;
2555
- const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
2556
- const len = split.length;
2557
-
2558
- for (i = 0; i < len; i++) {
2559
- if (!split[i]) {
2560
- // ignore empty strings
2561
- continue;
2562
- }
2563
-
2564
- namespaces = split[i].replace(/\*/g, '.*?');
2565
-
2566
- if (namespaces[0] === '-') {
2567
- createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
2568
- } else {
2569
- createDebug.names.push(new RegExp('^' + namespaces + '$'));
2570
- }
2571
- }
2572
- }
2573
-
2574
- /**
2575
- * Disable debug output.
2576
- *
2577
- * @return {String} namespaces
2578
- * @api public
2579
- */
2580
- function disable() {
2581
- const namespaces = [
2582
- ...createDebug.names.map(toNamespace),
2583
- ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
2584
- ].join(',');
2585
- createDebug.enable('');
2586
- return namespaces;
2587
- }
2588
-
2589
- /**
2590
- * Returns true if the given mode name is enabled, false otherwise.
2591
- *
2592
- * @param {String} name
2593
- * @return {Boolean}
2594
- * @api public
2595
- */
2596
- function enabled(name) {
2597
- if (name[name.length - 1] === '*') {
2598
- return true;
2599
- }
2600
-
2601
- let i;
2602
- let len;
2603
-
2604
- for (i = 0, len = createDebug.skips.length; i < len; i++) {
2605
- if (createDebug.skips[i].test(name)) {
2606
- return false;
2607
- }
2608
- }
2609
-
2610
- for (i = 0, len = createDebug.names.length; i < len; i++) {
2611
- if (createDebug.names[i].test(name)) {
2612
- return true;
2613
- }
2614
- }
2615
-
2616
- return false;
2617
- }
2618
-
2619
- /**
2620
- * Convert regexp to namespace
2621
- *
2622
- * @param {RegExp} regxep
2623
- * @return {String} namespace
2624
- * @api private
2625
- */
2626
- function toNamespace(regexp) {
2627
- return regexp.toString()
2628
- .substring(2, regexp.toString().length - 2)
2629
- .replace(/\.\*\?$/, '*');
2630
- }
2631
-
2632
- /**
2633
- * Coerce `val`.
2634
- *
2635
- * @param {Mixed} val
2636
- * @return {Mixed}
2637
- * @api private
2638
- */
2639
- function coerce(val) {
2640
- if (val instanceof Error) {
2641
- return val.stack || val.message;
2642
- }
2643
- return val;
2644
- }
2645
-
2646
- /**
2647
- * XXX DO NOT USE. This is a temporary stub function.
2648
- * XXX It WILL be removed in the next major release.
2649
- */
2650
- function destroy() {
2651
- console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
2652
- }
2653
-
2654
- createDebug.enable(createDebug.load());
2655
-
2656
- return createDebug;
2657
- }
2658
-
2659
- var common = setup;
2660
-
2661
- /* eslint-env browser */
2662
-
2663
- (function (module, exports) {
2664
- /**
2665
- * This is the web browser implementation of `debug()`.
2666
- */
2667
-
2668
- exports.formatArgs = formatArgs;
2669
- exports.save = save;
2670
- exports.load = load;
2671
- exports.useColors = useColors;
2672
- exports.storage = localstorage();
2673
- exports.destroy = (() => {
2674
- let warned = false;
2675
-
2676
- return () => {
2677
- if (!warned) {
2678
- warned = true;
2679
- console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
2680
- }
2681
- };
2682
- })();
2683
-
2684
- /**
2685
- * Colors.
2686
- */
2687
-
2688
- exports.colors = [
2689
- '#0000CC',
2690
- '#0000FF',
2691
- '#0033CC',
2692
- '#0033FF',
2693
- '#0066CC',
2694
- '#0066FF',
2695
- '#0099CC',
2696
- '#0099FF',
2697
- '#00CC00',
2698
- '#00CC33',
2699
- '#00CC66',
2700
- '#00CC99',
2701
- '#00CCCC',
2702
- '#00CCFF',
2703
- '#3300CC',
2704
- '#3300FF',
2705
- '#3333CC',
2706
- '#3333FF',
2707
- '#3366CC',
2708
- '#3366FF',
2709
- '#3399CC',
2710
- '#3399FF',
2711
- '#33CC00',
2712
- '#33CC33',
2713
- '#33CC66',
2714
- '#33CC99',
2715
- '#33CCCC',
2716
- '#33CCFF',
2717
- '#6600CC',
2718
- '#6600FF',
2719
- '#6633CC',
2720
- '#6633FF',
2721
- '#66CC00',
2722
- '#66CC33',
2723
- '#9900CC',
2724
- '#9900FF',
2725
- '#9933CC',
2726
- '#9933FF',
2727
- '#99CC00',
2728
- '#99CC33',
2729
- '#CC0000',
2730
- '#CC0033',
2731
- '#CC0066',
2732
- '#CC0099',
2733
- '#CC00CC',
2734
- '#CC00FF',
2735
- '#CC3300',
2736
- '#CC3333',
2737
- '#CC3366',
2738
- '#CC3399',
2739
- '#CC33CC',
2740
- '#CC33FF',
2741
- '#CC6600',
2742
- '#CC6633',
2743
- '#CC9900',
2744
- '#CC9933',
2745
- '#CCCC00',
2746
- '#CCCC33',
2747
- '#FF0000',
2748
- '#FF0033',
2749
- '#FF0066',
2750
- '#FF0099',
2751
- '#FF00CC',
2752
- '#FF00FF',
2753
- '#FF3300',
2754
- '#FF3333',
2755
- '#FF3366',
2756
- '#FF3399',
2757
- '#FF33CC',
2758
- '#FF33FF',
2759
- '#FF6600',
2760
- '#FF6633',
2761
- '#FF9900',
2762
- '#FF9933',
2763
- '#FFCC00',
2764
- '#FFCC33'
2765
- ];
2766
-
2767
- /**
2768
- * Currently only WebKit-based Web Inspectors, Firefox >= v31,
2769
- * and the Firebug extension (any Firefox version) are known
2770
- * to support "%c" CSS customizations.
2771
- *
2772
- * TODO: add a `localStorage` variable to explicitly enable/disable colors
2773
- */
2774
-
2775
- // eslint-disable-next-line complexity
2776
- function useColors() {
2777
- // NB: In an Electron preload script, document will be defined but not fully
2778
- // initialized. Since we know we're in Chrome, we'll just detect this case
2779
- // explicitly
2780
- if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
2781
- return true;
2782
- }
2783
-
2784
- // Internet Explorer and Edge do not support colors.
2785
- if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
2786
- return false;
2787
- }
2788
-
2789
- // Is webkit? http://stackoverflow.com/a/16459606/376773
2790
- // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
2791
- return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
2792
- // Is firebug? http://stackoverflow.com/a/398120/376773
2793
- (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
2794
- // Is firefox >= v31?
2795
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
2796
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
2797
- // Double check webkit in userAgent just in case we are in a worker
2798
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
2799
- }
2800
-
2801
- /**
2802
- * Colorize log arguments if enabled.
2803
- *
2804
- * @api public
2805
- */
2806
-
2807
- function formatArgs(args) {
2808
- args[0] = (this.useColors ? '%c' : '') +
2809
- this.namespace +
2810
- (this.useColors ? ' %c' : ' ') +
2811
- args[0] +
2812
- (this.useColors ? '%c ' : ' ') +
2813
- '+' + module.exports.humanize(this.diff);
2814
-
2815
- if (!this.useColors) {
2816
- return;
2817
- }
2818
-
2819
- const c = 'color: ' + this.color;
2820
- args.splice(1, 0, c, 'color: inherit');
2821
-
2822
- // The final "%c" is somewhat tricky, because there could be other
2823
- // arguments passed either before or after the %c, so we need to
2824
- // figure out the correct index to insert the CSS into
2825
- let index = 0;
2826
- let lastC = 0;
2827
- args[0].replace(/%[a-zA-Z%]/g, match => {
2828
- if (match === '%%') {
2829
- return;
2830
- }
2831
- index++;
2832
- if (match === '%c') {
2833
- // We only are interested in the *last* %c
2834
- // (the user may have provided their own)
2835
- lastC = index;
2836
- }
2837
- });
2838
-
2839
- args.splice(lastC, 0, c);
2840
- }
2841
-
2842
- /**
2843
- * Invokes `console.debug()` when available.
2844
- * No-op when `console.debug` is not a "function".
2845
- * If `console.debug` is not available, falls back
2846
- * to `console.log`.
2847
- *
2848
- * @api public
2849
- */
2850
- exports.log = console.debug || console.log || (() => {});
2851
-
2852
- /**
2853
- * Save `namespaces`.
2854
- *
2855
- * @param {String} namespaces
2856
- * @api private
2857
- */
2858
- function save(namespaces) {
2859
- try {
2860
- if (namespaces) {
2861
- exports.storage.setItem('debug', namespaces);
2862
- } else {
2863
- exports.storage.removeItem('debug');
2864
- }
2865
- } catch (error) {
2866
- // Swallow
2867
- // XXX (@Qix-) should we be logging these?
2868
- }
2869
- }
2870
-
2871
- /**
2872
- * Load `namespaces`.
2873
- *
2874
- * @return {String} returns the previously persisted debug modes
2875
- * @api private
2876
- */
2877
- function load() {
2878
- let r;
2879
- try {
2880
- r = exports.storage.getItem('debug');
2881
- } catch (error) {
2882
- // Swallow
2883
- // XXX (@Qix-) should we be logging these?
2884
- }
2885
-
2886
- // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
2887
- if (!r && typeof process !== 'undefined' && 'env' in process) {
2888
- r = process.env.DEBUG;
2889
- }
2890
-
2891
- return r;
2892
- }
2893
-
2894
- /**
2895
- * Localstorage attempts to return the localstorage.
2896
- *
2897
- * This is necessary because safari throws
2898
- * when a user disables cookies/localstorage
2899
- * and you attempt to access it.
2900
- *
2901
- * @return {LocalStorage}
2902
- * @api private
2903
- */
2904
-
2905
- function localstorage() {
2906
- try {
2907
- // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
2908
- // The Browser also has localStorage in the global context.
2909
- return localStorage;
2910
- } catch (error) {
2911
- // Swallow
2912
- // XXX (@Qix-) should we be logging these?
2913
- }
2914
- }
2915
-
2916
- module.exports = common(exports);
2917
-
2918
- const {formatters} = module.exports;
2919
-
2920
- /**
2921
- * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
2922
- */
2923
-
2924
- formatters.j = function (v) {
2925
- try {
2926
- return JSON.stringify(v);
2927
- } catch (error) {
2928
- return '[UnexpectedJSONParseError]: ' + error.message;
2929
- }
2930
- };
2931
- }(browser, browser.exports));
2932
-
2933
- var Debug = browser.exports;
2934
-
2935
- const log = Debug('ninetailed:experience-sdk');
2936
2225
  const enable = () => {
2937
- Debug.enable('ninetailed:experience-sdk');
2226
+ loglevel.enableAll();
2227
+ };
2228
+ const disable = () => {
2229
+ loglevel.disableAll();
2938
2230
  };
2939
- const disable = () => Debug.disable();
2231
+ const Logger = loglevel.getLogger('ninetailed:experience.js');
2232
+ const log = Logger.log;
2940
2233
 
2941
2234
  const BASE_URL = 'https://api.ninetailed.co';
2942
2235
 
@@ -3261,7 +2554,7 @@ var objectDefineProperties = {};
3261
2554
  var DESCRIPTORS$1 = descriptors;
3262
2555
  var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
3263
2556
  var definePropertyModule$1 = objectDefineProperty;
3264
- var anObject$1 = anObject$a;
2557
+ var anObject$4 = anObject$d;
3265
2558
  var toIndexedObject$1 = toIndexedObject$5;
3266
2559
  var objectKeys = objectKeys$2;
3267
2560
 
@@ -3269,7 +2562,7 @@ var objectKeys = objectKeys$2;
3269
2562
  // https://tc39.es/ecma262/#sec-object.defineproperties
3270
2563
  // eslint-disable-next-line es/no-object-defineproperties -- safe
3271
2564
  objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
3272
- anObject$1(O);
2565
+ anObject$4(O);
3273
2566
  var props = toIndexedObject$1(Properties);
3274
2567
  var keys = objectKeys(Properties);
3275
2568
  var length = keys.length;
@@ -3281,7 +2574,7 @@ objectDefineProperties.f = DESCRIPTORS$1 && !V8_PROTOTYPE_DEFINE_BUG ? Object.de
3281
2574
 
3282
2575
  /* global ActiveXObject -- old IE, WSH */
3283
2576
 
3284
- var anObject = anObject$a;
2577
+ var anObject$3 = anObject$d;
3285
2578
  var definePropertiesModule = objectDefineProperties;
3286
2579
  var enumBugKeys = enumBugKeys$3;
3287
2580
  var hiddenKeys = hiddenKeys$4;
@@ -3354,7 +2647,7 @@ hiddenKeys[IE_PROTO$1] = true;
3354
2647
  var objectCreate = Object.create || function create(O, Properties) {
3355
2648
  var result;
3356
2649
  if (O !== null) {
3357
- EmptyConstructor[PROTOTYPE] = anObject(O);
2650
+ EmptyConstructor[PROTOTYPE] = anObject$3(O);
3358
2651
  result = new EmptyConstructor();
3359
2652
  EmptyConstructor[PROTOTYPE] = null;
3360
2653
  // add "__proto__" for Object.getPrototypeOf polyfill
@@ -3363,11 +2656,11 @@ var objectCreate = Object.create || function create(O, Properties) {
3363
2656
  return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
3364
2657
  };
3365
2658
 
3366
- var wellKnownSymbol$3 = wellKnownSymbol$e;
3367
- var create$1 = objectCreate;
2659
+ var wellKnownSymbol$7 = wellKnownSymbol$i;
2660
+ var create$2 = objectCreate;
3368
2661
  var definePropertyModule = objectDefineProperty;
3369
2662
 
3370
- var UNSCOPABLES = wellKnownSymbol$3('unscopables');
2663
+ var UNSCOPABLES = wellKnownSymbol$7('unscopables');
3371
2664
  var ArrayPrototype = Array.prototype;
3372
2665
 
3373
2666
  // Array.prototype[@@unscopables]
@@ -3375,7 +2668,7 @@ var ArrayPrototype = Array.prototype;
3375
2668
  if (ArrayPrototype[UNSCOPABLES] == undefined) {
3376
2669
  definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {
3377
2670
  configurable: true,
3378
- value: create$1(null)
2671
+ value: create$2(null)
3379
2672
  });
3380
2673
  }
3381
2674
 
@@ -3384,44 +2677,44 @@ var addToUnscopables$1 = function (key) {
3384
2677
  ArrayPrototype[UNSCOPABLES][key] = true;
3385
2678
  };
3386
2679
 
3387
- var fails$1 = fails$c;
2680
+ var fails$6 = fails$h;
3388
2681
 
3389
- var correctPrototypeGetter = !fails$1(function () {
2682
+ var correctPrototypeGetter = !fails$6(function () {
3390
2683
  function F() { /* empty */ }
3391
2684
  F.prototype.constructor = null;
3392
2685
  // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
3393
2686
  return Object.getPrototypeOf(new F()) !== F.prototype;
3394
2687
  });
3395
2688
 
3396
- var global$2 = global$B;
2689
+ var global$8 = global$H;
3397
2690
  var hasOwn = hasOwnProperty_1;
3398
- var isCallable$2 = isCallable$h;
3399
- var toObject = toObject$3;
2691
+ var isCallable$4 = isCallable$j;
2692
+ var toObject$1 = toObject$4;
3400
2693
  var sharedKey = sharedKey$3;
3401
2694
  var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
3402
2695
 
3403
2696
  var IE_PROTO = sharedKey('IE_PROTO');
3404
- var Object$1 = global$2.Object;
2697
+ var Object$1 = global$8.Object;
3405
2698
  var ObjectPrototype = Object$1.prototype;
3406
2699
 
3407
2700
  // `Object.getPrototypeOf` method
3408
2701
  // https://tc39.es/ecma262/#sec-object.getprototypeof
3409
2702
  var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? Object$1.getPrototypeOf : function (O) {
3410
- var object = toObject(O);
2703
+ var object = toObject$1(O);
3411
2704
  if (hasOwn(object, IE_PROTO)) return object[IE_PROTO];
3412
2705
  var constructor = object.constructor;
3413
- if (isCallable$2(constructor) && object instanceof constructor) {
2706
+ if (isCallable$4(constructor) && object instanceof constructor) {
3414
2707
  return constructor.prototype;
3415
2708
  } return object instanceof Object$1 ? ObjectPrototype : null;
3416
2709
  };
3417
2710
 
3418
- var fails = fails$c;
3419
- var isCallable$1 = isCallable$h;
2711
+ var fails$5 = fails$h;
2712
+ var isCallable$3 = isCallable$j;
3420
2713
  var getPrototypeOf$1 = objectGetPrototypeOf;
3421
- var redefine$1 = redefine$5.exports;
3422
- var wellKnownSymbol$2 = wellKnownSymbol$e;
2714
+ var redefine$2 = redefine$6.exports;
2715
+ var wellKnownSymbol$6 = wellKnownSymbol$i;
3423
2716
 
3424
- var ITERATOR$2 = wellKnownSymbol$2('iterator');
2717
+ var ITERATOR$2 = wellKnownSymbol$6('iterator');
3425
2718
  var BUGGY_SAFARI_ITERATORS$1 = false;
3426
2719
 
3427
2720
  // `%IteratorPrototype%` object
@@ -3439,7 +2732,7 @@ if ([].keys) {
3439
2732
  }
3440
2733
  }
3441
2734
 
3442
- var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails(function () {
2735
+ var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails$5(function () {
3443
2736
  var test = {};
3444
2737
  // FF44- legacy iterators case
3445
2738
  return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
@@ -3449,8 +2742,8 @@ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
3449
2742
 
3450
2743
  // `%IteratorPrototype%[@@iterator]()` method
3451
2744
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
3452
- if (!isCallable$1(IteratorPrototype$2[ITERATOR$2])) {
3453
- redefine$1(IteratorPrototype$2, ITERATOR$2, function () {
2745
+ if (!isCallable$3(IteratorPrototype$2[ITERATOR$2])) {
2746
+ redefine$2(IteratorPrototype$2, ITERATOR$2, function () {
3454
2747
  return this;
3455
2748
  });
3456
2749
  }
@@ -3461,7 +2754,7 @@ var iteratorsCore = {
3461
2754
  };
3462
2755
 
3463
2756
  var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
3464
- var create = objectCreate;
2757
+ var create$1 = objectCreate;
3465
2758
  var createPropertyDescriptor = createPropertyDescriptor$3;
3466
2759
  var setToStringTag$1 = setToStringTag$3;
3467
2760
  var Iterators$2 = iterators;
@@ -3470,23 +2763,23 @@ var returnThis$1 = function () { return this; };
3470
2763
 
3471
2764
  var createIteratorConstructor$1 = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
3472
2765
  var TO_STRING_TAG = NAME + ' Iterator';
3473
- IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
2766
+ IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
3474
2767
  setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
3475
2768
  Iterators$2[TO_STRING_TAG] = returnThis$1;
3476
2769
  return IteratorConstructor;
3477
2770
  };
3478
2771
 
3479
- var $ = _export;
3480
- var call = functionCall;
2772
+ var $$2 = _export;
2773
+ var call$3 = functionCall;
3481
2774
  var FunctionName = functionName;
3482
- var isCallable = isCallable$h;
2775
+ var isCallable$2 = isCallable$j;
3483
2776
  var createIteratorConstructor = createIteratorConstructor$1;
3484
2777
  var getPrototypeOf = objectGetPrototypeOf;
3485
2778
  var setPrototypeOf = objectSetPrototypeOf;
3486
2779
  var setToStringTag = setToStringTag$3;
3487
- var createNonEnumerableProperty$1 = createNonEnumerableProperty$5;
3488
- var redefine = redefine$5.exports;
3489
- var wellKnownSymbol$1 = wellKnownSymbol$e;
2780
+ var createNonEnumerableProperty$2 = createNonEnumerableProperty$6;
2781
+ var redefine$1 = redefine$6.exports;
2782
+ var wellKnownSymbol$5 = wellKnownSymbol$i;
3490
2783
  var Iterators$1 = iterators;
3491
2784
  var IteratorsCore = iteratorsCore;
3492
2785
 
@@ -3494,7 +2787,7 @@ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
3494
2787
  var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
3495
2788
  var IteratorPrototype = IteratorsCore.IteratorPrototype;
3496
2789
  var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
3497
- var ITERATOR$1 = wellKnownSymbol$1('iterator');
2790
+ var ITERATOR$1 = wellKnownSymbol$5('iterator');
3498
2791
  var KEYS = 'keys';
3499
2792
  var VALUES = 'values';
3500
2793
  var ENTRIES = 'entries';
@@ -3531,8 +2824,8 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
3531
2824
  if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
3532
2825
  if (setPrototypeOf) {
3533
2826
  setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
3534
- } else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
3535
- redefine(CurrentIteratorPrototype, ITERATOR$1, returnThis);
2827
+ } else if (!isCallable$2(CurrentIteratorPrototype[ITERATOR$1])) {
2828
+ redefine$1(CurrentIteratorPrototype, ITERATOR$1, returnThis);
3536
2829
  }
3537
2830
  }
3538
2831
  // Set @@toStringTag to native iterators
@@ -3543,10 +2836,10 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
3543
2836
  // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
3544
2837
  if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
3545
2838
  if (CONFIGURABLE_FUNCTION_NAME) {
3546
- createNonEnumerableProperty$1(IterablePrototype, 'name', VALUES);
2839
+ createNonEnumerableProperty$2(IterablePrototype, 'name', VALUES);
3547
2840
  } else {
3548
2841
  INCORRECT_VALUES_NAME = true;
3549
- defaultIterator = function values() { return call(nativeIterator, this); };
2842
+ defaultIterator = function values() { return call$3(nativeIterator, this); };
3550
2843
  }
3551
2844
  }
3552
2845
 
@@ -3559,14 +2852,14 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
3559
2852
  };
3560
2853
  if (FORCED) for (KEY in methods) {
3561
2854
  if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
3562
- redefine(IterablePrototype, KEY, methods[KEY]);
2855
+ redefine$1(IterablePrototype, KEY, methods[KEY]);
3563
2856
  }
3564
- } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
2857
+ } else $$2({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
3565
2858
  }
3566
2859
 
3567
2860
  // define iterator
3568
2861
  if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
3569
- redefine(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
2862
+ redefine$1(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
3570
2863
  }
3571
2864
  Iterators$1[NAME] = defaultIterator;
3572
2865
 
@@ -3583,7 +2876,7 @@ var DESCRIPTORS = descriptors;
3583
2876
 
3584
2877
  var ARRAY_ITERATOR = 'Array Iterator';
3585
2878
  var setInternalState = InternalStateModule.set;
3586
- var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);
2879
+ var getInternalState$1 = InternalStateModule.getterFor(ARRAY_ITERATOR);
3587
2880
 
3588
2881
  // `Array.prototype.entries` method
3589
2882
  // https://tc39.es/ecma262/#sec-array.prototype.entries
@@ -3605,7 +2898,7 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
3605
2898
  // `%ArrayIteratorPrototype%.next` method
3606
2899
  // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
3607
2900
  }, function () {
3608
- var state = getInternalState(this);
2901
+ var state = getInternalState$1(this);
3609
2902
  var target = state.target;
3610
2903
  var kind = state.kind;
3611
2904
  var index = state.index++;
@@ -3677,32 +2970,32 @@ var DOMTokenListPrototype$1 = classList && classList.constructor && classList.co
3677
2970
 
3678
2971
  var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
3679
2972
 
3680
- var global$1 = global$B;
2973
+ var global$7 = global$H;
3681
2974
  var DOMIterables = domIterables;
3682
2975
  var DOMTokenListPrototype = domTokenListPrototype;
3683
2976
  var ArrayIteratorMethods = es_array_iterator;
3684
- var createNonEnumerableProperty = createNonEnumerableProperty$5;
3685
- var wellKnownSymbol = wellKnownSymbol$e;
2977
+ var createNonEnumerableProperty$1 = createNonEnumerableProperty$6;
2978
+ var wellKnownSymbol$4 = wellKnownSymbol$i;
3686
2979
 
3687
- var ITERATOR = wellKnownSymbol('iterator');
3688
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
2980
+ var ITERATOR = wellKnownSymbol$4('iterator');
2981
+ var TO_STRING_TAG = wellKnownSymbol$4('toStringTag');
3689
2982
  var ArrayValues = ArrayIteratorMethods.values;
3690
2983
 
3691
2984
  var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
3692
2985
  if (CollectionPrototype) {
3693
2986
  // some Chrome versions have non-configurable methods on DOMTokenList
3694
2987
  if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
3695
- createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
2988
+ createNonEnumerableProperty$1(CollectionPrototype, ITERATOR, ArrayValues);
3696
2989
  } catch (error) {
3697
2990
  CollectionPrototype[ITERATOR] = ArrayValues;
3698
2991
  }
3699
2992
  if (!CollectionPrototype[TO_STRING_TAG]) {
3700
- createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
2993
+ createNonEnumerableProperty$1(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME);
3701
2994
  }
3702
2995
  if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) {
3703
2996
  // some Chrome versions have non-configurable methods on DOMTokenList
3704
2997
  if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try {
3705
- createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
2998
+ createNonEnumerableProperty$1(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]);
3706
2999
  } catch (error) {
3707
3000
  CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME];
3708
3001
  }
@@ -3711,7 +3004,7 @@ var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
3711
3004
  };
3712
3005
 
3713
3006
  for (var COLLECTION_NAME in DOMIterables) {
3714
- handlePrototype(global$1[COLLECTION_NAME] && global$1[COLLECTION_NAME].prototype, COLLECTION_NAME);
3007
+ handlePrototype(global$7[COLLECTION_NAME] && global$7[COLLECTION_NAME].prototype, COLLECTION_NAME);
3715
3008
  }
3716
3009
 
3717
3010
  handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
@@ -3762,7 +3055,7 @@ class Ninetailed {
3762
3055
  payload
3763
3056
  }) => {
3764
3057
  cb(Object.assign(Object.assign({}, this._profileState), {
3765
- loading: false,
3058
+ status: 'success',
3766
3059
  profile: payload.profile,
3767
3060
  error: undefined
3768
3061
  }));
@@ -3770,12 +3063,23 @@ class Ninetailed {
3770
3063
  };
3771
3064
 
3772
3065
  this.plugins = flatten(plugins || []);
3773
- this._profileState = {
3774
- loading: !profile,
3775
- profile,
3776
- error: undefined,
3777
- from: profile ? 'hydrated' : 'api'
3778
- };
3066
+
3067
+ if (profile) {
3068
+ this._profileState = {
3069
+ status: 'success',
3070
+ profile,
3071
+ error: undefined,
3072
+ from: 'hydrated'
3073
+ };
3074
+ } else {
3075
+ this._profileState = {
3076
+ status: 'loading',
3077
+ profile: null,
3078
+ error: undefined,
3079
+ from: 'api'
3080
+ };
3081
+ }
3082
+
3779
3083
  this.instance = Analytics({
3780
3084
  app: 'ninetailed',
3781
3085
  plugins: [...this.plugins, ninetailedPlugin({
@@ -3817,14 +3121,14 @@ class Ninetailed {
3817
3121
 
3818
3122
  }
3819
3123
 
3820
- const selectVariant = (baseline, variants, {
3821
- loading,
3124
+ const selectVariant$1 = (baseline, variants, {
3125
+ status,
3822
3126
  profile,
3823
3127
  error
3824
3128
  }, options = {
3825
3129
  holdout: -1
3826
3130
  }) => {
3827
- if (loading) {
3131
+ if (status === 'loading') {
3828
3132
  return {
3829
3133
  loading: true,
3830
3134
  variant: Object.assign({
@@ -3841,7 +3145,7 @@ const selectVariant = (baseline, variants, {
3841
3145
  };
3842
3146
  }
3843
3147
 
3844
- if (error) {
3148
+ if (status === 'error') {
3845
3149
  return {
3846
3150
  loading: false,
3847
3151
  variant: Object.assign({
@@ -3913,4 +3217,736 @@ const selectVariant = (baseline, variants, {
3913
3217
  };
3914
3218
  };
3915
3219
 
3916
- export { NINETAILED_TRACKER_EVENTS, Ninetailed, PLUGIN_NAME, ninetailedPlugin, selectVariant };
3220
+ const selectBaselineWithVariants = (experience, baseline) => {
3221
+ return experience.components.find(baselineWithVariants => baselineWithVariants.baseline.id === baseline.id);
3222
+ };
3223
+
3224
+ const selectVariants = (experience, baseline) => {
3225
+ const baselineWithVariants = selectBaselineWithVariants(experience, baseline);
3226
+
3227
+ if (!baselineWithVariants) {
3228
+ return [];
3229
+ }
3230
+
3231
+ return baselineWithVariants.variants;
3232
+ };
3233
+
3234
+ const selectHasVariants = (experience, baseline) => {
3235
+ const variants = selectVariants(experience, baseline);
3236
+ return variants.length > 0;
3237
+ };
3238
+
3239
+ var global$6 = global$H;
3240
+ var classof$2 = classof$6;
3241
+
3242
+ var String$1 = global$6.String;
3243
+
3244
+ var toString$4 = function (argument) {
3245
+ if (classof$2(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
3246
+ return String$1(argument);
3247
+ };
3248
+
3249
+ var isObject = isObject$8;
3250
+ var classof$1 = classofRaw$1;
3251
+ var wellKnownSymbol$3 = wellKnownSymbol$i;
3252
+
3253
+ var MATCH$1 = wellKnownSymbol$3('match');
3254
+
3255
+ // `IsRegExp` abstract operation
3256
+ // https://tc39.es/ecma262/#sec-isregexp
3257
+ var isRegexp = function (it) {
3258
+ var isRegExp;
3259
+ return isObject(it) && ((isRegExp = it[MATCH$1]) !== undefined ? !!isRegExp : classof$1(it) == 'RegExp');
3260
+ };
3261
+
3262
+ var global$5 = global$H;
3263
+ var isRegExp = isRegexp;
3264
+
3265
+ var TypeError$2 = global$5.TypeError;
3266
+
3267
+ var notARegexp = function (it) {
3268
+ if (isRegExp(it)) {
3269
+ throw TypeError$2("The method doesn't accept regular expressions");
3270
+ } return it;
3271
+ };
3272
+
3273
+ var wellKnownSymbol$2 = wellKnownSymbol$i;
3274
+
3275
+ var MATCH = wellKnownSymbol$2('match');
3276
+
3277
+ var correctIsRegexpLogic = function (METHOD_NAME) {
3278
+ var regexp = /./;
3279
+ try {
3280
+ '/./'[METHOD_NAME](regexp);
3281
+ } catch (error1) {
3282
+ try {
3283
+ regexp[MATCH] = false;
3284
+ return '/./'[METHOD_NAME](regexp);
3285
+ } catch (error2) { /* empty */ }
3286
+ } return false;
3287
+ };
3288
+
3289
+ var $$1 = _export;
3290
+ var uncurryThis$5 = functionUncurryThis;
3291
+ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
3292
+ var toLength$1 = toLength$3;
3293
+ var toString$3 = toString$4;
3294
+ var notARegExp = notARegexp;
3295
+ var requireObjectCoercible$2 = requireObjectCoercible$5;
3296
+ var correctIsRegExpLogic = correctIsRegexpLogic;
3297
+
3298
+ // eslint-disable-next-line es/no-string-prototype-startswith -- safe
3299
+ var un$StartsWith = uncurryThis$5(''.startsWith);
3300
+ var stringSlice$4 = uncurryThis$5(''.slice);
3301
+ var min$1 = Math.min;
3302
+
3303
+ var CORRECT_IS_REGEXP_LOGIC = correctIsRegExpLogic('startsWith');
3304
+ // https://github.com/zloirock/core-js/pull/702
3305
+ var MDN_POLYFILL_BUG = !CORRECT_IS_REGEXP_LOGIC && !!function () {
3306
+ var descriptor = getOwnPropertyDescriptor(String.prototype, 'startsWith');
3307
+ return descriptor && !descriptor.writable;
3308
+ }();
3309
+
3310
+ // `String.prototype.startsWith` method
3311
+ // https://tc39.es/ecma262/#sec-string.prototype.startswith
3312
+ $$1({ target: 'String', proto: true, forced: !MDN_POLYFILL_BUG && !CORRECT_IS_REGEXP_LOGIC }, {
3313
+ startsWith: function startsWith(searchString /* , position = 0 */) {
3314
+ var that = toString$3(requireObjectCoercible$2(this));
3315
+ notARegExp(searchString);
3316
+ var index = toLength$1(min$1(arguments.length > 1 ? arguments[1] : undefined, that.length));
3317
+ var search = toString$3(searchString);
3318
+ return un$StartsWith
3319
+ ? un$StartsWith(that, search, index)
3320
+ : stringSlice$4(that, index, index + search.length) === search;
3321
+ }
3322
+ });
3323
+
3324
+ var anObject$2 = anObject$d;
3325
+
3326
+ // `RegExp.prototype.flags` getter implementation
3327
+ // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
3328
+ var regexpFlags$1 = function () {
3329
+ var that = anObject$2(this);
3330
+ var result = '';
3331
+ if (that.global) result += 'g';
3332
+ if (that.ignoreCase) result += 'i';
3333
+ if (that.multiline) result += 'm';
3334
+ if (that.dotAll) result += 's';
3335
+ if (that.unicode) result += 'u';
3336
+ if (that.sticky) result += 'y';
3337
+ return result;
3338
+ };
3339
+
3340
+ var fails$4 = fails$h;
3341
+ var global$4 = global$H;
3342
+
3343
+ // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
3344
+ var $RegExp$2 = global$4.RegExp;
3345
+
3346
+ var UNSUPPORTED_Y$1 = fails$4(function () {
3347
+ var re = $RegExp$2('a', 'y');
3348
+ re.lastIndex = 2;
3349
+ return re.exec('abcd') != null;
3350
+ });
3351
+
3352
+ // UC Browser bug
3353
+ // https://github.com/zloirock/core-js/issues/1008
3354
+ var MISSED_STICKY = UNSUPPORTED_Y$1 || fails$4(function () {
3355
+ return !$RegExp$2('a', 'y').sticky;
3356
+ });
3357
+
3358
+ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$4(function () {
3359
+ // https://bugzilla.mozilla.org/show_bug.cgi?id=773687
3360
+ var re = $RegExp$2('^r', 'gy');
3361
+ re.lastIndex = 2;
3362
+ return re.exec('str') != null;
3363
+ });
3364
+
3365
+ var regexpStickyHelpers = {
3366
+ BROKEN_CARET: BROKEN_CARET,
3367
+ MISSED_STICKY: MISSED_STICKY,
3368
+ UNSUPPORTED_Y: UNSUPPORTED_Y$1
3369
+ };
3370
+
3371
+ var fails$3 = fails$h;
3372
+ var global$3 = global$H;
3373
+
3374
+ // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
3375
+ var $RegExp$1 = global$3.RegExp;
3376
+
3377
+ var regexpUnsupportedDotAll = fails$3(function () {
3378
+ var re = $RegExp$1('.', 's');
3379
+ return !(re.dotAll && re.exec('\n') && re.flags === 's');
3380
+ });
3381
+
3382
+ var fails$2 = fails$h;
3383
+ var global$2 = global$H;
3384
+
3385
+ // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
3386
+ var $RegExp = global$2.RegExp;
3387
+
3388
+ var regexpUnsupportedNcg = fails$2(function () {
3389
+ var re = $RegExp('(?<a>b)', 'g');
3390
+ return re.exec('b').groups.a !== 'b' ||
3391
+ 'b'.replace(re, '$<a>c') !== 'bc';
3392
+ });
3393
+
3394
+ /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
3395
+ /* eslint-disable regexp/no-useless-quantifier -- testing */
3396
+ var call$2 = functionCall;
3397
+ var uncurryThis$4 = functionUncurryThis;
3398
+ var toString$2 = toString$4;
3399
+ var regexpFlags = regexpFlags$1;
3400
+ var stickyHelpers = regexpStickyHelpers;
3401
+ var shared = shared$4.exports;
3402
+ var create = objectCreate;
3403
+ var getInternalState = internalState.get;
3404
+ var UNSUPPORTED_DOT_ALL = regexpUnsupportedDotAll;
3405
+ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
3406
+
3407
+ var nativeReplace = shared('native-string-replace', String.prototype.replace);
3408
+ var nativeExec = RegExp.prototype.exec;
3409
+ var patchedExec = nativeExec;
3410
+ var charAt$3 = uncurryThis$4(''.charAt);
3411
+ var indexOf = uncurryThis$4(''.indexOf);
3412
+ var replace$1 = uncurryThis$4(''.replace);
3413
+ var stringSlice$3 = uncurryThis$4(''.slice);
3414
+
3415
+ var UPDATES_LAST_INDEX_WRONG = (function () {
3416
+ var re1 = /a/;
3417
+ var re2 = /b*/g;
3418
+ call$2(nativeExec, re1, 'a');
3419
+ call$2(nativeExec, re2, 'a');
3420
+ return re1.lastIndex !== 0 || re2.lastIndex !== 0;
3421
+ })();
3422
+
3423
+ var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
3424
+
3425
+ // nonparticipating capturing group, copied from es5-shim's String#split patch.
3426
+ var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
3427
+
3428
+ var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
3429
+
3430
+ if (PATCH) {
3431
+ patchedExec = function exec(string) {
3432
+ var re = this;
3433
+ var state = getInternalState(re);
3434
+ var str = toString$2(string);
3435
+ var raw = state.raw;
3436
+ var result, reCopy, lastIndex, match, i, object, group;
3437
+
3438
+ if (raw) {
3439
+ raw.lastIndex = re.lastIndex;
3440
+ result = call$2(patchedExec, raw, str);
3441
+ re.lastIndex = raw.lastIndex;
3442
+ return result;
3443
+ }
3444
+
3445
+ var groups = state.groups;
3446
+ var sticky = UNSUPPORTED_Y && re.sticky;
3447
+ var flags = call$2(regexpFlags, re);
3448
+ var source = re.source;
3449
+ var charsAdded = 0;
3450
+ var strCopy = str;
3451
+
3452
+ if (sticky) {
3453
+ flags = replace$1(flags, 'y', '');
3454
+ if (indexOf(flags, 'g') === -1) {
3455
+ flags += 'g';
3456
+ }
3457
+
3458
+ strCopy = stringSlice$3(str, re.lastIndex);
3459
+ // Support anchored sticky behavior.
3460
+ if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt$3(str, re.lastIndex - 1) !== '\n')) {
3461
+ source = '(?: ' + source + ')';
3462
+ strCopy = ' ' + strCopy;
3463
+ charsAdded++;
3464
+ }
3465
+ // ^(? + rx + ) is needed, in combination with some str slicing, to
3466
+ // simulate the 'y' flag.
3467
+ reCopy = new RegExp('^(?:' + source + ')', flags);
3468
+ }
3469
+
3470
+ if (NPCG_INCLUDED) {
3471
+ reCopy = new RegExp('^' + source + '$(?!\\s)', flags);
3472
+ }
3473
+ if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
3474
+
3475
+ match = call$2(nativeExec, sticky ? reCopy : re, strCopy);
3476
+
3477
+ if (sticky) {
3478
+ if (match) {
3479
+ match.input = stringSlice$3(match.input, charsAdded);
3480
+ match[0] = stringSlice$3(match[0], charsAdded);
3481
+ match.index = re.lastIndex;
3482
+ re.lastIndex += match[0].length;
3483
+ } else re.lastIndex = 0;
3484
+ } else if (UPDATES_LAST_INDEX_WRONG && match) {
3485
+ re.lastIndex = re.global ? match.index + match[0].length : lastIndex;
3486
+ }
3487
+ if (NPCG_INCLUDED && match && match.length > 1) {
3488
+ // Fix browsers whose `exec` methods don't consistently return `undefined`
3489
+ // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/
3490
+ call$2(nativeReplace, match[0], reCopy, function () {
3491
+ for (i = 1; i < arguments.length - 2; i++) {
3492
+ if (arguments[i] === undefined) match[i] = undefined;
3493
+ }
3494
+ });
3495
+ }
3496
+
3497
+ if (match && groups) {
3498
+ match.groups = object = create(null);
3499
+ for (i = 0; i < groups.length; i++) {
3500
+ group = groups[i];
3501
+ object[group[0]] = match[group[1]];
3502
+ }
3503
+ }
3504
+
3505
+ return match;
3506
+ };
3507
+ }
3508
+
3509
+ var regexpExec$2 = patchedExec;
3510
+
3511
+ var $ = _export;
3512
+ var exec = regexpExec$2;
3513
+
3514
+ // `RegExp.prototype.exec` method
3515
+ // https://tc39.es/ecma262/#sec-regexp.prototype.exec
3516
+ $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
3517
+ exec: exec
3518
+ });
3519
+
3520
+ // TODO: Remove from `core-js@4` since it's moved to entry points
3521
+
3522
+ var uncurryThis$3 = functionUncurryThis;
3523
+ var redefine = redefine$6.exports;
3524
+ var regexpExec$1 = regexpExec$2;
3525
+ var fails$1 = fails$h;
3526
+ var wellKnownSymbol$1 = wellKnownSymbol$i;
3527
+ var createNonEnumerableProperty = createNonEnumerableProperty$6;
3528
+
3529
+ var SPECIES = wellKnownSymbol$1('species');
3530
+ var RegExpPrototype = RegExp.prototype;
3531
+
3532
+ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
3533
+ var SYMBOL = wellKnownSymbol$1(KEY);
3534
+
3535
+ var DELEGATES_TO_SYMBOL = !fails$1(function () {
3536
+ // String methods call symbol-named RegEp methods
3537
+ var O = {};
3538
+ O[SYMBOL] = function () { return 7; };
3539
+ return ''[KEY](O) != 7;
3540
+ });
3541
+
3542
+ var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$1(function () {
3543
+ // Symbol-named RegExp methods call .exec
3544
+ var execCalled = false;
3545
+ var re = /a/;
3546
+
3547
+ if (KEY === 'split') {
3548
+ // We can't use real regex here since it causes deoptimization
3549
+ // and serious performance degradation in V8
3550
+ // https://github.com/zloirock/core-js/issues/306
3551
+ re = {};
3552
+ // RegExp[@@split] doesn't call the regex's exec method, but first creates
3553
+ // a new one. We need to return the patched regex when creating the new one.
3554
+ re.constructor = {};
3555
+ re.constructor[SPECIES] = function () { return re; };
3556
+ re.flags = '';
3557
+ re[SYMBOL] = /./[SYMBOL];
3558
+ }
3559
+
3560
+ re.exec = function () { execCalled = true; return null; };
3561
+
3562
+ re[SYMBOL]('');
3563
+ return !execCalled;
3564
+ });
3565
+
3566
+ if (
3567
+ !DELEGATES_TO_SYMBOL ||
3568
+ !DELEGATES_TO_EXEC ||
3569
+ FORCED
3570
+ ) {
3571
+ var uncurriedNativeRegExpMethod = uncurryThis$3(/./[SYMBOL]);
3572
+ var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {
3573
+ var uncurriedNativeMethod = uncurryThis$3(nativeMethod);
3574
+ var $exec = regexp.exec;
3575
+ if ($exec === regexpExec$1 || $exec === RegExpPrototype.exec) {
3576
+ if (DELEGATES_TO_SYMBOL && !forceStringMethod) {
3577
+ // The native String method already delegates to @@method (this
3578
+ // polyfilled function), leasing to infinite recursion.
3579
+ // We avoid it by directly calling the native @@method method.
3580
+ return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) };
3581
+ }
3582
+ return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) };
3583
+ }
3584
+ return { done: false };
3585
+ });
3586
+
3587
+ redefine(String.prototype, KEY, methods[0]);
3588
+ redefine(RegExpPrototype, SYMBOL, methods[1]);
3589
+ }
3590
+
3591
+ if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);
3592
+ };
3593
+
3594
+ var uncurryThis$2 = functionUncurryThis;
3595
+ var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
3596
+ var toString$1 = toString$4;
3597
+ var requireObjectCoercible$1 = requireObjectCoercible$5;
3598
+
3599
+ var charAt$2 = uncurryThis$2(''.charAt);
3600
+ var charCodeAt = uncurryThis$2(''.charCodeAt);
3601
+ var stringSlice$2 = uncurryThis$2(''.slice);
3602
+
3603
+ var createMethod = function (CONVERT_TO_STRING) {
3604
+ return function ($this, pos) {
3605
+ var S = toString$1(requireObjectCoercible$1($this));
3606
+ var position = toIntegerOrInfinity$1(pos);
3607
+ var size = S.length;
3608
+ var first, second;
3609
+ if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
3610
+ first = charCodeAt(S, position);
3611
+ return first < 0xD800 || first > 0xDBFF || position + 1 === size
3612
+ || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF
3613
+ ? CONVERT_TO_STRING
3614
+ ? charAt$2(S, position)
3615
+ : first
3616
+ : CONVERT_TO_STRING
3617
+ ? stringSlice$2(S, position, position + 2)
3618
+ : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
3619
+ };
3620
+ };
3621
+
3622
+ var stringMultibyte = {
3623
+ // `String.prototype.codePointAt` method
3624
+ // https://tc39.es/ecma262/#sec-string.prototype.codepointat
3625
+ codeAt: createMethod(false),
3626
+ // `String.prototype.at` method
3627
+ // https://github.com/mathiasbynens/String.prototype.at
3628
+ charAt: createMethod(true)
3629
+ };
3630
+
3631
+ var charAt$1 = stringMultibyte.charAt;
3632
+
3633
+ // `AdvanceStringIndex` abstract operation
3634
+ // https://tc39.es/ecma262/#sec-advancestringindex
3635
+ var advanceStringIndex$1 = function (S, index, unicode) {
3636
+ return index + (unicode ? charAt$1(S, index).length : 1);
3637
+ };
3638
+
3639
+ var uncurryThis$1 = functionUncurryThis;
3640
+ var toObject = toObject$4;
3641
+
3642
+ var floor = Math.floor;
3643
+ var charAt = uncurryThis$1(''.charAt);
3644
+ var replace = uncurryThis$1(''.replace);
3645
+ var stringSlice$1 = uncurryThis$1(''.slice);
3646
+ var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
3647
+ var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
3648
+
3649
+ // `GetSubstitution` abstract operation
3650
+ // https://tc39.es/ecma262/#sec-getsubstitution
3651
+ var getSubstitution$1 = function (matched, str, position, captures, namedCaptures, replacement) {
3652
+ var tailPos = position + matched.length;
3653
+ var m = captures.length;
3654
+ var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;
3655
+ if (namedCaptures !== undefined) {
3656
+ namedCaptures = toObject(namedCaptures);
3657
+ symbols = SUBSTITUTION_SYMBOLS;
3658
+ }
3659
+ return replace(replacement, symbols, function (match, ch) {
3660
+ var capture;
3661
+ switch (charAt(ch, 0)) {
3662
+ case '$': return '$';
3663
+ case '&': return matched;
3664
+ case '`': return stringSlice$1(str, 0, position);
3665
+ case "'": return stringSlice$1(str, tailPos);
3666
+ case '<':
3667
+ capture = namedCaptures[stringSlice$1(ch, 1, -1)];
3668
+ break;
3669
+ default: // \d\d?
3670
+ var n = +ch;
3671
+ if (n === 0) return match;
3672
+ if (n > m) {
3673
+ var f = floor(n / 10);
3674
+ if (f === 0) return match;
3675
+ if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
3676
+ return match;
3677
+ }
3678
+ capture = captures[n - 1];
3679
+ }
3680
+ return capture === undefined ? '' : capture;
3681
+ });
3682
+ };
3683
+
3684
+ var global$1 = global$H;
3685
+ var call$1 = functionCall;
3686
+ var anObject$1 = anObject$d;
3687
+ var isCallable$1 = isCallable$j;
3688
+ var classof = classofRaw$1;
3689
+ var regexpExec = regexpExec$2;
3690
+
3691
+ var TypeError$1 = global$1.TypeError;
3692
+
3693
+ // `RegExpExec` abstract operation
3694
+ // https://tc39.es/ecma262/#sec-regexpexec
3695
+ var regexpExecAbstract = function (R, S) {
3696
+ var exec = R.exec;
3697
+ if (isCallable$1(exec)) {
3698
+ var result = call$1(exec, R, S);
3699
+ if (result !== null) anObject$1(result);
3700
+ return result;
3701
+ }
3702
+ if (classof(R) === 'RegExp') return call$1(regexpExec, R, S);
3703
+ throw TypeError$1('RegExp#exec called on incompatible receiver');
3704
+ };
3705
+
3706
+ var apply = functionApply;
3707
+ var call = functionCall;
3708
+ var uncurryThis = functionUncurryThis;
3709
+ var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
3710
+ var fails = fails$h;
3711
+ var anObject = anObject$d;
3712
+ var isCallable = isCallable$j;
3713
+ var toIntegerOrInfinity = toIntegerOrInfinity$4;
3714
+ var toLength = toLength$3;
3715
+ var toString = toString$4;
3716
+ var requireObjectCoercible = requireObjectCoercible$5;
3717
+ var advanceStringIndex = advanceStringIndex$1;
3718
+ var getMethod = getMethod$4;
3719
+ var getSubstitution = getSubstitution$1;
3720
+ var regExpExec = regexpExecAbstract;
3721
+ var wellKnownSymbol = wellKnownSymbol$i;
3722
+
3723
+ var REPLACE = wellKnownSymbol('replace');
3724
+ var max = Math.max;
3725
+ var min = Math.min;
3726
+ var concat = uncurryThis([].concat);
3727
+ var push = uncurryThis([].push);
3728
+ var stringIndexOf = uncurryThis(''.indexOf);
3729
+ var stringSlice = uncurryThis(''.slice);
3730
+
3731
+ var maybeToString = function (it) {
3732
+ return it === undefined ? it : String(it);
3733
+ };
3734
+
3735
+ // IE <= 11 replaces $0 with the whole match, as if it was $&
3736
+ // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0
3737
+ var REPLACE_KEEPS_$0 = (function () {
3738
+ // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
3739
+ return 'a'.replace(/./, '$0') === '$0';
3740
+ })();
3741
+
3742
+ // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string
3743
+ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
3744
+ if (/./[REPLACE]) {
3745
+ return /./[REPLACE]('a', '$0') === '';
3746
+ }
3747
+ return false;
3748
+ })();
3749
+
3750
+ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
3751
+ var re = /./;
3752
+ re.exec = function () {
3753
+ var result = [];
3754
+ result.groups = { a: '7' };
3755
+ return result;
3756
+ };
3757
+ // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
3758
+ return ''.replace(re, '$<a>') !== '7';
3759
+ });
3760
+
3761
+ // @@replace logic
3762
+ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
3763
+ var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
3764
+
3765
+ return [
3766
+ // `String.prototype.replace` method
3767
+ // https://tc39.es/ecma262/#sec-string.prototype.replace
3768
+ function replace(searchValue, replaceValue) {
3769
+ var O = requireObjectCoercible(this);
3770
+ var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE);
3771
+ return replacer
3772
+ ? call(replacer, searchValue, O, replaceValue)
3773
+ : call(nativeReplace, toString(O), searchValue, replaceValue);
3774
+ },
3775
+ // `RegExp.prototype[@@replace]` method
3776
+ // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
3777
+ function (string, replaceValue) {
3778
+ var rx = anObject(this);
3779
+ var S = toString(string);
3780
+
3781
+ if (
3782
+ typeof replaceValue == 'string' &&
3783
+ stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
3784
+ stringIndexOf(replaceValue, '$<') === -1
3785
+ ) {
3786
+ var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
3787
+ if (res.done) return res.value;
3788
+ }
3789
+
3790
+ var functionalReplace = isCallable(replaceValue);
3791
+ if (!functionalReplace) replaceValue = toString(replaceValue);
3792
+
3793
+ var global = rx.global;
3794
+ if (global) {
3795
+ var fullUnicode = rx.unicode;
3796
+ rx.lastIndex = 0;
3797
+ }
3798
+ var results = [];
3799
+ while (true) {
3800
+ var result = regExpExec(rx, S);
3801
+ if (result === null) break;
3802
+
3803
+ push(results, result);
3804
+ if (!global) break;
3805
+
3806
+ var matchStr = toString(result[0]);
3807
+ if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
3808
+ }
3809
+
3810
+ var accumulatedResult = '';
3811
+ var nextSourcePosition = 0;
3812
+ for (var i = 0; i < results.length; i++) {
3813
+ result = results[i];
3814
+
3815
+ var matched = toString(result[0]);
3816
+ var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
3817
+ var captures = [];
3818
+ // NOTE: This is equivalent to
3819
+ // captures = result.slice(1).map(maybeToString)
3820
+ // but for some reason `nativeSlice.call(result, 1, result.length)` (called in
3821
+ // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
3822
+ // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
3823
+ for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
3824
+ var namedCaptures = result.groups;
3825
+ if (functionalReplace) {
3826
+ var replacerArgs = concat([matched], captures, position, S);
3827
+ if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
3828
+ var replacement = toString(apply(replaceValue, undefined, replacerArgs));
3829
+ } else {
3830
+ replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
3831
+ }
3832
+ if (position >= nextSourcePosition) {
3833
+ accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
3834
+ nextSourcePosition = position + matched.length;
3835
+ }
3836
+ }
3837
+ return accumulatedResult + stringSlice(S, nextSourcePosition);
3838
+ }
3839
+ ];
3840
+ }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
3841
+
3842
+ const EXPERIENCE_TRAIT_PREFIX = 'nt_experiment_';
3843
+
3844
+ const selectActiveExperiments = (experiments, profile) => {
3845
+ const experimentTraits = pickBy(profile.traits, (value, key) => key.startsWith(EXPERIENCE_TRAIT_PREFIX) && value === true);
3846
+ const experimentTraitsIds = Object.keys(experimentTraits).map(id => id.replace(EXPERIENCE_TRAIT_PREFIX, '')); // a experiment is active when the use has it set as a true value on the traits and the experiment config is still active
3847
+
3848
+ const activeExperiments = experiments.filter(experiment => includes(experimentTraitsIds, experiment.id));
3849
+ return activeExperiments;
3850
+ };
3851
+
3852
+ /**
3853
+ * We can use any personalization as eglible experience
3854
+ * When going for an experiment we can only select a active experiment when 1 or more experiments are active
3855
+ * If the profile is not in any active experiments, we can select any expermiment
3856
+ */
3857
+
3858
+ const selectEglibleExperiences = ({
3859
+ experiences,
3860
+ activeExperiments
3861
+ }) => {
3862
+ return experiences.filter(experience => experience.type === 'nt_personalization' || activeExperiments.length === 0 || find(activeExperiments, {
3863
+ id: experience.id
3864
+ }));
3865
+ };
3866
+
3867
+ const LOWER_BOUND = 0;
3868
+ const UPPER_BOUND = 4294967295;
3869
+
3870
+ const normalize = (val, min, max) => (val - min) / (max - min);
3871
+
3872
+ const getRandom = text => {
3873
+ const hash = murmur3(text, 0);
3874
+ const random = normalize(hash, LOWER_BOUND, UPPER_BOUND);
3875
+ return random;
3876
+ };
3877
+
3878
+ const getTrafficRandom = (profile, experience) => getRandom(`traffic-${experience.id}-${profile.id}`);
3879
+ const getDistributionRandom = (profile, experience) => getRandom(`distribution-${experience.id}-${profile.id}`);
3880
+
3881
+ const selectExperience = ({
3882
+ experiences,
3883
+ activeExperiments,
3884
+ profile
3885
+ }) => {
3886
+ const eglibleExperiences = selectEglibleExperiences({
3887
+ experiences,
3888
+ activeExperiments
3889
+ });
3890
+ const selectedExperience = eglibleExperiences.find(experience => {
3891
+ const trafficRandom = getTrafficRandom(profile, experience);
3892
+ log(`The traffic random factor for experience ${experience.id} is ${trafficRandom}. It's traffic allocation is set to ${experience.trafficAllocation}.`);
3893
+ return experience.trafficAllocation > trafficRandom && (includes(profile.audiences, experience.audience.id) || // if the expriment is active already then it's selectible without further contraints to be fullfilled
3894
+ find(activeExperiments, {
3895
+ id: experience.id
3896
+ }));
3897
+ });
3898
+ return selectedExperience;
3899
+ };
3900
+
3901
+ const selectVariant = ({
3902
+ baseline,
3903
+ experience,
3904
+ profile
3905
+ }) => {
3906
+ const variants = selectVariants(experience, baseline);
3907
+
3908
+ if (!variants.length) {
3909
+ return null;
3910
+ }
3911
+
3912
+ if (experience.type === 'nt_personalization') {
3913
+ // Personalization Expriences can have only one variant.
3914
+ return variants[0];
3915
+ }
3916
+
3917
+ const distributionRandom = getDistributionRandom(profile, experience);
3918
+ log(`The distribution random factor for experience ${experience.id} is ${distributionRandom}. It's distribution is set to ${JSON.stringify(experience.distribution, null, 2)}.`); // Experiment
3919
+
3920
+ const distribution = find(experience.distribution, ({
3921
+ start,
3922
+ end
3923
+ }) => distributionRandom > start && distributionRandom < end);
3924
+
3925
+ if (!distribution) {
3926
+ return null;
3927
+ }
3928
+
3929
+ if (distribution.index === 0) {
3930
+ return Object.assign(Object.assign({}, baseline), {
3931
+ hidden: false
3932
+ });
3933
+ }
3934
+
3935
+ const correctedVariantIndex = distribution.index - 1;
3936
+
3937
+ if (variants.length <= correctedVariantIndex) {
3938
+ console.warn("A distribution for a variant was selected but it's metadata could not be found.");
3939
+ return null;
3940
+ }
3941
+
3942
+ const variant = variants[correctedVariantIndex];
3943
+
3944
+ if (!variant) {
3945
+ console.warn("A distribution for a variant was selected but it's metadata could not be found.");
3946
+ return null;
3947
+ }
3948
+
3949
+ return variant;
3950
+ };
3951
+
3952
+ export { NINETAILED_TRACKER_EVENTS, Ninetailed, PLUGIN_NAME, ninetailedPlugin, selectActiveExperiments, selectEglibleExperiences, selectExperience, selectBaselineWithVariants as selectExperienceBaselineWithVariants, selectVariant as selectExperienceVariant, selectVariants as selectExperienceVariants, selectHasVariants as selectHasExperienceVariants, selectVariant$1 as selectVariant };