@alma/widgets 2.3.2 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,40 +7,44 @@ import noScroll from 'no-scroll';
7
7
  import { useMediaQuery } from 'react-responsive';
8
8
  import { secondsToMilliseconds, isToday } from 'date-fns';
9
9
 
10
- var ceil = Math.ceil;
11
- var floor = Math.floor; // `ToInteger` abstract operation
12
- // https://tc39.github.io/ecma262/#sec-tointeger
13
-
14
- var toInteger = function (argument) {
15
- return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);
10
+ var fails = function (exec) {
11
+ try {
12
+ return !!exec();
13
+ } catch (error) {
14
+ return true;
15
+ }
16
16
  };
17
17
 
18
- // `RequireObjectCoercible` abstract operation
19
- // https://tc39.github.io/ecma262/#sec-requireobjectcoercible
20
- var requireObjectCoercible = function (it) {
21
- if (it == undefined) throw TypeError("Can't call method on " + it);
22
- return it;
23
- };
18
+ var functionBindNative = !fails(function () {
19
+ // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
20
+ var test = function () {
21
+ /* empty */
22
+ }.bind(); // eslint-disable-next-line no-prototype-builtins -- safe
24
23
 
25
- var createMethod = function (CONVERT_TO_STRING) {
26
- return function ($this, pos) {
27
- var S = String(requireObjectCoercible($this));
28
- var position = toInteger(pos);
29
- var size = S.length;
30
- var first, second;
31
- if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
32
- first = S.charCodeAt(position);
33
- return first < 0xD800 || first > 0xDBFF || position + 1 === size || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF ? CONVERT_TO_STRING ? S.charAt(position) : first : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
24
+
25
+ return typeof test != 'function' || test.hasOwnProperty('prototype');
26
+ });
27
+
28
+ var FunctionPrototype = Function.prototype;
29
+ var bind = FunctionPrototype.bind;
30
+ var call = FunctionPrototype.call;
31
+ var uncurryThis = functionBindNative && bind.bind(call, call);
32
+ var functionUncurryThis = functionBindNative ? function (fn) {
33
+ return fn && uncurryThis(fn);
34
+ } : function (fn) {
35
+ return fn && function () {
36
+ return call.apply(fn, arguments);
34
37
  };
35
38
  };
36
39
 
37
- var stringMultibyte = {
38
- // `String.prototype.codePointAt` method
39
- // https://tc39.github.io/ecma262/#sec-string.prototype.codepointat
40
- codeAt: createMethod(false),
41
- // `String.prototype.at` method
42
- // https://github.com/mathiasbynens/String.prototype.at
43
- charAt: createMethod(true)
40
+ var ceil = Math.ceil;
41
+ var floor = Math.floor; // `ToIntegerOrInfinity` abstract operation
42
+ // https://tc39.es/ecma262/#sec-tointegerorinfinity
43
+
44
+ var toIntegerOrInfinity = function (argument) {
45
+ var number = +argument; // eslint-disable-next-line no-self-compare -- safe
46
+
47
+ return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
44
48
  };
45
49
 
46
50
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
@@ -64,21 +68,241 @@ var check = function (it) {
64
68
  }; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
65
69
 
66
70
 
67
- var global_1 = // eslint-disable-next-line no-undef
68
- check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || check(typeof self == 'object' && self) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || // eslint-disable-next-line no-new-func
71
+ var global_1 = // eslint-disable-next-line es-x/no-global-this -- safe
72
+ check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || // eslint-disable-next-line no-restricted-globals -- safe
73
+ check(typeof self == 'object' && self) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || // eslint-disable-next-line no-new-func -- fallback
69
74
  function () {
70
75
  return this;
71
76
  }() || Function('return this')();
72
77
 
73
- var fails = function (exec) {
78
+ var defineProperty = Object.defineProperty;
79
+
80
+ var setGlobal = function (key, value) {
74
81
  try {
75
- return !!exec();
82
+ defineProperty(global_1, key, {
83
+ value: value,
84
+ configurable: true,
85
+ writable: true
86
+ });
76
87
  } catch (error) {
77
- return true;
88
+ global_1[key] = value;
89
+ }
90
+
91
+ return value;
92
+ };
93
+
94
+ var SHARED = '__core-js_shared__';
95
+ var store = global_1[SHARED] || setGlobal(SHARED, {});
96
+ var sharedStore = store;
97
+
98
+ var shared = createCommonjsModule(function (module) {
99
+ (module.exports = function (key, value) {
100
+ return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
101
+ })('versions', []).push({
102
+ version: '3.22.1',
103
+ mode: 'global',
104
+ copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
105
+ license: 'https://github.com/zloirock/core-js/blob/v3.22.1/LICENSE',
106
+ source: 'https://github.com/zloirock/core-js'
107
+ });
108
+ });
109
+
110
+ var TypeError$1 = global_1.TypeError; // `RequireObjectCoercible` abstract operation
111
+ // https://tc39.es/ecma262/#sec-requireobjectcoercible
112
+
113
+ var requireObjectCoercible = function (it) {
114
+ if (it == undefined) throw TypeError$1("Can't call method on " + it);
115
+ return it;
116
+ };
117
+
118
+ var Object$1 = global_1.Object; // `ToObject` abstract operation
119
+ // https://tc39.es/ecma262/#sec-toobject
120
+
121
+ var toObject = function (argument) {
122
+ return Object$1(requireObjectCoercible(argument));
123
+ };
124
+
125
+ var hasOwnProperty = functionUncurryThis({}.hasOwnProperty); // `HasOwnProperty` abstract operation
126
+ // https://tc39.es/ecma262/#sec-hasownproperty
127
+ // eslint-disable-next-line es-x/no-object-hasown -- safe
128
+
129
+ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
130
+ return hasOwnProperty(toObject(it), key);
131
+ };
132
+
133
+ var id = 0;
134
+ var postfix = Math.random();
135
+ var toString = functionUncurryThis(1.0.toString);
136
+
137
+ var uid = function (key) {
138
+ return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
139
+ };
140
+
141
+ // `IsCallable` abstract operation
142
+ // https://tc39.es/ecma262/#sec-iscallable
143
+ var isCallable = function (argument) {
144
+ return typeof argument == 'function';
145
+ };
146
+
147
+ var aFunction = function (argument) {
148
+ return isCallable(argument) ? argument : undefined;
149
+ };
150
+
151
+ var getBuiltIn = function (namespace, method) {
152
+ return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
153
+ };
154
+
155
+ var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
156
+
157
+ var process = global_1.process;
158
+ var Deno = global_1.Deno;
159
+ var versions = process && process.versions || Deno && Deno.version;
160
+ var v8 = versions && versions.v8;
161
+ var match, version;
162
+
163
+ if (v8) {
164
+ match = v8.split('.'); // in old Chrome, versions of V8 isn't V8 = Chrome / 10
165
+ // but their correct versions are not interesting for us
166
+
167
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
168
+ } // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
169
+ // so check `userAgent` even if `.v8` exists, but 0
170
+
171
+
172
+ if (!version && engineUserAgent) {
173
+ match = engineUserAgent.match(/Edge\/(\d+)/);
174
+
175
+ if (!match || match[1] >= 74) {
176
+ match = engineUserAgent.match(/Chrome\/(\d+)/);
177
+ if (match) version = +match[1];
178
+ }
179
+ }
180
+
181
+ var engineV8Version = version;
182
+
183
+ /* eslint-disable es-x/no-symbol -- required for testing */
184
+ // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
185
+
186
+ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
187
+ var symbol = Symbol(); // Chrome 38 Symbol has incorrect toString conversion
188
+ // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
189
+
190
+ return !String(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
191
+ !Symbol.sham && engineV8Version && engineV8Version < 41;
192
+ });
193
+
194
+ /* eslint-disable es-x/no-symbol -- required for testing */
195
+
196
+ var useSymbolAsUid = nativeSymbol && !Symbol.sham && typeof Symbol.iterator == 'symbol';
197
+
198
+ var WellKnownSymbolsStore = shared('wks');
199
+ var Symbol$1 = global_1.Symbol;
200
+ var symbolFor = Symbol$1 && Symbol$1['for'];
201
+ var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
202
+
203
+ var wellKnownSymbol = function (name) {
204
+ if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
205
+ var description = 'Symbol.' + name;
206
+
207
+ if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
208
+ WellKnownSymbolsStore[name] = Symbol$1[name];
209
+ } else if (useSymbolAsUid && symbolFor) {
210
+ WellKnownSymbolsStore[name] = symbolFor(description);
211
+ } else {
212
+ WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
213
+ }
214
+ }
215
+
216
+ return WellKnownSymbolsStore[name];
217
+ };
218
+
219
+ var TO_STRING_TAG = wellKnownSymbol('toStringTag');
220
+ var test = {};
221
+ test[TO_STRING_TAG] = 'z';
222
+ var toStringTagSupport = String(test) === '[object z]';
223
+
224
+ var toString$1 = functionUncurryThis({}.toString);
225
+ var stringSlice = functionUncurryThis(''.slice);
226
+
227
+ var classofRaw = function (it) {
228
+ return stringSlice(toString$1(it), 8, -1);
229
+ };
230
+
231
+ var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
232
+ var Object$2 = global_1.Object; // ES3 wrong here
233
+
234
+ var CORRECT_ARGUMENTS = classofRaw(function () {
235
+ return arguments;
236
+ }()) == 'Arguments'; // fallback for IE11 Script Access Denied error
237
+
238
+ var tryGet = function (it, key) {
239
+ try {
240
+ return it[key];
241
+ } catch (error) {
242
+ /* empty */
78
243
  }
244
+ }; // getting tag from ES6+ `Object.prototype.toString`
245
+
246
+
247
+ var classof = toStringTagSupport ? classofRaw : function (it) {
248
+ var O, tag, result;
249
+ return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case
250
+ : typeof (tag = tryGet(O = Object$2(it), TO_STRING_TAG$1)) == 'string' ? tag // builtinTag case
251
+ : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback
252
+ : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
253
+ };
254
+
255
+ var String$1 = global_1.String;
256
+
257
+ var toString_1 = function (argument) {
258
+ if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
259
+ return String$1(argument);
260
+ };
261
+
262
+ var charAt = functionUncurryThis(''.charAt);
263
+ var charCodeAt = functionUncurryThis(''.charCodeAt);
264
+ var stringSlice$1 = functionUncurryThis(''.slice);
265
+
266
+ var createMethod = function (CONVERT_TO_STRING) {
267
+ return function ($this, pos) {
268
+ var S = toString_1(requireObjectCoercible($this));
269
+ var position = toIntegerOrInfinity(pos);
270
+ var size = S.length;
271
+ var first, second;
272
+ if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
273
+ first = charCodeAt(S, position);
274
+ return first < 0xD800 || first > 0xDBFF || position + 1 === size || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF ? CONVERT_TO_STRING ? charAt(S, position) : first : CONVERT_TO_STRING ? stringSlice$1(S, position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
275
+ };
276
+ };
277
+
278
+ var stringMultibyte = {
279
+ // `String.prototype.codePointAt` method
280
+ // https://tc39.es/ecma262/#sec-string.prototype.codepointat
281
+ codeAt: createMethod(false),
282
+ // `String.prototype.at` method
283
+ // https://github.com/mathiasbynens/String.prototype.at
284
+ charAt: createMethod(true)
285
+ };
286
+
287
+ var functionToString = functionUncurryThis(Function.toString); // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
288
+
289
+ if (!isCallable(sharedStore.inspectSource)) {
290
+ sharedStore.inspectSource = function (it) {
291
+ return functionToString(it);
292
+ };
293
+ }
294
+
295
+ var inspectSource = sharedStore.inspectSource;
296
+
297
+ var WeakMap = global_1.WeakMap;
298
+ var nativeWeakMap = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));
299
+
300
+ var isObject = function (it) {
301
+ return typeof it == 'object' ? it !== null : isCallable(it);
79
302
  };
