@bolttech/atoms-date-input 0.4.7 → 0.4.9
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/README.md +99 -33
- package/index.cjs.js +787 -502
- package/package.json +1 -1
- package/src/index.d.ts +0 -2
- package/src/lib/date-input.d.ts +0 -4
- package/src/lib/date-input.styles.d.ts +0 -316
- package/src/lib/date-input.type.d.ts +0 -12
package/index.cjs.js
CHANGED
|
@@ -1,21 +1,31 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
'use strict';
|
|
3
3
|
|
|
4
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
5
4
|
var react = require('react');
|
|
6
5
|
var styled = require('styled-components');
|
|
7
6
|
var uiUtils = require('@bolttech/ui-utils');
|
|
8
7
|
var reactDom = require('react-dom');
|
|
9
8
|
var moleculesCalendar = require('@bolttech/molecules-calendar');
|
|
10
9
|
var atomsIcon = require('@bolttech/atoms-icon');
|
|
10
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
11
11
|
|
|
12
12
|
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
13
|
|
|
14
14
|
var styled__default = /*#__PURE__*/_interopDefault(styled);
|
|
15
15
|
|
|
16
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
17
|
+
if (null == r) return {};
|
|
18
|
+
var t = {};
|
|
19
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
20
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
21
|
+
t[n] = r[n];
|
|
22
|
+
}
|
|
23
|
+
return t;
|
|
24
|
+
}
|
|
25
|
+
|
|
16
26
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
17
27
|
|
|
18
|
-
var fails$
|
|
28
|
+
var fails$k = function (exec) {
|
|
19
29
|
try {
|
|
20
30
|
return !!exec();
|
|
21
31
|
} catch (error) {
|
|
@@ -23,11 +33,11 @@ var fails$i = function (exec) {
|
|
|
23
33
|
}
|
|
24
34
|
};
|
|
25
35
|
|
|
26
|
-
var fails$
|
|
36
|
+
var fails$j = fails$k;
|
|
27
37
|
|
|
28
|
-
var functionBindNative = !fails$
|
|
38
|
+
var functionBindNative = !fails$j(function () {
|
|
29
39
|
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
30
|
-
var test =
|
|
40
|
+
var test = function () { /* empty */ }.bind();
|
|
31
41
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
32
42
|
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
33
43
|
});
|
|
@@ -35,64 +45,64 @@ var functionBindNative = !fails$h(function () {
|
|
|
35
45
|
var NATIVE_BIND$2 = functionBindNative;
|
|
36
46
|
|
|
37
47
|
var FunctionPrototype$2 = Function.prototype;
|
|
38
|
-
var call$
|
|
48
|
+
var call$g = FunctionPrototype$2.call;
|
|
39
49
|
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
40
|
-
var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$
|
|
50
|
+
var uncurryThisWithBind = NATIVE_BIND$2 && FunctionPrototype$2.bind.bind(call$g, call$g);
|
|
41
51
|
|
|
42
52
|
var functionUncurryThis = NATIVE_BIND$2 ? uncurryThisWithBind : function (fn) {
|
|
43
53
|
return function () {
|
|
44
|
-
return call$
|
|
54
|
+
return call$g.apply(fn, arguments);
|
|
45
55
|
};
|
|
46
56
|
};
|
|
47
57
|
|
|
48
|
-
var uncurryThis$
|
|
58
|
+
var uncurryThis$g = functionUncurryThis;
|
|
49
59
|
|
|
50
|
-
var toString$
|
|
51
|
-
var stringSlice$
|
|
60
|
+
var toString$6 = uncurryThis$g({}.toString);
|
|
61
|
+
var stringSlice$6 = uncurryThis$g(''.slice);
|
|
52
62
|
|
|
53
63
|
var classofRaw$1 = function (it) {
|
|
54
|
-
return stringSlice$
|
|
64
|
+
return stringSlice$6(toString$6(it), 8, -1);
|
|
55
65
|
};
|
|
56
66
|
|
|
57
|
-
var uncurryThis$
|
|
58
|
-
var fails$
|
|
59
|
-
var classof$
|
|
67
|
+
var uncurryThis$f = functionUncurryThis;
|
|
68
|
+
var fails$i = fails$k;
|
|
69
|
+
var classof$4 = classofRaw$1;
|
|
60
70
|
|
|
61
71
|
var $Object$4 = Object;
|
|
62
|
-
var split = uncurryThis$
|
|
72
|
+
var split = uncurryThis$f(''.split);
|
|
63
73
|
|
|
64
74
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
65
|
-
var indexedObject = fails$
|
|
75
|
+
var indexedObject = fails$i(function () {
|
|
66
76
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
67
77
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
68
78
|
return !$Object$4('z').propertyIsEnumerable(0);
|
|
69
79
|
}) ? function (it) {
|
|
70
|
-
return classof$
|
|
80
|
+
return classof$4(it) === 'String' ? split(it, '') : $Object$4(it);
|
|
71
81
|
} : $Object$4;
|
|
72
82
|
|
|
73
83
|
// we can't use just `it == null` since of `document.all` special case
|
|
74
84
|
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
75
|
-
var isNullOrUndefined$
|
|
85
|
+
var isNullOrUndefined$3 = function (it) {
|
|
76
86
|
return it === null || it === undefined;
|
|
77
87
|
};
|
|
78
88
|
|
|
79
|
-
var isNullOrUndefined$
|
|
89
|
+
var isNullOrUndefined$2 = isNullOrUndefined$3;
|
|
80
90
|
|
|
81
|
-
var $TypeError$
|
|
91
|
+
var $TypeError$a = TypeError;
|
|
82
92
|
|
|
83
93
|
// `RequireObjectCoercible` abstract operation
|
|
84
94
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
85
|
-
var requireObjectCoercible$
|
|
86
|
-
if (isNullOrUndefined$
|
|
95
|
+
var requireObjectCoercible$6 = function (it) {
|
|
96
|
+
if (isNullOrUndefined$2(it)) throw new $TypeError$a("Can't call method on " + it);
|
|
87
97
|
return it;
|
|
88
98
|
};
|
|
89
99
|
|
|
90
100
|
// toObject with fallback for non-array-like ES3 strings
|
|
91
101
|
var IndexedObject$1 = indexedObject;
|
|
92
|
-
var requireObjectCoercible$
|
|
102
|
+
var requireObjectCoercible$5 = requireObjectCoercible$6;
|
|
93
103
|
|
|
94
104
|
var toIndexedObject$5 = function (it) {
|
|
95
|
-
return IndexedObject$1(requireObjectCoercible$
|
|
105
|
+
return IndexedObject$1(requireObjectCoercible$5(it));
|
|
96
106
|
};
|
|
97
107
|
|
|
98
108
|
var check = function (it) {
|
|
@@ -133,10 +143,10 @@ var SHARED = '__core-js_shared__';
|
|
|
133
143
|
var store$3 = sharedStore.exports = globalThis$h[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
134
144
|
|
|
135
145
|
(store$3.versions || (store$3.versions = [])).push({
|
|
136
|
-
version: '3.
|
|
146
|
+
version: '3.49.0',
|
|
137
147
|
mode: 'global',
|
|
138
148
|
copyright: '© 2013–2025 Denis Pushkarev (zloirock.ru), 2025–2026 CoreJS Company (core-js.io). All rights reserved.',
|
|
139
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
149
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.49.0/LICENSE',
|
|
140
150
|
source: 'https://github.com/zloirock/core-js'
|
|
141
151
|
});
|
|
142
152
|
|
|
@@ -148,20 +158,20 @@ var shared$4 = function (key, value) {
|
|
|
148
158
|
return store$2[key] || (store$2[key] = value || {});
|
|
149
159
|
};
|
|
150
160
|
|
|
151
|
-
var requireObjectCoercible$
|
|
161
|
+
var requireObjectCoercible$4 = requireObjectCoercible$6;
|
|
152
162
|
|
|
153
163
|
var $Object$3 = Object;
|
|
154
164
|
|
|
155
165
|
// `ToObject` abstract operation
|
|
156
166
|
// https://tc39.es/ecma262/#sec-toobject
|
|
157
167
|
var toObject$4 = function (argument) {
|
|
158
|
-
return $Object$3(requireObjectCoercible$
|
|
168
|
+
return $Object$3(requireObjectCoercible$4(argument));
|
|
159
169
|
};
|
|
160
170
|
|
|
161
|
-
var uncurryThis$
|
|
171
|
+
var uncurryThis$e = functionUncurryThis;
|
|
162
172
|
var toObject$3 = toObject$4;
|
|
163
173
|
|
|
164
|
-
var hasOwnProperty = uncurryThis$
|
|
174
|
+
var hasOwnProperty = uncurryThis$e({}.hasOwnProperty);
|
|
165
175
|
|
|
166
176
|
// `HasOwnProperty` abstract operation
|
|
167
177
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
@@ -170,14 +180,14 @@ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
|
170
180
|
return hasOwnProperty(toObject$3(it), key);
|
|
171
181
|
};
|
|
172
182
|
|
|
173
|
-
var uncurryThis$
|
|
183
|
+
var uncurryThis$d = functionUncurryThis;
|
|
174
184
|
|
|
175
185
|
var id = 0;
|
|
176
186
|
var postfix = Math.random();
|
|
177
|
-
var toString$
|
|
187
|
+
var toString$5 = uncurryThis$d(1.1.toString);
|
|
178
188
|
|
|
179
189
|
var uid$2 = function (key) {
|
|
180
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$
|
|
190
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$5(++id + postfix, 36);
|
|
181
191
|
};
|
|
182
192
|
|
|
183
193
|
var globalThis$g = globalThis_1;
|
|
@@ -217,13 +227,13 @@ var environmentV8Version = version;
|
|
|
217
227
|
|
|
218
228
|
/* eslint-disable es/no-symbol -- required for testing */
|
|
219
229
|
var V8_VERSION = environmentV8Version;
|
|
220
|
-
var fails$
|
|
230
|
+
var fails$h = fails$k;
|
|
221
231
|
var globalThis$e = globalThis_1;
|
|
222
232
|
|
|
223
233
|
var $String$5 = globalThis$e.String;
|
|
224
234
|
|
|
225
235
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
226
|
-
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$
|
|
236
|
+
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$h(function () {
|
|
227
237
|
var symbol = Symbol('symbol detection');
|
|
228
238
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
229
239
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
@@ -252,7 +262,7 @@ var Symbol$1 = globalThis$d.Symbol;
|
|
|
252
262
|
var WellKnownSymbolsStore = shared$3('wks');
|
|
253
263
|
var createWellKnownSymbol = USE_SYMBOL_AS_UID$1 ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
254
264
|
|
|
255
|
-
var wellKnownSymbol$
|
|
265
|
+
var wellKnownSymbol$d = function (name) {
|
|
256
266
|
if (!hasOwn$a(WellKnownSymbolsStore, name)) {
|
|
257
267
|
WellKnownSymbolsStore[name] = NATIVE_SYMBOL && hasOwn$a(Symbol$1, name)
|
|
258
268
|
? Symbol$1[name]
|
|
@@ -266,45 +276,45 @@ var documentAll = typeof document == 'object' && document.all;
|
|
|
266
276
|
// `IsCallable` abstract operation
|
|
267
277
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
268
278
|
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
269
|
-
var isCallable$
|
|
279
|
+
var isCallable$i = typeof documentAll == 'undefined' && documentAll !== undefined ? function (argument) {
|
|
270
280
|
return typeof argument == 'function' || argument === documentAll;
|
|
271
281
|
} : function (argument) {
|
|
272
282
|
return typeof argument == 'function';
|
|
273
283
|
};
|
|
274
284
|
|
|
275
|
-
var isCallable$
|
|
285
|
+
var isCallable$h = isCallable$i;
|
|
276
286
|
|
|
277
|
-
var isObject$
|
|
278
|
-
return typeof it == 'object' ? it !== null : isCallable$
|
|
287
|
+
var isObject$a = function (it) {
|
|
288
|
+
return typeof it == 'object' ? it !== null : isCallable$h(it);
|
|
279
289
|
};
|
|
280
290
|
|
|
281
|
-
var isObject$
|
|
291
|
+
var isObject$9 = isObject$a;
|
|
282
292
|
|
|
283
293
|
var $String$4 = String;
|
|
284
|
-
var $TypeError$
|
|
294
|
+
var $TypeError$9 = TypeError;
|
|
285
295
|
|
|
286
296
|
// `Assert: Type(argument) is Object`
|
|
287
|
-
var anObject$
|
|
288
|
-
if (isObject$
|
|
289
|
-
throw new $TypeError$
|
|
297
|
+
var anObject$d = function (argument) {
|
|
298
|
+
if (isObject$9(argument)) return argument;
|
|
299
|
+
throw new $TypeError$9($String$4(argument) + ' is not an object');
|
|
290
300
|
};
|
|
291
301
|
|
|
292
302
|
var objectDefineProperties = {};
|
|
293
303
|
|
|
294
|
-
var fails$
|
|
304
|
+
var fails$g = fails$k;
|
|
295
305
|
|
|
296
306
|
// Detect IE8's incomplete defineProperty implementation
|
|
297
|
-
var descriptors = !fails$
|
|
307
|
+
var descriptors = !fails$g(function () {
|
|
298
308
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
299
309
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] !== 7;
|
|
300
310
|
});
|
|
301
311
|
|
|
302
312
|
var DESCRIPTORS$b = descriptors;
|
|
303
|
-
var fails$
|
|
313
|
+
var fails$f = fails$k;
|
|
304
314
|
|
|
305
315
|
// V8 ~ Chrome 36-
|
|
306
316
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
307
|
-
var v8PrototypeDefineBug = DESCRIPTORS$b && fails$
|
|
317
|
+
var v8PrototypeDefineBug = DESCRIPTORS$b && fails$f(function () {
|
|
308
318
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
309
319
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
310
320
|
value: 42,
|
|
@@ -315,22 +325,22 @@ var v8PrototypeDefineBug = DESCRIPTORS$b && fails$d(function () {
|
|
|
315
325
|
var objectDefineProperty = {};
|
|
316
326
|
|
|
317
327
|
var globalThis$c = globalThis_1;
|
|
318
|
-
var isObject$
|
|
328
|
+
var isObject$8 = isObject$a;
|
|
319
329
|
|
|
320
330
|
var document$1 = globalThis$c.document;
|
|
321
331
|
// typeof document.createElement is 'object' in old IE
|
|
322
|
-
var EXISTS$1 = isObject$
|
|
332
|
+
var EXISTS$1 = isObject$8(document$1) && isObject$8(document$1.createElement);
|
|
323
333
|
|
|
324
334
|
var documentCreateElement$2 = function (it) {
|
|
325
335
|
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
326
336
|
};
|
|
327
337
|
|
|
328
338
|
var DESCRIPTORS$a = descriptors;
|
|
329
|
-
var fails$
|
|
339
|
+
var fails$e = fails$k;
|
|
330
340
|
var createElement = documentCreateElement$2;
|
|
331
341
|
|
|
332
342
|
// Thanks to IE8 for its funny defineProperty
|
|
333
|
-
var ie8DomDefine = !DESCRIPTORS$a && !fails$
|
|
343
|
+
var ie8DomDefine = !DESCRIPTORS$a && !fails$e(function () {
|
|
334
344
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
335
345
|
return Object.defineProperty(createElement('div'), 'a', {
|
|
336
346
|
get: function () { return 7; }
|
|
@@ -339,29 +349,29 @@ var ie8DomDefine = !DESCRIPTORS$a && !fails$c(function () {
|
|
|
339
349
|
|
|
340
350
|
var NATIVE_BIND$1 = functionBindNative;
|
|
341
351
|
|
|
342
|
-
var call$
|
|
352
|
+
var call$f = Function.prototype.call;
|
|
343
353
|
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
344
|
-
var functionCall = NATIVE_BIND$1 ? call$
|
|
345
|
-
return call$
|
|
354
|
+
var functionCall = NATIVE_BIND$1 ? call$f.bind(call$f) : function () {
|
|
355
|
+
return call$f.apply(call$f, arguments);
|
|
346
356
|
};
|
|
347
357
|
|
|
348
358
|
var globalThis$b = globalThis_1;
|
|
349
|
-
var isCallable$
|
|
359
|
+
var isCallable$g = isCallable$i;
|
|
350
360
|
|
|
351
361
|
var aFunction = function (argument) {
|
|
352
|
-
return isCallable$
|
|
362
|
+
return isCallable$g(argument) ? argument : undefined;
|
|
353
363
|
};
|
|
354
364
|
|
|
355
|
-
var getBuiltIn$
|
|
365
|
+
var getBuiltIn$4 = function (namespace, method) {
|
|
356
366
|
return arguments.length < 2 ? aFunction(globalThis$b[namespace]) : globalThis$b[namespace] && globalThis$b[namespace][method];
|
|
357
367
|
};
|
|
358
368
|
|
|
359
|
-
var uncurryThis$
|
|
369
|
+
var uncurryThis$c = functionUncurryThis;
|
|
360
370
|
|
|
361
|
-
var objectIsPrototypeOf = uncurryThis$
|
|
371
|
+
var objectIsPrototypeOf = uncurryThis$c({}.isPrototypeOf);
|
|
362
372
|
|
|
363
|
-
var getBuiltIn$
|
|
364
|
-
var isCallable$
|
|
373
|
+
var getBuiltIn$3 = getBuiltIn$4;
|
|
374
|
+
var isCallable$f = isCallable$i;
|
|
365
375
|
var isPrototypeOf$2 = objectIsPrototypeOf;
|
|
366
376
|
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
367
377
|
|
|
@@ -370,13 +380,13 @@ var $Object$2 = Object;
|
|
|
370
380
|
var isSymbol$2 = USE_SYMBOL_AS_UID ? function (it) {
|
|
371
381
|
return typeof it == 'symbol';
|
|
372
382
|
} : function (it) {
|
|
373
|
-
var $Symbol = getBuiltIn$
|
|
374
|
-
return isCallable$
|
|
383
|
+
var $Symbol = getBuiltIn$3('Symbol');
|
|
384
|
+
return isCallable$f($Symbol) && isPrototypeOf$2($Symbol.prototype, $Object$2(it));
|
|
375
385
|
};
|
|
376
386
|
|
|
377
387
|
var $String$3 = String;
|
|
378
388
|
|
|
379
|
-
var tryToString$
|
|
389
|
+
var tryToString$2 = function (argument) {
|
|
380
390
|
try {
|
|
381
391
|
return $String$3(argument);
|
|
382
392
|
} catch (error) {
|
|
@@ -384,64 +394,64 @@ var tryToString$1 = function (argument) {
|
|
|
384
394
|
}
|
|
385
395
|
};
|
|
386
396
|
|
|
387
|
-
var isCallable$
|
|
388
|
-
var tryToString = tryToString$
|
|
397
|
+
var isCallable$e = isCallable$i;
|
|
398
|
+
var tryToString$1 = tryToString$2;
|
|
389
399
|
|
|
390
|
-
var $TypeError$
|
|
400
|
+
var $TypeError$8 = TypeError;
|
|
391
401
|
|
|
392
402
|
// `Assert: IsCallable(argument) is true`
|
|
393
403
|
var aCallable$3 = function (argument) {
|
|
394
|
-
if (isCallable$
|
|
395
|
-
throw new $TypeError$
|
|
404
|
+
if (isCallable$e(argument)) return argument;
|
|
405
|
+
throw new $TypeError$8(tryToString$1(argument) + ' is not a function');
|
|
396
406
|
};
|
|
397
407
|
|
|
398
408
|
var aCallable$2 = aCallable$3;
|
|
399
|
-
var isNullOrUndefined = isNullOrUndefined$
|
|
409
|
+
var isNullOrUndefined$1 = isNullOrUndefined$3;
|
|
400
410
|
|
|
401
411
|
// `GetMethod` abstract operation
|
|
402
412
|
// https://tc39.es/ecma262/#sec-getmethod
|
|
403
|
-
var getMethod$
|
|
413
|
+
var getMethod$5 = function (V, P) {
|
|
404
414
|
var func = V[P];
|
|
405
|
-
return isNullOrUndefined(func) ? undefined : aCallable$2(func);
|
|
415
|
+
return isNullOrUndefined$1(func) ? undefined : aCallable$2(func);
|
|
406
416
|
};
|
|
407
417
|
|
|
408
|
-
var call$
|
|
409
|
-
var isCallable$
|
|
410
|
-
var isObject$
|
|
418
|
+
var call$e = functionCall;
|
|
419
|
+
var isCallable$d = isCallable$i;
|
|
420
|
+
var isObject$7 = isObject$a;
|
|
411
421
|
|
|
412
|
-
var $TypeError$
|
|
422
|
+
var $TypeError$7 = TypeError;
|
|
413
423
|
|
|
414
424
|
// `OrdinaryToPrimitive` abstract operation
|
|
415
425
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
416
426
|
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
417
427
|
var fn, val;
|
|
418
|
-
if (pref === 'string' && isCallable$
|
|
419
|
-
if (isCallable$
|
|
420
|
-
if (pref !== 'string' && isCallable$
|
|
421
|
-
throw new $TypeError$
|
|
428
|
+
if (pref === 'string' && isCallable$d(fn = input.toString) && !isObject$7(val = call$e(fn, input))) return val;
|
|
429
|
+
if (isCallable$d(fn = input.valueOf) && !isObject$7(val = call$e(fn, input))) return val;
|
|
430
|
+
if (pref !== 'string' && isCallable$d(fn = input.toString) && !isObject$7(val = call$e(fn, input))) return val;
|
|
431
|
+
throw new $TypeError$7("Can't convert object to primitive value");
|
|
422
432
|
};
|
|
423
433
|
|
|
424
|
-
var call$
|
|
425
|
-
var isObject$
|
|
434
|
+
var call$d = functionCall;
|
|
435
|
+
var isObject$6 = isObject$a;
|
|
426
436
|
var isSymbol$1 = isSymbol$2;
|
|
427
|
-
var getMethod$
|
|
437
|
+
var getMethod$4 = getMethod$5;
|
|
428
438
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
429
|
-
var wellKnownSymbol$
|
|
439
|
+
var wellKnownSymbol$c = wellKnownSymbol$d;
|
|
430
440
|
|
|
431
|
-
var $TypeError$
|
|
432
|
-
var TO_PRIMITIVE = wellKnownSymbol$
|
|
441
|
+
var $TypeError$6 = TypeError;
|
|
442
|
+
var TO_PRIMITIVE = wellKnownSymbol$c('toPrimitive');
|
|
433
443
|
|
|
434
444
|
// `ToPrimitive` abstract operation
|
|
435
445
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
436
446
|
var toPrimitive$1 = function (input, pref) {
|
|
437
|
-
if (!isObject$
|
|
438
|
-
var exoticToPrim = getMethod$
|
|
447
|
+
if (!isObject$6(input) || isSymbol$1(input)) return input;
|
|
448
|
+
var exoticToPrim = getMethod$4(input, TO_PRIMITIVE);
|
|
439
449
|
var result;
|
|
440
450
|
if (exoticToPrim) {
|
|
441
451
|
if (pref === undefined) pref = 'default';
|
|
442
|
-
result = call$
|
|
443
|
-
if (!isObject$
|
|
444
|
-
throw new $TypeError$
|
|
452
|
+
result = call$d(exoticToPrim, input, pref);
|
|
453
|
+
if (!isObject$6(result) || isSymbol$1(result)) return result;
|
|
454
|
+
throw new $TypeError$6("Can't convert object to primitive value");
|
|
445
455
|
}
|
|
446
456
|
if (pref === undefined) pref = 'number';
|
|
447
457
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -460,10 +470,10 @@ var toPropertyKey$2 = function (argument) {
|
|
|
460
470
|
var DESCRIPTORS$9 = descriptors;
|
|
461
471
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
462
472
|
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
463
|
-
var anObject$
|
|
473
|
+
var anObject$c = anObject$d;
|
|
464
474
|
var toPropertyKey$1 = toPropertyKey$2;
|
|
465
475
|
|
|
466
|
-
var $TypeError$
|
|
476
|
+
var $TypeError$5 = TypeError;
|
|
467
477
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
468
478
|
var $defineProperty = Object.defineProperty;
|
|
469
479
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
@@ -475,9 +485,9 @@ var WRITABLE = 'writable';
|
|
|
475
485
|
// `Object.defineProperty` method
|
|
476
486
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
477
487
|
objectDefineProperty.f = DESCRIPTORS$9 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
478
|
-
anObject$
|
|
488
|
+
anObject$c(O);
|
|
479
489
|
P = toPropertyKey$1(P);
|
|
480
|
-
anObject$
|
|
490
|
+
anObject$c(Attributes);
|
|
481
491
|
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
482
492
|
var current = $getOwnPropertyDescriptor$1(O, P);
|
|
483
493
|
if (current && current[WRITABLE]) {
|
|
@@ -490,13 +500,13 @@ objectDefineProperty.f = DESCRIPTORS$9 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function de
|
|
|
490
500
|
}
|
|
491
501
|
} return $defineProperty(O, P, Attributes);
|
|
492
502
|
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
493
|
-
anObject$
|
|
503
|
+
anObject$c(O);
|
|
494
504
|
P = toPropertyKey$1(P);
|
|
495
|
-
anObject$
|
|
505
|
+
anObject$c(Attributes);
|
|
496
506
|
if (IE8_DOM_DEFINE$1) try {
|
|
497
507
|
return $defineProperty(O, P, Attributes);
|
|
498
508
|
} catch (error) { /* empty */ }
|
|
499
|
-
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$
|
|
509
|
+
if ('get' in Attributes || 'set' in Attributes) throw new $TypeError$5('Accessors not supported');
|
|
500
510
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
501
511
|
return O;
|
|
502
512
|
};
|
|
@@ -525,33 +535,33 @@ var toIntegerOrInfinity$4 = function (argument) {
|
|
|
525
535
|
var toIntegerOrInfinity$3 = toIntegerOrInfinity$4;
|
|
526
536
|
|
|
527
537
|
var max$1 = Math.max;
|
|
528
|
-
var min$
|
|
538
|
+
var min$3 = Math.min;
|
|
529
539
|
|
|
530
540
|
// Helper for a popular repeating case of the spec:
|
|
531
541
|
// Let integer be ? ToInteger(index).
|
|
532
542
|
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
533
543
|
var toAbsoluteIndex$1 = function (index, length) {
|
|
534
544
|
var integer = toIntegerOrInfinity$3(index);
|
|
535
|
-
return integer < 0 ? max$1(integer + length, 0) : min$
|
|
545
|
+
return integer < 0 ? max$1(integer + length, 0) : min$3(integer, length);
|
|
536
546
|
};
|
|
537
547
|
|
|
538
548
|
var toIntegerOrInfinity$2 = toIntegerOrInfinity$4;
|
|
539
549
|
|
|
540
|
-
var min$
|
|
550
|
+
var min$2 = Math.min;
|
|
541
551
|
|
|
542
552
|
// `ToLength` abstract operation
|
|
543
553
|
// https://tc39.es/ecma262/#sec-tolength
|
|
544
|
-
var toLength$
|
|
554
|
+
var toLength$3 = function (argument) {
|
|
545
555
|
var len = toIntegerOrInfinity$2(argument);
|
|
546
|
-
return len > 0 ? min$
|
|
556
|
+
return len > 0 ? min$2(len, 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
547
557
|
};
|
|
548
558
|
|
|
549
|
-
var toLength$
|
|
559
|
+
var toLength$2 = toLength$3;
|
|
550
560
|
|
|
551
561
|
// `LengthOfArrayLike` abstract operation
|
|
552
562
|
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
553
563
|
var lengthOfArrayLike$1 = function (obj) {
|
|
554
|
-
return toLength$
|
|
564
|
+
return toLength$2(obj.length);
|
|
555
565
|
};
|
|
556
566
|
|
|
557
567
|
var toIndexedObject$4 = toIndexedObject$5;
|
|
@@ -587,23 +597,23 @@ var arrayIncludes = {
|
|
|
587
597
|
|
|
588
598
|
var hiddenKeys$4 = {};
|
|
589
599
|
|
|
590
|
-
var uncurryThis$
|
|
600
|
+
var uncurryThis$b = functionUncurryThis;
|
|
591
601
|
var hasOwn$9 = hasOwnProperty_1;
|
|
592
602
|
var toIndexedObject$3 = toIndexedObject$5;
|
|
593
603
|
var indexOf$1 = arrayIncludes.indexOf;
|
|
594
604
|
var hiddenKeys$3 = hiddenKeys$4;
|
|
595
605
|
|
|
596
|
-
var push$
|
|
606
|
+
var push$2 = uncurryThis$b([].push);
|
|
597
607
|
|
|
598
608
|
var objectKeysInternal = function (object, names) {
|
|
599
609
|
var O = toIndexedObject$3(object);
|
|
600
610
|
var i = 0;
|
|
601
611
|
var result = [];
|
|
602
612
|
var key;
|
|
603
|
-
for (key in O) !hasOwn$9(hiddenKeys$3, key) && hasOwn$9(O, key) && push$
|
|
613
|
+
for (key in O) !hasOwn$9(hiddenKeys$3, key) && hasOwn$9(O, key) && push$2(result, key);
|
|
604
614
|
// Don't enum bug & hidden keys
|
|
605
615
|
while (names.length > i) if (hasOwn$9(O, key = names[i++])) {
|
|
606
|
-
~indexOf$1(result, key) || push$
|
|
616
|
+
~indexOf$1(result, key) || push$2(result, key);
|
|
607
617
|
}
|
|
608
618
|
return result;
|
|
609
619
|
};
|
|
@@ -632,7 +642,7 @@ var objectKeys$2 = Object.keys || function keys(O) {
|
|
|
632
642
|
var DESCRIPTORS$8 = descriptors;
|
|
633
643
|
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
634
644
|
var definePropertyModule$4 = objectDefineProperty;
|
|
635
|
-
var anObject$
|
|
645
|
+
var anObject$b = anObject$d;
|
|
636
646
|
var toIndexedObject$2 = toIndexedObject$5;
|
|
637
647
|
var objectKeys$1 = objectKeys$2;
|
|
638
648
|
|
|
@@ -640,7 +650,7 @@ var objectKeys$1 = objectKeys$2;
|
|
|
640
650
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
641
651
|
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
642
652
|
objectDefineProperties.f = DESCRIPTORS$8 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
643
|
-
anObject$
|
|
653
|
+
anObject$b(O);
|
|
644
654
|
var props = toIndexedObject$2(Properties);
|
|
645
655
|
var keys = objectKeys$1(Properties);
|
|
646
656
|
var length = keys.length;
|
|
@@ -650,9 +660,9 @@ objectDefineProperties.f = DESCRIPTORS$8 && !V8_PROTOTYPE_DEFINE_BUG ? Object.de
|
|
|
650
660
|
return O;
|
|
651
661
|
};
|
|
652
662
|
|
|
653
|
-
var getBuiltIn$
|
|
663
|
+
var getBuiltIn$2 = getBuiltIn$4;
|
|
654
664
|
|
|
655
|
-
var html$1 = getBuiltIn$
|
|
665
|
+
var html$1 = getBuiltIn$2('document', 'documentElement');
|
|
656
666
|
|
|
657
667
|
var shared$2 = shared$4;
|
|
658
668
|
var uid = uid$2;
|
|
@@ -664,7 +674,7 @@ var sharedKey$3 = function (key) {
|
|
|
664
674
|
};
|
|
665
675
|
|
|
666
676
|
/* global ActiveXObject -- old IE, WSH */
|
|
667
|
-
var anObject$
|
|
677
|
+
var anObject$a = anObject$d;
|
|
668
678
|
var definePropertiesModule = objectDefineProperties;
|
|
669
679
|
var enumBugKeys$1 = enumBugKeys$3;
|
|
670
680
|
var hiddenKeys$2 = hiddenKeys$4;
|
|
@@ -739,7 +749,7 @@ hiddenKeys$2[IE_PROTO$1] = true;
|
|
|
739
749
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
740
750
|
var result;
|
|
741
751
|
if (O !== null) {
|
|
742
|
-
EmptyConstructor[PROTOTYPE] = anObject$
|
|
752
|
+
EmptyConstructor[PROTOTYPE] = anObject$a(O);
|
|
743
753
|
result = new EmptyConstructor();
|
|
744
754
|
EmptyConstructor[PROTOTYPE] = null;
|
|
745
755
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
@@ -748,11 +758,11 @@ var objectCreate = Object.create || function create(O, Properties) {
|
|
|
748
758
|
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
749
759
|
};
|
|
750
760
|
|
|
751
|
-
var wellKnownSymbol$
|
|
761
|
+
var wellKnownSymbol$b = wellKnownSymbol$d;
|
|
752
762
|
var create$3 = objectCreate;
|
|
753
763
|
var defineProperty$5 = objectDefineProperty.f;
|
|
754
764
|
|
|
755
|
-
var UNSCOPABLES = wellKnownSymbol$
|
|
765
|
+
var UNSCOPABLES = wellKnownSymbol$b('unscopables');
|
|
756
766
|
var ArrayPrototype = Array.prototype;
|
|
757
767
|
|
|
758
768
|
// Array.prototype[@@unscopables]
|
|
@@ -772,11 +782,11 @@ var addToUnscopables$1 = function (key) {
|
|
|
772
782
|
var iterators = {};
|
|
773
783
|
|
|
774
784
|
var globalThis$a = globalThis_1;
|
|
775
|
-
var isCallable$
|
|
785
|
+
var isCallable$c = isCallable$i;
|
|
776
786
|
|
|
777
787
|
var WeakMap$1 = globalThis$a.WeakMap;
|
|
778
788
|
|
|
779
|
-
var weakMapBasicDetection = isCallable$
|
|
789
|
+
var weakMapBasicDetection = isCallable$c(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
780
790
|
|
|
781
791
|
var createPropertyDescriptor$4 = function (bitmap, value) {
|
|
782
792
|
return {
|
|
@@ -800,7 +810,7 @@ var createNonEnumerableProperty$6 = DESCRIPTORS$7 ? function (object, key, value
|
|
|
800
810
|
|
|
801
811
|
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
802
812
|
var globalThis$9 = globalThis_1;
|
|
803
|
-
var isObject$
|
|
813
|
+
var isObject$5 = isObject$a;
|
|
804
814
|
var createNonEnumerableProperty$5 = createNonEnumerableProperty$6;
|
|
805
815
|
var hasOwn$8 = hasOwnProperty_1;
|
|
806
816
|
var shared$1 = sharedStoreExports;
|
|
@@ -819,7 +829,7 @@ var enforce = function (it) {
|
|
|
819
829
|
var getterFor = function (TYPE) {
|
|
820
830
|
return function (it) {
|
|
821
831
|
var state;
|
|
822
|
-
if (!isObject$
|
|
832
|
+
if (!isObject$5(it) || (state = get(it)).type !== TYPE) {
|
|
823
833
|
throw new TypeError$1('Incompatible receiver, ' + TYPE + ' required');
|
|
824
834
|
} return state;
|
|
825
835
|
};
|
|
@@ -888,7 +898,7 @@ objectPropertyIsEnumerable.f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
|
888
898
|
} : $propertyIsEnumerable;
|
|
889
899
|
|
|
890
900
|
var DESCRIPTORS$6 = descriptors;
|
|
891
|
-
var call$
|
|
901
|
+
var call$c = functionCall;
|
|
892
902
|
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
893
903
|
var createPropertyDescriptor$2 = createPropertyDescriptor$4;
|
|
894
904
|
var toIndexedObject$1 = toIndexedObject$5;
|
|
@@ -907,7 +917,7 @@ objectGetOwnPropertyDescriptor.f = DESCRIPTORS$6 ? $getOwnPropertyDescriptor : f
|
|
|
907
917
|
if (IE8_DOM_DEFINE) try {
|
|
908
918
|
return $getOwnPropertyDescriptor(O, P);
|
|
909
919
|
} catch (error) { /* empty */ }
|
|
910
|
-
if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$
|
|
920
|
+
if (hasOwn$7(O, P)) return createPropertyDescriptor$2(!call$c(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
911
921
|
};
|
|
912
922
|
|
|
913
923
|
var makeBuiltIn$3 = {exports: {}};
|
|
@@ -921,7 +931,7 @@ var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
|
|
|
921
931
|
|
|
922
932
|
var EXISTS = hasOwn$6(FunctionPrototype$1, 'name');
|
|
923
933
|
// additional protection from minified / mangled / dropped function names
|
|
924
|
-
var PROPER = EXISTS &&
|
|
934
|
+
var PROPER = EXISTS && function something() { /* empty */ }.name === 'something';
|
|
925
935
|
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
|
926
936
|
|
|
927
937
|
var functionName = {
|
|
@@ -929,28 +939,28 @@ var functionName = {
|
|
|
929
939
|
CONFIGURABLE: CONFIGURABLE
|
|
930
940
|
};
|
|
931
941
|
|
|
932
|
-
var uncurryThis$
|
|
933
|
-
var isCallable$
|
|
942
|
+
var uncurryThis$a = functionUncurryThis;
|
|
943
|
+
var isCallable$b = isCallable$i;
|
|
934
944
|
var store = sharedStoreExports;
|
|
935
945
|
|
|
936
|
-
var functionToString = uncurryThis$
|
|
946
|
+
var functionToString = uncurryThis$a(Function.toString);
|
|
937
947
|
|
|
938
948
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
939
|
-
if (!isCallable$
|
|
949
|
+
if (!isCallable$b(store.inspectSource)) {
|
|
940
950
|
store.inspectSource = function (it) {
|
|
941
951
|
return functionToString(it);
|
|
942
952
|
};
|
|
943
953
|
}
|
|
944
954
|
|
|
945
|
-
var inspectSource$
|
|
955
|
+
var inspectSource$2 = store.inspectSource;
|
|
946
956
|
|
|
947
|
-
var uncurryThis$
|
|
948
|
-
var fails$
|
|
949
|
-
var isCallable$
|
|
957
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
958
|
+
var fails$d = fails$k;
|
|
959
|
+
var isCallable$a = isCallable$i;
|
|
950
960
|
var hasOwn$5 = hasOwnProperty_1;
|
|
951
961
|
var DESCRIPTORS$4 = descriptors;
|
|
952
962
|
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
953
|
-
var inspectSource = inspectSource$
|
|
963
|
+
var inspectSource$1 = inspectSource$2;
|
|
954
964
|
var InternalStateModule$2 = internalState;
|
|
955
965
|
|
|
956
966
|
var enforceInternalState = InternalStateModule$2.enforce;
|
|
@@ -958,18 +968,18 @@ var getInternalState$2 = InternalStateModule$2.get;
|
|
|
958
968
|
var $String$2 = String;
|
|
959
969
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
960
970
|
var defineProperty$4 = Object.defineProperty;
|
|
961
|
-
var stringSlice$
|
|
962
|
-
var replace$2 = uncurryThis$
|
|
963
|
-
var join = uncurryThis$
|
|
971
|
+
var stringSlice$5 = uncurryThis$9(''.slice);
|
|
972
|
+
var replace$2 = uncurryThis$9(''.replace);
|
|
973
|
+
var join = uncurryThis$9([].join);
|
|
964
974
|
|
|
965
|
-
var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$
|
|
975
|
+
var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$d(function () {
|
|
966
976
|
return defineProperty$4(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
967
977
|
});
|
|
968
978
|
|
|
969
979
|
var TEMPLATE = String(String).split('String');
|
|
970
980
|
|
|
971
981
|
var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
|
|
972
|
-
if (stringSlice$
|
|
982
|
+
if (stringSlice$5($String$2(name), 0, 7) === 'Symbol(') {
|
|
973
983
|
name = '[' + replace$2($String$2(name), /^Symbol\(([^)]*)\).*$/, '$1') + ']';
|
|
974
984
|
}
|
|
975
985
|
if (options && options.getter) name = 'get ' + name;
|
|
@@ -996,12 +1006,12 @@ var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
|
|
|
996
1006
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
997
1007
|
// eslint-disable-next-line no-extend-native -- required
|
|
998
1008
|
Function.prototype.toString = makeBuiltIn$2(function toString() {
|
|
999
|
-
return isCallable$
|
|
1009
|
+
return isCallable$a(this) && getInternalState$2(this).source || inspectSource$1(this);
|
|
1000
1010
|
}, 'toString');
|
|
1001
1011
|
|
|
1002
1012
|
var makeBuiltInExports = makeBuiltIn$3.exports;
|
|
1003
1013
|
|
|
1004
|
-
var isCallable$
|
|
1014
|
+
var isCallable$9 = isCallable$i;
|
|
1005
1015
|
var definePropertyModule$2 = objectDefineProperty;
|
|
1006
1016
|
var makeBuiltIn$1 = makeBuiltInExports;
|
|
1007
1017
|
var defineGlobalProperty$1 = defineGlobalProperty$3;
|
|
@@ -1010,7 +1020,7 @@ var defineBuiltIn$5 = function (O, key, value, options) {
|
|
|
1010
1020
|
if (!options) options = {};
|
|
1011
1021
|
var simple = options.enumerable;
|
|
1012
1022
|
var name = options.name !== undefined ? options.name : key;
|
|
1013
|
-
if (isCallable$
|
|
1023
|
+
if (isCallable$9(value)) makeBuiltIn$1(value, name, options);
|
|
1014
1024
|
if (options.global) {
|
|
1015
1025
|
if (simple) O[key] = value;
|
|
1016
1026
|
else defineGlobalProperty$1(key, value);
|
|
@@ -1048,17 +1058,17 @@ var objectGetOwnPropertySymbols = {};
|
|
|
1048
1058
|
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
1049
1059
|
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
1050
1060
|
|
|
1051
|
-
var getBuiltIn = getBuiltIn$
|
|
1052
|
-
var uncurryThis$
|
|
1061
|
+
var getBuiltIn$1 = getBuiltIn$4;
|
|
1062
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
1053
1063
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
1054
1064
|
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
1055
|
-
var anObject$
|
|
1065
|
+
var anObject$9 = anObject$d;
|
|
1056
1066
|
|
|
1057
|
-
var concat$2 = uncurryThis$
|
|
1067
|
+
var concat$2 = uncurryThis$8([].concat);
|
|
1058
1068
|
|
|
1059
1069
|
// all object keys, includes non-enumerable and symbols
|
|
1060
|
-
var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
1061
|
-
var keys = getOwnPropertyNamesModule.f(anObject$
|
|
1070
|
+
var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
1071
|
+
var keys = getOwnPropertyNamesModule.f(anObject$9(it));
|
|
1062
1072
|
var getOwnPropertySymbols = getOwnPropertySymbolsModule$1.f;
|
|
1063
1073
|
return getOwnPropertySymbols ? concat$2(keys, getOwnPropertySymbols(it)) : keys;
|
|
1064
1074
|
};
|
|
@@ -1080,8 +1090,8 @@ var copyConstructorProperties$1 = function (target, source, exceptions) {
|
|
|
1080
1090
|
}
|
|
1081
1091
|
};
|
|
1082
1092
|
|
|
1083
|
-
var fails$
|
|
1084
|
-
var isCallable$
|
|
1093
|
+
var fails$c = fails$k;
|
|
1094
|
+
var isCallable$8 = isCallable$i;
|
|
1085
1095
|
|
|
1086
1096
|
var replacement = /#|\.prototype\./;
|
|
1087
1097
|
|
|
@@ -1089,7 +1099,7 @@ var isForced$1 = function (feature, detection) {
|
|
|
1089
1099
|
var value = data[normalize(feature)];
|
|
1090
1100
|
return value === POLYFILL ? true
|
|
1091
1101
|
: value === NATIVE ? false
|
|
1092
|
-
: isCallable$
|
|
1102
|
+
: isCallable$8(detection) ? fails$c(detection)
|
|
1093
1103
|
: !!detection;
|
|
1094
1104
|
};
|
|
1095
1105
|
|
|
@@ -1158,9 +1168,9 @@ var _export = function (options, source) {
|
|
|
1158
1168
|
}
|
|
1159
1169
|
};
|
|
1160
1170
|
|
|
1161
|
-
var fails$
|
|
1171
|
+
var fails$b = fails$k;
|
|
1162
1172
|
|
|
1163
|
-
var correctPrototypeGetter = !fails$
|
|
1173
|
+
var correctPrototypeGetter = !fails$b(function () {
|
|
1164
1174
|
function F() { /* empty */ }
|
|
1165
1175
|
F.prototype.constructor = null;
|
|
1166
1176
|
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
@@ -1168,7 +1178,7 @@ var correctPrototypeGetter = !fails$9(function () {
|
|
|
1168
1178
|
});
|
|
1169
1179
|
|
|
1170
1180
|
var hasOwn$3 = hasOwnProperty_1;
|
|
1171
|
-
var isCallable$
|
|
1181
|
+
var isCallable$7 = isCallable$i;
|
|
1172
1182
|
var toObject$2 = toObject$4;
|
|
1173
1183
|
var sharedKey = sharedKey$3;
|
|
1174
1184
|
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
@@ -1184,19 +1194,19 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf :
|
|
|
1184
1194
|
var object = toObject$2(O);
|
|
1185
1195
|
if (hasOwn$3(object, IE_PROTO)) return object[IE_PROTO];
|
|
1186
1196
|
var constructor = object.constructor;
|
|
1187
|
-
if (isCallable$
|
|
1197
|
+
if (isCallable$7(constructor) && object instanceof constructor) {
|
|
1188
1198
|
return constructor.prototype;
|
|
1189
1199
|
} return object instanceof $Object$1 ? ObjectPrototype : null;
|
|
1190
1200
|
};
|
|
1191
1201
|
|
|
1192
|
-
var fails$
|
|
1193
|
-
var isCallable$
|
|
1194
|
-
var isObject$
|
|
1202
|
+
var fails$a = fails$k;
|
|
1203
|
+
var isCallable$6 = isCallable$i;
|
|
1204
|
+
var isObject$4 = isObject$a;
|
|
1195
1205
|
var getPrototypeOf$2 = objectGetPrototypeOf;
|
|
1196
1206
|
var defineBuiltIn$3 = defineBuiltIn$5;
|
|
1197
|
-
var wellKnownSymbol$
|
|
1207
|
+
var wellKnownSymbol$a = wellKnownSymbol$d;
|
|
1198
1208
|
|
|
1199
|
-
var ITERATOR$3 = wellKnownSymbol$
|
|
1209
|
+
var ITERATOR$3 = wellKnownSymbol$a('iterator');
|
|
1200
1210
|
var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
1201
1211
|
|
|
1202
1212
|
// `%IteratorPrototype%` object
|
|
@@ -1214,7 +1224,7 @@ if ([].keys) {
|
|
|
1214
1224
|
}
|
|
1215
1225
|
}
|
|
1216
1226
|
|
|
1217
|
-
var NEW_ITERATOR_PROTOTYPE = !isObject$
|
|
1227
|
+
var NEW_ITERATOR_PROTOTYPE = !isObject$4(IteratorPrototype$4) || fails$a(function () {
|
|
1218
1228
|
var test = {};
|
|
1219
1229
|
// FF44- legacy iterators case
|
|
1220
1230
|
return IteratorPrototype$4[ITERATOR$3].call(test) !== test;
|
|
@@ -1224,7 +1234,7 @@ if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$4 = {};
|
|
|
1224
1234
|
|
|
1225
1235
|
// `%IteratorPrototype%[@@iterator]()` method
|
|
1226
1236
|
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
1227
|
-
if (!isCallable$
|
|
1237
|
+
if (!isCallable$6(IteratorPrototype$4[ITERATOR$3])) {
|
|
1228
1238
|
defineBuiltIn$3(IteratorPrototype$4, ITERATOR$3, function () {
|
|
1229
1239
|
return this;
|
|
1230
1240
|
});
|
|
@@ -1237,9 +1247,9 @@ var iteratorsCore = {
|
|
|
1237
1247
|
|
|
1238
1248
|
var defineProperty$3 = objectDefineProperty.f;
|
|
1239
1249
|
var hasOwn$2 = hasOwnProperty_1;
|
|
1240
|
-
var wellKnownSymbol$
|
|
1250
|
+
var wellKnownSymbol$9 = wellKnownSymbol$d;
|
|
1241
1251
|
|
|
1242
|
-
var TO_STRING_TAG$4 = wellKnownSymbol$
|
|
1252
|
+
var TO_STRING_TAG$4 = wellKnownSymbol$9('toStringTag');
|
|
1243
1253
|
|
|
1244
1254
|
var setToStringTag$3 = function (target, TAG, STATIC) {
|
|
1245
1255
|
if (target && !STATIC) target = target.prototype;
|
|
@@ -1264,36 +1274,36 @@ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUME
|
|
|
1264
1274
|
return IteratorConstructor;
|
|
1265
1275
|
};
|
|
1266
1276
|
|
|
1267
|
-
var uncurryThis$
|
|
1277
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
1268
1278
|
var aCallable$1 = aCallable$3;
|
|
1269
1279
|
|
|
1270
1280
|
var functionUncurryThisAccessor = function (object, key, method) {
|
|
1271
1281
|
try {
|
|
1272
1282
|
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1273
|
-
return uncurryThis$
|
|
1283
|
+
return uncurryThis$7(aCallable$1(Object.getOwnPropertyDescriptor(object, key)[method]));
|
|
1274
1284
|
} catch (error) { /* empty */ }
|
|
1275
1285
|
};
|
|
1276
1286
|
|
|
1277
|
-
var isObject$
|
|
1287
|
+
var isObject$3 = isObject$a;
|
|
1278
1288
|
|
|
1279
1289
|
var isPossiblePrototype$1 = function (argument) {
|
|
1280
|
-
return isObject$
|
|
1290
|
+
return isObject$3(argument) || argument === null;
|
|
1281
1291
|
};
|
|
1282
1292
|
|
|
1283
1293
|
var isPossiblePrototype = isPossiblePrototype$1;
|
|
1284
1294
|
|
|
1285
1295
|
var $String$1 = String;
|
|
1286
|
-
var $TypeError$
|
|
1296
|
+
var $TypeError$4 = TypeError;
|
|
1287
1297
|
|
|
1288
1298
|
var aPossiblePrototype$1 = function (argument) {
|
|
1289
1299
|
if (isPossiblePrototype(argument)) return argument;
|
|
1290
|
-
throw new $TypeError$
|
|
1300
|
+
throw new $TypeError$4("Can't set " + $String$1(argument) + ' as a prototype');
|
|
1291
1301
|
};
|
|
1292
1302
|
|
|
1293
1303
|
/* eslint-disable no-proto -- safe */
|
|
1294
1304
|
var uncurryThisAccessor = functionUncurryThisAccessor;
|
|
1295
|
-
var isObject$
|
|
1296
|
-
var requireObjectCoercible$
|
|
1305
|
+
var isObject$2 = isObject$a;
|
|
1306
|
+
var requireObjectCoercible$3 = requireObjectCoercible$6;
|
|
1297
1307
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1298
1308
|
|
|
1299
1309
|
// `Object.setPrototypeOf` method
|
|
@@ -1310,9 +1320,9 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1310
1320
|
CORRECT_SETTER = test instanceof Array;
|
|
1311
1321
|
} catch (error) { /* empty */ }
|
|
1312
1322
|
return function setPrototypeOf(O, proto) {
|
|
1313
|
-
requireObjectCoercible$
|
|
1323
|
+
requireObjectCoercible$3(O);
|
|
1314
1324
|
aPossiblePrototype(proto);
|
|
1315
|
-
if (!isObject$
|
|
1325
|
+
if (!isObject$2(O)) return O;
|
|
1316
1326
|
if (CORRECT_SETTER) setter(O, proto);
|
|
1317
1327
|
else O.__proto__ = proto;
|
|
1318
1328
|
return O;
|
|
@@ -1320,16 +1330,16 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1320
1330
|
}() : undefined);
|
|
1321
1331
|
|
|
1322
1332
|
var $$4 = _export;
|
|
1323
|
-
var call$
|
|
1333
|
+
var call$b = functionCall;
|
|
1324
1334
|
var FunctionName = functionName;
|
|
1325
|
-
var isCallable$
|
|
1335
|
+
var isCallable$5 = isCallable$i;
|
|
1326
1336
|
var createIteratorConstructor = iteratorCreateConstructor;
|
|
1327
1337
|
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
1328
1338
|
var setPrototypeOf = objectSetPrototypeOf;
|
|
1329
1339
|
var setToStringTag$1 = setToStringTag$3;
|
|
1330
1340
|
var createNonEnumerableProperty$3 = createNonEnumerableProperty$6;
|
|
1331
1341
|
var defineBuiltIn$2 = defineBuiltIn$5;
|
|
1332
|
-
var wellKnownSymbol$
|
|
1342
|
+
var wellKnownSymbol$8 = wellKnownSymbol$d;
|
|
1333
1343
|
var Iterators$1 = iterators;
|
|
1334
1344
|
var IteratorsCore = iteratorsCore;
|
|
1335
1345
|
|
|
@@ -1337,7 +1347,7 @@ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
|
|
|
1337
1347
|
var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
|
|
1338
1348
|
var IteratorPrototype$2 = IteratorsCore.IteratorPrototype;
|
|
1339
1349
|
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
1340
|
-
var ITERATOR$2 = wellKnownSymbol$
|
|
1350
|
+
var ITERATOR$2 = wellKnownSymbol$8('iterator');
|
|
1341
1351
|
var KEYS = 'keys';
|
|
1342
1352
|
var VALUES = 'values';
|
|
1343
1353
|
var ENTRIES = 'entries';
|
|
@@ -1377,7 +1387,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
1377
1387
|
if (getPrototypeOf$1(CurrentIteratorPrototype) !== IteratorPrototype$2) {
|
|
1378
1388
|
if (setPrototypeOf) {
|
|
1379
1389
|
setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype$2);
|
|
1380
|
-
} else if (!isCallable$
|
|
1390
|
+
} else if (!isCallable$5(CurrentIteratorPrototype[ITERATOR$2])) {
|
|
1381
1391
|
defineBuiltIn$2(CurrentIteratorPrototype, ITERATOR$2, returnThis);
|
|
1382
1392
|
}
|
|
1383
1393
|
}
|
|
@@ -1392,7 +1402,7 @@ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAUL
|
|
|
1392
1402
|
createNonEnumerableProperty$3(IterablePrototype, 'name', VALUES);
|
|
1393
1403
|
} else {
|
|
1394
1404
|
INCORRECT_VALUES_NAME = true;
|
|
1395
|
-
defaultIterator = function values() { return call$
|
|
1405
|
+
defaultIterator = function values() { return call$b(nativeIterator, this); };
|
|
1396
1406
|
}
|
|
1397
1407
|
}
|
|
1398
1408
|
|
|
@@ -1488,11 +1498,11 @@ if (DESCRIPTORS$3 && values.name !== 'values') try {
|
|
|
1488
1498
|
|
|
1489
1499
|
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
1490
1500
|
|
|
1491
|
-
var $TypeError$
|
|
1501
|
+
var $TypeError$3 = TypeError;
|
|
1492
1502
|
|
|
1493
1503
|
var anInstance$1 = function (it, Prototype) {
|
|
1494
1504
|
if (isPrototypeOf$1(Prototype, it)) return it;
|
|
1495
|
-
throw new $TypeError$
|
|
1505
|
+
throw new $TypeError$3('Incorrect invocation');
|
|
1496
1506
|
};
|
|
1497
1507
|
|
|
1498
1508
|
var makeBuiltIn = makeBuiltInExports;
|
|
@@ -1516,33 +1526,33 @@ var createProperty$1 = function (object, key, value) {
|
|
|
1516
1526
|
var $$3 = _export;
|
|
1517
1527
|
var globalThis$7 = globalThis_1;
|
|
1518
1528
|
var anInstance = anInstance$1;
|
|
1519
|
-
var anObject$
|
|
1520
|
-
var isCallable$
|
|
1529
|
+
var anObject$8 = anObject$d;
|
|
1530
|
+
var isCallable$4 = isCallable$i;
|
|
1521
1531
|
var getPrototypeOf = objectGetPrototypeOf;
|
|
1522
1532
|
var defineBuiltInAccessor = defineBuiltInAccessor$1;
|
|
1523
1533
|
var createProperty = createProperty$1;
|
|
1524
|
-
var fails$
|
|
1534
|
+
var fails$9 = fails$k;
|
|
1525
1535
|
var hasOwn$1 = hasOwnProperty_1;
|
|
1526
|
-
var wellKnownSymbol$
|
|
1536
|
+
var wellKnownSymbol$7 = wellKnownSymbol$d;
|
|
1527
1537
|
var IteratorPrototype$1 = iteratorsCore.IteratorPrototype;
|
|
1528
1538
|
var DESCRIPTORS$1 = descriptors;
|
|
1529
1539
|
|
|
1530
1540
|
var CONSTRUCTOR = 'constructor';
|
|
1531
1541
|
var ITERATOR$1 = 'Iterator';
|
|
1532
|
-
var TO_STRING_TAG$3 = wellKnownSymbol$
|
|
1542
|
+
var TO_STRING_TAG$3 = wellKnownSymbol$7('toStringTag');
|
|
1533
1543
|
|
|
1534
|
-
var $TypeError$
|
|
1544
|
+
var $TypeError$2 = TypeError;
|
|
1535
1545
|
var NativeIterator = globalThis$7[ITERATOR$1];
|
|
1536
1546
|
|
|
1537
1547
|
// FF56- have non-standard global helper `Iterator`
|
|
1538
|
-
var FORCED$1 = !isCallable$
|
|
1548
|
+
var FORCED$1 = !isCallable$4(NativeIterator)
|
|
1539
1549
|
|| NativeIterator.prototype !== IteratorPrototype$1
|
|
1540
1550
|
// FF44- non-standard `Iterator` passes previous tests
|
|
1541
|
-
|| !fails$
|
|
1551
|
+
|| !fails$9(function () { NativeIterator({}); });
|
|
1542
1552
|
|
|
1543
1553
|
var IteratorConstructor = function Iterator() {
|
|
1544
1554
|
anInstance(this, IteratorPrototype$1);
|
|
1545
|
-
if (getPrototypeOf(this) === IteratorPrototype$1) throw new $TypeError$
|
|
1555
|
+
if (getPrototypeOf(this) === IteratorPrototype$1) throw new $TypeError$2('Abstract class Iterator not directly constructable');
|
|
1546
1556
|
};
|
|
1547
1557
|
|
|
1548
1558
|
var defineIteratorPrototypeAccessor = function (key, value) {
|
|
@@ -1553,8 +1563,8 @@ var defineIteratorPrototypeAccessor = function (key, value) {
|
|
|
1553
1563
|
return value;
|
|
1554
1564
|
},
|
|
1555
1565
|
set: function (replacement) {
|
|
1556
|
-
anObject$
|
|
1557
|
-
if (this === IteratorPrototype$1) throw new $TypeError$
|
|
1566
|
+
anObject$8(this);
|
|
1567
|
+
if (this === IteratorPrototype$1) throw new $TypeError$2("You can't redefine this property");
|
|
1558
1568
|
if (hasOwn$1(this, key)) this[key] = replacement;
|
|
1559
1569
|
else createProperty(this, key, replacement);
|
|
1560
1570
|
}
|
|
@@ -1593,27 +1603,27 @@ var defineBuiltIns$1 = function (target, src, options) {
|
|
|
1593
1603
|
return target;
|
|
1594
1604
|
};
|
|
1595
1605
|
|
|
1596
|
-
var call$
|
|
1597
|
-
var anObject$
|
|
1598
|
-
var getMethod$
|
|
1606
|
+
var call$a = functionCall;
|
|
1607
|
+
var anObject$7 = anObject$d;
|
|
1608
|
+
var getMethod$3 = getMethod$5;
|
|
1599
1609
|
|
|
1600
1610
|
var iteratorClose$4 = function (iterator, kind, value) {
|
|
1601
1611
|
var innerResult, innerError;
|
|
1602
|
-
anObject$
|
|
1612
|
+
anObject$7(iterator);
|
|
1603
1613
|
try {
|
|
1604
|
-
innerResult = getMethod$
|
|
1614
|
+
innerResult = getMethod$3(iterator, 'return');
|
|
1605
1615
|
if (!innerResult) {
|
|
1606
1616
|
if (kind === 'throw') throw value;
|
|
1607
1617
|
return value;
|
|
1608
1618
|
}
|
|
1609
|
-
innerResult = call$
|
|
1619
|
+
innerResult = call$a(innerResult, iterator);
|
|
1610
1620
|
} catch (error) {
|
|
1611
1621
|
innerError = true;
|
|
1612
1622
|
innerResult = error;
|
|
1613
1623
|
}
|
|
1614
1624
|
if (kind === 'throw') throw value;
|
|
1615
1625
|
if (innerError) throw innerResult;
|
|
1616
|
-
anObject$
|
|
1626
|
+
anObject$7(innerResult);
|
|
1617
1627
|
return value;
|
|
1618
1628
|
};
|
|
1619
1629
|
|
|
@@ -1633,19 +1643,19 @@ var iteratorCloseAll$1 = function (iters, kind, value) {
|
|
|
1633
1643
|
return value;
|
|
1634
1644
|
};
|
|
1635
1645
|
|
|
1636
|
-
var call$
|
|
1646
|
+
var call$9 = functionCall;
|
|
1637
1647
|
var create$1 = objectCreate;
|
|
1638
1648
|
var createNonEnumerableProperty$2 = createNonEnumerableProperty$6;
|
|
1639
1649
|
var defineBuiltIns = defineBuiltIns$1;
|
|
1640
|
-
var wellKnownSymbol$
|
|
1650
|
+
var wellKnownSymbol$6 = wellKnownSymbol$d;
|
|
1641
1651
|
var InternalStateModule = internalState;
|
|
1642
|
-
var getMethod$
|
|
1652
|
+
var getMethod$2 = getMethod$5;
|
|
1643
1653
|
var IteratorPrototype = iteratorsCore.IteratorPrototype;
|
|
1644
1654
|
var createIterResultObject = createIterResultObject$2;
|
|
1645
1655
|
var iteratorClose$2 = iteratorClose$4;
|
|
1646
1656
|
var iteratorCloseAll = iteratorCloseAll$1;
|
|
1647
1657
|
|
|
1648
|
-
var TO_STRING_TAG$2 = wellKnownSymbol$
|
|
1658
|
+
var TO_STRING_TAG$2 = wellKnownSymbol$6('toStringTag');
|
|
1649
1659
|
var ITERATOR_HELPER = 'IteratorHelper';
|
|
1650
1660
|
var WRAP_FOR_VALID_ITERATOR = 'WrapForValidIterator';
|
|
1651
1661
|
var NORMAL = 'normal';
|
|
@@ -1674,11 +1684,13 @@ var createIteratorProxyPrototype = function (IS_ITERATOR) {
|
|
|
1674
1684
|
'return': function () {
|
|
1675
1685
|
var state = getInternalState(this);
|
|
1676
1686
|
var iterator = state.iterator;
|
|
1687
|
+
var done = state.done;
|
|
1677
1688
|
state.done = true;
|
|
1678
1689
|
if (IS_ITERATOR) {
|
|
1679
|
-
var returnMethod = getMethod$
|
|
1680
|
-
return returnMethod ? call$
|
|
1690
|
+
var returnMethod = getMethod$2(iterator, 'return');
|
|
1691
|
+
return returnMethod ? call$9(returnMethod, iterator) : createIterResultObject(undefined, true);
|
|
1681
1692
|
}
|
|
1693
|
+
if (done) return createIterResultObject(undefined, true);
|
|
1682
1694
|
if (state.inner) try {
|
|
1683
1695
|
iteratorClose$2(state.inner.iterator, NORMAL);
|
|
1684
1696
|
} catch (error) {
|
|
@@ -1687,7 +1699,8 @@ var createIteratorProxyPrototype = function (IS_ITERATOR) {
|
|
|
1687
1699
|
if (state.openIters) try {
|
|
1688
1700
|
iteratorCloseAll(state.openIters, NORMAL);
|
|
1689
1701
|
} catch (error) {
|
|
1690
|
-
return iteratorClose$2(iterator, THROW, error);
|
|
1702
|
+
if (iterator) return iteratorClose$2(iterator, THROW, error);
|
|
1703
|
+
throw error;
|
|
1691
1704
|
}
|
|
1692
1705
|
if (iterator) iteratorClose$2(iterator, NORMAL);
|
|
1693
1706
|
return createIterResultObject(undefined, true);
|
|
@@ -1719,13 +1732,13 @@ var iteratorCreateProxy = function (nextHandler, IS_ITERATOR, RETURN_HANDLER_RES
|
|
|
1719
1732
|
return IteratorProxy;
|
|
1720
1733
|
};
|
|
1721
1734
|
|
|
1722
|
-
var anObject$
|
|
1735
|
+
var anObject$6 = anObject$d;
|
|
1723
1736
|
var iteratorClose$1 = iteratorClose$4;
|
|
1724
1737
|
|
|
1725
1738
|
// call something on iterator step with safe closing on error
|
|
1726
1739
|
var callWithSafeIterationClosing$1 = function (iterator, fn, value, ENTRIES) {
|
|
1727
1740
|
try {
|
|
1728
|
-
return ENTRIES ? fn(anObject$
|
|
1741
|
+
return ENTRIES ? fn(anObject$6(value)[0], value[1]) : fn(value);
|
|
1729
1742
|
} catch (error) {
|
|
1730
1743
|
iteratorClose$1(iterator, 'throw', error);
|
|
1731
1744
|
}
|
|
@@ -1767,9 +1780,9 @@ var iteratorHelperWithoutClosingOnEarlyError$1 = function (METHOD_NAME, Expected
|
|
|
1767
1780
|
};
|
|
1768
1781
|
|
|
1769
1782
|
var $$2 = _export;
|
|
1770
|
-
var call$
|
|
1783
|
+
var call$8 = functionCall;
|
|
1771
1784
|
var aCallable = aCallable$3;
|
|
1772
|
-
var anObject$
|
|
1785
|
+
var anObject$5 = anObject$d;
|
|
1773
1786
|
var getIteratorDirect = getIteratorDirect$1;
|
|
1774
1787
|
var createIteratorProxy = iteratorCreateProxy;
|
|
1775
1788
|
var callWithSafeIterationClosing = callWithSafeIterationClosing$1;
|
|
@@ -1785,7 +1798,7 @@ var FORCED = MAP_WITHOUT_THROWING_ON_INVALID_ITERATOR || mapWithoutClosingOnEarl
|
|
|
1785
1798
|
|
|
1786
1799
|
var IteratorProxy = createIteratorProxy(function () {
|
|
1787
1800
|
var iterator = this.iterator;
|
|
1788
|
-
var result = anObject$
|
|
1801
|
+
var result = anObject$5(call$8(this.next, iterator));
|
|
1789
1802
|
var done = this.done = !!result.done;
|
|
1790
1803
|
if (!done) return callWithSafeIterationClosing(iterator, this.mapper, [result.value, this.counter++], true);
|
|
1791
1804
|
});
|
|
@@ -1794,14 +1807,14 @@ var IteratorProxy = createIteratorProxy(function () {
|
|
|
1794
1807
|
// https://tc39.es/ecma262/#sec-iterator.prototype.map
|
|
1795
1808
|
$$2({ target: 'Iterator', proto: true, real: true, forced: FORCED }, {
|
|
1796
1809
|
map: function map(mapper) {
|
|
1797
|
-
anObject$
|
|
1810
|
+
anObject$5(this);
|
|
1798
1811
|
try {
|
|
1799
1812
|
aCallable(mapper);
|
|
1800
1813
|
} catch (error) {
|
|
1801
1814
|
iteratorClose(this, 'throw', error);
|
|
1802
1815
|
}
|
|
1803
1816
|
|
|
1804
|
-
if (mapWithoutClosingOnEarlyError) return call$
|
|
1817
|
+
if (mapWithoutClosingOnEarlyError) return call$8(mapWithoutClosingOnEarlyError, this, mapper);
|
|
1805
1818
|
|
|
1806
1819
|
return new IteratorProxy(getIteratorDirect(this), {
|
|
1807
1820
|
mapper: mapper
|
|
@@ -1810,9 +1823,9 @@ $$2({ target: 'Iterator', proto: true, real: true, forced: FORCED }, {
|
|
|
1810
1823
|
});
|
|
1811
1824
|
|
|
1812
1825
|
var DESCRIPTORS = descriptors;
|
|
1813
|
-
var uncurryThis$
|
|
1814
|
-
var call$
|
|
1815
|
-
var fails$
|
|
1826
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
1827
|
+
var call$7 = functionCall;
|
|
1828
|
+
var fails$8 = fails$k;
|
|
1816
1829
|
var objectKeys = objectKeys$2;
|
|
1817
1830
|
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
1818
1831
|
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
@@ -1823,11 +1836,11 @@ var IndexedObject = indexedObject;
|
|
|
1823
1836
|
var $assign = Object.assign;
|
|
1824
1837
|
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1825
1838
|
var defineProperty = Object.defineProperty;
|
|
1826
|
-
var concat$1 = uncurryThis$
|
|
1839
|
+
var concat$1 = uncurryThis$6([].concat);
|
|
1827
1840
|
|
|
1828
1841
|
// `Object.assign` method
|
|
1829
1842
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
1830
|
-
var objectAssign = !$assign || fails$
|
|
1843
|
+
var objectAssign = !$assign || fails$8(function () {
|
|
1831
1844
|
// should have correct order of operations (Edge bug)
|
|
1832
1845
|
if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {
|
|
1833
1846
|
enumerable: true,
|
|
@@ -1862,7 +1875,7 @@ var objectAssign = !$assign || fails$6(function () {
|
|
|
1862
1875
|
var key;
|
|
1863
1876
|
while (length > j) {
|
|
1864
1877
|
key = keys[j++];
|
|
1865
|
-
if (!DESCRIPTORS || call$
|
|
1878
|
+
if (!DESCRIPTORS || call$7(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
1866
1879
|
}
|
|
1867
1880
|
} return T;
|
|
1868
1881
|
} : $assign;
|
|
@@ -1877,9 +1890,9 @@ $$1({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }
|
|
|
1877
1890
|
assign: assign
|
|
1878
1891
|
});
|
|
1879
1892
|
|
|
1880
|
-
var wellKnownSymbol$
|
|
1893
|
+
var wellKnownSymbol$5 = wellKnownSymbol$d;
|
|
1881
1894
|
|
|
1882
|
-
var TO_STRING_TAG$1 = wellKnownSymbol$
|
|
1895
|
+
var TO_STRING_TAG$1 = wellKnownSymbol$5('toStringTag');
|
|
1883
1896
|
var test = {};
|
|
1884
1897
|
// eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation
|
|
1885
1898
|
test[TO_STRING_TAG$1] = 'z';
|
|
@@ -1887,11 +1900,11 @@ test[TO_STRING_TAG$1] = 'z';
|
|
|
1887
1900
|
var toStringTagSupport = String(test) === '[object z]';
|
|
1888
1901
|
|
|
1889
1902
|
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
1890
|
-
var isCallable$
|
|
1903
|
+
var isCallable$3 = isCallable$i;
|
|
1891
1904
|
var classofRaw = classofRaw$1;
|
|
1892
|
-
var wellKnownSymbol$
|
|
1905
|
+
var wellKnownSymbol$4 = wellKnownSymbol$d;
|
|
1893
1906
|
|
|
1894
|
-
var TO_STRING_TAG = wellKnownSymbol$
|
|
1907
|
+
var TO_STRING_TAG = wellKnownSymbol$4('toStringTag');
|
|
1895
1908
|
var $Object = Object;
|
|
1896
1909
|
|
|
1897
1910
|
// ES3 wrong here
|
|
@@ -1905,7 +1918,7 @@ var tryGet = function (it, key) {
|
|
|
1905
1918
|
};
|
|
1906
1919
|
|
|
1907
1920
|
// getting tag from ES6+ `Object.prototype.toString`
|
|
1908
|
-
var classof$
|
|
1921
|
+
var classof$3 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
1909
1922
|
var O, tag, result;
|
|
1910
1923
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
1911
1924
|
// @@toStringTag case
|
|
@@ -1913,24 +1926,24 @@ var classof$2 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
|
1913
1926
|
// builtinTag case
|
|
1914
1927
|
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
1915
1928
|
// ES3 arguments fallback
|
|
1916
|
-
: (result = classofRaw(O)) === 'Object' && isCallable$
|
|
1929
|
+
: (result = classofRaw(O)) === 'Object' && isCallable$3(O.callee) ? 'Arguments' : result;
|
|
1917
1930
|
};
|
|
1918
1931
|
|
|
1919
|
-
var classof$
|
|
1932
|
+
var classof$2 = classof$3;
|
|
1920
1933
|
|
|
1921
1934
|
var $String = String;
|
|
1922
1935
|
|
|
1923
|
-
var toString$
|
|
1924
|
-
if (classof$
|
|
1936
|
+
var toString$4 = function (argument) {
|
|
1937
|
+
if (classof$2(argument) === 'Symbol') throw new TypeError('Cannot convert a Symbol value to a string');
|
|
1925
1938
|
return $String(argument);
|
|
1926
1939
|
};
|
|
1927
1940
|
|
|
1928
|
-
var anObject$
|
|
1941
|
+
var anObject$4 = anObject$d;
|
|
1929
1942
|
|
|
1930
1943
|
// `RegExp.prototype.flags` getter implementation
|
|
1931
1944
|
// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
|
|
1932
1945
|
var regexpFlags$1 = function () {
|
|
1933
|
-
var that = anObject$
|
|
1946
|
+
var that = anObject$4(this);
|
|
1934
1947
|
var result = '';
|
|
1935
1948
|
if (that.hasIndices) result += 'd';
|
|
1936
1949
|
if (that.global) result += 'g';
|
|
@@ -1943,13 +1956,13 @@ var regexpFlags$1 = function () {
|
|
|
1943
1956
|
return result;
|
|
1944
1957
|
};
|
|
1945
1958
|
|
|
1946
|
-
var fails$
|
|
1959
|
+
var fails$7 = fails$k;
|
|
1947
1960
|
var globalThis$5 = globalThis_1;
|
|
1948
1961
|
|
|
1949
1962
|
// babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
|
|
1950
1963
|
var $RegExp$2 = globalThis$5.RegExp;
|
|
1951
1964
|
|
|
1952
|
-
var UNSUPPORTED_Y$
|
|
1965
|
+
var UNSUPPORTED_Y$2 = fails$7(function () {
|
|
1953
1966
|
var re = $RegExp$2('a', 'y');
|
|
1954
1967
|
re.lastIndex = 2;
|
|
1955
1968
|
return re.exec('abcd') !== null;
|
|
@@ -1957,11 +1970,11 @@ var UNSUPPORTED_Y$1 = fails$5(function () {
|
|
|
1957
1970
|
|
|
1958
1971
|
// UC Browser bug
|
|
1959
1972
|
// https://github.com/zloirock/core-js/issues/1008
|
|
1960
|
-
UNSUPPORTED_Y$
|
|
1973
|
+
UNSUPPORTED_Y$2 || fails$7(function () {
|
|
1961
1974
|
return !$RegExp$2('a', 'y').sticky;
|
|
1962
1975
|
});
|
|
1963
1976
|
|
|
1964
|
-
var BROKEN_CARET = UNSUPPORTED_Y$
|
|
1977
|
+
var BROKEN_CARET = UNSUPPORTED_Y$2 || fails$7(function () {
|
|
1965
1978
|
// https://bugzilla.mozilla.org/show_bug.cgi?id=773687
|
|
1966
1979
|
var re = $RegExp$2('^r', 'gy');
|
|
1967
1980
|
re.lastIndex = 2;
|
|
@@ -1969,26 +1982,28 @@ var BROKEN_CARET = UNSUPPORTED_Y$1 || fails$5(function () {
|
|
|
1969
1982
|
});
|
|
1970
1983
|
|
|
1971
1984
|
var regexpStickyHelpers = {
|
|
1972
|
-
BROKEN_CARET: BROKEN_CARET
|
|
1985
|
+
BROKEN_CARET: BROKEN_CARET,
|
|
1986
|
+
UNSUPPORTED_Y: UNSUPPORTED_Y$2
|
|
1987
|
+
};
|
|
1973
1988
|
|
|
1974
|
-
var fails$
|
|
1989
|
+
var fails$6 = fails$k;
|
|
1975
1990
|
var globalThis$4 = globalThis_1;
|
|
1976
1991
|
|
|
1977
1992
|
// babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
|
|
1978
1993
|
var $RegExp$1 = globalThis$4.RegExp;
|
|
1979
1994
|
|
|
1980
|
-
var regexpUnsupportedDotAll = fails$
|
|
1995
|
+
var regexpUnsupportedDotAll = fails$6(function () {
|
|
1981
1996
|
var re = $RegExp$1('.', 's');
|
|
1982
1997
|
return !(re.dotAll && re.test('\n') && re.flags === 's');
|
|
1983
1998
|
});
|
|
1984
1999
|
|
|
1985
|
-
var fails$
|
|
2000
|
+
var fails$5 = fails$k;
|
|
1986
2001
|
var globalThis$3 = globalThis_1;
|
|
1987
2002
|
|
|
1988
2003
|
// babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes SyntaxError
|
|
1989
2004
|
var $RegExp = globalThis$3.RegExp;
|
|
1990
2005
|
|
|
1991
|
-
var regexpUnsupportedNcg = fails$
|
|
2006
|
+
var regexpUnsupportedNcg = fails$5(function () {
|
|
1992
2007
|
var re = $RegExp('(?<a>b)', 'g');
|
|
1993
2008
|
return re.exec('b').groups.a !== 'b' ||
|
|
1994
2009
|
'b'.replace(re, '$<a>c') !== 'bc';
|
|
@@ -1996,11 +2011,11 @@ var regexpUnsupportedNcg = fails$3(function () {
|
|
|
1996
2011
|
|
|
1997
2012
|
/* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */
|
|
1998
2013
|
/* eslint-disable regexp/no-useless-quantifier -- testing */
|
|
1999
|
-
var call$
|
|
2000
|
-
var uncurryThis$
|
|
2001
|
-
var toString$
|
|
2014
|
+
var call$6 = functionCall;
|
|
2015
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
2016
|
+
var toString$3 = toString$4;
|
|
2002
2017
|
var regexpFlags = regexpFlags$1;
|
|
2003
|
-
var stickyHelpers = regexpStickyHelpers;
|
|
2018
|
+
var stickyHelpers$1 = regexpStickyHelpers;
|
|
2004
2019
|
var shared = shared$4;
|
|
2005
2020
|
var create = objectCreate;
|
|
2006
2021
|
var getInternalState = internalState.get;
|
|
@@ -2010,44 +2025,55 @@ var UNSUPPORTED_NCG = regexpUnsupportedNcg;
|
|
|
2010
2025
|
var nativeReplace = shared('native-string-replace', String.prototype.replace);
|
|
2011
2026
|
var nativeExec = RegExp.prototype.exec;
|
|
2012
2027
|
var patchedExec = nativeExec;
|
|
2013
|
-
var charAt$3 = uncurryThis$
|
|
2014
|
-
var indexOf = uncurryThis$
|
|
2015
|
-
var replace$1 = uncurryThis$
|
|
2016
|
-
var stringSlice$
|
|
2028
|
+
var charAt$3 = uncurryThis$5(''.charAt);
|
|
2029
|
+
var indexOf = uncurryThis$5(''.indexOf);
|
|
2030
|
+
var replace$1 = uncurryThis$5(''.replace);
|
|
2031
|
+
var stringSlice$4 = uncurryThis$5(''.slice);
|
|
2017
2032
|
|
|
2018
2033
|
var UPDATES_LAST_INDEX_WRONG = (function () {
|
|
2019
2034
|
var re1 = /a/;
|
|
2020
2035
|
var re2 = /b*/g;
|
|
2021
|
-
call$
|
|
2022
|
-
call$
|
|
2036
|
+
call$6(nativeExec, re1, 'a');
|
|
2037
|
+
call$6(nativeExec, re2, 'a');
|
|
2023
2038
|
return re1.lastIndex !== 0 || re2.lastIndex !== 0;
|
|
2024
2039
|
})();
|
|
2025
2040
|
|
|
2026
|
-
var UNSUPPORTED_Y = stickyHelpers.BROKEN_CARET;
|
|
2041
|
+
var UNSUPPORTED_Y$1 = stickyHelpers$1.BROKEN_CARET;
|
|
2027
2042
|
|
|
2028
2043
|
// nonparticipating capturing group, copied from es5-shim's String#split patch.
|
|
2029
2044
|
var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;
|
|
2030
2045
|
|
|
2031
|
-
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
|
|
2046
|
+
var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y$1 || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;
|
|
2047
|
+
|
|
2048
|
+
var setGroups = function (re, groups) {
|
|
2049
|
+
var object = re.groups = create(null);
|
|
2050
|
+
for (var i = 0; i < groups.length; i++) {
|
|
2051
|
+
var group = groups[i];
|
|
2052
|
+
object[group[0]] = re[group[1]];
|
|
2053
|
+
}
|
|
2054
|
+
};
|
|
2032
2055
|
|
|
2033
2056
|
if (PATCH) {
|
|
2034
2057
|
patchedExec = function exec(string) {
|
|
2035
2058
|
var re = this;
|
|
2036
2059
|
var state = getInternalState(re);
|
|
2037
|
-
var str = toString$
|
|
2060
|
+
var str = toString$3(string);
|
|
2038
2061
|
var raw = state.raw;
|
|
2039
|
-
var result, reCopy, lastIndex
|
|
2062
|
+
var result, reCopy, lastIndex;
|
|
2040
2063
|
|
|
2041
2064
|
if (raw) {
|
|
2042
2065
|
raw.lastIndex = re.lastIndex;
|
|
2043
|
-
result = call$
|
|
2066
|
+
result = call$6(patchedExec, raw, str);
|
|
2044
2067
|
re.lastIndex = raw.lastIndex;
|
|
2068
|
+
|
|
2069
|
+
if (result && state.groups) setGroups(result, state.groups);
|
|
2070
|
+
|
|
2045
2071
|
return result;
|
|
2046
2072
|
}
|
|
2047
2073
|
|
|
2048
2074
|
var groups = state.groups;
|
|
2049
|
-
var sticky = UNSUPPORTED_Y && re.sticky;
|
|
2050
|
-
var flags = call$
|
|
2075
|
+
var sticky = UNSUPPORTED_Y$1 && re.sticky;
|
|
2076
|
+
var flags = call$6(regexpFlags, re);
|
|
2051
2077
|
var source = re.source;
|
|
2052
2078
|
var charsAdded = 0;
|
|
2053
2079
|
var strCopy = str;
|
|
@@ -2058,10 +2084,12 @@ if (PATCH) {
|
|
|
2058
2084
|
flags += 'g';
|
|
2059
2085
|
}
|
|
2060
2086
|
|
|
2061
|
-
strCopy = stringSlice$
|
|
2087
|
+
strCopy = stringSlice$4(str, re.lastIndex);
|
|
2062
2088
|
// Support anchored sticky behavior.
|
|
2063
|
-
|
|
2064
|
-
|
|
2089
|
+
var prevChar = re.lastIndex > 0 && charAt$3(str, re.lastIndex - 1);
|
|
2090
|
+
if (re.lastIndex > 0 &&
|
|
2091
|
+
(!re.multiline || re.multiline && prevChar !== '\n' && prevChar !== '\r' && prevChar !== '\u2028' && prevChar !== '\u2029')) {
|
|
2092
|
+
source = '(?: (?:' + source + '))';
|
|
2065
2093
|
strCopy = ' ' + strCopy;
|
|
2066
2094
|
charsAdded++;
|
|
2067
2095
|
}
|
|
@@ -2075,12 +2103,12 @@ if (PATCH) {
|
|
|
2075
2103
|
}
|
|
2076
2104
|
if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;
|
|
2077
2105
|
|
|
2078
|
-
match = call$
|
|
2106
|
+
var match = call$6(nativeExec, sticky ? reCopy : re, strCopy);
|
|
2079
2107
|
|
|
2080
2108
|
if (sticky) {
|
|
2081
2109
|
if (match) {
|
|
2082
|
-
match.input =
|
|
2083
|
-
match[0] = stringSlice$
|
|
2110
|
+
match.input = str;
|
|
2111
|
+
match[0] = stringSlice$4(match[0], charsAdded);
|
|
2084
2112
|
match.index = re.lastIndex;
|
|
2085
2113
|
re.lastIndex += match[0].length;
|
|
2086
2114
|
} else re.lastIndex = 0;
|
|
@@ -2090,20 +2118,14 @@ if (PATCH) {
|
|
|
2090
2118
|
if (NPCG_INCLUDED && match && match.length > 1) {
|
|
2091
2119
|
// Fix browsers whose `exec` methods don't consistently return `undefined`
|
|
2092
2120
|
// for NPCG, like IE8. NOTE: This doesn't work for /(.?)?/
|
|
2093
|
-
call$
|
|
2094
|
-
for (i = 1; i < arguments.length - 2; i++) {
|
|
2121
|
+
call$6(nativeReplace, match[0], reCopy, function () {
|
|
2122
|
+
for (var i = 1; i < arguments.length - 2; i++) {
|
|
2095
2123
|
if (arguments[i] === undefined) match[i] = undefined;
|
|
2096
2124
|
}
|
|
2097
2125
|
});
|
|
2098
2126
|
}
|
|
2099
2127
|
|
|
2100
|
-
if (match && groups)
|
|
2101
|
-
match.groups = object = create(null);
|
|
2102
|
-
for (i = 0; i < groups.length; i++) {
|
|
2103
|
-
group = groups[i];
|
|
2104
|
-
object[group[0]] = match[group[1]];
|
|
2105
|
-
}
|
|
2106
|
-
}
|
|
2128
|
+
if (match && groups) setGroups(match, groups);
|
|
2107
2129
|
|
|
2108
2130
|
return match;
|
|
2109
2131
|
};
|
|
@@ -2112,41 +2134,41 @@ if (PATCH) {
|
|
|
2112
2134
|
var regexpExec$2 = patchedExec;
|
|
2113
2135
|
|
|
2114
2136
|
var $ = _export;
|
|
2115
|
-
var exec = regexpExec$2;
|
|
2137
|
+
var exec$1 = regexpExec$2;
|
|
2116
2138
|
|
|
2117
2139
|
// `RegExp.prototype.exec` method
|
|
2118
2140
|
// https://tc39.es/ecma262/#sec-regexp.prototype.exec
|
|
2119
|
-
$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {
|
|
2120
|
-
exec: exec
|
|
2141
|
+
$({ target: 'RegExp', proto: true, forced: /./.exec !== exec$1 }, {
|
|
2142
|
+
exec: exec$1
|
|
2121
2143
|
});
|
|
2122
2144
|
|
|
2123
2145
|
var NATIVE_BIND = functionBindNative;
|
|
2124
2146
|
|
|
2125
2147
|
var FunctionPrototype = Function.prototype;
|
|
2126
2148
|
var apply$1 = FunctionPrototype.apply;
|
|
2127
|
-
var call$
|
|
2149
|
+
var call$5 = FunctionPrototype.call;
|
|
2128
2150
|
|
|
2129
2151
|
// eslint-disable-next-line es/no-function-prototype-bind, es/no-reflect -- safe
|
|
2130
|
-
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$
|
|
2131
|
-
return call$
|
|
2152
|
+
var functionApply = typeof Reflect == 'object' && Reflect.apply || (NATIVE_BIND ? call$5.bind(apply$1) : function () {
|
|
2153
|
+
return call$5.apply(apply$1, arguments);
|
|
2132
2154
|
});
|
|
2133
2155
|
|
|
2134
2156
|
// TODO: Remove from `core-js@4` since it's moved to entry points
|
|
2135
2157
|
|
|
2136
|
-
var call$
|
|
2158
|
+
var call$4 = functionCall;
|
|
2137
2159
|
var defineBuiltIn = defineBuiltIn$5;
|
|
2138
2160
|
var regexpExec$1 = regexpExec$2;
|
|
2139
|
-
var fails$
|
|
2140
|
-
var wellKnownSymbol$
|
|
2161
|
+
var fails$4 = fails$k;
|
|
2162
|
+
var wellKnownSymbol$3 = wellKnownSymbol$d;
|
|
2141
2163
|
var createNonEnumerableProperty$1 = createNonEnumerableProperty$6;
|
|
2142
2164
|
|
|
2143
|
-
var SPECIES = wellKnownSymbol$
|
|
2165
|
+
var SPECIES$1 = wellKnownSymbol$3('species');
|
|
2144
2166
|
var RegExpPrototype$1 = RegExp.prototype;
|
|
2145
2167
|
|
|
2146
2168
|
var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
2147
|
-
var SYMBOL = wellKnownSymbol$
|
|
2169
|
+
var SYMBOL = wellKnownSymbol$3(KEY);
|
|
2148
2170
|
|
|
2149
|
-
var DELEGATES_TO_SYMBOL = !fails$
|
|
2171
|
+
var DELEGATES_TO_SYMBOL = !fails$4(function () {
|
|
2150
2172
|
// String methods call symbol-named RegExp methods
|
|
2151
2173
|
var O = {};
|
|
2152
2174
|
// eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation
|
|
@@ -2154,7 +2176,7 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
2154
2176
|
return ''[KEY](O) !== 7;
|
|
2155
2177
|
});
|
|
2156
2178
|
|
|
2157
|
-
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$
|
|
2179
|
+
var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails$4(function () {
|
|
2158
2180
|
// Symbol-named RegExp methods call .exec
|
|
2159
2181
|
var execCalled = false;
|
|
2160
2182
|
var re = /a/;
|
|
@@ -2167,7 +2189,7 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
2167
2189
|
// a new one. We need to return the patched regex when creating the new one.
|
|
2168
2190
|
var constructor = {};
|
|
2169
2191
|
// eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation
|
|
2170
|
-
constructor[SPECIES] = function () { return re; };
|
|
2192
|
+
constructor[SPECIES$1] = function () { return re; };
|
|
2171
2193
|
re = { constructor: constructor, flags: '' };
|
|
2172
2194
|
// eslint-disable-next-line unicorn/no-immediate-mutation -- ES3 syntax limitation
|
|
2173
2195
|
re[SYMBOL] = /./[SYMBOL];
|
|
@@ -2195,9 +2217,9 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
2195
2217
|
// The native String method already delegates to @@method (this
|
|
2196
2218
|
// polyfilled function), leasing to infinite recursion.
|
|
2197
2219
|
// We avoid it by directly calling the native @@method method.
|
|
2198
|
-
return { done: true, value: call$
|
|
2220
|
+
return { done: true, value: call$4(nativeRegExpMethod, regexp, str, arg2) };
|
|
2199
2221
|
}
|
|
2200
|
-
return { done: true, value: call$
|
|
2222
|
+
return { done: true, value: call$4(nativeMethod, str, regexp, arg2) };
|
|
2201
2223
|
}
|
|
2202
2224
|
return { done: false };
|
|
2203
2225
|
});
|
|
@@ -2209,18 +2231,18 @@ var fixRegexpWellKnownSymbolLogic = function (KEY, exec, FORCED, SHAM) {
|
|
|
2209
2231
|
if (SHAM) createNonEnumerableProperty$1(RegExpPrototype$1[SYMBOL], 'sham', true);
|
|
2210
2232
|
};
|
|
2211
2233
|
|
|
2212
|
-
var uncurryThis$
|
|
2234
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
2213
2235
|
var toIntegerOrInfinity$1 = toIntegerOrInfinity$4;
|
|
2214
|
-
var toString$
|
|
2215
|
-
var requireObjectCoercible$
|
|
2236
|
+
var toString$2 = toString$4;
|
|
2237
|
+
var requireObjectCoercible$2 = requireObjectCoercible$6;
|
|
2216
2238
|
|
|
2217
|
-
var charAt$2 = uncurryThis$
|
|
2218
|
-
var charCodeAt = uncurryThis$
|
|
2219
|
-
var stringSlice$
|
|
2239
|
+
var charAt$2 = uncurryThis$4(''.charAt);
|
|
2240
|
+
var charCodeAt = uncurryThis$4(''.charCodeAt);
|
|
2241
|
+
var stringSlice$3 = uncurryThis$4(''.slice);
|
|
2220
2242
|
|
|
2221
2243
|
var createMethod = function (CONVERT_TO_STRING) {
|
|
2222
2244
|
return function ($this, pos) {
|
|
2223
|
-
var S = toString$
|
|
2245
|
+
var S = toString$2(requireObjectCoercible$2($this));
|
|
2224
2246
|
var position = toIntegerOrInfinity$1(pos);
|
|
2225
2247
|
var size = S.length;
|
|
2226
2248
|
var first, second;
|
|
@@ -2232,7 +2254,7 @@ var createMethod = function (CONVERT_TO_STRING) {
|
|
|
2232
2254
|
? charAt$2(S, position)
|
|
2233
2255
|
: first
|
|
2234
2256
|
: CONVERT_TO_STRING
|
|
2235
|
-
? stringSlice$
|
|
2257
|
+
? stringSlice$3(S, position, position + 2)
|
|
2236
2258
|
: (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
|
|
2237
2259
|
};
|
|
2238
2260
|
};
|
|
@@ -2247,17 +2269,17 @@ var charAt$1 = stringMultibyte.charAt;
|
|
|
2247
2269
|
|
|
2248
2270
|
// `AdvanceStringIndex` abstract operation
|
|
2249
2271
|
// https://tc39.es/ecma262/#sec-advancestringindex
|
|
2250
|
-
var advanceStringIndex$
|
|
2251
|
-
return index + (unicode ? charAt$1(S, index).length : 1);
|
|
2272
|
+
var advanceStringIndex$2 = function (S, index, unicode) {
|
|
2273
|
+
return index + (unicode ? charAt$1(S, index).length || 1 : 1);
|
|
2252
2274
|
};
|
|
2253
2275
|
|
|
2254
|
-
var uncurryThis$
|
|
2276
|
+
var uncurryThis$3 = functionUncurryThis;
|
|
2255
2277
|
var toObject = toObject$4;
|
|
2256
2278
|
|
|
2257
2279
|
var floor = Math.floor;
|
|
2258
|
-
var charAt = uncurryThis$
|
|
2259
|
-
var replace = uncurryThis$
|
|
2260
|
-
var stringSlice$
|
|
2280
|
+
var charAt = uncurryThis$3(''.charAt);
|
|
2281
|
+
var replace = uncurryThis$3(''.replace);
|
|
2282
|
+
var stringSlice$2 = uncurryThis$3(''.slice);
|
|
2261
2283
|
// eslint-disable-next-line redos/no-vulnerable -- safe
|
|
2262
2284
|
var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g;
|
|
2263
2285
|
var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g;
|
|
@@ -2277,10 +2299,10 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
|
|
|
2277
2299
|
switch (charAt(ch, 0)) {
|
|
2278
2300
|
case '$': return '$';
|
|
2279
2301
|
case '&': return matched;
|
|
2280
|
-
case '`': return stringSlice$
|
|
2281
|
-
case "'": return stringSlice$
|
|
2302
|
+
case '`': return stringSlice$2(str, 0, position);
|
|
2303
|
+
case "'": return stringSlice$2(str, tailPos);
|
|
2282
2304
|
case '<':
|
|
2283
|
-
capture = namedCaptures[stringSlice$
|
|
2305
|
+
capture = namedCaptures[stringSlice$2(ch, 1, -1)];
|
|
2284
2306
|
break;
|
|
2285
2307
|
default: // \d\d?
|
|
2286
2308
|
var n = +ch;
|
|
@@ -2298,12 +2320,12 @@ var getSubstitution$1 = function (matched, str, position, captures, namedCapture
|
|
|
2298
2320
|
};
|
|
2299
2321
|
|
|
2300
2322
|
var globalThis$2 = globalThis_1;
|
|
2301
|
-
var fails$
|
|
2323
|
+
var fails$3 = fails$k;
|
|
2302
2324
|
|
|
2303
2325
|
// babel-minify and Closure Compiler transpiles RegExp('.', 'd') -> /./d and it causes SyntaxError
|
|
2304
2326
|
var RegExp$1 = globalThis$2.RegExp;
|
|
2305
2327
|
|
|
2306
|
-
var FLAGS_GETTER_IS_CORRECT = !fails$
|
|
2328
|
+
var FLAGS_GETTER_IS_CORRECT = !fails$3(function () {
|
|
2307
2329
|
var INDICES_SUPPORT = true;
|
|
2308
2330
|
try {
|
|
2309
2331
|
RegExp$1('.', 'd');
|
|
@@ -2344,7 +2366,7 @@ var FLAGS_GETTER_IS_CORRECT = !fails$1(function () {
|
|
|
2344
2366
|
|
|
2345
2367
|
var regexpFlagsDetection = { correct: FLAGS_GETTER_IS_CORRECT };
|
|
2346
2368
|
|
|
2347
|
-
var call$
|
|
2369
|
+
var call$3 = functionCall;
|
|
2348
2370
|
var hasOwn = hasOwnProperty_1;
|
|
2349
2371
|
var isPrototypeOf = objectIsPrototypeOf;
|
|
2350
2372
|
var regExpFlagsDetection = regexpFlagsDetection;
|
|
@@ -2356,57 +2378,57 @@ var regexpGetFlags = regExpFlagsDetection.correct ? function (it) {
|
|
|
2356
2378
|
return it.flags;
|
|
2357
2379
|
} : function (it) {
|
|
2358
2380
|
return (!regExpFlagsDetection.correct && isPrototypeOf(RegExpPrototype, it) && !hasOwn(it, 'flags'))
|
|
2359
|
-
? call$
|
|
2381
|
+
? call$3(regExpFlagsGetterImplementation, it)
|
|
2360
2382
|
: it.flags;
|
|
2361
2383
|
};
|
|
2362
2384
|
|
|
2363
|
-
var call$
|
|
2364
|
-
var anObject$
|
|
2365
|
-
var isCallable$
|
|
2366
|
-
var classof = classofRaw$1;
|
|
2385
|
+
var call$2 = functionCall;
|
|
2386
|
+
var anObject$3 = anObject$d;
|
|
2387
|
+
var isCallable$2 = isCallable$i;
|
|
2388
|
+
var classof$1 = classofRaw$1;
|
|
2367
2389
|
var regexpExec = regexpExec$2;
|
|
2368
2390
|
|
|
2369
|
-
var $TypeError = TypeError;
|
|
2391
|
+
var $TypeError$1 = TypeError;
|
|
2370
2392
|
|
|
2371
2393
|
// `RegExpExec` abstract operation
|
|
2372
2394
|
// https://tc39.es/ecma262/#sec-regexpexec
|
|
2373
2395
|
var regexpExecAbstract = function (R, S) {
|
|
2374
2396
|
var exec = R.exec;
|
|
2375
|
-
if (isCallable$
|
|
2376
|
-
var result = call$
|
|
2377
|
-
if (result !== null) anObject$
|
|
2397
|
+
if (isCallable$2(exec)) {
|
|
2398
|
+
var result = call$2(exec, R, S);
|
|
2399
|
+
if (result !== null) anObject$3(result);
|
|
2378
2400
|
return result;
|
|
2379
2401
|
}
|
|
2380
|
-
if (classof(R) === 'RegExp') return call$
|
|
2381
|
-
throw new $TypeError('RegExp#exec called on incompatible receiver');
|
|
2402
|
+
if (classof$1(R) === 'RegExp') return call$2(regexpExec, R, S);
|
|
2403
|
+
throw new $TypeError$1('RegExp#exec called on incompatible receiver');
|
|
2382
2404
|
};
|
|
2383
2405
|
|
|
2384
2406
|
var apply = functionApply;
|
|
2385
|
-
var call = functionCall;
|
|
2386
|
-
var uncurryThis = functionUncurryThis;
|
|
2387
|
-
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
2388
|
-
var fails = fails$
|
|
2389
|
-
var anObject = anObject$
|
|
2390
|
-
var isCallable = isCallable$
|
|
2391
|
-
var isObject = isObject$
|
|
2407
|
+
var call$1 = functionCall;
|
|
2408
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
2409
|
+
var fixRegExpWellKnownSymbolLogic$1 = fixRegexpWellKnownSymbolLogic;
|
|
2410
|
+
var fails$2 = fails$k;
|
|
2411
|
+
var anObject$2 = anObject$d;
|
|
2412
|
+
var isCallable$1 = isCallable$i;
|
|
2413
|
+
var isObject$1 = isObject$a;
|
|
2392
2414
|
var toIntegerOrInfinity = toIntegerOrInfinity$4;
|
|
2393
|
-
var toLength = toLength$
|
|
2394
|
-
var toString = toString$
|
|
2395
|
-
var requireObjectCoercible = requireObjectCoercible$
|
|
2396
|
-
var advanceStringIndex = advanceStringIndex$
|
|
2397
|
-
var getMethod = getMethod$
|
|
2415
|
+
var toLength$1 = toLength$3;
|
|
2416
|
+
var toString$1 = toString$4;
|
|
2417
|
+
var requireObjectCoercible$1 = requireObjectCoercible$6;
|
|
2418
|
+
var advanceStringIndex$1 = advanceStringIndex$2;
|
|
2419
|
+
var getMethod$1 = getMethod$5;
|
|
2398
2420
|
var getSubstitution = getSubstitution$1;
|
|
2399
|
-
var getRegExpFlags = regexpGetFlags;
|
|
2400
|
-
var regExpExec = regexpExecAbstract;
|
|
2401
|
-
var wellKnownSymbol$
|
|
2421
|
+
var getRegExpFlags$1 = regexpGetFlags;
|
|
2422
|
+
var regExpExec$1 = regexpExecAbstract;
|
|
2423
|
+
var wellKnownSymbol$2 = wellKnownSymbol$d;
|
|
2402
2424
|
|
|
2403
|
-
var REPLACE = wellKnownSymbol$
|
|
2425
|
+
var REPLACE = wellKnownSymbol$2('replace');
|
|
2404
2426
|
var max = Math.max;
|
|
2405
|
-
var min = Math.min;
|
|
2406
|
-
var concat = uncurryThis([].concat);
|
|
2407
|
-
var push = uncurryThis([].push);
|
|
2408
|
-
var stringIndexOf = uncurryThis(''.indexOf);
|
|
2409
|
-
var stringSlice = uncurryThis(''.slice);
|
|
2427
|
+
var min$1 = Math.min;
|
|
2428
|
+
var concat = uncurryThis$2([].concat);
|
|
2429
|
+
var push$1 = uncurryThis$2([].push);
|
|
2430
|
+
var stringIndexOf$1 = uncurryThis$2(''.indexOf);
|
|
2431
|
+
var stringSlice$1 = uncurryThis$2(''.slice);
|
|
2410
2432
|
|
|
2411
2433
|
var maybeToString = function (it) {
|
|
2412
2434
|
return it === undefined ? it : String(it);
|
|
@@ -2427,7 +2449,7 @@ var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {
|
|
|
2427
2449
|
return false;
|
|
2428
2450
|
})();
|
|
2429
2451
|
|
|
2430
|
-
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
|
2452
|
+
var REPLACE_SUPPORTS_NAMED_GROUPS = !fails$2(function () {
|
|
2431
2453
|
var re = /./;
|
|
2432
2454
|
re.exec = function () {
|
|
2433
2455
|
var result = [];
|
|
@@ -2439,56 +2461,57 @@ var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {
|
|
|
2439
2461
|
});
|
|
2440
2462
|
|
|
2441
2463
|
// @@replace logic
|
|
2442
|
-
fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) {
|
|
2464
|
+
fixRegExpWellKnownSymbolLogic$1('replace', function (_, nativeReplace, maybeCallNative) {
|
|
2443
2465
|
var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0';
|
|
2444
2466
|
|
|
2445
2467
|
return [
|
|
2446
2468
|
// `String.prototype.replace` method
|
|
2447
2469
|
// https://tc39.es/ecma262/#sec-string.prototype.replace
|
|
2448
2470
|
function replace(searchValue, replaceValue) {
|
|
2449
|
-
var O = requireObjectCoercible(this);
|
|
2450
|
-
var replacer = isObject(searchValue) ? getMethod(searchValue, REPLACE) : undefined;
|
|
2471
|
+
var O = requireObjectCoercible$1(this);
|
|
2472
|
+
var replacer = isObject$1(searchValue) ? getMethod$1(searchValue, REPLACE) : undefined;
|
|
2451
2473
|
return replacer
|
|
2452
|
-
? call(replacer, searchValue, O, replaceValue)
|
|
2453
|
-
: call(nativeReplace, toString(O), searchValue, replaceValue);
|
|
2474
|
+
? call$1(replacer, searchValue, O, replaceValue)
|
|
2475
|
+
: call$1(nativeReplace, toString$1(O), searchValue, replaceValue);
|
|
2454
2476
|
},
|
|
2455
2477
|
// `RegExp.prototype[@@replace]` method
|
|
2456
2478
|
// https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
|
|
2457
2479
|
function (string, replaceValue) {
|
|
2458
|
-
var rx = anObject(this);
|
|
2459
|
-
var S = toString(string);
|
|
2480
|
+
var rx = anObject$2(this);
|
|
2481
|
+
var S = toString$1(string);
|
|
2482
|
+
|
|
2483
|
+
var functionalReplace = isCallable$1(replaceValue);
|
|
2484
|
+
if (!functionalReplace) replaceValue = toString$1(replaceValue);
|
|
2485
|
+
var flags = toString$1(getRegExpFlags$1(rx));
|
|
2460
2486
|
|
|
2461
2487
|
if (
|
|
2462
2488
|
typeof replaceValue == 'string' &&
|
|
2463
|
-
stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE)
|
|
2464
|
-
stringIndexOf(replaceValue, '$<')
|
|
2489
|
+
!~stringIndexOf$1(replaceValue, UNSAFE_SUBSTITUTE) &&
|
|
2490
|
+
!~stringIndexOf$1(replaceValue, '$<') &&
|
|
2491
|
+
!~stringIndexOf$1(flags, 'y')
|
|
2465
2492
|
) {
|
|
2466
2493
|
var res = maybeCallNative(nativeReplace, rx, S, replaceValue);
|
|
2467
2494
|
if (res.done) return res.value;
|
|
2468
2495
|
}
|
|
2469
2496
|
|
|
2470
|
-
var
|
|
2471
|
-
if (!functionalReplace) replaceValue = toString(replaceValue);
|
|
2472
|
-
|
|
2473
|
-
var flags = toString(getRegExpFlags(rx));
|
|
2474
|
-
var global = stringIndexOf(flags, 'g') !== -1;
|
|
2497
|
+
var global = !!~stringIndexOf$1(flags, 'g');
|
|
2475
2498
|
var fullUnicode;
|
|
2476
2499
|
if (global) {
|
|
2477
|
-
fullUnicode = stringIndexOf(flags, 'u')
|
|
2500
|
+
fullUnicode = !!~stringIndexOf$1(flags, 'u') || !!~stringIndexOf$1(flags, 'v');
|
|
2478
2501
|
rx.lastIndex = 0;
|
|
2479
2502
|
}
|
|
2480
2503
|
|
|
2481
2504
|
var results = [];
|
|
2482
2505
|
var result;
|
|
2483
2506
|
while (true) {
|
|
2484
|
-
result = regExpExec(rx, S);
|
|
2507
|
+
result = regExpExec$1(rx, S);
|
|
2485
2508
|
if (result === null) break;
|
|
2486
2509
|
|
|
2487
|
-
push(results, result);
|
|
2510
|
+
push$1(results, result);
|
|
2488
2511
|
if (!global) break;
|
|
2489
2512
|
|
|
2490
|
-
var matchStr = toString(result[0]);
|
|
2491
|
-
if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode);
|
|
2513
|
+
var matchStr = toString$1(result[0]);
|
|
2514
|
+
if (matchStr === '') rx.lastIndex = advanceStringIndex$1(S, toLength$1(rx.lastIndex), fullUnicode);
|
|
2492
2515
|
}
|
|
2493
2516
|
|
|
2494
2517
|
var accumulatedResult = '';
|
|
@@ -2496,8 +2519,8 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
2496
2519
|
for (var i = 0; i < results.length; i++) {
|
|
2497
2520
|
result = results[i];
|
|
2498
2521
|
|
|
2499
|
-
var matched = toString(result[0]);
|
|
2500
|
-
var position = max(min(toIntegerOrInfinity(result.index), S.length), 0);
|
|
2522
|
+
var matched = toString$1(result[0]);
|
|
2523
|
+
var position = max(min$1(toIntegerOrInfinity(result.index), S.length), 0);
|
|
2501
2524
|
var captures = [];
|
|
2502
2525
|
var replacement;
|
|
2503
2526
|
// NOTE: This is equivalent to
|
|
@@ -2505,26 +2528,217 @@ fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNa
|
|
|
2505
2528
|
// but for some reason `nativeSlice.call(result, 1, result.length)` (called in
|
|
2506
2529
|
// the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and
|
|
2507
2530
|
// causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it.
|
|
2508
|
-
for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j]));
|
|
2531
|
+
for (var j = 1; j < result.length; j++) push$1(captures, maybeToString(result[j]));
|
|
2509
2532
|
var namedCaptures = result.groups;
|
|
2510
2533
|
if (functionalReplace) {
|
|
2511
2534
|
var replacerArgs = concat([matched], captures, position, S);
|
|
2512
|
-
if (namedCaptures !== undefined) push(replacerArgs, namedCaptures);
|
|
2513
|
-
replacement = toString(apply(replaceValue, undefined, replacerArgs));
|
|
2535
|
+
if (namedCaptures !== undefined) push$1(replacerArgs, namedCaptures);
|
|
2536
|
+
replacement = toString$1(apply(replaceValue, undefined, replacerArgs));
|
|
2514
2537
|
} else {
|
|
2515
2538
|
replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue);
|
|
2516
2539
|
}
|
|
2517
2540
|
if (position >= nextSourcePosition) {
|
|
2518
|
-
accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement;
|
|
2541
|
+
accumulatedResult += stringSlice$1(S, nextSourcePosition, position) + replacement;
|
|
2519
2542
|
nextSourcePosition = position + matched.length;
|
|
2520
2543
|
}
|
|
2521
2544
|
}
|
|
2522
2545
|
|
|
2523
|
-
return accumulatedResult + stringSlice(S, nextSourcePosition);
|
|
2546
|
+
return accumulatedResult + stringSlice$1(S, nextSourcePosition);
|
|
2524
2547
|
}
|
|
2525
2548
|
];
|
|
2526
2549
|
}, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE);
|
|
2527
2550
|
|
|
2551
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
2552
|
+
var fails$1 = fails$k;
|
|
2553
|
+
var isCallable = isCallable$i;
|
|
2554
|
+
var classof = classof$3;
|
|
2555
|
+
var getBuiltIn = getBuiltIn$4;
|
|
2556
|
+
var inspectSource = inspectSource$2;
|
|
2557
|
+
|
|
2558
|
+
var noop = function () { /* empty */ };
|
|
2559
|
+
var construct = getBuiltIn('Reflect', 'construct');
|
|
2560
|
+
var constructorRegExp = /^\s*(?:class|function)\b/;
|
|
2561
|
+
var exec = uncurryThis$1(constructorRegExp.exec);
|
|
2562
|
+
var INCORRECT_TO_STRING = !constructorRegExp.test(noop);
|
|
2563
|
+
|
|
2564
|
+
var isConstructorModern = function isConstructor(argument) {
|
|
2565
|
+
if (!isCallable(argument)) return false;
|
|
2566
|
+
try {
|
|
2567
|
+
construct(noop, [], argument);
|
|
2568
|
+
return true;
|
|
2569
|
+
} catch (error) {
|
|
2570
|
+
return false;
|
|
2571
|
+
}
|
|
2572
|
+
};
|
|
2573
|
+
|
|
2574
|
+
var isConstructorLegacy = function isConstructor(argument) {
|
|
2575
|
+
if (!isCallable(argument)) return false;
|
|
2576
|
+
switch (classof(argument)) {
|
|
2577
|
+
case 'AsyncFunction':
|
|
2578
|
+
case 'GeneratorFunction':
|
|
2579
|
+
case 'AsyncGeneratorFunction': return false;
|
|
2580
|
+
}
|
|
2581
|
+
try {
|
|
2582
|
+
// we can't check .prototype since constructors produced by .bind haven't it
|
|
2583
|
+
// `Function#toString` throws on some built-it function in some legacy engines
|
|
2584
|
+
// (for example, `DOMQuad` and similar in FF41-)
|
|
2585
|
+
return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument));
|
|
2586
|
+
} catch (error) {
|
|
2587
|
+
return true;
|
|
2588
|
+
}
|
|
2589
|
+
};
|
|
2590
|
+
|
|
2591
|
+
isConstructorLegacy.sham = true;
|
|
2592
|
+
|
|
2593
|
+
// `IsConstructor` abstract operation
|
|
2594
|
+
// https://tc39.es/ecma262/#sec-isconstructor
|
|
2595
|
+
var isConstructor$1 = !construct || fails$1(function () {
|
|
2596
|
+
var called;
|
|
2597
|
+
return isConstructorModern(isConstructorModern.call)
|
|
2598
|
+
|| !isConstructorModern(Object)
|
|
2599
|
+
|| !isConstructorModern(function () { called = true; })
|
|
2600
|
+
|| called;
|
|
2601
|
+
}) ? isConstructorLegacy : isConstructorModern;
|
|
2602
|
+
|
|
2603
|
+
var isConstructor = isConstructor$1;
|
|
2604
|
+
var tryToString = tryToString$2;
|
|
2605
|
+
|
|
2606
|
+
var $TypeError = TypeError;
|
|
2607
|
+
|
|
2608
|
+
// `Assert: IsConstructor(argument) is true`
|
|
2609
|
+
var aConstructor$1 = function (argument) {
|
|
2610
|
+
if (isConstructor(argument)) return argument;
|
|
2611
|
+
throw new $TypeError(tryToString(argument) + ' is not a constructor');
|
|
2612
|
+
};
|
|
2613
|
+
|
|
2614
|
+
var anObject$1 = anObject$d;
|
|
2615
|
+
var aConstructor = aConstructor$1;
|
|
2616
|
+
var isNullOrUndefined = isNullOrUndefined$3;
|
|
2617
|
+
var wellKnownSymbol$1 = wellKnownSymbol$d;
|
|
2618
|
+
|
|
2619
|
+
var SPECIES = wellKnownSymbol$1('species');
|
|
2620
|
+
|
|
2621
|
+
// `SpeciesConstructor` abstract operation
|
|
2622
|
+
// https://tc39.es/ecma262/#sec-speciesconstructor
|
|
2623
|
+
var speciesConstructor$1 = function (O, defaultConstructor) {
|
|
2624
|
+
var C = anObject$1(O).constructor;
|
|
2625
|
+
var S;
|
|
2626
|
+
return C === undefined || isNullOrUndefined(S = anObject$1(C)[SPECIES]) ? defaultConstructor : aConstructor(S);
|
|
2627
|
+
};
|
|
2628
|
+
|
|
2629
|
+
var call = functionCall;
|
|
2630
|
+
var uncurryThis = functionUncurryThis;
|
|
2631
|
+
var fixRegExpWellKnownSymbolLogic = fixRegexpWellKnownSymbolLogic;
|
|
2632
|
+
var anObject = anObject$d;
|
|
2633
|
+
var isObject = isObject$a;
|
|
2634
|
+
var requireObjectCoercible = requireObjectCoercible$6;
|
|
2635
|
+
var speciesConstructor = speciesConstructor$1;
|
|
2636
|
+
var advanceStringIndex = advanceStringIndex$2;
|
|
2637
|
+
var toLength = toLength$3;
|
|
2638
|
+
var toString = toString$4;
|
|
2639
|
+
var getMethod = getMethod$5;
|
|
2640
|
+
var getRegExpFlags = regexpGetFlags;
|
|
2641
|
+
var regExpExec = regexpExecAbstract;
|
|
2642
|
+
var stickyHelpers = regexpStickyHelpers;
|
|
2643
|
+
var fails = fails$k;
|
|
2644
|
+
|
|
2645
|
+
var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y;
|
|
2646
|
+
var MAX_UINT32 = 0xFFFFFFFF;
|
|
2647
|
+
var min = Math.min;
|
|
2648
|
+
var push = uncurryThis([].push);
|
|
2649
|
+
var stringSlice = uncurryThis(''.slice);
|
|
2650
|
+
var stringIndexOf = uncurryThis(''.indexOf);
|
|
2651
|
+
|
|
2652
|
+
// Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec
|
|
2653
|
+
// Weex JS has frozen built-in prototypes, so use try / catch wrapper
|
|
2654
|
+
var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {
|
|
2655
|
+
// eslint-disable-next-line regexp/no-empty-group -- required for testing
|
|
2656
|
+
var re = /(?:)/;
|
|
2657
|
+
var originalExec = re.exec;
|
|
2658
|
+
re.exec = function () { return originalExec.apply(this, arguments); };
|
|
2659
|
+
var result = 'ab'.split(re);
|
|
2660
|
+
return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';
|
|
2661
|
+
});
|
|
2662
|
+
|
|
2663
|
+
var BUGGY = 'abbc'.split(/(b)*/)[1] === 'c' ||
|
|
2664
|
+
// eslint-disable-next-line regexp/no-empty-group -- required for testing
|
|
2665
|
+
'test'.split(/(?:)/, -1).length !== 4 ||
|
|
2666
|
+
'ab'.split(/(?:ab)*/).length !== 2 ||
|
|
2667
|
+
'.'.split(/(.?)(.?)/).length !== 4 ||
|
|
2668
|
+
// eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing
|
|
2669
|
+
'.'.split(/()()/).length > 1 ||
|
|
2670
|
+
''.split(/.?/).length;
|
|
2671
|
+
|
|
2672
|
+
// @@split logic
|
|
2673
|
+
fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) {
|
|
2674
|
+
var internalSplit = '0'.split(undefined, 0).length ? function (separator, limit) {
|
|
2675
|
+
return separator === undefined && limit === 0 ? [] : call(nativeSplit, this, separator, limit);
|
|
2676
|
+
} : nativeSplit;
|
|
2677
|
+
|
|
2678
|
+
return [
|
|
2679
|
+
// `String.prototype.split` method
|
|
2680
|
+
// https://tc39.es/ecma262/#sec-string.prototype.split
|
|
2681
|
+
function split(separator, limit) {
|
|
2682
|
+
var O = requireObjectCoercible(this);
|
|
2683
|
+
var splitter = isObject(separator) ? getMethod(separator, SPLIT) : undefined;
|
|
2684
|
+
return splitter
|
|
2685
|
+
? call(splitter, separator, O, limit)
|
|
2686
|
+
: call(internalSplit, toString(O), separator, limit);
|
|
2687
|
+
},
|
|
2688
|
+
// `RegExp.prototype[@@split]` method
|
|
2689
|
+
// https://tc39.es/ecma262/#sec-regexp.prototype-@@split
|
|
2690
|
+
//
|
|
2691
|
+
// NOTE: This cannot be properly polyfilled in engines that don't support
|
|
2692
|
+
// the 'y' flag.
|
|
2693
|
+
function (string, limit) {
|
|
2694
|
+
var rx = anObject(this);
|
|
2695
|
+
var S = toString(string);
|
|
2696
|
+
|
|
2697
|
+
if (!BUGGY) {
|
|
2698
|
+
var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit);
|
|
2699
|
+
if (res.done) return res.value;
|
|
2700
|
+
}
|
|
2701
|
+
|
|
2702
|
+
var C = speciesConstructor(rx, RegExp);
|
|
2703
|
+
var flags = toString(getRegExpFlags(rx));
|
|
2704
|
+
var unicodeMatching = !!~stringIndexOf(flags, 'u') || !!~stringIndexOf(flags, 'v');
|
|
2705
|
+
if (UNSUPPORTED_Y) {
|
|
2706
|
+
if (!~stringIndexOf(flags, 'g')) flags += 'g';
|
|
2707
|
+
} else if (!~stringIndexOf(flags, 'y')) flags += 'y';
|
|
2708
|
+
// ^(? + rx + ) is needed, in combination with some S slicing, to
|
|
2709
|
+
// simulate the 'y' flag.
|
|
2710
|
+
var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags);
|
|
2711
|
+
var lim = limit === undefined ? MAX_UINT32 : limit >>> 0;
|
|
2712
|
+
if (lim === 0) return [];
|
|
2713
|
+
if (S.length === 0) return regExpExec(splitter, S) === null ? [S] : [];
|
|
2714
|
+
var p = 0;
|
|
2715
|
+
var q = 0;
|
|
2716
|
+
var A = [];
|
|
2717
|
+
while (q < S.length) {
|
|
2718
|
+
splitter.lastIndex = UNSUPPORTED_Y ? 0 : q;
|
|
2719
|
+
var z = regExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S);
|
|
2720
|
+
var e;
|
|
2721
|
+
if (
|
|
2722
|
+
z === null ||
|
|
2723
|
+
(e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p
|
|
2724
|
+
) {
|
|
2725
|
+
q = advanceStringIndex(S, q, unicodeMatching);
|
|
2726
|
+
} else {
|
|
2727
|
+
push(A, stringSlice(S, p, q));
|
|
2728
|
+
if (A.length === lim) return A;
|
|
2729
|
+
for (var i = 1; i <= z.length - 1; i++) {
|
|
2730
|
+
push(A, z[i]);
|
|
2731
|
+
if (A.length === lim) return A;
|
|
2732
|
+
}
|
|
2733
|
+
q = p = e;
|
|
2734
|
+
}
|
|
2735
|
+
}
|
|
2736
|
+
push(A, stringSlice(S, p));
|
|
2737
|
+
return A;
|
|
2738
|
+
}
|
|
2739
|
+
];
|
|
2740
|
+
}, BUGGY || !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y);
|
|
2741
|
+
|
|
2528
2742
|
// iterable DOM collections
|
|
2529
2743
|
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
2530
2744
|
var domIterables = {
|
|
@@ -2575,7 +2789,7 @@ var DOMTokenListPrototype = domTokenListPrototype;
|
|
|
2575
2789
|
var ArrayIteratorMethods = es_array_iterator;
|
|
2576
2790
|
var createNonEnumerableProperty = createNonEnumerableProperty$6;
|
|
2577
2791
|
var setToStringTag = setToStringTag$3;
|
|
2578
|
-
var wellKnownSymbol = wellKnownSymbol$
|
|
2792
|
+
var wellKnownSymbol = wellKnownSymbol$d;
|
|
2579
2793
|
|
|
2580
2794
|
var ITERATOR = wellKnownSymbol('iterator');
|
|
2581
2795
|
var ArrayValues = ArrayIteratorMethods.values;
|
|
@@ -2694,10 +2908,11 @@ const LeftContainer = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
2694
2908
|
}) => theme.components.input.contentGap, ({
|
|
2695
2909
|
theme,
|
|
2696
2910
|
$before,
|
|
2697
|
-
$variant
|
|
2911
|
+
$variant,
|
|
2912
|
+
$separator: _$separator = '/'
|
|
2698
2913
|
}) => $before && $variant && `
|
|
2699
2914
|
&::before {
|
|
2700
|
-
content: '
|
|
2915
|
+
content: '${_$separator}';
|
|
2701
2916
|
color: ${theme.components.input[$variant].text.color.inputPlaceholder.default};
|
|
2702
2917
|
line-height: ${theme.components.input.inputPlaceholder.lineHeight};
|
|
2703
2918
|
font-size: ${theme.components.input.inputPlaceholder.fontSize};
|
|
@@ -2709,7 +2924,7 @@ const LeftContainer = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
|
2709
2924
|
left: 32px;
|
|
2710
2925
|
}
|
|
2711
2926
|
&::after {
|
|
2712
|
-
content: '
|
|
2927
|
+
content: '${_$separator}';
|
|
2713
2928
|
color: ${theme.components.input[$variant].text.color.inputPlaceholder.default};
|
|
2714
2929
|
line-height: ${theme.components.input.inputPlaceholder.lineHeight};
|
|
2715
2930
|
font-size: ${theme.components.input.inputPlaceholder.fontSize};
|
|
@@ -2763,40 +2978,98 @@ const Error = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
|
2763
2978
|
}) => theme.components.input.error.letterSpacing, ({
|
|
2764
2979
|
theme
|
|
2765
2980
|
}) => theme.components.input.paddingHorizontal);
|
|
2981
|
+
const Helper = /*#__PURE__*/styled__default.default.span.withConfig({
|
|
2982
|
+
displayName: "date-inputstyles__Helper",
|
|
2983
|
+
componentId: "sc-1v5bbzm-7"
|
|
2984
|
+
})(["color:", ";font-weight:", ";line-height:", ";font-size:", ";letter-spacing:", ";padding:0 ", ";"], ({
|
|
2985
|
+
theme,
|
|
2986
|
+
$variant,
|
|
2987
|
+
disabled
|
|
2988
|
+
}) => theme.components.input[$variant].text.color.helper[disabled ? 'disabled' : 'default'], ({
|
|
2989
|
+
theme
|
|
2990
|
+
}) => theme.components.input.helper.fontWeight, ({
|
|
2991
|
+
theme
|
|
2992
|
+
}) => theme.components.input.helper.lineHeight, ({
|
|
2993
|
+
theme
|
|
2994
|
+
}) => theme.components.input.helper.fontSize, ({
|
|
2995
|
+
theme
|
|
2996
|
+
}) => theme.components.input.helper.letterSpacing, ({
|
|
2997
|
+
theme
|
|
2998
|
+
}) => theme.components.input.paddingHorizontal);
|
|
2766
2999
|
const OpenAnimation = /*#__PURE__*/styled.keyframes(["100%{opacity:1;}"]);
|
|
2767
3000
|
const CalendarContainer = /*#__PURE__*/styled__default.default.div.withConfig({
|
|
2768
3001
|
displayName: "date-inputstyles__CalendarContainer",
|
|
2769
|
-
componentId: "sc-1v5bbzm-
|
|
3002
|
+
componentId: "sc-1v5bbzm-9"
|
|
2770
3003
|
})(["position:absolute;z-index:2;left:0;animation-delay:1ms;animation-duration:250ms;animation-fill-mode:forwards;animation-name:", ";animation-timing-function:ease-in-out;opacity:0;&.top{transform:translateY(-100%);top:-", ";}&.bottom{top:", ";}"], OpenAnimation, ({
|
|
2771
3004
|
theme
|
|
2772
3005
|
}) => theme.components.input.borderWidth.default, ({
|
|
2773
3006
|
theme
|
|
2774
3007
|
}) => `calc(100% + ${theme.components.input.borderWidth.default})`);
|
|
2775
3008
|
|
|
2776
|
-
const
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
|
|
3009
|
+
const _excluded = ["id", "dataTestId", "variant", "errorMessage", "helperMessage", "label", "required", "disabled", "value", "min", "max", "locale", "calendarYearOrder", "icon", "cancel", "confirm", "showDatepicker", "placeholder", "separator", "fieldOrder", "onChange", "onBlur"];
|
|
3010
|
+
const parsePlaceholder = (placeholder, separator) => {
|
|
3011
|
+
var _parts$, _parts$2, _parts$3;
|
|
3012
|
+
if (!placeholder) {
|
|
3013
|
+
return {
|
|
3014
|
+
day: '',
|
|
3015
|
+
month: '',
|
|
3016
|
+
year: ''
|
|
3017
|
+
};
|
|
3018
|
+
}
|
|
3019
|
+
const parts = placeholder.split(separator);
|
|
3020
|
+
return {
|
|
3021
|
+
day: (_parts$ = parts[0]) != null ? _parts$ : '',
|
|
3022
|
+
month: (_parts$2 = parts[1]) != null ? _parts$2 : '',
|
|
3023
|
+
year: (_parts$3 = parts[2]) != null ? _parts$3 : ''
|
|
3024
|
+
};
|
|
3025
|
+
};
|
|
3026
|
+
const getFieldOrder = fieldOrder => {
|
|
3027
|
+
switch (fieldOrder) {
|
|
3028
|
+
case 'YMD':
|
|
3029
|
+
return ['year', 'month', 'day'];
|
|
3030
|
+
case 'YDM':
|
|
3031
|
+
return ['year', 'day', 'month'];
|
|
3032
|
+
case 'DMY':
|
|
3033
|
+
default:
|
|
3034
|
+
return ['day', 'month', 'year'];
|
|
3035
|
+
}
|
|
3036
|
+
};
|
|
3037
|
+
const getNextField = (currentField, fieldOrder) => {
|
|
3038
|
+
const order = getFieldOrder(fieldOrder);
|
|
3039
|
+
const currentIndex = order.indexOf(currentField);
|
|
3040
|
+
return currentIndex < order.length - 1 ? order[currentIndex + 1] : null;
|
|
3041
|
+
};
|
|
3042
|
+
const DateInput = /*#__PURE__*/react.forwardRef((_ref, ref) => {
|
|
3043
|
+
let {
|
|
3044
|
+
id = 'date-of-birth-input-id',
|
|
3045
|
+
dataTestId = 'date-of-birth-input-test-id',
|
|
3046
|
+
variant = 'grey',
|
|
3047
|
+
errorMessage,
|
|
3048
|
+
helperMessage,
|
|
3049
|
+
label,
|
|
3050
|
+
required,
|
|
3051
|
+
disabled,
|
|
3052
|
+
value,
|
|
3053
|
+
min,
|
|
3054
|
+
max,
|
|
3055
|
+
locale,
|
|
3056
|
+
calendarYearOrder = 'desc',
|
|
3057
|
+
icon,
|
|
3058
|
+
cancel,
|
|
3059
|
+
confirm,
|
|
3060
|
+
showDatepicker,
|
|
3061
|
+
placeholder,
|
|
3062
|
+
separator = '/',
|
|
3063
|
+
fieldOrder = 'DMY',
|
|
3064
|
+
onChange,
|
|
3065
|
+
onBlur
|
|
3066
|
+
} = _ref,
|
|
3067
|
+
inputProps = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
2796
3068
|
const [, forceUpdate] = react.useReducer(x => x + 1, 0);
|
|
3069
|
+
const placeholderParts = parsePlaceholder(placeholder, separator);
|
|
2797
3070
|
const calendarRef = react.useRef(null);
|
|
2798
3071
|
const containerRef = react.useRef(null);
|
|
2799
|
-
const
|
|
3072
|
+
const firstInputRef = react.useRef(null);
|
|
2800
3073
|
const day = react.useRef(value ? String(value).substring(0, 2) : '');
|
|
2801
3074
|
const month = react.useRef(value ? String(value).substring(3, 5) : '');
|
|
2802
3075
|
const year = react.useRef(value ? String(value).substring(6, 10) : '');
|
|
@@ -2813,21 +3086,28 @@ const DateInput = /*#__PURE__*/react.forwardRef(({
|
|
|
2813
3086
|
} = uiUtils.useOpenPosition(calendarRef, containerRef, ['top', 'bottom'], 'bottom');
|
|
2814
3087
|
const updateDate = e => {
|
|
2815
3088
|
const value = !year.current || !month.current || !day.current ? '' : `${year.current}-${month.current}-${day.current}`;
|
|
2816
|
-
onChange && onChange(Object.assign(
|
|
2817
|
-
target: Object.assign(
|
|
3089
|
+
onChange && onChange(Object.assign({}, e, {
|
|
3090
|
+
target: Object.assign({}, e.target, {
|
|
2818
3091
|
value
|
|
2819
3092
|
}),
|
|
2820
|
-
currentTarget: Object.assign(
|
|
3093
|
+
currentTarget: Object.assign({}, e.currentTarget, {
|
|
2821
3094
|
value
|
|
2822
3095
|
})
|
|
2823
3096
|
}));
|
|
2824
3097
|
};
|
|
3098
|
+
const handleNextInput = current => {
|
|
3099
|
+
const next = getNextField(current, fieldOrder);
|
|
3100
|
+
if (next) {
|
|
3101
|
+
const input = document.getElementById(`${id}-input-${next}`);
|
|
3102
|
+
input == null || input.focus();
|
|
3103
|
+
}
|
|
3104
|
+
};
|
|
2825
3105
|
const handleDayChange = e => {
|
|
2826
3106
|
const value = e.target.value.replace(/\D/g, '');
|
|
2827
3107
|
if (value.length > 2) return;
|
|
2828
3108
|
day.current = value;
|
|
2829
3109
|
if (day.current.length == 2) {
|
|
2830
|
-
handleNextInput('
|
|
3110
|
+
handleNextInput('day');
|
|
2831
3111
|
}
|
|
2832
3112
|
forceUpdate();
|
|
2833
3113
|
updateDate(e);
|
|
@@ -2837,7 +3117,7 @@ const DateInput = /*#__PURE__*/react.forwardRef(({
|
|
|
2837
3117
|
if (value.length > 2) return;
|
|
2838
3118
|
month.current = value;
|
|
2839
3119
|
if (month.current.length == 2) {
|
|
2840
|
-
handleNextInput('
|
|
3120
|
+
handleNextInput('month');
|
|
2841
3121
|
}
|
|
2842
3122
|
forceUpdate();
|
|
2843
3123
|
updateDate(e);
|
|
@@ -2846,6 +3126,9 @@ const DateInput = /*#__PURE__*/react.forwardRef(({
|
|
|
2846
3126
|
const value = e.target.value.replace(/\D/g, '');
|
|
2847
3127
|
if (value.length > 4) return;
|
|
2848
3128
|
year.current = value;
|
|
3129
|
+
if (year.current.length == 4) {
|
|
3130
|
+
handleNextInput('year');
|
|
3131
|
+
}
|
|
2849
3132
|
forceUpdate();
|
|
2850
3133
|
updateDate(e);
|
|
2851
3134
|
};
|
|
@@ -2857,10 +3140,6 @@ const DateInput = /*#__PURE__*/react.forwardRef(({
|
|
|
2857
3140
|
const handleFocus = () => {
|
|
2858
3141
|
setIsCalendarOpen(false);
|
|
2859
3142
|
};
|
|
2860
|
-
const handleNextInput = next => {
|
|
2861
|
-
const input = document.getElementById(`${_id}-input-${next}`);
|
|
2862
|
-
input === null || input === void 0 ? void 0 : input.focus();
|
|
2863
|
-
};
|
|
2864
3143
|
const handleCancel = react.useCallback(() => {
|
|
2865
3144
|
setIsCalendarOpen(false);
|
|
2866
3145
|
}, []);
|
|
@@ -2888,132 +3167,131 @@ const DateInput = /*#__PURE__*/react.forwardRef(({
|
|
|
2888
3167
|
forceUpdate();
|
|
2889
3168
|
};
|
|
2890
3169
|
const onClickIcon = () => {
|
|
2891
|
-
var _a;
|
|
2892
3170
|
reactDom.flushSync(() => {
|
|
2893
|
-
var
|
|
3171
|
+
var _firstInputRef$curren2;
|
|
2894
3172
|
if (disabled) return;
|
|
2895
3173
|
if (isCalendarOpen) {
|
|
2896
|
-
|
|
3174
|
+
var _firstInputRef$curren;
|
|
3175
|
+
firstInputRef == null || (_firstInputRef$curren = firstInputRef.current) == null || _firstInputRef$curren.blur();
|
|
2897
3176
|
}
|
|
2898
3177
|
setIsCalendarOpen(!isCalendarOpen);
|
|
2899
|
-
|
|
3178
|
+
firstInputRef == null || (_firstInputRef$curren2 = firstInputRef.current) == null || _firstInputRef$curren2.blur();
|
|
2900
3179
|
});
|
|
2901
3180
|
if (!isCalendarOpen) {
|
|
2902
|
-
|
|
3181
|
+
var _calendarRef$current;
|
|
3182
|
+
calendarRef == null || (_calendarRef$current = calendarRef.current) == null || _calendarRef$current.focus({
|
|
2903
3183
|
preventScroll: true
|
|
2904
3184
|
});
|
|
2905
3185
|
}
|
|
2906
3186
|
addOpenPositionClass();
|
|
2907
3187
|
};
|
|
2908
3188
|
const onBlurCalendar = event => {
|
|
2909
|
-
var
|
|
2910
|
-
if (!(
|
|
3189
|
+
var _calendarRef$current2;
|
|
3190
|
+
if (!(calendarRef != null && (_calendarRef$current2 = calendarRef.current) != null && _calendarRef$current2.contains(event.relatedTarget)) || !event.relatedTarget) {
|
|
2911
3191
|
setIsCalendarOpen(false);
|
|
2912
3192
|
}
|
|
2913
3193
|
};
|
|
2914
|
-
|
|
3194
|
+
const fieldConfigs = {
|
|
3195
|
+
day: {
|
|
3196
|
+
width: '40px',
|
|
3197
|
+
placeholder: placeholderParts.day,
|
|
3198
|
+
onChange: handleDayChange,
|
|
3199
|
+
value: day,
|
|
3200
|
+
maxLength: 2,
|
|
3201
|
+
max: 99
|
|
3202
|
+
},
|
|
3203
|
+
month: {
|
|
3204
|
+
width: '43px',
|
|
3205
|
+
placeholder: placeholderParts.month,
|
|
3206
|
+
onChange: handleMonthChange,
|
|
3207
|
+
value: month,
|
|
3208
|
+
maxLength: 2,
|
|
3209
|
+
max: 12
|
|
3210
|
+
},
|
|
3211
|
+
year: {
|
|
3212
|
+
width: '60px',
|
|
3213
|
+
placeholder: placeholderParts.year,
|
|
3214
|
+
onChange: handleYearChange,
|
|
3215
|
+
value: year,
|
|
3216
|
+
maxLength: 4,
|
|
3217
|
+
max: 9999
|
|
3218
|
+
}
|
|
3219
|
+
};
|
|
3220
|
+
const orderedFields = getFieldOrder(fieldOrder);
|
|
3221
|
+
return /*#__PURE__*/jsxRuntime.jsxs(InputWrapper, {
|
|
2915
3222
|
disabled: !!disabled,
|
|
2916
|
-
"data-testid":
|
|
2917
|
-
|
|
3223
|
+
"data-testid": dataTestId,
|
|
3224
|
+
$variant: variant,
|
|
2918
3225
|
ref: ref,
|
|
2919
|
-
children: [jsxRuntime.jsxs(Container, {
|
|
2920
|
-
id: `${
|
|
2921
|
-
"data-testid": `${
|
|
3226
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(Container, {
|
|
3227
|
+
id: `${id}-container`,
|
|
3228
|
+
"data-testid": `${dataTestId}-container`,
|
|
2922
3229
|
ref: containerRef,
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
children: [jsxRuntime.jsxs(LeftContainer, {
|
|
2927
|
-
|
|
2928
|
-
children: [label && jsxRuntime.jsx(Label, {
|
|
2929
|
-
id: `${
|
|
2930
|
-
"data-testid": `${
|
|
2931
|
-
htmlFor: `${
|
|
2932
|
-
|
|
2933
|
-
|
|
3230
|
+
$hasError: !!errorMessage,
|
|
3231
|
+
$hasValue: !!value && value !== '',
|
|
3232
|
+
$variant: variant,
|
|
3233
|
+
children: [/*#__PURE__*/jsxRuntime.jsxs(LeftContainer, {
|
|
3234
|
+
$before: false,
|
|
3235
|
+
children: [label && /*#__PURE__*/jsxRuntime.jsx(Label, {
|
|
3236
|
+
id: `${id}-label`,
|
|
3237
|
+
"data-testid": `${dataTestId}-label`,
|
|
3238
|
+
htmlFor: `${id}-input`,
|
|
3239
|
+
$required: !!required,
|
|
3240
|
+
$variant: variant,
|
|
2934
3241
|
children: label
|
|
2935
|
-
}), jsxRuntime.
|
|
2936
|
-
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
|
|
2940
|
-
|
|
2941
|
-
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
|
|
2953
|
-
|
|
2954
|
-
|
|
2955
|
-
|
|
2956
|
-
|
|
2957
|
-
|
|
2958
|
-
|
|
2959
|
-
|
|
2960
|
-
|
|
2961
|
-
|
|
2962
|
-
|
|
2963
|
-
disabled: disabled,
|
|
2964
|
-
value: month.current,
|
|
2965
|
-
required: required,
|
|
2966
|
-
"$variant": _variant,
|
|
2967
|
-
"$width": "43px",
|
|
2968
|
-
placeholder: "MM",
|
|
2969
|
-
onChange: handleMonthChange,
|
|
2970
|
-
onBlur: handleBlur,
|
|
2971
|
-
onFocus: handleFocus,
|
|
2972
|
-
maxLength: 2,
|
|
2973
|
-
max: 12
|
|
2974
|
-
}), jsxRuntime.jsx(Input, {
|
|
2975
|
-
id: `${_id}-input-year`,
|
|
2976
|
-
"data-testid": `${_dataTestId}-input-year`,
|
|
2977
|
-
type: "text",
|
|
2978
|
-
inputMode: "numeric",
|
|
2979
|
-
pattern: "[0-9]*",
|
|
2980
|
-
disabled: disabled,
|
|
2981
|
-
value: year.current,
|
|
2982
|
-
required: required,
|
|
2983
|
-
"$variant": _variant,
|
|
2984
|
-
"$width": "60px",
|
|
2985
|
-
placeholder: "YYYY",
|
|
2986
|
-
onChange: handleYearChange,
|
|
2987
|
-
onBlur: handleBlur,
|
|
2988
|
-
onFocus: handleFocus,
|
|
2989
|
-
maxLength: 4,
|
|
2990
|
-
max: 9999
|
|
2991
|
-
})]
|
|
3242
|
+
}), /*#__PURE__*/jsxRuntime.jsx(LeftContainer, {
|
|
3243
|
+
$direction: "row",
|
|
3244
|
+
$variant: variant,
|
|
3245
|
+
$before: true,
|
|
3246
|
+
$separator: separator,
|
|
3247
|
+
children: orderedFields.map((field, index) => {
|
|
3248
|
+
const config = fieldConfigs[field];
|
|
3249
|
+
return /*#__PURE__*/react.createElement(Input, Object.assign({}, inputProps, {
|
|
3250
|
+
key: field,
|
|
3251
|
+
ref: index === 0 ? firstInputRef : undefined,
|
|
3252
|
+
id: `${id}-input-${field}`,
|
|
3253
|
+
"data-testid": `${dataTestId}-input-${field}`,
|
|
3254
|
+
type: "text",
|
|
3255
|
+
inputMode: "numeric",
|
|
3256
|
+
pattern: "[0-9]*",
|
|
3257
|
+
disabled: disabled,
|
|
3258
|
+
value: config.value.current,
|
|
3259
|
+
required: required,
|
|
3260
|
+
$variant: variant,
|
|
3261
|
+
$width: config.width,
|
|
3262
|
+
placeholder: config.placeholder || undefined,
|
|
3263
|
+
onChange: config.onChange,
|
|
3264
|
+
onBlur: handleBlur,
|
|
3265
|
+
onFocus: handleFocus,
|
|
3266
|
+
maxLength: config.maxLength,
|
|
3267
|
+
max: config.max
|
|
3268
|
+
}));
|
|
3269
|
+
})
|
|
2992
3270
|
})]
|
|
2993
|
-
}), showDatepicker && jsxRuntime.jsx(Icon, {
|
|
2994
|
-
id: `${
|
|
2995
|
-
"data-testid": `${
|
|
3271
|
+
}), showDatepicker && /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
3272
|
+
id: `${id}-icon`,
|
|
3273
|
+
"data-testid": `${dataTestId}-button-icon`,
|
|
2996
3274
|
onClick: onClickIcon,
|
|
2997
3275
|
onMouseDown: e => e.preventDefault(),
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
children: jsxRuntime.jsx(atomsIcon.Icon, {
|
|
3001
|
-
"data-testid": `${
|
|
3276
|
+
$hasError: !!errorMessage,
|
|
3277
|
+
$variant: variant,
|
|
3278
|
+
children: /*#__PURE__*/jsxRuntime.jsx(atomsIcon.Icon, {
|
|
3279
|
+
"data-testid": `${dataTestId}-icon`,
|
|
3002
3280
|
icon: icon || 'calendar_month'
|
|
3003
3281
|
})
|
|
3004
3282
|
})]
|
|
3005
|
-
}), isCalendarOpen && jsxRuntime.jsx(CalendarContainer, {
|
|
3283
|
+
}), isCalendarOpen && /*#__PURE__*/jsxRuntime.jsx(CalendarContainer, {
|
|
3006
3284
|
ref: calendarRef,
|
|
3007
3285
|
onClick: event => event.stopPropagation(),
|
|
3008
3286
|
tabIndex: 1,
|
|
3009
3287
|
onBlur: onBlurCalendar,
|
|
3010
|
-
children: jsxRuntime.jsx(moleculesCalendar.Calendar, {
|
|
3011
|
-
id: `${
|
|
3012
|
-
dataTestId: `${
|
|
3288
|
+
children: /*#__PURE__*/jsxRuntime.jsx(moleculesCalendar.Calendar, {
|
|
3289
|
+
id: `${id}-calendar`,
|
|
3290
|
+
dataTestId: `${dataTestId}-calendar`,
|
|
3013
3291
|
locale: locale,
|
|
3014
3292
|
min: min,
|
|
3015
3293
|
max: max,
|
|
3016
|
-
yearOrder:
|
|
3294
|
+
yearOrder: calendarYearOrder,
|
|
3017
3295
|
type: "default",
|
|
3018
3296
|
value: isValidDate(value) ? value : undefined,
|
|
3019
3297
|
cancel: cancel,
|
|
@@ -3021,10 +3299,17 @@ const DateInput = /*#__PURE__*/react.forwardRef(({
|
|
|
3021
3299
|
onCancel: handleCancel,
|
|
3022
3300
|
onChange: handleConfirm
|
|
3023
3301
|
})
|
|
3024
|
-
}), !!errorMessage && jsxRuntime.jsx(
|
|
3025
|
-
id: `${
|
|
3026
|
-
"
|
|
3027
|
-
|
|
3302
|
+
}), !!helperMessage && !errorMessage && /*#__PURE__*/jsxRuntime.jsx(Helper, {
|
|
3303
|
+
id: `${id}-helperText`,
|
|
3304
|
+
"data-testid": `${dataTestId}-helperText`,
|
|
3305
|
+
$variant: variant,
|
|
3306
|
+
disabled: !!disabled,
|
|
3307
|
+
"aria-live": "polite",
|
|
3308
|
+
children: helperMessage
|
|
3309
|
+
}), !!errorMessage && /*#__PURE__*/jsxRuntime.jsx(Error, {
|
|
3310
|
+
id: `${id}-error`,
|
|
3311
|
+
$variant: variant,
|
|
3312
|
+
"data-testId": `${dataTestId}-error`,
|
|
3028
3313
|
children: errorMessage
|
|
3029
3314
|
})]
|
|
3030
3315
|
});
|