@thecb/components 6.0.0-beta.2 → 6.0.0-beta.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +1454 -115
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +1454 -115
- package/dist/index.esm.js.map +1 -1
- package/package.json +2 -1
- package/src/components/atoms/country-dropdown/CountryDropdown.js +1 -0
- package/src/components/atoms/dropdown/Dropdown.js +179 -119
- package/src/components/atoms/form-select/FormSelect.js +4 -2
- package/src/components/atoms/layouts/Box.js +1 -1
- package/src/components/atoms/state-province-dropdown/StateProvinceDropdown.js +1 -0
package/dist/index.esm.js
CHANGED
|
@@ -6372,7 +6372,7 @@ var Box = function Box(_ref) {
|
|
|
6372
6372
|
onFocus: onFocus,
|
|
6373
6373
|
onBlur: onBlur,
|
|
6374
6374
|
onTouchEnd: onTouchEnd
|
|
6375
|
-
}, rest), safeChildren(children, /*#__PURE__*/React.createElement(Fragment, null)));
|
|
6375
|
+
}, rest), children && safeChildren(children, /*#__PURE__*/React.createElement(Fragment, null)));
|
|
6376
6376
|
};
|
|
6377
6377
|
|
|
6378
6378
|
var CenterWrapper = styled.div.withConfig({
|
|
@@ -19390,6 +19390,1254 @@ var DropdownIcon = function DropdownIcon() {
|
|
|
19390
19390
|
})))));
|
|
19391
19391
|
};
|
|
19392
19392
|
|
|
19393
|
+
var check = function (it) {
|
|
19394
|
+
return it && it.Math == Math && it;
|
|
19395
|
+
};
|
|
19396
|
+
|
|
19397
|
+
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
19398
|
+
var global_1 =
|
|
19399
|
+
// eslint-disable-next-line es-x/no-global-this -- safe
|
|
19400
|
+
check(typeof globalThis == 'object' && globalThis) ||
|
|
19401
|
+
check(typeof window == 'object' && window) ||
|
|
19402
|
+
// eslint-disable-next-line no-restricted-globals -- safe
|
|
19403
|
+
check(typeof self == 'object' && self) ||
|
|
19404
|
+
check(typeof commonjsGlobal == 'object' && commonjsGlobal) ||
|
|
19405
|
+
// eslint-disable-next-line no-new-func -- fallback
|
|
19406
|
+
(function () { return this; })() || Function('return this')();
|
|
19407
|
+
|
|
19408
|
+
var fails = function (exec) {
|
|
19409
|
+
try {
|
|
19410
|
+
return !!exec();
|
|
19411
|
+
} catch (error) {
|
|
19412
|
+
return true;
|
|
19413
|
+
}
|
|
19414
|
+
};
|
|
19415
|
+
|
|
19416
|
+
// Detect IE8's incomplete defineProperty implementation
|
|
19417
|
+
var descriptors = !fails(function () {
|
|
19418
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
19419
|
+
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
19420
|
+
});
|
|
19421
|
+
|
|
19422
|
+
var functionBindNative = !fails(function () {
|
|
19423
|
+
// eslint-disable-next-line es-x/no-function-prototype-bind -- safe
|
|
19424
|
+
var test = (function () { /* empty */ }).bind();
|
|
19425
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
19426
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
19427
|
+
});
|
|
19428
|
+
|
|
19429
|
+
var call = Function.prototype.call;
|
|
19430
|
+
|
|
19431
|
+
var functionCall = functionBindNative ? call.bind(call) : function () {
|
|
19432
|
+
return call.apply(call, arguments);
|
|
19433
|
+
};
|
|
19434
|
+
|
|
19435
|
+
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
19436
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
19437
|
+
var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
19438
|
+
|
|
19439
|
+
// Nashorn ~ JDK8 bug
|
|
19440
|
+
var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);
|
|
19441
|
+
|
|
19442
|
+
// `Object.prototype.propertyIsEnumerable` method implementation
|
|
19443
|
+
// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
|
|
19444
|
+
var f = NASHORN_BUG ? function propertyIsEnumerable(V) {
|
|
19445
|
+
var descriptor = getOwnPropertyDescriptor(this, V);
|
|
19446
|
+
return !!descriptor && descriptor.enumerable;
|
|
19447
|
+
} : $propertyIsEnumerable;
|
|
19448
|
+
|
|
19449
|
+
var objectPropertyIsEnumerable = {
|
|
19450
|
+
f: f
|
|
19451
|
+
};
|
|
19452
|
+
|
|
19453
|
+
var createPropertyDescriptor = function (bitmap, value) {
|
|
19454
|
+
return {
|
|
19455
|
+
enumerable: !(bitmap & 1),
|
|
19456
|
+
configurable: !(bitmap & 2),
|
|
19457
|
+
writable: !(bitmap & 4),
|
|
19458
|
+
value: value
|
|
19459
|
+
};
|
|
19460
|
+
};
|
|
19461
|
+
|
|
19462
|
+
var FunctionPrototype = Function.prototype;
|
|
19463
|
+
var bind$1 = FunctionPrototype.bind;
|
|
19464
|
+
var call$1 = FunctionPrototype.call;
|
|
19465
|
+
var uncurryThis = functionBindNative && bind$1.bind(call$1, call$1);
|
|
19466
|
+
|
|
19467
|
+
var functionUncurryThis = functionBindNative ? function (fn) {
|
|
19468
|
+
return fn && uncurryThis(fn);
|
|
19469
|
+
} : function (fn) {
|
|
19470
|
+
return fn && function () {
|
|
19471
|
+
return call$1.apply(fn, arguments);
|
|
19472
|
+
};
|
|
19473
|
+
};
|
|
19474
|
+
|
|
19475
|
+
var toString$2 = functionUncurryThis({}.toString);
|
|
19476
|
+
var stringSlice = functionUncurryThis(''.slice);
|
|
19477
|
+
|
|
19478
|
+
var classofRaw = function (it) {
|
|
19479
|
+
return stringSlice(toString$2(it), 8, -1);
|
|
19480
|
+
};
|
|
19481
|
+
|
|
19482
|
+
var Object$1 = global_1.Object;
|
|
19483
|
+
var split = functionUncurryThis(''.split);
|
|
19484
|
+
|
|
19485
|
+
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
19486
|
+
var indexedObject = fails(function () {
|
|
19487
|
+
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
19488
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
19489
|
+
return !Object$1('z').propertyIsEnumerable(0);
|
|
19490
|
+
}) ? function (it) {
|
|
19491
|
+
return classofRaw(it) == 'String' ? split(it, '') : Object$1(it);
|
|
19492
|
+
} : Object$1;
|
|
19493
|
+
|
|
19494
|
+
var TypeError$1 = global_1.TypeError;
|
|
19495
|
+
|
|
19496
|
+
// `RequireObjectCoercible` abstract operation
|
|
19497
|
+
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
19498
|
+
var requireObjectCoercible = function (it) {
|
|
19499
|
+
if (it == undefined) throw TypeError$1("Can't call method on " + it);
|
|
19500
|
+
return it;
|
|
19501
|
+
};
|
|
19502
|
+
|
|
19503
|
+
// toObject with fallback for non-array-like ES3 strings
|
|
19504
|
+
|
|
19505
|
+
|
|
19506
|
+
|
|
19507
|
+
var toIndexedObject = function (it) {
|
|
19508
|
+
return indexedObject(requireObjectCoercible(it));
|
|
19509
|
+
};
|
|
19510
|
+
|
|
19511
|
+
// `IsCallable` abstract operation
|
|
19512
|
+
// https://tc39.es/ecma262/#sec-iscallable
|
|
19513
|
+
var isCallable = function (argument) {
|
|
19514
|
+
return typeof argument == 'function';
|
|
19515
|
+
};
|
|
19516
|
+
|
|
19517
|
+
var isObject = function (it) {
|
|
19518
|
+
return typeof it == 'object' ? it !== null : isCallable(it);
|
|
19519
|
+
};
|
|
19520
|
+
|
|
19521
|
+
var aFunction = function (argument) {
|
|
19522
|
+
return isCallable(argument) ? argument : undefined;
|
|
19523
|
+
};
|
|
19524
|
+
|
|
19525
|
+
var getBuiltIn = function (namespace, method) {
|
|
19526
|
+
return arguments.length < 2 ? aFunction(global_1[namespace]) : global_1[namespace] && global_1[namespace][method];
|
|
19527
|
+
};
|
|
19528
|
+
|
|
19529
|
+
var objectIsPrototypeOf = functionUncurryThis({}.isPrototypeOf);
|
|
19530
|
+
|
|
19531
|
+
var engineUserAgent = getBuiltIn('navigator', 'userAgent') || '';
|
|
19532
|
+
|
|
19533
|
+
var process$1 = global_1.process;
|
|
19534
|
+
var Deno = global_1.Deno;
|
|
19535
|
+
var versions = process$1 && process$1.versions || Deno && Deno.version;
|
|
19536
|
+
var v8 = versions && versions.v8;
|
|
19537
|
+
var match, version;
|
|
19538
|
+
|
|
19539
|
+
if (v8) {
|
|
19540
|
+
match = v8.split('.');
|
|
19541
|
+
// in old Chrome, versions of V8 isn't V8 = Chrome / 10
|
|
19542
|
+
// but their correct versions are not interesting for us
|
|
19543
|
+
version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
|
|
19544
|
+
}
|
|
19545
|
+
|
|
19546
|
+
// BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
|
|
19547
|
+
// so check `userAgent` even if `.v8` exists, but 0
|
|
19548
|
+
if (!version && engineUserAgent) {
|
|
19549
|
+
match = engineUserAgent.match(/Edge\/(\d+)/);
|
|
19550
|
+
if (!match || match[1] >= 74) {
|
|
19551
|
+
match = engineUserAgent.match(/Chrome\/(\d+)/);
|
|
19552
|
+
if (match) version = +match[1];
|
|
19553
|
+
}
|
|
19554
|
+
}
|
|
19555
|
+
|
|
19556
|
+
var engineV8Version = version;
|
|
19557
|
+
|
|
19558
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
19559
|
+
|
|
19560
|
+
|
|
19561
|
+
|
|
19562
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
|
|
19563
|
+
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails(function () {
|
|
19564
|
+
var symbol = Symbol();
|
|
19565
|
+
// Chrome 38 Symbol has incorrect toString conversion
|
|
19566
|
+
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
19567
|
+
return !String(symbol) || !(Object(symbol) instanceof Symbol) ||
|
|
19568
|
+
// Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
|
|
19569
|
+
!Symbol.sham && engineV8Version && engineV8Version < 41;
|
|
19570
|
+
});
|
|
19571
|
+
|
|
19572
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
19573
|
+
|
|
19574
|
+
|
|
19575
|
+
var useSymbolAsUid = nativeSymbol
|
|
19576
|
+
&& !Symbol.sham
|
|
19577
|
+
&& typeof Symbol.iterator == 'symbol';
|
|
19578
|
+
|
|
19579
|
+
var Object$2 = global_1.Object;
|
|
19580
|
+
|
|
19581
|
+
var isSymbol = useSymbolAsUid ? function (it) {
|
|
19582
|
+
return typeof it == 'symbol';
|
|
19583
|
+
} : function (it) {
|
|
19584
|
+
var $Symbol = getBuiltIn('Symbol');
|
|
19585
|
+
return isCallable($Symbol) && objectIsPrototypeOf($Symbol.prototype, Object$2(it));
|
|
19586
|
+
};
|
|
19587
|
+
|
|
19588
|
+
var String$1 = global_1.String;
|
|
19589
|
+
|
|
19590
|
+
var tryToString = function (argument) {
|
|
19591
|
+
try {
|
|
19592
|
+
return String$1(argument);
|
|
19593
|
+
} catch (error) {
|
|
19594
|
+
return 'Object';
|
|
19595
|
+
}
|
|
19596
|
+
};
|
|
19597
|
+
|
|
19598
|
+
var TypeError$2 = global_1.TypeError;
|
|
19599
|
+
|
|
19600
|
+
// `Assert: IsCallable(argument) is true`
|
|
19601
|
+
var aCallable = function (argument) {
|
|
19602
|
+
if (isCallable(argument)) return argument;
|
|
19603
|
+
throw TypeError$2(tryToString(argument) + ' is not a function');
|
|
19604
|
+
};
|
|
19605
|
+
|
|
19606
|
+
// `GetMethod` abstract operation
|
|
19607
|
+
// https://tc39.es/ecma262/#sec-getmethod
|
|
19608
|
+
var getMethod = function (V, P) {
|
|
19609
|
+
var func = V[P];
|
|
19610
|
+
return func == null ? undefined : aCallable(func);
|
|
19611
|
+
};
|
|
19612
|
+
|
|
19613
|
+
var TypeError$3 = global_1.TypeError;
|
|
19614
|
+
|
|
19615
|
+
// `OrdinaryToPrimitive` abstract operation
|
|
19616
|
+
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
19617
|
+
var ordinaryToPrimitive = function (input, pref) {
|
|
19618
|
+
var fn, val;
|
|
19619
|
+
if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
19620
|
+
if (isCallable(fn = input.valueOf) && !isObject(val = functionCall(fn, input))) return val;
|
|
19621
|
+
if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = functionCall(fn, input))) return val;
|
|
19622
|
+
throw TypeError$3("Can't convert object to primitive value");
|
|
19623
|
+
};
|
|
19624
|
+
|
|
19625
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
19626
|
+
var defineProperty = Object.defineProperty;
|
|
19627
|
+
|
|
19628
|
+
var setGlobal = function (key, value) {
|
|
19629
|
+
try {
|
|
19630
|
+
defineProperty(global_1, key, { value: value, configurable: true, writable: true });
|
|
19631
|
+
} catch (error) {
|
|
19632
|
+
global_1[key] = value;
|
|
19633
|
+
} return value;
|
|
19634
|
+
};
|
|
19635
|
+
|
|
19636
|
+
var SHARED = '__core-js_shared__';
|
|
19637
|
+
var store = global_1[SHARED] || setGlobal(SHARED, {});
|
|
19638
|
+
|
|
19639
|
+
var sharedStore = store;
|
|
19640
|
+
|
|
19641
|
+
var shared = createCommonjsModule(function (module) {
|
|
19642
|
+
(module.exports = function (key, value) {
|
|
19643
|
+
return sharedStore[key] || (sharedStore[key] = value !== undefined ? value : {});
|
|
19644
|
+
})('versions', []).push({
|
|
19645
|
+
version: '3.22.5',
|
|
19646
|
+
mode: 'global',
|
|
19647
|
+
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
19648
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.22.5/LICENSE',
|
|
19649
|
+
source: 'https://github.com/zloirock/core-js'
|
|
19650
|
+
});
|
|
19651
|
+
});
|
|
19652
|
+
|
|
19653
|
+
var Object$3 = global_1.Object;
|
|
19654
|
+
|
|
19655
|
+
// `ToObject` abstract operation
|
|
19656
|
+
// https://tc39.es/ecma262/#sec-toobject
|
|
19657
|
+
var toObject = function (argument) {
|
|
19658
|
+
return Object$3(requireObjectCoercible(argument));
|
|
19659
|
+
};
|
|
19660
|
+
|
|
19661
|
+
var hasOwnProperty = functionUncurryThis({}.hasOwnProperty);
|
|
19662
|
+
|
|
19663
|
+
// `HasOwnProperty` abstract operation
|
|
19664
|
+
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
19665
|
+
// eslint-disable-next-line es-x/no-object-hasown -- safe
|
|
19666
|
+
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
19667
|
+
return hasOwnProperty(toObject(it), key);
|
|
19668
|
+
};
|
|
19669
|
+
|
|
19670
|
+
var id = 0;
|
|
19671
|
+
var postfix = Math.random();
|
|
19672
|
+
var toString$3 = functionUncurryThis(1.0.toString);
|
|
19673
|
+
|
|
19674
|
+
var uid = function (key) {
|
|
19675
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$3(++id + postfix, 36);
|
|
19676
|
+
};
|
|
19677
|
+
|
|
19678
|
+
var WellKnownSymbolsStore = shared('wks');
|
|
19679
|
+
var Symbol$1 = global_1.Symbol;
|
|
19680
|
+
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
19681
|
+
var createWellKnownSymbol = useSymbolAsUid ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid;
|
|
19682
|
+
|
|
19683
|
+
var wellKnownSymbol = function (name) {
|
|
19684
|
+
if (!hasOwnProperty_1(WellKnownSymbolsStore, name) || !(nativeSymbol || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
19685
|
+
var description = 'Symbol.' + name;
|
|
19686
|
+
if (nativeSymbol && hasOwnProperty_1(Symbol$1, name)) {
|
|
19687
|
+
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
19688
|
+
} else if (useSymbolAsUid && symbolFor) {
|
|
19689
|
+
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
19690
|
+
} else {
|
|
19691
|
+
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
19692
|
+
}
|
|
19693
|
+
} return WellKnownSymbolsStore[name];
|
|
19694
|
+
};
|
|
19695
|
+
|
|
19696
|
+
var TypeError$4 = global_1.TypeError;
|
|
19697
|
+
var TO_PRIMITIVE = wellKnownSymbol('toPrimitive');
|
|
19698
|
+
|
|
19699
|
+
// `ToPrimitive` abstract operation
|
|
19700
|
+
// https://tc39.es/ecma262/#sec-toprimitive
|
|
19701
|
+
var toPrimitive = function (input, pref) {
|
|
19702
|
+
if (!isObject(input) || isSymbol(input)) return input;
|
|
19703
|
+
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
19704
|
+
var result;
|
|
19705
|
+
if (exoticToPrim) {
|
|
19706
|
+
if (pref === undefined) pref = 'default';
|
|
19707
|
+
result = functionCall(exoticToPrim, input, pref);
|
|
19708
|
+
if (!isObject(result) || isSymbol(result)) return result;
|
|
19709
|
+
throw TypeError$4("Can't convert object to primitive value");
|
|
19710
|
+
}
|
|
19711
|
+
if (pref === undefined) pref = 'number';
|
|
19712
|
+
return ordinaryToPrimitive(input, pref);
|
|
19713
|
+
};
|
|
19714
|
+
|
|
19715
|
+
// `ToPropertyKey` abstract operation
|
|
19716
|
+
// https://tc39.es/ecma262/#sec-topropertykey
|
|
19717
|
+
var toPropertyKey = function (argument) {
|
|
19718
|
+
var key = toPrimitive(argument, 'string');
|
|
19719
|
+
return isSymbol(key) ? key : key + '';
|
|
19720
|
+
};
|
|
19721
|
+
|
|
19722
|
+
var document$1 = global_1.document;
|
|
19723
|
+
// typeof document.createElement is 'object' in old IE
|
|
19724
|
+
var EXISTS = isObject(document$1) && isObject(document$1.createElement);
|
|
19725
|
+
|
|
19726
|
+
var documentCreateElement = function (it) {
|
|
19727
|
+
return EXISTS ? document$1.createElement(it) : {};
|
|
19728
|
+
};
|
|
19729
|
+
|
|
19730
|
+
// Thanks to IE8 for its funny defineProperty
|
|
19731
|
+
var ie8DomDefine = !descriptors && !fails(function () {
|
|
19732
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
19733
|
+
return Object.defineProperty(documentCreateElement('div'), 'a', {
|
|
19734
|
+
get: function () { return 7; }
|
|
19735
|
+
}).a != 7;
|
|
19736
|
+
});
|
|
19737
|
+
|
|
19738
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
19739
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
19740
|
+
|
|
19741
|
+
// `Object.getOwnPropertyDescriptor` method
|
|
19742
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
19743
|
+
var f$1 = descriptors ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {
|
|
19744
|
+
O = toIndexedObject(O);
|
|
19745
|
+
P = toPropertyKey(P);
|
|
19746
|
+
if (ie8DomDefine) try {
|
|
19747
|
+
return $getOwnPropertyDescriptor(O, P);
|
|
19748
|
+
} catch (error) { /* empty */ }
|
|
19749
|
+
if (hasOwnProperty_1(O, P)) return createPropertyDescriptor(!functionCall(objectPropertyIsEnumerable.f, O, P), O[P]);
|
|
19750
|
+
};
|
|
19751
|
+
|
|
19752
|
+
var objectGetOwnPropertyDescriptor = {
|
|
19753
|
+
f: f$1
|
|
19754
|
+
};
|
|
19755
|
+
|
|
19756
|
+
// V8 ~ Chrome 36-
|
|
19757
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
19758
|
+
var v8PrototypeDefineBug = descriptors && fails(function () {
|
|
19759
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
19760
|
+
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
19761
|
+
value: 42,
|
|
19762
|
+
writable: false
|
|
19763
|
+
}).prototype != 42;
|
|
19764
|
+
});
|
|
19765
|
+
|
|
19766
|
+
var String$2 = global_1.String;
|
|
19767
|
+
var TypeError$5 = global_1.TypeError;
|
|
19768
|
+
|
|
19769
|
+
// `Assert: Type(argument) is Object`
|
|
19770
|
+
var anObject = function (argument) {
|
|
19771
|
+
if (isObject(argument)) return argument;
|
|
19772
|
+
throw TypeError$5(String$2(argument) + ' is not an object');
|
|
19773
|
+
};
|
|
19774
|
+
|
|
19775
|
+
var TypeError$6 = global_1.TypeError;
|
|
19776
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
19777
|
+
var $defineProperty = Object.defineProperty;
|
|
19778
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
19779
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
19780
|
+
var ENUMERABLE = 'enumerable';
|
|
19781
|
+
var CONFIGURABLE = 'configurable';
|
|
19782
|
+
var WRITABLE = 'writable';
|
|
19783
|
+
|
|
19784
|
+
// `Object.defineProperty` method
|
|
19785
|
+
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
19786
|
+
var f$2 = descriptors ? v8PrototypeDefineBug ? function defineProperty(O, P, Attributes) {
|
|
19787
|
+
anObject(O);
|
|
19788
|
+
P = toPropertyKey(P);
|
|
19789
|
+
anObject(Attributes);
|
|
19790
|
+
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
19791
|
+
var current = $getOwnPropertyDescriptor$1(O, P);
|
|
19792
|
+
if (current && current[WRITABLE]) {
|
|
19793
|
+
O[P] = Attributes.value;
|
|
19794
|
+
Attributes = {
|
|
19795
|
+
configurable: CONFIGURABLE in Attributes ? Attributes[CONFIGURABLE] : current[CONFIGURABLE],
|
|
19796
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
19797
|
+
writable: false
|
|
19798
|
+
};
|
|
19799
|
+
}
|
|
19800
|
+
} return $defineProperty(O, P, Attributes);
|
|
19801
|
+
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
19802
|
+
anObject(O);
|
|
19803
|
+
P = toPropertyKey(P);
|
|
19804
|
+
anObject(Attributes);
|
|
19805
|
+
if (ie8DomDefine) try {
|
|
19806
|
+
return $defineProperty(O, P, Attributes);
|
|
19807
|
+
} catch (error) { /* empty */ }
|
|
19808
|
+
if ('get' in Attributes || 'set' in Attributes) throw TypeError$6('Accessors not supported');
|
|
19809
|
+
if ('value' in Attributes) O[P] = Attributes.value;
|
|
19810
|
+
return O;
|
|
19811
|
+
};
|
|
19812
|
+
|
|
19813
|
+
var objectDefineProperty = {
|
|
19814
|
+
f: f$2
|
|
19815
|
+
};
|
|
19816
|
+
|
|
19817
|
+
var createNonEnumerableProperty = descriptors ? function (object, key, value) {
|
|
19818
|
+
return objectDefineProperty.f(object, key, createPropertyDescriptor(1, value));
|
|
19819
|
+
} : function (object, key, value) {
|
|
19820
|
+
object[key] = value;
|
|
19821
|
+
return object;
|
|
19822
|
+
};
|
|
19823
|
+
|
|
19824
|
+
var FunctionPrototype$1 = Function.prototype;
|
|
19825
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
19826
|
+
var getDescriptor = descriptors && Object.getOwnPropertyDescriptor;
|
|
19827
|
+
|
|
19828
|
+
var EXISTS$1 = hasOwnProperty_1(FunctionPrototype$1, 'name');
|
|
19829
|
+
// additional protection from minified / mangled / dropped function names
|
|
19830
|
+
var PROPER = EXISTS$1 && (function something() { /* empty */ }).name === 'something';
|
|
19831
|
+
var CONFIGURABLE$1 = EXISTS$1 && (!descriptors || (descriptors && getDescriptor(FunctionPrototype$1, 'name').configurable));
|
|
19832
|
+
|
|
19833
|
+
var functionName = {
|
|
19834
|
+
EXISTS: EXISTS$1,
|
|
19835
|
+
PROPER: PROPER,
|
|
19836
|
+
CONFIGURABLE: CONFIGURABLE$1
|
|
19837
|
+
};
|
|
19838
|
+
|
|
19839
|
+
var functionToString = functionUncurryThis(Function.toString);
|
|
19840
|
+
|
|
19841
|
+
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
19842
|
+
if (!isCallable(sharedStore.inspectSource)) {
|
|
19843
|
+
sharedStore.inspectSource = function (it) {
|
|
19844
|
+
return functionToString(it);
|
|
19845
|
+
};
|
|
19846
|
+
}
|
|
19847
|
+
|
|
19848
|
+
var inspectSource = sharedStore.inspectSource;
|
|
19849
|
+
|
|
19850
|
+
var WeakMap$1 = global_1.WeakMap;
|
|
19851
|
+
|
|
19852
|
+
var nativeWeakMap = isCallable(WeakMap$1) && /native code/.test(inspectSource(WeakMap$1));
|
|
19853
|
+
|
|
19854
|
+
var keys$1 = shared('keys');
|
|
19855
|
+
|
|
19856
|
+
var sharedKey = function (key) {
|
|
19857
|
+
return keys$1[key] || (keys$1[key] = uid(key));
|
|
19858
|
+
};
|
|
19859
|
+
|
|
19860
|
+
var hiddenKeys = {};
|
|
19861
|
+
|
|
19862
|
+
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
19863
|
+
var TypeError$7 = global_1.TypeError;
|
|
19864
|
+
var WeakMap$2 = global_1.WeakMap;
|
|
19865
|
+
var set, get, has;
|
|
19866
|
+
|
|
19867
|
+
var enforce = function (it) {
|
|
19868
|
+
return has(it) ? get(it) : set(it, {});
|
|
19869
|
+
};
|
|
19870
|
+
|
|
19871
|
+
var getterFor = function (TYPE) {
|
|
19872
|
+
return function (it) {
|
|
19873
|
+
var state;
|
|
19874
|
+
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
19875
|
+
throw TypeError$7('Incompatible receiver, ' + TYPE + ' required');
|
|
19876
|
+
} return state;
|
|
19877
|
+
};
|
|
19878
|
+
};
|
|
19879
|
+
|
|
19880
|
+
if (nativeWeakMap || sharedStore.state) {
|
|
19881
|
+
var store$1 = sharedStore.state || (sharedStore.state = new WeakMap$2());
|
|
19882
|
+
var wmget = functionUncurryThis(store$1.get);
|
|
19883
|
+
var wmhas = functionUncurryThis(store$1.has);
|
|
19884
|
+
var wmset = functionUncurryThis(store$1.set);
|
|
19885
|
+
set = function (it, metadata) {
|
|
19886
|
+
if (wmhas(store$1, it)) throw new TypeError$7(OBJECT_ALREADY_INITIALIZED);
|
|
19887
|
+
metadata.facade = it;
|
|
19888
|
+
wmset(store$1, it, metadata);
|
|
19889
|
+
return metadata;
|
|
19890
|
+
};
|
|
19891
|
+
get = function (it) {
|
|
19892
|
+
return wmget(store$1, it) || {};
|
|
19893
|
+
};
|
|
19894
|
+
has = function (it) {
|
|
19895
|
+
return wmhas(store$1, it);
|
|
19896
|
+
};
|
|
19897
|
+
} else {
|
|
19898
|
+
var STATE = sharedKey('state');
|
|
19899
|
+
hiddenKeys[STATE] = true;
|
|
19900
|
+
set = function (it, metadata) {
|
|
19901
|
+
if (hasOwnProperty_1(it, STATE)) throw new TypeError$7(OBJECT_ALREADY_INITIALIZED);
|
|
19902
|
+
metadata.facade = it;
|
|
19903
|
+
createNonEnumerableProperty(it, STATE, metadata);
|
|
19904
|
+
return metadata;
|
|
19905
|
+
};
|
|
19906
|
+
get = function (it) {
|
|
19907
|
+
return hasOwnProperty_1(it, STATE) ? it[STATE] : {};
|
|
19908
|
+
};
|
|
19909
|
+
has = function (it) {
|
|
19910
|
+
return hasOwnProperty_1(it, STATE);
|
|
19911
|
+
};
|
|
19912
|
+
}
|
|
19913
|
+
|
|
19914
|
+
var internalState = {
|
|
19915
|
+
set: set,
|
|
19916
|
+
get: get,
|
|
19917
|
+
has: has,
|
|
19918
|
+
enforce: enforce,
|
|
19919
|
+
getterFor: getterFor
|
|
19920
|
+
};
|
|
19921
|
+
|
|
19922
|
+
var makeBuiltIn_1 = createCommonjsModule(function (module) {
|
|
19923
|
+
var CONFIGURABLE_FUNCTION_NAME = functionName.CONFIGURABLE;
|
|
19924
|
+
|
|
19925
|
+
|
|
19926
|
+
|
|
19927
|
+
var enforceInternalState = internalState.enforce;
|
|
19928
|
+
var getInternalState = internalState.get;
|
|
19929
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
19930
|
+
var defineProperty = Object.defineProperty;
|
|
19931
|
+
|
|
19932
|
+
var CONFIGURABLE_LENGTH = descriptors && !fails(function () {
|
|
19933
|
+
return defineProperty(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
19934
|
+
});
|
|
19935
|
+
|
|
19936
|
+
var TEMPLATE = String(String).split('String');
|
|
19937
|
+
|
|
19938
|
+
var makeBuiltIn = module.exports = function (value, name, options) {
|
|
19939
|
+
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
19940
|
+
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
19941
|
+
}
|
|
19942
|
+
if (options && options.getter) name = 'get ' + name;
|
|
19943
|
+
if (options && options.setter) name = 'set ' + name;
|
|
19944
|
+
if (!hasOwnProperty_1(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) {
|
|
19945
|
+
defineProperty(value, 'name', { value: name, configurable: true });
|
|
19946
|
+
}
|
|
19947
|
+
if (CONFIGURABLE_LENGTH && options && hasOwnProperty_1(options, 'arity') && value.length !== options.arity) {
|
|
19948
|
+
defineProperty(value, 'length', { value: options.arity });
|
|
19949
|
+
}
|
|
19950
|
+
if (options && hasOwnProperty_1(options, 'constructor') && options.constructor) {
|
|
19951
|
+
if (descriptors) try {
|
|
19952
|
+
defineProperty(value, 'prototype', { writable: false });
|
|
19953
|
+
} catch (error) { /* empty */ }
|
|
19954
|
+
} else value.prototype = undefined;
|
|
19955
|
+
var state = enforceInternalState(value);
|
|
19956
|
+
if (!hasOwnProperty_1(state, 'source')) {
|
|
19957
|
+
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
19958
|
+
} return value;
|
|
19959
|
+
};
|
|
19960
|
+
|
|
19961
|
+
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
19962
|
+
// eslint-disable-next-line no-extend-native -- required
|
|
19963
|
+
Function.prototype.toString = makeBuiltIn(function toString() {
|
|
19964
|
+
return isCallable(this) && getInternalState(this).source || inspectSource(this);
|
|
19965
|
+
}, 'toString');
|
|
19966
|
+
});
|
|
19967
|
+
|
|
19968
|
+
var defineBuiltIn = function (O, key, value, options) {
|
|
19969
|
+
var unsafe = options ? !!options.unsafe : false;
|
|
19970
|
+
var simple = options ? !!options.enumerable : false;
|
|
19971
|
+
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
19972
|
+
var name = options && options.name !== undefined ? options.name : key;
|
|
19973
|
+
if (isCallable(value)) makeBuiltIn_1(value, name, options);
|
|
19974
|
+
if (O === global_1) {
|
|
19975
|
+
if (simple) O[key] = value;
|
|
19976
|
+
else setGlobal(key, value);
|
|
19977
|
+
return O;
|
|
19978
|
+
} else if (!unsafe) {
|
|
19979
|
+
delete O[key];
|
|
19980
|
+
} else if (!noTargetGet && O[key]) {
|
|
19981
|
+
simple = true;
|
|
19982
|
+
}
|
|
19983
|
+
if (simple) O[key] = value;
|
|
19984
|
+
else createNonEnumerableProperty(O, key, value);
|
|
19985
|
+
return O;
|
|
19986
|
+
};
|
|
19987
|
+
|
|
19988
|
+
var ceil = Math.ceil;
|
|
19989
|
+
var floor = Math.floor;
|
|
19990
|
+
|
|
19991
|
+
// `ToIntegerOrInfinity` abstract operation
|
|
19992
|
+
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
19993
|
+
var toIntegerOrInfinity = function (argument) {
|
|
19994
|
+
var number = +argument;
|
|
19995
|
+
// eslint-disable-next-line no-self-compare -- safe
|
|
19996
|
+
return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number);
|
|
19997
|
+
};
|
|
19998
|
+
|
|
19999
|
+
var max = Math.max;
|
|
20000
|
+
var min = Math.min;
|
|
20001
|
+
|
|
20002
|
+
// Helper for a popular repeating case of the spec:
|
|
20003
|
+
// Let integer be ? ToInteger(index).
|
|
20004
|
+
// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).
|
|
20005
|
+
var toAbsoluteIndex = function (index, length) {
|
|
20006
|
+
var integer = toIntegerOrInfinity(index);
|
|
20007
|
+
return integer < 0 ? max(integer + length, 0) : min(integer, length);
|
|
20008
|
+
};
|
|
20009
|
+
|
|
20010
|
+
var min$1 = Math.min;
|
|
20011
|
+
|
|
20012
|
+
// `ToLength` abstract operation
|
|
20013
|
+
// https://tc39.es/ecma262/#sec-tolength
|
|
20014
|
+
var toLength = function (argument) {
|
|
20015
|
+
return argument > 0 ? min$1(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991
|
|
20016
|
+
};
|
|
20017
|
+
|
|
20018
|
+
// `LengthOfArrayLike` abstract operation
|
|
20019
|
+
// https://tc39.es/ecma262/#sec-lengthofarraylike
|
|
20020
|
+
var lengthOfArrayLike = function (obj) {
|
|
20021
|
+
return toLength(obj.length);
|
|
20022
|
+
};
|
|
20023
|
+
|
|
20024
|
+
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
20025
|
+
var createMethod = function (IS_INCLUDES) {
|
|
20026
|
+
return function ($this, el, fromIndex) {
|
|
20027
|
+
var O = toIndexedObject($this);
|
|
20028
|
+
var length = lengthOfArrayLike(O);
|
|
20029
|
+
var index = toAbsoluteIndex(fromIndex, length);
|
|
20030
|
+
var value;
|
|
20031
|
+
// Array#includes uses SameValueZero equality algorithm
|
|
20032
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
20033
|
+
if (IS_INCLUDES && el != el) while (length > index) {
|
|
20034
|
+
value = O[index++];
|
|
20035
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
20036
|
+
if (value != value) return true;
|
|
20037
|
+
// Array#indexOf ignores holes, Array#includes - not
|
|
20038
|
+
} else for (;length > index; index++) {
|
|
20039
|
+
if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;
|
|
20040
|
+
} return !IS_INCLUDES && -1;
|
|
20041
|
+
};
|
|
20042
|
+
};
|
|
20043
|
+
|
|
20044
|
+
var arrayIncludes = {
|
|
20045
|
+
// `Array.prototype.includes` method
|
|
20046
|
+
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
20047
|
+
includes: createMethod(true),
|
|
20048
|
+
// `Array.prototype.indexOf` method
|
|
20049
|
+
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
20050
|
+
indexOf: createMethod(false)
|
|
20051
|
+
};
|
|
20052
|
+
|
|
20053
|
+
var indexOf = arrayIncludes.indexOf;
|
|
20054
|
+
|
|
20055
|
+
|
|
20056
|
+
var push = functionUncurryThis([].push);
|
|
20057
|
+
|
|
20058
|
+
var objectKeysInternal = function (object, names) {
|
|
20059
|
+
var O = toIndexedObject(object);
|
|
20060
|
+
var i = 0;
|
|
20061
|
+
var result = [];
|
|
20062
|
+
var key;
|
|
20063
|
+
for (key in O) !hasOwnProperty_1(hiddenKeys, key) && hasOwnProperty_1(O, key) && push(result, key);
|
|
20064
|
+
// Don't enum bug & hidden keys
|
|
20065
|
+
while (names.length > i) if (hasOwnProperty_1(O, key = names[i++])) {
|
|
20066
|
+
~indexOf(result, key) || push(result, key);
|
|
20067
|
+
}
|
|
20068
|
+
return result;
|
|
20069
|
+
};
|
|
20070
|
+
|
|
20071
|
+
// IE8- don't enum bug keys
|
|
20072
|
+
var enumBugKeys = [
|
|
20073
|
+
'constructor',
|
|
20074
|
+
'hasOwnProperty',
|
|
20075
|
+
'isPrototypeOf',
|
|
20076
|
+
'propertyIsEnumerable',
|
|
20077
|
+
'toLocaleString',
|
|
20078
|
+
'toString',
|
|
20079
|
+
'valueOf'
|
|
20080
|
+
];
|
|
20081
|
+
|
|
20082
|
+
var hiddenKeys$1 = enumBugKeys.concat('length', 'prototype');
|
|
20083
|
+
|
|
20084
|
+
// `Object.getOwnPropertyNames` method
|
|
20085
|
+
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
20086
|
+
// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
|
|
20087
|
+
var f$3 = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
20088
|
+
return objectKeysInternal(O, hiddenKeys$1);
|
|
20089
|
+
};
|
|
20090
|
+
|
|
20091
|
+
var objectGetOwnPropertyNames = {
|
|
20092
|
+
f: f$3
|
|
20093
|
+
};
|
|
20094
|
+
|
|
20095
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
|
|
20096
|
+
var f$4 = Object.getOwnPropertySymbols;
|
|
20097
|
+
|
|
20098
|
+
var objectGetOwnPropertySymbols = {
|
|
20099
|
+
f: f$4
|
|
20100
|
+
};
|
|
20101
|
+
|
|
20102
|
+
var concat = functionUncurryThis([].concat);
|
|
20103
|
+
|
|
20104
|
+
// all object keys, includes non-enumerable and symbols
|
|
20105
|
+
var ownKeys$1 = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
20106
|
+
var keys = objectGetOwnPropertyNames.f(anObject(it));
|
|
20107
|
+
var getOwnPropertySymbols = objectGetOwnPropertySymbols.f;
|
|
20108
|
+
return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys;
|
|
20109
|
+
};
|
|
20110
|
+
|
|
20111
|
+
var copyConstructorProperties = function (target, source, exceptions) {
|
|
20112
|
+
var keys = ownKeys$1(source);
|
|
20113
|
+
var defineProperty = objectDefineProperty.f;
|
|
20114
|
+
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
20115
|
+
for (var i = 0; i < keys.length; i++) {
|
|
20116
|
+
var key = keys[i];
|
|
20117
|
+
if (!hasOwnProperty_1(target, key) && !(exceptions && hasOwnProperty_1(exceptions, key))) {
|
|
20118
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
20119
|
+
}
|
|
20120
|
+
}
|
|
20121
|
+
};
|
|
20122
|
+
|
|
20123
|
+
var replacement = /#|\.prototype\./;
|
|
20124
|
+
|
|
20125
|
+
var isForced = function (feature, detection) {
|
|
20126
|
+
var value = data[normalize(feature)];
|
|
20127
|
+
return value == POLYFILL ? true
|
|
20128
|
+
: value == NATIVE ? false
|
|
20129
|
+
: isCallable(detection) ? fails(detection)
|
|
20130
|
+
: !!detection;
|
|
20131
|
+
};
|
|
20132
|
+
|
|
20133
|
+
var normalize = isForced.normalize = function (string) {
|
|
20134
|
+
return String(string).replace(replacement, '.').toLowerCase();
|
|
20135
|
+
};
|
|
20136
|
+
|
|
20137
|
+
var data = isForced.data = {};
|
|
20138
|
+
var NATIVE = isForced.NATIVE = 'N';
|
|
20139
|
+
var POLYFILL = isForced.POLYFILL = 'P';
|
|
20140
|
+
|
|
20141
|
+
var isForced_1 = isForced;
|
|
20142
|
+
|
|
20143
|
+
var getOwnPropertyDescriptor$1 = objectGetOwnPropertyDescriptor.f;
|
|
20144
|
+
|
|
20145
|
+
|
|
20146
|
+
|
|
20147
|
+
|
|
20148
|
+
|
|
20149
|
+
|
|
20150
|
+
/*
|
|
20151
|
+
options.target - name of the target object
|
|
20152
|
+
options.global - target is the global object
|
|
20153
|
+
options.stat - export as static methods of target
|
|
20154
|
+
options.proto - export as prototype methods of target
|
|
20155
|
+
options.real - real prototype method for the `pure` version
|
|
20156
|
+
options.forced - export even if the native feature is available
|
|
20157
|
+
options.bind - bind methods to the target, required for the `pure` version
|
|
20158
|
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
20159
|
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
20160
|
+
options.sham - add a flag to not completely full polyfills
|
|
20161
|
+
options.enumerable - export as enumerable property
|
|
20162
|
+
options.noTargetGet - prevent calling a getter on target
|
|
20163
|
+
options.name - the .name of the function if it does not match the key
|
|
20164
|
+
*/
|
|
20165
|
+
var _export = function (options, source) {
|
|
20166
|
+
var TARGET = options.target;
|
|
20167
|
+
var GLOBAL = options.global;
|
|
20168
|
+
var STATIC = options.stat;
|
|
20169
|
+
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
20170
|
+
if (GLOBAL) {
|
|
20171
|
+
target = global_1;
|
|
20172
|
+
} else if (STATIC) {
|
|
20173
|
+
target = global_1[TARGET] || setGlobal(TARGET, {});
|
|
20174
|
+
} else {
|
|
20175
|
+
target = (global_1[TARGET] || {}).prototype;
|
|
20176
|
+
}
|
|
20177
|
+
if (target) for (key in source) {
|
|
20178
|
+
sourceProperty = source[key];
|
|
20179
|
+
if (options.noTargetGet) {
|
|
20180
|
+
descriptor = getOwnPropertyDescriptor$1(target, key);
|
|
20181
|
+
targetProperty = descriptor && descriptor.value;
|
|
20182
|
+
} else targetProperty = target[key];
|
|
20183
|
+
FORCED = isForced_1(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);
|
|
20184
|
+
// contained in target
|
|
20185
|
+
if (!FORCED && targetProperty !== undefined) {
|
|
20186
|
+
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
20187
|
+
copyConstructorProperties(sourceProperty, targetProperty);
|
|
20188
|
+
}
|
|
20189
|
+
// add a flag to not completely full polyfills
|
|
20190
|
+
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
20191
|
+
createNonEnumerableProperty(sourceProperty, 'sham', true);
|
|
20192
|
+
}
|
|
20193
|
+
defineBuiltIn(target, key, sourceProperty, options);
|
|
20194
|
+
}
|
|
20195
|
+
};
|
|
20196
|
+
|
|
20197
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
20198
|
+
var test$1 = {};
|
|
20199
|
+
|
|
20200
|
+
test$1[TO_STRING_TAG] = 'z';
|
|
20201
|
+
|
|
20202
|
+
var toStringTagSupport = String(test$1) === '[object z]';
|
|
20203
|
+
|
|
20204
|
+
var TO_STRING_TAG$1 = wellKnownSymbol('toStringTag');
|
|
20205
|
+
var Object$4 = global_1.Object;
|
|
20206
|
+
|
|
20207
|
+
// ES3 wrong here
|
|
20208
|
+
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
20209
|
+
|
|
20210
|
+
// fallback for IE11 Script Access Denied error
|
|
20211
|
+
var tryGet = function (it, key) {
|
|
20212
|
+
try {
|
|
20213
|
+
return it[key];
|
|
20214
|
+
} catch (error) { /* empty */ }
|
|
20215
|
+
};
|
|
20216
|
+
|
|
20217
|
+
// getting tag from ES6+ `Object.prototype.toString`
|
|
20218
|
+
var classof = toStringTagSupport ? classofRaw : function (it) {
|
|
20219
|
+
var O, tag, result;
|
|
20220
|
+
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
20221
|
+
// @@toStringTag case
|
|
20222
|
+
: typeof (tag = tryGet(O = Object$4(it), TO_STRING_TAG$1)) == 'string' ? tag
|
|
20223
|
+
// builtinTag case
|
|
20224
|
+
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
20225
|
+
// ES3 arguments fallback
|
|
20226
|
+
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
20227
|
+
};
|
|
20228
|
+
|
|
20229
|
+
var String$3 = global_1.String;
|
|
20230
|
+
|
|
20231
|
+
var toString_1 = function (argument) {
|
|
20232
|
+
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
20233
|
+
return String$3(argument);
|
|
20234
|
+
};
|
|
20235
|
+
|
|
20236
|
+
var charAt = functionUncurryThis(''.charAt);
|
|
20237
|
+
|
|
20238
|
+
var FORCED = fails(function () {
|
|
20239
|
+
// eslint-disable-next-line es-x/no-array-string-prototype-at -- safe
|
|
20240
|
+
return '𠮷'.at(-2) !== '\uD842';
|
|
20241
|
+
});
|
|
20242
|
+
|
|
20243
|
+
// `String.prototype.at` method
|
|
20244
|
+
// https://github.com/tc39/proposal-relative-indexing-method
|
|
20245
|
+
_export({ target: 'String', proto: true, forced: FORCED }, {
|
|
20246
|
+
at: function at(index) {
|
|
20247
|
+
var S = toString_1(requireObjectCoercible(this));
|
|
20248
|
+
var len = S.length;
|
|
20249
|
+
var relativeIndex = toIntegerOrInfinity(index);
|
|
20250
|
+
var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
|
|
20251
|
+
return (k < 0 || k >= len) ? undefined : charAt(S, k);
|
|
20252
|
+
}
|
|
20253
|
+
});
|
|
20254
|
+
|
|
20255
|
+
// `Object.keys` method
|
|
20256
|
+
// https://tc39.es/ecma262/#sec-object.keys
|
|
20257
|
+
// eslint-disable-next-line es-x/no-object-keys -- safe
|
|
20258
|
+
var objectKeys = Object.keys || function keys(O) {
|
|
20259
|
+
return objectKeysInternal(O, enumBugKeys);
|
|
20260
|
+
};
|
|
20261
|
+
|
|
20262
|
+
// `Object.defineProperties` method
|
|
20263
|
+
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
20264
|
+
// eslint-disable-next-line es-x/no-object-defineproperties -- safe
|
|
20265
|
+
var f$5 = descriptors && !v8PrototypeDefineBug ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
20266
|
+
anObject(O);
|
|
20267
|
+
var props = toIndexedObject(Properties);
|
|
20268
|
+
var keys = objectKeys(Properties);
|
|
20269
|
+
var length = keys.length;
|
|
20270
|
+
var index = 0;
|
|
20271
|
+
var key;
|
|
20272
|
+
while (length > index) objectDefineProperty.f(O, key = keys[index++], props[key]);
|
|
20273
|
+
return O;
|
|
20274
|
+
};
|
|
20275
|
+
|
|
20276
|
+
var objectDefineProperties = {
|
|
20277
|
+
f: f$5
|
|
20278
|
+
};
|
|
20279
|
+
|
|
20280
|
+
var html = getBuiltIn('document', 'documentElement');
|
|
20281
|
+
|
|
20282
|
+
/* global ActiveXObject -- old IE, WSH */
|
|
20283
|
+
|
|
20284
|
+
|
|
20285
|
+
|
|
20286
|
+
|
|
20287
|
+
|
|
20288
|
+
|
|
20289
|
+
|
|
20290
|
+
|
|
20291
|
+
var GT = '>';
|
|
20292
|
+
var LT = '<';
|
|
20293
|
+
var PROTOTYPE = 'prototype';
|
|
20294
|
+
var SCRIPT = 'script';
|
|
20295
|
+
var IE_PROTO = sharedKey('IE_PROTO');
|
|
20296
|
+
|
|
20297
|
+
var EmptyConstructor = function () { /* empty */ };
|
|
20298
|
+
|
|
20299
|
+
var scriptTag = function (content) {
|
|
20300
|
+
return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;
|
|
20301
|
+
};
|
|
20302
|
+
|
|
20303
|
+
// Create object with fake `null` prototype: use ActiveX Object with cleared prototype
|
|
20304
|
+
var NullProtoObjectViaActiveX = function (activeXDocument) {
|
|
20305
|
+
activeXDocument.write(scriptTag(''));
|
|
20306
|
+
activeXDocument.close();
|
|
20307
|
+
var temp = activeXDocument.parentWindow.Object;
|
|
20308
|
+
activeXDocument = null; // avoid memory leak
|
|
20309
|
+
return temp;
|
|
20310
|
+
};
|
|
20311
|
+
|
|
20312
|
+
// Create object with fake `null` prototype: use iframe Object with cleared prototype
|
|
20313
|
+
var NullProtoObjectViaIFrame = function () {
|
|
20314
|
+
// Thrash, waste and sodomy: IE GC bug
|
|
20315
|
+
var iframe = documentCreateElement('iframe');
|
|
20316
|
+
var JS = 'java' + SCRIPT + ':';
|
|
20317
|
+
var iframeDocument;
|
|
20318
|
+
iframe.style.display = 'none';
|
|
20319
|
+
html.appendChild(iframe);
|
|
20320
|
+
// https://github.com/zloirock/core-js/issues/475
|
|
20321
|
+
iframe.src = String(JS);
|
|
20322
|
+
iframeDocument = iframe.contentWindow.document;
|
|
20323
|
+
iframeDocument.open();
|
|
20324
|
+
iframeDocument.write(scriptTag('document.F=Object'));
|
|
20325
|
+
iframeDocument.close();
|
|
20326
|
+
return iframeDocument.F;
|
|
20327
|
+
};
|
|
20328
|
+
|
|
20329
|
+
// Check for document.domain and active x support
|
|
20330
|
+
// No need to use active x approach when document.domain is not set
|
|
20331
|
+
// see https://github.com/es-shims/es5-shim/issues/150
|
|
20332
|
+
// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
|
|
20333
|
+
// avoid IE GC bug
|
|
20334
|
+
var activeXDocument;
|
|
20335
|
+
var NullProtoObject = function () {
|
|
20336
|
+
try {
|
|
20337
|
+
activeXDocument = new ActiveXObject('htmlfile');
|
|
20338
|
+
} catch (error) { /* ignore */ }
|
|
20339
|
+
NullProtoObject = typeof document != 'undefined'
|
|
20340
|
+
? document.domain && activeXDocument
|
|
20341
|
+
? NullProtoObjectViaActiveX(activeXDocument) // old IE
|
|
20342
|
+
: NullProtoObjectViaIFrame()
|
|
20343
|
+
: NullProtoObjectViaActiveX(activeXDocument); // WSH
|
|
20344
|
+
var length = enumBugKeys.length;
|
|
20345
|
+
while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
|
|
20346
|
+
return NullProtoObject();
|
|
20347
|
+
};
|
|
20348
|
+
|
|
20349
|
+
hiddenKeys[IE_PROTO] = true;
|
|
20350
|
+
|
|
20351
|
+
// `Object.create` method
|
|
20352
|
+
// https://tc39.es/ecma262/#sec-object.create
|
|
20353
|
+
// eslint-disable-next-line es-x/no-object-create -- safe
|
|
20354
|
+
var objectCreate = Object.create || function create(O, Properties) {
|
|
20355
|
+
var result;
|
|
20356
|
+
if (O !== null) {
|
|
20357
|
+
EmptyConstructor[PROTOTYPE] = anObject(O);
|
|
20358
|
+
result = new EmptyConstructor();
|
|
20359
|
+
EmptyConstructor[PROTOTYPE] = null;
|
|
20360
|
+
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
20361
|
+
result[IE_PROTO] = O;
|
|
20362
|
+
} else result = NullProtoObject();
|
|
20363
|
+
return Properties === undefined ? result : objectDefineProperties.f(result, Properties);
|
|
20364
|
+
};
|
|
20365
|
+
|
|
20366
|
+
var UNSCOPABLES = wellKnownSymbol('unscopables');
|
|
20367
|
+
var ArrayPrototype = Array.prototype;
|
|
20368
|
+
|
|
20369
|
+
// Array.prototype[@@unscopables]
|
|
20370
|
+
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
20371
|
+
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
20372
|
+
objectDefineProperty.f(ArrayPrototype, UNSCOPABLES, {
|
|
20373
|
+
configurable: true,
|
|
20374
|
+
value: objectCreate(null)
|
|
20375
|
+
});
|
|
20376
|
+
}
|
|
20377
|
+
|
|
20378
|
+
// add a key to Array.prototype[@@unscopables]
|
|
20379
|
+
var addToUnscopables = function (key) {
|
|
20380
|
+
ArrayPrototype[UNSCOPABLES][key] = true;
|
|
20381
|
+
};
|
|
20382
|
+
|
|
20383
|
+
// `Array.prototype.at` method
|
|
20384
|
+
// https://github.com/tc39/proposal-relative-indexing-method
|
|
20385
|
+
_export({ target: 'Array', proto: true }, {
|
|
20386
|
+
at: function at(index) {
|
|
20387
|
+
var O = toObject(this);
|
|
20388
|
+
var len = lengthOfArrayLike(O);
|
|
20389
|
+
var relativeIndex = toIntegerOrInfinity(index);
|
|
20390
|
+
var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
|
|
20391
|
+
return (k < 0 || k >= len) ? undefined : O[k];
|
|
20392
|
+
}
|
|
20393
|
+
});
|
|
20394
|
+
|
|
20395
|
+
addToUnscopables('at');
|
|
20396
|
+
|
|
20397
|
+
// eslint-disable-next-line es-x/no-typed-arrays -- safe
|
|
20398
|
+
var arrayBufferNative = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined';
|
|
20399
|
+
|
|
20400
|
+
var correctPrototypeGetter = !fails(function () {
|
|
20401
|
+
function F() { /* empty */ }
|
|
20402
|
+
F.prototype.constructor = null;
|
|
20403
|
+
// eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
|
|
20404
|
+
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
20405
|
+
});
|
|
20406
|
+
|
|
20407
|
+
var IE_PROTO$1 = sharedKey('IE_PROTO');
|
|
20408
|
+
var Object$5 = global_1.Object;
|
|
20409
|
+
var ObjectPrototype = Object$5.prototype;
|
|
20410
|
+
|
|
20411
|
+
// `Object.getPrototypeOf` method
|
|
20412
|
+
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
20413
|
+
var objectGetPrototypeOf = correctPrototypeGetter ? Object$5.getPrototypeOf : function (O) {
|
|
20414
|
+
var object = toObject(O);
|
|
20415
|
+
if (hasOwnProperty_1(object, IE_PROTO$1)) return object[IE_PROTO$1];
|
|
20416
|
+
var constructor = object.constructor;
|
|
20417
|
+
if (isCallable(constructor) && object instanceof constructor) {
|
|
20418
|
+
return constructor.prototype;
|
|
20419
|
+
} return object instanceof Object$5 ? ObjectPrototype : null;
|
|
20420
|
+
};
|
|
20421
|
+
|
|
20422
|
+
var String$4 = global_1.String;
|
|
20423
|
+
var TypeError$8 = global_1.TypeError;
|
|
20424
|
+
|
|
20425
|
+
var aPossiblePrototype = function (argument) {
|
|
20426
|
+
if (typeof argument == 'object' || isCallable(argument)) return argument;
|
|
20427
|
+
throw TypeError$8("Can't set " + String$4(argument) + ' as a prototype');
|
|
20428
|
+
};
|
|
20429
|
+
|
|
20430
|
+
/* eslint-disable no-proto -- safe */
|
|
20431
|
+
|
|
20432
|
+
|
|
20433
|
+
|
|
20434
|
+
|
|
20435
|
+
// `Object.setPrototypeOf` method
|
|
20436
|
+
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
20437
|
+
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
20438
|
+
// eslint-disable-next-line es-x/no-object-setprototypeof -- safe
|
|
20439
|
+
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
20440
|
+
var CORRECT_SETTER = false;
|
|
20441
|
+
var test = {};
|
|
20442
|
+
var setter;
|
|
20443
|
+
try {
|
|
20444
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
20445
|
+
setter = functionUncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
20446
|
+
setter(test, []);
|
|
20447
|
+
CORRECT_SETTER = test instanceof Array;
|
|
20448
|
+
} catch (error) { /* empty */ }
|
|
20449
|
+
return function setPrototypeOf(O, proto) {
|
|
20450
|
+
anObject(O);
|
|
20451
|
+
aPossiblePrototype(proto);
|
|
20452
|
+
if (CORRECT_SETTER) setter(O, proto);
|
|
20453
|
+
else O.__proto__ = proto;
|
|
20454
|
+
return O;
|
|
20455
|
+
};
|
|
20456
|
+
}() : undefined);
|
|
20457
|
+
|
|
20458
|
+
var defineProperty$1 = objectDefineProperty.f;
|
|
20459
|
+
|
|
20460
|
+
|
|
20461
|
+
|
|
20462
|
+
|
|
20463
|
+
|
|
20464
|
+
|
|
20465
|
+
var Int8Array = global_1.Int8Array;
|
|
20466
|
+
var Int8ArrayPrototype = Int8Array && Int8Array.prototype;
|
|
20467
|
+
var Uint8ClampedArray = global_1.Uint8ClampedArray;
|
|
20468
|
+
var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype;
|
|
20469
|
+
var TypedArray = Int8Array && objectGetPrototypeOf(Int8Array);
|
|
20470
|
+
var TypedArrayPrototype = Int8ArrayPrototype && objectGetPrototypeOf(Int8ArrayPrototype);
|
|
20471
|
+
var ObjectPrototype$1 = Object.prototype;
|
|
20472
|
+
var TypeError$9 = global_1.TypeError;
|
|
20473
|
+
|
|
20474
|
+
var TO_STRING_TAG$2 = wellKnownSymbol('toStringTag');
|
|
20475
|
+
var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG');
|
|
20476
|
+
var TYPED_ARRAY_CONSTRUCTOR = uid('TYPED_ARRAY_CONSTRUCTOR');
|
|
20477
|
+
// Fixing native typed arrays in Opera Presto crashes the browser, see #595
|
|
20478
|
+
var NATIVE_ARRAY_BUFFER_VIEWS = arrayBufferNative && !!objectSetPrototypeOf && classof(global_1.opera) !== 'Opera';
|
|
20479
|
+
var TYPED_ARRAY_TAG_REQUIRED = false;
|
|
20480
|
+
var NAME, Constructor, Prototype;
|
|
20481
|
+
|
|
20482
|
+
var TypedArrayConstructorsList = {
|
|
20483
|
+
Int8Array: 1,
|
|
20484
|
+
Uint8Array: 1,
|
|
20485
|
+
Uint8ClampedArray: 1,
|
|
20486
|
+
Int16Array: 2,
|
|
20487
|
+
Uint16Array: 2,
|
|
20488
|
+
Int32Array: 4,
|
|
20489
|
+
Uint32Array: 4,
|
|
20490
|
+
Float32Array: 4,
|
|
20491
|
+
Float64Array: 8
|
|
20492
|
+
};
|
|
20493
|
+
|
|
20494
|
+
var BigIntArrayConstructorsList = {
|
|
20495
|
+
BigInt64Array: 8,
|
|
20496
|
+
BigUint64Array: 8
|
|
20497
|
+
};
|
|
20498
|
+
|
|
20499
|
+
var isView = function isView(it) {
|
|
20500
|
+
if (!isObject(it)) return false;
|
|
20501
|
+
var klass = classof(it);
|
|
20502
|
+
return klass === 'DataView'
|
|
20503
|
+
|| hasOwnProperty_1(TypedArrayConstructorsList, klass)
|
|
20504
|
+
|| hasOwnProperty_1(BigIntArrayConstructorsList, klass);
|
|
20505
|
+
};
|
|
20506
|
+
|
|
20507
|
+
var isTypedArray = function (it) {
|
|
20508
|
+
if (!isObject(it)) return false;
|
|
20509
|
+
var klass = classof(it);
|
|
20510
|
+
return hasOwnProperty_1(TypedArrayConstructorsList, klass)
|
|
20511
|
+
|| hasOwnProperty_1(BigIntArrayConstructorsList, klass);
|
|
20512
|
+
};
|
|
20513
|
+
|
|
20514
|
+
var aTypedArray = function (it) {
|
|
20515
|
+
if (isTypedArray(it)) return it;
|
|
20516
|
+
throw TypeError$9('Target is not a typed array');
|
|
20517
|
+
};
|
|
20518
|
+
|
|
20519
|
+
var aTypedArrayConstructor = function (C) {
|
|
20520
|
+
if (isCallable(C) && (!objectSetPrototypeOf || objectIsPrototypeOf(TypedArray, C))) return C;
|
|
20521
|
+
throw TypeError$9(tryToString(C) + ' is not a typed array constructor');
|
|
20522
|
+
};
|
|
20523
|
+
|
|
20524
|
+
var exportTypedArrayMethod = function (KEY, property, forced, options) {
|
|
20525
|
+
if (!descriptors) return;
|
|
20526
|
+
if (forced) for (var ARRAY in TypedArrayConstructorsList) {
|
|
20527
|
+
var TypedArrayConstructor = global_1[ARRAY];
|
|
20528
|
+
if (TypedArrayConstructor && hasOwnProperty_1(TypedArrayConstructor.prototype, KEY)) try {
|
|
20529
|
+
delete TypedArrayConstructor.prototype[KEY];
|
|
20530
|
+
} catch (error) {
|
|
20531
|
+
// old WebKit bug - some methods are non-configurable
|
|
20532
|
+
try {
|
|
20533
|
+
TypedArrayConstructor.prototype[KEY] = property;
|
|
20534
|
+
} catch (error2) { /* empty */ }
|
|
20535
|
+
}
|
|
20536
|
+
}
|
|
20537
|
+
if (!TypedArrayPrototype[KEY] || forced) {
|
|
20538
|
+
defineBuiltIn(TypedArrayPrototype, KEY, forced ? property
|
|
20539
|
+
: NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property, options);
|
|
20540
|
+
}
|
|
20541
|
+
};
|
|
20542
|
+
|
|
20543
|
+
var exportTypedArrayStaticMethod = function (KEY, property, forced) {
|
|
20544
|
+
var ARRAY, TypedArrayConstructor;
|
|
20545
|
+
if (!descriptors) return;
|
|
20546
|
+
if (objectSetPrototypeOf) {
|
|
20547
|
+
if (forced) for (ARRAY in TypedArrayConstructorsList) {
|
|
20548
|
+
TypedArrayConstructor = global_1[ARRAY];
|
|
20549
|
+
if (TypedArrayConstructor && hasOwnProperty_1(TypedArrayConstructor, KEY)) try {
|
|
20550
|
+
delete TypedArrayConstructor[KEY];
|
|
20551
|
+
} catch (error) { /* empty */ }
|
|
20552
|
+
}
|
|
20553
|
+
if (!TypedArray[KEY] || forced) {
|
|
20554
|
+
// V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
|
|
20555
|
+
try {
|
|
20556
|
+
return defineBuiltIn(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property);
|
|
20557
|
+
} catch (error) { /* empty */ }
|
|
20558
|
+
} else return;
|
|
20559
|
+
}
|
|
20560
|
+
for (ARRAY in TypedArrayConstructorsList) {
|
|
20561
|
+
TypedArrayConstructor = global_1[ARRAY];
|
|
20562
|
+
if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) {
|
|
20563
|
+
defineBuiltIn(TypedArrayConstructor, KEY, property);
|
|
20564
|
+
}
|
|
20565
|
+
}
|
|
20566
|
+
};
|
|
20567
|
+
|
|
20568
|
+
for (NAME in TypedArrayConstructorsList) {
|
|
20569
|
+
Constructor = global_1[NAME];
|
|
20570
|
+
Prototype = Constructor && Constructor.prototype;
|
|
20571
|
+
if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);
|
|
20572
|
+
else NATIVE_ARRAY_BUFFER_VIEWS = false;
|
|
20573
|
+
}
|
|
20574
|
+
|
|
20575
|
+
for (NAME in BigIntArrayConstructorsList) {
|
|
20576
|
+
Constructor = global_1[NAME];
|
|
20577
|
+
Prototype = Constructor && Constructor.prototype;
|
|
20578
|
+
if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);
|
|
20579
|
+
}
|
|
20580
|
+
|
|
20581
|
+
// WebKit bug - typed arrays constructors prototype is Object.prototype
|
|
20582
|
+
if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) {
|
|
20583
|
+
// eslint-disable-next-line no-shadow -- safe
|
|
20584
|
+
TypedArray = function TypedArray() {
|
|
20585
|
+
throw TypeError$9('Incorrect invocation');
|
|
20586
|
+
};
|
|
20587
|
+
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
|
|
20588
|
+
if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME], TypedArray);
|
|
20589
|
+
}
|
|
20590
|
+
}
|
|
20591
|
+
|
|
20592
|
+
if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype$1) {
|
|
20593
|
+
TypedArrayPrototype = TypedArray.prototype;
|
|
20594
|
+
if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) {
|
|
20595
|
+
if (global_1[NAME]) objectSetPrototypeOf(global_1[NAME].prototype, TypedArrayPrototype);
|
|
20596
|
+
}
|
|
20597
|
+
}
|
|
20598
|
+
|
|
20599
|
+
// WebKit bug - one more object in Uint8ClampedArray prototype chain
|
|
20600
|
+
if (NATIVE_ARRAY_BUFFER_VIEWS && objectGetPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) {
|
|
20601
|
+
objectSetPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype);
|
|
20602
|
+
}
|
|
20603
|
+
|
|
20604
|
+
if (descriptors && !hasOwnProperty_1(TypedArrayPrototype, TO_STRING_TAG$2)) {
|
|
20605
|
+
TYPED_ARRAY_TAG_REQUIRED = true;
|
|
20606
|
+
defineProperty$1(TypedArrayPrototype, TO_STRING_TAG$2, { get: function () {
|
|
20607
|
+
return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined;
|
|
20608
|
+
} });
|
|
20609
|
+
for (NAME in TypedArrayConstructorsList) if (global_1[NAME]) {
|
|
20610
|
+
createNonEnumerableProperty(global_1[NAME], TYPED_ARRAY_TAG, NAME);
|
|
20611
|
+
}
|
|
20612
|
+
}
|
|
20613
|
+
|
|
20614
|
+
var arrayBufferViewCore = {
|
|
20615
|
+
NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS,
|
|
20616
|
+
TYPED_ARRAY_CONSTRUCTOR: TYPED_ARRAY_CONSTRUCTOR,
|
|
20617
|
+
TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQUIRED && TYPED_ARRAY_TAG,
|
|
20618
|
+
aTypedArray: aTypedArray,
|
|
20619
|
+
aTypedArrayConstructor: aTypedArrayConstructor,
|
|
20620
|
+
exportTypedArrayMethod: exportTypedArrayMethod,
|
|
20621
|
+
exportTypedArrayStaticMethod: exportTypedArrayStaticMethod,
|
|
20622
|
+
isView: isView,
|
|
20623
|
+
isTypedArray: isTypedArray,
|
|
20624
|
+
TypedArray: TypedArray,
|
|
20625
|
+
TypedArrayPrototype: TypedArrayPrototype
|
|
20626
|
+
};
|
|
20627
|
+
|
|
20628
|
+
var aTypedArray$1 = arrayBufferViewCore.aTypedArray;
|
|
20629
|
+
var exportTypedArrayMethod$1 = arrayBufferViewCore.exportTypedArrayMethod;
|
|
20630
|
+
|
|
20631
|
+
// `%TypedArray%.prototype.at` method
|
|
20632
|
+
// https://github.com/tc39/proposal-relative-indexing-method
|
|
20633
|
+
exportTypedArrayMethod$1('at', function at(index) {
|
|
20634
|
+
var O = aTypedArray$1(this);
|
|
20635
|
+
var len = lengthOfArrayLike(O);
|
|
20636
|
+
var relativeIndex = toIntegerOrInfinity(index);
|
|
20637
|
+
var k = relativeIndex >= 0 ? relativeIndex : len + relativeIndex;
|
|
20638
|
+
return (k < 0 || k >= len) ? undefined : O[k];
|
|
20639
|
+
});
|
|
20640
|
+
|
|
19393
20641
|
var selectedColor = "".concat(MATISSE_BLUE);
|
|
19394
20642
|
var hoverColor$3 = "".concat(HOVER_LIGHT_BLUE);
|
|
19395
20643
|
var fallbackValues$e = {
|
|
@@ -19400,24 +20648,24 @@ var fallbackValues$e = {
|
|
|
19400
20648
|
var IconWrapper = styled.div.withConfig({
|
|
19401
20649
|
displayName: "Dropdown__IconWrapper",
|
|
19402
20650
|
componentId: "sc-pn6m0h-0"
|
|
19403
|
-
})(["display:flex;flex-direction:column;justify-content:center;transition:transform 0.3s ease;", ""], function (_ref) {
|
|
20651
|
+
})(["position:absolute;display:flex;flex-direction:column;justify-content:center;transition:transform 0.3s ease;", ";top:20px;right:12px;"], function (_ref) {
|
|
19404
20652
|
var open = _ref.open;
|
|
19405
20653
|
return open ? "transform: rotate(-180deg)" : "";
|
|
19406
20654
|
});
|
|
19407
20655
|
var DropdownContentWrapper = styled.div.withConfig({
|
|
19408
20656
|
displayName: "Dropdown__DropdownContentWrapper",
|
|
19409
20657
|
componentId: "sc-pn6m0h-1"
|
|
19410
|
-
})(["transform-origin:0 0;border:1px solid ", ";border-radius:2px;background-color:", ";padding:8px 0 8px;position:absolute;width:", ";min-width:100%;max-height:", ";overflow-y:scroll;z-index:1;box-sizing:border-box;&:focus{outline:none;}"], GREY_CHATEAU, WHITE, function (_ref2) {
|
|
20658
|
+
})(["transform-origin:0 0;border:1px solid ", ";border-radius:2px;background-color:", ";padding:8px 0 8px;position:absolute;width:", ";min-width:100%;max-height:", ";overflow-y:scroll;z-index:1;box-sizing:border-box;&:focus{outline:none;}ul{padding-left:0;}"], GREY_CHATEAU, WHITE, function (_ref2) {
|
|
19411
20659
|
var widthFitOptions = _ref2.widthFitOptions;
|
|
19412
20660
|
return widthFitOptions ? "fit-content" : "100%";
|
|
19413
20661
|
}, function (_ref3) {
|
|
19414
20662
|
var maxHeight = _ref3.maxHeight;
|
|
19415
20663
|
return maxHeight || "400px";
|
|
19416
20664
|
});
|
|
19417
|
-
var DropdownItemWrapper = styled.
|
|
20665
|
+
var DropdownItemWrapper = styled.li.withConfig({
|
|
19418
20666
|
displayName: "Dropdown__DropdownItemWrapper",
|
|
19419
20667
|
componentId: "sc-pn6m0h-2"
|
|
19420
|
-
})(["background-color:", ";text-align:start;border-width:0px;border-color:transparent;box-shadow:none;padding:1rem;box-sizing:border-box;width:100%;cursor:", ";&:hover{background-color:", ";}&:focus{background-color:", ";outline:none;}"], function (_ref4) {
|
|
20668
|
+
})(["background-color:", ";text-align:start;border-width:0px;border-color:transparent;box-shadow:none;padding:1rem;box-sizing:border-box;width:100%;list-style:none;cursor:", ";&:hover{background-color:", ";}&:focus{background-color:", ";outline:none;}"], function (_ref4) {
|
|
19421
20669
|
var selected = _ref4.selected,
|
|
19422
20670
|
themeValues = _ref4.themeValues;
|
|
19423
20671
|
return selected ? themeValues.selectedColor : WHITE;
|
|
@@ -19435,32 +20683,30 @@ var DropdownItemWrapper = styled.div.withConfig({
|
|
|
19435
20683
|
themeValues = _ref7.themeValues;
|
|
19436
20684
|
return selected ? themeValues.selectedColor : disabled ? WHITE : themeValues.hoverColor;
|
|
19437
20685
|
});
|
|
19438
|
-
var SearchInput = styled.input.withConfig({
|
|
19439
|
-
displayName: "Dropdown__SearchInput",
|
|
19440
|
-
componentId: "sc-pn6m0h-3"
|
|
19441
|
-
})(["border:none;background-color:", ";font-size:16px;height:24px;"], function (_ref8) {
|
|
19442
|
-
var themeValues = _ref8.themeValues;
|
|
19443
|
-
return themeValues.hoverColor && themeValues.hoverColor;
|
|
19444
|
-
});
|
|
19445
20686
|
|
|
19446
|
-
var Dropdown = function Dropdown(
|
|
19447
|
-
var placeholder =
|
|
19448
|
-
options =
|
|
19449
|
-
value =
|
|
19450
|
-
isOpen =
|
|
19451
|
-
isError =
|
|
19452
|
-
onSelect =
|
|
19453
|
-
|
|
19454
|
-
disabledValues =
|
|
19455
|
-
|
|
19456
|
-
|
|
19457
|
-
themeValues =
|
|
19458
|
-
maxHeight =
|
|
19459
|
-
|
|
19460
|
-
widthFitOptions =
|
|
19461
|
-
disabled =
|
|
19462
|
-
|
|
19463
|
-
hasTitles =
|
|
20687
|
+
var Dropdown = function Dropdown(_ref8) {
|
|
20688
|
+
var placeholder = _ref8.placeholder,
|
|
20689
|
+
options = _ref8.options,
|
|
20690
|
+
value = _ref8.value,
|
|
20691
|
+
isOpen = _ref8.isOpen,
|
|
20692
|
+
isError = _ref8.isError,
|
|
20693
|
+
onSelect = _ref8.onSelect,
|
|
20694
|
+
_ref8$disabledValues = _ref8.disabledValues,
|
|
20695
|
+
disabledValues = _ref8$disabledValues === void 0 ? [] : _ref8$disabledValues,
|
|
20696
|
+
_ref8$onClick = _ref8.onClick,
|
|
20697
|
+
_onClick = _ref8$onClick === void 0 ? noop : _ref8$onClick,
|
|
20698
|
+
themeValues = _ref8.themeValues,
|
|
20699
|
+
maxHeight = _ref8.maxHeight,
|
|
20700
|
+
_ref8$widthFitOptions = _ref8.widthFitOptions,
|
|
20701
|
+
widthFitOptions = _ref8$widthFitOptions === void 0 ? false : _ref8$widthFitOptions,
|
|
20702
|
+
disabled = _ref8.disabled,
|
|
20703
|
+
_ref8$hasTitles = _ref8.hasTitles,
|
|
20704
|
+
hasTitles = _ref8$hasTitles === void 0 ? false : _ref8$hasTitles,
|
|
20705
|
+
_ref8$autoEraseTypeAh = _ref8.autoEraseTypeAhead,
|
|
20706
|
+
autoEraseTypeAhead = _ref8$autoEraseTypeAh === void 0 ? true : _ref8$autoEraseTypeAh,
|
|
20707
|
+
ariaLabelledby = _ref8.ariaLabelledby,
|
|
20708
|
+
_ref8$autocompleteVal = _ref8.autocompleteValue,
|
|
20709
|
+
autocompleteValue = _ref8$autocompleteVal === void 0 ? "" : _ref8$autocompleteVal;
|
|
19464
20710
|
|
|
19465
20711
|
var _useState = useState(""),
|
|
19466
20712
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -19482,6 +20728,21 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19482
20728
|
optionsChanged = _useState8[0],
|
|
19483
20729
|
setOptionsChanged = _useState8[1];
|
|
19484
20730
|
|
|
20731
|
+
var _useState9 = useState(undefined),
|
|
20732
|
+
_useState10 = _slicedToArray(_useState9, 2),
|
|
20733
|
+
selectedRef = _useState10[0],
|
|
20734
|
+
setSelectedRef = _useState10[1];
|
|
20735
|
+
|
|
20736
|
+
var _useState11 = useState(undefined),
|
|
20737
|
+
_useState12 = _slicedToArray(_useState11, 2),
|
|
20738
|
+
focusedRef = _useState12[0],
|
|
20739
|
+
setFocusedRef = _useState12[1];
|
|
20740
|
+
|
|
20741
|
+
var _useState13 = useState(false),
|
|
20742
|
+
_useState14 = _slicedToArray(_useState13, 2),
|
|
20743
|
+
inputChangedByAutofill = _useState14[0],
|
|
20744
|
+
setInputChangedByAutofill = _useState14[1];
|
|
20745
|
+
|
|
19485
20746
|
if (optionsState !== options) {
|
|
19486
20747
|
setOptionsState(options);
|
|
19487
20748
|
setOptionsChanged(true);
|
|
@@ -19492,10 +20753,10 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19492
20753
|
setOptionsChanged(false);
|
|
19493
20754
|
}
|
|
19494
20755
|
|
|
19495
|
-
var
|
|
19496
|
-
|
|
19497
|
-
timer =
|
|
19498
|
-
setTimer =
|
|
20756
|
+
var _useState15 = useState(null),
|
|
20757
|
+
_useState16 = _slicedToArray(_useState15, 2),
|
|
20758
|
+
timer = _useState16[0],
|
|
20759
|
+
setTimer = _useState16[1];
|
|
19499
20760
|
|
|
19500
20761
|
var optionRefs = useRef(_toConsumableArray(Array(options.length)).map(function () {
|
|
19501
20762
|
return /*#__PURE__*/createRef();
|
|
@@ -19511,21 +20772,23 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19511
20772
|
};
|
|
19512
20773
|
|
|
19513
20774
|
var onKeyDown = function onKeyDown(e) {
|
|
20775
|
+
console.log("current input value top of keyDown", inputValue);
|
|
19514
20776
|
var key = e.key,
|
|
19515
20777
|
keyCode = e.keyCode;
|
|
19516
20778
|
var focus = document.activeElement;
|
|
19517
20779
|
console.log("dropdown value is", value);
|
|
19518
|
-
console.log("focus is", focus);
|
|
19519
|
-
console.log("option refs are", optionRefs.current);
|
|
19520
20780
|
var optionEl = optionRefs.current.find(function (ref) {
|
|
19521
20781
|
return ref.current === focus;
|
|
19522
20782
|
});
|
|
19523
|
-
console.log("option el is", optionEl);
|
|
19524
20783
|
|
|
19525
20784
|
switch (key) {
|
|
19526
20785
|
case "ArrowDown":
|
|
19527
20786
|
e.preventDefault();
|
|
19528
20787
|
|
|
20788
|
+
if (!isOpen) {
|
|
20789
|
+
_onClick();
|
|
20790
|
+
}
|
|
20791
|
+
|
|
19529
20792
|
if (optionEl) {
|
|
19530
20793
|
if (optionEl.current.nextElementSibling) {
|
|
19531
20794
|
optionEl.current.nextElementSibling.focus();
|
|
@@ -19534,7 +20797,7 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19534
20797
|
break;
|
|
19535
20798
|
}
|
|
19536
20799
|
} else {
|
|
19537
|
-
|
|
20800
|
+
_onClick();
|
|
19538
20801
|
}
|
|
19539
20802
|
|
|
19540
20803
|
break;
|
|
@@ -19550,7 +20813,7 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19550
20813
|
break;
|
|
19551
20814
|
}
|
|
19552
20815
|
} else {
|
|
19553
|
-
|
|
20816
|
+
_onClick();
|
|
19554
20817
|
}
|
|
19555
20818
|
|
|
19556
20819
|
break;
|
|
@@ -19564,23 +20827,54 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19564
20827
|
|
|
19565
20828
|
case "Backspace" :
|
|
19566
20829
|
e.preventDefault();
|
|
19567
|
-
console.log("input value is", inputValue);
|
|
19568
|
-
console.log("new input value will be", inputValue.slice(0, -1));
|
|
19569
20830
|
setInputValue(inputValue.slice(0, -1));
|
|
19570
20831
|
break;
|
|
20832
|
+
|
|
20833
|
+
case "Home":
|
|
20834
|
+
e.preventDefault();
|
|
20835
|
+
optionRefs.current[0].current.focus();
|
|
20836
|
+
break;
|
|
20837
|
+
|
|
20838
|
+
case "End":
|
|
20839
|
+
e.preventDefault();
|
|
20840
|
+
console.log("option refs current", optionRefs.current);
|
|
20841
|
+
optionRefs.current.at(-1).current.focus();
|
|
20842
|
+
break;
|
|
20843
|
+
|
|
20844
|
+
case "Escape":
|
|
20845
|
+
if (isOpen) {
|
|
20846
|
+
_onClick();
|
|
20847
|
+
}
|
|
20848
|
+
|
|
20849
|
+
break;
|
|
19571
20850
|
}
|
|
19572
20851
|
|
|
19573
20852
|
if (keyCode > 64 && keyCode < 91 || keyCode == 32 || keyCode == 189) {
|
|
19574
20853
|
e.preventDefault();
|
|
20854
|
+
console.log("current input value inside keydown if", inputValue);
|
|
19575
20855
|
setInputValue(inputValue + key);
|
|
19576
20856
|
}
|
|
19577
20857
|
};
|
|
19578
20858
|
|
|
19579
|
-
|
|
19580
|
-
|
|
19581
|
-
|
|
20859
|
+
var handleItemSelection = function handleItemSelection(evt, choice, i) {
|
|
20860
|
+
if (disabledValues.includes(choice.value)) {
|
|
20861
|
+
evt.preventDefault();
|
|
20862
|
+
} else {
|
|
20863
|
+
setSelectedRef(optionRefs.current[i]);
|
|
20864
|
+
onSelect(choice.value);
|
|
20865
|
+
|
|
20866
|
+
if (isOpen) {
|
|
20867
|
+
_onClick();
|
|
20868
|
+
}
|
|
20869
|
+
}
|
|
20870
|
+
};
|
|
19582
20871
|
|
|
19583
|
-
|
|
20872
|
+
useEffect$1(function () {
|
|
20873
|
+
if (isOpen && selectedRef !== undefined && selectedRef.current !== null) {
|
|
20874
|
+
// WAI-ARIA requires the selected option to receive focus
|
|
20875
|
+
selectedRef.current.focus();
|
|
20876
|
+
} else if (isOpen && optionRefs.current[0].current) {
|
|
20877
|
+
// If no selected option, first option receives focus
|
|
19584
20878
|
optionRefs.current[0].current.focus();
|
|
19585
20879
|
}
|
|
19586
20880
|
|
|
@@ -19588,16 +20882,20 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19588
20882
|
setInputValue("");
|
|
19589
20883
|
}, [isOpen]);
|
|
19590
20884
|
useEffect$1(function () {
|
|
19591
|
-
|
|
19592
|
-
|
|
19593
|
-
|
|
19594
|
-
|
|
20885
|
+
if (autoEraseTypeAhead) {
|
|
20886
|
+
clearTimeout(timer);
|
|
20887
|
+
setTimer(setTimeout(function () {
|
|
20888
|
+
return setInputValue("");
|
|
20889
|
+
}, 3000));
|
|
20890
|
+
}
|
|
20891
|
+
|
|
19595
20892
|
setFilteredOptions(options.filter(function (option) {
|
|
19596
20893
|
return option.value.toLowerCase().startsWith(inputValue.toLowerCase()) || option.text.toLowerCase().startsWith(inputValue.toLowerCase());
|
|
19597
20894
|
}));
|
|
19598
20895
|
}, [inputValue]);
|
|
19599
20896
|
useEffect$1(function () {
|
|
19600
|
-
if (!isOpen && filteredOptions[0] && !disabledValues.includes(filteredOptions[0].value) && filteredOptions[0].text != placeholder) {
|
|
20897
|
+
if ((!isOpen || inputChangedByAutofill) && filteredOptions[0] && !disabledValues.includes(filteredOptions[0].value) && filteredOptions[0].text != placeholder) {
|
|
20898
|
+
setInputChangedByAutofill(false);
|
|
19601
20899
|
onSelect(filteredOptions[0].value);
|
|
19602
20900
|
}
|
|
19603
20901
|
|
|
@@ -19608,69 +20906,106 @@ var Dropdown = function Dropdown(_ref9) {
|
|
|
19608
20906
|
}
|
|
19609
20907
|
}, [filteredOptions]);
|
|
19610
20908
|
return /*#__PURE__*/React.createElement(Box, {
|
|
19611
|
-
onKeyDown: onKeyDown,
|
|
19612
|
-
onClick: onClick,
|
|
19613
20909
|
padding: "0",
|
|
19614
|
-
|
|
19615
|
-
|
|
19616
|
-
"
|
|
19617
|
-
|
|
19618
|
-
|
|
20910
|
+
background: isOpen ? themeValues.hoverColor : WHITE,
|
|
20911
|
+
extraStyles: "position: relative;",
|
|
20912
|
+
minWidth: "100%",
|
|
20913
|
+
onClick: function onClick() {
|
|
20914
|
+
if (!isOpen) {
|
|
20915
|
+
_onClick();
|
|
20916
|
+
}
|
|
20917
|
+
},
|
|
20918
|
+
onKeyDown: onKeyDown,
|
|
20919
|
+
width: "100%"
|
|
19619
20920
|
}, /*#__PURE__*/React.createElement(Box, {
|
|
19620
|
-
as: "
|
|
20921
|
+
as: "input",
|
|
20922
|
+
"aria-multiline": "false",
|
|
20923
|
+
"aria-autocomplete": "list",
|
|
20924
|
+
"aria-controls": "".concat(ariaLabelledby, "_listbox"),
|
|
20925
|
+
"aria-activedescendant": "focused_option",
|
|
20926
|
+
"aria-owns": "".concat(ariaLabelledby, "_listbox"),
|
|
20927
|
+
"aria-haspopup": "listbox",
|
|
20928
|
+
"aria-labelledby": ariaLabelledby,
|
|
20929
|
+
"aria-expanded": isOpen,
|
|
20930
|
+
autocomplete: autocompleteValue,
|
|
19621
20931
|
background: isOpen ? themeValues.hoverColor : WHITE,
|
|
19622
|
-
|
|
19623
|
-
padding: "12px",
|
|
19624
|
-
hoverStyles: "background-color: ".concat(themeValues.hoverColor, ";"),
|
|
20932
|
+
borderRadius: "2px",
|
|
19625
20933
|
borderSize: "1px",
|
|
19626
20934
|
borderColor: isError ? ERROR_COLOR : isOpen ? themeValues.selectedColor : GREY_CHATEAU,
|
|
19627
|
-
|
|
20935
|
+
extraStyles: disabled && "color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;",
|
|
20936
|
+
hoverStyles: "background-color: ".concat(themeValues.hoverColor, ";"),
|
|
20937
|
+
isOpen: isOpen,
|
|
20938
|
+
minHeight: "48px",
|
|
20939
|
+
minWidth: "100%",
|
|
20940
|
+
name: autocompleteValue,
|
|
20941
|
+
onChange: function onChange(e) {
|
|
20942
|
+
console.log("current input value onChange", inputValue);
|
|
20943
|
+
console.log("input change event", e.target);
|
|
20944
|
+
console.log("input change event value", e.target.value); // support autofill and copy/paste
|
|
20945
|
+
|
|
20946
|
+
if (e.target.value !== inputValue) {
|
|
20947
|
+
setInputValue(e.target.value);
|
|
20948
|
+
setInputChangedByAutofill(true);
|
|
20949
|
+
}
|
|
20950
|
+
},
|
|
20951
|
+
padding: "12px",
|
|
20952
|
+
placeholder: getSelection(),
|
|
20953
|
+
role: "combobox",
|
|
20954
|
+
themeValues: themeValues,
|
|
20955
|
+
title: hasTitles ? getSelection() : null,
|
|
20956
|
+
type: "text",
|
|
19628
20957
|
tabIndex: 0,
|
|
19629
|
-
dataQa: placeholder,
|
|
19630
|
-
extraStyles: "height: 48px;\n ".concat(disabled && "color: #6e727e;\n background-color: #f7f7f7;\n pointer-events: none;", "\n ")
|
|
19631
|
-
}, /*#__PURE__*/React.createElement(Stack, {
|
|
19632
|
-
direction: "row",
|
|
19633
|
-
bottomItem: 2
|
|
19634
|
-
}, isOpen ? /*#__PURE__*/React.createElement(SearchInput, {
|
|
19635
|
-
"aria-label": inputValue || "Dropdown awaiting search value",
|
|
19636
20958
|
value: inputValue,
|
|
19637
|
-
|
|
19638
|
-
|
|
19639
|
-
})
|
|
19640
|
-
|
|
19641
|
-
|
|
19642
|
-
},
|
|
19643
|
-
open: isOpen
|
|
19644
|
-
}, /*#__PURE__*/React.createElement(DropdownIcon, null)))), isOpen ? /*#__PURE__*/React.createElement(DropdownContentWrapper, {
|
|
20959
|
+
width: "100%",
|
|
20960
|
+
dataQa: placeholder
|
|
20961
|
+
}), /*#__PURE__*/React.createElement(IconWrapper, {
|
|
20962
|
+
open: isOpen,
|
|
20963
|
+
onClick: _onClick
|
|
20964
|
+
}, /*#__PURE__*/React.createElement(DropdownIcon, null)), /*#__PURE__*/React.createElement(Fragment, null, isOpen ? /*#__PURE__*/React.createElement(DropdownContentWrapper, {
|
|
19645
20965
|
maxHeight: maxHeight,
|
|
19646
20966
|
open: isOpen,
|
|
19647
20967
|
ref: dropdownRef,
|
|
19648
20968
|
widthFitOptions: widthFitOptions,
|
|
19649
|
-
tabIndex: 0
|
|
20969
|
+
tabIndex: 0,
|
|
20970
|
+
role: "listbox",
|
|
20971
|
+
id: "".concat(ariaLabelledby, "_listbox")
|
|
19650
20972
|
}, /*#__PURE__*/React.createElement(Stack, {
|
|
19651
|
-
childGap: "0"
|
|
20973
|
+
childGap: "0",
|
|
20974
|
+
as: "ul"
|
|
19652
20975
|
}, filteredOptions.map(function (choice, i) {
|
|
20976
|
+
if (choice.value === value && selectedRef !== optionRefs.current[i]) {
|
|
20977
|
+
setSelectedRef(optionRefs.current[i]);
|
|
20978
|
+
}
|
|
20979
|
+
|
|
19653
20980
|
return /*#__PURE__*/React.createElement(DropdownItemWrapper, {
|
|
20981
|
+
id: focusedRef === optionRefs.current[i] ? "focused_option" : choice.value,
|
|
19654
20982
|
key: choice.value,
|
|
19655
20983
|
ref: optionRefs.current[i],
|
|
19656
|
-
as: "button",
|
|
19657
20984
|
tabIndex: -1,
|
|
19658
|
-
onClick:
|
|
19659
|
-
return
|
|
19660
|
-
}
|
|
19661
|
-
|
|
20985
|
+
onClick: function onClick(e) {
|
|
20986
|
+
return handleItemSelection(e, choice, i);
|
|
20987
|
+
},
|
|
20988
|
+
onKeyDown: function onKeyDown(e) {
|
|
20989
|
+
if (e.keyCode === 13) {
|
|
20990
|
+
handleItemSelection(e, choice, i);
|
|
20991
|
+
}
|
|
19662
20992
|
},
|
|
19663
20993
|
selected: choice.value === value,
|
|
20994
|
+
"aria-selected": choice.value === value,
|
|
19664
20995
|
disabled: disabledValues.includes(choice.value),
|
|
19665
20996
|
"data-qa": choice.text,
|
|
19666
20997
|
themeValues: themeValues,
|
|
19667
|
-
title: hasTitles ? choice.text : null
|
|
20998
|
+
title: hasTitles ? choice.text : null,
|
|
20999
|
+
role: "option",
|
|
21000
|
+
onFocus: function onFocus() {
|
|
21001
|
+
return setFocusedRef(optionRefs.current[i]);
|
|
21002
|
+
}
|
|
19668
21003
|
}, /*#__PURE__*/React.createElement(Text$1, {
|
|
19669
21004
|
variant: "p",
|
|
19670
21005
|
color: choice.value === value ? WHITE : disabledValues.includes(choice.value) ? STORM_GREY : MINESHAFT_GREY,
|
|
19671
21006
|
extraStyles: "padding-left: 16px; \n cursor: ".concat(disabledValues.includes(choice.value) ? "default" : "pointer", "; \n white-space: nowrap; \n overflow: hidden; \n text-overflow: ellipsis;")
|
|
19672
21007
|
}, choice.text));
|
|
19673
|
-
}))) : /*#__PURE__*/React.createElement(Fragment, null));
|
|
21008
|
+
}))) : /*#__PURE__*/React.createElement(Fragment, null)));
|
|
19674
21009
|
};
|
|
19675
21010
|
|
|
19676
21011
|
var Dropdown$1 = themeComponent(Dropdown, "Dropdown", fallbackValues$e);
|
|
@@ -19771,7 +21106,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
19771
21106
|
disabled = _ref.disabled,
|
|
19772
21107
|
themeValues = _ref.themeValues,
|
|
19773
21108
|
_ref$hasTitles = _ref.hasTitles,
|
|
19774
|
-
hasTitles = _ref$hasTitles === void 0 ? false : _ref$hasTitles
|
|
21109
|
+
hasTitles = _ref$hasTitles === void 0 ? false : _ref$hasTitles,
|
|
21110
|
+
autocompleteValue = _ref.autocompleteValue;
|
|
19775
21111
|
|
|
19776
21112
|
var _useState = useState(false),
|
|
19777
21113
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -19809,7 +21145,7 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
19809
21145
|
extraStyles: "word-break: break-word;\n font-family: Public Sans;\n &::first-letter {\n text-transform: uppercase;\n }",
|
|
19810
21146
|
id: labelTextWhenNoError.replace(/\s+/g, "-")
|
|
19811
21147
|
}, labelTextWhenNoError))), /*#__PURE__*/React.createElement(Dropdown$1, {
|
|
19812
|
-
|
|
21148
|
+
ariaLabelledby: labelTextWhenNoError.replace(/\s+/g, "-"),
|
|
19813
21149
|
maxHeight: dropdownMaxHeight,
|
|
19814
21150
|
hasTitles: hasTitles,
|
|
19815
21151
|
placeholder: options[0] ? options[0].text : "",
|
|
@@ -19826,7 +21162,8 @@ var FormSelect = function FormSelect(_ref) {
|
|
|
19826
21162
|
onClick: function onClick() {
|
|
19827
21163
|
return setOpen(!open);
|
|
19828
21164
|
},
|
|
19829
|
-
disabled: disabled
|
|
21165
|
+
disabled: disabled,
|
|
21166
|
+
autocompleteValue: autocompleteValue
|
|
19830
21167
|
}), /*#__PURE__*/React.createElement(Stack, {
|
|
19831
21168
|
direction: "row",
|
|
19832
21169
|
justify: "space-between"
|
|
@@ -20599,7 +21936,8 @@ var CountryDropdown = function CountryDropdown(_ref) {
|
|
|
20599
21936
|
labelTextWhenNoError: labelTextWhenNoError,
|
|
20600
21937
|
errorMessages: errorMessages,
|
|
20601
21938
|
showErrors: showErrors,
|
|
20602
|
-
onChange: onChange
|
|
21939
|
+
onChange: onChange,
|
|
21940
|
+
autocompleteValue: "country-name"
|
|
20603
21941
|
});
|
|
20604
21942
|
};
|
|
20605
21943
|
|
|
@@ -33015,7 +34353,8 @@ var FormStateDropdown = function FormStateDropdown(_ref) {
|
|
|
33015
34353
|
fieldActions: fieldActions,
|
|
33016
34354
|
labelTextWhenNoError: labelTextWhenNoError,
|
|
33017
34355
|
errorMessages: errorMessages,
|
|
33018
|
-
showErrors: showErrors
|
|
34356
|
+
showErrors: showErrors,
|
|
34357
|
+
autocompleteValue: "address-level1"
|
|
33019
34358
|
});
|
|
33020
34359
|
};
|
|
33021
34360
|
|
|
@@ -33746,20 +35085,20 @@ function isPlainObject(value) {
|
|
|
33746
35085
|
}
|
|
33747
35086
|
var assign = Object.assign || function assign(target, value) {
|
|
33748
35087
|
for (var key in value) {
|
|
33749
|
-
if (has(value, key)) {
|
|
35088
|
+
if (has$1(value, key)) {
|
|
33750
35089
|
target[key] = value[key];
|
|
33751
35090
|
}
|
|
33752
35091
|
}
|
|
33753
35092
|
|
|
33754
35093
|
return target;
|
|
33755
35094
|
};
|
|
33756
|
-
var ownKeys$
|
|
35095
|
+
var ownKeys$2 = typeof Reflect !== "undefined" && Reflect.ownKeys ? Reflect.ownKeys : typeof Object.getOwnPropertySymbols !== "undefined" ? function (obj) { return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj)); } : Object.getOwnPropertyNames;
|
|
33757
35096
|
function shallowCopy(base, invokeGetters) {
|
|
33758
35097
|
if ( invokeGetters === void 0 ) invokeGetters = false;
|
|
33759
35098
|
|
|
33760
35099
|
if (Array.isArray(base)) { return base.slice(); }
|
|
33761
35100
|
var clone = Object.create(Object.getPrototypeOf(base));
|
|
33762
|
-
ownKeys$
|
|
35101
|
+
ownKeys$2(base).forEach(function (key) {
|
|
33763
35102
|
if (key === DRAFT_STATE) {
|
|
33764
35103
|
return; // Never copy over draft state.
|
|
33765
35104
|
}
|
|
@@ -33791,14 +35130,14 @@ function each(value, cb) {
|
|
|
33791
35130
|
if (Array.isArray(value)) {
|
|
33792
35131
|
for (var i = 0; i < value.length; i++) { cb(i, value[i], value); }
|
|
33793
35132
|
} else {
|
|
33794
|
-
ownKeys$
|
|
35133
|
+
ownKeys$2(value).forEach(function (key) { return cb(key, value[key], value); });
|
|
33795
35134
|
}
|
|
33796
35135
|
}
|
|
33797
35136
|
function isEnumerable(base, prop) {
|
|
33798
35137
|
var desc = Object.getOwnPropertyDescriptor(base, prop);
|
|
33799
35138
|
return !!desc && desc.enumerable;
|
|
33800
35139
|
}
|
|
33801
|
-
function has(thing, prop) {
|
|
35140
|
+
function has$1(thing, prop) {
|
|
33802
35141
|
return Object.prototype.hasOwnProperty.call(thing, prop);
|
|
33803
35142
|
}
|
|
33804
35143
|
function is(x, y) {
|
|
@@ -33862,7 +35201,7 @@ function revoke(draft) {
|
|
|
33862
35201
|
|
|
33863
35202
|
// but share them all instead
|
|
33864
35203
|
|
|
33865
|
-
var descriptors = {};
|
|
35204
|
+
var descriptors$1 = {};
|
|
33866
35205
|
function willFinalize(scope, result, isReplaced) {
|
|
33867
35206
|
scope.drafts.forEach(function (draft) {
|
|
33868
35207
|
draft[DRAFT_STATE].finalizing = true;
|
|
@@ -33930,7 +35269,7 @@ function peek(draft, prop) {
|
|
|
33930
35269
|
return draft[prop];
|
|
33931
35270
|
}
|
|
33932
35271
|
|
|
33933
|
-
function get(state, prop) {
|
|
35272
|
+
function get$1(state, prop) {
|
|
33934
35273
|
assertUnrevoked(state);
|
|
33935
35274
|
var value = peek(source(state), prop);
|
|
33936
35275
|
if (state.finalizing) { return value; } // Create a draft if the value is unmodified.
|
|
@@ -33981,17 +35320,17 @@ function clonePotentialDraft(base) {
|
|
|
33981
35320
|
}
|
|
33982
35321
|
|
|
33983
35322
|
function proxyProperty(draft, prop, enumerable) {
|
|
33984
|
-
var desc = descriptors[prop];
|
|
35323
|
+
var desc = descriptors$1[prop];
|
|
33985
35324
|
|
|
33986
35325
|
if (desc) {
|
|
33987
35326
|
desc.enumerable = enumerable;
|
|
33988
35327
|
} else {
|
|
33989
|
-
descriptors[prop] = desc = {
|
|
35328
|
+
descriptors$1[prop] = desc = {
|
|
33990
35329
|
configurable: true,
|
|
33991
35330
|
enumerable: enumerable,
|
|
33992
35331
|
|
|
33993
|
-
get: function get$1() {
|
|
33994
|
-
return get(this[DRAFT_STATE], prop);
|
|
35332
|
+
get: function get$1$1() {
|
|
35333
|
+
return get$1(this[DRAFT_STATE], prop);
|
|
33995
35334
|
},
|
|
33996
35335
|
|
|
33997
35336
|
set: function set$1$1(value) {
|
|
@@ -34037,7 +35376,7 @@ function markChangesRecursively(object) {
|
|
|
34037
35376
|
// Look for added keys.
|
|
34038
35377
|
Object.keys(draft).forEach(function (key) {
|
|
34039
35378
|
// The `undefined` check is a fast path for pre-existing keys.
|
|
34040
|
-
if (base[key] === undefined && !has(base, key)) {
|
|
35379
|
+
if (base[key] === undefined && !has$1(base, key)) {
|
|
34041
35380
|
assigned[key] = true;
|
|
34042
35381
|
markChanged(state);
|
|
34043
35382
|
} else if (!assigned[key]) {
|
|
@@ -34048,7 +35387,7 @@ function markChangesRecursively(object) {
|
|
|
34048
35387
|
|
|
34049
35388
|
Object.keys(base).forEach(function (key) {
|
|
34050
35389
|
// The `undefined` check is a fast path for pre-existing keys.
|
|
34051
|
-
if (draft[key] === undefined && !has(draft, key)) {
|
|
35390
|
+
if (draft[key] === undefined && !has$1(draft, key)) {
|
|
34052
35391
|
assigned[key] = false;
|
|
34053
35392
|
markChanged(state);
|
|
34054
35393
|
}
|
|
@@ -34081,7 +35420,7 @@ function hasObjectChanges(state) {
|
|
|
34081
35420
|
var key = keys[i];
|
|
34082
35421
|
var baseValue = base[key]; // The `undefined` check is a fast path for pre-existing keys.
|
|
34083
35422
|
|
|
34084
|
-
if (baseValue === undefined && !has(base, key)) {
|
|
35423
|
+
if (baseValue === undefined && !has$1(base, key)) {
|
|
34085
35424
|
return true;
|
|
34086
35425
|
} // Once a base key is deleted, future changes go undetected, because its
|
|
34087
35426
|
// descriptor is erased. This branch detects any missed changes.
|
|
@@ -34166,7 +35505,7 @@ function createProxy$1(base, parent) {
|
|
|
34166
35505
|
return proxy;
|
|
34167
35506
|
}
|
|
34168
35507
|
var objectTraps = {
|
|
34169
|
-
get: get$1,
|
|
35508
|
+
get: get$1$1,
|
|
34170
35509
|
|
|
34171
35510
|
has: function has(target, prop) {
|
|
34172
35511
|
return prop in source$1(target);
|
|
@@ -34178,7 +35517,7 @@ var objectTraps = {
|
|
|
34178
35517
|
|
|
34179
35518
|
set: set$1$1,
|
|
34180
35519
|
deleteProperty: deleteProperty,
|
|
34181
|
-
getOwnPropertyDescriptor: getOwnPropertyDescriptor,
|
|
35520
|
+
getOwnPropertyDescriptor: getOwnPropertyDescriptor$2,
|
|
34182
35521
|
|
|
34183
35522
|
defineProperty: function defineProperty() {
|
|
34184
35523
|
throw new Error("Object.defineProperty() cannot be used on an Immer draft"); // prettier-ignore
|
|
@@ -34229,11 +35568,11 @@ function peek$1(draft, prop) {
|
|
|
34229
35568
|
return desc && desc.value;
|
|
34230
35569
|
}
|
|
34231
35570
|
|
|
34232
|
-
function get$1(state, prop) {
|
|
35571
|
+
function get$1$1(state, prop) {
|
|
34233
35572
|
if (prop === DRAFT_STATE) { return state; }
|
|
34234
35573
|
var drafts = state.drafts; // Check for existing draft in unmodified state.
|
|
34235
35574
|
|
|
34236
|
-
if (!state.modified && has(drafts, prop)) {
|
|
35575
|
+
if (!state.modified && has$1(drafts, prop)) {
|
|
34237
35576
|
return drafts[prop];
|
|
34238
35577
|
}
|
|
34239
35578
|
|
|
@@ -34286,7 +35625,7 @@ function deleteProperty(state, prop) {
|
|
|
34286
35625
|
// the same guarantee in ES5 mode.
|
|
34287
35626
|
|
|
34288
35627
|
|
|
34289
|
-
function getOwnPropertyDescriptor(state, prop) {
|
|
35628
|
+
function getOwnPropertyDescriptor$2(state, prop) {
|
|
34290
35629
|
var owner = source$1(state);
|
|
34291
35630
|
var desc = Reflect.getOwnPropertyDescriptor(owner, prop);
|
|
34292
35631
|
|
|
@@ -34705,7 +36044,7 @@ Immer.prototype.finalize = function finalize (draft, path, scope) {
|
|
|
34705
36044
|
var base = state.base;
|
|
34706
36045
|
var copy = state.copy;
|
|
34707
36046
|
each(base, function (prop) {
|
|
34708
|
-
if (!has(copy, prop)) { this$1$1.onDelete(state, prop); }
|
|
36047
|
+
if (!has$1(copy, prop)) { this$1$1.onDelete(state, prop); }
|
|
34709
36048
|
});
|
|
34710
36049
|
}
|
|
34711
36050
|
}
|
|
@@ -34884,7 +36223,7 @@ const createInitialState = formConfig => {
|
|
|
34884
36223
|
};
|
|
34885
36224
|
|
|
34886
36225
|
const SET = "field/SET";
|
|
34887
|
-
const set = fieldName => value => ({
|
|
36226
|
+
const set$2 = fieldName => value => ({
|
|
34888
36227
|
type: SET,
|
|
34889
36228
|
payload: { fieldName, value }
|
|
34890
36229
|
});
|
|
@@ -34964,7 +36303,7 @@ const createMapDispatchToProps = formConfig => {
|
|
|
34964
36303
|
const keys = Object.keys(formConfig);
|
|
34965
36304
|
for (let fieldName of keys) {
|
|
34966
36305
|
dispatchObj.fields[fieldName] = {
|
|
34967
|
-
set: value => dispatch(set(fieldName)(value)),
|
|
36306
|
+
set: value => dispatch(set$2(fieldName)(value)),
|
|
34968
36307
|
addValidator: validator => dispatch(addValidator(fieldName)(validator))
|
|
34969
36308
|
};
|
|
34970
36309
|
}
|
|
@@ -37900,7 +39239,7 @@ var tabbable_1 = tabbable;
|
|
|
37900
39239
|
|
|
37901
39240
|
var immutable = extend;
|
|
37902
39241
|
|
|
37903
|
-
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
39242
|
+
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
37904
39243
|
|
|
37905
39244
|
function extend() {
|
|
37906
39245
|
var target = {};
|
|
@@ -37909,7 +39248,7 @@ function extend() {
|
|
|
37909
39248
|
var source = arguments[i];
|
|
37910
39249
|
|
|
37911
39250
|
for (var key in source) {
|
|
37912
|
-
if (hasOwnProperty.call(source, key)) {
|
|
39251
|
+
if (hasOwnProperty$1.call(source, key)) {
|
|
37913
39252
|
target[key] = source[key];
|
|
37914
39253
|
}
|
|
37915
39254
|
}
|