react-asc 25.18.0 → 25.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.d.ts +15 -16
- package/index.es.js +411 -2151
- package/index.js +396 -2136
- package/lib/components/AutoComplete/AutoComplete.d.ts +0 -1
- package/lib/components/Button/ButtonContext.d.ts +0 -1
- package/lib/components/Card/CardBody.d.ts +1 -1
- package/lib/components/Card/CardFooter.d.ts +1 -1
- package/lib/components/Card/CardImage.d.ts +1 -1
- package/lib/components/Card/CardSubtitle.d.ts +1 -1
- package/lib/components/Card/CardText.d.ts +1 -1
- package/lib/components/DatePicker/DatePicker.d.ts +0 -1
- package/lib/components/DateSelect/DateSelect.d.ts +0 -1
- package/lib/components/DateSelect/DaySelect.d.ts +0 -1
- package/lib/components/DateSelect/MonthSelect.d.ts +0 -1
- package/lib/components/DateSelect/YearSelect.d.ts +0 -1
- package/lib/components/Form/FormError.d.ts +0 -1
- package/lib/components/Form/FormHint/FormHint.d.ts +1 -1
- package/lib/components/Form/FormLabel/FormLabel.d.ts +1 -1
- package/lib/components/Form/form.interfaces.d.ts +0 -1
- package/lib/components/Form/form.models.d.ts +1 -1
- package/lib/components/Link/Link.d.ts +1 -1
- package/lib/components/List/ListItemAction.d.ts +1 -1
- package/lib/components/LoadingIndicator/LoadingIndicator.d.ts +1 -1
- package/lib/components/Menu/MenuDivider.d.ts +0 -1
- package/lib/components/Menu/MenuItem.d.ts +0 -1
- package/lib/components/NumberSelect/NumberSelect.d.ts +0 -1
- package/lib/components/Portal/Portal.d.ts +0 -1
- package/lib/components/SpeedDial/SpeedDialActions.d.ts +1 -1
- package/lib/components/Stepper/StepConnector/StepConnector.d.ts +0 -1
- package/lib/components/Stepper/StepperActions/StepperActions.d.ts +0 -1
- package/lib/components/Table/TableBody.d.ts +1 -1
- package/lib/components/Table/TableHead.d.ts +1 -1
- package/lib/components/Table/TableRow.d.ts +1 -1
- package/lib/components/TimeSelect/HourSelect.d.ts +0 -1
- package/lib/components/TimeSelect/MilliSecondSelect.d.ts +0 -1
- package/lib/components/TimeSelect/MinuteSelect.d.ts +0 -1
- package/lib/components/TimeSelect/SecondSelect.d.ts +0 -1
- package/lib/components/TimeSelect/TimeSelect.d.ts +0 -1
- package/lib/components/TreeView/TreeView.d.ts +1 -1
- package/lib/components/component.interfaces.d.ts +0 -1
- package/lib/hooks/useHover.d.ts +0 -1
- package/lib/icons/CaretDownSolidIcon.d.ts +0 -1
- package/lib/icons/CheckSolidIcon.d.ts +0 -1
- package/lib/icons/CheckSquareRegularIcon.d.ts +0 -1
- package/lib/icons/ChevronDownSolidIcon.d.ts +0 -1
- package/lib/icons/ChevronLeftSolidIcon.d.ts +0 -1
- package/lib/icons/ChevronRightSolidIcon.d.ts +0 -1
- package/lib/icons/ChevronUpSolidIcon.d.ts +0 -1
- package/lib/icons/CircleSolidIcon.d.ts +0 -1
- package/lib/icons/HomeSolidIcon.d.ts +0 -1
- package/lib/icons/PlusSolidIcon.d.ts +0 -1
- package/lib/icons/SpinnerSolidIcon.d.ts +0 -1
- package/lib/icons/SquareRegularIcon.d.ts +0 -1
- package/lib/icons/TimesCircleSolidIcon.d.ts +0 -1
- package/lib/icons/TimesSolidIcon.d.ts +0 -1
- package/package.json +7 -7
- package/readme.md +2 -2
package/index.js
CHANGED
|
@@ -289,7 +289,7 @@ const TimesCircleSolidIcon = () => (jsxRuntime.jsx("svg", { "aria-hidden": "true
|
|
|
289
289
|
|
|
290
290
|
const TimesSolidIcon = () => (jsxRuntime.jsx("svg", { "aria-hidden": "true", focusable: "false", role: "img", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 352 512", children: jsxRuntime.jsx("path", { fill: "currentColor", d: "M242.72 256l100.07-100.07c12.28-12.28 12.28-32.19 0-44.48l-22.24-22.24c-12.28-12.28-32.19-12.28-44.48 0L176 189.28 75.93 89.21c-12.28-12.28-32.19-12.28-44.48 0L9.21 111.45c-12.28 12.28-12.28 32.19 0 44.48L109.28 256 9.21 356.07c-12.28 12.28-12.28 32.19 0 44.48l22.24 22.24c12.28 12.28 32.2 12.28 44.48 0L176 322.72l100.07 100.07c12.28 12.28 32.2 12.28 44.48 0l22.24-22.24c12.28-12.28 12.28-32.19 0-44.48L242.72 256z" }) }));
|
|
291
291
|
|
|
292
|
-
const Portal
|
|
292
|
+
const Portal = ({ children, target = document.body, className }) => {
|
|
293
293
|
const containerEl = React.useMemo(() => document.createElement('div'), []);
|
|
294
294
|
React.useEffect(() => {
|
|
295
295
|
className && className.split(' ').forEach(cssClass => containerEl.classList.add(cssClass));
|
|
@@ -320,7 +320,7 @@ const Backdrop = (props) => {
|
|
|
320
320
|
const getStyles = () => {
|
|
321
321
|
return Object.assign({ height: '100%', width: '100%', position: 'absolute' }, style);
|
|
322
322
|
};
|
|
323
|
-
return (jsxRuntime.jsx(Portal
|
|
323
|
+
return (jsxRuntime.jsx(Portal, { className: "backdrop-root", target: target, children: jsxRuntime.jsx("div", { className: getCssClasses(), onClick: handleClick, style: getStyles(), ...rest }) }));
|
|
324
324
|
};
|
|
325
325
|
|
|
326
326
|
var css_248z$12 = ".Icon-module_icon__lFKCA {\n align-items: center;\n justify-content: center;\n display: flex;\n width: 20px;\n height: 20px;\n}\n.Icon-module_icon__lFKCA svg {\n width: inherit;\n height: inherit;\n}\n.Icon-module_icon__lFKCA.Icon-module_primary__3fID- {\n color: var(--primary);\n}\n.Icon-module_icon__lFKCA.Icon-module_accent__aZXGb {\n color: var(--accent);\n}\n.Icon-module_icon__lFKCA.Icon-module_secondary__HKKop {\n color: var(--secondary);\n}\n.Icon-module_icon__lFKCA.Icon-module_light__-ApMm {\n color: var(--light);\n}\n.Icon-module_icon__lFKCA.Icon-module_dark__DpCIK {\n color: var(--dark);\n}";
|
|
@@ -340,7 +340,7 @@ const Icon = (props) => {
|
|
|
340
340
|
};
|
|
341
341
|
|
|
342
342
|
var css_248z$11 = ".LoadingIndicator-module_loadingIndicatorContainer__GS9OG {\n display: flex;\n align-items: center;\n justify-content: center;\n height: 100%;\n width: 100%;\n}\n.LoadingIndicator-module_loadingIndicatorContainer__GS9OG.LoadingIndicator-module_isFixed__WCFNG {\n position: fixed;\n top: 0;\n left: 0;\n}\n\n.LoadingIndicator-module_loadingIndicator__EC9sx {\n animation-name: LoadingIndicator-module_spinAnimation__LeY4Z;\n animation-duration: 5000ms;\n animation-iteration-count: infinite;\n animation-timing-function: linear;\n width: 24px;\n height: 24px;\n}\n\n@keyframes LoadingIndicator-module_spinAnimation__LeY4Z {\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n}";
|
|
343
|
-
var styles$11 = {"loadingIndicatorContainer":"LoadingIndicator-module_loadingIndicatorContainer__GS9OG","isFixed":"LoadingIndicator-module_isFixed__WCFNG","loadingIndicator":"LoadingIndicator-module_loadingIndicator__EC9sx"
|
|
343
|
+
var styles$11 = {"loadingIndicatorContainer":"LoadingIndicator-module_loadingIndicatorContainer__GS9OG","isFixed":"LoadingIndicator-module_isFixed__WCFNG","loadingIndicator":"LoadingIndicator-module_loadingIndicator__EC9sx"};
|
|
344
344
|
styleInject(css_248z$11);
|
|
345
345
|
|
|
346
346
|
const LoadingIndicator = ({ ...rest }) => {
|
|
@@ -364,6 +364,10 @@ const LoadingIndicatorContainer = ({ children, isFixed }) => {
|
|
|
364
364
|
|
|
365
365
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
366
366
|
|
|
367
|
+
function unwrapExports (x) {
|
|
368
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
369
|
+
}
|
|
370
|
+
|
|
367
371
|
function createCommonjsModule(fn, module) {
|
|
368
372
|
return module = { exports: {} }, fn(module, module.exports), module.exports;
|
|
369
373
|
}
|
|
@@ -413,7 +417,9 @@ class LoadingIndicatorService {
|
|
|
413
417
|
this.root?.unmount();
|
|
414
418
|
document.body.removeChild(this.container);
|
|
415
419
|
this.container = undefined;
|
|
416
|
-
|
|
420
|
+
if (this.handler) {
|
|
421
|
+
clearTimeout(this.handler);
|
|
422
|
+
}
|
|
417
423
|
}
|
|
418
424
|
}
|
|
419
425
|
}
|
|
@@ -557,7 +563,7 @@ const ListItemTextPrimary = ({ children }) => (jsxRuntime.jsx("div", { className
|
|
|
557
563
|
const ListItemTextSecondary = ({ children }) => (jsxRuntime.jsx("div", { className: "list-item-text-secondary text-muted", style: { fontSize: '0.875rem' }, children: children }));
|
|
558
564
|
|
|
559
565
|
var css_248z$V = ".AutoComplete-module_selectContainer__1kA85 {\n position: relative;\n}\n\n.AutoComplete-module_select__NNYOi {\n width: 100%;\n padding: 0.375rem 0.75rem;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5;\n color: #212529;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid #ced4da;\n appearance: none;\n border-radius: 0.25rem;\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.0745098039);\n transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;\n min-height: calc(1.5em + 0.75rem + 2px);\n height: auto;\n display: flex;\n}\n.AutoComplete-module_select__NNYOi:hover {\n cursor: pointer;\n}\n.AutoComplete-module_select__NNYOi:focus:not(.AutoComplete-module_select__NNYOi.AutoComplete-module_disabled__CbGP4) {\n color: #212529;\n background-color: #fff;\n border-color: #86b7fe;\n outline: 0;\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.0745098039), 0 0 0 0.25rem rgba(13, 110, 253, 0.2509803922);\n}\n.AutoComplete-module_select__NNYOi:disabled, .AutoComplete-module_select__NNYOi:read-only {\n background-color: #e9ecef;\n}\n.AutoComplete-module_select__NNYOi:disabled:hover {\n cursor: not-allowed;\n}\n.AutoComplete-module_select__NNYOi:read-only:hover {\n cursor: inherit;\n}\n\n.AutoComplete-module_selectMenu__Gu81L {\n background-color: var(--light);\n position: absolute;\n box-shadow: var(--shadow);\n border-radius: var(--borderRadius);\n width: 100%;\n top: 38px;\n z-index: 1050;\n max-height: 280px;\n overflow: auto;\n}";
|
|
560
|
-
var styles$V = {"selectContainer":"AutoComplete-module_selectContainer__1kA85","select":"AutoComplete-module_select__NNYOi","
|
|
566
|
+
var styles$V = {"selectContainer":"AutoComplete-module_selectContainer__1kA85","select":"AutoComplete-module_select__NNYOi","selectMenu":"AutoComplete-module_selectMenu__Gu81L"};
|
|
561
567
|
styleInject(css_248z$V);
|
|
562
568
|
|
|
563
569
|
// preset value
|
|
@@ -667,7 +673,7 @@ const Breadcrumb = (props) => {
|
|
|
667
673
|
const ConditionalWrapper = ({ condition, wrapper, children }) => condition ? wrapper(children) : children;
|
|
668
674
|
|
|
669
675
|
var css_248z$S = ".BreadcrumbItem-module_breadcrumbItem__zsUq- {\n display: flex;\n align-items: center;\n}\n.BreadcrumbItem-module_breadcrumbItem__zsUq- + .BreadcrumbItem-module_breadcrumbItem__zsUq- {\n padding-left: 0.5rem;\n}\n.BreadcrumbItem-module_breadcrumbItem__zsUq- + .BreadcrumbItem-module_breadcrumbItem__zsUq-::before {\n float: left;\n padding-right: 0.5rem;\n color: #6c757d;\n content: \"/\";\n}\n.BreadcrumbItem-module_breadcrumbItem__zsUq- a:not([href]):not([class]) {\n color: var(--primary);\n}\n.BreadcrumbItem-module_breadcrumbItem__zsUq-:hover {\n cursor: pointer;\n}\n.BreadcrumbItem-module_breadcrumbItem__zsUq-.BreadcrumbItem-module_active__Kn1dA:hover {\n cursor: unset;\n}";
|
|
670
|
-
var styles$S = {"breadcrumbItem":"BreadcrumbItem-module_breadcrumbItem__zsUq-"
|
|
676
|
+
var styles$S = {"breadcrumbItem":"BreadcrumbItem-module_breadcrumbItem__zsUq-"};
|
|
671
677
|
styleInject(css_248z$S);
|
|
672
678
|
|
|
673
679
|
const BreadcrumbItem = (props) => {
|
|
@@ -1011,1818 +1017,303 @@ const CssTransition = (props) => {
|
|
|
1011
1017
|
jsxRuntime.jsx("div", { ref: transitionConainter, className: getCssClasses(), children: children }) }));
|
|
1012
1018
|
};
|
|
1013
1019
|
|
|
1014
|
-
|
|
1015
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
1016
|
-
*
|
|
1017
|
-
* This source code is licensed under the MIT license found in the
|
|
1018
|
-
* LICENSE file in the root directory of this source tree.
|
|
1019
|
-
*/
|
|
1020
|
-
|
|
1020
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
1021
1021
|
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1022
|
+
const copyProperty = (to, from, property, ignoreNonConfigurable) => {
|
|
1023
|
+
// `Function#length` should reflect the parameters of `to` not `from` since we keep its body.
|
|
1024
|
+
// `Function#prototype` is non-writable and non-configurable so can never be modified.
|
|
1025
|
+
if (property === 'length' || property === 'prototype') {
|
|
1026
|
+
return;
|
|
1027
|
+
}
|
|
1025
1028
|
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
+
// `Function#arguments` and `Function#caller` should not be copied. They were reported to be present in `Reflect.ownKeys` for some devices in React Native (#41), so we explicitly ignore them here.
|
|
1030
|
+
if (property === 'arguments' || property === 'caller') {
|
|
1031
|
+
return;
|
|
1032
|
+
}
|
|
1029
1033
|
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
if (secret === ReactPropTypesSecret_1) {
|
|
1033
|
-
// It is still safe when called from React.
|
|
1034
|
-
return;
|
|
1035
|
-
}
|
|
1036
|
-
var err = new Error(
|
|
1037
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
1038
|
-
'Use PropTypes.checkPropTypes() to call them. ' +
|
|
1039
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
1040
|
-
);
|
|
1041
|
-
err.name = 'Invariant Violation';
|
|
1042
|
-
throw err;
|
|
1043
|
-
} shim.isRequired = shim;
|
|
1044
|
-
function getShim() {
|
|
1045
|
-
return shim;
|
|
1046
|
-
} // Important!
|
|
1047
|
-
// Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.
|
|
1048
|
-
var ReactPropTypes = {
|
|
1049
|
-
array: shim,
|
|
1050
|
-
bigint: shim,
|
|
1051
|
-
bool: shim,
|
|
1052
|
-
func: shim,
|
|
1053
|
-
number: shim,
|
|
1054
|
-
object: shim,
|
|
1055
|
-
string: shim,
|
|
1056
|
-
symbol: shim,
|
|
1057
|
-
|
|
1058
|
-
any: shim,
|
|
1059
|
-
arrayOf: getShim,
|
|
1060
|
-
element: shim,
|
|
1061
|
-
elementType: shim,
|
|
1062
|
-
instanceOf: getShim,
|
|
1063
|
-
node: shim,
|
|
1064
|
-
objectOf: getShim,
|
|
1065
|
-
oneOf: getShim,
|
|
1066
|
-
oneOfType: getShim,
|
|
1067
|
-
shape: getShim,
|
|
1068
|
-
exact: getShim,
|
|
1069
|
-
|
|
1070
|
-
checkPropTypes: emptyFunctionWithReset,
|
|
1071
|
-
resetWarningCache: emptyFunction
|
|
1072
|
-
};
|
|
1034
|
+
const toDescriptor = Object.getOwnPropertyDescriptor(to, property);
|
|
1035
|
+
const fromDescriptor = Object.getOwnPropertyDescriptor(from, property);
|
|
1073
1036
|
|
|
1074
|
-
|
|
1037
|
+
if (!canCopyProperty(toDescriptor, fromDescriptor) && ignoreNonConfigurable) {
|
|
1038
|
+
return;
|
|
1039
|
+
}
|
|
1075
1040
|
|
|
1076
|
-
|
|
1041
|
+
Object.defineProperty(to, property, fromDescriptor);
|
|
1077
1042
|
};
|
|
1078
1043
|
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
var REACT_PORTAL_TYPE = hasSymbol ? Symbol.for('react.portal') : 0xeaca;
|
|
1091
|
-
var REACT_FRAGMENT_TYPE = hasSymbol ? Symbol.for('react.fragment') : 0xeacb;
|
|
1092
|
-
var REACT_STRICT_MODE_TYPE = hasSymbol ? Symbol.for('react.strict_mode') : 0xeacc;
|
|
1093
|
-
var REACT_PROFILER_TYPE = hasSymbol ? Symbol.for('react.profiler') : 0xead2;
|
|
1094
|
-
var REACT_PROVIDER_TYPE = hasSymbol ? Symbol.for('react.provider') : 0xeacd;
|
|
1095
|
-
var REACT_CONTEXT_TYPE = hasSymbol ? Symbol.for('react.context') : 0xeace; // TODO: We don't use AsyncMode or ConcurrentMode anymore. They were temporary
|
|
1096
|
-
// (unstable) APIs that have been removed. Can we remove the symbols?
|
|
1097
|
-
|
|
1098
|
-
var REACT_ASYNC_MODE_TYPE = hasSymbol ? Symbol.for('react.async_mode') : 0xeacf;
|
|
1099
|
-
var REACT_CONCURRENT_MODE_TYPE = hasSymbol ? Symbol.for('react.concurrent_mode') : 0xeacf;
|
|
1100
|
-
var REACT_FORWARD_REF_TYPE = hasSymbol ? Symbol.for('react.forward_ref') : 0xead0;
|
|
1101
|
-
var REACT_SUSPENSE_TYPE = hasSymbol ? Symbol.for('react.suspense') : 0xead1;
|
|
1102
|
-
var REACT_SUSPENSE_LIST_TYPE = hasSymbol ? Symbol.for('react.suspense_list') : 0xead8;
|
|
1103
|
-
var REACT_MEMO_TYPE = hasSymbol ? Symbol.for('react.memo') : 0xead3;
|
|
1104
|
-
var REACT_LAZY_TYPE = hasSymbol ? Symbol.for('react.lazy') : 0xead4;
|
|
1105
|
-
var REACT_BLOCK_TYPE = hasSymbol ? Symbol.for('react.block') : 0xead9;
|
|
1106
|
-
var REACT_FUNDAMENTAL_TYPE = hasSymbol ? Symbol.for('react.fundamental') : 0xead5;
|
|
1107
|
-
var REACT_RESPONDER_TYPE = hasSymbol ? Symbol.for('react.responder') : 0xead6;
|
|
1108
|
-
var REACT_SCOPE_TYPE = hasSymbol ? Symbol.for('react.scope') : 0xead7;
|
|
1109
|
-
|
|
1110
|
-
function isValidElementType(type) {
|
|
1111
|
-
return typeof type === 'string' || typeof type === 'function' || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
|
|
1112
|
-
type === REACT_FRAGMENT_TYPE || type === REACT_CONCURRENT_MODE_TYPE || type === REACT_PROFILER_TYPE || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || typeof type === 'object' && type !== null && (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || type.$$typeof === REACT_FUNDAMENTAL_TYPE || type.$$typeof === REACT_RESPONDER_TYPE || type.$$typeof === REACT_SCOPE_TYPE || type.$$typeof === REACT_BLOCK_TYPE);
|
|
1113
|
-
}
|
|
1114
|
-
|
|
1115
|
-
function typeOf(object) {
|
|
1116
|
-
if (typeof object === 'object' && object !== null) {
|
|
1117
|
-
var $$typeof = object.$$typeof;
|
|
1118
|
-
|
|
1119
|
-
switch ($$typeof) {
|
|
1120
|
-
case REACT_ELEMENT_TYPE:
|
|
1121
|
-
var type = object.type;
|
|
1122
|
-
|
|
1123
|
-
switch (type) {
|
|
1124
|
-
case REACT_ASYNC_MODE_TYPE:
|
|
1125
|
-
case REACT_CONCURRENT_MODE_TYPE:
|
|
1126
|
-
case REACT_FRAGMENT_TYPE:
|
|
1127
|
-
case REACT_PROFILER_TYPE:
|
|
1128
|
-
case REACT_STRICT_MODE_TYPE:
|
|
1129
|
-
case REACT_SUSPENSE_TYPE:
|
|
1130
|
-
return type;
|
|
1131
|
-
|
|
1132
|
-
default:
|
|
1133
|
-
var $$typeofType = type && type.$$typeof;
|
|
1134
|
-
|
|
1135
|
-
switch ($$typeofType) {
|
|
1136
|
-
case REACT_CONTEXT_TYPE:
|
|
1137
|
-
case REACT_FORWARD_REF_TYPE:
|
|
1138
|
-
case REACT_LAZY_TYPE:
|
|
1139
|
-
case REACT_MEMO_TYPE:
|
|
1140
|
-
case REACT_PROVIDER_TYPE:
|
|
1141
|
-
return $$typeofType;
|
|
1142
|
-
|
|
1143
|
-
default:
|
|
1144
|
-
return $$typeof;
|
|
1145
|
-
}
|
|
1146
|
-
|
|
1147
|
-
}
|
|
1148
|
-
|
|
1149
|
-
case REACT_PORTAL_TYPE:
|
|
1150
|
-
return $$typeof;
|
|
1151
|
-
}
|
|
1152
|
-
}
|
|
1153
|
-
|
|
1154
|
-
return undefined;
|
|
1155
|
-
} // AsyncMode is deprecated along with isAsyncMode
|
|
1156
|
-
|
|
1157
|
-
var AsyncMode = REACT_ASYNC_MODE_TYPE;
|
|
1158
|
-
var ConcurrentMode = REACT_CONCURRENT_MODE_TYPE;
|
|
1159
|
-
var ContextConsumer = REACT_CONTEXT_TYPE;
|
|
1160
|
-
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
1161
|
-
var Element = REACT_ELEMENT_TYPE;
|
|
1162
|
-
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
1163
|
-
var Fragment = REACT_FRAGMENT_TYPE;
|
|
1164
|
-
var Lazy = REACT_LAZY_TYPE;
|
|
1165
|
-
var Memo = REACT_MEMO_TYPE;
|
|
1166
|
-
var Portal = REACT_PORTAL_TYPE;
|
|
1167
|
-
var Profiler = REACT_PROFILER_TYPE;
|
|
1168
|
-
var StrictMode = REACT_STRICT_MODE_TYPE;
|
|
1169
|
-
var Suspense = REACT_SUSPENSE_TYPE;
|
|
1170
|
-
var hasWarnedAboutDeprecatedIsAsyncMode = false; // AsyncMode should be deprecated
|
|
1171
|
-
|
|
1172
|
-
function isAsyncMode(object) {
|
|
1173
|
-
{
|
|
1174
|
-
if (!hasWarnedAboutDeprecatedIsAsyncMode) {
|
|
1175
|
-
hasWarnedAboutDeprecatedIsAsyncMode = true; // Using console['warn'] to evade Babel and ESLint
|
|
1176
|
-
|
|
1177
|
-
console['warn']('The ReactIs.isAsyncMode() alias has been deprecated, ' + 'and will be removed in React 17+. Update your code to use ' + 'ReactIs.isConcurrentMode() instead. It has the exact same API.');
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
return isConcurrentMode(object) || typeOf(object) === REACT_ASYNC_MODE_TYPE;
|
|
1182
|
-
}
|
|
1183
|
-
function isConcurrentMode(object) {
|
|
1184
|
-
return typeOf(object) === REACT_CONCURRENT_MODE_TYPE;
|
|
1185
|
-
}
|
|
1186
|
-
function isContextConsumer(object) {
|
|
1187
|
-
return typeOf(object) === REACT_CONTEXT_TYPE;
|
|
1188
|
-
}
|
|
1189
|
-
function isContextProvider(object) {
|
|
1190
|
-
return typeOf(object) === REACT_PROVIDER_TYPE;
|
|
1191
|
-
}
|
|
1192
|
-
function isElement(object) {
|
|
1193
|
-
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1194
|
-
}
|
|
1195
|
-
function isForwardRef(object) {
|
|
1196
|
-
return typeOf(object) === REACT_FORWARD_REF_TYPE;
|
|
1197
|
-
}
|
|
1198
|
-
function isFragment(object) {
|
|
1199
|
-
return typeOf(object) === REACT_FRAGMENT_TYPE;
|
|
1200
|
-
}
|
|
1201
|
-
function isLazy(object) {
|
|
1202
|
-
return typeOf(object) === REACT_LAZY_TYPE;
|
|
1203
|
-
}
|
|
1204
|
-
function isMemo(object) {
|
|
1205
|
-
return typeOf(object) === REACT_MEMO_TYPE;
|
|
1206
|
-
}
|
|
1207
|
-
function isPortal(object) {
|
|
1208
|
-
return typeOf(object) === REACT_PORTAL_TYPE;
|
|
1209
|
-
}
|
|
1210
|
-
function isProfiler(object) {
|
|
1211
|
-
return typeOf(object) === REACT_PROFILER_TYPE;
|
|
1212
|
-
}
|
|
1213
|
-
function isStrictMode(object) {
|
|
1214
|
-
return typeOf(object) === REACT_STRICT_MODE_TYPE;
|
|
1215
|
-
}
|
|
1216
|
-
function isSuspense(object) {
|
|
1217
|
-
return typeOf(object) === REACT_SUSPENSE_TYPE;
|
|
1218
|
-
}
|
|
1219
|
-
|
|
1220
|
-
exports.AsyncMode = AsyncMode;
|
|
1221
|
-
exports.ConcurrentMode = ConcurrentMode;
|
|
1222
|
-
exports.ContextConsumer = ContextConsumer;
|
|
1223
|
-
exports.ContextProvider = ContextProvider;
|
|
1224
|
-
exports.Element = Element;
|
|
1225
|
-
exports.ForwardRef = ForwardRef;
|
|
1226
|
-
exports.Fragment = Fragment;
|
|
1227
|
-
exports.Lazy = Lazy;
|
|
1228
|
-
exports.Memo = Memo;
|
|
1229
|
-
exports.Portal = Portal;
|
|
1230
|
-
exports.Profiler = Profiler;
|
|
1231
|
-
exports.StrictMode = StrictMode;
|
|
1232
|
-
exports.Suspense = Suspense;
|
|
1233
|
-
exports.isAsyncMode = isAsyncMode;
|
|
1234
|
-
exports.isConcurrentMode = isConcurrentMode;
|
|
1235
|
-
exports.isContextConsumer = isContextConsumer;
|
|
1236
|
-
exports.isContextProvider = isContextProvider;
|
|
1237
|
-
exports.isElement = isElement;
|
|
1238
|
-
exports.isForwardRef = isForwardRef;
|
|
1239
|
-
exports.isFragment = isFragment;
|
|
1240
|
-
exports.isLazy = isLazy;
|
|
1241
|
-
exports.isMemo = isMemo;
|
|
1242
|
-
exports.isPortal = isPortal;
|
|
1243
|
-
exports.isProfiler = isProfiler;
|
|
1244
|
-
exports.isStrictMode = isStrictMode;
|
|
1245
|
-
exports.isSuspense = isSuspense;
|
|
1246
|
-
exports.isValidElementType = isValidElementType;
|
|
1247
|
-
exports.typeOf = typeOf;
|
|
1248
|
-
})();
|
|
1249
|
-
}
|
|
1250
|
-
});
|
|
1251
|
-
reactIs_development.AsyncMode;
|
|
1252
|
-
reactIs_development.ConcurrentMode;
|
|
1253
|
-
reactIs_development.ContextConsumer;
|
|
1254
|
-
reactIs_development.ContextProvider;
|
|
1255
|
-
reactIs_development.Element;
|
|
1256
|
-
reactIs_development.ForwardRef;
|
|
1257
|
-
reactIs_development.Fragment;
|
|
1258
|
-
reactIs_development.Lazy;
|
|
1259
|
-
reactIs_development.Memo;
|
|
1260
|
-
reactIs_development.Portal;
|
|
1261
|
-
reactIs_development.Profiler;
|
|
1262
|
-
reactIs_development.StrictMode;
|
|
1263
|
-
reactIs_development.Suspense;
|
|
1264
|
-
reactIs_development.isAsyncMode;
|
|
1265
|
-
reactIs_development.isConcurrentMode;
|
|
1266
|
-
reactIs_development.isContextConsumer;
|
|
1267
|
-
reactIs_development.isContextProvider;
|
|
1268
|
-
reactIs_development.isElement;
|
|
1269
|
-
reactIs_development.isForwardRef;
|
|
1270
|
-
reactIs_development.isFragment;
|
|
1271
|
-
reactIs_development.isLazy;
|
|
1272
|
-
reactIs_development.isMemo;
|
|
1273
|
-
reactIs_development.isPortal;
|
|
1274
|
-
reactIs_development.isProfiler;
|
|
1275
|
-
reactIs_development.isStrictMode;
|
|
1276
|
-
reactIs_development.isSuspense;
|
|
1277
|
-
reactIs_development.isValidElementType;
|
|
1278
|
-
reactIs_development.typeOf;
|
|
1279
|
-
|
|
1280
|
-
/** @license React v16.13.1
|
|
1281
|
-
* react-is.production.min.js
|
|
1282
|
-
*
|
|
1283
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1284
|
-
*
|
|
1285
|
-
* This source code is licensed under the MIT license found in the
|
|
1286
|
-
* LICENSE file in the root directory of this source tree.
|
|
1287
|
-
*/
|
|
1044
|
+
// `Object.defineProperty()` throws if the property exists, is not configurable and either:
|
|
1045
|
+
// - one its descriptors is changed
|
|
1046
|
+
// - it is non-writable and its value is changed
|
|
1047
|
+
const canCopyProperty = function (toDescriptor, fromDescriptor) {
|
|
1048
|
+
return toDescriptor === undefined || toDescriptor.configurable || (
|
|
1049
|
+
toDescriptor.writable === fromDescriptor.writable &&
|
|
1050
|
+
toDescriptor.enumerable === fromDescriptor.enumerable &&
|
|
1051
|
+
toDescriptor.configurable === fromDescriptor.configurable &&
|
|
1052
|
+
(toDescriptor.writable || toDescriptor.value === fromDescriptor.value)
|
|
1053
|
+
);
|
|
1054
|
+
};
|
|
1288
1055
|
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
var isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e||a===m||a===g||a===f||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t||a.$$typeof===r$1||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};var typeOf=z;
|
|
1295
|
-
|
|
1296
|
-
var reactIs_production_min = {
|
|
1297
|
-
AsyncMode: AsyncMode,
|
|
1298
|
-
ConcurrentMode: ConcurrentMode,
|
|
1299
|
-
ContextConsumer: ContextConsumer,
|
|
1300
|
-
ContextProvider: ContextProvider,
|
|
1301
|
-
Element: Element,
|
|
1302
|
-
ForwardRef: ForwardRef,
|
|
1303
|
-
Fragment: Fragment,
|
|
1304
|
-
Lazy: Lazy,
|
|
1305
|
-
Memo: Memo,
|
|
1306
|
-
Portal: Portal,
|
|
1307
|
-
Profiler: Profiler,
|
|
1308
|
-
StrictMode: StrictMode,
|
|
1309
|
-
Suspense: Suspense,
|
|
1310
|
-
isAsyncMode: isAsyncMode,
|
|
1311
|
-
isConcurrentMode: isConcurrentMode,
|
|
1312
|
-
isContextConsumer: isContextConsumer,
|
|
1313
|
-
isContextProvider: isContextProvider,
|
|
1314
|
-
isElement: isElement,
|
|
1315
|
-
isForwardRef: isForwardRef,
|
|
1316
|
-
isFragment: isFragment,
|
|
1317
|
-
isLazy: isLazy,
|
|
1318
|
-
isMemo: isMemo,
|
|
1319
|
-
isPortal: isPortal,
|
|
1320
|
-
isProfiler: isProfiler,
|
|
1321
|
-
isStrictMode: isStrictMode,
|
|
1322
|
-
isSuspense: isSuspense,
|
|
1323
|
-
isValidElementType: isValidElementType,
|
|
1324
|
-
typeOf: typeOf
|
|
1325
|
-
};
|
|
1326
|
-
|
|
1327
|
-
var reactIs = createCommonjsModule(function (module) {
|
|
1056
|
+
const changePrototype = (to, from) => {
|
|
1057
|
+
const fromPrototype = Object.getPrototypeOf(from);
|
|
1058
|
+
if (fromPrototype === Object.getPrototypeOf(to)) {
|
|
1059
|
+
return;
|
|
1060
|
+
}
|
|
1328
1061
|
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
} else {
|
|
1332
|
-
module.exports = reactIs_development;
|
|
1333
|
-
}
|
|
1334
|
-
});
|
|
1062
|
+
Object.setPrototypeOf(to, fromPrototype);
|
|
1063
|
+
};
|
|
1335
1064
|
|
|
1336
|
-
|
|
1337
|
-
object-assign
|
|
1338
|
-
(c) Sindre Sorhus
|
|
1339
|
-
@license MIT
|
|
1340
|
-
*/
|
|
1065
|
+
const wrappedToString = (withName, fromBody) => `/* Wrapped ${withName}*/\n${fromBody}`;
|
|
1341
1066
|
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
var hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
1345
|
-
var propIsEnumerable = Object.prototype.propertyIsEnumerable;
|
|
1067
|
+
const toStringDescriptor = Object.getOwnPropertyDescriptor(Function.prototype, 'toString');
|
|
1068
|
+
const toStringName = Object.getOwnPropertyDescriptor(Function.prototype.toString, 'name');
|
|
1346
1069
|
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1070
|
+
// We call `from.toString()` early (not lazily) to ensure `from` can be garbage collected.
|
|
1071
|
+
// We use `bind()` instead of a closure for the same reason.
|
|
1072
|
+
// Calling `from.toString()` early also allows caching it in case `to.toString()` is called several times.
|
|
1073
|
+
const changeToString = (to, from, name) => {
|
|
1074
|
+
const withName = name === '' ? '' : `with ${name.trim()}() `;
|
|
1075
|
+
const newToString = wrappedToString.bind(null, withName, from.toString());
|
|
1076
|
+
// Ensure `to.toString.toString` is non-enumerable and has the same `same`
|
|
1077
|
+
Object.defineProperty(newToString, 'name', toStringName);
|
|
1078
|
+
Object.defineProperty(to, 'toString', {...toStringDescriptor, value: newToString});
|
|
1079
|
+
};
|
|
1351
1080
|
|
|
1352
|
-
|
|
1353
|
-
}
|
|
1081
|
+
const mimicFn = (to, from, {ignoreNonConfigurable = false} = {}) => {
|
|
1082
|
+
const {name} = to;
|
|
1354
1083
|
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
if (!Object.assign) {
|
|
1358
|
-
return false;
|
|
1359
|
-
}
|
|
1360
|
-
|
|
1361
|
-
// Detect buggy property enumeration order in older V8 versions.
|
|
1362
|
-
|
|
1363
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=4118
|
|
1364
|
-
var test1 = new String('abc'); // eslint-disable-line no-new-wrappers
|
|
1365
|
-
test1[5] = 'de';
|
|
1366
|
-
if (Object.getOwnPropertyNames(test1)[0] === '5') {
|
|
1367
|
-
return false;
|
|
1368
|
-
}
|
|
1369
|
-
|
|
1370
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
1371
|
-
var test2 = {};
|
|
1372
|
-
for (var i = 0; i < 10; i++) {
|
|
1373
|
-
test2['_' + String.fromCharCode(i)] = i;
|
|
1374
|
-
}
|
|
1375
|
-
var order2 = Object.getOwnPropertyNames(test2).map(function (n) {
|
|
1376
|
-
return test2[n];
|
|
1377
|
-
});
|
|
1378
|
-
if (order2.join('') !== '0123456789') {
|
|
1379
|
-
return false;
|
|
1380
|
-
}
|
|
1381
|
-
|
|
1382
|
-
// https://bugs.chromium.org/p/v8/issues/detail?id=3056
|
|
1383
|
-
var test3 = {};
|
|
1384
|
-
'abcdefghijklmnopqrst'.split('').forEach(function (letter) {
|
|
1385
|
-
test3[letter] = letter;
|
|
1386
|
-
});
|
|
1387
|
-
if (Object.keys(Object.assign({}, test3)).join('') !==
|
|
1388
|
-
'abcdefghijklmnopqrst') {
|
|
1389
|
-
return false;
|
|
1390
|
-
}
|
|
1391
|
-
|
|
1392
|
-
return true;
|
|
1393
|
-
} catch (err) {
|
|
1394
|
-
// We don't expect any of the above to throw, but better to be safe.
|
|
1395
|
-
return false;
|
|
1084
|
+
for (const property of Reflect.ownKeys(from)) {
|
|
1085
|
+
copyProperty(to, from, property, ignoreNonConfigurable);
|
|
1396
1086
|
}
|
|
1397
|
-
}
|
|
1398
1087
|
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
var to = toObject(target);
|
|
1402
|
-
var symbols;
|
|
1403
|
-
|
|
1404
|
-
for (var s = 1; s < arguments.length; s++) {
|
|
1405
|
-
from = Object(arguments[s]);
|
|
1406
|
-
|
|
1407
|
-
for (var key in from) {
|
|
1408
|
-
if (hasOwnProperty$1.call(from, key)) {
|
|
1409
|
-
to[key] = from[key];
|
|
1410
|
-
}
|
|
1411
|
-
}
|
|
1412
|
-
|
|
1413
|
-
if (getOwnPropertySymbols) {
|
|
1414
|
-
symbols = getOwnPropertySymbols(from);
|
|
1415
|
-
for (var i = 0; i < symbols.length; i++) {
|
|
1416
|
-
if (propIsEnumerable.call(from, symbols[i])) {
|
|
1417
|
-
to[symbols[i]] = from[symbols[i]];
|
|
1418
|
-
}
|
|
1419
|
-
}
|
|
1420
|
-
}
|
|
1421
|
-
}
|
|
1088
|
+
changePrototype(to, from);
|
|
1089
|
+
changeToString(to, from, name);
|
|
1422
1090
|
|
|
1423
1091
|
return to;
|
|
1424
1092
|
};
|
|
1425
1093
|
|
|
1426
|
-
var
|
|
1427
|
-
|
|
1428
|
-
var printWarning$1 = function() {};
|
|
1094
|
+
var mimicFn_1 = mimicFn;
|
|
1429
1095
|
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
var loggedTypeFailures = {};
|
|
1433
|
-
var has = has$1;
|
|
1434
|
-
|
|
1435
|
-
printWarning$1 = function(text) {
|
|
1436
|
-
var message = 'Warning: ' + text;
|
|
1437
|
-
if (typeof console !== 'undefined') {
|
|
1438
|
-
console.error(message);
|
|
1439
|
-
}
|
|
1440
|
-
try {
|
|
1441
|
-
// --- Welcome to debugging React ---
|
|
1442
|
-
// This error was thrown as a convenience so that you can use this stack
|
|
1443
|
-
// to find the callsite that caused this warning to fire.
|
|
1444
|
-
throw new Error(message);
|
|
1445
|
-
} catch (x) { /**/ }
|
|
1446
|
-
};
|
|
1447
|
-
}
|
|
1096
|
+
var pDefer = () => {
|
|
1097
|
+
const ret = {};
|
|
1448
1098
|
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
* @param {object} typeSpecs Map of name to a ReactPropType
|
|
1454
|
-
* @param {object} values Runtime values that need to be type-checked
|
|
1455
|
-
* @param {string} location e.g. "prop", "context", "child context"
|
|
1456
|
-
* @param {string} componentName Name of the component for error messages.
|
|
1457
|
-
* @param {?Function} getStack Returns the component stack.
|
|
1458
|
-
* @private
|
|
1459
|
-
*/
|
|
1460
|
-
function checkPropTypes(typeSpecs, values, location, componentName, getStack) {
|
|
1461
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1462
|
-
for (var typeSpecName in typeSpecs) {
|
|
1463
|
-
if (has(typeSpecs, typeSpecName)) {
|
|
1464
|
-
var error;
|
|
1465
|
-
// Prop type validation may throw. In case they do, we don't want to
|
|
1466
|
-
// fail the render phase where it didn't fail before. So we log it.
|
|
1467
|
-
// After these have been cleaned up, we'll let them throw.
|
|
1468
|
-
try {
|
|
1469
|
-
// This is intentionally an invariant that gets caught. It's the same
|
|
1470
|
-
// behavior as without this statement except with a better message.
|
|
1471
|
-
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
1472
|
-
var err = Error(
|
|
1473
|
-
(componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' +
|
|
1474
|
-
'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' +
|
|
1475
|
-
'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.'
|
|
1476
|
-
);
|
|
1477
|
-
err.name = 'Invariant Violation';
|
|
1478
|
-
throw err;
|
|
1479
|
-
}
|
|
1480
|
-
error = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, ReactPropTypesSecret);
|
|
1481
|
-
} catch (ex) {
|
|
1482
|
-
error = ex;
|
|
1483
|
-
}
|
|
1484
|
-
if (error && !(error instanceof Error)) {
|
|
1485
|
-
printWarning$1(
|
|
1486
|
-
(componentName || 'React class') + ': type specification of ' +
|
|
1487
|
-
location + ' `' + typeSpecName + '` is invalid; the type checker ' +
|
|
1488
|
-
'function must return `null` or an `Error` but returned a ' + typeof error + '. ' +
|
|
1489
|
-
'You may have forgotten to pass an argument to the type checker ' +
|
|
1490
|
-
'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' +
|
|
1491
|
-
'shape all require an argument).'
|
|
1492
|
-
);
|
|
1493
|
-
}
|
|
1494
|
-
if (error instanceof Error && !(error.message in loggedTypeFailures)) {
|
|
1495
|
-
// Only monitor this failure once because there tends to be a lot of the
|
|
1496
|
-
// same error.
|
|
1497
|
-
loggedTypeFailures[error.message] = true;
|
|
1498
|
-
|
|
1499
|
-
var stack = getStack ? getStack() : '';
|
|
1500
|
-
|
|
1501
|
-
printWarning$1(
|
|
1502
|
-
'Failed ' + location + ' type: ' + error.message + (stack != null ? stack : '')
|
|
1503
|
-
);
|
|
1504
|
-
}
|
|
1505
|
-
}
|
|
1506
|
-
}
|
|
1507
|
-
}
|
|
1508
|
-
}
|
|
1099
|
+
ret.promise = new Promise((resolve, reject) => {
|
|
1100
|
+
ret.resolve = resolve;
|
|
1101
|
+
ret.reject = reject;
|
|
1102
|
+
});
|
|
1509
1103
|
|
|
1510
|
-
|
|
1511
|
-
* Resets warning cache when testing.
|
|
1512
|
-
*
|
|
1513
|
-
* @private
|
|
1514
|
-
*/
|
|
1515
|
-
checkPropTypes.resetWarningCache = function() {
|
|
1516
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1517
|
-
loggedTypeFailures = {};
|
|
1518
|
-
}
|
|
1104
|
+
return ret;
|
|
1519
1105
|
};
|
|
1520
1106
|
|
|
1521
|
-
var
|
|
1522
|
-
|
|
1523
|
-
|
|
1524
|
-
|
|
1525
|
-
|
|
1526
|
-
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1540
|
-
|
|
1541
|
-
|
|
1542
|
-
|
|
1543
|
-
|
|
1544
|
-
var factoryWithTypeCheckers = function(isValidElement, throwOnDirectAccess) {
|
|
1545
|
-
/* global Symbol */
|
|
1546
|
-
var ITERATOR_SYMBOL = typeof Symbol === 'function' && Symbol.iterator;
|
|
1547
|
-
var FAUX_ITERATOR_SYMBOL = '@@iterator'; // Before Symbol spec.
|
|
1548
|
-
|
|
1549
|
-
/**
|
|
1550
|
-
* Returns the iterator method function contained on the iterable object.
|
|
1551
|
-
*
|
|
1552
|
-
* Be sure to invoke the function with the iterable as context:
|
|
1553
|
-
*
|
|
1554
|
-
* var iteratorFn = getIteratorFn(myIterable);
|
|
1555
|
-
* if (iteratorFn) {
|
|
1556
|
-
* var iterator = iteratorFn.call(myIterable);
|
|
1557
|
-
* ...
|
|
1558
|
-
* }
|
|
1559
|
-
*
|
|
1560
|
-
* @param {?object} maybeIterable
|
|
1561
|
-
* @return {?function}
|
|
1562
|
-
*/
|
|
1563
|
-
function getIteratorFn(maybeIterable) {
|
|
1564
|
-
var iteratorFn = maybeIterable && (ITERATOR_SYMBOL && maybeIterable[ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL]);
|
|
1565
|
-
if (typeof iteratorFn === 'function') {
|
|
1566
|
-
return iteratorFn;
|
|
1567
|
-
}
|
|
1568
|
-
}
|
|
1569
|
-
|
|
1570
|
-
/**
|
|
1571
|
-
* Collection of methods that allow declaration and validation of props that are
|
|
1572
|
-
* supplied to React components. Example usage:
|
|
1573
|
-
*
|
|
1574
|
-
* var Props = require('ReactPropTypes');
|
|
1575
|
-
* var MyArticle = React.createClass({
|
|
1576
|
-
* propTypes: {
|
|
1577
|
-
* // An optional string prop named "description".
|
|
1578
|
-
* description: Props.string,
|
|
1579
|
-
*
|
|
1580
|
-
* // A required enum prop named "category".
|
|
1581
|
-
* category: Props.oneOf(['News','Photos']).isRequired,
|
|
1582
|
-
*
|
|
1583
|
-
* // A prop named "dialog" that requires an instance of Dialog.
|
|
1584
|
-
* dialog: Props.instanceOf(Dialog).isRequired
|
|
1585
|
-
* },
|
|
1586
|
-
* render: function() { ... }
|
|
1587
|
-
* });
|
|
1588
|
-
*
|
|
1589
|
-
* A more formal specification of how these methods are used:
|
|
1590
|
-
*
|
|
1591
|
-
* type := array|bool|func|object|number|string|oneOf([...])|instanceOf(...)
|
|
1592
|
-
* decl := ReactPropTypes.{type}(.isRequired)?
|
|
1593
|
-
*
|
|
1594
|
-
* Each and every declaration produces a function with the same signature. This
|
|
1595
|
-
* allows the creation of custom validation functions. For example:
|
|
1596
|
-
*
|
|
1597
|
-
* var MyLink = React.createClass({
|
|
1598
|
-
* propTypes: {
|
|
1599
|
-
* // An optional string or URI prop named "href".
|
|
1600
|
-
* href: function(props, propName, componentName) {
|
|
1601
|
-
* var propValue = props[propName];
|
|
1602
|
-
* if (propValue != null && typeof propValue !== 'string' &&
|
|
1603
|
-
* !(propValue instanceof URI)) {
|
|
1604
|
-
* return new Error(
|
|
1605
|
-
* 'Expected a string or an URI for ' + propName + ' in ' +
|
|
1606
|
-
* componentName
|
|
1607
|
-
* );
|
|
1608
|
-
* }
|
|
1609
|
-
* }
|
|
1610
|
-
* },
|
|
1611
|
-
* render: function() {...}
|
|
1612
|
-
* });
|
|
1613
|
-
*
|
|
1614
|
-
* @internal
|
|
1615
|
-
*/
|
|
1616
|
-
|
|
1617
|
-
var ANONYMOUS = '<<anonymous>>';
|
|
1618
|
-
|
|
1619
|
-
// Important!
|
|
1620
|
-
// Keep this list in sync with production version in `./factoryWithThrowingShims.js`.
|
|
1621
|
-
var ReactPropTypes = {
|
|
1622
|
-
array: createPrimitiveTypeChecker('array'),
|
|
1623
|
-
bigint: createPrimitiveTypeChecker('bigint'),
|
|
1624
|
-
bool: createPrimitiveTypeChecker('boolean'),
|
|
1625
|
-
func: createPrimitiveTypeChecker('function'),
|
|
1626
|
-
number: createPrimitiveTypeChecker('number'),
|
|
1627
|
-
object: createPrimitiveTypeChecker('object'),
|
|
1628
|
-
string: createPrimitiveTypeChecker('string'),
|
|
1629
|
-
symbol: createPrimitiveTypeChecker('symbol'),
|
|
1630
|
-
|
|
1631
|
-
any: createAnyTypeChecker(),
|
|
1632
|
-
arrayOf: createArrayOfTypeChecker,
|
|
1633
|
-
element: createElementTypeChecker(),
|
|
1634
|
-
elementType: createElementTypeTypeChecker(),
|
|
1635
|
-
instanceOf: createInstanceTypeChecker,
|
|
1636
|
-
node: createNodeChecker(),
|
|
1637
|
-
objectOf: createObjectOfTypeChecker,
|
|
1638
|
-
oneOf: createEnumTypeChecker,
|
|
1639
|
-
oneOfType: createUnionTypeChecker,
|
|
1640
|
-
shape: createShapeTypeChecker,
|
|
1641
|
-
exact: createStrictShapeTypeChecker,
|
|
1642
|
-
};
|
|
1643
|
-
|
|
1644
|
-
/**
|
|
1645
|
-
* inlined Object.is polyfill to avoid requiring consumers ship their own
|
|
1646
|
-
* https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is
|
|
1647
|
-
*/
|
|
1648
|
-
/*eslint-disable no-self-compare*/
|
|
1649
|
-
function is(x, y) {
|
|
1650
|
-
// SameValue algorithm
|
|
1651
|
-
if (x === y) {
|
|
1652
|
-
// Steps 1-5, 7-10
|
|
1653
|
-
// Steps 6.b-6.e: +0 != -0
|
|
1654
|
-
return x !== 0 || 1 / x === 1 / y;
|
|
1655
|
-
} else {
|
|
1656
|
-
// Step 6.a: NaN == NaN
|
|
1657
|
-
return x !== x && y !== y;
|
|
1658
|
-
}
|
|
1659
|
-
}
|
|
1660
|
-
/*eslint-enable no-self-compare*/
|
|
1661
|
-
|
|
1662
|
-
/**
|
|
1663
|
-
* We use an Error-like object for backward compatibility as people may call
|
|
1664
|
-
* PropTypes directly and inspect their output. However, we don't use real
|
|
1665
|
-
* Errors anymore. We don't inspect their stack anyway, and creating them
|
|
1666
|
-
* is prohibitively expensive if they are created too often, such as what
|
|
1667
|
-
* happens in oneOfType() for any type before the one that matched.
|
|
1668
|
-
*/
|
|
1669
|
-
function PropTypeError(message, data) {
|
|
1670
|
-
this.message = message;
|
|
1671
|
-
this.data = data && typeof data === 'object' ? data: {};
|
|
1672
|
-
this.stack = '';
|
|
1673
|
-
}
|
|
1674
|
-
// Make `instanceof Error` still work for returned errors.
|
|
1675
|
-
PropTypeError.prototype = Error.prototype;
|
|
1676
|
-
|
|
1677
|
-
function createChainableTypeChecker(validate) {
|
|
1678
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1679
|
-
var manualPropTypeCallCache = {};
|
|
1680
|
-
var manualPropTypeWarningCount = 0;
|
|
1681
|
-
}
|
|
1682
|
-
function checkType(isRequired, props, propName, componentName, location, propFullName, secret) {
|
|
1683
|
-
componentName = componentName || ANONYMOUS;
|
|
1684
|
-
propFullName = propFullName || propName;
|
|
1685
|
-
|
|
1686
|
-
if (secret !== ReactPropTypesSecret_1) {
|
|
1687
|
-
if (throwOnDirectAccess) {
|
|
1688
|
-
// New behavior only for users of `prop-types` package
|
|
1689
|
-
var err = new Error(
|
|
1690
|
-
'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +
|
|
1691
|
-
'Use `PropTypes.checkPropTypes()` to call them. ' +
|
|
1692
|
-
'Read more at http://fb.me/use-check-prop-types'
|
|
1693
|
-
);
|
|
1694
|
-
err.name = 'Invariant Violation';
|
|
1695
|
-
throw err;
|
|
1696
|
-
} else if (process.env.NODE_ENV !== 'production' && typeof console !== 'undefined') {
|
|
1697
|
-
// Old behavior for people using React.PropTypes
|
|
1698
|
-
var cacheKey = componentName + ':' + propName;
|
|
1699
|
-
if (
|
|
1700
|
-
!manualPropTypeCallCache[cacheKey] &&
|
|
1701
|
-
// Avoid spamming the console because they are often not actionable except for lib authors
|
|
1702
|
-
manualPropTypeWarningCount < 3
|
|
1703
|
-
) {
|
|
1704
|
-
printWarning(
|
|
1705
|
-
'You are manually calling a React.PropTypes validation ' +
|
|
1706
|
-
'function for the `' + propFullName + '` prop on `' + componentName + '`. This is deprecated ' +
|
|
1707
|
-
'and will throw in the standalone `prop-types` package. ' +
|
|
1708
|
-
'You may be seeing this warning due to a third-party PropTypes ' +
|
|
1709
|
-
'library. See https://fb.me/react-warning-dont-call-proptypes ' + 'for details.'
|
|
1710
|
-
);
|
|
1711
|
-
manualPropTypeCallCache[cacheKey] = true;
|
|
1712
|
-
manualPropTypeWarningCount++;
|
|
1713
|
-
}
|
|
1714
|
-
}
|
|
1715
|
-
}
|
|
1716
|
-
if (props[propName] == null) {
|
|
1717
|
-
if (isRequired) {
|
|
1718
|
-
if (props[propName] === null) {
|
|
1719
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required ' + ('in `' + componentName + '`, but its value is `null`.'));
|
|
1720
|
-
}
|
|
1721
|
-
return new PropTypeError('The ' + location + ' `' + propFullName + '` is marked as required in ' + ('`' + componentName + '`, but its value is `undefined`.'));
|
|
1722
|
-
}
|
|
1723
|
-
return null;
|
|
1724
|
-
} else {
|
|
1725
|
-
return validate(props, propName, componentName, location, propFullName);
|
|
1726
|
-
}
|
|
1727
|
-
}
|
|
1728
|
-
|
|
1729
|
-
var chainedCheckType = checkType.bind(null, false);
|
|
1730
|
-
chainedCheckType.isRequired = checkType.bind(null, true);
|
|
1731
|
-
|
|
1732
|
-
return chainedCheckType;
|
|
1733
|
-
}
|
|
1734
|
-
|
|
1735
|
-
function createPrimitiveTypeChecker(expectedType) {
|
|
1736
|
-
function validate(props, propName, componentName, location, propFullName, secret) {
|
|
1737
|
-
var propValue = props[propName];
|
|
1738
|
-
var propType = getPropType(propValue);
|
|
1739
|
-
if (propType !== expectedType) {
|
|
1740
|
-
// `propValue` being instance of, say, date/regexp, pass the 'object'
|
|
1741
|
-
// check, but we can offer a more precise error message here rather than
|
|
1742
|
-
// 'of type `object`'.
|
|
1743
|
-
var preciseType = getPreciseType(propValue);
|
|
1744
|
-
|
|
1745
|
-
return new PropTypeError(
|
|
1746
|
-
'Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + preciseType + '` supplied to `' + componentName + '`, expected ') + ('`' + expectedType + '`.'),
|
|
1747
|
-
{expectedType: expectedType}
|
|
1748
|
-
);
|
|
1749
|
-
}
|
|
1750
|
-
return null;
|
|
1751
|
-
}
|
|
1752
|
-
return createChainableTypeChecker(validate);
|
|
1753
|
-
}
|
|
1754
|
-
|
|
1755
|
-
function createAnyTypeChecker() {
|
|
1756
|
-
return createChainableTypeChecker(emptyFunctionThatReturnsNull);
|
|
1757
|
-
}
|
|
1758
|
-
|
|
1759
|
-
function createArrayOfTypeChecker(typeChecker) {
|
|
1760
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1761
|
-
if (typeof typeChecker !== 'function') {
|
|
1762
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside arrayOf.');
|
|
1763
|
-
}
|
|
1764
|
-
var propValue = props[propName];
|
|
1765
|
-
if (!Array.isArray(propValue)) {
|
|
1766
|
-
var propType = getPropType(propValue);
|
|
1767
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an array.'));
|
|
1768
|
-
}
|
|
1769
|
-
for (var i = 0; i < propValue.length; i++) {
|
|
1770
|
-
var error = typeChecker(propValue, i, componentName, location, propFullName + '[' + i + ']', ReactPropTypesSecret_1);
|
|
1771
|
-
if (error instanceof Error) {
|
|
1772
|
-
return error;
|
|
1773
|
-
}
|
|
1774
|
-
}
|
|
1775
|
-
return null;
|
|
1776
|
-
}
|
|
1777
|
-
return createChainableTypeChecker(validate);
|
|
1778
|
-
}
|
|
1779
|
-
|
|
1780
|
-
function createElementTypeChecker() {
|
|
1781
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1782
|
-
var propValue = props[propName];
|
|
1783
|
-
if (!isValidElement(propValue)) {
|
|
1784
|
-
var propType = getPropType(propValue);
|
|
1785
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement.'));
|
|
1786
|
-
}
|
|
1787
|
-
return null;
|
|
1788
|
-
}
|
|
1789
|
-
return createChainableTypeChecker(validate);
|
|
1790
|
-
}
|
|
1791
|
-
|
|
1792
|
-
function createElementTypeTypeChecker() {
|
|
1793
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1794
|
-
var propValue = props[propName];
|
|
1795
|
-
if (!reactIs.isValidElementType(propValue)) {
|
|
1796
|
-
var propType = getPropType(propValue);
|
|
1797
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected a single ReactElement type.'));
|
|
1798
|
-
}
|
|
1799
|
-
return null;
|
|
1800
|
-
}
|
|
1801
|
-
return createChainableTypeChecker(validate);
|
|
1802
|
-
}
|
|
1803
|
-
|
|
1804
|
-
function createInstanceTypeChecker(expectedClass) {
|
|
1805
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1806
|
-
if (!(props[propName] instanceof expectedClass)) {
|
|
1807
|
-
var expectedClassName = expectedClass.name || ANONYMOUS;
|
|
1808
|
-
var actualClassName = getClassName(props[propName]);
|
|
1809
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + actualClassName + '` supplied to `' + componentName + '`, expected ') + ('instance of `' + expectedClassName + '`.'));
|
|
1810
|
-
}
|
|
1811
|
-
return null;
|
|
1812
|
-
}
|
|
1813
|
-
return createChainableTypeChecker(validate);
|
|
1814
|
-
}
|
|
1815
|
-
|
|
1816
|
-
function createEnumTypeChecker(expectedValues) {
|
|
1817
|
-
if (!Array.isArray(expectedValues)) {
|
|
1818
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
1819
|
-
if (arguments.length > 1) {
|
|
1820
|
-
printWarning(
|
|
1821
|
-
'Invalid arguments supplied to oneOf, expected an array, got ' + arguments.length + ' arguments. ' +
|
|
1822
|
-
'A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z]).'
|
|
1823
|
-
);
|
|
1824
|
-
} else {
|
|
1825
|
-
printWarning('Invalid argument supplied to oneOf, expected an array.');
|
|
1826
|
-
}
|
|
1827
|
-
}
|
|
1828
|
-
return emptyFunctionThatReturnsNull;
|
|
1829
|
-
}
|
|
1830
|
-
|
|
1831
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1832
|
-
var propValue = props[propName];
|
|
1833
|
-
for (var i = 0; i < expectedValues.length; i++) {
|
|
1834
|
-
if (is(propValue, expectedValues[i])) {
|
|
1835
|
-
return null;
|
|
1836
|
-
}
|
|
1837
|
-
}
|
|
1838
|
-
|
|
1839
|
-
var valuesString = JSON.stringify(expectedValues, function replacer(key, value) {
|
|
1840
|
-
var type = getPreciseType(value);
|
|
1841
|
-
if (type === 'symbol') {
|
|
1842
|
-
return String(value);
|
|
1843
|
-
}
|
|
1844
|
-
return value;
|
|
1845
|
-
});
|
|
1846
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of value `' + String(propValue) + '` ' + ('supplied to `' + componentName + '`, expected one of ' + valuesString + '.'));
|
|
1847
|
-
}
|
|
1848
|
-
return createChainableTypeChecker(validate);
|
|
1849
|
-
}
|
|
1850
|
-
|
|
1851
|
-
function createObjectOfTypeChecker(typeChecker) {
|
|
1852
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1853
|
-
if (typeof typeChecker !== 'function') {
|
|
1854
|
-
return new PropTypeError('Property `' + propFullName + '` of component `' + componentName + '` has invalid PropType notation inside objectOf.');
|
|
1855
|
-
}
|
|
1856
|
-
var propValue = props[propName];
|
|
1857
|
-
var propType = getPropType(propValue);
|
|
1858
|
-
if (propType !== 'object') {
|
|
1859
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type ' + ('`' + propType + '` supplied to `' + componentName + '`, expected an object.'));
|
|
1860
|
-
}
|
|
1861
|
-
for (var key in propValue) {
|
|
1862
|
-
if (has$1(propValue, key)) {
|
|
1863
|
-
var error = typeChecker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
|
|
1864
|
-
if (error instanceof Error) {
|
|
1865
|
-
return error;
|
|
1866
|
-
}
|
|
1867
|
-
}
|
|
1868
|
-
}
|
|
1869
|
-
return null;
|
|
1870
|
-
}
|
|
1871
|
-
return createChainableTypeChecker(validate);
|
|
1872
|
-
}
|
|
1873
|
-
|
|
1874
|
-
function createUnionTypeChecker(arrayOfTypeCheckers) {
|
|
1875
|
-
if (!Array.isArray(arrayOfTypeCheckers)) {
|
|
1876
|
-
process.env.NODE_ENV !== 'production' ? printWarning('Invalid argument supplied to oneOfType, expected an instance of array.') : void 0;
|
|
1877
|
-
return emptyFunctionThatReturnsNull;
|
|
1878
|
-
}
|
|
1879
|
-
|
|
1880
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
1881
|
-
var checker = arrayOfTypeCheckers[i];
|
|
1882
|
-
if (typeof checker !== 'function') {
|
|
1883
|
-
printWarning(
|
|
1884
|
-
'Invalid argument supplied to oneOfType. Expected an array of check functions, but ' +
|
|
1885
|
-
'received ' + getPostfixForTypeWarning(checker) + ' at index ' + i + '.'
|
|
1886
|
-
);
|
|
1887
|
-
return emptyFunctionThatReturnsNull;
|
|
1888
|
-
}
|
|
1889
|
-
}
|
|
1890
|
-
|
|
1891
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1892
|
-
var expectedTypes = [];
|
|
1893
|
-
for (var i = 0; i < arrayOfTypeCheckers.length; i++) {
|
|
1894
|
-
var checker = arrayOfTypeCheckers[i];
|
|
1895
|
-
var checkerResult = checker(props, propName, componentName, location, propFullName, ReactPropTypesSecret_1);
|
|
1896
|
-
if (checkerResult == null) {
|
|
1897
|
-
return null;
|
|
1898
|
-
}
|
|
1899
|
-
if (checkerResult.data && has$1(checkerResult.data, 'expectedType')) {
|
|
1900
|
-
expectedTypes.push(checkerResult.data.expectedType);
|
|
1107
|
+
var dist$1 = createCommonjsModule(function (module, exports) {
|
|
1108
|
+
var __awaiter = (commonjsGlobal && commonjsGlobal.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
1109
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
1110
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
1111
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
1112
|
+
function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }
|
|
1113
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
1114
|
+
});
|
|
1115
|
+
};
|
|
1116
|
+
var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
|
|
1117
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
1118
|
+
};
|
|
1119
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1120
|
+
const p_defer_1 = __importDefault(pDefer);
|
|
1121
|
+
function mapAgeCleaner(map, property = 'maxAge') {
|
|
1122
|
+
let processingKey;
|
|
1123
|
+
let processingTimer;
|
|
1124
|
+
let processingDeferred;
|
|
1125
|
+
const cleanup = () => __awaiter(this, void 0, void 0, function* () {
|
|
1126
|
+
if (processingKey !== undefined) {
|
|
1127
|
+
// If we are already processing an item, we can safely exit
|
|
1128
|
+
return;
|
|
1901
1129
|
}
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1911
|
-
if (!isNode(props[propName])) {
|
|
1912
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` supplied to ' + ('`' + componentName + '`, expected a ReactNode.'));
|
|
1913
|
-
}
|
|
1914
|
-
return null;
|
|
1915
|
-
}
|
|
1916
|
-
return createChainableTypeChecker(validate);
|
|
1917
|
-
}
|
|
1918
|
-
|
|
1919
|
-
function invalidValidatorError(componentName, location, propFullName, key, type) {
|
|
1920
|
-
return new PropTypeError(
|
|
1921
|
-
(componentName || 'React class') + ': ' + location + ' type `' + propFullName + '.' + key + '` is invalid; ' +
|
|
1922
|
-
'it must be a function, usually from the `prop-types` package, but received `' + type + '`.'
|
|
1923
|
-
);
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
|
-
function createShapeTypeChecker(shapeTypes) {
|
|
1927
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1928
|
-
var propValue = props[propName];
|
|
1929
|
-
var propType = getPropType(propValue);
|
|
1930
|
-
if (propType !== 'object') {
|
|
1931
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
1932
|
-
}
|
|
1933
|
-
for (var key in shapeTypes) {
|
|
1934
|
-
var checker = shapeTypes[key];
|
|
1935
|
-
if (typeof checker !== 'function') {
|
|
1936
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
1937
|
-
}
|
|
1938
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
|
|
1939
|
-
if (error) {
|
|
1940
|
-
return error;
|
|
1941
|
-
}
|
|
1942
|
-
}
|
|
1943
|
-
return null;
|
|
1944
|
-
}
|
|
1945
|
-
return createChainableTypeChecker(validate);
|
|
1946
|
-
}
|
|
1947
|
-
|
|
1948
|
-
function createStrictShapeTypeChecker(shapeTypes) {
|
|
1949
|
-
function validate(props, propName, componentName, location, propFullName) {
|
|
1950
|
-
var propValue = props[propName];
|
|
1951
|
-
var propType = getPropType(propValue);
|
|
1952
|
-
if (propType !== 'object') {
|
|
1953
|
-
return new PropTypeError('Invalid ' + location + ' `' + propFullName + '` of type `' + propType + '` ' + ('supplied to `' + componentName + '`, expected `object`.'));
|
|
1954
|
-
}
|
|
1955
|
-
// We need to check all keys in case some are required but missing from props.
|
|
1956
|
-
var allKeys = objectAssign({}, props[propName], shapeTypes);
|
|
1957
|
-
for (var key in allKeys) {
|
|
1958
|
-
var checker = shapeTypes[key];
|
|
1959
|
-
if (has$1(shapeTypes, key) && typeof checker !== 'function') {
|
|
1960
|
-
return invalidValidatorError(componentName, location, propFullName, key, getPreciseType(checker));
|
|
1961
|
-
}
|
|
1962
|
-
if (!checker) {
|
|
1963
|
-
return new PropTypeError(
|
|
1964
|
-
'Invalid ' + location + ' `' + propFullName + '` key `' + key + '` supplied to `' + componentName + '`.' +
|
|
1965
|
-
'\nBad object: ' + JSON.stringify(props[propName], null, ' ') +
|
|
1966
|
-
'\nValid keys: ' + JSON.stringify(Object.keys(shapeTypes), null, ' ')
|
|
1967
|
-
);
|
|
1968
|
-
}
|
|
1969
|
-
var error = checker(propValue, key, componentName, location, propFullName + '.' + key, ReactPropTypesSecret_1);
|
|
1970
|
-
if (error) {
|
|
1971
|
-
return error;
|
|
1972
|
-
}
|
|
1973
|
-
}
|
|
1974
|
-
return null;
|
|
1975
|
-
}
|
|
1976
|
-
|
|
1977
|
-
return createChainableTypeChecker(validate);
|
|
1978
|
-
}
|
|
1979
|
-
|
|
1980
|
-
function isNode(propValue) {
|
|
1981
|
-
switch (typeof propValue) {
|
|
1982
|
-
case 'number':
|
|
1983
|
-
case 'string':
|
|
1984
|
-
case 'undefined':
|
|
1985
|
-
return true;
|
|
1986
|
-
case 'boolean':
|
|
1987
|
-
return !propValue;
|
|
1988
|
-
case 'object':
|
|
1989
|
-
if (Array.isArray(propValue)) {
|
|
1990
|
-
return propValue.every(isNode);
|
|
1991
|
-
}
|
|
1992
|
-
if (propValue === null || isValidElement(propValue)) {
|
|
1993
|
-
return true;
|
|
1994
|
-
}
|
|
1995
|
-
|
|
1996
|
-
var iteratorFn = getIteratorFn(propValue);
|
|
1997
|
-
if (iteratorFn) {
|
|
1998
|
-
var iterator = iteratorFn.call(propValue);
|
|
1999
|
-
var step;
|
|
2000
|
-
if (iteratorFn !== propValue.entries) {
|
|
2001
|
-
while (!(step = iterator.next()).done) {
|
|
2002
|
-
if (!isNode(step.value)) {
|
|
2003
|
-
return false;
|
|
2004
|
-
}
|
|
1130
|
+
const setupTimer = (item) => __awaiter(this, void 0, void 0, function* () {
|
|
1131
|
+
processingDeferred = p_defer_1.default();
|
|
1132
|
+
const delay = item[1][property] - Date.now();
|
|
1133
|
+
if (delay <= 0) {
|
|
1134
|
+
// Remove the item immediately if the delay is equal to or below 0
|
|
1135
|
+
map.delete(item[0]);
|
|
1136
|
+
processingDeferred.resolve();
|
|
1137
|
+
return;
|
|
2005
1138
|
}
|
|
2006
|
-
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2010
|
-
|
|
2011
|
-
if (
|
|
2012
|
-
|
|
1139
|
+
// Keep track of the current processed key
|
|
1140
|
+
processingKey = item[0];
|
|
1141
|
+
processingTimer = setTimeout(() => {
|
|
1142
|
+
// Remove the item when the timeout fires
|
|
1143
|
+
map.delete(item[0]);
|
|
1144
|
+
if (processingDeferred) {
|
|
1145
|
+
processingDeferred.resolve();
|
|
2013
1146
|
}
|
|
2014
|
-
|
|
1147
|
+
}, delay);
|
|
1148
|
+
// tslint:disable-next-line:strict-type-predicates
|
|
1149
|
+
if (typeof processingTimer.unref === 'function') {
|
|
1150
|
+
// Don't hold up the process from exiting
|
|
1151
|
+
processingTimer.unref();
|
|
1152
|
+
}
|
|
1153
|
+
return processingDeferred.promise;
|
|
1154
|
+
});
|
|
1155
|
+
try {
|
|
1156
|
+
for (const entry of map) {
|
|
1157
|
+
yield setupTimer(entry);
|
|
2015
1158
|
}
|
|
2016
|
-
}
|
|
2017
|
-
} else {
|
|
2018
|
-
return false;
|
|
2019
1159
|
}
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
}
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
if (Array.isArray(propValue)) {
|
|
2055
|
-
return 'array';
|
|
2056
|
-
}
|
|
2057
|
-
if (propValue instanceof RegExp) {
|
|
2058
|
-
// Old webkits (at least until Android 4.0) return 'function' rather than
|
|
2059
|
-
// 'object' for typeof a RegExp. We'll normalize this here so that /bla/
|
|
2060
|
-
// passes PropTypes.object.
|
|
2061
|
-
return 'object';
|
|
2062
|
-
}
|
|
2063
|
-
if (isSymbol(propType, propValue)) {
|
|
2064
|
-
return 'symbol';
|
|
2065
|
-
}
|
|
2066
|
-
return propType;
|
|
2067
|
-
}
|
|
2068
|
-
|
|
2069
|
-
// This handles more types than `getPropType`. Only used for error messages.
|
|
2070
|
-
// See `createPrimitiveTypeChecker`.
|
|
2071
|
-
function getPreciseType(propValue) {
|
|
2072
|
-
if (typeof propValue === 'undefined' || propValue === null) {
|
|
2073
|
-
return '' + propValue;
|
|
2074
|
-
}
|
|
2075
|
-
var propType = getPropType(propValue);
|
|
2076
|
-
if (propType === 'object') {
|
|
2077
|
-
if (propValue instanceof Date) {
|
|
2078
|
-
return 'date';
|
|
2079
|
-
} else if (propValue instanceof RegExp) {
|
|
2080
|
-
return 'regexp';
|
|
2081
|
-
}
|
|
2082
|
-
}
|
|
2083
|
-
return propType;
|
|
2084
|
-
}
|
|
2085
|
-
|
|
2086
|
-
// Returns a string that is postfixed to a warning about an invalid type.
|
|
2087
|
-
// For example, "undefined" or "of type array"
|
|
2088
|
-
function getPostfixForTypeWarning(value) {
|
|
2089
|
-
var type = getPreciseType(value);
|
|
2090
|
-
switch (type) {
|
|
2091
|
-
case 'array':
|
|
2092
|
-
case 'object':
|
|
2093
|
-
return 'an ' + type;
|
|
2094
|
-
case 'boolean':
|
|
2095
|
-
case 'date':
|
|
2096
|
-
case 'regexp':
|
|
2097
|
-
return 'a ' + type;
|
|
2098
|
-
default:
|
|
2099
|
-
return type;
|
|
2100
|
-
}
|
|
2101
|
-
}
|
|
2102
|
-
|
|
2103
|
-
// Returns class name of the object, if any.
|
|
2104
|
-
function getClassName(propValue) {
|
|
2105
|
-
if (!propValue.constructor || !propValue.constructor.name) {
|
|
2106
|
-
return ANONYMOUS;
|
|
2107
|
-
}
|
|
2108
|
-
return propValue.constructor.name;
|
|
2109
|
-
}
|
|
2110
|
-
|
|
2111
|
-
ReactPropTypes.checkPropTypes = checkPropTypes_1;
|
|
2112
|
-
ReactPropTypes.resetWarningCache = checkPropTypes_1.resetWarningCache;
|
|
2113
|
-
ReactPropTypes.PropTypes = ReactPropTypes;
|
|
2114
|
-
|
|
2115
|
-
return ReactPropTypes;
|
|
2116
|
-
};
|
|
2117
|
-
|
|
2118
|
-
var propTypes = createCommonjsModule(function (module) {
|
|
2119
|
-
/**
|
|
2120
|
-
* Copyright (c) 2013-present, Facebook, Inc.
|
|
2121
|
-
*
|
|
2122
|
-
* This source code is licensed under the MIT license found in the
|
|
2123
|
-
* LICENSE file in the root directory of this source tree.
|
|
2124
|
-
*/
|
|
2125
|
-
|
|
2126
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2127
|
-
var ReactIs = reactIs;
|
|
2128
|
-
|
|
2129
|
-
// By explicitly using `prop-types` you are opting into new development behavior.
|
|
2130
|
-
// http://fb.me/prop-types-in-prod
|
|
2131
|
-
var throwOnDirectAccess = true;
|
|
2132
|
-
module.exports = factoryWithTypeCheckers(ReactIs.isElement, throwOnDirectAccess);
|
|
2133
|
-
} else {
|
|
2134
|
-
// By explicitly using `prop-types` you are opting into new production behavior.
|
|
2135
|
-
// http://fb.me/prop-types-in-prod
|
|
2136
|
-
module.exports = factoryWithThrowingShims();
|
|
1160
|
+
catch (_a) {
|
|
1161
|
+
// Do nothing if an error occurs, this means the timer was cleaned up and we should stop processing
|
|
1162
|
+
}
|
|
1163
|
+
processingKey = undefined;
|
|
1164
|
+
});
|
|
1165
|
+
const reset = () => {
|
|
1166
|
+
processingKey = undefined;
|
|
1167
|
+
if (processingTimer !== undefined) {
|
|
1168
|
+
clearTimeout(processingTimer);
|
|
1169
|
+
processingTimer = undefined;
|
|
1170
|
+
}
|
|
1171
|
+
if (processingDeferred !== undefined) { // tslint:disable-line:early-exit
|
|
1172
|
+
processingDeferred.reject(undefined);
|
|
1173
|
+
processingDeferred = undefined;
|
|
1174
|
+
}
|
|
1175
|
+
};
|
|
1176
|
+
const originalSet = map.set.bind(map);
|
|
1177
|
+
map.set = (key, value) => {
|
|
1178
|
+
if (map.has(key)) {
|
|
1179
|
+
// If the key already exist, remove it so we can add it back at the end of the map.
|
|
1180
|
+
map.delete(key);
|
|
1181
|
+
}
|
|
1182
|
+
// Call the original `map.set`
|
|
1183
|
+
const result = originalSet(key, value);
|
|
1184
|
+
// If we are already processing a key and the key added is the current processed key, stop processing it
|
|
1185
|
+
if (processingKey && processingKey === key) {
|
|
1186
|
+
reset();
|
|
1187
|
+
}
|
|
1188
|
+
// Always run the cleanup method in case it wasn't started yet
|
|
1189
|
+
cleanup(); // tslint:disable-line:no-floating-promises
|
|
1190
|
+
return result;
|
|
1191
|
+
};
|
|
1192
|
+
cleanup(); // tslint:disable-line:no-floating-promises
|
|
1193
|
+
return map;
|
|
2137
1194
|
}
|
|
1195
|
+
exports.default = mapAgeCleaner;
|
|
1196
|
+
// Add support for CJS
|
|
1197
|
+
module.exports = mapAgeCleaner;
|
|
1198
|
+
module.exports.default = mapAgeCleaner;
|
|
2138
1199
|
});
|
|
2139
1200
|
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}
|
|
2143
|
-
|
|
2144
|
-
/**
|
|
2145
|
-
* lodash (Custom Build) <https://lodash.com/>
|
|
2146
|
-
* Build: `lodash modularize exports="npm" -o ./`
|
|
2147
|
-
* Copyright jQuery Foundation and other contributors <https://jquery.org/>
|
|
2148
|
-
* Released under MIT license <https://lodash.com/license>
|
|
2149
|
-
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
2150
|
-
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
2151
|
-
*/
|
|
2152
|
-
|
|
2153
|
-
/** Used as the `TypeError` message for "Functions" methods. */
|
|
2154
|
-
var FUNC_ERROR_TEXT = 'Expected a function';
|
|
2155
|
-
|
|
2156
|
-
/** Used to stand-in for `undefined` hash values. */
|
|
2157
|
-
var HASH_UNDEFINED = '__lodash_hash_undefined__';
|
|
2158
|
-
|
|
2159
|
-
/** `Object#toString` result references. */
|
|
2160
|
-
var funcTag = '[object Function]',
|
|
2161
|
-
genTag = '[object GeneratorFunction]';
|
|
1201
|
+
unwrapExports(dist$1);
|
|
2162
1202
|
|
|
1203
|
+
const decoratorInstanceMap = new WeakMap();
|
|
1204
|
+
const cacheStore = new WeakMap();
|
|
2163
1205
|
/**
|
|
2164
|
-
|
|
2165
|
-
* [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
|
|
2166
|
-
*/
|
|
2167
|
-
var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
|
|
2168
|
-
|
|
2169
|
-
/** Used to detect host constructors (Safari). */
|
|
2170
|
-
var reIsHostCtor = /^\[object .+?Constructor\]$/;
|
|
2171
|
-
|
|
2172
|
-
/** Detect free variable `global` from Node.js. */
|
|
2173
|
-
var freeGlobal = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
|
|
1206
|
+
[Memoize](https://en.wikipedia.org/wiki/Memoization) functions - An optimization used to speed up consecutive function calls by caching the result of calls with identical input.
|
|
2174
1207
|
|
|
2175
|
-
|
|
2176
|
-
var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
|
|
2177
|
-
|
|
2178
|
-
/** Used as a reference to the global object. */
|
|
2179
|
-
var root = freeGlobal || freeSelf || Function('return this')();
|
|
2180
|
-
|
|
2181
|
-
/**
|
|
2182
|
-
* Gets the value at `key` of `object`.
|
|
2183
|
-
*
|
|
2184
|
-
* @private
|
|
2185
|
-
* @param {Object} [object] The object to query.
|
|
2186
|
-
* @param {string} key The key of the property to get.
|
|
2187
|
-
* @returns {*} Returns the property value.
|
|
2188
|
-
*/
|
|
2189
|
-
function getValue$2(object, key) {
|
|
2190
|
-
return object == null ? undefined : object[key];
|
|
2191
|
-
}
|
|
1208
|
+
@param fn - Function to be memoized.
|
|
2192
1209
|
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
* @private
|
|
2197
|
-
* @param {*} value The value to check.
|
|
2198
|
-
* @returns {boolean} Returns `true` if `value` is a host object, else `false`.
|
|
2199
|
-
*/
|
|
2200
|
-
function isHostObject(value) {
|
|
2201
|
-
// Many host objects are `Object` objects that can coerce to strings
|
|
2202
|
-
// despite having improperly defined `toString` methods.
|
|
2203
|
-
var result = false;
|
|
2204
|
-
if (value != null && typeof value.toString != 'function') {
|
|
2205
|
-
try {
|
|
2206
|
-
result = !!(value + '');
|
|
2207
|
-
} catch (e) {}
|
|
2208
|
-
}
|
|
2209
|
-
return result;
|
|
2210
|
-
}
|
|
1210
|
+
@example
|
|
1211
|
+
```
|
|
1212
|
+
import mem = require('mem');
|
|
2211
1213
|
|
|
2212
|
-
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
objectProto = Object.prototype;
|
|
1214
|
+
let i = 0;
|
|
1215
|
+
const counter = () => ++i;
|
|
1216
|
+
const memoized = mem(counter);
|
|
2216
1217
|
|
|
2217
|
-
|
|
2218
|
-
|
|
1218
|
+
memoized('foo');
|
|
1219
|
+
//=> 1
|
|
2219
1220
|
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
return uid ? ('Symbol(src)_1.' + uid) : '';
|
|
2224
|
-
}());
|
|
1221
|
+
// Cached as it's the same arguments
|
|
1222
|
+
memoized('foo');
|
|
1223
|
+
//=> 1
|
|
2225
1224
|
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
/** Used to check objects for own properties. */
|
|
2230
|
-
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
2231
|
-
|
|
2232
|
-
/**
|
|
2233
|
-
* Used to resolve the
|
|
2234
|
-
* [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
|
|
2235
|
-
* of values.
|
|
2236
|
-
*/
|
|
2237
|
-
var objectToString = objectProto.toString;
|
|
2238
|
-
|
|
2239
|
-
/** Used to detect if a method is native. */
|
|
2240
|
-
var reIsNative = RegExp('^' +
|
|
2241
|
-
funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
|
|
2242
|
-
.replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
|
|
2243
|
-
);
|
|
2244
|
-
|
|
2245
|
-
/** Built-in value references. */
|
|
2246
|
-
var splice = arrayProto.splice;
|
|
2247
|
-
|
|
2248
|
-
/* Built-in method references that are verified to be native. */
|
|
2249
|
-
var Map$1 = getNative(root, 'Map'),
|
|
2250
|
-
nativeCreate = getNative(Object, 'create');
|
|
2251
|
-
|
|
2252
|
-
/**
|
|
2253
|
-
* Creates a hash object.
|
|
2254
|
-
*
|
|
2255
|
-
* @private
|
|
2256
|
-
* @constructor
|
|
2257
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
2258
|
-
*/
|
|
2259
|
-
function Hash(entries) {
|
|
2260
|
-
var index = -1,
|
|
2261
|
-
length = entries ? entries.length : 0;
|
|
2262
|
-
|
|
2263
|
-
this.clear();
|
|
2264
|
-
while (++index < length) {
|
|
2265
|
-
var entry = entries[index];
|
|
2266
|
-
this.set(entry[0], entry[1]);
|
|
2267
|
-
}
|
|
2268
|
-
}
|
|
2269
|
-
|
|
2270
|
-
/**
|
|
2271
|
-
* Removes all key-value entries from the hash.
|
|
2272
|
-
*
|
|
2273
|
-
* @private
|
|
2274
|
-
* @name clear
|
|
2275
|
-
* @memberOf Hash
|
|
2276
|
-
*/
|
|
2277
|
-
function hashClear() {
|
|
2278
|
-
this.__data__ = nativeCreate ? nativeCreate(null) : {};
|
|
2279
|
-
}
|
|
2280
|
-
|
|
2281
|
-
/**
|
|
2282
|
-
* Removes `key` and its value from the hash.
|
|
2283
|
-
*
|
|
2284
|
-
* @private
|
|
2285
|
-
* @name delete
|
|
2286
|
-
* @memberOf Hash
|
|
2287
|
-
* @param {Object} hash The hash to modify.
|
|
2288
|
-
* @param {string} key The key of the value to remove.
|
|
2289
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
2290
|
-
*/
|
|
2291
|
-
function hashDelete(key) {
|
|
2292
|
-
return this.has(key) && delete this.__data__[key];
|
|
2293
|
-
}
|
|
2294
|
-
|
|
2295
|
-
/**
|
|
2296
|
-
* Gets the hash value for `key`.
|
|
2297
|
-
*
|
|
2298
|
-
* @private
|
|
2299
|
-
* @name get
|
|
2300
|
-
* @memberOf Hash
|
|
2301
|
-
* @param {string} key The key of the value to get.
|
|
2302
|
-
* @returns {*} Returns the entry value.
|
|
2303
|
-
*/
|
|
2304
|
-
function hashGet(key) {
|
|
2305
|
-
var data = this.__data__;
|
|
2306
|
-
if (nativeCreate) {
|
|
2307
|
-
var result = data[key];
|
|
2308
|
-
return result === HASH_UNDEFINED ? undefined : result;
|
|
2309
|
-
}
|
|
2310
|
-
return hasOwnProperty.call(data, key) ? data[key] : undefined;
|
|
2311
|
-
}
|
|
2312
|
-
|
|
2313
|
-
/**
|
|
2314
|
-
* Checks if a hash value for `key` exists.
|
|
2315
|
-
*
|
|
2316
|
-
* @private
|
|
2317
|
-
* @name has
|
|
2318
|
-
* @memberOf Hash
|
|
2319
|
-
* @param {string} key The key of the entry to check.
|
|
2320
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
2321
|
-
*/
|
|
2322
|
-
function hashHas(key) {
|
|
2323
|
-
var data = this.__data__;
|
|
2324
|
-
return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);
|
|
2325
|
-
}
|
|
2326
|
-
|
|
2327
|
-
/**
|
|
2328
|
-
* Sets the hash `key` to `value`.
|
|
2329
|
-
*
|
|
2330
|
-
* @private
|
|
2331
|
-
* @name set
|
|
2332
|
-
* @memberOf Hash
|
|
2333
|
-
* @param {string} key The key of the value to set.
|
|
2334
|
-
* @param {*} value The value to set.
|
|
2335
|
-
* @returns {Object} Returns the hash instance.
|
|
2336
|
-
*/
|
|
2337
|
-
function hashSet(key, value) {
|
|
2338
|
-
var data = this.__data__;
|
|
2339
|
-
data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
|
|
2340
|
-
return this;
|
|
2341
|
-
}
|
|
2342
|
-
|
|
2343
|
-
// Add methods to `Hash`.
|
|
2344
|
-
Hash.prototype.clear = hashClear;
|
|
2345
|
-
Hash.prototype['delete'] = hashDelete;
|
|
2346
|
-
Hash.prototype.get = hashGet;
|
|
2347
|
-
Hash.prototype.has = hashHas;
|
|
2348
|
-
Hash.prototype.set = hashSet;
|
|
2349
|
-
|
|
2350
|
-
/**
|
|
2351
|
-
* Creates an list cache object.
|
|
2352
|
-
*
|
|
2353
|
-
* @private
|
|
2354
|
-
* @constructor
|
|
2355
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
2356
|
-
*/
|
|
2357
|
-
function ListCache(entries) {
|
|
2358
|
-
var index = -1,
|
|
2359
|
-
length = entries ? entries.length : 0;
|
|
2360
|
-
|
|
2361
|
-
this.clear();
|
|
2362
|
-
while (++index < length) {
|
|
2363
|
-
var entry = entries[index];
|
|
2364
|
-
this.set(entry[0], entry[1]);
|
|
2365
|
-
}
|
|
2366
|
-
}
|
|
2367
|
-
|
|
2368
|
-
/**
|
|
2369
|
-
* Removes all key-value entries from the list cache.
|
|
2370
|
-
*
|
|
2371
|
-
* @private
|
|
2372
|
-
* @name clear
|
|
2373
|
-
* @memberOf ListCache
|
|
2374
|
-
*/
|
|
2375
|
-
function listCacheClear() {
|
|
2376
|
-
this.__data__ = [];
|
|
2377
|
-
}
|
|
2378
|
-
|
|
2379
|
-
/**
|
|
2380
|
-
* Removes `key` and its value from the list cache.
|
|
2381
|
-
*
|
|
2382
|
-
* @private
|
|
2383
|
-
* @name delete
|
|
2384
|
-
* @memberOf ListCache
|
|
2385
|
-
* @param {string} key The key of the value to remove.
|
|
2386
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
2387
|
-
*/
|
|
2388
|
-
function listCacheDelete(key) {
|
|
2389
|
-
var data = this.__data__,
|
|
2390
|
-
index = assocIndexOf(data, key);
|
|
2391
|
-
|
|
2392
|
-
if (index < 0) {
|
|
2393
|
-
return false;
|
|
2394
|
-
}
|
|
2395
|
-
var lastIndex = data.length - 1;
|
|
2396
|
-
if (index == lastIndex) {
|
|
2397
|
-
data.pop();
|
|
2398
|
-
} else {
|
|
2399
|
-
splice.call(data, index, 1);
|
|
2400
|
-
}
|
|
2401
|
-
return true;
|
|
2402
|
-
}
|
|
2403
|
-
|
|
2404
|
-
/**
|
|
2405
|
-
* Gets the list cache value for `key`.
|
|
2406
|
-
*
|
|
2407
|
-
* @private
|
|
2408
|
-
* @name get
|
|
2409
|
-
* @memberOf ListCache
|
|
2410
|
-
* @param {string} key The key of the value to get.
|
|
2411
|
-
* @returns {*} Returns the entry value.
|
|
2412
|
-
*/
|
|
2413
|
-
function listCacheGet(key) {
|
|
2414
|
-
var data = this.__data__,
|
|
2415
|
-
index = assocIndexOf(data, key);
|
|
2416
|
-
|
|
2417
|
-
return index < 0 ? undefined : data[index][1];
|
|
2418
|
-
}
|
|
2419
|
-
|
|
2420
|
-
/**
|
|
2421
|
-
* Checks if a list cache value for `key` exists.
|
|
2422
|
-
*
|
|
2423
|
-
* @private
|
|
2424
|
-
* @name has
|
|
2425
|
-
* @memberOf ListCache
|
|
2426
|
-
* @param {string} key The key of the entry to check.
|
|
2427
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
2428
|
-
*/
|
|
2429
|
-
function listCacheHas(key) {
|
|
2430
|
-
return assocIndexOf(this.__data__, key) > -1;
|
|
2431
|
-
}
|
|
2432
|
-
|
|
2433
|
-
/**
|
|
2434
|
-
* Sets the list cache `key` to `value`.
|
|
2435
|
-
*
|
|
2436
|
-
* @private
|
|
2437
|
-
* @name set
|
|
2438
|
-
* @memberOf ListCache
|
|
2439
|
-
* @param {string} key The key of the value to set.
|
|
2440
|
-
* @param {*} value The value to set.
|
|
2441
|
-
* @returns {Object} Returns the list cache instance.
|
|
2442
|
-
*/
|
|
2443
|
-
function listCacheSet(key, value) {
|
|
2444
|
-
var data = this.__data__,
|
|
2445
|
-
index = assocIndexOf(data, key);
|
|
2446
|
-
|
|
2447
|
-
if (index < 0) {
|
|
2448
|
-
data.push([key, value]);
|
|
2449
|
-
} else {
|
|
2450
|
-
data[index][1] = value;
|
|
2451
|
-
}
|
|
2452
|
-
return this;
|
|
2453
|
-
}
|
|
2454
|
-
|
|
2455
|
-
// Add methods to `ListCache`.
|
|
2456
|
-
ListCache.prototype.clear = listCacheClear;
|
|
2457
|
-
ListCache.prototype['delete'] = listCacheDelete;
|
|
2458
|
-
ListCache.prototype.get = listCacheGet;
|
|
2459
|
-
ListCache.prototype.has = listCacheHas;
|
|
2460
|
-
ListCache.prototype.set = listCacheSet;
|
|
2461
|
-
|
|
2462
|
-
/**
|
|
2463
|
-
* Creates a map cache object to store key-value pairs.
|
|
2464
|
-
*
|
|
2465
|
-
* @private
|
|
2466
|
-
* @constructor
|
|
2467
|
-
* @param {Array} [entries] The key-value pairs to cache.
|
|
2468
|
-
*/
|
|
2469
|
-
function MapCache(entries) {
|
|
2470
|
-
var index = -1,
|
|
2471
|
-
length = entries ? entries.length : 0;
|
|
2472
|
-
|
|
2473
|
-
this.clear();
|
|
2474
|
-
while (++index < length) {
|
|
2475
|
-
var entry = entries[index];
|
|
2476
|
-
this.set(entry[0], entry[1]);
|
|
2477
|
-
}
|
|
2478
|
-
}
|
|
2479
|
-
|
|
2480
|
-
/**
|
|
2481
|
-
* Removes all key-value entries from the map.
|
|
2482
|
-
*
|
|
2483
|
-
* @private
|
|
2484
|
-
* @name clear
|
|
2485
|
-
* @memberOf MapCache
|
|
2486
|
-
*/
|
|
2487
|
-
function mapCacheClear() {
|
|
2488
|
-
this.__data__ = {
|
|
2489
|
-
'hash': new Hash,
|
|
2490
|
-
'map': new (Map$1 || ListCache),
|
|
2491
|
-
'string': new Hash
|
|
2492
|
-
};
|
|
2493
|
-
}
|
|
2494
|
-
|
|
2495
|
-
/**
|
|
2496
|
-
* Removes `key` and its value from the map.
|
|
2497
|
-
*
|
|
2498
|
-
* @private
|
|
2499
|
-
* @name delete
|
|
2500
|
-
* @memberOf MapCache
|
|
2501
|
-
* @param {string} key The key of the value to remove.
|
|
2502
|
-
* @returns {boolean} Returns `true` if the entry was removed, else `false`.
|
|
2503
|
-
*/
|
|
2504
|
-
function mapCacheDelete(key) {
|
|
2505
|
-
return getMapData(this, key)['delete'](key);
|
|
2506
|
-
}
|
|
2507
|
-
|
|
2508
|
-
/**
|
|
2509
|
-
* Gets the map value for `key`.
|
|
2510
|
-
*
|
|
2511
|
-
* @private
|
|
2512
|
-
* @name get
|
|
2513
|
-
* @memberOf MapCache
|
|
2514
|
-
* @param {string} key The key of the value to get.
|
|
2515
|
-
* @returns {*} Returns the entry value.
|
|
2516
|
-
*/
|
|
2517
|
-
function mapCacheGet(key) {
|
|
2518
|
-
return getMapData(this, key).get(key);
|
|
2519
|
-
}
|
|
1225
|
+
// Not cached anymore as the arguments changed
|
|
1226
|
+
memoized('bar');
|
|
1227
|
+
//=> 2
|
|
2520
1228
|
|
|
1229
|
+
memoized('bar');
|
|
1230
|
+
//=> 2
|
|
1231
|
+
```
|
|
1232
|
+
*/
|
|
1233
|
+
const mem = (fn, { cacheKey, cache = new Map(), maxAge } = {}) => {
|
|
1234
|
+
if (typeof maxAge === 'number') {
|
|
1235
|
+
// TODO: Drop after https://github.com/SamVerschueren/map-age-cleaner/issues/5
|
|
1236
|
+
// @ts-expect-error
|
|
1237
|
+
dist$1(cache);
|
|
1238
|
+
}
|
|
1239
|
+
const memoized = function (...arguments_) {
|
|
1240
|
+
const key = cacheKey ? cacheKey(arguments_) : arguments_[0];
|
|
1241
|
+
const cacheItem = cache.get(key);
|
|
1242
|
+
if (cacheItem) {
|
|
1243
|
+
return cacheItem.data;
|
|
1244
|
+
}
|
|
1245
|
+
const result = fn.apply(this, arguments_);
|
|
1246
|
+
cache.set(key, {
|
|
1247
|
+
data: result,
|
|
1248
|
+
maxAge: maxAge ? Date.now() + maxAge : Number.POSITIVE_INFINITY
|
|
1249
|
+
});
|
|
1250
|
+
return result;
|
|
1251
|
+
};
|
|
1252
|
+
mimicFn_1(memoized, fn, {
|
|
1253
|
+
ignoreNonConfigurable: true
|
|
1254
|
+
});
|
|
1255
|
+
cacheStore.set(memoized, cache);
|
|
1256
|
+
return memoized;
|
|
1257
|
+
};
|
|
2521
1258
|
/**
|
|
2522
|
-
|
|
2523
|
-
*
|
|
2524
|
-
* @private
|
|
2525
|
-
* @name has
|
|
2526
|
-
* @memberOf MapCache
|
|
2527
|
-
* @param {string} key The key of the entry to check.
|
|
2528
|
-
* @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
|
|
2529
|
-
*/
|
|
2530
|
-
function mapCacheHas(key) {
|
|
2531
|
-
return getMapData(this, key).has(key);
|
|
2532
|
-
}
|
|
1259
|
+
@returns A [decorator](https://github.com/tc39/proposal-decorators) to memoize class methods or static class methods.
|
|
2533
1260
|
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
* @private
|
|
2538
|
-
* @name set
|
|
2539
|
-
* @memberOf MapCache
|
|
2540
|
-
* @param {string} key The key of the value to set.
|
|
2541
|
-
* @param {*} value The value to set.
|
|
2542
|
-
* @returns {Object} Returns the map cache instance.
|
|
2543
|
-
*/
|
|
2544
|
-
function mapCacheSet(key, value) {
|
|
2545
|
-
getMapData(this, key).set(key, value);
|
|
2546
|
-
return this;
|
|
2547
|
-
}
|
|
1261
|
+
@example
|
|
1262
|
+
```
|
|
1263
|
+
import mem = require('mem');
|
|
2548
1264
|
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
MapCache.prototype['delete'] = mapCacheDelete;
|
|
2552
|
-
MapCache.prototype.get = mapCacheGet;
|
|
2553
|
-
MapCache.prototype.has = mapCacheHas;
|
|
2554
|
-
MapCache.prototype.set = mapCacheSet;
|
|
1265
|
+
class Example {
|
|
1266
|
+
index = 0
|
|
2555
1267
|
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
* @private
|
|
2560
|
-
* @param {Array} array The array to inspect.
|
|
2561
|
-
* @param {*} key The key to search for.
|
|
2562
|
-
* @returns {number} Returns the index of the matched value, else `-1`.
|
|
2563
|
-
*/
|
|
2564
|
-
function assocIndexOf(array, key) {
|
|
2565
|
-
var length = array.length;
|
|
2566
|
-
while (length--) {
|
|
2567
|
-
if (eq(array[length][0], key)) {
|
|
2568
|
-
return length;
|
|
1268
|
+
@mem.decorator()
|
|
1269
|
+
counter() {
|
|
1270
|
+
return ++this.index;
|
|
2569
1271
|
}
|
|
2570
|
-
}
|
|
2571
|
-
return -1;
|
|
2572
1272
|
}
|
|
2573
1273
|
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
*
|
|
2577
|
-
* @private
|
|
2578
|
-
* @param {*} value The value to check.
|
|
2579
|
-
* @returns {boolean} Returns `true` if `value` is a native function,
|
|
2580
|
-
* else `false`.
|
|
2581
|
-
*/
|
|
2582
|
-
function baseIsNative(value) {
|
|
2583
|
-
if (!isObject(value) || isMasked(value)) {
|
|
2584
|
-
return false;
|
|
2585
|
-
}
|
|
2586
|
-
var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;
|
|
2587
|
-
return pattern.test(toSource(value));
|
|
2588
|
-
}
|
|
1274
|
+
class ExampleWithOptions {
|
|
1275
|
+
index = 0
|
|
2589
1276
|
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
* @private
|
|
2594
|
-
* @param {Object} map The map to query.
|
|
2595
|
-
* @param {string} key The reference key.
|
|
2596
|
-
* @returns {*} Returns the map data.
|
|
2597
|
-
*/
|
|
2598
|
-
function getMapData(map, key) {
|
|
2599
|
-
var data = map.__data__;
|
|
2600
|
-
return isKeyable(key)
|
|
2601
|
-
? data[typeof key == 'string' ? 'string' : 'hash']
|
|
2602
|
-
: data.map;
|
|
2603
|
-
}
|
|
2604
|
-
|
|
2605
|
-
/**
|
|
2606
|
-
* Gets the native function at `key` of `object`.
|
|
2607
|
-
*
|
|
2608
|
-
* @private
|
|
2609
|
-
* @param {Object} object The object to query.
|
|
2610
|
-
* @param {string} key The key of the method to get.
|
|
2611
|
-
* @returns {*} Returns the function if it's native, else `undefined`.
|
|
2612
|
-
*/
|
|
2613
|
-
function getNative(object, key) {
|
|
2614
|
-
var value = getValue$2(object, key);
|
|
2615
|
-
return baseIsNative(value) ? value : undefined;
|
|
2616
|
-
}
|
|
2617
|
-
|
|
2618
|
-
/**
|
|
2619
|
-
* Checks if `value` is suitable for use as unique object key.
|
|
2620
|
-
*
|
|
2621
|
-
* @private
|
|
2622
|
-
* @param {*} value The value to check.
|
|
2623
|
-
* @returns {boolean} Returns `true` if `value` is suitable, else `false`.
|
|
2624
|
-
*/
|
|
2625
|
-
function isKeyable(value) {
|
|
2626
|
-
var type = typeof value;
|
|
2627
|
-
return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
|
|
2628
|
-
? (value !== '__proto__')
|
|
2629
|
-
: (value === null);
|
|
2630
|
-
}
|
|
2631
|
-
|
|
2632
|
-
/**
|
|
2633
|
-
* Checks if `func` has its source masked.
|
|
2634
|
-
*
|
|
2635
|
-
* @private
|
|
2636
|
-
* @param {Function} func The function to check.
|
|
2637
|
-
* @returns {boolean} Returns `true` if `func` is masked, else `false`.
|
|
2638
|
-
*/
|
|
2639
|
-
function isMasked(func) {
|
|
2640
|
-
return !!maskSrcKey && (maskSrcKey in func);
|
|
2641
|
-
}
|
|
2642
|
-
|
|
2643
|
-
/**
|
|
2644
|
-
* Converts `func` to its source code.
|
|
2645
|
-
*
|
|
2646
|
-
* @private
|
|
2647
|
-
* @param {Function} func The function to process.
|
|
2648
|
-
* @returns {string} Returns the source code.
|
|
2649
|
-
*/
|
|
2650
|
-
function toSource(func) {
|
|
2651
|
-
if (func != null) {
|
|
2652
|
-
try {
|
|
2653
|
-
return funcToString.call(func);
|
|
2654
|
-
} catch (e) {}
|
|
2655
|
-
try {
|
|
2656
|
-
return (func + '');
|
|
2657
|
-
} catch (e) {}
|
|
2658
|
-
}
|
|
2659
|
-
return '';
|
|
2660
|
-
}
|
|
2661
|
-
|
|
2662
|
-
/**
|
|
2663
|
-
* Creates a function that memoizes the result of `func`. If `resolver` is
|
|
2664
|
-
* provided, it determines the cache key for storing the result based on the
|
|
2665
|
-
* arguments provided to the memoized function. By default, the first argument
|
|
2666
|
-
* provided to the memoized function is used as the map cache key. The `func`
|
|
2667
|
-
* is invoked with the `this` binding of the memoized function.
|
|
2668
|
-
*
|
|
2669
|
-
* **Note:** The cache is exposed as the `cache` property on the memoized
|
|
2670
|
-
* function. Its creation may be customized by replacing the `_.memoize.Cache`
|
|
2671
|
-
* constructor with one whose instances implement the
|
|
2672
|
-
* [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)
|
|
2673
|
-
* method interface of `delete`, `get`, `has`, and `set`.
|
|
2674
|
-
*
|
|
2675
|
-
* @static
|
|
2676
|
-
* @memberOf _
|
|
2677
|
-
* @since 0.1.0
|
|
2678
|
-
* @category Function
|
|
2679
|
-
* @param {Function} func The function to have its output memoized.
|
|
2680
|
-
* @param {Function} [resolver] The function to resolve the cache key.
|
|
2681
|
-
* @returns {Function} Returns the new memoized function.
|
|
2682
|
-
* @example
|
|
2683
|
-
*
|
|
2684
|
-
* var object = { 'a': 1, 'b': 2 };
|
|
2685
|
-
* var other = { 'c': 3, 'd': 4 };
|
|
2686
|
-
*
|
|
2687
|
-
* var values = _.memoize(_.values);
|
|
2688
|
-
* values(object);
|
|
2689
|
-
* // => [1, 2]
|
|
2690
|
-
*
|
|
2691
|
-
* values(other);
|
|
2692
|
-
* // => [3, 4]
|
|
2693
|
-
*
|
|
2694
|
-
* object.a = 2;
|
|
2695
|
-
* values(object);
|
|
2696
|
-
* // => [1, 2]
|
|
2697
|
-
*
|
|
2698
|
-
* // Modify the result cache.
|
|
2699
|
-
* values.cache.set(object, ['a', 'b']);
|
|
2700
|
-
* values(object);
|
|
2701
|
-
* // => ['a', 'b']
|
|
2702
|
-
*
|
|
2703
|
-
* // Replace `_.memoize.Cache`.
|
|
2704
|
-
* _.memoize.Cache = WeakMap;
|
|
2705
|
-
*/
|
|
2706
|
-
function memoize(func, resolver) {
|
|
2707
|
-
if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {
|
|
2708
|
-
throw new TypeError(FUNC_ERROR_TEXT);
|
|
2709
|
-
}
|
|
2710
|
-
var memoized = function() {
|
|
2711
|
-
var args = arguments,
|
|
2712
|
-
key = resolver ? resolver.apply(this, args) : args[0],
|
|
2713
|
-
cache = memoized.cache;
|
|
2714
|
-
|
|
2715
|
-
if (cache.has(key)) {
|
|
2716
|
-
return cache.get(key);
|
|
1277
|
+
@mem.decorator({maxAge: 1000})
|
|
1278
|
+
counter() {
|
|
1279
|
+
return ++this.index;
|
|
2717
1280
|
}
|
|
2718
|
-
var result = func.apply(this, args);
|
|
2719
|
-
memoized.cache = cache.set(key, result);
|
|
2720
|
-
return result;
|
|
2721
|
-
};
|
|
2722
|
-
memoized.cache = new (memoize.Cache || MapCache);
|
|
2723
|
-
return memoized;
|
|
2724
|
-
}
|
|
2725
|
-
|
|
2726
|
-
// Assign cache to `_.memoize`.
|
|
2727
|
-
memoize.Cache = MapCache;
|
|
2728
|
-
|
|
2729
|
-
/**
|
|
2730
|
-
* Performs a
|
|
2731
|
-
* [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
|
|
2732
|
-
* comparison between two values to determine if they are equivalent.
|
|
2733
|
-
*
|
|
2734
|
-
* @static
|
|
2735
|
-
* @memberOf _
|
|
2736
|
-
* @since 4.0.0
|
|
2737
|
-
* @category Lang
|
|
2738
|
-
* @param {*} value The value to compare.
|
|
2739
|
-
* @param {*} other The other value to compare.
|
|
2740
|
-
* @returns {boolean} Returns `true` if the values are equivalent, else `false`.
|
|
2741
|
-
* @example
|
|
2742
|
-
*
|
|
2743
|
-
* var object = { 'a': 1 };
|
|
2744
|
-
* var other = { 'a': 1 };
|
|
2745
|
-
*
|
|
2746
|
-
* _.eq(object, object);
|
|
2747
|
-
* // => true
|
|
2748
|
-
*
|
|
2749
|
-
* _.eq(object, other);
|
|
2750
|
-
* // => false
|
|
2751
|
-
*
|
|
2752
|
-
* _.eq('a', 'a');
|
|
2753
|
-
* // => true
|
|
2754
|
-
*
|
|
2755
|
-
* _.eq('a', Object('a'));
|
|
2756
|
-
* // => false
|
|
2757
|
-
*
|
|
2758
|
-
* _.eq(NaN, NaN);
|
|
2759
|
-
* // => true
|
|
2760
|
-
*/
|
|
2761
|
-
function eq(value, other) {
|
|
2762
|
-
return value === other || (value !== value && other !== other);
|
|
2763
|
-
}
|
|
2764
|
-
|
|
2765
|
-
/**
|
|
2766
|
-
* Checks if `value` is classified as a `Function` object.
|
|
2767
|
-
*
|
|
2768
|
-
* @static
|
|
2769
|
-
* @memberOf _
|
|
2770
|
-
* @since 0.1.0
|
|
2771
|
-
* @category Lang
|
|
2772
|
-
* @param {*} value The value to check.
|
|
2773
|
-
* @returns {boolean} Returns `true` if `value` is a function, else `false`.
|
|
2774
|
-
* @example
|
|
2775
|
-
*
|
|
2776
|
-
* _.isFunction(_);
|
|
2777
|
-
* // => true
|
|
2778
|
-
*
|
|
2779
|
-
* _.isFunction(/abc/);
|
|
2780
|
-
* // => false
|
|
2781
|
-
*/
|
|
2782
|
-
function isFunction(value) {
|
|
2783
|
-
// The use of `Object#toString` avoids issues with the `typeof` operator
|
|
2784
|
-
// in Safari 8-9 which returns 'object' for typed array and other constructors.
|
|
2785
|
-
var tag = isObject(value) ? objectToString.call(value) : '';
|
|
2786
|
-
return tag == funcTag || tag == genTag;
|
|
2787
1281
|
}
|
|
2788
|
-
|
|
1282
|
+
```
|
|
1283
|
+
*/
|
|
1284
|
+
mem.decorator = (options = {}) => (target, propertyKey, descriptor) => {
|
|
1285
|
+
const input = target[propertyKey];
|
|
1286
|
+
if (typeof input !== 'function') {
|
|
1287
|
+
throw new TypeError('The decorated value must be a function');
|
|
1288
|
+
}
|
|
1289
|
+
delete descriptor.value;
|
|
1290
|
+
delete descriptor.writable;
|
|
1291
|
+
descriptor.get = function () {
|
|
1292
|
+
if (!decoratorInstanceMap.has(this)) {
|
|
1293
|
+
const value = mem(input, options);
|
|
1294
|
+
decoratorInstanceMap.set(this, value);
|
|
1295
|
+
return value;
|
|
1296
|
+
}
|
|
1297
|
+
return decoratorInstanceMap.get(this);
|
|
1298
|
+
};
|
|
1299
|
+
};
|
|
2789
1300
|
/**
|
|
2790
|
-
|
|
2791
|
-
* [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
|
|
2792
|
-
* of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
|
|
2793
|
-
*
|
|
2794
|
-
* @static
|
|
2795
|
-
* @memberOf _
|
|
2796
|
-
* @since 0.1.0
|
|
2797
|
-
* @category Lang
|
|
2798
|
-
* @param {*} value The value to check.
|
|
2799
|
-
* @returns {boolean} Returns `true` if `value` is an object, else `false`.
|
|
2800
|
-
* @example
|
|
2801
|
-
*
|
|
2802
|
-
* _.isObject({});
|
|
2803
|
-
* // => true
|
|
2804
|
-
*
|
|
2805
|
-
* _.isObject([1, 2, 3]);
|
|
2806
|
-
* // => true
|
|
2807
|
-
*
|
|
2808
|
-
* _.isObject(_.noop);
|
|
2809
|
-
* // => true
|
|
2810
|
-
*
|
|
2811
|
-
* _.isObject(null);
|
|
2812
|
-
* // => false
|
|
2813
|
-
*/
|
|
2814
|
-
function isObject(value) {
|
|
2815
|
-
var type = typeof value;
|
|
2816
|
-
return !!value && (type == 'object' || type == 'function');
|
|
2817
|
-
}
|
|
2818
|
-
|
|
2819
|
-
var lodash_memoize = memoize;
|
|
1301
|
+
Clear all cached data of a memoized function.
|
|
2820
1302
|
|
|
2821
|
-
|
|
1303
|
+
@param fn - Memoized function.
|
|
1304
|
+
*/
|
|
1305
|
+
mem.clear = (fn) => {
|
|
1306
|
+
const cache = cacheStore.get(fn);
|
|
1307
|
+
if (!cache) {
|
|
1308
|
+
throw new TypeError('Can\'t clear a function that was not memoized!');
|
|
1309
|
+
}
|
|
1310
|
+
if (typeof cache.clear !== 'function') {
|
|
1311
|
+
throw new TypeError('The cache Map can\'t be cleared!');
|
|
1312
|
+
}
|
|
1313
|
+
cache.clear();
|
|
1314
|
+
};
|
|
1315
|
+
var dist = mem;
|
|
2822
1316
|
|
|
2823
|
-
function resolver(options) {
|
|
2824
|
-
return JSON.stringify(options);
|
|
2825
|
-
}
|
|
2826
1317
|
function isString(el) {
|
|
2827
1318
|
return typeof el === 'string';
|
|
2828
1319
|
}
|
|
@@ -2878,11 +1369,11 @@ function getUserLocalesInternal(_a) {
|
|
|
2878
1369
|
}
|
|
2879
1370
|
return languageList.filter(isString).map(normalizeLocale).filter(isUnique);
|
|
2880
1371
|
}
|
|
2881
|
-
var getUserLocales =
|
|
1372
|
+
var getUserLocales = dist(getUserLocalesInternal, { cacheKey: JSON.stringify });
|
|
2882
1373
|
function getUserLocaleInternal(options) {
|
|
2883
1374
|
return getUserLocales(options)[0] || null;
|
|
2884
1375
|
}
|
|
2885
|
-
var getUserLocale =
|
|
1376
|
+
var getUserLocale = dist(getUserLocaleInternal, { cacheKey: JSON.stringify });
|
|
2886
1377
|
|
|
2887
1378
|
/**
|
|
2888
1379
|
* Utils
|
|
@@ -3232,21 +1723,14 @@ function getDaysInMonth(date) {
|
|
|
3232
1723
|
return getDate(getMonthEnd(date));
|
|
3233
1724
|
}
|
|
3234
1725
|
|
|
3235
|
-
var _a$1;
|
|
3236
1726
|
var CALENDAR_TYPES = {
|
|
3237
1727
|
GREGORY: 'gregory',
|
|
3238
1728
|
HEBREW: 'hebrew',
|
|
3239
1729
|
ISLAMIC: 'islamic',
|
|
3240
1730
|
ISO_8601: 'iso8601',
|
|
3241
1731
|
};
|
|
3242
|
-
var
|
|
3243
|
-
|
|
3244
|
-
HEBREW: 'Hebrew',
|
|
3245
|
-
ISO_8601: 'ISO 8601',
|
|
3246
|
-
US: 'US',
|
|
3247
|
-
};
|
|
3248
|
-
var CALENDAR_TYPE_LOCALES = (_a$1 = {},
|
|
3249
|
-
_a$1[CALENDAR_TYPES.GREGORY] = [
|
|
1732
|
+
var CALENDAR_TYPE_LOCALES = {
|
|
1733
|
+
gregory: [
|
|
3250
1734
|
'en-CA',
|
|
3251
1735
|
'en-US',
|
|
3252
1736
|
'es-AR',
|
|
@@ -3267,8 +1751,8 @@ var CALENDAR_TYPE_LOCALES = (_a$1 = {},
|
|
|
3267
1751
|
'es-VE',
|
|
3268
1752
|
'pt-BR',
|
|
3269
1753
|
],
|
|
3270
|
-
|
|
3271
|
-
|
|
1754
|
+
hebrew: ['he', 'he-IL'],
|
|
1755
|
+
islamic: [
|
|
3272
1756
|
// ar-LB, ar-MA intentionally missing
|
|
3273
1757
|
'ar',
|
|
3274
1758
|
'ar-AE',
|
|
@@ -3290,7 +1774,7 @@ var CALENDAR_TYPE_LOCALES = (_a$1 = {},
|
|
|
3290
1774
|
'ps',
|
|
3291
1775
|
'ps-AR',
|
|
3292
1776
|
],
|
|
3293
|
-
|
|
1777
|
+
};
|
|
3294
1778
|
var WEEKDAYS = [0, 1, 2, 3, 4, 5, 6];
|
|
3295
1779
|
|
|
3296
1780
|
var formatterCache = new Map();
|
|
@@ -3621,8 +2105,7 @@ function getValueRange(rangeType, date1, date2) {
|
|
|
3621
2105
|
return [getBegin(rangeType, rawNextValue[0]), getEnd(rangeType, rawNextValue[1])];
|
|
3622
2106
|
}
|
|
3623
2107
|
function toYearLabel(locale, formatYear$1, dates) {
|
|
3624
|
-
|
|
3625
|
-
return dates.map(function (date) { return formatYear$1(locale, date); }).join(' – ');
|
|
2108
|
+
return dates.map(function (date) { return (formatYear$1 || formatYear)(locale, date); }).join(' – ');
|
|
3626
2109
|
}
|
|
3627
2110
|
/**
|
|
3628
2111
|
* @callback FormatYear
|
|
@@ -3753,18 +2236,9 @@ function Navigation(_a) {
|
|
|
3753
2236
|
}
|
|
3754
2237
|
function renderButton() {
|
|
3755
2238
|
var labelClassName = "".concat(className$6, "__label");
|
|
3756
|
-
return (
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
React.createElement("span", { className: "".concat(labelClassName, "__divider") }, " \u2013 "),
|
|
3760
|
-
React.createElement("span", { className: "".concat(labelClassName, "__labelText ").concat(labelClassName, "__labelText--to") }, renderLabel(nextActiveStartDate)))) : null));
|
|
3761
|
-
}
|
|
3762
|
-
return (React.createElement("div", { className: className$6 },
|
|
3763
|
-
prev2Label !== null && shouldShowPrevNext2Buttons ? (React.createElement("button", { "aria-label": prev2AriaLabel, className: "".concat(className$6, "__arrow ").concat(className$6, "__prev2-button"), disabled: prev2ButtonDisabled, onClick: onClickPrevious2, type: "button" }, prev2Label)) : null,
|
|
3764
|
-
prevLabel !== null && (React.createElement("button", { "aria-label": prevAriaLabel, className: "".concat(className$6, "__arrow ").concat(className$6, "__prev-button"), disabled: prevButtonDisabled, onClick: onClickPrevious, type: "button" }, prevLabel)),
|
|
3765
|
-
renderButton(),
|
|
3766
|
-
nextLabel !== null && (React.createElement("button", { "aria-label": nextAriaLabel, className: "".concat(className$6, "__arrow ").concat(className$6, "__next-button"), disabled: nextButtonDisabled, onClick: onClickNext, type: "button" }, nextLabel)),
|
|
3767
|
-
next2Label !== null && shouldShowPrevNext2Buttons ? (React.createElement("button", { "aria-label": next2AriaLabel, className: "".concat(className$6, "__arrow ").concat(className$6, "__next2-button"), disabled: next2ButtonDisabled, onClick: onClickNext2, type: "button" }, next2Label)) : null));
|
|
2239
|
+
return (jsxRuntime.jsxs("button", { "aria-label": navigationAriaLabel, "aria-live": navigationAriaLive, className: labelClassName, disabled: !drillUpAvailable, onClick: drillUp, style: { flexGrow: 1 }, type: "button", children: [jsxRuntime.jsx("span", { className: "".concat(labelClassName, "__labelText ").concat(labelClassName, "__labelText--from"), children: renderLabel(activeStartDate) }), showDoubleView ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { className: "".concat(labelClassName, "__divider"), children: " \u2013 " }), jsxRuntime.jsx("span", { className: "".concat(labelClassName, "__labelText ").concat(labelClassName, "__labelText--to"), children: renderLabel(nextActiveStartDate) })] })) : null] }));
|
|
2240
|
+
}
|
|
2241
|
+
return (jsxRuntime.jsxs("div", { className: className$6, children: [prev2Label !== null && shouldShowPrevNext2Buttons ? (jsxRuntime.jsx("button", { "aria-label": prev2AriaLabel, className: "".concat(className$6, "__arrow ").concat(className$6, "__prev2-button"), disabled: prev2ButtonDisabled, onClick: onClickPrevious2, type: "button", children: prev2Label })) : null, prevLabel !== null && (jsxRuntime.jsx("button", { "aria-label": prevAriaLabel, className: "".concat(className$6, "__arrow ").concat(className$6, "__prev-button"), disabled: prevButtonDisabled, onClick: onClickPrevious, type: "button", children: prevLabel })), renderButton(), nextLabel !== null && (jsxRuntime.jsx("button", { "aria-label": nextAriaLabel, className: "".concat(className$6, "__arrow ").concat(className$6, "__next-button"), disabled: nextButtonDisabled, onClick: onClickNext, type: "button", children: nextLabel })), next2Label !== null && shouldShowPrevNext2Buttons ? (jsxRuntime.jsx("button", { "aria-label": next2AriaLabel, className: "".concat(className$6, "__arrow ").concat(className$6, "__next2-button"), disabled: next2ButtonDisabled, onClick: onClickNext2, type: "button", children: next2Label })) : null] }));
|
|
3768
2242
|
}
|
|
3769
2243
|
|
|
3770
2244
|
var __assign$e = (undefined && undefined.__assign) || function () {
|
|
@@ -3794,40 +2268,20 @@ function toPercent(num) {
|
|
|
3794
2268
|
}
|
|
3795
2269
|
function Flex(_a) {
|
|
3796
2270
|
var children = _a.children, className = _a.className, count = _a.count, direction = _a.direction, offset = _a.offset, style = _a.style, wrap = _a.wrap, otherProps = __rest$a(_a, ["children", "className", "count", "direction", "offset", "style", "wrap"]);
|
|
3797
|
-
return (
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3801
|
-
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
3807
|
-
|
|
3808
|
-
|
|
2271
|
+
return (jsxRuntime.jsx("div", __assign$e({ className: className, style: __assign$e({ display: 'flex', flexDirection: direction, flexWrap: wrap ? 'wrap' : 'nowrap' }, style) }, otherProps, { children: React.Children.map(children, function (child, index) {
|
|
2272
|
+
var marginInlineStart = offset && index === 0 ? toPercent((100 * offset) / count) : null;
|
|
2273
|
+
return React.cloneElement(child, __assign$e(__assign$e({}, child.props), { style: {
|
|
2274
|
+
flexBasis: toPercent(100 / count),
|
|
2275
|
+
flexShrink: 0,
|
|
2276
|
+
flexGrow: 0,
|
|
2277
|
+
overflow: 'hidden',
|
|
2278
|
+
marginLeft: marginInlineStart,
|
|
2279
|
+
marginInlineStart: marginInlineStart,
|
|
2280
|
+
marginInlineEnd: 0,
|
|
2281
|
+
} }));
|
|
2282
|
+
}) })));
|
|
3809
2283
|
}
|
|
3810
2284
|
|
|
3811
|
-
var isProduction = process.env.NODE_ENV === 'production';
|
|
3812
|
-
function warning(condition, message) {
|
|
3813
|
-
if (!isProduction) {
|
|
3814
|
-
if (condition) {
|
|
3815
|
-
return;
|
|
3816
|
-
}
|
|
3817
|
-
|
|
3818
|
-
var text = "Warning: " + message;
|
|
3819
|
-
|
|
3820
|
-
if (typeof console !== 'undefined') {
|
|
3821
|
-
console.warn(text);
|
|
3822
|
-
}
|
|
3823
|
-
|
|
3824
|
-
try {
|
|
3825
|
-
throw Error(text);
|
|
3826
|
-
} catch (x) {}
|
|
3827
|
-
}
|
|
3828
|
-
}
|
|
3829
|
-
|
|
3830
|
-
var _a;
|
|
3831
2285
|
/**
|
|
3832
2286
|
* Returns a value no smaller than min and no larger than max.
|
|
3833
2287
|
*
|
|
@@ -3932,25 +2386,6 @@ function getTileClasses(args) {
|
|
|
3932
2386
|
}
|
|
3933
2387
|
return classes;
|
|
3934
2388
|
}
|
|
3935
|
-
var calendarTypeMap = (_a = {},
|
|
3936
|
-
_a[DEPRECATED_CALENDAR_TYPES.ARABIC] = CALENDAR_TYPES.ISLAMIC,
|
|
3937
|
-
_a[DEPRECATED_CALENDAR_TYPES.HEBREW] = CALENDAR_TYPES.HEBREW,
|
|
3938
|
-
_a[DEPRECATED_CALENDAR_TYPES.ISO_8601] = CALENDAR_TYPES.ISO_8601,
|
|
3939
|
-
_a[DEPRECATED_CALENDAR_TYPES.US] = CALENDAR_TYPES.GREGORY,
|
|
3940
|
-
_a);
|
|
3941
|
-
function isDeprecatedCalendarType(calendarType) {
|
|
3942
|
-
return calendarType !== undefined && calendarType in DEPRECATED_CALENDAR_TYPES;
|
|
3943
|
-
}
|
|
3944
|
-
var warned = false;
|
|
3945
|
-
function mapCalendarType(calendarTypeOrDeprecatedCalendarType) {
|
|
3946
|
-
if (isDeprecatedCalendarType(calendarTypeOrDeprecatedCalendarType)) {
|
|
3947
|
-
var calendarType = calendarTypeMap[calendarTypeOrDeprecatedCalendarType];
|
|
3948
|
-
warning(warned, "Specifying calendarType=\"".concat(calendarTypeOrDeprecatedCalendarType, "\" is deprecated. Use calendarType=\"").concat(calendarType, "\" instead."));
|
|
3949
|
-
warned = true;
|
|
3950
|
-
return calendarType;
|
|
3951
|
-
}
|
|
3952
|
-
return calendarTypeOrDeprecatedCalendarType;
|
|
3953
|
-
}
|
|
3954
2389
|
|
|
3955
2390
|
function TileGroup(_a) {
|
|
3956
2391
|
var className = _a.className, _b = _a.count, count = _b === void 0 ? 3 : _b, dateTransform = _a.dateTransform, dateType = _a.dateType, end = _a.end, hover = _a.hover, offset = _a.offset, renderTile = _a.renderTile, start = _a.start, _c = _a.step, step = _c === void 0 ? 1 : _c, value = _a.value, valueType = _a.valueType;
|
|
@@ -3968,7 +2403,7 @@ function TileGroup(_a) {
|
|
|
3968
2403
|
date: date,
|
|
3969
2404
|
}));
|
|
3970
2405
|
}
|
|
3971
|
-
return (
|
|
2406
|
+
return (jsxRuntime.jsx(Flex, { className: className, count: count, offset: offset, wrap: true, children: tiles }));
|
|
3972
2407
|
}
|
|
3973
2408
|
|
|
3974
2409
|
function Tile(props) {
|
|
@@ -3981,11 +2416,9 @@ function Tile(props) {
|
|
|
3981
2416
|
var args = { activeStartDate: activeStartDate, date: date, view: view };
|
|
3982
2417
|
return typeof tileContentProps === 'function' ? tileContentProps(args) : tileContentProps;
|
|
3983
2418
|
}, [activeStartDate, date, tileContentProps, view]);
|
|
3984
|
-
return (
|
|
2419
|
+
return (jsxRuntime.jsxs("button", { className: clsx(classes, tileClassName), disabled: (minDate && minDateTransform(minDate) > date) ||
|
|
3985
2420
|
(maxDate && maxDateTransform(maxDate) < date) ||
|
|
3986
|
-
(tileDisabled
|
|
3987
|
-
formatAbbr ? React.createElement("abbr", { "aria-label": formatAbbr(locale, date) }, children) : children,
|
|
3988
|
-
tileContent));
|
|
2421
|
+
(tileDisabled === null || tileDisabled === void 0 ? void 0 : tileDisabled({ activeStartDate: activeStartDate, date: date, view: view })), onClick: onClick ? function (event) { return onClick(date, event); } : undefined, onFocus: onMouseOver ? function () { return onMouseOver(date); } : undefined, onMouseOver: onMouseOver ? function () { return onMouseOver(date); } : undefined, style: style, type: "button", children: [formatAbbr ? jsxRuntime.jsx("abbr", { "aria-label": formatAbbr(locale, date), children: children }) : children, tileContent] }));
|
|
3989
2422
|
}
|
|
3990
2423
|
|
|
3991
2424
|
var __assign$d = (undefined && undefined.__assign) || function () {
|
|
@@ -4010,20 +2443,21 @@ var __rest$9 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4010
2443
|
}
|
|
4011
2444
|
return t;
|
|
4012
2445
|
};
|
|
4013
|
-
var __spreadArray$3 = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
|
4014
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4015
|
-
if (ar || !(i in from)) {
|
|
4016
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
4017
|
-
ar[i] = from[i];
|
|
4018
|
-
}
|
|
4019
|
-
}
|
|
4020
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
4021
|
-
};
|
|
4022
2446
|
var className$5 = 'react-calendar__century-view__decades__decade';
|
|
4023
2447
|
function Decade(_a) {
|
|
4024
|
-
var _b = _a.classes, classes = _b === void 0 ? [] : _b, _c = _a.formatYear, formatYear$1 = _c === void 0 ? formatYear : _c, otherProps = __rest$9(_a, ["classes", "formatYear"]);
|
|
2448
|
+
var _b = _a.classes, classes = _b === void 0 ? [] : _b, currentCentury = _a.currentCentury, _c = _a.formatYear, formatYear$1 = _c === void 0 ? formatYear : _c, otherProps = __rest$9(_a, ["classes", "currentCentury", "formatYear"]);
|
|
4025
2449
|
var date = otherProps.date, locale = otherProps.locale;
|
|
4026
|
-
|
|
2450
|
+
var classesProps = [];
|
|
2451
|
+
if (classes) {
|
|
2452
|
+
classesProps.push.apply(classesProps, classes);
|
|
2453
|
+
}
|
|
2454
|
+
{
|
|
2455
|
+
classesProps.push(className$5);
|
|
2456
|
+
}
|
|
2457
|
+
if (getCenturyStart(date).getFullYear() !== currentCentury) {
|
|
2458
|
+
classesProps.push("".concat(className$5, "--neighboringCentury"));
|
|
2459
|
+
}
|
|
2460
|
+
return (jsxRuntime.jsx(Tile, __assign$d({}, otherProps, { classes: classesProps, maxDateTransform: getDecadeEnd, minDateTransform: getDecadeStart, view: "century", children: getDecadeLabel(locale, formatYear$1, date) })));
|
|
4027
2461
|
}
|
|
4028
2462
|
|
|
4029
2463
|
var __assign$c = (undefined && undefined.__assign) || function () {
|
|
@@ -4049,121 +2483,15 @@ var __rest$8 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4049
2483
|
return t;
|
|
4050
2484
|
};
|
|
4051
2485
|
function Decades(props) {
|
|
4052
|
-
var activeStartDate = props.activeStartDate, hover = props.hover, value = props.value, valueType = props.valueType, otherProps = __rest$8(props, ["activeStartDate", "hover", "value", "valueType"]);
|
|
2486
|
+
var activeStartDate = props.activeStartDate, hover = props.hover, showNeighboringCentury = props.showNeighboringCentury, value = props.value, valueType = props.valueType, otherProps = __rest$8(props, ["activeStartDate", "hover", "showNeighboringCentury", "value", "valueType"]);
|
|
4053
2487
|
var start = getBeginOfCenturyYear(activeStartDate);
|
|
4054
|
-
var end = start + 99;
|
|
4055
|
-
return (
|
|
2488
|
+
var end = start + (showNeighboringCentury ? 119 : 99);
|
|
2489
|
+
return (jsxRuntime.jsx(TileGroup, { className: "react-calendar__century-view__decades", dateTransform: getDecadeStart, dateType: "decade", end: end, hover: hover, renderTile: function (_a) {
|
|
4056
2490
|
var date = _a.date, otherTileProps = __rest$8(_a, ["date"]);
|
|
4057
|
-
return (
|
|
2491
|
+
return (jsxRuntime.jsx(Decade, __assign$c({}, otherProps, otherTileProps, { activeStartDate: activeStartDate, currentCentury: start, date: date }), date.getTime()));
|
|
4058
2492
|
}, start: start, step: 10, value: value, valueType: valueType }));
|
|
4059
2493
|
}
|
|
4060
2494
|
|
|
4061
|
-
var __spreadArray$2 = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
|
4062
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4063
|
-
if (ar || !(i in from)) {
|
|
4064
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
4065
|
-
ar[i] = from[i];
|
|
4066
|
-
}
|
|
4067
|
-
}
|
|
4068
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
4069
|
-
};
|
|
4070
|
-
var calendarTypes = Object.values(CALENDAR_TYPES);
|
|
4071
|
-
var deprecatedCalendarTypes = Object.values(DEPRECATED_CALENDAR_TYPES);
|
|
4072
|
-
var allViews$1 = ['century', 'decade', 'year', 'month'];
|
|
4073
|
-
var isCalendarType = PropTypes.oneOf(__spreadArray$2(__spreadArray$2([], calendarTypes, true), deprecatedCalendarTypes, true));
|
|
4074
|
-
var isClassName = PropTypes.oneOfType([
|
|
4075
|
-
PropTypes.string,
|
|
4076
|
-
PropTypes.arrayOf(PropTypes.string),
|
|
4077
|
-
]);
|
|
4078
|
-
var isMinDate = function isMinDate(props, propName, componentName) {
|
|
4079
|
-
var _a = props, _b = propName, minDate = _a[_b];
|
|
4080
|
-
if (!minDate) {
|
|
4081
|
-
return null;
|
|
4082
|
-
}
|
|
4083
|
-
if (!(minDate instanceof Date)) {
|
|
4084
|
-
return new Error("Invalid prop `".concat(propName, "` of type `").concat(typeof minDate, "` supplied to `").concat(componentName, "`, expected instance of `Date`."));
|
|
4085
|
-
}
|
|
4086
|
-
var maxDate = props.maxDate;
|
|
4087
|
-
if (maxDate && minDate > maxDate) {
|
|
4088
|
-
return new Error("Invalid prop `".concat(propName, "` of type `").concat(typeof minDate, "` supplied to `").concat(componentName, "`, minDate cannot be larger than maxDate."));
|
|
4089
|
-
}
|
|
4090
|
-
return null;
|
|
4091
|
-
};
|
|
4092
|
-
var isMaxDate = function isMaxDate(props, propName, componentName) {
|
|
4093
|
-
var _a = props, _b = propName, maxDate = _a[_b];
|
|
4094
|
-
if (!maxDate) {
|
|
4095
|
-
return null;
|
|
4096
|
-
}
|
|
4097
|
-
if (!(maxDate instanceof Date)) {
|
|
4098
|
-
return new Error("Invalid prop `".concat(propName, "` of type `").concat(typeof maxDate, "` supplied to `").concat(componentName, "`, expected instance of `Date`."));
|
|
4099
|
-
}
|
|
4100
|
-
var minDate = props.minDate;
|
|
4101
|
-
if (minDate && maxDate < minDate) {
|
|
4102
|
-
return new Error("Invalid prop `".concat(propName, "` of type `").concat(typeof maxDate, "` supplied to `").concat(componentName, "`, maxDate cannot be smaller than minDate."));
|
|
4103
|
-
}
|
|
4104
|
-
return null;
|
|
4105
|
-
};
|
|
4106
|
-
var isRef = PropTypes.oneOfType([
|
|
4107
|
-
PropTypes.func,
|
|
4108
|
-
PropTypes.exact({
|
|
4109
|
-
current: PropTypes.any,
|
|
4110
|
-
}),
|
|
4111
|
-
]);
|
|
4112
|
-
var isRange = PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.instanceOf(Date), PropTypes.oneOf([null])]).isRequired);
|
|
4113
|
-
var isValue$1 = PropTypes.oneOfType([
|
|
4114
|
-
PropTypes.instanceOf(Date),
|
|
4115
|
-
PropTypes.oneOf([null]),
|
|
4116
|
-
isRange,
|
|
4117
|
-
]);
|
|
4118
|
-
PropTypes.arrayOf(PropTypes.oneOf(allViews$1));
|
|
4119
|
-
var isView = function isView(props, propName, componentName) {
|
|
4120
|
-
var _a = props, _b = propName, view = _a[_b];
|
|
4121
|
-
if (view !== undefined && (typeof view !== 'string' || allViews$1.indexOf(view) === -1)) {
|
|
4122
|
-
return new Error("Invalid prop `".concat(propName, "` of value `").concat(view, "` supplied to `").concat(componentName, "`, expected one of [").concat(allViews$1
|
|
4123
|
-
.map(function (a) { return "\"".concat(a, "\""); })
|
|
4124
|
-
.join(', '), "]."));
|
|
4125
|
-
}
|
|
4126
|
-
// Everything is fine
|
|
4127
|
-
return null;
|
|
4128
|
-
};
|
|
4129
|
-
isView.isRequired = function isViewIsRequired(props, propName, componentName, location, propFullName) {
|
|
4130
|
-
var _a = props, _b = propName, view = _a[_b];
|
|
4131
|
-
if (!view) {
|
|
4132
|
-
return new Error("The prop `".concat(propName, "` is marked as required in `").concat(componentName, "`, but its value is `").concat(view, "`."));
|
|
4133
|
-
}
|
|
4134
|
-
return isView(props, propName, componentName);
|
|
4135
|
-
};
|
|
4136
|
-
var rangeOf = function (type) {
|
|
4137
|
-
return PropTypes.arrayOf(type);
|
|
4138
|
-
};
|
|
4139
|
-
var tileGroupProps = {
|
|
4140
|
-
activeStartDate: PropTypes.instanceOf(Date).isRequired,
|
|
4141
|
-
hover: PropTypes.instanceOf(Date),
|
|
4142
|
-
locale: PropTypes.string,
|
|
4143
|
-
maxDate: isMaxDate,
|
|
4144
|
-
minDate: isMinDate,
|
|
4145
|
-
onClick: PropTypes.func,
|
|
4146
|
-
onMouseOver: PropTypes.func,
|
|
4147
|
-
tileClassName: PropTypes.oneOfType([PropTypes.func, isClassName]),
|
|
4148
|
-
tileContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
|
|
4149
|
-
value: isValue$1,
|
|
4150
|
-
valueType: PropTypes.oneOf(['century', 'decade', 'year', 'month', 'day']).isRequired,
|
|
4151
|
-
};
|
|
4152
|
-
({
|
|
4153
|
-
activeStartDate: PropTypes.instanceOf(Date).isRequired,
|
|
4154
|
-
classes: PropTypes.arrayOf(PropTypes.string.isRequired).isRequired,
|
|
4155
|
-
date: PropTypes.instanceOf(Date).isRequired,
|
|
4156
|
-
locale: PropTypes.string,
|
|
4157
|
-
maxDate: isMaxDate,
|
|
4158
|
-
minDate: isMinDate,
|
|
4159
|
-
onClick: PropTypes.func,
|
|
4160
|
-
onMouseOver: PropTypes.func,
|
|
4161
|
-
style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])),
|
|
4162
|
-
tileClassName: PropTypes.oneOfType([PropTypes.func, isClassName]),
|
|
4163
|
-
tileContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
|
|
4164
|
-
tileDisabled: PropTypes.func,
|
|
4165
|
-
});
|
|
4166
|
-
|
|
4167
2495
|
var __assign$b = (undefined && undefined.__assign) || function () {
|
|
4168
2496
|
__assign$b = Object.assign || function(t) {
|
|
4169
2497
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
@@ -4175,14 +2503,15 @@ var __assign$b = (undefined && undefined.__assign) || function () {
|
|
|
4175
2503
|
};
|
|
4176
2504
|
return __assign$b.apply(this, arguments);
|
|
4177
2505
|
};
|
|
4178
|
-
|
|
2506
|
+
/**
|
|
2507
|
+
* Displays a given century.
|
|
2508
|
+
*/
|
|
2509
|
+
function CenturyView(props) {
|
|
4179
2510
|
function renderDecades() {
|
|
4180
|
-
return
|
|
2511
|
+
return jsxRuntime.jsx(Decades, __assign$b({}, props));
|
|
4181
2512
|
}
|
|
4182
|
-
return
|
|
4183
|
-
}
|
|
4184
|
-
CenturyView.propTypes = __assign$b({}, tileGroupProps);
|
|
4185
|
-
var CenturyView$1 = CenturyView;
|
|
2513
|
+
return jsxRuntime.jsx("div", { className: "react-calendar__century-view", children: renderDecades() });
|
|
2514
|
+
}
|
|
4186
2515
|
|
|
4187
2516
|
var __assign$a = (undefined && undefined.__assign) || function () {
|
|
4188
2517
|
__assign$a = Object.assign || function(t) {
|
|
@@ -4206,20 +2535,21 @@ var __rest$7 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4206
2535
|
}
|
|
4207
2536
|
return t;
|
|
4208
2537
|
};
|
|
4209
|
-
var __spreadArray$1 = (undefined && undefined.__spreadArray) || function (to, from, pack) {
|
|
4210
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4211
|
-
if (ar || !(i in from)) {
|
|
4212
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
4213
|
-
ar[i] = from[i];
|
|
4214
|
-
}
|
|
4215
|
-
}
|
|
4216
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
4217
|
-
};
|
|
4218
2538
|
var className$4 = 'react-calendar__decade-view__years__year';
|
|
4219
2539
|
function Year(_a) {
|
|
4220
|
-
var _b = _a.classes, classes = _b === void 0 ? [] : _b, _c = _a.formatYear, formatYear$1 = _c === void 0 ? formatYear : _c, otherProps = __rest$7(_a, ["classes", "formatYear"]);
|
|
2540
|
+
var _b = _a.classes, classes = _b === void 0 ? [] : _b, currentDecade = _a.currentDecade, _c = _a.formatYear, formatYear$1 = _c === void 0 ? formatYear : _c, otherProps = __rest$7(_a, ["classes", "currentDecade", "formatYear"]);
|
|
4221
2541
|
var date = otherProps.date, locale = otherProps.locale;
|
|
4222
|
-
|
|
2542
|
+
var classesProps = [];
|
|
2543
|
+
if (classes) {
|
|
2544
|
+
classesProps.push.apply(classesProps, classes);
|
|
2545
|
+
}
|
|
2546
|
+
{
|
|
2547
|
+
classesProps.push(className$4);
|
|
2548
|
+
}
|
|
2549
|
+
if (getDecadeStart(date).getFullYear() !== currentDecade) {
|
|
2550
|
+
classesProps.push("".concat(className$4, "--neighboringDecade"));
|
|
2551
|
+
}
|
|
2552
|
+
return (jsxRuntime.jsx(Tile, __assign$a({}, otherProps, { classes: classesProps, maxDateTransform: getYearEnd, minDateTransform: getYearStart, view: "decade", children: formatYear$1(locale, date) })));
|
|
4223
2553
|
}
|
|
4224
2554
|
|
|
4225
2555
|
var __assign$9 = (undefined && undefined.__assign) || function () {
|
|
@@ -4245,12 +2575,12 @@ var __rest$6 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4245
2575
|
return t;
|
|
4246
2576
|
};
|
|
4247
2577
|
function Years(props) {
|
|
4248
|
-
var activeStartDate = props.activeStartDate, hover = props.hover, value = props.value, valueType = props.valueType, otherProps = __rest$6(props, ["activeStartDate", "hover", "value", "valueType"]);
|
|
2578
|
+
var activeStartDate = props.activeStartDate, hover = props.hover, showNeighboringDecade = props.showNeighboringDecade, value = props.value, valueType = props.valueType, otherProps = __rest$6(props, ["activeStartDate", "hover", "showNeighboringDecade", "value", "valueType"]);
|
|
4249
2579
|
var start = getBeginOfDecadeYear(activeStartDate);
|
|
4250
|
-
var end = start + 9;
|
|
4251
|
-
return (
|
|
2580
|
+
var end = start + (showNeighboringDecade ? 11 : 9);
|
|
2581
|
+
return (jsxRuntime.jsx(TileGroup, { className: "react-calendar__decade-view__years", dateTransform: getYearStart, dateType: "year", end: end, hover: hover, renderTile: function (_a) {
|
|
4252
2582
|
var date = _a.date, otherTileProps = __rest$6(_a, ["date"]);
|
|
4253
|
-
return (
|
|
2583
|
+
return (jsxRuntime.jsx(Year, __assign$9({}, otherProps, otherTileProps, { activeStartDate: activeStartDate, currentDecade: start, date: date }), date.getTime()));
|
|
4254
2584
|
}, start: start, value: value, valueType: valueType }));
|
|
4255
2585
|
}
|
|
4256
2586
|
|
|
@@ -4265,14 +2595,15 @@ var __assign$8 = (undefined && undefined.__assign) || function () {
|
|
|
4265
2595
|
};
|
|
4266
2596
|
return __assign$8.apply(this, arguments);
|
|
4267
2597
|
};
|
|
4268
|
-
|
|
2598
|
+
/**
|
|
2599
|
+
* Displays a given decade.
|
|
2600
|
+
*/
|
|
2601
|
+
function DecadeView(props) {
|
|
4269
2602
|
function renderYears() {
|
|
4270
|
-
return
|
|
2603
|
+
return jsxRuntime.jsx(Years, __assign$8({}, props));
|
|
4271
2604
|
}
|
|
4272
|
-
return
|
|
4273
|
-
}
|
|
4274
|
-
DecadeView.propTypes = __assign$8({}, tileGroupProps);
|
|
4275
|
-
var DecadeView$1 = DecadeView;
|
|
2605
|
+
return jsxRuntime.jsx("div", { className: "react-calendar__decade-view", children: renderYears() });
|
|
2606
|
+
}
|
|
4276
2607
|
|
|
4277
2608
|
var __assign$7 = (undefined && undefined.__assign) || function () {
|
|
4278
2609
|
__assign$7 = Object.assign || function(t) {
|
|
@@ -4309,7 +2640,7 @@ var className$3 = 'react-calendar__year-view__months__month';
|
|
|
4309
2640
|
function Month(_a) {
|
|
4310
2641
|
var _b = _a.classes, classes = _b === void 0 ? [] : _b, _c = _a.formatMonth, formatMonth$1 = _c === void 0 ? formatMonth : _c, _d = _a.formatMonthYear, formatMonthYear$1 = _d === void 0 ? formatMonthYear : _d, otherProps = __rest$5(_a, ["classes", "formatMonth", "formatMonthYear"]);
|
|
4311
2642
|
var date = otherProps.date, locale = otherProps.locale;
|
|
4312
|
-
return (
|
|
2643
|
+
return (jsxRuntime.jsx(Tile, __assign$7({}, otherProps, { classes: __spreadArray(__spreadArray([], classes, true), [className$3], false), formatAbbr: formatMonthYear$1, maxDateTransform: getMonthEnd, minDateTransform: getMonthStart, view: "year", children: formatMonth$1(locale, date) })));
|
|
4313
2644
|
}
|
|
4314
2645
|
|
|
4315
2646
|
var __assign$6 = (undefined && undefined.__assign) || function () {
|
|
@@ -4339,13 +2670,13 @@ function Months(props) {
|
|
|
4339
2670
|
var start = 0;
|
|
4340
2671
|
var end = 11;
|
|
4341
2672
|
var year = getYear(activeStartDate);
|
|
4342
|
-
return (
|
|
2673
|
+
return (jsxRuntime.jsx(TileGroup, { className: "react-calendar__year-view__months", dateTransform: function (monthIndex) {
|
|
4343
2674
|
var date = new Date();
|
|
4344
2675
|
date.setFullYear(year, monthIndex, 1);
|
|
4345
2676
|
return getMonthStart(date);
|
|
4346
2677
|
}, dateType: "month", end: end, hover: hover, renderTile: function (_a) {
|
|
4347
2678
|
var date = _a.date, otherTileProps = __rest$4(_a, ["date"]);
|
|
4348
|
-
return (
|
|
2679
|
+
return (jsxRuntime.jsx(Month, __assign$6({}, otherProps, otherTileProps, { activeStartDate: activeStartDate, date: date }), date.getTime()));
|
|
4349
2680
|
}, start: start, value: value, valueType: valueType }));
|
|
4350
2681
|
}
|
|
4351
2682
|
|
|
@@ -4360,14 +2691,15 @@ var __assign$5 = (undefined && undefined.__assign) || function () {
|
|
|
4360
2691
|
};
|
|
4361
2692
|
return __assign$5.apply(this, arguments);
|
|
4362
2693
|
};
|
|
4363
|
-
|
|
2694
|
+
/**
|
|
2695
|
+
* Displays a given year.
|
|
2696
|
+
*/
|
|
2697
|
+
function YearView(props) {
|
|
4364
2698
|
function renderMonths() {
|
|
4365
|
-
return
|
|
2699
|
+
return jsxRuntime.jsx(Months, __assign$5({}, props));
|
|
4366
2700
|
}
|
|
4367
|
-
return
|
|
4368
|
-
}
|
|
4369
|
-
YearView.propTypes = __assign$5({}, tileGroupProps);
|
|
4370
|
-
var YearView$1 = YearView;
|
|
2701
|
+
return jsxRuntime.jsx("div", { className: "react-calendar__year-view", children: renderMonths() });
|
|
2702
|
+
}
|
|
4371
2703
|
|
|
4372
2704
|
var __assign$4 = (undefined && undefined.__assign) || function () {
|
|
4373
2705
|
__assign$4 = Object.assign || function(t) {
|
|
@@ -4393,14 +2725,13 @@ var __rest$3 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4393
2725
|
};
|
|
4394
2726
|
var className$2 = 'react-calendar__month-view__days__day';
|
|
4395
2727
|
function Day(_a) {
|
|
4396
|
-
var
|
|
4397
|
-
var calendarType = mapCalendarType(calendarTypeOrDeprecatedCalendarType);
|
|
2728
|
+
var calendarType = _a.calendarType, _b = _a.classes, classes = _b === void 0 ? [] : _b, currentMonthIndex = _a.currentMonthIndex, _c = _a.formatDay, formatDay$1 = _c === void 0 ? formatDay : _c, _d = _a.formatLongDate, formatLongDate$1 = _d === void 0 ? formatLongDate : _d, otherProps = __rest$3(_a, ["calendarType", "classes", "currentMonthIndex", "formatDay", "formatLongDate"]);
|
|
4398
2729
|
var date = otherProps.date, locale = otherProps.locale;
|
|
4399
2730
|
var classesProps = [];
|
|
4400
2731
|
if (classes) {
|
|
4401
2732
|
classesProps.push.apply(classesProps, classes);
|
|
4402
2733
|
}
|
|
4403
|
-
|
|
2734
|
+
{
|
|
4404
2735
|
classesProps.push(className$2);
|
|
4405
2736
|
}
|
|
4406
2737
|
if (isWeekend(date, calendarType)) {
|
|
@@ -4409,7 +2740,7 @@ function Day(_a) {
|
|
|
4409
2740
|
if (date.getMonth() !== currentMonthIndex) {
|
|
4410
2741
|
classesProps.push("".concat(className$2, "--neighboringMonth"));
|
|
4411
2742
|
}
|
|
4412
|
-
return (
|
|
2743
|
+
return (jsxRuntime.jsx(Tile, __assign$4({}, otherProps, { classes: classesProps, formatAbbr: formatLongDate$1, maxDateTransform: getDayEnd, minDateTransform: getDayStart, view: "month", children: formatDay$1(locale, date) })));
|
|
4413
2744
|
}
|
|
4414
2745
|
|
|
4415
2746
|
var __assign$3 = (undefined && undefined.__assign) || function () {
|
|
@@ -4435,8 +2766,7 @@ var __rest$2 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4435
2766
|
return t;
|
|
4436
2767
|
};
|
|
4437
2768
|
function Days(props) {
|
|
4438
|
-
var activeStartDate = props.activeStartDate,
|
|
4439
|
-
var calendarType = mapCalendarType(calendarTypeOrDeprecatedCalendarType);
|
|
2769
|
+
var activeStartDate = props.activeStartDate, calendarType = props.calendarType, hover = props.hover, showFixedNumberOfWeeks = props.showFixedNumberOfWeeks, showNeighboringMonth = props.showNeighboringMonth, value = props.value, valueType = props.valueType, otherProps = __rest$2(props, ["activeStartDate", "calendarType", "hover", "showFixedNumberOfWeeks", "showNeighboringMonth", "value", "valueType"]);
|
|
4440
2770
|
var year = getYear(activeStartDate);
|
|
4441
2771
|
var monthIndex = getMonth(activeStartDate);
|
|
4442
2772
|
var hasFixedNumberOfWeeks = showFixedNumberOfWeeks || showNeighboringMonth;
|
|
@@ -4468,21 +2798,20 @@ function Days(props) {
|
|
|
4468
2798
|
}
|
|
4469
2799
|
return daysInMonth;
|
|
4470
2800
|
})();
|
|
4471
|
-
return (
|
|
2801
|
+
return (jsxRuntime.jsx(TileGroup, { className: "react-calendar__month-view__days", count: 7, dateTransform: function (day) {
|
|
4472
2802
|
var date = new Date();
|
|
4473
2803
|
date.setFullYear(year, monthIndex, day);
|
|
4474
2804
|
return getDayStart(date);
|
|
4475
2805
|
}, dateType: "day", hover: hover, end: end, renderTile: function (_a) {
|
|
4476
2806
|
var date = _a.date, otherTileProps = __rest$2(_a, ["date"]);
|
|
4477
|
-
return (
|
|
2807
|
+
return (jsxRuntime.jsx(Day, __assign$3({}, otherProps, otherTileProps, { activeStartDate: activeStartDate, calendarType: calendarType, currentMonthIndex: monthIndex, date: date }), date.getTime()));
|
|
4478
2808
|
}, offset: offset, start: start, value: value, valueType: valueType }));
|
|
4479
2809
|
}
|
|
4480
2810
|
|
|
4481
2811
|
var className$1 = 'react-calendar__month-view__weekdays';
|
|
4482
2812
|
var weekdayClassName = "".concat(className$1, "__weekday");
|
|
4483
2813
|
function Weekdays(props) {
|
|
4484
|
-
var
|
|
4485
|
-
var calendarType = mapCalendarType(calendarTypeOrDeprecatedCalendarType);
|
|
2814
|
+
var calendarType = props.calendarType, _a = props.formatShortWeekday, formatShortWeekday$1 = _a === void 0 ? formatShortWeekday : _a, _b = props.formatWeekday, formatWeekday$1 = _b === void 0 ? formatWeekday : _b, locale = props.locale, onMouseLeave = props.onMouseLeave;
|
|
4486
2815
|
var anyDate = new Date();
|
|
4487
2816
|
var beginOfMonth = getMonthStart(anyDate);
|
|
4488
2817
|
var year = getYear(beginOfMonth);
|
|
@@ -4491,10 +2820,9 @@ function Weekdays(props) {
|
|
|
4491
2820
|
for (var weekday = 1; weekday <= 7; weekday += 1) {
|
|
4492
2821
|
var weekdayDate = new Date(year, monthIndex, weekday - getDayOfWeek(beginOfMonth, calendarType));
|
|
4493
2822
|
var abbr = formatWeekday$1(locale, weekdayDate);
|
|
4494
|
-
weekdays.push(
|
|
4495
|
-
React.createElement("abbr", { "aria-label": abbr, title: abbr }, formatShortWeekday$1(locale, weekdayDate).replace('.', ''))));
|
|
2823
|
+
weekdays.push(jsxRuntime.jsx("div", { className: clsx(weekdayClassName, isCurrentDayOfWeek(weekdayDate) && "".concat(weekdayClassName, "--current"), isWeekend(weekdayDate, calendarType) && "".concat(weekdayClassName, "--weekend")), children: jsxRuntime.jsx("abbr", { "aria-label": abbr, title: abbr, children: formatShortWeekday$1(locale, weekdayDate).replace('.', '') }) }, weekday));
|
|
4496
2824
|
}
|
|
4497
|
-
return (
|
|
2825
|
+
return (jsxRuntime.jsx(Flex, { className: className$1, count: 7, onFocus: onMouseLeave, onMouseOver: onMouseLeave, children: weekdays }));
|
|
4498
2826
|
}
|
|
4499
2827
|
|
|
4500
2828
|
var __assign$2 = (undefined && undefined.__assign) || function () {
|
|
@@ -4522,20 +2850,20 @@ var __rest$1 = (undefined && undefined.__rest) || function (s, e) {
|
|
|
4522
2850
|
var className = 'react-calendar__tile';
|
|
4523
2851
|
function WeekNumber(props) {
|
|
4524
2852
|
var onClickWeekNumber = props.onClickWeekNumber, weekNumber = props.weekNumber;
|
|
4525
|
-
var children =
|
|
2853
|
+
var children = jsxRuntime.jsx("span", { children: weekNumber });
|
|
4526
2854
|
if (onClickWeekNumber) {
|
|
4527
2855
|
var date_1 = props.date, onClickWeekNumber_1 = props.onClickWeekNumber, weekNumber_1 = props.weekNumber, otherProps = __rest$1(props, ["date", "onClickWeekNumber", "weekNumber"]);
|
|
4528
|
-
return (
|
|
2856
|
+
return (jsxRuntime.jsx("button", __assign$2({}, otherProps, { className: className, onClick: function (event) { return onClickWeekNumber_1(weekNumber_1, date_1, event); }, type: "button", children: children })));
|
|
2857
|
+
// biome-ignore lint/style/noUselessElse: TypeScript is unhappy if we remove this else
|
|
4529
2858
|
}
|
|
4530
2859
|
else {
|
|
4531
2860
|
props.date; props.onClickWeekNumber; props.weekNumber; var otherProps = __rest$1(props, ["date", "onClickWeekNumber", "weekNumber"]);
|
|
4532
|
-
return (
|
|
2861
|
+
return (jsxRuntime.jsx("div", __assign$2({}, otherProps, { className: className, children: children })));
|
|
4533
2862
|
}
|
|
4534
2863
|
}
|
|
4535
2864
|
|
|
4536
2865
|
function WeekNumbers(props) {
|
|
4537
|
-
var activeStartDate = props.activeStartDate,
|
|
4538
|
-
var calendarType = mapCalendarType(calendarTypeOrDeprecatedCalendarType);
|
|
2866
|
+
var activeStartDate = props.activeStartDate, calendarType = props.calendarType, onClickWeekNumber = props.onClickWeekNumber, onMouseLeave = props.onMouseLeave, showFixedNumberOfWeeks = props.showFixedNumberOfWeeks;
|
|
4539
2867
|
var numberOfWeeks = (function () {
|
|
4540
2868
|
if (showFixedNumberOfWeeks) {
|
|
4541
2869
|
return 6;
|
|
@@ -4556,13 +2884,13 @@ function WeekNumbers(props) {
|
|
|
4556
2884
|
return result;
|
|
4557
2885
|
})();
|
|
4558
2886
|
var weekNumbers = dates.map(function (date) { return getWeekNumber(date, calendarType); });
|
|
4559
|
-
return (
|
|
4560
|
-
|
|
4561
|
-
|
|
4562
|
-
|
|
4563
|
-
|
|
4564
|
-
|
|
4565
|
-
|
|
2887
|
+
return (jsxRuntime.jsx(Flex, { className: "react-calendar__month-view__weekNumbers", count: numberOfWeeks, direction: "column", onFocus: onMouseLeave, onMouseOver: onMouseLeave, style: { flexBasis: 'calc(100% * (1 / 8)', flexShrink: 0 }, children: weekNumbers.map(function (weekNumber, weekIndex) {
|
|
2888
|
+
var date = dates[weekIndex];
|
|
2889
|
+
if (!date) {
|
|
2890
|
+
throw new Error('date is not defined');
|
|
2891
|
+
}
|
|
2892
|
+
return (jsxRuntime.jsx(WeekNumber, { date: date, onClickWeekNumber: onClickWeekNumber, weekNumber: weekNumber }, weekNumber));
|
|
2893
|
+
}) }));
|
|
4566
2894
|
}
|
|
4567
2895
|
|
|
4568
2896
|
var __assign$1 = (undefined && undefined.__assign) || function () {
|
|
@@ -4598,37 +2926,33 @@ function getCalendarTypeFromLocale(locale) {
|
|
|
4598
2926
|
}
|
|
4599
2927
|
return CALENDAR_TYPES.ISO_8601;
|
|
4600
2928
|
}
|
|
4601
|
-
|
|
2929
|
+
/**
|
|
2930
|
+
* Displays a given month.
|
|
2931
|
+
*/
|
|
2932
|
+
function MonthView(props) {
|
|
4602
2933
|
var activeStartDate = props.activeStartDate, locale = props.locale, onMouseLeave = props.onMouseLeave, showFixedNumberOfWeeks = props.showFixedNumberOfWeeks;
|
|
4603
2934
|
var _a = props.calendarType, calendarType = _a === void 0 ? getCalendarTypeFromLocale(locale) : _a, formatShortWeekday = props.formatShortWeekday, formatWeekday = props.formatWeekday, onClickWeekNumber = props.onClickWeekNumber, showWeekNumbers = props.showWeekNumbers, childProps = __rest(props, ["calendarType", "formatShortWeekday", "formatWeekday", "onClickWeekNumber", "showWeekNumbers"]);
|
|
4604
2935
|
function renderWeekdays() {
|
|
4605
|
-
return (
|
|
2936
|
+
return (jsxRuntime.jsx(Weekdays, { calendarType: calendarType, formatShortWeekday: formatShortWeekday, formatWeekday: formatWeekday, locale: locale, onMouseLeave: onMouseLeave }));
|
|
4606
2937
|
}
|
|
4607
2938
|
function renderWeekNumbers() {
|
|
4608
2939
|
if (!showWeekNumbers) {
|
|
4609
2940
|
return null;
|
|
4610
2941
|
}
|
|
4611
|
-
return (
|
|
2942
|
+
return (jsxRuntime.jsx(WeekNumbers, { activeStartDate: activeStartDate, calendarType: calendarType, onClickWeekNumber: onClickWeekNumber, onMouseLeave: onMouseLeave, showFixedNumberOfWeeks: showFixedNumberOfWeeks }));
|
|
4612
2943
|
}
|
|
4613
2944
|
function renderDays() {
|
|
4614
|
-
return
|
|
2945
|
+
return jsxRuntime.jsx(Days, __assign$1({ calendarType: calendarType }, childProps));
|
|
4615
2946
|
}
|
|
4616
2947
|
var className = 'react-calendar__month-view';
|
|
4617
|
-
return (
|
|
4618
|
-
React.createElement("div", { style: {
|
|
2948
|
+
return (jsxRuntime.jsx("div", { className: clsx(className, showWeekNumbers ? "".concat(className, "--weekNumbers") : ''), children: jsxRuntime.jsxs("div", { style: {
|
|
4619
2949
|
display: 'flex',
|
|
4620
2950
|
alignItems: 'flex-end',
|
|
4621
|
-
}
|
|
4622
|
-
|
|
4623
|
-
|
|
4624
|
-
|
|
4625
|
-
|
|
4626
|
-
} },
|
|
4627
|
-
renderWeekdays(),
|
|
4628
|
-
renderDays()))));
|
|
4629
|
-
};
|
|
4630
|
-
MonthView.propTypes = __assign$1(__assign$1({}, tileGroupProps), { calendarType: isCalendarType, formatDay: PropTypes.func, formatLongDate: PropTypes.func, formatShortWeekday: PropTypes.func, formatWeekday: PropTypes.func, onClickWeekNumber: PropTypes.func, onMouseLeave: PropTypes.func, showFixedNumberOfWeeks: PropTypes.bool, showNeighboringMonth: PropTypes.bool, showWeekNumbers: PropTypes.bool });
|
|
4631
|
-
var MonthView$1 = MonthView;
|
|
2951
|
+
}, children: [renderWeekNumbers(), jsxRuntime.jsxs("div", { style: {
|
|
2952
|
+
flexGrow: 1,
|
|
2953
|
+
width: '100%',
|
|
2954
|
+
}, children: [renderWeekdays(), renderDays()] })] }) }));
|
|
2955
|
+
}
|
|
4632
2956
|
|
|
4633
2957
|
var __assign = (undefined && undefined.__assign) || function () {
|
|
4634
2958
|
__assign = Object.assign || function(t) {
|
|
@@ -4693,7 +3017,7 @@ function getValue$1(value, index) {
|
|
|
4693
3017
|
return null;
|
|
4694
3018
|
}
|
|
4695
3019
|
var valueDate = toDate(rawValue);
|
|
4696
|
-
if (isNaN(valueDate.getTime())) {
|
|
3020
|
+
if (Number.isNaN(valueDate.getTime())) {
|
|
4697
3021
|
throw new Error("Invalid date: ".concat(value));
|
|
4698
3022
|
}
|
|
4699
3023
|
return valueDate;
|
|
@@ -4756,7 +3080,7 @@ function areDatesEqual(date1, date2) {
|
|
|
4756
3080
|
return date1 instanceof Date && date2 instanceof Date && date1.getTime() === date2.getTime();
|
|
4757
3081
|
}
|
|
4758
3082
|
var Calendar = React.forwardRef(function Calendar(props, ref) {
|
|
4759
|
-
var activeStartDateProps = props.activeStartDate, allowPartialRange = props.allowPartialRange, calendarType = props.calendarType, className = props.className, defaultActiveStartDate = props.defaultActiveStartDate, defaultValue = props.defaultValue, defaultView = props.defaultView, formatDay = props.formatDay, formatLongDate = props.formatLongDate, formatMonth = props.formatMonth, formatMonthYear = props.formatMonthYear, formatShortWeekday = props.formatShortWeekday, formatWeekday = props.formatWeekday, formatYear = props.formatYear, _a = props.goToRangeStartOnSelect, goToRangeStartOnSelect = _a === void 0 ? true : _a, inputRef = props.inputRef, locale = props.locale, _b = props.maxDate, maxDate = _b === void 0 ? defaultMaxDate : _b, _c = props.maxDetail, maxDetail = _c === void 0 ? 'month' : _c, _d = props.minDate, minDate = _d === void 0 ? defaultMinDate : _d, _e = props.minDetail, minDetail = _e === void 0 ? 'century' : _e, navigationAriaLabel = props.navigationAriaLabel, navigationAriaLive = props.navigationAriaLive, navigationLabel = props.navigationLabel, next2AriaLabel = props.next2AriaLabel, next2Label = props.next2Label, nextAriaLabel = props.nextAriaLabel, nextLabel = props.nextLabel, onActiveStartDateChange = props.onActiveStartDateChange, onChangeProps = props.onChange, onClickDay = props.onClickDay, onClickDecade = props.onClickDecade, onClickMonth = props.onClickMonth, onClickWeekNumber = props.onClickWeekNumber, onClickYear = props.onClickYear, onDrillDown = props.onDrillDown, onDrillUp = props.onDrillUp, onViewChange = props.onViewChange, prev2AriaLabel = props.prev2AriaLabel, prev2Label = props.prev2Label, prevAriaLabel = props.prevAriaLabel, prevLabel = props.prevLabel, _f = props.returnValue, returnValue = _f === void 0 ? 'start' : _f, selectRange = props.selectRange, showDoubleView = props.showDoubleView, showFixedNumberOfWeeks = props.showFixedNumberOfWeeks, _g = props.showNavigation, showNavigation = _g === void 0 ? true : _g, _h = props.showNeighboringMonth, showNeighboringMonth = _h === void 0 ? true : _h, showWeekNumbers = props.showWeekNumbers, tileClassName = props.tileClassName, tileContent = props.tileContent, tileDisabled = props.tileDisabled, valueProps = props.value, viewProps = props.view;
|
|
3083
|
+
var activeStartDateProps = props.activeStartDate, allowPartialRange = props.allowPartialRange, calendarType = props.calendarType, className = props.className, defaultActiveStartDate = props.defaultActiveStartDate, defaultValue = props.defaultValue, defaultView = props.defaultView, formatDay = props.formatDay, formatLongDate = props.formatLongDate, formatMonth = props.formatMonth, formatMonthYear = props.formatMonthYear, formatShortWeekday = props.formatShortWeekday, formatWeekday = props.formatWeekday, formatYear = props.formatYear, _a = props.goToRangeStartOnSelect, goToRangeStartOnSelect = _a === void 0 ? true : _a, inputRef = props.inputRef, locale = props.locale, _b = props.maxDate, maxDate = _b === void 0 ? defaultMaxDate : _b, _c = props.maxDetail, maxDetail = _c === void 0 ? 'month' : _c, _d = props.minDate, minDate = _d === void 0 ? defaultMinDate : _d, _e = props.minDetail, minDetail = _e === void 0 ? 'century' : _e, navigationAriaLabel = props.navigationAriaLabel, navigationAriaLive = props.navigationAriaLive, navigationLabel = props.navigationLabel, next2AriaLabel = props.next2AriaLabel, next2Label = props.next2Label, nextAriaLabel = props.nextAriaLabel, nextLabel = props.nextLabel, onActiveStartDateChange = props.onActiveStartDateChange, onChangeProps = props.onChange, onClickDay = props.onClickDay, onClickDecade = props.onClickDecade, onClickMonth = props.onClickMonth, onClickWeekNumber = props.onClickWeekNumber, onClickYear = props.onClickYear, onDrillDown = props.onDrillDown, onDrillUp = props.onDrillUp, onViewChange = props.onViewChange, prev2AriaLabel = props.prev2AriaLabel, prev2Label = props.prev2Label, prevAriaLabel = props.prevAriaLabel, prevLabel = props.prevLabel, _f = props.returnValue, returnValue = _f === void 0 ? 'start' : _f, selectRange = props.selectRange, showDoubleView = props.showDoubleView, showFixedNumberOfWeeks = props.showFixedNumberOfWeeks, _g = props.showNavigation, showNavigation = _g === void 0 ? true : _g, showNeighboringCentury = props.showNeighboringCentury, showNeighboringDecade = props.showNeighboringDecade, _h = props.showNeighboringMonth, showNeighboringMonth = _h === void 0 ? true : _h, showWeekNumbers = props.showWeekNumbers, tileClassName = props.tileClassName, tileContent = props.tileContent, tileDisabled = props.tileDisabled, valueProps = props.value, viewProps = props.view;
|
|
4760
3084
|
var _j = React.useState(defaultActiveStartDate), activeStartDateState = _j[0], setActiveStartDateState = _j[1];
|
|
4761
3085
|
var _k = React.useState(null), hoverState = _k[0], setHoverState = _k[1];
|
|
4762
3086
|
var _l = React.useState(Array.isArray(defaultValue)
|
|
@@ -5050,16 +3374,16 @@ var Calendar = React.forwardRef(function Calendar(props, ref) {
|
|
|
5050
3374
|
};
|
|
5051
3375
|
switch (view) {
|
|
5052
3376
|
case 'century': {
|
|
5053
|
-
return
|
|
3377
|
+
return (jsxRuntime.jsx(CenturyView, __assign({ formatYear: formatYear, showNeighboringCentury: showNeighboringCentury }, commonProps)));
|
|
5054
3378
|
}
|
|
5055
3379
|
case 'decade': {
|
|
5056
|
-
return
|
|
3380
|
+
return (jsxRuntime.jsx(DecadeView, __assign({ formatYear: formatYear, showNeighboringDecade: showNeighboringDecade }, commonProps)));
|
|
5057
3381
|
}
|
|
5058
3382
|
case 'year': {
|
|
5059
|
-
return (
|
|
3383
|
+
return (jsxRuntime.jsx(YearView, __assign({ formatMonth: formatMonth, formatMonthYear: formatMonthYear }, commonProps)));
|
|
5060
3384
|
}
|
|
5061
3385
|
case 'month': {
|
|
5062
|
-
return (
|
|
3386
|
+
return (jsxRuntime.jsx(MonthView, __assign({ calendarType: calendarType, formatDay: formatDay, formatLongDate: formatLongDate, formatShortWeekday: formatShortWeekday, formatWeekday: formatWeekday, onClickWeekNumber: onClickWeekNumber, onMouseLeave: selectRange ? onMouseLeave : undefined, showFixedNumberOfWeeks: typeof showFixedNumberOfWeeks !== 'undefined'
|
|
5063
3387
|
? showFixedNumberOfWeeks
|
|
5064
3388
|
: showDoubleView, showNeighboringMonth: showNeighboringMonth, showWeekNumbers: showWeekNumbers }, commonProps)));
|
|
5065
3389
|
}
|
|
@@ -5071,75 +3395,11 @@ var Calendar = React.forwardRef(function Calendar(props, ref) {
|
|
|
5071
3395
|
if (!showNavigation) {
|
|
5072
3396
|
return null;
|
|
5073
3397
|
}
|
|
5074
|
-
return (
|
|
3398
|
+
return (jsxRuntime.jsx(Navigation, { activeStartDate: activeStartDate, drillUp: drillUp, formatMonthYear: formatMonthYear, formatYear: formatYear, locale: locale, maxDate: maxDate, minDate: minDate, navigationAriaLabel: navigationAriaLabel, navigationAriaLive: navigationAriaLive, navigationLabel: navigationLabel, next2AriaLabel: next2AriaLabel, next2Label: next2Label, nextAriaLabel: nextAriaLabel, nextLabel: nextLabel, prev2AriaLabel: prev2AriaLabel, prev2Label: prev2Label, prevAriaLabel: prevAriaLabel, prevLabel: prevLabel, setActiveStartDate: setActiveStartDate, showDoubleView: showDoubleView, view: view, views: views }));
|
|
5075
3399
|
}
|
|
5076
3400
|
var valueArray = Array.isArray(value) ? value : [value];
|
|
5077
|
-
return (
|
|
5078
|
-
renderNavigation(),
|
|
5079
|
-
React.createElement("div", { className: "".concat(baseClassName, "__viewContainer"), onBlur: selectRange ? onMouseLeave : undefined, onMouseLeave: selectRange ? onMouseLeave : undefined },
|
|
5080
|
-
renderContent(),
|
|
5081
|
-
showDoubleView ? renderContent(true) : null)));
|
|
3401
|
+
return (jsxRuntime.jsxs("div", { className: clsx(baseClassName, selectRange && valueArray.length === 1 && "".concat(baseClassName, "--selectRange"), showDoubleView && "".concat(baseClassName, "--doubleView"), className), ref: inputRef, children: [renderNavigation(), jsxRuntime.jsxs("div", { className: "".concat(baseClassName, "__viewContainer"), onBlur: selectRange ? onMouseLeave : undefined, onMouseLeave: selectRange ? onMouseLeave : undefined, children: [renderContent(), showDoubleView ? renderContent(true) : null] })] }));
|
|
5082
3402
|
});
|
|
5083
|
-
var isActiveStartDate = PropTypes.instanceOf(Date);
|
|
5084
|
-
var isValue = PropTypes.oneOfType([PropTypes.string, PropTypes.instanceOf(Date)]);
|
|
5085
|
-
var isValueOrValueArray = PropTypes.oneOfType([isValue, rangeOf(isValue)]);
|
|
5086
|
-
Calendar.propTypes = {
|
|
5087
|
-
activeStartDate: isActiveStartDate,
|
|
5088
|
-
allowPartialRange: PropTypes.bool,
|
|
5089
|
-
calendarType: isCalendarType,
|
|
5090
|
-
className: isClassName,
|
|
5091
|
-
defaultActiveStartDate: isActiveStartDate,
|
|
5092
|
-
defaultValue: isValueOrValueArray,
|
|
5093
|
-
defaultView: isView,
|
|
5094
|
-
formatDay: PropTypes.func,
|
|
5095
|
-
formatLongDate: PropTypes.func,
|
|
5096
|
-
formatMonth: PropTypes.func,
|
|
5097
|
-
formatMonthYear: PropTypes.func,
|
|
5098
|
-
formatShortWeekday: PropTypes.func,
|
|
5099
|
-
formatWeekday: PropTypes.func,
|
|
5100
|
-
formatYear: PropTypes.func,
|
|
5101
|
-
goToRangeStartOnSelect: PropTypes.bool,
|
|
5102
|
-
inputRef: isRef,
|
|
5103
|
-
locale: PropTypes.string,
|
|
5104
|
-
maxDate: isMaxDate,
|
|
5105
|
-
maxDetail: PropTypes.oneOf(allViews),
|
|
5106
|
-
minDate: isMinDate,
|
|
5107
|
-
minDetail: PropTypes.oneOf(allViews),
|
|
5108
|
-
navigationAriaLabel: PropTypes.string,
|
|
5109
|
-
navigationAriaLive: PropTypes.oneOf(['off', 'polite', 'assertive']),
|
|
5110
|
-
navigationLabel: PropTypes.func,
|
|
5111
|
-
next2AriaLabel: PropTypes.string,
|
|
5112
|
-
next2Label: PropTypes.node,
|
|
5113
|
-
nextAriaLabel: PropTypes.string,
|
|
5114
|
-
nextLabel: PropTypes.node,
|
|
5115
|
-
onActiveStartDateChange: PropTypes.func,
|
|
5116
|
-
onChange: PropTypes.func,
|
|
5117
|
-
onClickDay: PropTypes.func,
|
|
5118
|
-
onClickDecade: PropTypes.func,
|
|
5119
|
-
onClickMonth: PropTypes.func,
|
|
5120
|
-
onClickWeekNumber: PropTypes.func,
|
|
5121
|
-
onClickYear: PropTypes.func,
|
|
5122
|
-
onDrillDown: PropTypes.func,
|
|
5123
|
-
onDrillUp: PropTypes.func,
|
|
5124
|
-
onViewChange: PropTypes.func,
|
|
5125
|
-
prev2AriaLabel: PropTypes.string,
|
|
5126
|
-
prev2Label: PropTypes.node,
|
|
5127
|
-
prevAriaLabel: PropTypes.string,
|
|
5128
|
-
prevLabel: PropTypes.node,
|
|
5129
|
-
returnValue: PropTypes.oneOf(['start', 'end', 'range']),
|
|
5130
|
-
selectRange: PropTypes.bool,
|
|
5131
|
-
showDoubleView: PropTypes.bool,
|
|
5132
|
-
showFixedNumberOfWeeks: PropTypes.bool,
|
|
5133
|
-
showNavigation: PropTypes.bool,
|
|
5134
|
-
showNeighboringMonth: PropTypes.bool,
|
|
5135
|
-
showWeekNumbers: PropTypes.bool,
|
|
5136
|
-
tileClassName: PropTypes.oneOfType([PropTypes.func, isClassName]),
|
|
5137
|
-
tileContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),
|
|
5138
|
-
tileDisabled: PropTypes.func,
|
|
5139
|
-
value: isValueOrValueArray,
|
|
5140
|
-
view: isView,
|
|
5141
|
-
};
|
|
5142
|
-
var Calendar$1 = Calendar;
|
|
5143
3403
|
|
|
5144
3404
|
var css_248z$G = ".DatePicker-module_datePicker__mTJ3f {\n width: 100%;\n}";
|
|
5145
3405
|
var styles$G = {"datePicker":"DatePicker-module_datePicker__mTJ3f"};
|
|
@@ -5154,7 +3414,7 @@ const DatePicker = (props) => {
|
|
|
5154
3414
|
setCurrDate(value);
|
|
5155
3415
|
onChange && onChange(value);
|
|
5156
3416
|
};
|
|
5157
|
-
return (jsxRuntime.jsx(Calendar
|
|
3417
|
+
return (jsxRuntime.jsx(Calendar, { className: styles$G.datePicker, value: currDate, minDate: minDate, maxDate: maxDate, selectRange: selectRange, onChange: handleOnChange, ...rest }));
|
|
5158
3418
|
};
|
|
5159
3419
|
|
|
5160
3420
|
var css_248z$F = ".Form-module_form__h9CkF > div {\n margin-bottom: 10px;\n}\n.Form-module_form__h9CkF :last-child {\n margin-bottom: 0;\n}";
|
|
@@ -5346,7 +3606,7 @@ const Select = (props) => {
|
|
|
5346
3606
|
}
|
|
5347
3607
|
}
|
|
5348
3608
|
};
|
|
5349
|
-
return (jsxRuntime.jsxs("div", { ref: selectConainter, className: styles$D.selectContainer, children: [jsxRuntime.jsx("div", { id: id, className: getCssClass(), onClick: () => show(), tabIndex: 0, onKeyDown: (e) => handleOnKeyDown(e), children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!multiple && renderSingleViewModel(), multiple && jsxRuntime.jsx("div", { className: styles$D.chipContainer, children: renderMultipleViewModel() }), jsxRuntime.jsx(Icon, { className: "ml-auto", children: jsxRuntime.jsx(ChevronDownSolidIcon, {}) })] }) }), isShow && (jsxRuntime.jsxs(Portal
|
|
3609
|
+
return (jsxRuntime.jsxs("div", { ref: selectConainter, className: styles$D.selectContainer, children: [jsxRuntime.jsx("div", { id: id, className: getCssClass(), onClick: () => show(), tabIndex: 0, onKeyDown: (e) => handleOnKeyDown(e), children: jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [!multiple && renderSingleViewModel(), multiple && jsxRuntime.jsx("div", { className: styles$D.chipContainer, children: renderMultipleViewModel() }), jsxRuntime.jsx(Icon, { className: "ml-auto", children: jsxRuntime.jsx(ChevronDownSolidIcon, {}) })] }) }), isShow && (jsxRuntime.jsxs(Portal, { className: "backdrop-root", children: [jsxRuntime.jsx("div", { ref: selectMenu, className: styles$D.selectMenu, style: {
|
|
5350
3610
|
left: selectConainter.current?.getBoundingClientRect().x,
|
|
5351
3611
|
top: selectConainter.current?.getBoundingClientRect().y,
|
|
5352
3612
|
width: selectConainter.current?.getBoundingClientRect().width,
|
|
@@ -5355,7 +3615,7 @@ const Select = (props) => {
|
|
|
5355
3615
|
};
|
|
5356
3616
|
|
|
5357
3617
|
var css_248z$C = ".Textarea-module_textarea__L5zqa {\n display: block;\n width: 100%;\n padding: 0.375rem 0.75rem;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5;\n background-clip: padding-box;\n border: 2px solid var(--input-border-color);\n -webkit-appearance: none;\n -moz-appearance: none;\n appearance: none;\n border-radius: var(--borderRadius);\n resize: vertical;\n color: #212529;\n background-color: #fff;\n background-clip: padding-box;\n appearance: none;\n border-radius: 0.25rem;\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.0745098039);\n transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;\n border: 1px solid #ced4da;\n}\n.Textarea-module_textarea__L5zqa:focus:not(.Textarea-module_textarea__L5zqa.Textarea-module_disabled__OqqOF) {\n outline: none !important;\n border-color: var(--primary);\n}\n.Textarea-module_textarea__L5zqa.Textarea-module_isInvalid__JI01W {\n border-color: #dc3545;\n box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.2509803922);\n}";
|
|
5358
|
-
var styles$C = {"textarea":"Textarea-module_textarea__L5zqa","
|
|
3618
|
+
var styles$C = {"textarea":"Textarea-module_textarea__L5zqa","isInvalid":"Textarea-module_isInvalid__JI01W"};
|
|
5359
3619
|
styleInject(css_248z$C);
|
|
5360
3620
|
|
|
5361
3621
|
const Textarea = (props) => {
|
|
@@ -5371,7 +3631,7 @@ const Textarea = (props) => {
|
|
|
5371
3631
|
};
|
|
5372
3632
|
|
|
5373
3633
|
var css_248z$B = ".FormInput-module_formInput__VXZip {\n display: block;\n width: 100%;\n padding: 0.375rem 0.75rem;\n font-size: 1rem;\n font-weight: 400;\n line-height: 1.5;\n color: #212529;\n background-color: #fff;\n background-clip: padding-box;\n border: 1px solid #ced4da;\n -webkit-appearance: none;\n appearance: none;\n border-radius: 0.25rem;\n box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);\n transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;\n}\n.FormInput-module_formInput__VXZip:focus:not(.FormInput-module_formInput__VXZip.FormInput-module_disabled__EjdD9) {\n color: #212529;\n background-color: #fff;\n border-color: #86b7fe;\n outline: 0;\n box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);\n}\n.FormInput-module_formInput__VXZip.FormInput-module_isInvalid__vQDuz {\n border-color: #dc3545;\n box-shadow: 0 0 0 0.25rem rgba(220, 53, 69, 0.2509803922);\n}";
|
|
5374
|
-
var styles$B = {"formInput":"FormInput-module_formInput__VXZip","
|
|
3634
|
+
var styles$B = {"formInput":"FormInput-module_formInput__VXZip","isInvalid":"FormInput-module_isInvalid__vQDuz"};
|
|
5375
3635
|
styleInject(css_248z$B);
|
|
5376
3636
|
|
|
5377
3637
|
const FormInput = (props) => {
|
|
@@ -5425,9 +3685,9 @@ const EmailValidator = (value) => {
|
|
|
5425
3685
|
|
|
5426
3686
|
const IsEqualValidator = (valueA, valueB) => valueA === valueB;
|
|
5427
3687
|
|
|
5428
|
-
const MaxValidator = (val, valueB) => (val && val.length <= valueB) || false;
|
|
3688
|
+
const MaxValidator = (val, valueB) => (val && val.toString().length <= valueB) || false;
|
|
5429
3689
|
|
|
5430
|
-
const MinValidator = (val, minLength) => (val && val.length >= minLength) || false;
|
|
3690
|
+
const MinValidator = (val, minLength) => (val && val.toString().length >= minLength) || false;
|
|
5431
3691
|
|
|
5432
3692
|
class Form extends React.Component {
|
|
5433
3693
|
constructor(props) {
|
|
@@ -5809,7 +4069,7 @@ const Drawer = (props) => {
|
|
|
5809
4069
|
const handleClickBackdrop = () => {
|
|
5810
4070
|
onClickBackdrop && onClickBackdrop();
|
|
5811
4071
|
};
|
|
5812
|
-
return (jsxRuntime.jsxs(Portal
|
|
4072
|
+
return (jsxRuntime.jsxs(Portal, { className: 'drawer-root', target: target, children: [jsxRuntime.jsx(DrawerContent, { className: className, position: position, permanent: permanent, shadow: shadow, ...rest, children: children }), !permanent && jsxRuntime.jsx(Backdrop, { onClick: handleClickBackdrop })] }));
|
|
5813
4073
|
};
|
|
5814
4074
|
const DrawerContent = (props) => {
|
|
5815
4075
|
const { children, className, position = 'left', permanent = false, shadow, ...rest } = props;
|
|
@@ -5966,7 +4226,7 @@ const MenuBody = (props) => {
|
|
|
5966
4226
|
useOnDestroy(() => {
|
|
5967
4227
|
popperInstance?.destroy();
|
|
5968
4228
|
});
|
|
5969
|
-
return (jsxRuntime.jsxs(Portal
|
|
4229
|
+
return (jsxRuntime.jsxs(Portal, { className: "menu-root", children: [jsxRuntime.jsx("div", { ref: menuBodyRef, className: getCssClasses(), children: jsxRuntime.jsx(List, { children: children }) }), jsxRuntime.jsx(Backdrop, { isTransparent: true, onClick: handleClickBackdrop })] }));
|
|
5970
4230
|
};
|
|
5971
4231
|
|
|
5972
4232
|
const Menu = (props) => {
|
|
@@ -6072,7 +4332,7 @@ const Modal = (props) => {
|
|
|
6072
4332
|
const handleClickBackdrop = () => {
|
|
6073
4333
|
onBackdropClick && onBackdropClick();
|
|
6074
4334
|
};
|
|
6075
|
-
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Portal
|
|
4335
|
+
return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(Portal, { className: "modal-root", target: target, children: jsxRuntime.jsx("div", { className: styles$p.modal, children: jsxRuntime.jsx("div", { className: getCssClass(), children: jsxRuntime.jsxs("div", { className: styles$p.modalContent, children: [header && (jsxRuntime.jsx(ModalHeader, { isDismissable: isDismissable, onClose: () => onHeaderCloseClick && onHeaderCloseClick(), children: header })), jsxRuntime.jsx(ModalBody, { children: children }), footer && jsxRuntime.jsx(ModalFooter, { children: footer })] }) }) }) }), jsxRuntime.jsx(Backdrop, { onClick: handleClickBackdrop, style: { zIndex: 1040 } })] }));
|
|
6076
4336
|
};
|
|
6077
4337
|
|
|
6078
4338
|
exports.MODALTYPE = void 0;
|
|
@@ -6288,7 +4548,7 @@ const Tooltip = (props) => {
|
|
|
6288
4548
|
};
|
|
6289
4549
|
|
|
6290
4550
|
var css_248z$k = ":root {\n --progress-height: 0.5rem;\n --progress-bg: #e9ecef;\n --progress-box-shadow: var(--shadow);\n --progress-bar-color: #fff;\n --progress-bar-bg: var(--primary);\n --progress-bar-transition: width 0.6s ease;\n}\n\n.ProgressBar-module_progressBarContainer__vtbBw {\n display: flex;\n height: var(--progress-height);\n overflow: hidden;\n background-color: var(--progress-bg);\n}\n\n.ProgressBar-module_progressBar__hr8I8 {\n display: flex;\n flex-direction: column;\n justify-content: center;\n overflow: hidden;\n color: var(--progress-bar-color);\n text-align: center;\n white-space: nowrap;\n transition: var(--progress-bar-transition);\n background-color: var(--progress-bar-bg);\n}\n.ProgressBar-module_progressBar__hr8I8.ProgressBar-module_indeterminate__WcQdD {\n width: 100%;\n height: 100%;\n animation: ProgressBar-module_indeterminateAnimation__SlBFt 1s infinite linear;\n transform-origin: 0% 50%;\n}\n\n@keyframes ProgressBar-module_indeterminateAnimation__SlBFt {\n 0% {\n transform: translateX(0) scaleX(0);\n }\n 40% {\n transform: translateX(0) scaleX(0.4);\n }\n 100% {\n transform: translateX(100%) scaleX(0.5);\n }\n}";
|
|
6291
|
-
var styles$k = {"progressBarContainer":"ProgressBar-module_progressBarContainer__vtbBw","progressBar":"ProgressBar-module_progressBar__hr8I8","indeterminate":"ProgressBar-module_indeterminate__WcQdD"
|
|
4551
|
+
var styles$k = {"progressBarContainer":"ProgressBar-module_progressBarContainer__vtbBw","progressBar":"ProgressBar-module_progressBar__hr8I8","indeterminate":"ProgressBar-module_indeterminate__WcQdD"};
|
|
6292
4552
|
styleInject(css_248z$k);
|
|
6293
4553
|
|
|
6294
4554
|
const ProgressBar = (props) => {
|
|
@@ -6397,7 +4657,7 @@ const Sidebar = (props) => {
|
|
|
6397
4657
|
};
|
|
6398
4658
|
|
|
6399
4659
|
var css_248z$j = "@keyframes SkeletonAvatar-module_skeleton-loading__eM-ZU {\n 0% {\n background-color: hsl(200, 20%, 80%);\n }\n 100% {\n background-color: hsl(200, 20%, 95%);\n }\n}\n.SkeletonAvatar-module_skeletonAvatar__03QnJ {\n width: 30px;\n height: 30px;\n border-radius: 50%;\n background-color: var(--secondary);\n animation: SkeletonAvatar-module_skeleton-loading__eM-ZU 1s linear infinite alternate;\n}";
|
|
6400
|
-
var styles$j = {"skeletonAvatar":"SkeletonAvatar-module_skeletonAvatar__03QnJ"
|
|
4660
|
+
var styles$j = {"skeletonAvatar":"SkeletonAvatar-module_skeletonAvatar__03QnJ"};
|
|
6401
4661
|
styleInject(css_248z$j);
|
|
6402
4662
|
|
|
6403
4663
|
const SkeletonAvatar = (props) => {
|
|
@@ -6412,7 +4672,7 @@ const SkeletonAvatar = (props) => {
|
|
|
6412
4672
|
};
|
|
6413
4673
|
|
|
6414
4674
|
var css_248z$i = "@keyframes SkeletonText-module_skeleton-loading__EYFfJ {\n 0% {\n background-color: hsl(200, 20%, 80%);\n }\n 100% {\n background-color: hsl(200, 20%, 95%);\n }\n}\n.SkeletonText-module_skeletonText__E5NCO {\n width: 100%;\n height: 0.7rem;\n margin-bottom: 0.5rem;\n border-radius: 0.25rem;\n animation: SkeletonText-module_skeleton-loading__EYFfJ 1s linear infinite alternate;\n}";
|
|
6415
|
-
var styles$i = {"skeletonText":"SkeletonText-module_skeletonText__E5NCO"
|
|
4675
|
+
var styles$i = {"skeletonText":"SkeletonText-module_skeletonText__E5NCO"};
|
|
6416
4676
|
styleInject(css_248z$i);
|
|
6417
4677
|
|
|
6418
4678
|
const SkeletonText = (props) => {
|
|
@@ -6427,7 +4687,7 @@ const SkeletonText = (props) => {
|
|
|
6427
4687
|
};
|
|
6428
4688
|
|
|
6429
4689
|
var css_248z$h = "@keyframes SkeletonFooter-module_skeleton-loading__OEErv {\n 0% {\n background-color: hsl(200, 20%, 80%);\n }\n 100% {\n background-color: hsl(200, 20%, 95%);\n }\n}\n.SkeletonFooter-module_skeletonFooter__u2Gxc {\n width: 30%;\n height: 0.7rem;\n border-radius: 0.25rem;\n animation: SkeletonFooter-module_skeleton-loading__OEErv 1s linear infinite alternate;\n}";
|
|
6430
|
-
var styles$h = {"skeletonFooter":"SkeletonFooter-module_skeletonFooter__u2Gxc"
|
|
4690
|
+
var styles$h = {"skeletonFooter":"SkeletonFooter-module_skeletonFooter__u2Gxc"};
|
|
6431
4691
|
styleInject(css_248z$h);
|
|
6432
4692
|
|
|
6433
4693
|
const SkeletonFooter = (props) => {
|
|
@@ -6442,7 +4702,7 @@ const SkeletonFooter = (props) => {
|
|
|
6442
4702
|
};
|
|
6443
4703
|
|
|
6444
4704
|
var css_248z$g = "@keyframes SkeletonImage-module_skeleton-loading__04lJ7 {\n 0% {\n background-color: hsl(200, 20%, 80%);\n }\n 100% {\n background-color: hsl(200, 20%, 95%);\n }\n}\n.SkeletonImage-module_skeletonImage__2EwDG {\n height: 10rem;\n margin: 0.5rem 0;\n border-radius: 0.75rem;\n animation: SkeletonImage-module_skeleton-loading__04lJ7 1s linear infinite alternate;\n}\n\n.SkeletonImage-module_div__tqqrB {\n width: 100%;\n height: 100%;\n object-fit: cover;\n margin: auto;\n border-radius: 0.75rem;\n border-color: none;\n}";
|
|
6445
|
-
var styles$g = {"skeletonImage":"SkeletonImage-module_skeletonImage__2EwDG"
|
|
4705
|
+
var styles$g = {"skeletonImage":"SkeletonImage-module_skeletonImage__2EwDG"};
|
|
6446
4706
|
styleInject(css_248z$g);
|
|
6447
4707
|
|
|
6448
4708
|
const SkeletonImage = (props) => {
|
|
@@ -6749,7 +5009,7 @@ const Typography = ({ children, as = 'span', wrap, ...rest }) => {
|
|
|
6749
5009
|
};
|
|
6750
5010
|
|
|
6751
5011
|
var css_248z$6 = ".Step-module_stepWrapper__IQwq1 {\n display: flex;\n align-items: center;\n padding-left: 8px;\n padding-right: 8px;\n transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.Step-module_stepWrapper__IQwq1.Step-module_hasLabel__LZNvd:not(.Step-module_disabled__JnxUP):hover {\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.04);\n border-radius: var(--borderRadius);\n}\n\n.Step-module_step__k42go {\n width: 40px;\n height: 40px;\n position: relative;\n display: flex;\n align-items: center;\n justify-content: center;\n transition: all 300ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;\n}\n.Step-module_step__k42go:not(.Step-module_hasLabel__LZNvd):not(.Step-module_disabled__JnxUP):hover {\n border-radius: 100%;\n cursor: pointer;\n background-color: rgba(0, 0, 0, 0.04);\n}\n.Step-module_step__k42go.Step-module_hasLabel__LZNvd svg {\n width: 18px !important;\n height: 18px !important;\n}\n\n.Step-module_stepIconCircle__hnxIV svg {\n width: 24px;\n height: 24px;\n}\n\n.Step-module_stepValue__B0-xv {\n position: absolute;\n color: var(--secondary-contrast-text);\n}\n.Step-module_stepValue__B0-xv .Step-module_isActive__3GGcl {\n color: var(--primary-contrast-text);\n}";
|
|
6752
|
-
var styles$6 = {"stepWrapper":"Step-module_stepWrapper__IQwq1","hasLabel":"Step-module_hasLabel__LZNvd","disabled":"Step-module_disabled__JnxUP","step":"Step-module_step__k42go","stepIconCircle":"Step-module_stepIconCircle__hnxIV","stepValue":"Step-module_stepValue__B0-xv"
|
|
5012
|
+
var styles$6 = {"stepWrapper":"Step-module_stepWrapper__IQwq1","hasLabel":"Step-module_hasLabel__LZNvd","disabled":"Step-module_disabled__JnxUP","step":"Step-module_step__k42go","stepIconCircle":"Step-module_stepIconCircle__hnxIV","stepValue":"Step-module_stepValue__B0-xv"};
|
|
6753
5013
|
styleInject(css_248z$6);
|
|
6754
5014
|
|
|
6755
5015
|
const Step = (props) => {
|
|
@@ -7287,11 +5547,11 @@ Array.prototype.distinct = function (comparator) {
|
|
|
7287
5547
|
};
|
|
7288
5548
|
|
|
7289
5549
|
var dayjs_min = createCommonjsModule(function (module, exports) {
|
|
7290
|
-
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null
|
|
5550
|
+
!function(t,e){module.exports=e();}(commonjsGlobal,(function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]"}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0")},m:function t(e,n){if(e.date()<n.date())return -t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return +(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return {M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},g="en",D={};D[g]=M;var p="$isDayjsObject",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if("string"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split("-");if(!i&&u.length>1)return t(u[0])}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,true),this.parse(t),this.$x=this.$x||t.x||{},this[p]=true;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b},m.isValid=function(){return !(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate("s"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v="set"+(this.$u?"UTC":"");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+"Hours",0);case u:return $(v+"Minutes",1);case s:return $(v+"Seconds",2);case i:return $(v+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,false)},m.$set=function(t,e){var n,o=b.p(t),f="set"+(this.$u?"UTC":""),l=(n={},n[a]=f+"Date",n[d]=f+"Date",n[c]=f+"Month",n[h]=f+"FullYear",n[u]=f+"Hours",n[s]=f+"Minutes",n[i]=f+"Seconds",n[r]=f+"Milliseconds",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d;}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||"YYYY-MM-DDTHH:mm:ssZ",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,"0")},$=f||function(t,e,n){var r=t<12?"AM":"PM";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case "YY":return String(e.$y).slice(-2);case "YYYY":return b.s(e.$y,4,"0");case "M":return a+1;case "MM":return b.s(a+1,2,"0");case "MMM":return h(n.monthsShort,a,c,3);case "MMMM":return h(c,a);case "D":return e.$D;case "DD":return b.s(e.$D,2,"0");case "d":return String(e.$W);case "dd":return h(n.weekdaysMin,e.$W,o,2);case "ddd":return h(n.weekdaysShort,e.$W,o,3);case "dddd":return o[e.$W];case "H":return String(s);case "HH":return b.s(s,2,"0");case "h":return d(1);case "hh":return d(2);case "a":return $(s,u,true);case "A":return $(s,u,false);case "m":return String(u);case "mm":return b.s(u,2,"0");case "s":return String(e.$s);case "ss":return b.s(e.$s,2,"0");case "SSS":return b.s(e.$ms,3,"0");case "Z":return i}return null}(t)||i.replace(":","")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g;}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,true);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[["$ms",r],["$s",i],["$m",s],["$H",u],["$W",a],["$M",c],["$y",h],["$D",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])};})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=true),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));
|
|
7291
5551
|
});
|
|
7292
5552
|
|
|
7293
5553
|
var localizedFormat = createCommonjsModule(function (module, exports) {
|
|
7294
|
-
!function(e,t){module.exports=t();}(commonjsGlobal,(function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,o,n){var r=o.prototype,i=r.format;n.en.formats=e,r.format=function(t){void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var o=this.$locale().formats,n=function(t,o){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,o){return t||o.slice(1)}))}))}(t,void 0===o?{}:o);return i.call(this,n)};}}));
|
|
5554
|
+
!function(e,t){module.exports=t();}(commonjsGlobal,(function(){var e={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(t,o,n){var r=o.prototype,i=r.format;n.en.formats=e,r.format=function(t){ void 0===t&&(t="YYYY-MM-DDTHH:mm:ssZ");var o=this.$locale().formats,n=function(t,o){return t.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var i=r&&r.toUpperCase();return n||o[r]||e[r]||o[i].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,o){return t||o.slice(1)}))}))}(t,void 0===o?{}:o);return i.call(this,n)};}}));
|
|
7295
5555
|
});
|
|
7296
5556
|
|
|
7297
5557
|
dayjs_min.extend(localizedFormat);
|
|
@@ -7406,7 +5666,7 @@ exports.ModalHeader = ModalHeader;
|
|
|
7406
5666
|
exports.MonthSelect = MonthSelect;
|
|
7407
5667
|
exports.NumberSelect = NumberSelect;
|
|
7408
5668
|
exports.PlusSolidIcon = PlusSolidIcon;
|
|
7409
|
-
exports.Portal = Portal
|
|
5669
|
+
exports.Portal = Portal;
|
|
7410
5670
|
exports.ProgressBar = ProgressBar;
|
|
7411
5671
|
exports.Row = Row;
|
|
7412
5672
|
exports.SecondSelect = SecondSelect;
|