80
303
 
81
304
  var descriptors = !fails(function () {
305
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
82
306
  return Object.defineProperty({}, 1, {
83
307
  get: function () {
84
308
  return 7;
@@ -86,10 +310,6 @@ var descriptors = !fails(function () {
86
310
  })[1] != 7;
87
311
  });
88
312
 
89
- var isObject = function (it) {
90
- return typeof it === 'object' ? it !== null : typeof it === 'function';
91
- };
92
-
93
313
  var document$1 = global_1.document; // typeof document.createElement is 'object' in old IE
94
314
 
95
315
  var EXISTS = isObject(document$1) && isObject(document$1.createElement);
@@ -99,6 +319,7 @@ var documentCreateElement = function (it) {
99
319
  };
100
320
 
101
321
  var ie8DomDefine = !descriptors && !fails(function () {
322
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
102
323
  return Object.defineProperty(documentCreateElement('div'), 'a', {
103
324
  get: function () {
104
325
  return 7;
@@ -106,40 +327,142 @@ var ie8DomDefine = !descriptors && !fails(function () {
106
327
  }).a != 7;
107
328
  });
108
329
 
109
- var anObject = function (it) {
110
- if (!isObject(it)) {
111
- throw TypeError(String(it) + ' is not an object');
330
+ // https://bugs.chromium.org/p/v8/issues/detail?id=3334
331
+
332
+ var v8PrototypeDefineBug = descriptors && fails(function () {
333
+ // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
334
+ return Object.defineProperty(function () {
335
+ /* empty */
336
+ }, 'prototype', {
337
+ value: 42,
338
+ writable: false
339
+ }).prototype != 42;
340
+ });
341
+
342
+ var String$2 = global_1.String;
343
+ var TypeError$2 = global_1.TypeError; // `Assert: Type(argument) is Object`
344
+
345
+ var anObject = function (argument) {
346
+ if (isObject(argument)) return argument;
347
+ throw TypeError$2(String$2(argument) + ' is not an object');
348
+ };
349
+
350
+ var call$1 = Function.prototype.call;
351
+ var functionCall = functionBindNative ? call$1.bind(call$1) : function () {
352
+ return call$1.apply(call$1, arguments);
353
+ };
354
+
355
+ var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
356
+
357
+ var Object$3 = global_1.Object;
358
+ var isSymbol = useSymbolAsUid ? function (it) {
359
+ return typeof it == 'symbol';
360
+ } : function (it) {
361
+ var $Symbol = getBuiltIn('Symbol');
362
+ return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it));
363
+ };
364
+
365
+ var String$3 = global_1.String;
366
+
367
+ var tryToString = function (argument) {
368
+ try {
369
+ return String$3(argument);
370
+ } catch (error) {
371
+ return 'Object';
112
372
  }
373
+ };
113
374
 
114
- return it;
375
+ var TypeError$3 = global_1.TypeError; // `Assert: IsCallable(argument) is true`
376
+
377
+ var aCallable = function (argument) {
378
+ if (isCallable(argument)) return argument;
379
+ throw TypeError$3(tryToString(argument) + ' is not a function');
380
+ };
381
+
382
+ // https://tc39.es/ecma262/#sec-getmethod
383
+
384
+ var getMethod = function (V, P) {
385
+ var func = V[P];
386
+ return func == null ? undefined : aCallable(func);
115
387
  };
116
388
 
117
- // https://tc39.github.io/ecma262/#sec-toprimitive
118
- // instead of the ES6 spec version, we didn't implement @@toPrimitive case
119
- // and the second argument - flag - preferred type is a string
389
+ var TypeError$4 = global_1.TypeError; // `OrdinaryToPrimitive` abstract operation
390
+ // https://tc39.es/ecma262/#sec-ordinarytoprimitive
120
391
 
121
- var toPrimitive = function (input, PREFERRED_STRING) {
122
- if (!isObject(input)) return input;
392
+ var ordinaryToPrimitive = function (input, pref) {
123
393
  var fn, val;
124
- if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
125
- if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;
126
- if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;
127
- throw TypeError("Can't convert object to primitive value");
394
+ if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
395
+ if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
396
+ if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
397
+ throw TypeError$4("Can't convert object to primitive value");
398
+ };
399
+
400
+ var TypeError$5 = global_1.TypeError;
401
+ var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); // `ToPrimitive` abstract operation
402
+ // https://tc39.es/ecma262/#sec-toprimitive
403
+
404
+ var toPrimitive = function (input, pref) {
405
+ if (!isObject(input) || isSymbol(input)) return input;
406
+ var exoticToPrim = getMethod(input, TO_PRIMITIVE);
407
+ var result;
408
+
409
+ if (exoticToPrim) {
410
+ if (pref === undefined) pref = 'default';
411
+ result = functionCall(exoticToPrim, input, pref);
412
+ if (!isObject(result) || isSymbol(result)) return result;
413
+ throw TypeError$5("Can't convert object to primitive value");
414
+ }
415
+
416
+ if (pref === undefined) pref = 'number';
417
+ return ordinaryToPrimitive(input, pref);
418
+ };
419
+
420
+ // https://tc39.es/ecma262/#sec-topropertykey
421
+
422
+ var toPropertyKey = function (argument) {
423
+ var key = toPrimitive(argument, 'string');
424
+ return isSymbol(key) ? key : key + '';
128
425
  };
129
426
 
130
- var nativeDefineProperty = Object.defineProperty; // `Object.defineProperty` method
131
- // https://tc39.github.io/ecma262/#sec-object.defineproperty
427
+ var TypeError$6 = global_1.TypeError; // eslint-disable-next-line es-x/no-object-defineproperty -- safe
428
+
429
+ var $defineProperty = Object.defineProperty; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
430
+
431
+ var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
432
+ var ENUMERABLE = 'enumerable';
433
+ var CONFIGURABLE = 'configurable';
434
+ var WRITABLE = 'writable'; // `Object.defineProperty` method
435
+ // https://tc39.es/ecma262/#sec-object.defineproperty
132
436
 
133
- var f = descriptors ? nativeDefineProperty : function defineProperty(O, P, Attributes) {
437
+ var f = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
134
438
  anObject(O);
135
- P = toPrimitive(P, true);
439
+ P = toPropertyKey(P);
440
+ anObject(Attributes);
441
+
442
+ if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
443
+ var current = $getOwnPropertyDescriptor(O, P);
444
+
445
+ if (current && current[WRITABLE]) {
446
+ O[P] = Attributes.value;
447
+ Attributes = {
448
+ configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
449
+ enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
450
+ writable: false
451
+ };
452
+ }
453
+ }
454
+
455
+ return $defineProperty(O, P, Attributes);
456
+ } : $defineProperty : function defineProperty(O, P, Attributes) {
457
+ anObject(O);
458
+ P = toPropertyKey(P);
136
459
  anObject(Attributes);
137
460
  if (ie8DomDefine) try {
138
- return nativeDefineProperty(O, P, Attributes);
461
+ return $defineProperty(O, P, Attributes);
139
462
  } catch (error) {
140
463
  /* empty */
141
464
  }
142
- if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
465
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError$6('Accessors not supported');
143
466
  if ('value' in Attributes) O[P] = Attributes.value;
144
467
  return O;
145
468
  };
@@ -163,56 +486,6 @@ var createNonEnumerableProperty = descriptors ? function (object, key, value) {
163
486
  return object;
164
487
  };
165
488
 
166
- var setGlobal = function (key, value) {
167
- try {
168
- createNonEnumerableProperty(global_1, key, value);
169
- } catch (error) {
170
- global_1[key] = value;
171
- }
172
-
173
- return value;
174
- };
175
-
176
- var SHARED = '__core-js_shared__';
177
- var store = global_1[SHARED] || setGlobal(SHARED, {});
178
- var sharedStore = store;
179
-
180
- var functionToString = Function.toString; // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
181
-
182
- if (typeof sharedStore.inspectSource != 'function') {
183
- sharedStore.inspectSource = function (it) {
184
- return functionToString.call(it);
185
- };
186
- }
187
-
188
- var inspectSource = sharedStore.inspectSource;
189
-
190
- var WeakMap = global_1.WeakMap;
191
- var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
192
-
193
- var hasOwnProperty = {}.hasOwnProperty;
194
-
195
- var has = function (it, key) {
196
- return hasOwnProperty.call(it, key);
197
- };
198
-
199
- var shared = createCommonjsModule(function (module) {
200
- (module.exports = function (key, value) {
201
- return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
202
- })('versions', []).push({
203
- version: '3.8.1',
204
- mode: 'global',
205
- copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
206
- });
207
- });
208
-
209
- var id = 0;
210
- var postfix = Math.random();
211
-
212
- var uid = function (key) {
213
- return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
214
- };
215
-
216
489
  var keys = shared('keys');
217
490
 
218
491
  var sharedKey = function (key) {
@@ -221,11 +494,13 @@ var sharedKey = function (key) {
221
494
 
222
495
  var hiddenKeys = {};
223
496
 
497
+ var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
498
+ var TypeError$7 = global_1.TypeError;
224
499
  var WeakMap$1 = global_1.WeakMap;
225
- var set, get, has$1;
500
+ var set, get, has;
226
501
 
227
502
  var enforce = function (it) {
228
- return has$1(it) ? get(it) : set(it, {});
503
+ return has(it) ? get(it) : set(it, {});
229
504
  };
230
505
 
231
506
  var getterFor = function (TYPE) {
@@ -233,113 +508,128 @@ var getterFor = function (TYPE) {
233
508
  var state;
234
509
 
235
510
  if (!isObject(it) || (state = get(it)).type !== TYPE) {
236
- throw TypeError('Incompatible receiver, ' + TYPE + ' required');
511
+ throw TypeError$7('Incompatible receiver, ' + TYPE + ' required');
237
512
  }
238
513
 
239
514
  return state;
240
515
  };
241
516
  };
242
517
 
243
- if (nativeWeakMap) {
518
+ if (nativeWeakMap || sharedStore.state) {
244
519
  var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1());
245
- var wmget = store$1.get;
246
- var wmhas = store$1.has;
247
- var wmset = store$1.set;
520
+ var wmget = functionUncurryThis(store$1.get);
521
+ var wmhas = functionUncurryThis(store$1.has);
522
+ var wmset = functionUncurryThis(store$1.set);
248
523
 
249
524
  set = function (it, metadata) {
525
+ if (wmhas(store$1, it)) throw new TypeError$7(OBJECT_ALREADY_INITIALIZED);
250
526
  metadata.facade = it;
251
- wmset.call(store$1, it, metadata);
527
+ wmset(store$1, it, metadata);
252
528
  return metadata;
253
529
  };
254
530
 
255
531
  get = function (it) {
256
- return wmget.call(store$1, it) || {};
532
+ return wmget(store$1, it) || {};
257
533
  };
258
534
 
259
- has$1 = function (it) {
260
- return wmhas.call(store$1, it);
535
+ has = function (it) {
536
+ return wmhas(store$1, it);
261
537
  };
262
538
  } else {
263
539
  var STATE = sharedKey('state');
264
540
  hiddenKeys[STATE] = true;
265
541
 
266
542
  set = function (it, metadata) {
543
+ if (hasOwnProperty_1(it, STATE)) throw new TypeError$7(OBJECT_ALREADY_INITIALIZED);
267
544
  metadata.facade = it;
268
545
  createNonEnumerableProperty(it, STATE, metadata);
269
546
  return metadata;
270
547
  };
271
548
 
272
549
  get = function (it) {
273
- return has(it, STATE) ? it[STATE] : {};
550
+ return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
274
551
  };
275
552
 
276
- has$1 = function (it) {
277
- return has(it, STATE);
553
+ has = function (it) {
554
+ return hasOwnProperty_1(it, STATE);
278
555
  };
279
556
  }
280
557
 
281
558
  var internalState = {
282
559
  set: set,
283
560
  get: get,
284
- has: has$1,
561
+ has: has,
285
562
  enforce: enforce,
286
563
  getterFor: getterFor
287
564
  };
288
565
 
289
- var nativePropertyIsEnumerable = {}.propertyIsEnumerable;
566
+ var $propertyIsEnumerable = {}.propertyIsEnumerable; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
567
+
290
568
  var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug
291
569
 
292
- var NASHORN_BUG = getOwnPropertyDescriptor && !nativePropertyIsEnumerable.call({
570
+ var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({
293
571
  1: 2
294
572
  }, 1); // `Object.prototype.propertyIsEnumerable` method implementation
295
- // https://tc39.github.io/ecma262/#sec-object.prototype.propertyisenumerable
573
+ // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
296
574
 
297
575
  var f$1 = NASHORN_BUG ? function propertyIsEnumerable(V) {
298
576
  var descriptor = getOwnPropertyDescriptor(this, V);
299
577
  return !!descriptor && descriptor.enumerable;
300
- } : nativePropertyIsEnumerable;
578
+ } : $propertyIsEnumerable;
301
579
  var objectPropertyIsEnumerable = {
302
580
  f: f$1
303
581
  };
304
582
 
305
- var toString = {}.toString;
306
-
307
- var classofRaw = function (it) {
308
- return toString.call(it).slice(8, -1);
309
- };
310
-
311
- var split = ''.split; // fallback for non-array-like ES3 and non-enumerable old V8 strings
583
+ var Object$4 = global_1.Object;
584
+ var split = functionUncurryThis(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings
312
585
 
313
586
  var indexedObject = fails(function () {
314
587
  // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
315
- // eslint-disable-next-line no-prototype-builtins
316
- return !Object('z').propertyIsEnumerable(0);
588
+ // eslint-disable-next-line no-prototype-builtins -- safe
589
+ return !Object$4('z').propertyIsEnumerable(0);
317
590
  }) ? function (it) {
318
- return classofRaw(it) == 'String' ? split.call(it, '') : Object(it);
319
- } : Object;
591
+ return classofRaw(it) == 'String' ? split(it, '') : Object$4(it);
592
+ } : Object$4;
320
593
 
321
594
  var toIndexedObject = function (it) {
322
595
  return indexedObject(requireObjectCoercible(it));
323
596
  };
324
597
 
325
- var nativeGetOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method
326
- // https://tc39.github.io/ecma262/#sec-object.getownpropertydescriptor
598
+ var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method
599
+ // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
327
600
 
328
- var f$2 = descriptors ? nativeGetOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
601
+ var f$2 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
329
602
  O = toIndexedObject(O);
330
- P = toPrimitive(P, true);
603
+ P = toPropertyKey(P);
331
604
  if (ie8DomDefine) try {
332
- return nativeGetOwnPropertyDescriptor(O, P);
605
+ return $getOwnPropertyDescriptor$1(O, P);
333
606
  } catch (error) {
334
607
  /* empty */
335
608
  }
336
- if (has(O, P)) return createPropertyDescriptor(!objectPropertyIsEnumerable.f.call(O, P), O[P]);
609
+ if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
337
610
  };
338
611
  var objectGetOwnPropertyDescriptor = {
339
612
  f: f$2
340
613
  };
341
614
 
615
+ var FunctionPrototype$1 = Function.prototype; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
616
+
617
+ var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
618
+ var EXISTS$1 = hasOwnProperty_1(FunctionPrototype$1, 'name'); // additional protection from minified / mangled / dropped function names
619
+
620
+ var PROPER = EXISTS$1 && function something() {
621
+ /* empty */
622
+ }.name === 'something';
623
+
624
+ var CONFIGURABLE$1 = EXISTS$1 && (!descriptors || descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable);
625
+ var functionName = {
626
+ EXISTS: EXISTS$1,
627
+ PROPER: PROPER,
628
+ CONFIGURABLE: CONFIGURABLE$1
629
+ };
630
+
342
631
  var redefine = createCommonjsModule(function (module) {
632
+ var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
343
633
  var getInternalState = internalState.get;
344
634
  var enforceInternalState = internalState.enforce;
345
635
  var TEMPLATE = String(String).split('String');
@@ -347,17 +637,22 @@ var redefine = createCommonjsModule(function (module) {
347
637
  var unsafe = options ? !!options.unsafe : false;
348
638
  var simple = options ? !!options.enumerable : false;
349
639
  var noTargetGet = options ? !!options.noTargetGet : false;
640
+ var name = options && options.name !== undefined ? options.name : key;
350
641
  var state;
351
642
 
352
- if (typeof value == 'function') {
353
- if (typeof key == 'string' && !has(value, 'name')) {
354
- createNonEnumerableProperty(value, 'name', key);
643
+ if (isCallable(value)) {
644
+ if (String(name).slice(0, 7) === 'Symbol(') {
645
+ name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
646
+ }
647
+
648
+ if (!hasOwnProperty_1(value, 'name') || CONFIGURABLE_FUNCTION_NAME && value.name !== name) {
649
+ createNonEnumerableProperty(value, 'name', name);
355
650
  }
356
651
 
357
652
  state = enforceInternalState(value);
358
653
 
359
654
  if (!state.source) {
360
- state.source = TEMPLATE.join(typeof key == 'string' ? key : '');
655
+ state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
361
656
  }
362
657
  }
363
658
 
@@ -372,47 +667,43 @@ var redefine = createCommonjsModule(function (module) {
372
667
 
373
668
  if (simple) O[key] = value;else createNonEnumerableProperty(O, key, value); // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
374
669
  })(Function.prototype, 'toString', function toString() {
375
- return typeof this == 'function' && getInternalState(this).source || inspectSource(this);
670
+ return isCallable(this) && getInternalState(this).source || inspectSource(this);
376
671
  });
377
672
  });
378
673
 
379
- var path = global_1;
380
-
381
- var aFunction = function (variable) {
382
- return typeof variable == 'function' ? variable : undefined;
383
- };
674
+ var max = Math.max;
675
+ var min = Math.min; // Helper for a popular repeating case of the spec:
676
+ // Let integer be ? ToInteger(index).
677
+ // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
384
678
 
385
- var getBuiltIn = function (namespace, method) {
386
- return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global_1[namespace]) : path[namespace] && path[namespace][method] || global_1[namespace] && global_1[namespace][method];
679
+ var toAbsoluteIndex = function (index, length) {
680
+ var integer = toIntegerOrInfinity(index);
681
+ return integer < 0 ? max(integer + length, 0) : min(integer, length);
387
682
  };
388
683
 
389
- var min = Math.min; // `ToLength` abstract operation
390
- // https://tc39.github.io/ecma262/#sec-tolength
684
+ var min$1 = Math.min; // `ToLength` abstract operation
685
+ // https://tc39.es/ecma262/#sec-tolength
391
686
 
392
687
  var toLength = function (argument) {
393
- return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
688
+ return argument > 0 ? min$1(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
394
689
  };
395
690
 
396
- var max = Math.max;
397
- var min$1 = Math.min; // Helper for a popular repeating case of the spec:
398
- // Let integer be ? ToInteger(index).
399
- // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
691
+ // https://tc39.es/ecma262/#sec-lengthofarraylike
400
692
 
401
- var toAbsoluteIndex = function (index, length) {
402
- var integer = toInteger(index);
403
- return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
693
+ var lengthOfArrayLike = function (obj) {
694
+ return toLength(obj.length);
404
695
  };
405
696
 
406
697
  var createMethod$1 = function (IS_INCLUDES) {
407
698
  return function ($this, el, fromIndex) {
408
699
  var O = toIndexedObject($this);
409
- var length = toLength(O.length);
700
+ var length = lengthOfArrayLike(O);
410
701
  var index = toAbsoluteIndex(fromIndex, length);
411
702
  var value; // Array#includes uses SameValueZero equality algorithm
412
- // eslint-disable-next-line no-self-compare
703
+ // eslint-disable-next-line no-self-compare -- NaN check
413
704
 
414
705
  if (IS_INCLUDES && el != el) while (length > index) {
415
- value = O[index++]; // eslint-disable-next-line no-self-compare
706
+ value = O[index++]; // eslint-disable-next-line no-self-compare -- NaN check
416
707
 
417
708
  if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not
418
709
  } else for (; length > index; index++) {
@@ -424,14 +715,15 @@ var createMethod$1 = function (IS_INCLUDES) {
424
715
 
425
716
  var arrayIncludes = {
426
717
  // `Array.prototype.includes` method
427
- // https://tc39.github.io/ecma262/#sec-array.prototype.includes
718
+ // https://tc39.es/ecma262/#sec-array.prototype.includes
428
719
  includes: createMethod$1(true),
429
720
  // `Array.prototype.indexOf` method
430
- // https://tc39.github.io/ecma262/#sec-array.prototype.indexof
721
+ // https://tc39.es/ecma262/#sec-array.prototype.indexof
431
722
  indexOf: createMethod$1(false)
432
723
  };
433
724
 
434
725
  var indexOf = arrayIncludes.indexOf;
726
+ var push = functionUncurryThis([].push);
435
727
 
436
728
  var objectKeysInternal = function (object, names) {
437
729
  var O = toIndexedObject(object);
@@ -439,11 +731,11 @@ var objectKeysInternal = function (object, names) {
439
731
  var result = [];
440
732
  var key;
441
733
 
442
- for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key); // Don't enum bug & hidden keys
734
+ for (key in O) !hasOwnProperty_1(hiddenKeys, key) && hasOwnProperty_1(O, key) && push(result, key); // Don't enum bug & hidden keys
443
735
 
444
736
 
445
- while (names.length > i) if (has(O, key = names[i++])) {
446
- ~indexOf(result, key) || result.push(key);
737
+ while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
738
+ ~indexOf(result, key) || push(result, key);
447
739
  }
448
740
 
449
741
  return result;
@@ -453,7 +745,8 @@ var objectKeysInternal = function (object, names) {
453
745
  var enumBugKeys = ['constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf'];
454
746
 
455
747
  var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method
456
- // https://tc39.github.io/ecma262/#sec-object.getownpropertynames
748
+ // https://tc39.es/ecma262/#sec-object.getownpropertynames
749
+ // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
457
750
 
458
751
  var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
459
752
  return objectKeysInternal(O, hiddenKeys$1);
@@ -463,25 +756,31 @@ var objectGetOwnPropertyNames = {
463
756
  f: f$3
464
757
  };
465
758
 
759
+ // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
466
760
  var f$4 = Object.getOwnPropertySymbols;
467
761
  var objectGetOwnPropertySymbols = {
468
762
  f: f$4
469
763
  };
470
764
 
765
+ var concat = functionUncurryThis([].concat); // all object keys, includes non-enumerable and symbols
766
+
471
767
  var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
472
768
  var keys = objectGetOwnPropertyNames.f(anObject(it));
473
769
  var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
474
- return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;
770
+ return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
475
771
  };
476
772
 
477
- var copyConstructorProperties = function (target, source) {
773
+ var copyConstructorProperties = function (target, source, exceptions) {
478
774
  var keys = ownKeys(source);
479
775
  var defineProperty = objectDefineProperty.f;
480
776
  var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
481
777
 
482
778
  for (var i = 0; i < keys.length; i++) {
483
779
  var key = keys[i];
484
- if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));
780
+
781
+ if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
782
+ defineProperty(target, key, getOwnPropertyDescriptor(source, key));
783
+ }
485
784
  }
486
785
  };
487
786
 
@@ -489,7 +788,7 @@ var replacement = /#|\.prototype\./;
489
788
 
490
789
  var isForced = function (feature, detection) {
491
790
  var value = data[normalize(feature)];
492
- return value == POLYFILL ? true : value == NATIVE ? false : typeof detection == 'function' ? fails(detection) : !!detection;
791
+ return value == POLYFILL ? true : value == NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
493
792
  };
494
793
 
495
794
  var normalize = isForced.normalize = function (string) {
@@ -515,6 +814,7 @@ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
515
814
  options.sham - add a flag to not completely full polyfills
516
815
  options.enumerable - export as enumerable property
517
816
  options.noTargetGet - prevent calling a getter on target
817
+ options.name - the .name of the function if it does not match the key
518
818
  */
519
819
 
520
820
  var _export = function (options, source) {
@@ -542,7 +842,7 @@ var _export = function (options, source) {
542
842
  FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target
543
843
 
544
844
  if (!FORCED && targetProperty !== undefined) {
545
- if (typeof sourceProperty === typeof targetProperty) continue;
845
+ if (typeof sourceProperty == typeof targetProperty) continue;
546
846
  copyConstructorProperties(sourceProperty, targetProperty);
547
847
  } // add a flag to not completely full polyfills
548
848
 
@@ -556,116 +856,41 @@ var _export = function (options, source) {
556
856
  }
557
857
  };
558
858
 
559
- // https://tc39.github.io/ecma262/#sec-toobject
560
-
561
- var toObject = function (argument) {
562
- return Object(requireObjectCoercible(argument));
563
- };
564
-
565
- var correctPrototypeGetter = !fails(function () {
566
- function F() {
567
- /* empty */
568
- }
569
-
570
- F.prototype.constructor = null;
571
- return Object.getPrototypeOf(new F()) !== F.prototype;
572
- });
573
-
574
- var IE_PROTO = sharedKey('IE_PROTO');
575
- var ObjectPrototype = Object.prototype; // `Object.getPrototypeOf` method
576
- // https://tc39.github.io/ecma262/#sec-object.getprototypeof
577
-
578
- var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
579
- O = toObject(O);
580
- if (has(O, IE_PROTO)) return O[IE_PROTO];
581
-
582
- if (typeof O.constructor == 'function' && O instanceof O.constructor) {
583
- return O.constructor.prototype;
584
- }
585
-
586
- return O instanceof Object ? ObjectPrototype : null;
587
- };
588
-
589
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
590
- // Chrome 38 Symbol has incorrect toString conversion
591
- // eslint-disable-next-line no-undef
592
- return !String(Symbol());
593
- });
594
-
595
- var useSymbolAsUid = nativeSymbol // eslint-disable-next-line no-undef
596
- && !Symbol.sham // eslint-disable-next-line no-undef
597
- && typeof Symbol.iterator == 'symbol';
598
-
599
- var WellKnownSymbolsStore = shared('wks');
600
- var Symbol$1 = global_1.Symbol;
601
- var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
602
-
603
- var wellKnownSymbol = function (name) {
604
- if (!has(WellKnownSymbolsStore, name)) {
605
- if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
606
- }
607
-
608
- return WellKnownSymbolsStore[name];
609
- };
610
-
611
- var ITERATOR = wellKnownSymbol('iterator');
612
- var BUGGY_SAFARI_ITERATORS = false;
613
-
614
- var returnThis = function () {
615
- return this;
616
- }; // `%IteratorPrototype%` object
617
- // https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
618
-
619
-
620
- var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
621
-
622
- if ([].keys) {
623
- arrayIterator = [].keys(); // Safari 8 has buggy iterators w/o `next`
624
-
625
- if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;else {
626
- PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));
627
- if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
628
- }
629
- }
630
-
631
- if (IteratorPrototype == undefined) IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
632
-
633
- if ( !has(IteratorPrototype, ITERATOR)) {
634
- createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
635
- }
636
-
637
- var iteratorsCore = {
638
- IteratorPrototype: IteratorPrototype,
639
- BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
640
- };
641
-
642
- // https://tc39.github.io/ecma262/#sec-object.keys
859
+ // https://tc39.es/ecma262/#sec-object.keys
860
+ // eslint-disable-next-line es-x/no-object-keys -- safe
643
861
 
644
862
  var objectKeys = Object.keys || function keys(O) {
645
863
  return objectKeysInternal(O, enumBugKeys);
646
864
  };
647
865
 
648
- // https://tc39.github.io/ecma262/#sec-object.defineproperties
866
+ // https://tc39.es/ecma262/#sec-object.defineproperties
867
+ // eslint-disable-next-line es-x/no-object-defineproperties -- safe
649
868
 
650
- var objectDefineProperties = descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
869
+ var f$5 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
651
870
  anObject(O);
871
+ var props = toIndexedObject(Properties);
652
872
  var keys = objectKeys(Properties);
653
873
  var length = keys.length;
654
874
  var index = 0;
655
875
  var key;
656
876
 
657
- while (length > index) objectDefineProperty.f(O, key = keys[index++], Properties[key]);
877
+ while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
658
878
 
659
879
  return O;
660
880
  };
881
+ var objectDefineProperties = {
882
+ f: f$5
883
+ };
661
884
 
662
885
  var html = getBuiltIn('document', 'documentElement');
663
886
 
887
+ /* global ActiveXObject -- old IE, WSH */
888
+
664
889
  var GT = '>';
665
890
  var LT = '<';
666
891
  var PROTOTYPE = 'prototype';
667
892
  var SCRIPT = 'script';
668
- var IE_PROTO$1 = sharedKey('IE_PROTO');
893
+ var IE_PROTO = sharedKey('IE_PROTO');
669
894
 
670
895
  var EmptyConstructor = function () {
671
896
  /* empty */
@@ -711,13 +936,14 @@ var activeXDocument;
711
936
 
712
937
  var NullProtoObject = function () {
713
938
  try {
714
- /* global ActiveXObject */
715
- activeXDocument = document.domain && new ActiveXObject('htmlfile');
939
+ activeXDocument = new ActiveXObject('htmlfile');
716
940
  } catch (error) {
717
941
  /* ignore */
718
942
  }
719
943
 
720
- NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();
944
+ NullProtoObject = typeof document != 'undefined' ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) // old IE
945
+ : NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument); // WSH
946
+
721
947
  var length = enumBugKeys.length;
722
948
 
723
949
  while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
@@ -725,8 +951,9 @@ var NullProtoObject = function () {
725
951
  return NullProtoObject();
726
952
  };
727
953
 
728
- hiddenKeys[IE_PROTO$1] = true; // `Object.create` method
729
- // https://tc39.github.io/ecma262/#sec-object.create
954
+ hiddenKeys[IE_PROTO] = true; // `Object.create` method
955
+ // https://tc39.es/ecma262/#sec-object.create
956
+ // eslint-disable-next-line es-x/no-object-create -- safe
730
957
 
731
958
  var objectCreate = Object.create || function create(O, Properties) {
732
959
  var result;
@@ -736,18 +963,82 @@ var objectCreate = Object.create || function create(O, Properties) {
736
963
  result = new EmptyConstructor();
737
964
  EmptyConstructor[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill
738
965
 
739
- result[IE_PROTO$1] = O;
966
+ result[IE_PROTO] = O;
740
967
  } else result = NullProtoObject();
741
968
 
742
- return Properties === undefined ? result : objectDefineProperties(result, Properties);
969
+ return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
743
970
  };
744
971
 
745
- var defineProperty = objectDefineProperty.f;
746
- var TO_STRING_TAG = wellKnownSymbol('toStringTag');
972
+ var correctPrototypeGetter = !fails(function () {
973
+ function F() {
974
+ /* empty */
975
+ }
976
+
977
+ F.prototype.constructor = null; // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
978
+
979
+ return Object.getPrototypeOf(new F()) !== F.prototype;
980
+ });
981
+
982
+ var IE_PROTO$1 = sharedKey('IE_PROTO');
983
+ var Object$5 = global_1.Object;
984
+ var ObjectPrototype = Object$5.prototype; // `Object.getPrototypeOf` method
985
+ // https://tc39.es/ecma262/#sec-object.getprototypeof
986
+
987
+ var objectGetPrototypeOf = correctPrototypeGetter ? Object$5.getPrototypeOf : function (O) {
988
+ var object = toObject(O);
989
+ if (hasOwnProperty_1(object, IE_PROTO$1)) return object[IE_PROTO$1];
990
+ var constructor = object.constructor;
991
+
992
+ if (isCallable(constructor) && object instanceof constructor) {
993
+ return constructor.prototype;
994
+ }
995
+
996
+ return object instanceof Object$5 ? ObjectPrototype : null;
997
+ };
747
998
 
748
- var setToStringTag = function (it, TAG, STATIC) {
749
- if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {
750
- defineProperty(it, TO_STRING_TAG, {
999
+ var ITERATOR = wellKnownSymbol('iterator');
1000
+ var BUGGY_SAFARI_ITERATORS = false; // `%IteratorPrototype%` object
1001
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1002
+
1003
+ var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
1004
+ /* eslint-disable es-x/no-array-prototype-keys -- safe */
1005
+
1006
+ if ([].keys) {
1007
+ arrayIterator = [].keys(); // Safari 8 has buggy iterators w/o `next`
1008
+
1009
+ if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;else {
1010
+ PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));
1011
+ if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
1012
+ }
1013
+ }
1014
+
1015
+ var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
1016
+ var test = {}; // FF44- legacy iterators case
1017
+
1018
+ return IteratorPrototype[ITERATOR].call(test) !== test;
1019
+ });
1020
+ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {}; // `%IteratorPrototype%[@@iterator]()` method
1021
+ // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
1022
+
1023
+ if (!isCallable(IteratorPrototype[ITERATOR])) {
1024
+ redefine(IteratorPrototype, ITERATOR, function () {
1025
+ return this;
1026
+ });
1027
+ }
1028
+
1029
+ var iteratorsCore = {
1030
+ IteratorPrototype: IteratorPrototype,
1031
+ BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
1032
+ };
1033
+
1034
+ var defineProperty$1 = objectDefineProperty.f;
1035
+ var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
1036
+
1037
+ var setToStringTag = function (target, TAG, STATIC) {
1038
+ if (target && !STATIC) target = target.prototype;
1039
+
1040
+ if (target && !hasOwnProperty_1(target, TO_STRING_TAG$2)) {
1041
+ defineProperty$1(target, TO_STRING_TAG$2, {
751
1042
  configurable: true,
752
1043
  value: TAG
753
1044
  });
@@ -758,32 +1049,33 @@ var iterators = {};
758
1049
 
759
1050
  var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
760
1051
 
761
- var returnThis$1 = function () {
1052
+ var returnThis = function () {
762
1053
  return this;
763
1054
  };
764
1055
 
765
- var createIteratorConstructor = function (IteratorConstructor, NAME, next) {
1056
+ var createIteratorConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
766
1057
  var TO_STRING_TAG = NAME + ' Iterator';
767
1058
  IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, {
768
- next: createPropertyDescriptor(1, next)
1059
+ next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next)
769
1060
  });
770
1061
  setToStringTag(IteratorConstructor, TO_STRING_TAG, false);
771
- iterators[TO_STRING_TAG] = returnThis$1;
1062
+ iterators[TO_STRING_TAG] = returnThis;
772
1063
  return IteratorConstructor;
773
1064
  };
774
1065
 
775
- var aPossiblePrototype = function (it) {
776
- if (!isObject(it) && it !== null) {
777
- throw TypeError("Can't set " + String(it) + ' as a prototype');
778
- }
1066
+ var String$4 = global_1.String;
1067
+ var TypeError$8 = global_1.TypeError;
779
1068
 
780
- return it;
1069
+ var aPossiblePrototype = function (argument) {
1070
+ if (typeof argument == 'object' || isCallable(argument)) return argument;
1071
+ throw TypeError$8("Can't set " + String$4(argument) + ' as a prototype');
781
1072
  };
782
1073
 
783
- // https://tc39.github.io/ecma262/#sec-object.setprototypeof
1074
+ /* eslint-disable no-proto -- safe */
1075
+ // `Object.setPrototypeOf` method
1076
+ // https://tc39.es/ecma262/#sec-object.setprototypeof
784
1077
  // Works with __proto__ only. Old v8 can't work with null proto objects.
785
-
786
- /* eslint-disable no-proto */
1078
+ // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
787
1079
 
788
1080
  var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
789
1081
  var CORRECT_SETTER = false;
@@ -791,8 +1083,9 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
791
1083
  var setter;
792
1084
 
793
1085
  try {
794
- setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;
795
- setter.call(test, []);
1086
+ // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
1087
+ setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1088
+ setter(test, []);
796
1089
  CORRECT_SETTER = test instanceof Array;
797
1090
  } catch (error) {
798
1091
  /* empty */
@@ -801,11 +1094,13 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
801
1094
  return function setPrototypeOf(O, proto) {
802
1095
  anObject(O);
803
1096
  aPossiblePrototype(proto);
804
- if (CORRECT_SETTER) setter.call(O, proto);else O.__proto__ = proto;
1097
+ if (CORRECT_SETTER) setter(O, proto);else O.__proto__ = proto;
805
1098
  return O;
806
1099
  };
807
1100
  }() : undefined);
808
1101
 
1102
+ var PROPER_FUNCTION_NAME = functionName.PROPER;
1103
+ var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
809
1104
  var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
810
1105
  var BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS;
811
1106
  var ITERATOR$1 = wellKnownSymbol('iterator');
@@ -813,7 +1108,7 @@ var KEYS = 'keys';
813
1108
  var VALUES = 'values';
814
1109
  var ENTRIES = 'entries';
815
1110
 
816
- var returnThis$2 = function () {
1111
+ var returnThis$1 = function () {
817
1112
  return this;
818
1113
  };
819
1114
 
@@ -857,35 +1152,33 @@ var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
857
1152
  if (anyNativeIterator) {
858
1153
  CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable()));
859
1154
 
860
- if (IteratorPrototype$2 !== Object.prototype && CurrentIteratorPrototype.next) {
1155
+ if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
861
1156
  if ( objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype$2) {
862
1157
  if (objectSetPrototypeOf) {
863
1158
  objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);
864
- } else if (typeof CurrentIteratorPrototype[ITERATOR$1] != 'function') {
865
- createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR$1, returnThis$2);
1159
+ } else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
1160
+ redefine(CurrentIteratorPrototype, ITERATOR$1, returnThis$1);
866
1161
  }
867
1162
  } // Set @@toStringTag to native iterators
868
1163
 
869
1164
 
870
1165
  setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
871
1166
  }
872
- } // fix Array#{values, @@iterator}.name in V8 / FF
873
-
874
-
875
- if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
876
- INCORRECT_VALUES_NAME = true;
1167
+ } // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
877
1168
 
878
- defaultIterator = function values() {
879
- return nativeIterator.call(this);
880
- };
881
- } // define iterator
882
1169
 
1170
+ if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
1171
+ if ( CONFIGURABLE_FUNCTION_NAME) {
1172
+ createNonEnumerableProperty(IterablePrototype, 'name', VALUES);
1173
+ } else {
1174
+ INCORRECT_VALUES_NAME = true;
883
1175
 
884
- if ( IterablePrototype[ITERATOR$1] !== defaultIterator) {
885
- createNonEnumerableProperty(IterablePrototype, ITERATOR$1, defaultIterator);
886
- }
1176
+ defaultIterator = function values() {
1177
+ return functionCall(nativeIterator, this);
1178
+ };
1179
+ }
1180
+ } // export additional methods
887
1181
 
888
- iterators[NAME] = defaultIterator; // export additional methods
889
1182
 
890
1183
  if (DEFAULT) {
891
1184
  methods = {
@@ -902,24 +1195,32 @@ var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
902
1195
  proto: true,
903
1196
  forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME
904
1197
  }, methods);
1198
+ } // define iterator
1199
+
1200
+
1201
+ if ( IterablePrototype[ITERATOR$1] !== defaultIterator) {
1202
+ redefine(IterablePrototype, ITERATOR$1, defaultIterator, {
1203
+ name: DEFAULT
1204
+ });
905
1205
  }
906
1206
 
1207
+ iterators[NAME] = defaultIterator;
907
1208
  return methods;
908
1209
  };
909
1210
 
910
- var charAt = stringMultibyte.charAt;
1211
+ var charAt$1 = stringMultibyte.charAt;
911
1212
  var STRING_ITERATOR = 'String Iterator';
912
1213
  var setInternalState = internalState.set;
913
1214
  var getInternalState = internalState.getterFor(STRING_ITERATOR); // `String.prototype[@@iterator]` method
914
- // https://tc39.github.io/ecma262/#sec-string.prototype-@@iterator
1215
+ // https://tc39.es/ecma262/#sec-string.prototype-@@iterator
915
1216
 
916
1217
  defineIterator(String, 'String', function (iterated) {
917
1218
  setInternalState(this, {
918
1219
  type: STRING_ITERATOR,
919
- string: String(iterated),
1220
+ string: toString_1(iterated),
920
1221
  index: 0
921
1222
  }); // `%StringIteratorPrototype%.next` method
922
- // https://tc39.github.io/ecma262/#sec-%stringiteratorprototype%.next
1223
+ // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
923
1224
  }, function next() {
924
1225
  var state = getInternalState(this);
925
1226
  var string = state.string;
@@ -929,7 +1230,7 @@ defineIterator(String, 'String', function (iterated) {
929
1230
  value: undefined,
930
1231
  done: true
931
1232
  };
932
- point = charAt(string, index);
1233
+ point = charAt$1(string, index);
933
1234
  state.index += point.length;
934
1235
  return {
935
1236
  value: point,
@@ -937,61 +1238,46 @@ defineIterator(String, 'String', function (iterated) {
937
1238
  };
938
1239
  });
939
1240
 
940
- var aFunction$1 = function (it) {
941
- if (typeof it != 'function') {
942
- throw TypeError(String(it) + ' is not a function');
943
- }
1241
+ var bind$1 = functionUncurryThis(functionUncurryThis.bind); // optional / simple context binding
944
1242
 
945
- return it;
1243
+ var functionBindContext = function (fn, that) {
1244
+ aCallable(fn);
1245
+ return that === undefined ? fn : functionBindNative ? bind$1(fn, that) : function
1246
+ /* ...args */
1247
+ () {
1248
+ return fn.apply(that, arguments);
1249
+ };
946
1250
  };
947
1251
 
948
- var functionBindContext = function (fn, that, length) {
949
- aFunction$1(fn);
950
- if (that === undefined) return fn;
1252
+ var iteratorClose = function (iterator, kind, value) {
1253
+ var innerResult, innerError;
1254
+ anObject(iterator);
951
1255
 
952
- switch (length) {
953
- case 0:
954
- return function () {
955
- return fn.call(that);
956
- };
957
-
958
- case 1:
959
- return function (a) {
960
- return fn.call(that, a);
961
- };
1256
+ try {
1257
+ innerResult = getMethod(iterator, 'return');
962
1258
 
963
- case 2:
964
- return function (a, b) {
965
- return fn.call(that, a, b);
966
- };
1259
+ if (!innerResult) {
1260
+ if (kind === 'throw') throw value;
1261
+ return value;
1262
+ }
967
1263
 
968
- case 3:
969
- return function (a, b, c) {
970
- return fn.call(that, a, b, c);
971
- };
1264
+ innerResult = functionCall(innerResult, iterator);
1265
+ } catch (error) {
1266
+ innerError = true;
1267
+ innerResult = error;
972
1268
  }
973
1269
 
974
- return function ()
975
- /* ...args */
976
- {
977
- return fn.apply(that, arguments);
978
- };
979
- };
980
-
981
- var iteratorClose = function (iterator) {
982
- var returnMethod = iterator['return'];
983
-
984
- if (returnMethod !== undefined) {
985
- return anObject(returnMethod.call(iterator)).value;
986
- }
1270
+ if (kind === 'throw') throw value;
1271
+ if (innerError) throw innerResult;
1272
+ anObject(innerResult);
1273
+ return value;
987
1274
  };
988
1275
 
989
1276
  var callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) {
990
1277
  try {
991
- return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); // 7.4.6 IteratorClose(iterator, completion)
1278
+ return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
992
1279
  } catch (error) {
993
- iteratorClose(iterator);
994
- throw error;
1280
+ iteratorClose(iterator, 'throw', error);
995
1281
  }
996
1282
  };
997
1283
 
@@ -1002,73 +1288,104 @@ var isArrayIteratorMethod = function (it) {
1002
1288
  return it !== undefined && (iterators.Array === it || ArrayPrototype[ITERATOR$2] === it);
1003
1289
  };
1004
1290
 
1005
- var createProperty = function (object, key, value) {
1006
- var propertyKey = toPrimitive(key);
1007
- if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));else object[propertyKey] = value;
1291
+ var noop = function () {
1292
+ /* empty */
1008
1293
  };
1009
1294
 
1010
- var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
1011
- var test = {};
1012
- test[TO_STRING_TAG$1] = 'z';
1013
- var toStringTagSupport = String(test) === '[object z]';
1295
+ var empty = [];
1296
+ var construct = getBuiltIn('Reflect', 'construct');
1297
+ var constructorRegExp = /^\s*(?:class|function)\b/;
1298
+ var exec = functionUncurryThis(constructorRegExp.exec);
1299
+ var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
1014
1300
 
1015
- var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag'); // ES3 wrong here
1301
+ var isConstructorModern = function isConstructor(argument) {
1302
+ if (!isCallable(argument)) return false;
1016
1303
 
1017
- var CORRECT_ARGUMENTS = classofRaw(function () {
1018
- return arguments;
1019
- }()) == 'Arguments'; // fallback for IE11 Script Access Denied error
1304
+ try {
1305
+ construct(noop, empty, argument);
1306
+ return true;
1307
+ } catch (error) {
1308
+ return false;
1309
+ }
1310
+ };
1311
+
1312
+ var isConstructorLegacy = function isConstructor(argument) {
1313
+ if (!isCallable(argument)) return false;
1314
+
1315
+ switch (classof(argument)) {
1316
+ case 'AsyncFunction':
1317
+ case 'GeneratorFunction':
1318
+ case 'AsyncGeneratorFunction':
1319
+ return false;
1320
+ }
1020
1321
 
1021
- var tryGet = function (it, key) {
1022
1322
  try {
1023
- return it[key];
1323
+ // we can't check .prototype since constructors produced by .bind haven't it
1324
+ // `Function#toString` throws on some built-it function in some legacy engines
1325
+ // (for example, `DOMQuad` and similar in FF41-)
1326
+ return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
1024
1327
  } catch (error) {
1025
- /* empty */
1328
+ return true;
1026
1329
  }
1027
- }; // getting tag from ES6+ `Object.prototype.toString`
1330
+ };
1028
1331
 
1332
+ isConstructorLegacy.sham = true; // `IsConstructor` abstract operation
1333
+ // https://tc39.es/ecma262/#sec-isconstructor
1029
1334
 
1030
- var classof = toStringTagSupport ? classofRaw : function (it) {
1031
- var O, tag, result;
1032
- return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case
1033
- : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG$2)) == 'string' ? tag // builtinTag case
1034
- : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback
1035
- : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;
1335
+ var isConstructor = !construct || fails(function () {
1336
+ var called;
1337
+ return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function () {
1338
+ called = true;
1339
+ }) || called;
1340
+ }) ? isConstructorLegacy : isConstructorModern;
1341
+
1342
+ var createProperty = function (object, key, value) {
1343
+ var propertyKey = toPropertyKey(key);
1344
+ if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));else object[propertyKey] = value;
1036
1345
  };
1037
1346
 
1038
1347
  var ITERATOR$3 = wellKnownSymbol('iterator');
1039
1348
 
1040
1349
  var getIteratorMethod = function (it) {
1041
- if (it != undefined) return it[ITERATOR$3] || it['@@iterator'] || iterators[classof(it)];
1350
+ if (it != undefined) return getMethod(it, ITERATOR$3) || getMethod(it, '@@iterator') || iterators[classof(it)];
1042
1351
  };
1043
1352
 
1044
- // https://tc39.github.io/ecma262/#sec-array.from
1353
+ var TypeError$9 = global_1.TypeError;
1045
1354
 
1355
+ var getIterator = function (argument, usingIterator) {
1356
+ var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
1357
+ if (aCallable(iteratorMethod)) return anObject(functionCall(iteratorMethod, argument));
1358
+ throw TypeError$9(tryToString(argument) + ' is not iterable');
1359
+ };
1360
+
1361
+ var Array$1 = global_1.Array; // `Array.from` method implementation
1362
+ // https://tc39.es/ecma262/#sec-array.from
1046
1363
 
1047
1364
  var arrayFrom = function from(arrayLike
1048
1365
  /* , mapfn = undefined, thisArg = undefined */
1049
1366
  ) {
1050
1367
  var O = toObject(arrayLike);
1051
- var C = typeof this == 'function' ? this : Array;
1368
+ var IS_CONSTRUCTOR = isConstructor(this);
1052
1369
  var argumentsLength = arguments.length;
1053
1370
  var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
1054
1371
  var mapping = mapfn !== undefined;
1372
+ if (mapping) mapfn = functionBindContext(mapfn, argumentsLength > 2 ? arguments[2] : undefined);
1055
1373
  var iteratorMethod = getIteratorMethod(O);
1056
1374
  var index = 0;
1057
- var length, result, step, iterator, next, value;
1058
- if (mapping) mapfn = functionBindContext(mapfn, argumentsLength > 2 ? arguments[2] : undefined, 2); // if the target is not iterable or it's an array with the default iterator - use a simple case
1375
+ var length, result, step, iterator, next, value; // if the target is not iterable or it's an array with the default iterator - use a simple case
1059
1376
 
1060
- if (iteratorMethod != undefined && !(C == Array && isArrayIteratorMethod(iteratorMethod))) {
1061
- iterator = iteratorMethod.call(O);
1377
+ if (iteratorMethod && !(this == Array$1 && isArrayIteratorMethod(iteratorMethod))) {
1378
+ iterator = getIterator(O, iteratorMethod);
1062
1379
  next = iterator.next;
1063
- result = new C();
1380
+ result = IS_CONSTRUCTOR ? new this() : [];
1064
1381
 
1065
- for (; !(step = next.call(iterator)).done; index++) {
1382
+ for (; !(step = functionCall(next, iterator)).done; index++) {
1066
1383
  value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
1067
1384
  createProperty(result, index, value);
1068
1385
  }
1069
1386
  } else {
1070
- length = toLength(O.length);
1071
- result = new C(length);
1387
+ length = lengthOfArrayLike(O);
1388
+ result = IS_CONSTRUCTOR ? new this(length) : Array$1(length);
1072
1389
 
1073
1390
  for (; length > index; index++) {
1074
1391
  value = mapping ? mapfn(O[index], index) : O[index];
@@ -1098,7 +1415,7 @@ try {
1098
1415
 
1099
1416
  iteratorWithReturn[ITERATOR$4] = function () {
1100
1417
  return this;
1101
- }; // eslint-disable-next-line no-throw-literal
1418
+ }; // eslint-disable-next-line es-x/no-array-from, no-throw-literal -- required for testing
1102
1419
 
1103
1420
 
1104
1421
  Array.from(iteratorWithReturn, function () {
@@ -1134,9 +1451,10 @@ var checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) {
1134
1451
  };
1135
1452
 
1136
1453
  var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
1454
+ // eslint-disable-next-line es-x/no-array-from -- required for testing
1137
1455
  Array.from(iterable);
1138
1456
  }); // `Array.from` method
1139
- // https://tc39.github.io/ecma262/#sec-array.from
1457
+ // https://tc39.es/ecma262/#sec-array.from
1140
1458
 
1141
1459
  _export({
1142
1460
  target: 'Array',
@@ -1701,11 +2019,33 @@ async function fetchFromApi(url = '', data, headers) {
1701
2019
  return response.json();
1702
2020
  }
1703
2021
 
2022
+ const isPlanEligible = (plan, configPlan) => {
2023
+ if (!plan.eligible) {
2024
+ return false;
2025
+ }
2026
+
2027
+ return configPlan ? plan.purchase_amount >= (configPlan == null ? void 0 : configPlan.minAmount) && plan.purchase_amount <= (configPlan == null ? void 0 : configPlan.maxAmount) : false;
2028
+ };
2029
+
2030
+ const getPaymentPlanBoundaries = (plan, configPlan) => {
2031
+ var _plan$constraints;
2032
+
2033
+ // When the plan is not eligible, the purchase amount constraints is given from the merchant config
2034
+ const purchaseAmountConstraints = (_plan$constraints = plan.constraints) == null ? void 0 : _plan$constraints.purchase_amount;
2035
+
2036
+ if (purchaseAmountConstraints && configPlan) {
2037
+ return {
2038
+ minAmount: Math.max(configPlan.minAmount, purchaseAmountConstraints == null ? void 0 : purchaseAmountConstraints.minimum),
2039
+ maxAmount: Math.min(configPlan.maxAmount, purchaseAmountConstraints == null ? void 0 : purchaseAmountConstraints.maximum)
2040
+ };
2041
+ }
2042
+
2043
+ return configPlan != null ? configPlan : {};
2044
+ };
2045
+
1704
2046
  const filterELigibility = (eligibilities, configPlans) => {
1705
2047
  // Remove p1x
1706
- const filteredEligibilityPlans = eligibilities.filter(plan => !(plan.installments_count === 1 && plan.deferred_days === 0 && plan.deferred_months === 0)) // Keeps the plans that have a payment_plan property
1707
- .filter(plan => plan.payment_plan) // Remove plans that have a reasons property
1708
- .filter(plan => !plan.reasons); // If no configPlans was provided, return eligibility response
2048
+ const filteredEligibilityPlans = eligibilities.filter(plan => !(plan.installments_count === 1 && plan.deferred_days === 0 && plan.deferred_months === 0)); // If no configPlans was provided, return eligibility response
1709
2049
 
1710
2050
  if (!configPlans) {
1711
2051
  return filteredEligibilityPlans;
@@ -1720,10 +2060,8 @@ const filterELigibility = (eligibilities, configPlans) => {
1720
2060
  return plan.installments_count === configPlan.installmentsCount && eligibilityDeferredDays === configPlanDeferredDays;
1721
2061
  });
1722
2062
  return _extends({}, plan, {
1723
- eligible: relatedConfigPlan ? plan.purchase_amount >= (relatedConfigPlan == null ? void 0 : relatedConfigPlan.minAmount) && plan.purchase_amount <= (relatedConfigPlan == null ? void 0 : relatedConfigPlan.maxAmount) : false,
1724
- minAmount: relatedConfigPlan == null ? void 0 : relatedConfigPlan.minAmount,
1725
- maxAmount: relatedConfigPlan == null ? void 0 : relatedConfigPlan.maxAmount
1726
- });
2063
+ eligible: isPlanEligible(plan, relatedConfigPlan)
2064
+ }, getPaymentPlanBoundaries(plan, relatedConfigPlan));
1727
2065
  });
1728
2066
  };
1729
2067
 
@@ -1790,7 +2128,32 @@ function CrossIcon({
1790
2128
  }));
1791
2129
  }
1792
2130
 
1793
- const ControlledModal = (_ref) => {
2131
+ /**
2132
+ * Prefix classes to avoid name collisions.
2133
+ */
2134
+ const prefix = 'alma-eligibility-modal';
2135
+ /**
2136
+ * Class names for the **eligibility modale** widget.
2137
+ * Those classes are intended to be used by the **merchant developer**.
2138
+ */
2139
+
2140
+ const STATIC_CUSTOMISATION_CLASSES = {
2141
+ leftSide: prefix + '-left-side',
2142
+ rightSide: prefix + '-right-side',
2143
+ title: prefix + '-title',
2144
+ info: prefix + '-info',
2145
+ infoMessage: prefix + '-info-message',
2146
+ eligibilityOptions: prefix + '-eligibility-options',
2147
+ activeOption: prefix + '-active-option',
2148
+ closeButton: prefix + '-close-button',
2149
+ scheduleDetails: prefix + '-schedule-details',
2150
+ scheduleTotal: prefix + '-schedule-total',
2151
+ scheduleCredit: prefix + '-schedule-credit'
2152
+ };
2153
+
2154
+ const _excluded = ["children", "isOpen", "onClose", "className", "contentClassName", "scrollable"];
2155
+
2156
+ const ControlledModal = _ref => {
1794
2157
  let {
1795
2158
  children,
1796
2159
  isOpen,
@@ -1799,7 +2162,7 @@ const ControlledModal = (_ref) => {
1799
2162
  contentClassName,
1800
2163
  scrollable = false
1801
2164
  } = _ref,
1802
- props = _objectWithoutPropertiesLoose(_ref, ["children", "isOpen", "onClose", "className", "contentClassName", "scrollable"]);
2165
+ props = _objectWithoutPropertiesLoose(_ref, _excluded);
1803
2166
 
1804
2167
  Modal.setAppElement('body');
1805
2168
  return /*#__PURE__*/React.createElement(Modal, Object.assign({
@@ -1819,7 +2182,7 @@ const ControlledModal = (_ref) => {
1819
2182
  className: s$1.header
1820
2183
  }, /*#__PURE__*/React.createElement("button", {
1821
2184
  onClick: onClose,
1822
- className: s$1.closeButton,
2185
+ className: cx(s$1.closeButton, STATIC_CUSTOMISATION_CLASSES.closeButton),
1823
2186
  "data-testid": "modal-close-button"
1824
2187
  }, /*#__PURE__*/React.createElement(CrossIcon, null))), /*#__PURE__*/React.createElement("div", {
1825
2188
  className: cx(s$1.content, contentClassName, {
@@ -1848,6 +2211,18 @@ const paymentPlanShorthandName = payment => {
1848
2211
  return `${installmentsCount}x`;
1849
2212
  }
1850
2213
  };
2214
+
2215
+ const withNoFee = payment => {
2216
+ var _payment$payment_plan;
2217
+
2218
+ if ((_payment$payment_plan = payment.payment_plan) != null && _payment$payment_plan.every(plan => plan.customer_fee === 0 && plan.customer_interest === 0)) {
2219
+ return /*#__PURE__*/React.createElement(React.Fragment, null, ' ', /*#__PURE__*/React.createElement(FormattedMessage, {
2220
+ id: "payment-plan-strings.no-fee",
2221
+ defaultMessage: '(sans frais)'
2222
+ }));
2223
+ }
2224
+ };
2225
+
1851
2226
  const paymentPlanInfoText = payment => {
1852
2227
  const {
1853
2228
  deferred_days,
@@ -1856,19 +2231,11 @@ const paymentPlanInfoText = payment => {
1856
2231
  eligible,
1857
2232
  purchase_amount: purchaseAmount,
1858
2233
  minAmount = 0,
1859
- maxAmount = 0
2234
+ maxAmount = 0,
2235
+ payment_plan
1860
2236
  } = payment;
1861
2237
  const deferredDaysCount = deferred_days + deferred_months * 30;
1862
2238
 
1863
- const withNoFee = () => {
1864
- if (payment.payment_plan.every(plan => plan.customer_fee === 0 && plan.customer_interest === 0)) {
1865
- return /*#__PURE__*/React.createElement(React.Fragment, null, ' ', /*#__PURE__*/React.createElement(FormattedMessage, {
1866
- id: "payment-plan-strings.no-fee",
1867
- defaultMessage: '(sans frais)'
1868
- }));
1869
- }
1870
- };
1871
-
1872
2239
  if (!eligible) {
1873
2240
  return purchaseAmount > maxAmount ? /*#__PURE__*/React.createElement(FormattedMessage, {
1874
2241
  id: "payment-plan-strings.ineligible-greater-than-max",
@@ -1891,26 +2258,31 @@ const paymentPlanInfoText = payment => {
1891
2258
  })
1892
2259
  }
1893
2260
  });
2261
+ } else if (!payment_plan) {
2262
+ /* This error should never happen. We added this condition to avoid a typescript warning on
2263
+ payment_plan possibly undefined. As far as we know, it only happens when the plan is not
2264
+ eligible, which is checked above. */
2265
+ throw Error(`No payment plan provided for payment in ${installmentsCount} installments. Please contact us if you see this error.`);
1894
2266
  } else if (deferredDaysCount !== 0 && installmentsCount === 1) {
1895
2267
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, {
1896
2268
  id: "payment-plan-strings.deferred",
1897
2269
  defaultMessage: "{totalAmount} \u00E0 payer le {dueDate}",
1898
2270
  values: {
1899
2271
  totalAmount: /*#__PURE__*/React.createElement(FormattedNumber, {
1900
- value: priceFromCents(payment.payment_plan[0].total_amount),
2272
+ value: priceFromCents(payment_plan[0].total_amount),
1901
2273
  style: "currency",
1902
2274
  currency: "EUR"
1903
2275
  }),
1904
2276
  dueDate: /*#__PURE__*/React.createElement(FormattedDate, {
1905
- value: secondsToMilliseconds(payment.payment_plan[0].due_date),
2277
+ value: secondsToMilliseconds(payment_plan[0].due_date),
1906
2278
  day: "numeric",
1907
2279
  month: "long",
1908
2280
  year: "numeric"
1909
2281
  })
1910
2282
  }
1911
- }), withNoFee());
2283
+ }), withNoFee(payment));
1912
2284
  } else if (installmentsCount > 0) {
1913
- const areInstallmentsOfSameAmount = payment.payment_plan.every((installment, index) => index === 0 || installment.total_amount === payment.payment_plan[0].total_amount);
2285
+ const areInstallmentsOfSameAmount = payment_plan == null ? void 0 : payment_plan.every((installment, index) => index === 0 || installment.total_amount === payment_plan[0].total_amount);
1914
2286
 
1915
2287
  if (areInstallmentsOfSameAmount) {
1916
2288
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, {
@@ -1918,13 +2290,13 @@ const paymentPlanInfoText = payment => {
1918
2290
  defaultMessage: "{installmentsCount} x {totalAmount}",
1919
2291
  values: {
1920
2292
  totalAmount: /*#__PURE__*/React.createElement(FormattedNumber, {
1921
- value: priceFromCents(payment.payment_plan[0].total_amount),
2293
+ value: priceFromCents(payment_plan[0].total_amount),
1922
2294
  style: "currency",
1923
2295
  currency: "EUR"
1924
2296
  }),
1925
2297
  installmentsCount
1926
2298
  }
1927
- }), withNoFee());
2299
+ }), withNoFee(payment));
1928
2300
  }
1929
2301
 
1930
2302
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(FormattedMessage, {
@@ -1932,18 +2304,18 @@ const paymentPlanInfoText = payment => {
1932
2304
  defaultMessage: "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
1933
2305
  values: {
1934
2306
  firstInstallmentAmount: /*#__PURE__*/React.createElement(FormattedNumber, {
1935
- value: priceFromCents(payment.payment_plan[0].total_amount),
2307
+ value: priceFromCents(payment_plan[0].total_amount),
1936
2308
  style: "currency",
1937
2309
  currency: "EUR"
1938
2310
  }),
1939
2311
  numberOfRemainingInstallments: installmentsCount - 1,
1940
2312
  othersInstallmentAmount: /*#__PURE__*/React.createElement(FormattedNumber, {
1941
- value: priceFromCents(payment.payment_plan[1].total_amount),
2313
+ value: priceFromCents(payment_plan[1].total_amount),
1942
2314
  style: "currency",
1943
2315
  currency: "EUR"
1944
2316
  })
1945
2317
  }
1946
- }), withNoFee());
2318
+ }), withNoFee(payment));
1947
2319
  }
1948
2320
 
1949
2321
  return /*#__PURE__*/React.createElement(FormattedMessage, {
@@ -1959,11 +2331,11 @@ const EligibilityPlansButtons = ({
1959
2331
  currentPlanIndex,
1960
2332
  setCurrentPlanIndex
1961
2333
  }) => /*#__PURE__*/React.createElement("div", {
1962
- className: s$2.buttons
2334
+ className: cx(s$2.buttons, STATIC_CUSTOMISATION_CLASSES.eligibilityOptions)
1963
2335
  }, eligibilityPlans.map((eligibilityPlan, index) => /*#__PURE__*/React.createElement("button", {
1964
2336
  key: index,
1965
2337
  className: cx({
1966
- [s$2.active]: index === currentPlanIndex
2338
+ [cx(s$2.active, STATIC_CUSTOMISATION_CLASSES.activeOption)]: index === currentPlanIndex
1967
2339
  }),
1968
2340
  onClick: () => setCurrentPlanIndex(index)
1969
2341
  }, paymentPlanShorthandName(eligibilityPlan))));
@@ -1980,10 +2352,10 @@ const Schedule = ({
1980
2352
  const isCredit = currentPlan && currentPlan.installments_count > 4;
1981
2353
  const intl = useIntl();
1982
2354
  return /*#__PURE__*/React.createElement("div", {
1983
- className: s$3.schedule,
2355
+ className: cx(s$3.schedule, STATIC_CUSTOMISATION_CLASSES.scheduleDetails),
1984
2356
  "data-testid": "modal-installments-element"
1985
2357
  }, /*#__PURE__*/React.createElement("div", {
1986
- className: cx(s$3.scheduleLine, s$3.total)
2358
+ className: cx(s$3.scheduleLine, s$3.total, STATIC_CUSTOMISATION_CLASSES.scheduleTotal)
1987
2359
  }, /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FormattedMessage, {
1988
2360
  id: "eligibility-modal.total",
1989
2361
  defaultMessage: "Total"
@@ -1992,7 +2364,7 @@ const Schedule = ({
1992
2364
  style: "currency",
1993
2365
  currency: "EUR"
1994
2366
  }))), /*#__PURE__*/React.createElement("div", {
1995
- className: cx(s$3.scheduleLine, s$3.creditCost)
2367
+ className: cx(s$3.scheduleLine, s$3.creditCost, STATIC_CUSTOMISATION_CLASSES.scheduleCredit)
1996
2368
  }, isCredit ? /*#__PURE__*/React.createElement("span", null, /*#__PURE__*/React.createElement(FormattedMessage, {
1997
2369
  id: "eligibility-modal.credit-cost",
1998
2370
  defaultMessage: "Dont co\u00FBt du cr\u00E9dit"
@@ -2042,13 +2414,15 @@ const Schedule = ({
2042
2414
  var s$4 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
2043
2415
 
2044
2416
  const Info = () => /*#__PURE__*/React.createElement("div", {
2045
- className: s$4.list,
2417
+ className: cx(s$4.list, STATIC_CUSTOMISATION_CLASSES.info),
2046
2418
  "data-testid": "modal-info-element"
2047
2419
  }, /*#__PURE__*/React.createElement("div", {
2048
2420
  className: s$4.listItem
2049
2421
  }, /*#__PURE__*/React.createElement("div", {
2050
2422
  className: s$4.bullet
2051
- }, "1"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(FormattedMessage, {
2423
+ }, "1"), /*#__PURE__*/React.createElement("div", {
2424
+ className: STATIC_CUSTOMISATION_CLASSES.infoMessage
2425
+ }, /*#__PURE__*/React.createElement(FormattedMessage, {
2052
2426
  id: "eligibility-modal.bullet-1",
2053
2427
  defaultMessage: "Choisissez <strong>Alma</strong> au moment du paiement.",
2054
2428
  values: {
@@ -2058,7 +2432,9 @@ const Info = () => /*#__PURE__*/React.createElement("div", {
2058
2432
  className: s$4.listItem
2059
2433
  }, /*#__PURE__*/React.createElement("div", {
2060
2434
  className: s$4.bullet
2061
- }, "2"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(FormattedMessage, {
2435
+ }, "2"), /*#__PURE__*/React.createElement("div", {
2436
+ className: STATIC_CUSTOMISATION_CLASSES.infoMessage
2437
+ }, /*#__PURE__*/React.createElement(FormattedMessage, {
2062
2438
  id: "eligibility-modal.bullet-2",
2063
2439
  defaultMessage: "Renseignez les <strong>informations</strong> demand\u00E9es.",
2064
2440
  values: {
@@ -2068,7 +2444,9 @@ const Info = () => /*#__PURE__*/React.createElement("div", {
2068
2444
  className: s$4.listItem
2069
2445
  }, /*#__PURE__*/React.createElement("div", {
2070
2446
  className: s$4.bullet
2071
- }, "3"), /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(FormattedMessage, {
2447
+ }, "3"), /*#__PURE__*/React.createElement("div", {
2448
+ className: STATIC_CUSTOMISATION_CLASSES.infoMessage
2449
+ }, /*#__PURE__*/React.createElement(FormattedMessage, {
2072
2450
  id: "eligibility-modal.bullet-3",
2073
2451
  defaultMessage: "La validation de votre paiement <strong>instantan\u00E9e</strong> !",
2074
2452
  values: {
@@ -2119,7 +2497,7 @@ const Logo = () => /*#__PURE__*/React.createElement("div", {
2119
2497
  var s$6 = {"title":"_3ERx-"};
2120
2498
 
2121
2499
  const Title = () => /*#__PURE__*/React.createElement("div", {
2122
- className: s$6.title,
2500
+ className: cx(s$6.title, STATIC_CUSTOMISATION_CLASSES.title),
2123
2501
  "data-testid": "modal-title-element"
2124
2502
  }, /*#__PURE__*/React.createElement(FormattedMessage, {
2125
2503
  id: "eligibility-modal.title",
@@ -2137,9 +2515,9 @@ const DesktopModal = ({
2137
2515
  className: s$7.container,
2138
2516
  "data-testid": "modal-container"
2139
2517
  }, /*#__PURE__*/React.createElement("div", {
2140
- className: cx([s$7.block, s$7.left])
2518
+ className: cx([s$7.block, s$7.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
2141
2519
  }, /*#__PURE__*/React.createElement(Title, null), /*#__PURE__*/React.createElement(Info, null), /*#__PURE__*/React.createElement(Logo, null)), /*#__PURE__*/React.createElement("div", {
2142
- className: s$7.block
2520
+ className: cx(s$7.block, STATIC_CUSTOMISATION_CLASSES.rightSide)
2143
2521
  }, children));
2144
2522
 
2145
2523
  var s$8 = {"noEligibility":"_17qNJ","loader":"_2oTJq"};
@@ -2286,6 +2664,24 @@ const getIndexOfActivePlan = ({
2286
2664
  return 0;
2287
2665
  };
2288
2666
 
2667
+ /**
2668
+ * Prefix classes to avoid name collisions.
2669
+ */
2670
+ const prefix$1 = 'alma-payment-plans';
2671
+ /**
2672
+ * Class names for the **payment plans** widget.
2673
+ * Those classes are intended to be used by the **merchant developer**.
2674
+ */
2675
+
2676
+ const STATIC_CUSTOMISATION_CLASSES$1 = {
2677
+ container: prefix$1 + '-container',
2678
+ eligibilityLine: prefix$1 + '-eligibility-line',
2679
+ eligibilityOptions: prefix$1 + '-eligibility-options',
2680
+ notEligibleOption: prefix$1 + '-not-eligible-option',
2681
+ paymentInfo: prefix$1 + '-payment-info',
2682
+ activeOption: prefix$1 + '-active-option'
2683
+ };
2684
+
2289
2685
  var s$b = {"widgetButton":"_TSkFv","logo":"_LJ4nZ","primaryContainer":"_bMClc","paymentPlans":"_17c_S","plan":"_2Kqjn","active":"_3dG_J","notEligible":"_3O1bg","info":"_25GrF","loader":"_30j1O","error":"_R0YlN","errorText":"_2kGhu","errorButton":"_73d_Y","pending":"_1ZDMS","clickable":"_UksZa","unClickable":"_1lr-q"};
2290
2686
 
2291
2687
  const VERY_LONG_TIME_IN_MS = 1000 * 3600 * 24 * 365;
@@ -2305,7 +2701,7 @@ const PaymentPlanWidget = ({
2305
2701
  eligibilityPlans,
2306
2702
  suggestedPaymentPlan: suggestedPaymentPlan != null ? suggestedPaymentPlan : 0
2307
2703
  });
2308
- const isSuggestedPaymentPlanSpecified = suggestedPaymentPlan !== undefined; // 👈 The merchant decided to focus a tab and remove animated transition.
2704
+ const isSuggestedPaymentPlanSpecified = suggestedPaymentPlan !== undefined; // 👈 The merchant decided to focus a tab
2309
2705
 
2310
2706
  const isTransitionSpecified = transitionDelay !== undefined; // 👈 The merchant has specified a transition time
2311
2707
 
@@ -2383,28 +2779,28 @@ const PaymentPlanWidget = ({
2383
2779
  className: cx(s$b.widgetButton, {
2384
2780
  [s$b.clickable]: eligiblePlans.length > 0,
2385
2781
  [s$b.unClickable]: eligiblePlans.length === 0
2386
- }),
2782
+ }, STATIC_CUSTOMISATION_CLASSES$1.container),
2387
2783
  "data-testid": "widget-button"
2388
2784
  }, /*#__PURE__*/React.createElement("div", {
2389
- className: s$b.primaryContainer
2785
+ className: cx(s$b.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
2390
2786
  }, /*#__PURE__*/React.createElement(LogoIcon, {
2391
2787
  className: s$b.logo
2392
2788
  }), /*#__PURE__*/React.createElement("div", {
2393
- className: s$b.paymentPlans
2789
+ className: cx(s$b.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
2394
2790
  }, eligibilityPlans.map((eligibilityPlan, key) => {
2395
2791
  return /*#__PURE__*/React.createElement("div", {
2396
2792
  key: key,
2397
2793
  onMouseEnter: () => onHover(key),
2398
2794
  onMouseOut: onLeave,
2399
2795
  className: cx(s$b.plan, {
2400
- [s$b.active]: current === key,
2401
- [s$b.notEligible]: !eligibilityPlan.eligible
2796
+ [cx(s$b.active, STATIC_CUSTOMISATION_CLASSES$1.activeOption)]: current === key,
2797
+ [cx(s$b.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)]: !eligibilityPlan.eligible
2402
2798
  })
2403
2799
  }, paymentPlanShorthandName(eligibilityPlan));
2404
2800
  }))), /*#__PURE__*/React.createElement("div", {
2405
2801
  className: cx(s$b.info, {
2406
- [s$b.notEligible]: eligibilityPlans[current] && !eligibilityPlans[current].eligible
2407
- })
2802
+ [cx(s$b.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)]: eligibilityPlans[current] && !eligibilityPlans[current].eligible
2803
+ }, STATIC_CUSTOMISATION_CLASSES$1.paymentInfo)
2408
2804
  }, eligibilityPlans.length !== 0 && paymentPlanInfoText(eligibilityPlans[current]))), isOpen && /*#__PURE__*/React.createElement(EligibilityModal, {
2409
2805
  initialPlanIndex: getIndexWithinEligiblePlans(current),
2410
2806
  onClose: closeModal,