@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.
- package/dist/raw/widgets.js +835 -443
- package/dist/raw/widgets.js.map +1 -1
- package/dist/raw/widgets.m.js +835 -443
- package/dist/raw/widgets.m.js.map +1 -1
- package/dist/raw/widgets.modern.js +836 -440
- package/dist/raw/widgets.modern.js.map +1 -1
- package/dist/raw/widgets.umd.js +1255 -811
- package/dist/raw/widgets.umd.js.map +1 -1
- package/dist/types/Widgets/EligibilityModal/classNames.const.d.ts +18 -0
- package/dist/types/Widgets/PaymentPlans/classNames.const.d.ts +13 -0
- package/dist/types/test/fixtures.d.ts +40 -0
- package/dist/types/types.d.ts +7 -1
- package/dist/widgets.js +1 -1
- package/dist/widgets.js.map +1 -1
- package/dist/widgets.m.js +1 -1
- package/dist/widgets.m.js.map +1 -1
- package/dist/widgets.modern.js +1 -1
- package/dist/widgets.modern.js.map +1 -1
- package/dist/widgets.umd.js +1 -1
- package/dist/widgets.umd.js.map +1 -1
- package/package.json +7 -13
- package/CHANGELOG.md +0 -247
- package/dist/types/Widgets/EligibilityModal/ModalContainer.test.d.ts +0 -1
- package/dist/types/Widgets/EligibilityModal/modal.test.d.ts +0 -1
- package/dist/types/Widgets/PaymentPlans/PaymentPlans.test.d.ts +0 -1
- package/dist/types/Widgets/PaymentPlans/tests/SuggestedPaymentPlan.d.ts +0 -1
package/dist/raw/widgets.js
CHANGED
|
@@ -10,40 +10,44 @@ var noScroll = _interopDefault(require('no-scroll'));
|
|
|
10
10
|
var reactResponsive = require('react-responsive');
|
|
11
11
|
var dateFns = require('date-fns');
|
|
12
12
|
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
13
|
+
var fails = function (exec) {
|
|
14
|
+
try {
|
|
15
|
+
return !!exec();
|
|
16
|
+
} catch (error) {
|
|
17
|
+
return true;
|
|
18
|
+
}
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
//
|
|
23
|
-
var
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
};
|
|
21
|
+
var functionBindNative = !fails(function () {
|
|
22
|
+
// eslint-disable-next-line es-x/no-function-prototype-bind -- safe
|
|
23
|
+
var test = function () {
|
|
24
|
+
/* empty */
|
|
25
|
+
}.bind(); // eslint-disable-next-line no-prototype-builtins -- safe
|
|
27
26
|
|
|
28
|
-
|
|
29
|
-
return function (
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
27
|
+
|
|
28
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
var FunctionPrototype = Function.prototype;
|
|
32
|
+
var bind = FunctionPrototype.bind;
|
|
33
|
+
var call = FunctionPrototype.call;
|
|
34
|
+
var uncurryThis = functionBindNative && bind.bind(call, call);
|
|
35
|
+
var functionUncurryThis = functionBindNative ? function (fn) {
|
|
36
|
+
return fn && uncurryThis(fn);
|
|
37
|
+
} : function (fn) {
|
|
38
|
+
return fn && function () {
|
|
39
|
+
return call.apply(fn, arguments);
|
|
37
40
|
};
|
|
38
41
|
};
|
|
39
42
|
|
|
40
|
-
var
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
//
|
|
46
|
-
|
|
43
|
+
var ceil = Math.ceil;
|
|
44
|
+
var floor = Math.floor; // `ToIntegerOrInfinity` abstract operation
|
|
45
|
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
46
|
+
|
|
47
|
+
var toIntegerOrInfinity = function (argument) {
|
|
48
|
+
var number = +argument; // eslint-disable-next-line no-self-compare -- safe
|
|
49
|
+
|
|
50
|
+
return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
|
|
47
51
|
};
|
|
48
52
|
|
|
49
53
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -67,21 +71,241 @@ var check = function (it) {
|
|
|
67
71
|
}; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
68
72
|
|
|
69
73
|
|
|
70
|
-
var global_1 = // eslint-disable-next-line no-
|
|
71
|
-
check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) ||
|
|
74
|
+
var global_1 = // eslint-disable-next-line es-x/no-global-this -- safe
|
|
75
|
+
check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || // eslint-disable-next-line no-restricted-globals -- safe
|
|
76
|
+
check(typeof self == 'object' && self) || check(typeof commonjsGlobal == 'object' && commonjsGlobal) || // eslint-disable-next-line no-new-func -- fallback
|
|
72
77
|
function () {
|
|
73
78
|
return this;
|
|
74
79
|
}() || Function('return this')();
|
|
75
80
|
|
|
76
|
-
var
|
|
81
|
+
var defineProperty = Object.defineProperty;
|
|
82
|
+
|
|
83
|
+
var setGlobal = function (key, value) {
|
|
77
84
|
try {
|
|
78
|
-
|
|
85
|
+
defineProperty(global_1, key, {
|
|
86
|
+
value: value,
|
|
87
|
+
configurable: true,
|
|
88
|
+
writable: true
|
|
89
|
+
});
|
|
79
90
|
} catch (error) {
|
|
80
|
-
|
|
91
|
+
global_1[key] = value;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return value;
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
var SHARED = '__core-js_shared__';
|
|
98
|
+
var store = global_1[SHARED] || setGlobal(SHARED, {});
|
|
99
|
+
var sharedStore = store;
|
|
100
|
+
|
|
101
|
+
var shared = createCommonjsModule(function (module) {
|
|
102
|
+
(module.exports = function (key, value) {
|
|
103
|
+
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
104
|
+
})('versions', []).push({
|
|
105
|
+
version: '3.22.1',
|
|
106
|
+
mode: 'global',
|
|
107
|
+
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
108
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.22.1/LICENSE',
|
|
109
|
+
source: 'https://github.com/zloirock/core-js'
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
var TypeError$1 = global_1.TypeError; // `RequireObjectCoercible` abstract operation
|
|
114
|
+
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
115
|
+
|
|
116
|
+
var requireObjectCoercible = function (it) {
|
|
117
|
+
if (it == undefined) throw TypeError$1("Can't call method on " + it);
|
|
118
|
+
return it;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
var Object$1 = global_1.Object; // `ToObject` abstract operation
|
|
122
|
+
// https://tc39.es/ecma262/#sec-toobject
|
|
123
|
+
|
|
124
|
+
var toObject = function (argument) {
|
|
125
|
+
return Object$1(requireObjectCoercible(argument));
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
var hasOwnProperty = functionUncurryThis({}.hasOwnProperty); // `HasOwnProperty` abstract operation
|
|
129
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
130
|
+
// eslint-disable-next-line es-x/no-object-hasown -- safe
|
|
131
|
+
|
|
132
|
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
133
|
+
return hasOwnProperty(toObject(it), key);
|
|
134
|
+
};
|
|
135
|
+
|
|
136
|
+
var id = 0;
|
|
137
|
+
var postfix = Math.random();
|
|
138
|
+
var toString = functionUncurryThis(1.0.toString);
|
|
139
|
+
|
|
140
|
+
var uid = function (key) {
|
|
141
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36);
|
|
142
|
+
};
|
|
143
|
+
|
|
144
|
+
// `IsCallable` abstract operation
|
|
145
|
+
// https://tc39.es/ecma262/#sec-iscallable
|
|
146
|
+
var isCallable = function (argument) {
|
|
147
|
+
return typeof argument == 'function';
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
var aFunction = function (argument) {
|
|
151
|
+
return isCallable(argument) ? argument : undefined;
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
var getBuiltIn = function (namespace, method) {
|
|
155
|
+
return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
|
159
|
+
|
|
160
|
+
var process = global_1.process;
|
|
161
|
+
var Deno = global_1.Deno;
|
|
162
|
+
var versions = process && process.versions || Deno && Deno.version;
|
|
163
|
+
var v8 = versions && versions.v8;
|
|
164
|
+
var match, version;
|
|
165
|
+
|
|
166
|
+
if (v8) {
|
|
167
|
+
match = v8.split('.'); // in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
168
|
+
// but their correct versions are not interesting for us
|
|
169
|
+
|
|
170
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
171
|
+
} // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
172
|
+
// so check `userAgent` even if `.v8` exists, but 0
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
if (!version && engineUserAgent) {
|
|
176
|
+
match = engineUserAgent.match(/Edge\/(\d+)/);
|
|
177
|
+
|
|
178
|
+
if (!match || match[1] >= 74) {
|
|
179
|
+
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
|
180
|
+
if (match) version = +match[1];
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
var engineV8Version = version;
|
|
185
|
+
|
|
186
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
187
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
|
|
188
|
+
|
|
189
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
190
|
+
var symbol = Symbol(); // Chrome 38 Symbol has incorrect toString conversion
|
|
191
|
+
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
192
|
+
|
|
193
|
+
return !String(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
194
|
+
!Symbol.sham && engineV8Version && engineV8Version < 41;
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
198
|
+
|
|
199
|
+
var useSymbolAsUid = nativeSymbol && !Symbol.sham && typeof Symbol.iterator == 'symbol';
|
|
200
|
+
|
|
201
|
+
var WellKnownSymbolsStore = shared('wks');
|
|
202
|
+
var Symbol$1 = global_1.Symbol;
|
|
203
|
+
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
204
|
+
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
205
|
+
|
|
206
|
+
var wellKnownSymbol = function (name) {
|
|
207
|
+
if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
208
|
+
var description = 'Symbol.' + name;
|
|
209
|
+
|
|
210
|
+
if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
|
|
211
|
+
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
212
|
+
} else if (useSymbolAsUid && symbolFor) {
|
|
213
|
+
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
214
|
+
} else {
|
|
215
|
+
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
return WellKnownSymbolsStore[name];
|
|
220
|
+
};
|
|
221
|
+
|
|
222
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
223
|
+
var test = {};
|
|
224
|
+
test[TO_STRING_TAG] = 'z';
|
|
225
|
+
var toStringTagSupport = String(test) === '[object z]';
|
|
226
|
+
|
|
227
|
+
var toString$1 = functionUncurryThis({}.toString);
|
|
228
|
+
var stringSlice = functionUncurryThis(''.slice);
|
|
229
|
+
|
|
230
|
+
var classofRaw = function (it) {
|
|
231
|
+
return stringSlice(toString$1(it), 8, -1);
|
|
232
|
+
};
|
|
233
|
+
|
|
234
|
+
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
|
235
|
+
var Object$2 = global_1.Object; // ES3 wrong here
|
|
236
|
+
|
|
237
|
+
var CORRECT_ARGUMENTS = classofRaw(function () {
|
|
238
|
+
return arguments;
|
|
239
|
+
}()) == 'Arguments'; // fallback for IE11 Script Access Denied error
|
|
240
|
+
|
|
241
|
+
var tryGet = function (it, key) {
|
|
242
|
+
try {
|
|
243
|
+
return it[key];
|
|
244
|
+
} catch (error) {
|
|
245
|
+
/* empty */
|
|
81
246
|
}
|
|
247
|
+
}; // getting tag from ES6+ `Object.prototype.toString`
|
|
248
|
+
|
|
249
|
+
|
|
250
|
+
var classof = toStringTagSupport ? classofRaw : function (it) {
|
|
251
|
+
var O, tag, result;
|
|
252
|
+
return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case
|
|
253
|
+
: typeof (tag = tryGet(O = Object$2(it), TO_STRING_TAG$1)) == 'string' ? tag // builtinTag case
|
|
254
|
+
: CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback
|
|
255
|
+
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
256
|
+
};
|
|
257
|
+
|
|
258
|
+
var String$1 = global_1.String;
|
|
259
|
+
|
|
260
|
+
var toString_1 = function (argument) {
|
|
261
|
+
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
262
|
+
return String$1(argument);
|
|
263
|
+
};
|
|
264
|
+
|
|
265
|
+
var charAt = functionUncurryThis(''.charAt);
|
|
266
|
+
var charCodeAt = functionUncurryThis(''.charCodeAt);
|
|
267
|
+
var stringSlice$1 = functionUncurryThis(''.slice);
|
|
268
|
+
|
|
269
|
+
var createMethod = function (CONVERT_TO_STRING) {
|
|
270
|
+
return function ($this, pos) {
|
|
271
|
+
var S = toString_1(requireObjectCoercible($this));
|
|
272
|
+
var position = toIntegerOrInfinity(pos);
|
|
273
|
+
var size = S.length;
|
|
274
|
+
var first, second;
|
|
275
|
+
if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;
|
|
276
|
+
first = charCodeAt(S, position);
|
|
277
|
+
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;
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
|
|
281
|
+
var stringMultibyte = {
|
|
282
|
+
// `String.prototype.codePointAt` method
|
|
283
|
+
// https://tc39.es/ecma262/#sec-string.prototype.codepointat
|
|
284
|
+
codeAt: createMethod(false),
|
|
285
|
+
// `String.prototype.at` method
|
|
286
|
+
// https://github.com/mathiasbynens/String.prototype.at
|
|
287
|
+
charAt: createMethod(true)
|
|
288
|
+
};
|
|
289
|
+
|
|
290
|
+
var functionToString = functionUncurryThis(Function.toString); // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
291
|
+
|
|
292
|
+
if (!isCallable(sharedStore.inspectSource)) {
|
|
293
|
+
sharedStore.inspectSource = function (it) {
|
|
294
|
+
return functionToString(it);
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
var inspectSource = sharedStore.inspectSource;
|
|
299
|
+
|
|
300
|
+
var WeakMap = global_1.WeakMap;
|
|
301
|
+
var nativeWeakMap = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap));
|
|
302
|
+
|
|
303
|
+
var isObject = function (it) {
|
|
304
|
+
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
82
305
|
};
|
|
83
306
|
|
|
84
307
|
var descriptors = !fails(function () {
|
|
308
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
85
309
|
return Object.defineProperty({}, 1, {
|
|
86
310
|
get: function () {
|
|
87
311
|
return 7;
|
|
@@ -89,10 +313,6 @@ var descriptors = !fails(function () {
|
|
|
89
313
|
})[1] != 7;
|
|
90
314
|
});
|
|
91
315
|
|
|
92
|
-
var isObject = function (it) {
|
|
93
|
-
return typeof it === 'object' ? it !== null : typeof it === 'function';
|
|
94
|
-
};
|
|
95
|
-
|
|
96
316
|
var document$1 = global_1.document; // typeof document.createElement is 'object' in old IE
|
|
97
317
|
|
|
98
318
|
var EXISTS = isObject(document$1) && isObject(document$1.createElement);
|
|
@@ -102,6 +322,7 @@ var documentCreateElement = function (it) {
|
|
|
102
322
|
};
|
|
103
323
|
|
|
104
324
|
var ie8DomDefine = !descriptors && !fails(function () {
|
|
325
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
105
326
|
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
|
106
327
|
get: function () {
|
|
107
328
|
return 7;
|
|
@@ -109,40 +330,142 @@ var ie8DomDefine = !descriptors && !fails(function () {
|
|
|
109
330
|
}).a != 7;
|
|
110
331
|
});
|
|
111
332
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
333
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
334
|
+
|
|
335
|
+
var v8PrototypeDefineBug = descriptors && fails(function () {
|
|
336
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
337
|
+
return Object.defineProperty(function () {
|
|
338
|
+
/* empty */
|
|
339
|
+
}, 'prototype', {
|
|
340
|
+
value: 42,
|
|
341
|
+
writable: false
|
|
342
|
+
}).prototype != 42;
|
|
343
|
+
});
|
|
344
|
+
|
|
345
|
+
var String$2 = global_1.String;
|
|
346
|
+
var TypeError$2 = global_1.TypeError; // `Assert: Type(argument) is Object`
|
|
347
|
+
|
|
348
|
+
var anObject = function (argument) {
|
|
349
|
+
if (isObject(argument)) return argument;
|
|
350
|
+
throw TypeError$2(String$2(argument) + ' is not an object');
|
|
351
|
+
};
|
|
352
|
+
|
|
353
|
+
var call$1 = Function.prototype.call;
|
|
354
|
+
var functionCall = functionBindNative ? call$1.bind(call$1) : function () {
|
|
355
|
+
return call$1.apply(call$1, arguments);
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
|
|
359
|
+
|
|
360
|
+
var Object$3 = global_1.Object;
|
|
361
|
+
var isSymbol = useSymbolAsUid ? function (it) {
|
|
362
|
+
return typeof it == 'symbol';
|
|
363
|
+
} : function (it) {
|
|
364
|
+
var $Symbol = getBuiltIn('Symbol');
|
|
365
|
+
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$3(it));
|
|
366
|
+
};
|
|
367
|
+
|
|
368
|
+
var String$3 = global_1.String;
|
|
369
|
+
|
|
370
|
+
var tryToString = function (argument) {
|
|
371
|
+
try {
|
|
372
|
+
return String$3(argument);
|
|
373
|
+
} catch (error) {
|
|
374
|
+
return 'Object';
|
|
115
375
|
}
|
|
376
|
+
};
|
|
116
377
|
|
|
117
|
-
|
|
378
|
+
var TypeError$3 = global_1.TypeError; // `Assert: IsCallable(argument) is true`
|
|
379
|
+
|
|
380
|
+
var aCallable = function (argument) {
|
|
381
|
+
if (isCallable(argument)) return argument;
|
|
382
|
+
throw TypeError$3(tryToString(argument) + ' is not a function');
|
|
383
|
+
};
|
|
384
|
+
|
|
385
|
+
// https://tc39.es/ecma262/#sec-getmethod
|
|
386
|
+
|
|
387
|
+
var getMethod = function (V, P) {
|
|
388
|
+
var func = V[P];
|
|
389
|
+
return func == null ? undefined : aCallable(func);
|
|
118
390
|
};
|
|
119
391
|
|
|
120
|
-
//
|
|
121
|
-
//
|
|
122
|
-
// and the second argument - flag - preferred type is a string
|
|
392
|
+
var TypeError$4 = global_1.TypeError; // `OrdinaryToPrimitive` abstract operation
|
|
393
|
+
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
123
394
|
|
|
124
|
-
var
|
|
125
|
-
if (!isObject(input)) return input;
|
|
395
|
+
var ordinaryToPrimitive = function (input, pref) {
|
|
126
396
|
var fn, val;
|
|
127
|
-
if (
|
|
128
|
-
if (
|
|
129
|
-
if (
|
|
130
|
-
throw TypeError("Can't convert object to primitive value");
|
|
397
|
+
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
398
|
+
if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
|
|
399
|
+
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
400
|
+
throw TypeError$4("Can't convert object to primitive value");
|
|
401
|
+
};
|
|
402
|
+
|
|
403
|
+
var TypeError$5 = global_1.TypeError;
|
|
404
|
+
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); // `ToPrimitive` abstract operation
|
|
405
|
+
// https://tc39.es/ecma262/#sec-toprimitive
|
|
406
|
+
|
|
407
|
+
var toPrimitive = function (input, pref) {
|
|
408
|
+
if (!isObject(input) || isSymbol(input)) return input;
|
|
409
|
+
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
410
|
+
var result;
|
|
411
|
+
|
|
412
|
+
if (exoticToPrim) {
|
|
413
|
+
if (pref === undefined) pref = 'default';
|
|
414
|
+
result = functionCall(exoticToPrim, input, pref);
|
|
415
|
+
if (!isObject(result) || isSymbol(result)) return result;
|
|
416
|
+
throw TypeError$5("Can't convert object to primitive value");
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
if (pref === undefined) pref = 'number';
|
|
420
|
+
return ordinaryToPrimitive(input, pref);
|
|
421
|
+
};
|
|
422
|
+
|
|
423
|
+
// https://tc39.es/ecma262/#sec-topropertykey
|
|
424
|
+
|
|
425
|
+
var toPropertyKey = function (argument) {
|
|
426
|
+
var key = toPrimitive(argument, 'string');
|
|
427
|
+
return isSymbol(key) ? key : key + '';
|
|
131
428
|
};
|
|
132
429
|
|
|
133
|
-
var
|
|
134
|
-
|
|
430
|
+
var TypeError$6 = global_1.TypeError; // eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
431
|
+
|
|
432
|
+
var $defineProperty = Object.defineProperty; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
433
|
+
|
|
434
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
435
|
+
var ENUMERABLE = 'enumerable';
|
|
436
|
+
var CONFIGURABLE = 'configurable';
|
|
437
|
+
var WRITABLE = 'writable'; // `Object.defineProperty` method
|
|
438
|
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
135
439
|
|
|
136
|
-
var f = descriptors ?
|
|
440
|
+
var f = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
|
|
137
441
|
anObject(O);
|
|
138
|
-
P =
|
|
442
|
+
P = toPropertyKey(P);
|
|
443
|
+
anObject(Attributes);
|
|
444
|
+
|
|
445
|
+
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
446
|
+
var current = $getOwnPropertyDescriptor(O, P);
|
|
447
|
+
|
|
448
|
+
if (current && current[WRITABLE]) {
|
|
449
|
+
O[P] = Attributes.value;
|
|
450
|
+
Attributes = {
|
|
451
|
+
configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
|
|
452
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
453
|
+
writable: false
|
|
454
|
+
};
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
return $defineProperty(O, P, Attributes);
|
|
459
|
+
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
460
|
+
anObject(O);
|
|
461
|
+
P = toPropertyKey(P);
|
|
139
462
|
anObject(Attributes);
|
|
140
463
|
if (ie8DomDefine) try {
|
|
141
|
-
return
|
|
464
|
+
return $defineProperty(O, P, Attributes);
|
|
142
465
|
} catch (error) {
|
|
143
466
|
/* empty */
|
|
144
467
|
}
|
|
145
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');
|
|
468
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError$6('Accessors not supported');
|
|
146
469
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
147
470
|
return O;
|
|
148
471
|
};
|
|
@@ -166,56 +489,6 @@ var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
|
|
166
489
|
return object;
|
|
167
490
|
};
|
|
168
491
|
|
|
169
|
-
var setGlobal = function (key, value) {
|
|
170
|
-
try {
|
|
171
|
-
createNonEnumerableProperty(global_1, key, value);
|
|
172
|
-
} catch (error) {
|
|
173
|
-
global_1[key] = value;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
return value;
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
var SHARED = '__core-js_shared__';
|
|
180
|
-
var store = global_1[SHARED] || setGlobal(SHARED, {});
|
|
181
|
-
var sharedStore = store;
|
|
182
|
-
|
|
183
|
-
var functionToString = Function.toString; // this helper broken in `3.4.1-3.4.4`, so we can't use `shared` helper
|
|
184
|
-
|
|
185
|
-
if (typeof sharedStore.inspectSource != 'function') {
|
|
186
|
-
sharedStore.inspectSource = function (it) {
|
|
187
|
-
return functionToString.call(it);
|
|
188
|
-
};
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
var inspectSource = sharedStore.inspectSource;
|
|
192
|
-
|
|
193
|
-
var WeakMap = global_1.WeakMap;
|
|
194
|
-
var nativeWeakMap = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));
|
|
195
|
-
|
|
196
|
-
var hasOwnProperty = {}.hasOwnProperty;
|
|
197
|
-
|
|
198
|
-
var has = function (it, key) {
|
|
199
|
-
return hasOwnProperty.call(it, key);
|
|
200
|
-
};
|
|
201
|
-
|
|
202
|
-
var shared = createCommonjsModule(function (module) {
|
|
203
|
-
(module.exports = function (key, value) {
|
|
204
|
-
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
205
|
-
})('versions', []).push({
|
|
206
|
-
version: '3.8.1',
|
|
207
|
-
mode: 'global',
|
|
208
|
-
copyright: '© 2020 Denis Pushkarev (zloirock.ru)'
|
|
209
|
-
});
|
|
210
|
-
});
|
|
211
|
-
|
|
212
|
-
var id = 0;
|
|
213
|
-
var postfix = Math.random();
|
|
214
|
-
|
|
215
|
-
var uid = function (key) {
|
|
216
|
-
return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);
|
|
217
|
-
};
|
|
218
|
-
|
|
219
492
|
var keys = shared('keys');
|
|
220
493
|
|
|
221
494
|
var sharedKey = function (key) {
|
|
@@ -224,11 +497,13 @@ var sharedKey = function (key) {
|
|
|
224
497
|
|
|
225
498
|
var hiddenKeys = {};
|
|
226
499
|
|
|
500
|
+
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
501
|
+
var TypeError$7 = global_1.TypeError;
|
|
227
502
|
var WeakMap$1 = global_1.WeakMap;
|
|
228
|
-
var set, get, has
|
|
503
|
+
var set, get, has;
|
|
229
504
|
|
|
230
505
|
var enforce = function (it) {
|
|
231
|
-
return has
|
|
506
|
+
return has(it) ? get(it) : set(it, {});
|
|
232
507
|
};
|
|
233
508
|
|
|
234
509
|
var getterFor = function (TYPE) {
|
|
@@ -236,113 +511,128 @@ var getterFor = function (TYPE) {
|
|
|
236
511
|
var state;
|
|
237
512
|
|
|
238
513
|
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
239
|
-
throw TypeError('Incompatible receiver, ' + TYPE + ' required');
|
|
514
|
+
throw TypeError$7('Incompatible receiver, ' + TYPE + ' required');
|
|
240
515
|
}
|
|
241
516
|
|
|
242
517
|
return state;
|
|
243
518
|
};
|
|
244
519
|
};
|
|
245
520
|
|
|
246
|
-
if (nativeWeakMap) {
|
|
521
|
+
if (nativeWeakMap || sharedStore.state) {
|
|
247
522
|
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$1());
|
|
248
|
-
var wmget = store$1.get;
|
|
249
|
-
var wmhas = store$1.has;
|
|
250
|
-
var wmset = store$1.set;
|
|
523
|
+
var wmget = functionUncurryThis(store$1.get);
|
|
524
|
+
var wmhas = functionUncurryThis(store$1.has);
|
|
525
|
+
var wmset = functionUncurryThis(store$1.set);
|
|
251
526
|
|
|
252
527
|
set = function (it, metadata) {
|
|
528
|
+
if (wmhas(store$1, it)) throw new TypeError$7(OBJECT_ALREADY_INITIALIZED);
|
|
253
529
|
metadata.facade = it;
|
|
254
|
-
wmset
|
|
530
|
+
wmset(store$1, it, metadata);
|
|
255
531
|
return metadata;
|
|
256
532
|
};
|
|
257
533
|
|
|
258
534
|
get = function (it) {
|
|
259
|
-
return wmget
|
|
535
|
+
return wmget(store$1, it) || {};
|
|
260
536
|
};
|
|
261
537
|
|
|
262
|
-
has
|
|
263
|
-
return wmhas
|
|
538
|
+
has = function (it) {
|
|
539
|
+
return wmhas(store$1, it);
|
|
264
540
|
};
|
|
265
541
|
} else {
|
|
266
542
|
var STATE = sharedKey('state');
|
|
267
543
|
hiddenKeys[STATE] = true;
|
|
268
544
|
|
|
269
545
|
set = function (it, metadata) {
|
|
546
|
+
if (hasOwnProperty_1(it, STATE)) throw new TypeError$7(OBJECT_ALREADY_INITIALIZED);
|
|
270
547
|
metadata.facade = it;
|
|
271
548
|
createNonEnumerableProperty(it, STATE, metadata);
|
|
272
549
|
return metadata;
|
|
273
550
|
};
|
|
274
551
|
|
|
275
552
|
get = function (it) {
|
|
276
|
-
return
|
|
553
|
+
return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
|
|
277
554
|
};
|
|
278
555
|
|
|
279
|
-
has
|
|
280
|
-
return
|
|
556
|
+
has = function (it) {
|
|
557
|
+
return hasOwnProperty_1(it, STATE);
|
|
281
558
|
};
|
|
282
559
|
}
|
|
283
560
|
|
|
284
561
|
var internalState = {
|
|
285
562
|
set: set,
|
|
286
563
|
get: get,
|
|
287
|
-
has: has
|
|
564
|
+
has: has,
|
|
288
565
|
enforce: enforce,
|
|
289
566
|
getterFor: getterFor
|
|
290
567
|
};
|
|
291
568
|
|
|
292
|
-
var
|
|
569
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
570
|
+
|
|
293
571
|
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug
|
|
294
572
|
|
|
295
|
-
var NASHORN_BUG = getOwnPropertyDescriptor &&
|
|
573
|
+
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({
|
|
296
574
|
1: 2
|
|
297
575
|
}, 1); // `Object.prototype.propertyIsEnumerable` method implementation
|
|
298
|
-
// https://tc39.
|
|
576
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
299
577
|
|
|
300
578
|
var f$1 = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
301
579
|
var descriptor = getOwnPropertyDescriptor(this, V);
|
|
302
580
|
return !!descriptor && descriptor.enumerable;
|
|
303
|
-
} :
|
|
581
|
+
} : $propertyIsEnumerable;
|
|
304
582
|
var objectPropertyIsEnumerable = {
|
|
305
583
|
f: f$1
|
|
306
584
|
};
|
|
307
585
|
|
|
308
|
-
var
|
|
309
|
-
|
|
310
|
-
var classofRaw = function (it) {
|
|
311
|
-
return toString.call(it).slice(8, -1);
|
|
312
|
-
};
|
|
313
|
-
|
|
314
|
-
var split = ''.split; // fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
586
|
+
var Object$4 = global_1.Object;
|
|
587
|
+
var split = functionUncurryThis(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
315
588
|
|
|
316
589
|
var indexedObject = fails(function () {
|
|
317
590
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
318
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
319
|
-
return !Object('z').propertyIsEnumerable(0);
|
|
591
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
592
|
+
return !Object$4('z').propertyIsEnumerable(0);
|
|
320
593
|
}) ? function (it) {
|
|
321
|
-
return classofRaw(it) == 'String' ? split
|
|
322
|
-
} : Object;
|
|
594
|
+
return classofRaw(it) == 'String' ? split(it, '') : Object$4(it);
|
|
595
|
+
} : Object$4;
|
|
323
596
|
|
|
324
597
|
var toIndexedObject = function (it) {
|
|
325
598
|
return indexedObject(requireObjectCoercible(it));
|
|
326
599
|
};
|
|
327
600
|
|
|
328
|
-
var
|
|
329
|
-
// https://tc39.
|
|
601
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method
|
|
602
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
330
603
|
|
|
331
|
-
var f$2 = descriptors ?
|
|
604
|
+
var f$2 = descriptors ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
332
605
|
O = toIndexedObject(O);
|
|
333
|
-
P =
|
|
606
|
+
P = toPropertyKey(P);
|
|
334
607
|
if (ie8DomDefine) try {
|
|
335
|
-
return
|
|
608
|
+
return $getOwnPropertyDescriptor$1(O, P);
|
|
336
609
|
} catch (error) {
|
|
337
610
|
/* empty */
|
|
338
611
|
}
|
|
339
|
-
if (
|
|
612
|
+
if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
|
|
340
613
|
};
|
|
341
614
|
var objectGetOwnPropertyDescriptor = {
|
|
342
615
|
f: f$2
|
|
343
616
|
};
|
|
344
617
|
|
|
618
|
+
var FunctionPrototype$1 = Function.prototype; // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
619
|
+
|
|
620
|
+
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
|
|
621
|
+
var EXISTS$1 = hasOwnProperty_1(FunctionPrototype$1, 'name'); // additional protection from minified / mangled / dropped function names
|
|
622
|
+
|
|
623
|
+
var PROPER = EXISTS$1 && function something() {
|
|
624
|
+
/* empty */
|
|
625
|
+
}.name === 'something';
|
|
626
|
+
|
|
627
|
+
var CONFIGURABLE$1 = EXISTS$1 && (!descriptors || descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable);
|
|
628
|
+
var functionName = {
|
|
629
|
+
EXISTS: EXISTS$1,
|
|
630
|
+
PROPER: PROPER,
|
|
631
|
+
CONFIGURABLE: CONFIGURABLE$1
|
|
632
|
+
};
|
|
633
|
+
|
|
345
634
|
var redefine = createCommonjsModule(function (module) {
|
|
635
|
+
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
346
636
|
var getInternalState = internalState.get;
|
|
347
637
|
var enforceInternalState = internalState.enforce;
|
|
348
638
|
var TEMPLATE = String(String).split('String');
|
|
@@ -350,17 +640,22 @@ var redefine = createCommonjsModule(function (module) {
|
|
|
350
640
|
var unsafe = options ? !!options.unsafe : false;
|
|
351
641
|
var simple = options ? !!options.enumerable : false;
|
|
352
642
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
643
|
+
var name = options && options.name !== undefined ? options.name : key;
|
|
353
644
|
var state;
|
|
354
645
|
|
|
355
|
-
if (
|
|
356
|
-
if (
|
|
357
|
-
|
|
646
|
+
if (isCallable(value)) {
|
|
647
|
+
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
648
|
+
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
if (!hasOwnProperty_1(value, 'name') || CONFIGURABLE_FUNCTION_NAME && value.name !== name) {
|
|
652
|
+
createNonEnumerableProperty(value, 'name', name);
|
|
358
653
|
}
|
|
359
654
|
|
|
360
655
|
state = enforceInternalState(value);
|
|
361
656
|
|
|
362
657
|
if (!state.source) {
|
|
363
|
-
state.source = TEMPLATE.join(typeof
|
|
658
|
+
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
364
659
|
}
|
|
365
660
|
}
|
|
366
661
|
|
|
@@ -375,47 +670,43 @@ var redefine = createCommonjsModule(function (module) {
|
|
|
375
670
|
|
|
376
671
|
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
|
|
377
672
|
})(Function.prototype, 'toString', function toString() {
|
|
378
|
-
return
|
|
673
|
+
return isCallable(this) && getInternalState(this).source || inspectSource(this);
|
|
379
674
|
});
|
|
380
675
|
});
|
|
381
676
|
|
|
382
|
-
var
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
};
|
|
677
|
+
var max = Math.max;
|
|
678
|
+
var min = Math.min; // Helper for a popular repeating case of the spec:
|
|
679
|
+
// Let integer be ? ToInteger(index).
|
|
680
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
387
681
|
|
|
388
|
-
var
|
|
389
|
-
|
|
682
|
+
var toAbsoluteIndex = function (index, length) {
|
|
683
|
+
var integer = toIntegerOrInfinity(index);
|
|
684
|
+
return integer < 0 ? max(integer + length, 0) : min(integer, length);
|
|
390
685
|
};
|
|
391
686
|
|
|
392
|
-
var min = Math.min; // `ToLength` abstract operation
|
|
393
|
-
// https://tc39.
|
|
687
|
+
var min$1 = Math.min; // `ToLength` abstract operation
|
|
688
|
+
// https://tc39.es/ecma262/#sec-tolength
|
|
394
689
|
|
|
395
690
|
var toLength = function (argument) {
|
|
396
|
-
return argument > 0 ? min(
|
|
691
|
+
return argument > 0 ? min$1(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
397
692
|
};
|
|
398
693
|
|
|
399
|
-
|
|
400
|
-
var min$1 = Math.min; // Helper for a popular repeating case of the spec:
|
|
401
|
-
// Let integer be ? ToInteger(index).
|
|
402
|
-
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
694
|
+
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
403
695
|
|
|
404
|
-
var
|
|
405
|
-
|
|
406
|
-
return integer < 0 ? max(integer + length, 0) : min$1(integer, length);
|
|
696
|
+
var lengthOfArrayLike = function (obj) {
|
|
697
|
+
return toLength(obj.length);
|
|
407
698
|
};
|
|
408
699
|
|
|
409
700
|
var createMethod$1 = function (IS_INCLUDES) {
|
|
410
701
|
return function ($this, el, fromIndex) {
|
|
411
702
|
var O = toIndexedObject($this);
|
|
412
|
-
var length =
|
|
703
|
+
var length = lengthOfArrayLike(O);
|
|
413
704
|
var index = toAbsoluteIndex(fromIndex, length);
|
|
414
705
|
var value; // Array#includes uses SameValueZero equality algorithm
|
|
415
|
-
// eslint-disable-next-line no-self-compare
|
|
706
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
416
707
|
|
|
417
708
|
if (IS_INCLUDES && el != el) while (length > index) {
|
|
418
|
-
value = O[index++]; // eslint-disable-next-line no-self-compare
|
|
709
|
+
value = O[index++]; // eslint-disable-next-line no-self-compare -- NaN check
|
|
419
710
|
|
|
420
711
|
if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not
|
|
421
712
|
} else for (; length > index; index++) {
|
|
@@ -427,14 +718,15 @@ var createMethod$1 = function (IS_INCLUDES) {
|
|
|
427
718
|
|
|
428
719
|
var arrayIncludes = {
|
|
429
720
|
// `Array.prototype.includes` method
|
|
430
|
-
// https://tc39.
|
|
721
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
431
722
|
includes: createMethod$1(true),
|
|
432
723
|
// `Array.prototype.indexOf` method
|
|
433
|
-
// https://tc39.
|
|
724
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
434
725
|
indexOf: createMethod$1(false)
|
|
435
726
|
};
|
|
436
727
|
|
|
437
728
|
var indexOf = arrayIncludes.indexOf;
|
|
729
|
+
var push = functionUncurryThis([].push);
|
|
438
730
|
|
|
439
731
|
var objectKeysInternal = function (object, names) {
|
|
440
732
|
var O = toIndexedObject(object);
|
|
@@ -442,11 +734,11 @@ var objectKeysInternal = function (object, names) {
|
|
|
442
734
|
var result = [];
|
|
443
735
|
var key;
|
|
444
736
|
|
|
445
|
-
for (key in O) !
|
|
737
|
+
for (key in O) !hasOwnProperty_1(hiddenKeys, key) && hasOwnProperty_1(O, key) && push(result, key); // Don't enum bug & hidden keys
|
|
446
738
|
|
|
447
739
|
|
|
448
|
-
while (names.length > i) if (
|
|
449
|
-
~indexOf(result, key) ||
|
|
740
|
+
while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
|
|
741
|
+
~indexOf(result, key) || push(result, key);
|
|
450
742
|
}
|
|
451
743
|
|
|
452
744
|
return result;
|
|
@@ -456,7 +748,8 @@ var objectKeysInternal = function (object, names) {
|
|
|
456
748
|
var enumBugKeys = ['constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf'];
|
|
457
749
|
|
|
458
750
|
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method
|
|
459
|
-
// https://tc39.
|
|
751
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
752
|
+
// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
|
|
460
753
|
|
|
461
754
|
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
462
755
|
return objectKeysInternal(O, hiddenKeys$1);
|
|
@@ -466,25 +759,31 @@ var objectGetOwnPropertyNames = {
|
|
|
466
759
|
f: f$3
|
|
467
760
|
};
|
|
468
761
|
|
|
762
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
|
|
469
763
|
var f$4 = Object.getOwnPropertySymbols;
|
|
470
764
|
var objectGetOwnPropertySymbols = {
|
|
471
765
|
f: f$4
|
|
472
766
|
};
|
|
473
767
|
|
|
768
|
+
var concat = functionUncurryThis([].concat); // all object keys, includes non-enumerable and symbols
|
|
769
|
+
|
|
474
770
|
var ownKeys = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
475
771
|
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
|
476
772
|
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
|
477
|
-
return getOwnPropertySymbols ?
|
|
773
|
+
return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
|
|
478
774
|
};
|
|
479
775
|
|
|
480
|
-
var copyConstructorProperties = function (target, source) {
|
|
776
|
+
var copyConstructorProperties = function (target, source, exceptions) {
|
|
481
777
|
var keys = ownKeys(source);
|
|
482
778
|
var defineProperty = objectDefineProperty.f;
|
|
483
779
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
484
780
|
|
|
485
781
|
for (var i = 0; i < keys.length; i++) {
|
|
486
782
|
var key = keys[i];
|
|
487
|
-
|
|
783
|
+
|
|
784
|
+
if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
|
|
785
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
786
|
+
}
|
|
488
787
|
}
|
|
489
788
|
};
|
|
490
789
|
|
|
@@ -492,7 +791,7 @@ var replacement = /#|\.prototype\./;
|
|
|
492
791
|
|
|
493
792
|
var isForced = function (feature, detection) {
|
|
494
793
|
var value = data[normalize(feature)];
|
|
495
|
-
return value == POLYFILL ? true : value == NATIVE ? false :
|
|
794
|
+
return value == POLYFILL ? true : value == NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection;
|
|
496
795
|
};
|
|
497
796
|
|
|
498
797
|
var normalize = isForced.normalize = function (string) {
|
|
@@ -518,6 +817,7 @@ var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
|
518
817
|
options.sham - add a flag to not completely full polyfills
|
|
519
818
|
options.enumerable - export as enumerable property
|
|
520
819
|
options.noTargetGet - prevent calling a getter on target
|
|
820
|
+
options.name - the .name of the function if it does not match the key
|
|
521
821
|
*/
|
|
522
822
|
|
|
523
823
|
var _export = function (options, source) {
|
|
@@ -545,7 +845,7 @@ var _export = function (options, source) {
|
|
|
545
845
|
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target
|
|
546
846
|
|
|
547
847
|
if (!FORCED && targetProperty !== undefined) {
|
|
548
|
-
if (typeof sourceProperty
|
|
848
|
+
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
549
849
|
copyConstructorProperties(sourceProperty, targetProperty);
|
|
550
850
|
} // add a flag to not completely full polyfills
|
|
551
851
|
|
|
@@ -559,116 +859,41 @@ var _export = function (options, source) {
|
|
|
559
859
|
}
|
|
560
860
|
};
|
|
561
861
|
|
|
562
|
-
// https://tc39.
|
|
563
|
-
|
|
564
|
-
var toObject = function (argument) {
|
|
565
|
-
return Object(requireObjectCoercible(argument));
|
|
566
|
-
};
|
|
567
|
-
|
|
568
|
-
var correctPrototypeGetter = !fails(function () {
|
|
569
|
-
function F() {
|
|
570
|
-
/* empty */
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
F.prototype.constructor = null;
|
|
574
|
-
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
575
|
-
});
|
|
576
|
-
|
|
577
|
-
var IE_PROTO = sharedKey('IE_PROTO');
|
|
578
|
-
var ObjectPrototype = Object.prototype; // `Object.getPrototypeOf` method
|
|
579
|
-
// https://tc39.github.io/ecma262/#sec-object.getprototypeof
|
|
580
|
-
|
|
581
|
-
var objectGetPrototypeOf = correctPrototypeGetter ? Object.getPrototypeOf : function (O) {
|
|
582
|
-
O = toObject(O);
|
|
583
|
-
if (has(O, IE_PROTO)) return O[IE_PROTO];
|
|
584
|
-
|
|
585
|
-
if (typeof O.constructor == 'function' && O instanceof O.constructor) {
|
|
586
|
-
return O.constructor.prototype;
|
|
587
|
-
}
|
|
588
|
-
|
|
589
|
-
return O instanceof Object ? ObjectPrototype : null;
|
|
590
|
-
};
|
|
591
|
-
|
|
592
|
-
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
593
|
-
// Chrome 38 Symbol has incorrect toString conversion
|
|
594
|
-
// eslint-disable-next-line no-undef
|
|
595
|
-
return !String(Symbol());
|
|
596
|
-
});
|
|
597
|
-
|
|
598
|
-
var useSymbolAsUid = nativeSymbol // eslint-disable-next-line no-undef
|
|
599
|
-
&& !Symbol.sham // eslint-disable-next-line no-undef
|
|
600
|
-
&& typeof Symbol.iterator == 'symbol';
|
|
601
|
-
|
|
602
|
-
var WellKnownSymbolsStore = shared('wks');
|
|
603
|
-
var Symbol$1 = global_1.Symbol;
|
|
604
|
-
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
605
|
-
|
|
606
|
-
var wellKnownSymbol = function (name) {
|
|
607
|
-
if (!has(WellKnownSymbolsStore, name)) {
|
|
608
|
-
if (nativeSymbol && has(Symbol$1, name)) WellKnownSymbolsStore[name] = Symbol$1[name];else WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);
|
|
609
|
-
}
|
|
610
|
-
|
|
611
|
-
return WellKnownSymbolsStore[name];
|
|
612
|
-
};
|
|
613
|
-
|
|
614
|
-
var ITERATOR = wellKnownSymbol('iterator');
|
|
615
|
-
var BUGGY_SAFARI_ITERATORS = false;
|
|
616
|
-
|
|
617
|
-
var returnThis = function () {
|
|
618
|
-
return this;
|
|
619
|
-
}; // `%IteratorPrototype%` object
|
|
620
|
-
// https://tc39.github.io/ecma262/#sec-%iteratorprototype%-object
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
624
|
-
|
|
625
|
-
if ([].keys) {
|
|
626
|
-
arrayIterator = [].keys(); // Safari 8 has buggy iterators w/o `next`
|
|
627
|
-
|
|
628
|
-
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;else {
|
|
629
|
-
PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));
|
|
630
|
-
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
|
|
634
|
-
if (IteratorPrototype == undefined) IteratorPrototype = {}; // 25.1.2.1.1 %IteratorPrototype%[@@iterator]()
|
|
635
|
-
|
|
636
|
-
if ( !has(IteratorPrototype, ITERATOR)) {
|
|
637
|
-
createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);
|
|
638
|
-
}
|
|
639
|
-
|
|
640
|
-
var iteratorsCore = {
|
|
641
|
-
IteratorPrototype: IteratorPrototype,
|
|
642
|
-
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
|
|
643
|
-
};
|
|
644
|
-
|
|
645
|
-
// https://tc39.github.io/ecma262/#sec-object.keys
|
|
862
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
863
|
+
// eslint-disable-next-line es-x/no-object-keys -- safe
|
|
646
864
|
|
|
647
865
|
var objectKeys = Object.keys || function keys(O) {
|
|
648
866
|
return objectKeysInternal(O, enumBugKeys);
|
|
649
867
|
};
|
|
650
868
|
|
|
651
|
-
// https://tc39.
|
|
869
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
870
|
+
// eslint-disable-next-line es-x/no-object-defineproperties -- safe
|
|
652
871
|
|
|
653
|
-
var
|
|
872
|
+
var f$5 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
654
873
|
anObject(O);
|
|
874
|
+
var props = toIndexedObject(Properties);
|
|
655
875
|
var keys = objectKeys(Properties);
|
|
656
876
|
var length = keys.length;
|
|
657
877
|
var index = 0;
|
|
658
878
|
var key;
|
|
659
879
|
|
|
660
|
-
while (length > index) objectDefineProperty.f(O, key = keys[index++],
|
|
880
|
+
while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
|
|
661
881
|
|
|
662
882
|
return O;
|
|
663
883
|
};
|
|
884
|
+
var objectDefineProperties = {
|
|
885
|
+
f: f$5
|
|
886
|
+
};
|
|
664
887
|
|
|
665
888
|
var html = getBuiltIn('document', 'documentElement');
|
|
666
889
|
|
|
890
|
+
/* global ActiveXObject -- old IE, WSH */
|
|
891
|
+
|
|
667
892
|
var GT = '>';
|
|
668
893
|
var LT = '<';
|
|
669
894
|
var PROTOTYPE = 'prototype';
|
|
670
895
|
var SCRIPT = 'script';
|
|
671
|
-
var IE_PROTO
|
|
896
|
+
var IE_PROTO = sharedKey('IE_PROTO');
|
|
672
897
|
|
|
673
898
|
var EmptyConstructor = function () {
|
|
674
899
|
/* empty */
|
|
@@ -714,13 +939,14 @@ var activeXDocument;
|
|
|
714
939
|
|
|
715
940
|
var NullProtoObject = function () {
|
|
716
941
|
try {
|
|
717
|
-
|
|
718
|
-
activeXDocument = document.domain && new ActiveXObject('htmlfile');
|
|
942
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
|
719
943
|
} catch (error) {
|
|
720
944
|
/* ignore */
|
|
721
945
|
}
|
|
722
946
|
|
|
723
|
-
NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument)
|
|
947
|
+
NullProtoObject = typeof document != 'undefined' ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
948
|
+
: NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
949
|
+
|
|
724
950
|
var length = enumBugKeys.length;
|
|
725
951
|
|
|
726
952
|
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
@@ -728,8 +954,9 @@ var NullProtoObject = function () {
|
|
|
728
954
|
return NullProtoObject();
|
|
729
955
|
};
|
|
730
956
|
|
|
731
|
-
hiddenKeys[IE_PROTO
|
|
732
|
-
// https://tc39.
|
|
957
|
+
hiddenKeys[IE_PROTO] = true; // `Object.create` method
|
|
958
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
959
|
+
// eslint-disable-next-line es-x/no-object-create -- safe
|
|
733
960
|
|
|
734
961
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
735
962
|
var result;
|
|
@@ -739,18 +966,82 @@ var objectCreate = Object.create || function create(O, Properties) {
|
|
|
739
966
|
result = new EmptyConstructor();
|
|
740
967
|
EmptyConstructor[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill
|
|
741
968
|
|
|
742
|
-
result[IE_PROTO
|
|
969
|
+
result[IE_PROTO] = O;
|
|
743
970
|
} else result = NullProtoObject();
|
|
744
971
|
|
|
745
|
-
return Properties === undefined ? result : objectDefineProperties(result, Properties);
|
|
972
|
+
return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
|
|
746
973
|
};
|
|
747
974
|
|
|
748
|
-
var
|
|
749
|
-
|
|
975
|
+
var correctPrototypeGetter = !fails(function () {
|
|
976
|
+
function F() {
|
|
977
|
+
/* empty */
|
|
978
|
+
}
|
|
979
|
+
|
|
980
|
+
F.prototype.constructor = null; // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
|
|
981
|
+
|
|
982
|
+
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
983
|
+
});
|
|
984
|
+
|
|
985
|
+
var IE_PROTO$1 = sharedKey('IE_PROTO');
|
|
986
|
+
var Object$5 = global_1.Object;
|
|
987
|
+
var ObjectPrototype = Object$5.prototype; // `Object.getPrototypeOf` method
|
|
988
|
+
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
989
|
+
|
|
990
|
+
var objectGetPrototypeOf = correctPrototypeGetter ? Object$5.getPrototypeOf : function (O) {
|
|
991
|
+
var object = toObject(O);
|
|
992
|
+
if (hasOwnProperty_1(object, IE_PROTO$1)) return object[IE_PROTO$1];
|
|
993
|
+
var constructor = object.constructor;
|
|
994
|
+
|
|
995
|
+
if (isCallable(constructor) && object instanceof constructor) {
|
|
996
|
+
return constructor.prototype;
|
|
997
|
+
}
|
|
998
|
+
|
|
999
|
+
return object instanceof Object$5 ? ObjectPrototype : null;
|
|
1000
|
+
};
|
|
750
1001
|
|
|
751
|
-
var
|
|
752
|
-
|
|
753
|
-
|
|
1002
|
+
var ITERATOR = wellKnownSymbol('iterator');
|
|
1003
|
+
var BUGGY_SAFARI_ITERATORS = false; // `%IteratorPrototype%` object
|
|
1004
|
+
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
1005
|
+
|
|
1006
|
+
var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
1007
|
+
/* eslint-disable es-x/no-array-prototype-keys -- safe */
|
|
1008
|
+
|
|
1009
|
+
if ([].keys) {
|
|
1010
|
+
arrayIterator = [].keys(); // Safari 8 has buggy iterators w/o `next`
|
|
1011
|
+
|
|
1012
|
+
if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;else {
|
|
1013
|
+
PrototypeOfArrayIteratorPrototype = objectGetPrototypeOf(objectGetPrototypeOf(arrayIterator));
|
|
1014
|
+
if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;
|
|
1015
|
+
}
|
|
1016
|
+
}
|
|
1017
|
+
|
|
1018
|
+
var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {
|
|
1019
|
+
var test = {}; // FF44- legacy iterators case
|
|
1020
|
+
|
|
1021
|
+
return IteratorPrototype[ITERATOR].call(test) !== test;
|
|
1022
|
+
});
|
|
1023
|
+
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {}; // `%IteratorPrototype%[@@iterator]()` method
|
|
1024
|
+
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
1025
|
+
|
|
1026
|
+
if (!isCallable(IteratorPrototype[ITERATOR])) {
|
|
1027
|
+
redefine(IteratorPrototype, ITERATOR, function () {
|
|
1028
|
+
return this;
|
|
1029
|
+
});
|
|
1030
|
+
}
|
|
1031
|
+
|
|
1032
|
+
var iteratorsCore = {
|
|
1033
|
+
IteratorPrototype: IteratorPrototype,
|
|
1034
|
+
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS
|
|
1035
|
+
};
|
|
1036
|
+
|
|
1037
|
+
var defineProperty$1 = objectDefineProperty.f;
|
|
1038
|
+
var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
|
|
1039
|
+
|
|
1040
|
+
var setToStringTag = function (target, TAG, STATIC) {
|
|
1041
|
+
if (target && !STATIC) target = target.prototype;
|
|
1042
|
+
|
|
1043
|
+
if (target && !hasOwnProperty_1(target, TO_STRING_TAG$2)) {
|
|
1044
|
+
defineProperty$1(target, TO_STRING_TAG$2, {
|
|
754
1045
|
configurable: true,
|
|
755
1046
|
value: TAG
|
|
756
1047
|
});
|
|
@@ -761,32 +1052,33 @@ var iterators = {};
|
|
|
761
1052
|
|
|
762
1053
|
var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
|
|
763
1054
|
|
|
764
|
-
var returnThis
|
|
1055
|
+
var returnThis = function () {
|
|
765
1056
|
return this;
|
|
766
1057
|
};
|
|
767
1058
|
|
|
768
|
-
var createIteratorConstructor = function (IteratorConstructor, NAME, next) {
|
|
1059
|
+
var createIteratorConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
|
769
1060
|
var TO_STRING_TAG = NAME + ' Iterator';
|
|
770
1061
|
IteratorConstructor.prototype = objectCreate(IteratorPrototype$1, {
|
|
771
|
-
next: createPropertyDescriptor(
|
|
1062
|
+
next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next)
|
|
772
1063
|
});
|
|
773
1064
|
setToStringTag(IteratorConstructor, TO_STRING_TAG, false);
|
|
774
|
-
iterators[TO_STRING_TAG] = returnThis
|
|
1065
|
+
iterators[TO_STRING_TAG] = returnThis;
|
|
775
1066
|
return IteratorConstructor;
|
|
776
1067
|
};
|
|
777
1068
|
|
|
778
|
-
var
|
|
779
|
-
|
|
780
|
-
throw TypeError("Can't set " + String(it) + ' as a prototype');
|
|
781
|
-
}
|
|
1069
|
+
var String$4 = global_1.String;
|
|
1070
|
+
var TypeError$8 = global_1.TypeError;
|
|
782
1071
|
|
|
783
|
-
|
|
1072
|
+
var aPossiblePrototype = function (argument) {
|
|
1073
|
+
if (typeof argument == 'object' || isCallable(argument)) return argument;
|
|
1074
|
+
throw TypeError$8("Can't set " + String$4(argument) + ' as a prototype');
|
|
784
1075
|
};
|
|
785
1076
|
|
|
786
|
-
|
|
1077
|
+
/* eslint-disable no-proto -- safe */
|
|
1078
|
+
// `Object.setPrototypeOf` method
|
|
1079
|
+
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
787
1080
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
788
|
-
|
|
789
|
-
/* eslint-disable no-proto */
|
|
1081
|
+
// eslint-disable-next-line es-x/no-object-setprototypeof -- safe
|
|
790
1082
|
|
|
791
1083
|
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
792
1084
|
var CORRECT_SETTER = false;
|
|
@@ -794,8 +1086,9 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
794
1086
|
var setter;
|
|
795
1087
|
|
|
796
1088
|
try {
|
|
797
|
-
|
|
798
|
-
setter.
|
|
1089
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
1090
|
+
setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
1091
|
+
setter(test, []);
|
|
799
1092
|
CORRECT_SETTER = test instanceof Array;
|
|
800
1093
|
} catch (error) {
|
|
801
1094
|
/* empty */
|
|
@@ -804,11 +1097,13 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
804
1097
|
return function setPrototypeOf(O, proto) {
|
|
805
1098
|
anObject(O);
|
|
806
1099
|
aPossiblePrototype(proto);
|
|
807
|
-
if (CORRECT_SETTER) setter
|
|
1100
|
+
if (CORRECT_SETTER) setter(O, proto);else O.__proto__ = proto;
|
|
808
1101
|
return O;
|
|
809
1102
|
};
|
|
810
1103
|
}() : undefined);
|
|
811
1104
|
|
|
1105
|
+
var PROPER_FUNCTION_NAME = functionName.PROPER;
|
|
1106
|
+
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
812
1107
|
var IteratorPrototype$2 = iteratorsCore.IteratorPrototype;
|
|
813
1108
|
var BUGGY_SAFARI_ITERATORS$1 = iteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
814
1109
|
var ITERATOR$1 = wellKnownSymbol('iterator');
|
|
@@ -816,7 +1111,7 @@ var KEYS = 'keys';
|
|
|
816
1111
|
var VALUES = 'values';
|
|
817
1112
|
var ENTRIES = 'entries';
|
|
818
1113
|
|
|
819
|
-
var returnThis$
|
|
1114
|
+
var returnThis$1 = function () {
|
|
820
1115
|
return this;
|
|
821
1116
|
};
|
|
822
1117
|
|
|
@@ -860,35 +1155,33 @@ var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
860
1155
|
if (anyNativeIterator) {
|
|
861
1156
|
CurrentIteratorPrototype = objectGetPrototypeOf(anyNativeIterator.call(new Iterable()));
|
|
862
1157
|
|
|
863
|
-
if (
|
|
1158
|
+
if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {
|
|
864
1159
|
if ( objectGetPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype$2) {
|
|
865
1160
|
if (objectSetPrototypeOf) {
|
|
866
1161
|
objectSetPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);
|
|
867
|
-
} else if (
|
|
868
|
-
|
|
1162
|
+
} else if (!isCallable(CurrentIteratorPrototype[ITERATOR$1])) {
|
|
1163
|
+
redefine(CurrentIteratorPrototype, ITERATOR$1, returnThis$1);
|
|
869
1164
|
}
|
|
870
1165
|
} // Set @@toStringTag to native iterators
|
|
871
1166
|
|
|
872
1167
|
|
|
873
1168
|
setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true);
|
|
874
1169
|
}
|
|
875
|
-
} // fix Array
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
879
|
-
INCORRECT_VALUES_NAME = true;
|
|
1170
|
+
} // fix Array.prototype.{ values, @@iterator }.name in V8 / FF
|
|
880
1171
|
|
|
881
|
-
defaultIterator = function values() {
|
|
882
|
-
return nativeIterator.call(this);
|
|
883
|
-
};
|
|
884
|
-
} // define iterator
|
|
885
1172
|
|
|
1173
|
+
if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {
|
|
1174
|
+
if ( CONFIGURABLE_FUNCTION_NAME) {
|
|
1175
|
+
createNonEnumerableProperty(IterablePrototype, 'name', VALUES);
|
|
1176
|
+
} else {
|
|
1177
|
+
INCORRECT_VALUES_NAME = true;
|
|
886
1178
|
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
1179
|
+
defaultIterator = function values() {
|
|
1180
|
+
return functionCall(nativeIterator, this);
|
|
1181
|
+
};
|
|
1182
|
+
}
|
|
1183
|
+
} // export additional methods
|
|
890
1184
|
|
|
891
|
-
iterators[NAME] = defaultIterator; // export additional methods
|
|
892
1185
|
|
|
893
1186
|
if (DEFAULT) {
|
|
894
1187
|
methods = {
|
|
@@ -905,24 +1198,32 @@ var defineIterator = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
905
1198
|
proto: true,
|
|
906
1199
|
forced: BUGGY_SAFARI_ITERATORS$1 || INCORRECT_VALUES_NAME
|
|
907
1200
|
}, methods);
|
|
1201
|
+
} // define iterator
|
|
1202
|
+
|
|
1203
|
+
|
|
1204
|
+
if ( IterablePrototype[ITERATOR$1] !== defaultIterator) {
|
|
1205
|
+
redefine(IterablePrototype, ITERATOR$1, defaultIterator, {
|
|
1206
|
+
name: DEFAULT
|
|
1207
|
+
});
|
|
908
1208
|
}
|
|
909
1209
|
|
|
1210
|
+
iterators[NAME] = defaultIterator;
|
|
910
1211
|
return methods;
|
|
911
1212
|
};
|
|
912
1213
|
|
|
913
|
-
var charAt = stringMultibyte.charAt;
|
|
1214
|
+
var charAt$1 = stringMultibyte.charAt;
|
|
914
1215
|
var STRING_ITERATOR = 'String Iterator';
|
|
915
1216
|
var setInternalState = internalState.set;
|
|
916
1217
|
var getInternalState = internalState.getterFor(STRING_ITERATOR); // `String.prototype[@@iterator]` method
|
|
917
|
-
// https://tc39.
|
|
1218
|
+
// https://tc39.es/ecma262/#sec-string.prototype-@@iterator
|
|
918
1219
|
|
|
919
1220
|
defineIterator(String, 'String', function (iterated) {
|
|
920
1221
|
setInternalState(this, {
|
|
921
1222
|
type: STRING_ITERATOR,
|
|
922
|
-
string:
|
|
1223
|
+
string: toString_1(iterated),
|
|
923
1224
|
index: 0
|
|
924
1225
|
}); // `%StringIteratorPrototype%.next` method
|
|
925
|
-
// https://tc39.
|
|
1226
|
+
// https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
|
|
926
1227
|
}, function next() {
|
|
927
1228
|
var state = getInternalState(this);
|
|
928
1229
|
var string = state.string;
|
|
@@ -932,7 +1233,7 @@ defineIterator(String, 'String', function (iterated) {
|
|
|
932
1233
|
value: undefined,
|
|
933
1234
|
done: true
|
|
934
1235
|
};
|
|
935
|
-
point = charAt(string, index);
|
|
1236
|
+
point = charAt$1(string, index);
|
|
936
1237
|
state.index += point.length;
|
|
937
1238
|
return {
|
|
938
1239
|
value: point,
|
|
@@ -940,61 +1241,46 @@ defineIterator(String, 'String', function (iterated) {
|
|
|
940
1241
|
};
|
|
941
1242
|
});
|
|
942
1243
|
|
|
943
|
-
var
|
|
944
|
-
if (typeof it != 'function') {
|
|
945
|
-
throw TypeError(String(it) + ' is not a function');
|
|
946
|
-
}
|
|
1244
|
+
var bind$1 = functionUncurryThis(functionUncurryThis.bind); // optional / simple context binding
|
|
947
1245
|
|
|
948
|
-
|
|
1246
|
+
var functionBindContext = function (fn, that) {
|
|
1247
|
+
aCallable(fn);
|
|
1248
|
+
return that === undefined ? fn : functionBindNative ? bind$1(fn, that) : function
|
|
1249
|
+
/* ...args */
|
|
1250
|
+
() {
|
|
1251
|
+
return fn.apply(that, arguments);
|
|
1252
|
+
};
|
|
949
1253
|
};
|
|
950
1254
|
|
|
951
|
-
var
|
|
952
|
-
|
|
953
|
-
|
|
1255
|
+
var iteratorClose = function (iterator, kind, value) {
|
|
1256
|
+
var innerResult, innerError;
|
|
1257
|
+
anObject(iterator);
|
|
954
1258
|
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
return function () {
|
|
958
|
-
return fn.call(that);
|
|
959
|
-
};
|
|
960
|
-
|
|
961
|
-
case 1:
|
|
962
|
-
return function (a) {
|
|
963
|
-
return fn.call(that, a);
|
|
964
|
-
};
|
|
1259
|
+
try {
|
|
1260
|
+
innerResult = getMethod(iterator, 'return');
|
|
965
1261
|
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
1262
|
+
if (!innerResult) {
|
|
1263
|
+
if (kind === 'throw') throw value;
|
|
1264
|
+
return value;
|
|
1265
|
+
}
|
|
970
1266
|
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
1267
|
+
innerResult = functionCall(innerResult, iterator);
|
|
1268
|
+
} catch (error) {
|
|
1269
|
+
innerError = true;
|
|
1270
|
+
innerResult = error;
|
|
975
1271
|
}
|
|
976
1272
|
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
};
|
|
982
|
-
};
|
|
983
|
-
|
|
984
|
-
var iteratorClose = function (iterator) {
|
|
985
|
-
var returnMethod = iterator['return'];
|
|
986
|
-
|
|
987
|
-
if (returnMethod !== undefined) {
|
|
988
|
-
return anObject(returnMethod.call(iterator)).value;
|
|
989
|
-
}
|
|
1273
|
+
if (kind === 'throw') throw value;
|
|
1274
|
+
if (innerError) throw innerResult;
|
|
1275
|
+
anObject(innerResult);
|
|
1276
|
+
return value;
|
|
990
1277
|
};
|
|
991
1278
|
|
|
992
1279
|
var callWithSafeIterationClosing = function (iterator, fn, value, ENTRIES) {
|
|
993
1280
|
try {
|
|
994
|
-
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
|
|
1281
|
+
return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value);
|
|
995
1282
|
} catch (error) {
|
|
996
|
-
iteratorClose(iterator);
|
|
997
|
-
throw error;
|
|
1283
|
+
iteratorClose(iterator, 'throw', error);
|
|
998
1284
|
}
|
|
999
1285
|
};
|
|
1000
1286
|
|
|
@@ -1005,73 +1291,104 @@ var isArrayIteratorMethod = function (it) {
|
|
|
1005
1291
|
return it !== undefined && (iterators.Array === it || ArrayPrototype[ITERATOR$2] === it);
|
|
1006
1292
|
};
|
|
1007
1293
|
|
|
1008
|
-
var
|
|
1009
|
-
|
|
1010
|
-
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));else object[propertyKey] = value;
|
|
1294
|
+
var noop = function () {
|
|
1295
|
+
/* empty */
|
|
1011
1296
|
};
|
|
1012
1297
|
|
|
1013
|
-
var
|
|
1014
|
-
var
|
|
1015
|
-
|
|
1016
|
-
var
|
|
1298
|
+
var empty = [];
|
|
1299
|
+
var construct = getBuiltIn('Reflect', 'construct');
|
|
1300
|
+
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
1301
|
+
var exec = functionUncurryThis(constructorRegExp.exec);
|
|
1302
|
+
var INCORRECT_TO_STRING = !constructorRegExp.exec(noop);
|
|
1017
1303
|
|
|
1018
|
-
var
|
|
1304
|
+
var isConstructorModern = function isConstructor(argument) {
|
|
1305
|
+
if (!isCallable(argument)) return false;
|
|
1019
1306
|
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1307
|
+
try {
|
|
1308
|
+
construct(noop, empty, argument);
|
|
1309
|
+
return true;
|
|
1310
|
+
} catch (error) {
|
|
1311
|
+
return false;
|
|
1312
|
+
}
|
|
1313
|
+
};
|
|
1314
|
+
|
|
1315
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
|
1316
|
+
if (!isCallable(argument)) return false;
|
|
1317
|
+
|
|
1318
|
+
switch (classof(argument)) {
|
|
1319
|
+
case 'AsyncFunction':
|
|
1320
|
+
case 'GeneratorFunction':
|
|
1321
|
+
case 'AsyncGeneratorFunction':
|
|
1322
|
+
return false;
|
|
1323
|
+
}
|
|
1023
1324
|
|
|
1024
|
-
var tryGet = function (it, key) {
|
|
1025
1325
|
try {
|
|
1026
|
-
|
|
1326
|
+
// we can't check .prototype since constructors produced by .bind haven't it
|
|
1327
|
+
// `Function#toString` throws on some built-it function in some legacy engines
|
|
1328
|
+
// (for example, `DOMQuad` and similar in FF41-)
|
|
1329
|
+
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
|
|
1027
1330
|
} catch (error) {
|
|
1028
|
-
|
|
1331
|
+
return true;
|
|
1029
1332
|
}
|
|
1030
|
-
};
|
|
1333
|
+
};
|
|
1031
1334
|
|
|
1335
|
+
isConstructorLegacy.sham = true; // `IsConstructor` abstract operation
|
|
1336
|
+
// https://tc39.es/ecma262/#sec-isconstructor
|
|
1032
1337
|
|
|
1033
|
-
var
|
|
1034
|
-
var
|
|
1035
|
-
return
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1338
|
+
var isConstructor = !construct || fails(function () {
|
|
1339
|
+
var called;
|
|
1340
|
+
return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function () {
|
|
1341
|
+
called = true;
|
|
1342
|
+
}) || called;
|
|
1343
|
+
}) ? isConstructorLegacy : isConstructorModern;
|
|
1344
|
+
|
|
1345
|
+
var createProperty = function (object, key, value) {
|
|
1346
|
+
var propertyKey = toPropertyKey(key);
|
|
1347
|
+
if (propertyKey in object) objectDefineProperty.f(object, propertyKey, createPropertyDescriptor(0, value));else object[propertyKey] = value;
|
|
1039
1348
|
};
|
|
1040
1349
|
|
|
1041
1350
|
var ITERATOR$3 = wellKnownSymbol('iterator');
|
|
1042
1351
|
|
|
1043
1352
|
var getIteratorMethod = function (it) {
|
|
1044
|
-
if (it != undefined) return it
|
|
1353
|
+
if (it != undefined) return getMethod(it, ITERATOR$3) || getMethod(it, '@@iterator') || iterators[classof(it)];
|
|
1045
1354
|
};
|
|
1046
1355
|
|
|
1047
|
-
|
|
1356
|
+
var TypeError$9 = global_1.TypeError;
|
|
1048
1357
|
|
|
1358
|
+
var getIterator = function (argument, usingIterator) {
|
|
1359
|
+
var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator;
|
|
1360
|
+
if (aCallable(iteratorMethod)) return anObject(functionCall(iteratorMethod, argument));
|
|
1361
|
+
throw TypeError$9(tryToString(argument) + ' is not iterable');
|
|
1362
|
+
};
|
|
1363
|
+
|
|
1364
|
+
var Array$1 = global_1.Array; // `Array.from` method implementation
|
|
1365
|
+
// https://tc39.es/ecma262/#sec-array.from
|
|
1049
1366
|
|
|
1050
1367
|
var arrayFrom = function from(arrayLike
|
|
1051
1368
|
/* , mapfn = undefined, thisArg = undefined */
|
|
1052
1369
|
) {
|
|
1053
1370
|
var O = toObject(arrayLike);
|
|
1054
|
-
var
|
|
1371
|
+
var IS_CONSTRUCTOR = isConstructor(this);
|
|
1055
1372
|
var argumentsLength = arguments.length;
|
|
1056
1373
|
var mapfn = argumentsLength > 1 ? arguments[1] : undefined;
|
|
1057
1374
|
var mapping = mapfn !== undefined;
|
|
1375
|
+
if (mapping) mapfn = functionBindContext(mapfn, argumentsLength > 2 ? arguments[2] : undefined);
|
|
1058
1376
|
var iteratorMethod = getIteratorMethod(O);
|
|
1059
1377
|
var index = 0;
|
|
1060
|
-
var length, result, step, iterator, next, value;
|
|
1061
|
-
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
|
|
1378
|
+
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
|
|
1062
1379
|
|
|
1063
|
-
if (iteratorMethod
|
|
1064
|
-
iterator =
|
|
1380
|
+
if (iteratorMethod && !(this == Array$1 && isArrayIteratorMethod(iteratorMethod))) {
|
|
1381
|
+
iterator = getIterator(O, iteratorMethod);
|
|
1065
1382
|
next = iterator.next;
|
|
1066
|
-
result = new
|
|
1383
|
+
result = IS_CONSTRUCTOR ? new this() : [];
|
|
1067
1384
|
|
|
1068
|
-
for (; !(step = next
|
|
1385
|
+
for (; !(step = functionCall(next, iterator)).done; index++) {
|
|
1069
1386
|
value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value;
|
|
1070
1387
|
createProperty(result, index, value);
|
|
1071
1388
|
}
|
|
1072
1389
|
} else {
|
|
1073
|
-
length =
|
|
1074
|
-
result = new
|
|
1390
|
+
length = lengthOfArrayLike(O);
|
|
1391
|
+
result = IS_CONSTRUCTOR ? new this(length) : Array$1(length);
|
|
1075
1392
|
|
|
1076
1393
|
for (; length > index; index++) {
|
|
1077
1394
|
value = mapping ? mapfn(O[index], index) : O[index];
|
|
@@ -1101,7 +1418,7 @@ try {
|
|
|
1101
1418
|
|
|
1102
1419
|
iteratorWithReturn[ITERATOR$4] = function () {
|
|
1103
1420
|
return this;
|
|
1104
|
-
}; // eslint-disable-next-line no-throw-literal
|
|
1421
|
+
}; // eslint-disable-next-line es-x/no-array-from, no-throw-literal -- required for testing
|
|
1105
1422
|
|
|
1106
1423
|
|
|
1107
1424
|
Array.from(iteratorWithReturn, function () {
|
|
@@ -1137,9 +1454,10 @@ var checkCorrectnessOfIteration = function (exec, SKIP_CLOSING) {
|
|
|
1137
1454
|
};
|
|
1138
1455
|
|
|
1139
1456
|
var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) {
|
|
1457
|
+
// eslint-disable-next-line es-x/no-array-from -- required for testing
|
|
1140
1458
|
Array.from(iterable);
|
|
1141
1459
|
}); // `Array.from` method
|
|
1142
|
-
// https://tc39.
|
|
1460
|
+
// https://tc39.es/ecma262/#sec-array.from
|
|
1143
1461
|
|
|
1144
1462
|
_export({
|
|
1145
1463
|
target: 'Array',
|
|
@@ -1734,16 +2052,34 @@ var fetchFromApi = function fetchFromApi(url, data, headers) {
|
|
|
1734
2052
|
}
|
|
1735
2053
|
};
|
|
1736
2054
|
|
|
2055
|
+
var isPlanEligible = function isPlanEligible(plan, configPlan) {
|
|
2056
|
+
if (!plan.eligible) {
|
|
2057
|
+
return false;
|
|
2058
|
+
}
|
|
2059
|
+
|
|
2060
|
+
return configPlan ? plan.purchase_amount >= (configPlan == null ? void 0 : configPlan.minAmount) && plan.purchase_amount <= (configPlan == null ? void 0 : configPlan.maxAmount) : false;
|
|
2061
|
+
};
|
|
2062
|
+
|
|
2063
|
+
var getPaymentPlanBoundaries = function getPaymentPlanBoundaries(plan, configPlan) {
|
|
2064
|
+
var _plan$constraints;
|
|
2065
|
+
|
|
2066
|
+
// When the plan is not eligible, the purchase amount constraints is given from the merchant config
|
|
2067
|
+
var purchaseAmountConstraints = (_plan$constraints = plan.constraints) == null ? void 0 : _plan$constraints.purchase_amount;
|
|
2068
|
+
|
|
2069
|
+
if (purchaseAmountConstraints && configPlan) {
|
|
2070
|
+
return {
|
|
2071
|
+
minAmount: Math.max(configPlan.minAmount, purchaseAmountConstraints == null ? void 0 : purchaseAmountConstraints.minimum),
|
|
2072
|
+
maxAmount: Math.min(configPlan.maxAmount, purchaseAmountConstraints == null ? void 0 : purchaseAmountConstraints.maximum)
|
|
2073
|
+
};
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
return configPlan != null ? configPlan : {};
|
|
2077
|
+
};
|
|
2078
|
+
|
|
1737
2079
|
var filterELigibility = function filterELigibility(eligibilities, configPlans) {
|
|
1738
2080
|
// Remove p1x
|
|
1739
2081
|
var filteredEligibilityPlans = eligibilities.filter(function (plan) {
|
|
1740
2082
|
return !(plan.installments_count === 1 && plan.deferred_days === 0 && plan.deferred_months === 0);
|
|
1741
|
-
}) // Keeps the plans that have a payment_plan property
|
|
1742
|
-
.filter(function (plan) {
|
|
1743
|
-
return plan.payment_plan;
|
|
1744
|
-
}) // Remove plans that have a reasons property
|
|
1745
|
-
.filter(function (plan) {
|
|
1746
|
-
return !plan.reasons;
|
|
1747
2083
|
}); // If no configPlans was provided, return eligibility response
|
|
1748
2084
|
|
|
1749
2085
|
if (!configPlans) {
|
|
@@ -1759,10 +2095,8 @@ var filterELigibility = function filterELigibility(eligibilities, configPlans) {
|
|
|
1759
2095
|
return plan.installments_count === configPlan.installmentsCount && eligibilityDeferredDays === configPlanDeferredDays;
|
|
1760
2096
|
});
|
|
1761
2097
|
return _extends({}, plan, {
|
|
1762
|
-
eligible:
|
|
1763
|
-
|
|
1764
|
-
maxAmount: relatedConfigPlan == null ? void 0 : relatedConfigPlan.maxAmount
|
|
1765
|
-
});
|
|
2098
|
+
eligible: isPlanEligible(plan, relatedConfigPlan)
|
|
2099
|
+
}, getPaymentPlanBoundaries(plan, relatedConfigPlan));
|
|
1766
2100
|
});
|
|
1767
2101
|
};
|
|
1768
2102
|
|
|
@@ -1836,6 +2170,31 @@ function CrossIcon(_ref) {
|
|
|
1836
2170
|
}));
|
|
1837
2171
|
}
|
|
1838
2172
|
|
|
2173
|
+
/**
|
|
2174
|
+
* Prefix classes to avoid name collisions.
|
|
2175
|
+
*/
|
|
2176
|
+
var prefix = 'alma-eligibility-modal';
|
|
2177
|
+
/**
|
|
2178
|
+
* Class names for the **eligibility modale** widget.
|
|
2179
|
+
* Those classes are intended to be used by the **merchant developer**.
|
|
2180
|
+
*/
|
|
2181
|
+
|
|
2182
|
+
var STATIC_CUSTOMISATION_CLASSES = {
|
|
2183
|
+
leftSide: prefix + '-left-side',
|
|
2184
|
+
rightSide: prefix + '-right-side',
|
|
2185
|
+
title: prefix + '-title',
|
|
2186
|
+
info: prefix + '-info',
|
|
2187
|
+
infoMessage: prefix + '-info-message',
|
|
2188
|
+
eligibilityOptions: prefix + '-eligibility-options',
|
|
2189
|
+
activeOption: prefix + '-active-option',
|
|
2190
|
+
closeButton: prefix + '-close-button',
|
|
2191
|
+
scheduleDetails: prefix + '-schedule-details',
|
|
2192
|
+
scheduleTotal: prefix + '-schedule-total',
|
|
2193
|
+
scheduleCredit: prefix + '-schedule-credit'
|
|
2194
|
+
};
|
|
2195
|
+
|
|
2196
|
+
var _excluded = ["children", "isOpen", "onClose", "className", "contentClassName", "scrollable"];
|
|
2197
|
+
|
|
1839
2198
|
var ControlledModal = function ControlledModal(_ref) {
|
|
1840
2199
|
var _cx;
|
|
1841
2200
|
|
|
@@ -1846,7 +2205,7 @@ var ControlledModal = function ControlledModal(_ref) {
|
|
|
1846
2205
|
contentClassName = _ref.contentClassName,
|
|
1847
2206
|
_ref$scrollable = _ref.scrollable,
|
|
1848
2207
|
scrollable = _ref$scrollable === void 0 ? false : _ref$scrollable,
|
|
1849
|
-
props = _objectWithoutPropertiesLoose(_ref,
|
|
2208
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
1850
2209
|
|
|
1851
2210
|
Modal.setAppElement('body');
|
|
1852
2211
|
return /*#__PURE__*/React__default.createElement(Modal, Object.assign({
|
|
@@ -1866,7 +2225,7 @@ var ControlledModal = function ControlledModal(_ref) {
|
|
|
1866
2225
|
className: s$1.header
|
|
1867
2226
|
}, /*#__PURE__*/React__default.createElement("button", {
|
|
1868
2227
|
onClick: onClose,
|
|
1869
|
-
className: s$1.closeButton,
|
|
2228
|
+
className: cx(s$1.closeButton, STATIC_CUSTOMISATION_CLASSES.closeButton),
|
|
1870
2229
|
"data-testid": "modal-close-button"
|
|
1871
2230
|
}, /*#__PURE__*/React__default.createElement(CrossIcon, null))), /*#__PURE__*/React__default.createElement("div", {
|
|
1872
2231
|
className: cx(s$1.content, contentClassName, (_cx = {}, _cx[s$1.contentScrollable] = scrollable, _cx))
|
|
@@ -1891,6 +2250,20 @@ var paymentPlanShorthandName = function paymentPlanShorthandName(payment) {
|
|
|
1891
2250
|
return installmentsCount + "x";
|
|
1892
2251
|
}
|
|
1893
2252
|
};
|
|
2253
|
+
|
|
2254
|
+
var withNoFee = function withNoFee(payment) {
|
|
2255
|
+
var _payment$payment_plan;
|
|
2256
|
+
|
|
2257
|
+
if ((_payment$payment_plan = payment.payment_plan) != null && _payment$payment_plan.every(function (plan) {
|
|
2258
|
+
return plan.customer_fee === 0 && plan.customer_interest === 0;
|
|
2259
|
+
})) {
|
|
2260
|
+
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, ' ', /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
2261
|
+
id: "payment-plan-strings.no-fee",
|
|
2262
|
+
defaultMessage: '(sans frais)'
|
|
2263
|
+
}));
|
|
2264
|
+
}
|
|
2265
|
+
};
|
|
2266
|
+
|
|
1894
2267
|
var paymentPlanInfoText = function paymentPlanInfoText(payment) {
|
|
1895
2268
|
var deferred_days = payment.deferred_days,
|
|
1896
2269
|
deferred_months = payment.deferred_months,
|
|
@@ -1900,20 +2273,10 @@ var paymentPlanInfoText = function paymentPlanInfoText(payment) {
|
|
|
1900
2273
|
_payment$minAmount = payment.minAmount,
|
|
1901
2274
|
minAmount = _payment$minAmount === void 0 ? 0 : _payment$minAmount,
|
|
1902
2275
|
_payment$maxAmount = payment.maxAmount,
|
|
1903
|
-
maxAmount = _payment$maxAmount === void 0 ? 0 : _payment$maxAmount
|
|
2276
|
+
maxAmount = _payment$maxAmount === void 0 ? 0 : _payment$maxAmount,
|
|
2277
|
+
payment_plan = payment.payment_plan;
|
|
1904
2278
|
var deferredDaysCount = deferred_days + deferred_months * 30;
|
|
1905
2279
|
|
|
1906
|
-
var withNoFee = function withNoFee() {
|
|
1907
|
-
if (payment.payment_plan.every(function (plan) {
|
|
1908
|
-
return plan.customer_fee === 0 && plan.customer_interest === 0;
|
|
1909
|
-
})) {
|
|
1910
|
-
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, ' ', /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
1911
|
-
id: "payment-plan-strings.no-fee",
|
|
1912
|
-
defaultMessage: '(sans frais)'
|
|
1913
|
-
}));
|
|
1914
|
-
}
|
|
1915
|
-
};
|
|
1916
|
-
|
|
1917
2280
|
if (!eligible) {
|
|
1918
2281
|
return purchaseAmount > maxAmount ? /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
1919
2282
|
id: "payment-plan-strings.ineligible-greater-than-max",
|
|
@@ -1936,27 +2299,32 @@ var paymentPlanInfoText = function paymentPlanInfoText(payment) {
|
|
|
1936
2299
|
})
|
|
1937
2300
|
}
|
|
1938
2301
|
});
|
|
2302
|
+
} else if (!payment_plan) {
|
|
2303
|
+
/* This error should never happen. We added this condition to avoid a typescript warning on
|
|
2304
|
+
payment_plan possibly undefined. As far as we know, it only happens when the plan is not
|
|
2305
|
+
eligible, which is checked above. */
|
|
2306
|
+
throw Error("No payment plan provided for payment in " + installmentsCount + " installments. Please contact us if you see this error.");
|
|
1939
2307
|
} else if (deferredDaysCount !== 0 && installmentsCount === 1) {
|
|
1940
2308
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
1941
2309
|
id: "payment-plan-strings.deferred",
|
|
1942
2310
|
defaultMessage: "{totalAmount} \xE0 payer le {dueDate}",
|
|
1943
2311
|
values: {
|
|
1944
2312
|
totalAmount: /*#__PURE__*/React__default.createElement(reactIntl.FormattedNumber, {
|
|
1945
|
-
value: priceFromCents(
|
|
2313
|
+
value: priceFromCents(payment_plan[0].total_amount),
|
|
1946
2314
|
style: "currency",
|
|
1947
2315
|
currency: "EUR"
|
|
1948
2316
|
}),
|
|
1949
2317
|
dueDate: /*#__PURE__*/React__default.createElement(reactIntl.FormattedDate, {
|
|
1950
|
-
value: dateFns.secondsToMilliseconds(
|
|
2318
|
+
value: dateFns.secondsToMilliseconds(payment_plan[0].due_date),
|
|
1951
2319
|
day: "numeric",
|
|
1952
2320
|
month: "long",
|
|
1953
2321
|
year: "numeric"
|
|
1954
2322
|
})
|
|
1955
2323
|
}
|
|
1956
|
-
}), withNoFee());
|
|
2324
|
+
}), withNoFee(payment));
|
|
1957
2325
|
} else if (installmentsCount > 0) {
|
|
1958
|
-
var areInstallmentsOfSameAmount =
|
|
1959
|
-
return index === 0 || installment.total_amount ===
|
|
2326
|
+
var areInstallmentsOfSameAmount = payment_plan == null ? void 0 : payment_plan.every(function (installment, index) {
|
|
2327
|
+
return index === 0 || installment.total_amount === payment_plan[0].total_amount;
|
|
1960
2328
|
});
|
|
1961
2329
|
|
|
1962
2330
|
if (areInstallmentsOfSameAmount) {
|
|
@@ -1965,13 +2333,13 @@ var paymentPlanInfoText = function paymentPlanInfoText(payment) {
|
|
|
1965
2333
|
defaultMessage: "{installmentsCount} x {totalAmount}",
|
|
1966
2334
|
values: {
|
|
1967
2335
|
totalAmount: /*#__PURE__*/React__default.createElement(reactIntl.FormattedNumber, {
|
|
1968
|
-
value: priceFromCents(
|
|
2336
|
+
value: priceFromCents(payment_plan[0].total_amount),
|
|
1969
2337
|
style: "currency",
|
|
1970
2338
|
currency: "EUR"
|
|
1971
2339
|
}),
|
|
1972
2340
|
installmentsCount: installmentsCount
|
|
1973
2341
|
}
|
|
1974
|
-
}), withNoFee());
|
|
2342
|
+
}), withNoFee(payment));
|
|
1975
2343
|
}
|
|
1976
2344
|
|
|
1977
2345
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
@@ -1979,18 +2347,18 @@ var paymentPlanInfoText = function paymentPlanInfoText(payment) {
|
|
|
1979
2347
|
defaultMessage: "{numberOfRemainingInstallments, plural, one {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}} other {{firstInstallmentAmount} puis {numberOfRemainingInstallments} x {othersInstallmentAmount}}}",
|
|
1980
2348
|
values: {
|
|
1981
2349
|
firstInstallmentAmount: /*#__PURE__*/React__default.createElement(reactIntl.FormattedNumber, {
|
|
1982
|
-
value: priceFromCents(
|
|
2350
|
+
value: priceFromCents(payment_plan[0].total_amount),
|
|
1983
2351
|
style: "currency",
|
|
1984
2352
|
currency: "EUR"
|
|
1985
2353
|
}),
|
|
1986
2354
|
numberOfRemainingInstallments: installmentsCount - 1,
|
|
1987
2355
|
othersInstallmentAmount: /*#__PURE__*/React__default.createElement(reactIntl.FormattedNumber, {
|
|
1988
|
-
value: priceFromCents(
|
|
2356
|
+
value: priceFromCents(payment_plan[1].total_amount),
|
|
1989
2357
|
style: "currency",
|
|
1990
2358
|
currency: "EUR"
|
|
1991
2359
|
})
|
|
1992
2360
|
}
|
|
1993
|
-
}), withNoFee());
|
|
2361
|
+
}), withNoFee(payment));
|
|
1994
2362
|
}
|
|
1995
2363
|
|
|
1996
2364
|
return /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
@@ -2006,13 +2374,13 @@ var EligibilityPlansButtons = function EligibilityPlansButtons(_ref) {
|
|
|
2006
2374
|
currentPlanIndex = _ref.currentPlanIndex,
|
|
2007
2375
|
setCurrentPlanIndex = _ref.setCurrentPlanIndex;
|
|
2008
2376
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2009
|
-
className: s$2.buttons
|
|
2377
|
+
className: cx(s$2.buttons, STATIC_CUSTOMISATION_CLASSES.eligibilityOptions)
|
|
2010
2378
|
}, eligibilityPlans.map(function (eligibilityPlan, index) {
|
|
2011
2379
|
var _cx;
|
|
2012
2380
|
|
|
2013
2381
|
return /*#__PURE__*/React__default.createElement("button", {
|
|
2014
2382
|
key: index,
|
|
2015
|
-
className: cx((_cx = {}, _cx[s$2.active] = index === currentPlanIndex, _cx)),
|
|
2383
|
+
className: cx((_cx = {}, _cx[cx(s$2.active, STATIC_CUSTOMISATION_CLASSES.activeOption)] = index === currentPlanIndex, _cx)),
|
|
2016
2384
|
onClick: function onClick() {
|
|
2017
2385
|
return setCurrentPlanIndex(index);
|
|
2018
2386
|
}
|
|
@@ -2031,10 +2399,10 @@ var Schedule = function Schedule(_ref) {
|
|
|
2031
2399
|
var isCredit = currentPlan && currentPlan.installments_count > 4;
|
|
2032
2400
|
var intl = reactIntl.useIntl();
|
|
2033
2401
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2034
|
-
className: s$3.schedule,
|
|
2402
|
+
className: cx(s$3.schedule, STATIC_CUSTOMISATION_CLASSES.scheduleDetails),
|
|
2035
2403
|
"data-testid": "modal-installments-element"
|
|
2036
2404
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2037
|
-
className: cx(s$3.scheduleLine, s$3.total)
|
|
2405
|
+
className: cx(s$3.scheduleLine, s$3.total, STATIC_CUSTOMISATION_CLASSES.scheduleTotal)
|
|
2038
2406
|
}, /*#__PURE__*/React__default.createElement("span", null, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
2039
2407
|
id: "eligibility-modal.total",
|
|
2040
2408
|
defaultMessage: "Total"
|
|
@@ -2043,7 +2411,7 @@ var Schedule = function Schedule(_ref) {
|
|
|
2043
2411
|
style: "currency",
|
|
2044
2412
|
currency: "EUR"
|
|
2045
2413
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
2046
|
-
className: cx(s$3.scheduleLine, s$3.creditCost)
|
|
2414
|
+
className: cx(s$3.scheduleLine, s$3.creditCost, STATIC_CUSTOMISATION_CLASSES.scheduleCredit)
|
|
2047
2415
|
}, isCredit ? /*#__PURE__*/React__default.createElement("span", null, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
2048
2416
|
id: "eligibility-modal.credit-cost",
|
|
2049
2417
|
defaultMessage: "Dont co\xFBt du cr\xE9dit"
|
|
@@ -2096,13 +2464,15 @@ var s$4 = {"list":"_180ro","listItem":"_1HqCO","bullet":"_3B8wx"};
|
|
|
2096
2464
|
|
|
2097
2465
|
var Info = function Info() {
|
|
2098
2466
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2099
|
-
className: s$4.list,
|
|
2467
|
+
className: cx(s$4.list, STATIC_CUSTOMISATION_CLASSES.info),
|
|
2100
2468
|
"data-testid": "modal-info-element"
|
|
2101
2469
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2102
2470
|
className: s$4.listItem
|
|
2103
2471
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2104
2472
|
className: s$4.bullet
|
|
2105
|
-
}, "1"), /*#__PURE__*/React__default.createElement("div",
|
|
2473
|
+
}, "1"), /*#__PURE__*/React__default.createElement("div", {
|
|
2474
|
+
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2475
|
+
}, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
2106
2476
|
id: "eligibility-modal.bullet-1",
|
|
2107
2477
|
defaultMessage: "Choisissez <strong>Alma</strong> au moment du paiement.",
|
|
2108
2478
|
values: {
|
|
@@ -2114,7 +2484,9 @@ var Info = function Info() {
|
|
|
2114
2484
|
className: s$4.listItem
|
|
2115
2485
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2116
2486
|
className: s$4.bullet
|
|
2117
|
-
}, "2"), /*#__PURE__*/React__default.createElement("div",
|
|
2487
|
+
}, "2"), /*#__PURE__*/React__default.createElement("div", {
|
|
2488
|
+
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2489
|
+
}, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
2118
2490
|
id: "eligibility-modal.bullet-2",
|
|
2119
2491
|
defaultMessage: "Renseignez les <strong>informations</strong> demand\xE9es.",
|
|
2120
2492
|
values: {
|
|
@@ -2126,7 +2498,9 @@ var Info = function Info() {
|
|
|
2126
2498
|
className: s$4.listItem
|
|
2127
2499
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2128
2500
|
className: s$4.bullet
|
|
2129
|
-
}, "3"), /*#__PURE__*/React__default.createElement("div",
|
|
2501
|
+
}, "3"), /*#__PURE__*/React__default.createElement("div", {
|
|
2502
|
+
className: STATIC_CUSTOMISATION_CLASSES.infoMessage
|
|
2503
|
+
}, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
2130
2504
|
id: "eligibility-modal.bullet-3",
|
|
2131
2505
|
defaultMessage: "La validation de votre paiement <strong>instantan\xE9e</strong> !",
|
|
2132
2506
|
values: {
|
|
@@ -2184,7 +2558,7 @@ var s$6 = {"title":"_3ERx-"};
|
|
|
2184
2558
|
|
|
2185
2559
|
var Title = function Title() {
|
|
2186
2560
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
2187
|
-
className: s$6.title,
|
|
2561
|
+
className: cx(s$6.title, STATIC_CUSTOMISATION_CLASSES.title),
|
|
2188
2562
|
"data-testid": "modal-title-element"
|
|
2189
2563
|
}, /*#__PURE__*/React__default.createElement(reactIntl.FormattedMessage, {
|
|
2190
2564
|
id: "eligibility-modal.title",
|
|
@@ -2205,9 +2579,9 @@ var DesktopModal = function DesktopModal(_ref) {
|
|
|
2205
2579
|
className: s$7.container,
|
|
2206
2580
|
"data-testid": "modal-container"
|
|
2207
2581
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2208
|
-
className: cx([s$7.block, s$7.left])
|
|
2582
|
+
className: cx([s$7.block, s$7.left, STATIC_CUSTOMISATION_CLASSES.leftSide])
|
|
2209
2583
|
}, /*#__PURE__*/React__default.createElement(Title, null), /*#__PURE__*/React__default.createElement(Info, null), /*#__PURE__*/React__default.createElement(Logo, null)), /*#__PURE__*/React__default.createElement("div", {
|
|
2210
|
-
className: s$7.block
|
|
2584
|
+
className: cx(s$7.block, STATIC_CUSTOMISATION_CLASSES.rightSide)
|
|
2211
2585
|
}, children));
|
|
2212
2586
|
};
|
|
2213
2587
|
|
|
@@ -2376,6 +2750,24 @@ var getIndexOfActivePlan = function getIndexOfActivePlan(_ref) {
|
|
|
2376
2750
|
return 0;
|
|
2377
2751
|
};
|
|
2378
2752
|
|
|
2753
|
+
/**
|
|
2754
|
+
* Prefix classes to avoid name collisions.
|
|
2755
|
+
*/
|
|
2756
|
+
var prefix$1 = 'alma-payment-plans';
|
|
2757
|
+
/**
|
|
2758
|
+
* Class names for the **payment plans** widget.
|
|
2759
|
+
* Those classes are intended to be used by the **merchant developer**.
|
|
2760
|
+
*/
|
|
2761
|
+
|
|
2762
|
+
var STATIC_CUSTOMISATION_CLASSES$1 = {
|
|
2763
|
+
container: prefix$1 + '-container',
|
|
2764
|
+
eligibilityLine: prefix$1 + '-eligibility-line',
|
|
2765
|
+
eligibilityOptions: prefix$1 + '-eligibility-options',
|
|
2766
|
+
notEligibleOption: prefix$1 + '-not-eligible-option',
|
|
2767
|
+
paymentInfo: prefix$1 + '-payment-info',
|
|
2768
|
+
activeOption: prefix$1 + '-active-option'
|
|
2769
|
+
};
|
|
2770
|
+
|
|
2379
2771
|
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"};
|
|
2380
2772
|
|
|
2381
2773
|
var VERY_LONG_TIME_IN_MS = 1000 * 3600 * 24 * 365;
|
|
@@ -2402,7 +2794,7 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
|
|
|
2402
2794
|
eligibilityPlans: eligibilityPlans,
|
|
2403
2795
|
suggestedPaymentPlan: suggestedPaymentPlan != null ? suggestedPaymentPlan : 0
|
|
2404
2796
|
});
|
|
2405
|
-
var isSuggestedPaymentPlanSpecified = suggestedPaymentPlan !== undefined; // 👈 The merchant decided to focus a tab
|
|
2797
|
+
var isSuggestedPaymentPlanSpecified = suggestedPaymentPlan !== undefined; // 👈 The merchant decided to focus a tab
|
|
2406
2798
|
|
|
2407
2799
|
var isTransitionSpecified = transitionDelay !== undefined; // 👈 The merchant has specified a transition time
|
|
2408
2800
|
|
|
@@ -2487,14 +2879,14 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
|
|
|
2487
2879
|
|
|
2488
2880
|
return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement("div", {
|
|
2489
2881
|
onClick: handleOpenModal,
|
|
2490
|
-
className: cx(s$b.widgetButton, (_cx = {}, _cx[s$b.clickable] = eligiblePlans.length > 0, _cx[s$b.unClickable] = eligiblePlans.length === 0, _cx)),
|
|
2882
|
+
className: cx(s$b.widgetButton, (_cx = {}, _cx[s$b.clickable] = eligiblePlans.length > 0, _cx[s$b.unClickable] = eligiblePlans.length === 0, _cx), STATIC_CUSTOMISATION_CLASSES$1.container),
|
|
2491
2883
|
"data-testid": "widget-button"
|
|
2492
2884
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
2493
|
-
className: s$b.primaryContainer
|
|
2885
|
+
className: cx(s$b.primaryContainer, STATIC_CUSTOMISATION_CLASSES$1.eligibilityLine)
|
|
2494
2886
|
}, /*#__PURE__*/React__default.createElement(LogoIcon, {
|
|
2495
2887
|
className: s$b.logo
|
|
2496
2888
|
}), /*#__PURE__*/React__default.createElement("div", {
|
|
2497
|
-
className: s$b.paymentPlans
|
|
2889
|
+
className: cx(s$b.paymentPlans, STATIC_CUSTOMISATION_CLASSES$1.eligibilityOptions)
|
|
2498
2890
|
}, eligibilityPlans.map(function (eligibilityPlan, key) {
|
|
2499
2891
|
var _cx2;
|
|
2500
2892
|
|
|
@@ -2504,10 +2896,10 @@ var PaymentPlanWidget = function PaymentPlanWidget(_ref) {
|
|
|
2504
2896
|
return onHover(key);
|
|
2505
2897
|
},
|
|
2506
2898
|
onMouseOut: onLeave,
|
|
2507
|
-
className: cx(s$b.plan, (_cx2 = {}, _cx2[s$b.active] = current === key, _cx2[s$b.notEligible] = !eligibilityPlan.eligible, _cx2))
|
|
2899
|
+
className: cx(s$b.plan, (_cx2 = {}, _cx2[cx(s$b.active, STATIC_CUSTOMISATION_CLASSES$1.activeOption)] = current === key, _cx2[cx(s$b.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = !eligibilityPlan.eligible, _cx2))
|
|
2508
2900
|
}, paymentPlanShorthandName(eligibilityPlan));
|
|
2509
2901
|
}))), /*#__PURE__*/React__default.createElement("div", {
|
|
2510
|
-
className: cx(s$b.info, (_cx3 = {}, _cx3[s$b.notEligible] = eligibilityPlans[current] && !eligibilityPlans[current].eligible, _cx3))
|
|
2902
|
+
className: cx(s$b.info, (_cx3 = {}, _cx3[cx(s$b.notEligible, STATIC_CUSTOMISATION_CLASSES$1.notEligibleOption)] = eligibilityPlans[current] && !eligibilityPlans[current].eligible, _cx3), STATIC_CUSTOMISATION_CLASSES$1.paymentInfo)
|
|
2511
2903
|
}, eligibilityPlans.length !== 0 && paymentPlanInfoText(eligibilityPlans[current]))), isOpen && /*#__PURE__*/React__default.createElement(EligibilityModal, {
|
|
2512
2904
|
initialPlanIndex: getIndexWithinEligiblePlans(current),
|
|
2513
2905
|
onClose: closeModal,
|