{"version":3,"file":"index-DZ6Alp11.js","sources":["../../node_modules/react/cjs/react-jsx-runtime.production.js","../../node_modules/react/jsx-runtime.js","../../node_modules/react/cjs/react.production.js","../../node_modules/react/index.js","../../node_modules/react-dom/cjs/react-dom.production.js","../../node_modules/react-dom/index.js","../../src/components/CircleSteps/Step.tsx","../../src/assets/start_czerwony.svg","../../src/assets/start_szary.svg","../../src/assets/dane_kontaktowe_czerwony.svg","../../src/assets/dane_kontaktowe_szary.svg","../../src/assets/mail_czerwony.svg","../../src/assets/mail_szary.svg","../../src/assets/formularz_czerwony.svg","../../src/assets/formularz_szary.svg","../../src/assets/weryfikacja_czerwony.svg","../../src/assets/weryfikacja_szary.svg","../../src/assets/telefon_czerwony.svg","../../src/assets/telefon_szary.svg","../../src/assets/dziekujemy_czerwony.svg","../../src/assets/dziekujemy_szary.svg","../../src/assets/zrodla_finansowania_czerwony-01.svg","../../src/assets/zrodla_finansowania_szary-01.svg","../../src/components/CircleSteps/CircleSteps.tsx","../../node_modules/react-hook-form/dist/index.esm.mjs","../../node_modules/use-isomorphic-layout-effect/dist/use-isomorphic-layout-effect.browser.esm.js","../../node_modules/xstate/dev/dist/xstate-dev.esm.js","../../node_modules/xstate/dist/raise-c17ec2bc.esm.js","../../node_modules/xstate/dist/log-3d9d72a9.esm.js","../../node_modules/xstate/dist/xstate.esm.js","../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.js","../../node_modules/use-sync-external-store/shim/index.js","../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.min.js","../../node_modules/use-sync-external-store/shim/with-selector.js","../../node_modules/@xstate/react/dist/xstate-react.esm.js","../../src/components/Loader/Loader.tsx","../../src/components/LoadingPanel/LoadingPanel.tsx","../../node_modules/axios/lib/helpers/bind.js","../../node_modules/axios/lib/utils.js","../../node_modules/axios/lib/core/AxiosError.js","../../node_modules/axios/lib/helpers/null.js","../../node_modules/axios/lib/helpers/toFormData.js","../../node_modules/axios/lib/helpers/AxiosURLSearchParams.js","../../node_modules/axios/lib/helpers/buildURL.js","../../node_modules/axios/lib/core/InterceptorManager.js","../../node_modules/axios/lib/defaults/transitional.js","../../node_modules/axios/lib/platform/browser/classes/URLSearchParams.js","../../node_modules/axios/lib/platform/browser/classes/FormData.js","../../node_modules/axios/lib/platform/browser/classes/Blob.js","../../node_modules/axios/lib/platform/browser/index.js","../../node_modules/axios/lib/platform/common/utils.js","../../node_modules/axios/lib/platform/index.js","../../node_modules/axios/lib/helpers/toURLEncodedForm.js","../../node_modules/axios/lib/helpers/formDataToJSON.js","../../node_modules/axios/lib/defaults/index.js","../../node_modules/axios/lib/helpers/parseHeaders.js","../../node_modules/axios/lib/core/AxiosHeaders.js","../../node_modules/axios/lib/core/transformData.js","../../node_modules/axios/lib/cancel/isCancel.js","../../node_modules/axios/lib/cancel/CanceledError.js","../../node_modules/axios/lib/core/settle.js","../../node_modules/axios/lib/helpers/parseProtocol.js","../../node_modules/axios/lib/helpers/speedometer.js","../../node_modules/axios/lib/helpers/throttle.js","../../node_modules/axios/lib/helpers/progressEventReducer.js","../../node_modules/axios/lib/helpers/isURLSameOrigin.js","../../node_modules/axios/lib/helpers/cookies.js","../../node_modules/axios/lib/helpers/isAbsoluteURL.js","../../node_modules/axios/lib/helpers/combineURLs.js","../../node_modules/axios/lib/core/buildFullPath.js","../../node_modules/axios/lib/core/mergeConfig.js","../../node_modules/axios/lib/helpers/resolveConfig.js","../../node_modules/axios/lib/adapters/xhr.js","../../node_modules/axios/lib/helpers/composeSignals.js","../../node_modules/axios/lib/helpers/trackStream.js","../../node_modules/axios/lib/adapters/fetch.js","../../node_modules/axios/lib/adapters/adapters.js","../../node_modules/axios/lib/core/dispatchRequest.js","../../node_modules/axios/lib/env/data.js","../../node_modules/axios/lib/helpers/validator.js","../../node_modules/axios/lib/core/Axios.js","../../node_modules/axios/lib/cancel/CancelToken.js","../../node_modules/axios/lib/helpers/spread.js","../../node_modules/axios/lib/helpers/isAxiosError.js","../../node_modules/axios/lib/helpers/HttpStatusCode.js","../../node_modules/axios/lib/axios.js","../../node_modules/axios/index.js","../../src/consts/consts.ts","../../src/helpers/token.ts","../../src/request/api.ts","../../src/request/request.ts","../../node_modules/@mui/material/colors/common.js","../../node_modules/@mui/material/colors/red.js","../../node_modules/@mui/material/colors/purple.js","../../node_modules/@mui/material/colors/blue.js","../../node_modules/@mui/material/colors/lightBlue.js","../../node_modules/@mui/material/colors/green.js","../../node_modules/@mui/material/colors/orange.js","../../node_modules/@mui/material/colors/grey.js","../../node_modules/@mui/utils/esm/formatMuiErrorMessage/formatMuiErrorMessage.js","../../node_modules/@mui/material/styles/identifier.js","../../node_modules/@babel/runtime/helpers/esm/extends.js","../../node_modules/@emotion/sheet/dist/emotion-sheet.esm.js","../../node_modules/stylis/src/Enum.js","../../node_modules/stylis/src/Utility.js","../../node_modules/stylis/src/Tokenizer.js","../../node_modules/stylis/src/Parser.js","../../node_modules/stylis/src/Serializer.js","../../node_modules/stylis/src/Middleware.js","../../node_modules/@emotion/memoize/dist/emotion-memoize.esm.js","../../node_modules/@emotion/cache/dist/emotion-cache.browser.esm.js","../../node_modules/hoist-non-react-statics/node_modules/react-is/cjs/react-is.production.min.js","../../node_modules/hoist-non-react-statics/node_modules/react-is/index.js","../../node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js","../../node_modules/@emotion/utils/dist/emotion-utils.browser.esm.js","../../node_modules/@emotion/hash/dist/emotion-hash.esm.js","../../node_modules/@emotion/unitless/dist/emotion-unitless.esm.js","../../node_modules/@emotion/serialize/dist/emotion-serialize.esm.js","../../node_modules/@emotion/use-insertion-effect-with-fallbacks/dist/emotion-use-insertion-effect-with-fallbacks.browser.esm.js","../../node_modules/@emotion/react/dist/emotion-element-f0de968e.browser.esm.js","../../node_modules/@emotion/react/dist/emotion-react.browser.esm.js","../../node_modules/@emotion/is-prop-valid/dist/emotion-is-prop-valid.esm.js","../../node_modules/@emotion/styled/base/dist/emotion-styled-base.browser.esm.js","../../node_modules/@emotion/styled/dist/emotion-styled.browser.esm.js","../../node_modules/prop-types/lib/ReactPropTypesSecret.js","../../node_modules/prop-types/factoryWithThrowingShims.js","../../node_modules/prop-types/index.js","../../node_modules/@mui/styled-engine/GlobalStyles/GlobalStyles.js","../../node_modules/@mui/styled-engine/index.js","../../node_modules/react-is/cjs/react-is.production.js","../../node_modules/react-is/index.js","../../node_modules/@mui/utils/esm/deepmerge/deepmerge.js","../../node_modules/@mui/system/esm/createBreakpoints/createBreakpoints.js","../../node_modules/@mui/system/esm/cssContainerQueries/cssContainerQueries.js","../../node_modules/@mui/system/esm/createTheme/shape.js","../../node_modules/@mui/system/esm/merge/merge.js","../../node_modules/@mui/system/esm/breakpoints/breakpoints.js","../../node_modules/@mui/utils/esm/capitalize/capitalize.js","../../node_modules/@mui/system/esm/style/style.js","../../node_modules/@mui/system/esm/memoize/memoize.js","../../node_modules/@mui/system/esm/spacing/spacing.js","../../node_modules/@mui/system/esm/createTheme/createSpacing.js","../../node_modules/@mui/system/esm/compose/compose.js","../../node_modules/@mui/system/esm/borders/borders.js","../../node_modules/@mui/system/esm/cssGrid/cssGrid.js","../../node_modules/@mui/system/esm/palette/palette.js","../../node_modules/@mui/system/esm/sizing/sizing.js","../../node_modules/@mui/system/esm/styleFunctionSx/defaultSxConfig.js","../../node_modules/@mui/system/esm/styleFunctionSx/styleFunctionSx.js","../../node_modules/@mui/system/esm/createTheme/applyStyles.js","../../node_modules/@mui/system/esm/createTheme/createTheme.js","../../node_modules/@mui/system/esm/useThemeWithoutDefault/useThemeWithoutDefault.js","../../node_modules/@mui/system/esm/useTheme/useTheme.js","../../node_modules/@mui/system/esm/GlobalStyles/GlobalStyles.js","../../node_modules/@mui/system/esm/styleFunctionSx/extendSxProp.js","../../node_modules/@mui/utils/esm/ClassNameGenerator/ClassNameGenerator.js","../../node_modules/clsx/dist/clsx.mjs","../../node_modules/@mui/utils/esm/generateUtilityClass/generateUtilityClass.js","../../node_modules/@mui/utils/esm/generateUtilityClasses/generateUtilityClasses.js","../../node_modules/@mui/system/esm/preprocessStyles.js","../../node_modules/@mui/system/esm/createStyled/createStyled.js","../../node_modules/@mui/system/esm/styled/styled.js","../../node_modules/@mui/utils/esm/resolveProps/resolveProps.js","../../node_modules/@mui/system/esm/useThemeProps/getThemeProps.js","../../node_modules/@mui/system/esm/useThemeProps/useThemeProps.js","../../node_modules/@mui/utils/esm/useEnhancedEffect/useEnhancedEffect.js","../../node_modules/@mui/system/esm/useMediaQuery/useMediaQuery.js","../../node_modules/@mui/utils/esm/clamp/clamp.js","../../node_modules/@mui/system/esm/colorManipulator/colorManipulator.js","../../node_modules/@mui/utils/esm/refType/refType.js","../../node_modules/@mui/utils/esm/createChainedFunction/createChainedFunction.js","../../node_modules/@mui/utils/esm/debounce/debounce.js","../../node_modules/@mui/utils/esm/isMuiElement/isMuiElement.js","../../node_modules/@mui/utils/esm/ownerDocument/ownerDocument.js","../../node_modules/@mui/utils/esm/ownerWindow/ownerWindow.js","../../node_modules/@mui/utils/esm/setRef/setRef.js","../../node_modules/@mui/utils/esm/useId/useId.js","../../node_modules/@mui/utils/esm/useControlled/useControlled.js","../../node_modules/@mui/utils/esm/useEventCallback/useEventCallback.js","../../node_modules/@mui/utils/esm/useForkRef/useForkRef.js","../../node_modules/@mui/utils/esm/useLazyRef/useLazyRef.js","../../node_modules/@mui/utils/esm/useOnMount/useOnMount.js","../../node_modules/@mui/utils/esm/useTimeout/useTimeout.js","../../node_modules/@mui/utils/esm/isFocusVisible/isFocusVisible.js","../../node_modules/@mui/utils/esm/getScrollbarSize/getScrollbarSize.js","../../node_modules/@mui/utils/esm/usePreviousProps/usePreviousProps.js","../../node_modules/@mui/utils/esm/visuallyHidden/visuallyHidden.js","../../node_modules/@mui/utils/esm/composeClasses/composeClasses.js","../../node_modules/@mui/utils/esm/isHostComponent/isHostComponent.js","../../node_modules/@mui/utils/esm/appendOwnerState/appendOwnerState.js","../../node_modules/@mui/utils/esm/extractEventHandlers/extractEventHandlers.js","../../node_modules/@mui/utils/esm/omitEventHandlers/omitEventHandlers.js","../../node_modules/@mui/utils/esm/mergeSlotProps/mergeSlotProps.js","../../node_modules/@mui/utils/esm/resolveComponentProps/resolveComponentProps.js","../../node_modules/@mui/utils/esm/useSlotProps/useSlotProps.js","../../node_modules/@mui/utils/esm/getReactElementRef/getReactElementRef.js","../../node_modules/@mui/private-theming/useTheme/ThemeContext.js","../../node_modules/@mui/private-theming/useTheme/useTheme.js","../../node_modules/@mui/private-theming/ThemeProvider/nested.js","../../node_modules/@mui/private-theming/ThemeProvider/ThemeProvider.js","../../node_modules/@mui/system/esm/RtlProvider/index.js","../../node_modules/@mui/system/esm/DefaultPropsProvider/DefaultPropsProvider.js","../../node_modules/@mui/system/esm/ThemeProvider/ThemeProvider.js","../../node_modules/@mui/system/esm/memoTheme.js","../../node_modules/@mui/system/esm/InitColorSchemeScript/InitColorSchemeScript.js","../../node_modules/@mui/system/esm/cssVars/useCurrentColorScheme.js","../../node_modules/@mui/system/esm/cssVars/createCssVarsProvider.js","../../node_modules/@mui/system/esm/cssVars/createGetCssVar.js","../../node_modules/@mui/system/esm/cssVars/cssVarsParser.js","../../node_modules/@mui/system/esm/cssVars/prepareCssVars.js","../../node_modules/@mui/system/esm/cssVars/getColorSchemeSelector.js","../../node_modules/@mui/material/styles/createPalette.js","../../node_modules/@mui/system/esm/cssVars/prepareTypographyVars.js","../../node_modules/@mui/material/styles/createMixins.js","../../node_modules/@mui/material/styles/createTypography.js","../../node_modules/@mui/material/styles/shadows.js","../../node_modules/@mui/material/styles/createTransitions.js","../../node_modules/@mui/material/styles/zIndex.js","../../node_modules/@mui/material/styles/stringifyTheme.js","../../node_modules/@mui/material/styles/createThemeNoVars.js","../../node_modules/@mui/material/styles/getOverlayAlpha.js","../../node_modules/@mui/material/styles/createColorScheme.js","../../node_modules/@mui/material/styles/shouldSkipGeneratingVar.js","../../node_modules/@mui/material/styles/excludeVariablesFromRoot.js","../../node_modules/@mui/material/styles/createGetSelector.js","../../node_modules/@mui/material/styles/createThemeWithVars.js","../../node_modules/@mui/material/styles/createTheme.js","../../node_modules/@mui/material/styles/defaultTheme.js","../../node_modules/@mui/material/styles/useTheme.js","../../node_modules/@mui/material/styles/useThemeProps.js","../../node_modules/@mui/material/styles/slotShouldForwardProp.js","../../node_modules/@mui/material/styles/rootShouldForwardProp.js","../../node_modules/@mui/material/styles/styled.js","../../node_modules/@mui/material/styles/ThemeProviderNoVars.js","../../node_modules/@mui/material/InitColorSchemeScript/InitColorSchemeScript.js","../../node_modules/@mui/material/styles/ThemeProviderWithVars.js","../../node_modules/@mui/material/styles/ThemeProvider.js","../../node_modules/@mui/material/GlobalStyles/GlobalStyles.js","../../node_modules/@mui/material/zero-styled/index.js","../../node_modules/@mui/material/utils/memoTheme.js","../../node_modules/@mui/material/DefaultPropsProvider/DefaultPropsProvider.js","../../node_modules/@mui/material/SvgIcon/svgIconClasses.js","../../node_modules/@mui/material/SvgIcon/SvgIcon.js","../../node_modules/@mui/material/utils/createSvgIcon.js","../../node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js","../../node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","../../node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","../../node_modules/dom-helpers/esm/hasClass.js","../../node_modules/dom-helpers/esm/addClass.js","../../node_modules/dom-helpers/esm/removeClass.js","../../node_modules/react-transition-group/esm/config.js","../../node_modules/react-transition-group/esm/TransitionGroupContext.js","../../node_modules/react-transition-group/esm/utils/reflow.js","../../node_modules/react-transition-group/esm/Transition.js","../../node_modules/react-transition-group/esm/CSSTransition.js","../../node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","../../node_modules/react-transition-group/esm/utils/ChildMapping.js","../../node_modules/react-transition-group/esm/TransitionGroup.js","../../node_modules/@mui/material/transitions/utils.js","../../node_modules/@mui/material/Paper/paperClasses.js","../../node_modules/@mui/material/Paper/Paper.js","../../node_modules/@mui/material/utils/useSlot.js","../../node_modules/@mui/material/useLazyRipple/useLazyRipple.js","../../node_modules/@mui/material/ButtonBase/Ripple.js","../../node_modules/@mui/material/ButtonBase/touchRippleClasses.js","../../node_modules/@mui/material/ButtonBase/TouchRipple.js","../../node_modules/@mui/material/ButtonBase/buttonBaseClasses.js","../../node_modules/@mui/material/ButtonBase/ButtonBase.js","../../node_modules/@mui/material/utils/createSimplePaletteValueFilter.js","../../node_modules/@mui/material/CircularProgress/circularProgressClasses.js","../../node_modules/@mui/material/CircularProgress/CircularProgress.js","../../node_modules/@mui/material/IconButton/iconButtonClasses.js","../../node_modules/@mui/material/IconButton/IconButton.js","../../node_modules/@mui/material/internal/svg-icons/Close.js","../../node_modules/@mui/material/Typography/typographyClasses.js","../../node_modules/@mui/material/Typography/Typography.js","../../node_modules/@mui/material/useAutocomplete/useAutocomplete.js","../../node_modules/@popperjs/core/lib/enums.js","../../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js","../../node_modules/@popperjs/core/lib/dom-utils/getWindow.js","../../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js","../../node_modules/@popperjs/core/lib/modifiers/applyStyles.js","../../node_modules/@popperjs/core/lib/utils/getBasePlacement.js","../../node_modules/@popperjs/core/lib/utils/math.js","../../node_modules/@popperjs/core/lib/utils/userAgent.js","../../node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js","../../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js","../../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js","../../node_modules/@popperjs/core/lib/dom-utils/contains.js","../../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js","../../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js","../../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js","../../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js","../../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js","../../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js","../../node_modules/@popperjs/core/lib/utils/within.js","../../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js","../../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js","../../node_modules/@popperjs/core/lib/utils/expandToHashMap.js","../../node_modules/@popperjs/core/lib/modifiers/arrow.js","../../node_modules/@popperjs/core/lib/utils/getVariation.js","../../node_modules/@popperjs/core/lib/modifiers/computeStyles.js","../../node_modules/@popperjs/core/lib/modifiers/eventListeners.js","../../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js","../../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js","../../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js","../../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js","../../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js","../../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js","../../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js","../../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js","../../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js","../../node_modules/@popperjs/core/lib/utils/rectToClientRect.js","../../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js","../../node_modules/@popperjs/core/lib/utils/computeOffsets.js","../../node_modules/@popperjs/core/lib/utils/detectOverflow.js","../../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js","../../node_modules/@popperjs/core/lib/modifiers/flip.js","../../node_modules/@popperjs/core/lib/modifiers/hide.js","../../node_modules/@popperjs/core/lib/modifiers/offset.js","../../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js","../../node_modules/@popperjs/core/lib/utils/getAltAxis.js","../../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js","../../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js","../../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js","../../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js","../../node_modules/@popperjs/core/lib/utils/orderModifiers.js","../../node_modules/@popperjs/core/lib/utils/debounce.js","../../node_modules/@popperjs/core/lib/utils/mergeByName.js","../../node_modules/@popperjs/core/lib/createPopper.js","../../node_modules/@popperjs/core/lib/popper.js","../../node_modules/@mui/material/Portal/Portal.js","../../node_modules/@mui/material/Popper/popperClasses.js","../../node_modules/@mui/material/Popper/BasePopper.js","../../node_modules/@mui/material/Popper/Popper.js","../../node_modules/@mui/material/ListSubheader/listSubheaderClasses.js","../../node_modules/@mui/material/ListSubheader/ListSubheader.js","../../node_modules/@mui/material/internal/svg-icons/Cancel.js","../../node_modules/@mui/material/Chip/chipClasses.js","../../node_modules/@mui/material/Chip/Chip.js","../../node_modules/@mui/material/TextareaAutosize/TextareaAutosize.js","../../node_modules/@mui/material/utils/isHostComponent.js","../../node_modules/@mui/material/FormControl/formControlState.js","../../node_modules/@mui/material/FormControl/FormControlContext.js","../../node_modules/@mui/material/FormControl/useFormControl.js","../../node_modules/@mui/material/InputBase/utils.js","../../node_modules/@mui/material/InputBase/inputBaseClasses.js","../../node_modules/@mui/material/InputBase/InputBase.js","../../node_modules/@mui/material/Input/inputClasses.js","../../node_modules/@mui/material/OutlinedInput/outlinedInputClasses.js","../../node_modules/@mui/material/FilledInput/filledInputClasses.js","../../node_modules/@mui/material/internal/svg-icons/ArrowDropDown.js","../../node_modules/@mui/material/Autocomplete/autocompleteClasses.js","../../node_modules/@mui/material/Autocomplete/Autocomplete.js","../../node_modules/@mui/material/Fade/Fade.js","../../node_modules/@mui/material/Backdrop/backdropClasses.js","../../node_modules/@mui/material/Backdrop/Backdrop.js","../../node_modules/@mui/material/Button/buttonClasses.js","../../node_modules/@mui/material/ButtonGroup/ButtonGroupContext.js","../../node_modules/@mui/material/ButtonGroup/ButtonGroupButtonContext.js","../../node_modules/@mui/material/Button/Button.js","../../node_modules/@mui/material/Modal/ModalManager.js","../../node_modules/@mui/material/Unstable_TrapFocus/FocusTrap.js","../../node_modules/@mui/material/Modal/useModal.js","../../node_modules/@mui/material/Modal/modalClasses.js","../../node_modules/@mui/material/Modal/Modal.js","../../node_modules/@mui/material/Dialog/dialogClasses.js","../../node_modules/@mui/material/Dialog/DialogContext.js","../../node_modules/@mui/material/Dialog/Dialog.js","../../node_modules/@mui/material/DialogActions/dialogActionsClasses.js","../../node_modules/@mui/material/DialogActions/DialogActions.js","../../node_modules/@mui/material/DialogContent/dialogContentClasses.js","../../node_modules/@mui/material/DialogTitle/dialogTitleClasses.js","../../node_modules/@mui/material/DialogContent/DialogContent.js","../../node_modules/@mui/material/DialogContentText/dialogContentTextClasses.js","../../node_modules/@mui/material/DialogContentText/DialogContentText.js","../../node_modules/@mui/material/DialogTitle/DialogTitle.js","../../node_modules/@mui/material/FilledInput/FilledInput.js","../../node_modules/@mui/material/FormControl/formControlClasses.js","../../node_modules/@mui/material/FormControl/FormControl.js","../../node_modules/@mui/material/FormHelperText/formHelperTextClasses.js","../../node_modules/@mui/material/FormHelperText/FormHelperText.js","../../node_modules/@mui/material/FormLabel/formLabelClasses.js","../../node_modules/@mui/material/FormLabel/FormLabel.js","../../node_modules/@mui/material/Grow/Grow.js","../../node_modules/@mui/material/useMediaQuery/index.js","../../node_modules/@mui/material/Input/Input.js","../../node_modules/@mui/material/InputAdornment/inputAdornmentClasses.js","../../node_modules/@mui/material/InputAdornment/InputAdornment.js","../../node_modules/@mui/material/InputLabel/inputLabelClasses.js","../../node_modules/@mui/material/InputLabel/InputLabel.js","../../node_modules/@mui/material/List/ListContext.js","../../node_modules/@mui/material/List/listClasses.js","../../node_modules/@mui/material/List/List.js","../../node_modules/@mui/material/ListItem/listItemClasses.js","../../node_modules/@mui/material/ListItemButton/listItemButtonClasses.js","../../node_modules/@mui/material/ListItemSecondaryAction/listItemSecondaryActionClasses.js","../../node_modules/@mui/material/ListItemSecondaryAction/ListItemSecondaryAction.js","../../node_modules/@mui/material/ListItem/ListItem.js","../../node_modules/@mui/material/MenuList/MenuList.js","../../node_modules/@mui/material/Popover/popoverClasses.js","../../node_modules/@mui/material/Popover/Popover.js","../../node_modules/@mui/material/Menu/menuClasses.js","../../node_modules/@mui/material/Menu/Menu.js","../../node_modules/@mui/material/NativeSelect/nativeSelectClasses.js","../../node_modules/@mui/material/NativeSelect/NativeSelectInput.js","../../node_modules/@mui/material/OutlinedInput/NotchedOutline.js","../../node_modules/@mui/material/OutlinedInput/OutlinedInput.js","../../node_modules/@mui/material/Select/selectClasses.js","../../node_modules/@mui/material/Select/SelectInput.js","../../node_modules/@mui/material/Select/Select.js","../../node_modules/@mui/material/TextField/textFieldClasses.js","../../node_modules/@mui/material/TextField/TextField.js","../../src/contexts/FormContext.ts","../../node_modules/react-phone-input-2/lib/lib.js","../../src/hooks/useWindowDimensions.ts","../../src/helpers/string.ts","../../src/components/Step1Form/Step1Form.tsx","../../node_modules/@mui/x-date-pickers/LocalizationProvider/LocalizationProvider.js","../../node_modules/@mui/x-date-pickers/locales/utils/getPickersLocalization.js","../../node_modules/@mui/x-date-pickers/locales/enUS.js","../../node_modules/@mui/x-date-pickers/internals/hooks/useUtils.js","../../node_modules/@mui/x-date-pickers/hooks/usePickersTranslations.js","../../node_modules/@mui/x-date-pickers/icons/index.js","../../node_modules/@mui/x-date-pickers/internals/components/PickersArrowSwitcher/pickersArrowSwitcherClasses.js","../../node_modules/@mui/x-date-pickers/internals/components/PickersArrowSwitcher/PickersArrowSwitcher.js","../../node_modules/@mui/x-date-pickers/internals/utils/views.js","../../node_modules/@mui/x-date-pickers/internals/utils/time-utils.js","../../node_modules/@mui/x-date-pickers/internals/hooks/useViews.js","../../node_modules/@mui/x-date-pickers/internals/hooks/date-helpers-hooks.js","../../node_modules/@mui/x-date-pickers/internals/constants/dimensions.js","../../node_modules/@mui/x-date-pickers/internals/components/PickerViewRoot/PickerViewRoot.js","../../node_modules/@mui/x-date-pickers/internals/utils/date-utils.js","../../node_modules/@mui/x-date-pickers/internals/hooks/useValueWithTimezone.js","../../node_modules/@mui/x-date-pickers/internals/utils/getDefaultReferenceDate.js","../../node_modules/@mui/x-date-pickers/internals/hooks/useField/useField.utils.js","../../node_modules/@mui/x-date-pickers/internals/utils/valueManagers.js","../../node_modules/@mui/x-date-pickers/internals/utils/utils.js","../../node_modules/@mui/x-date-pickers/PickersDay/pickersDayClasses.js","../../node_modules/@mui/x-date-pickers/PickersDay/PickersDay.js","../../node_modules/@mui/x-date-pickers/validation/validateDate.js","../../node_modules/@mui/x-date-pickers/validation/extractValidationProps.js","../../node_modules/@mui/x-date-pickers/validation/useValidation.js","../../node_modules/@mui/x-date-pickers/internals/hooks/useField/buildSectionsFromFormat.js","../../node_modules/@mui/x-date-pickers/internals/hooks/useField/useFieldState.js","../../node_modules/@mui/x-date-pickers/internals/hooks/useField/useFieldCharacterEditing.js","../../node_modules/@mui/x-date-pickers/internals/hooks/useField/useFieldV7TextField.js","../../node_modules/@mui/x-date-pickers/internals/hooks/useField/useFieldV6TextField.js","../../node_modules/@mui/x-date-pickers/internals/hooks/useField/useField.js","../../node_modules/@mui/x-date-pickers/hooks/useClearableField.js","../../node_modules/@mui/x-date-pickers/hooks/useSplitFieldProps.js","../../node_modules/@mui/x-date-pickers/internals/components/PickersProvider.js","../../node_modules/@mui/x-date-pickers/internals/hooks/defaultizedFieldProps.js","../../node_modules/@mui/x-date-pickers/DateField/useDateField.js","../../node_modules/@mui/x-date-pickers/PickersTextField/pickersTextFieldClasses.js","../../node_modules/@mui/x-date-pickers/PickersTextField/PickersInputBase/pickersInputBaseClasses.js","../../node_modules/@mui/x-date-pickers/PickersSectionList/pickersSectionListClasses.js","../../node_modules/@mui/x-date-pickers/PickersSectionList/PickersSectionList.js","../../node_modules/@mui/x-date-pickers/PickersTextField/PickersInputBase/PickersInputBase.js","../../node_modules/@mui/x-date-pickers/PickersTextField/PickersOutlinedInput/pickersOutlinedInputClasses.js","../../node_modules/@mui/x-date-pickers/PickersTextField/PickersOutlinedInput/Outline.js","../../node_modules/@mui/x-date-pickers/PickersTextField/PickersOutlinedInput/PickersOutlinedInput.js","../../node_modules/@mui/x-date-pickers/PickersTextField/PickersFilledInput/pickersFilledInputClasses.js","../../node_modules/@mui/x-date-pickers/PickersTextField/PickersFilledInput/PickersFilledInput.js","../../node_modules/@mui/x-date-pickers/PickersTextField/PickersInput/pickersInputClasses.js","../../node_modules/@mui/x-date-pickers/PickersTextField/PickersInput/PickersInput.js","../../node_modules/@mui/x-date-pickers/PickersTextField/PickersTextField.js","../../node_modules/@mui/x-date-pickers/internals/utils/convertFieldResponseIntoMuiTextFieldProps.js","../../node_modules/@mui/x-date-pickers/DateField/DateField.js","../../node_modules/@mui/x-date-pickers/DateCalendar/useIsDateDisabled.js","../../node_modules/@mui/x-date-pickers/DateCalendar/useCalendarState.js","../../node_modules/@mui/x-date-pickers/DateCalendar/pickersFadeTransitionGroupClasses.js","../../node_modules/@mui/x-date-pickers/DateCalendar/PickersFadeTransitionGroup.js","../../node_modules/@mui/x-date-pickers/DateCalendar/pickersSlideTransitionClasses.js","../../node_modules/@mui/x-date-pickers/DateCalendar/PickersSlideTransition.js","../../node_modules/@mui/x-date-pickers/DateCalendar/dayCalendarClasses.js","../../node_modules/@mui/x-date-pickers/DateCalendar/DayCalendar.js","../../node_modules/@mui/x-date-pickers/MonthCalendar/pickersMonthClasses.js","../../node_modules/@mui/x-date-pickers/MonthCalendar/PickersMonth.js","../../node_modules/@mui/x-date-pickers/MonthCalendar/monthCalendarClasses.js","../../node_modules/@mui/x-date-pickers/MonthCalendar/MonthCalendar.js","../../node_modules/@mui/x-date-pickers/YearCalendar/pickersYearClasses.js","../../node_modules/@mui/x-date-pickers/YearCalendar/PickersYear.js","../../node_modules/@mui/x-date-pickers/YearCalendar/yearCalendarClasses.js","../../node_modules/@mui/x-date-pickers/YearCalendar/YearCalendar.js","../../node_modules/@mui/x-date-pickers/PickersCalendarHeader/pickersCalendarHeaderClasses.js","../../node_modules/@mui/x-date-pickers/PickersCalendarHeader/PickersCalendarHeader.js","../../node_modules/@mui/x-date-pickers/internals/hooks/useDefaultReduceAnimations.js","../../node_modules/@mui/x-date-pickers/DateCalendar/dateCalendarClasses.js","../../node_modules/@mui/x-date-pickers/DateCalendar/DateCalendar.js","../../node_modules/@mui/x-date-pickers/internals/components/pickersToolbarClasses.js","../../node_modules/@mui/x-date-pickers/internals/components/PickersToolbar.js","../../node_modules/@mui/x-date-pickers/DatePicker/datePickerToolbarClasses.js","../../node_modules/@mui/x-date-pickers/DatePicker/DatePickerToolbar.js","../../node_modules/@mui/x-date-pickers/DatePicker/shared.js","../../node_modules/@mui/x-date-pickers/internals/components/pickersPopperClasses.js","../../node_modules/@mui/x-date-pickers/internals/components/PickersPopper.js","../../node_modules/@mui/x-date-pickers/internals/hooks/useOpenState.js","../../node_modules/@mui/x-date-pickers/internals/hooks/usePicker/usePickerValue.js","../../node_modules/@mui/x-date-pickers/internals/hooks/usePicker/usePickerViews.js","../../node_modules/@mui/x-date-pickers/internals/hooks/useIsLandscape.js","../../node_modules/@mui/x-date-pickers/internals/hooks/usePicker/usePickerLayoutProps.js","../../node_modules/@mui/x-date-pickers/internals/hooks/usePicker/usePickerOwnerState.js","../../node_modules/@mui/x-date-pickers/internals/hooks/usePicker/usePicker.js","../../node_modules/@mui/x-date-pickers/PickersLayout/pickersLayoutClasses.js","../../node_modules/@mui/x-date-pickers/PickersActionBar/PickersActionBar.js","../../node_modules/@mui/x-date-pickers/PickersShortcuts/PickersShortcuts.js","../../node_modules/@mui/x-date-pickers/PickersLayout/usePickerLayout.js","../../node_modules/@mui/x-date-pickers/PickersLayout/PickersLayout.js","../../node_modules/@mui/x-date-pickers/internals/hooks/useDesktopPicker/useDesktopPicker.js","../../node_modules/@mui/x-date-pickers/dateViewRenderers/dateViewRenderers.js","../../node_modules/@mui/x-date-pickers/DesktopDatePicker/DesktopDatePicker.js","../../node_modules/@mui/x-date-pickers/internals/components/PickersModalDialog.js","../../node_modules/@mui/x-date-pickers/internals/hooks/useMobilePicker/useMobilePicker.js","../../node_modules/@mui/x-date-pickers/MobileDatePicker/MobileDatePicker.js","../../node_modules/@mui/x-date-pickers/DatePicker/DatePicker.js","../../node_modules/dayjs/dayjs.min.js","../../node_modules/dayjs/plugin/weekOfYear.js","../../node_modules/dayjs/plugin/customParseFormat.js","../../node_modules/dayjs/plugin/localizedFormat.js","../../node_modules/dayjs/plugin/isBetween.js","../../node_modules/dayjs/plugin/advancedFormat.js","../../node_modules/@mui/x-date-pickers/AdapterDayjs/AdapterDayjs.js","../../node_modules/dayjs/plugin/isSameOrAfter.js","../../node_modules/dayjs/locale/pl.js","../../src/components/Calendar/Calendar.tsx","../../node_modules/imask/esm/core/utils.js","../../node_modules/imask/esm/core/action-details.js","../../node_modules/imask/esm/core/holder.js","../../node_modules/imask/esm/masked/factory.js","../../node_modules/imask/esm/controls/mask-element.js","../../node_modules/imask/esm/controls/html-mask-element.js","../../node_modules/imask/esm/controls/html-input-mask-element.js","../../node_modules/imask/esm/controls/html-contenteditable-mask-element.js","../../node_modules/imask/esm/controls/input-history.js","../../node_modules/imask/esm/controls/input.js","../../node_modules/imask/esm/core/change-details.js","../../node_modules/imask/esm/core/continuous-tail-details.js","../../node_modules/imask/esm/masked/base.js","../../node_modules/imask/esm/masked/pattern/chunk-tail-details.js","../../node_modules/imask/esm/masked/pattern/cursor.js","../../node_modules/imask/esm/masked/pattern/fixed-definition.js","../../node_modules/imask/esm/masked/pattern/input-definition.js","../../node_modules/imask/esm/masked/regexp.js","../../node_modules/imask/esm/masked/pattern.js","../../node_modules/imask/esm/masked/range.js","../../node_modules/imask/esm/masked/date.js","../../node_modules/imask/esm/masked/dynamic.js","../../node_modules/imask/esm/masked/enum.js","../../node_modules/imask/esm/masked/function.js","../../node_modules/imask/esm/masked/number.js","../../node_modules/imask/esm/masked/pipe.js","../../node_modules/imask/esm/masked/repeat.js","../../node_modules/imask/esm/index.js","../../node_modules/react-imask/esm/mixin.js","../../node_modules/react-imask/esm/input.js","../../src/components/MaskComponent/TextMaskCustom.tsx","../../src/helpers/GetFirthDateFromPesel.ts","../../src/components/Step2Form/Step2Form.tsx","../../src/components/Step3Form/Row.tsx","../../src/components/Step3Form/Table.tsx","../../node_modules/@mui/icons-material/esm/SystemUpdateAlt.js","../../src/components/Step3Form/Step3Form.tsx","../../src/assets/grafika_2.svg","../../src/components/FinalForm/FinalForm.tsx","../../node_modules/cookie/dist/index.js","../../node_modules/react-router/dist/development/chunk-SYFQ2XB5.mjs","../../node_modules/decode-uri-component/index.js","../../node_modules/filter-obj/index.js","../../node_modules/split-on-first/index.js","../../node_modules/query-string/base.js","../../src/assets/ID.png","../../src/components/Step0Form/Step0Form.tsx","../../src/components/Contact/Option.tsx","../../src/assets/grafika_1.svg","../../src/assets/kontakt_telefon.svg","../../src/assets/kontakt_telefon_szary.svg","../../src/assets/kontakt_mail.svg","../../src/assets/kontakt_mail_szary.svg","../../src/assets/ludzik_szary.svg","../../src/components/Contact/Contact.tsx","../../src/assets/logo.png","../../src/components/Expired/Expired.tsx","../../src/components/ErrorPage/ErrorPage.tsx","../../src/components/Surveys/SurveyLabel.tsx","../../src/components/Surveys/SurveyString.tsx","../../src/components/Surveys/SurveyMultiSelect.tsx","../../src/components/Surveys/SurveySelect.tsx","../../src/components/Surveys/GenerateQuestion.tsx","../../src/components/Beneficiary/BeneficiaryItem.tsx","../../src/components/Beneficiary/Beneficiary.tsx","../../src/components/StepPPP/StepPPP.tsx","../../src/components/StepPPP/StepPPPHighRisk.tsx","../../src/App.tsx","../../node_modules/scheduler/cjs/scheduler.production.js","../../node_modules/scheduler/index.js","../../node_modules/react-dom/cjs/react-dom-client.production.js","../../node_modules/react-dom/client.js","../../src/index.tsx"],"sourcesContent":["/**\n * @license React\n * react-jsx-runtime.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\");\nfunction jsxProd(type, config, maybeKey) {\n var key = null;\n void 0 !== maybeKey && (key = \"\" + maybeKey);\n void 0 !== config.key && (key = \"\" + config.key);\n if (\"key\" in config) {\n maybeKey = {};\n for (var propName in config)\n \"key\" !== propName && (maybeKey[propName] = config[propName]);\n } else maybeKey = config;\n config = maybeKey.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== config ? config : null,\n props: maybeKey\n };\n}\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.jsx = jsxProd;\nexports.jsxs = jsxProd;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n","/**\n * @license React\n * react.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\"),\n REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n MAYBE_ITERATOR_SYMBOL = Symbol.iterator;\nfunction getIteratorFn(maybeIterable) {\n if (null === maybeIterable || \"object\" !== typeof maybeIterable) return null;\n maybeIterable =\n (MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL]) ||\n maybeIterable[\"@@iterator\"];\n return \"function\" === typeof maybeIterable ? maybeIterable : null;\n}\nvar ReactNoopUpdateQueue = {\n isMounted: function () {\n return !1;\n },\n enqueueForceUpdate: function () {},\n enqueueReplaceState: function () {},\n enqueueSetState: function () {}\n },\n assign = Object.assign,\n emptyObject = {};\nfunction Component(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\nComponent.prototype.isReactComponent = {};\nComponent.prototype.setState = function (partialState, callback) {\n if (\n \"object\" !== typeof partialState &&\n \"function\" !== typeof partialState &&\n null != partialState\n )\n throw Error(\n \"takes an object of state variables to update or a function which returns an object of state variables.\"\n );\n this.updater.enqueueSetState(this, partialState, callback, \"setState\");\n};\nComponent.prototype.forceUpdate = function (callback) {\n this.updater.enqueueForceUpdate(this, callback, \"forceUpdate\");\n};\nfunction ComponentDummy() {}\nComponentDummy.prototype = Component.prototype;\nfunction PureComponent(props, context, updater) {\n this.props = props;\n this.context = context;\n this.refs = emptyObject;\n this.updater = updater || ReactNoopUpdateQueue;\n}\nvar pureComponentPrototype = (PureComponent.prototype = new ComponentDummy());\npureComponentPrototype.constructor = PureComponent;\nassign(pureComponentPrototype, Component.prototype);\npureComponentPrototype.isPureReactComponent = !0;\nvar isArrayImpl = Array.isArray,\n ReactSharedInternals = { H: null, A: null, T: null, S: null },\n hasOwnProperty = Object.prototype.hasOwnProperty;\nfunction ReactElement(type, key, self, source, owner, props) {\n self = props.ref;\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key,\n ref: void 0 !== self ? self : null,\n props: props\n };\n}\nfunction cloneAndReplaceKey(oldElement, newKey) {\n return ReactElement(\n oldElement.type,\n newKey,\n void 0,\n void 0,\n void 0,\n oldElement.props\n );\n}\nfunction isValidElement(object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n}\nfunction escape(key) {\n var escaperLookup = { \"=\": \"=0\", \":\": \"=2\" };\n return (\n \"$\" +\n key.replace(/[=:]/g, function (match) {\n return escaperLookup[match];\n })\n );\n}\nvar userProvidedKeyEscapeRegex = /\\/+/g;\nfunction getElementKey(element, index) {\n return \"object\" === typeof element && null !== element && null != element.key\n ? escape(\"\" + element.key)\n : index.toString(36);\n}\nfunction noop$1() {}\nfunction resolveThenable(thenable) {\n switch (thenable.status) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n default:\n switch (\n (\"string\" === typeof thenable.status\n ? thenable.then(noop$1, noop$1)\n : ((thenable.status = \"pending\"),\n thenable.then(\n function (fulfilledValue) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"fulfilled\"),\n (thenable.value = fulfilledValue));\n },\n function (error) {\n \"pending\" === thenable.status &&\n ((thenable.status = \"rejected\"), (thenable.reason = error));\n }\n )),\n thenable.status)\n ) {\n case \"fulfilled\":\n return thenable.value;\n case \"rejected\":\n throw thenable.reason;\n }\n }\n throw thenable;\n}\nfunction mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {\n var type = typeof children;\n if (\"undefined\" === type || \"boolean\" === type) children = null;\n var invokeCallback = !1;\n if (null === children) invokeCallback = !0;\n else\n switch (type) {\n case \"bigint\":\n case \"string\":\n case \"number\":\n invokeCallback = !0;\n break;\n case \"object\":\n switch (children.$$typeof) {\n case REACT_ELEMENT_TYPE:\n case REACT_PORTAL_TYPE:\n invokeCallback = !0;\n break;\n case REACT_LAZY_TYPE:\n return (\n (invokeCallback = children._init),\n mapIntoArray(\n invokeCallback(children._payload),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n )\n );\n }\n }\n if (invokeCallback)\n return (\n (callback = callback(children)),\n (invokeCallback =\n \"\" === nameSoFar ? \".\" + getElementKey(children, 0) : nameSoFar),\n isArrayImpl(callback)\n ? ((escapedPrefix = \"\"),\n null != invokeCallback &&\n (escapedPrefix =\n invokeCallback.replace(userProvidedKeyEscapeRegex, \"$&/\") + \"/\"),\n mapIntoArray(callback, array, escapedPrefix, \"\", function (c) {\n return c;\n }))\n : null != callback &&\n (isValidElement(callback) &&\n (callback = cloneAndReplaceKey(\n callback,\n escapedPrefix +\n (null == callback.key ||\n (children && children.key === callback.key)\n ? \"\"\n : (\"\" + callback.key).replace(\n userProvidedKeyEscapeRegex,\n \"$&/\"\n ) + \"/\") +\n invokeCallback\n )),\n array.push(callback)),\n 1\n );\n invokeCallback = 0;\n var nextNamePrefix = \"\" === nameSoFar ? \".\" : nameSoFar + \":\";\n if (isArrayImpl(children))\n for (var i = 0; i < children.length; i++)\n (nameSoFar = children[i]),\n (type = nextNamePrefix + getElementKey(nameSoFar, i)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (((i = getIteratorFn(children)), \"function\" === typeof i))\n for (\n children = i.call(children), i = 0;\n !(nameSoFar = children.next()).done;\n\n )\n (nameSoFar = nameSoFar.value),\n (type = nextNamePrefix + getElementKey(nameSoFar, i++)),\n (invokeCallback += mapIntoArray(\n nameSoFar,\n array,\n escapedPrefix,\n type,\n callback\n ));\n else if (\"object\" === type) {\n if (\"function\" === typeof children.then)\n return mapIntoArray(\n resolveThenable(children),\n array,\n escapedPrefix,\n nameSoFar,\n callback\n );\n array = String(children);\n throw Error(\n \"Objects are not valid as a React child (found: \" +\n (\"[object Object]\" === array\n ? \"object with keys {\" + Object.keys(children).join(\", \") + \"}\"\n : array) +\n \"). If you meant to render a collection of children, use an array instead.\"\n );\n }\n return invokeCallback;\n}\nfunction mapChildren(children, func, context) {\n if (null == children) return children;\n var result = [],\n count = 0;\n mapIntoArray(children, result, \"\", \"\", function (child) {\n return func.call(context, child, count++);\n });\n return result;\n}\nfunction lazyInitializer(payload) {\n if (-1 === payload._status) {\n var ctor = payload._result;\n ctor = ctor();\n ctor.then(\n function (moduleObject) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 1), (payload._result = moduleObject);\n },\n function (error) {\n if (0 === payload._status || -1 === payload._status)\n (payload._status = 2), (payload._result = error);\n }\n );\n -1 === payload._status && ((payload._status = 0), (payload._result = ctor));\n }\n if (1 === payload._status) return payload._result.default;\n throw payload._result;\n}\nvar reportGlobalError =\n \"function\" === typeof reportError\n ? reportError\n : function (error) {\n if (\n \"object\" === typeof window &&\n \"function\" === typeof window.ErrorEvent\n ) {\n var event = new window.ErrorEvent(\"error\", {\n bubbles: !0,\n cancelable: !0,\n message:\n \"object\" === typeof error &&\n null !== error &&\n \"string\" === typeof error.message\n ? String(error.message)\n : String(error),\n error: error\n });\n if (!window.dispatchEvent(event)) return;\n } else if (\n \"object\" === typeof process &&\n \"function\" === typeof process.emit\n ) {\n process.emit(\"uncaughtException\", error);\n return;\n }\n console.error(error);\n };\nfunction noop() {}\nexports.Children = {\n map: mapChildren,\n forEach: function (children, forEachFunc, forEachContext) {\n mapChildren(\n children,\n function () {\n forEachFunc.apply(this, arguments);\n },\n forEachContext\n );\n },\n count: function (children) {\n var n = 0;\n mapChildren(children, function () {\n n++;\n });\n return n;\n },\n toArray: function (children) {\n return (\n mapChildren(children, function (child) {\n return child;\n }) || []\n );\n },\n only: function (children) {\n if (!isValidElement(children))\n throw Error(\n \"React.Children.only expected to receive a single React element child.\"\n );\n return children;\n }\n};\nexports.Component = Component;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.PureComponent = PureComponent;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n ReactSharedInternals;\nexports.act = function () {\n throw Error(\"act(...) is not supported in production builds of React.\");\n};\nexports.cache = function (fn) {\n return function () {\n return fn.apply(null, arguments);\n };\n};\nexports.cloneElement = function (element, config, children) {\n if (null === element || void 0 === element)\n throw Error(\n \"The argument must be a React element, but you passed \" + element + \".\"\n );\n var props = assign({}, element.props),\n key = element.key,\n owner = void 0;\n if (null != config)\n for (propName in (void 0 !== config.ref && (owner = void 0),\n void 0 !== config.key && (key = \"\" + config.key),\n config))\n !hasOwnProperty.call(config, propName) ||\n \"key\" === propName ||\n \"__self\" === propName ||\n \"__source\" === propName ||\n (\"ref\" === propName && void 0 === config.ref) ||\n (props[propName] = config[propName]);\n var propName = arguments.length - 2;\n if (1 === propName) props.children = children;\n else if (1 < propName) {\n for (var childArray = Array(propName), i = 0; i < propName; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n return ReactElement(element.type, key, void 0, void 0, owner, props);\n};\nexports.createContext = function (defaultValue) {\n defaultValue = {\n $$typeof: REACT_CONTEXT_TYPE,\n _currentValue: defaultValue,\n _currentValue2: defaultValue,\n _threadCount: 0,\n Provider: null,\n Consumer: null\n };\n defaultValue.Provider = defaultValue;\n defaultValue.Consumer = {\n $$typeof: REACT_CONSUMER_TYPE,\n _context: defaultValue\n };\n return defaultValue;\n};\nexports.createElement = function (type, config, children) {\n var propName,\n props = {},\n key = null;\n if (null != config)\n for (propName in (void 0 !== config.key && (key = \"\" + config.key), config))\n hasOwnProperty.call(config, propName) &&\n \"key\" !== propName &&\n \"__self\" !== propName &&\n \"__source\" !== propName &&\n (props[propName] = config[propName]);\n var childrenLength = arguments.length - 2;\n if (1 === childrenLength) props.children = children;\n else if (1 < childrenLength) {\n for (var childArray = Array(childrenLength), i = 0; i < childrenLength; i++)\n childArray[i] = arguments[i + 2];\n props.children = childArray;\n }\n if (type && type.defaultProps)\n for (propName in ((childrenLength = type.defaultProps), childrenLength))\n void 0 === props[propName] &&\n (props[propName] = childrenLength[propName]);\n return ReactElement(type, key, void 0, void 0, null, props);\n};\nexports.createRef = function () {\n return { current: null };\n};\nexports.forwardRef = function (render) {\n return { $$typeof: REACT_FORWARD_REF_TYPE, render: render };\n};\nexports.isValidElement = isValidElement;\nexports.lazy = function (ctor) {\n return {\n $$typeof: REACT_LAZY_TYPE,\n _payload: { _status: -1, _result: ctor },\n _init: lazyInitializer\n };\n};\nexports.memo = function (type, compare) {\n return {\n $$typeof: REACT_MEMO_TYPE,\n type: type,\n compare: void 0 === compare ? null : compare\n };\n};\nexports.startTransition = function (scope) {\n var prevTransition = ReactSharedInternals.T,\n currentTransition = {};\n ReactSharedInternals.T = currentTransition;\n try {\n var returnValue = scope(),\n onStartTransitionFinish = ReactSharedInternals.S;\n null !== onStartTransitionFinish &&\n onStartTransitionFinish(currentTransition, returnValue);\n \"object\" === typeof returnValue &&\n null !== returnValue &&\n \"function\" === typeof returnValue.then &&\n returnValue.then(noop, reportGlobalError);\n } catch (error) {\n reportGlobalError(error);\n } finally {\n ReactSharedInternals.T = prevTransition;\n }\n};\nexports.unstable_useCacheRefresh = function () {\n return ReactSharedInternals.H.useCacheRefresh();\n};\nexports.use = function (usable) {\n return ReactSharedInternals.H.use(usable);\n};\nexports.useActionState = function (action, initialState, permalink) {\n return ReactSharedInternals.H.useActionState(action, initialState, permalink);\n};\nexports.useCallback = function (callback, deps) {\n return ReactSharedInternals.H.useCallback(callback, deps);\n};\nexports.useContext = function (Context) {\n return ReactSharedInternals.H.useContext(Context);\n};\nexports.useDebugValue = function () {};\nexports.useDeferredValue = function (value, initialValue) {\n return ReactSharedInternals.H.useDeferredValue(value, initialValue);\n};\nexports.useEffect = function (create, deps) {\n return ReactSharedInternals.H.useEffect(create, deps);\n};\nexports.useId = function () {\n return ReactSharedInternals.H.useId();\n};\nexports.useImperativeHandle = function (ref, create, deps) {\n return ReactSharedInternals.H.useImperativeHandle(ref, create, deps);\n};\nexports.useInsertionEffect = function (create, deps) {\n return ReactSharedInternals.H.useInsertionEffect(create, deps);\n};\nexports.useLayoutEffect = function (create, deps) {\n return ReactSharedInternals.H.useLayoutEffect(create, deps);\n};\nexports.useMemo = function (create, deps) {\n return ReactSharedInternals.H.useMemo(create, deps);\n};\nexports.useOptimistic = function (passthrough, reducer) {\n return ReactSharedInternals.H.useOptimistic(passthrough, reducer);\n};\nexports.useReducer = function (reducer, initialArg, init) {\n return ReactSharedInternals.H.useReducer(reducer, initialArg, init);\n};\nexports.useRef = function (initialValue) {\n return ReactSharedInternals.H.useRef(initialValue);\n};\nexports.useState = function (initialState) {\n return ReactSharedInternals.H.useState(initialState);\n};\nexports.useSyncExternalStore = function (\n subscribe,\n getSnapshot,\n getServerSnapshot\n) {\n return ReactSharedInternals.H.useSyncExternalStore(\n subscribe,\n getSnapshot,\n getServerSnapshot\n );\n};\nexports.useTransition = function () {\n return ReactSharedInternals.H.useTransition();\n};\nexports.version = \"19.0.0\";\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react.production.js');\n} else {\n module.exports = require('./cjs/react.development.js');\n}\n","/**\n * @license React\n * react-dom.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction formatProdErrorMessage(code) {\n var url = \"https://react.dev/errors/\" + code;\n if (1 < arguments.length) {\n url += \"?args[]=\" + encodeURIComponent(arguments[1]);\n for (var i = 2; i < arguments.length; i++)\n url += \"&args[]=\" + encodeURIComponent(arguments[i]);\n }\n return (\n \"Minified React error #\" +\n code +\n \"; visit \" +\n url +\n \" for the full message or use the non-minified dev environment for full errors and additional helpful warnings.\"\n );\n}\nfunction noop() {}\nvar Internals = {\n d: {\n f: noop,\n r: function () {\n throw Error(formatProdErrorMessage(522));\n },\n D: noop,\n C: noop,\n L: noop,\n m: noop,\n X: noop,\n S: noop,\n M: noop\n },\n p: 0,\n findDOMNode: null\n },\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\");\nfunction createPortal$1(children, containerInfo, implementation) {\n var key =\n 3 < arguments.length && void 0 !== arguments[3] ? arguments[3] : null;\n return {\n $$typeof: REACT_PORTAL_TYPE,\n key: null == key ? null : \"\" + key,\n children: children,\n containerInfo: containerInfo,\n implementation: implementation\n };\n}\nvar ReactSharedInternals =\n React.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;\nfunction getCrossOriginStringAs(as, input) {\n if (\"font\" === as) return \"\";\n if (\"string\" === typeof input)\n return \"use-credentials\" === input ? input : \"\";\n}\nexports.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE =\n Internals;\nexports.createPortal = function (children, container) {\n var key =\n 2 < arguments.length && void 0 !== arguments[2] ? arguments[2] : null;\n if (\n !container ||\n (1 !== container.nodeType &&\n 9 !== container.nodeType &&\n 11 !== container.nodeType)\n )\n throw Error(formatProdErrorMessage(299));\n return createPortal$1(children, container, null, key);\n};\nexports.flushSync = function (fn) {\n var previousTransition = ReactSharedInternals.T,\n previousUpdatePriority = Internals.p;\n try {\n if (((ReactSharedInternals.T = null), (Internals.p = 2), fn)) return fn();\n } finally {\n (ReactSharedInternals.T = previousTransition),\n (Internals.p = previousUpdatePriority),\n Internals.d.f();\n }\n};\nexports.preconnect = function (href, options) {\n \"string\" === typeof href &&\n (options\n ? ((options = options.crossOrigin),\n (options =\n \"string\" === typeof options\n ? \"use-credentials\" === options\n ? options\n : \"\"\n : void 0))\n : (options = null),\n Internals.d.C(href, options));\n};\nexports.prefetchDNS = function (href) {\n \"string\" === typeof href && Internals.d.D(href);\n};\nexports.preinit = function (href, options) {\n if (\"string\" === typeof href && options && \"string\" === typeof options.as) {\n var as = options.as,\n crossOrigin = getCrossOriginStringAs(as, options.crossOrigin),\n integrity =\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n fetchPriority =\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0;\n \"style\" === as\n ? Internals.d.S(\n href,\n \"string\" === typeof options.precedence ? options.precedence : void 0,\n {\n crossOrigin: crossOrigin,\n integrity: integrity,\n fetchPriority: fetchPriority\n }\n )\n : \"script\" === as &&\n Internals.d.X(href, {\n crossOrigin: crossOrigin,\n integrity: integrity,\n fetchPriority: fetchPriority,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\n });\n }\n};\nexports.preinitModule = function (href, options) {\n if (\"string\" === typeof href)\n if (\"object\" === typeof options && null !== options) {\n if (null == options.as || \"script\" === options.as) {\n var crossOrigin = getCrossOriginStringAs(\n options.as,\n options.crossOrigin\n );\n Internals.d.M(href, {\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0\n });\n }\n } else null == options && Internals.d.M(href);\n};\nexports.preload = function (href, options) {\n if (\n \"string\" === typeof href &&\n \"object\" === typeof options &&\n null !== options &&\n \"string\" === typeof options.as\n ) {\n var as = options.as,\n crossOrigin = getCrossOriginStringAs(as, options.crossOrigin);\n Internals.d.L(href, as, {\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0,\n nonce: \"string\" === typeof options.nonce ? options.nonce : void 0,\n type: \"string\" === typeof options.type ? options.type : void 0,\n fetchPriority:\n \"string\" === typeof options.fetchPriority\n ? options.fetchPriority\n : void 0,\n referrerPolicy:\n \"string\" === typeof options.referrerPolicy\n ? options.referrerPolicy\n : void 0,\n imageSrcSet:\n \"string\" === typeof options.imageSrcSet ? options.imageSrcSet : void 0,\n imageSizes:\n \"string\" === typeof options.imageSizes ? options.imageSizes : void 0,\n media: \"string\" === typeof options.media ? options.media : void 0\n });\n }\n};\nexports.preloadModule = function (href, options) {\n if (\"string\" === typeof href)\n if (options) {\n var crossOrigin = getCrossOriginStringAs(options.as, options.crossOrigin);\n Internals.d.m(href, {\n as:\n \"string\" === typeof options.as && \"script\" !== options.as\n ? options.as\n : void 0,\n crossOrigin: crossOrigin,\n integrity:\n \"string\" === typeof options.integrity ? options.integrity : void 0\n });\n } else Internals.d.m(href);\n};\nexports.requestFormReset = function (form) {\n Internals.d.r(form);\n};\nexports.unstable_batchedUpdates = function (fn, a) {\n return fn(a);\n};\nexports.useFormState = function (action, initialState, permalink) {\n return ReactSharedInternals.H.useFormState(action, initialState, permalink);\n};\nexports.useFormStatus = function () {\n return ReactSharedInternals.H.useHostTransitionStatus();\n};\nexports.version = \"19.0.0\";\n","'use strict';\n\nfunction checkDCE() {\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\n if (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ === 'undefined' ||\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE !== 'function'\n ) {\n return;\n }\n if (process.env.NODE_ENV !== 'production') {\n // This branch is unreachable because this function is only called\n // in production, but the condition is true only in development.\n // Therefore if the branch is still here, dead code elimination wasn't\n // properly applied.\n // Don't change the message. React DevTools relies on it. Also make sure\n // this message doesn't occur elsewhere in this function, or it will cause\n // a false positive.\n throw new Error('^_^');\n }\n try {\n // Verify that the code above has been dead code eliminated (DCE'd).\n __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE);\n } catch (err) {\n // DevTools shouldn't crash React, no matter what.\n // We should still report in case we break this code.\n console.error(err);\n }\n}\n\nif (process.env.NODE_ENV === 'production') {\n // DCE check should happen before ReactDOM bundle executes so that\n // DevTools can report bad minification during injection.\n checkDCE();\n module.exports = require('./cjs/react-dom.production.js');\n} else {\n module.exports = require('./cjs/react-dom.development.js');\n}\n","import \"./Step.css\";\ninterface IStepProps {\n image: string;\n doneImage: string;\n children: JSX.Element | string;\n active?: boolean;\n done?: boolean;\n}\n\nconst Step = ({ image, doneImage, children, active, done }: IStepProps) => {\n const getClasses = () => {\n if (done) {\n return \"grey\";\n } else if (active) {\n return \"red bold2 stepBig\";\n }\n return \"\";\n };\n\n return (\n
\n

{children}

\n \"\"\n
\n );\n};\n\nexport { Step };\n","export default \"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2021.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2075%2075'%20style='enable-background:new%200%200%2075%2075;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23AC906B;}%20%3c/style%3e%3cpath%20class='st0'%20d='M38.8,37.9c0.1,0.3,0.2,0.7,0.2,1.1c0,1.6-1.3,2.9-2.9,2.9s-2.9-1.3-2.9-2.9s1.2-3,2.8-3c0.2,0,0.3,0,0.5,0%20l4.6-5.7c0.5-0.6,1.4-0.7,2.1-0.2c0.6,0.5,0.7,1.4,0.2,2.1L38.8,37.9z%20M36.9,53.4c-0.3,0-0.6,0-0.9,0c-8,0-14.4-6.5-14.4-14.4%20S28.1,24.5,36,24.5c7.8,0,14.3,6.4,14.4,14.2c0,0.8,0.7,1.5,1.5,1.4c0.8,0,1.5-0.7,1.4-1.5c-0.1-4.6-1.9-8.9-5.2-12.1%20c-2.9-2.9-6.7-4.6-10.7-4.9v-1.5c0-0.8-0.7-1.5-1.5-1.5s-1.5,0.7-1.5,1.5v1.5c-4.1,0.3-7.9,2.1-10.8,5c-3.3,3.3-5.1,7.6-5.1,12.3%20s1.8,9,5.1,12.3s7.6,5.1,12.3,5.1c0.3,0,0.7,0,1,0c0.8,0,1.4-0.7,1.4-1.6C38.4,53.9,37.7,53.3,36.9,53.4L36.9,53.4z%20M46.1,22.3%20l4,3.3c0.3,0.2,0.6,0.3,0.9,0.3c0.4,0,0.8-0.2,1.1-0.5c0.5-0.6,0.4-1.6-0.2-2.1l-4-3.3c-0.6-0.5-1.6-0.4-2.1,0.2%20S45.4,21.8,46.1,22.3L46.1,22.3z%20M21.1,25.9c0.3,0,0.7-0.1,0.9-0.3l4-3.3c0.6-0.5,0.7-1.4,0.2-2.1s-1.4-0.7-2.1-0.2l-4,3.3%20c-0.6,0.5-0.7,1.4-0.2,2.1C20.2,25.7,20.7,25.9,21.1,25.9z%20M56.3,47.5c0,0.9-0.5,1.8-1.3,2.2L44.9,56c-0.4,0.3-0.9,0.4-1.4,0.4%20c-0.4,0-0.9-0.1-1.3-0.3c-0.8-0.5-1.3-1.3-1.3-2.3V41.3c0-0.9,0.5-1.8,1.3-2.3s1.8-0.4,2.6,0L55,45.2C55.9,45.8,56.4,46.6,56.3,47.5%20L56.3,47.5z%20M53.1,47.5l-9.3-5.6v11.3L53.1,47.5z'/%3e%3cpath%20class='st0'%20d='M37.5,5.5c17.6,0,32,14.4,32,32s-14.4,32-32,32s-32-14.4-32-32S19.9,5.5,37.5,5.5%20M37.5,0.5%20c-20.4,0-37,16.6-37,37s16.6,37,37,37s37-16.6,37-37S57.9,0.5,37.5,0.5L37.5,0.5z'/%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2021.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2075%2075'%20style='enable-background:new%200%200%2075%2075;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%231D1D1B;}%20%3c/style%3e%3cpath%20class='st0'%20d='M38.8,37.9c0.1,0.3,0.2,0.7,0.2,1.1c0,1.6-1.3,2.9-2.9,2.9s-2.9-1.3-2.9-2.9s1.2-3,2.8-3c0.2,0,0.3,0,0.5,0%20l4.6-5.7c0.5-0.6,1.4-0.7,2.1-0.2c0.6,0.5,0.7,1.4,0.2,2.1L38.8,37.9z%20M36.9,53.4c-0.3,0-0.6,0-0.9,0c-8,0-14.4-6.5-14.4-14.4%20S28.1,24.5,36,24.5c7.8,0,14.3,6.4,14.4,14.2c0,0.8,0.7,1.5,1.5,1.4c0.8,0,1.5-0.7,1.4-1.5c-0.1-4.6-1.9-8.9-5.2-12.1%20c-2.9-2.9-6.7-4.6-10.7-4.9v-1.5c0-0.8-0.7-1.5-1.5-1.5s-1.5,0.7-1.5,1.5v1.5c-4.1,0.3-7.9,2.1-10.8,5c-3.3,3.3-5.1,7.6-5.1,12.3%20s1.8,9,5.1,12.3s7.6,5.1,12.3,5.1c0.3,0,0.7,0,1,0c0.8,0,1.4-0.7,1.4-1.6C38.4,53.9,37.7,53.3,36.9,53.4L36.9,53.4z%20M46.1,22.3%20l4,3.3c0.3,0.2,0.6,0.3,0.9,0.3c0.4,0,0.8-0.2,1.1-0.5c0.5-0.6,0.4-1.6-0.2-2.1l-4-3.3c-0.6-0.5-1.6-0.4-2.1,0.2%20S45.4,21.8,46.1,22.3L46.1,22.3z%20M21.1,25.9c0.3,0,0.7-0.1,0.9-0.3l4-3.3c0.6-0.5,0.7-1.4,0.2-2.1s-1.4-0.7-2.1-0.2l-4,3.3%20c-0.6,0.5-0.7,1.4-0.2,2.1C20.2,25.7,20.7,25.9,21.1,25.9z%20M56.3,47.5c0,0.9-0.5,1.8-1.3,2.2L44.9,56c-0.4,0.3-0.9,0.4-1.4,0.4%20c-0.4,0-0.9-0.1-1.3-0.3c-0.8-0.5-1.3-1.3-1.3-2.3V41.3c0-0.9,0.5-1.8,1.3-2.3s1.8-0.4,2.6,0L55,45.2C55.9,45.8,56.4,46.6,56.3,47.5%20L56.3,47.5z%20M53.1,47.5l-9.3-5.6v11.3L53.1,47.5z'/%3e%3cpath%20class='st0'%20d='M37.5,5.5c17.6,0,32,14.4,32,32s-14.4,32-32,32s-32-14.4-32-32S19.9,5.5,37.5,5.5%20M37.5,0.5%20c-20.4,0-37,16.6-37,37s16.6,37,37,37s37-16.6,37-37S57.9,0.5,37.5,0.5L37.5,0.5z'/%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2021.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2075%2075'%20style='enable-background:new%200%200%2075%2075;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23AC906B;}%20.st1{fill:%23AC906B;stroke:%23AC906B;stroke-miterlimit:10;}%20%3c/style%3e%3cpath%20class='st0'%20d='M37.5,5.5c17.6,0,32,14.4,32,32s-14.4,32-32,32s-32-14.4-32-32S19.9,5.5,37.5,5.5%20M37.5,0.5%20c-20.4,0-37,16.6-37,37s16.6,37,37,37s37-16.6,37-37S57.9,0.5,37.5,0.5L37.5,0.5z'/%3e%3cg%20id='Contacts'%3e%3cpath%20class='st1'%20d='M54.2,16.3H23.1c-1.9,0-3.5,1.6-3.5,3.5V22h-1.4c-1.6,0-2.8,1.3-2.8,2.8c0,1.6,1.3,2.8,2.8,2.8h1.4v2.8h-1.4%20c-1.6,0-2.8,1.3-2.8,2.8c0,1.6,1.3,2.8,2.8,2.8h1.4v3.5h-1.4c-1.6,0-2.8,1.3-2.8,2.8c0,1.6,1.3,2.8,2.8,2.8h1.4v2.8h-1.4%20c-1.6,0-2.8,1.3-2.8,2.8s1.3,2.8,2.8,2.8h1.4v1.4c0,1.9,1.6,3.5,3.5,3.5h31.1c1.9,0,3.5-1.6,3.5-3.5V19.8%20C57.7,17.9,56.1,16.3,54.2,16.3z%20M18.1,26.2c-0.8,0-1.4-0.6-1.4-1.4s0.6-1.4,1.4-1.4h4.2c0.8,0,1.4,0.6,1.4,1.4s-0.6,1.4-1.4,1.4%20H18.1z%20M16.7,33.3c0-0.8,0.6-1.4,1.4-1.4h4.2c0.8,0,1.4,0.6,1.4,1.4s-0.6,1.4-1.4,1.4h-4.2C17.4,34.7,16.7,34,16.7,33.3z%20M16.7,42.4c0-0.8,0.6-1.4,1.4-1.4h4.2c0.8,0,1.4,0.6,1.4,1.4c0,0.8-0.6,1.4-1.4,1.4h-4.2C17.4,43.9,16.7,43.2,16.7,42.4z%20M16.7,50.9c0-0.8,0.6-1.4,1.4-1.4h4.2c0.8,0,1.4,0.6,1.4,1.4s-0.6,1.4-1.4,1.4h-4.2C17.4,52.3,16.7,51.7,16.7,50.9z%20M28,57.3h-4.9%20c-1.2,0-2.1-0.9-2.1-2.1v-1.4h1.4c1.6,0,2.8-1.3,2.8-2.8s-1.3-2.8-2.8-2.8H21v-2.8h1.4c1.6,0,2.8-1.3,2.8-2.8%20c0-1.6-1.3-2.8-2.8-2.8H21v-3.5h1.4c1.6,0,2.8-1.3,2.8-2.8c0-1.6-1.3-2.8-2.8-2.8H21v-2.8h1.4c1.6,0,2.8-1.3,2.8-2.8%20c0-1.6-1.3-2.8-2.8-2.8H21v-2.1c0-1.2,0.9-2.1,2.1-2.1H28V57.3z%20M56.3,55.2c0,1.2-0.9,2.1-2.1,2.1H29.4V17.7h24.7%20c1.2,0,2.1,0.9,2.1,2.1v35.4H56.3z'/%3e%3cpath%20class='st1'%20d='M42.9,26.9c-5.8,0-10.6,4.7-10.6,10.6S37,48.1,42.9,48.1s10.6-4.7,10.6-10.6C53.4,31.7,48.7,26.9,42.9,26.9z%20M37.2,44.7v-3c0-1.9,1.6-3.5,3.5-3.5H45c1.9,0,3.5,1.6,3.5,3.5v3C45.2,47.3,40.5,47.3,37.2,44.7L37.2,44.7z%20M42.9,36.8%20c-1.6,0-2.8-1.3-2.8-2.8s1.3-2.8,2.8-2.8s2.8,1.3,2.8,2.8S44.4,36.8,42.9,36.8z%20M49.9,43.4v-1.6c0-2.4-1.7-4.4-4-4.8%20c1.6-1.7,1.6-4.4-0.1-6c-1.7-1.6-4.4-1.6-6,0.1c-1.6,1.6-1.6,4.2,0,5.9c-2.3,0.5-4,2.5-4,4.8v1.6c-3.2-3.9-2.7-9.7,1.2-12.9%20s9.7-2.7,12.9,1.2C52.7,35,52.7,40,49.9,43.4z'/%3e%3c/g%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2021.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2075%2075'%20style='enable-background:new%200%200%2075%2075;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%231D1D1B;stroke:%231D1D1B;stroke-miterlimit:10;}%20%3c/style%3e%3cpath%20d='M37.5,5.5c17.6,0,32,14.4,32,32s-14.4,32-32,32s-32-14.4-32-32S19.9,5.5,37.5,5.5%20M37.5,0.5c-20.4,0-37,16.6-37,37%20s16.6,37,37,37s37-16.6,37-37S57.9,0.5,37.5,0.5L37.5,0.5z'/%3e%3cg%20id='Contacts'%3e%3cpath%20class='st0'%20d='M54.2,16.3H23.1c-1.9,0-3.5,1.6-3.5,3.5V22h-1.4c-1.6,0-2.8,1.3-2.8,2.8c0,1.6,1.3,2.8,2.8,2.8h1.4v2.8h-1.4%20c-1.6,0-2.8,1.3-2.8,2.8c0,1.6,1.3,2.8,2.8,2.8h1.4v3.5h-1.4c-1.6,0-2.8,1.3-2.8,2.8c0,1.6,1.3,2.8,2.8,2.8h1.4v2.8h-1.4%20c-1.6,0-2.8,1.3-2.8,2.8s1.3,2.8,2.8,2.8h1.4v1.4c0,1.9,1.6,3.5,3.5,3.5h31.1c1.9,0,3.5-1.6,3.5-3.5V19.8%20C57.7,17.9,56.1,16.3,54.2,16.3z%20M18.1,26.2c-0.8,0-1.4-0.6-1.4-1.4s0.6-1.4,1.4-1.4h4.2c0.8,0,1.4,0.6,1.4,1.4s-0.6,1.4-1.4,1.4%20H18.1z%20M16.7,33.3c0-0.8,0.6-1.4,1.4-1.4h4.2c0.8,0,1.4,0.6,1.4,1.4s-0.6,1.4-1.4,1.4h-4.2C17.4,34.7,16.7,34,16.7,33.3z%20M16.7,42.4c0-0.8,0.6-1.4,1.4-1.4h4.2c0.8,0,1.4,0.6,1.4,1.4c0,0.8-0.6,1.4-1.4,1.4h-4.2C17.4,43.9,16.7,43.2,16.7,42.4z%20M16.7,50.9c0-0.8,0.6-1.4,1.4-1.4h4.2c0.8,0,1.4,0.6,1.4,1.4s-0.6,1.4-1.4,1.4h-4.2C17.4,52.3,16.7,51.7,16.7,50.9z%20M28,57.3h-4.9%20c-1.2,0-2.1-0.9-2.1-2.1v-1.4h1.4c1.6,0,2.8-1.3,2.8-2.8s-1.3-2.8-2.8-2.8H21v-2.8h1.4c1.6,0,2.8-1.3,2.8-2.8%20c0-1.6-1.3-2.8-2.8-2.8H21v-3.5h1.4c1.6,0,2.8-1.3,2.8-2.8c0-1.6-1.3-2.8-2.8-2.8H21v-2.8h1.4c1.6,0,2.8-1.3,2.8-2.8%20c0-1.6-1.3-2.8-2.8-2.8H21v-2.1c0-1.2,0.9-2.1,2.1-2.1H28V57.3z%20M56.3,55.2c0,1.2-0.9,2.1-2.1,2.1H29.4V17.7h24.7%20c1.2,0,2.1,0.9,2.1,2.1v35.4H56.3z'/%3e%3cpath%20class='st0'%20d='M42.9,26.9c-5.8,0-10.6,4.7-10.6,10.6S37,48.1,42.9,48.1s10.6-4.7,10.6-10.6C53.4,31.7,48.7,26.9,42.9,26.9z%20M37.2,44.7v-3c0-1.9,1.6-3.5,3.5-3.5H45c1.9,0,3.5,1.6,3.5,3.5v3C45.2,47.3,40.5,47.3,37.2,44.7L37.2,44.7z%20M42.9,36.8%20c-1.6,0-2.8-1.3-2.8-2.8s1.3-2.8,2.8-2.8s2.8,1.3,2.8,2.8S44.4,36.8,42.9,36.8z%20M49.9,43.4v-1.6c0-2.4-1.7-4.4-4-4.8%20c1.6-1.7,1.6-4.4-0.1-6c-1.7-1.6-4.4-1.6-6,0.1c-1.6,1.6-1.6,4.2,0,5.9c-2.3,0.5-4,2.5-4,4.8v1.6c-3.2-3.9-2.7-9.7,1.2-12.9%20s9.7-2.7,12.9,1.2C52.7,35,52.7,40,49.9,43.4z'/%3e%3c/g%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2021.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2075%2075'%20style='enable-background:new%200%200%2075%2075;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23AC906B;}%20%3c/style%3e%3cpath%20class='st0'%20d='M37.5,5.5c17.6,0,32,14.4,32,32s-14.4,32-32,32s-32-14.4-32-32S19.9,5.5,37.5,5.5%20M37.5,0.5%20c-20.4,0-37,16.6-37,37s16.6,37,37,37s37-16.6,37-37S57.9,0.5,37.5,0.5L37.5,0.5z'/%3e%3cg%3e%3cpath%20class='st0'%20d='M31.1,26h12.7c0.7,0,1.3-0.6,1.3-1.3c0-0.7-0.6-1.3-1.3-1.3H31.1c-0.7,0-1.3,0.6-1.3,1.3%20C29.8,25.5,30.4,26,31.1,26L31.1,26z'/%3e%3cpath%20class='st0'%20d='M31.1,32.2h12.7c0.7,0,1.3-0.6,1.3-1.3c0-0.7-0.6-1.3-1.3-1.3H31.1c-0.7,0-1.3,0.6-1.3,1.3%20C29.8,31.6,30.4,32.2,31.1,32.2L31.1,32.2z'/%3e%3cpath%20class='st0'%20d='M58.7,27.1l-5.8-2.4v-7.8c0-0.7-0.6-1.3-1.3-1.3H23.5c-0.7,0-1.3,0.6-1.3,1.3v7.8l-5.8,2.4%20c-0.5,0.2-0.8,0.7-0.8,1.2v27.8c0,0.7,0.6,1.3,1.3,1.3h41.3c0.7,0,1.3-0.6,1.3-1.3V28.3C59.4,27.8,59.1,27.3,58.7,27.1z%20M18.1,31.4%20l12,11.9l-12,10.1V31.4z%20M37.5,40.3l17.2,14.5H20.3L37.5,40.3z%20M44.9,43.2l12-11.9v22L44.9,43.2z%20M55.9,28.7l-3.1,3v-4.3L55.9,28.7%20z%20M50.3,18.1v16.2L43,41.6l-4.6-3.9c-0.5-0.4-1.2-0.4-1.7,0L32,41.6l-7.3-7.2V18.1H50.3z%20M22.2,31.8l-3.1-3l3.1-1.3V31.8z'/%3e%3c/g%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2021.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2075%2075'%20style='enable-background:new%200%200%2075%2075;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%231D1D1B;}%20%3c/style%3e%3cpath%20class='st0'%20d='M37.5,5.5c17.6,0,32,14.4,32,32s-14.4,32-32,32s-32-14.4-32-32S19.9,5.5,37.5,5.5%20M37.5,0.5%20c-20.4,0-37,16.6-37,37s16.6,37,37,37s37-16.6,37-37S57.9,0.5,37.5,0.5L37.5,0.5z'/%3e%3cg%3e%3cpath%20class='st0'%20d='M31.1,26h12.7c0.7,0,1.3-0.6,1.3-1.3c0-0.7-0.6-1.3-1.3-1.3H31.1c-0.7,0-1.3,0.6-1.3,1.3%20C29.8,25.5,30.4,26,31.1,26L31.1,26z'/%3e%3cpath%20class='st0'%20d='M31.1,32.2h12.7c0.7,0,1.3-0.6,1.3-1.3c0-0.7-0.6-1.3-1.3-1.3H31.1c-0.7,0-1.3,0.6-1.3,1.3%20C29.8,31.6,30.4,32.2,31.1,32.2L31.1,32.2z'/%3e%3cpath%20class='st0'%20d='M58.7,27.1l-5.8-2.4v-7.8c0-0.7-0.6-1.3-1.3-1.3H23.5c-0.7,0-1.3,0.6-1.3,1.3v7.8l-5.8,2.4%20c-0.5,0.2-0.8,0.7-0.8,1.2v27.8c0,0.7,0.6,1.3,1.3,1.3h41.3c0.7,0,1.3-0.6,1.3-1.3V28.3C59.4,27.8,59.1,27.3,58.7,27.1z%20M18.1,31.4%20l12,11.9l-12,10.1V31.4z%20M37.5,40.3l17.2,14.5H20.3L37.5,40.3z%20M44.9,43.2l12-11.9v22L44.9,43.2z%20M55.9,28.7l-3.1,3v-4.3L55.9,28.7%20z%20M50.3,18.1v16.2L43,41.6l-4.6-3.9c-0.5-0.4-1.2-0.4-1.7,0L32,41.6l-7.3-7.2V18.1H50.3z%20M22.2,31.8l-3.1-3l3.1-1.3V31.8z'/%3e%3c/g%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2021.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2075%2075'%20style='enable-background:new%200%200%2075%2075;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23AC906B;}%20%3c/style%3e%3cpath%20class='st0'%20d='M37.5,5.5c17.6,0,32,14.4,32,32s-14.4,32-32,32s-32-14.4-32-32S19.9,5.5,37.5,5.5%20M37.5,0.5%20c-20.4,0-37,16.6-37,37s16.6,37,37,37s37-16.6,37-37S57.9,0.5,37.5,0.5L37.5,0.5z'/%3e%3cg%3e%3cpath%20class='st0'%20d='M53.7,60.3c-3.7,0-6.7-3-6.7-6.7v-10c0-2.4,1.9-4.3,4.3-4.3c2.4,0,4.3,1.9,4.3,4.3v9.5c0,0.8-0.6,1.4-1.4,1.4%20s-1.4-0.6-1.4-1.4v-9.5c0-0.8-0.6-1.4-1.4-1.4c-0.8,0-1.4,0.6-1.4,1.4v10c0,2.1,1.7,3.8,3.8,3.8s3.8-1.7,3.8-3.8V40.8%20c0-0.8,0.6-1.4,1.4-1.4c0.8,0,1.4,0.6,1.4,1.4v12.8C60.3,57.3,57.3,60.3,53.7,60.3z'/%3e%3cpath%20class='st0'%20d='M42.8,56.5H19.9c-2.9,0-5.2-2.3-5.2-5.2V19.9c0-2.9,2.3-5.2,5.2-5.2h23.8c2.9,0,5.2,2.3,5.2,5.2V36%20c0,0.8-0.6,1.4-1.4,1.4c-0.8,0-1.4-0.6-1.4-1.4V19.9c0-1.3-1.1-2.4-2.4-2.4H19.9c-1.3,0-2.4,1.1-2.4,2.4v31.4%20c0,1.3,1.1,2.4,2.4,2.4h22.9c0.8,0,1.4,0.6,1.4,1.4S43.6,56.5,42.8,56.5z'/%3e%3cpath%20class='st0'%20d='M41.8,43.2h-20c-0.8,0-1.4-0.6-1.4-1.4c0-0.8,0.6-1.4,1.4-1.4h20c0.8,0,1.4,0.6,1.4,1.4%20C43.2,42.6,42.6,43.2,41.8,43.2z'/%3e%3cpath%20class='st0'%20d='M41.8,35.6h-20c-0.8,0-1.4-0.6-1.4-1.4c0-0.8,0.6-1.4,1.4-1.4h20c0.8,0,1.4,0.6,1.4,1.4S42.6,35.6,41.8,35.6z'%20/%3e%3cpath%20class='st0'%20d='M32.3,28H21.8c-0.8,0-1.4-0.6-1.4-1.4s0.6-1.4,1.4-1.4h10.5c0.8,0,1.4,0.6,1.4,1.4S33.1,28,32.3,28z'/%3e%3c/g%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2021.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2075%2075'%20style='enable-background:new%200%200%2075%2075;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%231D1D1B;}%20%3c/style%3e%3cpath%20class='st0'%20d='M37.5,5.5c17.6,0,32,14.4,32,32s-14.4,32-32,32s-32-14.4-32-32S19.9,5.5,37.5,5.5%20M37.5,0.5%20c-20.4,0-37,16.6-37,37s16.6,37,37,37s37-16.6,37-37S57.9,0.5,37.5,0.5L37.5,0.5z'/%3e%3cg%3e%3cpath%20class='st0'%20d='M53.7,59.3c-3.7,0-6.7-3-6.7-6.7v-10c0-2.4,1.9-4.3,4.3-4.3c2.4,0,4.3,1.9,4.3,4.3v9.5c0,0.8-0.6,1.4-1.4,1.4%20s-1.4-0.6-1.4-1.4v-9.5c0-0.8-0.6-1.4-1.4-1.4c-0.8,0-1.4,0.6-1.4,1.4v10c0,2.1,1.7,3.8,3.8,3.8s3.8-1.7,3.8-3.8V39.8%20c0-0.8,0.6-1.4,1.4-1.4c0.8,0,1.4,0.6,1.4,1.4v12.8C60.3,56.3,57.3,59.3,53.7,59.3z'/%3e%3cpath%20class='st0'%20d='M42.8,55.5H19.9c-2.9,0-5.2-2.3-5.2-5.2V18.9c0-2.9,2.3-5.2,5.2-5.2h23.8c2.9,0,5.2,2.3,5.2,5.2V35%20c0,0.8-0.6,1.4-1.4,1.4c-0.8,0-1.4-0.6-1.4-1.4V18.9c0-1.3-1.1-2.4-2.4-2.4H19.9c-1.3,0-2.4,1.1-2.4,2.4v31.4%20c0,1.3,1.1,2.4,2.4,2.4h22.9c0.8,0,1.4,0.6,1.4,1.4S43.6,55.5,42.8,55.5z'/%3e%3cpath%20class='st0'%20d='M41.8,42.2h-20c-0.8,0-1.4-0.6-1.4-1.4c0-0.8,0.6-1.4,1.4-1.4h20c0.8,0,1.4,0.6,1.4,1.4%20C43.2,41.6,42.6,42.2,41.8,42.2z'/%3e%3cpath%20class='st0'%20d='M41.8,34.6h-20c-0.8,0-1.4-0.6-1.4-1.4c0-0.8,0.6-1.4,1.4-1.4h20c0.8,0,1.4,0.6,1.4,1.4%20C43.2,34,42.6,34.6,41.8,34.6z'/%3e%3cpath%20class='st0'%20d='M32.3,27H21.8c-0.8,0-1.4-0.6-1.4-1.4s0.6-1.4,1.4-1.4h10.5c0.8,0,1.4,0.6,1.4,1.4S33.1,27,32.3,27z'/%3e%3c/g%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2021.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2075%2075'%20style='enable-background:new%200%200%2075%2075;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23AC906B;}%20%3c/style%3e%3cpath%20class='st0'%20d='M37.5,5.5c17.6,0,32,14.4,32,32s-14.4,32-32,32s-32-14.4-32-32S19.9,5.5,37.5,5.5%20M37.5,0.5%20c-20.4,0-37,16.6-37,37s16.6,37,37,37s37-16.6,37-37S57.9,0.5,37.5,0.5L37.5,0.5z'/%3e%3cg%3e%3cg%3e%3cpath%20class='st0'%20d='M17.2,26.2c-0.9,2.1-1.4,4.4-1.4,6.7s0.5,4.6,1.4,6.7c0.9,2.1,2.1,3.9,3.7,5.5s3.4,2.8,5.5,3.7%20s4.4,1.4,6.7,1.4s4.6-0.5,6.7-1.4c0.4-0.2,0.7-0.3,1.1-0.5l9.7,9.7c0.9,0.9,2,1.3,3.2,1.3s2.4-0.5,3.2-1.3l0.8-0.8%20c1.8-1.8,1.8-4.7,0-6.4l-9.6-9.6c0.3-0.5,0.6-1.1,0.8-1.6c0.9-2.1,1.4-4.4,1.4-6.7s-0.5-4.6-1.4-6.7s-2.1-3.9-3.7-5.5%20c-1.6-1.6-3.4-2.8-5.5-3.7c-2.1-0.9-4.4-1.4-6.7-1.4s-4.6,0.5-6.7,1.4s-3.9,2.1-5.5,3.7C19.3,22.2,18,24.1,17.2,26.2z%20M44.2,41.7%20c-0.8,1-1.7,1.9-2.8,2.7c-0.9,0.6-1.9,1.2-2.9,1.6c-1.7,0.7-3.5,1.1-5.4,1.1c-7.8,0-14.2-6.3-14.2-14.2s6.3-14.2,14.2-14.2%20S47.3,25,47.3,32.9c0,2.2-0.5,4.2-1.3,6C45.5,39.9,44.9,40.9,44.2,41.7z%20M55.6,53.1c0.5,0.5,0.5,1.4,0,2l-0.8,0.8%20c-0.3,0.3-0.6,0.4-1,0.4s-0.7-0.1-1-0.4l-9.2-9.2c0.6-0.5,1.2-1,1.7-1.5c0.4-0.4,0.7-0.8,1.1-1.2L55.6,53.1z'/%3e%3cpath%20class='st0'%20d='M53.9,59.5c-1.2,0-2.4-0.5-3.2-1.3L41,48.5c-0.3,0.2-0.7,0.3-1,0.5c-2.1,0.9-4.4,1.4-6.8,1.4%20s-4.6-0.5-6.8-1.4c-2.1-0.9-3.9-2.1-5.5-3.7c-1.6-1.6-2.8-3.5-3.7-5.5c-0.9-2.1-1.4-4.4-1.4-6.8c0-2.3,0.5-4.6,1.4-6.8%20c0.9-2.1,2.1-3.9,3.7-5.5s3.5-2.8,5.5-3.7c2.1-0.9,4.4-1.4,6.8-1.4c2.3,0,4.6,0.5,6.8,1.4c2.1,0.9,3.9,2.1,5.5,3.7%20s2.8,3.5,3.7,5.5c0.9,2.1,1.4,4.4,1.4,6.8c0,2.3-0.5,4.6-1.4,6.8c-0.2,0.5-0.5,1.1-0.8,1.6L58,51c1.8,1.8,1.8,4.7,0,6.5l-0.8,0.8%20C56.2,59,55.1,59.5,53.9,59.5z%20M40.9,48.3l9.7,9.7c0.9,0.9,2,1.3,3.2,1.3s2.3-0.5,3.2-1.3l0.8-0.8c1.8-1.8,1.8-4.6,0-6.4l-9.6-9.6%20l0,0c0.3-0.5,0.6-1.1,0.8-1.6c0.9-2.1,1.4-4.4,1.4-6.7s-0.5-4.6-1.4-6.7s-2.1-3.9-3.7-5.5c-1.6-1.6-3.4-2.8-5.5-3.7%20c-2.1-0.9-4.4-1.4-6.7-1.4s-4.6,0.5-6.7,1.4s-3.9,2.1-5.5,3.7s-2.8,3.4-3.7,5.5c-0.9,2.1-1.4,4.4-1.4,6.7s0.5,4.6,1.4,6.7%20c0.9,2.1,2.1,3.9,3.7,5.5s3.4,2.8,5.5,3.7s4.4,1.4,6.7,1.4s4.6-0.5,6.7-1.4C40.2,48.7,40.6,48.5,40.9,48.3L40.9,48.3z%20M53.9,56.3%20c-0.4,0-0.7-0.1-1-0.4l-9.2-9.2l0,0c0.6-0.5,1.2-1,1.7-1.5c0.4-0.4,0.7-0.8,1.1-1.2l0,0l9.2,9.2c0.6,0.6,0.6,1.5,0,2L54.9,56%20C54.6,56.1,54.2,56.3,53.9,56.3z%20M43.7,46.7l9.2,9.2c0.3,0.3,0.6,0.4,0.9,0.4s0.7-0.1,0.9-0.4l0.8-0.8c0.5-0.5,0.5-1.4,0-1.9%20l-9-9.2c-0.3,0.4-0.7,0.8-1.1,1.2C44.9,45.7,44.3,46.2,43.7,46.7z%20M33.1,47.1c-7.8,0-14.2-6.4-14.2-14.2s6.4-14.2,14.2-14.2%20s14.2,6.4,14.2,14.2c0,2.1-0.5,4.2-1.4,6.1c-0.5,1-1,1.9-1.7,2.8c-0.8,1-1.8,1.9-2.8,2.7c-0.9,0.6-1.9,1.2-2.9,1.6%20C36.8,46.7,35,47.1,33.1,47.1z%20M33.1,18.8c-7.8,0-14.1,6.3-14.1,14.1S25.3,47,33.1,47c1.9,0,3.7-0.4,5.4-1.1c1-0.4,2-1,2.9-1.6%20c1-0.8,2-1.7,2.8-2.7c0.7-0.9,1.3-1.8,1.7-2.8c0.9-1.9,1.3-3.9,1.3-6C47.3,25.1,40.9,18.8,33.1,18.8z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st0'%20d='M38.7,27l-8.5,8.5L27,32.2c-0.6-0.6-1.6-0.6-2.2,0s-0.6,1.6,0,2.2l4.4,4.4c0.3,0.3,0.7,0.5,1.1,0.5%20s0.8-0.2,1.1-0.5l1.2-1.2l4.9-4.9l3.5-3.5c0.6-0.6,0.6-1.6,0-2.2C40.3,26.4,39.3,26.4,38.7,27z'/%3e%3cpath%20class='st0'%20d='M30.2,39.3c-0.4,0-0.8-0.2-1.1-0.5l-4.4-4.4c-0.6-0.6-0.6-1.7,0-2.3c0.3-0.3,0.7-0.5,1.1-0.5s0.8,0.2,1.1,0.5%20l3.2,3.2l8.4-8.4c0.3-0.3,0.7-0.5,1.1-0.5c0.4,0,0.8,0.2,1.1,0.5c0.6,0.6,0.6,1.7,0,2.3l-9.6,9.6C31.1,39.1,30.7,39.3,30.2,39.3z%20M25.8,31.8c-0.4,0-0.8,0.2-1.1,0.5c-0.6,0.6-0.6,1.6,0,2.2l4.4,4.4c0.3,0.3,0.7,0.5,1.1,0.5s0.8-0.2,1.1-0.5l9.6-9.6%20c0.6-0.6,0.6-1.6,0-2.2c-0.3-0.3-0.7-0.5-1.1-0.5S39,26.7,38.7,27l-8.5,8.5l-3.3-3.3C26.6,31.9,26.3,31.8,25.8,31.8z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2021.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2075%2075'%20style='enable-background:new%200%200%2075%2075;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%231D1D1B;}%20%3c/style%3e%3cpath%20class='st0'%20d='M37.5,5.5c17.6,0,32,14.4,32,32s-14.4,32-32,32s-32-14.4-32-32S19.9,5.5,37.5,5.5%20M37.5,0.5%20c-20.4,0-37,16.6-37,37s16.6,37,37,37s37-16.6,37-37S57.9,0.5,37.5,0.5L37.5,0.5z'/%3e%3cg%3e%3cg%3e%3cpath%20class='st0'%20d='M17.2,26.2c-0.9,2.1-1.4,4.4-1.4,6.7s0.5,4.6,1.4,6.7c0.9,2.1,2.1,3.9,3.7,5.5s3.4,2.8,5.5,3.7%20s4.4,1.4,6.7,1.4s4.6-0.5,6.7-1.4c0.4-0.2,0.7-0.3,1.1-0.5l9.7,9.7c0.9,0.9,2,1.3,3.2,1.3s2.4-0.5,3.2-1.3l0.8-0.8%20c1.8-1.8,1.8-4.7,0-6.4l-9.6-9.6c0.3-0.5,0.6-1.1,0.8-1.6c0.9-2.1,1.4-4.4,1.4-6.7s-0.5-4.6-1.4-6.7s-2.1-3.9-3.7-5.5%20c-1.6-1.6-3.4-2.8-5.5-3.7c-2.1-0.9-4.4-1.4-6.7-1.4s-4.6,0.5-6.7,1.4s-3.9,2.1-5.5,3.7C19.3,22.2,18,24.1,17.2,26.2z%20M44.2,41.7%20c-0.8,1-1.7,1.9-2.8,2.7c-0.9,0.6-1.9,1.2-2.9,1.6c-1.7,0.7-3.5,1.1-5.4,1.1c-7.8,0-14.2-6.3-14.2-14.2s6.3-14.2,14.2-14.2%20S47.3,25,47.3,32.9c0,2.2-0.5,4.2-1.3,6C45.5,39.9,44.9,40.9,44.2,41.7z%20M55.6,53.1c0.5,0.5,0.5,1.4,0,2l-0.8,0.8%20c-0.3,0.3-0.6,0.4-1,0.4s-0.7-0.1-1-0.4l-9.2-9.2c0.6-0.5,1.2-1,1.7-1.5c0.4-0.4,0.7-0.8,1.1-1.2L55.6,53.1z'/%3e%3cpath%20class='st0'%20d='M53.9,59.5c-1.2,0-2.4-0.5-3.2-1.3L41,48.5c-0.3,0.2-0.7,0.3-1,0.5c-2.1,0.9-4.4,1.4-6.8,1.4%20s-4.6-0.5-6.8-1.4c-2.1-0.9-3.9-2.1-5.5-3.7c-1.6-1.6-2.8-3.5-3.7-5.5c-0.9-2.1-1.4-4.4-1.4-6.8c0-2.3,0.5-4.6,1.4-6.8%20c0.9-2.1,2.1-3.9,3.7-5.5s3.5-2.8,5.5-3.7c2.1-0.9,4.4-1.4,6.8-1.4c2.3,0,4.6,0.5,6.8,1.4c2.1,0.9,3.9,2.1,5.5,3.7%20s2.8,3.5,3.7,5.5c0.9,2.1,1.4,4.4,1.4,6.8c0,2.3-0.5,4.6-1.4,6.8c-0.2,0.5-0.5,1.1-0.8,1.6L58,51c1.8,1.8,1.8,4.7,0,6.5l-0.8,0.8%20C56.2,59,55.1,59.5,53.9,59.5z%20M40.9,48.3l9.7,9.7c0.9,0.9,2,1.3,3.2,1.3s2.3-0.5,3.2-1.3l0.8-0.8c1.8-1.8,1.8-4.6,0-6.4l-9.6-9.6%20l0,0c0.3-0.5,0.6-1.1,0.8-1.6c0.9-2.1,1.4-4.4,1.4-6.7s-0.5-4.6-1.4-6.7s-2.1-3.9-3.7-5.5c-1.6-1.6-3.4-2.8-5.5-3.7%20c-2.1-0.9-4.4-1.4-6.7-1.4s-4.6,0.5-6.7,1.4s-3.9,2.1-5.5,3.7s-2.8,3.4-3.7,5.5c-0.9,2.1-1.4,4.4-1.4,6.7s0.5,4.6,1.4,6.7%20c0.9,2.1,2.1,3.9,3.7,5.5s3.4,2.8,5.5,3.7s4.4,1.4,6.7,1.4s4.6-0.5,6.7-1.4C40.2,48.7,40.6,48.5,40.9,48.3L40.9,48.3z%20M53.9,56.3%20c-0.4,0-0.7-0.1-1-0.4l-9.2-9.2l0,0c0.6-0.5,1.2-1,1.7-1.5c0.4-0.4,0.7-0.8,1.1-1.2l0,0l9.2,9.2c0.6,0.6,0.6,1.5,0,2L54.9,56%20C54.6,56.1,54.2,56.3,53.9,56.3z%20M43.7,46.7l9.2,9.2c0.3,0.3,0.6,0.4,0.9,0.4s0.7-0.1,0.9-0.4l0.8-0.8c0.5-0.5,0.5-1.4,0-1.9%20l-9-9.2c-0.3,0.4-0.7,0.8-1.1,1.2C44.9,45.7,44.3,46.2,43.7,46.7z%20M33.1,47.1c-7.8,0-14.2-6.4-14.2-14.2s6.4-14.2,14.2-14.2%20s14.2,6.4,14.2,14.2c0,2.1-0.5,4.2-1.4,6.1c-0.5,1-1,1.9-1.7,2.8c-0.8,1-1.8,1.9-2.8,2.7c-0.9,0.6-1.9,1.2-2.9,1.6%20C36.8,46.7,35,47.1,33.1,47.1z%20M33.1,18.8c-7.8,0-14.1,6.3-14.1,14.1S25.3,47,33.1,47c1.9,0,3.7-0.4,5.4-1.1c1-0.4,2-1,2.9-1.6%20c1-0.8,2-1.7,2.8-2.7c0.7-0.9,1.3-1.8,1.7-2.8c0.9-1.9,1.3-3.9,1.3-6C47.3,25.1,40.9,18.8,33.1,18.8z'/%3e%3c/g%3e%3cg%3e%3cpath%20class='st0'%20d='M38.7,27l-8.5,8.5L27,32.2c-0.6-0.6-1.6-0.6-2.2,0s-0.6,1.6,0,2.2l4.4,4.4c0.3,0.3,0.7,0.5,1.1,0.5%20s0.8-0.2,1.1-0.5l1.2-1.2l4.9-4.9l3.5-3.5c0.6-0.6,0.6-1.6,0-2.2C40.3,26.4,39.3,26.4,38.7,27z'/%3e%3cpath%20class='st0'%20d='M30.2,39.3c-0.4,0-0.8-0.2-1.1-0.5l-4.4-4.4c-0.6-0.6-0.6-1.7,0-2.3c0.3-0.3,0.7-0.5,1.1-0.5s0.8,0.2,1.1,0.5%20l3.2,3.2l8.4-8.4c0.3-0.3,0.7-0.5,1.1-0.5c0.4,0,0.8,0.2,1.1,0.5c0.6,0.6,0.6,1.7,0,2.3l-9.6,9.6C31.1,39.1,30.7,39.3,30.2,39.3z%20M25.8,31.8c-0.4,0-0.8,0.2-1.1,0.5c-0.6,0.6-0.6,1.6,0,2.2l4.4,4.4c0.3,0.3,0.7,0.5,1.1,0.5s0.8-0.2,1.1-0.5l9.6-9.6%20c0.6-0.6,0.6-1.6,0-2.2c-0.3-0.3-0.7-0.5-1.1-0.5S39,26.7,38.7,27l-8.5,8.5l-3.3-3.3C26.6,31.9,26.3,31.8,25.8,31.8z'/%3e%3c/g%3e%3c/g%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2021.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2075%2075'%20style='enable-background:new%200%200%2075%2075;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23AC906B;}%20.st1{fill:%23AC906B;stroke:%23AC906B;stroke-linecap:round;stroke-linejoin:bevel;stroke-miterlimit:10;}%20%3c/style%3e%3cpath%20class='st0'%20d='M37.5,5.5c17.6,0,32,14.4,32,32s-14.4,32-32,32s-32-14.4-32-32S19.9,5.5,37.5,5.5%20M37.5,0.5%20c-20.4,0-37,16.6-37,37s16.6,37,37,37s37-16.6,37-37S57.9,0.5,37.5,0.5L37.5,0.5z'/%3e%3cg%3e%3cpath%20class='st1'%20d='M24.7,56.2H23c-2.3,0-4.3-1.9-4.3-4.3v-2.6h13.6c0.5,0,0.9-0.4,0.9-0.9s-0.4-0.9-0.9-0.9H18.8V25.6h20.4v6%20c0,0.5,0.4,0.9,0.9,0.9s0.9-0.4,0.9-0.9V23c0-3.3-2.7-6-6-6H23c-3.3,0-6,2.7-6,6v29c0,3.3,2.7,6,6,6h1.7c0.5,0,0.9-0.4,0.9-0.9%20S25.2,56.2,24.7,56.2z%20M23,18.8h11.9c2.3,0,4.3,1.9,4.3,4.3V24H18.8v-1C18.8,20.7,20.7,18.8,23,18.8z'/%3e%3cpath%20class='st1'%20d='M26.4,22.2h5.1c0.5,0,0.9-0.4,0.9-0.9s-0.4-0.9-0.9-0.9h-5.1c-0.5,0-0.9,0.4-0.9,0.9%20C25.6,21.8,26,22.2,26.4,22.2z'/%3e%3cpath%20class='st1'%20d='M35,22.2c0.5,0,0.9-0.4,0.9-0.9s-0.4-0.9-0.9-0.9l0,0c-0.5,0-0.8,0.4-0.8,0.9C34.1,21.8,34.5,22.2,35,22.2z'/%3e%3cpath%20class='st1'%20d='M55.5,39.6l-6.4-7c-1.3-1.3-3.3-1.3-4.6,0c-0.4,0.4-0.7,0.9-0.8,1.4c-1.3-1-3.1-0.9-4.3,0.3%20c-0.4,0.4-0.7,0.9-0.8,1.4c-1.3-1-3.1-0.9-4.3,0.3c-0.4,0.4-0.7,0.9-0.8,1.4l-3-3c-1.3-1.3-3.3-1.3-4.6,0c-1.3,1.3-1.3,3.3,0,4.6%20l11.6,11.6l-6.9,1.1c-1.9,0.3-3.3,1.9-3.3,3.8c0,1.4,1.1,2.6,2.6,2.6H46c2.5,0,4.9-1,6.6-2.7l2.7-2.7c1.8-1.8,2.7-4.1,2.7-6.6%20C57.9,43.6,57.1,41.3,55.5,39.6z%20M54,51.3L51.3,54c-1.4,1.4-3.4,2.2-5.4,2.2H29.8c-0.5,0-0.9-0.4-0.9-0.9c0-1,0.8-1.9,1.8-2.1%20l8.5-1.3c0.3,0,0.6-0.3,0.7-0.6c0.1-0.3,0-0.6-0.2-0.9L27,37.7c-0.6-0.6-0.6-1.6,0-2.2c0.3-0.3,0.7-0.5,1.1-0.5s0.8,0.2,1.1,0.5%20l8.5,8.5c0.3,0.3,0.9,0.3,1.2,0c0.2-0.2,0.2-0.4,0.2-0.6s0-0.4-0.1-0.5l-3.5-3.5c-0.6-0.6-0.6-1.6,0-2.2c0.6-0.6,1.6-0.6,2.2,0%20l3.5,3.5c0.3,0.3,0.9,0.3,1.2,0c0.2-0.2,0.2-0.4,0.2-0.6s-0.1-0.4-0.2-0.6l-1.8-1.8c-0.6-0.6-0.6-1.6,0-2.2c0.6-0.6,1.6-0.6,2.2,0%20l1.8,1.8l0,0l0,0l0,0l0,0l0,0l0,0c0.3,0.3,0.9,0.3,1.2,0s0.3-0.9,0-1.2L45.7,36c-0.3-0.3-0.5-0.7-0.5-1.1s0.2-0.8,0.5-1.1%20c0.6-0.6,1.6-0.6,2.2,0l6.4,7c1.3,1.4,2,3.2,2,5.1C56.2,47.9,55.4,49.9,54,51.3z'/%3e%3c/g%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2021.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2075%2075'%20style='enable-background:new%200%200%2075%2075;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%231D1D1B;}%20.st1{fill:%231D1D1B;stroke:%231D1D1B;stroke-miterlimit:10;}%20%3c/style%3e%3cpath%20class='st0'%20d='M37.5,5.5c17.6,0,32,14.4,32,32s-14.4,32-32,32s-32-14.4-32-32S19.9,5.5,37.5,5.5%20M37.5,0.5%20c-20.4,0-37,16.6-37,37s16.6,37,37,37s37-16.6,37-37S57.9,0.5,37.5,0.5L37.5,0.5z'/%3e%3cg%3e%3cpath%20class='st1'%20d='M24.7,56.2H23c-2.3,0-4.3-1.9-4.3-4.3v-2.6h13.6c0.5,0,0.9-0.4,0.9-0.9s-0.4-0.9-0.9-0.9H18.8V25.6h20.4v6%20c0,0.5,0.4,0.9,0.9,0.9s0.9-0.4,0.9-0.9V23c0-3.3-2.7-6-6-6H23c-3.3,0-6,2.7-6,6v29c0,3.3,2.7,6,6,6h1.7c0.5,0,0.9-0.4,0.9-0.9%20S25.2,56.2,24.7,56.2z%20M23,18.8h11.9c2.3,0,4.3,1.9,4.3,4.3V24H18.8v-1C18.8,20.7,20.7,18.8,23,18.8z'/%3e%3cpath%20class='st1'%20d='M26.4,22.2h5.1c0.5,0,0.9-0.4,0.9-0.9s-0.4-0.9-0.9-0.9h-5.1c-0.5,0-0.9,0.4-0.9,0.9%20C25.6,21.8,26,22.2,26.4,22.2z'/%3e%3cpath%20class='st1'%20d='M35,22.2c0.5,0,0.9-0.4,0.9-0.9s-0.4-0.9-0.9-0.9l0,0c-0.5,0-0.8,0.4-0.8,0.9C34.1,21.8,34.5,22.2,35,22.2z'/%3e%3cpath%20class='st1'%20d='M55.5,39.6l-6.4-7c-1.3-1.3-3.3-1.3-4.6,0c-0.4,0.4-0.7,0.9-0.8,1.4c-1.3-1-3.1-0.9-4.3,0.3%20c-0.4,0.4-0.7,0.9-0.8,1.4c-1.3-1-3.1-0.9-4.3,0.3c-0.4,0.4-0.7,0.9-0.8,1.4l-3-3c-1.3-1.3-3.3-1.3-4.6,0c-1.3,1.3-1.3,3.3,0,4.6%20l11.6,11.6l-6.9,1.1c-1.9,0.3-3.3,1.9-3.3,3.8c0,1.4,1.1,2.6,2.6,2.6H46c2.5,0,4.9-1,6.6-2.7l2.7-2.7c1.8-1.8,2.7-4.1,2.7-6.6%20C57.9,43.6,57.1,41.3,55.5,39.6z%20M54,51.3L51.3,54c-1.4,1.4-3.4,2.2-5.4,2.2H29.8c-0.5,0-0.9-0.4-0.9-0.9c0-1,0.8-1.9,1.8-2.1%20l8.5-1.3c0.3,0,0.6-0.3,0.7-0.6c0.1-0.3,0-0.6-0.2-0.9L27,37.7c-0.6-0.6-0.6-1.6,0-2.2c0.3-0.3,0.7-0.5,1.1-0.5s0.8,0.2,1.1,0.5%20l8.5,8.5c0.3,0.3,0.9,0.3,1.2,0c0.2-0.2,0.2-0.4,0.2-0.6s0-0.4-0.1-0.5l-3.5-3.5c-0.6-0.6-0.6-1.6,0-2.2c0.6-0.6,1.6-0.6,2.2,0%20l3.5,3.5c0.3,0.3,0.9,0.3,1.2,0c0.2-0.2,0.2-0.4,0.2-0.6s-0.1-0.4-0.2-0.6l-1.8-1.8c-0.6-0.6-0.6-1.6,0-2.2c0.6-0.6,1.6-0.6,2.2,0%20l1.8,1.8l0,0l0,0l0,0l0,0l0,0l0,0c0.3,0.3,0.9,0.3,1.2,0s0.3-0.9,0-1.2L45.7,36c-0.3-0.3-0.5-0.7-0.5-1.1s0.2-0.8,0.5-1.1%20c0.6-0.6,1.6-0.6,2.2,0l6.4,7c1.3,1.4,2,3.2,2,5.1C56.2,47.9,55.4,49.9,54,51.3z'/%3e%3c/g%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2021.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2075%2075'%20style='enable-background:new%200%200%2075%2075;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%23AC906B;}%20.st1{fill:%23AC906B;stroke:%23AC906B;stroke-miterlimit:10;}%20%3c/style%3e%3cpath%20class='st0'%20d='M37.5,5.5c17.6,0,32,14.4,32,32s-14.4,32-32,32s-32-14.4-32-32S19.9,5.5,37.5,5.5%20M37.5,0.5%20c-20.4,0-37,16.6-37,37s16.6,37,37,37s37-16.6,37-37S57.9,0.5,37.5,0.5L37.5,0.5z'/%3e%3cg%3e%3cg%3e%3cg%3e%3cpath%20class='st1'%20d='M53.7,21.3c-4.3-4.3-10.1-6.7-16.2-6.7S25.6,17,21.3,21.3s-6.7,10.1-6.7,16.2s2.4,11.9,6.7,16.2%20s10.1,6.7,16.2,6.7s11.9-2.4,16.2-6.7s6.7-10.1,6.7-16.2S58,25.6,53.7,21.3z%20M37.5,57.7c-11.1,0-20.2-9.1-20.2-20.2%20s9.1-20.2,20.2-20.2s20.2,9.1,20.2,20.2S48.6,57.7,37.5,57.7z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20class='st1'%20d='M32.5,31.4c-2.2-2.2-5.9-2.2-8.1,0c-0.5,0.5-0.5,1.4,0,1.9s1.4,0.5,1.9,0c1.2-1.2,3.1-1.2,4.2,0%20c0.3,0.3,0.6,0.4,1,0.4c0.3,0,0.7-0.1,1-0.4C33.1,32.8,33.1,32,32.5,31.4z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20class='st1'%20d='M50.6,31.4c-2.2-2.2-5.9-2.2-8.1,0c-0.5,0.5-0.5,1.4,0,1.9s1.4,0.5,1.9,0c1.2-1.2,3.1-1.2,4.2,0%20c0.3,0.3,0.6,0.4,1,0.4c0.3,0,0.7-0.1,1-0.4C51.1,32.8,51.1,32,50.6,31.4z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20class='st1'%20d='M49.6,38.5H25.4c-0.8,0-1.4,0.6-1.4,1.4c0,7.4,6,13.5,13.5,13.5S51,47.3,51,39.9%20C51,39.1,50.4,38.5,49.6,38.5z%20M37.5,50.6c-5.5,0-10-4.1-10.6-9.4h21.3C47.5,46.5,43,50.6,37.5,50.6z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e\"","export default \"data:image/svg+xml,%3c?xml%20version='1.0'%20encoding='utf-8'?%3e%3c!--%20Generator:%20Adobe%20Illustrator%2021.0.0,%20SVG%20Export%20Plug-In%20.%20SVG%20Version:%206.00%20Build%200)%20--%3e%3csvg%20version='1.1'%20id='Layer_1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20x='0px'%20y='0px'%20viewBox='0%200%2075%2075'%20style='enable-background:new%200%200%2075%2075;'%20xml:space='preserve'%3e%3cstyle%20type='text/css'%3e%20.st0{fill:%231D1D1B;}%20.st1{fill:%231D1D1B;stroke:%231D1D1B;stroke-linejoin:bevel;stroke-miterlimit:10;}%20%3c/style%3e%3cpath%20class='st0'%20d='M37.5,5.5c17.6,0,32,14.4,32,32s-14.4,32-32,32s-32-14.4-32-32S19.9,5.5,37.5,5.5%20M37.5,0.5%20c-20.4,0-37,16.6-37,37s16.6,37,37,37s37-16.6,37-37S57.9,0.5,37.5,0.5L37.5,0.5z'/%3e%3cg%3e%3cg%3e%3cg%3e%3cpath%20class='st1'%20d='M53.7,21.3c-4.3-4.3-10.1-6.7-16.2-6.7S25.6,17,21.3,21.3s-6.7,10.1-6.7,16.2s2.4,11.9,6.7,16.2%20s10.1,6.7,16.2,6.7s11.9-2.4,16.2-6.7s6.7-10.1,6.7-16.2S58,25.6,53.7,21.3z%20M37.5,57.7c-11.1,0-20.2-9.1-20.2-20.2%20s9.1-20.2,20.2-20.2s20.2,9.1,20.2,20.2S48.6,57.7,37.5,57.7z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20class='st1'%20d='M32.5,31.4c-2.2-2.2-5.9-2.2-8.1,0c-0.5,0.5-0.5,1.4,0,1.9s1.4,0.5,1.9,0c1.2-1.2,3.1-1.2,4.2,0%20c0.3,0.3,0.6,0.4,1,0.4c0.3,0,0.7-0.1,1-0.4C33.1,32.8,33.1,32,32.5,31.4z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20class='st1'%20d='M50.6,31.4c-2.2-2.2-5.9-2.2-8.1,0c-0.5,0.5-0.5,1.4,0,1.9s1.4,0.5,1.9,0c1.2-1.2,3.1-1.2,4.2,0%20c0.3,0.3,0.6,0.4,1,0.4c0.3,0,0.7-0.1,1-0.4C51.1,32.8,51.1,32,50.6,31.4z'/%3e%3c/g%3e%3c/g%3e%3cg%3e%3cg%3e%3cpath%20class='st1'%20d='M49.6,38.5H25.4c-0.8,0-1.4,0.6-1.4,1.4c0,7.4,6,13.5,13.5,13.5S51,47.3,51,39.9%20C51,39.1,50.4,38.5,49.6,38.5z%20M37.5,50.6c-5.5,0-10-4.1-10.6-9.4h21.3C47.5,46.5,43,50.6,37.5,50.6z'/%3e%3c/g%3e%3c/g%3e%3c/g%3e%3c/svg%3e\"","export default \"__VITE_ASSET__ChqQvqRW__\"","export default \"__VITE_ASSET__Ce_8CAHQ__\"","import React from \"react\";\nimport { Step } from \"./Step\";\n\nimport start_czerwony from \"../../assets/start_czerwony.svg\";\nimport start_szary from \"../../assets/start_szary.svg\";\nimport dane_kontaktowe_czerwony from \"../../assets/dane_kontaktowe_czerwony.svg\";\nimport dane_kontaktowe_szary from \"../../assets/dane_kontaktowe_szary.svg\";\nimport mail_czerwony from \"../../assets/mail_czerwony.svg\";\nimport mail_szary from \"../../assets/mail_szary.svg\";\nimport formularz_czerwony from \"../../assets/formularz_czerwony.svg\";\nimport formularz_szary from \"../../assets/formularz_szary.svg\";\nimport weryfikacja_czerwony from \"../../assets/weryfikacja_czerwony.svg\";\nimport weryfikacja_szary from \"../../assets/weryfikacja_szary.svg\";\nimport telefon_czerwony from \"../../assets/telefon_czerwony.svg\";\nimport telefon_szary from \"../../assets/telefon_szary.svg\";\nimport dziekujemy_czerwony from \"../../assets/dziekujemy_czerwony.svg\";\nimport dziekujemy_szary from \"../../assets/dziekujemy_szary.svg\";\nimport zrodla_finansowania_czerwony from \"../../assets/zrodla_finansowania_czerwony-01.svg\";\nimport zrodla_finansowania_szary from \"../../assets/zrodla_finansowania_szary-01.svg\";\n\ninterface ICircleSteps {\n step: number;\n}\n\nconst CircleSteps = (props: ICircleSteps) => {\n const { step } = props;\n console.log(step, 'ss')\n return (\n <>\n 0 || step < 0}\n >\n Start\n \n 1 || step < 0}\n >\n Podaj dane kontaktowe\n \n 2 || step < 0}\n >\n Potwierdź e-mail\n \n 3 || step < 0}\n >\n Wypełnij wniosek i dodaj dokumenty\n \n 3 && step !== 7) || step < 0}\n >\n Wypełnij ankietę\n \n 4 || step < 0) && (step !== 7) && (step !== 8)}\n >\n Zweryfikuj dane\n \n 5 || step < 0) && (step !== 7) && (step !== 8)}\n >\n Potwierdź numer telefonu\n \n 6 || step < 0) && (step !== 7) && (step !== 8)}\n >\n Dziękujemy\n \n \n );\n};\n\nexport { CircleSteps };\n","import React from 'react';\n\nvar isCheckBoxInput = (element) => element.type === 'checkbox';\n\nvar isDateObject = (value) => value instanceof Date;\n\nvar isNullOrUndefined = (value) => value == null;\n\nconst isObjectType = (value) => typeof value === 'object';\nvar isObject = (value) => !isNullOrUndefined(value) &&\n !Array.isArray(value) &&\n isObjectType(value) &&\n !isDateObject(value);\n\nvar getEventValue = (event) => isObject(event) && event.target\n ? isCheckBoxInput(event.target)\n ? event.target.checked\n : event.target.value\n : event;\n\nvar getNodeParentName = (name) => name.substring(0, name.search(/\\.\\d+(\\.|$)/)) || name;\n\nvar isNameInFieldArray = (names, name) => names.has(getNodeParentName(name));\n\nvar isPlainObject = (tempObject) => {\n const prototypeCopy = tempObject.constructor && tempObject.constructor.prototype;\n return (isObject(prototypeCopy) && prototypeCopy.hasOwnProperty('isPrototypeOf'));\n};\n\nvar isWeb = typeof window !== 'undefined' &&\n typeof window.HTMLElement !== 'undefined' &&\n typeof document !== 'undefined';\n\nfunction cloneObject(data) {\n let copy;\n const isArray = Array.isArray(data);\n const isFileListInstance = typeof FileList !== 'undefined' ? data instanceof FileList : false;\n if (data instanceof Date) {\n copy = new Date(data);\n }\n else if (data instanceof Set) {\n copy = new Set(data);\n }\n else if (!(isWeb && (data instanceof Blob || isFileListInstance)) &&\n (isArray || isObject(data))) {\n copy = isArray ? [] : {};\n if (!isArray && !isPlainObject(data)) {\n copy = data;\n }\n else {\n for (const key in data) {\n if (data.hasOwnProperty(key)) {\n copy[key] = cloneObject(data[key]);\n }\n }\n }\n }\n else {\n return data;\n }\n return copy;\n}\n\nvar compact = (value) => Array.isArray(value) ? value.filter(Boolean) : [];\n\nvar isUndefined = (val) => val === undefined;\n\nvar get = (object, path, defaultValue) => {\n if (!path || !isObject(object)) {\n return defaultValue;\n }\n const result = compact(path.split(/[,[\\].]+?/)).reduce((result, key) => isNullOrUndefined(result) ? result : result[key], object);\n return isUndefined(result) || result === object\n ? isUndefined(object[path])\n ? defaultValue\n : object[path]\n : result;\n};\n\nvar isBoolean = (value) => typeof value === 'boolean';\n\nvar isKey = (value) => /^\\w*$/.test(value);\n\nvar stringToPath = (input) => compact(input.replace(/[\"|']|\\]/g, '').split(/\\.|\\[/));\n\nvar set = (object, path, value) => {\n let index = -1;\n const tempPath = isKey(path) ? [path] : stringToPath(path);\n const length = tempPath.length;\n const lastIndex = length - 1;\n while (++index < length) {\n const key = tempPath[index];\n let newValue = value;\n if (index !== lastIndex) {\n const objValue = object[key];\n newValue =\n isObject(objValue) || Array.isArray(objValue)\n ? objValue\n : !isNaN(+tempPath[index + 1])\n ? []\n : {};\n }\n if (key === '__proto__' || key === 'constructor' || key === 'prototype') {\n return;\n }\n object[key] = newValue;\n object = object[key];\n }\n return object;\n};\n\nconst EVENTS = {\n BLUR: 'blur',\n FOCUS_OUT: 'focusout',\n CHANGE: 'change',\n};\nconst VALIDATION_MODE = {\n onBlur: 'onBlur',\n onChange: 'onChange',\n onSubmit: 'onSubmit',\n onTouched: 'onTouched',\n all: 'all',\n};\nconst INPUT_VALIDATION_RULES = {\n max: 'max',\n min: 'min',\n maxLength: 'maxLength',\n minLength: 'minLength',\n pattern: 'pattern',\n required: 'required',\n validate: 'validate',\n};\n\nconst HookFormContext = React.createContext(null);\n/**\n * This custom hook allows you to access the form context. useFormContext is intended to be used in deeply nested structures, where it would become inconvenient to pass the context as a prop. To be used with {@link FormProvider}.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)\n *\n * @returns return all useForm methods\n *\n * @example\n * ```tsx\n * function App() {\n * const methods = useForm();\n * const onSubmit = data => console.log(data);\n *\n * return (\n * \n *
\n * \n * \n * \n *
\n * );\n * }\n *\n * function NestedInput() {\n * const { register } = useFormContext(); // retrieve all hook methods\n * return ;\n * }\n * ```\n */\nconst useFormContext = () => React.useContext(HookFormContext);\n/**\n * A provider component that propagates the `useForm` methods to all children components via [React Context](https://reactjs.org/docs/context.html) API. To be used with {@link useFormContext}.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useformcontext) • [Demo](https://codesandbox.io/s/react-hook-form-v7-form-context-ytudi)\n *\n * @param props - all useForm methods\n *\n * @example\n * ```tsx\n * function App() {\n * const methods = useForm();\n * const onSubmit = data => console.log(data);\n *\n * return (\n * \n *
\n * \n * \n * \n *
\n * );\n * }\n *\n * function NestedInput() {\n * const { register } = useFormContext(); // retrieve all hook methods\n * return ;\n * }\n * ```\n */\nconst FormProvider = (props) => {\n const { children, ...data } = props;\n return (React.createElement(HookFormContext.Provider, { value: data }, children));\n};\n\nvar getProxyFormState = (formState, control, localProxyFormState, isRoot = true) => {\n const result = {\n defaultValues: control._defaultValues,\n };\n for (const key in formState) {\n Object.defineProperty(result, key, {\n get: () => {\n const _key = key;\n if (control._proxyFormState[_key] !== VALIDATION_MODE.all) {\n control._proxyFormState[_key] = !isRoot || VALIDATION_MODE.all;\n }\n localProxyFormState && (localProxyFormState[_key] = true);\n return formState[_key];\n },\n });\n }\n return result;\n};\n\nvar isEmptyObject = (value) => isObject(value) && !Object.keys(value).length;\n\nvar shouldRenderFormState = (formStateData, _proxyFormState, updateFormState, isRoot) => {\n updateFormState(formStateData);\n const { name, ...formState } = formStateData;\n return (isEmptyObject(formState) ||\n Object.keys(formState).length >= Object.keys(_proxyFormState).length ||\n Object.keys(formState).find((key) => _proxyFormState[key] ===\n (!isRoot || VALIDATION_MODE.all)));\n};\n\nvar convertToArrayPayload = (value) => (Array.isArray(value) ? value : [value]);\n\nvar shouldSubscribeByName = (name, signalName, exact) => !name ||\n !signalName ||\n name === signalName ||\n convertToArrayPayload(name).some((currentName) => currentName &&\n (exact\n ? currentName === signalName\n : currentName.startsWith(signalName) ||\n signalName.startsWith(currentName)));\n\nfunction useSubscribe(props) {\n const _props = React.useRef(props);\n _props.current = props;\n React.useEffect(() => {\n const subscription = !props.disabled &&\n _props.current.subject &&\n _props.current.subject.subscribe({\n next: _props.current.next,\n });\n return () => {\n subscription && subscription.unsubscribe();\n };\n }, [props.disabled]);\n}\n\n/**\n * This custom hook allows you to subscribe to each form state, and isolate the re-render at the custom hook level. It has its scope in terms of form state subscription, so it would not affect other useFormState and useForm. Using this hook can reduce the re-render impact on large and complex form application.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useformstate) • [Demo](https://codesandbox.io/s/useformstate-75xly)\n *\n * @param props - include options on specify fields to subscribe. {@link UseFormStateReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, handleSubmit, control } = useForm({\n * defaultValues: {\n * firstName: \"firstName\"\n * }});\n * const { dirtyFields } = useFormState({\n * control\n * });\n * const onSubmit = (data) => console.log(data);\n *\n * return (\n *
\n * \n * {dirtyFields.firstName &&

Field is dirty.

}\n * \n *
\n * );\n * }\n * ```\n */\nfunction useFormState(props) {\n const methods = useFormContext();\n const { control = methods.control, disabled, name, exact } = props || {};\n const [formState, updateFormState] = React.useState(control._formState);\n const _mounted = React.useRef(true);\n const _localProxyFormState = React.useRef({\n isDirty: false,\n isLoading: false,\n dirtyFields: false,\n touchedFields: false,\n validatingFields: false,\n isValidating: false,\n isValid: false,\n errors: false,\n });\n const _name = React.useRef(name);\n _name.current = name;\n useSubscribe({\n disabled,\n next: (value) => _mounted.current &&\n shouldSubscribeByName(_name.current, value.name, exact) &&\n shouldRenderFormState(value, _localProxyFormState.current, control._updateFormState) &&\n updateFormState({\n ...control._formState,\n ...value,\n }),\n subject: control._subjects.state,\n });\n React.useEffect(() => {\n _mounted.current = true;\n _localProxyFormState.current.isValid && control._updateValid(true);\n return () => {\n _mounted.current = false;\n };\n }, [control]);\n return React.useMemo(() => getProxyFormState(formState, control, _localProxyFormState.current, false), [formState, control]);\n}\n\nvar isString = (value) => typeof value === 'string';\n\nvar generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) => {\n if (isString(names)) {\n isGlobal && _names.watch.add(names);\n return get(formValues, names, defaultValue);\n }\n if (Array.isArray(names)) {\n return names.map((fieldName) => (isGlobal && _names.watch.add(fieldName), get(formValues, fieldName)));\n }\n isGlobal && (_names.watchAll = true);\n return formValues;\n};\n\n/**\n * Custom hook to subscribe to field change and isolate re-rendering at the component level.\n *\n * @remarks\n *\n * [API](https://react-hook-form.com/docs/usewatch) • [Demo](https://codesandbox.io/s/react-hook-form-v7-ts-usewatch-h9i5e)\n *\n * @example\n * ```tsx\n * const { control } = useForm();\n * const values = useWatch({\n * name: \"fieldName\"\n * control,\n * })\n * ```\n */\nfunction useWatch(props) {\n const methods = useFormContext();\n const { control = methods.control, name, defaultValue, disabled, exact, } = props || {};\n const _name = React.useRef(name);\n _name.current = name;\n useSubscribe({\n disabled,\n subject: control._subjects.values,\n next: (formState) => {\n if (shouldSubscribeByName(_name.current, formState.name, exact)) {\n updateValue(cloneObject(generateWatchOutput(_name.current, control._names, formState.values || control._formValues, false, defaultValue)));\n }\n },\n });\n const [value, updateValue] = React.useState(control._getWatch(name, defaultValue));\n React.useEffect(() => control._removeUnmounted());\n return value;\n}\n\n/**\n * Custom hook to work with controlled component, this function provide you with both form and field level state. Re-render is isolated at the hook level.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/usecontroller) • [Demo](https://codesandbox.io/s/usecontroller-0o8px)\n *\n * @param props - the path name to the form field value, and validation rules.\n *\n * @returns field properties, field and form state. {@link UseControllerReturn}\n *\n * @example\n * ```tsx\n * function Input(props) {\n * const { field, fieldState, formState } = useController(props);\n * return (\n *
\n * \n *

{fieldState.isTouched && \"Touched\"}

\n *

{formState.isSubmitted ? \"submitted\" : \"\"}

\n *
\n * );\n * }\n * ```\n */\nfunction useController(props) {\n const methods = useFormContext();\n const { name, disabled, control = methods.control, shouldUnregister } = props;\n const isArrayField = isNameInFieldArray(control._names.array, name);\n const value = useWatch({\n control,\n name,\n defaultValue: get(control._formValues, name, get(control._defaultValues, name, props.defaultValue)),\n exact: true,\n });\n const formState = useFormState({\n control,\n name,\n exact: true,\n });\n const _registerProps = React.useRef(control.register(name, {\n ...props.rules,\n value,\n ...(isBoolean(props.disabled) ? { disabled: props.disabled } : {}),\n }));\n const fieldState = React.useMemo(() => Object.defineProperties({}, {\n invalid: {\n enumerable: true,\n get: () => !!get(formState.errors, name),\n },\n isDirty: {\n enumerable: true,\n get: () => !!get(formState.dirtyFields, name),\n },\n isTouched: {\n enumerable: true,\n get: () => !!get(formState.touchedFields, name),\n },\n isValidating: {\n enumerable: true,\n get: () => !!get(formState.validatingFields, name),\n },\n error: {\n enumerable: true,\n get: () => get(formState.errors, name),\n },\n }), [formState, name]);\n const field = React.useMemo(() => ({\n name,\n value,\n ...(isBoolean(disabled) || formState.disabled\n ? { disabled: formState.disabled || disabled }\n : {}),\n onChange: (event) => _registerProps.current.onChange({\n target: {\n value: getEventValue(event),\n name: name,\n },\n type: EVENTS.CHANGE,\n }),\n onBlur: () => _registerProps.current.onBlur({\n target: {\n value: get(control._formValues, name),\n name: name,\n },\n type: EVENTS.BLUR,\n }),\n ref: (elm) => {\n const field = get(control._fields, name);\n if (field && elm) {\n field._f.ref = {\n focus: () => elm.focus(),\n select: () => elm.select(),\n setCustomValidity: (message) => elm.setCustomValidity(message),\n reportValidity: () => elm.reportValidity(),\n };\n }\n },\n }), [\n name,\n control._formValues,\n disabled,\n formState.disabled,\n value,\n control._fields,\n ]);\n React.useEffect(() => {\n const _shouldUnregisterField = control._options.shouldUnregister || shouldUnregister;\n const updateMounted = (name, value) => {\n const field = get(control._fields, name);\n if (field && field._f) {\n field._f.mount = value;\n }\n };\n updateMounted(name, true);\n if (_shouldUnregisterField) {\n const value = cloneObject(get(control._options.defaultValues, name));\n set(control._defaultValues, name, value);\n if (isUndefined(get(control._formValues, name))) {\n set(control._formValues, name, value);\n }\n }\n !isArrayField && control.register(name);\n return () => {\n (isArrayField\n ? _shouldUnregisterField && !control._state.action\n : _shouldUnregisterField)\n ? control.unregister(name)\n : updateMounted(name, false);\n };\n }, [name, control, isArrayField, shouldUnregister]);\n React.useEffect(() => {\n control._updateDisabledField({\n disabled,\n fields: control._fields,\n name,\n });\n }, [disabled, name, control]);\n return React.useMemo(() => ({\n field,\n formState,\n fieldState,\n }), [field, formState, fieldState]);\n}\n\n/**\n * Component based on `useController` hook to work with controlled component.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/usecontroller/controller) • [Demo](https://codesandbox.io/s/react-hook-form-v6-controller-ts-jwyzw) • [Video](https://www.youtube.com/watch?v=N2UNk_UCVyA)\n *\n * @param props - the path name to the form field value, and validation rules.\n *\n * @returns provide field handler functions, field and form state.\n *\n * @example\n * ```tsx\n * function App() {\n * const { control } = useForm({\n * defaultValues: {\n * test: \"\"\n * }\n * });\n *\n * return (\n *
\n * (\n * <>\n * \n *

{formState.isSubmitted ? \"submitted\" : \"\"}

\n *

{fieldState.isTouched ? \"touched\" : \"\"}

\n * \n * )}\n * />\n * \n * );\n * }\n * ```\n */\nconst Controller = (props) => props.render(useController(props));\n\nconst flatten = (obj) => {\n const output = {};\n for (const key of Object.keys(obj)) {\n if (isObjectType(obj[key]) && obj[key] !== null) {\n const nested = flatten(obj[key]);\n for (const nestedKey of Object.keys(nested)) {\n output[`${key}.${nestedKey}`] = nested[nestedKey];\n }\n }\n else {\n output[key] = obj[key];\n }\n }\n return output;\n};\n\nconst POST_REQUEST = 'post';\n/**\n * Form component to manage submission.\n *\n * @param props - to setup submission detail. {@link FormProps}\n *\n * @returns form component or headless render prop.\n *\n * @example\n * ```tsx\n * function App() {\n * const { control, formState: { errors } } = useForm();\n *\n * return (\n *
\n * \n *

{errors?.root?.server && 'Server error'}

\n * \n *
\n * );\n * }\n * ```\n */\nfunction Form(props) {\n const methods = useFormContext();\n const [mounted, setMounted] = React.useState(false);\n const { control = methods.control, onSubmit, children, action, method = POST_REQUEST, headers, encType, onError, render, onSuccess, validateStatus, ...rest } = props;\n const submit = async (event) => {\n let hasError = false;\n let type = '';\n await control.handleSubmit(async (data) => {\n const formData = new FormData();\n let formDataJson = '';\n try {\n formDataJson = JSON.stringify(data);\n }\n catch (_a) { }\n const flattenFormValues = flatten(control._formValues);\n for (const key in flattenFormValues) {\n formData.append(key, flattenFormValues[key]);\n }\n if (onSubmit) {\n await onSubmit({\n data,\n event,\n method,\n formData,\n formDataJson,\n });\n }\n if (action) {\n try {\n const shouldStringifySubmissionData = [\n headers && headers['Content-Type'],\n encType,\n ].some((value) => value && value.includes('json'));\n const response = await fetch(String(action), {\n method,\n headers: {\n ...headers,\n ...(encType ? { 'Content-Type': encType } : {}),\n },\n body: shouldStringifySubmissionData ? formDataJson : formData,\n });\n if (response &&\n (validateStatus\n ? !validateStatus(response.status)\n : response.status < 200 || response.status >= 300)) {\n hasError = true;\n onError && onError({ response });\n type = String(response.status);\n }\n else {\n onSuccess && onSuccess({ response });\n }\n }\n catch (error) {\n hasError = true;\n onError && onError({ error });\n }\n }\n })(event);\n if (hasError && props.control) {\n props.control._subjects.state.next({\n isSubmitSuccessful: false,\n });\n props.control.setError('root.server', {\n type,\n });\n }\n };\n React.useEffect(() => {\n setMounted(true);\n }, []);\n return render ? (React.createElement(React.Fragment, null, render({\n submit,\n }))) : (React.createElement(\"form\", { noValidate: mounted, action: action, method: method, encType: encType, onSubmit: submit, ...rest }, children));\n}\n\nvar appendErrors = (name, validateAllFieldCriteria, errors, type, message) => validateAllFieldCriteria\n ? {\n ...errors[name],\n types: {\n ...(errors[name] && errors[name].types ? errors[name].types : {}),\n [type]: message || true,\n },\n }\n : {};\n\nvar generateId = () => {\n const d = typeof performance === 'undefined' ? Date.now() : performance.now() * 1000;\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = (Math.random() * 16 + d) % 16 | 0;\n return (c == 'x' ? r : (r & 0x3) | 0x8).toString(16);\n });\n};\n\nvar getFocusFieldName = (name, index, options = {}) => options.shouldFocus || isUndefined(options.shouldFocus)\n ? options.focusName ||\n `${name}.${isUndefined(options.focusIndex) ? index : options.focusIndex}.`\n : '';\n\nvar getValidationModes = (mode) => ({\n isOnSubmit: !mode || mode === VALIDATION_MODE.onSubmit,\n isOnBlur: mode === VALIDATION_MODE.onBlur,\n isOnChange: mode === VALIDATION_MODE.onChange,\n isOnAll: mode === VALIDATION_MODE.all,\n isOnTouch: mode === VALIDATION_MODE.onTouched,\n});\n\nvar isWatched = (name, _names, isBlurEvent) => !isBlurEvent &&\n (_names.watchAll ||\n _names.watch.has(name) ||\n [..._names.watch].some((watchName) => name.startsWith(watchName) &&\n /^\\.\\w+/.test(name.slice(watchName.length))));\n\nconst iterateFieldsByAction = (fields, action, fieldsNames, abortEarly) => {\n for (const key of fieldsNames || Object.keys(fields)) {\n const field = get(fields, key);\n if (field) {\n const { _f, ...currentField } = field;\n if (_f) {\n if (_f.refs && _f.refs[0] && action(_f.refs[0], key) && !abortEarly) {\n return true;\n }\n else if (_f.ref && action(_f.ref, _f.name) && !abortEarly) {\n return true;\n }\n else {\n if (iterateFieldsByAction(currentField, action)) {\n break;\n }\n }\n }\n else if (isObject(currentField)) {\n if (iterateFieldsByAction(currentField, action)) {\n break;\n }\n }\n }\n }\n return;\n};\n\nvar updateFieldArrayRootError = (errors, error, name) => {\n const fieldArrayErrors = convertToArrayPayload(get(errors, name));\n set(fieldArrayErrors, 'root', error[name]);\n set(errors, name, fieldArrayErrors);\n return errors;\n};\n\nvar isFileInput = (element) => element.type === 'file';\n\nvar isFunction = (value) => typeof value === 'function';\n\nvar isHTMLElement = (value) => {\n if (!isWeb) {\n return false;\n }\n const owner = value ? value.ownerDocument : 0;\n return (value instanceof\n (owner && owner.defaultView ? owner.defaultView.HTMLElement : HTMLElement));\n};\n\nvar isMessage = (value) => isString(value);\n\nvar isRadioInput = (element) => element.type === 'radio';\n\nvar isRegex = (value) => value instanceof RegExp;\n\nconst defaultResult = {\n value: false,\n isValid: false,\n};\nconst validResult = { value: true, isValid: true };\nvar getCheckboxValue = (options) => {\n if (Array.isArray(options)) {\n if (options.length > 1) {\n const values = options\n .filter((option) => option && option.checked && !option.disabled)\n .map((option) => option.value);\n return { value: values, isValid: !!values.length };\n }\n return options[0].checked && !options[0].disabled\n ? // @ts-expect-error expected to work in the browser\n options[0].attributes && !isUndefined(options[0].attributes.value)\n ? isUndefined(options[0].value) || options[0].value === ''\n ? validResult\n : { value: options[0].value, isValid: true }\n : validResult\n : defaultResult;\n }\n return defaultResult;\n};\n\nconst defaultReturn = {\n isValid: false,\n value: null,\n};\nvar getRadioValue = (options) => Array.isArray(options)\n ? options.reduce((previous, option) => option && option.checked && !option.disabled\n ? {\n isValid: true,\n value: option.value,\n }\n : previous, defaultReturn)\n : defaultReturn;\n\nfunction getValidateError(result, ref, type = 'validate') {\n if (isMessage(result) ||\n (Array.isArray(result) && result.every(isMessage)) ||\n (isBoolean(result) && !result)) {\n return {\n type,\n message: isMessage(result) ? result : '',\n ref,\n };\n }\n}\n\nvar getValueAndMessage = (validationData) => isObject(validationData) && !isRegex(validationData)\n ? validationData\n : {\n value: validationData,\n message: '',\n };\n\nvar validateField = async (field, disabledFieldNames, formValues, validateAllFieldCriteria, shouldUseNativeValidation, isFieldArray) => {\n const { ref, refs, required, maxLength, minLength, min, max, pattern, validate, name, valueAsNumber, mount, } = field._f;\n const inputValue = get(formValues, name);\n if (!mount || disabledFieldNames.has(name)) {\n return {};\n }\n const inputRef = refs ? refs[0] : ref;\n const setCustomValidity = (message) => {\n if (shouldUseNativeValidation && inputRef.reportValidity) {\n inputRef.setCustomValidity(isBoolean(message) ? '' : message || '');\n inputRef.reportValidity();\n }\n };\n const error = {};\n const isRadio = isRadioInput(ref);\n const isCheckBox = isCheckBoxInput(ref);\n const isRadioOrCheckbox = isRadio || isCheckBox;\n const isEmpty = ((valueAsNumber || isFileInput(ref)) &&\n isUndefined(ref.value) &&\n isUndefined(inputValue)) ||\n (isHTMLElement(ref) && ref.value === '') ||\n inputValue === '' ||\n (Array.isArray(inputValue) && !inputValue.length);\n const appendErrorsCurry = appendErrors.bind(null, name, validateAllFieldCriteria, error);\n const getMinMaxMessage = (exceedMax, maxLengthMessage, minLengthMessage, maxType = INPUT_VALIDATION_RULES.maxLength, minType = INPUT_VALIDATION_RULES.minLength) => {\n const message = exceedMax ? maxLengthMessage : minLengthMessage;\n error[name] = {\n type: exceedMax ? maxType : minType,\n message,\n ref,\n ...appendErrorsCurry(exceedMax ? maxType : minType, message),\n };\n };\n if (isFieldArray\n ? !Array.isArray(inputValue) || !inputValue.length\n : required &&\n ((!isRadioOrCheckbox && (isEmpty || isNullOrUndefined(inputValue))) ||\n (isBoolean(inputValue) && !inputValue) ||\n (isCheckBox && !getCheckboxValue(refs).isValid) ||\n (isRadio && !getRadioValue(refs).isValid))) {\n const { value, message } = isMessage(required)\n ? { value: !!required, message: required }\n : getValueAndMessage(required);\n if (value) {\n error[name] = {\n type: INPUT_VALIDATION_RULES.required,\n message,\n ref: inputRef,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.required, message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(message);\n return error;\n }\n }\n }\n if (!isEmpty && (!isNullOrUndefined(min) || !isNullOrUndefined(max))) {\n let exceedMax;\n let exceedMin;\n const maxOutput = getValueAndMessage(max);\n const minOutput = getValueAndMessage(min);\n if (!isNullOrUndefined(inputValue) && !isNaN(inputValue)) {\n const valueNumber = ref.valueAsNumber ||\n (inputValue ? +inputValue : inputValue);\n if (!isNullOrUndefined(maxOutput.value)) {\n exceedMax = valueNumber > maxOutput.value;\n }\n if (!isNullOrUndefined(minOutput.value)) {\n exceedMin = valueNumber < minOutput.value;\n }\n }\n else {\n const valueDate = ref.valueAsDate || new Date(inputValue);\n const convertTimeToDate = (time) => new Date(new Date().toDateString() + ' ' + time);\n const isTime = ref.type == 'time';\n const isWeek = ref.type == 'week';\n if (isString(maxOutput.value) && inputValue) {\n exceedMax = isTime\n ? convertTimeToDate(inputValue) > convertTimeToDate(maxOutput.value)\n : isWeek\n ? inputValue > maxOutput.value\n : valueDate > new Date(maxOutput.value);\n }\n if (isString(minOutput.value) && inputValue) {\n exceedMin = isTime\n ? convertTimeToDate(inputValue) < convertTimeToDate(minOutput.value)\n : isWeek\n ? inputValue < minOutput.value\n : valueDate < new Date(minOutput.value);\n }\n }\n if (exceedMax || exceedMin) {\n getMinMaxMessage(!!exceedMax, maxOutput.message, minOutput.message, INPUT_VALIDATION_RULES.max, INPUT_VALIDATION_RULES.min);\n if (!validateAllFieldCriteria) {\n setCustomValidity(error[name].message);\n return error;\n }\n }\n }\n if ((maxLength || minLength) &&\n !isEmpty &&\n (isString(inputValue) || (isFieldArray && Array.isArray(inputValue)))) {\n const maxLengthOutput = getValueAndMessage(maxLength);\n const minLengthOutput = getValueAndMessage(minLength);\n const exceedMax = !isNullOrUndefined(maxLengthOutput.value) &&\n inputValue.length > +maxLengthOutput.value;\n const exceedMin = !isNullOrUndefined(minLengthOutput.value) &&\n inputValue.length < +minLengthOutput.value;\n if (exceedMax || exceedMin) {\n getMinMaxMessage(exceedMax, maxLengthOutput.message, minLengthOutput.message);\n if (!validateAllFieldCriteria) {\n setCustomValidity(error[name].message);\n return error;\n }\n }\n }\n if (pattern && !isEmpty && isString(inputValue)) {\n const { value: patternValue, message } = getValueAndMessage(pattern);\n if (isRegex(patternValue) && !inputValue.match(patternValue)) {\n error[name] = {\n type: INPUT_VALIDATION_RULES.pattern,\n message,\n ref,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.pattern, message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(message);\n return error;\n }\n }\n }\n if (validate) {\n if (isFunction(validate)) {\n const result = await validate(inputValue, formValues);\n const validateError = getValidateError(result, inputRef);\n if (validateError) {\n error[name] = {\n ...validateError,\n ...appendErrorsCurry(INPUT_VALIDATION_RULES.validate, validateError.message),\n };\n if (!validateAllFieldCriteria) {\n setCustomValidity(validateError.message);\n return error;\n }\n }\n }\n else if (isObject(validate)) {\n let validationResult = {};\n for (const key in validate) {\n if (!isEmptyObject(validationResult) && !validateAllFieldCriteria) {\n break;\n }\n const validateError = getValidateError(await validate[key](inputValue, formValues), inputRef, key);\n if (validateError) {\n validationResult = {\n ...validateError,\n ...appendErrorsCurry(key, validateError.message),\n };\n setCustomValidity(validateError.message);\n if (validateAllFieldCriteria) {\n error[name] = validationResult;\n }\n }\n }\n if (!isEmptyObject(validationResult)) {\n error[name] = {\n ref: inputRef,\n ...validationResult,\n };\n if (!validateAllFieldCriteria) {\n return error;\n }\n }\n }\n }\n setCustomValidity(true);\n return error;\n};\n\nvar appendAt = (data, value) => [\n ...data,\n ...convertToArrayPayload(value),\n];\n\nvar fillEmptyArray = (value) => Array.isArray(value) ? value.map(() => undefined) : undefined;\n\nfunction insert(data, index, value) {\n return [\n ...data.slice(0, index),\n ...convertToArrayPayload(value),\n ...data.slice(index),\n ];\n}\n\nvar moveArrayAt = (data, from, to) => {\n if (!Array.isArray(data)) {\n return [];\n }\n if (isUndefined(data[to])) {\n data[to] = undefined;\n }\n data.splice(to, 0, data.splice(from, 1)[0]);\n return data;\n};\n\nvar prependAt = (data, value) => [\n ...convertToArrayPayload(value),\n ...convertToArrayPayload(data),\n];\n\nfunction removeAtIndexes(data, indexes) {\n let i = 0;\n const temp = [...data];\n for (const index of indexes) {\n temp.splice(index - i, 1);\n i++;\n }\n return compact(temp).length ? temp : [];\n}\nvar removeArrayAt = (data, index) => isUndefined(index)\n ? []\n : removeAtIndexes(data, convertToArrayPayload(index).sort((a, b) => a - b));\n\nvar swapArrayAt = (data, indexA, indexB) => {\n [data[indexA], data[indexB]] = [data[indexB], data[indexA]];\n};\n\nfunction baseGet(object, updatePath) {\n const length = updatePath.slice(0, -1).length;\n let index = 0;\n while (index < length) {\n object = isUndefined(object) ? index++ : object[updatePath[index++]];\n }\n return object;\n}\nfunction isEmptyArray(obj) {\n for (const key in obj) {\n if (obj.hasOwnProperty(key) && !isUndefined(obj[key])) {\n return false;\n }\n }\n return true;\n}\nfunction unset(object, path) {\n const paths = Array.isArray(path)\n ? path\n : isKey(path)\n ? [path]\n : stringToPath(path);\n const childObject = paths.length === 1 ? object : baseGet(object, paths);\n const index = paths.length - 1;\n const key = paths[index];\n if (childObject) {\n delete childObject[key];\n }\n if (index !== 0 &&\n ((isObject(childObject) && isEmptyObject(childObject)) ||\n (Array.isArray(childObject) && isEmptyArray(childObject)))) {\n unset(object, paths.slice(0, -1));\n }\n return object;\n}\n\nvar updateAt = (fieldValues, index, value) => {\n fieldValues[index] = value;\n return fieldValues;\n};\n\n/**\n * A custom hook that exposes convenient methods to perform operations with a list of dynamic inputs that need to be appended, updated, removed etc. • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn) • [Video](https://youtu.be/4MrbfGSFY2A)\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/usefieldarray) • [Demo](https://codesandbox.io/s/react-hook-form-usefieldarray-ssugn)\n *\n * @param props - useFieldArray props\n *\n * @returns methods - functions to manipulate with the Field Arrays (dynamic inputs) {@link UseFieldArrayReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, control, handleSubmit, reset, trigger, setError } = useForm({\n * defaultValues: {\n * test: []\n * }\n * });\n * const { fields, append } = useFieldArray({\n * control,\n * name: \"test\"\n * });\n *\n * return (\n *
console.log(data))}>\n * {fields.map((item, index) => (\n * \n * ))}\n * \n * \n *
\n * );\n * }\n * ```\n */\nfunction useFieldArray(props) {\n const methods = useFormContext();\n const { control = methods.control, name, keyName = 'id', shouldUnregister, rules, } = props;\n const [fields, setFields] = React.useState(control._getFieldArray(name));\n const ids = React.useRef(control._getFieldArray(name).map(generateId));\n const _fieldIds = React.useRef(fields);\n const _name = React.useRef(name);\n const _actioned = React.useRef(false);\n _name.current = name;\n _fieldIds.current = fields;\n control._names.array.add(name);\n rules &&\n control.register(name, rules);\n useSubscribe({\n next: ({ values, name: fieldArrayName, }) => {\n if (fieldArrayName === _name.current || !fieldArrayName) {\n const fieldValues = get(values, _name.current);\n if (Array.isArray(fieldValues)) {\n setFields(fieldValues);\n ids.current = fieldValues.map(generateId);\n }\n }\n },\n subject: control._subjects.array,\n });\n const updateValues = React.useCallback((updatedFieldArrayValues) => {\n _actioned.current = true;\n control._updateFieldArray(name, updatedFieldArrayValues);\n }, [control, name]);\n const append = (value, options) => {\n const appendValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = appendAt(control._getFieldArray(name), appendValue);\n control._names.focus = getFocusFieldName(name, updatedFieldArrayValues.length - 1, options);\n ids.current = appendAt(ids.current, appendValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, appendAt, {\n argA: fillEmptyArray(value),\n });\n };\n const prepend = (value, options) => {\n const prependValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = prependAt(control._getFieldArray(name), prependValue);\n control._names.focus = getFocusFieldName(name, 0, options);\n ids.current = prependAt(ids.current, prependValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, prependAt, {\n argA: fillEmptyArray(value),\n });\n };\n const remove = (index) => {\n const updatedFieldArrayValues = removeArrayAt(control._getFieldArray(name), index);\n ids.current = removeArrayAt(ids.current, index);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n !Array.isArray(get(control._fields, name)) &&\n set(control._fields, name, undefined);\n control._updateFieldArray(name, updatedFieldArrayValues, removeArrayAt, {\n argA: index,\n });\n };\n const insert$1 = (index, value, options) => {\n const insertValue = convertToArrayPayload(cloneObject(value));\n const updatedFieldArrayValues = insert(control._getFieldArray(name), index, insertValue);\n control._names.focus = getFocusFieldName(name, index, options);\n ids.current = insert(ids.current, index, insertValue.map(generateId));\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, insert, {\n argA: index,\n argB: fillEmptyArray(value),\n });\n };\n const swap = (indexA, indexB) => {\n const updatedFieldArrayValues = control._getFieldArray(name);\n swapArrayAt(updatedFieldArrayValues, indexA, indexB);\n swapArrayAt(ids.current, indexA, indexB);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, swapArrayAt, {\n argA: indexA,\n argB: indexB,\n }, false);\n };\n const move = (from, to) => {\n const updatedFieldArrayValues = control._getFieldArray(name);\n moveArrayAt(updatedFieldArrayValues, from, to);\n moveArrayAt(ids.current, from, to);\n updateValues(updatedFieldArrayValues);\n setFields(updatedFieldArrayValues);\n control._updateFieldArray(name, updatedFieldArrayValues, moveArrayAt, {\n argA: from,\n argB: to,\n }, false);\n };\n const update = (index, value) => {\n const updateValue = cloneObject(value);\n const updatedFieldArrayValues = updateAt(control._getFieldArray(name), index, updateValue);\n ids.current = [...updatedFieldArrayValues].map((item, i) => !item || i === index ? generateId() : ids.current[i]);\n updateValues(updatedFieldArrayValues);\n setFields([...updatedFieldArrayValues]);\n control._updateFieldArray(name, updatedFieldArrayValues, updateAt, {\n argA: index,\n argB: updateValue,\n }, true, false);\n };\n const replace = (value) => {\n const updatedFieldArrayValues = convertToArrayPayload(cloneObject(value));\n ids.current = updatedFieldArrayValues.map(generateId);\n updateValues([...updatedFieldArrayValues]);\n setFields([...updatedFieldArrayValues]);\n control._updateFieldArray(name, [...updatedFieldArrayValues], (data) => data, {}, true, false);\n };\n React.useEffect(() => {\n control._state.action = false;\n isWatched(name, control._names) &&\n control._subjects.state.next({\n ...control._formState,\n });\n if (_actioned.current &&\n (!getValidationModes(control._options.mode).isOnSubmit ||\n control._formState.isSubmitted)) {\n if (control._options.resolver) {\n control._executeSchema([name]).then((result) => {\n const error = get(result.errors, name);\n const existingError = get(control._formState.errors, name);\n if (existingError\n ? (!error && existingError.type) ||\n (error &&\n (existingError.type !== error.type ||\n existingError.message !== error.message))\n : error && error.type) {\n error\n ? set(control._formState.errors, name, error)\n : unset(control._formState.errors, name);\n control._subjects.state.next({\n errors: control._formState.errors,\n });\n }\n });\n }\n else {\n const field = get(control._fields, name);\n if (field &&\n field._f &&\n !(getValidationModes(control._options.reValidateMode).isOnSubmit &&\n getValidationModes(control._options.mode).isOnSubmit)) {\n validateField(field, control._names.disabled, control._formValues, control._options.criteriaMode === VALIDATION_MODE.all, control._options.shouldUseNativeValidation, true).then((error) => !isEmptyObject(error) &&\n control._subjects.state.next({\n errors: updateFieldArrayRootError(control._formState.errors, error, name),\n }));\n }\n }\n }\n control._subjects.values.next({\n name,\n values: { ...control._formValues },\n });\n control._names.focus &&\n iterateFieldsByAction(control._fields, (ref, key) => {\n if (control._names.focus &&\n key.startsWith(control._names.focus) &&\n ref.focus) {\n ref.focus();\n return 1;\n }\n return;\n });\n control._names.focus = '';\n control._updateValid();\n _actioned.current = false;\n }, [fields, name, control]);\n React.useEffect(() => {\n !get(control._formValues, name) && control._updateFieldArray(name);\n return () => {\n (control._options.shouldUnregister || shouldUnregister) &&\n control.unregister(name);\n };\n }, [name, control, keyName, shouldUnregister]);\n return {\n swap: React.useCallback(swap, [updateValues, name, control]),\n move: React.useCallback(move, [updateValues, name, control]),\n prepend: React.useCallback(prepend, [updateValues, name, control]),\n append: React.useCallback(append, [updateValues, name, control]),\n remove: React.useCallback(remove, [updateValues, name, control]),\n insert: React.useCallback(insert$1, [updateValues, name, control]),\n update: React.useCallback(update, [updateValues, name, control]),\n replace: React.useCallback(replace, [updateValues, name, control]),\n fields: React.useMemo(() => fields.map((field, index) => ({\n ...field,\n [keyName]: ids.current[index] || generateId(),\n })), [fields, keyName]),\n };\n}\n\nvar createSubject = () => {\n let _observers = [];\n const next = (value) => {\n for (const observer of _observers) {\n observer.next && observer.next(value);\n }\n };\n const subscribe = (observer) => {\n _observers.push(observer);\n return {\n unsubscribe: () => {\n _observers = _observers.filter((o) => o !== observer);\n },\n };\n };\n const unsubscribe = () => {\n _observers = [];\n };\n return {\n get observers() {\n return _observers;\n },\n next,\n subscribe,\n unsubscribe,\n };\n};\n\nvar isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);\n\nfunction deepEqual(object1, object2) {\n if (isPrimitive(object1) || isPrimitive(object2)) {\n return object1 === object2;\n }\n if (isDateObject(object1) && isDateObject(object2)) {\n return object1.getTime() === object2.getTime();\n }\n const keys1 = Object.keys(object1);\n const keys2 = Object.keys(object2);\n if (keys1.length !== keys2.length) {\n return false;\n }\n for (const key of keys1) {\n const val1 = object1[key];\n if (!keys2.includes(key)) {\n return false;\n }\n if (key !== 'ref') {\n const val2 = object2[key];\n if ((isDateObject(val1) && isDateObject(val2)) ||\n (isObject(val1) && isObject(val2)) ||\n (Array.isArray(val1) && Array.isArray(val2))\n ? !deepEqual(val1, val2)\n : val1 !== val2) {\n return false;\n }\n }\n }\n return true;\n}\n\nvar isMultipleSelect = (element) => element.type === `select-multiple`;\n\nvar isRadioOrCheckbox = (ref) => isRadioInput(ref) || isCheckBoxInput(ref);\n\nvar live = (ref) => isHTMLElement(ref) && ref.isConnected;\n\nvar objectHasFunction = (data) => {\n for (const key in data) {\n if (isFunction(data[key])) {\n return true;\n }\n }\n return false;\n};\n\nfunction markFieldsDirty(data, fields = {}) {\n const isParentNodeArray = Array.isArray(data);\n if (isObject(data) || isParentNodeArray) {\n for (const key in data) {\n if (Array.isArray(data[key]) ||\n (isObject(data[key]) && !objectHasFunction(data[key]))) {\n fields[key] = Array.isArray(data[key]) ? [] : {};\n markFieldsDirty(data[key], fields[key]);\n }\n else if (!isNullOrUndefined(data[key])) {\n fields[key] = true;\n }\n }\n }\n return fields;\n}\nfunction getDirtyFieldsFromDefaultValues(data, formValues, dirtyFieldsFromValues) {\n const isParentNodeArray = Array.isArray(data);\n if (isObject(data) || isParentNodeArray) {\n for (const key in data) {\n if (Array.isArray(data[key]) ||\n (isObject(data[key]) && !objectHasFunction(data[key]))) {\n if (isUndefined(formValues) ||\n isPrimitive(dirtyFieldsFromValues[key])) {\n dirtyFieldsFromValues[key] = Array.isArray(data[key])\n ? markFieldsDirty(data[key], [])\n : { ...markFieldsDirty(data[key]) };\n }\n else {\n getDirtyFieldsFromDefaultValues(data[key], isNullOrUndefined(formValues) ? {} : formValues[key], dirtyFieldsFromValues[key]);\n }\n }\n else {\n dirtyFieldsFromValues[key] = !deepEqual(data[key], formValues[key]);\n }\n }\n }\n return dirtyFieldsFromValues;\n}\nvar getDirtyFields = (defaultValues, formValues) => getDirtyFieldsFromDefaultValues(defaultValues, formValues, markFieldsDirty(formValues));\n\nvar getFieldValueAs = (value, { valueAsNumber, valueAsDate, setValueAs }) => isUndefined(value)\n ? value\n : valueAsNumber\n ? value === ''\n ? NaN\n : value\n ? +value\n : value\n : valueAsDate && isString(value)\n ? new Date(value)\n : setValueAs\n ? setValueAs(value)\n : value;\n\nfunction getFieldValue(_f) {\n const ref = _f.ref;\n if (isFileInput(ref)) {\n return ref.files;\n }\n if (isRadioInput(ref)) {\n return getRadioValue(_f.refs).value;\n }\n if (isMultipleSelect(ref)) {\n return [...ref.selectedOptions].map(({ value }) => value);\n }\n if (isCheckBoxInput(ref)) {\n return getCheckboxValue(_f.refs).value;\n }\n return getFieldValueAs(isUndefined(ref.value) ? _f.ref.value : ref.value, _f);\n}\n\nvar getResolverOptions = (fieldsNames, _fields, criteriaMode, shouldUseNativeValidation) => {\n const fields = {};\n for (const name of fieldsNames) {\n const field = get(_fields, name);\n field && set(fields, name, field._f);\n }\n return {\n criteriaMode,\n names: [...fieldsNames],\n fields,\n shouldUseNativeValidation,\n };\n};\n\nvar getRuleValue = (rule) => isUndefined(rule)\n ? rule\n : isRegex(rule)\n ? rule.source\n : isObject(rule)\n ? isRegex(rule.value)\n ? rule.value.source\n : rule.value\n : rule;\n\nconst ASYNC_FUNCTION = 'AsyncFunction';\nvar hasPromiseValidation = (fieldReference) => !!fieldReference &&\n !!fieldReference.validate &&\n !!((isFunction(fieldReference.validate) &&\n fieldReference.validate.constructor.name === ASYNC_FUNCTION) ||\n (isObject(fieldReference.validate) &&\n Object.values(fieldReference.validate).find((validateFunction) => validateFunction.constructor.name === ASYNC_FUNCTION)));\n\nvar hasValidation = (options) => options.mount &&\n (options.required ||\n options.min ||\n options.max ||\n options.maxLength ||\n options.minLength ||\n options.pattern ||\n options.validate);\n\nfunction schemaErrorLookup(errors, _fields, name) {\n const error = get(errors, name);\n if (error || isKey(name)) {\n return {\n error,\n name,\n };\n }\n const names = name.split('.');\n while (names.length) {\n const fieldName = names.join('.');\n const field = get(_fields, fieldName);\n const foundError = get(errors, fieldName);\n if (field && !Array.isArray(field) && name !== fieldName) {\n return { name };\n }\n if (foundError && foundError.type) {\n return {\n name: fieldName,\n error: foundError,\n };\n }\n names.pop();\n }\n return {\n name,\n };\n}\n\nvar skipValidation = (isBlurEvent, isTouched, isSubmitted, reValidateMode, mode) => {\n if (mode.isOnAll) {\n return false;\n }\n else if (!isSubmitted && mode.isOnTouch) {\n return !(isTouched || isBlurEvent);\n }\n else if (isSubmitted ? reValidateMode.isOnBlur : mode.isOnBlur) {\n return !isBlurEvent;\n }\n else if (isSubmitted ? reValidateMode.isOnChange : mode.isOnChange) {\n return isBlurEvent;\n }\n return true;\n};\n\nvar unsetEmptyArray = (ref, name) => !compact(get(ref, name)).length && unset(ref, name);\n\nconst defaultOptions = {\n mode: VALIDATION_MODE.onSubmit,\n reValidateMode: VALIDATION_MODE.onChange,\n shouldFocusError: true,\n};\nfunction createFormControl(props = {}) {\n let _options = {\n ...defaultOptions,\n ...props,\n };\n let _formState = {\n submitCount: 0,\n isDirty: false,\n isLoading: isFunction(_options.defaultValues),\n isValidating: false,\n isSubmitted: false,\n isSubmitting: false,\n isSubmitSuccessful: false,\n isValid: false,\n touchedFields: {},\n dirtyFields: {},\n validatingFields: {},\n errors: _options.errors || {},\n disabled: _options.disabled || false,\n };\n let _fields = {};\n let _defaultValues = isObject(_options.defaultValues) || isObject(_options.values)\n ? cloneObject(_options.defaultValues || _options.values) || {}\n : {};\n let _formValues = _options.shouldUnregister\n ? {}\n : cloneObject(_defaultValues);\n let _state = {\n action: false,\n mount: false,\n watch: false,\n };\n let _names = {\n mount: new Set(),\n disabled: new Set(),\n unMount: new Set(),\n array: new Set(),\n watch: new Set(),\n };\n let delayErrorCallback;\n let timer = 0;\n const _proxyFormState = {\n isDirty: false,\n dirtyFields: false,\n validatingFields: false,\n touchedFields: false,\n isValidating: false,\n isValid: false,\n errors: false,\n };\n const _subjects = {\n values: createSubject(),\n array: createSubject(),\n state: createSubject(),\n };\n const validationModeBeforeSubmit = getValidationModes(_options.mode);\n const validationModeAfterSubmit = getValidationModes(_options.reValidateMode);\n const shouldDisplayAllAssociatedErrors = _options.criteriaMode === VALIDATION_MODE.all;\n const debounce = (callback) => (wait) => {\n clearTimeout(timer);\n timer = setTimeout(callback, wait);\n };\n const _updateValid = async (shouldUpdateValid) => {\n if (!_options.disabled && (_proxyFormState.isValid || shouldUpdateValid)) {\n const isValid = _options.resolver\n ? isEmptyObject((await _executeSchema()).errors)\n : await executeBuiltInValidation(_fields, true);\n if (isValid !== _formState.isValid) {\n _subjects.state.next({\n isValid,\n });\n }\n }\n };\n const _updateIsValidating = (names, isValidating) => {\n if (!_options.disabled &&\n (_proxyFormState.isValidating || _proxyFormState.validatingFields)) {\n (names || Array.from(_names.mount)).forEach((name) => {\n if (name) {\n isValidating\n ? set(_formState.validatingFields, name, isValidating)\n : unset(_formState.validatingFields, name);\n }\n });\n _subjects.state.next({\n validatingFields: _formState.validatingFields,\n isValidating: !isEmptyObject(_formState.validatingFields),\n });\n }\n };\n const _updateFieldArray = (name, values = [], method, args, shouldSetValues = true, shouldUpdateFieldsAndState = true) => {\n if (args && method && !_options.disabled) {\n _state.action = true;\n if (shouldUpdateFieldsAndState && Array.isArray(get(_fields, name))) {\n const fieldValues = method(get(_fields, name), args.argA, args.argB);\n shouldSetValues && set(_fields, name, fieldValues);\n }\n if (shouldUpdateFieldsAndState &&\n Array.isArray(get(_formState.errors, name))) {\n const errors = method(get(_formState.errors, name), args.argA, args.argB);\n shouldSetValues && set(_formState.errors, name, errors);\n unsetEmptyArray(_formState.errors, name);\n }\n if (_proxyFormState.touchedFields &&\n shouldUpdateFieldsAndState &&\n Array.isArray(get(_formState.touchedFields, name))) {\n const touchedFields = method(get(_formState.touchedFields, name), args.argA, args.argB);\n shouldSetValues && set(_formState.touchedFields, name, touchedFields);\n }\n if (_proxyFormState.dirtyFields) {\n _formState.dirtyFields = getDirtyFields(_defaultValues, _formValues);\n }\n _subjects.state.next({\n name,\n isDirty: _getDirty(name, values),\n dirtyFields: _formState.dirtyFields,\n errors: _formState.errors,\n isValid: _formState.isValid,\n });\n }\n else {\n set(_formValues, name, values);\n }\n };\n const updateErrors = (name, error) => {\n set(_formState.errors, name, error);\n _subjects.state.next({\n errors: _formState.errors,\n });\n };\n const _setErrors = (errors) => {\n _formState.errors = errors;\n _subjects.state.next({\n errors: _formState.errors,\n isValid: false,\n });\n };\n const updateValidAndValue = (name, shouldSkipSetValueAs, value, ref) => {\n const field = get(_fields, name);\n if (field) {\n const defaultValue = get(_formValues, name, isUndefined(value) ? get(_defaultValues, name) : value);\n isUndefined(defaultValue) ||\n (ref && ref.defaultChecked) ||\n shouldSkipSetValueAs\n ? set(_formValues, name, shouldSkipSetValueAs ? defaultValue : getFieldValue(field._f))\n : setFieldValue(name, defaultValue);\n _state.mount && _updateValid();\n }\n };\n const updateTouchAndDirty = (name, fieldValue, isBlurEvent, shouldDirty, shouldRender) => {\n let shouldUpdateField = false;\n let isPreviousDirty = false;\n const output = {\n name,\n };\n if (!_options.disabled) {\n const disabledField = !!(get(_fields, name) &&\n get(_fields, name)._f &&\n get(_fields, name)._f.disabled);\n if (!isBlurEvent || shouldDirty) {\n if (_proxyFormState.isDirty) {\n isPreviousDirty = _formState.isDirty;\n _formState.isDirty = output.isDirty = _getDirty();\n shouldUpdateField = isPreviousDirty !== output.isDirty;\n }\n const isCurrentFieldPristine = disabledField || deepEqual(get(_defaultValues, name), fieldValue);\n isPreviousDirty = !!(!disabledField && get(_formState.dirtyFields, name));\n isCurrentFieldPristine || disabledField\n ? unset(_formState.dirtyFields, name)\n : set(_formState.dirtyFields, name, true);\n output.dirtyFields = _formState.dirtyFields;\n shouldUpdateField =\n shouldUpdateField ||\n (_proxyFormState.dirtyFields &&\n isPreviousDirty !== !isCurrentFieldPristine);\n }\n if (isBlurEvent) {\n const isPreviousFieldTouched = get(_formState.touchedFields, name);\n if (!isPreviousFieldTouched) {\n set(_formState.touchedFields, name, isBlurEvent);\n output.touchedFields = _formState.touchedFields;\n shouldUpdateField =\n shouldUpdateField ||\n (_proxyFormState.touchedFields &&\n isPreviousFieldTouched !== isBlurEvent);\n }\n }\n shouldUpdateField && shouldRender && _subjects.state.next(output);\n }\n return shouldUpdateField ? output : {};\n };\n const shouldRenderByError = (name, isValid, error, fieldState) => {\n const previousFieldError = get(_formState.errors, name);\n const shouldUpdateValid = _proxyFormState.isValid &&\n isBoolean(isValid) &&\n _formState.isValid !== isValid;\n if (_options.delayError && error) {\n delayErrorCallback = debounce(() => updateErrors(name, error));\n delayErrorCallback(_options.delayError);\n }\n else {\n clearTimeout(timer);\n delayErrorCallback = null;\n error\n ? set(_formState.errors, name, error)\n : unset(_formState.errors, name);\n }\n if ((error ? !deepEqual(previousFieldError, error) : previousFieldError) ||\n !isEmptyObject(fieldState) ||\n shouldUpdateValid) {\n const updatedFormState = {\n ...fieldState,\n ...(shouldUpdateValid && isBoolean(isValid) ? { isValid } : {}),\n errors: _formState.errors,\n name,\n };\n _formState = {\n ..._formState,\n ...updatedFormState,\n };\n _subjects.state.next(updatedFormState);\n }\n };\n const _executeSchema = async (name) => {\n _updateIsValidating(name, true);\n const result = await _options.resolver(_formValues, _options.context, getResolverOptions(name || _names.mount, _fields, _options.criteriaMode, _options.shouldUseNativeValidation));\n _updateIsValidating(name);\n return result;\n };\n const executeSchemaAndUpdateState = async (names) => {\n const { errors } = await _executeSchema(names);\n if (names) {\n for (const name of names) {\n const error = get(errors, name);\n error\n ? set(_formState.errors, name, error)\n : unset(_formState.errors, name);\n }\n }\n else {\n _formState.errors = errors;\n }\n return errors;\n };\n const executeBuiltInValidation = async (fields, shouldOnlyCheckValid, context = {\n valid: true,\n }) => {\n for (const name in fields) {\n const field = fields[name];\n if (field) {\n const { _f, ...fieldValue } = field;\n if (_f) {\n const isFieldArrayRoot = _names.array.has(_f.name);\n const isPromiseFunction = field._f && hasPromiseValidation(field._f);\n if (isPromiseFunction && _proxyFormState.validatingFields) {\n _updateIsValidating([name], true);\n }\n const fieldError = await validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation && !shouldOnlyCheckValid, isFieldArrayRoot);\n if (isPromiseFunction && _proxyFormState.validatingFields) {\n _updateIsValidating([name]);\n }\n if (fieldError[_f.name]) {\n context.valid = false;\n if (shouldOnlyCheckValid) {\n break;\n }\n }\n !shouldOnlyCheckValid &&\n (get(fieldError, _f.name)\n ? isFieldArrayRoot\n ? updateFieldArrayRootError(_formState.errors, fieldError, _f.name)\n : set(_formState.errors, _f.name, fieldError[_f.name])\n : unset(_formState.errors, _f.name));\n }\n !isEmptyObject(fieldValue) &&\n (await executeBuiltInValidation(fieldValue, shouldOnlyCheckValid, context));\n }\n }\n return context.valid;\n };\n const _removeUnmounted = () => {\n for (const name of _names.unMount) {\n const field = get(_fields, name);\n field &&\n (field._f.refs\n ? field._f.refs.every((ref) => !live(ref))\n : !live(field._f.ref)) &&\n unregister(name);\n }\n _names.unMount = new Set();\n };\n const _getDirty = (name, data) => !_options.disabled &&\n (name && data && set(_formValues, name, data),\n !deepEqual(getValues(), _defaultValues));\n const _getWatch = (names, defaultValue, isGlobal) => generateWatchOutput(names, _names, {\n ...(_state.mount\n ? _formValues\n : isUndefined(defaultValue)\n ? _defaultValues\n : isString(names)\n ? { [names]: defaultValue }\n : defaultValue),\n }, isGlobal, defaultValue);\n const _getFieldArray = (name) => compact(get(_state.mount ? _formValues : _defaultValues, name, _options.shouldUnregister ? get(_defaultValues, name, []) : []));\n const setFieldValue = (name, value, options = {}) => {\n const field = get(_fields, name);\n let fieldValue = value;\n if (field) {\n const fieldReference = field._f;\n if (fieldReference) {\n !fieldReference.disabled &&\n set(_formValues, name, getFieldValueAs(value, fieldReference));\n fieldValue =\n isHTMLElement(fieldReference.ref) && isNullOrUndefined(value)\n ? ''\n : value;\n if (isMultipleSelect(fieldReference.ref)) {\n [...fieldReference.ref.options].forEach((optionRef) => (optionRef.selected = fieldValue.includes(optionRef.value)));\n }\n else if (fieldReference.refs) {\n if (isCheckBoxInput(fieldReference.ref)) {\n fieldReference.refs.length > 1\n ? fieldReference.refs.forEach((checkboxRef) => (!checkboxRef.defaultChecked || !checkboxRef.disabled) &&\n (checkboxRef.checked = Array.isArray(fieldValue)\n ? !!fieldValue.find((data) => data === checkboxRef.value)\n : fieldValue === checkboxRef.value))\n : fieldReference.refs[0] &&\n (fieldReference.refs[0].checked = !!fieldValue);\n }\n else {\n fieldReference.refs.forEach((radioRef) => (radioRef.checked = radioRef.value === fieldValue));\n }\n }\n else if (isFileInput(fieldReference.ref)) {\n fieldReference.ref.value = '';\n }\n else {\n fieldReference.ref.value = fieldValue;\n if (!fieldReference.ref.type) {\n _subjects.values.next({\n name,\n values: { ..._formValues },\n });\n }\n }\n }\n }\n (options.shouldDirty || options.shouldTouch) &&\n updateTouchAndDirty(name, fieldValue, options.shouldTouch, options.shouldDirty, true);\n options.shouldValidate && trigger(name);\n };\n const setValues = (name, value, options) => {\n for (const fieldKey in value) {\n const fieldValue = value[fieldKey];\n const fieldName = `${name}.${fieldKey}`;\n const field = get(_fields, fieldName);\n (_names.array.has(name) ||\n isObject(fieldValue) ||\n (field && !field._f)) &&\n !isDateObject(fieldValue)\n ? setValues(fieldName, fieldValue, options)\n : setFieldValue(fieldName, fieldValue, options);\n }\n };\n const setValue = (name, value, options = {}) => {\n const field = get(_fields, name);\n const isFieldArray = _names.array.has(name);\n const cloneValue = cloneObject(value);\n set(_formValues, name, cloneValue);\n if (isFieldArray) {\n _subjects.array.next({\n name,\n values: { ..._formValues },\n });\n if ((_proxyFormState.isDirty || _proxyFormState.dirtyFields) &&\n options.shouldDirty) {\n _subjects.state.next({\n name,\n dirtyFields: getDirtyFields(_defaultValues, _formValues),\n isDirty: _getDirty(name, cloneValue),\n });\n }\n }\n else {\n field && !field._f && !isNullOrUndefined(cloneValue)\n ? setValues(name, cloneValue, options)\n : setFieldValue(name, cloneValue, options);\n }\n isWatched(name, _names) && _subjects.state.next({ ..._formState });\n _subjects.values.next({\n name: _state.mount ? name : undefined,\n values: { ..._formValues },\n });\n };\n const onChange = async (event) => {\n _state.mount = true;\n const target = event.target;\n let name = target.name;\n let isFieldValueUpdated = true;\n const field = get(_fields, name);\n const getCurrentFieldValue = () => target.type ? getFieldValue(field._f) : getEventValue(event);\n const _updateIsFieldValueUpdated = (fieldValue) => {\n isFieldValueUpdated =\n Number.isNaN(fieldValue) ||\n (isDateObject(fieldValue) && isNaN(fieldValue.getTime())) ||\n deepEqual(fieldValue, get(_formValues, name, fieldValue));\n };\n if (field) {\n let error;\n let isValid;\n const fieldValue = getCurrentFieldValue();\n const isBlurEvent = event.type === EVENTS.BLUR || event.type === EVENTS.FOCUS_OUT;\n const shouldSkipValidation = (!hasValidation(field._f) &&\n !_options.resolver &&\n !get(_formState.errors, name) &&\n !field._f.deps) ||\n skipValidation(isBlurEvent, get(_formState.touchedFields, name), _formState.isSubmitted, validationModeAfterSubmit, validationModeBeforeSubmit);\n const watched = isWatched(name, _names, isBlurEvent);\n set(_formValues, name, fieldValue);\n if (isBlurEvent) {\n field._f.onBlur && field._f.onBlur(event);\n delayErrorCallback && delayErrorCallback(0);\n }\n else if (field._f.onChange) {\n field._f.onChange(event);\n }\n const fieldState = updateTouchAndDirty(name, fieldValue, isBlurEvent, false);\n const shouldRender = !isEmptyObject(fieldState) || watched;\n !isBlurEvent &&\n _subjects.values.next({\n name,\n type: event.type,\n values: { ..._formValues },\n });\n if (shouldSkipValidation) {\n if (_proxyFormState.isValid) {\n if (_options.mode === 'onBlur' && isBlurEvent) {\n _updateValid();\n }\n else if (!isBlurEvent) {\n _updateValid();\n }\n }\n return (shouldRender &&\n _subjects.state.next({ name, ...(watched ? {} : fieldState) }));\n }\n !isBlurEvent && watched && _subjects.state.next({ ..._formState });\n if (_options.resolver) {\n const { errors } = await _executeSchema([name]);\n _updateIsFieldValueUpdated(fieldValue);\n if (isFieldValueUpdated) {\n const previousErrorLookupResult = schemaErrorLookup(_formState.errors, _fields, name);\n const errorLookupResult = schemaErrorLookup(errors, _fields, previousErrorLookupResult.name || name);\n error = errorLookupResult.error;\n name = errorLookupResult.name;\n isValid = isEmptyObject(errors);\n }\n }\n else {\n _updateIsValidating([name], true);\n error = (await validateField(field, _names.disabled, _formValues, shouldDisplayAllAssociatedErrors, _options.shouldUseNativeValidation))[name];\n _updateIsValidating([name]);\n _updateIsFieldValueUpdated(fieldValue);\n if (isFieldValueUpdated) {\n if (error) {\n isValid = false;\n }\n else if (_proxyFormState.isValid) {\n isValid = await executeBuiltInValidation(_fields, true);\n }\n }\n }\n if (isFieldValueUpdated) {\n field._f.deps &&\n trigger(field._f.deps);\n shouldRenderByError(name, isValid, error, fieldState);\n }\n }\n };\n const _focusInput = (ref, key) => {\n if (get(_formState.errors, key) && ref.focus) {\n ref.focus();\n return 1;\n }\n return;\n };\n const trigger = async (name, options = {}) => {\n let isValid;\n let validationResult;\n const fieldNames = convertToArrayPayload(name);\n if (_options.resolver) {\n const errors = await executeSchemaAndUpdateState(isUndefined(name) ? name : fieldNames);\n isValid = isEmptyObject(errors);\n validationResult = name\n ? !fieldNames.some((name) => get(errors, name))\n : isValid;\n }\n else if (name) {\n validationResult = (await Promise.all(fieldNames.map(async (fieldName) => {\n const field = get(_fields, fieldName);\n return await executeBuiltInValidation(field && field._f ? { [fieldName]: field } : field);\n }))).every(Boolean);\n !(!validationResult && !_formState.isValid) && _updateValid();\n }\n else {\n validationResult = isValid = await executeBuiltInValidation(_fields);\n }\n _subjects.state.next({\n ...(!isString(name) ||\n (_proxyFormState.isValid && isValid !== _formState.isValid)\n ? {}\n : { name }),\n ...(_options.resolver || !name ? { isValid } : {}),\n errors: _formState.errors,\n });\n options.shouldFocus &&\n !validationResult &&\n iterateFieldsByAction(_fields, _focusInput, name ? fieldNames : _names.mount);\n return validationResult;\n };\n const getValues = (fieldNames) => {\n const values = {\n ...(_state.mount ? _formValues : _defaultValues),\n };\n return isUndefined(fieldNames)\n ? values\n : isString(fieldNames)\n ? get(values, fieldNames)\n : fieldNames.map((name) => get(values, name));\n };\n const getFieldState = (name, formState) => ({\n invalid: !!get((formState || _formState).errors, name),\n isDirty: !!get((formState || _formState).dirtyFields, name),\n error: get((formState || _formState).errors, name),\n isValidating: !!get(_formState.validatingFields, name),\n isTouched: !!get((formState || _formState).touchedFields, name),\n });\n const clearErrors = (name) => {\n name &&\n convertToArrayPayload(name).forEach((inputName) => unset(_formState.errors, inputName));\n _subjects.state.next({\n errors: name ? _formState.errors : {},\n });\n };\n const setError = (name, error, options) => {\n const ref = (get(_fields, name, { _f: {} })._f || {}).ref;\n const currentError = get(_formState.errors, name) || {};\n // Don't override existing error messages elsewhere in the object tree.\n const { ref: currentRef, message, type, ...restOfErrorTree } = currentError;\n set(_formState.errors, name, {\n ...restOfErrorTree,\n ...error,\n ref,\n });\n _subjects.state.next({\n name,\n errors: _formState.errors,\n isValid: false,\n });\n options && options.shouldFocus && ref && ref.focus && ref.focus();\n };\n const watch = (name, defaultValue) => isFunction(name)\n ? _subjects.values.subscribe({\n next: (payload) => name(_getWatch(undefined, defaultValue), payload),\n })\n : _getWatch(name, defaultValue, true);\n const unregister = (name, options = {}) => {\n for (const fieldName of name ? convertToArrayPayload(name) : _names.mount) {\n _names.mount.delete(fieldName);\n _names.array.delete(fieldName);\n if (!options.keepValue) {\n unset(_fields, fieldName);\n unset(_formValues, fieldName);\n }\n !options.keepError && unset(_formState.errors, fieldName);\n !options.keepDirty && unset(_formState.dirtyFields, fieldName);\n !options.keepTouched && unset(_formState.touchedFields, fieldName);\n !options.keepIsValidating &&\n unset(_formState.validatingFields, fieldName);\n !_options.shouldUnregister &&\n !options.keepDefaultValue &&\n unset(_defaultValues, fieldName);\n }\n _subjects.values.next({\n values: { ..._formValues },\n });\n _subjects.state.next({\n ..._formState,\n ...(!options.keepDirty ? {} : { isDirty: _getDirty() }),\n });\n !options.keepIsValid && _updateValid();\n };\n const _updateDisabledField = ({ disabled, name, field, fields, }) => {\n if ((isBoolean(disabled) && _state.mount) ||\n !!disabled ||\n _names.disabled.has(name)) {\n disabled ? _names.disabled.add(name) : _names.disabled.delete(name);\n updateTouchAndDirty(name, getFieldValue(field ? field._f : get(fields, name)._f), false, false, true);\n }\n };\n const register = (name, options = {}) => {\n let field = get(_fields, name);\n const disabledIsDefined = isBoolean(options.disabled) || isBoolean(_options.disabled);\n set(_fields, name, {\n ...(field || {}),\n _f: {\n ...(field && field._f ? field._f : { ref: { name } }),\n name,\n mount: true,\n ...options,\n },\n });\n _names.mount.add(name);\n if (field) {\n _updateDisabledField({\n field,\n disabled: isBoolean(options.disabled)\n ? options.disabled\n : _options.disabled,\n name,\n });\n }\n else {\n updateValidAndValue(name, true, options.value);\n }\n return {\n ...(disabledIsDefined\n ? { disabled: options.disabled || _options.disabled }\n : {}),\n ...(_options.progressive\n ? {\n required: !!options.required,\n min: getRuleValue(options.min),\n max: getRuleValue(options.max),\n minLength: getRuleValue(options.minLength),\n maxLength: getRuleValue(options.maxLength),\n pattern: getRuleValue(options.pattern),\n }\n : {}),\n name,\n onChange,\n onBlur: onChange,\n ref: (ref) => {\n if (ref) {\n register(name, options);\n field = get(_fields, name);\n const fieldRef = isUndefined(ref.value)\n ? ref.querySelectorAll\n ? ref.querySelectorAll('input,select,textarea')[0] || ref\n : ref\n : ref;\n const radioOrCheckbox = isRadioOrCheckbox(fieldRef);\n const refs = field._f.refs || [];\n if (radioOrCheckbox\n ? refs.find((option) => option === fieldRef)\n : fieldRef === field._f.ref) {\n return;\n }\n set(_fields, name, {\n _f: {\n ...field._f,\n ...(radioOrCheckbox\n ? {\n refs: [\n ...refs.filter(live),\n fieldRef,\n ...(Array.isArray(get(_defaultValues, name)) ? [{}] : []),\n ],\n ref: { type: fieldRef.type, name },\n }\n : { ref: fieldRef }),\n },\n });\n updateValidAndValue(name, false, undefined, fieldRef);\n }\n else {\n field = get(_fields, name, {});\n if (field._f) {\n field._f.mount = false;\n }\n (_options.shouldUnregister || options.shouldUnregister) &&\n !(isNameInFieldArray(_names.array, name) && _state.action) &&\n _names.unMount.add(name);\n }\n },\n };\n };\n const _focusError = () => _options.shouldFocusError &&\n iterateFieldsByAction(_fields, _focusInput, _names.mount);\n const _disableForm = (disabled) => {\n if (isBoolean(disabled)) {\n _subjects.state.next({ disabled });\n iterateFieldsByAction(_fields, (ref, name) => {\n const currentField = get(_fields, name);\n if (currentField) {\n ref.disabled = currentField._f.disabled || disabled;\n if (Array.isArray(currentField._f.refs)) {\n currentField._f.refs.forEach((inputRef) => {\n inputRef.disabled = currentField._f.disabled || disabled;\n });\n }\n }\n }, 0, false);\n }\n };\n const handleSubmit = (onValid, onInvalid) => async (e) => {\n let onValidError = undefined;\n if (e) {\n e.preventDefault && e.preventDefault();\n e.persist && e.persist();\n }\n let fieldValues = cloneObject(_formValues);\n if (_names.disabled.size) {\n for (const name of _names.disabled) {\n set(fieldValues, name, undefined);\n }\n }\n _subjects.state.next({\n isSubmitting: true,\n });\n if (_options.resolver) {\n const { errors, values } = await _executeSchema();\n _formState.errors = errors;\n fieldValues = values;\n }\n else {\n await executeBuiltInValidation(_fields);\n }\n unset(_formState.errors, 'root');\n if (isEmptyObject(_formState.errors)) {\n _subjects.state.next({\n errors: {},\n });\n try {\n await onValid(fieldValues, e);\n }\n catch (error) {\n onValidError = error;\n }\n }\n else {\n if (onInvalid) {\n await onInvalid({ ..._formState.errors }, e);\n }\n _focusError();\n setTimeout(_focusError);\n }\n _subjects.state.next({\n isSubmitted: true,\n isSubmitting: false,\n isSubmitSuccessful: isEmptyObject(_formState.errors) && !onValidError,\n submitCount: _formState.submitCount + 1,\n errors: _formState.errors,\n });\n if (onValidError) {\n throw onValidError;\n }\n };\n const resetField = (name, options = {}) => {\n if (get(_fields, name)) {\n if (isUndefined(options.defaultValue)) {\n setValue(name, cloneObject(get(_defaultValues, name)));\n }\n else {\n setValue(name, options.defaultValue);\n set(_defaultValues, name, cloneObject(options.defaultValue));\n }\n if (!options.keepTouched) {\n unset(_formState.touchedFields, name);\n }\n if (!options.keepDirty) {\n unset(_formState.dirtyFields, name);\n _formState.isDirty = options.defaultValue\n ? _getDirty(name, cloneObject(get(_defaultValues, name)))\n : _getDirty();\n }\n if (!options.keepError) {\n unset(_formState.errors, name);\n _proxyFormState.isValid && _updateValid();\n }\n _subjects.state.next({ ..._formState });\n }\n };\n const _reset = (formValues, keepStateOptions = {}) => {\n const updatedValues = formValues ? cloneObject(formValues) : _defaultValues;\n const cloneUpdatedValues = cloneObject(updatedValues);\n const isEmptyResetValues = isEmptyObject(formValues);\n const values = isEmptyResetValues ? _defaultValues : cloneUpdatedValues;\n if (!keepStateOptions.keepDefaultValues) {\n _defaultValues = updatedValues;\n }\n if (!keepStateOptions.keepValues) {\n if (keepStateOptions.keepDirtyValues) {\n const fieldsToCheck = new Set([\n ..._names.mount,\n ...Object.keys(getDirtyFields(_defaultValues, _formValues)),\n ]);\n for (const fieldName of Array.from(fieldsToCheck)) {\n get(_formState.dirtyFields, fieldName)\n ? set(values, fieldName, get(_formValues, fieldName))\n : setValue(fieldName, get(values, fieldName));\n }\n }\n else {\n if (isWeb && isUndefined(formValues)) {\n for (const name of _names.mount) {\n const field = get(_fields, name);\n if (field && field._f) {\n const fieldReference = Array.isArray(field._f.refs)\n ? field._f.refs[0]\n : field._f.ref;\n if (isHTMLElement(fieldReference)) {\n const form = fieldReference.closest('form');\n if (form) {\n form.reset();\n break;\n }\n }\n }\n }\n }\n _fields = {};\n }\n _formValues = _options.shouldUnregister\n ? keepStateOptions.keepDefaultValues\n ? cloneObject(_defaultValues)\n : {}\n : cloneObject(values);\n _subjects.array.next({\n values: { ...values },\n });\n _subjects.values.next({\n values: { ...values },\n });\n }\n _names = {\n mount: keepStateOptions.keepDirtyValues ? _names.mount : new Set(),\n unMount: new Set(),\n array: new Set(),\n disabled: new Set(),\n watch: new Set(),\n watchAll: false,\n focus: '',\n };\n _state.mount =\n !_proxyFormState.isValid ||\n !!keepStateOptions.keepIsValid ||\n !!keepStateOptions.keepDirtyValues;\n _state.watch = !!_options.shouldUnregister;\n _subjects.state.next({\n submitCount: keepStateOptions.keepSubmitCount\n ? _formState.submitCount\n : 0,\n isDirty: isEmptyResetValues\n ? false\n : keepStateOptions.keepDirty\n ? _formState.isDirty\n : !!(keepStateOptions.keepDefaultValues &&\n !deepEqual(formValues, _defaultValues)),\n isSubmitted: keepStateOptions.keepIsSubmitted\n ? _formState.isSubmitted\n : false,\n dirtyFields: isEmptyResetValues\n ? {}\n : keepStateOptions.keepDirtyValues\n ? keepStateOptions.keepDefaultValues && _formValues\n ? getDirtyFields(_defaultValues, _formValues)\n : _formState.dirtyFields\n : keepStateOptions.keepDefaultValues && formValues\n ? getDirtyFields(_defaultValues, formValues)\n : keepStateOptions.keepDirty\n ? _formState.dirtyFields\n : {},\n touchedFields: keepStateOptions.keepTouched\n ? _formState.touchedFields\n : {},\n errors: keepStateOptions.keepErrors ? _formState.errors : {},\n isSubmitSuccessful: keepStateOptions.keepIsSubmitSuccessful\n ? _formState.isSubmitSuccessful\n : false,\n isSubmitting: false,\n });\n };\n const reset = (formValues, keepStateOptions) => _reset(isFunction(formValues)\n ? formValues(_formValues)\n : formValues, keepStateOptions);\n const setFocus = (name, options = {}) => {\n const field = get(_fields, name);\n const fieldReference = field && field._f;\n if (fieldReference) {\n const fieldRef = fieldReference.refs\n ? fieldReference.refs[0]\n : fieldReference.ref;\n if (fieldRef.focus) {\n fieldRef.focus();\n options.shouldSelect &&\n isFunction(fieldRef.select) &&\n fieldRef.select();\n }\n }\n };\n const _updateFormState = (updatedFormState) => {\n _formState = {\n ..._formState,\n ...updatedFormState,\n };\n };\n const _resetDefaultValues = () => isFunction(_options.defaultValues) &&\n _options.defaultValues().then((values) => {\n reset(values, _options.resetOptions);\n _subjects.state.next({\n isLoading: false,\n });\n });\n return {\n control: {\n register,\n unregister,\n getFieldState,\n handleSubmit,\n setError,\n _executeSchema,\n _getWatch,\n _getDirty,\n _updateValid,\n _removeUnmounted,\n _updateFieldArray,\n _updateDisabledField,\n _getFieldArray,\n _reset,\n _resetDefaultValues,\n _updateFormState,\n _disableForm,\n _subjects,\n _proxyFormState,\n _setErrors,\n get _fields() {\n return _fields;\n },\n get _formValues() {\n return _formValues;\n },\n get _state() {\n return _state;\n },\n set _state(value) {\n _state = value;\n },\n get _defaultValues() {\n return _defaultValues;\n },\n get _names() {\n return _names;\n },\n set _names(value) {\n _names = value;\n },\n get _formState() {\n return _formState;\n },\n set _formState(value) {\n _formState = value;\n },\n get _options() {\n return _options;\n },\n set _options(value) {\n _options = {\n ..._options,\n ...value,\n };\n },\n },\n trigger,\n register,\n handleSubmit,\n watch,\n setValue,\n getValues,\n reset,\n resetField,\n clearErrors,\n unregister,\n setError,\n setFocus,\n getFieldState,\n };\n}\n\n/**\n * Custom hook to manage the entire form.\n *\n * @remarks\n * [API](https://react-hook-form.com/docs/useform) • [Demo](https://codesandbox.io/s/react-hook-form-get-started-ts-5ksmm) • [Video](https://www.youtube.com/watch?v=RkXv4AXXC_4)\n *\n * @param props - form configuration and validation parameters.\n *\n * @returns methods - individual functions to manage the form state. {@link UseFormReturn}\n *\n * @example\n * ```tsx\n * function App() {\n * const { register, handleSubmit, watch, formState: { errors } } = useForm();\n * const onSubmit = data => console.log(data);\n *\n * console.log(watch(\"example\"));\n *\n * return (\n *
\n * \n * \n * {errors.exampleRequired && This field is required}\n * \n *
\n * );\n * }\n * ```\n */\nfunction useForm(props = {}) {\n const _formControl = React.useRef(undefined);\n const _values = React.useRef(undefined);\n const [formState, updateFormState] = React.useState({\n isDirty: false,\n isValidating: false,\n isLoading: isFunction(props.defaultValues),\n isSubmitted: false,\n isSubmitting: false,\n isSubmitSuccessful: false,\n isValid: false,\n submitCount: 0,\n dirtyFields: {},\n touchedFields: {},\n validatingFields: {},\n errors: props.errors || {},\n disabled: props.disabled || false,\n defaultValues: isFunction(props.defaultValues)\n ? undefined\n : props.defaultValues,\n });\n if (!_formControl.current) {\n _formControl.current = {\n ...createFormControl(props),\n formState,\n };\n }\n const control = _formControl.current.control;\n control._options = props;\n useSubscribe({\n subject: control._subjects.state,\n next: (value) => {\n if (shouldRenderFormState(value, control._proxyFormState, control._updateFormState, true)) {\n updateFormState({ ...control._formState });\n }\n },\n });\n React.useEffect(() => control._disableForm(props.disabled), [control, props.disabled]);\n React.useEffect(() => {\n if (control._proxyFormState.isDirty) {\n const isDirty = control._getDirty();\n if (isDirty !== formState.isDirty) {\n control._subjects.state.next({\n isDirty,\n });\n }\n }\n }, [control, formState.isDirty]);\n React.useEffect(() => {\n if (props.values && !deepEqual(props.values, _values.current)) {\n control._reset(props.values, control._options.resetOptions);\n _values.current = props.values;\n updateFormState((state) => ({ ...state }));\n }\n else {\n control._resetDefaultValues();\n }\n }, [props.values, control]);\n React.useEffect(() => {\n if (props.errors) {\n control._setErrors(props.errors);\n }\n }, [props.errors, control]);\n React.useEffect(() => {\n if (!control._state.mount) {\n control._updateValid();\n control._state.mount = true;\n }\n if (control._state.watch) {\n control._state.watch = false;\n control._subjects.state.next({ ...control._formState });\n }\n control._removeUnmounted();\n });\n React.useEffect(() => {\n props.shouldUnregister &&\n control._subjects.values.next({\n values: control._getWatch(),\n });\n }, [props.shouldUnregister, control]);\n _formControl.current.formState = getProxyFormState(formState, control);\n return _formControl.current;\n}\n\nexport { Controller, Form, FormProvider, appendErrors, get, set, useController, useFieldArray, useForm, useFormContext, useFormState, useWatch };\n//# sourceMappingURL=index.esm.mjs.map\n","import { useLayoutEffect } from 'react';\n\nvar index = useLayoutEffect ;\n\nexport default index;\n","// From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/globalThis\nfunction getGlobal() {\n if (typeof globalThis !== 'undefined') {\n return globalThis;\n }\n if (typeof self !== 'undefined') {\n return self;\n }\n if (typeof window !== 'undefined') {\n return window;\n }\n if (typeof global !== 'undefined') {\n return global;\n }\n}\nfunction getDevTools() {\n const w = getGlobal();\n if (w.__xstate__) {\n return w.__xstate__;\n }\n return undefined;\n}\nfunction registerService(service) {\n if (typeof window === 'undefined') {\n return;\n }\n const devTools = getDevTools();\n if (devTools) {\n devTools.register(service);\n }\n}\nconst devToolsAdapter = service => {\n if (typeof window === 'undefined') {\n return;\n }\n const devTools = getDevTools();\n if (devTools) {\n devTools.register(service);\n }\n};\n\nexport { devToolsAdapter, getGlobal, registerService };\n","import { devToolsAdapter } from '../dev/dist/xstate-dev.esm.js';\n\nclass Mailbox {\n constructor(_process) {\n this._process = _process;\n this._active = false;\n this._current = null;\n this._last = null;\n }\n start() {\n this._active = true;\n this.flush();\n }\n clear() {\n // we can't set _current to null because we might be currently processing\n // and enqueue following clear shouldnt start processing the enqueued item immediately\n if (this._current) {\n this._current.next = null;\n this._last = this._current;\n }\n }\n enqueue(event) {\n const enqueued = {\n value: event,\n next: null\n };\n if (this._current) {\n this._last.next = enqueued;\n this._last = enqueued;\n return;\n }\n this._current = enqueued;\n this._last = enqueued;\n if (this._active) {\n this.flush();\n }\n }\n flush() {\n while (this._current) {\n // atm the given _process is responsible for implementing proper try/catch handling\n // we assume here that this won't throw in a way that can affect this mailbox\n const consumed = this._current;\n this._process(consumed.value);\n this._current = consumed.next;\n }\n this._last = null;\n }\n}\n\nconst STATE_DELIMITER = '.';\nconst TARGETLESS_KEY = '';\nconst NULL_EVENT = '';\nconst STATE_IDENTIFIER = '#';\nconst WILDCARD = '*';\nconst XSTATE_INIT = 'xstate.init';\nconst XSTATE_ERROR = 'xstate.error';\nconst XSTATE_STOP = 'xstate.stop';\n\n/**\n * Returns an event that represents an implicit event that is sent after the\n * specified `delay`.\n *\n * @param delayRef The delay in milliseconds\n * @param id The state node ID where this event is handled\n */\nfunction createAfterEvent(delayRef, id) {\n return {\n type: `xstate.after.${delayRef}.${id}`\n };\n}\n\n/**\n * Returns an event that represents that a final state node has been reached in\n * the parent state node.\n *\n * @param id The final state node's parent state node `id`\n * @param output The data to pass into the event\n */\nfunction createDoneStateEvent(id, output) {\n return {\n type: `xstate.done.state.${id}`,\n output\n };\n}\n\n/**\n * Returns an event that represents that an invoked service has terminated.\n *\n * An invoked service is terminated when it has reached a top-level final state\n * node, but not when it is canceled.\n *\n * @param invokeId The invoked service ID\n * @param output The data to pass into the event\n */\nfunction createDoneActorEvent(invokeId, output) {\n return {\n type: `xstate.done.actor.${invokeId}`,\n output,\n actorId: invokeId\n };\n}\nfunction createErrorActorEvent(id, error) {\n return {\n type: `xstate.error.actor.${id}`,\n error,\n actorId: id\n };\n}\nfunction createInitEvent(input) {\n return {\n type: XSTATE_INIT,\n input\n };\n}\n\n/**\n * This function makes sure that unhandled errors are thrown in a separate\n * macrotask. It allows those errors to be detected by global error handlers and\n * reported to bug tracking services without interrupting our own stack of\n * execution.\n *\n * @param err Error to be thrown\n */\nfunction reportUnhandledError(err) {\n setTimeout(() => {\n throw err;\n });\n}\n\nconst symbolObservable = (() => typeof Symbol === 'function' && Symbol.observable || '@@observable')();\n\nfunction matchesState(parentStateId, childStateId) {\n const parentStateValue = toStateValue(parentStateId);\n const childStateValue = toStateValue(childStateId);\n if (typeof childStateValue === 'string') {\n if (typeof parentStateValue === 'string') {\n return childStateValue === parentStateValue;\n }\n\n // Parent more specific than child\n return false;\n }\n if (typeof parentStateValue === 'string') {\n return parentStateValue in childStateValue;\n }\n return Object.keys(parentStateValue).every(key => {\n if (!(key in childStateValue)) {\n return false;\n }\n return matchesState(parentStateValue[key], childStateValue[key]);\n });\n}\nfunction toStatePath(stateId) {\n if (isArray(stateId)) {\n return stateId;\n }\n const result = [];\n let segment = '';\n for (let i = 0; i < stateId.length; i++) {\n const char = stateId.charCodeAt(i);\n switch (char) {\n // \\\n case 92:\n // consume the next character\n segment += stateId[i + 1];\n // and skip over it\n i++;\n continue;\n // .\n case 46:\n result.push(segment);\n segment = '';\n continue;\n }\n segment += stateId[i];\n }\n result.push(segment);\n return result;\n}\nfunction toStateValue(stateValue) {\n if (isMachineSnapshot(stateValue)) {\n return stateValue.value;\n }\n if (typeof stateValue !== 'string') {\n return stateValue;\n }\n const statePath = toStatePath(stateValue);\n return pathToStateValue(statePath);\n}\nfunction pathToStateValue(statePath) {\n if (statePath.length === 1) {\n return statePath[0];\n }\n const value = {};\n let marker = value;\n for (let i = 0; i < statePath.length - 1; i++) {\n if (i === statePath.length - 2) {\n marker[statePath[i]] = statePath[i + 1];\n } else {\n const previous = marker;\n marker = {};\n previous[statePath[i]] = marker;\n }\n }\n return value;\n}\nfunction mapValues(collection, iteratee) {\n const result = {};\n const collectionKeys = Object.keys(collection);\n for (let i = 0; i < collectionKeys.length; i++) {\n const key = collectionKeys[i];\n result[key] = iteratee(collection[key], key, collection, i);\n }\n return result;\n}\nfunction toArrayStrict(value) {\n if (isArray(value)) {\n return value;\n }\n return [value];\n}\nfunction toArray(value) {\n if (value === undefined) {\n return [];\n }\n return toArrayStrict(value);\n}\nfunction resolveOutput(mapper, context, event, self) {\n if (typeof mapper === 'function') {\n return mapper({\n context,\n event,\n self\n });\n }\n return mapper;\n}\nfunction isArray(value) {\n return Array.isArray(value);\n}\nfunction isErrorActorEvent(event) {\n return event.type.startsWith('xstate.error.actor');\n}\nfunction toTransitionConfigArray(configLike) {\n return toArrayStrict(configLike).map(transitionLike => {\n if (typeof transitionLike === 'undefined' || typeof transitionLike === 'string') {\n return {\n target: transitionLike\n };\n }\n return transitionLike;\n });\n}\nfunction normalizeTarget(target) {\n if (target === undefined || target === TARGETLESS_KEY) {\n return undefined;\n }\n return toArray(target);\n}\nfunction toObserver(nextHandler, errorHandler, completionHandler) {\n const isObserver = typeof nextHandler === 'object';\n const self = isObserver ? nextHandler : undefined;\n return {\n next: (isObserver ? nextHandler.next : nextHandler)?.bind(self),\n error: (isObserver ? nextHandler.error : errorHandler)?.bind(self),\n complete: (isObserver ? nextHandler.complete : completionHandler)?.bind(self)\n };\n}\nfunction createInvokeId(stateNodeId, index) {\n return `${index}.${stateNodeId}`;\n}\nfunction resolveReferencedActor(machine, src) {\n const match = src.match(/^xstate\\.invoke\\.(\\d+)\\.(.*)/);\n if (!match) {\n return machine.implementations.actors[src];\n }\n const [, indexStr, nodeId] = match;\n const node = machine.getStateNodeById(nodeId);\n const invokeConfig = node.config.invoke;\n return (Array.isArray(invokeConfig) ? invokeConfig[indexStr] : invokeConfig).src;\n}\nfunction getAllOwnEventDescriptors(snapshot) {\n return [...new Set([...snapshot._nodes.flatMap(sn => sn.ownEvents)])];\n}\n\nfunction createScheduledEventId(actorRef, id) {\n return `${actorRef.sessionId}.${id}`;\n}\nlet idCounter = 0;\nfunction createSystem(rootActor, options) {\n const children = new Map();\n const keyedActors = new Map();\n const reverseKeyedActors = new WeakMap();\n const inspectionObservers = new Set();\n const timerMap = {};\n const {\n clock,\n logger\n } = options;\n const scheduler = {\n schedule: (source, target, event, delay, id = Math.random().toString(36).slice(2)) => {\n const scheduledEvent = {\n source,\n target,\n event,\n delay,\n id,\n startedAt: Date.now()\n };\n const scheduledEventId = createScheduledEventId(source, id);\n system._snapshot._scheduledEvents[scheduledEventId] = scheduledEvent;\n const timeout = clock.setTimeout(() => {\n delete timerMap[scheduledEventId];\n delete system._snapshot._scheduledEvents[scheduledEventId];\n system._relay(source, target, event);\n }, delay);\n timerMap[scheduledEventId] = timeout;\n },\n cancel: (source, id) => {\n const scheduledEventId = createScheduledEventId(source, id);\n const timeout = timerMap[scheduledEventId];\n delete timerMap[scheduledEventId];\n delete system._snapshot._scheduledEvents[scheduledEventId];\n if (timeout !== undefined) {\n clock.clearTimeout(timeout);\n }\n },\n cancelAll: actorRef => {\n for (const scheduledEventId in system._snapshot._scheduledEvents) {\n const scheduledEvent = system._snapshot._scheduledEvents[scheduledEventId];\n if (scheduledEvent.source === actorRef) {\n scheduler.cancel(actorRef, scheduledEvent.id);\n }\n }\n }\n };\n const sendInspectionEvent = event => {\n if (!inspectionObservers.size) {\n return;\n }\n const resolvedInspectionEvent = {\n ...event,\n rootId: rootActor.sessionId\n };\n inspectionObservers.forEach(observer => observer.next?.(resolvedInspectionEvent));\n };\n const system = {\n _snapshot: {\n _scheduledEvents: (options?.snapshot && options.snapshot.scheduler) ?? {}\n },\n _bookId: () => `x:${idCounter++}`,\n _register: (sessionId, actorRef) => {\n children.set(sessionId, actorRef);\n return sessionId;\n },\n _unregister: actorRef => {\n children.delete(actorRef.sessionId);\n const systemId = reverseKeyedActors.get(actorRef);\n if (systemId !== undefined) {\n keyedActors.delete(systemId);\n reverseKeyedActors.delete(actorRef);\n }\n },\n get: systemId => {\n return keyedActors.get(systemId);\n },\n _set: (systemId, actorRef) => {\n const existing = keyedActors.get(systemId);\n if (existing && existing !== actorRef) {\n throw new Error(`Actor with system ID '${systemId}' already exists.`);\n }\n keyedActors.set(systemId, actorRef);\n reverseKeyedActors.set(actorRef, systemId);\n },\n inspect: observerOrFn => {\n const observer = toObserver(observerOrFn);\n inspectionObservers.add(observer);\n return {\n unsubscribe() {\n inspectionObservers.delete(observer);\n }\n };\n },\n _sendInspectionEvent: sendInspectionEvent,\n _relay: (source, target, event) => {\n system._sendInspectionEvent({\n type: '@xstate.event',\n sourceRef: source,\n actorRef: target,\n event\n });\n target._send(event);\n },\n scheduler,\n getSnapshot: () => {\n return {\n _scheduledEvents: {\n ...system._snapshot._scheduledEvents\n }\n };\n },\n start: () => {\n const scheduledEvents = system._snapshot._scheduledEvents;\n system._snapshot._scheduledEvents = {};\n for (const scheduledId in scheduledEvents) {\n const {\n source,\n target,\n event,\n delay,\n id\n } = scheduledEvents[scheduledId];\n scheduler.schedule(source, target, event, delay, id);\n }\n },\n _clock: clock,\n _logger: logger\n };\n return system;\n}\n\nlet executingCustomAction = false;\nconst $$ACTOR_TYPE = 1;\n\n// those values are currently used by @xstate/react directly so it's important to keep the assigned values in sync\nlet ProcessingStatus = /*#__PURE__*/function (ProcessingStatus) {\n ProcessingStatus[ProcessingStatus[\"NotStarted\"] = 0] = \"NotStarted\";\n ProcessingStatus[ProcessingStatus[\"Running\"] = 1] = \"Running\";\n ProcessingStatus[ProcessingStatus[\"Stopped\"] = 2] = \"Stopped\";\n return ProcessingStatus;\n}({});\nconst defaultOptions = {\n clock: {\n setTimeout: (fn, ms) => {\n return setTimeout(fn, ms);\n },\n clearTimeout: id => {\n return clearTimeout(id);\n }\n },\n logger: console.log.bind(console),\n devTools: false\n};\n\n/**\n * An Actor is a running process that can receive events, send events and change\n * its behavior based on the events it receives, which can cause effects outside\n * of the actor. When you run a state machine, it becomes an actor.\n */\nclass Actor {\n /**\n * Creates a new actor instance for the given logic with the provided options,\n * if any.\n *\n * @param logic The logic to create an actor from\n * @param options Actor options\n */\n constructor(logic, options) {\n this.logic = logic;\n /** The current internal state of the actor. */\n this._snapshot = void 0;\n /**\n * The clock that is responsible for setting and clearing timeouts, such as\n * delayed events and transitions.\n */\n this.clock = void 0;\n this.options = void 0;\n /** The unique identifier for this actor relative to its parent. */\n this.id = void 0;\n this.mailbox = new Mailbox(this._process.bind(this));\n this.observers = new Set();\n this.eventListeners = new Map();\n this.logger = void 0;\n /** @internal */\n this._processingStatus = ProcessingStatus.NotStarted;\n // Actor Ref\n this._parent = void 0;\n /** @internal */\n this._syncSnapshot = void 0;\n this.ref = void 0;\n // TODO: add typings for system\n this._actorScope = void 0;\n this._systemId = void 0;\n /** The globally unique process ID for this invocation. */\n this.sessionId = void 0;\n /** The system to which this actor belongs. */\n this.system = void 0;\n this._doneEvent = void 0;\n this.src = void 0;\n // array of functions to defer\n this._deferred = [];\n const resolvedOptions = {\n ...defaultOptions,\n ...options\n };\n const {\n clock,\n logger,\n parent,\n syncSnapshot,\n id,\n systemId,\n inspect\n } = resolvedOptions;\n this.system = parent ? parent.system : createSystem(this, {\n clock,\n logger\n });\n if (inspect && !parent) {\n // Always inspect at the system-level\n this.system.inspect(toObserver(inspect));\n }\n this.sessionId = this.system._bookId();\n this.id = id ?? this.sessionId;\n this.logger = options?.logger ?? this.system._logger;\n this.clock = options?.clock ?? this.system._clock;\n this._parent = parent;\n this._syncSnapshot = syncSnapshot;\n this.options = resolvedOptions;\n this.src = resolvedOptions.src ?? logic;\n this.ref = this;\n this._actorScope = {\n self: this,\n id: this.id,\n sessionId: this.sessionId,\n logger: this.logger,\n defer: fn => {\n this._deferred.push(fn);\n },\n system: this.system,\n stopChild: child => {\n if (child._parent !== this) {\n throw new Error(`Cannot stop child actor ${child.id} of ${this.id} because it is not a child`);\n }\n child._stop();\n },\n emit: emittedEvent => {\n const listeners = this.eventListeners.get(emittedEvent.type);\n const wildcardListener = this.eventListeners.get('*');\n if (!listeners && !wildcardListener) {\n return;\n }\n const allListeners = [...(listeners ? listeners.values() : []), ...(wildcardListener ? wildcardListener.values() : [])];\n for (const handler of allListeners) {\n handler(emittedEvent);\n }\n },\n actionExecutor: action => {\n const exec = () => {\n this._actorScope.system._sendInspectionEvent({\n type: '@xstate.action',\n actorRef: this,\n action: {\n type: action.type,\n params: action.params\n }\n });\n if (!action.exec) {\n return;\n }\n const saveExecutingCustomAction = executingCustomAction;\n try {\n executingCustomAction = true;\n action.exec(action.info, action.params);\n } finally {\n executingCustomAction = saveExecutingCustomAction;\n }\n };\n if (this._processingStatus === ProcessingStatus.Running) {\n exec();\n } else {\n this._deferred.push(exec);\n }\n }\n };\n\n // Ensure that the send method is bound to this Actor instance\n // if destructured\n this.send = this.send.bind(this);\n this.system._sendInspectionEvent({\n type: '@xstate.actor',\n actorRef: this\n });\n if (systemId) {\n this._systemId = systemId;\n this.system._set(systemId, this);\n }\n this._initState(options?.snapshot ?? options?.state);\n if (systemId && this._snapshot.status !== 'active') {\n this.system._unregister(this);\n }\n }\n _initState(persistedState) {\n try {\n this._snapshot = persistedState ? this.logic.restoreSnapshot ? this.logic.restoreSnapshot(persistedState, this._actorScope) : persistedState : this.logic.getInitialSnapshot(this._actorScope, this.options?.input);\n } catch (err) {\n // if we get here then it means that we assign a value to this._snapshot that is not of the correct type\n // we can't get the true `TSnapshot & { status: 'error'; }`, it's impossible\n // so right now this is a lie of sorts\n this._snapshot = {\n status: 'error',\n output: undefined,\n error: err\n };\n }\n }\n update(snapshot, event) {\n // Update state\n this._snapshot = snapshot;\n\n // Execute deferred effects\n let deferredFn;\n while (deferredFn = this._deferred.shift()) {\n try {\n deferredFn();\n } catch (err) {\n // this error can only be caught when executing *initial* actions\n // it's the only time when we call actions provided by the user through those deferreds\n // when the actor is already running we always execute them synchronously while transitioning\n // no \"builtin deferred\" should actually throw an error since they are either safe\n // or the control flow is passed through the mailbox and errors should be caught by the `_process` used by the mailbox\n this._deferred.length = 0;\n this._snapshot = {\n ...snapshot,\n status: 'error',\n error: err\n };\n }\n }\n switch (this._snapshot.status) {\n case 'active':\n for (const observer of this.observers) {\n try {\n observer.next?.(snapshot);\n } catch (err) {\n reportUnhandledError(err);\n }\n }\n break;\n case 'done':\n // next observers are meant to be notified about done snapshots\n // this can be seen as something that is different from how observable work\n // but with observables `complete` callback is called without any arguments\n // it's more ergonomic for XState to treat a done snapshot as a \"next\" value\n // and the completion event as something that is separate,\n // something that merely follows emitting that done snapshot\n for (const observer of this.observers) {\n try {\n observer.next?.(snapshot);\n } catch (err) {\n reportUnhandledError(err);\n }\n }\n this._stopProcedure();\n this._complete();\n this._doneEvent = createDoneActorEvent(this.id, this._snapshot.output);\n if (this._parent) {\n this.system._relay(this, this._parent, this._doneEvent);\n }\n break;\n case 'error':\n this._error(this._snapshot.error);\n break;\n }\n this.system._sendInspectionEvent({\n type: '@xstate.snapshot',\n actorRef: this,\n event,\n snapshot\n });\n }\n\n /**\n * Subscribe an observer to an actor’s snapshot values.\n *\n * @remarks\n * The observer will receive the actor’s snapshot value when it is emitted.\n * The observer can be:\n *\n * - A plain function that receives the latest snapshot, or\n * - An observer object whose `.next(snapshot)` method receives the latest\n * snapshot\n *\n * @example\n *\n * ```ts\n * // Observer as a plain function\n * const subscription = actor.subscribe((snapshot) => {\n * console.log(snapshot);\n * });\n * ```\n *\n * @example\n *\n * ```ts\n * // Observer as an object\n * const subscription = actor.subscribe({\n * next(snapshot) {\n * console.log(snapshot);\n * },\n * error(err) {\n * // ...\n * },\n * complete() {\n * // ...\n * }\n * });\n * ```\n *\n * The return value of `actor.subscribe(observer)` is a subscription object\n * that has an `.unsubscribe()` method. You can call\n * `subscription.unsubscribe()` to unsubscribe the observer:\n *\n * @example\n *\n * ```ts\n * const subscription = actor.subscribe((snapshot) => {\n * // ...\n * });\n *\n * // Unsubscribe the observer\n * subscription.unsubscribe();\n * ```\n *\n * When the actor is stopped, all of its observers will automatically be\n * unsubscribed.\n *\n * @param observer - Either a plain function that receives the latest\n * snapshot, or an observer object whose `.next(snapshot)` method receives\n * the latest snapshot\n */\n\n subscribe(nextListenerOrObserver, errorListener, completeListener) {\n const observer = toObserver(nextListenerOrObserver, errorListener, completeListener);\n if (this._processingStatus !== ProcessingStatus.Stopped) {\n this.observers.add(observer);\n } else {\n switch (this._snapshot.status) {\n case 'done':\n try {\n observer.complete?.();\n } catch (err) {\n reportUnhandledError(err);\n }\n break;\n case 'error':\n {\n const err = this._snapshot.error;\n if (!observer.error) {\n reportUnhandledError(err);\n } else {\n try {\n observer.error(err);\n } catch (err) {\n reportUnhandledError(err);\n }\n }\n break;\n }\n }\n }\n return {\n unsubscribe: () => {\n this.observers.delete(observer);\n }\n };\n }\n on(type, handler) {\n let listeners = this.eventListeners.get(type);\n if (!listeners) {\n listeners = new Set();\n this.eventListeners.set(type, listeners);\n }\n const wrappedHandler = handler.bind(undefined);\n listeners.add(wrappedHandler);\n return {\n unsubscribe: () => {\n listeners.delete(wrappedHandler);\n }\n };\n }\n\n /** Starts the Actor from the initial state */\n start() {\n if (this._processingStatus === ProcessingStatus.Running) {\n // Do not restart the service if it is already started\n return this;\n }\n if (this._syncSnapshot) {\n this.subscribe({\n next: snapshot => {\n if (snapshot.status === 'active') {\n this.system._relay(this, this._parent, {\n type: `xstate.snapshot.${this.id}`,\n snapshot\n });\n }\n },\n error: () => {}\n });\n }\n this.system._register(this.sessionId, this);\n if (this._systemId) {\n this.system._set(this._systemId, this);\n }\n this._processingStatus = ProcessingStatus.Running;\n\n // TODO: this isn't correct when rehydrating\n const initEvent = createInitEvent(this.options.input);\n this.system._sendInspectionEvent({\n type: '@xstate.event',\n sourceRef: this._parent,\n actorRef: this,\n event: initEvent\n });\n const status = this._snapshot.status;\n switch (status) {\n case 'done':\n // a state machine can be \"done\" upon initialization (it could reach a final state using initial microsteps)\n // we still need to complete observers, flush deferreds etc\n this.update(this._snapshot, initEvent);\n // TODO: rethink cleanup of observers, mailbox, etc\n return this;\n case 'error':\n this._error(this._snapshot.error);\n return this;\n }\n if (!this._parent) {\n this.system.start();\n }\n if (this.logic.start) {\n try {\n this.logic.start(this._snapshot, this._actorScope);\n } catch (err) {\n this._snapshot = {\n ...this._snapshot,\n status: 'error',\n error: err\n };\n this._error(err);\n return this;\n }\n }\n\n // TODO: this notifies all subscribers but usually this is redundant\n // there is no real change happening here\n // we need to rethink if this needs to be refactored\n this.update(this._snapshot, initEvent);\n if (this.options.devTools) {\n this.attachDevTools();\n }\n this.mailbox.start();\n return this;\n }\n _process(event) {\n let nextState;\n let caughtError;\n try {\n nextState = this.logic.transition(this._snapshot, event, this._actorScope);\n } catch (err) {\n // we wrap it in a box so we can rethrow it later even if falsy value gets caught here\n caughtError = {\n err\n };\n }\n if (caughtError) {\n const {\n err\n } = caughtError;\n this._snapshot = {\n ...this._snapshot,\n status: 'error',\n error: err\n };\n this._error(err);\n return;\n }\n this.update(nextState, event);\n if (event.type === XSTATE_STOP) {\n this._stopProcedure();\n this._complete();\n }\n }\n _stop() {\n if (this._processingStatus === ProcessingStatus.Stopped) {\n return this;\n }\n this.mailbox.clear();\n if (this._processingStatus === ProcessingStatus.NotStarted) {\n this._processingStatus = ProcessingStatus.Stopped;\n return this;\n }\n this.mailbox.enqueue({\n type: XSTATE_STOP\n });\n return this;\n }\n\n /** Stops the Actor and unsubscribe all listeners. */\n stop() {\n if (this._parent) {\n throw new Error('A non-root actor cannot be stopped directly.');\n }\n return this._stop();\n }\n _complete() {\n for (const observer of this.observers) {\n try {\n observer.complete?.();\n } catch (err) {\n reportUnhandledError(err);\n }\n }\n this.observers.clear();\n }\n _reportError(err) {\n if (!this.observers.size) {\n if (!this._parent) {\n reportUnhandledError(err);\n }\n return;\n }\n let reportError = false;\n for (const observer of this.observers) {\n const errorListener = observer.error;\n reportError ||= !errorListener;\n try {\n errorListener?.(err);\n } catch (err2) {\n reportUnhandledError(err2);\n }\n }\n this.observers.clear();\n if (reportError) {\n reportUnhandledError(err);\n }\n }\n _error(err) {\n this._stopProcedure();\n this._reportError(err);\n if (this._parent) {\n this.system._relay(this, this._parent, createErrorActorEvent(this.id, err));\n }\n }\n // TODO: atm children don't belong entirely to the actor so\n // in a way - it's not even super aware of them\n // so we can't stop them from here but we really should!\n // right now, they are being stopped within the machine's transition\n // but that could throw and leave us with \"orphaned\" active actors\n _stopProcedure() {\n if (this._processingStatus !== ProcessingStatus.Running) {\n // Actor already stopped; do nothing\n return this;\n }\n\n // Cancel all delayed events\n this.system.scheduler.cancelAll(this);\n\n // TODO: mailbox.reset\n this.mailbox.clear();\n // TODO: after `stop` we must prepare ourselves for receiving events again\n // events sent *after* stop signal must be queued\n // it seems like this should be the common behavior for all of our consumers\n // so perhaps this should be unified somehow for all of them\n this.mailbox = new Mailbox(this._process.bind(this));\n this._processingStatus = ProcessingStatus.Stopped;\n this.system._unregister(this);\n return this;\n }\n\n /** @internal */\n _send(event) {\n if (this._processingStatus === ProcessingStatus.Stopped) {\n return;\n }\n this.mailbox.enqueue(event);\n }\n\n /**\n * Sends an event to the running Actor to trigger a transition.\n *\n * @param event The event to send\n */\n send(event) {\n this.system._relay(undefined, this, event);\n }\n attachDevTools() {\n const {\n devTools\n } = this.options;\n if (devTools) {\n const resolvedDevToolsAdapter = typeof devTools === 'function' ? devTools : devToolsAdapter;\n resolvedDevToolsAdapter(this);\n }\n }\n toJSON() {\n return {\n xstate$$type: $$ACTOR_TYPE,\n id: this.id\n };\n }\n\n /**\n * Obtain the internal state of the actor, which can be persisted.\n *\n * @remarks\n * The internal state can be persisted from any actor, not only machines.\n *\n * Note that the persisted state is not the same as the snapshot from\n * {@link Actor.getSnapshot}. Persisted state represents the internal state of\n * the actor, while snapshots represent the actor's last emitted value.\n *\n * Can be restored with {@link ActorOptions.state}\n * @see https://stately.ai/docs/persistence\n */\n\n getPersistedSnapshot(options) {\n return this.logic.getPersistedSnapshot(this._snapshot, options);\n }\n [symbolObservable]() {\n return this;\n }\n\n /**\n * Read an actor’s snapshot synchronously.\n *\n * @remarks\n * The snapshot represent an actor's last emitted value.\n *\n * When an actor receives an event, its internal state may change. An actor\n * may emit a snapshot when a state transition occurs.\n *\n * Note that some actors, such as callback actors generated with\n * `fromCallback`, will not emit snapshots.\n * @see {@link Actor.subscribe} to subscribe to an actor’s snapshot values.\n * @see {@link Actor.getPersistedSnapshot} to persist the internal state of an actor (which is more than just a snapshot).\n */\n getSnapshot() {\n return this._snapshot;\n }\n}\n/**\n * Creates a new actor instance for the given actor logic with the provided\n * options, if any.\n *\n * @remarks\n * When you create an actor from actor logic via `createActor(logic)`, you\n * implicitly create an actor system where the created actor is the root actor.\n * Any actors spawned from this root actor and its descendants are part of that\n * actor system.\n * @example\n *\n * ```ts\n * import { createActor } from 'xstate';\n * import { someActorLogic } from './someActorLogic.ts';\n *\n * // Creating the actor, which implicitly creates an actor system with itself as the root actor\n * const actor = createActor(someActorLogic);\n *\n * actor.subscribe((snapshot) => {\n * console.log(snapshot);\n * });\n *\n * // Actors must be started by calling `actor.start()`, which will also start the actor system.\n * actor.start();\n *\n * // Actors can receive events\n * actor.send({ type: 'someEvent' });\n *\n * // You can stop root actors by calling `actor.stop()`, which will also stop the actor system and all actors in that system.\n * actor.stop();\n * ```\n *\n * @param logic - The actor logic to create an actor from. For a state machine\n * actor logic creator, see {@link createMachine}. Other actor logic creators\n * include {@link fromCallback}, {@link fromEventObservable},\n * {@link fromObservable}, {@link fromPromise}, and {@link fromTransition}.\n * @param options - Actor options\n */\nfunction createActor(logic, ...[options]) {\n return new Actor(logic, options);\n}\n\n/**\n * Creates a new Interpreter instance for the given machine with the provided\n * options, if any.\n *\n * @deprecated Use `createActor` instead\n * @alias\n */\nconst interpret = createActor;\n\n/**\n * @deprecated Use `Actor` instead.\n * @alias\n */\n\nfunction resolveCancel(_, snapshot, actionArgs, actionParams, {\n sendId\n}) {\n const resolvedSendId = typeof sendId === 'function' ? sendId(actionArgs, actionParams) : sendId;\n return [snapshot, {\n sendId: resolvedSendId\n }, undefined];\n}\nfunction executeCancel(actorScope, params) {\n actorScope.defer(() => {\n actorScope.system.scheduler.cancel(actorScope.self, params.sendId);\n });\n}\n/**\n * Cancels a delayed `sendTo(...)` action that is waiting to be executed. The\n * canceled `sendTo(...)` action will not send its event or execute, unless the\n * `delay` has already elapsed before `cancel(...)` is called.\n *\n * @example\n *\n * ```ts\n * import { createMachine, sendTo, cancel } from 'xstate';\n *\n * const machine = createMachine({\n * // ...\n * on: {\n * sendEvent: {\n * actions: sendTo(\n * 'some-actor',\n * { type: 'someEvent' },\n * {\n * id: 'some-id',\n * delay: 1000\n * }\n * )\n * },\n * cancelEvent: {\n * actions: cancel('some-id')\n * }\n * }\n * });\n * ```\n *\n * @param sendId The `id` of the `sendTo(...)` action to cancel.\n */\nfunction cancel(sendId) {\n function cancel(_args, _params) {\n }\n cancel.type = 'xstate.cancel';\n cancel.sendId = sendId;\n cancel.resolve = resolveCancel;\n cancel.execute = executeCancel;\n return cancel;\n}\n\nfunction resolveSpawn(actorScope, snapshot, actionArgs, _actionParams, {\n id,\n systemId,\n src,\n input,\n syncSnapshot\n}) {\n const logic = typeof src === 'string' ? resolveReferencedActor(snapshot.machine, src) : src;\n const resolvedId = typeof id === 'function' ? id(actionArgs) : id;\n let actorRef;\n let resolvedInput = undefined;\n if (logic) {\n resolvedInput = typeof input === 'function' ? input({\n context: snapshot.context,\n event: actionArgs.event,\n self: actorScope.self\n }) : input;\n actorRef = createActor(logic, {\n id: resolvedId,\n src,\n parent: actorScope.self,\n syncSnapshot,\n systemId,\n input: resolvedInput\n });\n }\n return [cloneMachineSnapshot(snapshot, {\n children: {\n ...snapshot.children,\n [resolvedId]: actorRef\n }\n }), {\n id,\n systemId,\n actorRef,\n src,\n input: resolvedInput\n }, undefined];\n}\nfunction executeSpawn(actorScope, {\n actorRef\n}) {\n if (!actorRef) {\n return;\n }\n actorScope.defer(() => {\n if (actorRef._processingStatus === ProcessingStatus.Stopped) {\n return;\n }\n actorRef.start();\n });\n}\nfunction spawnChild(...[src, {\n id,\n systemId,\n input,\n syncSnapshot = false\n} = {}]) {\n function spawnChild(_args, _params) {\n }\n spawnChild.type = 'xstate.spawnChild';\n spawnChild.id = id;\n spawnChild.systemId = systemId;\n spawnChild.src = src;\n spawnChild.input = input;\n spawnChild.syncSnapshot = syncSnapshot;\n spawnChild.resolve = resolveSpawn;\n spawnChild.execute = executeSpawn;\n return spawnChild;\n}\n\nfunction resolveStop(_, snapshot, args, actionParams, {\n actorRef\n}) {\n const actorRefOrString = typeof actorRef === 'function' ? actorRef(args, actionParams) : actorRef;\n const resolvedActorRef = typeof actorRefOrString === 'string' ? snapshot.children[actorRefOrString] : actorRefOrString;\n let children = snapshot.children;\n if (resolvedActorRef) {\n children = {\n ...children\n };\n delete children[resolvedActorRef.id];\n }\n return [cloneMachineSnapshot(snapshot, {\n children\n }), resolvedActorRef, undefined];\n}\nfunction executeStop(actorScope, actorRef) {\n if (!actorRef) {\n return;\n }\n\n // we need to eagerly unregister it here so a new actor with the same systemId can be registered immediately\n // since we defer actual stopping of the actor but we don't defer actor creations (and we can't do that)\n // this could throw on `systemId` collision, for example, when dealing with reentering transitions\n actorScope.system._unregister(actorRef);\n\n // this allows us to prevent an actor from being started if it gets stopped within the same macrostep\n // this can happen, for example, when the invoking state is being exited immediately by an always transition\n if (actorRef._processingStatus !== ProcessingStatus.Running) {\n actorScope.stopChild(actorRef);\n return;\n }\n // stopping a child enqueues a stop event in the child actor's mailbox\n // we need for all of the already enqueued events to be processed before we stop the child\n // the parent itself might want to send some events to a child (for example from exit actions on the invoking state)\n // and we don't want to ignore those events\n actorScope.defer(() => {\n actorScope.stopChild(actorRef);\n });\n}\n/**\n * Stops a child actor.\n *\n * @param actorRef The actor to stop.\n */\nfunction stopChild(actorRef) {\n function stop(_args, _params) {\n }\n stop.type = 'xstate.stopChild';\n stop.actorRef = actorRef;\n stop.resolve = resolveStop;\n stop.execute = executeStop;\n return stop;\n}\n\n/**\n * Stops a child actor.\n *\n * @deprecated Use `stopChild(...)` instead\n * @alias\n */\nconst stop = stopChild;\n\nfunction checkStateIn(snapshot, _, {\n stateValue\n}) {\n if (typeof stateValue === 'string' && isStateId(stateValue)) {\n const target = snapshot.machine.getStateNodeById(stateValue);\n return snapshot._nodes.some(sn => sn === target);\n }\n return snapshot.matches(stateValue);\n}\nfunction stateIn(stateValue) {\n function stateIn() {\n return false;\n }\n stateIn.check = checkStateIn;\n stateIn.stateValue = stateValue;\n return stateIn;\n}\nfunction checkNot(snapshot, {\n context,\n event\n}, {\n guards\n}) {\n return !evaluateGuard(guards[0], context, event, snapshot);\n}\n\n/**\n * Higher-order guard that evaluates to `true` if the `guard` passed to it\n * evaluates to `false`.\n *\n * @category Guards\n * @example\n *\n * ```ts\n * import { setup, not } from 'xstate';\n *\n * const machine = setup({\n * guards: {\n * someNamedGuard: () => false\n * }\n * }).createMachine({\n * on: {\n * someEvent: {\n * guard: not('someNamedGuard'),\n * actions: () => {\n * // will be executed if guard in `not(...)`\n * // evaluates to `false`\n * }\n * }\n * }\n * });\n * ```\n *\n * @returns A guard\n */\nfunction not(guard) {\n function not(_args, _params) {\n return false;\n }\n not.check = checkNot;\n not.guards = [guard];\n return not;\n}\nfunction checkAnd(snapshot, {\n context,\n event\n}, {\n guards\n}) {\n return guards.every(guard => evaluateGuard(guard, context, event, snapshot));\n}\n\n/**\n * Higher-order guard that evaluates to `true` if all `guards` passed to it\n * evaluate to `true`.\n *\n * @category Guards\n * @example\n *\n * ```ts\n * import { setup, and } from 'xstate';\n *\n * const machine = setup({\n * guards: {\n * someNamedGuard: () => true\n * }\n * }).createMachine({\n * on: {\n * someEvent: {\n * guard: and([({ context }) => context.value > 0, 'someNamedGuard']),\n * actions: () => {\n * // will be executed if all guards in `and(...)`\n * // evaluate to true\n * }\n * }\n * }\n * });\n * ```\n *\n * @returns A guard action object\n */\nfunction and(guards) {\n function and(_args, _params) {\n return false;\n }\n and.check = checkAnd;\n and.guards = guards;\n return and;\n}\nfunction checkOr(snapshot, {\n context,\n event\n}, {\n guards\n}) {\n return guards.some(guard => evaluateGuard(guard, context, event, snapshot));\n}\n\n/**\n * Higher-order guard that evaluates to `true` if any of the `guards` passed to\n * it evaluate to `true`.\n *\n * @category Guards\n * @example\n *\n * ```ts\n * import { setup, or } from 'xstate';\n *\n * const machine = setup({\n * guards: {\n * someNamedGuard: () => true\n * }\n * }).createMachine({\n * on: {\n * someEvent: {\n * guard: or([({ context }) => context.value > 0, 'someNamedGuard']),\n * actions: () => {\n * // will be executed if any of the guards in `or(...)`\n * // evaluate to true\n * }\n * }\n * }\n * });\n * ```\n *\n * @returns A guard action object\n */\nfunction or(guards) {\n function or(_args, _params) {\n return false;\n }\n or.check = checkOr;\n or.guards = guards;\n return or;\n}\n\n// TODO: throw on cycles (depth check should be enough)\nfunction evaluateGuard(guard, context, event, snapshot) {\n const {\n machine\n } = snapshot;\n const isInline = typeof guard === 'function';\n const resolved = isInline ? guard : machine.implementations.guards[typeof guard === 'string' ? guard : guard.type];\n if (!isInline && !resolved) {\n throw new Error(`Guard '${typeof guard === 'string' ? guard : guard.type}' is not implemented.'.`);\n }\n if (typeof resolved !== 'function') {\n return evaluateGuard(resolved, context, event, snapshot);\n }\n const guardArgs = {\n context,\n event\n };\n const guardParams = isInline || typeof guard === 'string' ? undefined : 'params' in guard ? typeof guard.params === 'function' ? guard.params({\n context,\n event\n }) : guard.params : undefined;\n if (!('check' in resolved)) {\n // the existing type of `.guards` assumes non-nullable `TExpressionGuard`\n // inline guards expect `TExpressionGuard` to be set to `undefined`\n // it's fine to cast this here, our logic makes sure that we call those 2 \"variants\" correctly\n return resolved(guardArgs, guardParams);\n }\n const builtinGuard = resolved;\n return builtinGuard.check(snapshot, guardArgs, resolved // this holds all params\n );\n}\n\nconst isAtomicStateNode = stateNode => stateNode.type === 'atomic' || stateNode.type === 'final';\nfunction getChildren(stateNode) {\n return Object.values(stateNode.states).filter(sn => sn.type !== 'history');\n}\nfunction getProperAncestors(stateNode, toStateNode) {\n const ancestors = [];\n if (toStateNode === stateNode) {\n return ancestors;\n }\n\n // add all ancestors\n let m = stateNode.parent;\n while (m && m !== toStateNode) {\n ancestors.push(m);\n m = m.parent;\n }\n return ancestors;\n}\nfunction getAllStateNodes(stateNodes) {\n const nodeSet = new Set(stateNodes);\n const adjList = getAdjList(nodeSet);\n\n // add descendants\n for (const s of nodeSet) {\n // if previously active, add existing child nodes\n if (s.type === 'compound' && (!adjList.get(s) || !adjList.get(s).length)) {\n getInitialStateNodesWithTheirAncestors(s).forEach(sn => nodeSet.add(sn));\n } else {\n if (s.type === 'parallel') {\n for (const child of getChildren(s)) {\n if (child.type === 'history') {\n continue;\n }\n if (!nodeSet.has(child)) {\n const initialStates = getInitialStateNodesWithTheirAncestors(child);\n for (const initialStateNode of initialStates) {\n nodeSet.add(initialStateNode);\n }\n }\n }\n }\n }\n }\n\n // add all ancestors\n for (const s of nodeSet) {\n let m = s.parent;\n while (m) {\n nodeSet.add(m);\n m = m.parent;\n }\n }\n return nodeSet;\n}\nfunction getValueFromAdj(baseNode, adjList) {\n const childStateNodes = adjList.get(baseNode);\n if (!childStateNodes) {\n return {}; // todo: fix?\n }\n if (baseNode.type === 'compound') {\n const childStateNode = childStateNodes[0];\n if (childStateNode) {\n if (isAtomicStateNode(childStateNode)) {\n return childStateNode.key;\n }\n } else {\n return {};\n }\n }\n const stateValue = {};\n for (const childStateNode of childStateNodes) {\n stateValue[childStateNode.key] = getValueFromAdj(childStateNode, adjList);\n }\n return stateValue;\n}\nfunction getAdjList(stateNodes) {\n const adjList = new Map();\n for (const s of stateNodes) {\n if (!adjList.has(s)) {\n adjList.set(s, []);\n }\n if (s.parent) {\n if (!adjList.has(s.parent)) {\n adjList.set(s.parent, []);\n }\n adjList.get(s.parent).push(s);\n }\n }\n return adjList;\n}\nfunction getStateValue(rootNode, stateNodes) {\n const config = getAllStateNodes(stateNodes);\n return getValueFromAdj(rootNode, getAdjList(config));\n}\nfunction isInFinalState(stateNodeSet, stateNode) {\n if (stateNode.type === 'compound') {\n return getChildren(stateNode).some(s => s.type === 'final' && stateNodeSet.has(s));\n }\n if (stateNode.type === 'parallel') {\n return getChildren(stateNode).every(sn => isInFinalState(stateNodeSet, sn));\n }\n return stateNode.type === 'final';\n}\nconst isStateId = str => str[0] === STATE_IDENTIFIER;\nfunction getCandidates(stateNode, receivedEventType) {\n const candidates = stateNode.transitions.get(receivedEventType) || [...stateNode.transitions.keys()].filter(eventDescriptor => {\n // check if transition is a wildcard transition,\n // which matches any non-transient events\n if (eventDescriptor === WILDCARD) {\n return true;\n }\n if (!eventDescriptor.endsWith('.*')) {\n return false;\n }\n const partialEventTokens = eventDescriptor.split('.');\n const eventTokens = receivedEventType.split('.');\n for (let tokenIndex = 0; tokenIndex < partialEventTokens.length; tokenIndex++) {\n const partialEventToken = partialEventTokens[tokenIndex];\n const eventToken = eventTokens[tokenIndex];\n if (partialEventToken === '*') {\n const isLastToken = tokenIndex === partialEventTokens.length - 1;\n return isLastToken;\n }\n if (partialEventToken !== eventToken) {\n return false;\n }\n }\n return true;\n }).sort((a, b) => b.length - a.length).flatMap(key => stateNode.transitions.get(key));\n return candidates;\n}\n\n/** All delayed transitions from the config. */\nfunction getDelayedTransitions(stateNode) {\n const afterConfig = stateNode.config.after;\n if (!afterConfig) {\n return [];\n }\n const mutateEntryExit = delay => {\n const afterEvent = createAfterEvent(delay, stateNode.id);\n const eventType = afterEvent.type;\n stateNode.entry.push(raise(afterEvent, {\n id: eventType,\n delay\n }));\n stateNode.exit.push(cancel(eventType));\n return eventType;\n };\n const delayedTransitions = Object.keys(afterConfig).flatMap(delay => {\n const configTransition = afterConfig[delay];\n const resolvedTransition = typeof configTransition === 'string' ? {\n target: configTransition\n } : configTransition;\n const resolvedDelay = Number.isNaN(+delay) ? delay : +delay;\n const eventType = mutateEntryExit(resolvedDelay);\n return toArray(resolvedTransition).map(transition => ({\n ...transition,\n event: eventType,\n delay: resolvedDelay\n }));\n });\n return delayedTransitions.map(delayedTransition => {\n const {\n delay\n } = delayedTransition;\n return {\n ...formatTransition(stateNode, delayedTransition.event, delayedTransition),\n delay\n };\n });\n}\nfunction formatTransition(stateNode, descriptor, transitionConfig) {\n const normalizedTarget = normalizeTarget(transitionConfig.target);\n const reenter = transitionConfig.reenter ?? false;\n const target = resolveTarget(stateNode, normalizedTarget);\n const transition = {\n ...transitionConfig,\n actions: toArray(transitionConfig.actions),\n guard: transitionConfig.guard,\n target,\n source: stateNode,\n reenter,\n eventType: descriptor,\n toJSON: () => ({\n ...transition,\n source: `#${stateNode.id}`,\n target: target ? target.map(t => `#${t.id}`) : undefined\n })\n };\n return transition;\n}\nfunction formatTransitions(stateNode) {\n const transitions = new Map();\n if (stateNode.config.on) {\n for (const descriptor of Object.keys(stateNode.config.on)) {\n if (descriptor === NULL_EVENT) {\n throw new Error('Null events (\"\") cannot be specified as a transition key. Use `always: { ... }` instead.');\n }\n const transitionsConfig = stateNode.config.on[descriptor];\n transitions.set(descriptor, toTransitionConfigArray(transitionsConfig).map(t => formatTransition(stateNode, descriptor, t)));\n }\n }\n if (stateNode.config.onDone) {\n const descriptor = `xstate.done.state.${stateNode.id}`;\n transitions.set(descriptor, toTransitionConfigArray(stateNode.config.onDone).map(t => formatTransition(stateNode, descriptor, t)));\n }\n for (const invokeDef of stateNode.invoke) {\n if (invokeDef.onDone) {\n const descriptor = `xstate.done.actor.${invokeDef.id}`;\n transitions.set(descriptor, toTransitionConfigArray(invokeDef.onDone).map(t => formatTransition(stateNode, descriptor, t)));\n }\n if (invokeDef.onError) {\n const descriptor = `xstate.error.actor.${invokeDef.id}`;\n transitions.set(descriptor, toTransitionConfigArray(invokeDef.onError).map(t => formatTransition(stateNode, descriptor, t)));\n }\n if (invokeDef.onSnapshot) {\n const descriptor = `xstate.snapshot.${invokeDef.id}`;\n transitions.set(descriptor, toTransitionConfigArray(invokeDef.onSnapshot).map(t => formatTransition(stateNode, descriptor, t)));\n }\n }\n for (const delayedTransition of stateNode.after) {\n let existing = transitions.get(delayedTransition.eventType);\n if (!existing) {\n existing = [];\n transitions.set(delayedTransition.eventType, existing);\n }\n existing.push(delayedTransition);\n }\n return transitions;\n}\nfunction formatInitialTransition(stateNode, _target) {\n const resolvedTarget = typeof _target === 'string' ? stateNode.states[_target] : _target ? stateNode.states[_target.target] : undefined;\n if (!resolvedTarget && _target) {\n throw new Error(\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions, @typescript-eslint/no-base-to-string\n `Initial state node \"${_target}\" not found on parent state node #${stateNode.id}`);\n }\n const transition = {\n source: stateNode,\n actions: !_target || typeof _target === 'string' ? [] : toArray(_target.actions),\n eventType: null,\n reenter: false,\n target: resolvedTarget ? [resolvedTarget] : [],\n toJSON: () => ({\n ...transition,\n source: `#${stateNode.id}`,\n target: resolvedTarget ? [`#${resolvedTarget.id}`] : []\n })\n };\n return transition;\n}\nfunction resolveTarget(stateNode, targets) {\n if (targets === undefined) {\n // an undefined target signals that the state node should not transition from that state when receiving that event\n return undefined;\n }\n return targets.map(target => {\n if (typeof target !== 'string') {\n return target;\n }\n if (isStateId(target)) {\n return stateNode.machine.getStateNodeById(target);\n }\n const isInternalTarget = target[0] === STATE_DELIMITER;\n // If internal target is defined on machine,\n // do not include machine key on target\n if (isInternalTarget && !stateNode.parent) {\n return getStateNodeByPath(stateNode, target.slice(1));\n }\n const resolvedTarget = isInternalTarget ? stateNode.key + target : target;\n if (stateNode.parent) {\n try {\n const targetStateNode = getStateNodeByPath(stateNode.parent, resolvedTarget);\n return targetStateNode;\n } catch (err) {\n throw new Error(`Invalid transition definition for state node '${stateNode.id}':\\n${err.message}`);\n }\n } else {\n throw new Error(`Invalid target: \"${target}\" is not a valid target from the root node. Did you mean \".${target}\"?`);\n }\n });\n}\nfunction resolveHistoryDefaultTransition(stateNode) {\n const normalizedTarget = normalizeTarget(stateNode.config.target);\n if (!normalizedTarget) {\n return stateNode.parent.initial;\n }\n return {\n target: normalizedTarget.map(t => typeof t === 'string' ? getStateNodeByPath(stateNode.parent, t) : t)\n };\n}\nfunction isHistoryNode(stateNode) {\n return stateNode.type === 'history';\n}\nfunction getInitialStateNodesWithTheirAncestors(stateNode) {\n const states = getInitialStateNodes(stateNode);\n for (const initialState of states) {\n for (const ancestor of getProperAncestors(initialState, stateNode)) {\n states.add(ancestor);\n }\n }\n return states;\n}\nfunction getInitialStateNodes(stateNode) {\n const set = new Set();\n function iter(descStateNode) {\n if (set.has(descStateNode)) {\n return;\n }\n set.add(descStateNode);\n if (descStateNode.type === 'compound') {\n iter(descStateNode.initial.target[0]);\n } else if (descStateNode.type === 'parallel') {\n for (const child of getChildren(descStateNode)) {\n iter(child);\n }\n }\n }\n iter(stateNode);\n return set;\n}\n/** Returns the child state node from its relative `stateKey`, or throws. */\nfunction getStateNode(stateNode, stateKey) {\n if (isStateId(stateKey)) {\n return stateNode.machine.getStateNodeById(stateKey);\n }\n if (!stateNode.states) {\n throw new Error(`Unable to retrieve child state '${stateKey}' from '${stateNode.id}'; no child states exist.`);\n }\n const result = stateNode.states[stateKey];\n if (!result) {\n throw new Error(`Child state '${stateKey}' does not exist on '${stateNode.id}'`);\n }\n return result;\n}\n\n/**\n * Returns the relative state node from the given `statePath`, or throws.\n *\n * @param statePath The string or string array relative path to the state node.\n */\nfunction getStateNodeByPath(stateNode, statePath) {\n if (typeof statePath === 'string' && isStateId(statePath)) {\n try {\n return stateNode.machine.getStateNodeById(statePath);\n } catch {\n // try individual paths\n // throw e;\n }\n }\n const arrayStatePath = toStatePath(statePath).slice();\n let currentStateNode = stateNode;\n while (arrayStatePath.length) {\n const key = arrayStatePath.shift();\n if (!key.length) {\n break;\n }\n currentStateNode = getStateNode(currentStateNode, key);\n }\n return currentStateNode;\n}\n\n/**\n * Returns the state nodes represented by the current state value.\n *\n * @param stateValue The state value or State instance\n */\nfunction getStateNodes(stateNode, stateValue) {\n if (typeof stateValue === 'string') {\n const childStateNode = stateNode.states[stateValue];\n if (!childStateNode) {\n throw new Error(`State '${stateValue}' does not exist on '${stateNode.id}'`);\n }\n return [stateNode, childStateNode];\n }\n const childStateKeys = Object.keys(stateValue);\n const childStateNodes = childStateKeys.map(subStateKey => getStateNode(stateNode, subStateKey)).filter(Boolean);\n return [stateNode.machine.root, stateNode].concat(childStateNodes, childStateKeys.reduce((allSubStateNodes, subStateKey) => {\n const subStateNode = getStateNode(stateNode, subStateKey);\n if (!subStateNode) {\n return allSubStateNodes;\n }\n const subStateNodes = getStateNodes(subStateNode, stateValue[subStateKey]);\n return allSubStateNodes.concat(subStateNodes);\n }, []));\n}\nfunction transitionAtomicNode(stateNode, stateValue, snapshot, event) {\n const childStateNode = getStateNode(stateNode, stateValue);\n const next = childStateNode.next(snapshot, event);\n if (!next || !next.length) {\n return stateNode.next(snapshot, event);\n }\n return next;\n}\nfunction transitionCompoundNode(stateNode, stateValue, snapshot, event) {\n const subStateKeys = Object.keys(stateValue);\n const childStateNode = getStateNode(stateNode, subStateKeys[0]);\n const next = transitionNode(childStateNode, stateValue[subStateKeys[0]], snapshot, event);\n if (!next || !next.length) {\n return stateNode.next(snapshot, event);\n }\n return next;\n}\nfunction transitionParallelNode(stateNode, stateValue, snapshot, event) {\n const allInnerTransitions = [];\n for (const subStateKey of Object.keys(stateValue)) {\n const subStateValue = stateValue[subStateKey];\n if (!subStateValue) {\n continue;\n }\n const subStateNode = getStateNode(stateNode, subStateKey);\n const innerTransitions = transitionNode(subStateNode, subStateValue, snapshot, event);\n if (innerTransitions) {\n allInnerTransitions.push(...innerTransitions);\n }\n }\n if (!allInnerTransitions.length) {\n return stateNode.next(snapshot, event);\n }\n return allInnerTransitions;\n}\nfunction transitionNode(stateNode, stateValue, snapshot, event) {\n // leaf node\n if (typeof stateValue === 'string') {\n return transitionAtomicNode(stateNode, stateValue, snapshot, event);\n }\n\n // compound node\n if (Object.keys(stateValue).length === 1) {\n return transitionCompoundNode(stateNode, stateValue, snapshot, event);\n }\n\n // parallel node\n return transitionParallelNode(stateNode, stateValue, snapshot, event);\n}\nfunction getHistoryNodes(stateNode) {\n return Object.keys(stateNode.states).map(key => stateNode.states[key]).filter(sn => sn.type === 'history');\n}\nfunction isDescendant(childStateNode, parentStateNode) {\n let marker = childStateNode;\n while (marker.parent && marker.parent !== parentStateNode) {\n marker = marker.parent;\n }\n return marker.parent === parentStateNode;\n}\nfunction hasIntersection(s1, s2) {\n const set1 = new Set(s1);\n const set2 = new Set(s2);\n for (const item of set1) {\n if (set2.has(item)) {\n return true;\n }\n }\n for (const item of set2) {\n if (set1.has(item)) {\n return true;\n }\n }\n return false;\n}\nfunction removeConflictingTransitions(enabledTransitions, stateNodeSet, historyValue) {\n const filteredTransitions = new Set();\n for (const t1 of enabledTransitions) {\n let t1Preempted = false;\n const transitionsToRemove = new Set();\n for (const t2 of filteredTransitions) {\n if (hasIntersection(computeExitSet([t1], stateNodeSet, historyValue), computeExitSet([t2], stateNodeSet, historyValue))) {\n if (isDescendant(t1.source, t2.source)) {\n transitionsToRemove.add(t2);\n } else {\n t1Preempted = true;\n break;\n }\n }\n }\n if (!t1Preempted) {\n for (const t3 of transitionsToRemove) {\n filteredTransitions.delete(t3);\n }\n filteredTransitions.add(t1);\n }\n }\n return Array.from(filteredTransitions);\n}\nfunction findLeastCommonAncestor(stateNodes) {\n const [head, ...tail] = stateNodes;\n for (const ancestor of getProperAncestors(head, undefined)) {\n if (tail.every(sn => isDescendant(sn, ancestor))) {\n return ancestor;\n }\n }\n}\nfunction getEffectiveTargetStates(transition, historyValue) {\n if (!transition.target) {\n return [];\n }\n const targets = new Set();\n for (const targetNode of transition.target) {\n if (isHistoryNode(targetNode)) {\n if (historyValue[targetNode.id]) {\n for (const node of historyValue[targetNode.id]) {\n targets.add(node);\n }\n } else {\n for (const node of getEffectiveTargetStates(resolveHistoryDefaultTransition(targetNode), historyValue)) {\n targets.add(node);\n }\n }\n } else {\n targets.add(targetNode);\n }\n }\n return [...targets];\n}\nfunction getTransitionDomain(transition, historyValue) {\n const targetStates = getEffectiveTargetStates(transition, historyValue);\n if (!targetStates) {\n return;\n }\n if (!transition.reenter && targetStates.every(target => target === transition.source || isDescendant(target, transition.source))) {\n return transition.source;\n }\n const lca = findLeastCommonAncestor(targetStates.concat(transition.source));\n if (lca) {\n return lca;\n }\n\n // at this point we know that it's a root transition since LCA couldn't be found\n if (transition.reenter) {\n return;\n }\n return transition.source.machine.root;\n}\nfunction computeExitSet(transitions, stateNodeSet, historyValue) {\n const statesToExit = new Set();\n for (const t of transitions) {\n if (t.target?.length) {\n const domain = getTransitionDomain(t, historyValue);\n if (t.reenter && t.source === domain) {\n statesToExit.add(domain);\n }\n for (const stateNode of stateNodeSet) {\n if (isDescendant(stateNode, domain)) {\n statesToExit.add(stateNode);\n }\n }\n }\n }\n return [...statesToExit];\n}\nfunction areStateNodeCollectionsEqual(prevStateNodes, nextStateNodeSet) {\n if (prevStateNodes.length !== nextStateNodeSet.size) {\n return false;\n }\n for (const node of prevStateNodes) {\n if (!nextStateNodeSet.has(node)) {\n return false;\n }\n }\n return true;\n}\n\n/** https://www.w3.org/TR/scxml/#microstepProcedure */\nfunction microstep(transitions, currentSnapshot, actorScope, event, isInitial, internalQueue) {\n if (!transitions.length) {\n return currentSnapshot;\n }\n const mutStateNodeSet = new Set(currentSnapshot._nodes);\n let historyValue = currentSnapshot.historyValue;\n const filteredTransitions = removeConflictingTransitions(transitions, mutStateNodeSet, historyValue);\n let nextState = currentSnapshot;\n\n // Exit states\n if (!isInitial) {\n [nextState, historyValue] = exitStates(nextState, event, actorScope, filteredTransitions, mutStateNodeSet, historyValue, internalQueue, actorScope.actionExecutor);\n }\n\n // Execute transition content\n nextState = resolveActionsAndContext(nextState, event, actorScope, filteredTransitions.flatMap(t => t.actions), internalQueue, undefined);\n\n // Enter states\n nextState = enterStates(nextState, event, actorScope, filteredTransitions, mutStateNodeSet, internalQueue, historyValue, isInitial);\n const nextStateNodes = [...mutStateNodeSet];\n if (nextState.status === 'done') {\n nextState = resolveActionsAndContext(nextState, event, actorScope, nextStateNodes.sort((a, b) => b.order - a.order).flatMap(state => state.exit), internalQueue, undefined);\n }\n\n // eslint-disable-next-line no-useless-catch\n try {\n if (historyValue === currentSnapshot.historyValue && areStateNodeCollectionsEqual(currentSnapshot._nodes, mutStateNodeSet)) {\n return nextState;\n }\n return cloneMachineSnapshot(nextState, {\n _nodes: nextStateNodes,\n historyValue\n });\n } catch (e) {\n // TODO: Refactor this once proper error handling is implemented.\n // See https://github.com/statelyai/rfcs/pull/4\n throw e;\n }\n}\nfunction getMachineOutput(snapshot, event, actorScope, rootNode, rootCompletionNode) {\n if (rootNode.output === undefined) {\n return;\n }\n const doneStateEvent = createDoneStateEvent(rootCompletionNode.id, rootCompletionNode.output !== undefined && rootCompletionNode.parent ? resolveOutput(rootCompletionNode.output, snapshot.context, event, actorScope.self) : undefined);\n return resolveOutput(rootNode.output, snapshot.context, doneStateEvent, actorScope.self);\n}\nfunction enterStates(currentSnapshot, event, actorScope, filteredTransitions, mutStateNodeSet, internalQueue, historyValue, isInitial) {\n let nextSnapshot = currentSnapshot;\n const statesToEnter = new Set();\n // those are states that were directly targeted or indirectly targeted by the explicit target\n // in other words, those are states for which initial actions should be executed\n // when we target `#deep_child` initial actions of its ancestors shouldn't be executed\n const statesForDefaultEntry = new Set();\n computeEntrySet(filteredTransitions, historyValue, statesForDefaultEntry, statesToEnter);\n\n // In the initial state, the root state node is \"entered\".\n if (isInitial) {\n statesForDefaultEntry.add(currentSnapshot.machine.root);\n }\n const completedNodes = new Set();\n for (const stateNodeToEnter of [...statesToEnter].sort((a, b) => a.order - b.order)) {\n mutStateNodeSet.add(stateNodeToEnter);\n const actions = [];\n\n // Add entry actions\n actions.push(...stateNodeToEnter.entry);\n for (const invokeDef of stateNodeToEnter.invoke) {\n actions.push(spawnChild(invokeDef.src, {\n ...invokeDef,\n syncSnapshot: !!invokeDef.onSnapshot\n }));\n }\n if (statesForDefaultEntry.has(stateNodeToEnter)) {\n const initialActions = stateNodeToEnter.initial.actions;\n actions.push(...initialActions);\n }\n nextSnapshot = resolveActionsAndContext(nextSnapshot, event, actorScope, actions, internalQueue, stateNodeToEnter.invoke.map(invokeDef => invokeDef.id));\n if (stateNodeToEnter.type === 'final') {\n const parent = stateNodeToEnter.parent;\n let ancestorMarker = parent?.type === 'parallel' ? parent : parent?.parent;\n let rootCompletionNode = ancestorMarker || stateNodeToEnter;\n if (parent?.type === 'compound') {\n internalQueue.push(createDoneStateEvent(parent.id, stateNodeToEnter.output !== undefined ? resolveOutput(stateNodeToEnter.output, nextSnapshot.context, event, actorScope.self) : undefined));\n }\n while (ancestorMarker?.type === 'parallel' && !completedNodes.has(ancestorMarker) && isInFinalState(mutStateNodeSet, ancestorMarker)) {\n completedNodes.add(ancestorMarker);\n internalQueue.push(createDoneStateEvent(ancestorMarker.id));\n rootCompletionNode = ancestorMarker;\n ancestorMarker = ancestorMarker.parent;\n }\n if (ancestorMarker) {\n continue;\n }\n nextSnapshot = cloneMachineSnapshot(nextSnapshot, {\n status: 'done',\n output: getMachineOutput(nextSnapshot, event, actorScope, nextSnapshot.machine.root, rootCompletionNode)\n });\n }\n }\n return nextSnapshot;\n}\nfunction computeEntrySet(transitions, historyValue, statesForDefaultEntry, statesToEnter) {\n for (const t of transitions) {\n const domain = getTransitionDomain(t, historyValue);\n for (const s of t.target || []) {\n if (!isHistoryNode(s) && (\n // if the target is different than the source then it will *definitely* be entered\n t.source !== s ||\n // we know that the domain can't lie within the source\n // if it's different than the source then it's outside of it and it means that the target has to be entered as well\n t.source !== domain ||\n // reentering transitions always enter the target, even if it's the source itself\n t.reenter)) {\n statesToEnter.add(s);\n statesForDefaultEntry.add(s);\n }\n addDescendantStatesToEnter(s, historyValue, statesForDefaultEntry, statesToEnter);\n }\n const targetStates = getEffectiveTargetStates(t, historyValue);\n for (const s of targetStates) {\n const ancestors = getProperAncestors(s, domain);\n if (domain?.type === 'parallel') {\n ancestors.push(domain);\n }\n addAncestorStatesToEnter(statesToEnter, historyValue, statesForDefaultEntry, ancestors, !t.source.parent && t.reenter ? undefined : domain);\n }\n }\n}\nfunction addDescendantStatesToEnter(stateNode, historyValue, statesForDefaultEntry, statesToEnter) {\n if (isHistoryNode(stateNode)) {\n if (historyValue[stateNode.id]) {\n const historyStateNodes = historyValue[stateNode.id];\n for (const s of historyStateNodes) {\n statesToEnter.add(s);\n addDescendantStatesToEnter(s, historyValue, statesForDefaultEntry, statesToEnter);\n }\n for (const s of historyStateNodes) {\n addProperAncestorStatesToEnter(s, stateNode.parent, statesToEnter, historyValue, statesForDefaultEntry);\n }\n } else {\n const historyDefaultTransition = resolveHistoryDefaultTransition(stateNode);\n for (const s of historyDefaultTransition.target) {\n statesToEnter.add(s);\n if (historyDefaultTransition === stateNode.parent?.initial) {\n statesForDefaultEntry.add(stateNode.parent);\n }\n addDescendantStatesToEnter(s, historyValue, statesForDefaultEntry, statesToEnter);\n }\n for (const s of historyDefaultTransition.target) {\n addProperAncestorStatesToEnter(s, stateNode.parent, statesToEnter, historyValue, statesForDefaultEntry);\n }\n }\n } else {\n if (stateNode.type === 'compound') {\n const [initialState] = stateNode.initial.target;\n if (!isHistoryNode(initialState)) {\n statesToEnter.add(initialState);\n statesForDefaultEntry.add(initialState);\n }\n addDescendantStatesToEnter(initialState, historyValue, statesForDefaultEntry, statesToEnter);\n addProperAncestorStatesToEnter(initialState, stateNode, statesToEnter, historyValue, statesForDefaultEntry);\n } else {\n if (stateNode.type === 'parallel') {\n for (const child of getChildren(stateNode).filter(sn => !isHistoryNode(sn))) {\n if (![...statesToEnter].some(s => isDescendant(s, child))) {\n if (!isHistoryNode(child)) {\n statesToEnter.add(child);\n statesForDefaultEntry.add(child);\n }\n addDescendantStatesToEnter(child, historyValue, statesForDefaultEntry, statesToEnter);\n }\n }\n }\n }\n }\n}\nfunction addAncestorStatesToEnter(statesToEnter, historyValue, statesForDefaultEntry, ancestors, reentrancyDomain) {\n for (const anc of ancestors) {\n if (!reentrancyDomain || isDescendant(anc, reentrancyDomain)) {\n statesToEnter.add(anc);\n }\n if (anc.type === 'parallel') {\n for (const child of getChildren(anc).filter(sn => !isHistoryNode(sn))) {\n if (![...statesToEnter].some(s => isDescendant(s, child))) {\n statesToEnter.add(child);\n addDescendantStatesToEnter(child, historyValue, statesForDefaultEntry, statesToEnter);\n }\n }\n }\n }\n}\nfunction addProperAncestorStatesToEnter(stateNode, toStateNode, statesToEnter, historyValue, statesForDefaultEntry) {\n addAncestorStatesToEnter(statesToEnter, historyValue, statesForDefaultEntry, getProperAncestors(stateNode, toStateNode));\n}\nfunction exitStates(currentSnapshot, event, actorScope, transitions, mutStateNodeSet, historyValue, internalQueue, _actionExecutor) {\n let nextSnapshot = currentSnapshot;\n const statesToExit = computeExitSet(transitions, mutStateNodeSet, historyValue);\n statesToExit.sort((a, b) => b.order - a.order);\n let changedHistory;\n\n // From SCXML algorithm: https://www.w3.org/TR/scxml/#exitStates\n for (const exitStateNode of statesToExit) {\n for (const historyNode of getHistoryNodes(exitStateNode)) {\n let predicate;\n if (historyNode.history === 'deep') {\n predicate = sn => isAtomicStateNode(sn) && isDescendant(sn, exitStateNode);\n } else {\n predicate = sn => {\n return sn.parent === exitStateNode;\n };\n }\n changedHistory ??= {\n ...historyValue\n };\n changedHistory[historyNode.id] = Array.from(mutStateNodeSet).filter(predicate);\n }\n }\n for (const s of statesToExit) {\n nextSnapshot = resolveActionsAndContext(nextSnapshot, event, actorScope, [...s.exit, ...s.invoke.map(def => stopChild(def.id))], internalQueue, undefined);\n mutStateNodeSet.delete(s);\n }\n return [nextSnapshot, changedHistory || historyValue];\n}\nfunction getAction(machine, actionType) {\n return machine.implementations.actions[actionType];\n}\nfunction resolveAndExecuteActionsWithContext(currentSnapshot, event, actorScope, actions, extra, retries) {\n const {\n machine\n } = currentSnapshot;\n let intermediateSnapshot = currentSnapshot;\n for (const action of actions) {\n const isInline = typeof action === 'function';\n const resolvedAction = isInline ? action :\n // the existing type of `.actions` assumes non-nullable `TExpressionAction`\n // it's fine to cast this here to get a common type and lack of errors in the rest of the code\n // our logic below makes sure that we call those 2 \"variants\" correctly\n\n getAction(machine, typeof action === 'string' ? action : action.type);\n const actionArgs = {\n context: intermediateSnapshot.context,\n event,\n self: actorScope.self,\n system: actorScope.system\n };\n const actionParams = isInline || typeof action === 'string' ? undefined : 'params' in action ? typeof action.params === 'function' ? action.params({\n context: intermediateSnapshot.context,\n event\n }) : action.params : undefined;\n if (!resolvedAction || !('resolve' in resolvedAction)) {\n actorScope.actionExecutor({\n type: typeof action === 'string' ? action : typeof action === 'object' ? action.type : action.name || '(anonymous)',\n info: actionArgs,\n params: actionParams,\n exec: resolvedAction\n });\n continue;\n }\n const builtinAction = resolvedAction;\n const [nextState, params, actions] = builtinAction.resolve(actorScope, intermediateSnapshot, actionArgs, actionParams, resolvedAction,\n // this holds all params\n extra);\n intermediateSnapshot = nextState;\n if ('retryResolve' in builtinAction) {\n retries?.push([builtinAction, params]);\n }\n if ('execute' in builtinAction) {\n actorScope.actionExecutor({\n type: builtinAction.type,\n info: actionArgs,\n params,\n exec: builtinAction.execute.bind(null, actorScope, params)\n });\n }\n if (actions) {\n intermediateSnapshot = resolveAndExecuteActionsWithContext(intermediateSnapshot, event, actorScope, actions, extra, retries);\n }\n }\n return intermediateSnapshot;\n}\nfunction resolveActionsAndContext(currentSnapshot, event, actorScope, actions, internalQueue, deferredActorIds) {\n const retries = deferredActorIds ? [] : undefined;\n const nextState = resolveAndExecuteActionsWithContext(currentSnapshot, event, actorScope, actions, {\n internalQueue,\n deferredActorIds\n }, retries);\n retries?.forEach(([builtinAction, params]) => {\n builtinAction.retryResolve(actorScope, nextState, params);\n });\n return nextState;\n}\nfunction macrostep(snapshot, event, actorScope, internalQueue) {\n let nextSnapshot = snapshot;\n const microstates = [];\n function addMicrostate(microstate, event, transitions) {\n actorScope.system._sendInspectionEvent({\n type: '@xstate.microstep',\n actorRef: actorScope.self,\n event,\n snapshot: microstate,\n _transitions: transitions\n });\n microstates.push(microstate);\n }\n\n // Handle stop event\n if (event.type === XSTATE_STOP) {\n nextSnapshot = cloneMachineSnapshot(stopChildren(nextSnapshot, event, actorScope), {\n status: 'stopped'\n });\n addMicrostate(nextSnapshot, event, []);\n return {\n snapshot: nextSnapshot,\n microstates\n };\n }\n let nextEvent = event;\n\n // Assume the state is at rest (no raised events)\n // Determine the next state based on the next microstep\n if (nextEvent.type !== XSTATE_INIT) {\n const currentEvent = nextEvent;\n const isErr = isErrorActorEvent(currentEvent);\n const transitions = selectTransitions(currentEvent, nextSnapshot);\n if (isErr && !transitions.length) {\n // TODO: we should likely only allow transitions selected by very explicit descriptors\n // `*` shouldn't be matched, likely `xstate.error.*` shouldnt be either\n // similarly `xstate.error.actor.*` and `xstate.error.actor.todo.*` have to be considered too\n nextSnapshot = cloneMachineSnapshot(snapshot, {\n status: 'error',\n error: currentEvent.error\n });\n addMicrostate(nextSnapshot, currentEvent, []);\n return {\n snapshot: nextSnapshot,\n microstates\n };\n }\n nextSnapshot = microstep(transitions, snapshot, actorScope, nextEvent, false,\n // isInitial\n internalQueue);\n addMicrostate(nextSnapshot, currentEvent, transitions);\n }\n let shouldSelectEventlessTransitions = true;\n while (nextSnapshot.status === 'active') {\n let enabledTransitions = shouldSelectEventlessTransitions ? selectEventlessTransitions(nextSnapshot, nextEvent) : [];\n\n // eventless transitions should always be selected after selecting *regular* transitions\n // by assigning `undefined` to `previousState` we ensure that `shouldSelectEventlessTransitions` gets always computed to true in such a case\n const previousState = enabledTransitions.length ? nextSnapshot : undefined;\n if (!enabledTransitions.length) {\n if (!internalQueue.length) {\n break;\n }\n nextEvent = internalQueue.shift();\n enabledTransitions = selectTransitions(nextEvent, nextSnapshot);\n }\n nextSnapshot = microstep(enabledTransitions, nextSnapshot, actorScope, nextEvent, false, internalQueue);\n shouldSelectEventlessTransitions = nextSnapshot !== previousState;\n addMicrostate(nextSnapshot, nextEvent, enabledTransitions);\n }\n if (nextSnapshot.status !== 'active') {\n stopChildren(nextSnapshot, nextEvent, actorScope);\n }\n return {\n snapshot: nextSnapshot,\n microstates\n };\n}\nfunction stopChildren(nextState, event, actorScope) {\n return resolveActionsAndContext(nextState, event, actorScope, Object.values(nextState.children).map(child => stopChild(child)), [], undefined);\n}\nfunction selectTransitions(event, nextState) {\n return nextState.machine.getTransitionData(nextState, event);\n}\nfunction selectEventlessTransitions(nextState, event) {\n const enabledTransitionSet = new Set();\n const atomicStates = nextState._nodes.filter(isAtomicStateNode);\n for (const stateNode of atomicStates) {\n loop: for (const s of [stateNode].concat(getProperAncestors(stateNode, undefined))) {\n if (!s.always) {\n continue;\n }\n for (const transition of s.always) {\n if (transition.guard === undefined || evaluateGuard(transition.guard, nextState.context, event, nextState)) {\n enabledTransitionSet.add(transition);\n break loop;\n }\n }\n }\n }\n return removeConflictingTransitions(Array.from(enabledTransitionSet), new Set(nextState._nodes), nextState.historyValue);\n}\n\n/**\n * Resolves a partial state value with its full representation in the state\n * node's machine.\n *\n * @param stateValue The partial state value to resolve.\n */\nfunction resolveStateValue(rootNode, stateValue) {\n const allStateNodes = getAllStateNodes(getStateNodes(rootNode, stateValue));\n return getStateValue(rootNode, [...allStateNodes]);\n}\n\nfunction isMachineSnapshot(value) {\n return !!value && typeof value === 'object' && 'machine' in value && 'value' in value;\n}\nconst machineSnapshotMatches = function matches(testValue) {\n return matchesState(testValue, this.value);\n};\nconst machineSnapshotHasTag = function hasTag(tag) {\n return this.tags.has(tag);\n};\nconst machineSnapshotCan = function can(event) {\n const transitionData = this.machine.getTransitionData(this, event);\n return !!transitionData?.length &&\n // Check that at least one transition is not forbidden\n transitionData.some(t => t.target !== undefined || t.actions.length);\n};\nconst machineSnapshotToJSON = function toJSON() {\n const {\n _nodes: nodes,\n tags,\n machine,\n getMeta,\n toJSON,\n can,\n hasTag,\n matches,\n ...jsonValues\n } = this;\n return {\n ...jsonValues,\n tags: Array.from(tags)\n };\n};\nconst machineSnapshotGetMeta = function getMeta() {\n return this._nodes.reduce((acc, stateNode) => {\n if (stateNode.meta !== undefined) {\n acc[stateNode.id] = stateNode.meta;\n }\n return acc;\n }, {});\n};\nfunction createMachineSnapshot(config, machine) {\n return {\n status: config.status,\n output: config.output,\n error: config.error,\n machine,\n context: config.context,\n _nodes: config._nodes,\n value: getStateValue(machine.root, config._nodes),\n tags: new Set(config._nodes.flatMap(sn => sn.tags)),\n children: config.children,\n historyValue: config.historyValue || {},\n matches: machineSnapshotMatches,\n hasTag: machineSnapshotHasTag,\n can: machineSnapshotCan,\n getMeta: machineSnapshotGetMeta,\n toJSON: machineSnapshotToJSON\n };\n}\nfunction cloneMachineSnapshot(snapshot, config = {}) {\n return createMachineSnapshot({\n ...snapshot,\n ...config\n }, snapshot.machine);\n}\nfunction getPersistedSnapshot(snapshot, options) {\n const {\n _nodes: nodes,\n tags,\n machine,\n children,\n context,\n can,\n hasTag,\n matches,\n getMeta,\n toJSON,\n ...jsonValues\n } = snapshot;\n const childrenJson = {};\n for (const id in children) {\n const child = children[id];\n childrenJson[id] = {\n snapshot: child.getPersistedSnapshot(options),\n src: child.src,\n systemId: child._systemId,\n syncSnapshot: child._syncSnapshot\n };\n }\n const persisted = {\n ...jsonValues,\n context: persistContext(context),\n children: childrenJson\n };\n return persisted;\n}\nfunction persistContext(contextPart) {\n let copy;\n for (const key in contextPart) {\n const value = contextPart[key];\n if (value && typeof value === 'object') {\n if ('sessionId' in value && 'send' in value && 'ref' in value) {\n copy ??= Array.isArray(contextPart) ? contextPart.slice() : {\n ...contextPart\n };\n copy[key] = {\n xstate$$type: $$ACTOR_TYPE,\n id: value.id\n };\n } else {\n const result = persistContext(value);\n if (result !== value) {\n copy ??= Array.isArray(contextPart) ? contextPart.slice() : {\n ...contextPart\n };\n copy[key] = result;\n }\n }\n }\n }\n return copy ?? contextPart;\n}\n\nfunction resolveRaise(_, snapshot, args, actionParams, {\n event: eventOrExpr,\n id,\n delay\n}, {\n internalQueue\n}) {\n const delaysMap = snapshot.machine.implementations.delays;\n if (typeof eventOrExpr === 'string') {\n throw new Error(\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n `Only event objects may be used with raise; use raise({ type: \"${eventOrExpr}\" }) instead`);\n }\n const resolvedEvent = typeof eventOrExpr === 'function' ? eventOrExpr(args, actionParams) : eventOrExpr;\n let resolvedDelay;\n if (typeof delay === 'string') {\n const configDelay = delaysMap && delaysMap[delay];\n resolvedDelay = typeof configDelay === 'function' ? configDelay(args, actionParams) : configDelay;\n } else {\n resolvedDelay = typeof delay === 'function' ? delay(args, actionParams) : delay;\n }\n if (typeof resolvedDelay !== 'number') {\n internalQueue.push(resolvedEvent);\n }\n return [snapshot, {\n event: resolvedEvent,\n id,\n delay: resolvedDelay\n }, undefined];\n}\nfunction executeRaise(actorScope, params) {\n const {\n event,\n delay,\n id\n } = params;\n if (typeof delay === 'number') {\n actorScope.defer(() => {\n const self = actorScope.self;\n actorScope.system.scheduler.schedule(self, self, event, delay, id);\n });\n return;\n }\n}\n/**\n * Raises an event. This places the event in the internal event queue, so that\n * the event is immediately consumed by the machine in the current step.\n *\n * @param eventType The event to raise.\n */\nfunction raise(eventOrExpr, options) {\n function raise(_args, _params) {\n }\n raise.type = 'xstate.raise';\n raise.event = eventOrExpr;\n raise.id = options?.id;\n raise.delay = options?.delay;\n raise.resolve = resolveRaise;\n raise.execute = executeRaise;\n return raise;\n}\n\nexport { $$ACTOR_TYPE as $, createActor as A, Actor as B, interpret as C, and as D, not as E, or as F, stateIn as G, isMachineSnapshot as H, getAllOwnEventDescriptors as I, matchesState as J, pathToStateValue as K, toObserver as L, cancel as M, NULL_EVENT as N, raise as O, spawnChild as P, stop as Q, stopChild as R, STATE_DELIMITER as S, ProcessingStatus as T, cloneMachineSnapshot as U, XSTATE_ERROR as V, createErrorActorEvent as W, XSTATE_STOP as X, toTransitionConfigArray as a, formatTransition as b, createInvokeId as c, formatInitialTransition as d, evaluateGuard as e, formatTransitions as f, getDelayedTransitions as g, getCandidates as h, getAllStateNodes as i, getStateNodes as j, createMachineSnapshot as k, isInFinalState as l, mapValues as m, macrostep as n, transitionNode as o, resolveActionsAndContext as p, createInitEvent as q, resolveStateValue as r, microstep as s, toArray as t, getInitialStateNodes as u, toStatePath as v, isStateId as w, getStateNodeByPath as x, getPersistedSnapshot as y, resolveReferencedActor as z };\n","import { T as ProcessingStatus, z as resolveReferencedActor, A as createActor, U as cloneMachineSnapshot, V as XSTATE_ERROR, W as createErrorActorEvent, e as evaluateGuard, M as cancel, O as raise, P as spawnChild, R as stopChild } from './raise-c17ec2bc.esm.js';\n\nfunction createSpawner(actorScope, {\n machine,\n context\n}, event, spawnedChildren) {\n const spawn = (src, options) => {\n if (typeof src === 'string') {\n const logic = resolveReferencedActor(machine, src);\n if (!logic) {\n throw new Error(`Actor logic '${src}' not implemented in machine '${machine.id}'`);\n }\n const actorRef = createActor(logic, {\n id: options?.id,\n parent: actorScope.self,\n syncSnapshot: options?.syncSnapshot,\n input: typeof options?.input === 'function' ? options.input({\n context,\n event,\n self: actorScope.self\n }) : options?.input,\n src,\n systemId: options?.systemId\n });\n spawnedChildren[actorRef.id] = actorRef;\n return actorRef;\n } else {\n const actorRef = createActor(src, {\n id: options?.id,\n parent: actorScope.self,\n syncSnapshot: options?.syncSnapshot,\n input: options?.input,\n src,\n systemId: options?.systemId\n });\n return actorRef;\n }\n };\n return (src, options) => {\n const actorRef = spawn(src, options); // TODO: fix types\n spawnedChildren[actorRef.id] = actorRef;\n actorScope.defer(() => {\n if (actorRef._processingStatus === ProcessingStatus.Stopped) {\n return;\n }\n actorRef.start();\n });\n return actorRef;\n };\n}\n\nfunction resolveAssign(actorScope, snapshot, actionArgs, actionParams, {\n assignment\n}) {\n if (!snapshot.context) {\n throw new Error('Cannot assign to undefined `context`. Ensure that `context` is defined in the machine config.');\n }\n const spawnedChildren = {};\n const assignArgs = {\n context: snapshot.context,\n event: actionArgs.event,\n spawn: createSpawner(actorScope, snapshot, actionArgs.event, spawnedChildren),\n self: actorScope.self,\n system: actorScope.system\n };\n let partialUpdate = {};\n if (typeof assignment === 'function') {\n partialUpdate = assignment(assignArgs, actionParams);\n } else {\n for (const key of Object.keys(assignment)) {\n const propAssignment = assignment[key];\n partialUpdate[key] = typeof propAssignment === 'function' ? propAssignment(assignArgs, actionParams) : propAssignment;\n }\n }\n const updatedContext = Object.assign({}, snapshot.context, partialUpdate);\n return [cloneMachineSnapshot(snapshot, {\n context: updatedContext,\n children: Object.keys(spawnedChildren).length ? {\n ...snapshot.children,\n ...spawnedChildren\n } : snapshot.children\n }), undefined, undefined];\n}\n/**\n * Updates the current context of the machine.\n *\n * @example\n *\n * ```ts\n * import { createMachine, assign } from 'xstate';\n *\n * const countMachine = createMachine({\n * context: {\n * count: 0,\n * message: ''\n * },\n * on: {\n * inc: {\n * actions: assign({\n * count: ({ context }) => context.count + 1\n * })\n * },\n * updateMessage: {\n * actions: assign(({ context, event }) => {\n * return {\n * message: event.message.trim()\n * };\n * })\n * }\n * }\n * });\n * ```\n *\n * @param assignment An object that represents the partial context to update, or\n * a function that returns an object that represents the partial context to\n * update.\n */\nfunction assign(assignment) {\n function assign(_args, _params) {\n }\n assign.type = 'xstate.assign';\n assign.assignment = assignment;\n assign.resolve = resolveAssign;\n return assign;\n}\n\nfunction resolveEmit(_, snapshot, args, actionParams, {\n event: eventOrExpr\n}) {\n const resolvedEvent = typeof eventOrExpr === 'function' ? eventOrExpr(args, actionParams) : eventOrExpr;\n return [snapshot, {\n event: resolvedEvent\n }, undefined];\n}\nfunction executeEmit(actorScope, {\n event\n}) {\n actorScope.defer(() => actorScope.emit(event));\n}\n/**\n * Emits an event to event handlers registered on the actor via `actor.on(event,\n * handler)`.\n *\n * @example\n *\n * ```ts\n * import { emit } from 'xstate';\n *\n * const machine = createMachine({\n * // ...\n * on: {\n * something: {\n * actions: emit({\n * type: 'emitted',\n * some: 'data'\n * })\n * }\n * }\n * // ...\n * });\n *\n * const actor = createActor(machine).start();\n *\n * actor.on('emitted', (event) => {\n * console.log(event);\n * });\n *\n * actor.send({ type: 'something' });\n * // logs:\n * // {\n * // type: 'emitted',\n * // some: 'data'\n * // }\n * ```\n */\nfunction emit(/** The event to emit, or an expression that returns an event to emit. */\neventOrExpr) {\n function emit(_args, _params) {\n }\n emit.type = 'xstate.emit';\n emit.event = eventOrExpr;\n emit.resolve = resolveEmit;\n emit.execute = executeEmit;\n return emit;\n}\n\n/**\n * @remarks\n * `T | unknown` reduces to `unknown` and that can be problematic when it comes\n * to contextual typing. It especially is a problem when the union has a\n * function member, like here:\n *\n * ```ts\n * declare function test(\n * cbOrVal: ((arg: number) => unknown) | unknown\n * ): void;\n * test((arg) => {}); // oops, implicit any\n * ```\n *\n * This type can be used to avoid this problem. This union represents the same\n * value space as `unknown`.\n */\n\n// https://github.com/microsoft/TypeScript/issues/23182#issuecomment-379091887\n\n// @TODO: Replace with native `NoInfer` when TS issue gets fixed:\n// https://github.com/microsoft/TypeScript/pull/57673\n\n/** @deprecated Use the built-in `NoInfer` type instead */\n\n/** The full definition of an event, with a string `type`. */\n\n/**\n * The string or object representing the state value relative to the parent\n * state node.\n *\n * @remarks\n * - For a child atomic state node, this is a string, e.g., `\"pending\"`.\n * - For complex state nodes, this is an object, e.g., `{ success:\n * \"someChildState\" }`.\n */\n\n/** @deprecated Use `AnyMachineSnapshot` instead */\n\n// TODO: possibly refactor this somehow, use even a simpler type, and maybe even make `machine.options` private or something\n/** @ignore */\n\nlet SpecialTargets = /*#__PURE__*/function (SpecialTargets) {\n SpecialTargets[\"Parent\"] = \"#_parent\";\n SpecialTargets[\"Internal\"] = \"#_internal\";\n return SpecialTargets;\n}({});\n\n/** @deprecated Use `AnyActor` instead. */\n\n// Based on RxJS types\n\n// TODO: in v6, this should only accept AnyActorLogic, like ActorRefFromLogic\n\n/** @deprecated Use `Actor` instead. */\n\n/**\n * Represents logic which can be used by an actor.\n *\n * @template TSnapshot - The type of the snapshot.\n * @template TEvent - The type of the event object.\n * @template TInput - The type of the input.\n * @template TSystem - The type of the actor system.\n */\n\n/** @deprecated */\n\n// TODO: cover all that can be actually returned\n\nfunction resolveSendTo(actorScope, snapshot, args, actionParams, {\n to,\n event: eventOrExpr,\n id,\n delay\n}, extra) {\n const delaysMap = snapshot.machine.implementations.delays;\n if (typeof eventOrExpr === 'string') {\n throw new Error(\n // eslint-disable-next-line @typescript-eslint/restrict-template-expressions\n `Only event objects may be used with sendTo; use sendTo({ type: \"${eventOrExpr}\" }) instead`);\n }\n const resolvedEvent = typeof eventOrExpr === 'function' ? eventOrExpr(args, actionParams) : eventOrExpr;\n let resolvedDelay;\n if (typeof delay === 'string') {\n const configDelay = delaysMap && delaysMap[delay];\n resolvedDelay = typeof configDelay === 'function' ? configDelay(args, actionParams) : configDelay;\n } else {\n resolvedDelay = typeof delay === 'function' ? delay(args, actionParams) : delay;\n }\n const resolvedTarget = typeof to === 'function' ? to(args, actionParams) : to;\n let targetActorRef;\n if (typeof resolvedTarget === 'string') {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison\n if (resolvedTarget === SpecialTargets.Parent) {\n targetActorRef = actorScope.self._parent;\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison\n else if (resolvedTarget === SpecialTargets.Internal) {\n targetActorRef = actorScope.self;\n } else if (resolvedTarget.startsWith('#_')) {\n // SCXML compatibility: https://www.w3.org/TR/scxml/#SCXMLEventProcessor\n // #_invokeid. If the target is the special term '#_invokeid', where invokeid is the invokeid of an SCXML session that the sending session has created by , the Processor must add the event to the external queue of that session.\n targetActorRef = snapshot.children[resolvedTarget.slice(2)];\n } else {\n targetActorRef = extra.deferredActorIds?.includes(resolvedTarget) ? resolvedTarget : snapshot.children[resolvedTarget];\n }\n if (!targetActorRef) {\n throw new Error(`Unable to send event to actor '${resolvedTarget}' from machine '${snapshot.machine.id}'.`);\n }\n } else {\n targetActorRef = resolvedTarget || actorScope.self;\n }\n return [snapshot, {\n to: targetActorRef,\n targetId: typeof resolvedTarget === 'string' ? resolvedTarget : undefined,\n event: resolvedEvent,\n id,\n delay: resolvedDelay\n }, undefined];\n}\nfunction retryResolveSendTo(_, snapshot, params) {\n if (typeof params.to === 'string') {\n params.to = snapshot.children[params.to];\n }\n}\nfunction executeSendTo(actorScope, params) {\n // this forms an outgoing events queue\n // thanks to that the recipient actors are able to read the *updated* snapshot value of the sender\n actorScope.defer(() => {\n const {\n to,\n event,\n delay,\n id\n } = params;\n if (typeof delay === 'number') {\n actorScope.system.scheduler.schedule(actorScope.self, to, event, delay, id);\n return;\n }\n actorScope.system._relay(actorScope.self,\n // at this point, in a deferred task, it should already be mutated by retryResolveSendTo\n // if it initially started as a string\n to, event.type === XSTATE_ERROR ? createErrorActorEvent(actorScope.self.id, event.data) : event);\n });\n}\n/**\n * Sends an event to an actor.\n *\n * @param actor The `ActorRef` to send the event to.\n * @param event The event to send, or an expression that evaluates to the event\n * to send\n * @param options Send action options\n *\n * - `id` - The unique send event identifier (used with `cancel()`).\n * - `delay` - The number of milliseconds to delay the sending of the event.\n */\nfunction sendTo(to, eventOrExpr, options) {\n function sendTo(_args, _params) {\n }\n sendTo.type = 'xstate.sendTo';\n sendTo.to = to;\n sendTo.event = eventOrExpr;\n sendTo.id = options?.id;\n sendTo.delay = options?.delay;\n sendTo.resolve = resolveSendTo;\n sendTo.retryResolve = retryResolveSendTo;\n sendTo.execute = executeSendTo;\n return sendTo;\n}\n\n/**\n * Sends an event to this machine's parent.\n *\n * @param event The event to send to the parent machine.\n * @param options Options to pass into the send event.\n */\nfunction sendParent(event, options) {\n return sendTo(SpecialTargets.Parent, event, options);\n}\n/**\n * Forwards (sends) an event to the `target` actor.\n *\n * @param target The target actor to forward the event to.\n * @param options Options to pass into the send action creator.\n */\nfunction forwardTo(target, options) {\n return sendTo(target, ({\n event\n }) => event, options);\n}\n\nfunction resolveEnqueueActions(actorScope, snapshot, args, actionParams, {\n collect\n}) {\n const actions = [];\n const enqueue = function enqueue(action) {\n actions.push(action);\n };\n enqueue.assign = (...args) => {\n actions.push(assign(...args));\n };\n enqueue.cancel = (...args) => {\n actions.push(cancel(...args));\n };\n enqueue.raise = (...args) => {\n // for some reason it fails to infer `TDelay` from `...args` here and picks its default (`never`)\n // then it fails to typecheck that because `...args` use `string` in place of `TDelay`\n actions.push(raise(...args));\n };\n enqueue.sendTo = (...args) => {\n // for some reason it fails to infer `TDelay` from `...args` here and picks its default (`never`)\n // then it fails to typecheck that because `...args` use `string` in place of `TDelay\n actions.push(sendTo(...args));\n };\n enqueue.sendParent = (...args) => {\n actions.push(sendParent(...args));\n };\n enqueue.spawnChild = (...args) => {\n actions.push(spawnChild(...args));\n };\n enqueue.stopChild = (...args) => {\n actions.push(stopChild(...args));\n };\n enqueue.emit = (...args) => {\n actions.push(emit(...args));\n };\n collect({\n context: args.context,\n event: args.event,\n enqueue,\n check: guard => evaluateGuard(guard, snapshot.context, args.event, snapshot),\n self: actorScope.self,\n system: actorScope.system\n }, actionParams);\n return [snapshot, undefined, actions];\n}\n/**\n * Creates an action object that will execute actions that are queued by the\n * `enqueue(action)` function.\n *\n * @example\n *\n * ```ts\n * import { createMachine, enqueueActions } from 'xstate';\n *\n * const machine = createMachine({\n * entry: enqueueActions(({ enqueue, check }) => {\n * enqueue.assign({ count: 0 });\n *\n * if (check('someGuard')) {\n * enqueue.assign({ count: 1 });\n * }\n *\n * enqueue('someAction');\n * })\n * });\n * ```\n */\nfunction enqueueActions(collect) {\n function enqueueActions(_args, _params) {\n }\n enqueueActions.type = 'xstate.enqueueActions';\n enqueueActions.collect = collect;\n enqueueActions.resolve = resolveEnqueueActions;\n return enqueueActions;\n}\n\nfunction resolveLog(_, snapshot, actionArgs, actionParams, {\n value,\n label\n}) {\n return [snapshot, {\n value: typeof value === 'function' ? value(actionArgs, actionParams) : value,\n label\n }, undefined];\n}\nfunction executeLog({\n logger\n}, {\n value,\n label\n}) {\n if (label) {\n logger(label, value);\n } else {\n logger(value);\n }\n}\n/**\n * @param expr The expression function to evaluate which will be logged. Takes\n * in 2 arguments:\n *\n * - `ctx` - the current state context\n * - `event` - the event that caused this action to be executed.\n *\n * @param label The label to give to the logged expression.\n */\nfunction log(value = ({\n context,\n event\n}) => ({\n context,\n event\n}), label) {\n function log(_args, _params) {\n }\n log.type = 'xstate.log';\n log.value = value;\n log.label = label;\n log.resolve = resolveLog;\n log.execute = executeLog;\n return log;\n}\n\nexport { SpecialTargets as S, assign as a, enqueueActions as b, sendTo as c, emit as e, forwardTo as f, log as l, sendParent as s };\n","export { createEmptyActor, fromCallback, fromEventObservable, fromObservable, fromPromise, fromTransition } from '../actors/dist/xstate-actors.esm.js';\nimport { t as toArray, S as STATE_DELIMITER, m as mapValues, f as formatTransitions, a as toTransitionConfigArray, b as formatTransition, N as NULL_EVENT, e as evaluateGuard, c as createInvokeId, g as getDelayedTransitions, d as formatInitialTransition, h as getCandidates, r as resolveStateValue, i as getAllStateNodes, j as getStateNodes, k as createMachineSnapshot, l as isInFinalState, n as macrostep, o as transitionNode, p as resolveActionsAndContext, q as createInitEvent, s as microstep, u as getInitialStateNodes, v as toStatePath, w as isStateId, x as getStateNodeByPath, y as getPersistedSnapshot, z as resolveReferencedActor, A as createActor, $ as $$ACTOR_TYPE } from './raise-c17ec2bc.esm.js';\nexport { B as Actor, I as __unsafe_getAllOwnEventDescriptors, D as and, M as cancel, A as createActor, j as getStateNodes, C as interpret, H as isMachineSnapshot, J as matchesState, E as not, F as or, K as pathToStateValue, O as raise, P as spawnChild, G as stateIn, Q as stop, R as stopChild, L as toObserver } from './raise-c17ec2bc.esm.js';\nimport { a as assign } from './log-3d9d72a9.esm.js';\nexport { S as SpecialTargets, a as assign, e as emit, b as enqueueActions, f as forwardTo, l as log, s as sendParent, c as sendTo } from './log-3d9d72a9.esm.js';\nimport '../dev/dist/xstate-dev.esm.js';\n\n/**\n * Asserts that the given event object is of the specified type or types. Throws\n * an error if the event object is not of the specified types.\n *\n * @example\n *\n * ```ts\n * // ...\n * entry: ({ event }) => {\n * assertEvent(event, 'doNothing');\n * // event is { type: 'doNothing' }\n * },\n * // ...\n * exit: ({ event }) => {\n * assertEvent(event, 'greet');\n * // event is { type: 'greet'; message: string }\n *\n * assertEvent(event, ['greet', 'notify']);\n * // event is { type: 'greet'; message: string }\n * // or { type: 'notify'; message: string; level: 'info' | 'error' }\n * },\n * ```\n */\nfunction assertEvent(event, type) {\n const types = toArray(type);\n if (!types.includes(event.type)) {\n const typesText = types.length === 1 ? `type \"${types[0]}\"` : `one of types \"${types.join('\", \"')}\"`;\n throw new Error(`Expected event ${JSON.stringify(event)} to have ${typesText}`);\n }\n}\n\nconst cache = new WeakMap();\nfunction memo(object, key, fn) {\n let memoizedData = cache.get(object);\n if (!memoizedData) {\n memoizedData = {\n [key]: fn()\n };\n cache.set(object, memoizedData);\n } else if (!(key in memoizedData)) {\n memoizedData[key] = fn();\n }\n return memoizedData[key];\n}\n\nconst EMPTY_OBJECT = {};\nconst toSerializableAction = action => {\n if (typeof action === 'string') {\n return {\n type: action\n };\n }\n if (typeof action === 'function') {\n if ('resolve' in action) {\n return {\n type: action.type\n };\n }\n return {\n type: action.name\n };\n }\n return action;\n};\nclass StateNode {\n constructor(/** The raw config used to create the machine. */\n config, options) {\n this.config = config;\n /**\n * The relative key of the state node, which represents its location in the\n * overall state value.\n */\n this.key = void 0;\n /** The unique ID of the state node. */\n this.id = void 0;\n /**\n * The type of this state node:\n *\n * - `'atomic'` - no child state nodes\n * - `'compound'` - nested child state nodes (XOR)\n * - `'parallel'` - orthogonal nested child state nodes (AND)\n * - `'history'` - history state node\n * - `'final'` - final state node\n */\n this.type = void 0;\n /** The string path from the root machine node to this node. */\n this.path = void 0;\n /** The child state nodes. */\n this.states = void 0;\n /**\n * The type of history on this state node. Can be:\n *\n * - `'shallow'` - recalls only top-level historical state value\n * - `'deep'` - recalls historical state value at all levels\n */\n this.history = void 0;\n /** The action(s) to be executed upon entering the state node. */\n this.entry = void 0;\n /** The action(s) to be executed upon exiting the state node. */\n this.exit = void 0;\n /** The parent state node. */\n this.parent = void 0;\n /** The root machine node. */\n this.machine = void 0;\n /**\n * The meta data associated with this state node, which will be returned in\n * State instances.\n */\n this.meta = void 0;\n /**\n * The output data sent with the \"xstate.done.state._id_\" event if this is a\n * final state node.\n */\n this.output = void 0;\n /**\n * The order this state node appears. Corresponds to the implicit document\n * order.\n */\n this.order = -1;\n this.description = void 0;\n this.tags = [];\n this.transitions = void 0;\n this.always = void 0;\n this.parent = options._parent;\n this.key = options._key;\n this.machine = options._machine;\n this.path = this.parent ? this.parent.path.concat(this.key) : [];\n this.id = this.config.id || [this.machine.id, ...this.path].join(STATE_DELIMITER);\n this.type = this.config.type || (this.config.states && Object.keys(this.config.states).length ? 'compound' : this.config.history ? 'history' : 'atomic');\n this.description = this.config.description;\n this.order = this.machine.idMap.size;\n this.machine.idMap.set(this.id, this);\n this.states = this.config.states ? mapValues(this.config.states, (stateConfig, key) => {\n const stateNode = new StateNode(stateConfig, {\n _parent: this,\n _key: key,\n _machine: this.machine\n });\n return stateNode;\n }) : EMPTY_OBJECT;\n if (this.type === 'compound' && !this.config.initial) {\n throw new Error(`No initial state specified for compound state node \"#${this.id}\". Try adding { initial: \"${Object.keys(this.states)[0]}\" } to the state config.`);\n }\n\n // History config\n this.history = this.config.history === true ? 'shallow' : this.config.history || false;\n this.entry = toArray(this.config.entry).slice();\n this.exit = toArray(this.config.exit).slice();\n this.meta = this.config.meta;\n this.output = this.type === 'final' || !this.parent ? this.config.output : undefined;\n this.tags = toArray(config.tags).slice();\n }\n\n /** @internal */\n _initialize() {\n this.transitions = formatTransitions(this);\n if (this.config.always) {\n this.always = toTransitionConfigArray(this.config.always).map(t => formatTransition(this, NULL_EVENT, t));\n }\n Object.keys(this.states).forEach(key => {\n this.states[key]._initialize();\n });\n }\n\n /** The well-structured state node definition. */\n get definition() {\n return {\n id: this.id,\n key: this.key,\n version: this.machine.version,\n type: this.type,\n initial: this.initial ? {\n target: this.initial.target,\n source: this,\n actions: this.initial.actions.map(toSerializableAction),\n eventType: null,\n reenter: false,\n toJSON: () => ({\n target: this.initial.target.map(t => `#${t.id}`),\n source: `#${this.id}`,\n actions: this.initial.actions.map(toSerializableAction),\n eventType: null\n })\n } : undefined,\n history: this.history,\n states: mapValues(this.states, state => {\n return state.definition;\n }),\n on: this.on,\n transitions: [...this.transitions.values()].flat().map(t => ({\n ...t,\n actions: t.actions.map(toSerializableAction)\n })),\n entry: this.entry.map(toSerializableAction),\n exit: this.exit.map(toSerializableAction),\n meta: this.meta,\n order: this.order || -1,\n output: this.output,\n invoke: this.invoke,\n description: this.description,\n tags: this.tags\n };\n }\n\n /** @internal */\n toJSON() {\n return this.definition;\n }\n\n /** The logic invoked as actors by this state node. */\n get invoke() {\n return memo(this, 'invoke', () => toArray(this.config.invoke).map((invokeConfig, i) => {\n const {\n src,\n systemId\n } = invokeConfig;\n const resolvedId = invokeConfig.id ?? createInvokeId(this.id, i);\n const sourceName = typeof src === 'string' ? src : `xstate.invoke.${createInvokeId(this.id, i)}`;\n return {\n ...invokeConfig,\n src: sourceName,\n id: resolvedId,\n systemId: systemId,\n toJSON() {\n const {\n onDone,\n onError,\n ...invokeDefValues\n } = invokeConfig;\n return {\n ...invokeDefValues,\n type: 'xstate.invoke',\n src: sourceName,\n id: resolvedId\n };\n }\n };\n }));\n }\n\n /** The mapping of events to transitions. */\n get on() {\n return memo(this, 'on', () => {\n const transitions = this.transitions;\n return [...transitions].flatMap(([descriptor, t]) => t.map(t => [descriptor, t])).reduce((map, [descriptor, transition]) => {\n map[descriptor] = map[descriptor] || [];\n map[descriptor].push(transition);\n return map;\n }, {});\n });\n }\n get after() {\n return memo(this, 'delayedTransitions', () => getDelayedTransitions(this));\n }\n get initial() {\n return memo(this, 'initial', () => formatInitialTransition(this, this.config.initial));\n }\n\n /** @internal */\n next(snapshot, event) {\n const eventType = event.type;\n const actions = [];\n let selectedTransition;\n const candidates = memo(this, `candidates-${eventType}`, () => getCandidates(this, eventType));\n for (const candidate of candidates) {\n const {\n guard\n } = candidate;\n const resolvedContext = snapshot.context;\n let guardPassed = false;\n try {\n guardPassed = !guard || evaluateGuard(guard, resolvedContext, event, snapshot);\n } catch (err) {\n const guardType = typeof guard === 'string' ? guard : typeof guard === 'object' ? guard.type : undefined;\n throw new Error(`Unable to evaluate guard ${guardType ? `'${guardType}' ` : ''}in transition for event '${eventType}' in state node '${this.id}':\\n${err.message}`);\n }\n if (guardPassed) {\n actions.push(...candidate.actions);\n selectedTransition = candidate;\n break;\n }\n }\n return selectedTransition ? [selectedTransition] : undefined;\n }\n\n /** All the event types accepted by this state node and its descendants. */\n get events() {\n return memo(this, 'events', () => {\n const {\n states\n } = this;\n const events = new Set(this.ownEvents);\n if (states) {\n for (const stateId of Object.keys(states)) {\n const state = states[stateId];\n if (state.states) {\n for (const event of state.events) {\n events.add(`${event}`);\n }\n }\n }\n }\n return Array.from(events);\n });\n }\n\n /**\n * All the events that have transitions directly from this state node.\n *\n * Excludes any inert events.\n */\n get ownEvents() {\n const events = new Set([...this.transitions.keys()].filter(descriptor => {\n return this.transitions.get(descriptor).some(transition => !(!transition.target && !transition.actions.length && !transition.reenter));\n }));\n return Array.from(events);\n }\n}\n\nconst STATE_IDENTIFIER = '#';\nclass StateMachine {\n constructor(/** The raw config used to create the machine. */\n config, implementations) {\n this.config = config;\n /** The machine's own version. */\n this.version = void 0;\n this.schemas = void 0;\n this.implementations = void 0;\n /** @internal */\n this.__xstatenode = true;\n /** @internal */\n this.idMap = new Map();\n this.root = void 0;\n this.id = void 0;\n this.states = void 0;\n this.events = void 0;\n this.id = config.id || '(machine)';\n this.implementations = {\n actors: implementations?.actors ?? {},\n actions: implementations?.actions ?? {},\n delays: implementations?.delays ?? {},\n guards: implementations?.guards ?? {}\n };\n this.version = this.config.version;\n this.schemas = this.config.schemas;\n this.transition = this.transition.bind(this);\n this.getInitialSnapshot = this.getInitialSnapshot.bind(this);\n this.getPersistedSnapshot = this.getPersistedSnapshot.bind(this);\n this.restoreSnapshot = this.restoreSnapshot.bind(this);\n this.start = this.start.bind(this);\n this.root = new StateNode(config, {\n _key: this.id,\n _machine: this\n });\n this.root._initialize();\n this.states = this.root.states; // TODO: remove!\n this.events = this.root.events;\n }\n\n /**\n * Clones this state machine with the provided implementations and merges the\n * `context` (if provided).\n *\n * @param implementations Options (`actions`, `guards`, `actors`, `delays`,\n * `context`) to recursively merge with the existing options.\n * @returns A new `StateMachine` instance with the provided implementations.\n */\n provide(implementations) {\n const {\n actions,\n guards,\n actors,\n delays\n } = this.implementations;\n return new StateMachine(this.config, {\n actions: {\n ...actions,\n ...implementations.actions\n },\n guards: {\n ...guards,\n ...implementations.guards\n },\n actors: {\n ...actors,\n ...implementations.actors\n },\n delays: {\n ...delays,\n ...implementations.delays\n }\n });\n }\n resolveState(config) {\n const resolvedStateValue = resolveStateValue(this.root, config.value);\n const nodeSet = getAllStateNodes(getStateNodes(this.root, resolvedStateValue));\n return createMachineSnapshot({\n _nodes: [...nodeSet],\n context: config.context || {},\n children: {},\n status: isInFinalState(nodeSet, this.root) ? 'done' : config.status || 'active',\n output: config.output,\n error: config.error,\n historyValue: config.historyValue\n }, this);\n }\n\n /**\n * Determines the next snapshot given the current `snapshot` and received\n * `event`. Calculates a full macrostep from all microsteps.\n *\n * @param snapshot The current snapshot\n * @param event The received event\n */\n transition(snapshot, event, actorScope) {\n return macrostep(snapshot, event, actorScope, []).snapshot;\n }\n\n /**\n * Determines the next state given the current `state` and `event`. Calculates\n * a microstep.\n *\n * @param state The current state\n * @param event The received event\n */\n microstep(snapshot, event, actorScope) {\n return macrostep(snapshot, event, actorScope, []).microstates;\n }\n getTransitionData(snapshot, event) {\n return transitionNode(this.root, snapshot.value, snapshot, event) || [];\n }\n\n /**\n * The initial state _before_ evaluating any microsteps. This \"pre-initial\"\n * state is provided to initial actions executed in the initial state.\n */\n getPreInitialState(actorScope, initEvent, internalQueue) {\n const {\n context\n } = this.config;\n const preInitial = createMachineSnapshot({\n context: typeof context !== 'function' && context ? context : {},\n _nodes: [this.root],\n children: {},\n status: 'active'\n }, this);\n if (typeof context === 'function') {\n const assignment = ({\n spawn,\n event,\n self\n }) => context({\n spawn,\n input: event.input,\n self\n });\n return resolveActionsAndContext(preInitial, initEvent, actorScope, [assign(assignment)], internalQueue, undefined);\n }\n return preInitial;\n }\n\n /**\n * Returns the initial `State` instance, with reference to `self` as an\n * `ActorRef`.\n */\n getInitialSnapshot(actorScope, input) {\n const initEvent = createInitEvent(input); // TODO: fix;\n const internalQueue = [];\n const preInitialState = this.getPreInitialState(actorScope, initEvent, internalQueue);\n const nextState = microstep([{\n target: [...getInitialStateNodes(this.root)],\n source: this.root,\n reenter: true,\n actions: [],\n eventType: null,\n toJSON: null // TODO: fix\n }], preInitialState, actorScope, initEvent, true, internalQueue);\n const {\n snapshot: macroState\n } = macrostep(nextState, initEvent, actorScope, internalQueue);\n return macroState;\n }\n start(snapshot) {\n Object.values(snapshot.children).forEach(child => {\n if (child.getSnapshot().status === 'active') {\n child.start();\n }\n });\n }\n getStateNodeById(stateId) {\n const fullPath = toStatePath(stateId);\n const relativePath = fullPath.slice(1);\n const resolvedStateId = isStateId(fullPath[0]) ? fullPath[0].slice(STATE_IDENTIFIER.length) : fullPath[0];\n const stateNode = this.idMap.get(resolvedStateId);\n if (!stateNode) {\n throw new Error(`Child state node '#${resolvedStateId}' does not exist on machine '${this.id}'`);\n }\n return getStateNodeByPath(stateNode, relativePath);\n }\n get definition() {\n return this.root.definition;\n }\n toJSON() {\n return this.definition;\n }\n getPersistedSnapshot(snapshot, options) {\n return getPersistedSnapshot(snapshot, options);\n }\n restoreSnapshot(snapshot, _actorScope) {\n const children = {};\n const snapshotChildren = snapshot.children;\n Object.keys(snapshotChildren).forEach(actorId => {\n const actorData = snapshotChildren[actorId];\n const childState = actorData.snapshot;\n const src = actorData.src;\n const logic = typeof src === 'string' ? resolveReferencedActor(this, src) : src;\n if (!logic) {\n return;\n }\n const actorRef = createActor(logic, {\n id: actorId,\n parent: _actorScope.self,\n syncSnapshot: actorData.syncSnapshot,\n snapshot: childState,\n src,\n systemId: actorData.systemId\n });\n children[actorId] = actorRef;\n });\n const restoredSnapshot = createMachineSnapshot({\n ...snapshot,\n children,\n _nodes: Array.from(getAllStateNodes(getStateNodes(this.root, snapshot.value)))\n }, this);\n const seen = new Set();\n function reviveContext(contextPart, children) {\n if (seen.has(contextPart)) {\n return;\n }\n seen.add(contextPart);\n for (const key in contextPart) {\n const value = contextPart[key];\n if (value && typeof value === 'object') {\n if ('xstate$$type' in value && value.xstate$$type === $$ACTOR_TYPE) {\n contextPart[key] = children[value.id];\n continue;\n }\n reviveContext(value, children);\n }\n }\n }\n reviveContext(restoredSnapshot.context, children);\n return restoredSnapshot;\n }\n}\n\n/**\n * Creates a state machine (statechart) with the given configuration.\n *\n * The state machine represents the pure logic of a state machine actor.\n *\n * @example\n *\n * ```ts\n * import { createMachine } from 'xstate';\n *\n * const lightMachine = createMachine({\n * id: 'light',\n * initial: 'green',\n * states: {\n * green: {\n * on: {\n * TIMER: { target: 'yellow' }\n * }\n * },\n * yellow: {\n * on: {\n * TIMER: { target: 'red' }\n * }\n * },\n * red: {\n * on: {\n * TIMER: { target: 'green' }\n * }\n * }\n * }\n * });\n *\n * const lightActor = createActor(lightMachine);\n * lightActor.start();\n *\n * lightActor.send({ type: 'TIMER' });\n * ```\n *\n * @param config The state machine configuration.\n * @param options DEPRECATED: use `setup({ ... })` or `machine.provide({ ... })`\n * to provide machine implementations instead.\n */\nfunction createMachine(config, implementations) {\n return new StateMachine(config, implementations);\n}\n\n/** @internal */\nfunction createInertActorScope(actorLogic) {\n const self = createActor(actorLogic);\n const inertActorScope = {\n self,\n defer: () => {},\n id: '',\n logger: () => {},\n sessionId: '',\n stopChild: () => {},\n system: self.system,\n emit: () => {},\n actionExecutor: () => {}\n };\n return inertActorScope;\n}\n\n/** @deprecated Use `initialTransition(…)` instead. */\nfunction getInitialSnapshot(actorLogic, ...[input]) {\n const actorScope = createInertActorScope(actorLogic);\n return actorLogic.getInitialSnapshot(actorScope, input);\n}\n\n/**\n * Determines the next snapshot for the given `actorLogic` based on the given\n * `snapshot` and `event`.\n *\n * If the `snapshot` is `undefined`, the initial snapshot of the `actorLogic` is\n * used.\n *\n * @deprecated Use `transition(…)` instead.\n * @example\n *\n * ```ts\n * import { getNextSnapshot } from 'xstate';\n * import { trafficLightMachine } from './trafficLightMachine.ts';\n *\n * const nextSnapshot = getNextSnapshot(\n * trafficLightMachine, // actor logic\n * undefined, // snapshot (or initial state if undefined)\n * { type: 'TIMER' }\n * ); // event object\n *\n * console.log(nextSnapshot.value);\n * // => 'yellow'\n *\n * const nextSnapshot2 = getNextSnapshot(\n * trafficLightMachine, // actor logic\n * nextSnapshot, // snapshot\n * { type: 'TIMER' }\n * ); // event object\n *\n * console.log(nextSnapshot2.value);\n * // =>'red'\n * ```\n */\nfunction getNextSnapshot(actorLogic, snapshot, event) {\n const inertActorScope = createInertActorScope(actorLogic);\n inertActorScope.self._snapshot = snapshot;\n return actorLogic.transition(snapshot, event, inertActorScope);\n}\n\n// at the moment we allow extra actors - ones that are not specified by `children`\n// this could be reconsidered in the future\n\nfunction setup({\n schemas,\n actors,\n actions,\n guards,\n delays\n}) {\n return {\n createMachine: config => createMachine({\n ...config,\n schemas\n }, {\n actors,\n actions,\n guards,\n delays\n })\n };\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging\n\n// eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging\nclass SimulatedClock {\n constructor() {\n this.timeouts = new Map();\n this._now = 0;\n this._id = 0;\n this._flushing = false;\n this._flushingInvalidated = false;\n }\n now() {\n return this._now;\n }\n getId() {\n return this._id++;\n }\n setTimeout(fn, timeout) {\n this._flushingInvalidated = this._flushing;\n const id = this.getId();\n this.timeouts.set(id, {\n start: this.now(),\n timeout,\n fn\n });\n return id;\n }\n clearTimeout(id) {\n this._flushingInvalidated = this._flushing;\n this.timeouts.delete(id);\n }\n set(time) {\n if (this._now > time) {\n throw new Error('Unable to travel back in time');\n }\n this._now = time;\n this.flushTimeouts();\n }\n flushTimeouts() {\n if (this._flushing) {\n this._flushingInvalidated = true;\n return;\n }\n this._flushing = true;\n const sorted = [...this.timeouts].sort(([_idA, timeoutA], [_idB, timeoutB]) => {\n const endA = timeoutA.start + timeoutA.timeout;\n const endB = timeoutB.start + timeoutB.timeout;\n return endB > endA ? -1 : 1;\n });\n for (const [id, timeout] of sorted) {\n if (this._flushingInvalidated) {\n this._flushingInvalidated = false;\n this._flushing = false;\n this.flushTimeouts();\n return;\n }\n if (this.now() - timeout.start >= timeout.timeout) {\n this.timeouts.delete(id);\n timeout.fn.call(null);\n }\n }\n this._flushing = false;\n }\n increment(ms) {\n this._now += ms;\n this.flushTimeouts();\n }\n}\n\n/**\n * Returns a promise that resolves to the `output` of the actor when it is done.\n *\n * @example\n *\n * ```ts\n * const machine = createMachine({\n * // ...\n * output: {\n * count: 42\n * }\n * });\n *\n * const actor = createActor(machine);\n *\n * actor.start();\n *\n * const output = await toPromise(actor);\n *\n * console.log(output);\n * // logs { count: 42 }\n * ```\n */\nfunction toPromise(actor) {\n return new Promise((resolve, reject) => {\n actor.subscribe({\n complete: () => {\n resolve(actor.getSnapshot().output);\n },\n error: reject\n });\n });\n}\n\n/**\n * Given actor `logic`, a `snapshot`, and an `event`, returns a tuple of the\n * `nextSnapshot` and `actions` to execute.\n *\n * This is a pure function that does not execute `actions`.\n */\nfunction transition(logic, snapshot, event) {\n const executableActions = [];\n const actorScope = createInertActorScope(logic);\n actorScope.actionExecutor = action => {\n executableActions.push(action);\n };\n const nextSnapshot = logic.transition(snapshot, event, actorScope);\n return [nextSnapshot, executableActions];\n}\n\n/**\n * Given actor `logic` and optional `input`, returns a tuple of the\n * `nextSnapshot` and `actions` to execute from the initial transition (no\n * previous state).\n *\n * This is a pure function that does not execute `actions`.\n */\nfunction initialTransition(logic, ...[input]) {\n const executableActions = [];\n const actorScope = createInertActorScope(logic);\n actorScope.actionExecutor = action => {\n executableActions.push(action);\n };\n const nextSnapshot = logic.getInitialSnapshot(actorScope, input);\n return [nextSnapshot, executableActions];\n}\n\nconst defaultWaitForOptions = {\n timeout: Infinity // much more than 10 seconds\n};\n\n/**\n * Subscribes to an actor ref and waits for its emitted value to satisfy a\n * predicate, and then resolves with that value. Will throw if the desired state\n * is not reached after an optional timeout. (defaults to Infinity).\n *\n * @example\n *\n * ```js\n * const state = await waitFor(someService, (state) => {\n * return state.hasTag('loaded');\n * });\n *\n * state.hasTag('loaded'); // true\n * ```\n *\n * @param actorRef The actor ref to subscribe to\n * @param predicate Determines if a value matches the condition to wait for\n * @param options\n * @returns A promise that eventually resolves to the emitted value that matches\n * the condition\n */\nfunction waitFor(actorRef, predicate, options) {\n const resolvedOptions = {\n ...defaultWaitForOptions,\n ...options\n };\n return new Promise((res, rej) => {\n const {\n signal\n } = resolvedOptions;\n if (signal?.aborted) {\n // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\n rej(signal.reason);\n return;\n }\n let done = false;\n const handle = resolvedOptions.timeout === Infinity ? undefined : setTimeout(() => {\n dispose();\n rej(new Error(`Timeout of ${resolvedOptions.timeout} ms exceeded`));\n }, resolvedOptions.timeout);\n const dispose = () => {\n clearTimeout(handle);\n done = true;\n sub?.unsubscribe();\n if (abortListener) {\n signal.removeEventListener('abort', abortListener);\n }\n };\n function checkEmitted(emitted) {\n if (predicate(emitted)) {\n dispose();\n res(emitted);\n }\n }\n\n /**\n * If the `signal` option is provided, this will be the listener for its\n * `abort` event\n */\n let abortListener;\n // eslint-disable-next-line prefer-const\n let sub; // avoid TDZ when disposing synchronously\n\n // See if the current snapshot already matches the predicate\n checkEmitted(actorRef.getSnapshot());\n if (done) {\n return;\n }\n\n // only define the `abortListener` if the `signal` option is provided\n if (signal) {\n abortListener = () => {\n dispose();\n // XState does not \"own\" the signal, so we should reject with its reason (if any)\n // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\n rej(signal.reason);\n };\n signal.addEventListener('abort', abortListener);\n }\n sub = actorRef.subscribe({\n next: checkEmitted,\n error: err => {\n dispose();\n // eslint-disable-next-line @typescript-eslint/prefer-promise-reject-errors\n rej(err);\n },\n complete: () => {\n dispose();\n rej(new Error(`Actor terminated without satisfying predicate`));\n }\n });\n if (done) {\n sub.unsubscribe();\n }\n });\n}\n\nexport { SimulatedClock, StateMachine, StateNode, assertEvent, createMachine, getInitialSnapshot, getNextSnapshot, initialTransition, setup, toPromise, transition, waitFor };\n","/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var e=require(\"react\");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k=\"function\"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}\nfunction r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u=\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n'use strict';var h=require(\"react\"),n=require(\"use-sync-external-store/shim\");function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q=\"function\"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;\nexports.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return[function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);\nu(function(){f.hasValue=!0;f.value=d},[d]);w(d);return d};\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.min.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n","import * as React from 'react';\nimport { useEffect, useState, useCallback } from 'react';\nimport useIsomorphicLayoutEffect from 'use-isomorphic-layout-effect';\nimport { toObserver, createActor } from 'xstate';\nimport { useSyncExternalStoreWithSelector } from 'use-sync-external-store/shim/with-selector';\nimport { useSyncExternalStore } from 'use-sync-external-store/shim';\n\nconst forEachActor = (actorRef, callback) => {\n callback(actorRef);\n const children = actorRef.getSnapshot().children;\n if (children) {\n Object.values(children).forEach(child => {\n forEachActor(child, callback);\n });\n }\n};\nfunction stopRootWithRehydration(actorRef) {\n // persist snapshot here in a custom way allows us to persist inline actors and to preserve actor references\n // we do it to avoid setState in useEffect when the effect gets \"reconnected\"\n // this currently only happens in Strict Effects but it simulates the Offscreen aka Activity API\n // it also just allows us to end up with a somewhat more predictable behavior for the users\n const persistedSnapshots = [];\n forEachActor(actorRef, ref => {\n persistedSnapshots.push([ref, ref.getSnapshot()]);\n // muting observers allow us to avoid `useSelector` from being notified about the stopped snapshot\n // React reconnects its subscribers (from the useSyncExternalStore) on its own\n // and userland subscibers should basically always do the same anyway\n // as each subscription should have its own cleanup logic and that should be called each such reconnect\n ref.observers = new Set();\n });\n const systemSnapshot = actorRef.system.getSnapshot?.();\n actorRef.stop();\n actorRef.system._snapshot = systemSnapshot;\n persistedSnapshots.forEach(([ref, snapshot]) => {\n ref._processingStatus = 0;\n ref._snapshot = snapshot;\n });\n}\n\nfunction useIdleActorRef(logic, ...[options]) {\n let [[currentConfig, actorRef], setCurrent] = useState(() => {\n const actorRef = createActor(logic, options);\n return [logic.config, actorRef];\n });\n if (logic.config !== currentConfig) {\n const newActorRef = createActor(logic, {\n ...options,\n snapshot: actorRef.getPersistedSnapshot({\n __unsafeAllowInlineActors: true\n })\n });\n setCurrent([logic.config, newActorRef]);\n actorRef = newActorRef;\n }\n\n // TODO: consider using `useAsapEffect` that would do this in `useInsertionEffect` is that's available\n useIsomorphicLayoutEffect(() => {\n actorRef.logic.implementations = logic.implementations;\n });\n return actorRef;\n}\nfunction useActorRef(machine, ...[options, observerOrListener]) {\n const actorRef = useIdleActorRef(machine, options);\n useEffect(() => {\n if (!observerOrListener) {\n return;\n }\n const sub = actorRef.subscribe(toObserver(observerOrListener));\n return () => {\n sub.unsubscribe();\n };\n }, [observerOrListener]);\n useEffect(() => {\n actorRef.start();\n return () => {\n stopRootWithRehydration(actorRef);\n };\n }, [actorRef]);\n return actorRef;\n}\n\nfunction defaultCompare(a, b) {\n return a === b;\n}\nfunction useSelector(actor, selector, compare = defaultCompare) {\n const subscribe = useCallback(handleStoreChange => {\n if (!actor) {\n return () => {};\n }\n const {\n unsubscribe\n } = actor.subscribe(handleStoreChange);\n return unsubscribe;\n }, [actor]);\n const boundGetSnapshot = useCallback(() => actor?.getSnapshot(), [actor]);\n const selectedSnapshot = useSyncExternalStoreWithSelector(subscribe, boundGetSnapshot, boundGetSnapshot, selector, compare);\n return selectedSnapshot;\n}\n\nfunction createActorContext(actorLogic, actorOptions) {\n const ReactContext = /*#__PURE__*/React.createContext(null);\n const OriginalProvider = ReactContext.Provider;\n function Provider({\n children,\n logic: providedLogic = actorLogic,\n machine,\n options: providedOptions\n }) {\n if (machine) {\n throw new Error(`The \"machine\" prop has been deprecated. Please use \"logic\" instead.`);\n }\n const actor = useActorRef(providedLogic, {\n ...actorOptions,\n ...providedOptions\n });\n return /*#__PURE__*/React.createElement(OriginalProvider, {\n value: actor,\n children\n });\n }\n\n // TODO: add properties to actor ref to make more descriptive\n Provider.displayName = `ActorProvider`;\n function useContext() {\n const actor = React.useContext(ReactContext);\n if (!actor) {\n throw new Error(`You used a hook from \"${Provider.displayName}\" but it's not inside a <${Provider.displayName}> component.`);\n }\n return actor;\n }\n function useSelector$1(selector, compare) {\n const actor = useContext();\n return useSelector(actor, selector, compare);\n }\n return {\n Provider: Provider,\n useActorRef: useContext,\n useSelector: useSelector$1\n };\n}\n\n// From https://github.com/reduxjs/react-redux/blob/720f0ba79236cdc3e1115f4ef9a7760a21784b48/src/utils/shallowEqual.ts\nfunction is(x, y) {\n if (x === y) {\n return x !== 0 || y !== 0 || 1 / x === 1 / y;\n } else {\n return x !== x && y !== y;\n }\n}\nfunction shallowEqual(objA, objB) {\n if (is(objA, objB)) return true;\n if (typeof objA !== 'object' || objA === null || typeof objB !== 'object' || objB === null) {\n return false;\n }\n const keysA = Object.keys(objA);\n const keysB = Object.keys(objB);\n if (keysA.length !== keysB.length) return false;\n for (let i = 0; i < keysA.length; i++) {\n if (!Object.prototype.hasOwnProperty.call(objB, keysA[i]) || !is(objA[keysA[i]], objB[keysA[i]])) {\n return false;\n }\n }\n return true;\n}\n\nfunction useActor(logic, ...[options]) {\n const actorRef = useIdleActorRef(logic, options);\n const getSnapshot = useCallback(() => {\n return actorRef.getSnapshot();\n }, [actorRef]);\n const subscribe = useCallback(handleStoreChange => {\n const {\n unsubscribe\n } = actorRef.subscribe(handleStoreChange);\n return unsubscribe;\n }, [actorRef]);\n const actorSnapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);\n useEffect(() => {\n actorRef.start();\n return () => {\n stopRootWithRehydration(actorRef);\n };\n }, [actorRef]);\n return [actorSnapshot, actorRef.send, actorRef];\n}\n\n/** @alias useActor */\nfunction useMachine(machine, ...[options]) {\n return useActor(machine, options);\n}\n\nexport { createActorContext, shallowEqual, useActor, useActorRef, useMachine, useSelector };\n","import \"./Loader.css\";\n\nconst Loader = () => {\n return (\n
\n
\n
\n
\n
\n
\n );\n};\n\nexport { Loader };\n","import { Loader } from \"../Loader/Loader\";\nimport \"./LoadingPanel.css\";\n\nconst LoadingPanel = () => {\n return (\n
\n \n
\n );\n};\n\nexport { LoadingPanel };\n","'use strict';\n\nexport default function bind(fn, thisArg) {\n return function wrap() {\n return fn.apply(thisArg, arguments);\n };\n}\n","'use strict';\n\nimport bind from './helpers/bind.js';\n\n// utils is a library of generic helper functions non-specific to axios\n\nconst {toString} = Object.prototype;\nconst {getPrototypeOf} = Object;\n\nconst kindOf = (cache => thing => {\n const str = toString.call(thing);\n return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());\n})(Object.create(null));\n\nconst kindOfTest = (type) => {\n type = type.toLowerCase();\n return (thing) => kindOf(thing) === type\n}\n\nconst typeOfTest = type => thing => typeof thing === type;\n\n/**\n * Determine if a value is an Array\n *\n * @param {Object} val The value to test\n *\n * @returns {boolean} True if value is an Array, otherwise false\n */\nconst {isArray} = Array;\n\n/**\n * Determine if a value is undefined\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if the value is undefined, otherwise false\n */\nconst isUndefined = typeOfTest('undefined');\n\n/**\n * Determine if a value is a Buffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Buffer, otherwise false\n */\nfunction isBuffer(val) {\n return val !== null && !isUndefined(val) && val.constructor !== null && !isUndefined(val.constructor)\n && isFunction(val.constructor.isBuffer) && val.constructor.isBuffer(val);\n}\n\n/**\n * Determine if a value is an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is an ArrayBuffer, otherwise false\n */\nconst isArrayBuffer = kindOfTest('ArrayBuffer');\n\n\n/**\n * Determine if a value is a view on an ArrayBuffer\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false\n */\nfunction isArrayBufferView(val) {\n let result;\n if ((typeof ArrayBuffer !== 'undefined') && (ArrayBuffer.isView)) {\n result = ArrayBuffer.isView(val);\n } else {\n result = (val) && (val.buffer) && (isArrayBuffer(val.buffer));\n }\n return result;\n}\n\n/**\n * Determine if a value is a String\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a String, otherwise false\n */\nconst isString = typeOfTest('string');\n\n/**\n * Determine if a value is a Function\n *\n * @param {*} val The value to test\n * @returns {boolean} True if value is a Function, otherwise false\n */\nconst isFunction = typeOfTest('function');\n\n/**\n * Determine if a value is a Number\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Number, otherwise false\n */\nconst isNumber = typeOfTest('number');\n\n/**\n * Determine if a value is an Object\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an Object, otherwise false\n */\nconst isObject = (thing) => thing !== null && typeof thing === 'object';\n\n/**\n * Determine if a value is a Boolean\n *\n * @param {*} thing The value to test\n * @returns {boolean} True if value is a Boolean, otherwise false\n */\nconst isBoolean = thing => thing === true || thing === false;\n\n/**\n * Determine if a value is a plain Object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a plain Object, otherwise false\n */\nconst isPlainObject = (val) => {\n if (kindOf(val) !== 'object') {\n return false;\n }\n\n const prototype = getPrototypeOf(val);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);\n}\n\n/**\n * Determine if a value is a Date\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Date, otherwise false\n */\nconst isDate = kindOfTest('Date');\n\n/**\n * Determine if a value is a File\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFile = kindOfTest('File');\n\n/**\n * Determine if a value is a Blob\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Blob, otherwise false\n */\nconst isBlob = kindOfTest('Blob');\n\n/**\n * Determine if a value is a FileList\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a File, otherwise false\n */\nconst isFileList = kindOfTest('FileList');\n\n/**\n * Determine if a value is a Stream\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a Stream, otherwise false\n */\nconst isStream = (val) => isObject(val) && isFunction(val.pipe);\n\n/**\n * Determine if a value is a FormData\n *\n * @param {*} thing The value to test\n *\n * @returns {boolean} True if value is an FormData, otherwise false\n */\nconst isFormData = (thing) => {\n let kind;\n return thing && (\n (typeof FormData === 'function' && thing instanceof FormData) || (\n isFunction(thing.append) && (\n (kind = kindOf(thing)) === 'formdata' ||\n // detect form-data instance\n (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')\n )\n )\n )\n}\n\n/**\n * Determine if a value is a URLSearchParams object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a URLSearchParams object, otherwise false\n */\nconst isURLSearchParams = kindOfTest('URLSearchParams');\n\nconst [isReadableStream, isRequest, isResponse, isHeaders] = ['ReadableStream', 'Request', 'Response', 'Headers'].map(kindOfTest);\n\n/**\n * Trim excess whitespace off the beginning and end of a string\n *\n * @param {String} str The String to trim\n *\n * @returns {String} The String freed of excess whitespace\n */\nconst trim = (str) => str.trim ?\n str.trim() : str.replace(/^[\\s\\uFEFF\\xA0]+|[\\s\\uFEFF\\xA0]+$/g, '');\n\n/**\n * Iterate over an Array or an Object invoking a function for each item.\n *\n * If `obj` is an Array callback will be called passing\n * the value, index, and complete array for each item.\n *\n * If 'obj' is an Object callback will be called passing\n * the value, key, and complete object for each property.\n *\n * @param {Object|Array} obj The object to iterate\n * @param {Function} fn The callback to invoke for each item\n *\n * @param {Boolean} [allOwnKeys = false]\n * @returns {any}\n */\nfunction forEach(obj, fn, {allOwnKeys = false} = {}) {\n // Don't bother if no value provided\n if (obj === null || typeof obj === 'undefined') {\n return;\n }\n\n let i;\n let l;\n\n // Force an array if not already something iterable\n if (typeof obj !== 'object') {\n /*eslint no-param-reassign:0*/\n obj = [obj];\n }\n\n if (isArray(obj)) {\n // Iterate over array values\n for (i = 0, l = obj.length; i < l; i++) {\n fn.call(null, obj[i], i, obj);\n }\n } else {\n // Iterate over object keys\n const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);\n const len = keys.length;\n let key;\n\n for (i = 0; i < len; i++) {\n key = keys[i];\n fn.call(null, obj[key], key, obj);\n }\n }\n}\n\nfunction findKey(obj, key) {\n key = key.toLowerCase();\n const keys = Object.keys(obj);\n let i = keys.length;\n let _key;\n while (i-- > 0) {\n _key = keys[i];\n if (key === _key.toLowerCase()) {\n return _key;\n }\n }\n return null;\n}\n\nconst _global = (() => {\n /*eslint no-undef:0*/\n if (typeof globalThis !== \"undefined\") return globalThis;\n return typeof self !== \"undefined\" ? self : (typeof window !== 'undefined' ? window : global)\n})();\n\nconst isContextDefined = (context) => !isUndefined(context) && context !== _global;\n\n/**\n * Accepts varargs expecting each argument to be an object, then\n * immutably merges the properties of each object and returns result.\n *\n * When multiple objects contain the same key the later object in\n * the arguments list will take precedence.\n *\n * Example:\n *\n * ```js\n * var result = merge({foo: 123}, {foo: 456});\n * console.log(result.foo); // outputs 456\n * ```\n *\n * @param {Object} obj1 Object to merge\n *\n * @returns {Object} Result of all merge properties\n */\nfunction merge(/* obj1, obj2, obj3, ... */) {\n const {caseless} = isContextDefined(this) && this || {};\n const result = {};\n const assignValue = (val, key) => {\n const targetKey = caseless && findKey(result, key) || key;\n if (isPlainObject(result[targetKey]) && isPlainObject(val)) {\n result[targetKey] = merge(result[targetKey], val);\n } else if (isPlainObject(val)) {\n result[targetKey] = merge({}, val);\n } else if (isArray(val)) {\n result[targetKey] = val.slice();\n } else {\n result[targetKey] = val;\n }\n }\n\n for (let i = 0, l = arguments.length; i < l; i++) {\n arguments[i] && forEach(arguments[i], assignValue);\n }\n return result;\n}\n\n/**\n * Extends object a by mutably adding to it the properties of object b.\n *\n * @param {Object} a The object to be extended\n * @param {Object} b The object to copy properties from\n * @param {Object} thisArg The object to bind function to\n *\n * @param {Boolean} [allOwnKeys]\n * @returns {Object} The resulting value of object a\n */\nconst extend = (a, b, thisArg, {allOwnKeys}= {}) => {\n forEach(b, (val, key) => {\n if (thisArg && isFunction(val)) {\n a[key] = bind(val, thisArg);\n } else {\n a[key] = val;\n }\n }, {allOwnKeys});\n return a;\n}\n\n/**\n * Remove byte order marker. This catches EF BB BF (the UTF-8 BOM)\n *\n * @param {string} content with BOM\n *\n * @returns {string} content value without BOM\n */\nconst stripBOM = (content) => {\n if (content.charCodeAt(0) === 0xFEFF) {\n content = content.slice(1);\n }\n return content;\n}\n\n/**\n * Inherit the prototype methods from one constructor into another\n * @param {function} constructor\n * @param {function} superConstructor\n * @param {object} [props]\n * @param {object} [descriptors]\n *\n * @returns {void}\n */\nconst inherits = (constructor, superConstructor, props, descriptors) => {\n constructor.prototype = Object.create(superConstructor.prototype, descriptors);\n constructor.prototype.constructor = constructor;\n Object.defineProperty(constructor, 'super', {\n value: superConstructor.prototype\n });\n props && Object.assign(constructor.prototype, props);\n}\n\n/**\n * Resolve object with deep prototype chain to a flat object\n * @param {Object} sourceObj source object\n * @param {Object} [destObj]\n * @param {Function|Boolean} [filter]\n * @param {Function} [propFilter]\n *\n * @returns {Object}\n */\nconst toFlatObject = (sourceObj, destObj, filter, propFilter) => {\n let props;\n let i;\n let prop;\n const merged = {};\n\n destObj = destObj || {};\n // eslint-disable-next-line no-eq-null,eqeqeq\n if (sourceObj == null) return destObj;\n\n do {\n props = Object.getOwnPropertyNames(sourceObj);\n i = props.length;\n while (i-- > 0) {\n prop = props[i];\n if ((!propFilter || propFilter(prop, sourceObj, destObj)) && !merged[prop]) {\n destObj[prop] = sourceObj[prop];\n merged[prop] = true;\n }\n }\n sourceObj = filter !== false && getPrototypeOf(sourceObj);\n } while (sourceObj && (!filter || filter(sourceObj, destObj)) && sourceObj !== Object.prototype);\n\n return destObj;\n}\n\n/**\n * Determines whether a string ends with the characters of a specified string\n *\n * @param {String} str\n * @param {String} searchString\n * @param {Number} [position= 0]\n *\n * @returns {boolean}\n */\nconst endsWith = (str, searchString, position) => {\n str = String(str);\n if (position === undefined || position > str.length) {\n position = str.length;\n }\n position -= searchString.length;\n const lastIndex = str.indexOf(searchString, position);\n return lastIndex !== -1 && lastIndex === position;\n}\n\n\n/**\n * Returns new array from array like object or null if failed\n *\n * @param {*} [thing]\n *\n * @returns {?Array}\n */\nconst toArray = (thing) => {\n if (!thing) return null;\n if (isArray(thing)) return thing;\n let i = thing.length;\n if (!isNumber(i)) return null;\n const arr = new Array(i);\n while (i-- > 0) {\n arr[i] = thing[i];\n }\n return arr;\n}\n\n/**\n * Checking if the Uint8Array exists and if it does, it returns a function that checks if the\n * thing passed in is an instance of Uint8Array\n *\n * @param {TypedArray}\n *\n * @returns {Array}\n */\n// eslint-disable-next-line func-names\nconst isTypedArray = (TypedArray => {\n // eslint-disable-next-line func-names\n return thing => {\n return TypedArray && thing instanceof TypedArray;\n };\n})(typeof Uint8Array !== 'undefined' && getPrototypeOf(Uint8Array));\n\n/**\n * For each entry in the object, call the function with the key and value.\n *\n * @param {Object} obj - The object to iterate over.\n * @param {Function} fn - The function to call for each entry.\n *\n * @returns {void}\n */\nconst forEachEntry = (obj, fn) => {\n const generator = obj && obj[Symbol.iterator];\n\n const iterator = generator.call(obj);\n\n let result;\n\n while ((result = iterator.next()) && !result.done) {\n const pair = result.value;\n fn.call(obj, pair[0], pair[1]);\n }\n}\n\n/**\n * It takes a regular expression and a string, and returns an array of all the matches\n *\n * @param {string} regExp - The regular expression to match against.\n * @param {string} str - The string to search.\n *\n * @returns {Array}\n */\nconst matchAll = (regExp, str) => {\n let matches;\n const arr = [];\n\n while ((matches = regExp.exec(str)) !== null) {\n arr.push(matches);\n }\n\n return arr;\n}\n\n/* Checking if the kindOfTest function returns true when passed an HTMLFormElement. */\nconst isHTMLForm = kindOfTest('HTMLFormElement');\n\nconst toCamelCase = str => {\n return str.toLowerCase().replace(/[-_\\s]([a-z\\d])(\\w*)/g,\n function replacer(m, p1, p2) {\n return p1.toUpperCase() + p2;\n }\n );\n};\n\n/* Creating a function that will check if an object has a property. */\nconst hasOwnProperty = (({hasOwnProperty}) => (obj, prop) => hasOwnProperty.call(obj, prop))(Object.prototype);\n\n/**\n * Determine if a value is a RegExp object\n *\n * @param {*} val The value to test\n *\n * @returns {boolean} True if value is a RegExp object, otherwise false\n */\nconst isRegExp = kindOfTest('RegExp');\n\nconst reduceDescriptors = (obj, reducer) => {\n const descriptors = Object.getOwnPropertyDescriptors(obj);\n const reducedDescriptors = {};\n\n forEach(descriptors, (descriptor, name) => {\n let ret;\n if ((ret = reducer(descriptor, name, obj)) !== false) {\n reducedDescriptors[name] = ret || descriptor;\n }\n });\n\n Object.defineProperties(obj, reducedDescriptors);\n}\n\n/**\n * Makes all methods read-only\n * @param {Object} obj\n */\n\nconst freezeMethods = (obj) => {\n reduceDescriptors(obj, (descriptor, name) => {\n // skip restricted props in strict mode\n if (isFunction(obj) && ['arguments', 'caller', 'callee'].indexOf(name) !== -1) {\n return false;\n }\n\n const value = obj[name];\n\n if (!isFunction(value)) return;\n\n descriptor.enumerable = false;\n\n if ('writable' in descriptor) {\n descriptor.writable = false;\n return;\n }\n\n if (!descriptor.set) {\n descriptor.set = () => {\n throw Error('Can not rewrite read-only method \\'' + name + '\\'');\n };\n }\n });\n}\n\nconst toObjectSet = (arrayOrString, delimiter) => {\n const obj = {};\n\n const define = (arr) => {\n arr.forEach(value => {\n obj[value] = true;\n });\n }\n\n isArray(arrayOrString) ? define(arrayOrString) : define(String(arrayOrString).split(delimiter));\n\n return obj;\n}\n\nconst noop = () => {}\n\nconst toFiniteNumber = (value, defaultValue) => {\n return value != null && Number.isFinite(value = +value) ? value : defaultValue;\n}\n\nconst ALPHA = 'abcdefghijklmnopqrstuvwxyz'\n\nconst DIGIT = '0123456789';\n\nconst ALPHABET = {\n DIGIT,\n ALPHA,\n ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT\n}\n\nconst generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {\n let str = '';\n const {length} = alphabet;\n while (size--) {\n str += alphabet[Math.random() * length|0]\n }\n\n return str;\n}\n\n/**\n * If the thing is a FormData object, return true, otherwise return false.\n *\n * @param {unknown} thing - The thing to check.\n *\n * @returns {boolean}\n */\nfunction isSpecCompliantForm(thing) {\n return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);\n}\n\nconst toJSONObject = (obj) => {\n const stack = new Array(10);\n\n const visit = (source, i) => {\n\n if (isObject(source)) {\n if (stack.indexOf(source) >= 0) {\n return;\n }\n\n if(!('toJSON' in source)) {\n stack[i] = source;\n const target = isArray(source) ? [] : {};\n\n forEach(source, (value, key) => {\n const reducedValue = visit(value, i + 1);\n !isUndefined(reducedValue) && (target[key] = reducedValue);\n });\n\n stack[i] = undefined;\n\n return target;\n }\n }\n\n return source;\n }\n\n return visit(obj, 0);\n}\n\nconst isAsyncFn = kindOfTest('AsyncFunction');\n\nconst isThenable = (thing) =>\n thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);\n\n// original code\n// https://github.com/DigitalBrainJS/AxiosPromise/blob/16deab13710ec09779922131f3fa5954320f83ab/lib/utils.js#L11-L34\n\nconst _setImmediate = ((setImmediateSupported, postMessageSupported) => {\n if (setImmediateSupported) {\n return setImmediate;\n }\n\n return postMessageSupported ? ((token, callbacks) => {\n _global.addEventListener(\"message\", ({source, data}) => {\n if (source === _global && data === token) {\n callbacks.length && callbacks.shift()();\n }\n }, false);\n\n return (cb) => {\n callbacks.push(cb);\n _global.postMessage(token, \"*\");\n }\n })(`axios@${Math.random()}`, []) : (cb) => setTimeout(cb);\n})(\n typeof setImmediate === 'function',\n isFunction(_global.postMessage)\n);\n\nconst asap = typeof queueMicrotask !== 'undefined' ?\n queueMicrotask.bind(_global) : ( typeof process !== 'undefined' && process.nextTick || _setImmediate);\n\n// *********************\n\nexport default {\n isArray,\n isArrayBuffer,\n isBuffer,\n isFormData,\n isArrayBufferView,\n isString,\n isNumber,\n isBoolean,\n isObject,\n isPlainObject,\n isReadableStream,\n isRequest,\n isResponse,\n isHeaders,\n isUndefined,\n isDate,\n isFile,\n isBlob,\n isRegExp,\n isFunction,\n isStream,\n isURLSearchParams,\n isTypedArray,\n isFileList,\n forEach,\n merge,\n extend,\n trim,\n stripBOM,\n inherits,\n toFlatObject,\n kindOf,\n kindOfTest,\n endsWith,\n toArray,\n forEachEntry,\n matchAll,\n isHTMLForm,\n hasOwnProperty,\n hasOwnProp: hasOwnProperty, // an alias to avoid ESLint no-prototype-builtins detection\n reduceDescriptors,\n freezeMethods,\n toObjectSet,\n toCamelCase,\n noop,\n toFiniteNumber,\n findKey,\n global: _global,\n isContextDefined,\n ALPHABET,\n generateString,\n isSpecCompliantForm,\n toJSONObject,\n isAsyncFn,\n isThenable,\n setImmediate: _setImmediate,\n asap\n};\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * Create an Error with the specified message, config, error code, request and response.\n *\n * @param {string} message The error message.\n * @param {string} [code] The error code (for example, 'ECONNABORTED').\n * @param {Object} [config] The config.\n * @param {Object} [request] The request.\n * @param {Object} [response] The response.\n *\n * @returns {Error} The created error.\n */\nfunction AxiosError(message, code, config, request, response) {\n Error.call(this);\n\n if (Error.captureStackTrace) {\n Error.captureStackTrace(this, this.constructor);\n } else {\n this.stack = (new Error()).stack;\n }\n\n this.message = message;\n this.name = 'AxiosError';\n code && (this.code = code);\n config && (this.config = config);\n request && (this.request = request);\n if (response) {\n this.response = response;\n this.status = response.status ? response.status : null;\n }\n}\n\nutils.inherits(AxiosError, Error, {\n toJSON: function toJSON() {\n return {\n // Standard\n message: this.message,\n name: this.name,\n // Microsoft\n description: this.description,\n number: this.number,\n // Mozilla\n fileName: this.fileName,\n lineNumber: this.lineNumber,\n columnNumber: this.columnNumber,\n stack: this.stack,\n // Axios\n config: utils.toJSONObject(this.config),\n code: this.code,\n status: this.status\n };\n }\n});\n\nconst prototype = AxiosError.prototype;\nconst descriptors = {};\n\n[\n 'ERR_BAD_OPTION_VALUE',\n 'ERR_BAD_OPTION',\n 'ECONNABORTED',\n 'ETIMEDOUT',\n 'ERR_NETWORK',\n 'ERR_FR_TOO_MANY_REDIRECTS',\n 'ERR_DEPRECATED',\n 'ERR_BAD_RESPONSE',\n 'ERR_BAD_REQUEST',\n 'ERR_CANCELED',\n 'ERR_NOT_SUPPORT',\n 'ERR_INVALID_URL'\n// eslint-disable-next-line func-names\n].forEach(code => {\n descriptors[code] = {value: code};\n});\n\nObject.defineProperties(AxiosError, descriptors);\nObject.defineProperty(prototype, 'isAxiosError', {value: true});\n\n// eslint-disable-next-line func-names\nAxiosError.from = (error, code, config, request, response, customProps) => {\n const axiosError = Object.create(prototype);\n\n utils.toFlatObject(error, axiosError, function filter(obj) {\n return obj !== Error.prototype;\n }, prop => {\n return prop !== 'isAxiosError';\n });\n\n AxiosError.call(axiosError, error.message, code, config, request, response);\n\n axiosError.cause = error;\n\n axiosError.name = error.name;\n\n customProps && Object.assign(axiosError, customProps);\n\n return axiosError;\n};\n\nexport default AxiosError;\n","// eslint-disable-next-line strict\nexport default null;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\n// temporary hotfix to avoid circular references until AxiosURLSearchParams is refactored\nimport PlatformFormData from '../platform/node/classes/FormData.js';\n\n/**\n * Determines if the given thing is a array or js object.\n *\n * @param {string} thing - The object or array to be visited.\n *\n * @returns {boolean}\n */\nfunction isVisitable(thing) {\n return utils.isPlainObject(thing) || utils.isArray(thing);\n}\n\n/**\n * It removes the brackets from the end of a string\n *\n * @param {string} key - The key of the parameter.\n *\n * @returns {string} the key without the brackets.\n */\nfunction removeBrackets(key) {\n return utils.endsWith(key, '[]') ? key.slice(0, -2) : key;\n}\n\n/**\n * It takes a path, a key, and a boolean, and returns a string\n *\n * @param {string} path - The path to the current key.\n * @param {string} key - The key of the current object being iterated over.\n * @param {string} dots - If true, the key will be rendered with dots instead of brackets.\n *\n * @returns {string} The path to the current key.\n */\nfunction renderKey(path, key, dots) {\n if (!path) return key;\n return path.concat(key).map(function each(token, i) {\n // eslint-disable-next-line no-param-reassign\n token = removeBrackets(token);\n return !dots && i ? '[' + token + ']' : token;\n }).join(dots ? '.' : '');\n}\n\n/**\n * If the array is an array and none of its elements are visitable, then it's a flat array.\n *\n * @param {Array} arr - The array to check\n *\n * @returns {boolean}\n */\nfunction isFlatArray(arr) {\n return utils.isArray(arr) && !arr.some(isVisitable);\n}\n\nconst predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {\n return /^is[A-Z]/.test(prop);\n});\n\n/**\n * Convert a data object to FormData\n *\n * @param {Object} obj\n * @param {?Object} [formData]\n * @param {?Object} [options]\n * @param {Function} [options.visitor]\n * @param {Boolean} [options.metaTokens = true]\n * @param {Boolean} [options.dots = false]\n * @param {?Boolean} [options.indexes = false]\n *\n * @returns {Object}\n **/\n\n/**\n * It converts an object into a FormData object\n *\n * @param {Object} obj - The object to convert to form data.\n * @param {string} formData - The FormData object to append to.\n * @param {Object} options\n *\n * @returns\n */\nfunction toFormData(obj, formData, options) {\n if (!utils.isObject(obj)) {\n throw new TypeError('target must be an object');\n }\n\n // eslint-disable-next-line no-param-reassign\n formData = formData || new (PlatformFormData || FormData)();\n\n // eslint-disable-next-line no-param-reassign\n options = utils.toFlatObject(options, {\n metaTokens: true,\n dots: false,\n indexes: false\n }, false, function defined(option, source) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n return !utils.isUndefined(source[option]);\n });\n\n const metaTokens = options.metaTokens;\n // eslint-disable-next-line no-use-before-define\n const visitor = options.visitor || defaultVisitor;\n const dots = options.dots;\n const indexes = options.indexes;\n const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;\n const useBlob = _Blob && utils.isSpecCompliantForm(formData);\n\n if (!utils.isFunction(visitor)) {\n throw new TypeError('visitor must be a function');\n }\n\n function convertValue(value) {\n if (value === null) return '';\n\n if (utils.isDate(value)) {\n return value.toISOString();\n }\n\n if (!useBlob && utils.isBlob(value)) {\n throw new AxiosError('Blob is not supported. Use a Buffer instead.');\n }\n\n if (utils.isArrayBuffer(value) || utils.isTypedArray(value)) {\n return useBlob && typeof Blob === 'function' ? new Blob([value]) : Buffer.from(value);\n }\n\n return value;\n }\n\n /**\n * Default visitor.\n *\n * @param {*} value\n * @param {String|Number} key\n * @param {Array} path\n * @this {FormData}\n *\n * @returns {boolean} return true to visit the each prop of the value recursively\n */\n function defaultVisitor(value, key, path) {\n let arr = value;\n\n if (value && !path && typeof value === 'object') {\n if (utils.endsWith(key, '{}')) {\n // eslint-disable-next-line no-param-reassign\n key = metaTokens ? key : key.slice(0, -2);\n // eslint-disable-next-line no-param-reassign\n value = JSON.stringify(value);\n } else if (\n (utils.isArray(value) && isFlatArray(value)) ||\n ((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))\n )) {\n // eslint-disable-next-line no-param-reassign\n key = removeBrackets(key);\n\n arr.forEach(function each(el, index) {\n !(utils.isUndefined(el) || el === null) && formData.append(\n // eslint-disable-next-line no-nested-ternary\n indexes === true ? renderKey([key], index, dots) : (indexes === null ? key : key + '[]'),\n convertValue(el)\n );\n });\n return false;\n }\n }\n\n if (isVisitable(value)) {\n return true;\n }\n\n formData.append(renderKey(path, key, dots), convertValue(value));\n\n return false;\n }\n\n const stack = [];\n\n const exposedHelpers = Object.assign(predicates, {\n defaultVisitor,\n convertValue,\n isVisitable\n });\n\n function build(value, path) {\n if (utils.isUndefined(value)) return;\n\n if (stack.indexOf(value) !== -1) {\n throw Error('Circular reference detected in ' + path.join('.'));\n }\n\n stack.push(value);\n\n utils.forEach(value, function each(el, key) {\n const result = !(utils.isUndefined(el) || el === null) && visitor.call(\n formData, el, utils.isString(key) ? key.trim() : key, path, exposedHelpers\n );\n\n if (result === true) {\n build(el, path ? path.concat(key) : [key]);\n }\n });\n\n stack.pop();\n }\n\n if (!utils.isObject(obj)) {\n throw new TypeError('data must be an object');\n }\n\n build(obj);\n\n return formData;\n}\n\nexport default toFormData;\n","'use strict';\n\nimport toFormData from './toFormData.js';\n\n/**\n * It encodes a string by replacing all characters that are not in the unreserved set with\n * their percent-encoded equivalents\n *\n * @param {string} str - The string to encode.\n *\n * @returns {string} The encoded string.\n */\nfunction encode(str) {\n const charMap = {\n '!': '%21',\n \"'\": '%27',\n '(': '%28',\n ')': '%29',\n '~': '%7E',\n '%20': '+',\n '%00': '\\x00'\n };\n return encodeURIComponent(str).replace(/[!'()~]|%20|%00/g, function replacer(match) {\n return charMap[match];\n });\n}\n\n/**\n * It takes a params object and converts it to a FormData object\n *\n * @param {Object} params - The parameters to be converted to a FormData object.\n * @param {Object} options - The options object passed to the Axios constructor.\n *\n * @returns {void}\n */\nfunction AxiosURLSearchParams(params, options) {\n this._pairs = [];\n\n params && toFormData(params, this, options);\n}\n\nconst prototype = AxiosURLSearchParams.prototype;\n\nprototype.append = function append(name, value) {\n this._pairs.push([name, value]);\n};\n\nprototype.toString = function toString(encoder) {\n const _encode = encoder ? function(value) {\n return encoder.call(this, value, encode);\n } : encode;\n\n return this._pairs.map(function each(pair) {\n return _encode(pair[0]) + '=' + _encode(pair[1]);\n }, '').join('&');\n};\n\nexport default AxiosURLSearchParams;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosURLSearchParams from '../helpers/AxiosURLSearchParams.js';\n\n/**\n * It replaces all instances of the characters `:`, `$`, `,`, `+`, `[`, and `]` with their\n * URI encoded counterparts\n *\n * @param {string} val The value to be encoded.\n *\n * @returns {string} The encoded value.\n */\nfunction encode(val) {\n return encodeURIComponent(val).\n replace(/%3A/gi, ':').\n replace(/%24/g, '$').\n replace(/%2C/gi, ',').\n replace(/%20/g, '+').\n replace(/%5B/gi, '[').\n replace(/%5D/gi, ']');\n}\n\n/**\n * Build a URL by appending params to the end\n *\n * @param {string} url The base of the url (e.g., http://www.google.com)\n * @param {object} [params] The params to be appended\n * @param {?(object|Function)} options\n *\n * @returns {string} The formatted url\n */\nexport default function buildURL(url, params, options) {\n /*eslint no-param-reassign:0*/\n if (!params) {\n return url;\n }\n \n const _encode = options && options.encode || encode;\n\n if (utils.isFunction(options)) {\n options = {\n serialize: options\n };\n } \n\n const serializeFn = options && options.serialize;\n\n let serializedParams;\n\n if (serializeFn) {\n serializedParams = serializeFn(params, options);\n } else {\n serializedParams = utils.isURLSearchParams(params) ?\n params.toString() :\n new AxiosURLSearchParams(params, options).toString(_encode);\n }\n\n if (serializedParams) {\n const hashmarkIndex = url.indexOf(\"#\");\n\n if (hashmarkIndex !== -1) {\n url = url.slice(0, hashmarkIndex);\n }\n url += (url.indexOf('?') === -1 ? '?' : '&') + serializedParams;\n }\n\n return url;\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\nclass InterceptorManager {\n constructor() {\n this.handlers = [];\n }\n\n /**\n * Add a new interceptor to the stack\n *\n * @param {Function} fulfilled The function to handle `then` for a `Promise`\n * @param {Function} rejected The function to handle `reject` for a `Promise`\n *\n * @return {Number} An ID used to remove interceptor later\n */\n use(fulfilled, rejected, options) {\n this.handlers.push({\n fulfilled,\n rejected,\n synchronous: options ? options.synchronous : false,\n runWhen: options ? options.runWhen : null\n });\n return this.handlers.length - 1;\n }\n\n /**\n * Remove an interceptor from the stack\n *\n * @param {Number} id The ID that was returned by `use`\n *\n * @returns {Boolean} `true` if the interceptor was removed, `false` otherwise\n */\n eject(id) {\n if (this.handlers[id]) {\n this.handlers[id] = null;\n }\n }\n\n /**\n * Clear all interceptors from the stack\n *\n * @returns {void}\n */\n clear() {\n if (this.handlers) {\n this.handlers = [];\n }\n }\n\n /**\n * Iterate over all the registered interceptors\n *\n * This method is particularly useful for skipping over any\n * interceptors that may have become `null` calling `eject`.\n *\n * @param {Function} fn The function to call for each interceptor\n *\n * @returns {void}\n */\n forEach(fn) {\n utils.forEach(this.handlers, function forEachHandler(h) {\n if (h !== null) {\n fn(h);\n }\n });\n }\n}\n\nexport default InterceptorManager;\n","'use strict';\n\nexport default {\n silentJSONParsing: true,\n forcedJSONParsing: true,\n clarifyTimeoutError: false\n};\n","'use strict';\n\nimport AxiosURLSearchParams from '../../../helpers/AxiosURLSearchParams.js';\nexport default typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;\n","'use strict';\n\nexport default typeof FormData !== 'undefined' ? FormData : null;\n","'use strict'\n\nexport default typeof Blob !== 'undefined' ? Blob : null\n","import URLSearchParams from './classes/URLSearchParams.js'\nimport FormData from './classes/FormData.js'\nimport Blob from './classes/Blob.js'\n\nexport default {\n isBrowser: true,\n classes: {\n URLSearchParams,\n FormData,\n Blob\n },\n protocols: ['http', 'https', 'file', 'blob', 'url', 'data']\n};\n","const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';\n\nconst _navigator = typeof navigator === 'object' && navigator || undefined;\n\n/**\n * Determine if we're running in a standard browser environment\n *\n * This allows axios to run in a web worker, and react-native.\n * Both environments support XMLHttpRequest, but not fully standard globals.\n *\n * web workers:\n * typeof window -> undefined\n * typeof document -> undefined\n *\n * react-native:\n * navigator.product -> 'ReactNative'\n * nativescript\n * navigator.product -> 'NativeScript' or 'NS'\n *\n * @returns {boolean}\n */\nconst hasStandardBrowserEnv = hasBrowserEnv &&\n (!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);\n\n/**\n * Determine if we're running in a standard browser webWorker environment\n *\n * Although the `isStandardBrowserEnv` method indicates that\n * `allows axios to run in a web worker`, the WebWorker will still be\n * filtered out due to its judgment standard\n * `typeof window !== 'undefined' && typeof document !== 'undefined'`.\n * This leads to a problem when axios post `FormData` in webWorker\n */\nconst hasStandardBrowserWebWorkerEnv = (() => {\n return (\n typeof WorkerGlobalScope !== 'undefined' &&\n // eslint-disable-next-line no-undef\n self instanceof WorkerGlobalScope &&\n typeof self.importScripts === 'function'\n );\n})();\n\nconst origin = hasBrowserEnv && window.location.href || 'http://localhost';\n\nexport {\n hasBrowserEnv,\n hasStandardBrowserWebWorkerEnv,\n hasStandardBrowserEnv,\n _navigator as navigator,\n origin\n}\n","import platform from './node/index.js';\nimport * as utils from './common/utils.js';\n\nexport default {\n ...utils,\n ...platform\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport toFormData from './toFormData.js';\nimport platform from '../platform/index.js';\n\nexport default function toURLEncodedForm(data, options) {\n return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({\n visitor: function(value, key, path, helpers) {\n if (platform.isNode && utils.isBuffer(value)) {\n this.append(key, value.toString('base64'));\n return false;\n }\n\n return helpers.defaultVisitor.apply(this, arguments);\n }\n }, options));\n}\n","'use strict';\n\nimport utils from '../utils.js';\n\n/**\n * It takes a string like `foo[x][y][z]` and returns an array like `['foo', 'x', 'y', 'z']\n *\n * @param {string} name - The name of the property to get.\n *\n * @returns An array of strings.\n */\nfunction parsePropPath(name) {\n // foo[x][y][z]\n // foo.x.y.z\n // foo-x-y-z\n // foo x y z\n return utils.matchAll(/\\w+|\\[(\\w*)]/g, name).map(match => {\n return match[0] === '[]' ? '' : match[1] || match[0];\n });\n}\n\n/**\n * Convert an array to an object.\n *\n * @param {Array} arr - The array to convert to an object.\n *\n * @returns An object with the same keys and values as the array.\n */\nfunction arrayToObject(arr) {\n const obj = {};\n const keys = Object.keys(arr);\n let i;\n const len = keys.length;\n let key;\n for (i = 0; i < len; i++) {\n key = keys[i];\n obj[key] = arr[key];\n }\n return obj;\n}\n\n/**\n * It takes a FormData object and returns a JavaScript object\n *\n * @param {string} formData The FormData object to convert to JSON.\n *\n * @returns {Object | null} The converted object.\n */\nfunction formDataToJSON(formData) {\n function buildPath(path, value, target, index) {\n let name = path[index++];\n\n if (name === '__proto__') return true;\n\n const isNumericKey = Number.isFinite(+name);\n const isLast = index >= path.length;\n name = !name && utils.isArray(target) ? target.length : name;\n\n if (isLast) {\n if (utils.hasOwnProp(target, name)) {\n target[name] = [target[name], value];\n } else {\n target[name] = value;\n }\n\n return !isNumericKey;\n }\n\n if (!target[name] || !utils.isObject(target[name])) {\n target[name] = [];\n }\n\n const result = buildPath(path, value, target[name], index);\n\n if (result && utils.isArray(target[name])) {\n target[name] = arrayToObject(target[name]);\n }\n\n return !isNumericKey;\n }\n\n if (utils.isFormData(formData) && utils.isFunction(formData.entries)) {\n const obj = {};\n\n utils.forEachEntry(formData, (name, value) => {\n buildPath(parsePropPath(name), value, obj, 0);\n });\n\n return obj;\n }\n\n return null;\n}\n\nexport default formDataToJSON;\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosError from '../core/AxiosError.js';\nimport transitionalDefaults from './transitional.js';\nimport toFormData from '../helpers/toFormData.js';\nimport toURLEncodedForm from '../helpers/toURLEncodedForm.js';\nimport platform from '../platform/index.js';\nimport formDataToJSON from '../helpers/formDataToJSON.js';\n\n/**\n * It takes a string, tries to parse it, and if it fails, it returns the stringified version\n * of the input\n *\n * @param {any} rawValue - The value to be stringified.\n * @param {Function} parser - A function that parses a string into a JavaScript object.\n * @param {Function} encoder - A function that takes a value and returns a string.\n *\n * @returns {string} A stringified version of the rawValue.\n */\nfunction stringifySafely(rawValue, parser, encoder) {\n if (utils.isString(rawValue)) {\n try {\n (parser || JSON.parse)(rawValue);\n return utils.trim(rawValue);\n } catch (e) {\n if (e.name !== 'SyntaxError') {\n throw e;\n }\n }\n }\n\n return (encoder || JSON.stringify)(rawValue);\n}\n\nconst defaults = {\n\n transitional: transitionalDefaults,\n\n adapter: ['xhr', 'http', 'fetch'],\n\n transformRequest: [function transformRequest(data, headers) {\n const contentType = headers.getContentType() || '';\n const hasJSONContentType = contentType.indexOf('application/json') > -1;\n const isObjectPayload = utils.isObject(data);\n\n if (isObjectPayload && utils.isHTMLForm(data)) {\n data = new FormData(data);\n }\n\n const isFormData = utils.isFormData(data);\n\n if (isFormData) {\n return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;\n }\n\n if (utils.isArrayBuffer(data) ||\n utils.isBuffer(data) ||\n utils.isStream(data) ||\n utils.isFile(data) ||\n utils.isBlob(data) ||\n utils.isReadableStream(data)\n ) {\n return data;\n }\n if (utils.isArrayBufferView(data)) {\n return data.buffer;\n }\n if (utils.isURLSearchParams(data)) {\n headers.setContentType('application/x-www-form-urlencoded;charset=utf-8', false);\n return data.toString();\n }\n\n let isFileList;\n\n if (isObjectPayload) {\n if (contentType.indexOf('application/x-www-form-urlencoded') > -1) {\n return toURLEncodedForm(data, this.formSerializer).toString();\n }\n\n if ((isFileList = utils.isFileList(data)) || contentType.indexOf('multipart/form-data') > -1) {\n const _FormData = this.env && this.env.FormData;\n\n return toFormData(\n isFileList ? {'files[]': data} : data,\n _FormData && new _FormData(),\n this.formSerializer\n );\n }\n }\n\n if (isObjectPayload || hasJSONContentType ) {\n headers.setContentType('application/json', false);\n return stringifySafely(data);\n }\n\n return data;\n }],\n\n transformResponse: [function transformResponse(data) {\n const transitional = this.transitional || defaults.transitional;\n const forcedJSONParsing = transitional && transitional.forcedJSONParsing;\n const JSONRequested = this.responseType === 'json';\n\n if (utils.isResponse(data) || utils.isReadableStream(data)) {\n return data;\n }\n\n if (data && utils.isString(data) && ((forcedJSONParsing && !this.responseType) || JSONRequested)) {\n const silentJSONParsing = transitional && transitional.silentJSONParsing;\n const strictJSONParsing = !silentJSONParsing && JSONRequested;\n\n try {\n return JSON.parse(data);\n } catch (e) {\n if (strictJSONParsing) {\n if (e.name === 'SyntaxError') {\n throw AxiosError.from(e, AxiosError.ERR_BAD_RESPONSE, this, null, this.response);\n }\n throw e;\n }\n }\n }\n\n return data;\n }],\n\n /**\n * A timeout in milliseconds to abort a request. If set to 0 (default) a\n * timeout is not created.\n */\n timeout: 0,\n\n xsrfCookieName: 'XSRF-TOKEN',\n xsrfHeaderName: 'X-XSRF-TOKEN',\n\n maxContentLength: -1,\n maxBodyLength: -1,\n\n env: {\n FormData: platform.classes.FormData,\n Blob: platform.classes.Blob\n },\n\n validateStatus: function validateStatus(status) {\n return status >= 200 && status < 300;\n },\n\n headers: {\n common: {\n 'Accept': 'application/json, text/plain, */*',\n 'Content-Type': undefined\n }\n }\n};\n\nutils.forEach(['delete', 'get', 'head', 'post', 'put', 'patch'], (method) => {\n defaults.headers[method] = {};\n});\n\nexport default defaults;\n","'use strict';\n\nimport utils from './../utils.js';\n\n// RawAxiosHeaders whose duplicates are ignored by node\n// c.f. https://nodejs.org/api/http.html#http_message_headers\nconst ignoreDuplicateOf = utils.toObjectSet([\n 'age', 'authorization', 'content-length', 'content-type', 'etag',\n 'expires', 'from', 'host', 'if-modified-since', 'if-unmodified-since',\n 'last-modified', 'location', 'max-forwards', 'proxy-authorization',\n 'referer', 'retry-after', 'user-agent'\n]);\n\n/**\n * Parse headers into an object\n *\n * ```\n * Date: Wed, 27 Aug 2014 08:58:49 GMT\n * Content-Type: application/json\n * Connection: keep-alive\n * Transfer-Encoding: chunked\n * ```\n *\n * @param {String} rawHeaders Headers needing to be parsed\n *\n * @returns {Object} Headers parsed into an object\n */\nexport default rawHeaders => {\n const parsed = {};\n let key;\n let val;\n let i;\n\n rawHeaders && rawHeaders.split('\\n').forEach(function parser(line) {\n i = line.indexOf(':');\n key = line.substring(0, i).trim().toLowerCase();\n val = line.substring(i + 1).trim();\n\n if (!key || (parsed[key] && ignoreDuplicateOf[key])) {\n return;\n }\n\n if (key === 'set-cookie') {\n if (parsed[key]) {\n parsed[key].push(val);\n } else {\n parsed[key] = [val];\n }\n } else {\n parsed[key] = parsed[key] ? parsed[key] + ', ' + val : val;\n }\n });\n\n return parsed;\n};\n","'use strict';\n\nimport utils from '../utils.js';\nimport parseHeaders from '../helpers/parseHeaders.js';\n\nconst $internals = Symbol('internals');\n\nfunction normalizeHeader(header) {\n return header && String(header).trim().toLowerCase();\n}\n\nfunction normalizeValue(value) {\n if (value === false || value == null) {\n return value;\n }\n\n return utils.isArray(value) ? value.map(normalizeValue) : String(value);\n}\n\nfunction parseTokens(str) {\n const tokens = Object.create(null);\n const tokensRE = /([^\\s,;=]+)\\s*(?:=\\s*([^,;]+))?/g;\n let match;\n\n while ((match = tokensRE.exec(str))) {\n tokens[match[1]] = match[2];\n }\n\n return tokens;\n}\n\nconst isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());\n\nfunction matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {\n if (utils.isFunction(filter)) {\n return filter.call(this, value, header);\n }\n\n if (isHeaderNameFilter) {\n value = header;\n }\n\n if (!utils.isString(value)) return;\n\n if (utils.isString(filter)) {\n return value.indexOf(filter) !== -1;\n }\n\n if (utils.isRegExp(filter)) {\n return filter.test(value);\n }\n}\n\nfunction formatHeader(header) {\n return header.trim()\n .toLowerCase().replace(/([a-z\\d])(\\w*)/g, (w, char, str) => {\n return char.toUpperCase() + str;\n });\n}\n\nfunction buildAccessors(obj, header) {\n const accessorName = utils.toCamelCase(' ' + header);\n\n ['get', 'set', 'has'].forEach(methodName => {\n Object.defineProperty(obj, methodName + accessorName, {\n value: function(arg1, arg2, arg3) {\n return this[methodName].call(this, header, arg1, arg2, arg3);\n },\n configurable: true\n });\n });\n}\n\nclass AxiosHeaders {\n constructor(headers) {\n headers && this.set(headers);\n }\n\n set(header, valueOrRewrite, rewrite) {\n const self = this;\n\n function setHeader(_value, _header, _rewrite) {\n const lHeader = normalizeHeader(_header);\n\n if (!lHeader) {\n throw new Error('header name must be a non-empty string');\n }\n\n const key = utils.findKey(self, lHeader);\n\n if(!key || self[key] === undefined || _rewrite === true || (_rewrite === undefined && self[key] !== false)) {\n self[key || _header] = normalizeValue(_value);\n }\n }\n\n const setHeaders = (headers, _rewrite) =>\n utils.forEach(headers, (_value, _header) => setHeader(_value, _header, _rewrite));\n\n if (utils.isPlainObject(header) || header instanceof this.constructor) {\n setHeaders(header, valueOrRewrite)\n } else if(utils.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {\n setHeaders(parseHeaders(header), valueOrRewrite);\n } else if (utils.isHeaders(header)) {\n for (const [key, value] of header.entries()) {\n setHeader(value, key, rewrite);\n }\n } else {\n header != null && setHeader(valueOrRewrite, header, rewrite);\n }\n\n return this;\n }\n\n get(header, parser) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n if (key) {\n const value = this[key];\n\n if (!parser) {\n return value;\n }\n\n if (parser === true) {\n return parseTokens(value);\n }\n\n if (utils.isFunction(parser)) {\n return parser.call(this, value, key);\n }\n\n if (utils.isRegExp(parser)) {\n return parser.exec(value);\n }\n\n throw new TypeError('parser must be boolean|regexp|function');\n }\n }\n }\n\n has(header, matcher) {\n header = normalizeHeader(header);\n\n if (header) {\n const key = utils.findKey(this, header);\n\n return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));\n }\n\n return false;\n }\n\n delete(header, matcher) {\n const self = this;\n let deleted = false;\n\n function deleteHeader(_header) {\n _header = normalizeHeader(_header);\n\n if (_header) {\n const key = utils.findKey(self, _header);\n\n if (key && (!matcher || matchHeaderValue(self, self[key], key, matcher))) {\n delete self[key];\n\n deleted = true;\n }\n }\n }\n\n if (utils.isArray(header)) {\n header.forEach(deleteHeader);\n } else {\n deleteHeader(header);\n }\n\n return deleted;\n }\n\n clear(matcher) {\n const keys = Object.keys(this);\n let i = keys.length;\n let deleted = false;\n\n while (i--) {\n const key = keys[i];\n if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {\n delete this[key];\n deleted = true;\n }\n }\n\n return deleted;\n }\n\n normalize(format) {\n const self = this;\n const headers = {};\n\n utils.forEach(this, (value, header) => {\n const key = utils.findKey(headers, header);\n\n if (key) {\n self[key] = normalizeValue(value);\n delete self[header];\n return;\n }\n\n const normalized = format ? formatHeader(header) : String(header).trim();\n\n if (normalized !== header) {\n delete self[header];\n }\n\n self[normalized] = normalizeValue(value);\n\n headers[normalized] = true;\n });\n\n return this;\n }\n\n concat(...targets) {\n return this.constructor.concat(this, ...targets);\n }\n\n toJSON(asStrings) {\n const obj = Object.create(null);\n\n utils.forEach(this, (value, header) => {\n value != null && value !== false && (obj[header] = asStrings && utils.isArray(value) ? value.join(', ') : value);\n });\n\n return obj;\n }\n\n [Symbol.iterator]() {\n return Object.entries(this.toJSON())[Symbol.iterator]();\n }\n\n toString() {\n return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\\n');\n }\n\n get [Symbol.toStringTag]() {\n return 'AxiosHeaders';\n }\n\n static from(thing) {\n return thing instanceof this ? thing : new this(thing);\n }\n\n static concat(first, ...targets) {\n const computed = new this(first);\n\n targets.forEach((target) => computed.set(target));\n\n return computed;\n }\n\n static accessor(header) {\n const internals = this[$internals] = (this[$internals] = {\n accessors: {}\n });\n\n const accessors = internals.accessors;\n const prototype = this.prototype;\n\n function defineAccessor(_header) {\n const lHeader = normalizeHeader(_header);\n\n if (!accessors[lHeader]) {\n buildAccessors(prototype, _header);\n accessors[lHeader] = true;\n }\n }\n\n utils.isArray(header) ? header.forEach(defineAccessor) : defineAccessor(header);\n\n return this;\n }\n}\n\nAxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);\n\n// reserved names hotfix\nutils.reduceDescriptors(AxiosHeaders.prototype, ({value}, key) => {\n let mapped = key[0].toUpperCase() + key.slice(1); // map `set` => `Set`\n return {\n get: () => value,\n set(headerValue) {\n this[mapped] = headerValue;\n }\n }\n});\n\nutils.freezeMethods(AxiosHeaders);\n\nexport default AxiosHeaders;\n","'use strict';\n\nimport utils from './../utils.js';\nimport defaults from '../defaults/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\n\n/**\n * Transform the data for a request or a response\n *\n * @param {Array|Function} fns A single function or Array of functions\n * @param {?Object} response The response object\n *\n * @returns {*} The resulting transformed data\n */\nexport default function transformData(fns, response) {\n const config = this || defaults;\n const context = response || config;\n const headers = AxiosHeaders.from(context.headers);\n let data = context.data;\n\n utils.forEach(fns, function transform(fn) {\n data = fn.call(config, data, headers.normalize(), response ? response.status : undefined);\n });\n\n headers.normalize();\n\n return data;\n}\n","'use strict';\n\nexport default function isCancel(value) {\n return !!(value && value.__CANCEL__);\n}\n","'use strict';\n\nimport AxiosError from '../core/AxiosError.js';\nimport utils from '../utils.js';\n\n/**\n * A `CanceledError` is an object that is thrown when an operation is canceled.\n *\n * @param {string=} message The message.\n * @param {Object=} config The config.\n * @param {Object=} request The request.\n *\n * @returns {CanceledError} The created error.\n */\nfunction CanceledError(message, config, request) {\n // eslint-disable-next-line no-eq-null,eqeqeq\n AxiosError.call(this, message == null ? 'canceled' : message, AxiosError.ERR_CANCELED, config, request);\n this.name = 'CanceledError';\n}\n\nutils.inherits(CanceledError, AxiosError, {\n __CANCEL__: true\n});\n\nexport default CanceledError;\n","'use strict';\n\nimport AxiosError from './AxiosError.js';\n\n/**\n * Resolve or reject a Promise based on response status.\n *\n * @param {Function} resolve A function that resolves the promise.\n * @param {Function} reject A function that rejects the promise.\n * @param {object} response The response.\n *\n * @returns {object} The response.\n */\nexport default function settle(resolve, reject, response) {\n const validateStatus = response.config.validateStatus;\n if (!response.status || !validateStatus || validateStatus(response.status)) {\n resolve(response);\n } else {\n reject(new AxiosError(\n 'Request failed with status code ' + response.status,\n [AxiosError.ERR_BAD_REQUEST, AxiosError.ERR_BAD_RESPONSE][Math.floor(response.status / 100) - 4],\n response.config,\n response.request,\n response\n ));\n }\n}\n","'use strict';\n\nexport default function parseProtocol(url) {\n const match = /^([-+\\w]{1,25})(:?\\/\\/|:)/.exec(url);\n return match && match[1] || '';\n}\n","'use strict';\n\n/**\n * Calculate data maxRate\n * @param {Number} [samplesCount= 10]\n * @param {Number} [min= 1000]\n * @returns {Function}\n */\nfunction speedometer(samplesCount, min) {\n samplesCount = samplesCount || 10;\n const bytes = new Array(samplesCount);\n const timestamps = new Array(samplesCount);\n let head = 0;\n let tail = 0;\n let firstSampleTS;\n\n min = min !== undefined ? min : 1000;\n\n return function push(chunkLength) {\n const now = Date.now();\n\n const startedAt = timestamps[tail];\n\n if (!firstSampleTS) {\n firstSampleTS = now;\n }\n\n bytes[head] = chunkLength;\n timestamps[head] = now;\n\n let i = tail;\n let bytesCount = 0;\n\n while (i !== head) {\n bytesCount += bytes[i++];\n i = i % samplesCount;\n }\n\n head = (head + 1) % samplesCount;\n\n if (head === tail) {\n tail = (tail + 1) % samplesCount;\n }\n\n if (now - firstSampleTS < min) {\n return;\n }\n\n const passed = startedAt && now - startedAt;\n\n return passed ? Math.round(bytesCount * 1000 / passed) : undefined;\n };\n}\n\nexport default speedometer;\n","/**\n * Throttle decorator\n * @param {Function} fn\n * @param {Number} freq\n * @return {Function}\n */\nfunction throttle(fn, freq) {\n let timestamp = 0;\n let threshold = 1000 / freq;\n let lastArgs;\n let timer;\n\n const invoke = (args, now = Date.now()) => {\n timestamp = now;\n lastArgs = null;\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n fn.apply(null, args);\n }\n\n const throttled = (...args) => {\n const now = Date.now();\n const passed = now - timestamp;\n if ( passed >= threshold) {\n invoke(args, now);\n } else {\n lastArgs = args;\n if (!timer) {\n timer = setTimeout(() => {\n timer = null;\n invoke(lastArgs)\n }, threshold - passed);\n }\n }\n }\n\n const flush = () => lastArgs && invoke(lastArgs);\n\n return [throttled, flush];\n}\n\nexport default throttle;\n","import speedometer from \"./speedometer.js\";\nimport throttle from \"./throttle.js\";\nimport utils from \"../utils.js\";\n\nexport const progressEventReducer = (listener, isDownloadStream, freq = 3) => {\n let bytesNotified = 0;\n const _speedometer = speedometer(50, 250);\n\n return throttle(e => {\n const loaded = e.loaded;\n const total = e.lengthComputable ? e.total : undefined;\n const progressBytes = loaded - bytesNotified;\n const rate = _speedometer(progressBytes);\n const inRange = loaded <= total;\n\n bytesNotified = loaded;\n\n const data = {\n loaded,\n total,\n progress: total ? (loaded / total) : undefined,\n bytes: progressBytes,\n rate: rate ? rate : undefined,\n estimated: rate && total && inRange ? (total - loaded) / rate : undefined,\n event: e,\n lengthComputable: total != null,\n [isDownloadStream ? 'download' : 'upload']: true\n };\n\n listener(data);\n }, freq);\n}\n\nexport const progressEventDecorator = (total, throttled) => {\n const lengthComputable = total != null;\n\n return [(loaded) => throttled[0]({\n lengthComputable,\n total,\n loaded\n }), throttled[1]];\n}\n\nexport const asyncDecorator = (fn) => (...args) => utils.asap(() => fn(...args));\n","import platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ? ((origin, isMSIE) => (url) => {\n url = new URL(url, platform.origin);\n\n return (\n origin.protocol === url.protocol &&\n origin.host === url.host &&\n (isMSIE || origin.port === url.port)\n );\n})(\n new URL(platform.origin),\n platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent)\n) : () => true;\n","import utils from './../utils.js';\nimport platform from '../platform/index.js';\n\nexport default platform.hasStandardBrowserEnv ?\n\n // Standard browser envs support document.cookie\n {\n write(name, value, expires, path, domain, secure) {\n const cookie = [name + '=' + encodeURIComponent(value)];\n\n utils.isNumber(expires) && cookie.push('expires=' + new Date(expires).toGMTString());\n\n utils.isString(path) && cookie.push('path=' + path);\n\n utils.isString(domain) && cookie.push('domain=' + domain);\n\n secure === true && cookie.push('secure');\n\n document.cookie = cookie.join('; ');\n },\n\n read(name) {\n const match = document.cookie.match(new RegExp('(^|;\\\\s*)(' + name + ')=([^;]*)'));\n return (match ? decodeURIComponent(match[3]) : null);\n },\n\n remove(name) {\n this.write(name, '', Date.now() - 86400000);\n }\n }\n\n :\n\n // Non-standard browser env (web workers, react-native) lack needed support.\n {\n write() {},\n read() {\n return null;\n },\n remove() {}\n };\n\n","'use strict';\n\n/**\n * Determines whether the specified URL is absolute\n *\n * @param {string} url The URL to test\n *\n * @returns {boolean} True if the specified URL is absolute, otherwise false\n */\nexport default function isAbsoluteURL(url) {\n // A URL is considered absolute if it begins with \"://\" or \"//\" (protocol-relative URL).\n // RFC 3986 defines scheme name as a sequence of characters beginning with a letter and followed\n // by any combination of letters, digits, plus, period, or hyphen.\n return /^([a-z][a-z\\d+\\-.]*:)?\\/\\//i.test(url);\n}\n","'use strict';\n\n/**\n * Creates a new URL by combining the specified URLs\n *\n * @param {string} baseURL The base URL\n * @param {string} relativeURL The relative URL\n *\n * @returns {string} The combined URL\n */\nexport default function combineURLs(baseURL, relativeURL) {\n return relativeURL\n ? baseURL.replace(/\\/?\\/$/, '') + '/' + relativeURL.replace(/^\\/+/, '')\n : baseURL;\n}\n","'use strict';\n\nimport isAbsoluteURL from '../helpers/isAbsoluteURL.js';\nimport combineURLs from '../helpers/combineURLs.js';\n\n/**\n * Creates a new URL by combining the baseURL with the requestedURL,\n * only when the requestedURL is not already an absolute URL.\n * If the requestURL is absolute, this function returns the requestedURL untouched.\n *\n * @param {string} baseURL The base URL\n * @param {string} requestedURL Absolute or relative URL to combine\n *\n * @returns {string} The combined full path\n */\nexport default function buildFullPath(baseURL, requestedURL) {\n if (baseURL && !isAbsoluteURL(requestedURL)) {\n return combineURLs(baseURL, requestedURL);\n }\n return requestedURL;\n}\n","'use strict';\n\nimport utils from '../utils.js';\nimport AxiosHeaders from \"./AxiosHeaders.js\";\n\nconst headersToObject = (thing) => thing instanceof AxiosHeaders ? { ...thing } : thing;\n\n/**\n * Config-specific merge-function which creates a new config-object\n * by merging two configuration objects together.\n *\n * @param {Object} config1\n * @param {Object} config2\n *\n * @returns {Object} New object resulting from merging config2 to config1\n */\nexport default function mergeConfig(config1, config2) {\n // eslint-disable-next-line no-param-reassign\n config2 = config2 || {};\n const config = {};\n\n function getMergedValue(target, source, prop, caseless) {\n if (utils.isPlainObject(target) && utils.isPlainObject(source)) {\n return utils.merge.call({caseless}, target, source);\n } else if (utils.isPlainObject(source)) {\n return utils.merge({}, source);\n } else if (utils.isArray(source)) {\n return source.slice();\n }\n return source;\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDeepProperties(a, b, prop , caseless) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(a, b, prop , caseless);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a, prop , caseless);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function valueFromConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function defaultToConfig2(a, b) {\n if (!utils.isUndefined(b)) {\n return getMergedValue(undefined, b);\n } else if (!utils.isUndefined(a)) {\n return getMergedValue(undefined, a);\n }\n }\n\n // eslint-disable-next-line consistent-return\n function mergeDirectKeys(a, b, prop) {\n if (prop in config2) {\n return getMergedValue(a, b);\n } else if (prop in config1) {\n return getMergedValue(undefined, a);\n }\n }\n\n const mergeMap = {\n url: valueFromConfig2,\n method: valueFromConfig2,\n data: valueFromConfig2,\n baseURL: defaultToConfig2,\n transformRequest: defaultToConfig2,\n transformResponse: defaultToConfig2,\n paramsSerializer: defaultToConfig2,\n timeout: defaultToConfig2,\n timeoutMessage: defaultToConfig2,\n withCredentials: defaultToConfig2,\n withXSRFToken: defaultToConfig2,\n adapter: defaultToConfig2,\n responseType: defaultToConfig2,\n xsrfCookieName: defaultToConfig2,\n xsrfHeaderName: defaultToConfig2,\n onUploadProgress: defaultToConfig2,\n onDownloadProgress: defaultToConfig2,\n decompress: defaultToConfig2,\n maxContentLength: defaultToConfig2,\n maxBodyLength: defaultToConfig2,\n beforeRedirect: defaultToConfig2,\n transport: defaultToConfig2,\n httpAgent: defaultToConfig2,\n httpsAgent: defaultToConfig2,\n cancelToken: defaultToConfig2,\n socketPath: defaultToConfig2,\n responseEncoding: defaultToConfig2,\n validateStatus: mergeDirectKeys,\n headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)\n };\n\n utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {\n const merge = mergeMap[prop] || mergeDeepProperties;\n const configValue = merge(config1[prop], config2[prop], prop);\n (utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);\n });\n\n return config;\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport isURLSameOrigin from \"./isURLSameOrigin.js\";\nimport cookies from \"./cookies.js\";\nimport buildFullPath from \"../core/buildFullPath.js\";\nimport mergeConfig from \"../core/mergeConfig.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport buildURL from \"./buildURL.js\";\n\nexport default (config) => {\n const newConfig = mergeConfig({}, config);\n\n let {data, withXSRFToken, xsrfHeaderName, xsrfCookieName, headers, auth} = newConfig;\n\n newConfig.headers = headers = AxiosHeaders.from(headers);\n\n newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);\n\n // HTTP basic authentication\n if (auth) {\n headers.set('Authorization', 'Basic ' +\n btoa((auth.username || '') + ':' + (auth.password ? unescape(encodeURIComponent(auth.password)) : ''))\n );\n }\n\n let contentType;\n\n if (utils.isFormData(data)) {\n if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {\n headers.setContentType(undefined); // Let the browser set it\n } else if ((contentType = headers.getContentType()) !== false) {\n // fix semicolon duplication issue for ReactNative FormData implementation\n const [type, ...tokens] = contentType ? contentType.split(';').map(token => token.trim()).filter(Boolean) : [];\n headers.setContentType([type || 'multipart/form-data', ...tokens].join('; '));\n }\n }\n\n // Add xsrf header\n // This is only done if running in a standard browser environment.\n // Specifically not if we're in a web worker, or react-native.\n\n if (platform.hasStandardBrowserEnv) {\n withXSRFToken && utils.isFunction(withXSRFToken) && (withXSRFToken = withXSRFToken(newConfig));\n\n if (withXSRFToken || (withXSRFToken !== false && isURLSameOrigin(newConfig.url))) {\n // Add xsrf header\n const xsrfValue = xsrfHeaderName && xsrfCookieName && cookies.read(xsrfCookieName);\n\n if (xsrfValue) {\n headers.set(xsrfHeaderName, xsrfValue);\n }\n }\n }\n\n return newConfig;\n}\n\n","import utils from './../utils.js';\nimport settle from './../core/settle.js';\nimport transitionalDefaults from '../defaults/transitional.js';\nimport AxiosError from '../core/AxiosError.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport parseProtocol from '../helpers/parseProtocol.js';\nimport platform from '../platform/index.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport {progressEventReducer} from '../helpers/progressEventReducer.js';\nimport resolveConfig from \"../helpers/resolveConfig.js\";\n\nconst isXHRAdapterSupported = typeof XMLHttpRequest !== 'undefined';\n\nexport default isXHRAdapterSupported && function (config) {\n return new Promise(function dispatchXhrRequest(resolve, reject) {\n const _config = resolveConfig(config);\n let requestData = _config.data;\n const requestHeaders = AxiosHeaders.from(_config.headers).normalize();\n let {responseType, onUploadProgress, onDownloadProgress} = _config;\n let onCanceled;\n let uploadThrottled, downloadThrottled;\n let flushUpload, flushDownload;\n\n function done() {\n flushUpload && flushUpload(); // flush events\n flushDownload && flushDownload(); // flush events\n\n _config.cancelToken && _config.cancelToken.unsubscribe(onCanceled);\n\n _config.signal && _config.signal.removeEventListener('abort', onCanceled);\n }\n\n let request = new XMLHttpRequest();\n\n request.open(_config.method.toUpperCase(), _config.url, true);\n\n // Set the request timeout in MS\n request.timeout = _config.timeout;\n\n function onloadend() {\n if (!request) {\n return;\n }\n // Prepare the response\n const responseHeaders = AxiosHeaders.from(\n 'getAllResponseHeaders' in request && request.getAllResponseHeaders()\n );\n const responseData = !responseType || responseType === 'text' || responseType === 'json' ?\n request.responseText : request.response;\n const response = {\n data: responseData,\n status: request.status,\n statusText: request.statusText,\n headers: responseHeaders,\n config,\n request\n };\n\n settle(function _resolve(value) {\n resolve(value);\n done();\n }, function _reject(err) {\n reject(err);\n done();\n }, response);\n\n // Clean up request\n request = null;\n }\n\n if ('onloadend' in request) {\n // Use onloadend if available\n request.onloadend = onloadend;\n } else {\n // Listen for ready state to emulate onloadend\n request.onreadystatechange = function handleLoad() {\n if (!request || request.readyState !== 4) {\n return;\n }\n\n // The request errored out and we didn't get a response, this will be\n // handled by onerror instead\n // With one exception: request that using file: protocol, most browsers\n // will return status as 0 even though it's a successful request\n if (request.status === 0 && !(request.responseURL && request.responseURL.indexOf('file:') === 0)) {\n return;\n }\n // readystate handler is calling before onerror or ontimeout handlers,\n // so we should call onloadend on the next 'tick'\n setTimeout(onloadend);\n };\n }\n\n // Handle browser request cancellation (as opposed to a manual cancellation)\n request.onabort = function handleAbort() {\n if (!request) {\n return;\n }\n\n reject(new AxiosError('Request aborted', AxiosError.ECONNABORTED, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle low level network errors\n request.onerror = function handleError() {\n // Real errors are hidden from us by the browser\n // onerror should only fire if it's a network error\n reject(new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request));\n\n // Clean up request\n request = null;\n };\n\n // Handle timeout\n request.ontimeout = function handleTimeout() {\n let timeoutErrorMessage = _config.timeout ? 'timeout of ' + _config.timeout + 'ms exceeded' : 'timeout exceeded';\n const transitional = _config.transitional || transitionalDefaults;\n if (_config.timeoutErrorMessage) {\n timeoutErrorMessage = _config.timeoutErrorMessage;\n }\n reject(new AxiosError(\n timeoutErrorMessage,\n transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED,\n config,\n request));\n\n // Clean up request\n request = null;\n };\n\n // Remove Content-Type if data is undefined\n requestData === undefined && requestHeaders.setContentType(null);\n\n // Add headers to the request\n if ('setRequestHeader' in request) {\n utils.forEach(requestHeaders.toJSON(), function setRequestHeader(val, key) {\n request.setRequestHeader(key, val);\n });\n }\n\n // Add withCredentials to request if needed\n if (!utils.isUndefined(_config.withCredentials)) {\n request.withCredentials = !!_config.withCredentials;\n }\n\n // Add responseType to request if needed\n if (responseType && responseType !== 'json') {\n request.responseType = _config.responseType;\n }\n\n // Handle progress if needed\n if (onDownloadProgress) {\n ([downloadThrottled, flushDownload] = progressEventReducer(onDownloadProgress, true));\n request.addEventListener('progress', downloadThrottled);\n }\n\n // Not all browsers support upload events\n if (onUploadProgress && request.upload) {\n ([uploadThrottled, flushUpload] = progressEventReducer(onUploadProgress));\n\n request.upload.addEventListener('progress', uploadThrottled);\n\n request.upload.addEventListener('loadend', flushUpload);\n }\n\n if (_config.cancelToken || _config.signal) {\n // Handle cancellation\n // eslint-disable-next-line func-names\n onCanceled = cancel => {\n if (!request) {\n return;\n }\n reject(!cancel || cancel.type ? new CanceledError(null, config, request) : cancel);\n request.abort();\n request = null;\n };\n\n _config.cancelToken && _config.cancelToken.subscribe(onCanceled);\n if (_config.signal) {\n _config.signal.aborted ? onCanceled() : _config.signal.addEventListener('abort', onCanceled);\n }\n }\n\n const protocol = parseProtocol(_config.url);\n\n if (protocol && platform.protocols.indexOf(protocol) === -1) {\n reject(new AxiosError('Unsupported protocol ' + protocol + ':', AxiosError.ERR_BAD_REQUEST, config));\n return;\n }\n\n\n // Send the request\n request.send(requestData || null);\n });\n}\n","import CanceledError from \"../cancel/CanceledError.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport utils from '../utils.js';\n\nconst composeSignals = (signals, timeout) => {\n const {length} = (signals = signals ? signals.filter(Boolean) : []);\n\n if (timeout || length) {\n let controller = new AbortController();\n\n let aborted;\n\n const onabort = function (reason) {\n if (!aborted) {\n aborted = true;\n unsubscribe();\n const err = reason instanceof Error ? reason : this.reason;\n controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));\n }\n }\n\n let timer = timeout && setTimeout(() => {\n timer = null;\n onabort(new AxiosError(`timeout ${timeout} of ms exceeded`, AxiosError.ETIMEDOUT))\n }, timeout)\n\n const unsubscribe = () => {\n if (signals) {\n timer && clearTimeout(timer);\n timer = null;\n signals.forEach(signal => {\n signal.unsubscribe ? signal.unsubscribe(onabort) : signal.removeEventListener('abort', onabort);\n });\n signals = null;\n }\n }\n\n signals.forEach((signal) => signal.addEventListener('abort', onabort));\n\n const {signal} = controller;\n\n signal.unsubscribe = () => utils.asap(unsubscribe);\n\n return signal;\n }\n}\n\nexport default composeSignals;\n","\nexport const streamChunk = function* (chunk, chunkSize) {\n let len = chunk.byteLength;\n\n if (!chunkSize || len < chunkSize) {\n yield chunk;\n return;\n }\n\n let pos = 0;\n let end;\n\n while (pos < len) {\n end = pos + chunkSize;\n yield chunk.slice(pos, end);\n pos = end;\n }\n}\n\nexport const readBytes = async function* (iterable, chunkSize) {\n for await (const chunk of readStream(iterable)) {\n yield* streamChunk(chunk, chunkSize);\n }\n}\n\nconst readStream = async function* (stream) {\n if (stream[Symbol.asyncIterator]) {\n yield* stream;\n return;\n }\n\n const reader = stream.getReader();\n try {\n for (;;) {\n const {done, value} = await reader.read();\n if (done) {\n break;\n }\n yield value;\n }\n } finally {\n await reader.cancel();\n }\n}\n\nexport const trackStream = (stream, chunkSize, onProgress, onFinish) => {\n const iterator = readBytes(stream, chunkSize);\n\n let bytes = 0;\n let done;\n let _onFinish = (e) => {\n if (!done) {\n done = true;\n onFinish && onFinish(e);\n }\n }\n\n return new ReadableStream({\n async pull(controller) {\n try {\n const {done, value} = await iterator.next();\n\n if (done) {\n _onFinish();\n controller.close();\n return;\n }\n\n let len = value.byteLength;\n if (onProgress) {\n let loadedBytes = bytes += len;\n onProgress(loadedBytes);\n }\n controller.enqueue(new Uint8Array(value));\n } catch (err) {\n _onFinish(err);\n throw err;\n }\n },\n cancel(reason) {\n _onFinish(reason);\n return iterator.return();\n }\n }, {\n highWaterMark: 2\n })\n}\n","import platform from \"../platform/index.js\";\nimport utils from \"../utils.js\";\nimport AxiosError from \"../core/AxiosError.js\";\nimport composeSignals from \"../helpers/composeSignals.js\";\nimport {trackStream} from \"../helpers/trackStream.js\";\nimport AxiosHeaders from \"../core/AxiosHeaders.js\";\nimport {progressEventReducer, progressEventDecorator, asyncDecorator} from \"../helpers/progressEventReducer.js\";\nimport resolveConfig from \"../helpers/resolveConfig.js\";\nimport settle from \"../core/settle.js\";\n\nconst isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';\nconst isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';\n\n// used only inside the fetch adapter\nconst encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?\n ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :\n async (str) => new Uint8Array(await new Response(str).arrayBuffer())\n);\n\nconst test = (fn, ...args) => {\n try {\n return !!fn(...args);\n } catch (e) {\n return false\n }\n}\n\nconst supportsRequestStream = isReadableStreamSupported && test(() => {\n let duplexAccessed = false;\n\n const hasContentType = new Request(platform.origin, {\n body: new ReadableStream(),\n method: 'POST',\n get duplex() {\n duplexAccessed = true;\n return 'half';\n },\n }).headers.has('Content-Type');\n\n return duplexAccessed && !hasContentType;\n});\n\nconst DEFAULT_CHUNK_SIZE = 64 * 1024;\n\nconst supportsResponseStream = isReadableStreamSupported &&\n test(() => utils.isReadableStream(new Response('').body));\n\n\nconst resolvers = {\n stream: supportsResponseStream && ((res) => res.body)\n};\n\nisFetchSupported && (((res) => {\n ['text', 'arrayBuffer', 'blob', 'formData', 'stream'].forEach(type => {\n !resolvers[type] && (resolvers[type] = utils.isFunction(res[type]) ? (res) => res[type]() :\n (_, config) => {\n throw new AxiosError(`Response type '${type}' is not supported`, AxiosError.ERR_NOT_SUPPORT, config);\n })\n });\n})(new Response));\n\nconst getBodyLength = async (body) => {\n if (body == null) {\n return 0;\n }\n\n if(utils.isBlob(body)) {\n return body.size;\n }\n\n if(utils.isSpecCompliantForm(body)) {\n const _request = new Request(platform.origin, {\n method: 'POST',\n body,\n });\n return (await _request.arrayBuffer()).byteLength;\n }\n\n if(utils.isArrayBufferView(body) || utils.isArrayBuffer(body)) {\n return body.byteLength;\n }\n\n if(utils.isURLSearchParams(body)) {\n body = body + '';\n }\n\n if(utils.isString(body)) {\n return (await encodeText(body)).byteLength;\n }\n}\n\nconst resolveBodyLength = async (headers, body) => {\n const length = utils.toFiniteNumber(headers.getContentLength());\n\n return length == null ? getBodyLength(body) : length;\n}\n\nexport default isFetchSupported && (async (config) => {\n let {\n url,\n method,\n data,\n signal,\n cancelToken,\n timeout,\n onDownloadProgress,\n onUploadProgress,\n responseType,\n headers,\n withCredentials = 'same-origin',\n fetchOptions\n } = resolveConfig(config);\n\n responseType = responseType ? (responseType + '').toLowerCase() : 'text';\n\n let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);\n\n let request;\n\n const unsubscribe = composedSignal && composedSignal.unsubscribe && (() => {\n composedSignal.unsubscribe();\n });\n\n let requestContentLength;\n\n try {\n if (\n onUploadProgress && supportsRequestStream && method !== 'get' && method !== 'head' &&\n (requestContentLength = await resolveBodyLength(headers, data)) !== 0\n ) {\n let _request = new Request(url, {\n method: 'POST',\n body: data,\n duplex: \"half\"\n });\n\n let contentTypeHeader;\n\n if (utils.isFormData(data) && (contentTypeHeader = _request.headers.get('content-type'))) {\n headers.setContentType(contentTypeHeader)\n }\n\n if (_request.body) {\n const [onProgress, flush] = progressEventDecorator(\n requestContentLength,\n progressEventReducer(asyncDecorator(onUploadProgress))\n );\n\n data = trackStream(_request.body, DEFAULT_CHUNK_SIZE, onProgress, flush);\n }\n }\n\n if (!utils.isString(withCredentials)) {\n withCredentials = withCredentials ? 'include' : 'omit';\n }\n\n // Cloudflare Workers throws when credentials are defined\n // see https://github.com/cloudflare/workerd/issues/902\n const isCredentialsSupported = \"credentials\" in Request.prototype;\n request = new Request(url, {\n ...fetchOptions,\n signal: composedSignal,\n method: method.toUpperCase(),\n headers: headers.normalize().toJSON(),\n body: data,\n duplex: \"half\",\n credentials: isCredentialsSupported ? withCredentials : undefined\n });\n\n let response = await fetch(request);\n\n const isStreamResponse = supportsResponseStream && (responseType === 'stream' || responseType === 'response');\n\n if (supportsResponseStream && (onDownloadProgress || (isStreamResponse && unsubscribe))) {\n const options = {};\n\n ['status', 'statusText', 'headers'].forEach(prop => {\n options[prop] = response[prop];\n });\n\n const responseContentLength = utils.toFiniteNumber(response.headers.get('content-length'));\n\n const [onProgress, flush] = onDownloadProgress && progressEventDecorator(\n responseContentLength,\n progressEventReducer(asyncDecorator(onDownloadProgress), true)\n ) || [];\n\n response = new Response(\n trackStream(response.body, DEFAULT_CHUNK_SIZE, onProgress, () => {\n flush && flush();\n unsubscribe && unsubscribe();\n }),\n options\n );\n }\n\n responseType = responseType || 'text';\n\n let responseData = await resolvers[utils.findKey(resolvers, responseType) || 'text'](response, config);\n\n !isStreamResponse && unsubscribe && unsubscribe();\n\n return await new Promise((resolve, reject) => {\n settle(resolve, reject, {\n data: responseData,\n headers: AxiosHeaders.from(response.headers),\n status: response.status,\n statusText: response.statusText,\n config,\n request\n })\n })\n } catch (err) {\n unsubscribe && unsubscribe();\n\n if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {\n throw Object.assign(\n new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),\n {\n cause: err.cause || err\n }\n )\n }\n\n throw AxiosError.from(err, err && err.code, config, request);\n }\n});\n\n\n","import utils from '../utils.js';\nimport httpAdapter from './http.js';\nimport xhrAdapter from './xhr.js';\nimport fetchAdapter from './fetch.js';\nimport AxiosError from \"../core/AxiosError.js\";\n\nconst knownAdapters = {\n http: httpAdapter,\n xhr: xhrAdapter,\n fetch: fetchAdapter\n}\n\nutils.forEach(knownAdapters, (fn, value) => {\n if (fn) {\n try {\n Object.defineProperty(fn, 'name', {value});\n } catch (e) {\n // eslint-disable-next-line no-empty\n }\n Object.defineProperty(fn, 'adapterName', {value});\n }\n});\n\nconst renderReason = (reason) => `- ${reason}`;\n\nconst isResolvedHandle = (adapter) => utils.isFunction(adapter) || adapter === null || adapter === false;\n\nexport default {\n getAdapter: (adapters) => {\n adapters = utils.isArray(adapters) ? adapters : [adapters];\n\n const {length} = adapters;\n let nameOrAdapter;\n let adapter;\n\n const rejectedReasons = {};\n\n for (let i = 0; i < length; i++) {\n nameOrAdapter = adapters[i];\n let id;\n\n adapter = nameOrAdapter;\n\n if (!isResolvedHandle(nameOrAdapter)) {\n adapter = knownAdapters[(id = String(nameOrAdapter)).toLowerCase()];\n\n if (adapter === undefined) {\n throw new AxiosError(`Unknown adapter '${id}'`);\n }\n }\n\n if (adapter) {\n break;\n }\n\n rejectedReasons[id || '#' + i] = adapter;\n }\n\n if (!adapter) {\n\n const reasons = Object.entries(rejectedReasons)\n .map(([id, state]) => `adapter ${id} ` +\n (state === false ? 'is not supported by the environment' : 'is not available in the build')\n );\n\n let s = length ?\n (reasons.length > 1 ? 'since :\\n' + reasons.map(renderReason).join('\\n') : ' ' + renderReason(reasons[0])) :\n 'as no adapter specified';\n\n throw new AxiosError(\n `There is no suitable adapter to dispatch the request ` + s,\n 'ERR_NOT_SUPPORT'\n );\n }\n\n return adapter;\n },\n adapters: knownAdapters\n}\n","'use strict';\n\nimport transformData from './transformData.js';\nimport isCancel from '../cancel/isCancel.js';\nimport defaults from '../defaults/index.js';\nimport CanceledError from '../cancel/CanceledError.js';\nimport AxiosHeaders from '../core/AxiosHeaders.js';\nimport adapters from \"../adapters/adapters.js\";\n\n/**\n * Throws a `CanceledError` if cancellation has been requested.\n *\n * @param {Object} config The config that is to be used for the request\n *\n * @returns {void}\n */\nfunction throwIfCancellationRequested(config) {\n if (config.cancelToken) {\n config.cancelToken.throwIfRequested();\n }\n\n if (config.signal && config.signal.aborted) {\n throw new CanceledError(null, config);\n }\n}\n\n/**\n * Dispatch a request to the server using the configured adapter.\n *\n * @param {object} config The config that is to be used for the request\n *\n * @returns {Promise} The Promise to be fulfilled\n */\nexport default function dispatchRequest(config) {\n throwIfCancellationRequested(config);\n\n config.headers = AxiosHeaders.from(config.headers);\n\n // Transform request data\n config.data = transformData.call(\n config,\n config.transformRequest\n );\n\n if (['post', 'put', 'patch'].indexOf(config.method) !== -1) {\n config.headers.setContentType('application/x-www-form-urlencoded', false);\n }\n\n const adapter = adapters.getAdapter(config.adapter || defaults.adapter);\n\n return adapter(config).then(function onAdapterResolution(response) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n response.data = transformData.call(\n config,\n config.transformResponse,\n response\n );\n\n response.headers = AxiosHeaders.from(response.headers);\n\n return response;\n }, function onAdapterRejection(reason) {\n if (!isCancel(reason)) {\n throwIfCancellationRequested(config);\n\n // Transform response data\n if (reason && reason.response) {\n reason.response.data = transformData.call(\n config,\n config.transformResponse,\n reason.response\n );\n reason.response.headers = AxiosHeaders.from(reason.response.headers);\n }\n }\n\n return Promise.reject(reason);\n });\n}\n","export const VERSION = \"1.7.9\";","'use strict';\n\nimport {VERSION} from '../env/data.js';\nimport AxiosError from '../core/AxiosError.js';\n\nconst validators = {};\n\n// eslint-disable-next-line func-names\n['object', 'boolean', 'number', 'function', 'string', 'symbol'].forEach((type, i) => {\n validators[type] = function validator(thing) {\n return typeof thing === type || 'a' + (i < 1 ? 'n ' : ' ') + type;\n };\n});\n\nconst deprecatedWarnings = {};\n\n/**\n * Transitional option validator\n *\n * @param {function|boolean?} validator - set to false if the transitional option has been removed\n * @param {string?} version - deprecated version / removed since version\n * @param {string?} message - some message with additional info\n *\n * @returns {function}\n */\nvalidators.transitional = function transitional(validator, version, message) {\n function formatMessage(opt, desc) {\n return '[Axios v' + VERSION + '] Transitional option \\'' + opt + '\\'' + desc + (message ? '. ' + message : '');\n }\n\n // eslint-disable-next-line func-names\n return (value, opt, opts) => {\n if (validator === false) {\n throw new AxiosError(\n formatMessage(opt, ' has been removed' + (version ? ' in ' + version : '')),\n AxiosError.ERR_DEPRECATED\n );\n }\n\n if (version && !deprecatedWarnings[opt]) {\n deprecatedWarnings[opt] = true;\n // eslint-disable-next-line no-console\n console.warn(\n formatMessage(\n opt,\n ' has been deprecated since v' + version + ' and will be removed in the near future'\n )\n );\n }\n\n return validator ? validator(value, opt, opts) : true;\n };\n};\n\nvalidators.spelling = function spelling(correctSpelling) {\n return (value, opt) => {\n // eslint-disable-next-line no-console\n console.warn(`${opt} is likely a misspelling of ${correctSpelling}`);\n return true;\n }\n};\n\n/**\n * Assert object's properties type\n *\n * @param {object} options\n * @param {object} schema\n * @param {boolean?} allowUnknown\n *\n * @returns {object}\n */\n\nfunction assertOptions(options, schema, allowUnknown) {\n if (typeof options !== 'object') {\n throw new AxiosError('options must be an object', AxiosError.ERR_BAD_OPTION_VALUE);\n }\n const keys = Object.keys(options);\n let i = keys.length;\n while (i-- > 0) {\n const opt = keys[i];\n const validator = schema[opt];\n if (validator) {\n const value = options[opt];\n const result = value === undefined || validator(value, opt, options);\n if (result !== true) {\n throw new AxiosError('option ' + opt + ' must be ' + result, AxiosError.ERR_BAD_OPTION_VALUE);\n }\n continue;\n }\n if (allowUnknown !== true) {\n throw new AxiosError('Unknown option ' + opt, AxiosError.ERR_BAD_OPTION);\n }\n }\n}\n\nexport default {\n assertOptions,\n validators\n};\n","'use strict';\n\nimport utils from './../utils.js';\nimport buildURL from '../helpers/buildURL.js';\nimport InterceptorManager from './InterceptorManager.js';\nimport dispatchRequest from './dispatchRequest.js';\nimport mergeConfig from './mergeConfig.js';\nimport buildFullPath from './buildFullPath.js';\nimport validator from '../helpers/validator.js';\nimport AxiosHeaders from './AxiosHeaders.js';\n\nconst validators = validator.validators;\n\n/**\n * Create a new instance of Axios\n *\n * @param {Object} instanceConfig The default config for the instance\n *\n * @return {Axios} A new instance of Axios\n */\nclass Axios {\n constructor(instanceConfig) {\n this.defaults = instanceConfig;\n this.interceptors = {\n request: new InterceptorManager(),\n response: new InterceptorManager()\n };\n }\n\n /**\n * Dispatch a request\n *\n * @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)\n * @param {?Object} config\n *\n * @returns {Promise} The Promise to be fulfilled\n */\n async request(configOrUrl, config) {\n try {\n return await this._request(configOrUrl, config);\n } catch (err) {\n if (err instanceof Error) {\n let dummy = {};\n\n Error.captureStackTrace ? Error.captureStackTrace(dummy) : (dummy = new Error());\n\n // slice off the Error: ... line\n const stack = dummy.stack ? dummy.stack.replace(/^.+\\n/, '') : '';\n try {\n if (!err.stack) {\n err.stack = stack;\n // match without the 2 top stack lines\n } else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\\n.+\\n/, ''))) {\n err.stack += '\\n' + stack\n }\n } catch (e) {\n // ignore the case where \"stack\" is an un-writable property\n }\n }\n\n throw err;\n }\n }\n\n _request(configOrUrl, config) {\n /*eslint no-param-reassign:0*/\n // Allow for axios('example/url'[, config]) a la fetch API\n if (typeof configOrUrl === 'string') {\n config = config || {};\n config.url = configOrUrl;\n } else {\n config = configOrUrl || {};\n }\n\n config = mergeConfig(this.defaults, config);\n\n const {transitional, paramsSerializer, headers} = config;\n\n if (transitional !== undefined) {\n validator.assertOptions(transitional, {\n silentJSONParsing: validators.transitional(validators.boolean),\n forcedJSONParsing: validators.transitional(validators.boolean),\n clarifyTimeoutError: validators.transitional(validators.boolean)\n }, false);\n }\n\n if (paramsSerializer != null) {\n if (utils.isFunction(paramsSerializer)) {\n config.paramsSerializer = {\n serialize: paramsSerializer\n }\n } else {\n validator.assertOptions(paramsSerializer, {\n encode: validators.function,\n serialize: validators.function\n }, true);\n }\n }\n\n validator.assertOptions(config, {\n baseUrl: validators.spelling('baseURL'),\n withXsrfToken: validators.spelling('withXSRFToken')\n }, true);\n\n // Set config.method\n config.method = (config.method || this.defaults.method || 'get').toLowerCase();\n\n // Flatten headers\n let contextHeaders = headers && utils.merge(\n headers.common,\n headers[config.method]\n );\n\n headers && utils.forEach(\n ['delete', 'get', 'head', 'post', 'put', 'patch', 'common'],\n (method) => {\n delete headers[method];\n }\n );\n\n config.headers = AxiosHeaders.concat(contextHeaders, headers);\n\n // filter out skipped interceptors\n const requestInterceptorChain = [];\n let synchronousRequestInterceptors = true;\n this.interceptors.request.forEach(function unshiftRequestInterceptors(interceptor) {\n if (typeof interceptor.runWhen === 'function' && interceptor.runWhen(config) === false) {\n return;\n }\n\n synchronousRequestInterceptors = synchronousRequestInterceptors && interceptor.synchronous;\n\n requestInterceptorChain.unshift(interceptor.fulfilled, interceptor.rejected);\n });\n\n const responseInterceptorChain = [];\n this.interceptors.response.forEach(function pushResponseInterceptors(interceptor) {\n responseInterceptorChain.push(interceptor.fulfilled, interceptor.rejected);\n });\n\n let promise;\n let i = 0;\n let len;\n\n if (!synchronousRequestInterceptors) {\n const chain = [dispatchRequest.bind(this), undefined];\n chain.unshift.apply(chain, requestInterceptorChain);\n chain.push.apply(chain, responseInterceptorChain);\n len = chain.length;\n\n promise = Promise.resolve(config);\n\n while (i < len) {\n promise = promise.then(chain[i++], chain[i++]);\n }\n\n return promise;\n }\n\n len = requestInterceptorChain.length;\n\n let newConfig = config;\n\n i = 0;\n\n while (i < len) {\n const onFulfilled = requestInterceptorChain[i++];\n const onRejected = requestInterceptorChain[i++];\n try {\n newConfig = onFulfilled(newConfig);\n } catch (error) {\n onRejected.call(this, error);\n break;\n }\n }\n\n try {\n promise = dispatchRequest.call(this, newConfig);\n } catch (error) {\n return Promise.reject(error);\n }\n\n i = 0;\n len = responseInterceptorChain.length;\n\n while (i < len) {\n promise = promise.then(responseInterceptorChain[i++], responseInterceptorChain[i++]);\n }\n\n return promise;\n }\n\n getUri(config) {\n config = mergeConfig(this.defaults, config);\n const fullPath = buildFullPath(config.baseURL, config.url);\n return buildURL(fullPath, config.params, config.paramsSerializer);\n }\n}\n\n// Provide aliases for supported request methods\nutils.forEach(['delete', 'get', 'head', 'options'], function forEachMethodNoData(method) {\n /*eslint func-names:0*/\n Axios.prototype[method] = function(url, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n url,\n data: (config || {}).data\n }));\n };\n});\n\nutils.forEach(['post', 'put', 'patch'], function forEachMethodWithData(method) {\n /*eslint func-names:0*/\n\n function generateHTTPMethod(isForm) {\n return function httpMethod(url, data, config) {\n return this.request(mergeConfig(config || {}, {\n method,\n headers: isForm ? {\n 'Content-Type': 'multipart/form-data'\n } : {},\n url,\n data\n }));\n };\n }\n\n Axios.prototype[method] = generateHTTPMethod();\n\n Axios.prototype[method + 'Form'] = generateHTTPMethod(true);\n});\n\nexport default Axios;\n","'use strict';\n\nimport CanceledError from './CanceledError.js';\n\n/**\n * A `CancelToken` is an object that can be used to request cancellation of an operation.\n *\n * @param {Function} executor The executor function.\n *\n * @returns {CancelToken}\n */\nclass CancelToken {\n constructor(executor) {\n if (typeof executor !== 'function') {\n throw new TypeError('executor must be a function.');\n }\n\n let resolvePromise;\n\n this.promise = new Promise(function promiseExecutor(resolve) {\n resolvePromise = resolve;\n });\n\n const token = this;\n\n // eslint-disable-next-line func-names\n this.promise.then(cancel => {\n if (!token._listeners) return;\n\n let i = token._listeners.length;\n\n while (i-- > 0) {\n token._listeners[i](cancel);\n }\n token._listeners = null;\n });\n\n // eslint-disable-next-line func-names\n this.promise.then = onfulfilled => {\n let _resolve;\n // eslint-disable-next-line func-names\n const promise = new Promise(resolve => {\n token.subscribe(resolve);\n _resolve = resolve;\n }).then(onfulfilled);\n\n promise.cancel = function reject() {\n token.unsubscribe(_resolve);\n };\n\n return promise;\n };\n\n executor(function cancel(message, config, request) {\n if (token.reason) {\n // Cancellation has already been requested\n return;\n }\n\n token.reason = new CanceledError(message, config, request);\n resolvePromise(token.reason);\n });\n }\n\n /**\n * Throws a `CanceledError` if cancellation has been requested.\n */\n throwIfRequested() {\n if (this.reason) {\n throw this.reason;\n }\n }\n\n /**\n * Subscribe to the cancel signal\n */\n\n subscribe(listener) {\n if (this.reason) {\n listener(this.reason);\n return;\n }\n\n if (this._listeners) {\n this._listeners.push(listener);\n } else {\n this._listeners = [listener];\n }\n }\n\n /**\n * Unsubscribe from the cancel signal\n */\n\n unsubscribe(listener) {\n if (!this._listeners) {\n return;\n }\n const index = this._listeners.indexOf(listener);\n if (index !== -1) {\n this._listeners.splice(index, 1);\n }\n }\n\n toAbortSignal() {\n const controller = new AbortController();\n\n const abort = (err) => {\n controller.abort(err);\n };\n\n this.subscribe(abort);\n\n controller.signal.unsubscribe = () => this.unsubscribe(abort);\n\n return controller.signal;\n }\n\n /**\n * Returns an object that contains a new `CancelToken` and a function that, when called,\n * cancels the `CancelToken`.\n */\n static source() {\n let cancel;\n const token = new CancelToken(function executor(c) {\n cancel = c;\n });\n return {\n token,\n cancel\n };\n }\n}\n\nexport default CancelToken;\n","'use strict';\n\n/**\n * Syntactic sugar for invoking a function and expanding an array for arguments.\n *\n * Common use case would be to use `Function.prototype.apply`.\n *\n * ```js\n * function f(x, y, z) {}\n * var args = [1, 2, 3];\n * f.apply(null, args);\n * ```\n *\n * With `spread` this example can be re-written.\n *\n * ```js\n * spread(function(x, y, z) {})([1, 2, 3]);\n * ```\n *\n * @param {Function} callback\n *\n * @returns {Function}\n */\nexport default function spread(callback) {\n return function wrap(arr) {\n return callback.apply(null, arr);\n };\n}\n","'use strict';\n\nimport utils from './../utils.js';\n\n/**\n * Determines whether the payload is an error thrown by Axios\n *\n * @param {*} payload The value to test\n *\n * @returns {boolean} True if the payload is an error thrown by Axios, otherwise false\n */\nexport default function isAxiosError(payload) {\n return utils.isObject(payload) && (payload.isAxiosError === true);\n}\n","const HttpStatusCode = {\n Continue: 100,\n SwitchingProtocols: 101,\n Processing: 102,\n EarlyHints: 103,\n Ok: 200,\n Created: 201,\n Accepted: 202,\n NonAuthoritativeInformation: 203,\n NoContent: 204,\n ResetContent: 205,\n PartialContent: 206,\n MultiStatus: 207,\n AlreadyReported: 208,\n ImUsed: 226,\n MultipleChoices: 300,\n MovedPermanently: 301,\n Found: 302,\n SeeOther: 303,\n NotModified: 304,\n UseProxy: 305,\n Unused: 306,\n TemporaryRedirect: 307,\n PermanentRedirect: 308,\n BadRequest: 400,\n Unauthorized: 401,\n PaymentRequired: 402,\n Forbidden: 403,\n NotFound: 404,\n MethodNotAllowed: 405,\n NotAcceptable: 406,\n ProxyAuthenticationRequired: 407,\n RequestTimeout: 408,\n Conflict: 409,\n Gone: 410,\n LengthRequired: 411,\n PreconditionFailed: 412,\n PayloadTooLarge: 413,\n UriTooLong: 414,\n UnsupportedMediaType: 415,\n RangeNotSatisfiable: 416,\n ExpectationFailed: 417,\n ImATeapot: 418,\n MisdirectedRequest: 421,\n UnprocessableEntity: 422,\n Locked: 423,\n FailedDependency: 424,\n TooEarly: 425,\n UpgradeRequired: 426,\n PreconditionRequired: 428,\n TooManyRequests: 429,\n RequestHeaderFieldsTooLarge: 431,\n UnavailableForLegalReasons: 451,\n InternalServerError: 500,\n NotImplemented: 501,\n BadGateway: 502,\n ServiceUnavailable: 503,\n GatewayTimeout: 504,\n HttpVersionNotSupported: 505,\n VariantAlsoNegotiates: 506,\n InsufficientStorage: 507,\n LoopDetected: 508,\n NotExtended: 510,\n NetworkAuthenticationRequired: 511,\n};\n\nObject.entries(HttpStatusCode).forEach(([key, value]) => {\n HttpStatusCode[value] = key;\n});\n\nexport default HttpStatusCode;\n","'use strict';\n\nimport utils from './utils.js';\nimport bind from './helpers/bind.js';\nimport Axios from './core/Axios.js';\nimport mergeConfig from './core/mergeConfig.js';\nimport defaults from './defaults/index.js';\nimport formDataToJSON from './helpers/formDataToJSON.js';\nimport CanceledError from './cancel/CanceledError.js';\nimport CancelToken from './cancel/CancelToken.js';\nimport isCancel from './cancel/isCancel.js';\nimport {VERSION} from './env/data.js';\nimport toFormData from './helpers/toFormData.js';\nimport AxiosError from './core/AxiosError.js';\nimport spread from './helpers/spread.js';\nimport isAxiosError from './helpers/isAxiosError.js';\nimport AxiosHeaders from \"./core/AxiosHeaders.js\";\nimport adapters from './adapters/adapters.js';\nimport HttpStatusCode from './helpers/HttpStatusCode.js';\n\n/**\n * Create an instance of Axios\n *\n * @param {Object} defaultConfig The default config for the instance\n *\n * @returns {Axios} A new instance of Axios\n */\nfunction createInstance(defaultConfig) {\n const context = new Axios(defaultConfig);\n const instance = bind(Axios.prototype.request, context);\n\n // Copy axios.prototype to instance\n utils.extend(instance, Axios.prototype, context, {allOwnKeys: true});\n\n // Copy context to instance\n utils.extend(instance, context, null, {allOwnKeys: true});\n\n // Factory for creating new instances\n instance.create = function create(instanceConfig) {\n return createInstance(mergeConfig(defaultConfig, instanceConfig));\n };\n\n return instance;\n}\n\n// Create the default instance to be exported\nconst axios = createInstance(defaults);\n\n// Expose Axios class to allow class inheritance\naxios.Axios = Axios;\n\n// Expose Cancel & CancelToken\naxios.CanceledError = CanceledError;\naxios.CancelToken = CancelToken;\naxios.isCancel = isCancel;\naxios.VERSION = VERSION;\naxios.toFormData = toFormData;\n\n// Expose AxiosError class\naxios.AxiosError = AxiosError;\n\n// alias for CanceledError for backward compatibility\naxios.Cancel = axios.CanceledError;\n\n// Expose all/spread\naxios.all = function all(promises) {\n return Promise.all(promises);\n};\n\naxios.spread = spread;\n\n// Expose isAxiosError\naxios.isAxiosError = isAxiosError;\n\n// Expose mergeConfig\naxios.mergeConfig = mergeConfig;\n\naxios.AxiosHeaders = AxiosHeaders;\n\naxios.formToJSON = thing => formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);\n\naxios.getAdapter = adapters.getAdapter;\n\naxios.HttpStatusCode = HttpStatusCode;\n\naxios.default = axios;\n\n// this module should only have a default export\nexport default axios\n","import axios from './lib/axios.js';\n\n// This module is intended to unwrap Axios default export as named.\n// Keep top-level export same with static properties\n// so that it can keep same with es module or cjs\nconst {\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n} = axios;\n\nexport {\n axios as default,\n Axios,\n AxiosError,\n CanceledError,\n isCancel,\n CancelToken,\n VERSION,\n all,\n Cancel,\n isAxiosError,\n spread,\n toFormData,\n AxiosHeaders,\n HttpStatusCode,\n formToJSON,\n getAdapter,\n mergeConfig\n}\n","export const BEARER_TOKEN_STORAGE_KEY = 'FormId';","import * as consts from '../consts/consts';\n\nconst saveAuthentication = (token: string) => {\n localStorage.setItem(consts.BEARER_TOKEN_STORAGE_KEY, token);\n};\n\nconst getAuthentication = (): string | null => {\n return localStorage.getItem(consts.BEARER_TOKEN_STORAGE_KEY);\n};\n\nconst deleteAuthentication = () => {\n localStorage.removeItem(consts.BEARER_TOKEN_STORAGE_KEY);\n};\n\nexport {\n saveAuthentication,\n getAuthentication,\n deleteAuthentication\n}","import axios, { AxiosError } from \"axios\";\nimport { BadRequestType } from \"../types/BadRequestType\";\nimport { getAuthentication } from \"../helpers/token\";\n\nconst options = {\n baseURL: import.meta.env.VITE_REACT_APP_BACKEND_ADDRESS as string,\n headers: {\n \"Content-Type\": \"application/json\",\n },\n};\n\nconst API = axios.create(options);\n\nconst reloadOptions = () => {\n API.interceptors.request.use(function (config) {\n config.headers.Authorization = `Bearer ${getAuthentication()}`;\n\n return config;\n });\n};\n\nconst handleErrorApi = (\n error: AxiosError\n): string | undefined => {\n const errors = error.response?.data.errors;\n\n if (!errors || errors.length === 0) return undefined;\n\n return errors.join(\"\\r\\n\");\n};\n\nexport { API, reloadOptions, handleErrorApi };\n","import { LoadingRequestResponseType } from \"../types/LoadingRequestResponseType\";\nimport { LoadingRequestType } from \"../types/LoadingRequestType\";\nimport { API, handleErrorApi } from \"./api\";\n\nconst sendLoadingPostRequest = async ({\n loadingFunction,\n endpoint,\n params\n}: LoadingRequestType): Promise> => {\n if (loadingFunction)\n loadingFunction(true);\n try {\n const response = await API.post(endpoint, params);\n if (loadingFunction)\n loadingFunction(false);\n return {\n success: true,\n data: response\n }\n } catch (error: any) {\n if (error?.response?.status === 401) {\n window.location.reload();\n }\n if (loadingFunction)\n loadingFunction(false);\n const msg = handleErrorApi(error);\n return {\n success: false,\n error: msg\n }\n }\n};\n\nexport {\n sendLoadingPostRequest\n}","const common = {\n black: '#000',\n white: '#fff'\n};\nexport default common;","const red = {\n 50: '#ffebee',\n 100: '#ffcdd2',\n 200: '#ef9a9a',\n 300: '#e57373',\n 400: '#ef5350',\n 500: '#f44336',\n 600: '#e53935',\n 700: '#d32f2f',\n 800: '#c62828',\n 900: '#b71c1c',\n A100: '#ff8a80',\n A200: '#ff5252',\n A400: '#ff1744',\n A700: '#d50000'\n};\nexport default red;","const purple = {\n 50: '#f3e5f5',\n 100: '#e1bee7',\n 200: '#ce93d8',\n 300: '#ba68c8',\n 400: '#ab47bc',\n 500: '#9c27b0',\n 600: '#8e24aa',\n 700: '#7b1fa2',\n 800: '#6a1b9a',\n 900: '#4a148c',\n A100: '#ea80fc',\n A200: '#e040fb',\n A400: '#d500f9',\n A700: '#aa00ff'\n};\nexport default purple;","const blue = {\n 50: '#e3f2fd',\n 100: '#bbdefb',\n 200: '#90caf9',\n 300: '#64b5f6',\n 400: '#42a5f5',\n 500: '#2196f3',\n 600: '#1e88e5',\n 700: '#1976d2',\n 800: '#1565c0',\n 900: '#0d47a1',\n A100: '#82b1ff',\n A200: '#448aff',\n A400: '#2979ff',\n A700: '#2962ff'\n};\nexport default blue;","const lightBlue = {\n 50: '#e1f5fe',\n 100: '#b3e5fc',\n 200: '#81d4fa',\n 300: '#4fc3f7',\n 400: '#29b6f6',\n 500: '#03a9f4',\n 600: '#039be5',\n 700: '#0288d1',\n 800: '#0277bd',\n 900: '#01579b',\n A100: '#80d8ff',\n A200: '#40c4ff',\n A400: '#00b0ff',\n A700: '#0091ea'\n};\nexport default lightBlue;","const green = {\n 50: '#e8f5e9',\n 100: '#c8e6c9',\n 200: '#a5d6a7',\n 300: '#81c784',\n 400: '#66bb6a',\n 500: '#4caf50',\n 600: '#43a047',\n 700: '#388e3c',\n 800: '#2e7d32',\n 900: '#1b5e20',\n A100: '#b9f6ca',\n A200: '#69f0ae',\n A400: '#00e676',\n A700: '#00c853'\n};\nexport default green;","const orange = {\n 50: '#fff3e0',\n 100: '#ffe0b2',\n 200: '#ffcc80',\n 300: '#ffb74d',\n 400: '#ffa726',\n 500: '#ff9800',\n 600: '#fb8c00',\n 700: '#f57c00',\n 800: '#ef6c00',\n 900: '#e65100',\n A100: '#ffd180',\n A200: '#ffab40',\n A400: '#ff9100',\n A700: '#ff6d00'\n};\nexport default orange;","const grey = {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#eeeeee',\n 300: '#e0e0e0',\n 400: '#bdbdbd',\n 500: '#9e9e9e',\n 600: '#757575',\n 700: '#616161',\n 800: '#424242',\n 900: '#212121',\n A100: '#f5f5f5',\n A200: '#eeeeee',\n A400: '#bdbdbd',\n A700: '#616161'\n};\nexport default grey;","/**\n * WARNING: Don't import this directly. It's imported by the code generated by\n * `@mui/interal-babel-plugin-minify-errors`. Make sure to always use string literals in `Error`\n * constructors to ensure the plugin works as expected. Supported patterns include:\n * throw new Error('My message');\n * throw new Error(`My message: ${foo}`);\n * throw new Error(`My message: ${foo}` + 'another string');\n * ...\n * @param {number} code\n */\nexport default function formatMuiErrorMessage(code, ...args) {\n const url = new URL(`https://mui.com/production-error/?code=${code}`);\n args.forEach(arg => url.searchParams.append('args[]', arg));\n return `Minified MUI error #${code}; visit ${url} for the full message.`;\n}","export default '$$material';","function _extends() {\n return _extends = Object.assign ? Object.assign.bind() : function (n) {\n for (var e = 1; e < arguments.length; e++) {\n var t = arguments[e];\n for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n }\n return n;\n }, _extends.apply(null, arguments);\n}\nexport { _extends as default };","var isDevelopment = false;\n\n/*\n\nBased off glamor's StyleSheet, thanks Sunil ❤️\n\nhigh performance StyleSheet for css-in-js systems\n\n- uses multiple style tags behind the scenes for millions of rules\n- uses `insertRule` for appending in production for *much* faster performance\n\n// usage\n\nimport { StyleSheet } from '@emotion/sheet'\n\nlet styleSheet = new StyleSheet({ key: '', container: document.head })\n\nstyleSheet.insert('#box { border: 1px solid red; }')\n- appends a css rule into the stylesheet\n\nstyleSheet.flush()\n- empties the stylesheet of all its contents\n\n*/\n\nfunction sheetForTag(tag) {\n if (tag.sheet) {\n return tag.sheet;\n } // this weirdness brought to you by firefox\n\n /* istanbul ignore next */\n\n\n for (var i = 0; i < document.styleSheets.length; i++) {\n if (document.styleSheets[i].ownerNode === tag) {\n return document.styleSheets[i];\n }\n } // this function should always return with a value\n // TS can't understand it though so we make it stop complaining here\n\n\n return undefined;\n}\n\nfunction createStyleElement(options) {\n var tag = document.createElement('style');\n tag.setAttribute('data-emotion', options.key);\n\n if (options.nonce !== undefined) {\n tag.setAttribute('nonce', options.nonce);\n }\n\n tag.appendChild(document.createTextNode(''));\n tag.setAttribute('data-s', '');\n return tag;\n}\n\nvar StyleSheet = /*#__PURE__*/function () {\n // Using Node instead of HTMLElement since container may be a ShadowRoot\n function StyleSheet(options) {\n var _this = this;\n\n this._insertTag = function (tag) {\n var before;\n\n if (_this.tags.length === 0) {\n if (_this.insertionPoint) {\n before = _this.insertionPoint.nextSibling;\n } else if (_this.prepend) {\n before = _this.container.firstChild;\n } else {\n before = _this.before;\n }\n } else {\n before = _this.tags[_this.tags.length - 1].nextSibling;\n }\n\n _this.container.insertBefore(tag, before);\n\n _this.tags.push(tag);\n };\n\n this.isSpeedy = options.speedy === undefined ? !isDevelopment : options.speedy;\n this.tags = [];\n this.ctr = 0;\n this.nonce = options.nonce; // key is the value of the data-emotion attribute, it's used to identify different sheets\n\n this.key = options.key;\n this.container = options.container;\n this.prepend = options.prepend;\n this.insertionPoint = options.insertionPoint;\n this.before = null;\n }\n\n var _proto = StyleSheet.prototype;\n\n _proto.hydrate = function hydrate(nodes) {\n nodes.forEach(this._insertTag);\n };\n\n _proto.insert = function insert(rule) {\n // the max length is how many rules we have per style tag, it's 65000 in speedy mode\n // it's 1 in dev because we insert source maps that map a single rule to a location\n // and you can only have one source map per style tag\n if (this.ctr % (this.isSpeedy ? 65000 : 1) === 0) {\n this._insertTag(createStyleElement(this));\n }\n\n var tag = this.tags[this.tags.length - 1];\n\n if (this.isSpeedy) {\n var sheet = sheetForTag(tag);\n\n try {\n // this is the ultrafast version, works across browsers\n // the big drawback is that the css won't be editable in devtools\n sheet.insertRule(rule, sheet.cssRules.length);\n } catch (e) {\n }\n } else {\n tag.appendChild(document.createTextNode(rule));\n }\n\n this.ctr++;\n };\n\n _proto.flush = function flush() {\n this.tags.forEach(function (tag) {\n var _tag$parentNode;\n\n return (_tag$parentNode = tag.parentNode) == null ? void 0 : _tag$parentNode.removeChild(tag);\n });\n this.tags = [];\n this.ctr = 0;\n };\n\n return StyleSheet;\n}();\n\nexport { StyleSheet };\n","export var MS = '-ms-'\nexport var MOZ = '-moz-'\nexport var WEBKIT = '-webkit-'\n\nexport var COMMENT = 'comm'\nexport var RULESET = 'rule'\nexport var DECLARATION = 'decl'\n\nexport var PAGE = '@page'\nexport var MEDIA = '@media'\nexport var IMPORT = '@import'\nexport var CHARSET = '@charset'\nexport var VIEWPORT = '@viewport'\nexport var SUPPORTS = '@supports'\nexport var DOCUMENT = '@document'\nexport var NAMESPACE = '@namespace'\nexport var KEYFRAMES = '@keyframes'\nexport var FONT_FACE = '@font-face'\nexport var COUNTER_STYLE = '@counter-style'\nexport var FONT_FEATURE_VALUES = '@font-feature-values'\nexport var LAYER = '@layer'\n","/**\n * @param {number}\n * @return {number}\n */\nexport var abs = Math.abs\n\n/**\n * @param {number}\n * @return {string}\n */\nexport var from = String.fromCharCode\n\n/**\n * @param {object}\n * @return {object}\n */\nexport var assign = Object.assign\n\n/**\n * @param {string} value\n * @param {number} length\n * @return {number}\n */\nexport function hash (value, length) {\n\treturn charat(value, 0) ^ 45 ? (((((((length << 2) ^ charat(value, 0)) << 2) ^ charat(value, 1)) << 2) ^ charat(value, 2)) << 2) ^ charat(value, 3) : 0\n}\n\n/**\n * @param {string} value\n * @return {string}\n */\nexport function trim (value) {\n\treturn value.trim()\n}\n\n/**\n * @param {string} value\n * @param {RegExp} pattern\n * @return {string?}\n */\nexport function match (value, pattern) {\n\treturn (value = pattern.exec(value)) ? value[0] : value\n}\n\n/**\n * @param {string} value\n * @param {(string|RegExp)} pattern\n * @param {string} replacement\n * @return {string}\n */\nexport function replace (value, pattern, replacement) {\n\treturn value.replace(pattern, replacement)\n}\n\n/**\n * @param {string} value\n * @param {string} search\n * @return {number}\n */\nexport function indexof (value, search) {\n\treturn value.indexOf(search)\n}\n\n/**\n * @param {string} value\n * @param {number} index\n * @return {number}\n */\nexport function charat (value, index) {\n\treturn value.charCodeAt(index) | 0\n}\n\n/**\n * @param {string} value\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function substr (value, begin, end) {\n\treturn value.slice(begin, end)\n}\n\n/**\n * @param {string} value\n * @return {number}\n */\nexport function strlen (value) {\n\treturn value.length\n}\n\n/**\n * @param {any[]} value\n * @return {number}\n */\nexport function sizeof (value) {\n\treturn value.length\n}\n\n/**\n * @param {any} value\n * @param {any[]} array\n * @return {any}\n */\nexport function append (value, array) {\n\treturn array.push(value), value\n}\n\n/**\n * @param {string[]} array\n * @param {function} callback\n * @return {string}\n */\nexport function combine (array, callback) {\n\treturn array.map(callback).join('')\n}\n","import {from, trim, charat, strlen, substr, append, assign} from './Utility.js'\n\nexport var line = 1\nexport var column = 1\nexport var length = 0\nexport var position = 0\nexport var character = 0\nexport var characters = ''\n\n/**\n * @param {string} value\n * @param {object | null} root\n * @param {object | null} parent\n * @param {string} type\n * @param {string[] | string} props\n * @param {object[] | string} children\n * @param {number} length\n */\nexport function node (value, root, parent, type, props, children, length) {\n\treturn {value: value, root: root, parent: parent, type: type, props: props, children: children, line: line, column: column, length: length, return: ''}\n}\n\n/**\n * @param {object} root\n * @param {object} props\n * @return {object}\n */\nexport function copy (root, props) {\n\treturn assign(node('', null, null, '', null, null, 0), root, {length: -root.length}, props)\n}\n\n/**\n * @return {number}\n */\nexport function char () {\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function prev () {\n\tcharacter = position > 0 ? charat(characters, --position) : 0\n\n\tif (column--, character === 10)\n\t\tcolumn = 1, line--\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function next () {\n\tcharacter = position < length ? charat(characters, position++) : 0\n\n\tif (column++, character === 10)\n\t\tcolumn = 1, line++\n\n\treturn character\n}\n\n/**\n * @return {number}\n */\nexport function peek () {\n\treturn charat(characters, position)\n}\n\n/**\n * @return {number}\n */\nexport function caret () {\n\treturn position\n}\n\n/**\n * @param {number} begin\n * @param {number} end\n * @return {string}\n */\nexport function slice (begin, end) {\n\treturn substr(characters, begin, end)\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function token (type) {\n\tswitch (type) {\n\t\t// \\0 \\t \\n \\r \\s whitespace token\n\t\tcase 0: case 9: case 10: case 13: case 32:\n\t\t\treturn 5\n\t\t// ! + , / > @ ~ isolate token\n\t\tcase 33: case 43: case 44: case 47: case 62: case 64: case 126:\n\t\t// ; { } breakpoint token\n\t\tcase 59: case 123: case 125:\n\t\t\treturn 4\n\t\t// : accompanied token\n\t\tcase 58:\n\t\t\treturn 3\n\t\t// \" ' ( [ opening delimit token\n\t\tcase 34: case 39: case 40: case 91:\n\t\t\treturn 2\n\t\t// ) ] closing delimit token\n\t\tcase 41: case 93:\n\t\t\treturn 1\n\t}\n\n\treturn 0\n}\n\n/**\n * @param {string} value\n * @return {any[]}\n */\nexport function alloc (value) {\n\treturn line = column = 1, length = strlen(characters = value), position = 0, []\n}\n\n/**\n * @param {any} value\n * @return {any}\n */\nexport function dealloc (value) {\n\treturn characters = '', value\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function delimit (type) {\n\treturn trim(slice(position - 1, delimiter(type === 91 ? type + 2 : type === 40 ? type + 1 : type)))\n}\n\n/**\n * @param {string} value\n * @return {string[]}\n */\nexport function tokenize (value) {\n\treturn dealloc(tokenizer(alloc(value)))\n}\n\n/**\n * @param {number} type\n * @return {string}\n */\nexport function whitespace (type) {\n\twhile (character = peek())\n\t\tif (character < 33)\n\t\t\tnext()\n\t\telse\n\t\t\tbreak\n\n\treturn token(type) > 2 || token(character) > 3 ? '' : ' '\n}\n\n/**\n * @param {string[]} children\n * @return {string[]}\n */\nexport function tokenizer (children) {\n\twhile (next())\n\t\tswitch (token(character)) {\n\t\t\tcase 0: append(identifier(position - 1), children)\n\t\t\t\tbreak\n\t\t\tcase 2: append(delimit(character), children)\n\t\t\t\tbreak\n\t\t\tdefault: append(from(character), children)\n\t\t}\n\n\treturn children\n}\n\n/**\n * @param {number} index\n * @param {number} count\n * @return {string}\n */\nexport function escaping (index, count) {\n\twhile (--count && next())\n\t\t// not 0-9 A-F a-f\n\t\tif (character < 48 || character > 102 || (character > 57 && character < 65) || (character > 70 && character < 97))\n\t\t\tbreak\n\n\treturn slice(index, caret() + (count < 6 && peek() == 32 && next() == 32))\n}\n\n/**\n * @param {number} type\n * @return {number}\n */\nexport function delimiter (type) {\n\twhile (next())\n\t\tswitch (character) {\n\t\t\t// ] ) \" '\n\t\t\tcase type:\n\t\t\t\treturn position\n\t\t\t// \" '\n\t\t\tcase 34: case 39:\n\t\t\t\tif (type !== 34 && type !== 39)\n\t\t\t\t\tdelimiter(character)\n\t\t\t\tbreak\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (type === 41)\n\t\t\t\t\tdelimiter(type)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tnext()\n\t\t\t\tbreak\n\t\t}\n\n\treturn position\n}\n\n/**\n * @param {number} type\n * @param {number} index\n * @return {number}\n */\nexport function commenter (type, index) {\n\twhile (next())\n\t\t// //\n\t\tif (type + character === 47 + 10)\n\t\t\tbreak\n\t\t// /*\n\t\telse if (type + character === 42 + 42 && peek() === 47)\n\t\t\tbreak\n\n\treturn '/*' + slice(index, position - 1) + '*' + from(type === 47 ? type : next())\n}\n\n/**\n * @param {number} index\n * @return {string}\n */\nexport function identifier (index) {\n\twhile (!token(peek()))\n\t\tnext()\n\n\treturn slice(index, position)\n}\n","import {COMMENT, RULESET, DECLARATION} from './Enum.js'\nimport {abs, charat, trim, from, sizeof, strlen, substr, append, replace, indexof} from './Utility.js'\nimport {node, char, prev, next, peek, caret, alloc, dealloc, delimit, whitespace, escaping, identifier, commenter} from './Tokenizer.js'\n\n/**\n * @param {string} value\n * @return {object[]}\n */\nexport function compile (value) {\n\treturn dealloc(parse('', null, null, null, [''], value = alloc(value), 0, [0], value))\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {string[]} rule\n * @param {string[]} rules\n * @param {string[]} rulesets\n * @param {number[]} pseudo\n * @param {number[]} points\n * @param {string[]} declarations\n * @return {object}\n */\nexport function parse (value, root, parent, rule, rules, rulesets, pseudo, points, declarations) {\n\tvar index = 0\n\tvar offset = 0\n\tvar length = pseudo\n\tvar atrule = 0\n\tvar property = 0\n\tvar previous = 0\n\tvar variable = 1\n\tvar scanning = 1\n\tvar ampersand = 1\n\tvar character = 0\n\tvar type = ''\n\tvar props = rules\n\tvar children = rulesets\n\tvar reference = rule\n\tvar characters = type\n\n\twhile (scanning)\n\t\tswitch (previous = character, character = next()) {\n\t\t\t// (\n\t\t\tcase 40:\n\t\t\t\tif (previous != 108 && charat(characters, length - 1) == 58) {\n\t\t\t\t\tif (indexof(characters += replace(delimit(character), '&', '&\\f'), '&\\f') != -1)\n\t\t\t\t\t\tampersand = -1\n\t\t\t\t\tbreak\n\t\t\t\t}\n\t\t\t// \" ' [\n\t\t\tcase 34: case 39: case 91:\n\t\t\t\tcharacters += delimit(character)\n\t\t\t\tbreak\n\t\t\t// \\t \\n \\r \\s\n\t\t\tcase 9: case 10: case 13: case 32:\n\t\t\t\tcharacters += whitespace(previous)\n\t\t\t\tbreak\n\t\t\t// \\\n\t\t\tcase 92:\n\t\t\t\tcharacters += escaping(caret() - 1, 7)\n\t\t\t\tcontinue\n\t\t\t// /\n\t\t\tcase 47:\n\t\t\t\tswitch (peek()) {\n\t\t\t\t\tcase 42: case 47:\n\t\t\t\t\t\tappend(comment(commenter(next(), caret()), root, parent), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tcharacters += '/'\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t// {\n\t\t\tcase 123 * variable:\n\t\t\t\tpoints[index++] = strlen(characters) * ampersand\n\t\t\t// } ; \\0\n\t\t\tcase 125 * variable: case 59: case 0:\n\t\t\t\tswitch (character) {\n\t\t\t\t\t// \\0 }\n\t\t\t\t\tcase 0: case 125: scanning = 0\n\t\t\t\t\t// ;\n\t\t\t\t\tcase 59 + offset: if (ampersand == -1) characters = replace(characters, /\\f/g, '')\n\t\t\t\t\t\tif (property > 0 && (strlen(characters) - length))\n\t\t\t\t\t\t\tappend(property > 32 ? declaration(characters + ';', rule, parent, length - 1) : declaration(replace(characters, ' ', '') + ';', rule, parent, length - 2), declarations)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @ ;\n\t\t\t\t\tcase 59: characters += ';'\n\t\t\t\t\t// { rule/at-rule\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tappend(reference = ruleset(characters, root, parent, index, offset, rules, points, type, props = [], children = [], length), rulesets)\n\n\t\t\t\t\t\tif (character === 123)\n\t\t\t\t\t\t\tif (offset === 0)\n\t\t\t\t\t\t\t\tparse(characters, root, reference, reference, props, rulesets, length, points, children)\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tswitch (atrule === 99 && charat(characters, 3) === 110 ? 100 : atrule) {\n\t\t\t\t\t\t\t\t\t// d l m s\n\t\t\t\t\t\t\t\t\tcase 100: case 108: case 109: case 115:\n\t\t\t\t\t\t\t\t\t\tparse(value, reference, reference, rule && append(ruleset(value, reference, reference, 0, 0, rules, points, type, rules, props = [], length), children), rules, children, length, points, rule ? props : children)\n\t\t\t\t\t\t\t\t\t\tbreak\n\t\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\t\tparse(characters, reference, reference, reference, [''], children, 0, points, children)\n\t\t\t\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tindex = offset = property = 0, variable = ampersand = 1, type = characters = '', length = pseudo\n\t\t\t\tbreak\n\t\t\t// :\n\t\t\tcase 58:\n\t\t\t\tlength = 1 + strlen(characters), property = previous\n\t\t\tdefault:\n\t\t\t\tif (variable < 1)\n\t\t\t\t\tif (character == 123)\n\t\t\t\t\t\t--variable\n\t\t\t\t\telse if (character == 125 && variable++ == 0 && prev() == 125)\n\t\t\t\t\t\tcontinue\n\n\t\t\t\tswitch (characters += from(character), character * variable) {\n\t\t\t\t\t// &\n\t\t\t\t\tcase 38:\n\t\t\t\t\t\tampersand = offset > 0 ? 1 : (characters += '\\f', -1)\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// ,\n\t\t\t\t\tcase 44:\n\t\t\t\t\t\tpoints[index++] = (strlen(characters) - 1) * ampersand, ampersand = 1\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// @\n\t\t\t\t\tcase 64:\n\t\t\t\t\t\t// -\n\t\t\t\t\t\tif (peek() === 45)\n\t\t\t\t\t\t\tcharacters += delimit(next())\n\n\t\t\t\t\t\tatrule = peek(), offset = length = strlen(type = characters += identifier(caret())), character++\n\t\t\t\t\t\tbreak\n\t\t\t\t\t// -\n\t\t\t\t\tcase 45:\n\t\t\t\t\t\tif (previous === 45 && strlen(characters) == 2)\n\t\t\t\t\t\t\tvariable = 0\n\t\t\t\t}\n\t\t}\n\n\treturn rulesets\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} index\n * @param {number} offset\n * @param {string[]} rules\n * @param {number[]} points\n * @param {string} type\n * @param {string[]} props\n * @param {string[]} children\n * @param {number} length\n * @return {object}\n */\nexport function ruleset (value, root, parent, index, offset, rules, points, type, props, children, length) {\n\tvar post = offset - 1\n\tvar rule = offset === 0 ? rules : ['']\n\tvar size = sizeof(rule)\n\n\tfor (var i = 0, j = 0, k = 0; i < index; ++i)\n\t\tfor (var x = 0, y = substr(value, post + 1, post = abs(j = points[i])), z = value; x < size; ++x)\n\t\t\tif (z = trim(j > 0 ? rule[x] + ' ' + y : replace(y, /&\\f/g, rule[x])))\n\t\t\t\tprops[k++] = z\n\n\treturn node(value, root, parent, offset === 0 ? RULESET : type, props, children, length)\n}\n\n/**\n * @param {number} value\n * @param {object} root\n * @param {object?} parent\n * @return {object}\n */\nexport function comment (value, root, parent) {\n\treturn node(value, root, parent, COMMENT, from(char()), substr(value, 2, -2), 0)\n}\n\n/**\n * @param {string} value\n * @param {object} root\n * @param {object?} parent\n * @param {number} length\n * @return {object}\n */\nexport function declaration (value, root, parent, length) {\n\treturn node(value, root, parent, DECLARATION, substr(value, 0, length), substr(value, length + 1, -1), length)\n}\n","import {IMPORT, LAYER, COMMENT, RULESET, DECLARATION, KEYFRAMES} from './Enum.js'\nimport {strlen, sizeof} from './Utility.js'\n\n/**\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function serialize (children, callback) {\n\tvar output = ''\n\tvar length = sizeof(children)\n\n\tfor (var i = 0; i < length; i++)\n\t\toutput += callback(children[i], i, children, callback) || ''\n\n\treturn output\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n * @return {string}\n */\nexport function stringify (element, index, children, callback) {\n\tswitch (element.type) {\n\t\tcase LAYER: if (element.children.length) break\n\t\tcase IMPORT: case DECLARATION: return element.return = element.return || element.value\n\t\tcase COMMENT: return ''\n\t\tcase KEYFRAMES: return element.return = element.value + '{' + serialize(element.children, callback) + '}'\n\t\tcase RULESET: element.value = element.props.join(',')\n\t}\n\n\treturn strlen(children = serialize(element.children, callback)) ? element.return = element.value + '{' + children + '}' : ''\n}\n","import {MS, MOZ, WEBKIT, RULESET, KEYFRAMES, DECLARATION} from './Enum.js'\nimport {match, charat, substr, strlen, sizeof, replace, combine} from './Utility.js'\nimport {copy, tokenize} from './Tokenizer.js'\nimport {serialize} from './Serializer.js'\nimport {prefix} from './Prefixer.js'\n\n/**\n * @param {function[]} collection\n * @return {function}\n */\nexport function middleware (collection) {\n\tvar length = sizeof(collection)\n\n\treturn function (element, index, children, callback) {\n\t\tvar output = ''\n\n\t\tfor (var i = 0; i < length; i++)\n\t\t\toutput += collection[i](element, index, children, callback) || ''\n\n\t\treturn output\n\t}\n}\n\n/**\n * @param {function} callback\n * @return {function}\n */\nexport function rulesheet (callback) {\n\treturn function (element) {\n\t\tif (!element.root)\n\t\t\tif (element = element.return)\n\t\t\t\tcallback(element)\n\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n * @param {function} callback\n */\nexport function prefixer (element, index, children, callback) {\n\tif (element.length > -1)\n\t\tif (!element.return)\n\t\t\tswitch (element.type) {\n\t\t\t\tcase DECLARATION: element.return = prefix(element.value, element.length, children)\n\t\t\t\t\treturn\n\t\t\t\tcase KEYFRAMES:\n\t\t\t\t\treturn serialize([copy(element, {value: replace(element.value, '@', '@' + WEBKIT)})], callback)\n\t\t\t\tcase RULESET:\n\t\t\t\t\tif (element.length)\n\t\t\t\t\t\treturn combine(element.props, function (value) {\n\t\t\t\t\t\t\tswitch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n\t\t\t\t\t\t\t\t// :read-(only|write)\n\t\t\t\t\t\t\t\tcase ':read-only': case ':read-write':\n\t\t\t\t\t\t\t\t\treturn serialize([copy(element, {props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]})], callback)\n\t\t\t\t\t\t\t\t// :placeholder\n\t\t\t\t\t\t\t\tcase '::placeholder':\n\t\t\t\t\t\t\t\t\treturn serialize([\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]}),\n\t\t\t\t\t\t\t\t\t\tcopy(element, {props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]})\n\t\t\t\t\t\t\t\t\t], callback)\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn ''\n\t\t\t\t\t\t})\n\t\t\t}\n}\n\n/**\n * @param {object} element\n * @param {number} index\n * @param {object[]} children\n */\nexport function namespace (element) {\n\tswitch (element.type) {\n\t\tcase RULESET:\n\t\t\telement.props = element.props.map(function (value) {\n\t\t\t\treturn combine(tokenize(value), function (value, index, children) {\n\t\t\t\t\tswitch (charat(value, 0)) {\n\t\t\t\t\t\t// \\f\n\t\t\t\t\t\tcase 12:\n\t\t\t\t\t\t\treturn substr(value, 1, strlen(value))\n\t\t\t\t\t\t// \\0 ( + > ~\n\t\t\t\t\t\tcase 0: case 40: case 43: case 62: case 126:\n\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t// :\n\t\t\t\t\t\tcase 58:\n\t\t\t\t\t\t\tif (children[++index] === 'global')\n\t\t\t\t\t\t\t\tchildren[index] = '', children[++index] = '\\f' + substr(children[index], index = 1, -1)\n\t\t\t\t\t\t// \\s\n\t\t\t\t\t\tcase 32:\n\t\t\t\t\t\t\treturn index === 1 ? '' : value\n\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\tswitch (index) {\n\t\t\t\t\t\t\t\tcase 0: element = value\n\t\t\t\t\t\t\t\t\treturn sizeof(children) > 1 ? '' : value\n\t\t\t\t\t\t\t\tcase index = sizeof(children) - 1: case 2:\n\t\t\t\t\t\t\t\t\treturn index === 2 ? value + element + element : value + element\n\t\t\t\t\t\t\t\tdefault:\n\t\t\t\t\t\t\t\t\treturn value\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t})\n\t}\n}\n","function memoize(fn) {\n var cache = Object.create(null);\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport { memoize as default };\n","import { StyleSheet } from '@emotion/sheet';\nimport { dealloc, alloc, next, token, from, peek, delimit, slice, position, RULESET, combine, match, serialize, copy, replace, WEBKIT, MOZ, MS, KEYFRAMES, DECLARATION, hash, charat, strlen, indexof, stringify, rulesheet, middleware, compile } from 'stylis';\nimport '@emotion/weak-memoize';\nimport '@emotion/memoize';\n\nvar identifierWithPointTracking = function identifierWithPointTracking(begin, points, index) {\n var previous = 0;\n var character = 0;\n\n while (true) {\n previous = character;\n character = peek(); // &\\f\n\n if (previous === 38 && character === 12) {\n points[index] = 1;\n }\n\n if (token(character)) {\n break;\n }\n\n next();\n }\n\n return slice(begin, position);\n};\n\nvar toRules = function toRules(parsed, points) {\n // pretend we've started with a comma\n var index = -1;\n var character = 44;\n\n do {\n switch (token(character)) {\n case 0:\n // &\\f\n if (character === 38 && peek() === 12) {\n // this is not 100% correct, we don't account for literal sequences here - like for example quoted strings\n // stylis inserts \\f after & to know when & where it should replace this sequence with the context selector\n // and when it should just concatenate the outer and inner selectors\n // it's very unlikely for this sequence to actually appear in a different context, so we just leverage this fact here\n points[index] = 1;\n }\n\n parsed[index] += identifierWithPointTracking(position - 1, points, index);\n break;\n\n case 2:\n parsed[index] += delimit(character);\n break;\n\n case 4:\n // comma\n if (character === 44) {\n // colon\n parsed[++index] = peek() === 58 ? '&\\f' : '';\n points[index] = parsed[index].length;\n break;\n }\n\n // fallthrough\n\n default:\n parsed[index] += from(character);\n }\n } while (character = next());\n\n return parsed;\n};\n\nvar getRules = function getRules(value, points) {\n return dealloc(toRules(alloc(value), points));\n}; // WeakSet would be more appropriate, but only WeakMap is supported in IE11\n\n\nvar fixedElements = /* #__PURE__ */new WeakMap();\nvar compat = function compat(element) {\n if (element.type !== 'rule' || !element.parent || // positive .length indicates that this rule contains pseudo\n // negative .length indicates that this rule has been already prefixed\n element.length < 1) {\n return;\n }\n\n var value = element.value;\n var parent = element.parent;\n var isImplicitRule = element.column === parent.column && element.line === parent.line;\n\n while (parent.type !== 'rule') {\n parent = parent.parent;\n if (!parent) return;\n } // short-circuit for the simplest case\n\n\n if (element.props.length === 1 && value.charCodeAt(0) !== 58\n /* colon */\n && !fixedElements.get(parent)) {\n return;\n } // if this is an implicitly inserted rule (the one eagerly inserted at the each new nested level)\n // then the props has already been manipulated beforehand as they that array is shared between it and its \"rule parent\"\n\n\n if (isImplicitRule) {\n return;\n }\n\n fixedElements.set(element, true);\n var points = [];\n var rules = getRules(value, points);\n var parentRules = parent.props;\n\n for (var i = 0, k = 0; i < rules.length; i++) {\n for (var j = 0; j < parentRules.length; j++, k++) {\n element.props[k] = points[i] ? rules[i].replace(/&\\f/g, parentRules[j]) : parentRules[j] + \" \" + rules[i];\n }\n }\n};\nvar removeLabel = function removeLabel(element) {\n if (element.type === 'decl') {\n var value = element.value;\n\n if ( // charcode for l\n value.charCodeAt(0) === 108 && // charcode for b\n value.charCodeAt(2) === 98) {\n // this ignores label\n element[\"return\"] = '';\n element.value = '';\n }\n }\n};\n\n/* eslint-disable no-fallthrough */\n\nfunction prefix(value, length) {\n switch (hash(value, length)) {\n // color-adjust\n case 5103:\n return WEBKIT + 'print-' + value + value;\n // animation, animation-(delay|direction|duration|fill-mode|iteration-count|name|play-state|timing-function)\n\n case 5737:\n case 4201:\n case 3177:\n case 3433:\n case 1641:\n case 4457:\n case 2921: // text-decoration, filter, clip-path, backface-visibility, column, box-decoration-break\n\n case 5572:\n case 6356:\n case 5844:\n case 3191:\n case 6645:\n case 3005: // mask, mask-image, mask-(mode|clip|size), mask-(repeat|origin), mask-position, mask-composite,\n\n case 6391:\n case 5879:\n case 5623:\n case 6135:\n case 4599:\n case 4855: // background-clip, columns, column-(count|fill|gap|rule|rule-color|rule-style|rule-width|span|width)\n\n case 4215:\n case 6389:\n case 5109:\n case 5365:\n case 5621:\n case 3829:\n return WEBKIT + value + value;\n // appearance, user-select, transform, hyphens, text-size-adjust\n\n case 5349:\n case 4246:\n case 4810:\n case 6968:\n case 2756:\n return WEBKIT + value + MOZ + value + MS + value + value;\n // flex, flex-direction\n\n case 6828:\n case 4268:\n return WEBKIT + value + MS + value + value;\n // order\n\n case 6165:\n return WEBKIT + value + MS + 'flex-' + value + value;\n // align-items\n\n case 5187:\n return WEBKIT + value + replace(value, /(\\w+).+(:[^]+)/, WEBKIT + 'box-$1$2' + MS + 'flex-$1$2') + value;\n // align-self\n\n case 5443:\n return WEBKIT + value + MS + 'flex-item-' + replace(value, /flex-|-self/, '') + value;\n // align-content\n\n case 4675:\n return WEBKIT + value + MS + 'flex-line-pack' + replace(value, /align-content|flex-|-self/, '') + value;\n // flex-shrink\n\n case 5548:\n return WEBKIT + value + MS + replace(value, 'shrink', 'negative') + value;\n // flex-basis\n\n case 5292:\n return WEBKIT + value + MS + replace(value, 'basis', 'preferred-size') + value;\n // flex-grow\n\n case 6060:\n return WEBKIT + 'box-' + replace(value, '-grow', '') + WEBKIT + value + MS + replace(value, 'grow', 'positive') + value;\n // transition\n\n case 4554:\n return WEBKIT + replace(value, /([^-])(transform)/g, '$1' + WEBKIT + '$2') + value;\n // cursor\n\n case 6187:\n return replace(replace(replace(value, /(zoom-|grab)/, WEBKIT + '$1'), /(image-set)/, WEBKIT + '$1'), value, '') + value;\n // background, background-image\n\n case 5495:\n case 3959:\n return replace(value, /(image-set\\([^]*)/, WEBKIT + '$1' + '$`$1');\n // justify-content\n\n case 4968:\n return replace(replace(value, /(.+:)(flex-)?(.*)/, WEBKIT + 'box-pack:$3' + MS + 'flex-pack:$3'), /s.+-b[^;]+/, 'justify') + WEBKIT + value + value;\n // (margin|padding)-inline-(start|end)\n\n case 4095:\n case 3583:\n case 4068:\n case 2532:\n return replace(value, /(.+)-inline(.+)/, WEBKIT + '$1$2') + value;\n // (min|max)?(width|height|inline-size|block-size)\n\n case 8116:\n case 7059:\n case 5753:\n case 5535:\n case 5445:\n case 5701:\n case 4933:\n case 4677:\n case 5533:\n case 5789:\n case 5021:\n case 4765:\n // stretch, max-content, min-content, fill-available\n if (strlen(value) - 1 - length > 6) switch (charat(value, length + 1)) {\n // (m)ax-content, (m)in-content\n case 109:\n // -\n if (charat(value, length + 4) !== 45) break;\n // (f)ill-available, (f)it-content\n\n case 102:\n return replace(value, /(.+:)(.+)-([^]+)/, '$1' + WEBKIT + '$2-$3' + '$1' + MOZ + (charat(value, length + 3) == 108 ? '$3' : '$2-$3')) + value;\n // (s)tretch\n\n case 115:\n return ~indexof(value, 'stretch') ? prefix(replace(value, 'stretch', 'fill-available'), length) + value : value;\n }\n break;\n // position: sticky\n\n case 4949:\n // (s)ticky?\n if (charat(value, length + 1) !== 115) break;\n // display: (flex|inline-flex)\n\n case 6444:\n switch (charat(value, strlen(value) - 3 - (~indexof(value, '!important') && 10))) {\n // stic(k)y\n case 107:\n return replace(value, ':', ':' + WEBKIT) + value;\n // (inline-)?fl(e)x\n\n case 101:\n return replace(value, /(.+:)([^;!]+)(;|!.+)?/, '$1' + WEBKIT + (charat(value, 14) === 45 ? 'inline-' : '') + 'box$3' + '$1' + WEBKIT + '$2$3' + '$1' + MS + '$2box$3') + value;\n }\n\n break;\n // writing-mode\n\n case 5936:\n switch (charat(value, length + 11)) {\n // vertical-l(r)\n case 114:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb') + value;\n // vertical-r(l)\n\n case 108:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'tb-rl') + value;\n // horizontal(-)tb\n\n case 45:\n return WEBKIT + value + MS + replace(value, /[svh]\\w+-[tblr]{2}/, 'lr') + value;\n }\n\n return WEBKIT + value + MS + value + value;\n }\n\n return value;\n}\n\nvar prefixer = function prefixer(element, index, children, callback) {\n if (element.length > -1) if (!element[\"return\"]) switch (element.type) {\n case DECLARATION:\n element[\"return\"] = prefix(element.value, element.length);\n break;\n\n case KEYFRAMES:\n return serialize([copy(element, {\n value: replace(element.value, '@', '@' + WEBKIT)\n })], callback);\n\n case RULESET:\n if (element.length) return combine(element.props, function (value) {\n switch (match(value, /(::plac\\w+|:read-\\w+)/)) {\n // :read-(only|write)\n case ':read-only':\n case ':read-write':\n return serialize([copy(element, {\n props: [replace(value, /:(read-\\w+)/, ':' + MOZ + '$1')]\n })], callback);\n // :placeholder\n\n case '::placeholder':\n return serialize([copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + WEBKIT + 'input-$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, ':' + MOZ + '$1')]\n }), copy(element, {\n props: [replace(value, /:(plac\\w+)/, MS + 'input-$1')]\n })], callback);\n }\n\n return '';\n });\n }\n};\n\nvar defaultStylisPlugins = [prefixer];\n\nvar createCache = function createCache(options) {\n var key = options.key;\n\n if (key === 'css') {\n var ssrStyles = document.querySelectorAll(\"style[data-emotion]:not([data-s])\"); // get SSRed styles out of the way of React's hydration\n // document.head is a safe place to move them to(though note document.head is not necessarily the last place they will be)\n // note this very very intentionally targets all style elements regardless of the key to ensure\n // that creating a cache works inside of render of a React component\n\n Array.prototype.forEach.call(ssrStyles, function (node) {\n // we want to only move elements which have a space in the data-emotion attribute value\n // because that indicates that it is an Emotion 11 server-side rendered style elements\n // while we will already ignore Emotion 11 client-side inserted styles because of the :not([data-s]) part in the selector\n // Emotion 10 client-side inserted styles did not have data-s (but importantly did not have a space in their data-emotion attributes)\n // so checking for the space ensures that loading Emotion 11 after Emotion 10 has inserted some styles\n // will not result in the Emotion 10 styles being destroyed\n var dataEmotionAttribute = node.getAttribute('data-emotion');\n\n if (dataEmotionAttribute.indexOf(' ') === -1) {\n return;\n }\n\n document.head.appendChild(node);\n node.setAttribute('data-s', '');\n });\n }\n\n var stylisPlugins = options.stylisPlugins || defaultStylisPlugins;\n\n var inserted = {};\n var container;\n var nodesToHydrate = [];\n\n {\n container = options.container || document.head;\n Array.prototype.forEach.call( // this means we will ignore elements which don't have a space in them which\n // means that the style elements we're looking at are only Emotion 11 server-rendered style elements\n document.querySelectorAll(\"style[data-emotion^=\\\"\" + key + \" \\\"]\"), function (node) {\n var attrib = node.getAttribute(\"data-emotion\").split(' ');\n\n for (var i = 1; i < attrib.length; i++) {\n inserted[attrib[i]] = true;\n }\n\n nodesToHydrate.push(node);\n });\n }\n\n var _insert;\n\n var omnipresentPlugins = [compat, removeLabel];\n\n {\n var currentSheet;\n var finalizingPlugins = [stringify, rulesheet(function (rule) {\n currentSheet.insert(rule);\n })];\n var serializer = middleware(omnipresentPlugins.concat(stylisPlugins, finalizingPlugins));\n\n var stylis = function stylis(styles) {\n return serialize(compile(styles), serializer);\n };\n\n _insert = function insert(selector, serialized, sheet, shouldCache) {\n currentSheet = sheet;\n\n stylis(selector ? selector + \"{\" + serialized.styles + \"}\" : serialized.styles);\n\n if (shouldCache) {\n cache.inserted[serialized.name] = true;\n }\n };\n }\n\n var cache = {\n key: key,\n sheet: new StyleSheet({\n key: key,\n container: container,\n nonce: options.nonce,\n speedy: options.speedy,\n prepend: options.prepend,\n insertionPoint: options.insertionPoint\n }),\n nonce: options.nonce,\n inserted: inserted,\n registered: {},\n insert: _insert\n };\n cache.sheet.hydrate(nodesToHydrate);\n return cache;\n};\n\nexport { createCache as default };\n","/** @license React v16.13.1\n * react-is.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';var b=\"function\"===typeof Symbol&&Symbol.for,c=b?Symbol.for(\"react.element\"):60103,d=b?Symbol.for(\"react.portal\"):60106,e=b?Symbol.for(\"react.fragment\"):60107,f=b?Symbol.for(\"react.strict_mode\"):60108,g=b?Symbol.for(\"react.profiler\"):60114,h=b?Symbol.for(\"react.provider\"):60109,k=b?Symbol.for(\"react.context\"):60110,l=b?Symbol.for(\"react.async_mode\"):60111,m=b?Symbol.for(\"react.concurrent_mode\"):60111,n=b?Symbol.for(\"react.forward_ref\"):60112,p=b?Symbol.for(\"react.suspense\"):60113,q=b?\nSymbol.for(\"react.suspense_list\"):60120,r=b?Symbol.for(\"react.memo\"):60115,t=b?Symbol.for(\"react.lazy\"):60116,v=b?Symbol.for(\"react.block\"):60121,w=b?Symbol.for(\"react.fundamental\"):60117,x=b?Symbol.for(\"react.responder\"):60118,y=b?Symbol.for(\"react.scope\"):60119;\nfunction z(a){if(\"object\"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e:case g:case f:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t:case r:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}exports.AsyncMode=l;exports.ConcurrentMode=m;exports.ContextConsumer=k;exports.ContextProvider=h;exports.Element=c;exports.ForwardRef=n;exports.Fragment=e;exports.Lazy=t;exports.Memo=r;exports.Portal=d;\nexports.Profiler=g;exports.StrictMode=f;exports.Suspense=p;exports.isAsyncMode=function(a){return A(a)||z(a)===l};exports.isConcurrentMode=A;exports.isContextConsumer=function(a){return z(a)===k};exports.isContextProvider=function(a){return z(a)===h};exports.isElement=function(a){return\"object\"===typeof a&&null!==a&&a.$$typeof===c};exports.isForwardRef=function(a){return z(a)===n};exports.isFragment=function(a){return z(a)===e};exports.isLazy=function(a){return z(a)===t};\nexports.isMemo=function(a){return z(a)===r};exports.isPortal=function(a){return z(a)===d};exports.isProfiler=function(a){return z(a)===g};exports.isStrictMode=function(a){return z(a)===f};exports.isSuspense=function(a){return z(a)===p};\nexports.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||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};exports.typeOf=z;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.min.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","'use strict';\n\nvar reactIs = require('react-is');\n\n/**\n * Copyright 2015, Yahoo! Inc.\n * Copyrights licensed under the New BSD License. See the accompanying LICENSE file for terms.\n */\nvar REACT_STATICS = {\n childContextTypes: true,\n contextType: true,\n contextTypes: true,\n defaultProps: true,\n displayName: true,\n getDefaultProps: true,\n getDerivedStateFromError: true,\n getDerivedStateFromProps: true,\n mixins: true,\n propTypes: true,\n type: true\n};\nvar KNOWN_STATICS = {\n name: true,\n length: true,\n prototype: true,\n caller: true,\n callee: true,\n arguments: true,\n arity: true\n};\nvar FORWARD_REF_STATICS = {\n '$$typeof': true,\n render: true,\n defaultProps: true,\n displayName: true,\n propTypes: true\n};\nvar MEMO_STATICS = {\n '$$typeof': true,\n compare: true,\n defaultProps: true,\n displayName: true,\n propTypes: true,\n type: true\n};\nvar TYPE_STATICS = {};\nTYPE_STATICS[reactIs.ForwardRef] = FORWARD_REF_STATICS;\nTYPE_STATICS[reactIs.Memo] = MEMO_STATICS;\n\nfunction getStatics(component) {\n // React v16.11 and below\n if (reactIs.isMemo(component)) {\n return MEMO_STATICS;\n } // React v16.12 and above\n\n\n return TYPE_STATICS[component['$$typeof']] || REACT_STATICS;\n}\n\nvar defineProperty = Object.defineProperty;\nvar getOwnPropertyNames = Object.getOwnPropertyNames;\nvar getOwnPropertySymbols = Object.getOwnPropertySymbols;\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\nvar getPrototypeOf = Object.getPrototypeOf;\nvar objectPrototype = Object.prototype;\nfunction hoistNonReactStatics(targetComponent, sourceComponent, blacklist) {\n if (typeof sourceComponent !== 'string') {\n // don't hoist over string (html) components\n if (objectPrototype) {\n var inheritedComponent = getPrototypeOf(sourceComponent);\n\n if (inheritedComponent && inheritedComponent !== objectPrototype) {\n hoistNonReactStatics(targetComponent, inheritedComponent, blacklist);\n }\n }\n\n var keys = getOwnPropertyNames(sourceComponent);\n\n if (getOwnPropertySymbols) {\n keys = keys.concat(getOwnPropertySymbols(sourceComponent));\n }\n\n var targetStatics = getStatics(targetComponent);\n var sourceStatics = getStatics(sourceComponent);\n\n for (var i = 0; i < keys.length; ++i) {\n var key = keys[i];\n\n if (!KNOWN_STATICS[key] && !(blacklist && blacklist[key]) && !(sourceStatics && sourceStatics[key]) && !(targetStatics && targetStatics[key])) {\n var descriptor = getOwnPropertyDescriptor(sourceComponent, key);\n\n try {\n // Avoid failures from read-only properties\n defineProperty(targetComponent, key, descriptor);\n } catch (e) {}\n }\n }\n }\n\n return targetComponent;\n}\n\nmodule.exports = hoistNonReactStatics;\n","var isBrowser = true;\n\nfunction getRegisteredStyles(registered, registeredStyles, classNames) {\n var rawClassName = '';\n classNames.split(' ').forEach(function (className) {\n if (registered[className] !== undefined) {\n registeredStyles.push(registered[className] + \";\");\n } else if (className) {\n rawClassName += className + \" \";\n }\n });\n return rawClassName;\n}\nvar registerStyles = function registerStyles(cache, serialized, isStringTag) {\n var className = cache.key + \"-\" + serialized.name;\n\n if ( // we only need to add the styles to the registered cache if the\n // class name could be used further down\n // the tree but if it's a string tag, we know it won't\n // so we don't have to add it to registered cache.\n // this improves memory usage since we can avoid storing the whole style string\n (isStringTag === false || // we need to always store it if we're in compat mode and\n // in node since emotion-server relies on whether a style is in\n // the registered cache to know whether a style is global or not\n // also, note that this check will be dead code eliminated in the browser\n isBrowser === false ) && cache.registered[className] === undefined) {\n cache.registered[className] = serialized.styles;\n }\n};\nvar insertStyles = function insertStyles(cache, serialized, isStringTag) {\n registerStyles(cache, serialized, isStringTag);\n var className = cache.key + \"-\" + serialized.name;\n\n if (cache.inserted[serialized.name] === undefined) {\n var current = serialized;\n\n do {\n cache.insert(serialized === current ? \".\" + className : '', current, cache.sheet, true);\n\n current = current.next;\n } while (current !== undefined);\n }\n};\n\nexport { getRegisteredStyles, insertStyles, registerStyles };\n","/* eslint-disable */\n// Inspired by https://github.com/garycourt/murmurhash-js\n// Ported from https://github.com/aappleby/smhasher/blob/61a0530f28277f2e850bfc39600ce61d02b518de/src/MurmurHash2.cpp#L37-L86\nfunction murmur2(str) {\n // 'm' and 'r' are mixing constants generated offline.\n // They're not really 'magic', they just happen to work well.\n // const m = 0x5bd1e995;\n // const r = 24;\n // Initialize the hash\n var h = 0; // Mix 4 bytes at a time into the hash\n\n var k,\n i = 0,\n len = str.length;\n\n for (; len >= 4; ++i, len -= 4) {\n k = str.charCodeAt(i) & 0xff | (str.charCodeAt(++i) & 0xff) << 8 | (str.charCodeAt(++i) & 0xff) << 16 | (str.charCodeAt(++i) & 0xff) << 24;\n k =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16);\n k ^=\n /* k >>> r: */\n k >>> 24;\n h =\n /* Math.imul(k, m): */\n (k & 0xffff) * 0x5bd1e995 + ((k >>> 16) * 0xe995 << 16) ^\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Handle the last few bytes of the input array\n\n\n switch (len) {\n case 3:\n h ^= (str.charCodeAt(i + 2) & 0xff) << 16;\n\n case 2:\n h ^= (str.charCodeAt(i + 1) & 0xff) << 8;\n\n case 1:\n h ^= str.charCodeAt(i) & 0xff;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n } // Do a few final mixes of the hash to ensure the last few\n // bytes are well-incorporated.\n\n\n h ^= h >>> 13;\n h =\n /* Math.imul(h, m): */\n (h & 0xffff) * 0x5bd1e995 + ((h >>> 16) * 0xe995 << 16);\n return ((h ^ h >>> 15) >>> 0).toString(36);\n}\n\nexport { murmur2 as default };\n","var unitlessKeys = {\n animationIterationCount: 1,\n aspectRatio: 1,\n borderImageOutset: 1,\n borderImageSlice: 1,\n borderImageWidth: 1,\n boxFlex: 1,\n boxFlexGroup: 1,\n boxOrdinalGroup: 1,\n columnCount: 1,\n columns: 1,\n flex: 1,\n flexGrow: 1,\n flexPositive: 1,\n flexShrink: 1,\n flexNegative: 1,\n flexOrder: 1,\n gridRow: 1,\n gridRowEnd: 1,\n gridRowSpan: 1,\n gridRowStart: 1,\n gridColumn: 1,\n gridColumnEnd: 1,\n gridColumnSpan: 1,\n gridColumnStart: 1,\n msGridRow: 1,\n msGridRowSpan: 1,\n msGridColumn: 1,\n msGridColumnSpan: 1,\n fontWeight: 1,\n lineHeight: 1,\n opacity: 1,\n order: 1,\n orphans: 1,\n scale: 1,\n tabSize: 1,\n widows: 1,\n zIndex: 1,\n zoom: 1,\n WebkitLineClamp: 1,\n // SVG-related properties\n fillOpacity: 1,\n floodOpacity: 1,\n stopOpacity: 1,\n strokeDasharray: 1,\n strokeDashoffset: 1,\n strokeMiterlimit: 1,\n strokeOpacity: 1,\n strokeWidth: 1\n};\n\nexport { unitlessKeys as default };\n","import hashString from '@emotion/hash';\nimport unitless from '@emotion/unitless';\nimport memoize from '@emotion/memoize';\n\nvar isDevelopment = false;\n\nvar hyphenateRegex = /[A-Z]|^ms/g;\nvar animationRegex = /_EMO_([^_]+?)_([^]*?)_EMO_/g;\n\nvar isCustomProperty = function isCustomProperty(property) {\n return property.charCodeAt(1) === 45;\n};\n\nvar isProcessableValue = function isProcessableValue(value) {\n return value != null && typeof value !== 'boolean';\n};\n\nvar processStyleName = /* #__PURE__ */memoize(function (styleName) {\n return isCustomProperty(styleName) ? styleName : styleName.replace(hyphenateRegex, '-$&').toLowerCase();\n});\n\nvar processStyleValue = function processStyleValue(key, value) {\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n if (typeof value === 'string') {\n return value.replace(animationRegex, function (match, p1, p2) {\n cursor = {\n name: p1,\n styles: p2,\n next: cursor\n };\n return p1;\n });\n }\n }\n }\n\n if (unitless[key] !== 1 && !isCustomProperty(key) && typeof value === 'number' && value !== 0) {\n return value + 'px';\n }\n\n return value;\n};\n\nvar noComponentSelectorMessage = 'Component selectors can only be used in conjunction with ' + '@emotion/babel-plugin, the swc Emotion plugin, or another Emotion-aware ' + 'compiler transform.';\n\nfunction handleInterpolation(mergedProps, registered, interpolation) {\n if (interpolation == null) {\n return '';\n }\n\n var componentSelector = interpolation;\n\n if (componentSelector.__emotion_styles !== undefined) {\n\n return componentSelector;\n }\n\n switch (typeof interpolation) {\n case 'boolean':\n {\n return '';\n }\n\n case 'object':\n {\n var keyframes = interpolation;\n\n if (keyframes.anim === 1) {\n cursor = {\n name: keyframes.name,\n styles: keyframes.styles,\n next: cursor\n };\n return keyframes.name;\n }\n\n var serializedStyles = interpolation;\n\n if (serializedStyles.styles !== undefined) {\n var next = serializedStyles.next;\n\n if (next !== undefined) {\n // not the most efficient thing ever but this is a pretty rare case\n // and there will be very few iterations of this generally\n while (next !== undefined) {\n cursor = {\n name: next.name,\n styles: next.styles,\n next: cursor\n };\n next = next.next;\n }\n }\n\n var styles = serializedStyles.styles + \";\";\n return styles;\n }\n\n return createStringFromObject(mergedProps, registered, interpolation);\n }\n\n case 'function':\n {\n if (mergedProps !== undefined) {\n var previousCursor = cursor;\n var result = interpolation(mergedProps);\n cursor = previousCursor;\n return handleInterpolation(mergedProps, registered, result);\n }\n\n break;\n }\n } // finalize string values (regular strings and functions interpolated into css calls)\n\n\n var asString = interpolation;\n\n if (registered == null) {\n return asString;\n }\n\n var cached = registered[asString];\n return cached !== undefined ? cached : asString;\n}\n\nfunction createStringFromObject(mergedProps, registered, obj) {\n var string = '';\n\n if (Array.isArray(obj)) {\n for (var i = 0; i < obj.length; i++) {\n string += handleInterpolation(mergedProps, registered, obj[i]) + \";\";\n }\n } else {\n for (var key in obj) {\n var value = obj[key];\n\n if (typeof value !== 'object') {\n var asString = value;\n\n if (registered != null && registered[asString] !== undefined) {\n string += key + \"{\" + registered[asString] + \"}\";\n } else if (isProcessableValue(asString)) {\n string += processStyleName(key) + \":\" + processStyleValue(key, asString) + \";\";\n }\n } else {\n if (key === 'NO_COMPONENT_SELECTOR' && isDevelopment) {\n throw new Error(noComponentSelectorMessage);\n }\n\n if (Array.isArray(value) && typeof value[0] === 'string' && (registered == null || registered[value[0]] === undefined)) {\n for (var _i = 0; _i < value.length; _i++) {\n if (isProcessableValue(value[_i])) {\n string += processStyleName(key) + \":\" + processStyleValue(key, value[_i]) + \";\";\n }\n }\n } else {\n var interpolated = handleInterpolation(mergedProps, registered, value);\n\n switch (key) {\n case 'animation':\n case 'animationName':\n {\n string += processStyleName(key) + \":\" + interpolated + \";\";\n break;\n }\n\n default:\n {\n\n string += key + \"{\" + interpolated + \"}\";\n }\n }\n }\n }\n }\n }\n\n return string;\n}\n\nvar labelPattern = /label:\\s*([^\\s;{]+)\\s*(;|$)/g; // this is the cursor for keyframes\n// keyframes are stored on the SerializedStyles object as a linked list\n\nvar cursor;\nfunction serializeStyles(args, registered, mergedProps) {\n if (args.length === 1 && typeof args[0] === 'object' && args[0] !== null && args[0].styles !== undefined) {\n return args[0];\n }\n\n var stringMode = true;\n var styles = '';\n cursor = undefined;\n var strings = args[0];\n\n if (strings == null || strings.raw === undefined) {\n stringMode = false;\n styles += handleInterpolation(mergedProps, registered, strings);\n } else {\n var asTemplateStringsArr = strings;\n\n styles += asTemplateStringsArr[0];\n } // we start at 1 since we've already handled the first arg\n\n\n for (var i = 1; i < args.length; i++) {\n styles += handleInterpolation(mergedProps, registered, args[i]);\n\n if (stringMode) {\n var templateStringsArr = strings;\n\n styles += templateStringsArr[i];\n }\n } // using a global regex with .exec is stateful so lastIndex has to be reset each time\n\n\n labelPattern.lastIndex = 0;\n var identifierName = '';\n var match; // https://esbench.com/bench/5b809c2cf2949800a0f61fb5\n\n while ((match = labelPattern.exec(styles)) !== null) {\n identifierName += '-' + match[1];\n }\n\n var name = hashString(styles) + identifierName;\n\n return {\n name: name,\n styles: styles,\n next: cursor\n };\n}\n\nexport { serializeStyles };\n","import * as React from 'react';\n\nvar syncFallback = function syncFallback(create) {\n return create();\n};\n\nvar useInsertionEffect = React['useInsertion' + 'Effect'] ? React['useInsertion' + 'Effect'] : false;\nvar useInsertionEffectAlwaysWithSyncFallback = useInsertionEffect || syncFallback;\nvar useInsertionEffectWithLayoutFallback = useInsertionEffect || React.useLayoutEffect;\n\nexport { useInsertionEffectAlwaysWithSyncFallback, useInsertionEffectWithLayoutFallback };\n","import * as React from 'react';\nimport { useContext, forwardRef } from 'react';\nimport createCache from '@emotion/cache';\nimport _extends from '@babel/runtime/helpers/esm/extends';\nimport weakMemoize from '@emotion/weak-memoize';\nimport hoistNonReactStatics from '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\n\nvar isDevelopment = false;\n\nvar EmotionCacheContext = /* #__PURE__ */React.createContext( // we're doing this to avoid preconstruct's dead code elimination in this one case\n// because this module is primarily intended for the browser and node\n// but it's also required in react native and similar environments sometimes\n// and we could have a special build just for that\n// but this is much easier and the native packages\n// might use a different theme context in the future anyway\ntypeof HTMLElement !== 'undefined' ? /* #__PURE__ */createCache({\n key: 'css'\n}) : null);\n\nvar CacheProvider = EmotionCacheContext.Provider;\nvar __unsafe_useEmotionCache = function useEmotionCache() {\n return useContext(EmotionCacheContext);\n};\n\nvar withEmotionCache = function withEmotionCache(func) {\n return /*#__PURE__*/forwardRef(function (props, ref) {\n // the cache will never be null in the browser\n var cache = useContext(EmotionCacheContext);\n return func(props, cache, ref);\n });\n};\n\nvar ThemeContext = /* #__PURE__ */React.createContext({});\n\nvar useTheme = function useTheme() {\n return React.useContext(ThemeContext);\n};\n\nvar getTheme = function getTheme(outerTheme, theme) {\n if (typeof theme === 'function') {\n var mergedTheme = theme(outerTheme);\n\n return mergedTheme;\n }\n\n return _extends({}, outerTheme, theme);\n};\n\nvar createCacheWithTheme = /* #__PURE__ */weakMemoize(function (outerTheme) {\n return weakMemoize(function (theme) {\n return getTheme(outerTheme, theme);\n });\n});\nvar ThemeProvider = function ThemeProvider(props) {\n var theme = React.useContext(ThemeContext);\n\n if (props.theme !== theme) {\n theme = createCacheWithTheme(theme)(props.theme);\n }\n\n return /*#__PURE__*/React.createElement(ThemeContext.Provider, {\n value: theme\n }, props.children);\n};\nfunction withTheme(Component) {\n var componentName = Component.displayName || Component.name || 'Component';\n var WithTheme = /*#__PURE__*/React.forwardRef(function render(props, ref) {\n var theme = React.useContext(ThemeContext);\n return /*#__PURE__*/React.createElement(Component, _extends({\n theme: theme,\n ref: ref\n }, props));\n });\n WithTheme.displayName = \"WithTheme(\" + componentName + \")\";\n return hoistNonReactStatics(WithTheme, Component);\n}\n\nvar hasOwn = {}.hasOwnProperty;\n\nvar typePropName = '__EMOTION_TYPE_PLEASE_DO_NOT_USE__';\nvar createEmotionProps = function createEmotionProps(type, props) {\n\n var newProps = {};\n\n for (var _key in props) {\n if (hasOwn.call(props, _key)) {\n newProps[_key] = props[_key];\n }\n }\n\n newProps[typePropName] = type; // Runtime labeling is an opt-in feature because:\n\n return newProps;\n};\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar Emotion = /* #__PURE__ */withEmotionCache(function (props, cache, ref) {\n var cssProp = props.css; // so that using `css` from `emotion` and passing the result to the css prop works\n // not passing the registered cache to serializeStyles because it would\n // make certain babel optimisations not possible\n\n if (typeof cssProp === 'string' && cache.registered[cssProp] !== undefined) {\n cssProp = cache.registered[cssProp];\n }\n\n var WrappedComponent = props[typePropName];\n var registeredStyles = [cssProp];\n var className = '';\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, registeredStyles, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(registeredStyles, undefined, React.useContext(ThemeContext));\n\n className += cache.key + \"-\" + serialized.name;\n var newProps = {};\n\n for (var _key2 in props) {\n if (hasOwn.call(props, _key2) && _key2 !== 'css' && _key2 !== typePropName && (!isDevelopment )) {\n newProps[_key2] = props[_key2];\n }\n }\n\n newProps.className = className;\n\n if (ref) {\n newProps.ref = ref;\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof WrappedComponent === 'string'\n }), /*#__PURE__*/React.createElement(WrappedComponent, newProps));\n});\n\nvar Emotion$1 = Emotion;\n\nexport { CacheProvider as C, Emotion$1 as E, ThemeContext as T, __unsafe_useEmotionCache as _, ThemeProvider as a, withTheme as b, createEmotionProps as c, hasOwn as h, isDevelopment as i, useTheme as u, withEmotionCache as w };\n","import { h as hasOwn, E as Emotion, c as createEmotionProps, w as withEmotionCache, T as ThemeContext, i as isDevelopment } from './emotion-element-f0de968e.browser.esm.js';\nexport { C as CacheProvider, T as ThemeContext, a as ThemeProvider, _ as __unsafe_useEmotionCache, u as useTheme, w as withEmotionCache, b as withTheme } from './emotion-element-f0de968e.browser.esm.js';\nimport * as React from 'react';\nimport { insertStyles, registerStyles, getRegisteredStyles } from '@emotion/utils';\nimport { useInsertionEffectWithLayoutFallback, useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\nimport { serializeStyles } from '@emotion/serialize';\nimport '@emotion/cache';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/weak-memoize';\nimport '../_isolated-hnrs/dist/emotion-react-_isolated-hnrs.browser.esm.js';\nimport 'hoist-non-react-statics';\n\nvar jsx = function jsx(type, props) {\n // eslint-disable-next-line prefer-rest-params\n var args = arguments;\n\n if (props == null || !hasOwn.call(props, 'css')) {\n return React.createElement.apply(undefined, args);\n }\n\n var argsLength = args.length;\n var createElementArgArray = new Array(argsLength);\n createElementArgArray[0] = Emotion;\n createElementArgArray[1] = createEmotionProps(type, props);\n\n for (var i = 2; i < argsLength; i++) {\n createElementArgArray[i] = args[i];\n }\n\n return React.createElement.apply(null, createElementArgArray);\n};\n\n(function (_jsx) {\n var JSX;\n\n (function (_JSX) {})(JSX || (JSX = _jsx.JSX || (_jsx.JSX = {})));\n})(jsx || (jsx = {}));\n\n// initial render from browser, insertBefore context.sheet.tags[0] or if a style hasn't been inserted there yet, appendChild\n// initial client-side render from SSR, use place of hydrating tag\n\nvar Global = /* #__PURE__ */withEmotionCache(function (props, cache) {\n\n var styles = props.styles;\n var serialized = serializeStyles([styles], undefined, React.useContext(ThemeContext));\n // but it is based on a constant that will never change at runtime\n // it's effectively like having two implementations and switching them out\n // so it's not actually breaking anything\n\n\n var sheetRef = React.useRef();\n useInsertionEffectWithLayoutFallback(function () {\n var key = cache.key + \"-global\"; // use case of https://github.com/emotion-js/emotion/issues/2675\n\n var sheet = new cache.sheet.constructor({\n key: key,\n nonce: cache.sheet.nonce,\n container: cache.sheet.container,\n speedy: cache.sheet.isSpeedy\n });\n var rehydrating = false;\n var node = document.querySelector(\"style[data-emotion=\\\"\" + key + \" \" + serialized.name + \"\\\"]\");\n\n if (cache.sheet.tags.length) {\n sheet.before = cache.sheet.tags[0];\n }\n\n if (node !== null) {\n rehydrating = true; // clear the hash so this node won't be recognizable as rehydratable by other s\n\n node.setAttribute('data-emotion', key);\n sheet.hydrate([node]);\n }\n\n sheetRef.current = [sheet, rehydrating];\n return function () {\n sheet.flush();\n };\n }, [cache]);\n useInsertionEffectWithLayoutFallback(function () {\n var sheetRefCurrent = sheetRef.current;\n var sheet = sheetRefCurrent[0],\n rehydrating = sheetRefCurrent[1];\n\n if (rehydrating) {\n sheetRefCurrent[1] = false;\n return;\n }\n\n if (serialized.next !== undefined) {\n // insert keyframes\n insertStyles(cache, serialized.next, true);\n }\n\n if (sheet.tags.length) {\n // if this doesn't exist then it will be null so the style element will be appended\n var element = sheet.tags[sheet.tags.length - 1].nextElementSibling;\n sheet.before = element;\n sheet.flush();\n }\n\n cache.insert(\"\", serialized, sheet, false);\n }, [cache, serialized.name]);\n return null;\n});\n\nfunction css() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return serializeStyles(args);\n}\n\nfunction keyframes() {\n var insertable = css.apply(void 0, arguments);\n var name = \"animation-\" + insertable.name;\n return {\n name: name,\n styles: \"@keyframes \" + name + \"{\" + insertable.styles + \"}\",\n anim: 1,\n toString: function toString() {\n return \"_EMO_\" + this.name + \"_\" + this.styles + \"_EMO_\";\n }\n };\n}\n\nvar classnames = function classnames(args) {\n var len = args.length;\n var i = 0;\n var cls = '';\n\n for (; i < len; i++) {\n var arg = args[i];\n if (arg == null) continue;\n var toAdd = void 0;\n\n switch (typeof arg) {\n case 'boolean':\n break;\n\n case 'object':\n {\n if (Array.isArray(arg)) {\n toAdd = classnames(arg);\n } else {\n\n toAdd = '';\n\n for (var k in arg) {\n if (arg[k] && k) {\n toAdd && (toAdd += ' ');\n toAdd += k;\n }\n }\n }\n\n break;\n }\n\n default:\n {\n toAdd = arg;\n }\n }\n\n if (toAdd) {\n cls && (cls += ' ');\n cls += toAdd;\n }\n }\n\n return cls;\n};\n\nfunction merge(registered, css, className) {\n var registeredStyles = [];\n var rawClassName = getRegisteredStyles(registered, registeredStyles, className);\n\n if (registeredStyles.length < 2) {\n return className;\n }\n\n return rawClassName + css(registeredStyles);\n}\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serializedArr = _ref.serializedArr;\n useInsertionEffectAlwaysWithSyncFallback(function () {\n\n for (var i = 0; i < serializedArr.length; i++) {\n insertStyles(cache, serializedArr[i], false);\n }\n });\n\n return null;\n};\n\nvar ClassNames = /* #__PURE__ */withEmotionCache(function (props, cache) {\n var hasRendered = false;\n var serializedArr = [];\n\n var css = function css() {\n if (hasRendered && isDevelopment) {\n throw new Error('css can only be used during render');\n }\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n var serialized = serializeStyles(args, cache.registered);\n serializedArr.push(serialized); // registration has to happen here as the result of this might get consumed by `cx`\n\n registerStyles(cache, serialized, false);\n return cache.key + \"-\" + serialized.name;\n };\n\n var cx = function cx() {\n if (hasRendered && isDevelopment) {\n throw new Error('cx can only be used during render');\n }\n\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return merge(cache.registered, css, classnames(args));\n };\n\n var content = {\n css: css,\n cx: cx,\n theme: React.useContext(ThemeContext)\n };\n var ele = props.children(content);\n hasRendered = true;\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serializedArr: serializedArr\n }), ele);\n});\n\nexport { ClassNames, Global, jsx as createElement, css, jsx, keyframes };\n","import memoize from '@emotion/memoize';\n\n// eslint-disable-next-line no-undef\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|disableRemotePlayback|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar isPropValid = /* #__PURE__ */memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport { isPropValid as default };\n","import _extends from '@babel/runtime/helpers/esm/extends';\nimport { withEmotionCache, ThemeContext } from '@emotion/react';\nimport { serializeStyles } from '@emotion/serialize';\nimport { useInsertionEffectAlwaysWithSyncFallback } from '@emotion/use-insertion-effect-with-fallbacks';\nimport { getRegisteredStyles, registerStyles, insertStyles } from '@emotion/utils';\nimport * as React from 'react';\nimport isPropValid from '@emotion/is-prop-valid';\n\nvar isDevelopment = false;\n\nvar testOmitPropsOnStringTag = isPropValid;\n\nvar testOmitPropsOnComponent = function testOmitPropsOnComponent(key) {\n return key !== 'theme';\n};\n\nvar getDefaultShouldForwardProp = function getDefaultShouldForwardProp(tag) {\n return typeof tag === 'string' && // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96 ? testOmitPropsOnStringTag : testOmitPropsOnComponent;\n};\nvar composeShouldForwardProps = function composeShouldForwardProps(tag, options, isReal) {\n var shouldForwardProp;\n\n if (options) {\n var optionsShouldForwardProp = options.shouldForwardProp;\n shouldForwardProp = tag.__emotion_forwardProp && optionsShouldForwardProp ? function (propName) {\n return tag.__emotion_forwardProp(propName) && optionsShouldForwardProp(propName);\n } : optionsShouldForwardProp;\n }\n\n if (typeof shouldForwardProp !== 'function' && isReal) {\n shouldForwardProp = tag.__emotion_forwardProp;\n }\n\n return shouldForwardProp;\n};\n\nvar Insertion = function Insertion(_ref) {\n var cache = _ref.cache,\n serialized = _ref.serialized,\n isStringTag = _ref.isStringTag;\n registerStyles(cache, serialized, isStringTag);\n useInsertionEffectAlwaysWithSyncFallback(function () {\n return insertStyles(cache, serialized, isStringTag);\n });\n\n return null;\n};\n\nvar createStyled = function createStyled(tag, options) {\n\n var isReal = tag.__emotion_real === tag;\n var baseTag = isReal && tag.__emotion_base || tag;\n var identifierName;\n var targetClassName;\n\n if (options !== undefined) {\n identifierName = options.label;\n targetClassName = options.target;\n }\n\n var shouldForwardProp = composeShouldForwardProps(tag, options, isReal);\n var defaultShouldForwardProp = shouldForwardProp || getDefaultShouldForwardProp(baseTag);\n var shouldUseAs = !defaultShouldForwardProp('as');\n return function () {\n // eslint-disable-next-line prefer-rest-params\n var args = arguments;\n var styles = isReal && tag.__emotion_styles !== undefined ? tag.__emotion_styles.slice(0) : [];\n\n if (identifierName !== undefined) {\n styles.push(\"label:\" + identifierName + \";\");\n }\n\n if (args[0] == null || args[0].raw === undefined) {\n // eslint-disable-next-line prefer-spread\n styles.push.apply(styles, args);\n } else {\n var templateStringsArr = args[0];\n\n styles.push(templateStringsArr[0]);\n var len = args.length;\n var i = 1;\n\n for (; i < len; i++) {\n\n styles.push(args[i], templateStringsArr[i]);\n }\n }\n\n var Styled = withEmotionCache(function (props, cache, ref) {\n var FinalTag = shouldUseAs && props.as || baseTag;\n var className = '';\n var classInterpolations = [];\n var mergedProps = props;\n\n if (props.theme == null) {\n mergedProps = {};\n\n for (var key in props) {\n mergedProps[key] = props[key];\n }\n\n mergedProps.theme = React.useContext(ThemeContext);\n }\n\n if (typeof props.className === 'string') {\n className = getRegisteredStyles(cache.registered, classInterpolations, props.className);\n } else if (props.className != null) {\n className = props.className + \" \";\n }\n\n var serialized = serializeStyles(styles.concat(classInterpolations), cache.registered, mergedProps);\n className += cache.key + \"-\" + serialized.name;\n\n if (targetClassName !== undefined) {\n className += \" \" + targetClassName;\n }\n\n var finalShouldForwardProp = shouldUseAs && shouldForwardProp === undefined ? getDefaultShouldForwardProp(FinalTag) : defaultShouldForwardProp;\n var newProps = {};\n\n for (var _key in props) {\n if (shouldUseAs && _key === 'as') continue;\n\n if (finalShouldForwardProp(_key)) {\n newProps[_key] = props[_key];\n }\n }\n\n newProps.className = className;\n\n if (ref) {\n newProps.ref = ref;\n }\n\n return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Insertion, {\n cache: cache,\n serialized: serialized,\n isStringTag: typeof FinalTag === 'string'\n }), /*#__PURE__*/React.createElement(FinalTag, newProps));\n });\n Styled.displayName = identifierName !== undefined ? identifierName : \"Styled(\" + (typeof baseTag === 'string' ? baseTag : baseTag.displayName || baseTag.name || 'Component') + \")\";\n Styled.defaultProps = tag.defaultProps;\n Styled.__emotion_real = Styled;\n Styled.__emotion_base = baseTag;\n Styled.__emotion_styles = styles;\n Styled.__emotion_forwardProp = shouldForwardProp;\n Object.defineProperty(Styled, 'toString', {\n value: function value() {\n if (targetClassName === undefined && isDevelopment) {\n return 'NO_COMPONENT_SELECTOR';\n }\n\n return \".\" + targetClassName;\n }\n });\n\n Styled.withComponent = function (nextTag, nextOptions) {\n var newStyled = createStyled(nextTag, _extends({}, options, nextOptions, {\n shouldForwardProp: composeShouldForwardProps(Styled, nextOptions, true)\n }));\n return newStyled.apply(void 0, styles);\n };\n\n return Styled;\n };\n};\n\nexport { createStyled as default };\n","import createStyled from '../base/dist/emotion-styled-base.browser.esm.js';\nimport '@babel/runtime/helpers/extends';\nimport '@emotion/react';\nimport '@emotion/serialize';\nimport '@emotion/use-insertion-effect-with-fallbacks';\nimport '@emotion/utils';\nimport 'react';\nimport '@emotion/is-prop-valid';\n\nvar tags = ['a', 'abbr', 'address', 'area', 'article', 'aside', 'audio', 'b', 'base', 'bdi', 'bdo', 'big', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'cite', 'code', 'col', 'colgroup', 'data', 'datalist', 'dd', 'del', 'details', 'dfn', 'dialog', 'div', 'dl', 'dt', 'em', 'embed', 'fieldset', 'figcaption', 'figure', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'iframe', 'img', 'input', 'ins', 'kbd', 'keygen', 'label', 'legend', 'li', 'link', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meta', 'meter', 'nav', 'noscript', 'object', 'ol', 'optgroup', 'option', 'output', 'p', 'param', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'script', 'section', 'select', 'small', 'source', 'span', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'textarea', 'tfoot', 'th', 'thead', 'time', 'title', 'tr', 'track', 'u', 'ul', 'var', 'video', 'wbr', // SVG\n'circle', 'clipPath', 'defs', 'ellipse', 'foreignObject', 'g', 'image', 'line', 'linearGradient', 'mask', 'path', 'pattern', 'polygon', 'polyline', 'radialGradient', 'rect', 'stop', 'svg', 'text', 'tspan'];\n\n// bind it to avoid mutating the original function\nvar newStyled = createStyled.bind(null);\ntags.forEach(function (tagName) {\n newStyled[tagName] = newStyled(tagName);\n});\n\nexport { newStyled as default };\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED';\n\nmodule.exports = ReactPropTypesSecret;\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n'use strict';\n\nvar ReactPropTypesSecret = require('./lib/ReactPropTypesSecret');\n\nfunction emptyFunction() {}\nfunction emptyFunctionWithReset() {}\nemptyFunctionWithReset.resetWarningCache = emptyFunction;\n\nmodule.exports = function() {\n function shim(props, propName, componentName, location, propFullName, secret) {\n if (secret === ReactPropTypesSecret) {\n // It is still safe when called from React.\n return;\n }\n var err = new Error(\n 'Calling PropTypes validators directly is not supported by the `prop-types` package. ' +\n 'Use PropTypes.checkPropTypes() to call them. ' +\n 'Read more at http://fb.me/use-check-prop-types'\n );\n err.name = 'Invariant Violation';\n throw err;\n };\n shim.isRequired = shim;\n function getShim() {\n return shim;\n };\n // Important!\n // Keep this list in sync with production version in `./factoryWithTypeCheckers.js`.\n var ReactPropTypes = {\n array: shim,\n bigint: shim,\n bool: shim,\n func: shim,\n number: shim,\n object: shim,\n string: shim,\n symbol: shim,\n\n any: shim,\n arrayOf: getShim,\n element: shim,\n elementType: shim,\n instanceOf: getShim,\n node: shim,\n objectOf: getShim,\n oneOf: getShim,\n oneOfType: getShim,\n shape: getShim,\n exact: getShim,\n\n checkPropTypes: emptyFunctionWithReset,\n resetWarningCache: emptyFunction\n };\n\n ReactPropTypes.PropTypes = ReactPropTypes;\n\n return ReactPropTypes;\n};\n","/**\n * Copyright (c) 2013-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nif (process.env.NODE_ENV !== 'production') {\n var ReactIs = require('react-is');\n\n // By explicitly using `prop-types` you are opting into new development behavior.\n // http://fb.me/prop-types-in-prod\n var throwOnDirectAccess = true;\n module.exports = require('./factoryWithTypeCheckers')(ReactIs.isElement, throwOnDirectAccess);\n} else {\n // By explicitly using `prop-types` you are opting into new production behavior.\n // http://fb.me/prop-types-in-prod\n module.exports = require('./factoryWithThrowingShims')();\n}\n","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { Global } from '@emotion/react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction isEmpty(obj) {\n return obj === undefined || obj === null || Object.keys(obj).length === 0;\n}\nexport default function GlobalStyles(props) {\n const {\n styles,\n defaultTheme = {}\n } = props;\n const globalStyles = typeof styles === 'function' ? themeInput => styles(isEmpty(themeInput) ? defaultTheme : themeInput) : styles;\n return /*#__PURE__*/_jsx(Global, {\n styles: globalStyles\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GlobalStyles.propTypes = {\n defaultTheme: PropTypes.object,\n styles: PropTypes.oneOfType([PropTypes.array, PropTypes.string, PropTypes.object, PropTypes.func])\n} : void 0;","/**\n * @mui/styled-engine v6.4.3\n *\n * @license MIT\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n/* eslint-disable no-underscore-dangle */\nimport emStyled from '@emotion/styled';\nimport { serializeStyles as emSerializeStyles } from '@emotion/serialize';\nexport default function styled(tag, options) {\n const stylesFactory = emStyled(tag, options);\n if (process.env.NODE_ENV !== 'production') {\n return (...styles) => {\n const component = typeof tag === 'string' ? `\"${tag}\"` : 'component';\n if (styles.length === 0) {\n console.error([`MUI: Seems like you called \\`styled(${component})()\\` without a \\`style\\` argument.`, 'You must provide a `styles` argument: `styled(\"div\")(styleYouForgotToPass)`.'].join('\\n'));\n } else if (styles.some(style => style === undefined)) {\n console.error(`MUI: the styled(${component})(...args) API requires all its args to be defined.`);\n }\n return stylesFactory(...styles);\n };\n }\n return stylesFactory;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function internal_mutateStyles(tag, processor) {\n // Emotion attaches all the styles as `__emotion_styles`.\n // Ref: https://github.com/emotion-js/emotion/blob/16d971d0da229596d6bcc39d282ba9753c9ee7cf/packages/styled/src/base.js#L186\n if (Array.isArray(tag.__emotion_styles)) {\n tag.__emotion_styles = processor(tag.__emotion_styles);\n }\n}\n\n// Emotion only accepts an array, but we want to avoid allocations\nconst wrapper = [];\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function internal_serializeStyles(styles) {\n wrapper[0] = styles;\n return emSerializeStyles(wrapper);\n}\nexport { ThemeContext, keyframes, css } from '@emotion/react';\nexport { default as StyledEngineProvider } from \"./StyledEngineProvider/index.js\";\nexport { default as GlobalStyles } from \"./GlobalStyles/index.js\";","/**\n * @license React\n * react-is.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar REACT_ELEMENT_TYPE = Symbol.for(\"react.transitional.element\"),\n REACT_PORTAL_TYPE = Symbol.for(\"react.portal\"),\n REACT_FRAGMENT_TYPE = Symbol.for(\"react.fragment\"),\n REACT_STRICT_MODE_TYPE = Symbol.for(\"react.strict_mode\"),\n REACT_PROFILER_TYPE = Symbol.for(\"react.profiler\");\nSymbol.for(\"react.provider\");\nvar REACT_CONSUMER_TYPE = Symbol.for(\"react.consumer\"),\n REACT_CONTEXT_TYPE = Symbol.for(\"react.context\"),\n REACT_FORWARD_REF_TYPE = Symbol.for(\"react.forward_ref\"),\n REACT_SUSPENSE_TYPE = Symbol.for(\"react.suspense\"),\n REACT_SUSPENSE_LIST_TYPE = Symbol.for(\"react.suspense_list\"),\n REACT_MEMO_TYPE = Symbol.for(\"react.memo\"),\n REACT_LAZY_TYPE = Symbol.for(\"react.lazy\"),\n REACT_OFFSCREEN_TYPE = Symbol.for(\"react.offscreen\"),\n REACT_CLIENT_REFERENCE = Symbol.for(\"react.client.reference\");\nfunction typeOf(object) {\n if (\"object\" === typeof object && null !== object) {\n var $$typeof = object.$$typeof;\n switch ($$typeof) {\n case REACT_ELEMENT_TYPE:\n switch (((object = object.type), object)) {\n case REACT_FRAGMENT_TYPE:\n case REACT_PROFILER_TYPE:\n case REACT_STRICT_MODE_TYPE:\n case REACT_SUSPENSE_TYPE:\n case REACT_SUSPENSE_LIST_TYPE:\n return object;\n default:\n switch (((object = object && object.$$typeof), object)) {\n case REACT_CONTEXT_TYPE:\n case REACT_FORWARD_REF_TYPE:\n case REACT_LAZY_TYPE:\n case REACT_MEMO_TYPE:\n return object;\n case REACT_CONSUMER_TYPE:\n return object;\n default:\n return $$typeof;\n }\n }\n case REACT_PORTAL_TYPE:\n return $$typeof;\n }\n }\n}\nexports.ContextConsumer = REACT_CONSUMER_TYPE;\nexports.ContextProvider = REACT_CONTEXT_TYPE;\nexports.Element = REACT_ELEMENT_TYPE;\nexports.ForwardRef = REACT_FORWARD_REF_TYPE;\nexports.Fragment = REACT_FRAGMENT_TYPE;\nexports.Lazy = REACT_LAZY_TYPE;\nexports.Memo = REACT_MEMO_TYPE;\nexports.Portal = REACT_PORTAL_TYPE;\nexports.Profiler = REACT_PROFILER_TYPE;\nexports.StrictMode = REACT_STRICT_MODE_TYPE;\nexports.Suspense = REACT_SUSPENSE_TYPE;\nexports.SuspenseList = REACT_SUSPENSE_LIST_TYPE;\nexports.isContextConsumer = function (object) {\n return typeOf(object) === REACT_CONSUMER_TYPE;\n};\nexports.isContextProvider = function (object) {\n return typeOf(object) === REACT_CONTEXT_TYPE;\n};\nexports.isElement = function (object) {\n return (\n \"object\" === typeof object &&\n null !== object &&\n object.$$typeof === REACT_ELEMENT_TYPE\n );\n};\nexports.isForwardRef = function (object) {\n return typeOf(object) === REACT_FORWARD_REF_TYPE;\n};\nexports.isFragment = function (object) {\n return typeOf(object) === REACT_FRAGMENT_TYPE;\n};\nexports.isLazy = function (object) {\n return typeOf(object) === REACT_LAZY_TYPE;\n};\nexports.isMemo = function (object) {\n return typeOf(object) === REACT_MEMO_TYPE;\n};\nexports.isPortal = function (object) {\n return typeOf(object) === REACT_PORTAL_TYPE;\n};\nexports.isProfiler = function (object) {\n return typeOf(object) === REACT_PROFILER_TYPE;\n};\nexports.isStrictMode = function (object) {\n return typeOf(object) === REACT_STRICT_MODE_TYPE;\n};\nexports.isSuspense = function (object) {\n return typeOf(object) === REACT_SUSPENSE_TYPE;\n};\nexports.isSuspenseList = function (object) {\n return typeOf(object) === REACT_SUSPENSE_LIST_TYPE;\n};\nexports.isValidElementType = function (type) {\n return \"string\" === typeof type ||\n \"function\" === typeof type ||\n type === REACT_FRAGMENT_TYPE ||\n type === REACT_PROFILER_TYPE ||\n type === REACT_STRICT_MODE_TYPE ||\n type === REACT_SUSPENSE_TYPE ||\n type === REACT_SUSPENSE_LIST_TYPE ||\n type === REACT_OFFSCREEN_TYPE ||\n (\"object\" === typeof type &&\n null !== type &&\n (type.$$typeof === REACT_LAZY_TYPE ||\n type.$$typeof === REACT_MEMO_TYPE ||\n type.$$typeof === REACT_CONTEXT_TYPE ||\n type.$$typeof === REACT_CONSUMER_TYPE ||\n type.$$typeof === REACT_FORWARD_REF_TYPE ||\n type.$$typeof === REACT_CLIENT_REFERENCE ||\n void 0 !== type.getModuleId))\n ? !0\n : !1;\n};\nexports.typeOf = typeOf;\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-is.production.js');\n} else {\n module.exports = require('./cjs/react-is.development.js');\n}\n","import * as React from 'react';\nimport { isValidElementType } from 'react-is';\n\n// https://github.com/sindresorhus/is-plain-obj/blob/main/index.js\nexport function isPlainObject(item) {\n if (typeof item !== 'object' || item === null) {\n return false;\n }\n const prototype = Object.getPrototypeOf(item);\n return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in item) && !(Symbol.iterator in item);\n}\nfunction deepClone(source) {\n if (/*#__PURE__*/React.isValidElement(source) || isValidElementType(source) || !isPlainObject(source)) {\n return source;\n }\n const output = {};\n Object.keys(source).forEach(key => {\n output[key] = deepClone(source[key]);\n });\n return output;\n}\n\n/**\n * Merge objects deeply.\n * It will shallow copy React elements.\n *\n * If `options.clone` is set to `false` the source object will be merged directly into the target object.\n *\n * @example\n * ```ts\n * deepmerge({ a: { b: 1 }, d: 2 }, { a: { c: 2 }, d: 4 });\n * // => { a: { b: 1, c: 2 }, d: 4 }\n * ````\n *\n * @param target The target object.\n * @param source The source object.\n * @param options The merge options.\n * @param options.clone Set to `false` to merge the source object directly into the target object.\n * @returns The merged object.\n */\nexport default function deepmerge(target, source, options = {\n clone: true\n}) {\n const output = options.clone ? {\n ...target\n } : target;\n if (isPlainObject(target) && isPlainObject(source)) {\n Object.keys(source).forEach(key => {\n if (/*#__PURE__*/React.isValidElement(source[key]) || isValidElementType(source[key])) {\n output[key] = source[key];\n } else if (isPlainObject(source[key]) &&\n // Avoid prototype pollution\n Object.prototype.hasOwnProperty.call(target, key) && isPlainObject(target[key])) {\n // Since `output` is a clone of `target` and we have narrowed `target` in this block we can cast to the same type.\n output[key] = deepmerge(target[key], source[key], options);\n } else if (options.clone) {\n output[key] = isPlainObject(source[key]) ? deepClone(source[key]) : source[key];\n } else {\n output[key] = source[key];\n }\n });\n }\n return output;\n}","// Sorted ASC by size. That's important.\n// It can't be configured as it's used statically for propTypes.\nexport const breakpointKeys = ['xs', 'sm', 'md', 'lg', 'xl'];\nconst sortBreakpointsValues = values => {\n const breakpointsAsArray = Object.keys(values).map(key => ({\n key,\n val: values[key]\n })) || [];\n // Sort in ascending order\n breakpointsAsArray.sort((breakpoint1, breakpoint2) => breakpoint1.val - breakpoint2.val);\n return breakpointsAsArray.reduce((acc, obj) => {\n return {\n ...acc,\n [obj.key]: obj.val\n };\n }, {});\n};\n\n// Keep in mind that @media is inclusive by the CSS specification.\nexport default function createBreakpoints(breakpoints) {\n const {\n // The breakpoint **start** at this value.\n // For instance with the first breakpoint xs: [xs, sm).\n values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n },\n unit = 'px',\n step = 5,\n ...other\n } = breakpoints;\n const sortedValues = sortBreakpointsValues(values);\n const keys = Object.keys(sortedValues);\n function up(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (min-width:${value}${unit})`;\n }\n function down(key) {\n const value = typeof values[key] === 'number' ? values[key] : key;\n return `@media (max-width:${value - step / 100}${unit})`;\n }\n function between(start, end) {\n const endIndex = keys.indexOf(end);\n return `@media (min-width:${typeof values[start] === 'number' ? values[start] : start}${unit}) and ` + `(max-width:${(endIndex !== -1 && typeof values[keys[endIndex]] === 'number' ? values[keys[endIndex]] : end) - step / 100}${unit})`;\n }\n function only(key) {\n if (keys.indexOf(key) + 1 < keys.length) {\n return between(key, keys[keys.indexOf(key) + 1]);\n }\n return up(key);\n }\n function not(key) {\n // handle first and last key separately, for better readability\n const keyIndex = keys.indexOf(key);\n if (keyIndex === 0) {\n return up(keys[1]);\n }\n if (keyIndex === keys.length - 1) {\n return down(keys[keyIndex]);\n }\n return between(key, keys[keys.indexOf(key) + 1]).replace('@media', '@media not all and');\n }\n return {\n keys,\n values: sortedValues,\n up,\n down,\n between,\n only,\n not,\n unit,\n ...other\n };\n}","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n/**\n * For using in `sx` prop to sort the breakpoint from low to high.\n * Note: this function does not work and will not support multiple units.\n * e.g. input: { '@container (min-width:300px)': '1rem', '@container (min-width:40rem)': '2rem' }\n * output: { '@container (min-width:40rem)': '2rem', '@container (min-width:300px)': '1rem' } // since 40 < 300 eventhough 40rem > 300px\n */\nexport function sortContainerQueries(theme, css) {\n if (!theme.containerQueries) {\n return css;\n }\n const sorted = Object.keys(css).filter(key => key.startsWith('@container')).sort((a, b) => {\n const regex = /min-width:\\s*([0-9.]+)/;\n return +(a.match(regex)?.[1] || 0) - +(b.match(regex)?.[1] || 0);\n });\n if (!sorted.length) {\n return css;\n }\n return sorted.reduce((acc, key) => {\n const value = css[key];\n delete acc[key];\n acc[key] = value;\n return acc;\n }, {\n ...css\n });\n}\nexport function isCqShorthand(breakpointKeys, value) {\n return value === '@' || value.startsWith('@') && (breakpointKeys.some(key => value.startsWith(`@${key}`)) || !!value.match(/^@\\d/));\n}\nexport function getContainerQuery(theme, shorthand) {\n const matches = shorthand.match(/^@([^/]+)?\\/?(.+)?$/);\n if (!matches) {\n if (process.env.NODE_ENV !== 'production') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The provided shorthand ${`(${shorthand})`} is invalid. The format should be \\`@\\` or \\`@/\\`.\\n` + 'For example, `@sm` or `@600` or `@40rem/sidebar`.' : _formatMuiErrorMessage(18, `(${shorthand})`));\n }\n return null;\n }\n const [, containerQuery, containerName] = matches;\n const value = Number.isNaN(+containerQuery) ? containerQuery || 0 : +containerQuery;\n return theme.containerQueries(containerName).up(value);\n}\nexport default function cssContainerQueries(themeInput) {\n const toContainerQuery = (mediaQuery, name) => mediaQuery.replace('@media', name ? `@container ${name}` : '@container');\n function attachCq(node, name) {\n node.up = (...args) => toContainerQuery(themeInput.breakpoints.up(...args), name);\n node.down = (...args) => toContainerQuery(themeInput.breakpoints.down(...args), name);\n node.between = (...args) => toContainerQuery(themeInput.breakpoints.between(...args), name);\n node.only = (...args) => toContainerQuery(themeInput.breakpoints.only(...args), name);\n node.not = (...args) => {\n const result = toContainerQuery(themeInput.breakpoints.not(...args), name);\n if (result.includes('not all and')) {\n // `@container` does not work with `not all and`, so need to invert the logic\n return result.replace('not all and ', '').replace('min-width:', 'width<').replace('max-width:', 'width>').replace('and', 'or');\n }\n return result;\n };\n }\n const node = {};\n const containerQueries = name => {\n attachCq(node, name);\n return node;\n };\n attachCq(containerQueries);\n return {\n ...themeInput,\n containerQueries\n };\n}","const shape = {\n borderRadius: 4\n};\nexport default shape;","import deepmerge from '@mui/utils/deepmerge';\nfunction merge(acc, item) {\n if (!item) {\n return acc;\n }\n return deepmerge(acc, item, {\n clone: false // No need to clone deep, it's way faster.\n });\n}\nexport default merge;","import PropTypes from 'prop-types';\nimport deepmerge from '@mui/utils/deepmerge';\nimport merge from \"../merge/index.js\";\nimport { isCqShorthand, getContainerQuery } from \"../cssContainerQueries/index.js\";\n\n// The breakpoint **start** at this value.\n// For instance with the first breakpoint xs: [xs, sm[.\nexport const values = {\n xs: 0,\n // phone\n sm: 600,\n // tablet\n md: 900,\n // small laptop\n lg: 1200,\n // desktop\n xl: 1536 // large screen\n};\nconst defaultBreakpoints = {\n // Sorted ASC by size. That's important.\n // It can't be configured as it's used statically for propTypes.\n keys: ['xs', 'sm', 'md', 'lg', 'xl'],\n up: key => `@media (min-width:${values[key]}px)`\n};\nconst defaultContainerQueries = {\n containerQueries: containerName => ({\n up: key => {\n let result = typeof key === 'number' ? key : values[key] || key;\n if (typeof result === 'number') {\n result = `${result}px`;\n }\n return containerName ? `@container ${containerName} (min-width:${result})` : `@container (min-width:${result})`;\n }\n })\n};\nexport function handleBreakpoints(props, propValue, styleFromPropValue) {\n const theme = props.theme || {};\n if (Array.isArray(propValue)) {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return propValue.reduce((acc, item, index) => {\n acc[themeBreakpoints.up(themeBreakpoints.keys[index])] = styleFromPropValue(propValue[index]);\n return acc;\n }, {});\n }\n if (typeof propValue === 'object') {\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n return Object.keys(propValue).reduce((acc, breakpoint) => {\n if (isCqShorthand(themeBreakpoints.keys, breakpoint)) {\n const containerKey = getContainerQuery(theme.containerQueries ? theme : defaultContainerQueries, breakpoint);\n if (containerKey) {\n acc[containerKey] = styleFromPropValue(propValue[breakpoint], breakpoint);\n }\n }\n // key is breakpoint\n else if (Object.keys(themeBreakpoints.values || values).includes(breakpoint)) {\n const mediaKey = themeBreakpoints.up(breakpoint);\n acc[mediaKey] = styleFromPropValue(propValue[breakpoint], breakpoint);\n } else {\n const cssKey = breakpoint;\n acc[cssKey] = propValue[cssKey];\n }\n return acc;\n }, {});\n }\n const output = styleFromPropValue(propValue);\n return output;\n}\nfunction breakpoints(styleFunction) {\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const newStyleFunction = props => {\n const theme = props.theme || {};\n const base = styleFunction(props);\n const themeBreakpoints = theme.breakpoints || defaultBreakpoints;\n const extended = themeBreakpoints.keys.reduce((acc, key) => {\n if (props[key]) {\n acc = acc || {};\n acc[themeBreakpoints.up(key)] = styleFunction({\n theme,\n ...props[key]\n });\n }\n return acc;\n }, null);\n return merge(base, extended);\n };\n newStyleFunction.propTypes = process.env.NODE_ENV !== 'production' ? {\n ...styleFunction.propTypes,\n xs: PropTypes.object,\n sm: PropTypes.object,\n md: PropTypes.object,\n lg: PropTypes.object,\n xl: PropTypes.object\n } : {};\n newStyleFunction.filterProps = ['xs', 'sm', 'md', 'lg', 'xl', ...styleFunction.filterProps];\n return newStyleFunction;\n}\nexport function createEmptyBreakpointObject(breakpointsInput = {}) {\n const breakpointsInOrder = breakpointsInput.keys?.reduce((acc, key) => {\n const breakpointStyleKey = breakpointsInput.up(key);\n acc[breakpointStyleKey] = {};\n return acc;\n }, {});\n return breakpointsInOrder || {};\n}\nexport function removeUnusedBreakpoints(breakpointKeys, style) {\n return breakpointKeys.reduce((acc, key) => {\n const breakpointOutput = acc[key];\n const isBreakpointUnused = !breakpointOutput || Object.keys(breakpointOutput).length === 0;\n if (isBreakpointUnused) {\n delete acc[key];\n }\n return acc;\n }, style);\n}\nexport function mergeBreakpointsInOrder(breakpointsInput, ...styles) {\n const emptyBreakpoints = createEmptyBreakpointObject(breakpointsInput);\n const mergedOutput = [emptyBreakpoints, ...styles].reduce((prev, next) => deepmerge(prev, next), {});\n return removeUnusedBreakpoints(Object.keys(emptyBreakpoints), mergedOutput);\n}\n\n// compute base for responsive values; e.g.,\n// [1,2,3] => {xs: true, sm: true, md: true}\n// {xs: 1, sm: 2, md: 3} => {xs: true, sm: true, md: true}\nexport function computeBreakpointsBase(breakpointValues, themeBreakpoints) {\n // fixed value\n if (typeof breakpointValues !== 'object') {\n return {};\n }\n const base = {};\n const breakpointsKeys = Object.keys(themeBreakpoints);\n if (Array.isArray(breakpointValues)) {\n breakpointsKeys.forEach((breakpoint, i) => {\n if (i < breakpointValues.length) {\n base[breakpoint] = true;\n }\n });\n } else {\n breakpointsKeys.forEach(breakpoint => {\n if (breakpointValues[breakpoint] != null) {\n base[breakpoint] = true;\n }\n });\n }\n return base;\n}\nexport function resolveBreakpointValues({\n values: breakpointValues,\n breakpoints: themeBreakpoints,\n base: customBase\n}) {\n const base = customBase || computeBreakpointsBase(breakpointValues, themeBreakpoints);\n const keys = Object.keys(base);\n if (keys.length === 0) {\n return breakpointValues;\n }\n let previous;\n return keys.reduce((acc, breakpoint, i) => {\n if (Array.isArray(breakpointValues)) {\n acc[breakpoint] = breakpointValues[i] != null ? breakpointValues[i] : breakpointValues[previous];\n previous = i;\n } else if (typeof breakpointValues === 'object') {\n acc[breakpoint] = breakpointValues[breakpoint] != null ? breakpointValues[breakpoint] : breakpointValues[previous];\n previous = breakpoint;\n } else {\n acc[breakpoint] = breakpointValues;\n }\n return acc;\n }, {});\n}\nexport default breakpoints;","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n// It should to be noted that this function isn't equivalent to `text-transform: capitalize`.\n//\n// A strict capitalization should uppercase the first letter of each word in the sentence.\n// We only handle the first word.\nexport default function capitalize(string) {\n if (typeof string !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI: `capitalize(string)` expects a string argument.' : _formatMuiErrorMessage(7));\n }\n return string.charAt(0).toUpperCase() + string.slice(1);\n}","import capitalize from '@mui/utils/capitalize';\nimport responsivePropType from \"../responsivePropType/index.js\";\nimport { handleBreakpoints } from \"../breakpoints/index.js\";\nexport function getPath(obj, path, checkVars = true) {\n if (!path || typeof path !== 'string') {\n return null;\n }\n\n // Check if CSS variables are used\n if (obj && obj.vars && checkVars) {\n const val = `vars.${path}`.split('.').reduce((acc, item) => acc && acc[item] ? acc[item] : null, obj);\n if (val != null) {\n return val;\n }\n }\n return path.split('.').reduce((acc, item) => {\n if (acc && acc[item] != null) {\n return acc[item];\n }\n return null;\n }, obj);\n}\nexport function getStyleValue(themeMapping, transform, propValueFinal, userValue = propValueFinal) {\n let value;\n if (typeof themeMapping === 'function') {\n value = themeMapping(propValueFinal);\n } else if (Array.isArray(themeMapping)) {\n value = themeMapping[propValueFinal] || userValue;\n } else {\n value = getPath(themeMapping, propValueFinal) || userValue;\n }\n if (transform) {\n value = transform(value, userValue, themeMapping);\n }\n return value;\n}\nfunction style(options) {\n const {\n prop,\n cssProperty = options.prop,\n themeKey,\n transform\n } = options;\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n if (props[prop] == null) {\n return null;\n }\n const propValue = props[prop];\n const theme = props.theme;\n const themeMapping = getPath(theme, themeKey) || {};\n const styleFromPropValue = propValueFinal => {\n let value = getStyleValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getStyleValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return handleBreakpoints(props, propValue, styleFromPropValue);\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? {\n [prop]: responsivePropType\n } : {};\n fn.filterProps = [prop];\n return fn;\n}\nexport default style;","export default function memoize(fn) {\n const cache = {};\n return arg => {\n if (cache[arg] === undefined) {\n cache[arg] = fn(arg);\n }\n return cache[arg];\n };\n}","import responsivePropType from \"../responsivePropType/index.js\";\nimport { handleBreakpoints } from \"../breakpoints/index.js\";\nimport { getPath } from \"../style/index.js\";\nimport merge from \"../merge/index.js\";\nimport memoize from \"../memoize/index.js\";\nconst properties = {\n m: 'margin',\n p: 'padding'\n};\nconst directions = {\n t: 'Top',\n r: 'Right',\n b: 'Bottom',\n l: 'Left',\n x: ['Left', 'Right'],\n y: ['Top', 'Bottom']\n};\nconst aliases = {\n marginX: 'mx',\n marginY: 'my',\n paddingX: 'px',\n paddingY: 'py'\n};\n\n// memoize() impact:\n// From 300,000 ops/sec\n// To 350,000 ops/sec\nconst getCssProperties = memoize(prop => {\n // It's not a shorthand notation.\n if (prop.length > 2) {\n if (aliases[prop]) {\n prop = aliases[prop];\n } else {\n return [prop];\n }\n }\n const [a, b] = prop.split('');\n const property = properties[a];\n const direction = directions[b] || '';\n return Array.isArray(direction) ? direction.map(dir => property + dir) : [property + direction];\n});\nexport const marginKeys = ['m', 'mt', 'mr', 'mb', 'ml', 'mx', 'my', 'margin', 'marginTop', 'marginRight', 'marginBottom', 'marginLeft', 'marginX', 'marginY', 'marginInline', 'marginInlineStart', 'marginInlineEnd', 'marginBlock', 'marginBlockStart', 'marginBlockEnd'];\nexport const paddingKeys = ['p', 'pt', 'pr', 'pb', 'pl', 'px', 'py', 'padding', 'paddingTop', 'paddingRight', 'paddingBottom', 'paddingLeft', 'paddingX', 'paddingY', 'paddingInline', 'paddingInlineStart', 'paddingInlineEnd', 'paddingBlock', 'paddingBlockStart', 'paddingBlockEnd'];\nconst spacingKeys = [...marginKeys, ...paddingKeys];\nexport function createUnaryUnit(theme, themeKey, defaultValue, propName) {\n const themeSpacing = getPath(theme, themeKey, true) ?? defaultValue;\n if (typeof themeSpacing === 'number' || typeof themeSpacing === 'string') {\n return val => {\n if (typeof val === 'string') {\n return val;\n }\n if (process.env.NODE_ENV !== 'production') {\n if (typeof val !== 'number') {\n console.error(`MUI: Expected ${propName} argument to be a number or a string, got ${val}.`);\n }\n }\n if (typeof themeSpacing === 'string') {\n return `calc(${val} * ${themeSpacing})`;\n }\n return themeSpacing * val;\n };\n }\n if (Array.isArray(themeSpacing)) {\n return val => {\n if (typeof val === 'string') {\n return val;\n }\n const abs = Math.abs(val);\n if (process.env.NODE_ENV !== 'production') {\n if (!Number.isInteger(abs)) {\n console.error([`MUI: The \\`theme.${themeKey}\\` array type cannot be combined with non integer values.` + `You should either use an integer value that can be used as index, or define the \\`theme.${themeKey}\\` as a number.`].join('\\n'));\n } else if (abs > themeSpacing.length - 1) {\n console.error([`MUI: The value provided (${abs}) overflows.`, `The supported values are: ${JSON.stringify(themeSpacing)}.`, `${abs} > ${themeSpacing.length - 1}, you need to add the missing values.`].join('\\n'));\n }\n }\n const transformed = themeSpacing[abs];\n if (val >= 0) {\n return transformed;\n }\n if (typeof transformed === 'number') {\n return -transformed;\n }\n return `-${transformed}`;\n };\n }\n if (typeof themeSpacing === 'function') {\n return themeSpacing;\n }\n if (process.env.NODE_ENV !== 'production') {\n console.error([`MUI: The \\`theme.${themeKey}\\` value (${themeSpacing}) is invalid.`, 'It should be a number, an array or a function.'].join('\\n'));\n }\n return () => undefined;\n}\nexport function createUnarySpacing(theme) {\n return createUnaryUnit(theme, 'spacing', 8, 'spacing');\n}\nexport function getValue(transformer, propValue) {\n if (typeof propValue === 'string' || propValue == null) {\n return propValue;\n }\n return transformer(propValue);\n}\nexport function getStyleFromPropValue(cssProperties, transformer) {\n return propValue => cssProperties.reduce((acc, cssProperty) => {\n acc[cssProperty] = getValue(transformer, propValue);\n return acc;\n }, {});\n}\nfunction resolveCssProperty(props, keys, prop, transformer) {\n // Using a hash computation over an array iteration could be faster, but with only 28 items,\n // it's doesn't worth the bundle size.\n if (!keys.includes(prop)) {\n return null;\n }\n const cssProperties = getCssProperties(prop);\n const styleFromPropValue = getStyleFromPropValue(cssProperties, transformer);\n const propValue = props[prop];\n return handleBreakpoints(props, propValue, styleFromPropValue);\n}\nfunction style(props, keys) {\n const transformer = createUnarySpacing(props.theme);\n return Object.keys(props).map(prop => resolveCssProperty(props, keys, prop, transformer)).reduce(merge, {});\n}\nexport function margin(props) {\n return style(props, marginKeys);\n}\nmargin.propTypes = process.env.NODE_ENV !== 'production' ? marginKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nmargin.filterProps = marginKeys;\nexport function padding(props) {\n return style(props, paddingKeys);\n}\npadding.propTypes = process.env.NODE_ENV !== 'production' ? paddingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\npadding.filterProps = paddingKeys;\nfunction spacing(props) {\n return style(props, spacingKeys);\n}\nspacing.propTypes = process.env.NODE_ENV !== 'production' ? spacingKeys.reduce((obj, key) => {\n obj[key] = responsivePropType;\n return obj;\n}, {}) : {};\nspacing.filterProps = spacingKeys;\nexport default spacing;","import { createUnarySpacing } from \"../spacing/index.js\";\n\n// The different signatures imply different meaning for their arguments that can't be expressed structurally.\n// We express the difference with variable names.\n\nexport default function createSpacing(spacingInput = 8,\n// Material Design layouts are visually balanced. Most measurements align to an 8dp grid, which aligns both spacing and the overall layout.\n// Smaller components, such as icons, can align to a 4dp grid.\n// https://m2.material.io/design/layout/understanding-layout.html\ntransform = createUnarySpacing({\n spacing: spacingInput\n})) {\n // Already transformed.\n if (spacingInput.mui) {\n return spacingInput;\n }\n const spacing = (...argsInput) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!(argsInput.length <= 4)) {\n console.error(`MUI: Too many arguments provided, expected between 0 and 4, got ${argsInput.length}`);\n }\n }\n const args = argsInput.length === 0 ? [1] : argsInput;\n return args.map(argument => {\n const output = transform(argument);\n return typeof output === 'number' ? `${output}px` : output;\n }).join(' ');\n };\n spacing.mui = true;\n return spacing;\n}","import merge from \"../merge/index.js\";\nfunction compose(...styles) {\n const handlers = styles.reduce((acc, style) => {\n style.filterProps.forEach(prop => {\n acc[prop] = style;\n });\n return acc;\n }, {});\n\n // false positive\n // eslint-disable-next-line react/function-component-definition\n const fn = props => {\n return Object.keys(props).reduce((acc, prop) => {\n if (handlers[prop]) {\n return merge(acc, handlers[prop](props));\n }\n return acc;\n }, {});\n };\n fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce((acc, style) => Object.assign(acc, style.propTypes), {}) : {};\n fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []);\n return fn;\n}\nexport default compose;","import responsivePropType from \"../responsivePropType/index.js\";\nimport style from \"../style/index.js\";\nimport compose from \"../compose/index.js\";\nimport { createUnaryUnit, getValue } from \"../spacing/index.js\";\nimport { handleBreakpoints } from \"../breakpoints/index.js\";\nexport function borderTransform(value) {\n if (typeof value !== 'number') {\n return value;\n }\n return `${value}px solid`;\n}\nfunction createBorderStyle(prop, transform) {\n return style({\n prop,\n themeKey: 'borders',\n transform\n });\n}\nexport const border = createBorderStyle('border', borderTransform);\nexport const borderTop = createBorderStyle('borderTop', borderTransform);\nexport const borderRight = createBorderStyle('borderRight', borderTransform);\nexport const borderBottom = createBorderStyle('borderBottom', borderTransform);\nexport const borderLeft = createBorderStyle('borderLeft', borderTransform);\nexport const borderColor = createBorderStyle('borderColor');\nexport const borderTopColor = createBorderStyle('borderTopColor');\nexport const borderRightColor = createBorderStyle('borderRightColor');\nexport const borderBottomColor = createBorderStyle('borderBottomColor');\nexport const borderLeftColor = createBorderStyle('borderLeftColor');\nexport const outline = createBorderStyle('outline', borderTransform);\nexport const outlineColor = createBorderStyle('outlineColor');\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const borderRadius = props => {\n if (props.borderRadius !== undefined && props.borderRadius !== null) {\n const transformer = createUnaryUnit(props.theme, 'shape.borderRadius', 4, 'borderRadius');\n const styleFromPropValue = propValue => ({\n borderRadius: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.borderRadius, styleFromPropValue);\n }\n return null;\n};\nborderRadius.propTypes = process.env.NODE_ENV !== 'production' ? {\n borderRadius: responsivePropType\n} : {};\nborderRadius.filterProps = ['borderRadius'];\nconst borders = compose(border, borderTop, borderRight, borderBottom, borderLeft, borderColor, borderTopColor, borderRightColor, borderBottomColor, borderLeftColor, borderRadius, outline, outlineColor);\nexport default borders;","import style from \"../style/index.js\";\nimport compose from \"../compose/index.js\";\nimport { createUnaryUnit, getValue } from \"../spacing/index.js\";\nimport { handleBreakpoints } from \"../breakpoints/index.js\";\nimport responsivePropType from \"../responsivePropType/index.js\";\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const gap = props => {\n if (props.gap !== undefined && props.gap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'gap');\n const styleFromPropValue = propValue => ({\n gap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.gap, styleFromPropValue);\n }\n return null;\n};\ngap.propTypes = process.env.NODE_ENV !== 'production' ? {\n gap: responsivePropType\n} : {};\ngap.filterProps = ['gap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const columnGap = props => {\n if (props.columnGap !== undefined && props.columnGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'columnGap');\n const styleFromPropValue = propValue => ({\n columnGap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.columnGap, styleFromPropValue);\n }\n return null;\n};\ncolumnGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n columnGap: responsivePropType\n} : {};\ncolumnGap.filterProps = ['columnGap'];\n\n// false positive\n// eslint-disable-next-line react/function-component-definition\nexport const rowGap = props => {\n if (props.rowGap !== undefined && props.rowGap !== null) {\n const transformer = createUnaryUnit(props.theme, 'spacing', 8, 'rowGap');\n const styleFromPropValue = propValue => ({\n rowGap: getValue(transformer, propValue)\n });\n return handleBreakpoints(props, props.rowGap, styleFromPropValue);\n }\n return null;\n};\nrowGap.propTypes = process.env.NODE_ENV !== 'production' ? {\n rowGap: responsivePropType\n} : {};\nrowGap.filterProps = ['rowGap'];\nexport const gridColumn = style({\n prop: 'gridColumn'\n});\nexport const gridRow = style({\n prop: 'gridRow'\n});\nexport const gridAutoFlow = style({\n prop: 'gridAutoFlow'\n});\nexport const gridAutoColumns = style({\n prop: 'gridAutoColumns'\n});\nexport const gridAutoRows = style({\n prop: 'gridAutoRows'\n});\nexport const gridTemplateColumns = style({\n prop: 'gridTemplateColumns'\n});\nexport const gridTemplateRows = style({\n prop: 'gridTemplateRows'\n});\nexport const gridTemplateAreas = style({\n prop: 'gridTemplateAreas'\n});\nexport const gridArea = style({\n prop: 'gridArea'\n});\nconst grid = compose(gap, columnGap, rowGap, gridColumn, gridRow, gridAutoFlow, gridAutoColumns, gridAutoRows, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridArea);\nexport default grid;","import style from \"../style/index.js\";\nimport compose from \"../compose/index.js\";\nexport function paletteTransform(value, userValue) {\n if (userValue === 'grey') {\n return userValue;\n }\n return value;\n}\nexport const color = style({\n prop: 'color',\n themeKey: 'palette',\n transform: paletteTransform\n});\nexport const bgcolor = style({\n prop: 'bgcolor',\n cssProperty: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nexport const backgroundColor = style({\n prop: 'backgroundColor',\n themeKey: 'palette',\n transform: paletteTransform\n});\nconst palette = compose(color, bgcolor, backgroundColor);\nexport default palette;","import style from \"../style/index.js\";\nimport compose from \"../compose/index.js\";\nimport { handleBreakpoints, values as breakpointsValues } from \"../breakpoints/index.js\";\nexport function sizingTransform(value) {\n return value <= 1 && value !== 0 ? `${value * 100}%` : value;\n}\nexport const width = style({\n prop: 'width',\n transform: sizingTransform\n});\nexport const maxWidth = props => {\n if (props.maxWidth !== undefined && props.maxWidth !== null) {\n const styleFromPropValue = propValue => {\n const breakpoint = props.theme?.breakpoints?.values?.[propValue] || breakpointsValues[propValue];\n if (!breakpoint) {\n return {\n maxWidth: sizingTransform(propValue)\n };\n }\n if (props.theme?.breakpoints?.unit !== 'px') {\n return {\n maxWidth: `${breakpoint}${props.theme.breakpoints.unit}`\n };\n }\n return {\n maxWidth: breakpoint\n };\n };\n return handleBreakpoints(props, props.maxWidth, styleFromPropValue);\n }\n return null;\n};\nmaxWidth.filterProps = ['maxWidth'];\nexport const minWidth = style({\n prop: 'minWidth',\n transform: sizingTransform\n});\nexport const height = style({\n prop: 'height',\n transform: sizingTransform\n});\nexport const maxHeight = style({\n prop: 'maxHeight',\n transform: sizingTransform\n});\nexport const minHeight = style({\n prop: 'minHeight',\n transform: sizingTransform\n});\nexport const sizeWidth = style({\n prop: 'size',\n cssProperty: 'width',\n transform: sizingTransform\n});\nexport const sizeHeight = style({\n prop: 'size',\n cssProperty: 'height',\n transform: sizingTransform\n});\nexport const boxSizing = style({\n prop: 'boxSizing'\n});\nconst sizing = compose(width, maxWidth, minWidth, height, maxHeight, minHeight, boxSizing);\nexport default sizing;","import { padding, margin } from \"../spacing/index.js\";\nimport { borderRadius, borderTransform } from \"../borders/index.js\";\nimport { gap, rowGap, columnGap } from \"../cssGrid/index.js\";\nimport { paletteTransform } from \"../palette/index.js\";\nimport { maxWidth, sizingTransform } from \"../sizing/index.js\";\nconst defaultSxConfig = {\n // borders\n border: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderTop: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderRight: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderBottom: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderLeft: {\n themeKey: 'borders',\n transform: borderTransform\n },\n borderColor: {\n themeKey: 'palette'\n },\n borderTopColor: {\n themeKey: 'palette'\n },\n borderRightColor: {\n themeKey: 'palette'\n },\n borderBottomColor: {\n themeKey: 'palette'\n },\n borderLeftColor: {\n themeKey: 'palette'\n },\n outline: {\n themeKey: 'borders',\n transform: borderTransform\n },\n outlineColor: {\n themeKey: 'palette'\n },\n borderRadius: {\n themeKey: 'shape.borderRadius',\n style: borderRadius\n },\n // palette\n color: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n bgcolor: {\n themeKey: 'palette',\n cssProperty: 'backgroundColor',\n transform: paletteTransform\n },\n backgroundColor: {\n themeKey: 'palette',\n transform: paletteTransform\n },\n // spacing\n p: {\n style: padding\n },\n pt: {\n style: padding\n },\n pr: {\n style: padding\n },\n pb: {\n style: padding\n },\n pl: {\n style: padding\n },\n px: {\n style: padding\n },\n py: {\n style: padding\n },\n padding: {\n style: padding\n },\n paddingTop: {\n style: padding\n },\n paddingRight: {\n style: padding\n },\n paddingBottom: {\n style: padding\n },\n paddingLeft: {\n style: padding\n },\n paddingX: {\n style: padding\n },\n paddingY: {\n style: padding\n },\n paddingInline: {\n style: padding\n },\n paddingInlineStart: {\n style: padding\n },\n paddingInlineEnd: {\n style: padding\n },\n paddingBlock: {\n style: padding\n },\n paddingBlockStart: {\n style: padding\n },\n paddingBlockEnd: {\n style: padding\n },\n m: {\n style: margin\n },\n mt: {\n style: margin\n },\n mr: {\n style: margin\n },\n mb: {\n style: margin\n },\n ml: {\n style: margin\n },\n mx: {\n style: margin\n },\n my: {\n style: margin\n },\n margin: {\n style: margin\n },\n marginTop: {\n style: margin\n },\n marginRight: {\n style: margin\n },\n marginBottom: {\n style: margin\n },\n marginLeft: {\n style: margin\n },\n marginX: {\n style: margin\n },\n marginY: {\n style: margin\n },\n marginInline: {\n style: margin\n },\n marginInlineStart: {\n style: margin\n },\n marginInlineEnd: {\n style: margin\n },\n marginBlock: {\n style: margin\n },\n marginBlockStart: {\n style: margin\n },\n marginBlockEnd: {\n style: margin\n },\n // display\n displayPrint: {\n cssProperty: false,\n transform: value => ({\n '@media print': {\n display: value\n }\n })\n },\n display: {},\n overflow: {},\n textOverflow: {},\n visibility: {},\n whiteSpace: {},\n // flexbox\n flexBasis: {},\n flexDirection: {},\n flexWrap: {},\n justifyContent: {},\n alignItems: {},\n alignContent: {},\n order: {},\n flex: {},\n flexGrow: {},\n flexShrink: {},\n alignSelf: {},\n justifyItems: {},\n justifySelf: {},\n // grid\n gap: {\n style: gap\n },\n rowGap: {\n style: rowGap\n },\n columnGap: {\n style: columnGap\n },\n gridColumn: {},\n gridRow: {},\n gridAutoFlow: {},\n gridAutoColumns: {},\n gridAutoRows: {},\n gridTemplateColumns: {},\n gridTemplateRows: {},\n gridTemplateAreas: {},\n gridArea: {},\n // positions\n position: {},\n zIndex: {\n themeKey: 'zIndex'\n },\n top: {},\n right: {},\n bottom: {},\n left: {},\n // shadows\n boxShadow: {\n themeKey: 'shadows'\n },\n // sizing\n width: {\n transform: sizingTransform\n },\n maxWidth: {\n style: maxWidth\n },\n minWidth: {\n transform: sizingTransform\n },\n height: {\n transform: sizingTransform\n },\n maxHeight: {\n transform: sizingTransform\n },\n minHeight: {\n transform: sizingTransform\n },\n boxSizing: {},\n // typography\n font: {\n themeKey: 'font'\n },\n fontFamily: {\n themeKey: 'typography'\n },\n fontSize: {\n themeKey: 'typography'\n },\n fontStyle: {\n themeKey: 'typography'\n },\n fontWeight: {\n themeKey: 'typography'\n },\n letterSpacing: {},\n textTransform: {},\n lineHeight: {},\n textAlign: {},\n typography: {\n cssProperty: false,\n themeKey: 'typography'\n }\n};\nexport default defaultSxConfig;","import capitalize from '@mui/utils/capitalize';\nimport merge from \"../merge/index.js\";\nimport { getPath, getStyleValue as getValue } from \"../style/index.js\";\nimport { handleBreakpoints, createEmptyBreakpointObject, removeUnusedBreakpoints } from \"../breakpoints/index.js\";\nimport { sortContainerQueries } from \"../cssContainerQueries/index.js\";\nimport defaultSxConfig from \"./defaultSxConfig.js\";\nfunction objectsHaveSameKeys(...objects) {\n const allKeys = objects.reduce((keys, object) => keys.concat(Object.keys(object)), []);\n const union = new Set(allKeys);\n return objects.every(object => union.size === Object.keys(object).length);\n}\nfunction callIfFn(maybeFn, arg) {\n return typeof maybeFn === 'function' ? maybeFn(arg) : maybeFn;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function unstable_createStyleFunctionSx() {\n function getThemeValue(prop, val, theme, config) {\n const props = {\n [prop]: val,\n theme\n };\n const options = config[prop];\n if (!options) {\n return {\n [prop]: val\n };\n }\n const {\n cssProperty = prop,\n themeKey,\n transform,\n style\n } = options;\n if (val == null) {\n return null;\n }\n\n // TODO v6: remove, see https://github.com/mui/material-ui/pull/38123\n if (themeKey === 'typography' && val === 'inherit') {\n return {\n [prop]: val\n };\n }\n const themeMapping = getPath(theme, themeKey) || {};\n if (style) {\n return style(props);\n }\n const styleFromPropValue = propValueFinal => {\n let value = getValue(themeMapping, transform, propValueFinal);\n if (propValueFinal === value && typeof propValueFinal === 'string') {\n // Haven't found value\n value = getValue(themeMapping, transform, `${prop}${propValueFinal === 'default' ? '' : capitalize(propValueFinal)}`, propValueFinal);\n }\n if (cssProperty === false) {\n return value;\n }\n return {\n [cssProperty]: value\n };\n };\n return handleBreakpoints(props, val, styleFromPropValue);\n }\n function styleFunctionSx(props) {\n const {\n sx,\n theme = {}\n } = props || {};\n if (!sx) {\n return null; // Emotion & styled-components will neglect null\n }\n const config = theme.unstable_sxConfig ?? defaultSxConfig;\n\n /*\n * Receive `sxInput` as object or callback\n * and then recursively check keys & values to create media query object styles.\n * (the result will be used in `styled`)\n */\n function traverse(sxInput) {\n let sxObject = sxInput;\n if (typeof sxInput === 'function') {\n sxObject = sxInput(theme);\n } else if (typeof sxInput !== 'object') {\n // value\n return sxInput;\n }\n if (!sxObject) {\n return null;\n }\n const emptyBreakpoints = createEmptyBreakpointObject(theme.breakpoints);\n const breakpointsKeys = Object.keys(emptyBreakpoints);\n let css = emptyBreakpoints;\n Object.keys(sxObject).forEach(styleKey => {\n const value = callIfFn(sxObject[styleKey], theme);\n if (value !== null && value !== undefined) {\n if (typeof value === 'object') {\n if (config[styleKey]) {\n css = merge(css, getThemeValue(styleKey, value, theme, config));\n } else {\n const breakpointsValues = handleBreakpoints({\n theme\n }, value, x => ({\n [styleKey]: x\n }));\n if (objectsHaveSameKeys(breakpointsValues, value)) {\n css[styleKey] = styleFunctionSx({\n sx: value,\n theme\n });\n } else {\n css = merge(css, breakpointsValues);\n }\n }\n } else {\n css = merge(css, getThemeValue(styleKey, value, theme, config));\n }\n }\n });\n return sortContainerQueries(theme, removeUnusedBreakpoints(breakpointsKeys, css));\n }\n return Array.isArray(sx) ? sx.map(traverse) : traverse(sx);\n }\n return styleFunctionSx;\n}\nconst styleFunctionSx = unstable_createStyleFunctionSx();\nstyleFunctionSx.filterProps = ['sx'];\nexport default styleFunctionSx;","/**\n * A universal utility to style components with multiple color modes. Always use it from the theme object.\n * It works with:\n * - [Basic theme](https://mui.com/material-ui/customization/dark-mode/)\n * - [CSS theme variables](https://mui.com/material-ui/customization/css-theme-variables/overview/)\n * - Zero-runtime engine\n *\n * Tips: Use an array over object spread and place `theme.applyStyles()` last.\n *\n * With the styled function:\n * ✅ [{ background: '#e5e5e5' }, theme.applyStyles('dark', { background: '#1c1c1c' })]\n * 🚫 { background: '#e5e5e5', ...theme.applyStyles('dark', { background: '#1c1c1c' })}\n *\n * With the sx prop:\n * ✅ [{ background: '#e5e5e5' }, theme => theme.applyStyles('dark', { background: '#1c1c1c' })]\n * 🚫 { background: '#e5e5e5', ...theme => theme.applyStyles('dark', { background: '#1c1c1c' })}\n *\n * @example\n * 1. using with `styled`:\n * ```jsx\n * const Component = styled('div')(({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]);\n * ```\n *\n * @example\n * 2. using with `sx` prop:\n * ```jsx\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ]}\n * />\n * ```\n *\n * @example\n * 3. theming a component:\n * ```jsx\n * extendTheme({\n * components: {\n * MuiButton: {\n * styleOverrides: {\n * root: ({ theme }) => [\n * { background: '#e5e5e5' },\n * theme.applyStyles('dark', {\n * background: '#1c1c1c',\n * color: '#fff',\n * }),\n * ],\n * },\n * }\n * }\n * })\n *```\n */\nexport default function applyStyles(key, styles) {\n // @ts-expect-error this is 'any' type\n const theme = this;\n if (theme.vars) {\n if (!theme.colorSchemes?.[key] || typeof theme.getColorSchemeSelector !== 'function') {\n return {};\n }\n // If CssVarsProvider is used as a provider, returns '*:where({selector}) &'\n let selector = theme.getColorSchemeSelector(key);\n if (selector === '&') {\n return styles;\n }\n if (selector.includes('data-') || selector.includes('.')) {\n // '*' is required as a workaround for Emotion issue (https://github.com/emotion-js/emotion/issues/2836)\n selector = `*:where(${selector.replace(/\\s*&$/, '')}) &`;\n }\n return {\n [selector]: styles\n };\n }\n if (theme.palette.mode === key) {\n return styles;\n }\n return {};\n}","import deepmerge from '@mui/utils/deepmerge';\nimport createBreakpoints from \"../createBreakpoints/createBreakpoints.js\";\nimport cssContainerQueries from \"../cssContainerQueries/index.js\";\nimport shape from \"./shape.js\";\nimport createSpacing from \"./createSpacing.js\";\nimport styleFunctionSx from \"../styleFunctionSx/styleFunctionSx.js\";\nimport defaultSxConfig from \"../styleFunctionSx/defaultSxConfig.js\";\nimport applyStyles from \"./applyStyles.js\";\nfunction createTheme(options = {}, ...args) {\n const {\n breakpoints: breakpointsInput = {},\n palette: paletteInput = {},\n spacing: spacingInput,\n shape: shapeInput = {},\n ...other\n } = options;\n const breakpoints = createBreakpoints(breakpointsInput);\n const spacing = createSpacing(spacingInput);\n let muiTheme = deepmerge({\n breakpoints,\n direction: 'ltr',\n components: {},\n // Inject component definitions.\n palette: {\n mode: 'light',\n ...paletteInput\n },\n spacing,\n shape: {\n ...shape,\n ...shapeInput\n }\n }, other);\n muiTheme = cssContainerQueries(muiTheme);\n muiTheme.applyStyles = applyStyles;\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n muiTheme.unstable_sxConfig = {\n ...defaultSxConfig,\n ...other?.unstable_sxConfig\n };\n muiTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n return muiTheme;\n}\nexport default createTheme;","'use client';\n\nimport * as React from 'react';\nimport { ThemeContext } from '@mui/styled-engine';\nfunction isObjectEmpty(obj) {\n return Object.keys(obj).length === 0;\n}\nfunction useTheme(defaultTheme = null) {\n const contextTheme = React.useContext(ThemeContext);\n return !contextTheme || isObjectEmpty(contextTheme) ? defaultTheme : contextTheme;\n}\nexport default useTheme;","'use client';\n\nimport createTheme from \"../createTheme/index.js\";\nimport useThemeWithoutDefault from \"../useThemeWithoutDefault/index.js\";\nexport const systemDefaultTheme = createTheme();\nfunction useTheme(defaultTheme = systemDefaultTheme) {\n return useThemeWithoutDefault(defaultTheme);\n}\nexport default useTheme;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GlobalStyles as MuiGlobalStyles } from '@mui/styled-engine';\nimport useTheme from \"../useTheme/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction GlobalStyles({\n styles,\n themeId,\n defaultTheme = {}\n}) {\n const upperTheme = useTheme(defaultTheme);\n const globalStyles = typeof styles === 'function' ? styles(themeId ? upperTheme[themeId] || upperTheme : upperTheme) : styles;\n return /*#__PURE__*/_jsx(MuiGlobalStyles, {\n styles: globalStyles\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GlobalStyles.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n defaultTheme: PropTypes.object,\n /**\n * @ignore\n */\n styles: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.array, PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.string, PropTypes.bool]),\n /**\n * @ignore\n */\n themeId: PropTypes.string\n} : void 0;\nexport default GlobalStyles;","import { isPlainObject } from '@mui/utils/deepmerge';\nimport defaultSxConfig from \"./defaultSxConfig.js\";\nconst splitProps = props => {\n const result = {\n systemProps: {},\n otherProps: {}\n };\n const config = props?.theme?.unstable_sxConfig ?? defaultSxConfig;\n Object.keys(props).forEach(prop => {\n if (config[prop]) {\n result.systemProps[prop] = props[prop];\n } else {\n result.otherProps[prop] = props[prop];\n }\n });\n return result;\n};\nexport default function extendSxProp(props) {\n const {\n sx: inSx,\n ...other\n } = props;\n const {\n systemProps,\n otherProps\n } = splitProps(other);\n let finalSx;\n if (Array.isArray(inSx)) {\n finalSx = [systemProps, ...inSx];\n } else if (typeof inSx === 'function') {\n finalSx = (...args) => {\n const result = inSx(...args);\n if (!isPlainObject(result)) {\n return systemProps;\n }\n return {\n ...systemProps,\n ...result\n };\n };\n } else {\n finalSx = {\n ...systemProps,\n ...inSx\n };\n }\n return {\n ...otherProps,\n sx: finalSx\n };\n}","const defaultGenerator = componentName => componentName;\nconst createClassNameGenerator = () => {\n let generate = defaultGenerator;\n return {\n configure(generator) {\n generate = generator;\n },\n generate(componentName) {\n return generate(componentName);\n },\n reset() {\n generate = defaultGenerator;\n }\n };\n};\nconst ClassNameGenerator = createClassNameGenerator();\nexport default ClassNameGenerator;","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 {\n result[slot] = generateUtilityClass(componentName, slot, globalStatePrefix);\n });\n return result;\n}","import { internal_serializeStyles } from '@mui/styled-engine';\nexport default function preprocessStyles(input) {\n const {\n variants,\n ...style\n } = input;\n const result = {\n variants,\n style: internal_serializeStyles(style),\n isProcessed: true\n };\n\n // Not supported on styled-components\n if (result.style === style) {\n return result;\n }\n if (variants) {\n variants.forEach(variant => {\n if (typeof variant.style !== 'function') {\n variant.style = internal_serializeStyles(variant.style);\n }\n });\n }\n return result;\n}","import styledEngineStyled, { internal_mutateStyles as mutateStyles } from '@mui/styled-engine';\nimport { isPlainObject } from '@mui/utils/deepmerge';\nimport capitalize from '@mui/utils/capitalize';\nimport getDisplayName from '@mui/utils/getDisplayName';\nimport createTheme from \"../createTheme/index.js\";\nimport styleFunctionSx from \"../styleFunctionSx/index.js\";\nimport preprocessStyles from \"../preprocessStyles.js\";\n\n/* eslint-disable no-underscore-dangle */\n/* eslint-disable no-labels */\n/* eslint-disable no-lone-blocks */\n\nexport const systemDefaultTheme = createTheme();\n\n// Update /system/styled/#api in case if this changes\nexport function shouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nfunction defaultOverridesResolver(slot) {\n if (!slot) {\n return null;\n }\n return (_props, styles) => styles[slot];\n}\nfunction attachTheme(props, themeId, defaultTheme) {\n props.theme = isObjectEmpty(props.theme) ? defaultTheme : props.theme[themeId] || props.theme;\n}\nfunction processStyle(props, style) {\n /*\n * Style types:\n * - null/undefined\n * - string\n * - CSS style object: { [cssKey]: [cssValue], variants }\n * - Processed style object: { style, variants, isProcessed: true }\n * - Array of any of the above\n */\n\n const resolvedStyle = typeof style === 'function' ? style(props) : style;\n if (Array.isArray(resolvedStyle)) {\n return resolvedStyle.flatMap(subStyle => processStyle(props, subStyle));\n }\n if (Array.isArray(resolvedStyle?.variants)) {\n let rootStyle;\n if (resolvedStyle.isProcessed) {\n rootStyle = resolvedStyle.style;\n } else {\n const {\n variants,\n ...otherStyles\n } = resolvedStyle;\n rootStyle = otherStyles;\n }\n return processStyleVariants(props, resolvedStyle.variants, [rootStyle]);\n }\n if (resolvedStyle?.isProcessed) {\n return resolvedStyle.style;\n }\n return resolvedStyle;\n}\nfunction processStyleVariants(props, variants, results = []) {\n let mergedState; // We might not need it, initialized lazily\n\n variantLoop: for (let i = 0; i < variants.length; i += 1) {\n const variant = variants[i];\n if (typeof variant.props === 'function') {\n mergedState ??= {\n ...props,\n ...props.ownerState,\n ownerState: props.ownerState\n };\n if (!variant.props(mergedState)) {\n continue;\n }\n } else {\n for (const key in variant.props) {\n if (props[key] !== variant.props[key] && props.ownerState?.[key] !== variant.props[key]) {\n continue variantLoop;\n }\n }\n }\n if (typeof variant.style === 'function') {\n mergedState ??= {\n ...props,\n ...props.ownerState,\n ownerState: props.ownerState\n };\n results.push(variant.style(mergedState));\n } else {\n results.push(variant.style);\n }\n }\n return results;\n}\nexport default function createStyled(input = {}) {\n const {\n themeId,\n defaultTheme = systemDefaultTheme,\n rootShouldForwardProp = shouldForwardProp,\n slotShouldForwardProp = shouldForwardProp\n } = input;\n function styleAttachTheme(props) {\n attachTheme(props, themeId, defaultTheme);\n }\n const styled = (tag, inputOptions = {}) => {\n // If `tag` is already a styled component, filter out the `sx` style function\n // to prevent unnecessary styles generated by the composite components.\n mutateStyles(tag, styles => styles.filter(style => style !== styleFunctionSx));\n const {\n name: componentName,\n slot: componentSlot,\n skipVariantsResolver: inputSkipVariantsResolver,\n skipSx: inputSkipSx,\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n overridesResolver = defaultOverridesResolver(lowercaseFirstLetter(componentSlot)),\n ...options\n } = inputOptions;\n\n // if skipVariantsResolver option is defined, take the value, otherwise, true for root and false for other slots.\n const skipVariantsResolver = inputSkipVariantsResolver !== undefined ? inputSkipVariantsResolver :\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n componentSlot && componentSlot !== 'Root' && componentSlot !== 'root' || false;\n const skipSx = inputSkipSx || false;\n let shouldForwardPropOption = shouldForwardProp;\n\n // TODO v6: remove `Root` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n if (componentSlot === 'Root' || componentSlot === 'root') {\n shouldForwardPropOption = rootShouldForwardProp;\n } else if (componentSlot) {\n // any other slot specified\n shouldForwardPropOption = slotShouldForwardProp;\n } else if (isStringTag(tag)) {\n // for string (html) tag, preserve the behavior in emotion & styled-components.\n shouldForwardPropOption = undefined;\n }\n const defaultStyledResolver = styledEngineStyled(tag, {\n shouldForwardProp: shouldForwardPropOption,\n label: generateStyledLabel(componentName, componentSlot),\n ...options\n });\n const transformStyle = style => {\n // On the server Emotion doesn't use React.forwardRef for creating components, so the created\n // component stays as a function. This condition makes sure that we do not interpolate functions\n // which are basically components used as a selectors.\n if (typeof style === 'function' && style.__emotion_real !== style) {\n return function styleFunctionProcessor(props) {\n return processStyle(props, style);\n };\n }\n if (isPlainObject(style)) {\n const serialized = preprocessStyles(style);\n if (!serialized.variants) {\n return serialized.style;\n }\n return function styleObjectProcessor(props) {\n return processStyle(props, serialized);\n };\n }\n return style;\n };\n const muiStyledResolver = (...expressionsInput) => {\n const expressionsHead = [];\n const expressionsBody = expressionsInput.map(transformStyle);\n const expressionsTail = [];\n\n // Preprocess `props` to set the scoped theme value.\n // This must run before any other expression.\n expressionsHead.push(styleAttachTheme);\n if (componentName && overridesResolver) {\n expressionsTail.push(function styleThemeOverrides(props) {\n const theme = props.theme;\n const styleOverrides = theme.components?.[componentName]?.styleOverrides;\n if (!styleOverrides) {\n return null;\n }\n const resolvedStyleOverrides = {};\n\n // TODO: v7 remove iteration and use `resolveStyleArg(styleOverrides[slot])` directly\n // eslint-disable-next-line guard-for-in\n for (const slotKey in styleOverrides) {\n resolvedStyleOverrides[slotKey] = processStyle(props, styleOverrides[slotKey]);\n }\n return overridesResolver(props, resolvedStyleOverrides);\n });\n }\n if (componentName && !skipVariantsResolver) {\n expressionsTail.push(function styleThemeVariants(props) {\n const theme = props.theme;\n const themeVariants = theme?.components?.[componentName]?.variants;\n if (!themeVariants) {\n return null;\n }\n return processStyleVariants(props, themeVariants);\n });\n }\n if (!skipSx) {\n expressionsTail.push(styleFunctionSx);\n }\n\n // This function can be called as a tagged template, so the first argument would contain\n // CSS `string[]` values.\n if (Array.isArray(expressionsBody[0])) {\n const inputStrings = expressionsBody.shift();\n\n // We need to add placeholders in the tagged template for the custom functions we have\n // possibly added (attachTheme, overrides, variants, and sx).\n const placeholdersHead = new Array(expressionsHead.length).fill('');\n const placeholdersTail = new Array(expressionsTail.length).fill('');\n let outputStrings;\n // prettier-ignore\n {\n outputStrings = [...placeholdersHead, ...inputStrings, ...placeholdersTail];\n outputStrings.raw = [...placeholdersHead, ...inputStrings.raw, ...placeholdersTail];\n }\n\n // The only case where we put something before `attachTheme`\n expressionsHead.unshift(outputStrings);\n }\n const expressions = [...expressionsHead, ...expressionsBody, ...expressionsTail];\n const Component = defaultStyledResolver(...expressions);\n if (tag.muiName) {\n Component.muiName = tag.muiName;\n }\n if (process.env.NODE_ENV !== 'production') {\n Component.displayName = generateDisplayName(componentName, componentSlot, tag);\n }\n return Component;\n };\n if (defaultStyledResolver.withConfig) {\n muiStyledResolver.withConfig = defaultStyledResolver.withConfig;\n }\n return muiStyledResolver;\n };\n return styled;\n}\nfunction generateDisplayName(componentName, componentSlot, tag) {\n if (componentName) {\n return `${componentName}${capitalize(componentSlot || '')}`;\n }\n return `Styled(${getDisplayName(tag)})`;\n}\nfunction generateStyledLabel(componentName, componentSlot) {\n let label;\n if (process.env.NODE_ENV !== 'production') {\n if (componentName) {\n // TODO v6: remove `lowercaseFirstLetter()` in the next major release\n // For more details: https://github.com/mui/material-ui/pull/37908\n label = `${componentName}-${lowercaseFirstLetter(componentSlot || 'Root')}`;\n }\n }\n return label;\n}\nfunction isObjectEmpty(object) {\n // eslint-disable-next-line\n for (const _ in object) {\n return false;\n }\n return true;\n}\n\n// https://github.com/emotion-js/emotion/blob/26ded6109fcd8ca9875cc2ce4564fee678a3f3c5/packages/styled/src/utils.js#L40\nfunction isStringTag(tag) {\n return typeof tag === 'string' &&\n // 96 is one less than the char code\n // for \"a\" so this is checking that\n // it's a lowercase character\n tag.charCodeAt(0) > 96;\n}\nfunction lowercaseFirstLetter(string) {\n if (!string) {\n return string;\n }\n return string.charAt(0).toLowerCase() + string.slice(1);\n}","import createStyled from \"../createStyled/index.js\";\nconst styled = createStyled();\nexport default styled;","/**\n * Add keys, values of `defaultProps` that does not exist in `props`\n * @param defaultProps\n * @param props\n * @returns resolved props\n */\nexport default function resolveProps(defaultProps, props) {\n const output = {\n ...props\n };\n for (const key in defaultProps) {\n if (Object.prototype.hasOwnProperty.call(defaultProps, key)) {\n const propName = key;\n if (propName === 'components' || propName === 'slots') {\n output[propName] = {\n ...defaultProps[propName],\n ...output[propName]\n };\n } else if (propName === 'componentsProps' || propName === 'slotProps') {\n const defaultSlotProps = defaultProps[propName];\n const slotProps = props[propName];\n if (!slotProps) {\n output[propName] = defaultSlotProps || {};\n } else if (!defaultSlotProps) {\n output[propName] = slotProps;\n } else {\n output[propName] = {\n ...slotProps\n };\n for (const slotKey in defaultSlotProps) {\n if (Object.prototype.hasOwnProperty.call(defaultSlotProps, slotKey)) {\n const slotPropName = slotKey;\n output[propName][slotPropName] = resolveProps(defaultSlotProps[slotPropName], slotProps[slotPropName]);\n }\n }\n }\n } else if (output[propName] === undefined) {\n output[propName] = defaultProps[propName];\n }\n }\n }\n return output;\n}","import resolveProps from '@mui/utils/resolveProps';\nexport default function getThemeProps(params) {\n const {\n theme,\n name,\n props\n } = params;\n if (!theme || !theme.components || !theme.components[name] || !theme.components[name].defaultProps) {\n return props;\n }\n return resolveProps(theme.components[name].defaultProps, props);\n}","'use client';\n\nimport getThemeProps from \"./getThemeProps.js\";\nimport useTheme from \"../useTheme/index.js\";\nexport default function useThemeProps({\n props,\n name,\n defaultTheme,\n themeId\n}) {\n let theme = useTheme(defaultTheme);\n if (themeId) {\n theme = theme[themeId] || theme;\n }\n return getThemeProps({\n theme,\n name,\n props\n });\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * A version of `React.useLayoutEffect` that does not show a warning when server-side rendering.\n * This is useful for effects that are only needed for client-side rendering but not for SSR.\n *\n * Before you use this hook, make sure to read https://gist.github.com/gaearon/e7d97cdf38a2907924ea12e4ebdf3c85\n * and confirm it doesn't apply to your use-case.\n */\nconst useEnhancedEffect = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;\nexport default useEnhancedEffect;","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport { getThemeProps } from \"../useThemeProps/index.js\";\nimport useTheme from \"../useThemeWithoutDefault/index.js\";\n// TODO React 17: Remove `useMediaQueryOld` once React 17 support is removed\nfunction useMediaQueryOld(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr) {\n const [match, setMatch] = React.useState(() => {\n if (noSsr && matchMedia) {\n return matchMedia(query).matches;\n }\n if (ssrMatchMedia) {\n return ssrMatchMedia(query).matches;\n }\n\n // Once the component is mounted, we rely on the\n // event listeners to return the correct matches value.\n return defaultMatches;\n });\n useEnhancedEffect(() => {\n if (!matchMedia) {\n return undefined;\n }\n const queryList = matchMedia(query);\n const updateMatch = () => {\n setMatch(queryList.matches);\n };\n updateMatch();\n queryList.addEventListener('change', updateMatch);\n return () => {\n queryList.removeEventListener('change', updateMatch);\n };\n }, [query, matchMedia]);\n return match;\n}\n\n// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why\nconst safeReact = {\n ...React\n};\nconst maybeReactUseSyncExternalStore = safeReact.useSyncExternalStore;\nfunction useMediaQueryNew(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr) {\n const getDefaultSnapshot = React.useCallback(() => defaultMatches, [defaultMatches]);\n const getServerSnapshot = React.useMemo(() => {\n if (noSsr && matchMedia) {\n return () => matchMedia(query).matches;\n }\n if (ssrMatchMedia !== null) {\n const {\n matches\n } = ssrMatchMedia(query);\n return () => matches;\n }\n return getDefaultSnapshot;\n }, [getDefaultSnapshot, query, ssrMatchMedia, noSsr, matchMedia]);\n const [getSnapshot, subscribe] = React.useMemo(() => {\n if (matchMedia === null) {\n return [getDefaultSnapshot, () => () => {}];\n }\n const mediaQueryList = matchMedia(query);\n return [() => mediaQueryList.matches, notify => {\n mediaQueryList.addEventListener('change', notify);\n return () => {\n mediaQueryList.removeEventListener('change', notify);\n };\n }];\n }, [getDefaultSnapshot, matchMedia, query]);\n const match = maybeReactUseSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);\n return match;\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function unstable_createUseMediaQuery(params = {}) {\n const {\n themeId\n } = params;\n return function useMediaQuery(queryInput, options = {}) {\n let theme = useTheme();\n if (theme && themeId) {\n theme = theme[themeId] || theme;\n }\n // Wait for jsdom to support the match media feature.\n // All the browsers MUI support have this built-in.\n // This defensive check is here for simplicity.\n // Most of the time, the match media logic isn't central to people tests.\n const supportMatchMedia = typeof window !== 'undefined' && typeof window.matchMedia !== 'undefined';\n const {\n defaultMatches = false,\n matchMedia = supportMatchMedia ? window.matchMedia : null,\n ssrMatchMedia = null,\n noSsr = false\n } = getThemeProps({\n name: 'MuiUseMediaQuery',\n props: options,\n theme\n });\n if (process.env.NODE_ENV !== 'production') {\n if (typeof queryInput === 'function' && theme === null) {\n console.error(['MUI: The `query` argument provided is invalid.', 'You are providing a function without a theme in the context.', 'One of the parent elements needs to use a ThemeProvider.'].join('\\n'));\n }\n }\n let query = typeof queryInput === 'function' ? queryInput(theme) : queryInput;\n query = query.replace(/^@media( ?)/m, '');\n const useMediaQueryImplementation = maybeReactUseSyncExternalStore !== undefined ? useMediaQueryNew : useMediaQueryOld;\n const match = useMediaQueryImplementation(query, defaultMatches, matchMedia, ssrMatchMedia, noSsr);\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue({\n query,\n match\n });\n }\n return match;\n };\n}\nconst useMediaQuery = unstable_createUseMediaQuery();\nexport default useMediaQuery;","function clamp(val, min = Number.MIN_SAFE_INTEGER, max = Number.MAX_SAFE_INTEGER) {\n return Math.max(min, Math.min(val, max));\n}\nexport default clamp;","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\n/* eslint-disable @typescript-eslint/naming-convention */\nimport clamp from '@mui/utils/clamp';\n\n/**\n * Returns a number whose value is limited to the given range.\n * @param {number} value The value to be clamped\n * @param {number} min The lower boundary of the output range\n * @param {number} max The upper boundary of the output range\n * @returns {number} A number in the range [min, max]\n */\nfunction clampWrapper(value, min = 0, max = 1) {\n if (process.env.NODE_ENV !== 'production') {\n if (value < min || value > max) {\n console.error(`MUI: The value provided ${value} is out of range [${min}, ${max}].`);\n }\n }\n return clamp(value, min, max);\n}\n\n/**\n * Converts a color from CSS hex format to CSS rgb format.\n * @param {string} color - Hex color, i.e. #nnn or #nnnnnn\n * @returns {string} A CSS rgb color string\n */\nexport function hexToRgb(color) {\n color = color.slice(1);\n const re = new RegExp(`.{1,${color.length >= 6 ? 2 : 1}}`, 'g');\n let colors = color.match(re);\n if (colors && colors[0].length === 1) {\n colors = colors.map(n => n + n);\n }\n if (process.env.NODE_ENV !== 'production') {\n if (color.length !== color.trim().length) {\n console.error(`MUI: The color: \"${color}\" is invalid. Make sure the color input doesn't contain leading/trailing space.`);\n }\n }\n return colors ? `rgb${colors.length === 4 ? 'a' : ''}(${colors.map((n, index) => {\n return index < 3 ? parseInt(n, 16) : Math.round(parseInt(n, 16) / 255 * 1000) / 1000;\n }).join(', ')})` : '';\n}\nfunction intToHex(int) {\n const hex = int.toString(16);\n return hex.length === 1 ? `0${hex}` : hex;\n}\n\n/**\n * Returns an object with the type and values of a color.\n *\n * Note: Does not support rgb % values.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {object} - A MUI color object: {type: string, values: number[]}\n */\nexport function decomposeColor(color) {\n // Idempotent\n if (color.type) {\n return color;\n }\n if (color.charAt(0) === '#') {\n return decomposeColor(hexToRgb(color));\n }\n const marker = color.indexOf('(');\n const type = color.substring(0, marker);\n if (!['rgb', 'rgba', 'hsl', 'hsla', 'color'].includes(type)) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: Unsupported \\`${color}\\` color.\\n` + 'The following formats are supported: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().' : _formatMuiErrorMessage(9, color));\n }\n let values = color.substring(marker + 1, color.length - 1);\n let colorSpace;\n if (type === 'color') {\n values = values.split(' ');\n colorSpace = values.shift();\n if (values.length === 4 && values[3].charAt(0) === '/') {\n values[3] = values[3].slice(1);\n }\n if (!['srgb', 'display-p3', 'a98-rgb', 'prophoto-rgb', 'rec-2020'].includes(colorSpace)) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: unsupported \\`${colorSpace}\\` color space.\\n` + 'The following color spaces are supported: srgb, display-p3, a98-rgb, prophoto-rgb, rec-2020.' : _formatMuiErrorMessage(10, colorSpace));\n }\n } else {\n values = values.split(',');\n }\n values = values.map(value => parseFloat(value));\n return {\n type,\n values,\n colorSpace\n };\n}\n\n/**\n * Returns a channel created from the input color.\n *\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {string} - The channel for the color, that can be used in rgba or hsla colors\n */\nexport const colorChannel = color => {\n const decomposedColor = decomposeColor(color);\n return decomposedColor.values.slice(0, 3).map((val, idx) => decomposedColor.type.includes('hsl') && idx !== 0 ? `${val}%` : val).join(' ');\n};\nexport const private_safeColorChannel = (color, warning) => {\n try {\n return colorChannel(color);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n};\n\n/**\n * Converts a color object with type and values to a string.\n * @param {object} color - Decomposed color\n * @param {string} color.type - One of: 'rgb', 'rgba', 'hsl', 'hsla', 'color'\n * @param {array} color.values - [n,n,n] or [n,n,n,n]\n * @returns {string} A CSS color string\n */\nexport function recomposeColor(color) {\n const {\n type,\n colorSpace\n } = color;\n let {\n values\n } = color;\n if (type.includes('rgb')) {\n // Only convert the first 3 values to int (i.e. not alpha)\n values = values.map((n, i) => i < 3 ? parseInt(n, 10) : n);\n } else if (type.includes('hsl')) {\n values[1] = `${values[1]}%`;\n values[2] = `${values[2]}%`;\n }\n if (type.includes('color')) {\n values = `${colorSpace} ${values.join(' ')}`;\n } else {\n values = `${values.join(', ')}`;\n }\n return `${type}(${values})`;\n}\n\n/**\n * Converts a color from CSS rgb format to CSS hex format.\n * @param {string} color - RGB color, i.e. rgb(n, n, n)\n * @returns {string} A CSS rgb color string, i.e. #nnnnnn\n */\nexport function rgbToHex(color) {\n // Idempotent\n if (color.startsWith('#')) {\n return color;\n }\n const {\n values\n } = decomposeColor(color);\n return `#${values.map((n, i) => intToHex(i === 3 ? Math.round(255 * n) : n)).join('')}`;\n}\n\n/**\n * Converts a color from hsl format to rgb format.\n * @param {string} color - HSL color values\n * @returns {string} rgb color values\n */\nexport function hslToRgb(color) {\n color = decomposeColor(color);\n const {\n values\n } = color;\n const h = values[0];\n const s = values[1] / 100;\n const l = values[2] / 100;\n const a = s * Math.min(l, 1 - l);\n const f = (n, k = (n + h / 30) % 12) => l - a * Math.max(Math.min(k - 3, 9 - k, 1), -1);\n let type = 'rgb';\n const rgb = [Math.round(f(0) * 255), Math.round(f(8) * 255), Math.round(f(4) * 255)];\n if (color.type === 'hsla') {\n type += 'a';\n rgb.push(values[3]);\n }\n return recomposeColor({\n type,\n values: rgb\n });\n}\n/**\n * The relative brightness of any point in a color space,\n * normalized to 0 for darkest black and 1 for lightest white.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @returns {number} The relative brightness of the color in the range 0 - 1\n */\nexport function getLuminance(color) {\n color = decomposeColor(color);\n let rgb = color.type === 'hsl' || color.type === 'hsla' ? decomposeColor(hslToRgb(color)).values : color.values;\n rgb = rgb.map(val => {\n if (color.type !== 'color') {\n val /= 255; // normalized\n }\n return val <= 0.03928 ? val / 12.92 : ((val + 0.055) / 1.055) ** 2.4;\n });\n\n // Truncate at 3 digits\n return Number((0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]).toFixed(3));\n}\n\n/**\n * Calculates the contrast ratio between two colors.\n *\n * Formula: https://www.w3.org/TR/WCAG20-TECHS/G17.html#G17-tests\n * @param {string} foreground - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @param {string} background - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla()\n * @returns {number} A contrast ratio value in the range 0 - 21.\n */\nexport function getContrastRatio(foreground, background) {\n const lumA = getLuminance(foreground);\n const lumB = getLuminance(background);\n return (Math.max(lumA, lumB) + 0.05) / (Math.min(lumA, lumB) + 0.05);\n}\n\n/**\n * Sets the absolute transparency of a color.\n * Any existing alpha values are overwritten.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} value - value to set the alpha channel to in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function alpha(color, value) {\n color = decomposeColor(color);\n value = clampWrapper(value);\n if (color.type === 'rgb' || color.type === 'hsl') {\n color.type += 'a';\n }\n if (color.type === 'color') {\n color.values[3] = `/${value}`;\n } else {\n color.values[3] = value;\n }\n return recomposeColor(color);\n}\nexport function private_safeAlpha(color, value, warning) {\n try {\n return alpha(color, value);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darkens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function darken(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.includes('hsl')) {\n color.values[2] *= 1 - coefficient;\n } else if (color.type.includes('rgb') || color.type.includes('color')) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] *= 1 - coefficient;\n }\n }\n return recomposeColor(color);\n}\nexport function private_safeDarken(color, coefficient, warning) {\n try {\n return darken(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Lightens a color.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function lighten(color, coefficient) {\n color = decomposeColor(color);\n coefficient = clampWrapper(coefficient);\n if (color.type.includes('hsl')) {\n color.values[2] += (100 - color.values[2]) * coefficient;\n } else if (color.type.includes('rgb')) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (255 - color.values[i]) * coefficient;\n }\n } else if (color.type.includes('color')) {\n for (let i = 0; i < 3; i += 1) {\n color.values[i] += (1 - color.values[i]) * coefficient;\n }\n }\n return recomposeColor(color);\n}\nexport function private_safeLighten(color, coefficient, warning) {\n try {\n return lighten(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Darken or lighten a color, depending on its luminance.\n * Light colors are darkened, dark colors are lightened.\n * @param {string} color - CSS color, i.e. one of: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color()\n * @param {number} coefficient=0.15 - multiplier in the range 0 - 1\n * @returns {string} A CSS color string. Hex input values are returned as rgb\n */\nexport function emphasize(color, coefficient = 0.15) {\n return getLuminance(color) > 0.5 ? darken(color, coefficient) : lighten(color, coefficient);\n}\nexport function private_safeEmphasize(color, coefficient, warning) {\n try {\n return emphasize(color, coefficient);\n } catch (error) {\n if (warning && process.env.NODE_ENV !== 'production') {\n console.warn(warning);\n }\n return color;\n }\n}\n\n/**\n * Blend a transparent overlay color with a background color, resulting in a single\n * RGB color.\n * @param {string} background - CSS color\n * @param {string} overlay - CSS color\n * @param {number} opacity - Opacity multiplier in the range 0 - 1\n * @param {number} [gamma=1.0] - Gamma correction factor. For gamma-correct blending, 2.2 is usual.\n */\nexport function blend(background, overlay, opacity, gamma = 1.0) {\n const blendChannel = (b, o) => Math.round((b ** (1 / gamma) * (1 - opacity) + o ** (1 / gamma) * opacity) ** gamma);\n const backgroundColor = decomposeColor(background);\n const overlayColor = decomposeColor(overlay);\n const rgb = [blendChannel(backgroundColor.values[0], overlayColor.values[0]), blendChannel(backgroundColor.values[1], overlayColor.values[1]), blendChannel(backgroundColor.values[2], overlayColor.values[2])];\n return recomposeColor({\n type: 'rgb',\n values: rgb\n });\n}","import PropTypes from 'prop-types';\nconst refType = PropTypes.oneOfType([PropTypes.func, PropTypes.object]);\nexport default refType;","/**\n * Safe chained function.\n *\n * Will only create a new function if needed,\n * otherwise will pass back existing functions or null.\n */\nexport default function createChainedFunction(...funcs) {\n return funcs.reduce((acc, func) => {\n if (func == null) {\n return acc;\n }\n return function chainedFunction(...args) {\n acc.apply(this, args);\n func.apply(this, args);\n };\n }, () => {});\n}","// Corresponds to 10 frames at 60 Hz.\n// A few bytes payload overhead when lodash/debounce is ~3 kB and debounce ~300 B.\nexport default function debounce(func, wait = 166) {\n let timeout;\n function debounced(...args) {\n const later = () => {\n // @ts-ignore\n func.apply(this, args);\n };\n clearTimeout(timeout);\n timeout = setTimeout(later, wait);\n }\n debounced.clear = () => {\n clearTimeout(timeout);\n };\n return debounced;\n}","import * as React from 'react';\nexport default function isMuiElement(element, muiNames) {\n return /*#__PURE__*/React.isValidElement(element) && muiNames.indexOf(\n // For server components `muiName` is avaialble in element.type._payload.value.muiName\n // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45\n // eslint-disable-next-line no-underscore-dangle\n element.type.muiName ?? element.type?._payload?.value?.muiName) !== -1;\n}","export default function ownerDocument(node) {\n return node && node.ownerDocument || document;\n}","import ownerDocument from \"../ownerDocument/index.js\";\nexport default function ownerWindow(node) {\n const doc = ownerDocument(node);\n return doc.defaultView || window;\n}","/**\n * TODO v5: consider making it private\n *\n * passes {value} to {ref}\n *\n * WARNING: Be sure to only call this inside a callback that is passed as a ref.\n * Otherwise, make sure to cleanup the previous {ref} if it changes. See\n * https://github.com/mui/material-ui/issues/13539\n *\n * Useful if you want to expose the ref of an inner component to the public API\n * while still using it inside the component.\n * @param ref A ref callback or ref object. If anything falsy, this is a no-op.\n */\nexport default function setRef(ref, value) {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}","'use client';\n\nimport * as React from 'react';\nlet globalId = 0;\n\n// TODO React 17: Remove `useGlobalId` once React 17 support is removed\nfunction useGlobalId(idOverride) {\n const [defaultId, setDefaultId] = React.useState(idOverride);\n const id = idOverride || defaultId;\n React.useEffect(() => {\n if (defaultId == null) {\n // Fallback to this default id when possible.\n // Use the incrementing value for client-side rendering only.\n // We can't use it server-side.\n // If you want to use random values please consider the Birthday Problem: https://en.wikipedia.org/wiki/Birthday_problem\n globalId += 1;\n setDefaultId(`mui-${globalId}`);\n }\n }, [defaultId]);\n return id;\n}\n\n// See https://github.com/mui/material-ui/issues/41190#issuecomment-2040873379 for why\nconst safeReact = {\n ...React\n};\nconst maybeReactUseId = safeReact.useId;\n\n/**\n *\n * @example
\n * @param idOverride\n * @returns {string}\n */\nexport default function useId(idOverride) {\n // React.useId() is only available from React 17.0.0.\n if (maybeReactUseId !== undefined) {\n const reactId = maybeReactUseId();\n return idOverride ?? reactId;\n }\n\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- `React.useId` is invariant at runtime.\n return useGlobalId(idOverride);\n}","'use client';\n\n// TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- process.env never changes, dependency arrays are intentionally ignored\n/* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\nimport * as React from 'react';\nexport default function useControlled({\n controlled,\n default: defaultProp,\n name,\n state = 'value'\n}) {\n // isControlled is ignored in the hook dependency lists as it should never change.\n const {\n current: isControlled\n } = React.useRef(controlled !== undefined);\n const [valueState, setValue] = React.useState(defaultProp);\n const value = isControlled ? controlled : valueState;\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (controlled !== undefined)) {\n console.error([`MUI: A component is changing the ${isControlled ? '' : 'un'}controlled ${state} state of ${name} to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled ${name} ` + 'element for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [state, name, controlled]);\n const {\n current: defaultValue\n } = React.useRef(defaultProp);\n React.useEffect(() => {\n // Object.is() is not equivalent to the === operator.\n // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is for more details.\n if (!isControlled && !Object.is(defaultValue, defaultProp)) {\n console.error([`MUI: A component is changing the default ${state} state of an uncontrolled ${name} after being initialized. ` + `To suppress this warning opt to use a controlled ${name}.`].join('\\n'));\n }\n }, [JSON.stringify(defaultProp)]);\n }\n const setValueIfUncontrolled = React.useCallback(newValue => {\n if (!isControlled) {\n setValue(newValue);\n }\n }, []);\n return [value, setValueIfUncontrolled];\n}","'use client';\n\nimport * as React from 'react';\nimport useEnhancedEffect from \"../useEnhancedEffect/index.js\";\n\n/**\n * Inspired by https://github.com/facebook/react/issues/14099#issuecomment-440013892\n * See RFC in https://github.com/reactjs/rfcs/pull/220\n */\n\nfunction useEventCallback(fn) {\n const ref = React.useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return React.useRef((...args) =>\n // @ts-expect-error hide `this`\n (0, ref.current)(...args)).current;\n}\nexport default useEventCallback;","'use client';\n\nimport * as React from 'react';\nimport setRef from \"../setRef/index.js\";\n\n/**\n * Takes an array of refs and returns a new ref which will apply any modification to all of the refs.\n * This is useful when you want to have the ref used in multiple places.\n *\n * ```tsx\n * const rootRef = React.useRef(null);\n * const refFork = useForkRef(rootRef, props.ref);\n *\n * return (\n * \n * );\n * ```\n *\n * @param {Array | undefined>} refs The ref array.\n * @returns {React.RefCallback | null} The new ref callback.\n */\nexport default function useForkRef(...refs) {\n /**\n * This will create a new function if the refs passed to this hook change and are all defined.\n * This means react will call the old forkRef with `null` and the new forkRef\n * with the ref. Cleanup naturally emerges from this behavior.\n */\n return React.useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null;\n }\n return instance => {\n refs.forEach(ref => {\n setRef(ref, instance);\n });\n };\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- intentionally ignoring that the dependency array must be an array literal\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, refs);\n}","'use client';\n\nimport * as React from 'react';\nconst UNINITIALIZED = {};\n\n/**\n * A React.useRef() that is initialized lazily with a function. Note that it accepts an optional\n * initialization argument, so the initialization function doesn't need to be an inline closure.\n *\n * @usage\n * const ref = useLazyRef(sortColumns, columns)\n */\nexport default function useLazyRef(init, initArg) {\n const ref = React.useRef(UNINITIALIZED);\n if (ref.current === UNINITIALIZED) {\n ref.current = init(initArg);\n }\n return ref;\n}","'use client';\n\nimport * as React from 'react';\nconst EMPTY = [];\n\n/**\n * A React.useEffect equivalent that runs once, when the component is mounted.\n */\nexport default function useOnMount(fn) {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler -- no need to put `fn` in the dependency array\n /* eslint-disable react-hooks/exhaustive-deps */\n React.useEffect(fn, EMPTY);\n /* eslint-enable react-hooks/exhaustive-deps */\n}","'use client';\n\nimport useLazyRef from \"../useLazyRef/useLazyRef.js\";\nimport useOnMount from \"../useOnMount/useOnMount.js\";\nexport class Timeout {\n static create() {\n return new Timeout();\n }\n currentId = null;\n\n /**\n * Executes `fn` after `delay`, clearing any previously scheduled call.\n */\n start(delay, fn) {\n this.clear();\n this.currentId = setTimeout(() => {\n this.currentId = null;\n fn();\n }, delay);\n }\n clear = () => {\n if (this.currentId !== null) {\n clearTimeout(this.currentId);\n this.currentId = null;\n }\n };\n disposeEffect = () => {\n return this.clear;\n };\n}\nexport default function useTimeout() {\n const timeout = useLazyRef(Timeout.create).current;\n useOnMount(timeout.disposeEffect);\n return timeout;\n}","/**\n * Returns a boolean indicating if the event's target has :focus-visible\n */\nexport default function isFocusVisible(element) {\n try {\n return element.matches(':focus-visible');\n } catch (error) {\n // Do not warn on jsdom tests, otherwise all tests that rely on focus have to be skipped\n // Tests that rely on `:focus-visible` will still have to be skipped in jsdom\n if (process.env.NODE_ENV !== 'production' && !/jsdom/.test(window.navigator.userAgent)) {\n console.warn(['MUI: The `:focus-visible` pseudo class is not supported in this browser.', 'Some components rely on this feature to work properly.'].join('\\n'));\n }\n }\n return false;\n}","// A change of the browser zoom change the scrollbar size.\n// Credit https://github.com/twbs/bootstrap/blob/488fd8afc535ca3a6ad4dc581f5e89217b6a36ac/js/src/util/scrollbar.js#L14-L18\nexport default function getScrollbarSize(win = window) {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = win.document.documentElement.clientWidth;\n return win.innerWidth - documentWidth;\n}","'use client';\n\nimport * as React from 'react';\nconst usePreviousProps = value => {\n const ref = React.useRef({});\n React.useEffect(() => {\n ref.current = value;\n });\n return ref.current;\n};\nexport default usePreviousProps;","const visuallyHidden = {\n border: 0,\n clip: 'rect(0 0 0 0)',\n height: '1px',\n margin: '-1px',\n overflow: 'hidden',\n padding: 0,\n position: 'absolute',\n whiteSpace: 'nowrap',\n width: '1px'\n};\nexport default visuallyHidden;","/* eslint no-restricted-syntax: 0, prefer-template: 0, guard-for-in: 0\n ---\n These rules are preventing the performance optimizations below.\n */\n\n/**\n * Compose classes from multiple sources.\n *\n * @example\n * ```tsx\n * const slots = {\n * root: ['root', 'primary'],\n * label: ['label'],\n * };\n *\n * const getUtilityClass = (slot) => `MuiButton-${slot}`;\n *\n * const classes = {\n * root: 'my-root-class',\n * };\n *\n * const output = composeClasses(slots, getUtilityClass, classes);\n * // {\n * // root: 'MuiButton-root MuiButton-primary my-root-class',\n * // label: 'MuiButton-label',\n * // }\n * ```\n *\n * @param slots a list of classes for each possible slot\n * @param getUtilityClass a function to resolve the class based on the slot name\n * @param classes the input classes from props\n * @returns the resolved classes for all slots\n */\nexport default function composeClasses(slots, getUtilityClass, classes = undefined) {\n const output = {};\n for (const slotName in slots) {\n const slot = slots[slotName];\n let buffer = '';\n let start = true;\n for (let i = 0; i < slot.length; i += 1) {\n const value = slot[i];\n if (value) {\n buffer += (start === true ? '' : ' ') + getUtilityClass(value);\n start = false;\n if (classes && classes[value]) {\n buffer += ' ' + classes[value];\n }\n }\n }\n output[slotName] = buffer;\n }\n return output;\n}","/**\n * Determines if a given element is a DOM element name (i.e. not a React component).\n */\nfunction isHostComponent(element) {\n return typeof element === 'string';\n}\nexport default isHostComponent;","import isHostComponent from \"../isHostComponent/index.js\";\n\n/**\n * Type of the ownerState based on the type of an element it applies to.\n * This resolves to the provided OwnerState for React components and `undefined` for host components.\n * Falls back to `OwnerState | undefined` when the exact type can't be determined in development time.\n */\n\n/**\n * Appends the ownerState object to the props, merging with the existing one if necessary.\n *\n * @param elementType Type of the element that owns the `existingProps`. If the element is a DOM node or undefined, `ownerState` is not applied.\n * @param otherProps Props of the element.\n * @param ownerState\n */\nfunction appendOwnerState(elementType, otherProps, ownerState) {\n if (elementType === undefined || isHostComponent(elementType)) {\n return otherProps;\n }\n return {\n ...otherProps,\n ownerState: {\n ...otherProps.ownerState,\n ...ownerState\n }\n };\n}\nexport default appendOwnerState;","/**\n * Extracts event handlers from a given object.\n * A prop is considered an event handler if it is a function and its name starts with `on`.\n *\n * @param object An object to extract event handlers from.\n * @param excludeKeys An array of keys to exclude from the returned object.\n */\nfunction extractEventHandlers(object, excludeKeys = []) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => prop.match(/^on[A-Z]/) && typeof object[prop] === 'function' && !excludeKeys.includes(prop)).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}\nexport default extractEventHandlers;","/**\n * Removes event handlers from the given object.\n * A field is considered an event handler if it is a function with a name beginning with `on`.\n *\n * @param object Object to remove event handlers from.\n * @returns Object with event handlers removed.\n */\nfunction omitEventHandlers(object) {\n if (object === undefined) {\n return {};\n }\n const result = {};\n Object.keys(object).filter(prop => !(prop.match(/^on[A-Z]/) && typeof object[prop] === 'function')).forEach(prop => {\n result[prop] = object[prop];\n });\n return result;\n}\nexport default omitEventHandlers;","import clsx from 'clsx';\nimport extractEventHandlers from \"../extractEventHandlers/index.js\";\nimport omitEventHandlers from \"../omitEventHandlers/index.js\";\n/**\n * Merges the slot component internal props (usually coming from a hook)\n * with the externally provided ones.\n *\n * The merge order is (the latter overrides the former):\n * 1. The internal props (specified as a getter function to work with get*Props hook result)\n * 2. Additional props (specified internally on a Base UI component)\n * 3. External props specified on the owner component. These should only be used on a root slot.\n * 4. External props specified in the `slotProps.*` prop.\n * 5. The `className` prop - combined from all the above.\n * @param parameters\n * @returns\n */\nfunction mergeSlotProps(parameters) {\n const {\n getSlotProps,\n additionalProps,\n externalSlotProps,\n externalForwardedProps,\n className\n } = parameters;\n if (!getSlotProps) {\n // The simpler case - getSlotProps is not defined, so no internal event handlers are defined,\n // so we can simply merge all the props without having to worry about extracting event handlers.\n const joinedClasses = clsx(additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);\n const mergedStyle = {\n ...additionalProps?.style,\n ...externalForwardedProps?.style,\n ...externalSlotProps?.style\n };\n const props = {\n ...additionalProps,\n ...externalForwardedProps,\n ...externalSlotProps\n };\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: undefined\n };\n }\n\n // In this case, getSlotProps is responsible for calling the external event handlers.\n // We don't need to include them in the merged props because of this.\n\n const eventHandlers = extractEventHandlers({\n ...externalForwardedProps,\n ...externalSlotProps\n });\n const componentsPropsWithoutEventHandlers = omitEventHandlers(externalSlotProps);\n const otherPropsWithoutEventHandlers = omitEventHandlers(externalForwardedProps);\n const internalSlotProps = getSlotProps(eventHandlers);\n\n // The order of classes is important here.\n // Emotion (that we use in libraries consuming Base UI) depends on this order\n // to properly override style. It requires the most important classes to be last\n // (see https://github.com/mui/material-ui/pull/33205) for the related discussion.\n const joinedClasses = clsx(internalSlotProps?.className, additionalProps?.className, className, externalForwardedProps?.className, externalSlotProps?.className);\n const mergedStyle = {\n ...internalSlotProps?.style,\n ...additionalProps?.style,\n ...externalForwardedProps?.style,\n ...externalSlotProps?.style\n };\n const props = {\n ...internalSlotProps,\n ...additionalProps,\n ...otherPropsWithoutEventHandlers,\n ...componentsPropsWithoutEventHandlers\n };\n if (joinedClasses.length > 0) {\n props.className = joinedClasses;\n }\n if (Object.keys(mergedStyle).length > 0) {\n props.style = mergedStyle;\n }\n return {\n props,\n internalRef: internalSlotProps.ref\n };\n}\nexport default mergeSlotProps;","/**\n * If `componentProps` is a function, calls it with the provided `ownerState`.\n * Otherwise, just returns `componentProps`.\n */\nfunction resolveComponentProps(componentProps, ownerState, slotState) {\n if (typeof componentProps === 'function') {\n return componentProps(ownerState, slotState);\n }\n return componentProps;\n}\nexport default resolveComponentProps;","'use client';\n\nimport useForkRef from \"../useForkRef/index.js\";\nimport appendOwnerState from \"../appendOwnerState/index.js\";\nimport mergeSlotProps from \"../mergeSlotProps/index.js\";\nimport resolveComponentProps from \"../resolveComponentProps/index.js\";\n/**\n * @ignore - do not document.\n * Builds the props to be passed into the slot of an unstyled component.\n * It merges the internal props of the component with the ones supplied by the user, allowing to customize the behavior.\n * If the slot component is not a host component, it also merges in the `ownerState`.\n *\n * @param parameters.getSlotProps - A function that returns the props to be passed to the slot component.\n */\nfunction useSlotProps(parameters) {\n const {\n elementType,\n externalSlotProps,\n ownerState,\n skipResolvingSlotProps = false,\n ...other\n } = parameters;\n const resolvedComponentsProps = skipResolvingSlotProps ? {} : resolveComponentProps(externalSlotProps, ownerState);\n const {\n props: mergedProps,\n internalRef\n } = mergeSlotProps({\n ...other,\n externalSlotProps: resolvedComponentsProps\n });\n const ref = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.additionalProps?.ref);\n const props = appendOwnerState(elementType, {\n ...mergedProps,\n ref\n }, ownerState);\n return props;\n}\nexport default useSlotProps;","import * as React from 'react';\n\n/**\n * Returns the ref of a React element handling differences between React 19 and older versions.\n * It will throw runtime error if the element is not a valid React element.\n *\n * @param element React.ReactElement\n * @returns React.Ref | null\n */\nexport default function getReactElementRef(element) {\n // 'ref' is passed as prop in React 19, whereas 'ref' is directly attached to children in older versions\n if (parseInt(React.version, 10) >= 19) {\n return element?.props?.ref || null;\n }\n // @ts-expect-error element.ref is not included in the ReactElement type\n // https://github.com/DefinitelyTyped/DefinitelyTyped/discussions/70189\n return element?.ref || null;\n}","'use client';\n\nimport * as React from 'react';\nconst ThemeContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== 'production') {\n ThemeContext.displayName = 'ThemeContext';\n}\nexport default ThemeContext;","import * as React from 'react';\nimport ThemeContext from \"./ThemeContext.js\";\nexport default function useTheme() {\n const theme = React.useContext(ThemeContext);\n if (process.env.NODE_ENV !== 'production') {\n // TODO: uncomment once we enable eslint-plugin-react-compiler eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks -- It's not required to run React.useDebugValue in production\n React.useDebugValue(theme);\n }\n return theme;\n}","const hasSymbol = typeof Symbol === 'function' && Symbol.for;\nexport default hasSymbol ? Symbol.for('mui.nested') : '__THEME_NESTED__';","import * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { exactProp } from '@mui/utils';\nimport ThemeContext from \"../useTheme/ThemeContext.js\";\nimport useTheme from \"../useTheme/index.js\";\nimport nested from \"./nested.js\";\n\n// To support composition of theme.\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction mergeOuterLocalTheme(outerTheme, localTheme) {\n if (typeof localTheme === 'function') {\n const mergedTheme = localTheme(outerTheme);\n if (process.env.NODE_ENV !== 'production') {\n if (!mergedTheme) {\n console.error(['MUI: You should return an object from your theme function, i.e.', ' ({})} />'].join('\\n'));\n }\n }\n return mergedTheme;\n }\n return {\n ...outerTheme,\n ...localTheme\n };\n}\n\n/**\n * This component takes a `theme` prop.\n * It makes the `theme` available down the React tree thanks to React context.\n * This component should preferably be used at **the root of your component tree**.\n */\nfunction ThemeProvider(props) {\n const {\n children,\n theme: localTheme\n } = props;\n const outerTheme = useTheme();\n if (process.env.NODE_ENV !== 'production') {\n if (outerTheme === null && typeof localTheme === 'function') {\n console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', ' outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\\n'));\n }\n }\n const theme = React.useMemo(() => {\n const output = outerTheme === null ? {\n ...localTheme\n } : mergeOuterLocalTheme(outerTheme, localTheme);\n if (output != null) {\n output[nested] = outerTheme !== null;\n }\n return output;\n }, [localTheme, outerTheme]);\n return /*#__PURE__*/_jsx(ThemeContext.Provider, {\n value: theme,\n children: children\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = {\n /**\n * Your component tree.\n */\n children: PropTypes.node,\n /**\n * A theme object. You can provide a function to extend the outer theme.\n */\n theme: PropTypes.oneOfType([PropTypes.object, PropTypes.func]).isRequired\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) : void 0;\n}\nexport default ThemeProvider;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst RtlContext = /*#__PURE__*/React.createContext();\nfunction RtlProvider({\n value,\n ...props\n}) {\n return /*#__PURE__*/_jsx(RtlContext.Provider, {\n value: value ?? true,\n ...props\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? RtlProvider.propTypes = {\n children: PropTypes.node,\n value: PropTypes.bool\n} : void 0;\nexport const useRtl = () => {\n const value = React.useContext(RtlContext);\n return value ?? false;\n};\nexport default RtlProvider;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport resolveProps from '@mui/utils/resolveProps';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PropsContext = /*#__PURE__*/React.createContext(undefined);\nfunction DefaultPropsProvider({\n value,\n children\n}) {\n return /*#__PURE__*/_jsx(PropsContext.Provider, {\n value: value,\n children: children\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? DefaultPropsProvider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n value: PropTypes.object\n} : void 0;\nfunction getThemeProps(params) {\n const {\n theme,\n name,\n props\n } = params;\n if (!theme || !theme.components || !theme.components[name]) {\n return props;\n }\n const config = theme.components[name];\n if (config.defaultProps) {\n // compatible with v5 signature\n return resolveProps(config.defaultProps, props);\n }\n if (!config.styleOverrides && !config.variants) {\n // v6 signature, no property 'defaultProps'\n return resolveProps(config, props);\n }\n return props;\n}\nexport function useDefaultProps({\n props,\n name\n}) {\n const ctx = React.useContext(PropsContext);\n return getThemeProps({\n props,\n name,\n theme: {\n components: ctx\n }\n });\n}\nexport default DefaultPropsProvider;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { ThemeProvider as MuiThemeProvider, useTheme as usePrivateTheme } from '@mui/private-theming';\nimport exactProp from '@mui/utils/exactProp';\nimport { ThemeContext as StyledEngineThemeContext } from '@mui/styled-engine';\nimport useThemeWithoutDefault from \"../useThemeWithoutDefault/index.js\";\nimport RtlProvider from \"../RtlProvider/index.js\";\nimport DefaultPropsProvider from \"../DefaultPropsProvider/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst EMPTY_THEME = {};\nfunction useThemeScoping(themeId, upperTheme, localTheme, isPrivate = false) {\n return React.useMemo(() => {\n const resolvedTheme = themeId ? upperTheme[themeId] || upperTheme : upperTheme;\n if (typeof localTheme === 'function') {\n const mergedTheme = localTheme(resolvedTheme);\n const result = themeId ? {\n ...upperTheme,\n [themeId]: mergedTheme\n } : mergedTheme;\n // must return a function for the private theme to NOT merge with the upper theme.\n // see the test case \"use provided theme from a callback\" in ThemeProvider.test.js\n if (isPrivate) {\n return () => result;\n }\n return result;\n }\n return themeId ? {\n ...upperTheme,\n [themeId]: localTheme\n } : {\n ...upperTheme,\n ...localTheme\n };\n }, [themeId, upperTheme, localTheme, isPrivate]);\n}\n\n/**\n * This component makes the `theme` available down the React tree.\n * It should preferably be used at **the root of your component tree**.\n *\n * // existing use case\n * // theme scoping\n */\nfunction ThemeProvider(props) {\n const {\n children,\n theme: localTheme,\n themeId\n } = props;\n const upperTheme = useThemeWithoutDefault(EMPTY_THEME);\n const upperPrivateTheme = usePrivateTheme() || EMPTY_THEME;\n if (process.env.NODE_ENV !== 'production') {\n if (upperTheme === null && typeof localTheme === 'function' || themeId && upperTheme && !upperTheme[themeId] && typeof localTheme === 'function') {\n console.error(['MUI: You are providing a theme function prop to the ThemeProvider component:', ' outerTheme} />', '', 'However, no outer theme is present.', 'Make sure a theme is already injected higher in the React tree ' + 'or provide a theme object.'].join('\\n'));\n }\n }\n const engineTheme = useThemeScoping(themeId, upperTheme, localTheme);\n const privateTheme = useThemeScoping(themeId, upperPrivateTheme, localTheme, true);\n const rtlValue = (themeId ? engineTheme[themeId] : engineTheme).direction === 'rtl';\n return /*#__PURE__*/_jsx(MuiThemeProvider, {\n theme: privateTheme,\n children: /*#__PURE__*/_jsx(StyledEngineThemeContext.Provider, {\n value: engineTheme,\n children: /*#__PURE__*/_jsx(RtlProvider, {\n value: rtlValue,\n children: /*#__PURE__*/_jsx(DefaultPropsProvider, {\n value: themeId ? engineTheme[themeId].components : engineTheme.components,\n children: children\n })\n })\n })\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Your component tree.\n */\n children: PropTypes.node,\n /**\n * A theme object. You can provide a function to extend the outer theme.\n */\n theme: PropTypes.oneOfType([PropTypes.func, PropTypes.object]).isRequired,\n /**\n * The design system's unique id for getting the corresponded theme when there are multiple design systems.\n */\n themeId: PropTypes.string\n} : void 0;\nif (process.env.NODE_ENV !== 'production') {\n process.env.NODE_ENV !== \"production\" ? ThemeProvider.propTypes = exactProp(ThemeProvider.propTypes) : void 0;\n}\nexport default ThemeProvider;","import preprocessStyles from \"./preprocessStyles.js\";\n\n/* eslint-disable @typescript-eslint/naming-convention */\n\n// We need to pass an argument as `{ theme }` for PigmentCSS, but we don't want to\n// allocate more objects.\nconst arg = {\n theme: undefined\n};\n\n/**\n * Memoize style function on theme.\n * Intended to be used in styled() calls that only need access to the theme.\n */\nexport default function unstable_memoTheme(styleFn) {\n let lastValue;\n let lastTheme;\n return function styleMemoized(props) {\n let value = lastValue;\n if (value === undefined || props.theme !== lastTheme) {\n arg.theme = props.theme;\n value = preprocessStyles(styleFn(arg));\n lastValue = value;\n lastTheme = props.theme;\n }\n return value;\n };\n}","/**\n * Split this component for RSC import\n */\nimport * as React from 'react';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const DEFAULT_MODE_STORAGE_KEY = 'mode';\nexport const DEFAULT_COLOR_SCHEME_STORAGE_KEY = 'color-scheme';\nexport const DEFAULT_ATTRIBUTE = 'data-color-scheme';\nexport default function InitColorSchemeScript(options) {\n const {\n defaultMode = 'system',\n defaultLightColorScheme = 'light',\n defaultDarkColorScheme = 'dark',\n modeStorageKey = DEFAULT_MODE_STORAGE_KEY,\n colorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY,\n attribute: initialAttribute = DEFAULT_ATTRIBUTE,\n colorSchemeNode = 'document.documentElement',\n nonce\n } = options || {};\n let setter = '';\n let attribute = initialAttribute;\n if (initialAttribute === 'class') {\n attribute = '.%s';\n }\n if (initialAttribute === 'data') {\n attribute = '[data-%s]';\n }\n if (attribute.startsWith('.')) {\n const selector = attribute.substring(1);\n setter += `${colorSchemeNode}.classList.remove('${selector}'.replace('%s', light), '${selector}'.replace('%s', dark));\n ${colorSchemeNode}.classList.add('${selector}'.replace('%s', colorScheme));`;\n }\n const matches = attribute.match(/\\[([^\\]]+)\\]/); // case [data-color-scheme=%s] or [data-color-scheme]\n if (matches) {\n const [attr, value] = matches[1].split('=');\n if (!value) {\n setter += `${colorSchemeNode}.removeAttribute('${attr}'.replace('%s', light));\n ${colorSchemeNode}.removeAttribute('${attr}'.replace('%s', dark));`;\n }\n setter += `\n ${colorSchemeNode}.setAttribute('${attr}'.replace('%s', colorScheme), ${value ? `${value}.replace('%s', colorScheme)` : '\"\"'});`;\n } else {\n setter += `${colorSchemeNode}.setAttribute('${attribute}', colorScheme);`;\n }\n return /*#__PURE__*/_jsx(\"script\", {\n suppressHydrationWarning: true,\n nonce: typeof window === 'undefined' ? nonce : ''\n // eslint-disable-next-line react/no-danger\n ,\n dangerouslySetInnerHTML: {\n __html: `(function() {\ntry {\n let colorScheme = '';\n const mode = localStorage.getItem('${modeStorageKey}') || '${defaultMode}';\n const dark = localStorage.getItem('${colorSchemeStorageKey}-dark') || '${defaultDarkColorScheme}';\n const light = localStorage.getItem('${colorSchemeStorageKey}-light') || '${defaultLightColorScheme}';\n if (mode === 'system') {\n // handle system mode\n const mql = window.matchMedia('(prefers-color-scheme: dark)');\n if (mql.matches) {\n colorScheme = dark\n } else {\n colorScheme = light\n }\n }\n if (mode === 'light') {\n colorScheme = light;\n }\n if (mode === 'dark') {\n colorScheme = dark;\n }\n if (colorScheme) {\n ${setter}\n }\n} catch(e){}})();`\n }\n }, \"mui-color-scheme-init\");\n}","'use client';\n\nimport * as React from 'react';\nimport { DEFAULT_MODE_STORAGE_KEY, DEFAULT_COLOR_SCHEME_STORAGE_KEY } from \"../InitColorSchemeScript/InitColorSchemeScript.js\";\nexport function getSystemMode(mode) {\n if (typeof window !== 'undefined' && typeof window.matchMedia === 'function' && mode === 'system') {\n const mql = window.matchMedia('(prefers-color-scheme: dark)');\n if (mql.matches) {\n return 'dark';\n }\n return 'light';\n }\n return undefined;\n}\nfunction processState(state, callback) {\n if (state.mode === 'light' || state.mode === 'system' && state.systemMode === 'light') {\n return callback('light');\n }\n if (state.mode === 'dark' || state.mode === 'system' && state.systemMode === 'dark') {\n return callback('dark');\n }\n return undefined;\n}\nexport function getColorScheme(state) {\n return processState(state, mode => {\n if (mode === 'light') {\n return state.lightColorScheme;\n }\n if (mode === 'dark') {\n return state.darkColorScheme;\n }\n return undefined;\n });\n}\nfunction initializeValue(key, defaultValue) {\n if (typeof window === 'undefined') {\n return undefined;\n }\n let value;\n try {\n value = localStorage.getItem(key) || undefined;\n if (!value) {\n // the first time that user enters the site.\n localStorage.setItem(key, defaultValue);\n }\n } catch {\n // Unsupported\n }\n return value || defaultValue;\n}\nexport default function useCurrentColorScheme(options) {\n const {\n defaultMode = 'light',\n defaultLightColorScheme,\n defaultDarkColorScheme,\n supportedColorSchemes = [],\n modeStorageKey = DEFAULT_MODE_STORAGE_KEY,\n colorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY,\n storageWindow = typeof window === 'undefined' ? undefined : window,\n noSsr = false\n } = options;\n const joinedColorSchemes = supportedColorSchemes.join(',');\n const isMultiSchemes = supportedColorSchemes.length > 1;\n const [state, setState] = React.useState(() => {\n const initialMode = initializeValue(modeStorageKey, defaultMode);\n const lightColorScheme = initializeValue(`${colorSchemeStorageKey}-light`, defaultLightColorScheme);\n const darkColorScheme = initializeValue(`${colorSchemeStorageKey}-dark`, defaultDarkColorScheme);\n return {\n mode: initialMode,\n systemMode: getSystemMode(initialMode),\n lightColorScheme,\n darkColorScheme\n };\n });\n const [isClient, setIsClient] = React.useState(noSsr || !isMultiSchemes);\n React.useEffect(() => {\n setIsClient(true); // to rerender the component after hydration\n }, []);\n const colorScheme = getColorScheme(state);\n const setMode = React.useCallback(mode => {\n setState(currentState => {\n if (mode === currentState.mode) {\n // do nothing if mode does not change\n return currentState;\n }\n const newMode = mode ?? defaultMode;\n try {\n localStorage.setItem(modeStorageKey, newMode);\n } catch {\n // Unsupported\n }\n return {\n ...currentState,\n mode: newMode,\n systemMode: getSystemMode(newMode)\n };\n });\n }, [modeStorageKey, defaultMode]);\n const setColorScheme = React.useCallback(value => {\n if (!value) {\n setState(currentState => {\n try {\n localStorage.setItem(`${colorSchemeStorageKey}-light`, defaultLightColorScheme);\n localStorage.setItem(`${colorSchemeStorageKey}-dark`, defaultDarkColorScheme);\n } catch {\n // Unsupported\n }\n return {\n ...currentState,\n lightColorScheme: defaultLightColorScheme,\n darkColorScheme: defaultDarkColorScheme\n };\n });\n } else if (typeof value === 'string') {\n if (value && !joinedColorSchemes.includes(value)) {\n console.error(`\\`${value}\\` does not exist in \\`theme.colorSchemes\\`.`);\n } else {\n setState(currentState => {\n const newState = {\n ...currentState\n };\n processState(currentState, mode => {\n try {\n localStorage.setItem(`${colorSchemeStorageKey}-${mode}`, value);\n } catch {\n // Unsupported\n }\n if (mode === 'light') {\n newState.lightColorScheme = value;\n }\n if (mode === 'dark') {\n newState.darkColorScheme = value;\n }\n });\n return newState;\n });\n }\n } else {\n setState(currentState => {\n const newState = {\n ...currentState\n };\n const newLightColorScheme = value.light === null ? defaultLightColorScheme : value.light;\n const newDarkColorScheme = value.dark === null ? defaultDarkColorScheme : value.dark;\n if (newLightColorScheme) {\n if (!joinedColorSchemes.includes(newLightColorScheme)) {\n console.error(`\\`${newLightColorScheme}\\` does not exist in \\`theme.colorSchemes\\`.`);\n } else {\n newState.lightColorScheme = newLightColorScheme;\n try {\n localStorage.setItem(`${colorSchemeStorageKey}-light`, newLightColorScheme);\n } catch (error) {\n // Unsupported\n }\n }\n }\n if (newDarkColorScheme) {\n if (!joinedColorSchemes.includes(newDarkColorScheme)) {\n console.error(`\\`${newDarkColorScheme}\\` does not exist in \\`theme.colorSchemes\\`.`);\n } else {\n newState.darkColorScheme = newDarkColorScheme;\n try {\n localStorage.setItem(`${colorSchemeStorageKey}-dark`, newDarkColorScheme);\n } catch (error) {\n // Unsupported\n }\n }\n }\n return newState;\n });\n }\n }, [joinedColorSchemes, colorSchemeStorageKey, defaultLightColorScheme, defaultDarkColorScheme]);\n const handleMediaQuery = React.useCallback(event => {\n if (state.mode === 'system') {\n setState(currentState => {\n const systemMode = event?.matches ? 'dark' : 'light';\n\n // Early exit, nothing changed.\n if (currentState.systemMode === systemMode) {\n return currentState;\n }\n return {\n ...currentState,\n systemMode\n };\n });\n }\n }, [state.mode]);\n\n // Ref hack to avoid adding handleMediaQuery as a dep\n const mediaListener = React.useRef(handleMediaQuery);\n mediaListener.current = handleMediaQuery;\n React.useEffect(() => {\n if (typeof window.matchMedia !== 'function' || !isMultiSchemes) {\n return undefined;\n }\n const handler = (...args) => mediaListener.current(...args);\n\n // Always listen to System preference\n const media = window.matchMedia('(prefers-color-scheme: dark)');\n\n // Intentionally use deprecated listener methods to support iOS & old browsers\n media.addListener(handler);\n handler(media);\n return () => {\n media.removeListener(handler);\n };\n }, [isMultiSchemes]);\n\n // Handle when localStorage has changed\n React.useEffect(() => {\n if (storageWindow && isMultiSchemes) {\n const handleStorage = event => {\n const value = event.newValue;\n if (typeof event.key === 'string' && event.key.startsWith(colorSchemeStorageKey) && (!value || joinedColorSchemes.match(value))) {\n // If the key is deleted, value will be null then reset color scheme to the default one.\n if (event.key.endsWith('light')) {\n setColorScheme({\n light: value\n });\n }\n if (event.key.endsWith('dark')) {\n setColorScheme({\n dark: value\n });\n }\n }\n if (event.key === modeStorageKey && (!value || ['light', 'dark', 'system'].includes(value))) {\n setMode(value || defaultMode);\n }\n };\n // For syncing color-scheme changes between iframes\n storageWindow.addEventListener('storage', handleStorage);\n return () => {\n storageWindow.removeEventListener('storage', handleStorage);\n };\n }\n return undefined;\n }, [setColorScheme, setMode, modeStorageKey, colorSchemeStorageKey, joinedColorSchemes, defaultMode, storageWindow, isMultiSchemes]);\n return {\n ...state,\n mode: isClient ? state.mode : undefined,\n systemMode: isClient ? state.systemMode : undefined,\n colorScheme: isClient ? colorScheme : undefined,\n setMode,\n setColorScheme\n };\n}","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GlobalStyles } from '@mui/styled-engine';\nimport { useTheme as muiUseTheme } from '@mui/private-theming';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport ThemeProvider from \"../ThemeProvider/index.js\";\nimport InitColorSchemeScript, { DEFAULT_COLOR_SCHEME_STORAGE_KEY, DEFAULT_MODE_STORAGE_KEY } from \"../InitColorSchemeScript/InitColorSchemeScript.js\";\nimport useCurrentColorScheme from \"./useCurrentColorScheme.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const DISABLE_CSS_TRANSITION = '*{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}';\nexport default function createCssVarsProvider(options) {\n const {\n themeId,\n /**\n * This `theme` object needs to follow a certain structure to\n * be used correctly by the finel `CssVarsProvider`. It should have a\n * `colorSchemes` key with the light and dark (and any other) palette.\n * It should also ideally have a vars object created using `prepareCssVars`.\n */\n theme: defaultTheme = {},\n modeStorageKey: defaultModeStorageKey = DEFAULT_MODE_STORAGE_KEY,\n colorSchemeStorageKey: defaultColorSchemeStorageKey = DEFAULT_COLOR_SCHEME_STORAGE_KEY,\n disableTransitionOnChange: designSystemTransitionOnChange = false,\n defaultColorScheme,\n resolveTheme\n } = options;\n const defaultContext = {\n allColorSchemes: [],\n colorScheme: undefined,\n darkColorScheme: undefined,\n lightColorScheme: undefined,\n mode: undefined,\n setColorScheme: () => {},\n setMode: () => {},\n systemMode: undefined\n };\n const ColorSchemeContext = /*#__PURE__*/React.createContext(undefined);\n if (process.env.NODE_ENV !== 'production') {\n ColorSchemeContext.displayName = 'ColorSchemeContext';\n }\n const useColorScheme = () => React.useContext(ColorSchemeContext) || defaultContext;\n const defaultColorSchemes = {};\n const defaultComponents = {};\n function CssVarsProvider(props) {\n const {\n children,\n theme: themeProp,\n modeStorageKey = defaultModeStorageKey,\n colorSchemeStorageKey = defaultColorSchemeStorageKey,\n disableTransitionOnChange = designSystemTransitionOnChange,\n storageWindow = typeof window === 'undefined' ? undefined : window,\n documentNode = typeof document === 'undefined' ? undefined : document,\n colorSchemeNode = typeof document === 'undefined' ? undefined : document.documentElement,\n disableNestedContext = false,\n disableStyleSheetGeneration = false,\n defaultMode: initialMode = 'system',\n noSsr\n } = props;\n const hasMounted = React.useRef(false);\n const upperTheme = muiUseTheme();\n const ctx = React.useContext(ColorSchemeContext);\n const nested = !!ctx && !disableNestedContext;\n const initialTheme = React.useMemo(() => {\n if (themeProp) {\n return themeProp;\n }\n return typeof defaultTheme === 'function' ? defaultTheme() : defaultTheme;\n }, [themeProp]);\n const scopedTheme = initialTheme[themeId];\n const restThemeProp = scopedTheme || initialTheme;\n const {\n colorSchemes = defaultColorSchemes,\n components = defaultComponents,\n cssVarPrefix\n } = restThemeProp;\n const joinedColorSchemes = Object.keys(colorSchemes).filter(k => !!colorSchemes[k]).join(',');\n const allColorSchemes = React.useMemo(() => joinedColorSchemes.split(','), [joinedColorSchemes]);\n const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;\n const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;\n const defaultMode = colorSchemes[defaultLightColorScheme] && colorSchemes[defaultDarkColorScheme] ? initialMode : colorSchemes[restThemeProp.defaultColorScheme]?.palette?.mode || restThemeProp.palette?.mode;\n\n // 1. Get the data about the `mode`, `colorScheme`, and setter functions.\n const {\n mode: stateMode,\n setMode,\n systemMode,\n lightColorScheme,\n darkColorScheme,\n colorScheme: stateColorScheme,\n setColorScheme\n } = useCurrentColorScheme({\n supportedColorSchemes: allColorSchemes,\n defaultLightColorScheme,\n defaultDarkColorScheme,\n modeStorageKey,\n colorSchemeStorageKey,\n defaultMode,\n storageWindow,\n noSsr\n });\n let mode = stateMode;\n let colorScheme = stateColorScheme;\n if (nested) {\n mode = ctx.mode;\n colorScheme = ctx.colorScheme;\n }\n const memoTheme = React.useMemo(() => {\n // `colorScheme` is undefined on the server and hydration phase\n const calculatedColorScheme = colorScheme || restThemeProp.defaultColorScheme;\n\n // 2. get the `vars` object that refers to the CSS custom properties\n const themeVars = restThemeProp.generateThemeVars?.() || restThemeProp.vars;\n\n // 3. Start composing the theme object\n const theme = {\n ...restThemeProp,\n components,\n colorSchemes,\n cssVarPrefix,\n vars: themeVars\n };\n if (typeof theme.generateSpacing === 'function') {\n theme.spacing = theme.generateSpacing();\n }\n\n // 4. Resolve the color scheme and merge it to the theme\n if (calculatedColorScheme) {\n const scheme = colorSchemes[calculatedColorScheme];\n if (scheme && typeof scheme === 'object') {\n // 4.1 Merge the selected color scheme to the theme\n Object.keys(scheme).forEach(schemeKey => {\n if (scheme[schemeKey] && typeof scheme[schemeKey] === 'object') {\n // shallow merge the 1st level structure of the theme.\n theme[schemeKey] = {\n ...theme[schemeKey],\n ...scheme[schemeKey]\n };\n } else {\n theme[schemeKey] = scheme[schemeKey];\n }\n });\n }\n }\n return resolveTheme ? resolveTheme(theme) : theme;\n }, [restThemeProp, colorScheme, components, colorSchemes, cssVarPrefix]);\n\n // 5. Declaring effects\n // 5.1 Updates the selector value to use the current color scheme which tells CSS to use the proper stylesheet.\n const colorSchemeSelector = restThemeProp.colorSchemeSelector;\n useEnhancedEffect(() => {\n if (colorScheme && colorSchemeNode && colorSchemeSelector && colorSchemeSelector !== 'media') {\n const selector = colorSchemeSelector;\n let rule = colorSchemeSelector;\n if (selector === 'class') {\n rule = `.%s`;\n }\n if (selector === 'data') {\n rule = `[data-%s]`;\n }\n if (selector?.startsWith('data-') && !selector.includes('%s')) {\n // 'data-mui-color-scheme' -> '[data-mui-color-scheme=\"%s\"]'\n rule = `[${selector}=\"%s\"]`;\n }\n if (rule.startsWith('.')) {\n colorSchemeNode.classList.remove(...allColorSchemes.map(scheme => rule.substring(1).replace('%s', scheme)));\n colorSchemeNode.classList.add(rule.substring(1).replace('%s', colorScheme));\n } else {\n const matches = rule.replace('%s', colorScheme).match(/\\[([^\\]]+)\\]/);\n if (matches) {\n const [attr, value] = matches[1].split('=');\n if (!value) {\n // for attributes like `data-theme-dark`, `data-theme-light`\n // remove all the existing data attributes before setting the new one\n allColorSchemes.forEach(scheme => {\n colorSchemeNode.removeAttribute(attr.replace(colorScheme, scheme));\n });\n }\n colorSchemeNode.setAttribute(attr, value ? value.replace(/\"|'/g, '') : '');\n } else {\n colorSchemeNode.setAttribute(rule, colorScheme);\n }\n }\n }\n }, [colorScheme, colorSchemeSelector, colorSchemeNode, allColorSchemes]);\n\n // 5.2 Remove the CSS transition when color scheme changes to create instant experience.\n // credit: https://github.com/pacocoursey/next-themes/blob/b5c2bad50de2d61ad7b52a9c5cdc801a78507d7a/index.tsx#L313\n React.useEffect(() => {\n let timer;\n if (disableTransitionOnChange && hasMounted.current && documentNode) {\n const css = documentNode.createElement('style');\n css.appendChild(documentNode.createTextNode(DISABLE_CSS_TRANSITION));\n documentNode.head.appendChild(css);\n\n // Force browser repaint\n (() => window.getComputedStyle(documentNode.body))();\n timer = setTimeout(() => {\n documentNode.head.removeChild(css);\n }, 1);\n }\n return () => {\n clearTimeout(timer);\n };\n }, [colorScheme, disableTransitionOnChange, documentNode]);\n React.useEffect(() => {\n hasMounted.current = true;\n return () => {\n hasMounted.current = false;\n };\n }, []);\n const contextValue = React.useMemo(() => ({\n allColorSchemes,\n colorScheme,\n darkColorScheme,\n lightColorScheme,\n mode,\n setColorScheme,\n setMode: process.env.NODE_ENV === 'production' ? setMode : newMode => {\n if (memoTheme.colorSchemeSelector === 'media') {\n console.error(['MUI: The `setMode` function has no effect if `colorSchemeSelector` is `media` (`media` is the default value).', 'To toggle the mode manually, please configure `colorSchemeSelector` to use a class or data attribute.', 'To learn more, visit https://mui.com/material-ui/customization/css-theme-variables/configuration/#toggling-dark-mode-manually'].join('\\n'));\n }\n setMode(newMode);\n },\n systemMode\n }), [allColorSchemes, colorScheme, darkColorScheme, lightColorScheme, mode, setColorScheme, setMode, systemMode, memoTheme.colorSchemeSelector]);\n let shouldGenerateStyleSheet = true;\n if (disableStyleSheetGeneration || restThemeProp.cssVariables === false || nested && upperTheme?.cssVarPrefix === cssVarPrefix) {\n shouldGenerateStyleSheet = false;\n }\n const element = /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(ThemeProvider, {\n themeId: scopedTheme ? themeId : undefined,\n theme: memoTheme,\n children: children\n }), shouldGenerateStyleSheet && /*#__PURE__*/_jsx(GlobalStyles, {\n styles: memoTheme.generateStyleSheets?.() || []\n })]\n });\n if (nested) {\n return element;\n }\n return /*#__PURE__*/_jsx(ColorSchemeContext.Provider, {\n value: contextValue,\n children: element\n });\n }\n process.env.NODE_ENV !== \"production\" ? CssVarsProvider.propTypes = {\n /**\n * The component tree.\n */\n children: PropTypes.node,\n /**\n * The node used to attach the color-scheme attribute\n */\n colorSchemeNode: PropTypes.any,\n /**\n * localStorage key used to store `colorScheme`\n */\n colorSchemeStorageKey: PropTypes.string,\n /**\n * The default mode when the storage is empty,\n * require the theme to have `colorSchemes` with light and dark.\n */\n defaultMode: PropTypes.string,\n /**\n * If `true`, the provider creates its own context and generate stylesheet as if it is a root `CssVarsProvider`.\n */\n disableNestedContext: PropTypes.bool,\n /**\n * If `true`, the style sheet won't be generated.\n *\n * This is useful for controlling nested CssVarsProvider behavior.\n */\n disableStyleSheetGeneration: PropTypes.bool,\n /**\n * Disable CSS transitions when switching between modes or color schemes.\n */\n disableTransitionOnChange: PropTypes.bool,\n /**\n * The document to attach the attribute to.\n */\n documentNode: PropTypes.any,\n /**\n * The key in the local storage used to store current color scheme.\n */\n modeStorageKey: PropTypes.string,\n /**\n * If `true`, the mode will be the same value as the storage without an extra rerendering after the hydration.\n * You should use this option in conjuction with `InitColorSchemeScript` component.\n */\n noSsr: PropTypes.bool,\n /**\n * The window that attaches the 'storage' event listener.\n * @default window\n */\n storageWindow: PropTypes.any,\n /**\n * The calculated theme object that will be passed through context.\n */\n theme: PropTypes.object\n } : void 0;\n const defaultLightColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.light;\n const defaultDarkColorScheme = typeof defaultColorScheme === 'string' ? defaultColorScheme : defaultColorScheme.dark;\n const getInitColorSchemeScript = params => InitColorSchemeScript({\n colorSchemeStorageKey: defaultColorSchemeStorageKey,\n defaultLightColorScheme,\n defaultDarkColorScheme,\n modeStorageKey: defaultModeStorageKey,\n ...params\n });\n return {\n CssVarsProvider,\n useColorScheme,\n getInitColorSchemeScript\n };\n}","/**\n * The benefit of this function is to help developers get CSS var from theme without specifying the whole variable\n * and they does not need to remember the prefix (defined once).\n */\nexport default function createGetCssVar(prefix = '') {\n function appendVar(...vars) {\n if (!vars.length) {\n return '';\n }\n const value = vars[0];\n if (typeof value === 'string' && !value.match(/(#|\\(|\\)|(-?(\\d*\\.)?\\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\\d*\\.)?\\d+)$|(\\d+ \\d+ \\d+)/)) {\n return `, var(--${prefix ? `${prefix}-` : ''}${value}${appendVar(...vars.slice(1))})`;\n }\n return `, ${value}`;\n }\n\n // AdditionalVars makes `getCssVar` less strict, so it can be use like this `getCssVar('non-mui-variable')` without type error.\n const getCssVar = (field, ...fallbacks) => {\n return `var(--${prefix ? `${prefix}-` : ''}${field}${appendVar(...fallbacks)})`;\n };\n return getCssVar;\n}","/**\n * This function create an object from keys, value and then assign to target\n *\n * @param {Object} obj : the target object to be assigned\n * @param {string[]} keys\n * @param {string | number} value\n *\n * @example\n * const source = {}\n * assignNestedKeys(source, ['palette', 'primary'], 'var(--palette-primary)')\n * console.log(source) // { palette: { primary: 'var(--palette-primary)' } }\n *\n * @example\n * const source = { palette: { primary: 'var(--palette-primary)' } }\n * assignNestedKeys(source, ['palette', 'secondary'], 'var(--palette-secondary)')\n * console.log(source) // { palette: { primary: 'var(--palette-primary)', secondary: 'var(--palette-secondary)' } }\n */\nexport const assignNestedKeys = (obj, keys, value, arrayKeys = []) => {\n let temp = obj;\n keys.forEach((k, index) => {\n if (index === keys.length - 1) {\n if (Array.isArray(temp)) {\n temp[Number(k)] = value;\n } else if (temp && typeof temp === 'object') {\n temp[k] = value;\n }\n } else if (temp && typeof temp === 'object') {\n if (!temp[k]) {\n temp[k] = arrayKeys.includes(k) ? [] : {};\n }\n temp = temp[k];\n }\n });\n};\n\n/**\n *\n * @param {Object} obj : source object\n * @param {Function} callback : a function that will be called when\n * - the deepest key in source object is reached\n * - the value of the deepest key is NOT `undefined` | `null`\n *\n * @example\n * walkObjectDeep({ palette: { primary: { main: '#000000' } } }, console.log)\n * // ['palette', 'primary', 'main'] '#000000'\n */\nexport const walkObjectDeep = (obj, callback, shouldSkipPaths) => {\n function recurse(object, parentKeys = [], arrayKeys = []) {\n Object.entries(object).forEach(([key, value]) => {\n if (!shouldSkipPaths || shouldSkipPaths && !shouldSkipPaths([...parentKeys, key])) {\n if (value !== undefined && value !== null) {\n if (typeof value === 'object' && Object.keys(value).length > 0) {\n recurse(value, [...parentKeys, key], Array.isArray(value) ? [...arrayKeys, key] : arrayKeys);\n } else {\n callback([...parentKeys, key], value, arrayKeys);\n }\n }\n }\n });\n }\n recurse(obj);\n};\nconst getCssValue = (keys, value) => {\n if (typeof value === 'number') {\n if (['lineHeight', 'fontWeight', 'opacity', 'zIndex'].some(prop => keys.includes(prop))) {\n // CSS property that are unitless\n return value;\n }\n const lastKey = keys[keys.length - 1];\n if (lastKey.toLowerCase().includes('opacity')) {\n // opacity values are unitless\n return value;\n }\n return `${value}px`;\n }\n return value;\n};\n\n/**\n * a function that parse theme and return { css, vars }\n *\n * @param {Object} theme\n * @param {{\n * prefix?: string,\n * shouldSkipGeneratingVar?: (objectPathKeys: Array, value: string | number) => boolean\n * }} options.\n * `prefix`: The prefix of the generated CSS variables. This function does not change the value.\n *\n * @returns {{ css: Object, vars: Object }} `css` is the stylesheet, `vars` is an object to get css variable (same structure as theme).\n *\n * @example\n * const { css, vars } = parser({\n * fontSize: 12,\n * lineHeight: 1.2,\n * palette: { primary: { 500: 'var(--color)' } }\n * }, { prefix: 'foo' })\n *\n * console.log(css) // { '--foo-fontSize': '12px', '--foo-lineHeight': 1.2, '--foo-palette-primary-500': 'var(--color)' }\n * console.log(vars) // { fontSize: 'var(--foo-fontSize)', lineHeight: 'var(--foo-lineHeight)', palette: { primary: { 500: 'var(--foo-palette-primary-500)' } } }\n */\nexport default function cssVarsParser(theme, options) {\n const {\n prefix,\n shouldSkipGeneratingVar\n } = options || {};\n const css = {};\n const vars = {};\n const varsWithDefaults = {};\n walkObjectDeep(theme, (keys, value, arrayKeys) => {\n if (typeof value === 'string' || typeof value === 'number') {\n if (!shouldSkipGeneratingVar || !shouldSkipGeneratingVar(keys, value)) {\n // only create css & var if `shouldSkipGeneratingVar` return false\n const cssVar = `--${prefix ? `${prefix}-` : ''}${keys.join('-')}`;\n const resolvedValue = getCssValue(keys, value);\n Object.assign(css, {\n [cssVar]: resolvedValue\n });\n assignNestedKeys(vars, keys, `var(${cssVar})`, arrayKeys);\n assignNestedKeys(varsWithDefaults, keys, `var(${cssVar}, ${resolvedValue})`, arrayKeys);\n }\n }\n }, keys => keys[0] === 'vars' // skip 'vars/*' paths\n );\n return {\n css,\n vars,\n varsWithDefaults\n };\n}","import deepmerge from '@mui/utils/deepmerge';\nimport cssVarsParser from \"./cssVarsParser.js\";\nfunction prepareCssVars(theme, parserConfig = {}) {\n const {\n getSelector = defaultGetSelector,\n disableCssColorScheme,\n colorSchemeSelector: selector\n } = parserConfig;\n // @ts-ignore - ignore components do not exist\n const {\n colorSchemes = {},\n components,\n defaultColorScheme = 'light',\n ...otherTheme\n } = theme;\n const {\n vars: rootVars,\n css: rootCss,\n varsWithDefaults: rootVarsWithDefaults\n } = cssVarsParser(otherTheme, parserConfig);\n let themeVars = rootVarsWithDefaults;\n const colorSchemesMap = {};\n const {\n [defaultColorScheme]: defaultScheme,\n ...otherColorSchemes\n } = colorSchemes;\n Object.entries(otherColorSchemes || {}).forEach(([key, scheme]) => {\n const {\n vars,\n css,\n varsWithDefaults\n } = cssVarsParser(scheme, parserConfig);\n themeVars = deepmerge(themeVars, varsWithDefaults);\n colorSchemesMap[key] = {\n css,\n vars\n };\n });\n if (defaultScheme) {\n // default color scheme vars should be merged last to set as default\n const {\n css,\n vars,\n varsWithDefaults\n } = cssVarsParser(defaultScheme, parserConfig);\n themeVars = deepmerge(themeVars, varsWithDefaults);\n colorSchemesMap[defaultColorScheme] = {\n css,\n vars\n };\n }\n function defaultGetSelector(colorScheme, cssObject) {\n let rule = selector;\n if (selector === 'class') {\n rule = '.%s';\n }\n if (selector === 'data') {\n rule = '[data-%s]';\n }\n if (selector?.startsWith('data-') && !selector.includes('%s')) {\n // 'data-joy-color-scheme' -> '[data-joy-color-scheme=\"%s\"]'\n rule = `[${selector}=\"%s\"]`;\n }\n if (colorScheme) {\n if (rule === 'media') {\n if (theme.defaultColorScheme === colorScheme) {\n return ':root';\n }\n const mode = colorSchemes[colorScheme]?.palette?.mode || colorScheme;\n return {\n [`@media (prefers-color-scheme: ${mode})`]: {\n ':root': cssObject\n }\n };\n }\n if (rule) {\n if (theme.defaultColorScheme === colorScheme) {\n return `:root, ${rule.replace('%s', String(colorScheme))}`;\n }\n return rule.replace('%s', String(colorScheme));\n }\n }\n return ':root';\n }\n const generateThemeVars = () => {\n let vars = {\n ...rootVars\n };\n Object.entries(colorSchemesMap).forEach(([, {\n vars: schemeVars\n }]) => {\n vars = deepmerge(vars, schemeVars);\n });\n return vars;\n };\n const generateStyleSheets = () => {\n const stylesheets = [];\n const colorScheme = theme.defaultColorScheme || 'light';\n function insertStyleSheet(key, css) {\n if (Object.keys(css).length) {\n stylesheets.push(typeof key === 'string' ? {\n [key]: {\n ...css\n }\n } : key);\n }\n }\n insertStyleSheet(getSelector(undefined, {\n ...rootCss\n }), rootCss);\n const {\n [colorScheme]: defaultSchemeVal,\n ...other\n } = colorSchemesMap;\n if (defaultSchemeVal) {\n // default color scheme has to come before other color schemes\n const {\n css\n } = defaultSchemeVal;\n const cssColorSheme = colorSchemes[colorScheme]?.palette?.mode;\n const finalCss = !disableCssColorScheme && cssColorSheme ? {\n colorScheme: cssColorSheme,\n ...css\n } : {\n ...css\n };\n insertStyleSheet(getSelector(colorScheme, {\n ...finalCss\n }), finalCss);\n }\n Object.entries(other).forEach(([key, {\n css\n }]) => {\n const cssColorSheme = colorSchemes[key]?.palette?.mode;\n const finalCss = !disableCssColorScheme && cssColorSheme ? {\n colorScheme: cssColorSheme,\n ...css\n } : {\n ...css\n };\n insertStyleSheet(getSelector(key, {\n ...finalCss\n }), finalCss);\n });\n return stylesheets;\n };\n return {\n vars: themeVars,\n generateThemeVars,\n generateStyleSheets\n };\n}\nexport default prepareCssVars;","/* eslint-disable import/prefer-default-export */\nexport function createGetColorSchemeSelector(selector) {\n return function getColorSchemeSelector(colorScheme) {\n if (selector === 'media') {\n if (process.env.NODE_ENV !== 'production') {\n if (colorScheme !== 'light' && colorScheme !== 'dark') {\n console.error(`MUI: @media (prefers-color-scheme) supports only 'light' or 'dark', but receive '${colorScheme}'.`);\n }\n }\n return `@media (prefers-color-scheme: ${colorScheme})`;\n }\n if (selector) {\n if (selector.startsWith('data-') && !selector.includes('%s')) {\n return `[${selector}=\"${colorScheme}\"] &`;\n }\n if (selector === 'class') {\n return `.${colorScheme} &`;\n }\n if (selector === 'data') {\n return `[data-${colorScheme}] &`;\n }\n return `${selector.replace('%s', colorScheme)} &`;\n }\n return '&';\n };\n}","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nimport deepmerge from '@mui/utils/deepmerge';\nimport { darken, getContrastRatio, lighten } from '@mui/system/colorManipulator';\nimport common from \"../colors/common.js\";\nimport grey from \"../colors/grey.js\";\nimport purple from \"../colors/purple.js\";\nimport red from \"../colors/red.js\";\nimport orange from \"../colors/orange.js\";\nimport blue from \"../colors/blue.js\";\nimport lightBlue from \"../colors/lightBlue.js\";\nimport green from \"../colors/green.js\";\nfunction getLight() {\n return {\n // The colors used to style the text.\n text: {\n // The most important text.\n primary: 'rgba(0, 0, 0, 0.87)',\n // Secondary text.\n secondary: 'rgba(0, 0, 0, 0.6)',\n // Disabled text have even lower visual prominence.\n disabled: 'rgba(0, 0, 0, 0.38)'\n },\n // The color used to divide different elements.\n divider: 'rgba(0, 0, 0, 0.12)',\n // The background colors used to style the surfaces.\n // Consistency between these values is important.\n background: {\n paper: common.white,\n default: common.white\n },\n // The colors used to style the action elements.\n action: {\n // The color of an active action like an icon button.\n active: 'rgba(0, 0, 0, 0.54)',\n // The color of an hovered action.\n hover: 'rgba(0, 0, 0, 0.04)',\n hoverOpacity: 0.04,\n // The color of a selected action.\n selected: 'rgba(0, 0, 0, 0.08)',\n selectedOpacity: 0.08,\n // The color of a disabled action.\n disabled: 'rgba(0, 0, 0, 0.26)',\n // The background color of a disabled action.\n disabledBackground: 'rgba(0, 0, 0, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(0, 0, 0, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.12\n }\n };\n}\nexport const light = getLight();\nfunction getDark() {\n return {\n text: {\n primary: common.white,\n secondary: 'rgba(255, 255, 255, 0.7)',\n disabled: 'rgba(255, 255, 255, 0.5)',\n icon: 'rgba(255, 255, 255, 0.5)'\n },\n divider: 'rgba(255, 255, 255, 0.12)',\n background: {\n paper: '#121212',\n default: '#121212'\n },\n action: {\n active: common.white,\n hover: 'rgba(255, 255, 255, 0.08)',\n hoverOpacity: 0.08,\n selected: 'rgba(255, 255, 255, 0.16)',\n selectedOpacity: 0.16,\n disabled: 'rgba(255, 255, 255, 0.3)',\n disabledBackground: 'rgba(255, 255, 255, 0.12)',\n disabledOpacity: 0.38,\n focus: 'rgba(255, 255, 255, 0.12)',\n focusOpacity: 0.12,\n activatedOpacity: 0.24\n }\n };\n}\nexport const dark = getDark();\nfunction addLightOrDark(intent, direction, shade, tonalOffset) {\n const tonalOffsetLight = tonalOffset.light || tonalOffset;\n const tonalOffsetDark = tonalOffset.dark || tonalOffset * 1.5;\n if (!intent[direction]) {\n if (intent.hasOwnProperty(shade)) {\n intent[direction] = intent[shade];\n } else if (direction === 'light') {\n intent.light = lighten(intent.main, tonalOffsetLight);\n } else if (direction === 'dark') {\n intent.dark = darken(intent.main, tonalOffsetDark);\n }\n }\n}\nfunction getDefaultPrimary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: blue[200],\n light: blue[50],\n dark: blue[400]\n };\n }\n return {\n main: blue[700],\n light: blue[400],\n dark: blue[800]\n };\n}\nfunction getDefaultSecondary(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: purple[200],\n light: purple[50],\n dark: purple[400]\n };\n }\n return {\n main: purple[500],\n light: purple[300],\n dark: purple[700]\n };\n}\nfunction getDefaultError(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: red[500],\n light: red[300],\n dark: red[700]\n };\n }\n return {\n main: red[700],\n light: red[400],\n dark: red[800]\n };\n}\nfunction getDefaultInfo(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: lightBlue[400],\n light: lightBlue[300],\n dark: lightBlue[700]\n };\n }\n return {\n main: lightBlue[700],\n light: lightBlue[500],\n dark: lightBlue[900]\n };\n}\nfunction getDefaultSuccess(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: green[400],\n light: green[300],\n dark: green[700]\n };\n }\n return {\n main: green[800],\n light: green[500],\n dark: green[900]\n };\n}\nfunction getDefaultWarning(mode = 'light') {\n if (mode === 'dark') {\n return {\n main: orange[400],\n light: orange[300],\n dark: orange[700]\n };\n }\n return {\n main: '#ed6c02',\n // closest to orange[800] that pass 3:1.\n light: orange[500],\n dark: orange[900]\n };\n}\nexport default function createPalette(palette) {\n const {\n mode = 'light',\n contrastThreshold = 3,\n tonalOffset = 0.2,\n ...other\n } = palette;\n const primary = palette.primary || getDefaultPrimary(mode);\n const secondary = palette.secondary || getDefaultSecondary(mode);\n const error = palette.error || getDefaultError(mode);\n const info = palette.info || getDefaultInfo(mode);\n const success = palette.success || getDefaultSuccess(mode);\n const warning = palette.warning || getDefaultWarning(mode);\n\n // Use the same logic as\n // Bootstrap: https://github.com/twbs/bootstrap/blob/1d6e3710dd447de1a200f29e8fa521f8a0908f70/scss/_functions.scss#L59\n // and material-components-web https://github.com/material-components/material-components-web/blob/ac46b8863c4dab9fc22c4c662dc6bd1b65dd652f/packages/mdc-theme/_functions.scss#L54\n function getContrastText(background) {\n const contrastText = getContrastRatio(background, dark.text.primary) >= contrastThreshold ? dark.text.primary : light.text.primary;\n if (process.env.NODE_ENV !== 'production') {\n const contrast = getContrastRatio(background, contrastText);\n if (contrast < 3) {\n console.error([`MUI: The contrast ratio of ${contrast}:1 for ${contrastText} on ${background}`, 'falls below the WCAG recommended absolute minimum contrast ratio of 3:1.', 'https://www.w3.org/TR/2008/REC-WCAG20-20081211/#visual-audio-contrast-contrast'].join('\\n'));\n }\n }\n return contrastText;\n }\n const augmentColor = ({\n color,\n name,\n mainShade = 500,\n lightShade = 300,\n darkShade = 700\n }) => {\n color = {\n ...color\n };\n if (!color.main && color[mainShade]) {\n color.main = color[mainShade];\n }\n if (!color.hasOwnProperty('main')) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\\n` + `The color object needs to have a \\`main\\` property or a \\`${mainShade}\\` property.` : _formatMuiErrorMessage(11, name ? ` (${name})` : '', mainShade));\n }\n if (typeof color.main !== 'string') {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The color${name ? ` (${name})` : ''} provided to augmentColor(color) is invalid.\\n` + `\\`color.main\\` should be a string, but \\`${JSON.stringify(color.main)}\\` was provided instead.\\n` + '\\n' + 'Did you intend to use one of the following approaches?\\n' + '\\n' + 'import { green } from \"@mui/material/colors\";\\n' + '\\n' + 'const theme1 = createTheme({ palette: {\\n' + ' primary: green,\\n' + '} });\\n' + '\\n' + 'const theme2 = createTheme({ palette: {\\n' + ' primary: { main: green[500] },\\n' + '} });' : _formatMuiErrorMessage(12, name ? ` (${name})` : '', JSON.stringify(color.main)));\n }\n addLightOrDark(color, 'light', lightShade, tonalOffset);\n addLightOrDark(color, 'dark', darkShade, tonalOffset);\n if (!color.contrastText) {\n color.contrastText = getContrastText(color.main);\n }\n return color;\n };\n let modeHydrated;\n if (mode === 'light') {\n modeHydrated = getLight();\n } else if (mode === 'dark') {\n modeHydrated = getDark();\n }\n if (process.env.NODE_ENV !== 'production') {\n if (!modeHydrated) {\n console.error(`MUI: The palette mode \\`${mode}\\` is not supported.`);\n }\n }\n const paletteOutput = deepmerge({\n // A collection of common colors.\n common: {\n ...common\n },\n // prevent mutable object.\n // The palette mode, can be light or dark.\n mode,\n // The colors used to represent primary interface elements for a user.\n primary: augmentColor({\n color: primary,\n name: 'primary'\n }),\n // The colors used to represent secondary interface elements for a user.\n secondary: augmentColor({\n color: secondary,\n name: 'secondary',\n mainShade: 'A400',\n lightShade: 'A200',\n darkShade: 'A700'\n }),\n // The colors used to represent interface elements that the user should be made aware of.\n error: augmentColor({\n color: error,\n name: 'error'\n }),\n // The colors used to represent potentially dangerous actions or important messages.\n warning: augmentColor({\n color: warning,\n name: 'warning'\n }),\n // The colors used to present information to the user that is neutral and not necessarily important.\n info: augmentColor({\n color: info,\n name: 'info'\n }),\n // The colors used to indicate the successful completion of an action that user triggered.\n success: augmentColor({\n color: success,\n name: 'success'\n }),\n // The grey colors.\n grey,\n // Used by `getContrastText()` to maximize the contrast between\n // the background and the text.\n contrastThreshold,\n // Takes a background color and returns the text color that maximizes the contrast.\n getContrastText,\n // Generate a rich color object.\n augmentColor,\n // Used by the functions below to shift a color's luminance by approximately\n // two indexes within its tonal palette.\n // E.g., shift from Red 500 to Red 300 or Red 700.\n tonalOffset,\n // The light and dark mode object.\n ...modeHydrated\n }, other);\n return paletteOutput;\n}","export default function prepareTypographyVars(typography) {\n const vars = {};\n const entries = Object.entries(typography);\n entries.forEach(entry => {\n const [key, value] = entry;\n if (typeof value === 'object') {\n vars[key] = `${value.fontStyle ? `${value.fontStyle} ` : ''}${value.fontVariant ? `${value.fontVariant} ` : ''}${value.fontWeight ? `${value.fontWeight} ` : ''}${value.fontStretch ? `${value.fontStretch} ` : ''}${value.fontSize || ''}${value.lineHeight ? `/${value.lineHeight} ` : ''}${value.fontFamily || ''}`;\n }\n });\n return vars;\n}","export default function createMixins(breakpoints, mixins) {\n return {\n toolbar: {\n minHeight: 56,\n [breakpoints.up('xs')]: {\n '@media (orientation: landscape)': {\n minHeight: 48\n }\n },\n [breakpoints.up('sm')]: {\n minHeight: 64\n }\n },\n ...mixins\n };\n}","import deepmerge from '@mui/utils/deepmerge';\nfunction round(value) {\n return Math.round(value * 1e5) / 1e5;\n}\nconst caseAllCaps = {\n textTransform: 'uppercase'\n};\nconst defaultFontFamily = '\"Roboto\", \"Helvetica\", \"Arial\", sans-serif';\n\n/**\n * @see @link{https://m2.material.io/design/typography/the-type-system.html}\n * @see @link{https://m2.material.io/design/typography/understanding-typography.html}\n */\nexport default function createTypography(palette, typography) {\n const {\n fontFamily = defaultFontFamily,\n // The default font size of the Material Specification.\n fontSize = 14,\n // px\n fontWeightLight = 300,\n fontWeightRegular = 400,\n fontWeightMedium = 500,\n fontWeightBold = 700,\n // Tell MUI what's the font-size on the html element.\n // 16px is the default font-size used by browsers.\n htmlFontSize = 16,\n // Apply the CSS properties to all the variants.\n allVariants,\n pxToRem: pxToRem2,\n ...other\n } = typeof typography === 'function' ? typography(palette) : typography;\n if (process.env.NODE_ENV !== 'production') {\n if (typeof fontSize !== 'number') {\n console.error('MUI: `fontSize` is required to be a number.');\n }\n if (typeof htmlFontSize !== 'number') {\n console.error('MUI: `htmlFontSize` is required to be a number.');\n }\n }\n const coef = fontSize / 14;\n const pxToRem = pxToRem2 || (size => `${size / htmlFontSize * coef}rem`);\n const buildVariant = (fontWeight, size, lineHeight, letterSpacing, casing) => ({\n fontFamily,\n fontWeight,\n fontSize: pxToRem(size),\n // Unitless following https://meyerweb.com/eric/thoughts/2006/02/08/unitless-line-heights/\n lineHeight,\n // The letter spacing was designed for the Roboto font-family. Using the same letter-spacing\n // across font-families can cause issues with the kerning.\n ...(fontFamily === defaultFontFamily ? {\n letterSpacing: `${round(letterSpacing / size)}em`\n } : {}),\n ...casing,\n ...allVariants\n });\n const variants = {\n h1: buildVariant(fontWeightLight, 96, 1.167, -1.5),\n h2: buildVariant(fontWeightLight, 60, 1.2, -0.5),\n h3: buildVariant(fontWeightRegular, 48, 1.167, 0),\n h4: buildVariant(fontWeightRegular, 34, 1.235, 0.25),\n h5: buildVariant(fontWeightRegular, 24, 1.334, 0),\n h6: buildVariant(fontWeightMedium, 20, 1.6, 0.15),\n subtitle1: buildVariant(fontWeightRegular, 16, 1.75, 0.15),\n subtitle2: buildVariant(fontWeightMedium, 14, 1.57, 0.1),\n body1: buildVariant(fontWeightRegular, 16, 1.5, 0.15),\n body2: buildVariant(fontWeightRegular, 14, 1.43, 0.15),\n button: buildVariant(fontWeightMedium, 14, 1.75, 0.4, caseAllCaps),\n caption: buildVariant(fontWeightRegular, 12, 1.66, 0.4),\n overline: buildVariant(fontWeightRegular, 12, 2.66, 1, caseAllCaps),\n // TODO v6: Remove handling of 'inherit' variant from the theme as it is already handled in Material UI's Typography component. Also, remember to remove the associated types.\n inherit: {\n fontFamily: 'inherit',\n fontWeight: 'inherit',\n fontSize: 'inherit',\n lineHeight: 'inherit',\n letterSpacing: 'inherit'\n }\n };\n return deepmerge({\n htmlFontSize,\n pxToRem,\n fontFamily,\n fontSize,\n fontWeightLight,\n fontWeightRegular,\n fontWeightMedium,\n fontWeightBold,\n ...variants\n }, other, {\n clone: false // No need to clone deep\n });\n}","const shadowKeyUmbraOpacity = 0.2;\nconst shadowKeyPenumbraOpacity = 0.14;\nconst shadowAmbientShadowOpacity = 0.12;\nfunction createShadow(...px) {\n return [`${px[0]}px ${px[1]}px ${px[2]}px ${px[3]}px rgba(0,0,0,${shadowKeyUmbraOpacity})`, `${px[4]}px ${px[5]}px ${px[6]}px ${px[7]}px rgba(0,0,0,${shadowKeyPenumbraOpacity})`, `${px[8]}px ${px[9]}px ${px[10]}px ${px[11]}px rgba(0,0,0,${shadowAmbientShadowOpacity})`].join(',');\n}\n\n// Values from https://github.com/material-components/material-components-web/blob/be8747f94574669cb5e7add1a7c54fa41a89cec7/packages/mdc-elevation/_variables.scss\nconst shadows = ['none', createShadow(0, 2, 1, -1, 0, 1, 1, 0, 0, 1, 3, 0), createShadow(0, 3, 1, -2, 0, 2, 2, 0, 0, 1, 5, 0), createShadow(0, 3, 3, -2, 0, 3, 4, 0, 0, 1, 8, 0), createShadow(0, 2, 4, -1, 0, 4, 5, 0, 0, 1, 10, 0), createShadow(0, 3, 5, -1, 0, 5, 8, 0, 0, 1, 14, 0), createShadow(0, 3, 5, -1, 0, 6, 10, 0, 0, 1, 18, 0), createShadow(0, 4, 5, -2, 0, 7, 10, 1, 0, 2, 16, 1), createShadow(0, 5, 5, -3, 0, 8, 10, 1, 0, 3, 14, 2), createShadow(0, 5, 6, -3, 0, 9, 12, 1, 0, 3, 16, 2), createShadow(0, 6, 6, -3, 0, 10, 14, 1, 0, 4, 18, 3), createShadow(0, 6, 7, -4, 0, 11, 15, 1, 0, 4, 20, 3), createShadow(0, 7, 8, -4, 0, 12, 17, 2, 0, 5, 22, 4), createShadow(0, 7, 8, -4, 0, 13, 19, 2, 0, 5, 24, 4), createShadow(0, 7, 9, -4, 0, 14, 21, 2, 0, 5, 26, 4), createShadow(0, 8, 9, -5, 0, 15, 22, 2, 0, 6, 28, 5), createShadow(0, 8, 10, -5, 0, 16, 24, 2, 0, 6, 30, 5), createShadow(0, 8, 11, -5, 0, 17, 26, 2, 0, 6, 32, 5), createShadow(0, 9, 11, -5, 0, 18, 28, 2, 0, 7, 34, 6), createShadow(0, 9, 12, -6, 0, 19, 29, 2, 0, 7, 36, 6), createShadow(0, 10, 13, -6, 0, 20, 31, 3, 0, 8, 38, 7), createShadow(0, 10, 13, -6, 0, 21, 33, 3, 0, 8, 40, 7), createShadow(0, 10, 14, -6, 0, 22, 35, 3, 0, 8, 42, 7), createShadow(0, 11, 14, -7, 0, 23, 36, 3, 0, 9, 44, 8), createShadow(0, 11, 15, -7, 0, 24, 38, 3, 0, 9, 46, 8)];\nexport default shadows;","// Follow https://material.google.com/motion/duration-easing.html#duration-easing-natural-easing-curves\n// to learn the context in which each easing should be used.\nexport const easing = {\n // This is the most common easing curve.\n easeInOut: 'cubic-bezier(0.4, 0, 0.2, 1)',\n // Objects enter the screen at full velocity from off-screen and\n // slowly decelerate to a resting point.\n easeOut: 'cubic-bezier(0.0, 0, 0.2, 1)',\n // Objects leave the screen at full velocity. They do not decelerate when off-screen.\n easeIn: 'cubic-bezier(0.4, 0, 1, 1)',\n // The sharp curve is used by objects that may return to the screen at any time.\n sharp: 'cubic-bezier(0.4, 0, 0.6, 1)'\n};\n\n// Follow https://m2.material.io/guidelines/motion/duration-easing.html#duration-easing-common-durations\n// to learn when use what timing\nexport const duration = {\n shortest: 150,\n shorter: 200,\n short: 250,\n // most basic recommended timing\n standard: 300,\n // this is to be used in complex animations\n complex: 375,\n // recommended when something is entering screen\n enteringScreen: 225,\n // recommended when something is leaving screen\n leavingScreen: 195\n};\nfunction formatMs(milliseconds) {\n return `${Math.round(milliseconds)}ms`;\n}\nfunction getAutoHeightDuration(height) {\n if (!height) {\n return 0;\n }\n const constant = height / 36;\n\n // https://www.desmos.com/calculator/vbrp3ggqet\n return Math.min(Math.round((4 + 15 * constant ** 0.25 + constant / 5) * 10), 3000);\n}\nexport default function createTransitions(inputTransitions) {\n const mergedEasing = {\n ...easing,\n ...inputTransitions.easing\n };\n const mergedDuration = {\n ...duration,\n ...inputTransitions.duration\n };\n const create = (props = ['all'], options = {}) => {\n const {\n duration: durationOption = mergedDuration.standard,\n easing: easingOption = mergedEasing.easeInOut,\n delay = 0,\n ...other\n } = options;\n if (process.env.NODE_ENV !== 'production') {\n const isString = value => typeof value === 'string';\n const isNumber = value => !Number.isNaN(parseFloat(value));\n if (!isString(props) && !Array.isArray(props)) {\n console.error('MUI: Argument \"props\" must be a string or Array.');\n }\n if (!isNumber(durationOption) && !isString(durationOption)) {\n console.error(`MUI: Argument \"duration\" must be a number or a string but found ${durationOption}.`);\n }\n if (!isString(easingOption)) {\n console.error('MUI: Argument \"easing\" must be a string.');\n }\n if (!isNumber(delay) && !isString(delay)) {\n console.error('MUI: Argument \"delay\" must be a number or a string.');\n }\n if (typeof options !== 'object') {\n console.error(['MUI: Secong argument of transition.create must be an object.', \"Arguments should be either `create('prop1', options)` or `create(['prop1', 'prop2'], options)`\"].join('\\n'));\n }\n if (Object.keys(other).length !== 0) {\n console.error(`MUI: Unrecognized argument(s) [${Object.keys(other).join(',')}].`);\n }\n }\n return (Array.isArray(props) ? props : [props]).map(animatedProp => `${animatedProp} ${typeof durationOption === 'string' ? durationOption : formatMs(durationOption)} ${easingOption} ${typeof delay === 'string' ? delay : formatMs(delay)}`).join(',');\n };\n return {\n getAutoHeightDuration,\n create,\n ...inputTransitions,\n easing: mergedEasing,\n duration: mergedDuration\n };\n}","// We need to centralize the zIndex definitions as they work\n// like global values in the browser.\nconst zIndex = {\n mobileStepper: 1000,\n fab: 1050,\n speedDial: 1050,\n appBar: 1100,\n drawer: 1200,\n modal: 1300,\n snackbar: 1400,\n tooltip: 1500\n};\nexport default zIndex;","/* eslint-disable import/prefer-default-export */\nimport { isPlainObject } from '@mui/utils/deepmerge';\nfunction isSerializable(val) {\n return isPlainObject(val) || typeof val === 'undefined' || typeof val === 'string' || typeof val === 'boolean' || typeof val === 'number' || Array.isArray(val);\n}\n\n/**\n * `baseTheme` usually comes from `createTheme()` or `extendTheme()`.\n *\n * This function is intended to be used with zero-runtime CSS-in-JS like Pigment CSS\n * For example, in a Next.js project:\n *\n * ```js\n * // next.config.js\n * const { extendTheme } = require('@mui/material/styles');\n *\n * const theme = extendTheme();\n * // `.toRuntimeSource` is Pigment CSS specific to create a theme that is available at runtime.\n * theme.toRuntimeSource = stringifyTheme;\n *\n * module.exports = withPigment({\n * theme,\n * });\n * ```\n */\nexport function stringifyTheme(baseTheme = {}) {\n const serializableTheme = {\n ...baseTheme\n };\n function serializeTheme(object) {\n const array = Object.entries(object);\n // eslint-disable-next-line no-plusplus\n for (let index = 0; index < array.length; index++) {\n const [key, value] = array[index];\n if (!isSerializable(value) || key.startsWith('unstable_')) {\n delete object[key];\n } else if (isPlainObject(value)) {\n object[key] = {\n ...value\n };\n serializeTheme(object[key]);\n }\n }\n }\n serializeTheme(serializableTheme);\n return `import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';\n\nconst theme = ${JSON.stringify(serializableTheme, null, 2)};\n\ntheme.breakpoints = createBreakpoints(theme.breakpoints || {});\ntheme.transitions = createTransitions(theme.transitions || {});\n\nexport default theme;`;\n}","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nimport deepmerge from '@mui/utils/deepmerge';\nimport styleFunctionSx, { unstable_defaultSxConfig as defaultSxConfig } from '@mui/system/styleFunctionSx';\nimport systemCreateTheme from '@mui/system/createTheme';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport createMixins from \"./createMixins.js\";\nimport createPalette from \"./createPalette.js\";\nimport createTypography from \"./createTypography.js\";\nimport shadows from \"./shadows.js\";\nimport createTransitions from \"./createTransitions.js\";\nimport zIndex from \"./zIndex.js\";\nimport { stringifyTheme } from \"./stringifyTheme.js\";\nfunction createThemeNoVars(options = {}, ...args) {\n const {\n breakpoints: breakpointsInput,\n mixins: mixinsInput = {},\n spacing: spacingInput,\n palette: paletteInput = {},\n transitions: transitionsInput = {},\n typography: typographyInput = {},\n shape: shapeInput,\n ...other\n } = options;\n if (options.vars) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'MUI: `vars` is a private field used for CSS variables support.\\n' + 'Please use another name.' : _formatMuiErrorMessage(20));\n }\n const palette = createPalette(paletteInput);\n const systemTheme = systemCreateTheme(options);\n let muiTheme = deepmerge(systemTheme, {\n mixins: createMixins(systemTheme.breakpoints, mixinsInput),\n palette,\n // Don't use [...shadows] until you've verified its transpiled code is not invoking the iterator protocol.\n shadows: shadows.slice(),\n typography: createTypography(palette, typographyInput),\n transitions: createTransitions(transitionsInput),\n zIndex: {\n ...zIndex\n }\n });\n muiTheme = deepmerge(muiTheme, other);\n muiTheme = args.reduce((acc, argument) => deepmerge(acc, argument), muiTheme);\n if (process.env.NODE_ENV !== 'production') {\n // TODO v6: Refactor to use globalStateClassesMapping from @mui/utils once `readOnly` state class is used in Rating component.\n const stateClasses = ['active', 'checked', 'completed', 'disabled', 'error', 'expanded', 'focused', 'focusVisible', 'required', 'selected'];\n const traverse = (node, component) => {\n let key;\n\n // eslint-disable-next-line guard-for-in\n for (key in node) {\n const child = node[key];\n if (stateClasses.includes(key) && Object.keys(child).length > 0) {\n if (process.env.NODE_ENV !== 'production') {\n const stateClass = generateUtilityClass('', key);\n console.error([`MUI: The \\`${component}\\` component increases ` + `the CSS specificity of the \\`${key}\\` internal state.`, 'You can not override it like this: ', JSON.stringify(node, null, 2), '', `Instead, you need to use the '&.${stateClass}' syntax:`, JSON.stringify({\n root: {\n [`&.${stateClass}`]: child\n }\n }, null, 2), '', 'https://mui.com/r/state-classes-guide'].join('\\n'));\n }\n // Remove the style to prevent global conflicts.\n node[key] = {};\n }\n }\n };\n Object.keys(muiTheme.components).forEach(component => {\n const styleOverrides = muiTheme.components[component].styleOverrides;\n if (styleOverrides && component.startsWith('Mui')) {\n traverse(styleOverrides, component);\n }\n });\n }\n muiTheme.unstable_sxConfig = {\n ...defaultSxConfig,\n ...other?.unstable_sxConfig\n };\n muiTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n muiTheme.toRuntimeSource = stringifyTheme; // for Pigment CSS integration\n\n return muiTheme;\n}\nlet warnedOnce = false;\nexport function createMuiTheme(...args) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n warnedOnce = true;\n console.error(['MUI: the createMuiTheme function was renamed to createTheme.', '', \"You should use `import { createTheme } from '@mui/material/styles'`\"].join('\\n'));\n }\n }\n return createThemeNoVars(...args);\n}\nexport default createThemeNoVars;","// Inspired by https://github.com/material-components/material-components-ios/blob/bca36107405594d5b7b16265a5b0ed698f85a5ee/components/Elevation/src/UIColor%2BMaterialElevation.m#L61\nexport default function getOverlayAlpha(elevation) {\n let alphaValue;\n if (elevation < 1) {\n alphaValue = 5.11916 * elevation ** 2;\n } else {\n alphaValue = 4.5 * Math.log(elevation + 1) + 2;\n }\n return Math.round(alphaValue * 10) / 1000;\n}","import createPalette from \"./createPalette.js\";\nimport getOverlayAlpha from \"./getOverlayAlpha.js\";\nconst defaultDarkOverlays = [...Array(25)].map((_, index) => {\n if (index === 0) {\n return 'none';\n }\n const overlay = getOverlayAlpha(index);\n return `linear-gradient(rgba(255 255 255 / ${overlay}), rgba(255 255 255 / ${overlay}))`;\n});\nexport function getOpacity(mode) {\n return {\n inputPlaceholder: mode === 'dark' ? 0.5 : 0.42,\n inputUnderline: mode === 'dark' ? 0.7 : 0.42,\n switchTrackDisabled: mode === 'dark' ? 0.2 : 0.12,\n switchTrack: mode === 'dark' ? 0.3 : 0.38\n };\n}\nexport function getOverlays(mode) {\n return mode === 'dark' ? defaultDarkOverlays : [];\n}\nexport default function createColorScheme(options) {\n const {\n palette: paletteInput = {\n mode: 'light'\n },\n // need to cast to avoid module augmentation test\n opacity,\n overlays,\n ...rest\n } = options;\n const palette = createPalette(paletteInput);\n return {\n palette,\n opacity: {\n ...getOpacity(palette.mode),\n ...opacity\n },\n overlays: overlays || getOverlays(palette.mode),\n ...rest\n };\n}","export default function shouldSkipGeneratingVar(keys) {\n return !!keys[0].match(/(cssVarPrefix|colorSchemeSelector|rootSelector|typography|mixins|breakpoints|direction|transitions)/) || !!keys[0].match(/sxConfig$/) ||\n // ends with sxConfig\n keys[0] === 'palette' && !!keys[1]?.match(/(mode|contrastThreshold|tonalOffset)/);\n}","/**\n * @internal These variables should not appear in the :root stylesheet when the `defaultColorScheme=\"dark\"`\n */\nconst excludeVariablesFromRoot = cssVarPrefix => [...[...Array(25)].map((_, index) => `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}overlays-${index}`), `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}palette-AppBar-darkBg`, `--${cssVarPrefix ? `${cssVarPrefix}-` : ''}palette-AppBar-darkColor`];\nexport default excludeVariablesFromRoot;","import excludeVariablesFromRoot from \"./excludeVariablesFromRoot.js\";\nexport default theme => (colorScheme, css) => {\n const root = theme.rootSelector || ':root';\n const selector = theme.colorSchemeSelector;\n let rule = selector;\n if (selector === 'class') {\n rule = '.%s';\n }\n if (selector === 'data') {\n rule = '[data-%s]';\n }\n if (selector?.startsWith('data-') && !selector.includes('%s')) {\n // 'data-mui-color-scheme' -> '[data-mui-color-scheme=\"%s\"]'\n rule = `[${selector}=\"%s\"]`;\n }\n if (theme.defaultColorScheme === colorScheme) {\n if (colorScheme === 'dark') {\n const excludedVariables = {};\n excludeVariablesFromRoot(theme.cssVarPrefix).forEach(cssVar => {\n excludedVariables[cssVar] = css[cssVar];\n delete css[cssVar];\n });\n if (rule === 'media') {\n return {\n [root]: css,\n [`@media (prefers-color-scheme: dark)`]: {\n [root]: excludedVariables\n }\n };\n }\n if (rule) {\n return {\n [rule.replace('%s', colorScheme)]: excludedVariables,\n [`${root}, ${rule.replace('%s', colorScheme)}`]: css\n };\n }\n return {\n [root]: {\n ...css,\n ...excludedVariables\n }\n };\n }\n if (rule && rule !== 'media') {\n return `${root}, ${rule.replace('%s', String(colorScheme))}`;\n }\n } else if (colorScheme) {\n if (rule === 'media') {\n return {\n [`@media (prefers-color-scheme: ${String(colorScheme)})`]: {\n [root]: css\n }\n };\n }\n if (rule) {\n return rule.replace('%s', String(colorScheme));\n }\n }\n return root;\n};","import _formatMuiErrorMessage from \"@mui/utils/formatMuiErrorMessage\";\nimport deepmerge from '@mui/utils/deepmerge';\nimport { unstable_createGetCssVar as systemCreateGetCssVar, createSpacing } from '@mui/system';\nimport { createUnarySpacing } from '@mui/system/spacing';\nimport { prepareCssVars, prepareTypographyVars, createGetColorSchemeSelector } from '@mui/system/cssVars';\nimport styleFunctionSx, { unstable_defaultSxConfig as defaultSxConfig } from '@mui/system/styleFunctionSx';\nimport { private_safeColorChannel as safeColorChannel, private_safeAlpha as safeAlpha, private_safeDarken as safeDarken, private_safeLighten as safeLighten, private_safeEmphasize as safeEmphasize, hslToRgb } from '@mui/system/colorManipulator';\nimport createThemeNoVars from \"./createThemeNoVars.js\";\nimport createColorScheme, { getOpacity, getOverlays } from \"./createColorScheme.js\";\nimport defaultShouldSkipGeneratingVar from \"./shouldSkipGeneratingVar.js\";\nimport defaultGetSelector from \"./createGetSelector.js\";\nimport { stringifyTheme } from \"./stringifyTheme.js\";\nfunction assignNode(obj, keys) {\n keys.forEach(k => {\n if (!obj[k]) {\n obj[k] = {};\n }\n });\n}\nfunction setColor(obj, key, defaultValue) {\n if (!obj[key] && defaultValue) {\n obj[key] = defaultValue;\n }\n}\nfunction toRgb(color) {\n if (typeof color !== 'string' || !color.startsWith('hsl')) {\n return color;\n }\n return hslToRgb(color);\n}\nfunction setColorChannel(obj, key) {\n if (!(`${key}Channel` in obj)) {\n // custom channel token is not provided, generate one.\n // if channel token can't be generated, show a warning.\n obj[`${key}Channel`] = safeColorChannel(toRgb(obj[key]), `MUI: Can't create \\`palette.${key}Channel\\` because \\`palette.${key}\\` is not one of these formats: #nnn, #nnnnnn, rgb(), rgba(), hsl(), hsla(), color().` + '\\n' + `To suppress this warning, you need to explicitly provide the \\`palette.${key}Channel\\` as a string (in rgb format, for example \"12 12 12\") or undefined if you want to remove the channel token.`);\n }\n}\nfunction getSpacingVal(spacingInput) {\n if (typeof spacingInput === 'number') {\n return `${spacingInput}px`;\n }\n if (typeof spacingInput === 'string' || typeof spacingInput === 'function' || Array.isArray(spacingInput)) {\n return spacingInput;\n }\n return '8px';\n}\nconst silent = fn => {\n try {\n return fn();\n } catch (error) {\n // ignore error\n }\n return undefined;\n};\nexport const createGetCssVar = (cssVarPrefix = 'mui') => systemCreateGetCssVar(cssVarPrefix);\nfunction attachColorScheme(colorSchemes, scheme, restTheme, colorScheme) {\n if (!scheme) {\n return undefined;\n }\n scheme = scheme === true ? {} : scheme;\n const mode = colorScheme === 'dark' ? 'dark' : 'light';\n if (!restTheme) {\n colorSchemes[colorScheme] = createColorScheme({\n ...scheme,\n palette: {\n mode,\n ...scheme?.palette\n }\n });\n return undefined;\n }\n const {\n palette,\n ...muiTheme\n } = createThemeNoVars({\n ...restTheme,\n palette: {\n mode,\n ...scheme?.palette\n }\n });\n colorSchemes[colorScheme] = {\n ...scheme,\n palette,\n opacity: {\n ...getOpacity(mode),\n ...scheme?.opacity\n },\n overlays: scheme?.overlays || getOverlays(mode)\n };\n return muiTheme;\n}\n\n/**\n * A default `createThemeWithVars` comes with a single color scheme, either `light` or `dark` based on the `defaultColorScheme`.\n * This is better suited for apps that only need a single color scheme.\n *\n * To enable built-in `light` and `dark` color schemes, either:\n * 1. provide a `colorSchemeSelector` to define how the color schemes will change.\n * 2. provide `colorSchemes.dark` will set `colorSchemeSelector: 'media'` by default.\n */\nexport default function createThemeWithVars(options = {}, ...args) {\n const {\n colorSchemes: colorSchemesInput = {\n light: true\n },\n defaultColorScheme: defaultColorSchemeInput,\n disableCssColorScheme = false,\n cssVarPrefix = 'mui',\n shouldSkipGeneratingVar = defaultShouldSkipGeneratingVar,\n colorSchemeSelector: selector = colorSchemesInput.light && colorSchemesInput.dark ? 'media' : undefined,\n rootSelector = ':root',\n ...input\n } = options;\n const firstColorScheme = Object.keys(colorSchemesInput)[0];\n const defaultColorScheme = defaultColorSchemeInput || (colorSchemesInput.light && firstColorScheme !== 'light' ? 'light' : firstColorScheme);\n const getCssVar = createGetCssVar(cssVarPrefix);\n const {\n [defaultColorScheme]: defaultSchemeInput,\n light: builtInLight,\n dark: builtInDark,\n ...customColorSchemes\n } = colorSchemesInput;\n const colorSchemes = {\n ...customColorSchemes\n };\n let defaultScheme = defaultSchemeInput;\n\n // For built-in light and dark color schemes, ensure that the value is valid if they are the default color scheme.\n if (defaultColorScheme === 'dark' && !('dark' in colorSchemesInput) || defaultColorScheme === 'light' && !('light' in colorSchemesInput)) {\n defaultScheme = true;\n }\n if (!defaultScheme) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `MUI: The \\`colorSchemes.${defaultColorScheme}\\` option is either missing or invalid.` : _formatMuiErrorMessage(21, defaultColorScheme));\n }\n\n // Create the palette for the default color scheme, either `light`, `dark`, or custom color scheme.\n const muiTheme = attachColorScheme(colorSchemes, defaultScheme, input, defaultColorScheme);\n if (builtInLight && !colorSchemes.light) {\n attachColorScheme(colorSchemes, builtInLight, undefined, 'light');\n }\n if (builtInDark && !colorSchemes.dark) {\n attachColorScheme(colorSchemes, builtInDark, undefined, 'dark');\n }\n let theme = {\n defaultColorScheme,\n ...muiTheme,\n cssVarPrefix,\n colorSchemeSelector: selector,\n rootSelector,\n getCssVar,\n colorSchemes,\n font: {\n ...prepareTypographyVars(muiTheme.typography),\n ...muiTheme.font\n },\n spacing: getSpacingVal(input.spacing)\n };\n Object.keys(theme.colorSchemes).forEach(key => {\n const palette = theme.colorSchemes[key].palette;\n const setCssVarColor = cssVar => {\n const tokens = cssVar.split('-');\n const color = tokens[1];\n const colorToken = tokens[2];\n return getCssVar(cssVar, palette[color][colorToken]);\n };\n\n // attach black & white channels to common node\n if (palette.mode === 'light') {\n setColor(palette.common, 'background', '#fff');\n setColor(palette.common, 'onBackground', '#000');\n }\n if (palette.mode === 'dark') {\n setColor(palette.common, 'background', '#000');\n setColor(palette.common, 'onBackground', '#fff');\n }\n\n // assign component variables\n assignNode(palette, ['Alert', 'AppBar', 'Avatar', 'Button', 'Chip', 'FilledInput', 'LinearProgress', 'Skeleton', 'Slider', 'SnackbarContent', 'SpeedDialAction', 'StepConnector', 'StepContent', 'Switch', 'TableCell', 'Tooltip']);\n if (palette.mode === 'light') {\n setColor(palette.Alert, 'errorColor', safeDarken(palette.error.light, 0.6));\n setColor(palette.Alert, 'infoColor', safeDarken(palette.info.light, 0.6));\n setColor(palette.Alert, 'successColor', safeDarken(palette.success.light, 0.6));\n setColor(palette.Alert, 'warningColor', safeDarken(palette.warning.light, 0.6));\n setColor(palette.Alert, 'errorFilledBg', setCssVarColor('palette-error-main'));\n setColor(palette.Alert, 'infoFilledBg', setCssVarColor('palette-info-main'));\n setColor(palette.Alert, 'successFilledBg', setCssVarColor('palette-success-main'));\n setColor(palette.Alert, 'warningFilledBg', setCssVarColor('palette-warning-main'));\n setColor(palette.Alert, 'errorFilledColor', silent(() => palette.getContrastText(palette.error.main)));\n setColor(palette.Alert, 'infoFilledColor', silent(() => palette.getContrastText(palette.info.main)));\n setColor(palette.Alert, 'successFilledColor', silent(() => palette.getContrastText(palette.success.main)));\n setColor(palette.Alert, 'warningFilledColor', silent(() => palette.getContrastText(palette.warning.main)));\n setColor(palette.Alert, 'errorStandardBg', safeLighten(palette.error.light, 0.9));\n setColor(palette.Alert, 'infoStandardBg', safeLighten(palette.info.light, 0.9));\n setColor(palette.Alert, 'successStandardBg', safeLighten(palette.success.light, 0.9));\n setColor(palette.Alert, 'warningStandardBg', safeLighten(palette.warning.light, 0.9));\n setColor(palette.Alert, 'errorIconColor', setCssVarColor('palette-error-main'));\n setColor(palette.Alert, 'infoIconColor', setCssVarColor('palette-info-main'));\n setColor(palette.Alert, 'successIconColor', setCssVarColor('palette-success-main'));\n setColor(palette.Alert, 'warningIconColor', setCssVarColor('palette-warning-main'));\n setColor(palette.AppBar, 'defaultBg', setCssVarColor('palette-grey-100'));\n setColor(palette.Avatar, 'defaultBg', setCssVarColor('palette-grey-400'));\n setColor(palette.Button, 'inheritContainedBg', setCssVarColor('palette-grey-300'));\n setColor(palette.Button, 'inheritContainedHoverBg', setCssVarColor('palette-grey-A100'));\n setColor(palette.Chip, 'defaultBorder', setCssVarColor('palette-grey-400'));\n setColor(palette.Chip, 'defaultAvatarColor', setCssVarColor('palette-grey-700'));\n setColor(palette.Chip, 'defaultIconColor', setCssVarColor('palette-grey-700'));\n setColor(palette.FilledInput, 'bg', 'rgba(0, 0, 0, 0.06)');\n setColor(palette.FilledInput, 'hoverBg', 'rgba(0, 0, 0, 0.09)');\n setColor(palette.FilledInput, 'disabledBg', 'rgba(0, 0, 0, 0.12)');\n setColor(palette.LinearProgress, 'primaryBg', safeLighten(palette.primary.main, 0.62));\n setColor(palette.LinearProgress, 'secondaryBg', safeLighten(palette.secondary.main, 0.62));\n setColor(palette.LinearProgress, 'errorBg', safeLighten(palette.error.main, 0.62));\n setColor(palette.LinearProgress, 'infoBg', safeLighten(palette.info.main, 0.62));\n setColor(palette.LinearProgress, 'successBg', safeLighten(palette.success.main, 0.62));\n setColor(palette.LinearProgress, 'warningBg', safeLighten(palette.warning.main, 0.62));\n setColor(palette.Skeleton, 'bg', `rgba(${setCssVarColor('palette-text-primaryChannel')} / 0.11)`);\n setColor(palette.Slider, 'primaryTrack', safeLighten(palette.primary.main, 0.62));\n setColor(palette.Slider, 'secondaryTrack', safeLighten(palette.secondary.main, 0.62));\n setColor(palette.Slider, 'errorTrack', safeLighten(palette.error.main, 0.62));\n setColor(palette.Slider, 'infoTrack', safeLighten(palette.info.main, 0.62));\n setColor(palette.Slider, 'successTrack', safeLighten(palette.success.main, 0.62));\n setColor(palette.Slider, 'warningTrack', safeLighten(palette.warning.main, 0.62));\n const snackbarContentBackground = safeEmphasize(palette.background.default, 0.8);\n setColor(palette.SnackbarContent, 'bg', snackbarContentBackground);\n setColor(palette.SnackbarContent, 'color', silent(() => palette.getContrastText(snackbarContentBackground)));\n setColor(palette.SpeedDialAction, 'fabHoverBg', safeEmphasize(palette.background.paper, 0.15));\n setColor(palette.StepConnector, 'border', setCssVarColor('palette-grey-400'));\n setColor(palette.StepContent, 'border', setCssVarColor('palette-grey-400'));\n setColor(palette.Switch, 'defaultColor', setCssVarColor('palette-common-white'));\n setColor(palette.Switch, 'defaultDisabledColor', setCssVarColor('palette-grey-100'));\n setColor(palette.Switch, 'primaryDisabledColor', safeLighten(palette.primary.main, 0.62));\n setColor(palette.Switch, 'secondaryDisabledColor', safeLighten(palette.secondary.main, 0.62));\n setColor(palette.Switch, 'errorDisabledColor', safeLighten(palette.error.main, 0.62));\n setColor(palette.Switch, 'infoDisabledColor', safeLighten(palette.info.main, 0.62));\n setColor(palette.Switch, 'successDisabledColor', safeLighten(palette.success.main, 0.62));\n setColor(palette.Switch, 'warningDisabledColor', safeLighten(palette.warning.main, 0.62));\n setColor(palette.TableCell, 'border', safeLighten(safeAlpha(palette.divider, 1), 0.88));\n setColor(palette.Tooltip, 'bg', safeAlpha(palette.grey[700], 0.92));\n }\n if (palette.mode === 'dark') {\n setColor(palette.Alert, 'errorColor', safeLighten(palette.error.light, 0.6));\n setColor(palette.Alert, 'infoColor', safeLighten(palette.info.light, 0.6));\n setColor(palette.Alert, 'successColor', safeLighten(palette.success.light, 0.6));\n setColor(palette.Alert, 'warningColor', safeLighten(palette.warning.light, 0.6));\n setColor(palette.Alert, 'errorFilledBg', setCssVarColor('palette-error-dark'));\n setColor(palette.Alert, 'infoFilledBg', setCssVarColor('palette-info-dark'));\n setColor(palette.Alert, 'successFilledBg', setCssVarColor('palette-success-dark'));\n setColor(palette.Alert, 'warningFilledBg', setCssVarColor('palette-warning-dark'));\n setColor(palette.Alert, 'errorFilledColor', silent(() => palette.getContrastText(palette.error.dark)));\n setColor(palette.Alert, 'infoFilledColor', silent(() => palette.getContrastText(palette.info.dark)));\n setColor(palette.Alert, 'successFilledColor', silent(() => palette.getContrastText(palette.success.dark)));\n setColor(palette.Alert, 'warningFilledColor', silent(() => palette.getContrastText(palette.warning.dark)));\n setColor(palette.Alert, 'errorStandardBg', safeDarken(palette.error.light, 0.9));\n setColor(palette.Alert, 'infoStandardBg', safeDarken(palette.info.light, 0.9));\n setColor(palette.Alert, 'successStandardBg', safeDarken(palette.success.light, 0.9));\n setColor(palette.Alert, 'warningStandardBg', safeDarken(palette.warning.light, 0.9));\n setColor(palette.Alert, 'errorIconColor', setCssVarColor('palette-error-main'));\n setColor(palette.Alert, 'infoIconColor', setCssVarColor('palette-info-main'));\n setColor(palette.Alert, 'successIconColor', setCssVarColor('palette-success-main'));\n setColor(palette.Alert, 'warningIconColor', setCssVarColor('palette-warning-main'));\n setColor(palette.AppBar, 'defaultBg', setCssVarColor('palette-grey-900'));\n setColor(palette.AppBar, 'darkBg', setCssVarColor('palette-background-paper')); // specific for dark mode\n setColor(palette.AppBar, 'darkColor', setCssVarColor('palette-text-primary')); // specific for dark mode\n setColor(palette.Avatar, 'defaultBg', setCssVarColor('palette-grey-600'));\n setColor(palette.Button, 'inheritContainedBg', setCssVarColor('palette-grey-800'));\n setColor(palette.Button, 'inheritContainedHoverBg', setCssVarColor('palette-grey-700'));\n setColor(palette.Chip, 'defaultBorder', setCssVarColor('palette-grey-700'));\n setColor(palette.Chip, 'defaultAvatarColor', setCssVarColor('palette-grey-300'));\n setColor(palette.Chip, 'defaultIconColor', setCssVarColor('palette-grey-300'));\n setColor(palette.FilledInput, 'bg', 'rgba(255, 255, 255, 0.09)');\n setColor(palette.FilledInput, 'hoverBg', 'rgba(255, 255, 255, 0.13)');\n setColor(palette.FilledInput, 'disabledBg', 'rgba(255, 255, 255, 0.12)');\n setColor(palette.LinearProgress, 'primaryBg', safeDarken(palette.primary.main, 0.5));\n setColor(palette.LinearProgress, 'secondaryBg', safeDarken(palette.secondary.main, 0.5));\n setColor(palette.LinearProgress, 'errorBg', safeDarken(palette.error.main, 0.5));\n setColor(palette.LinearProgress, 'infoBg', safeDarken(palette.info.main, 0.5));\n setColor(palette.LinearProgress, 'successBg', safeDarken(palette.success.main, 0.5));\n setColor(palette.LinearProgress, 'warningBg', safeDarken(palette.warning.main, 0.5));\n setColor(palette.Skeleton, 'bg', `rgba(${setCssVarColor('palette-text-primaryChannel')} / 0.13)`);\n setColor(palette.Slider, 'primaryTrack', safeDarken(palette.primary.main, 0.5));\n setColor(palette.Slider, 'secondaryTrack', safeDarken(palette.secondary.main, 0.5));\n setColor(palette.Slider, 'errorTrack', safeDarken(palette.error.main, 0.5));\n setColor(palette.Slider, 'infoTrack', safeDarken(palette.info.main, 0.5));\n setColor(palette.Slider, 'successTrack', safeDarken(palette.success.main, 0.5));\n setColor(palette.Slider, 'warningTrack', safeDarken(palette.warning.main, 0.5));\n const snackbarContentBackground = safeEmphasize(palette.background.default, 0.98);\n setColor(palette.SnackbarContent, 'bg', snackbarContentBackground);\n setColor(palette.SnackbarContent, 'color', silent(() => palette.getContrastText(snackbarContentBackground)));\n setColor(palette.SpeedDialAction, 'fabHoverBg', safeEmphasize(palette.background.paper, 0.15));\n setColor(palette.StepConnector, 'border', setCssVarColor('palette-grey-600'));\n setColor(palette.StepContent, 'border', setCssVarColor('palette-grey-600'));\n setColor(palette.Switch, 'defaultColor', setCssVarColor('palette-grey-300'));\n setColor(palette.Switch, 'defaultDisabledColor', setCssVarColor('palette-grey-600'));\n setColor(palette.Switch, 'primaryDisabledColor', safeDarken(palette.primary.main, 0.55));\n setColor(palette.Switch, 'secondaryDisabledColor', safeDarken(palette.secondary.main, 0.55));\n setColor(palette.Switch, 'errorDisabledColor', safeDarken(palette.error.main, 0.55));\n setColor(palette.Switch, 'infoDisabledColor', safeDarken(palette.info.main, 0.55));\n setColor(palette.Switch, 'successDisabledColor', safeDarken(palette.success.main, 0.55));\n setColor(palette.Switch, 'warningDisabledColor', safeDarken(palette.warning.main, 0.55));\n setColor(palette.TableCell, 'border', safeDarken(safeAlpha(palette.divider, 1), 0.68));\n setColor(palette.Tooltip, 'bg', safeAlpha(palette.grey[700], 0.92));\n }\n\n // MUI X - DataGrid needs this token.\n setColorChannel(palette.background, 'default');\n\n // added for consistency with the `background.default` token\n setColorChannel(palette.background, 'paper');\n setColorChannel(palette.common, 'background');\n setColorChannel(palette.common, 'onBackground');\n setColorChannel(palette, 'divider');\n Object.keys(palette).forEach(color => {\n const colors = palette[color];\n\n // The default palettes (primary, secondary, error, info, success, and warning) errors are handled by the above `createTheme(...)`.\n\n if (color !== 'tonalOffset' && colors && typeof colors === 'object') {\n // Silent the error for custom palettes.\n if (colors.main) {\n setColor(palette[color], 'mainChannel', safeColorChannel(toRgb(colors.main)));\n }\n if (colors.light) {\n setColor(palette[color], 'lightChannel', safeColorChannel(toRgb(colors.light)));\n }\n if (colors.dark) {\n setColor(palette[color], 'darkChannel', safeColorChannel(toRgb(colors.dark)));\n }\n if (colors.contrastText) {\n setColor(palette[color], 'contrastTextChannel', safeColorChannel(toRgb(colors.contrastText)));\n }\n if (color === 'text') {\n // Text colors: text.primary, text.secondary\n setColorChannel(palette[color], 'primary');\n setColorChannel(palette[color], 'secondary');\n }\n if (color === 'action') {\n // Action colors: action.active, action.selected\n if (colors.active) {\n setColorChannel(palette[color], 'active');\n }\n if (colors.selected) {\n setColorChannel(palette[color], 'selected');\n }\n }\n }\n });\n });\n theme = args.reduce((acc, argument) => deepmerge(acc, argument), theme);\n const parserConfig = {\n prefix: cssVarPrefix,\n disableCssColorScheme,\n shouldSkipGeneratingVar,\n getSelector: defaultGetSelector(theme)\n };\n const {\n vars,\n generateThemeVars,\n generateStyleSheets\n } = prepareCssVars(theme, parserConfig);\n theme.vars = vars;\n Object.entries(theme.colorSchemes[theme.defaultColorScheme]).forEach(([key, value]) => {\n theme[key] = value;\n });\n theme.generateThemeVars = generateThemeVars;\n theme.generateStyleSheets = generateStyleSheets;\n theme.generateSpacing = function generateSpacing() {\n return createSpacing(input.spacing, createUnarySpacing(this));\n };\n theme.getColorSchemeSelector = createGetColorSchemeSelector(selector);\n theme.spacing = theme.generateSpacing();\n theme.shouldSkipGeneratingVar = shouldSkipGeneratingVar;\n theme.unstable_sxConfig = {\n ...defaultSxConfig,\n ...input?.unstable_sxConfig\n };\n theme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n theme.toRuntimeSource = stringifyTheme; // for Pigment CSS integration\n\n return theme;\n}","import createPalette from \"./createPalette.js\";\nimport createThemeWithVars from \"./createThemeWithVars.js\";\nimport createThemeNoVars from \"./createThemeNoVars.js\";\nexport { createMuiTheme } from \"./createThemeNoVars.js\";\n// eslint-disable-next-line consistent-return\nfunction attachColorScheme(theme, scheme, colorScheme) {\n if (!theme.colorSchemes) {\n return undefined;\n }\n if (colorScheme) {\n theme.colorSchemes[scheme] = {\n ...(colorScheme !== true && colorScheme),\n palette: createPalette({\n ...(colorScheme === true ? {} : colorScheme.palette),\n mode: scheme\n }) // cast type to skip module augmentation test\n };\n }\n}\n\n/**\n * Generate a theme base on the options received.\n * @param options Takes an incomplete theme object and adds the missing parts.\n * @param args Deep merge the arguments with the about to be returned theme.\n * @returns A complete, ready-to-use theme object.\n */\nexport default function createTheme(options = {},\n// cast type to skip module augmentation test\n...args) {\n const {\n palette,\n cssVariables = false,\n colorSchemes: initialColorSchemes = !palette ? {\n light: true\n } : undefined,\n defaultColorScheme: initialDefaultColorScheme = palette?.mode,\n ...rest\n } = options;\n const defaultColorSchemeInput = initialDefaultColorScheme || 'light';\n const defaultScheme = initialColorSchemes?.[defaultColorSchemeInput];\n const colorSchemesInput = {\n ...initialColorSchemes,\n ...(palette ? {\n [defaultColorSchemeInput]: {\n ...(typeof defaultScheme !== 'boolean' && defaultScheme),\n palette\n }\n } : undefined)\n };\n if (cssVariables === false) {\n if (!('colorSchemes' in options)) {\n // Behaves exactly as v5\n return createThemeNoVars(options, ...args);\n }\n let paletteOptions = palette;\n if (!('palette' in options)) {\n if (colorSchemesInput[defaultColorSchemeInput]) {\n if (colorSchemesInput[defaultColorSchemeInput] !== true) {\n paletteOptions = colorSchemesInput[defaultColorSchemeInput].palette;\n } else if (defaultColorSchemeInput === 'dark') {\n // @ts-ignore to prevent the module augmentation test from failing\n paletteOptions = {\n mode: 'dark'\n };\n }\n }\n }\n const theme = createThemeNoVars({\n ...options,\n palette: paletteOptions\n }, ...args);\n theme.defaultColorScheme = defaultColorSchemeInput;\n theme.colorSchemes = colorSchemesInput;\n if (theme.palette.mode === 'light') {\n theme.colorSchemes.light = {\n ...(colorSchemesInput.light !== true && colorSchemesInput.light),\n palette: theme.palette\n };\n attachColorScheme(theme, 'dark', colorSchemesInput.dark);\n }\n if (theme.palette.mode === 'dark') {\n theme.colorSchemes.dark = {\n ...(colorSchemesInput.dark !== true && colorSchemesInput.dark),\n palette: theme.palette\n };\n attachColorScheme(theme, 'light', colorSchemesInput.light);\n }\n return theme;\n }\n if (!palette && !('light' in colorSchemesInput) && defaultColorSchemeInput === 'light') {\n colorSchemesInput.light = true;\n }\n return createThemeWithVars({\n ...rest,\n colorSchemes: colorSchemesInput,\n defaultColorScheme: defaultColorSchemeInput,\n ...(typeof cssVariables !== 'boolean' && cssVariables)\n }, ...args);\n}","'use client';\n\nimport createTheme from \"./createTheme.js\";\nconst defaultTheme = createTheme();\nexport default defaultTheme;","'use client';\n\nimport * as React from 'react';\nimport { useTheme as useThemeSystem } from '@mui/system';\nimport defaultTheme from \"./defaultTheme.js\";\nimport THEME_ID from \"./identifier.js\";\nexport default function useTheme() {\n const theme = useThemeSystem(defaultTheme);\n if (process.env.NODE_ENV !== 'production') {\n // TODO: uncomment once we enable eslint-plugin-react-compiler // eslint-disable-next-line react-compiler/react-compiler\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useDebugValue(theme);\n }\n return theme[THEME_ID] || theme;\n}","'use client';\n\nimport systemUseThemeProps from '@mui/system/useThemeProps';\nimport defaultTheme from \"./defaultTheme.js\";\nimport THEME_ID from \"./identifier.js\";\nexport default function useThemeProps({\n props,\n name\n}) {\n return systemUseThemeProps({\n props,\n name,\n defaultTheme,\n themeId: THEME_ID\n });\n}","// copied from @mui/system/createStyled\nfunction slotShouldForwardProp(prop) {\n return prop !== 'ownerState' && prop !== 'theme' && prop !== 'sx' && prop !== 'as';\n}\nexport default slotShouldForwardProp;","import slotShouldForwardProp from \"./slotShouldForwardProp.js\";\nconst rootShouldForwardProp = prop => slotShouldForwardProp(prop) && prop !== 'classes';\nexport default rootShouldForwardProp;","'use client';\n\nimport createStyled from '@mui/system/createStyled';\nimport defaultTheme from \"./defaultTheme.js\";\nimport THEME_ID from \"./identifier.js\";\nimport rootShouldForwardProp from \"./rootShouldForwardProp.js\";\nexport { default as slotShouldForwardProp } from \"./slotShouldForwardProp.js\";\nexport { default as rootShouldForwardProp } from \"./rootShouldForwardProp.js\";\nconst styled = createStyled({\n themeId: THEME_ID,\n defaultTheme,\n rootShouldForwardProp\n});\nexport default styled;","'use client';\n\nimport * as React from 'react';\nimport { ThemeProvider as SystemThemeProvider } from '@mui/system';\nimport THEME_ID from \"./identifier.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function ThemeProviderNoVars({\n theme: themeInput,\n ...props\n}) {\n const scopedTheme = THEME_ID in themeInput ? themeInput[THEME_ID] : undefined;\n return /*#__PURE__*/_jsx(SystemThemeProvider, {\n ...props,\n themeId: scopedTheme ? THEME_ID : undefined,\n theme: scopedTheme || themeInput\n });\n}","import * as React from 'react';\nimport SystemInitColorSchemeScript from '@mui/system/InitColorSchemeScript';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const defaultConfig = {\n attribute: 'data-mui-color-scheme',\n colorSchemeStorageKey: 'mui-color-scheme',\n defaultLightColorScheme: 'light',\n defaultDarkColorScheme: 'dark',\n modeStorageKey: 'mui-mode'\n};\nexport default (function InitColorSchemeScript(props) {\n return /*#__PURE__*/_jsx(SystemInitColorSchemeScript, {\n ...defaultConfig,\n ...props\n });\n});","'use client';\n\nimport * as React from 'react';\nimport styleFunctionSx from '@mui/system/styleFunctionSx';\nimport { unstable_createCssVarsProvider as createCssVarsProvider } from '@mui/system';\nimport createTheme from \"./createTheme.js\";\nimport createTypography from \"./createTypography.js\";\nimport THEME_ID from \"./identifier.js\";\nimport { defaultConfig } from \"../InitColorSchemeScript/InitColorSchemeScript.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst {\n CssVarsProvider: InternalCssVarsProvider,\n useColorScheme,\n getInitColorSchemeScript: deprecatedGetInitColorSchemeScript\n} = createCssVarsProvider({\n themeId: THEME_ID,\n // @ts-ignore ignore module augmentation tests\n theme: () => createTheme({\n cssVariables: true\n }),\n colorSchemeStorageKey: defaultConfig.colorSchemeStorageKey,\n modeStorageKey: defaultConfig.modeStorageKey,\n defaultColorScheme: {\n light: defaultConfig.defaultLightColorScheme,\n dark: defaultConfig.defaultDarkColorScheme\n },\n resolveTheme: theme => {\n const newTheme = {\n ...theme,\n typography: createTypography(theme.palette, theme.typography)\n };\n newTheme.unstable_sx = function sx(props) {\n return styleFunctionSx({\n sx: props,\n theme: this\n });\n };\n return newTheme;\n }\n});\nlet warnedOnce = false;\n\n// TODO: remove in v7\n// eslint-disable-next-line @typescript-eslint/naming-convention\nfunction Experimental_CssVarsProvider(props) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnce) {\n console.warn(['MUI: The Experimental_CssVarsProvider component has been ported into ThemeProvider.', '', \"You should use `import { ThemeProvider } from '@mui/material/styles'` instead.\", 'For more details, check out https://mui.com/material-ui/customization/css-theme-variables/usage/'].join('\\n'));\n warnedOnce = true;\n }\n }\n return /*#__PURE__*/_jsx(InternalCssVarsProvider, {\n ...props\n });\n}\nlet warnedInitScriptOnce = false;\n\n// TODO: remove in v7\nconst getInitColorSchemeScript = params => {\n if (!warnedInitScriptOnce) {\n console.warn(['MUI: The getInitColorSchemeScript function has been deprecated.', '', \"You should use `import InitColorSchemeScript from '@mui/material/InitColorSchemeScript'`\", 'and replace the function call with `` instead.'].join('\\n'));\n warnedInitScriptOnce = true;\n }\n return deprecatedGetInitColorSchemeScript(params);\n};\n\n/**\n * TODO: remove this export in v7\n * @deprecated\n * The `CssVarsProvider` component has been deprecated and ported into `ThemeProvider`.\n *\n * You should use `ThemeProvider` and `createTheme()` instead:\n *\n * ```diff\n * - import { CssVarsProvider, extendTheme } from '@mui/material/styles';\n * + import { ThemeProvider, createTheme } from '@mui/material/styles';\n *\n * - const theme = extendTheme();\n * + const theme = createTheme({\n * + cssVariables: true,\n * + colorSchemes: { light: true, dark: true },\n * + });\n *\n * - \n * + \n * ```\n *\n * To see the full documentation, check out https://mui.com/material-ui/customization/css-theme-variables/usage/.\n */\nexport const CssVarsProvider = InternalCssVarsProvider;\nexport { useColorScheme, getInitColorSchemeScript, Experimental_CssVarsProvider };","'use client';\n\nimport * as React from 'react';\nimport ThemeProviderNoVars from \"./ThemeProviderNoVars.js\";\nimport { CssVarsProvider } from \"./ThemeProviderWithVars.js\";\nimport THEME_ID from \"./identifier.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function ThemeProvider({\n theme,\n ...props\n}) {\n if (typeof theme === 'function') {\n return /*#__PURE__*/_jsx(ThemeProviderNoVars, {\n theme: theme,\n ...props\n });\n }\n const muiTheme = THEME_ID in theme ? theme[THEME_ID] : theme;\n if (!('colorSchemes' in muiTheme)) {\n return /*#__PURE__*/_jsx(ThemeProviderNoVars, {\n theme: theme,\n ...props\n });\n }\n return /*#__PURE__*/_jsx(CssVarsProvider, {\n theme: theme,\n ...props\n });\n}","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { GlobalStyles as SystemGlobalStyles } from '@mui/system';\nimport defaultTheme from \"../styles/defaultTheme.js\";\nimport THEME_ID from \"../styles/identifier.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction GlobalStyles(props) {\n return /*#__PURE__*/_jsx(SystemGlobalStyles, {\n ...props,\n defaultTheme: defaultTheme,\n themeId: THEME_ID\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? GlobalStyles.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The styles you want to apply globally.\n */\n styles: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.array, PropTypes.func, PropTypes.number, PropTypes.object, PropTypes.string, PropTypes.bool])\n} : void 0;\nexport default GlobalStyles;","import * as React from 'react';\nimport { extendSxProp } from '@mui/system/styleFunctionSx';\nimport useTheme from \"../styles/useTheme.js\";\nimport GlobalStyles from \"../GlobalStyles/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport { css, keyframes } from '@mui/system';\nexport { default as styled } from \"../styles/styled.js\";\nexport function globalCss(styles) {\n return function GlobalStylesWrapper(props) {\n return (\n /*#__PURE__*/\n // Pigment CSS `globalCss` support callback with theme inside an object but `GlobalStyles` support theme as a callback value.\n _jsx(GlobalStyles, {\n styles: typeof styles === 'function' ? theme => styles({\n theme,\n ...props\n }) : styles\n })\n );\n };\n}\n\n// eslint-disable-next-line @typescript-eslint/naming-convention\nexport function internal_createExtendSxProp() {\n return extendSxProp;\n}\nexport { useTheme };","import { unstable_memoTheme } from '@mui/system';\nconst memoTheme = unstable_memoTheme;\nexport default memoTheme;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport SystemDefaultPropsProvider, { useDefaultProps as useSystemDefaultProps } from '@mui/system/DefaultPropsProvider';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction DefaultPropsProvider(props) {\n return /*#__PURE__*/_jsx(SystemDefaultPropsProvider, {\n ...props\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? DefaultPropsProvider.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the TypeScript types and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n value: PropTypes.object.isRequired\n} : void 0;\nexport default DefaultPropsProvider;\nexport function useDefaultProps(params) {\n return useSystemDefaultProps(params);\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getSvgIconUtilityClass(slot) {\n return generateUtilityClass('MuiSvgIcon', slot);\n}\nconst svgIconClasses = generateUtilityClasses('MuiSvgIcon', ['root', 'colorPrimary', 'colorSecondary', 'colorAction', 'colorError', 'colorDisabled', 'fontSizeInherit', 'fontSizeSmall', 'fontSizeMedium', 'fontSizeLarge']);\nexport default svgIconClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from \"../utils/capitalize.js\";\nimport { styled } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport { getSvgIconUtilityClass } from \"./svgIconClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n color,\n fontSize,\n classes\n } = ownerState;\n const slots = {\n root: ['root', color !== 'inherit' && `color${capitalize(color)}`, `fontSize${capitalize(fontSize)}`]\n };\n return composeClasses(slots, getSvgIconUtilityClass, classes);\n};\nconst SvgIconRoot = styled('svg', {\n name: 'MuiSvgIcon',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, ownerState.color !== 'inherit' && styles[`color${capitalize(ownerState.color)}`], styles[`fontSize${capitalize(ownerState.fontSize)}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n userSelect: 'none',\n width: '1em',\n height: '1em',\n display: 'inline-block',\n flexShrink: 0,\n transition: theme.transitions?.create?.('fill', {\n duration: (theme.vars ?? theme).transitions?.duration?.shorter\n }),\n variants: [{\n props: props => !props.hasSvgAsChild,\n style: {\n // the will define the property that has `currentColor`\n // for example heroicons uses fill=\"none\" and stroke=\"currentColor\"\n fill: 'currentColor'\n }\n }, {\n props: {\n fontSize: 'inherit'\n },\n style: {\n fontSize: 'inherit'\n }\n }, {\n props: {\n fontSize: 'small'\n },\n style: {\n fontSize: theme.typography?.pxToRem?.(20) || '1.25rem'\n }\n }, {\n props: {\n fontSize: 'medium'\n },\n style: {\n fontSize: theme.typography?.pxToRem?.(24) || '1.5rem'\n }\n }, {\n props: {\n fontSize: 'large'\n },\n style: {\n fontSize: theme.typography?.pxToRem?.(35) || '2.1875rem'\n }\n },\n // TODO v5 deprecate color prop, v6 remove for sx\n ...Object.entries((theme.vars ?? theme).palette).filter(([, value]) => value && value.main).map(([color]) => ({\n props: {\n color\n },\n style: {\n color: (theme.vars ?? theme).palette?.[color]?.main\n }\n })), {\n props: {\n color: 'action'\n },\n style: {\n color: (theme.vars ?? theme).palette?.action?.active\n }\n }, {\n props: {\n color: 'disabled'\n },\n style: {\n color: (theme.vars ?? theme).palette?.action?.disabled\n }\n }, {\n props: {\n color: 'inherit'\n },\n style: {\n color: undefined\n }\n }]\n})));\nconst SvgIcon = /*#__PURE__*/React.forwardRef(function SvgIcon(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiSvgIcon'\n });\n const {\n children,\n className,\n color = 'inherit',\n component = 'svg',\n fontSize = 'medium',\n htmlColor,\n inheritViewBox = false,\n titleAccess,\n viewBox = '0 0 24 24',\n ...other\n } = props;\n const hasSvgAsChild = /*#__PURE__*/React.isValidElement(children) && children.type === 'svg';\n const ownerState = {\n ...props,\n color,\n component,\n fontSize,\n instanceFontSize: inProps.fontSize,\n inheritViewBox,\n viewBox,\n hasSvgAsChild\n };\n const more = {};\n if (!inheritViewBox) {\n more.viewBox = viewBox;\n }\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsxs(SvgIconRoot, {\n as: component,\n className: clsx(classes.root, className),\n focusable: \"false\",\n color: htmlColor,\n \"aria-hidden\": titleAccess ? undefined : true,\n role: titleAccess ? 'img' : undefined,\n ref: ref,\n ...more,\n ...other,\n ...(hasSvgAsChild && children.props),\n ownerState: ownerState,\n children: [hasSvgAsChild ? children.props.children : children, titleAccess ? /*#__PURE__*/_jsx(\"title\", {\n children: titleAccess\n }) : null]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? SvgIcon.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * Node passed into the SVG element.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * You can use the `htmlColor` prop to apply a color attribute to the SVG element.\n * @default 'inherit'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'action', 'disabled', 'primary', 'secondary', 'error', 'info', 'success', 'warning']), PropTypes.string]),\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.\n * @default 'medium'\n */\n fontSize: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['inherit', 'large', 'medium', 'small']), PropTypes.string]),\n /**\n * Applies a color attribute to the SVG element.\n */\n htmlColor: PropTypes.string,\n /**\n * If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`\n * prop will be ignored.\n * Useful when you want to reference a custom `component` and have `SvgIcon` pass that\n * `component`'s viewBox to the root node.\n * @default false\n */\n inheritViewBox: PropTypes.bool,\n /**\n * The shape-rendering attribute. The behavior of the different options is described on the\n * [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).\n * If you are having issues with blurry icons you should investigate this prop.\n */\n shapeRendering: PropTypes.string,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Provides a human-readable title for the element that contains it.\n * https://www.w3.org/TR/SVG-access/#Equivalent\n */\n titleAccess: PropTypes.string,\n /**\n * Allows you to redefine what the coordinates without units mean inside an SVG element.\n * For example, if the SVG element is 500 (width) by 200 (height),\n * and you pass viewBox=\"0 0 50 20\",\n * this means that the coordinates inside the SVG will go from the top left corner (0,0)\n * to bottom right (50,20) and each unit will be worth 10px.\n * @default '0 0 24 24'\n */\n viewBox: PropTypes.string\n} : void 0;\nSvgIcon.muiName = 'SvgIcon';\nexport default SvgIcon;","'use client';\n\nimport * as React from 'react';\nimport SvgIcon from \"../SvgIcon/index.js\";\n\n/**\n * Private module reserved for @mui packages.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default function createSvgIcon(path, displayName) {\n function Component(props, ref) {\n return /*#__PURE__*/_jsx(SvgIcon, {\n \"data-testid\": `${displayName}Icon`,\n ref: ref,\n ...props,\n children: path\n });\n }\n if (process.env.NODE_ENV !== 'production') {\n // Need to set `displayName` on the inner component for React.memo.\n // React prior to 16.14 ignores `displayName` on the wrapper.\n Component.displayName = `${displayName}Icon`;\n }\n Component.muiName = SvgIcon.muiName;\n return /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(Component));\n}","function _objectWithoutPropertiesLoose(r, e) {\n if (null == r) return {};\n var t = {};\n for (var n in r) if ({}.hasOwnProperty.call(r, n)) {\n if (-1 !== e.indexOf(n)) continue;\n t[n] = r[n];\n }\n return t;\n}\nexport { _objectWithoutPropertiesLoose as default };","function _setPrototypeOf(t, e) {\n return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) {\n return t.__proto__ = e, t;\n }, _setPrototypeOf(t, e);\n}\nexport { _setPrototypeOf as default };","import setPrototypeOf from \"./setPrototypeOf.js\";\nfunction _inheritsLoose(t, o) {\n t.prototype = Object.create(o.prototype), t.prototype.constructor = t, setPrototypeOf(t, o);\n}\nexport { _inheritsLoose as default };","/**\n * Checks if a given element has a CSS class.\n * \n * @param element the element\n * @param className the CSS class name\n */\nexport default function hasClass(element, className) {\n if (element.classList) return !!className && element.classList.contains(className);\n return (\" \" + (element.className.baseVal || element.className) + \" \").indexOf(\" \" + className + \" \") !== -1;\n}","import hasClass from './hasClass';\n/**\n * Adds a CSS class to a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\nexport default function addClass(element, className) {\n if (element.classList) element.classList.add(className);else if (!hasClass(element, className)) if (typeof element.className === 'string') element.className = element.className + \" \" + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + \" \" + className);\n}","function replaceClassName(origClass, classToRemove) {\n return origClass.replace(new RegExp(\"(^|\\\\s)\" + classToRemove + \"(?:\\\\s|$)\", 'g'), '$1').replace(/\\s+/g, ' ').replace(/^\\s*|\\s*$/g, '');\n}\n/**\n * Removes a CSS class from a given element.\n * \n * @param element the element\n * @param className the CSS class name\n */\n\n\nexport default function removeClass(element, className) {\n if (element.classList) {\n element.classList.remove(className);\n } else if (typeof element.className === 'string') {\n element.className = replaceClassName(element.className, className);\n } else {\n element.setAttribute('class', replaceClassName(element.className && element.className.baseVal || '', className));\n }\n}","export default {\n disabled: false\n};","import React from 'react';\nexport default React.createContext(null);","export var forceReflow = function forceReflow(node) {\n return node.scrollTop;\n};","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport config from './config';\nimport { timeoutsShape } from './utils/PropTypes';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { forceReflow } from './utils/reflow';\nexport var UNMOUNTED = 'unmounted';\nexport var EXITED = 'exited';\nexport var ENTERING = 'entering';\nexport var ENTERED = 'entered';\nexport var EXITING = 'exiting';\n/**\n * The Transition component lets you describe a transition from one component\n * state to another _over time_ with a simple declarative API. Most commonly\n * it's used to animate the mounting and unmounting of a component, but can also\n * be used to describe in-place transition states as well.\n *\n * ---\n *\n * **Note**: `Transition` is a platform-agnostic base component. If you're using\n * transitions in CSS, you'll probably want to use\n * [`CSSTransition`](https://reactcommunity.org/react-transition-group/css-transition)\n * instead. It inherits all the features of `Transition`, but contains\n * additional features necessary to play nice with CSS transitions (hence the\n * name of the component).\n *\n * ---\n *\n * By default the `Transition` component does not alter the behavior of the\n * component it renders, it only tracks \"enter\" and \"exit\" states for the\n * components. It's up to you to give meaning and effect to those states. For\n * example we can add styles to a component when it enters or exits:\n *\n * ```jsx\n * import { Transition } from 'react-transition-group';\n *\n * const duration = 300;\n *\n * const defaultStyle = {\n * transition: `opacity ${duration}ms ease-in-out`,\n * opacity: 0,\n * }\n *\n * const transitionStyles = {\n * entering: { opacity: 1 },\n * entered: { opacity: 1 },\n * exiting: { opacity: 0 },\n * exited: { opacity: 0 },\n * };\n *\n * const Fade = ({ in: inProp }) => (\n * \n * {state => (\n *
\n * I'm a fade Transition!\n *
\n * )}\n * \n * );\n * ```\n *\n * There are 4 main states a Transition can be in:\n * - `'entering'`\n * - `'entered'`\n * - `'exiting'`\n * - `'exited'`\n *\n * Transition state is toggled via the `in` prop. When `true` the component\n * begins the \"Enter\" stage. During this stage, the component will shift from\n * its current transition state, to `'entering'` for the duration of the\n * transition and then to the `'entered'` stage once it's complete. Let's take\n * the following example (we'll use the\n * [useState](https://reactjs.org/docs/hooks-reference.html#usestate) hook):\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n *
\n * \n * {state => (\n * // ...\n * )}\n * \n * \n *
\n * );\n * }\n * ```\n *\n * When the button is clicked the component will shift to the `'entering'` state\n * and stay there for 500ms (the value of `timeout`) before it finally switches\n * to `'entered'`.\n *\n * When `in` is `false` the same thing happens except the state moves from\n * `'exiting'` to `'exited'`.\n */\n\nvar Transition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(Transition, _React$Component);\n\n function Transition(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n var parentGroup = context; // In the context of a TransitionGroup all enters are really appears\n\n var appear = parentGroup && !parentGroup.isMounting ? props.enter : props.appear;\n var initialStatus;\n _this.appearStatus = null;\n\n if (props.in) {\n if (appear) {\n initialStatus = EXITED;\n _this.appearStatus = ENTERING;\n } else {\n initialStatus = ENTERED;\n }\n } else {\n if (props.unmountOnExit || props.mountOnEnter) {\n initialStatus = UNMOUNTED;\n } else {\n initialStatus = EXITED;\n }\n }\n\n _this.state = {\n status: initialStatus\n };\n _this.nextCallback = null;\n return _this;\n }\n\n Transition.getDerivedStateFromProps = function getDerivedStateFromProps(_ref, prevState) {\n var nextIn = _ref.in;\n\n if (nextIn && prevState.status === UNMOUNTED) {\n return {\n status: EXITED\n };\n }\n\n return null;\n } // getSnapshotBeforeUpdate(prevProps) {\n // let nextStatus = null\n // if (prevProps !== this.props) {\n // const { status } = this.state\n // if (this.props.in) {\n // if (status !== ENTERING && status !== ENTERED) {\n // nextStatus = ENTERING\n // }\n // } else {\n // if (status === ENTERING || status === ENTERED) {\n // nextStatus = EXITING\n // }\n // }\n // }\n // return { nextStatus }\n // }\n ;\n\n var _proto = Transition.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.updateStatus(true, this.appearStatus);\n };\n\n _proto.componentDidUpdate = function componentDidUpdate(prevProps) {\n var nextStatus = null;\n\n if (prevProps !== this.props) {\n var status = this.state.status;\n\n if (this.props.in) {\n if (status !== ENTERING && status !== ENTERED) {\n nextStatus = ENTERING;\n }\n } else {\n if (status === ENTERING || status === ENTERED) {\n nextStatus = EXITING;\n }\n }\n }\n\n this.updateStatus(false, nextStatus);\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.cancelNextCallback();\n };\n\n _proto.getTimeouts = function getTimeouts() {\n var timeout = this.props.timeout;\n var exit, enter, appear;\n exit = enter = appear = timeout;\n\n if (timeout != null && typeof timeout !== 'number') {\n exit = timeout.exit;\n enter = timeout.enter; // TODO: remove fallback for next major\n\n appear = timeout.appear !== undefined ? timeout.appear : enter;\n }\n\n return {\n exit: exit,\n enter: enter,\n appear: appear\n };\n };\n\n _proto.updateStatus = function updateStatus(mounting, nextStatus) {\n if (mounting === void 0) {\n mounting = false;\n }\n\n if (nextStatus !== null) {\n // nextStatus will always be ENTERING or EXITING.\n this.cancelNextCallback();\n\n if (nextStatus === ENTERING) {\n if (this.props.unmountOnExit || this.props.mountOnEnter) {\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749\n // With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.\n // To make the animation happen, we have to separate each rendering and avoid being processed as batched.\n\n if (node) forceReflow(node);\n }\n\n this.performEnter(mounting);\n } else {\n this.performExit();\n }\n } else if (this.props.unmountOnExit && this.state.status === EXITED) {\n this.setState({\n status: UNMOUNTED\n });\n }\n };\n\n _proto.performEnter = function performEnter(mounting) {\n var _this2 = this;\n\n var enter = this.props.enter;\n var appearing = this.context ? this.context.isMounting : mounting;\n\n var _ref2 = this.props.nodeRef ? [appearing] : [ReactDOM.findDOMNode(this), appearing],\n maybeNode = _ref2[0],\n maybeAppearing = _ref2[1];\n\n var timeouts = this.getTimeouts();\n var enterTimeout = appearing ? timeouts.appear : timeouts.enter; // no enter animation skip right to ENTERED\n // if we are mounting and running this it means appear _must_ be set\n\n if (!mounting && !enter || config.disabled) {\n this.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode);\n });\n return;\n }\n\n this.props.onEnter(maybeNode, maybeAppearing);\n this.safeSetState({\n status: ENTERING\n }, function () {\n _this2.props.onEntering(maybeNode, maybeAppearing);\n\n _this2.onTransitionEnd(enterTimeout, function () {\n _this2.safeSetState({\n status: ENTERED\n }, function () {\n _this2.props.onEntered(maybeNode, maybeAppearing);\n });\n });\n });\n };\n\n _proto.performExit = function performExit() {\n var _this3 = this;\n\n var exit = this.props.exit;\n var timeouts = this.getTimeouts();\n var maybeNode = this.props.nodeRef ? undefined : ReactDOM.findDOMNode(this); // no exit animation skip right to EXITED\n\n if (!exit || config.disabled) {\n this.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n return;\n }\n\n this.props.onExit(maybeNode);\n this.safeSetState({\n status: EXITING\n }, function () {\n _this3.props.onExiting(maybeNode);\n\n _this3.onTransitionEnd(timeouts.exit, function () {\n _this3.safeSetState({\n status: EXITED\n }, function () {\n _this3.props.onExited(maybeNode);\n });\n });\n });\n };\n\n _proto.cancelNextCallback = function cancelNextCallback() {\n if (this.nextCallback !== null) {\n this.nextCallback.cancel();\n this.nextCallback = null;\n }\n };\n\n _proto.safeSetState = function safeSetState(nextState, callback) {\n // This shouldn't be necessary, but there are weird race conditions with\n // setState callbacks and unmounting in testing, so always make sure that\n // we can cancel any pending setState callbacks after we unmount.\n callback = this.setNextCallback(callback);\n this.setState(nextState, callback);\n };\n\n _proto.setNextCallback = function setNextCallback(callback) {\n var _this4 = this;\n\n var active = true;\n\n this.nextCallback = function (event) {\n if (active) {\n active = false;\n _this4.nextCallback = null;\n callback(event);\n }\n };\n\n this.nextCallback.cancel = function () {\n active = false;\n };\n\n return this.nextCallback;\n };\n\n _proto.onTransitionEnd = function onTransitionEnd(timeout, handler) {\n this.setNextCallback(handler);\n var node = this.props.nodeRef ? this.props.nodeRef.current : ReactDOM.findDOMNode(this);\n var doesNotHaveTimeoutOrListener = timeout == null && !this.props.addEndListener;\n\n if (!node || doesNotHaveTimeoutOrListener) {\n setTimeout(this.nextCallback, 0);\n return;\n }\n\n if (this.props.addEndListener) {\n var _ref3 = this.props.nodeRef ? [this.nextCallback] : [node, this.nextCallback],\n maybeNode = _ref3[0],\n maybeNextCallback = _ref3[1];\n\n this.props.addEndListener(maybeNode, maybeNextCallback);\n }\n\n if (timeout != null) {\n setTimeout(this.nextCallback, timeout);\n }\n };\n\n _proto.render = function render() {\n var status = this.state.status;\n\n if (status === UNMOUNTED) {\n return null;\n }\n\n var _this$props = this.props,\n children = _this$props.children,\n _in = _this$props.in,\n _mountOnEnter = _this$props.mountOnEnter,\n _unmountOnExit = _this$props.unmountOnExit,\n _appear = _this$props.appear,\n _enter = _this$props.enter,\n _exit = _this$props.exit,\n _timeout = _this$props.timeout,\n _addEndListener = _this$props.addEndListener,\n _onEnter = _this$props.onEnter,\n _onEntering = _this$props.onEntering,\n _onEntered = _this$props.onEntered,\n _onExit = _this$props.onExit,\n _onExiting = _this$props.onExiting,\n _onExited = _this$props.onExited,\n _nodeRef = _this$props.nodeRef,\n childProps = _objectWithoutPropertiesLoose(_this$props, [\"children\", \"in\", \"mountOnEnter\", \"unmountOnExit\", \"appear\", \"enter\", \"exit\", \"timeout\", \"addEndListener\", \"onEnter\", \"onEntering\", \"onEntered\", \"onExit\", \"onExiting\", \"onExited\", \"nodeRef\"]);\n\n return (\n /*#__PURE__*/\n // allows for nested Transitions\n React.createElement(TransitionGroupContext.Provider, {\n value: null\n }, typeof children === 'function' ? children(status, childProps) : React.cloneElement(React.Children.only(children), childProps))\n );\n };\n\n return Transition;\n}(React.Component);\n\nTransition.contextType = TransitionGroupContext;\nTransition.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * A React reference to DOM element that need to transition:\n * https://stackoverflow.com/a/51127130/4671932\n *\n * - When `nodeRef` prop is used, `node` is not passed to callback functions\n * (e.g. `onEnter`) because user already has direct access to the node.\n * - When changing `key` prop of `Transition` in a `TransitionGroup` a new\n * `nodeRef` need to be provided to `Transition` with changed `key` prop\n * (see\n * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).\n */\n nodeRef: PropTypes.shape({\n current: typeof Element === 'undefined' ? PropTypes.any : function (propValue, key, componentName, location, propFullName, secret) {\n var value = propValue[key];\n return PropTypes.instanceOf(value && 'ownerDocument' in value ? value.ownerDocument.defaultView.Element : Element)(propValue, key, componentName, location, propFullName, secret);\n }\n }),\n\n /**\n * A `function` child can be used instead of a React element. This function is\n * called with the current transition status (`'entering'`, `'entered'`,\n * `'exiting'`, `'exited'`), which can be used to apply context\n * specific props to a component.\n *\n * ```jsx\n * \n * {state => (\n * \n * )}\n * \n * ```\n */\n children: PropTypes.oneOfType([PropTypes.func.isRequired, PropTypes.element.isRequired]).isRequired,\n\n /**\n * Show the component; triggers the enter or exit states\n */\n in: PropTypes.bool,\n\n /**\n * By default the child component is mounted immediately along with\n * the parent `Transition` component. If you want to \"lazy mount\" the component on the\n * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay\n * mounted, even on \"exited\", unless you also specify `unmountOnExit`.\n */\n mountOnEnter: PropTypes.bool,\n\n /**\n * By default the child component stays mounted after it reaches the `'exited'` state.\n * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.\n */\n unmountOnExit: PropTypes.bool,\n\n /**\n * By default the child component does not perform the enter transition when\n * it first mounts, regardless of the value of `in`. If you want this\n * behavior, set both `appear` and `in` to `true`.\n *\n * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop\n * > only adds an additional enter transition. However, in the\n * > `` component that first enter transition does result in\n * > additional `.appear-*` classes, that way you can choose to style it\n * > differently.\n */\n appear: PropTypes.bool,\n\n /**\n * Enable or disable enter transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * Enable or disable exit transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * The duration of the transition, in milliseconds.\n * Required unless `addEndListener` is provided.\n *\n * You may specify a single timeout for all transitions:\n *\n * ```jsx\n * timeout={500}\n * ```\n *\n * or individually:\n *\n * ```jsx\n * timeout={{\n * appear: 500,\n * enter: 300,\n * exit: 500,\n * }}\n * ```\n *\n * - `appear` defaults to the value of `enter`\n * - `enter` defaults to `0`\n * - `exit` defaults to `0`\n *\n * @type {number | { enter?: number, exit?: number, appear?: number }}\n */\n timeout: function timeout(props) {\n var pt = timeoutsShape;\n if (!props.addEndListener) pt = pt.isRequired;\n\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return pt.apply(void 0, [props].concat(args));\n },\n\n /**\n * Add a custom transition end trigger. Called with the transitioning\n * DOM node and a `done` callback. Allows for more fine grained transition end\n * logic. Timeouts are still used as a fallback if provided.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * ```jsx\n * addEndListener={(node, done) => {\n * // use the css transitionend event to mark the finish of a transition\n * node.addEventListener('transitionend', done, false);\n * }}\n * ```\n */\n addEndListener: PropTypes.func,\n\n /**\n * Callback fired before the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEnter: PropTypes.func,\n\n /**\n * Callback fired after the \"entering\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * Callback fired after the \"entered\" status is applied. An extra parameter\n * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool) -> void\n */\n onEntered: PropTypes.func,\n\n /**\n * Callback fired before the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExit: PropTypes.func,\n\n /**\n * Callback fired after the \"exiting\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExiting: PropTypes.func,\n\n /**\n * Callback fired after the \"exited\" status is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement) -> void\n */\n onExited: PropTypes.func\n} : {}; // Name the function so it is clearer in the documentation\n\nfunction noop() {}\n\nTransition.defaultProps = {\n in: false,\n mountOnEnter: false,\n unmountOnExit: false,\n appear: false,\n enter: true,\n exit: true,\n onEnter: noop,\n onEntering: noop,\n onEntered: noop,\n onExit: noop,\n onExiting: noop,\n onExited: noop\n};\nTransition.UNMOUNTED = UNMOUNTED;\nTransition.EXITED = EXITED;\nTransition.ENTERING = ENTERING;\nTransition.ENTERED = ENTERED;\nTransition.EXITING = EXITING;\nexport default Transition;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport addOneClass from 'dom-helpers/addClass';\nimport removeOneClass from 'dom-helpers/removeClass';\nimport React from 'react';\nimport Transition from './Transition';\nimport { classNamesShape } from './utils/PropTypes';\nimport { forceReflow } from './utils/reflow';\n\nvar _addClass = function addClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return addOneClass(node, c);\n });\n};\n\nvar removeClass = function removeClass(node, classes) {\n return node && classes && classes.split(' ').forEach(function (c) {\n return removeOneClass(node, c);\n });\n};\n/**\n * A transition component inspired by the excellent\n * [ng-animate](https://docs.angularjs.org/api/ngAnimate) library, you should\n * use it if you're using CSS transitions or animations. It's built upon the\n * [`Transition`](https://reactcommunity.org/react-transition-group/transition)\n * component, so it inherits all of its props.\n *\n * `CSSTransition` applies a pair of class names during the `appear`, `enter`,\n * and `exit` states of the transition. The first class is applied and then a\n * second `*-active` class in order to activate the CSS transition. After the\n * transition, matching `*-done` class names are applied to persist the\n * transition state.\n *\n * ```jsx\n * function App() {\n * const [inProp, setInProp] = useState(false);\n * return (\n *
\n * \n *
\n * {\"I'll receive my-node-* classes\"}\n *
\n *
\n * \n *
\n * );\n * }\n * ```\n *\n * When the `in` prop is set to `true`, the child component will first receive\n * the class `example-enter`, then the `example-enter-active` will be added in\n * the next tick. `CSSTransition` [forces a\n * reflow](https://github.com/reactjs/react-transition-group/blob/5007303e729a74be66a21c3e2205e4916821524b/src/CSSTransition.js#L208-L215)\n * between before adding the `example-enter-active`. This is an important trick\n * because it allows us to transition between `example-enter` and\n * `example-enter-active` even though they were added immediately one after\n * another. Most notably, this is what makes it possible for us to animate\n * _appearance_.\n *\n * ```css\n * .my-node-enter {\n * opacity: 0;\n * }\n * .my-node-enter-active {\n * opacity: 1;\n * transition: opacity 200ms;\n * }\n * .my-node-exit {\n * opacity: 1;\n * }\n * .my-node-exit-active {\n * opacity: 0;\n * transition: opacity 200ms;\n * }\n * ```\n *\n * `*-active` classes represent which styles you want to animate **to**, so it's\n * important to add `transition` declaration only to them, otherwise transitions\n * might not behave as intended! This might not be obvious when the transitions\n * are symmetrical, i.e. when `*-enter-active` is the same as `*-exit`, like in\n * the example above (minus `transition`), but it becomes apparent in more\n * complex transitions.\n *\n * **Note**: If you're using the\n * [`appear`](http://reactcommunity.org/react-transition-group/transition#Transition-prop-appear)\n * prop, make sure to define styles for `.appear-*` classes as well.\n */\n\n\nvar CSSTransition = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(CSSTransition, _React$Component);\n\n function CSSTransition() {\n var _this;\n\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n _this = _React$Component.call.apply(_React$Component, [this].concat(args)) || this;\n _this.appliedClasses = {\n appear: {},\n enter: {},\n exit: {}\n };\n\n _this.onEnter = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument[0],\n appearing = _this$resolveArgument[1];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, appearing ? 'appear' : 'enter', 'base');\n\n if (_this.props.onEnter) {\n _this.props.onEnter(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntering = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument2 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument2[0],\n appearing = _this$resolveArgument2[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.addClass(node, type, 'active');\n\n if (_this.props.onEntering) {\n _this.props.onEntering(maybeNode, maybeAppearing);\n }\n };\n\n _this.onEntered = function (maybeNode, maybeAppearing) {\n var _this$resolveArgument3 = _this.resolveArguments(maybeNode, maybeAppearing),\n node = _this$resolveArgument3[0],\n appearing = _this$resolveArgument3[1];\n\n var type = appearing ? 'appear' : 'enter';\n\n _this.removeClasses(node, type);\n\n _this.addClass(node, type, 'done');\n\n if (_this.props.onEntered) {\n _this.props.onEntered(maybeNode, maybeAppearing);\n }\n };\n\n _this.onExit = function (maybeNode) {\n var _this$resolveArgument4 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument4[0];\n\n _this.removeClasses(node, 'appear');\n\n _this.removeClasses(node, 'enter');\n\n _this.addClass(node, 'exit', 'base');\n\n if (_this.props.onExit) {\n _this.props.onExit(maybeNode);\n }\n };\n\n _this.onExiting = function (maybeNode) {\n var _this$resolveArgument5 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument5[0];\n\n _this.addClass(node, 'exit', 'active');\n\n if (_this.props.onExiting) {\n _this.props.onExiting(maybeNode);\n }\n };\n\n _this.onExited = function (maybeNode) {\n var _this$resolveArgument6 = _this.resolveArguments(maybeNode),\n node = _this$resolveArgument6[0];\n\n _this.removeClasses(node, 'exit');\n\n _this.addClass(node, 'exit', 'done');\n\n if (_this.props.onExited) {\n _this.props.onExited(maybeNode);\n }\n };\n\n _this.resolveArguments = function (maybeNode, maybeAppearing) {\n return _this.props.nodeRef ? [_this.props.nodeRef.current, maybeNode] // here `maybeNode` is actually `appearing`\n : [maybeNode, maybeAppearing];\n };\n\n _this.getClassNames = function (type) {\n var classNames = _this.props.classNames;\n var isStringClassNames = typeof classNames === 'string';\n var prefix = isStringClassNames && classNames ? classNames + \"-\" : '';\n var baseClassName = isStringClassNames ? \"\" + prefix + type : classNames[type];\n var activeClassName = isStringClassNames ? baseClassName + \"-active\" : classNames[type + \"Active\"];\n var doneClassName = isStringClassNames ? baseClassName + \"-done\" : classNames[type + \"Done\"];\n return {\n baseClassName: baseClassName,\n activeClassName: activeClassName,\n doneClassName: doneClassName\n };\n };\n\n return _this;\n }\n\n var _proto = CSSTransition.prototype;\n\n _proto.addClass = function addClass(node, type, phase) {\n var className = this.getClassNames(type)[phase + \"ClassName\"];\n\n var _this$getClassNames = this.getClassNames('enter'),\n doneClassName = _this$getClassNames.doneClassName;\n\n if (type === 'appear' && phase === 'done' && doneClassName) {\n className += \" \" + doneClassName;\n } // This is to force a repaint,\n // which is necessary in order to transition styles when adding a class name.\n\n\n if (phase === 'active') {\n if (node) forceReflow(node);\n }\n\n if (className) {\n this.appliedClasses[type][phase] = className;\n\n _addClass(node, className);\n }\n };\n\n _proto.removeClasses = function removeClasses(node, type) {\n var _this$appliedClasses$ = this.appliedClasses[type],\n baseClassName = _this$appliedClasses$.base,\n activeClassName = _this$appliedClasses$.active,\n doneClassName = _this$appliedClasses$.done;\n this.appliedClasses[type] = {};\n\n if (baseClassName) {\n removeClass(node, baseClassName);\n }\n\n if (activeClassName) {\n removeClass(node, activeClassName);\n }\n\n if (doneClassName) {\n removeClass(node, doneClassName);\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n _ = _this$props.classNames,\n props = _objectWithoutPropertiesLoose(_this$props, [\"classNames\"]);\n\n return /*#__PURE__*/React.createElement(Transition, _extends({}, props, {\n onEnter: this.onEnter,\n onEntered: this.onEntered,\n onEntering: this.onEntering,\n onExit: this.onExit,\n onExiting: this.onExiting,\n onExited: this.onExited\n }));\n };\n\n return CSSTransition;\n}(React.Component);\n\nCSSTransition.defaultProps = {\n classNames: ''\n};\nCSSTransition.propTypes = process.env.NODE_ENV !== \"production\" ? _extends({}, Transition.propTypes, {\n /**\n * The animation classNames applied to the component as it appears, enters,\n * exits or has finished the transition. A single name can be provided, which\n * will be suffixed for each stage, e.g. `classNames=\"fade\"` applies:\n *\n * - `fade-appear`, `fade-appear-active`, `fade-appear-done`\n * - `fade-enter`, `fade-enter-active`, `fade-enter-done`\n * - `fade-exit`, `fade-exit-active`, `fade-exit-done`\n *\n * A few details to note about how these classes are applied:\n *\n * 1. They are _joined_ with the ones that are already defined on the child\n * component, so if you want to add some base styles, you can use\n * `className` without worrying that it will be overridden.\n *\n * 2. If the transition component mounts with `in={false}`, no classes are\n * applied yet. You might be expecting `*-exit-done`, but if you think\n * about it, a component cannot finish exiting if it hasn't entered yet.\n *\n * 2. `fade-appear-done` and `fade-enter-done` will _both_ be applied. This\n * allows you to define different behavior for when appearing is done and\n * when regular entering is done, using selectors like\n * `.fade-enter-done:not(.fade-appear-done)`. For example, you could apply\n * an epic entrance animation when element first appears in the DOM using\n * [Animate.css](https://daneden.github.io/animate.css/). Otherwise you can\n * simply use `fade-enter-done` for defining both cases.\n *\n * Each individual classNames can also be specified independently like:\n *\n * ```js\n * classNames={{\n * appear: 'my-appear',\n * appearActive: 'my-active-appear',\n * appearDone: 'my-done-appear',\n * enter: 'my-enter',\n * enterActive: 'my-active-enter',\n * enterDone: 'my-done-enter',\n * exit: 'my-exit',\n * exitActive: 'my-active-exit',\n * exitDone: 'my-done-exit',\n * }}\n * ```\n *\n * If you want to set these classes using CSS Modules:\n *\n * ```js\n * import styles from './styles.css';\n * ```\n *\n * you might want to use camelCase in your CSS file, that way could simply\n * spread them instead of listing them one by one:\n *\n * ```js\n * classNames={{ ...styles }}\n * ```\n *\n * @type {string | {\n * appear?: string,\n * appearActive?: string,\n * appearDone?: string,\n * enter?: string,\n * enterActive?: string,\n * enterDone?: string,\n * exit?: string,\n * exitActive?: string,\n * exitDone?: string,\n * }}\n */\n classNames: classNamesShape,\n\n /**\n * A `` callback fired immediately after the 'enter' or 'appear' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEnter: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'enter-active' or\n * 'appear-active' class is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntering: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'enter' or\n * 'appear' classes are **removed** and the `done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed.\n *\n * @type Function(node: HtmlElement, isAppearing: bool)\n */\n onEntered: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'exit' class is\n * applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExit: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'exit-active' is applied.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExiting: PropTypes.func,\n\n /**\n * A `` callback fired immediately after the 'exit' classes\n * are **removed** and the `exit-done` class is added to the DOM node.\n *\n * **Note**: when `nodeRef` prop is passed, `node` is not passed\n *\n * @type Function(node: HtmlElement)\n */\n onExited: PropTypes.func\n}) : {};\nexport default CSSTransition;","function _assertThisInitialized(e) {\n if (void 0 === e) throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n return e;\n}\nexport { _assertThisInitialized as default };","import { Children, cloneElement, isValidElement } from 'react';\n/**\n * Given `this.props.children`, return an object mapping key to child.\n *\n * @param {*} children `this.props.children`\n * @return {object} Mapping of key to child\n */\n\nexport function getChildMapping(children, mapFn) {\n var mapper = function mapper(child) {\n return mapFn && isValidElement(child) ? mapFn(child) : child;\n };\n\n var result = Object.create(null);\n if (children) Children.map(children, function (c) {\n return c;\n }).forEach(function (child) {\n // run the map function here instead so that the key is the computed one\n result[child.key] = mapper(child);\n });\n return result;\n}\n/**\n * When you're adding or removing children some may be added or removed in the\n * same render pass. We want to show *both* since we want to simultaneously\n * animate elements in and out. This function takes a previous set of keys\n * and a new set of keys and merges them with its best guess of the correct\n * ordering. In the future we may expose some of the utilities in\n * ReactMultiChild to make this easy, but for now React itself does not\n * directly have this concept of the union of prevChildren and nextChildren\n * so we implement it here.\n *\n * @param {object} prev prev children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @param {object} next next children as returned from\n * `ReactTransitionChildMapping.getChildMapping()`.\n * @return {object} a key set that contains all keys in `prev` and all keys\n * in `next` in a reasonable order.\n */\n\nexport function mergeChildMappings(prev, next) {\n prev = prev || {};\n next = next || {};\n\n function getValueForKey(key) {\n return key in next ? next[key] : prev[key];\n } // For each key of `next`, the list of keys to insert before that key in\n // the combined list\n\n\n var nextKeysPending = Object.create(null);\n var pendingKeys = [];\n\n for (var prevKey in prev) {\n if (prevKey in next) {\n if (pendingKeys.length) {\n nextKeysPending[prevKey] = pendingKeys;\n pendingKeys = [];\n }\n } else {\n pendingKeys.push(prevKey);\n }\n }\n\n var i;\n var childMapping = {};\n\n for (var nextKey in next) {\n if (nextKeysPending[nextKey]) {\n for (i = 0; i < nextKeysPending[nextKey].length; i++) {\n var pendingNextKey = nextKeysPending[nextKey][i];\n childMapping[nextKeysPending[nextKey][i]] = getValueForKey(pendingNextKey);\n }\n }\n\n childMapping[nextKey] = getValueForKey(nextKey);\n } // Finally, add the keys which didn't appear before any key in `next`\n\n\n for (i = 0; i < pendingKeys.length; i++) {\n childMapping[pendingKeys[i]] = getValueForKey(pendingKeys[i]);\n }\n\n return childMapping;\n}\n\nfunction getProp(child, prop, props) {\n return props[prop] != null ? props[prop] : child.props[prop];\n}\n\nexport function getInitialChildMapping(props, onExited) {\n return getChildMapping(props.children, function (child) {\n return cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n appear: getProp(child, 'appear', props),\n enter: getProp(child, 'enter', props),\n exit: getProp(child, 'exit', props)\n });\n });\n}\nexport function getNextChildMapping(nextProps, prevChildMapping, onExited) {\n var nextChildMapping = getChildMapping(nextProps.children);\n var children = mergeChildMappings(prevChildMapping, nextChildMapping);\n Object.keys(children).forEach(function (key) {\n var child = children[key];\n if (!isValidElement(child)) return;\n var hasPrev = (key in prevChildMapping);\n var hasNext = (key in nextChildMapping);\n var prevChild = prevChildMapping[key];\n var isLeaving = isValidElement(prevChild) && !prevChild.props.in; // item is new (entering)\n\n if (hasNext && (!hasPrev || isLeaving)) {\n // console.log('entering', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: true,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n } else if (!hasNext && hasPrev && !isLeaving) {\n // item is old (exiting)\n // console.log('leaving', key)\n children[key] = cloneElement(child, {\n in: false\n });\n } else if (hasNext && hasPrev && isValidElement(prevChild)) {\n // item hasn't changed transition states\n // copy over the last transition props;\n // console.log('unchanged', key)\n children[key] = cloneElement(child, {\n onExited: onExited.bind(null, child),\n in: prevChild.props.in,\n exit: getProp(child, 'exit', nextProps),\n enter: getProp(child, 'enter', nextProps)\n });\n }\n });\n return children;\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _assertThisInitialized from \"@babel/runtime/helpers/esm/assertThisInitialized\";\nimport _inheritsLoose from \"@babel/runtime/helpers/esm/inheritsLoose\";\nimport PropTypes from 'prop-types';\nimport React from 'react';\nimport TransitionGroupContext from './TransitionGroupContext';\nimport { getChildMapping, getInitialChildMapping, getNextChildMapping } from './utils/ChildMapping';\n\nvar values = Object.values || function (obj) {\n return Object.keys(obj).map(function (k) {\n return obj[k];\n });\n};\n\nvar defaultProps = {\n component: 'div',\n childFactory: function childFactory(child) {\n return child;\n }\n};\n/**\n * The `` component manages a set of transition components\n * (`` and ``) in a list. Like with the transition\n * components, `` is a state machine for managing the mounting\n * and unmounting of components over time.\n *\n * Consider the example below. As items are removed or added to the TodoList the\n * `in` prop is toggled automatically by the ``.\n *\n * Note that `` does not define any animation behavior!\n * Exactly _how_ a list item animates is up to the individual transition\n * component. This means you can mix and match animations across different list\n * items.\n */\n\nvar TransitionGroup = /*#__PURE__*/function (_React$Component) {\n _inheritsLoose(TransitionGroup, _React$Component);\n\n function TransitionGroup(props, context) {\n var _this;\n\n _this = _React$Component.call(this, props, context) || this;\n\n var handleExited = _this.handleExited.bind(_assertThisInitialized(_this)); // Initial children should all be entering, dependent on appear\n\n\n _this.state = {\n contextValue: {\n isMounting: true\n },\n handleExited: handleExited,\n firstRender: true\n };\n return _this;\n }\n\n var _proto = TransitionGroup.prototype;\n\n _proto.componentDidMount = function componentDidMount() {\n this.mounted = true;\n this.setState({\n contextValue: {\n isMounting: false\n }\n });\n };\n\n _proto.componentWillUnmount = function componentWillUnmount() {\n this.mounted = false;\n };\n\n TransitionGroup.getDerivedStateFromProps = function getDerivedStateFromProps(nextProps, _ref) {\n var prevChildMapping = _ref.children,\n handleExited = _ref.handleExited,\n firstRender = _ref.firstRender;\n return {\n children: firstRender ? getInitialChildMapping(nextProps, handleExited) : getNextChildMapping(nextProps, prevChildMapping, handleExited),\n firstRender: false\n };\n } // node is `undefined` when user provided `nodeRef` prop\n ;\n\n _proto.handleExited = function handleExited(child, node) {\n var currentChildMapping = getChildMapping(this.props.children);\n if (child.key in currentChildMapping) return;\n\n if (child.props.onExited) {\n child.props.onExited(node);\n }\n\n if (this.mounted) {\n this.setState(function (state) {\n var children = _extends({}, state.children);\n\n delete children[child.key];\n return {\n children: children\n };\n });\n }\n };\n\n _proto.render = function render() {\n var _this$props = this.props,\n Component = _this$props.component,\n childFactory = _this$props.childFactory,\n props = _objectWithoutPropertiesLoose(_this$props, [\"component\", \"childFactory\"]);\n\n var contextValue = this.state.contextValue;\n var children = values(this.state.children).map(childFactory);\n delete props.appear;\n delete props.enter;\n delete props.exit;\n\n if (Component === null) {\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, children);\n }\n\n return /*#__PURE__*/React.createElement(TransitionGroupContext.Provider, {\n value: contextValue\n }, /*#__PURE__*/React.createElement(Component, props, children));\n };\n\n return TransitionGroup;\n}(React.Component);\n\nTransitionGroup.propTypes = process.env.NODE_ENV !== \"production\" ? {\n /**\n * `` renders a `
` by default. You can change this\n * behavior by providing a `component` prop.\n * If you use React v16+ and would like to avoid a wrapping `
` element\n * you can pass in `component={null}`. This is useful if the wrapping div\n * borks your css styles.\n */\n component: PropTypes.any,\n\n /**\n * A set of `` components, that are toggled `in` and out as they\n * leave. the `` will inject specific transition props, so\n * remember to spread them through if you are wrapping the `` as\n * with our `` example.\n *\n * While this component is meant for multiple `Transition` or `CSSTransition`\n * children, sometimes you may want to have a single transition child with\n * content that you want to be transitioned out and in when you change it\n * (e.g. routes, images etc.) In that case you can change the `key` prop of\n * the transition child as you change its content, this will cause\n * `TransitionGroup` to transition the child out and back in.\n */\n children: PropTypes.node,\n\n /**\n * A convenience prop that enables or disables appear animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n appear: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables enter animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n enter: PropTypes.bool,\n\n /**\n * A convenience prop that enables or disables exit animations\n * for all children. Note that specifying this will override any defaults set\n * on individual children Transitions.\n */\n exit: PropTypes.bool,\n\n /**\n * You may need to apply reactive updates to a child as it is exiting.\n * This is generally done by using `cloneElement` however in the case of an exiting\n * child the element has already been removed and not accessible to the consumer.\n *\n * If you do need to update a child as it leaves you can provide a `childFactory`\n * to wrap every child, even the ones that are leaving.\n *\n * @type Function(child: ReactElement) -> ReactElement\n */\n childFactory: PropTypes.func\n} : {};\nTransitionGroup.defaultProps = defaultProps;\nexport default TransitionGroup;","export const reflow = node => node.scrollTop;\nexport function getTransitionProps(props, options) {\n const {\n timeout,\n easing,\n style = {}\n } = props;\n return {\n duration: style.transitionDuration ?? (typeof timeout === 'number' ? timeout : timeout[options.mode] || 0),\n easing: style.transitionTimingFunction ?? (typeof easing === 'object' ? easing[options.mode] : easing),\n delay: style.transitionDelay\n };\n}","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getPaperUtilityClass(slot) {\n return generateUtilityClass('MuiPaper', slot);\n}\nconst paperClasses = generateUtilityClasses('MuiPaper', ['root', 'rounded', 'outlined', 'elevation', 'elevation0', 'elevation1', 'elevation2', 'elevation3', 'elevation4', 'elevation5', 'elevation6', 'elevation7', 'elevation8', 'elevation9', 'elevation10', 'elevation11', 'elevation12', 'elevation13', 'elevation14', 'elevation15', 'elevation16', 'elevation17', 'elevation18', 'elevation19', 'elevation20', 'elevation21', 'elevation22', 'elevation23', 'elevation24']);\nexport default paperClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport integerPropType from '@mui/utils/integerPropType';\nimport chainPropTypes from '@mui/utils/chainPropTypes';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { alpha } from '@mui/system/colorManipulator';\nimport { styled, useTheme } from \"../zero-styled/index.js\";\nimport memoTheme from \"../utils/memoTheme.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport getOverlayAlpha from \"../styles/getOverlayAlpha.js\";\nimport { getPaperUtilityClass } from \"./paperClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n square,\n elevation,\n variant,\n classes\n } = ownerState;\n const slots = {\n root: ['root', variant, !square && 'rounded', variant === 'elevation' && `elevation${elevation}`]\n };\n return composeClasses(slots, getPaperUtilityClass, classes);\n};\nconst PaperRoot = styled('div', {\n name: 'MuiPaper',\n slot: 'Root',\n overridesResolver: (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, styles[ownerState.variant], !ownerState.square && styles.rounded, ownerState.variant === 'elevation' && styles[`elevation${ownerState.elevation}`]];\n }\n})(memoTheme(({\n theme\n}) => ({\n backgroundColor: (theme.vars || theme).palette.background.paper,\n color: (theme.vars || theme).palette.text.primary,\n transition: theme.transitions.create('box-shadow'),\n variants: [{\n props: ({\n ownerState\n }) => !ownerState.square,\n style: {\n borderRadius: theme.shape.borderRadius\n }\n }, {\n props: {\n variant: 'outlined'\n },\n style: {\n border: `1px solid ${(theme.vars || theme).palette.divider}`\n }\n }, {\n props: {\n variant: 'elevation'\n },\n style: {\n boxShadow: 'var(--Paper-shadow)',\n backgroundImage: 'var(--Paper-overlay)'\n }\n }]\n})));\nconst Paper = /*#__PURE__*/React.forwardRef(function Paper(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiPaper'\n });\n const theme = useTheme();\n const {\n className,\n component = 'div',\n elevation = 1,\n square = false,\n variant = 'elevation',\n ...other\n } = props;\n const ownerState = {\n ...props,\n component,\n elevation,\n square,\n variant\n };\n const classes = useUtilityClasses(ownerState);\n if (process.env.NODE_ENV !== 'production') {\n if (theme.shadows[elevation] === undefined) {\n console.error([`MUI: The elevation provided is not available in the theme.`, `Please make sure that \\`theme.shadows[${elevation}]\\` is defined.`].join('\\n'));\n }\n }\n return /*#__PURE__*/_jsx(PaperRoot, {\n as: component,\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref,\n ...other,\n style: {\n ...(variant === 'elevation' && {\n '--Paper-shadow': (theme.vars || theme).shadows[elevation],\n ...(theme.vars && {\n '--Paper-overlay': theme.vars.overlays?.[elevation]\n }),\n ...(!theme.vars && theme.palette.mode === 'dark' && {\n '--Paper-overlay': `linear-gradient(${alpha('#fff', getOverlayAlpha(elevation))}, ${alpha('#fff', getOverlayAlpha(elevation))})`\n })\n }),\n ...other.style\n }\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Paper.propTypes /* remove-proptypes */ = {\n // ┌────────────────────────────── Warning ──────────────────────────────┐\n // │ These PropTypes are generated from the TypeScript type definitions. │\n // │ To update them, edit the d.ts file and run `pnpm proptypes`. │\n // └─────────────────────────────────────────────────────────────────────┘\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * Shadow depth, corresponds to `dp` in the spec.\n * It accepts values between 0 and 24 inclusive.\n * @default 1\n */\n elevation: chainPropTypes(integerPropType, props => {\n const {\n elevation,\n variant\n } = props;\n if (elevation > 0 && variant === 'outlined') {\n return new Error(`MUI: Combining \\`elevation={${elevation}}\\` with \\`variant=\"${variant}\"\\` has no effect. Either use \\`elevation={0}\\` or use a different \\`variant\\`.`);\n }\n return null;\n }),\n /**\n * If `true`, rounded corners are disabled.\n * @default false\n */\n square: PropTypes.bool,\n /**\n * @ignore\n */\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * The variant to use.\n * @default 'elevation'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['elevation', 'outlined']), PropTypes.string])\n} : void 0;\nexport default Paper;","'use client';\n\nimport useForkRef from '@mui/utils/useForkRef';\nimport appendOwnerState from '@mui/utils/appendOwnerState';\nimport resolveComponentProps from '@mui/utils/resolveComponentProps';\nimport mergeSlotProps from '@mui/utils/mergeSlotProps';\n/**\n * An internal function to create a Material UI slot.\n *\n * This is an advanced version of Base UI `useSlotProps` because Material UI allows leaf component to be customized via `component` prop\n * while Base UI does not need to support leaf component customization.\n *\n * @param {string} name: name of the slot\n * @param {object} parameters\n * @returns {[Slot, slotProps]} The slot's React component and the slot's props\n *\n * Note: the returned slot's props\n * - will never contain `component` prop.\n * - might contain `as` prop.\n */\nexport default function useSlot(\n/**\n * The slot's name. All Material UI components should have `root` slot.\n *\n * If the name is `root`, the logic behaves differently from other slots,\n * e.g. the `externalForwardedProps` are spread to `root` slot but not other slots.\n */\nname, parameters) {\n const {\n className,\n elementType: initialElementType,\n ownerState,\n externalForwardedProps,\n internalForwardedProps,\n shouldForwardComponentProp = false,\n ...useSlotPropsParams\n } = parameters;\n const {\n component: rootComponent,\n slots = {\n [name]: undefined\n },\n slotProps = {\n [name]: undefined\n },\n ...other\n } = externalForwardedProps;\n const elementType = slots[name] || initialElementType;\n\n // `slotProps[name]` can be a callback that receives the component's ownerState.\n // `resolvedComponentsProps` is always a plain object.\n const resolvedComponentsProps = resolveComponentProps(slotProps[name], ownerState);\n const {\n props: {\n component: slotComponent,\n ...mergedProps\n },\n internalRef\n } = mergeSlotProps({\n className,\n ...useSlotPropsParams,\n externalForwardedProps: name === 'root' ? other : undefined,\n externalSlotProps: resolvedComponentsProps\n });\n const ref = useForkRef(internalRef, resolvedComponentsProps?.ref, parameters.ref);\n const LeafComponent = name === 'root' ? slotComponent || rootComponent : slotComponent;\n const props = appendOwnerState(elementType, {\n ...(name === 'root' && !rootComponent && !slots[name] && internalForwardedProps),\n ...(name !== 'root' && !slots[name] && internalForwardedProps),\n ...mergedProps,\n ...(LeafComponent && !shouldForwardComponentProp && {\n as: LeafComponent\n }),\n ...(LeafComponent && shouldForwardComponentProp && {\n component: LeafComponent\n }),\n ref\n }, ownerState);\n return [elementType, props];\n}","'use client';\n\nimport * as React from 'react';\nimport useLazyRef from '@mui/utils/useLazyRef';\n/**\n * Lazy initialization container for the Ripple instance. This improves\n * performance by delaying mounting the ripple until it's needed.\n */\nexport class LazyRipple {\n /** React ref to the ripple instance */\n\n /** If the ripple component should be mounted */\n\n /** Promise that resolves when the ripple component is mounted */\n\n /** If the ripple component has been mounted */\n\n /** React state hook setter */\n\n static create() {\n return new LazyRipple();\n }\n static use() {\n /* eslint-disable */\n const ripple = useLazyRef(LazyRipple.create).current;\n const [shouldMount, setShouldMount] = React.useState(false);\n ripple.shouldMount = shouldMount;\n ripple.setShouldMount = setShouldMount;\n React.useEffect(ripple.mountEffect, [shouldMount]);\n /* eslint-enable */\n\n return ripple;\n }\n constructor() {\n this.ref = {\n current: null\n };\n this.mounted = null;\n this.didMount = false;\n this.shouldMount = false;\n this.setShouldMount = null;\n }\n mount() {\n if (!this.mounted) {\n this.mounted = createControlledPromise();\n this.shouldMount = true;\n this.setShouldMount(this.shouldMount);\n }\n return this.mounted;\n }\n mountEffect = () => {\n if (this.shouldMount && !this.didMount) {\n if (this.ref.current !== null) {\n this.didMount = true;\n this.mounted.resolve();\n }\n }\n };\n\n /* Ripple API */\n\n start(...args) {\n this.mount().then(() => this.ref.current?.start(...args));\n }\n stop(...args) {\n this.mount().then(() => this.ref.current?.stop(...args));\n }\n pulsate(...args) {\n this.mount().then(() => this.ref.current?.pulsate(...args));\n }\n}\nexport default function useLazyRipple() {\n return LazyRipple.use();\n}\nfunction createControlledPromise() {\n let resolve;\n let reject;\n const p = new Promise((resolveFn, rejectFn) => {\n resolve = resolveFn;\n reject = rejectFn;\n });\n p.resolve = resolve;\n p.reject = reject;\n return p;\n}","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction Ripple(props) {\n const {\n className,\n classes,\n pulsate = false,\n rippleX,\n rippleY,\n rippleSize,\n in: inProp,\n onExited,\n timeout\n } = props;\n const [leaving, setLeaving] = React.useState(false);\n const rippleClassName = clsx(className, classes.ripple, classes.rippleVisible, pulsate && classes.ripplePulsate);\n const rippleStyles = {\n width: rippleSize,\n height: rippleSize,\n top: -(rippleSize / 2) + rippleY,\n left: -(rippleSize / 2) + rippleX\n };\n const childClassName = clsx(classes.child, leaving && classes.childLeaving, pulsate && classes.childPulsate);\n if (!inProp && !leaving) {\n setLeaving(true);\n }\n React.useEffect(() => {\n if (!inProp && onExited != null) {\n // react-transition-group#onExited\n const timeoutId = setTimeout(onExited, timeout);\n return () => {\n clearTimeout(timeoutId);\n };\n }\n return undefined;\n }, [onExited, inProp, timeout]);\n return /*#__PURE__*/_jsx(\"span\", {\n className: rippleClassName,\n style: rippleStyles,\n children: /*#__PURE__*/_jsx(\"span\", {\n className: childClassName\n })\n });\n}\nprocess.env.NODE_ENV !== \"production\" ? Ripple.propTypes /* remove-proptypes */ = {\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object.isRequired,\n className: PropTypes.string,\n /**\n * @ignore - injected from TransitionGroup\n */\n in: PropTypes.bool,\n /**\n * @ignore - injected from TransitionGroup\n */\n onExited: PropTypes.func,\n /**\n * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.\n */\n pulsate: PropTypes.bool,\n /**\n * Diameter of the ripple.\n */\n rippleSize: PropTypes.number,\n /**\n * Horizontal position of the ripple center.\n */\n rippleX: PropTypes.number,\n /**\n * Vertical position of the ripple center.\n */\n rippleY: PropTypes.number,\n /**\n * exit delay\n */\n timeout: PropTypes.number.isRequired\n} : void 0;\nexport default Ripple;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getTouchRippleUtilityClass(slot) {\n return generateUtilityClass('MuiTouchRipple', slot);\n}\nconst touchRippleClasses = generateUtilityClasses('MuiTouchRipple', ['root', 'ripple', 'rippleVisible', 'ripplePulsate', 'child', 'childLeaving', 'childPulsate']);\nexport default touchRippleClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { TransitionGroup } from 'react-transition-group';\nimport clsx from 'clsx';\nimport useTimeout from '@mui/utils/useTimeout';\nimport { keyframes, styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport Ripple from \"./Ripple.js\";\nimport touchRippleClasses from \"./touchRippleClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst DURATION = 550;\nexport const DELAY_RIPPLE = 80;\nconst enterKeyframe = keyframes`\n 0% {\n transform: scale(0);\n opacity: 0.1;\n }\n\n 100% {\n transform: scale(1);\n opacity: 0.3;\n }\n`;\nconst exitKeyframe = keyframes`\n 0% {\n opacity: 1;\n }\n\n 100% {\n opacity: 0;\n }\n`;\nconst pulsateKeyframe = keyframes`\n 0% {\n transform: scale(1);\n }\n\n 50% {\n transform: scale(0.92);\n }\n\n 100% {\n transform: scale(1);\n }\n`;\nexport const TouchRippleRoot = styled('span', {\n name: 'MuiTouchRipple',\n slot: 'Root'\n})({\n overflow: 'hidden',\n pointerEvents: 'none',\n position: 'absolute',\n zIndex: 0,\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: 'inherit'\n});\n\n// This `styled()` function invokes keyframes. `styled-components` only supports keyframes\n// in string templates. Do not convert these styles in JS object as it will break.\nexport const TouchRippleRipple = styled(Ripple, {\n name: 'MuiTouchRipple',\n slot: 'Ripple'\n})`\n opacity: 0;\n position: absolute;\n\n &.${touchRippleClasses.rippleVisible} {\n opacity: 0.3;\n transform: scale(1);\n animation-name: ${enterKeyframe};\n animation-duration: ${DURATION}ms;\n animation-timing-function: ${({\n theme\n}) => theme.transitions.easing.easeInOut};\n }\n\n &.${touchRippleClasses.ripplePulsate} {\n animation-duration: ${({\n theme\n}) => theme.transitions.duration.shorter}ms;\n }\n\n & .${touchRippleClasses.child} {\n opacity: 1;\n display: block;\n width: 100%;\n height: 100%;\n border-radius: 50%;\n background-color: currentColor;\n }\n\n & .${touchRippleClasses.childLeaving} {\n opacity: 0;\n animation-name: ${exitKeyframe};\n animation-duration: ${DURATION}ms;\n animation-timing-function: ${({\n theme\n}) => theme.transitions.easing.easeInOut};\n }\n\n & .${touchRippleClasses.childPulsate} {\n position: absolute;\n /* @noflip */\n left: 0px;\n top: 0;\n animation-name: ${pulsateKeyframe};\n animation-duration: 2500ms;\n animation-timing-function: ${({\n theme\n}) => theme.transitions.easing.easeInOut};\n animation-iteration-count: infinite;\n animation-delay: 200ms;\n }\n`;\n\n/**\n * @ignore - internal component.\n *\n * TODO v5: Make private\n */\nconst TouchRipple = /*#__PURE__*/React.forwardRef(function TouchRipple(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiTouchRipple'\n });\n const {\n center: centerProp = false,\n classes = {},\n className,\n ...other\n } = props;\n const [ripples, setRipples] = React.useState([]);\n const nextKey = React.useRef(0);\n const rippleCallback = React.useRef(null);\n React.useEffect(() => {\n if (rippleCallback.current) {\n rippleCallback.current();\n rippleCallback.current = null;\n }\n }, [ripples]);\n\n // Used to filter out mouse emulated events on mobile.\n const ignoringMouseDown = React.useRef(false);\n // We use a timer in order to only show the ripples for touch \"click\" like events.\n // We don't want to display the ripple for touch scroll events.\n const startTimer = useTimeout();\n\n // This is the hook called once the previous timeout is ready.\n const startTimerCommit = React.useRef(null);\n const container = React.useRef(null);\n const startCommit = React.useCallback(params => {\n const {\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n } = params;\n setRipples(oldRipples => [...oldRipples, /*#__PURE__*/_jsx(TouchRippleRipple, {\n classes: {\n ripple: clsx(classes.ripple, touchRippleClasses.ripple),\n rippleVisible: clsx(classes.rippleVisible, touchRippleClasses.rippleVisible),\n ripplePulsate: clsx(classes.ripplePulsate, touchRippleClasses.ripplePulsate),\n child: clsx(classes.child, touchRippleClasses.child),\n childLeaving: clsx(classes.childLeaving, touchRippleClasses.childLeaving),\n childPulsate: clsx(classes.childPulsate, touchRippleClasses.childPulsate)\n },\n timeout: DURATION,\n pulsate: pulsate,\n rippleX: rippleX,\n rippleY: rippleY,\n rippleSize: rippleSize\n }, nextKey.current)]);\n nextKey.current += 1;\n rippleCallback.current = cb;\n }, [classes]);\n const start = React.useCallback((event = {}, options = {}, cb = () => {}) => {\n const {\n pulsate = false,\n center = centerProp || options.pulsate,\n fakeElement = false // For test purposes\n } = options;\n if (event?.type === 'mousedown' && ignoringMouseDown.current) {\n ignoringMouseDown.current = false;\n return;\n }\n if (event?.type === 'touchstart') {\n ignoringMouseDown.current = true;\n }\n const element = fakeElement ? null : container.current;\n const rect = element ? element.getBoundingClientRect() : {\n width: 0,\n height: 0,\n left: 0,\n top: 0\n };\n\n // Get the size of the ripple\n let rippleX;\n let rippleY;\n let rippleSize;\n if (center || event === undefined || event.clientX === 0 && event.clientY === 0 || !event.clientX && !event.touches) {\n rippleX = Math.round(rect.width / 2);\n rippleY = Math.round(rect.height / 2);\n } else {\n const {\n clientX,\n clientY\n } = event.touches && event.touches.length > 0 ? event.touches[0] : event;\n rippleX = Math.round(clientX - rect.left);\n rippleY = Math.round(clientY - rect.top);\n }\n if (center) {\n rippleSize = Math.sqrt((2 * rect.width ** 2 + rect.height ** 2) / 3);\n\n // For some reason the animation is broken on Mobile Chrome if the size is even.\n if (rippleSize % 2 === 0) {\n rippleSize += 1;\n }\n } else {\n const sizeX = Math.max(Math.abs((element ? element.clientWidth : 0) - rippleX), rippleX) * 2 + 2;\n const sizeY = Math.max(Math.abs((element ? element.clientHeight : 0) - rippleY), rippleY) * 2 + 2;\n rippleSize = Math.sqrt(sizeX ** 2 + sizeY ** 2);\n }\n\n // Touche devices\n if (event?.touches) {\n // check that this isn't another touchstart due to multitouch\n // otherwise we will only clear a single timer when unmounting while two\n // are running\n if (startTimerCommit.current === null) {\n // Prepare the ripple effect.\n startTimerCommit.current = () => {\n startCommit({\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n });\n };\n // Delay the execution of the ripple effect.\n // We have to make a tradeoff with this delay value.\n startTimer.start(DELAY_RIPPLE, () => {\n if (startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n }\n });\n }\n } else {\n startCommit({\n pulsate,\n rippleX,\n rippleY,\n rippleSize,\n cb\n });\n }\n }, [centerProp, startCommit, startTimer]);\n const pulsate = React.useCallback(() => {\n start({}, {\n pulsate: true\n });\n }, [start]);\n const stop = React.useCallback((event, cb) => {\n startTimer.clear();\n\n // The touch interaction occurs too quickly.\n // We still want to show ripple effect.\n if (event?.type === 'touchend' && startTimerCommit.current) {\n startTimerCommit.current();\n startTimerCommit.current = null;\n startTimer.start(0, () => {\n stop(event, cb);\n });\n return;\n }\n startTimerCommit.current = null;\n setRipples(oldRipples => {\n if (oldRipples.length > 0) {\n return oldRipples.slice(1);\n }\n return oldRipples;\n });\n rippleCallback.current = cb;\n }, [startTimer]);\n React.useImperativeHandle(ref, () => ({\n pulsate,\n start,\n stop\n }), [pulsate, start, stop]);\n return /*#__PURE__*/_jsx(TouchRippleRoot, {\n className: clsx(touchRippleClasses.root, classes.root, className),\n ref: container,\n ...other,\n children: /*#__PURE__*/_jsx(TransitionGroup, {\n component: null,\n exit: true,\n children: ripples\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? TouchRipple.propTypes /* remove-proptypes */ = {\n /**\n * If `true`, the ripple starts at the center of the component\n * rather than at the point of interaction.\n */\n center: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * @ignore\n */\n className: PropTypes.string\n} : void 0;\nexport default TouchRipple;","import generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nexport function getButtonBaseUtilityClass(slot) {\n return generateUtilityClass('MuiButtonBase', slot);\n}\nconst buttonBaseClasses = generateUtilityClasses('MuiButtonBase', ['root', 'disabled', 'focusVisible']);\nexport default buttonBaseClasses;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport refType from '@mui/utils/refType';\nimport elementTypeAcceptingRef from '@mui/utils/elementTypeAcceptingRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport isFocusVisible from '@mui/utils/isFocusVisible';\nimport { styled } from \"../zero-styled/index.js\";\nimport { useDefaultProps } from \"../DefaultPropsProvider/index.js\";\nimport useForkRef from \"../utils/useForkRef.js\";\nimport useEventCallback from \"../utils/useEventCallback.js\";\nimport useLazyRipple from \"../useLazyRipple/index.js\";\nimport TouchRipple from \"./TouchRipple.js\";\nimport buttonBaseClasses, { getButtonBaseUtilityClass } from \"./buttonBaseClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n focusVisible,\n focusVisibleClassName,\n classes\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', focusVisible && 'focusVisible']\n };\n const composedClasses = composeClasses(slots, getButtonBaseUtilityClass, classes);\n if (focusVisible && focusVisibleClassName) {\n composedClasses.root += ` ${focusVisibleClassName}`;\n }\n return composedClasses;\n};\nexport const ButtonBaseRoot = styled('button', {\n name: 'MuiButtonBase',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n position: 'relative',\n boxSizing: 'border-box',\n WebkitTapHighlightColor: 'transparent',\n backgroundColor: 'transparent',\n // Reset default value\n // We disable the focus ring for mouse, touch and keyboard users.\n outline: 0,\n border: 0,\n margin: 0,\n // Remove the margin in Safari\n borderRadius: 0,\n padding: 0,\n // Remove the padding in Firefox\n cursor: 'pointer',\n userSelect: 'none',\n verticalAlign: 'middle',\n MozAppearance: 'none',\n // Reset\n WebkitAppearance: 'none',\n // Reset\n textDecoration: 'none',\n // So we take precedent over the style of a native element.\n color: 'inherit',\n '&::-moz-focus-inner': {\n borderStyle: 'none' // Remove Firefox dotted outline.\n },\n [`&.${buttonBaseClasses.disabled}`]: {\n pointerEvents: 'none',\n // Disable link interactions\n cursor: 'default'\n },\n '@media print': {\n colorAdjust: 'exact'\n }\n});\n\n/**\n * `ButtonBase` contains as few styles as possible.\n * It aims to be a simple building block for creating a button.\n * It contains a load of style reset and some focus/ripple logic.\n */\nconst ButtonBase = /*#__PURE__*/React.forwardRef(function ButtonBase(inProps, ref) {\n const props = useDefaultProps({\n props: inProps,\n name: 'MuiButtonBase'\n });\n const {\n action,\n centerRipple = false,\n children,\n className,\n component = 'button',\n disabled = false,\n disableRipple = false,\n disableTouchRipple = false,\n focusRipple = false,\n focusVisibleClassName,\n LinkComponent = 'a',\n onBlur,\n onClick,\n onContextMenu,\n onDragLeave,\n onFocus,\n onFocusVisible,\n onKeyDown,\n onKeyUp,\n onMouseDown,\n onMouseLeave,\n onMouseUp,\n onTouchEnd,\n onTouchMove,\n onTouchStart,\n tabIndex = 0,\n TouchRippleProps,\n touchRippleRef,\n type,\n ...other\n } = props;\n const buttonRef = React.useRef(null);\n const ripple = useLazyRipple();\n const handleRippleRef = useForkRef(ripple.ref, touchRippleRef);\n const [focusVisible, setFocusVisible] = React.useState(false);\n if (disabled && focusVisible) {\n setFocusVisible(false);\n }\n React.useImperativeHandle(action, () => ({\n focusVisible: () => {\n setFocusVisible(true);\n buttonRef.current.focus();\n }\n }), []);\n const enableTouchRipple = ripple.shouldMount && !disableRipple && !disabled;\n React.useEffect(() => {\n if (focusVisible && focusRipple && !disableRipple) {\n ripple.pulsate();\n }\n }, [disableRipple, focusRipple, focusVisible, ripple]);\n const handleMouseDown = useRippleHandler(ripple, 'start', onMouseDown, disableTouchRipple);\n const handleContextMenu = useRippleHandler(ripple, 'stop', onContextMenu, disableTouchRipple);\n const handleDragLeave = useRippleHandler(ripple, 'stop', onDragLeave, disableTouchRipple);\n const handleMouseUp = useRippleHandler(ripple, 'stop', onMouseUp, disableTouchRipple);\n const handleMouseLeave = useRippleHandler(ripple, 'stop', event => {\n if (focusVisible) {\n event.preventDefault();\n }\n if (onMouseLeave) {\n onMouseLeave(event);\n }\n }, disableTouchRipple);\n const handleTouchStart = useRippleHandler(ripple, 'start', onTouchStart, disableTouchRipple);\n const handleTouchEnd = useRippleHandler(ripple, 'stop', onTouchEnd, disableTouchRipple);\n const handleTouchMove = useRippleHandler(ripple, 'stop', onTouchMove, disableTouchRipple);\n const handleBlur = useRippleHandler(ripple, 'stop', event => {\n if (!isFocusVisible(event.target)) {\n setFocusVisible(false);\n }\n if (onBlur) {\n onBlur(event);\n }\n }, false);\n const handleFocus = useEventCallback(event => {\n // Fix for https://github.com/facebook/react/issues/7769\n if (!buttonRef.current) {\n buttonRef.current = event.currentTarget;\n }\n if (isFocusVisible(event.target)) {\n setFocusVisible(true);\n if (onFocusVisible) {\n onFocusVisible(event);\n }\n }\n if (onFocus) {\n onFocus(event);\n }\n });\n const isNonNativeButton = () => {\n const button = buttonRef.current;\n return component && component !== 'button' && !(button.tagName === 'A' && button.href);\n };\n const handleKeyDown = useEventCallback(event => {\n // Check if key is already down to avoid repeats being counted as multiple activations\n if (focusRipple && !event.repeat && focusVisible && event.key === ' ') {\n ripple.stop(event, () => {\n ripple.start(event);\n });\n }\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === ' ') {\n event.preventDefault();\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n\n // Keyboard accessibility for non interactive elements\n if (event.target === event.currentTarget && isNonNativeButton() && event.key === 'Enter' && !disabled) {\n event.preventDefault();\n if (onClick) {\n onClick(event);\n }\n }\n });\n const handleKeyUp = useEventCallback(event => {\n // calling preventDefault in keyUp on a
\n
\n {errors.dataProcessing && (\n \n \n {errors.dataProcessing.message}\n \n )}\n
\n
\n \n \n \n
\n
\n
\n {errors.dataConfirm && (\n \n \n {errors.dataConfirm.message}\n \n )}\n
\n\n
\n Zaznaczenie powyższych oświadczeń jest wymagane.\n
\n\n \n {state.value === \"confirmEmail\" ? (\n <>\n
\n
\n
\n (\n {\n field.onChange(event.target.value);\n setErrorCode(false);\n }}\n />\n )}\n name=\"confirmEmailCode\"\n control={control}\n rules={{\n required: \"Kod weryfikacyjny jest wymagany\",\n }}\n />\n
\n
\n\n
\n
\n \n
\n
\n
\n {errors.confirmEmailCode && (\n

\n \n {errors.confirmEmailCode.message}\n

\n )}\n {errorCode && (\n

\n \n Podano błędny kod\n

\n )}\n
\n
\n\n
\n Aby kontynuować należy w polu powyżej wpisać kod weryfikacyjny\n nr {counter} otrzymany na wskazany adres e-mail. Jeśli kod nie\n dotarł należy sprawdzić folder SPAM w skrzynce pocztowej lub\n kliknąć {width <= 350 ? \"Pobierz kod\" : \"Pobierz ponownie kod\"}\n
\n \n ) : null}\n
\n\n
\n
\n
\n {state.value === \"confirmEmail\" ? (\n <>\n {width <= 321 ? (\n <>\n \n Cofnij\n \n \n Pobierz kod\n \n \n ) : (\n <>\n \n Cofnij\n \n \n Pobierz ponownie kod\n \n \n )}\n \n ) : (\n <>\n setStep(0)}\n className=\"backBtn\"\n type=\"submit\"\n >\n Cofnij\n \n \n \n )}\n
\n
\n
\n \n {loading && }\n \n );\n};\n\nexport { Step1Form };\n","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"localeText\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useThemeProps } from '@mui/material/styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const MuiPickersAdapterContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== 'production') {\n MuiPickersAdapterContext.displayName = 'MuiPickersAdapterContext';\n}\n/**\n * Demos:\n *\n * - [Date format and localization](https://mui.com/x/react-date-pickers/adapters-locale/)\n * - [Calendar systems](https://mui.com/x/react-date-pickers/calendar-systems/)\n * - [Translated components](https://mui.com/x/react-date-pickers/localization/)\n * - [UTC and timezones](https://mui.com/x/react-date-pickers/timezone/)\n *\n * API:\n *\n * - [LocalizationProvider API](https://mui.com/x/api/date-pickers/localization-provider/)\n */\nexport const LocalizationProvider = function LocalizationProvider(inProps) {\n const {\n localeText: inLocaleText\n } = inProps,\n otherInProps = _objectWithoutPropertiesLoose(inProps, _excluded);\n const {\n utils: parentUtils,\n localeText: parentLocaleText\n } = React.useContext(MuiPickersAdapterContext) ?? {\n utils: undefined,\n localeText: undefined\n };\n const props = useThemeProps({\n // We don't want to pass the `localeText` prop to the theme, that way it will always return the theme value,\n // We will then merge this theme value with our value manually\n props: otherInProps,\n name: 'MuiLocalizationProvider'\n });\n const {\n children,\n dateAdapter: DateAdapter,\n dateFormats,\n dateLibInstance,\n adapterLocale,\n localeText: themeLocaleText\n } = props;\n const localeText = React.useMemo(() => _extends({}, themeLocaleText, parentLocaleText, inLocaleText), [themeLocaleText, parentLocaleText, inLocaleText]);\n const utils = React.useMemo(() => {\n if (!DateAdapter) {\n if (parentUtils) {\n return parentUtils;\n }\n return null;\n }\n const adapter = new DateAdapter({\n locale: adapterLocale,\n formats: dateFormats,\n instance: dateLibInstance\n });\n if (!adapter.isMUIAdapter) {\n throw new Error(['MUI X: The date adapter should be imported from `@mui/x-date-pickers` or `@mui/x-date-pickers-pro`, not from `@date-io`', \"For example, `import { AdapterDayjs } from '@mui/x-date-pickers/AdapterDayjs'` instead of `import AdapterDayjs from '@date-io/dayjs'`\", 'More information on the installation documentation: https://mui.com/x/react-date-pickers/getting-started/#installation'].join(`\\n`));\n }\n return adapter;\n }, [DateAdapter, adapterLocale, dateFormats, dateLibInstance, parentUtils]);\n const defaultDates = React.useMemo(() => {\n if (!utils) {\n return null;\n }\n return {\n minDate: utils.date('1900-01-01T00:00:00.000'),\n maxDate: utils.date('2099-12-31T00:00:00.000')\n };\n }, [utils]);\n const contextValue = React.useMemo(() => {\n return {\n utils,\n defaultDates,\n localeText\n };\n }, [defaultDates, utils, localeText]);\n return /*#__PURE__*/_jsx(MuiPickersAdapterContext.Provider, {\n value: contextValue,\n children: children\n });\n};\nprocess.env.NODE_ENV !== \"production\" ? LocalizationProvider.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Locale for the date library you are using\n */\n adapterLocale: PropTypes.any,\n children: PropTypes.node,\n /**\n * Date library adapter class function.\n * @see See the localization provider {@link https://mui.com/x/react-date-pickers/getting-started/#setup-your-date-library-adapter date adapter setup section} for more details.\n */\n dateAdapter: PropTypes.func,\n /**\n * Formats that are used for any child pickers\n */\n dateFormats: PropTypes.shape({\n dayOfMonth: PropTypes.string,\n dayOfMonthFull: PropTypes.string,\n fullDate: PropTypes.string,\n fullTime: PropTypes.string,\n fullTime12h: PropTypes.string,\n fullTime24h: PropTypes.string,\n hours12h: PropTypes.string,\n hours24h: PropTypes.string,\n keyboardDate: PropTypes.string,\n keyboardDateTime: PropTypes.string,\n keyboardDateTime12h: PropTypes.string,\n keyboardDateTime24h: PropTypes.string,\n meridiem: PropTypes.string,\n minutes: PropTypes.string,\n month: PropTypes.string,\n monthShort: PropTypes.string,\n normalDate: PropTypes.string,\n normalDateWithWeekday: PropTypes.string,\n seconds: PropTypes.string,\n shortDate: PropTypes.string,\n weekday: PropTypes.string,\n weekdayShort: PropTypes.string,\n year: PropTypes.string\n }),\n /**\n * Date library instance you are using, if it has some global overrides\n * ```jsx\n * dateLibInstance={momentTimeZone}\n * ```\n */\n dateLibInstance: PropTypes.any,\n /**\n * Locale for components texts\n */\n localeText: PropTypes.object\n} : void 0;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nexport const getPickersLocalization = pickersTranslations => {\n return {\n components: {\n MuiLocalizationProvider: {\n defaultProps: {\n localeText: _extends({}, pickersTranslations)\n }\n }\n }\n };\n};\nexport const buildGetOpenDialogAriaText = params => {\n const {\n utils,\n formatKey,\n contextTranslation,\n propsTranslation\n } = params;\n return value => {\n const formattedValue = value !== null && utils.isValid(value) ? utils.format(value, formatKey) : null;\n const translation = propsTranslation ?? contextTranslation;\n return translation(value, utils, formattedValue);\n };\n};","import { getPickersLocalization } from \"./utils/getPickersLocalization.js\";\n\n// This object is not Partial because it is the default values\n\nconst enUSPickers = {\n // Calendar navigation\n previousMonth: 'Previous month',\n nextMonth: 'Next month',\n // View navigation\n openPreviousView: 'Open previous view',\n openNextView: 'Open next view',\n calendarViewSwitchingButtonAriaLabel: view => view === 'year' ? 'year view is open, switch to calendar view' : 'calendar view is open, switch to year view',\n // DateRange labels\n start: 'Start',\n end: 'End',\n startDate: 'Start date',\n startTime: 'Start time',\n endDate: 'End date',\n endTime: 'End time',\n // Action bar\n cancelButtonLabel: 'Cancel',\n clearButtonLabel: 'Clear',\n okButtonLabel: 'OK',\n todayButtonLabel: 'Today',\n // Toolbar titles\n datePickerToolbarTitle: 'Select date',\n dateTimePickerToolbarTitle: 'Select date & time',\n timePickerToolbarTitle: 'Select time',\n dateRangePickerToolbarTitle: 'Select date range',\n // Clock labels\n clockLabelText: (view, time, utils, formattedTime) => `Select ${view}. ${!formattedTime && (time === null || !utils.isValid(time)) ? 'No time selected' : `Selected time is ${formattedTime ?? utils.format(time, 'fullTime')}`}`,\n hoursClockNumberText: hours => `${hours} hours`,\n minutesClockNumberText: minutes => `${minutes} minutes`,\n secondsClockNumberText: seconds => `${seconds} seconds`,\n // Digital clock labels\n selectViewText: view => `Select ${view}`,\n // Calendar labels\n calendarWeekNumberHeaderLabel: 'Week number',\n calendarWeekNumberHeaderText: '#',\n calendarWeekNumberAriaLabelText: weekNumber => `Week ${weekNumber}`,\n calendarWeekNumberText: weekNumber => `${weekNumber}`,\n // Open picker labels\n openDatePickerDialogue: (value, utils, formattedDate) => formattedDate || value !== null && utils.isValid(value) ? `Choose date, selected date is ${formattedDate ?? utils.format(value, 'fullDate')}` : 'Choose date',\n openTimePickerDialogue: (value, utils, formattedTime) => formattedTime || value !== null && utils.isValid(value) ? `Choose time, selected time is ${formattedTime ?? utils.format(value, 'fullTime')}` : 'Choose time',\n fieldClearLabel: 'Clear',\n // Table labels\n timeTableLabel: 'pick time',\n dateTableLabel: 'pick date',\n // Field section placeholders\n fieldYearPlaceholder: params => 'Y'.repeat(params.digitAmount),\n fieldMonthPlaceholder: params => params.contentType === 'letter' ? 'MMMM' : 'MM',\n fieldDayPlaceholder: () => 'DD',\n fieldWeekDayPlaceholder: params => params.contentType === 'letter' ? 'EEEE' : 'EE',\n fieldHoursPlaceholder: () => 'hh',\n fieldMinutesPlaceholder: () => 'mm',\n fieldSecondsPlaceholder: () => 'ss',\n fieldMeridiemPlaceholder: () => 'aa',\n // View names\n year: 'Year',\n month: 'Month',\n day: 'Day',\n weekDay: 'Week day',\n hours: 'Hours',\n minutes: 'Minutes',\n seconds: 'Seconds',\n meridiem: 'Meridiem',\n // Common\n empty: 'Empty'\n};\nexport const DEFAULT_LOCALE = enUSPickers;\nexport const enUS = getPickersLocalization(enUSPickers);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { MuiPickersAdapterContext } from \"../../LocalizationProvider/LocalizationProvider.js\";\nimport { DEFAULT_LOCALE } from \"../../locales/enUS.js\";\nexport const useLocalizationContext = () => {\n const localization = React.useContext(MuiPickersAdapterContext);\n if (localization === null) {\n throw new Error(['MUI X: Can not find the date and time pickers localization context.', 'It looks like you forgot to wrap your component in LocalizationProvider.', 'This can also happen if you are bundling multiple versions of the `@mui/x-date-pickers` package'].join('\\n'));\n }\n if (localization.utils === null) {\n throw new Error(['MUI X: Can not find the date and time pickers adapter from its localization context.', 'It looks like you forgot to pass a `dateAdapter` to your LocalizationProvider.'].join('\\n'));\n }\n const localeText = React.useMemo(() => _extends({}, DEFAULT_LOCALE, localization.localeText), [localization.localeText]);\n return React.useMemo(() => _extends({}, localization, {\n localeText\n }), [localization, localeText]);\n};\nexport const useUtils = () => useLocalizationContext().utils;\nexport const useDefaultDates = () => useLocalizationContext().defaultDates;\nexport const useNow = timezone => {\n const utils = useUtils();\n const now = React.useRef(undefined);\n if (now.current === undefined) {\n now.current = utils.date(undefined, timezone);\n }\n return now.current;\n};","'use client';\n\nimport { useLocalizationContext } from \"../internals/hooks/useUtils.js\";\nexport const usePickersTranslations = () => useLocalizationContext().localeText;","import { createSvgIcon } from '@mui/material/utils';\nimport * as React from 'react';\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const ArrowDropDownIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M7 10l5 5 5-5z\"\n}), 'ArrowDropDown');\n\n/**\n * @ignore - internal component.\n */\nexport const ArrowLeftIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M15.41 16.59L10.83 12l4.58-4.59L14 6l-6 6 6 6 1.41-1.41z\"\n}), 'ArrowLeft');\n\n/**\n * @ignore - internal component.\n */\nexport const ArrowRightIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M8.59 16.59L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.41z\"\n}), 'ArrowRight');\n\n/**\n * @ignore - internal component.\n */\nexport const CalendarIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z\"\n}), 'Calendar');\n\n/**\n * @ignore - internal component.\n */\nexport const ClockIcon = createSvgIcon(/*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"path\", {\n d: \"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"\n }), /*#__PURE__*/_jsx(\"path\", {\n d: \"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z\"\n })]\n}), 'Clock');\n\n/**\n * @ignore - internal component.\n */\nexport const DateRangeIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M9 11H7v2h2v-2zm4 0h-2v2h2v-2zm4 0h-2v2h2v-2zm2-7h-1V2h-2v2H8V2H6v2H5c-1.11 0-1.99.9-1.99 2L3 20c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 16H5V9h14v11z\"\n}), 'DateRange');\n\n/**\n * @ignore - internal component.\n */\nexport const TimeIcon = createSvgIcon(/*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(\"path\", {\n d: \"M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z\"\n }), /*#__PURE__*/_jsx(\"path\", {\n d: \"M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z\"\n })]\n}), 'Time');\n\n/**\n * @ignore - internal component.\n */\nexport const ClearIcon = createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z\"\n}), 'Clear');","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport function getPickersArrowSwitcherUtilityClass(slot) {\n return generateUtilityClass('MuiPickersArrowSwitcher', slot);\n}\nexport const pickersArrowSwitcherClasses = generateUtilityClasses('MuiPickersArrowSwitcher', ['root', 'spacer', 'button', 'previousIconButton', 'nextIconButton', 'leftArrowIcon', 'rightArrowIcon']);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"className\", \"slots\", \"slotProps\", \"isNextDisabled\", \"isNextHidden\", \"onGoToNext\", \"nextLabel\", \"isPreviousDisabled\", \"isPreviousHidden\", \"onGoToPrevious\", \"previousLabel\", \"labelId\"],\n _excluded2 = [\"ownerState\"],\n _excluded3 = [\"ownerState\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport Typography from '@mui/material/Typography';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport IconButton from '@mui/material/IconButton';\nimport { ArrowLeftIcon, ArrowRightIcon } from \"../../../icons/index.js\";\nimport { getPickersArrowSwitcherUtilityClass } from \"./pickersArrowSwitcherClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst PickersArrowSwitcherRoot = styled('div', {\n name: 'MuiPickersArrowSwitcher',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n display: 'flex'\n});\nconst PickersArrowSwitcherSpacer = styled('div', {\n name: 'MuiPickersArrowSwitcher',\n slot: 'Spacer',\n overridesResolver: (props, styles) => styles.spacer\n})(({\n theme\n}) => ({\n width: theme.spacing(3)\n}));\nconst PickersArrowSwitcherButton = styled(IconButton, {\n name: 'MuiPickersArrowSwitcher',\n slot: 'Button',\n overridesResolver: (props, styles) => styles.button\n})({\n variants: [{\n props: {\n hidden: true\n },\n style: {\n visibility: 'hidden'\n }\n }]\n});\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n spacer: ['spacer'],\n button: ['button'],\n previousIconButton: ['previousIconButton'],\n nextIconButton: ['nextIconButton'],\n leftArrowIcon: ['leftArrowIcon'],\n rightArrowIcon: ['rightArrowIcon']\n };\n return composeClasses(slots, getPickersArrowSwitcherUtilityClass, classes);\n};\nexport const PickersArrowSwitcher = /*#__PURE__*/React.forwardRef(function PickersArrowSwitcher(inProps, ref) {\n const isRtl = useRtl();\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersArrowSwitcher'\n });\n const {\n children,\n className,\n slots,\n slotProps,\n isNextDisabled,\n isNextHidden,\n onGoToNext,\n nextLabel,\n isPreviousDisabled,\n isPreviousHidden,\n onGoToPrevious,\n previousLabel,\n labelId\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = props;\n const classes = useUtilityClasses(ownerState);\n const nextProps = {\n isDisabled: isNextDisabled,\n isHidden: isNextHidden,\n goTo: onGoToNext,\n label: nextLabel\n };\n const previousProps = {\n isDisabled: isPreviousDisabled,\n isHidden: isPreviousHidden,\n goTo: onGoToPrevious,\n label: previousLabel\n };\n const PreviousIconButton = slots?.previousIconButton ?? PickersArrowSwitcherButton;\n const previousIconButtonProps = useSlotProps({\n elementType: PreviousIconButton,\n externalSlotProps: slotProps?.previousIconButton,\n additionalProps: {\n size: 'medium',\n title: previousProps.label,\n 'aria-label': previousProps.label,\n disabled: previousProps.isDisabled,\n edge: 'end',\n onClick: previousProps.goTo\n },\n ownerState: _extends({}, ownerState, {\n hidden: previousProps.isHidden\n }),\n className: clsx(classes.button, classes.previousIconButton)\n });\n const NextIconButton = slots?.nextIconButton ?? PickersArrowSwitcherButton;\n const nextIconButtonProps = useSlotProps({\n elementType: NextIconButton,\n externalSlotProps: slotProps?.nextIconButton,\n additionalProps: {\n size: 'medium',\n title: nextProps.label,\n 'aria-label': nextProps.label,\n disabled: nextProps.isDisabled,\n edge: 'start',\n onClick: nextProps.goTo\n },\n ownerState: _extends({}, ownerState, {\n hidden: nextProps.isHidden\n }),\n className: clsx(classes.button, classes.nextIconButton)\n });\n const LeftArrowIcon = slots?.leftArrowIcon ?? ArrowLeftIcon;\n // The spread is here to avoid this bug mui/material-ui#34056\n const _useSlotProps = useSlotProps({\n elementType: LeftArrowIcon,\n externalSlotProps: slotProps?.leftArrowIcon,\n additionalProps: {\n fontSize: 'inherit'\n },\n ownerState,\n className: classes.leftArrowIcon\n }),\n leftArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);\n const RightArrowIcon = slots?.rightArrowIcon ?? ArrowRightIcon;\n // The spread is here to avoid this bug mui/material-ui#34056\n const _useSlotProps2 = useSlotProps({\n elementType: RightArrowIcon,\n externalSlotProps: slotProps?.rightArrowIcon,\n additionalProps: {\n fontSize: 'inherit'\n },\n ownerState,\n className: classes.rightArrowIcon\n }),\n rightArrowIconProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3);\n return /*#__PURE__*/_jsxs(PickersArrowSwitcherRoot, _extends({\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n children: [/*#__PURE__*/_jsx(PreviousIconButton, _extends({}, previousIconButtonProps, {\n children: isRtl ? /*#__PURE__*/_jsx(RightArrowIcon, _extends({}, rightArrowIconProps)) : /*#__PURE__*/_jsx(LeftArrowIcon, _extends({}, leftArrowIconProps))\n })), children ? /*#__PURE__*/_jsx(Typography, {\n variant: \"subtitle1\",\n component: \"span\",\n id: labelId,\n children: children\n }) : /*#__PURE__*/_jsx(PickersArrowSwitcherSpacer, {\n className: classes.spacer,\n ownerState: ownerState\n }), /*#__PURE__*/_jsx(NextIconButton, _extends({}, nextIconButtonProps, {\n children: isRtl ? /*#__PURE__*/_jsx(LeftArrowIcon, _extends({}, leftArrowIconProps)) : /*#__PURE__*/_jsx(RightArrowIcon, _extends({}, rightArrowIconProps))\n }))]\n }));\n});","export const areViewsEqual = (views, expectedViews) => {\n if (views.length !== expectedViews.length) {\n return false;\n }\n return expectedViews.every(expectedView => views.includes(expectedView));\n};\nexport const applyDefaultViewProps = ({\n openTo,\n defaultOpenTo,\n views,\n defaultViews\n}) => {\n const viewsWithDefault = views ?? defaultViews;\n let openToWithDefault;\n if (openTo != null) {\n openToWithDefault = openTo;\n } else if (viewsWithDefault.includes(defaultOpenTo)) {\n openToWithDefault = defaultOpenTo;\n } else if (viewsWithDefault.length > 0) {\n openToWithDefault = viewsWithDefault[0];\n } else {\n throw new Error('MUI X: The `views` prop must contain at least one view.');\n }\n return {\n views: viewsWithDefault,\n openTo: openToWithDefault\n };\n};","import { areViewsEqual } from \"./views.js\";\nconst timeViews = ['hours', 'minutes', 'seconds'];\nexport const isTimeView = view => timeViews.includes(view);\nexport const isInternalTimeView = view => timeViews.includes(view) || view === 'meridiem';\nexport const getMeridiem = (date, utils) => {\n if (!date) {\n return null;\n }\n return utils.getHours(date) >= 12 ? 'pm' : 'am';\n};\nexport const convertValueToMeridiem = (value, meridiem, ampm) => {\n if (ampm) {\n const currentMeridiem = value >= 12 ? 'pm' : 'am';\n if (currentMeridiem !== meridiem) {\n return meridiem === 'am' ? value - 12 : value + 12;\n }\n }\n return value;\n};\nexport const convertToMeridiem = (time, meridiem, ampm, utils) => {\n const newHoursAmount = convertValueToMeridiem(utils.getHours(time), meridiem, ampm);\n return utils.setHours(time, newHoursAmount);\n};\nexport const getSecondsInDay = (date, utils) => {\n return utils.getHours(date) * 3600 + utils.getMinutes(date) * 60 + utils.getSeconds(date);\n};\nexport const createIsAfterIgnoreDatePart = (disableIgnoringDatePartForTimeValidation, utils) => (dateLeft, dateRight) => {\n if (disableIgnoringDatePartForTimeValidation) {\n return utils.isAfter(dateLeft, dateRight);\n }\n return getSecondsInDay(dateLeft, utils) > getSecondsInDay(dateRight, utils);\n};\nexport const resolveTimeFormat = (utils, {\n format,\n views,\n ampm\n}) => {\n if (format != null) {\n return format;\n }\n const formats = utils.formats;\n if (areViewsEqual(views, ['hours'])) {\n return ampm ? `${formats.hours12h} ${formats.meridiem}` : formats.hours24h;\n }\n if (areViewsEqual(views, ['minutes'])) {\n return formats.minutes;\n }\n if (areViewsEqual(views, ['seconds'])) {\n return formats.seconds;\n }\n if (areViewsEqual(views, ['minutes', 'seconds'])) {\n return `${formats.minutes}:${formats.seconds}`;\n }\n if (areViewsEqual(views, ['hours', 'minutes', 'seconds'])) {\n return ampm ? `${formats.hours12h}:${formats.minutes}:${formats.seconds} ${formats.meridiem}` : `${formats.hours24h}:${formats.minutes}:${formats.seconds}`;\n }\n return ampm ? `${formats.hours12h}:${formats.minutes} ${formats.meridiem}` : `${formats.hours24h}:${formats.minutes}`;\n};","import * as React from 'react';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { unstable_useControlled as useControlled } from '@mui/utils';\nlet warnedOnceNotValidView = false;\nexport function useViews({\n onChange,\n onViewChange,\n openTo,\n view: inView,\n views,\n autoFocus,\n focusedView: inFocusedView,\n onFocusedViewChange\n}) {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnceNotValidView) {\n if (inView != null && !views.includes(inView)) {\n console.warn(`MUI X: \\`view=\"${inView}\"\\` is not a valid prop.`, `It must be an element of \\`views=[\"${views.join('\", \"')}\"]\\`.`);\n warnedOnceNotValidView = true;\n }\n if (inView == null && openTo != null && !views.includes(openTo)) {\n console.warn(`MUI X: \\`openTo=\"${openTo}\"\\` is not a valid prop.`, `It must be an element of \\`views=[\"${views.join('\", \"')}\"]\\`.`);\n warnedOnceNotValidView = true;\n }\n }\n }\n const previousOpenTo = React.useRef(openTo);\n const previousViews = React.useRef(views);\n const defaultView = React.useRef(views.includes(openTo) ? openTo : views[0]);\n const [view, setView] = useControlled({\n name: 'useViews',\n state: 'view',\n controlled: inView,\n default: defaultView.current\n });\n const defaultFocusedView = React.useRef(autoFocus ? view : null);\n const [focusedView, setFocusedView] = useControlled({\n name: 'useViews',\n state: 'focusedView',\n controlled: inFocusedView,\n default: defaultFocusedView.current\n });\n React.useEffect(() => {\n // Update the current view when `openTo` or `views` props change\n if (previousOpenTo.current && previousOpenTo.current !== openTo || previousViews.current && previousViews.current.some(previousView => !views.includes(previousView))) {\n setView(views.includes(openTo) ? openTo : views[0]);\n previousViews.current = views;\n previousOpenTo.current = openTo;\n }\n }, [openTo, setView, view, views]);\n const viewIndex = views.indexOf(view);\n const previousView = views[viewIndex - 1] ?? null;\n const nextView = views[viewIndex + 1] ?? null;\n const handleFocusedViewChange = useEventCallback((viewToFocus, hasFocus) => {\n if (hasFocus) {\n // Focus event\n setFocusedView(viewToFocus);\n } else {\n // Blur event\n setFocusedView(prevFocusedView => viewToFocus === prevFocusedView ? null : prevFocusedView // If false the blur is due to view switching\n );\n }\n onFocusedViewChange?.(viewToFocus, hasFocus);\n });\n const handleChangeView = useEventCallback(newView => {\n // always keep the focused view in sync\n handleFocusedViewChange(newView, true);\n if (newView === view) {\n return;\n }\n setView(newView);\n if (onViewChange) {\n onViewChange(newView);\n }\n });\n const goToNextView = useEventCallback(() => {\n if (nextView) {\n handleChangeView(nextView);\n }\n });\n const setValueAndGoToNextView = useEventCallback((value, currentViewSelectionState, selectedView) => {\n const isSelectionFinishedOnCurrentView = currentViewSelectionState === 'finish';\n const hasMoreViews = selectedView ?\n // handles case like `DateTimePicker`, where a view might return a `finish` selection state\n // but when it's not the final view given all `views` -> overall selection state should be `partial`.\n views.indexOf(selectedView) < views.length - 1 : Boolean(nextView);\n const globalSelectionState = isSelectionFinishedOnCurrentView && hasMoreViews ? 'partial' : currentViewSelectionState;\n onChange(value, globalSelectionState, selectedView);\n // Detects if the selected view is not the active one.\n // Can happen if multiple views are displayed, like in `DesktopDateTimePicker` or `MultiSectionDigitalClock`.\n if (selectedView && selectedView !== view) {\n const nextViewAfterSelected = views[views.indexOf(selectedView) + 1];\n if (nextViewAfterSelected) {\n // move to next view after the selected one\n handleChangeView(nextViewAfterSelected);\n }\n } else if (isSelectionFinishedOnCurrentView) {\n goToNextView();\n }\n });\n return {\n view,\n setView: handleChangeView,\n focusedView,\n setFocusedView: handleFocusedViewChange,\n nextView,\n previousView,\n // Always return up-to-date default view instead of the initial one (i.e. defaultView.current)\n defaultView: views.includes(openTo) ? openTo : views[0],\n goToNextView,\n setValueAndGoToNextView\n };\n}","import * as React from 'react';\nimport { useUtils } from \"./useUtils.js\";\nimport { getMeridiem, convertToMeridiem } from \"../utils/time-utils.js\";\nexport function useNextMonthDisabled(month, {\n disableFuture,\n maxDate,\n timezone\n}) {\n const utils = useUtils();\n return React.useMemo(() => {\n const now = utils.date(undefined, timezone);\n const lastEnabledMonth = utils.startOfMonth(disableFuture && utils.isBefore(now, maxDate) ? now : maxDate);\n return !utils.isAfter(lastEnabledMonth, month);\n }, [disableFuture, maxDate, month, utils, timezone]);\n}\nexport function usePreviousMonthDisabled(month, {\n disablePast,\n minDate,\n timezone\n}) {\n const utils = useUtils();\n return React.useMemo(() => {\n const now = utils.date(undefined, timezone);\n const firstEnabledMonth = utils.startOfMonth(disablePast && utils.isAfter(now, minDate) ? now : minDate);\n return !utils.isBefore(firstEnabledMonth, month);\n }, [disablePast, minDate, month, utils, timezone]);\n}\nexport function useMeridiemMode(date, ampm, onChange, selectionState) {\n const utils = useUtils();\n const meridiemMode = getMeridiem(date, utils);\n const handleMeridiemChange = React.useCallback(mode => {\n const timeWithMeridiem = date == null ? null : convertToMeridiem(date, mode, Boolean(ampm), utils);\n onChange(timeWithMeridiem, selectionState ?? 'partial');\n }, [ampm, date, onChange, selectionState, utils]);\n return {\n meridiemMode,\n handleMeridiemChange\n };\n}","export const DAY_SIZE = 36;\nexport const DAY_MARGIN = 2;\nexport const DIALOG_WIDTH = 320;\nexport const MAX_CALENDAR_HEIGHT = 280;\nexport const VIEW_HEIGHT = 336;\nexport const DIGITAL_CLOCK_VIEW_HEIGHT = 232;\nexport const MULTI_SECTION_CLOCK_SECTION_WIDTH = 48;","import { styled } from '@mui/material/styles';\nimport { DIALOG_WIDTH, VIEW_HEIGHT } from \"../../constants/dimensions.js\";\nexport const PickerViewRoot = styled('div')({\n overflow: 'hidden',\n width: DIALOG_WIDTH,\n maxHeight: VIEW_HEIGHT,\n display: 'flex',\n flexDirection: 'column',\n margin: '0 auto'\n});","import { areViewsEqual } from \"./views.js\";\nexport const mergeDateAndTime = (utils, dateParam, timeParam) => {\n let mergedDate = dateParam;\n mergedDate = utils.setHours(mergedDate, utils.getHours(timeParam));\n mergedDate = utils.setMinutes(mergedDate, utils.getMinutes(timeParam));\n mergedDate = utils.setSeconds(mergedDate, utils.getSeconds(timeParam));\n mergedDate = utils.setMilliseconds(mergedDate, utils.getMilliseconds(timeParam));\n return mergedDate;\n};\nexport const findClosestEnabledDate = ({\n date,\n disableFuture,\n disablePast,\n maxDate,\n minDate,\n isDateDisabled,\n utils,\n timezone\n}) => {\n const today = mergeDateAndTime(utils, utils.date(undefined, timezone), date);\n if (disablePast && utils.isBefore(minDate, today)) {\n minDate = today;\n }\n if (disableFuture && utils.isAfter(maxDate, today)) {\n maxDate = today;\n }\n let forward = date;\n let backward = date;\n if (utils.isBefore(date, minDate)) {\n forward = minDate;\n backward = null;\n }\n if (utils.isAfter(date, maxDate)) {\n if (backward) {\n backward = maxDate;\n }\n forward = null;\n }\n while (forward || backward) {\n if (forward && utils.isAfter(forward, maxDate)) {\n forward = null;\n }\n if (backward && utils.isBefore(backward, minDate)) {\n backward = null;\n }\n if (forward) {\n if (!isDateDisabled(forward)) {\n return forward;\n }\n forward = utils.addDays(forward, 1);\n }\n if (backward) {\n if (!isDateDisabled(backward)) {\n return backward;\n }\n backward = utils.addDays(backward, -1);\n }\n }\n return null;\n};\nexport const replaceInvalidDateByNull = (utils, value) => value == null || !utils.isValid(value) ? null : value;\nexport const applyDefaultDate = (utils, value, defaultValue) => {\n if (value == null || !utils.isValid(value)) {\n return defaultValue;\n }\n return value;\n};\nexport const areDatesEqual = (utils, a, b) => {\n if (!utils.isValid(a) && a != null && !utils.isValid(b) && b != null) {\n return true;\n }\n return utils.isEqual(a, b);\n};\nexport const getMonthsInYear = (utils, year) => {\n const firstMonth = utils.startOfYear(year);\n const months = [firstMonth];\n while (months.length < 12) {\n const prevMonth = months[months.length - 1];\n months.push(utils.addMonths(prevMonth, 1));\n }\n return months;\n};\nexport const getTodayDate = (utils, timezone, valueType) => valueType === 'date' ? utils.startOfDay(utils.date(undefined, timezone)) : utils.date(undefined, timezone);\nexport const formatMeridiem = (utils, meridiem) => {\n const date = utils.setHours(utils.date(), meridiem === 'am' ? 2 : 14);\n return utils.format(date, 'meridiem');\n};\nconst dateViews = ['year', 'month', 'day'];\nexport const isDatePickerView = view => dateViews.includes(view);\nexport const resolveDateFormat = (utils, {\n format,\n views\n}, isInToolbar) => {\n if (format != null) {\n return format;\n }\n const formats = utils.formats;\n if (areViewsEqual(views, ['year'])) {\n return formats.year;\n }\n if (areViewsEqual(views, ['month'])) {\n return formats.month;\n }\n if (areViewsEqual(views, ['day'])) {\n return formats.dayOfMonth;\n }\n if (areViewsEqual(views, ['month', 'year'])) {\n return `${formats.month} ${formats.year}`;\n }\n if (areViewsEqual(views, ['day', 'month'])) {\n return `${formats.month} ${formats.dayOfMonth}`;\n }\n if (isInToolbar) {\n // Little localization hack (Google is doing the same for android native pickers):\n // For english localization it is convenient to include weekday into the date \"Mon, Jun 1\".\n // For other locales using strings like \"June 1\", without weekday.\n return /en/.test(utils.getCurrentLocaleCode()) ? formats.normalDateWithWeekday : formats.normalDate;\n }\n return formats.keyboardDate;\n};\nexport const getWeekdays = (utils, date) => {\n const start = utils.startOfWeek(date);\n return [0, 1, 2, 3, 4, 5, 6].map(diff => utils.addDays(start, diff));\n};","import * as React from 'react';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport useControlled from '@mui/utils/useControlled';\nimport { useUtils } from \"./useUtils.js\";\n/**\n * Hooks making sure that:\n * - The value returned by `onChange` always have the timezone of `props.value` or `props.defaultValue` if defined\n * - The value rendered is always the one from `props.timezone` if defined\n */\nexport const useValueWithTimezone = ({\n timezone: timezoneProp,\n value: valueProp,\n defaultValue,\n referenceDate,\n onChange,\n valueManager\n}) => {\n const utils = useUtils();\n const firstDefaultValue = React.useRef(defaultValue);\n const inputValue = valueProp ?? firstDefaultValue.current ?? valueManager.emptyValue;\n const inputTimezone = React.useMemo(() => valueManager.getTimezone(utils, inputValue), [utils, valueManager, inputValue]);\n const setInputTimezone = useEventCallback(newValue => {\n if (inputTimezone == null) {\n return newValue;\n }\n return valueManager.setTimezone(utils, inputTimezone, newValue);\n });\n let timezoneToRender;\n if (timezoneProp) {\n timezoneToRender = timezoneProp;\n } else if (inputTimezone) {\n timezoneToRender = inputTimezone;\n } else if (referenceDate) {\n timezoneToRender = utils.getTimezone(referenceDate);\n } else {\n timezoneToRender = 'default';\n }\n const valueWithTimezoneToRender = React.useMemo(() => valueManager.setTimezone(utils, timezoneToRender, inputValue), [valueManager, utils, timezoneToRender, inputValue]);\n const handleValueChange = useEventCallback((newValue, ...otherParams) => {\n const newValueWithInputTimezone = setInputTimezone(newValue);\n onChange?.(newValueWithInputTimezone, ...otherParams);\n });\n return {\n value: valueWithTimezoneToRender,\n handleValueChange,\n timezone: timezoneToRender\n };\n};\n\n/**\n * Wrapper around `useControlled` and `useValueWithTimezone`\n */\nexport const useControlledValueWithTimezone = ({\n name,\n timezone: timezoneProp,\n value: valueProp,\n defaultValue,\n referenceDate,\n onChange: onChangeProp,\n valueManager\n}) => {\n const [valueWithInputTimezone, setValue] = useControlled({\n name,\n state: 'value',\n controlled: valueProp,\n default: defaultValue ?? valueManager.emptyValue\n });\n const onChange = useEventCallback((newValue, ...otherParams) => {\n setValue(newValue);\n onChangeProp?.(newValue, ...otherParams);\n });\n return useValueWithTimezone({\n timezone: timezoneProp,\n value: valueWithInputTimezone,\n defaultValue: undefined,\n referenceDate,\n onChange,\n valueManager\n });\n};","import { createIsAfterIgnoreDatePart } from \"./time-utils.js\";\nimport { mergeDateAndTime, getTodayDate } from \"./date-utils.js\";\nexport const SECTION_TYPE_GRANULARITY = {\n year: 1,\n month: 2,\n day: 3,\n hours: 4,\n minutes: 5,\n seconds: 6,\n milliseconds: 7\n};\nexport const getSectionTypeGranularity = sections => Math.max(...sections.map(section => SECTION_TYPE_GRANULARITY[section.type] ?? 1));\nconst roundDate = (utils, granularity, date) => {\n if (granularity === SECTION_TYPE_GRANULARITY.year) {\n return utils.startOfYear(date);\n }\n if (granularity === SECTION_TYPE_GRANULARITY.month) {\n return utils.startOfMonth(date);\n }\n if (granularity === SECTION_TYPE_GRANULARITY.day) {\n return utils.startOfDay(date);\n }\n\n // We don't have startOfHour / startOfMinute / startOfSecond\n let roundedDate = date;\n if (granularity < SECTION_TYPE_GRANULARITY.minutes) {\n roundedDate = utils.setMinutes(roundedDate, 0);\n }\n if (granularity < SECTION_TYPE_GRANULARITY.seconds) {\n roundedDate = utils.setSeconds(roundedDate, 0);\n }\n if (granularity < SECTION_TYPE_GRANULARITY.milliseconds) {\n roundedDate = utils.setMilliseconds(roundedDate, 0);\n }\n return roundedDate;\n};\nexport const getDefaultReferenceDate = ({\n props,\n utils,\n granularity,\n timezone,\n getTodayDate: inGetTodayDate\n}) => {\n let referenceDate = inGetTodayDate ? inGetTodayDate() : roundDate(utils, granularity, getTodayDate(utils, timezone));\n if (props.minDate != null && utils.isAfterDay(props.minDate, referenceDate)) {\n referenceDate = roundDate(utils, granularity, props.minDate);\n }\n if (props.maxDate != null && utils.isBeforeDay(props.maxDate, referenceDate)) {\n referenceDate = roundDate(utils, granularity, props.maxDate);\n }\n const isAfter = createIsAfterIgnoreDatePart(props.disableIgnoringDatePartForTimeValidation ?? false, utils);\n if (props.minTime != null && isAfter(props.minTime, referenceDate)) {\n referenceDate = roundDate(utils, granularity, props.disableIgnoringDatePartForTimeValidation ? props.minTime : mergeDateAndTime(utils, referenceDate, props.minTime));\n }\n if (props.maxTime != null && isAfter(referenceDate, props.maxTime)) {\n referenceDate = roundDate(utils, granularity, props.disableIgnoringDatePartForTimeValidation ? props.maxTime : mergeDateAndTime(utils, referenceDate, props.maxTime));\n }\n return referenceDate;\n};","import { getMonthsInYear } from \"../../utils/date-utils.js\";\nexport const getDateSectionConfigFromFormatToken = (utils, formatToken) => {\n const config = utils.formatTokenMap[formatToken];\n if (config == null) {\n throw new Error([`MUI X: The token \"${formatToken}\" is not supported by the Date and Time Pickers.`, 'Please try using another token or open an issue on https://github.com/mui/mui-x/issues/new/choose if you think it should be supported.'].join('\\n'));\n }\n if (typeof config === 'string') {\n return {\n type: config,\n contentType: config === 'meridiem' ? 'letter' : 'digit',\n maxLength: undefined\n };\n }\n return {\n type: config.sectionType,\n contentType: config.contentType,\n maxLength: config.maxLength\n };\n};\nconst getDeltaFromKeyCode = keyCode => {\n switch (keyCode) {\n case 'ArrowUp':\n return 1;\n case 'ArrowDown':\n return -1;\n case 'PageUp':\n return 5;\n case 'PageDown':\n return -5;\n default:\n return 0;\n }\n};\nexport const getDaysInWeekStr = (utils, format) => {\n const elements = [];\n const now = utils.date(undefined, 'default');\n const startDate = utils.startOfWeek(now);\n const endDate = utils.endOfWeek(now);\n let current = startDate;\n while (utils.isBefore(current, endDate)) {\n elements.push(current);\n current = utils.addDays(current, 1);\n }\n return elements.map(weekDay => utils.formatByString(weekDay, format));\n};\nexport const getLetterEditingOptions = (utils, timezone, sectionType, format) => {\n switch (sectionType) {\n case 'month':\n {\n return getMonthsInYear(utils, utils.date(undefined, timezone)).map(month => utils.formatByString(month, format));\n }\n case 'weekDay':\n {\n return getDaysInWeekStr(utils, format);\n }\n case 'meridiem':\n {\n const now = utils.date(undefined, timezone);\n return [utils.startOfDay(now), utils.endOfDay(now)].map(date => utils.formatByString(date, format));\n }\n default:\n {\n return [];\n }\n }\n};\n\n// This format should be the same on all the adapters\n// If some adapter does not respect this convention, then we will need to hardcode the format on each adapter.\nexport const FORMAT_SECONDS_NO_LEADING_ZEROS = 's';\nconst NON_LOCALIZED_DIGITS = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'];\nexport const getLocalizedDigits = utils => {\n const today = utils.date(undefined);\n const formattedZero = utils.formatByString(utils.setSeconds(today, 0), FORMAT_SECONDS_NO_LEADING_ZEROS);\n if (formattedZero === '0') {\n return NON_LOCALIZED_DIGITS;\n }\n return Array.from({\n length: 10\n }).map((_, index) => utils.formatByString(utils.setSeconds(today, index), FORMAT_SECONDS_NO_LEADING_ZEROS));\n};\nexport const removeLocalizedDigits = (valueStr, localizedDigits) => {\n if (localizedDigits[0] === '0') {\n return valueStr;\n }\n const digits = [];\n let currentFormattedDigit = '';\n for (let i = 0; i < valueStr.length; i += 1) {\n currentFormattedDigit += valueStr[i];\n const matchingDigitIndex = localizedDigits.indexOf(currentFormattedDigit);\n if (matchingDigitIndex > -1) {\n digits.push(matchingDigitIndex.toString());\n currentFormattedDigit = '';\n }\n }\n return digits.join('');\n};\nexport const applyLocalizedDigits = (valueStr, localizedDigits) => {\n if (localizedDigits[0] === '0') {\n return valueStr;\n }\n return valueStr.split('').map(char => localizedDigits[Number(char)]).join('');\n};\nexport const isStringNumber = (valueStr, localizedDigits) => {\n const nonLocalizedValueStr = removeLocalizedDigits(valueStr, localizedDigits);\n // `Number(' ')` returns `0` even if ' ' is not a valid number.\n return nonLocalizedValueStr !== ' ' && !Number.isNaN(Number(nonLocalizedValueStr));\n};\n\n/**\n * Remove the leading zeroes to a digit section value.\n * E.g.: `03` => `3`\n * Warning: Should only be called with non-localized digits. Call `removeLocalizedDigits` with your value if needed.\n */\nexport const cleanLeadingZeros = (valueStr, size) => {\n let cleanValueStr = valueStr;\n\n // Remove the leading zeros\n cleanValueStr = Number(cleanValueStr).toString();\n\n // Add enough leading zeros to fill the section\n while (cleanValueStr.length < size) {\n cleanValueStr = `0${cleanValueStr}`;\n }\n return cleanValueStr;\n};\nexport const cleanDigitSectionValue = (utils, value, sectionBoundaries, localizedDigits, section) => {\n if (process.env.NODE_ENV !== 'production') {\n if (section.type !== 'day' && section.contentType === 'digit-with-letter') {\n throw new Error([`MUI X: The token \"${section.format}\" is a digit format with letter in it.'\n This type of format is only supported for 'day' sections`].join('\\n'));\n }\n }\n if (section.type === 'day' && section.contentType === 'digit-with-letter') {\n const date = utils.setDate(sectionBoundaries.longestMonth, value);\n return utils.formatByString(date, section.format);\n }\n\n // queryValue without leading `0` (`01` => `1`)\n let valueStr = value.toString();\n if (section.hasLeadingZerosInInput) {\n valueStr = cleanLeadingZeros(valueStr, section.maxLength);\n }\n return applyLocalizedDigits(valueStr, localizedDigits);\n};\nexport const adjustSectionValue = (utils, timezone, section, keyCode, sectionsValueBoundaries, localizedDigits, activeDate, stepsAttributes) => {\n const delta = getDeltaFromKeyCode(keyCode);\n const isStart = keyCode === 'Home';\n const isEnd = keyCode === 'End';\n const shouldSetAbsolute = section.value === '' || isStart || isEnd;\n const adjustDigitSection = () => {\n const sectionBoundaries = sectionsValueBoundaries[section.type]({\n currentDate: activeDate,\n format: section.format,\n contentType: section.contentType\n });\n const getCleanValue = value => cleanDigitSectionValue(utils, value, sectionBoundaries, localizedDigits, section);\n const step = section.type === 'minutes' && stepsAttributes?.minutesStep ? stepsAttributes.minutesStep : 1;\n const currentSectionValue = parseInt(removeLocalizedDigits(section.value, localizedDigits), 10);\n let newSectionValueNumber = currentSectionValue + delta * step;\n if (shouldSetAbsolute) {\n if (section.type === 'year' && !isEnd && !isStart) {\n return utils.formatByString(utils.date(undefined, timezone), section.format);\n }\n if (delta > 0 || isStart) {\n newSectionValueNumber = sectionBoundaries.minimum;\n } else {\n newSectionValueNumber = sectionBoundaries.maximum;\n }\n }\n if (newSectionValueNumber % step !== 0) {\n if (delta < 0 || isStart) {\n newSectionValueNumber += step - (step + newSectionValueNumber) % step; // for JS -3 % 5 = -3 (should be 2)\n }\n if (delta > 0 || isEnd) {\n newSectionValueNumber -= newSectionValueNumber % step;\n }\n }\n if (newSectionValueNumber > sectionBoundaries.maximum) {\n return getCleanValue(sectionBoundaries.minimum + (newSectionValueNumber - sectionBoundaries.maximum - 1) % (sectionBoundaries.maximum - sectionBoundaries.minimum + 1));\n }\n if (newSectionValueNumber < sectionBoundaries.minimum) {\n return getCleanValue(sectionBoundaries.maximum - (sectionBoundaries.minimum - newSectionValueNumber - 1) % (sectionBoundaries.maximum - sectionBoundaries.minimum + 1));\n }\n return getCleanValue(newSectionValueNumber);\n };\n const adjustLetterSection = () => {\n const options = getLetterEditingOptions(utils, timezone, section.type, section.format);\n if (options.length === 0) {\n return section.value;\n }\n if (shouldSetAbsolute) {\n if (delta > 0 || isStart) {\n return options[0];\n }\n return options[options.length - 1];\n }\n const currentOptionIndex = options.indexOf(section.value);\n const newOptionIndex = (currentOptionIndex + delta) % options.length;\n const clampedIndex = (newOptionIndex + options.length) % options.length;\n return options[clampedIndex];\n };\n if (section.contentType === 'digit' || section.contentType === 'digit-with-letter') {\n return adjustDigitSection();\n }\n return adjustLetterSection();\n};\nexport const getSectionVisibleValue = (section, target, localizedDigits) => {\n let value = section.value || section.placeholder;\n const hasLeadingZeros = target === 'non-input' ? section.hasLeadingZerosInFormat : section.hasLeadingZerosInInput;\n if (target === 'non-input' && section.hasLeadingZerosInInput && !section.hasLeadingZerosInFormat) {\n value = Number(removeLocalizedDigits(value, localizedDigits)).toString();\n }\n\n // In the input, we add an empty character at the end of each section without leading zeros.\n // This makes sure that `onChange` will always be fired.\n // Otherwise, when your input value equals `1/dd/yyyy` (format `M/DD/YYYY` on DayJs),\n // If you press `1`, on the first section, the new value is also `1/dd/yyyy`,\n // So the browser will not fire the input `onChange`.\n const shouldAddInvisibleSpace = ['input-rtl', 'input-ltr'].includes(target) && section.contentType === 'digit' && !hasLeadingZeros && value.length === 1;\n if (shouldAddInvisibleSpace) {\n value = `${value}\\u200e`;\n }\n if (target === 'input-rtl') {\n value = `\\u2068${value}\\u2069`;\n }\n return value;\n};\nexport const changeSectionValueFormat = (utils, valueStr, currentFormat, newFormat) => {\n if (process.env.NODE_ENV !== 'production') {\n if (getDateSectionConfigFromFormatToken(utils, currentFormat).type === 'weekDay') {\n throw new Error(\"changeSectionValueFormat doesn't support week day formats\");\n }\n }\n return utils.formatByString(utils.parse(valueStr, currentFormat), newFormat);\n};\nconst isFourDigitYearFormat = (utils, format) => utils.formatByString(utils.date(undefined, 'system'), format).length === 4;\nexport const doesSectionFormatHaveLeadingZeros = (utils, contentType, sectionType, format) => {\n if (contentType !== 'digit') {\n return false;\n }\n const now = utils.date(undefined, 'default');\n switch (sectionType) {\n // We can't use `changeSectionValueFormat`, because `utils.parse('1', 'YYYY')` returns `1971` instead of `1`.\n case 'year':\n {\n if (isFourDigitYearFormat(utils, format)) {\n const formatted0001 = utils.formatByString(utils.setYear(now, 1), format);\n return formatted0001 === '0001';\n }\n const formatted2001 = utils.formatByString(utils.setYear(now, 2001), format);\n return formatted2001 === '01';\n }\n case 'month':\n {\n return utils.formatByString(utils.startOfYear(now), format).length > 1;\n }\n case 'day':\n {\n return utils.formatByString(utils.startOfMonth(now), format).length > 1;\n }\n case 'weekDay':\n {\n return utils.formatByString(utils.startOfWeek(now), format).length > 1;\n }\n case 'hours':\n {\n return utils.formatByString(utils.setHours(now, 1), format).length > 1;\n }\n case 'minutes':\n {\n return utils.formatByString(utils.setMinutes(now, 1), format).length > 1;\n }\n case 'seconds':\n {\n return utils.formatByString(utils.setSeconds(now, 1), format).length > 1;\n }\n default:\n {\n throw new Error('Invalid section type');\n }\n }\n};\n\n/**\n * Some date libraries like `dayjs` don't support parsing from date with escaped characters.\n * To make sure that the parsing works, we are building a format and a date without any separator.\n */\nexport const getDateFromDateSections = (utils, sections, localizedDigits) => {\n // If we have both a day and a weekDay section,\n // Then we skip the weekDay in the parsing because libraries like dayjs can't parse complicated formats containing a weekDay.\n // dayjs(dayjs().format('dddd MMMM D YYYY'), 'dddd MMMM D YYYY')) // returns `Invalid Date` even if the format is valid.\n const shouldSkipWeekDays = sections.some(section => section.type === 'day');\n const sectionFormats = [];\n const sectionValues = [];\n for (let i = 0; i < sections.length; i += 1) {\n const section = sections[i];\n const shouldSkip = shouldSkipWeekDays && section.type === 'weekDay';\n if (!shouldSkip) {\n sectionFormats.push(section.format);\n sectionValues.push(getSectionVisibleValue(section, 'non-input', localizedDigits));\n }\n }\n const formatWithoutSeparator = sectionFormats.join(' ');\n const dateWithoutSeparatorStr = sectionValues.join(' ');\n return utils.parse(dateWithoutSeparatorStr, formatWithoutSeparator);\n};\nexport const createDateStrForV7HiddenInputFromSections = sections => sections.map(section => {\n return `${section.startSeparator}${section.value || section.placeholder}${section.endSeparator}`;\n}).join('');\nexport const createDateStrForV6InputFromSections = (sections, localizedDigits, isRtl) => {\n const formattedSections = sections.map(section => {\n const dateValue = getSectionVisibleValue(section, isRtl ? 'input-rtl' : 'input-ltr', localizedDigits);\n return `${section.startSeparator}${dateValue}${section.endSeparator}`;\n });\n const dateStr = formattedSections.join('');\n if (!isRtl) {\n return dateStr;\n }\n\n // \\u2066: start left-to-right isolation\n // \\u2067: start right-to-left isolation\n // \\u2068: start first strong character isolation\n // \\u2069: pop isolation\n // wrap into an isolated group such that separators can split the string in smaller ones by adding \\u2069\\u2068\n return `\\u2066${dateStr}\\u2069`;\n};\nexport const getSectionsBoundaries = (utils, localizedDigits, timezone) => {\n const today = utils.date(undefined, timezone);\n const endOfYear = utils.endOfYear(today);\n const endOfDay = utils.endOfDay(today);\n const {\n maxDaysInMonth,\n longestMonth\n } = getMonthsInYear(utils, today).reduce((acc, month) => {\n const daysInMonth = utils.getDaysInMonth(month);\n if (daysInMonth > acc.maxDaysInMonth) {\n return {\n maxDaysInMonth: daysInMonth,\n longestMonth: month\n };\n }\n return acc;\n }, {\n maxDaysInMonth: 0,\n longestMonth: null\n });\n return {\n year: ({\n format\n }) => ({\n minimum: 0,\n maximum: isFourDigitYearFormat(utils, format) ? 9999 : 99\n }),\n month: () => ({\n minimum: 1,\n // Assumption: All years have the same amount of months\n maximum: utils.getMonth(endOfYear) + 1\n }),\n day: ({\n currentDate\n }) => ({\n minimum: 1,\n maximum: currentDate != null && utils.isValid(currentDate) ? utils.getDaysInMonth(currentDate) : maxDaysInMonth,\n longestMonth: longestMonth\n }),\n weekDay: ({\n format,\n contentType\n }) => {\n if (contentType === 'digit') {\n const daysInWeek = getDaysInWeekStr(utils, format).map(Number);\n return {\n minimum: Math.min(...daysInWeek),\n maximum: Math.max(...daysInWeek)\n };\n }\n return {\n minimum: 1,\n maximum: 7\n };\n },\n hours: ({\n format\n }) => {\n const lastHourInDay = utils.getHours(endOfDay);\n const hasMeridiem = removeLocalizedDigits(utils.formatByString(utils.endOfDay(today), format), localizedDigits) !== lastHourInDay.toString();\n if (hasMeridiem) {\n return {\n minimum: 1,\n maximum: Number(removeLocalizedDigits(utils.formatByString(utils.startOfDay(today), format), localizedDigits))\n };\n }\n return {\n minimum: 0,\n maximum: lastHourInDay\n };\n },\n minutes: () => ({\n minimum: 0,\n // Assumption: All years have the same amount of minutes\n maximum: utils.getMinutes(endOfDay)\n }),\n seconds: () => ({\n minimum: 0,\n // Assumption: All years have the same amount of seconds\n maximum: utils.getSeconds(endOfDay)\n }),\n meridiem: () => ({\n minimum: 0,\n maximum: 1\n }),\n empty: () => ({\n minimum: 0,\n maximum: 0\n })\n };\n};\nlet warnedOnceInvalidSection = false;\nexport const validateSections = (sections, valueType) => {\n if (process.env.NODE_ENV !== 'production') {\n if (!warnedOnceInvalidSection) {\n const supportedSections = ['empty'];\n if (['date', 'date-time'].includes(valueType)) {\n supportedSections.push('weekDay', 'day', 'month', 'year');\n }\n if (['time', 'date-time'].includes(valueType)) {\n supportedSections.push('hours', 'minutes', 'seconds', 'meridiem');\n }\n const invalidSection = sections.find(section => !supportedSections.includes(section.type));\n if (invalidSection) {\n console.warn(`MUI X: The field component you are using is not compatible with the \"${invalidSection.type}\" date section.`, `The supported date sections are [\"${supportedSections.join('\", \"')}\"]\\`.`);\n warnedOnceInvalidSection = true;\n }\n }\n }\n};\nconst transferDateSectionValue = (utils, section, dateToTransferFrom, dateToTransferTo) => {\n switch (section.type) {\n case 'year':\n {\n return utils.setYear(dateToTransferTo, utils.getYear(dateToTransferFrom));\n }\n case 'month':\n {\n return utils.setMonth(dateToTransferTo, utils.getMonth(dateToTransferFrom));\n }\n case 'weekDay':\n {\n const formattedDaysInWeek = getDaysInWeekStr(utils, section.format);\n const dayInWeekStrOfActiveDate = utils.formatByString(dateToTransferFrom, section.format);\n const dayInWeekOfActiveDate = formattedDaysInWeek.indexOf(dayInWeekStrOfActiveDate);\n const dayInWeekOfNewSectionValue = formattedDaysInWeek.indexOf(section.value);\n const diff = dayInWeekOfNewSectionValue - dayInWeekOfActiveDate;\n return utils.addDays(dateToTransferFrom, diff);\n }\n case 'day':\n {\n return utils.setDate(dateToTransferTo, utils.getDate(dateToTransferFrom));\n }\n case 'meridiem':\n {\n const isAM = utils.getHours(dateToTransferFrom) < 12;\n const mergedDateHours = utils.getHours(dateToTransferTo);\n if (isAM && mergedDateHours >= 12) {\n return utils.addHours(dateToTransferTo, -12);\n }\n if (!isAM && mergedDateHours < 12) {\n return utils.addHours(dateToTransferTo, 12);\n }\n return dateToTransferTo;\n }\n case 'hours':\n {\n return utils.setHours(dateToTransferTo, utils.getHours(dateToTransferFrom));\n }\n case 'minutes':\n {\n return utils.setMinutes(dateToTransferTo, utils.getMinutes(dateToTransferFrom));\n }\n case 'seconds':\n {\n return utils.setSeconds(dateToTransferTo, utils.getSeconds(dateToTransferFrom));\n }\n default:\n {\n return dateToTransferTo;\n }\n }\n};\nconst reliableSectionModificationOrder = {\n year: 1,\n month: 2,\n day: 3,\n weekDay: 4,\n hours: 5,\n minutes: 6,\n seconds: 7,\n meridiem: 8,\n empty: 9\n};\nexport const mergeDateIntoReferenceDate = (utils, dateToTransferFrom, sections, referenceDate, shouldLimitToEditedSections) =>\n// cloning sections before sort to avoid mutating it\n[...sections].sort((a, b) => reliableSectionModificationOrder[a.type] - reliableSectionModificationOrder[b.type]).reduce((mergedDate, section) => {\n if (!shouldLimitToEditedSections || section.modified) {\n return transferDateSectionValue(utils, section, dateToTransferFrom, mergedDate);\n }\n return mergedDate;\n}, referenceDate);\nexport const isAndroid = () => navigator.userAgent.toLowerCase().includes('android');\n\n// TODO v8: Remove if we drop the v6 TextField approach.\nexport const getSectionOrder = (sections, shouldApplyRTL) => {\n const neighbors = {};\n if (!shouldApplyRTL) {\n sections.forEach((_, index) => {\n const leftIndex = index === 0 ? null : index - 1;\n const rightIndex = index === sections.length - 1 ? null : index + 1;\n neighbors[index] = {\n leftIndex,\n rightIndex\n };\n });\n return {\n neighbors,\n startIndex: 0,\n endIndex: sections.length - 1\n };\n }\n const rtl2ltr = {};\n const ltr2rtl = {};\n let groupedSectionsStart = 0;\n let groupedSectionsEnd = 0;\n let RTLIndex = sections.length - 1;\n while (RTLIndex >= 0) {\n groupedSectionsEnd = sections.findIndex(\n // eslint-disable-next-line @typescript-eslint/no-loop-func\n (section, index) => index >= groupedSectionsStart && section.endSeparator?.includes(' ') &&\n // Special case where the spaces were not there in the initial input\n section.endSeparator !== ' / ');\n if (groupedSectionsEnd === -1) {\n groupedSectionsEnd = sections.length - 1;\n }\n for (let i = groupedSectionsEnd; i >= groupedSectionsStart; i -= 1) {\n ltr2rtl[i] = RTLIndex;\n rtl2ltr[RTLIndex] = i;\n RTLIndex -= 1;\n }\n groupedSectionsStart = groupedSectionsEnd + 1;\n }\n sections.forEach((_, index) => {\n const rtlIndex = ltr2rtl[index];\n const leftIndex = rtlIndex === 0 ? null : rtl2ltr[rtlIndex - 1];\n const rightIndex = rtlIndex === sections.length - 1 ? null : rtl2ltr[rtlIndex + 1];\n neighbors[index] = {\n leftIndex,\n rightIndex\n };\n });\n return {\n neighbors,\n startIndex: rtl2ltr[0],\n endIndex: rtl2ltr[sections.length - 1]\n };\n};\nexport const parseSelectedSections = (selectedSections, sections) => {\n if (selectedSections == null) {\n return null;\n }\n if (selectedSections === 'all') {\n return 'all';\n }\n if (typeof selectedSections === 'string') {\n const index = sections.findIndex(section => section.type === selectedSections);\n return index === -1 ? null : index;\n }\n return selectedSections;\n};\nexport const getSectionValueText = (section, utils) => {\n if (!section.value) {\n return undefined;\n }\n switch (section.type) {\n case 'month':\n {\n if (section.contentType === 'digit') {\n return utils.format(utils.setMonth(utils.date(), Number(section.value) - 1), 'month');\n }\n const parsedDate = utils.parse(section.value, section.format);\n return parsedDate ? utils.format(parsedDate, 'month') : undefined;\n }\n case 'day':\n return section.contentType === 'digit' ? utils.format(utils.setDate(utils.startOfYear(utils.date()), Number(section.value)), 'dayOfMonthFull') : section.value;\n case 'weekDay':\n // TODO: improve by providing the label of the week day\n return undefined;\n default:\n return undefined;\n }\n};\nexport const getSectionValueNow = (section, utils) => {\n if (!section.value) {\n return undefined;\n }\n switch (section.type) {\n case 'weekDay':\n {\n if (section.contentType === 'letter') {\n // TODO: improve by resolving the week day number from a letter week day\n return undefined;\n }\n return Number(section.value);\n }\n case 'meridiem':\n {\n const parsedDate = utils.parse(`01:00 ${section.value}`, `${utils.formats.hours12h}:${utils.formats.minutes} ${section.format}`);\n if (parsedDate) {\n return utils.getHours(parsedDate) >= 12 ? 1 : 0;\n }\n return undefined;\n }\n case 'day':\n return section.contentType === 'digit-with-letter' ? parseInt(section.value, 10) : Number(section.value);\n case 'month':\n {\n if (section.contentType === 'digit') {\n return Number(section.value);\n }\n const parsedDate = utils.parse(section.value, section.format);\n return parsedDate ? utils.getMonth(parsedDate) + 1 : undefined;\n }\n default:\n return section.contentType !== 'letter' ? Number(section.value) : undefined;\n }\n};","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"value\", \"referenceDate\"];\nimport { areDatesEqual, getTodayDate, replaceInvalidDateByNull } from \"./date-utils.js\";\nimport { getDefaultReferenceDate } from \"./getDefaultReferenceDate.js\";\nimport { createDateStrForV7HiddenInputFromSections, createDateStrForV6InputFromSections } from \"../hooks/useField/useField.utils.js\";\nexport const singleItemValueManager = {\n emptyValue: null,\n getTodayValue: getTodayDate,\n getInitialReferenceValue: _ref => {\n let {\n value,\n referenceDate\n } = _ref,\n params = _objectWithoutPropertiesLoose(_ref, _excluded);\n if (value != null && params.utils.isValid(value)) {\n return value;\n }\n if (referenceDate != null) {\n return referenceDate;\n }\n return getDefaultReferenceDate(params);\n },\n cleanValue: replaceInvalidDateByNull,\n areValuesEqual: areDatesEqual,\n isSameError: (a, b) => a === b,\n hasError: error => error != null,\n defaultErrorState: null,\n getTimezone: (utils, value) => value == null || !utils.isValid(value) ? null : utils.getTimezone(value),\n setTimezone: (utils, timezone, value) => value == null ? null : utils.setTimezone(value, timezone)\n};\nexport const singleItemFieldValueManager = {\n updateReferenceValue: (utils, value, prevReferenceValue) => value == null || !utils.isValid(value) ? prevReferenceValue : value,\n getSectionsFromValue: (utils, date, prevSections, getSectionsFromDate) => {\n const shouldReUsePrevDateSections = !utils.isValid(date) && !!prevSections;\n if (shouldReUsePrevDateSections) {\n return prevSections;\n }\n return getSectionsFromDate(date);\n },\n getV7HiddenInputValueFromSections: createDateStrForV7HiddenInputFromSections,\n getV6InputValueFromSections: createDateStrForV6InputFromSections,\n getActiveDateManager: (utils, state) => ({\n date: state.value,\n referenceDate: state.referenceValue,\n getSections: sections => sections,\n getNewValuesFromNewActiveDate: newActiveDate => ({\n value: newActiveDate,\n referenceValue: newActiveDate == null || !utils.isValid(newActiveDate) ? state.referenceValue : newActiveDate\n })\n }),\n parseValueStr: (valueStr, referenceValue, parseDate) => parseDate(valueStr.trim(), referenceValue)\n};","/* Use it instead of .includes method for IE support */\nexport function arrayIncludes(array, itemOrItems) {\n if (Array.isArray(itemOrItems)) {\n return itemOrItems.every(item => array.indexOf(item) !== -1);\n }\n return array.indexOf(itemOrItems) !== -1;\n}\nexport const onSpaceOrEnter = (innerFn, externalEvent) => event => {\n if (event.key === 'Enter' || event.key === ' ') {\n innerFn(event);\n\n // prevent any side effects\n event.preventDefault();\n event.stopPropagation();\n }\n if (externalEvent) {\n externalEvent(event);\n }\n};\nexport const executeInTheNextEventLoopTick = fn => {\n setTimeout(fn, 0);\n};\n\n// https://www.abeautifulsite.net/posts/finding-the-active-element-in-a-shadow-root/\nexport const getActiveElement = (root = document) => {\n const activeEl = root.activeElement;\n if (!activeEl) {\n return null;\n }\n if (activeEl.shadowRoot) {\n return getActiveElement(activeEl.shadowRoot);\n }\n return activeEl;\n};\n\n/**\n * Gets the index of the focused list item in a given ul list element.\n *\n * @param {HTMLUListElement} listElement - The list element to search within.\n * @returns {number} The index of the focused list item, or -1 if none is focused.\n */\nexport const getFocusedListItemIndex = listElement => {\n const children = Array.from(listElement.children);\n return children.indexOf(getActiveElement(document));\n};\nexport const DEFAULT_DESKTOP_MODE_MEDIA_QUERY = '@media (pointer: fine)';","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport function getPickersDayUtilityClass(slot) {\n return generateUtilityClass('MuiPickersDay', slot);\n}\nexport const pickersDayClasses = generateUtilityClasses('MuiPickersDay', ['root', 'dayWithMargin', 'dayOutsideMonth', 'hiddenDaySpacingFiller', 'today', 'selected', 'disabled']);","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"autoFocus\", \"className\", \"day\", \"disabled\", \"disableHighlightToday\", \"disableMargin\", \"hidden\", \"isAnimating\", \"onClick\", \"onDaySelect\", \"onFocus\", \"onBlur\", \"onKeyDown\", \"onMouseDown\", \"onMouseEnter\", \"outsideCurrentMonth\", \"selected\", \"showDaysOutsideCurrentMonth\", \"children\", \"today\", \"isFirstVisibleCell\", \"isLastVisibleCell\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport ButtonBase from '@mui/material/ButtonBase';\nimport { unstable_useEnhancedEffect as useEnhancedEffect, unstable_composeClasses as composeClasses, unstable_useForkRef as useForkRef } from '@mui/utils';\nimport { alpha, styled, useThemeProps } from '@mui/material/styles';\nimport { useUtils } from \"../internals/hooks/useUtils.js\";\nimport { DAY_SIZE, DAY_MARGIN } from \"../internals/constants/dimensions.js\";\nimport { getPickersDayUtilityClass, pickersDayClasses } from \"./pickersDayClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n selected,\n disableMargin,\n disableHighlightToday,\n today,\n disabled,\n outsideCurrentMonth,\n showDaysOutsideCurrentMonth,\n classes\n } = ownerState;\n const isHiddenDaySpacingFiller = outsideCurrentMonth && !showDaysOutsideCurrentMonth;\n const slots = {\n root: ['root', selected && !isHiddenDaySpacingFiller && 'selected', disabled && 'disabled', !disableMargin && 'dayWithMargin', !disableHighlightToday && today && 'today', outsideCurrentMonth && showDaysOutsideCurrentMonth && 'dayOutsideMonth', isHiddenDaySpacingFiller && 'hiddenDaySpacingFiller'],\n hiddenDaySpacingFiller: ['hiddenDaySpacingFiller']\n };\n return composeClasses(slots, getPickersDayUtilityClass, classes);\n};\nconst styleArg = ({\n theme\n}) => _extends({}, theme.typography.caption, {\n width: DAY_SIZE,\n height: DAY_SIZE,\n borderRadius: '50%',\n padding: 0,\n // explicitly setting to `transparent` to avoid potentially getting impacted by change from the overridden component\n backgroundColor: 'transparent',\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.short\n }),\n color: (theme.vars || theme).palette.text.primary,\n '@media (pointer: fine)': {\n '&:hover': {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.hoverOpacity)\n }\n },\n '&:focus': {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette.primary.mainChannel} / ${theme.vars.palette.action.focusOpacity})` : alpha(theme.palette.primary.main, theme.palette.action.focusOpacity),\n [`&.${pickersDayClasses.selected}`]: {\n willChange: 'background-color',\n backgroundColor: (theme.vars || theme).palette.primary.dark\n }\n },\n [`&.${pickersDayClasses.selected}`]: {\n color: (theme.vars || theme).palette.primary.contrastText,\n backgroundColor: (theme.vars || theme).palette.primary.main,\n fontWeight: theme.typography.fontWeightMedium,\n '&:hover': {\n willChange: 'background-color',\n backgroundColor: (theme.vars || theme).palette.primary.dark\n }\n },\n [`&.${pickersDayClasses.disabled}:not(.${pickersDayClasses.selected})`]: {\n color: (theme.vars || theme).palette.text.disabled\n },\n [`&.${pickersDayClasses.disabled}&.${pickersDayClasses.selected}`]: {\n opacity: 0.6\n },\n variants: [{\n props: {\n disableMargin: false\n },\n style: {\n margin: `0 ${DAY_MARGIN}px`\n }\n }, {\n props: {\n outsideCurrentMonth: true,\n showDaysOutsideCurrentMonth: true\n },\n style: {\n color: (theme.vars || theme).palette.text.secondary\n }\n }, {\n props: {\n disableHighlightToday: false,\n today: true\n },\n style: {\n [`&:not(.${pickersDayClasses.selected})`]: {\n border: `1px solid ${(theme.vars || theme).palette.text.secondary}`\n }\n }\n }]\n});\nconst overridesResolver = (props, styles) => {\n const {\n ownerState\n } = props;\n return [styles.root, !ownerState.disableMargin && styles.dayWithMargin, !ownerState.disableHighlightToday && ownerState.today && styles.today, !ownerState.outsideCurrentMonth && ownerState.showDaysOutsideCurrentMonth && styles.dayOutsideMonth, ownerState.outsideCurrentMonth && !ownerState.showDaysOutsideCurrentMonth && styles.hiddenDaySpacingFiller];\n};\nconst PickersDayRoot = styled(ButtonBase, {\n name: 'MuiPickersDay',\n slot: 'Root',\n overridesResolver\n})(styleArg);\nconst PickersDayFiller = styled('div', {\n name: 'MuiPickersDay',\n slot: 'Root',\n overridesResolver\n})(({\n theme\n}) => _extends({}, styleArg({\n theme\n}), {\n // visibility: 'hidden' does not work here as it hides the element from screen readers as well\n opacity: 0,\n pointerEvents: 'none'\n}));\nconst noop = () => {};\nconst PickersDayRaw = /*#__PURE__*/React.forwardRef(function PickersDay(inProps, forwardedRef) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersDay'\n });\n const {\n autoFocus = false,\n className,\n day,\n disabled = false,\n disableHighlightToday = false,\n disableMargin = false,\n isAnimating,\n onClick,\n onDaySelect,\n onFocus = noop,\n onBlur = noop,\n onKeyDown = noop,\n onMouseDown = noop,\n onMouseEnter = noop,\n outsideCurrentMonth,\n selected = false,\n showDaysOutsideCurrentMonth = false,\n children,\n today: isToday = false\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = _extends({}, props, {\n autoFocus,\n disabled,\n disableHighlightToday,\n disableMargin,\n selected,\n showDaysOutsideCurrentMonth,\n today: isToday\n });\n const classes = useUtilityClasses(ownerState);\n const utils = useUtils();\n const ref = React.useRef(null);\n const handleRef = useForkRef(ref, forwardedRef);\n\n // Since this is rendered when a Popper is opened we can't use passive effects.\n // Focusing in passive effects in Popper causes scroll jump.\n useEnhancedEffect(() => {\n if (autoFocus && !disabled && !isAnimating && !outsideCurrentMonth) {\n // ref.current being null would be a bug in MUI\n ref.current.focus();\n }\n }, [autoFocus, disabled, isAnimating, outsideCurrentMonth]);\n\n // For a day outside the current month, move the focus from mouseDown to mouseUp\n // Goal: have the onClick ends before sliding to the new month\n const handleMouseDown = event => {\n onMouseDown(event);\n if (outsideCurrentMonth) {\n event.preventDefault();\n }\n };\n const handleClick = event => {\n if (!disabled) {\n onDaySelect(day);\n }\n if (outsideCurrentMonth) {\n event.currentTarget.focus();\n }\n if (onClick) {\n onClick(event);\n }\n };\n if (outsideCurrentMonth && !showDaysOutsideCurrentMonth) {\n return /*#__PURE__*/_jsx(PickersDayFiller, {\n className: clsx(classes.root, classes.hiddenDaySpacingFiller, className),\n ownerState: ownerState,\n role: other.role\n });\n }\n return /*#__PURE__*/_jsx(PickersDayRoot, _extends({\n className: clsx(classes.root, className),\n ref: handleRef,\n centerRipple: true,\n disabled: disabled,\n tabIndex: selected ? 0 : -1,\n onKeyDown: event => onKeyDown(event, day),\n onFocus: event => onFocus(event, day),\n onBlur: event => onBlur(event, day),\n onMouseEnter: event => onMouseEnter(event, day),\n onClick: handleClick,\n onMouseDown: handleMouseDown\n }, other, {\n ownerState: ownerState,\n children: !children ? utils.format(day, 'dayOfMonth') : children\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? PickersDayRaw.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * A ref for imperative actions.\n * It currently only supports `focusVisible()` action.\n */\n action: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.shape({\n focusVisible: PropTypes.func.isRequired\n })\n })]),\n /**\n * If `true`, the ripples are centered.\n * They won't start at the cursor interaction position.\n * @default false\n */\n centerRipple: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n className: PropTypes.string,\n component: PropTypes.elementType,\n /**\n * The date to show.\n */\n day: PropTypes.object.isRequired,\n /**\n * If `true`, renders as disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n /**\n * If `true`, days are rendering without margin. Useful for displaying linked range of days.\n * @default false\n */\n disableMargin: PropTypes.bool,\n /**\n * If `true`, the ripple effect is disabled.\n *\n * ⚠️ Without a ripple there is no styling for :focus-visible by default. Be sure\n * to highlight the element by applying separate styles with the `.Mui-focusVisible` class.\n * @default false\n */\n disableRipple: PropTypes.bool,\n /**\n * If `true`, the touch ripple effect is disabled.\n * @default false\n */\n disableTouchRipple: PropTypes.bool,\n /**\n * If `true`, the base button will have a keyboard focus ripple.\n * @default false\n */\n focusRipple: PropTypes.bool,\n /**\n * This prop can help identify which element has keyboard focus.\n * The class name will be applied when the element gains the focus through keyboard interaction.\n * It's a polyfill for the [CSS :focus-visible selector](https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo).\n * The rationale for using this feature [is explained here](https://github.com/WICG/focus-visible/blob/HEAD/explainer.md).\n * A [polyfill can be used](https://github.com/WICG/focus-visible) to apply a `focus-visible` class to other components\n * if needed.\n */\n focusVisibleClassName: PropTypes.string,\n isAnimating: PropTypes.bool,\n /**\n * If `true`, day is the first visible cell of the month.\n * Either the first day of the month or the first day of the week depending on `showDaysOutsideCurrentMonth`.\n */\n isFirstVisibleCell: PropTypes.bool.isRequired,\n /**\n * If `true`, day is the last visible cell of the month.\n * Either the last day of the month or the last day of the week depending on `showDaysOutsideCurrentMonth`.\n */\n isLastVisibleCell: PropTypes.bool.isRequired,\n onBlur: PropTypes.func,\n onDaySelect: PropTypes.func.isRequired,\n onFocus: PropTypes.func,\n /**\n * Callback fired when the component is focused with a keyboard.\n * We trigger a `onFocus` callback too.\n */\n onFocusVisible: PropTypes.func,\n onKeyDown: PropTypes.func,\n onMouseEnter: PropTypes.func,\n /**\n * If `true`, day is outside of month and will be hidden.\n */\n outsideCurrentMonth: PropTypes.bool.isRequired,\n /**\n * If `true`, renders as selected.\n * @default false\n */\n selected: PropTypes.bool,\n /**\n * If `true`, days outside the current month are rendered:\n *\n * - if `fixedWeekNumber` is defined, renders days to have the weeks requested.\n *\n * - if `fixedWeekNumber` is not defined, renders day to fill the first and last week of the current month.\n *\n * - ignored if `calendars` equals more than `1` on range pickers.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * @default 0\n */\n tabIndex: PropTypes.number,\n /**\n * If `true`, renders as today date.\n * @default false\n */\n today: PropTypes.bool,\n /**\n * Props applied to the `TouchRipple` element.\n */\n TouchRippleProps: PropTypes.object,\n /**\n * A ref that points to the `TouchRipple` element.\n */\n touchRippleRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.shape({\n pulsate: PropTypes.func.isRequired,\n start: PropTypes.func.isRequired,\n stop: PropTypes.func.isRequired\n })\n })])\n} : void 0;\n\n/**\n * Demos:\n *\n * - [DateCalendar](https://mui.com/x/react-date-pickers/date-calendar/)\n * API:\n *\n * - [PickersDay API](https://mui.com/x/api/date-pickers/pickers-day/)\n */\nexport const PickersDay = /*#__PURE__*/React.memo(PickersDayRaw);","import { applyDefaultDate } from \"../internals/utils/date-utils.js\";\nimport { singleItemValueManager } from \"../internals/utils/valueManagers.js\";\nexport const validateDate = ({\n props,\n value,\n timezone,\n adapter\n}) => {\n if (value === null) {\n return null;\n }\n const {\n shouldDisableDate,\n shouldDisableMonth,\n shouldDisableYear,\n disablePast,\n disableFuture\n } = props;\n const now = adapter.utils.date(undefined, timezone);\n const minDate = applyDefaultDate(adapter.utils, props.minDate, adapter.defaultDates.minDate);\n const maxDate = applyDefaultDate(adapter.utils, props.maxDate, adapter.defaultDates.maxDate);\n switch (true) {\n case !adapter.utils.isValid(value):\n return 'invalidDate';\n case Boolean(shouldDisableDate && shouldDisableDate(value)):\n return 'shouldDisableDate';\n case Boolean(shouldDisableMonth && shouldDisableMonth(value)):\n return 'shouldDisableMonth';\n case Boolean(shouldDisableYear && shouldDisableYear(value)):\n return 'shouldDisableYear';\n case Boolean(disableFuture && adapter.utils.isAfterDay(value, now)):\n return 'disableFuture';\n case Boolean(disablePast && adapter.utils.isBeforeDay(value, now)):\n return 'disablePast';\n case Boolean(minDate && adapter.utils.isBeforeDay(value, minDate)):\n return 'minDate';\n case Boolean(maxDate && adapter.utils.isAfterDay(value, maxDate)):\n return 'maxDate';\n default:\n return null;\n }\n};\nvalidateDate.valueManager = singleItemValueManager;","export const DATE_VALIDATION_PROP_NAMES = ['disablePast', 'disableFuture', 'minDate', 'maxDate', 'shouldDisableDate', 'shouldDisableMonth', 'shouldDisableYear'];\nexport const TIME_VALIDATION_PROP_NAMES = ['disablePast', 'disableFuture', 'minTime', 'maxTime', 'shouldDisableTime', 'minutesStep', 'ampm', 'disableIgnoringDatePartForTimeValidation'];\nexport const DATE_TIME_VALIDATION_PROP_NAMES = ['minDateTime', 'maxDateTime'];\nconst VALIDATION_PROP_NAMES = [...DATE_VALIDATION_PROP_NAMES, ...TIME_VALIDATION_PROP_NAMES, ...DATE_TIME_VALIDATION_PROP_NAMES];\n/**\n * Extract the validation props for the props received by a component.\n * Limit the risk of forgetting some of them and reduce the bundle size.\n */\nexport const extractValidationProps = props => VALIDATION_PROP_NAMES.reduce((extractedProps, propName) => {\n if (props.hasOwnProperty(propName)) {\n extractedProps[propName] = props[propName];\n }\n return extractedProps;\n}, {});","'use client';\n\nimport * as React from 'react';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { useLocalizationContext } from \"../internals/hooks/useUtils.js\";\n/**\n * Utility hook to check if a given value is valid based on the provided validation props.\n * @template TDate\n * @template TValue The value type. It will be either the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.\n * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.\n * @param {UseValidationOptions} options The options to configure the hook.\n * @param {TValue} options.value The value to validate.\n * @param {PickersTimezone} options.timezone The timezone to use for the validation.\n * @param {Validator} options.validator The validator function to use.\n * @param {TValidationProps} options.props The validation props, they differ depending on the component.\n * @param {(error: TError, value: TValue) => void} options.onError Callback fired when the error associated with the current value changes.\n */\nexport function useValidation(options) {\n const {\n props,\n validator,\n value,\n timezone,\n onError\n } = options;\n const adapter = useLocalizationContext();\n const previousValidationErrorRef = React.useRef(validator.valueManager.defaultErrorState);\n const validationError = validator({\n adapter,\n value,\n timezone,\n props\n });\n const hasValidationError = validator.valueManager.hasError(validationError);\n React.useEffect(() => {\n if (onError && !validator.valueManager.isSameError(validationError, previousValidationErrorRef.current)) {\n onError(validationError, value);\n }\n previousValidationErrorRef.current = validationError;\n }, [validator, onError, validationError, value]);\n const getValidationErrorForNewValue = useEventCallback(newValue => {\n return validator({\n adapter,\n value: newValue,\n timezone,\n props\n });\n });\n return {\n validationError,\n hasValidationError,\n getValidationErrorForNewValue\n };\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { applyLocalizedDigits, cleanLeadingZeros, doesSectionFormatHaveLeadingZeros, getDateSectionConfigFromFormatToken, removeLocalizedDigits } from \"./useField.utils.js\";\nconst expandFormat = ({\n utils,\n format\n}) => {\n // Expand the provided format\n let formatExpansionOverflow = 10;\n let prevFormat = format;\n let nextFormat = utils.expandFormat(format);\n while (nextFormat !== prevFormat) {\n prevFormat = nextFormat;\n nextFormat = utils.expandFormat(prevFormat);\n formatExpansionOverflow -= 1;\n if (formatExpansionOverflow < 0) {\n throw new Error('MUI X: The format expansion seems to be in an infinite loop. Please open an issue with the format passed to the picker component.');\n }\n }\n return nextFormat;\n};\nconst getEscapedPartsFromFormat = ({\n utils,\n expandedFormat\n}) => {\n const escapedParts = [];\n const {\n start: startChar,\n end: endChar\n } = utils.escapedCharacters;\n const regExp = new RegExp(`(\\\\${startChar}[^\\\\${endChar}]*\\\\${endChar})+`, 'g');\n let match = null;\n // eslint-disable-next-line no-cond-assign\n while (match = regExp.exec(expandedFormat)) {\n escapedParts.push({\n start: match.index,\n end: regExp.lastIndex - 1\n });\n }\n return escapedParts;\n};\nconst getSectionPlaceholder = (utils, localeText, sectionConfig, sectionFormat) => {\n switch (sectionConfig.type) {\n case 'year':\n {\n return localeText.fieldYearPlaceholder({\n digitAmount: utils.formatByString(utils.date(undefined, 'default'), sectionFormat).length,\n format: sectionFormat\n });\n }\n case 'month':\n {\n return localeText.fieldMonthPlaceholder({\n contentType: sectionConfig.contentType,\n format: sectionFormat\n });\n }\n case 'day':\n {\n return localeText.fieldDayPlaceholder({\n format: sectionFormat\n });\n }\n case 'weekDay':\n {\n return localeText.fieldWeekDayPlaceholder({\n contentType: sectionConfig.contentType,\n format: sectionFormat\n });\n }\n case 'hours':\n {\n return localeText.fieldHoursPlaceholder({\n format: sectionFormat\n });\n }\n case 'minutes':\n {\n return localeText.fieldMinutesPlaceholder({\n format: sectionFormat\n });\n }\n case 'seconds':\n {\n return localeText.fieldSecondsPlaceholder({\n format: sectionFormat\n });\n }\n case 'meridiem':\n {\n return localeText.fieldMeridiemPlaceholder({\n format: sectionFormat\n });\n }\n default:\n {\n return sectionFormat;\n }\n }\n};\nconst createSection = ({\n utils,\n date,\n shouldRespectLeadingZeros,\n localeText,\n localizedDigits,\n now,\n token,\n startSeparator\n}) => {\n if (token === '') {\n throw new Error('MUI X: Should not call `commitToken` with an empty token');\n }\n const sectionConfig = getDateSectionConfigFromFormatToken(utils, token);\n const hasLeadingZerosInFormat = doesSectionFormatHaveLeadingZeros(utils, sectionConfig.contentType, sectionConfig.type, token);\n const hasLeadingZerosInInput = shouldRespectLeadingZeros ? hasLeadingZerosInFormat : sectionConfig.contentType === 'digit';\n const isValidDate = date != null && utils.isValid(date);\n let sectionValue = isValidDate ? utils.formatByString(date, token) : '';\n let maxLength = null;\n if (hasLeadingZerosInInput) {\n if (hasLeadingZerosInFormat) {\n maxLength = sectionValue === '' ? utils.formatByString(now, token).length : sectionValue.length;\n } else {\n if (sectionConfig.maxLength == null) {\n throw new Error(`MUI X: The token ${token} should have a 'maxDigitNumber' property on it's adapter`);\n }\n maxLength = sectionConfig.maxLength;\n if (isValidDate) {\n sectionValue = applyLocalizedDigits(cleanLeadingZeros(removeLocalizedDigits(sectionValue, localizedDigits), maxLength), localizedDigits);\n }\n }\n }\n return _extends({}, sectionConfig, {\n format: token,\n maxLength,\n value: sectionValue,\n placeholder: getSectionPlaceholder(utils, localeText, sectionConfig, token),\n hasLeadingZerosInFormat,\n hasLeadingZerosInInput,\n startSeparator,\n endSeparator: '',\n modified: false\n });\n};\nconst buildSections = params => {\n const {\n utils,\n expandedFormat,\n escapedParts\n } = params;\n const now = utils.date(undefined);\n const sections = [];\n let startSeparator = '';\n\n // This RegExp tests if the beginning of a string corresponds to a supported token\n const validTokens = Object.keys(utils.formatTokenMap).sort((a, b) => b.length - a.length); // Sort to put longest word first\n\n const regExpFirstWordInFormat = /^([a-zA-Z]+)/;\n const regExpWordOnlyComposedOfTokens = new RegExp(`^(${validTokens.join('|')})*$`);\n const regExpFirstTokenInWord = new RegExp(`^(${validTokens.join('|')})`);\n const getEscapedPartOfCurrentChar = i => escapedParts.find(escapeIndex => escapeIndex.start <= i && escapeIndex.end >= i);\n let i = 0;\n while (i < expandedFormat.length) {\n const escapedPartOfCurrentChar = getEscapedPartOfCurrentChar(i);\n const isEscapedChar = escapedPartOfCurrentChar != null;\n const firstWordInFormat = regExpFirstWordInFormat.exec(expandedFormat.slice(i))?.[1];\n\n // The first word in the format is only composed of tokens.\n // We extract those tokens to create a new sections.\n if (!isEscapedChar && firstWordInFormat != null && regExpWordOnlyComposedOfTokens.test(firstWordInFormat)) {\n let word = firstWordInFormat;\n while (word.length > 0) {\n const firstWord = regExpFirstTokenInWord.exec(word)[1];\n word = word.slice(firstWord.length);\n sections.push(createSection(_extends({}, params, {\n now,\n token: firstWord,\n startSeparator\n })));\n startSeparator = '';\n }\n i += firstWordInFormat.length;\n }\n // The remaining format does not start with a token,\n // We take the first character and add it to the current section's end separator.\n else {\n const char = expandedFormat[i];\n\n // If we are on the opening or closing character of an escaped part of the format,\n // Then we ignore this character.\n const isEscapeBoundary = isEscapedChar && escapedPartOfCurrentChar?.start === i || escapedPartOfCurrentChar?.end === i;\n if (!isEscapeBoundary) {\n if (sections.length === 0) {\n startSeparator += char;\n } else {\n sections[sections.length - 1].endSeparator += char;\n }\n }\n i += 1;\n }\n }\n if (sections.length === 0 && startSeparator.length > 0) {\n sections.push({\n type: 'empty',\n contentType: 'letter',\n maxLength: null,\n format: '',\n value: '',\n placeholder: '',\n hasLeadingZerosInFormat: false,\n hasLeadingZerosInInput: false,\n startSeparator,\n endSeparator: '',\n modified: false\n });\n }\n return sections;\n};\nconst postProcessSections = ({\n isRtl,\n formatDensity,\n sections\n}) => {\n return sections.map(section => {\n const cleanSeparator = separator => {\n let cleanedSeparator = separator;\n if (isRtl && cleanedSeparator !== null && cleanedSeparator.includes(' ')) {\n cleanedSeparator = `\\u2069${cleanedSeparator}\\u2066`;\n }\n if (formatDensity === 'spacious' && ['/', '.', '-'].includes(cleanedSeparator)) {\n cleanedSeparator = ` ${cleanedSeparator} `;\n }\n return cleanedSeparator;\n };\n section.startSeparator = cleanSeparator(section.startSeparator);\n section.endSeparator = cleanSeparator(section.endSeparator);\n return section;\n });\n};\nexport const buildSectionsFromFormat = params => {\n let expandedFormat = expandFormat(params);\n if (params.isRtl && params.enableAccessibleFieldDOMStructure) {\n expandedFormat = expandedFormat.split(' ').reverse().join(' ');\n }\n const escapedParts = getEscapedPartsFromFormat(_extends({}, params, {\n expandedFormat\n }));\n const sections = buildSections(_extends({}, params, {\n expandedFormat,\n escapedParts\n }));\n return postProcessSections(_extends({}, params, {\n sections\n }));\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useControlled from '@mui/utils/useControlled';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { usePickersTranslations } from \"../../../hooks/usePickersTranslations.js\";\nimport { useUtils, useLocalizationContext } from \"../useUtils.js\";\nimport { mergeDateIntoReferenceDate, getSectionsBoundaries, validateSections, getDateFromDateSections, parseSelectedSections, getLocalizedDigits } from \"./useField.utils.js\";\nimport { buildSectionsFromFormat } from \"./buildSectionsFromFormat.js\";\nimport { useValueWithTimezone } from \"../useValueWithTimezone.js\";\nimport { getSectionTypeGranularity } from \"../../utils/getDefaultReferenceDate.js\";\nexport const useFieldState = params => {\n const utils = useUtils();\n const translations = usePickersTranslations();\n const adapter = useLocalizationContext();\n const isRtl = useRtl();\n const {\n valueManager,\n fieldValueManager,\n valueType,\n validator,\n internalProps,\n internalProps: {\n value: valueProp,\n defaultValue,\n referenceDate: referenceDateProp,\n onChange,\n format,\n formatDensity = 'dense',\n selectedSections: selectedSectionsProp,\n onSelectedSectionsChange,\n shouldRespectLeadingZeros = false,\n timezone: timezoneProp,\n enableAccessibleFieldDOMStructure = false\n }\n } = params;\n const {\n timezone,\n value: valueFromTheOutside,\n handleValueChange\n } = useValueWithTimezone({\n timezone: timezoneProp,\n value: valueProp,\n defaultValue,\n referenceDate: referenceDateProp,\n onChange,\n valueManager\n });\n const localizedDigits = React.useMemo(() => getLocalizedDigits(utils), [utils]);\n const sectionsValueBoundaries = React.useMemo(() => getSectionsBoundaries(utils, localizedDigits, timezone), [utils, localizedDigits, timezone]);\n const getSectionsFromValue = React.useCallback((value, fallbackSections = null) => fieldValueManager.getSectionsFromValue(utils, value, fallbackSections, date => buildSectionsFromFormat({\n utils,\n localeText: translations,\n localizedDigits,\n format,\n date,\n formatDensity,\n shouldRespectLeadingZeros,\n enableAccessibleFieldDOMStructure,\n isRtl\n })), [fieldValueManager, format, translations, localizedDigits, isRtl, shouldRespectLeadingZeros, utils, formatDensity, enableAccessibleFieldDOMStructure]);\n const [state, setState] = React.useState(() => {\n const sections = getSectionsFromValue(valueFromTheOutside);\n validateSections(sections, valueType);\n const stateWithoutReferenceDate = {\n sections,\n value: valueFromTheOutside,\n referenceValue: valueManager.emptyValue,\n tempValueStrAndroid: null\n };\n const granularity = getSectionTypeGranularity(sections);\n const referenceValue = valueManager.getInitialReferenceValue({\n referenceDate: referenceDateProp,\n value: valueFromTheOutside,\n utils,\n props: internalProps,\n granularity,\n timezone\n });\n return _extends({}, stateWithoutReferenceDate, {\n referenceValue\n });\n });\n const [selectedSections, innerSetSelectedSections] = useControlled({\n controlled: selectedSectionsProp,\n default: null,\n name: 'useField',\n state: 'selectedSections'\n });\n const setSelectedSections = newSelectedSections => {\n innerSetSelectedSections(newSelectedSections);\n onSelectedSectionsChange?.(newSelectedSections);\n };\n const parsedSelectedSections = React.useMemo(() => parseSelectedSections(selectedSections, state.sections), [selectedSections, state.sections]);\n const activeSectionIndex = parsedSelectedSections === 'all' ? 0 : parsedSelectedSections;\n const publishValue = ({\n value,\n referenceValue,\n sections\n }) => {\n setState(prevState => _extends({}, prevState, {\n sections,\n value,\n referenceValue,\n tempValueStrAndroid: null\n }));\n if (valueManager.areValuesEqual(utils, state.value, value)) {\n return;\n }\n const context = {\n validationError: validator({\n adapter,\n value,\n timezone,\n props: internalProps\n })\n };\n handleValueChange(value, context);\n };\n const setSectionValue = (sectionIndex, newSectionValue) => {\n const newSections = [...state.sections];\n newSections[sectionIndex] = _extends({}, newSections[sectionIndex], {\n value: newSectionValue,\n modified: true\n });\n return newSections;\n };\n const clearValue = () => {\n publishValue({\n value: valueManager.emptyValue,\n referenceValue: state.referenceValue,\n sections: getSectionsFromValue(valueManager.emptyValue)\n });\n };\n const clearActiveSection = () => {\n if (activeSectionIndex == null) {\n return;\n }\n const activeSection = state.sections[activeSectionIndex];\n const activeDateManager = fieldValueManager.getActiveDateManager(utils, state, activeSection);\n const nonEmptySectionCountBefore = activeDateManager.getSections(state.sections).filter(section => section.value !== '').length;\n const hasNoOtherNonEmptySections = nonEmptySectionCountBefore === (activeSection.value === '' ? 0 : 1);\n const newSections = setSectionValue(activeSectionIndex, '');\n const newActiveDate = hasNoOtherNonEmptySections ? null : utils.getInvalidDate();\n const newValues = activeDateManager.getNewValuesFromNewActiveDate(newActiveDate);\n publishValue(_extends({}, newValues, {\n sections: newSections\n }));\n };\n const updateValueFromValueStr = valueStr => {\n const parseDateStr = (dateStr, referenceDate) => {\n const date = utils.parse(dateStr, format);\n if (date == null || !utils.isValid(date)) {\n return null;\n }\n const sections = buildSectionsFromFormat({\n utils,\n localeText: translations,\n localizedDigits,\n format,\n date,\n formatDensity,\n shouldRespectLeadingZeros,\n enableAccessibleFieldDOMStructure,\n isRtl\n });\n return mergeDateIntoReferenceDate(utils, date, sections, referenceDate, false);\n };\n const newValue = fieldValueManager.parseValueStr(valueStr, state.referenceValue, parseDateStr);\n const newReferenceValue = fieldValueManager.updateReferenceValue(utils, newValue, state.referenceValue);\n publishValue({\n value: newValue,\n referenceValue: newReferenceValue,\n sections: getSectionsFromValue(newValue, state.sections)\n });\n };\n const updateSectionValue = ({\n activeSection,\n newSectionValue,\n shouldGoToNextSection\n }) => {\n /**\n * 1. Decide which section should be focused\n */\n if (shouldGoToNextSection && activeSectionIndex < state.sections.length - 1) {\n setSelectedSections(activeSectionIndex + 1);\n }\n\n /**\n * 2. Try to build a valid date from the new section value\n */\n const activeDateManager = fieldValueManager.getActiveDateManager(utils, state, activeSection);\n const newSections = setSectionValue(activeSectionIndex, newSectionValue);\n const newActiveDateSections = activeDateManager.getSections(newSections);\n const newActiveDate = getDateFromDateSections(utils, newActiveDateSections, localizedDigits);\n let values;\n let shouldPublish;\n\n /**\n * If the new date is valid,\n * Then we merge the value of the modified sections into the reference date.\n * This makes sure that we don't lose some information of the initial date (like the time on a date field).\n */\n if (newActiveDate != null && utils.isValid(newActiveDate)) {\n const mergedDate = mergeDateIntoReferenceDate(utils, newActiveDate, newActiveDateSections, activeDateManager.referenceDate, true);\n values = activeDateManager.getNewValuesFromNewActiveDate(mergedDate);\n shouldPublish = true;\n } else {\n values = activeDateManager.getNewValuesFromNewActiveDate(newActiveDate);\n shouldPublish = (newActiveDate != null && !utils.isValid(newActiveDate)) !== (activeDateManager.date != null && !utils.isValid(activeDateManager.date));\n }\n\n /**\n * Publish or update the internal state with the new value and sections.\n */\n if (shouldPublish) {\n return publishValue(_extends({}, values, {\n sections: newSections\n }));\n }\n return setState(prevState => _extends({}, prevState, values, {\n sections: newSections,\n tempValueStrAndroid: null\n }));\n };\n const setTempAndroidValueStr = tempValueStrAndroid => setState(prev => _extends({}, prev, {\n tempValueStrAndroid\n }));\n React.useEffect(() => {\n const sections = getSectionsFromValue(state.value);\n validateSections(sections, valueType);\n setState(prevState => _extends({}, prevState, {\n sections\n }));\n }, [format, utils.locale, isRtl]); // eslint-disable-line react-hooks/exhaustive-deps\n\n React.useEffect(() => {\n let shouldUpdate;\n if (!valueManager.areValuesEqual(utils, state.value, valueFromTheOutside)) {\n shouldUpdate = true;\n } else {\n shouldUpdate = valueManager.getTimezone(utils, state.value) !== valueManager.getTimezone(utils, valueFromTheOutside);\n }\n if (shouldUpdate) {\n setState(prevState => _extends({}, prevState, {\n value: valueFromTheOutside,\n referenceValue: fieldValueManager.updateReferenceValue(utils, valueFromTheOutside, prevState.referenceValue),\n sections: getSectionsFromValue(valueFromTheOutside)\n }));\n }\n }, [valueFromTheOutside]); // eslint-disable-line react-hooks/exhaustive-deps\n\n return {\n state,\n activeSectionIndex,\n parsedSelectedSections,\n setSelectedSections,\n clearValue,\n clearActiveSection,\n updateSectionValue,\n updateValueFromValueStr,\n setTempAndroidValueStr,\n getSectionsFromValue,\n sectionsValueBoundaries,\n localizedDigits,\n timezone\n };\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { useUtils } from \"../useUtils.js\";\nimport { changeSectionValueFormat, cleanDigitSectionValue, doesSectionFormatHaveLeadingZeros, getDateSectionConfigFromFormatToken, getDaysInWeekStr, getLetterEditingOptions, applyLocalizedDigits, removeLocalizedDigits, isStringNumber } from \"./useField.utils.js\";\n\n/**\n * The letter editing and the numeric editing each define a `CharacterEditingApplier`.\n * This function decides what the new section value should be and if the focus should switch to the next section.\n *\n * If it returns `null`, then the section value is not updated and the focus does not move.\n */\n\n/**\n * Function called by `applyQuery` which decides:\n * - what is the new section value ?\n * - should the query used to get this value be stored for the next key press ?\n *\n * If it returns `{ sectionValue: string; shouldGoToNextSection: boolean }`,\n * Then we store the query and update the section with the new value.\n *\n * If it returns `{ saveQuery: true` },\n * Then we store the query and don't update the section.\n *\n * If it returns `{ saveQuery: false },\n * Then we do nothing.\n */\n\nconst QUERY_LIFE_DURATION_MS = 5000;\nconst isQueryResponseWithoutValue = response => response.saveQuery != null;\n\n/**\n * Update the active section value when the user pressed a key that is not a navigation key (arrow key for example).\n * This hook has two main editing behaviors\n *\n * 1. The numeric editing when the user presses a digit\n * 2. The letter editing when the user presses another key\n */\nexport const useFieldCharacterEditing = ({\n sections,\n updateSectionValue,\n sectionsValueBoundaries,\n localizedDigits,\n setTempAndroidValueStr,\n timezone\n}) => {\n const utils = useUtils();\n const [query, setQuery] = React.useState(null);\n const resetQuery = useEventCallback(() => setQuery(null));\n React.useEffect(() => {\n if (query != null && sections[query.sectionIndex]?.type !== query.sectionType) {\n resetQuery();\n }\n }, [sections, query, resetQuery]);\n React.useEffect(() => {\n if (query != null) {\n const timeout = setTimeout(() => resetQuery(), QUERY_LIFE_DURATION_MS);\n return () => {\n clearTimeout(timeout);\n };\n }\n return () => {};\n }, [query, resetQuery]);\n const applyQuery = ({\n keyPressed,\n sectionIndex\n }, getFirstSectionValueMatchingWithQuery, isValidQueryValue) => {\n const cleanKeyPressed = keyPressed.toLowerCase();\n const activeSection = sections[sectionIndex];\n\n // The current query targets the section being editing\n // We can try to concatenate the value\n if (query != null && (!isValidQueryValue || isValidQueryValue(query.value)) && query.sectionIndex === sectionIndex) {\n const concatenatedQueryValue = `${query.value}${cleanKeyPressed}`;\n const queryResponse = getFirstSectionValueMatchingWithQuery(concatenatedQueryValue, activeSection);\n if (!isQueryResponseWithoutValue(queryResponse)) {\n setQuery({\n sectionIndex,\n value: concatenatedQueryValue,\n sectionType: activeSection.type\n });\n return queryResponse;\n }\n }\n const queryResponse = getFirstSectionValueMatchingWithQuery(cleanKeyPressed, activeSection);\n if (isQueryResponseWithoutValue(queryResponse) && !queryResponse.saveQuery) {\n resetQuery();\n return null;\n }\n setQuery({\n sectionIndex,\n value: cleanKeyPressed,\n sectionType: activeSection.type\n });\n if (isQueryResponseWithoutValue(queryResponse)) {\n return null;\n }\n return queryResponse;\n };\n const applyLetterEditing = params => {\n const findMatchingOptions = (format, options, queryValue) => {\n const matchingValues = options.filter(option => option.toLowerCase().startsWith(queryValue));\n if (matchingValues.length === 0) {\n return {\n saveQuery: false\n };\n }\n return {\n sectionValue: matchingValues[0],\n shouldGoToNextSection: matchingValues.length === 1\n };\n };\n const testQueryOnFormatAndFallbackFormat = (queryValue, activeSection, fallbackFormat, formatFallbackValue) => {\n const getOptions = format => getLetterEditingOptions(utils, timezone, activeSection.type, format);\n if (activeSection.contentType === 'letter') {\n return findMatchingOptions(activeSection.format, getOptions(activeSection.format), queryValue);\n }\n\n // When editing a digit-format month / weekDay and the user presses a letter,\n // We can support the letter editing by using the letter-format month / weekDay and re-formatting the result.\n // We just have to make sure that the default month / weekDay format is a letter format,\n if (fallbackFormat && formatFallbackValue != null && getDateSectionConfigFromFormatToken(utils, fallbackFormat).contentType === 'letter') {\n const fallbackOptions = getOptions(fallbackFormat);\n const response = findMatchingOptions(fallbackFormat, fallbackOptions, queryValue);\n if (isQueryResponseWithoutValue(response)) {\n return {\n saveQuery: false\n };\n }\n return _extends({}, response, {\n sectionValue: formatFallbackValue(response.sectionValue, fallbackOptions)\n });\n }\n return {\n saveQuery: false\n };\n };\n const getFirstSectionValueMatchingWithQuery = (queryValue, activeSection) => {\n switch (activeSection.type) {\n case 'month':\n {\n const formatFallbackValue = fallbackValue => changeSectionValueFormat(utils, fallbackValue, utils.formats.month, activeSection.format);\n return testQueryOnFormatAndFallbackFormat(queryValue, activeSection, utils.formats.month, formatFallbackValue);\n }\n case 'weekDay':\n {\n const formatFallbackValue = (fallbackValue, fallbackOptions) => fallbackOptions.indexOf(fallbackValue).toString();\n return testQueryOnFormatAndFallbackFormat(queryValue, activeSection, utils.formats.weekday, formatFallbackValue);\n }\n case 'meridiem':\n {\n return testQueryOnFormatAndFallbackFormat(queryValue, activeSection);\n }\n default:\n {\n return {\n saveQuery: false\n };\n }\n }\n };\n return applyQuery(params, getFirstSectionValueMatchingWithQuery);\n };\n const applyNumericEditing = params => {\n const getNewSectionValue = (queryValue, section) => {\n const cleanQueryValue = removeLocalizedDigits(queryValue, localizedDigits);\n const queryValueNumber = Number(cleanQueryValue);\n const sectionBoundaries = sectionsValueBoundaries[section.type]({\n currentDate: null,\n format: section.format,\n contentType: section.contentType\n });\n if (queryValueNumber > sectionBoundaries.maximum) {\n return {\n saveQuery: false\n };\n }\n\n // If the user types `0` on a month section,\n // It is below the minimum, but we want to store the `0` in the query,\n // So that when he pressed `1`, it will store `01` and move to the next section.\n if (queryValueNumber < sectionBoundaries.minimum) {\n return {\n saveQuery: true\n };\n }\n const shouldGoToNextSection = queryValueNumber * 10 > sectionBoundaries.maximum || cleanQueryValue.length === sectionBoundaries.maximum.toString().length;\n const newSectionValue = cleanDigitSectionValue(utils, queryValueNumber, sectionBoundaries, localizedDigits, section);\n return {\n sectionValue: newSectionValue,\n shouldGoToNextSection\n };\n };\n const getFirstSectionValueMatchingWithQuery = (queryValue, activeSection) => {\n if (activeSection.contentType === 'digit' || activeSection.contentType === 'digit-with-letter') {\n return getNewSectionValue(queryValue, activeSection);\n }\n\n // When editing a letter-format month and the user presses a digit,\n // We can support the numeric editing by using the digit-format month and re-formatting the result.\n if (activeSection.type === 'month') {\n const hasLeadingZerosInFormat = doesSectionFormatHaveLeadingZeros(utils, 'digit', 'month', 'MM');\n const response = getNewSectionValue(queryValue, {\n type: activeSection.type,\n format: 'MM',\n hasLeadingZerosInFormat,\n hasLeadingZerosInInput: true,\n contentType: 'digit',\n maxLength: 2\n });\n if (isQueryResponseWithoutValue(response)) {\n return response;\n }\n const formattedValue = changeSectionValueFormat(utils, response.sectionValue, 'MM', activeSection.format);\n return _extends({}, response, {\n sectionValue: formattedValue\n });\n }\n\n // When editing a letter-format weekDay and the user presses a digit,\n // We can support the numeric editing by returning the nth day in the week day array.\n if (activeSection.type === 'weekDay') {\n const response = getNewSectionValue(queryValue, activeSection);\n if (isQueryResponseWithoutValue(response)) {\n return response;\n }\n const formattedValue = getDaysInWeekStr(utils, activeSection.format)[Number(response.sectionValue) - 1];\n return _extends({}, response, {\n sectionValue: formattedValue\n });\n }\n return {\n saveQuery: false\n };\n };\n return applyQuery(params, getFirstSectionValueMatchingWithQuery, queryValue => isStringNumber(queryValue, localizedDigits));\n };\n const applyCharacterEditing = useEventCallback(params => {\n const activeSection = sections[params.sectionIndex];\n const isNumericEditing = isStringNumber(params.keyPressed, localizedDigits);\n const response = isNumericEditing ? applyNumericEditing(_extends({}, params, {\n keyPressed: applyLocalizedDigits(params.keyPressed, localizedDigits)\n })) : applyLetterEditing(params);\n if (response == null) {\n setTempAndroidValueStr(null);\n return;\n }\n updateSectionValue({\n activeSection,\n newSectionValue: response.sectionValue,\n shouldGoToNextSection: response.shouldGoToNextSection\n });\n });\n return {\n applyCharacterEditing,\n resetCharacterQuery: resetQuery\n };\n};","import * as React from 'react';\nimport useForkRef from '@mui/utils/useForkRef';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport useId from '@mui/utils/useId';\nimport { getSectionValueNow, getSectionValueText, parseSelectedSections } from \"./useField.utils.js\";\nimport { getActiveElement } from \"../../utils/utils.js\";\nimport { usePickersTranslations } from \"../../../hooks/usePickersTranslations.js\";\nimport { useUtils } from \"../useUtils.js\";\nexport const useFieldV7TextField = params => {\n const {\n internalProps: {\n disabled,\n readOnly = false\n },\n forwardedProps: {\n sectionListRef: inSectionListRef,\n onBlur,\n onClick,\n onFocus,\n onInput,\n onPaste,\n focused: focusedProp,\n autoFocus = false\n },\n fieldValueManager,\n applyCharacterEditing,\n resetCharacterQuery,\n setSelectedSections,\n parsedSelectedSections,\n state,\n clearActiveSection,\n clearValue,\n updateSectionValue,\n updateValueFromValueStr,\n sectionOrder,\n areAllSectionsEmpty,\n sectionsValueBoundaries\n } = params;\n const sectionListRef = React.useRef(null);\n const handleSectionListRef = useForkRef(inSectionListRef, sectionListRef);\n const translations = usePickersTranslations();\n const utils = useUtils();\n const id = useId();\n const [focused, setFocused] = React.useState(false);\n const interactions = React.useMemo(() => ({\n syncSelectionToDOM: () => {\n if (!sectionListRef.current) {\n return;\n }\n const selection = document.getSelection();\n if (!selection) {\n return;\n }\n if (parsedSelectedSections == null) {\n // If the selection contains an element inside the field, we reset it.\n if (selection.rangeCount > 0 && sectionListRef.current.getRoot().contains(selection.getRangeAt(0).startContainer)) {\n selection.removeAllRanges();\n }\n if (focused) {\n sectionListRef.current.getRoot().blur();\n }\n return;\n }\n\n // On multi input range pickers we want to update selection range only for the active input\n if (!sectionListRef.current.getRoot().contains(getActiveElement(document))) {\n return;\n }\n const range = new window.Range();\n let target;\n if (parsedSelectedSections === 'all') {\n target = sectionListRef.current.getRoot();\n } else {\n const section = state.sections[parsedSelectedSections];\n if (section.type === 'empty') {\n target = sectionListRef.current.getSectionContainer(parsedSelectedSections);\n } else {\n target = sectionListRef.current.getSectionContent(parsedSelectedSections);\n }\n }\n range.selectNodeContents(target);\n target.focus();\n selection.removeAllRanges();\n selection.addRange(range);\n },\n getActiveSectionIndexFromDOM: () => {\n const activeElement = getActiveElement(document);\n if (!activeElement || !sectionListRef.current || !sectionListRef.current.getRoot().contains(activeElement)) {\n return null;\n }\n return sectionListRef.current.getSectionIndexFromDOMElement(activeElement);\n },\n focusField: (newSelectedSections = 0) => {\n if (!sectionListRef.current) {\n return;\n }\n const newParsedSelectedSections = parseSelectedSections(newSelectedSections, state.sections);\n setFocused(true);\n sectionListRef.current.getSectionContent(newParsedSelectedSections).focus();\n },\n setSelectedSections: newSelectedSections => {\n if (!sectionListRef.current) {\n return;\n }\n const newParsedSelectedSections = parseSelectedSections(newSelectedSections, state.sections);\n const newActiveSectionIndex = newParsedSelectedSections === 'all' ? 0 : newParsedSelectedSections;\n setFocused(newActiveSectionIndex !== null);\n setSelectedSections(newSelectedSections);\n },\n isFieldFocused: () => {\n const activeElement = getActiveElement(document);\n return !!sectionListRef.current && sectionListRef.current.getRoot().contains(activeElement);\n }\n }), [parsedSelectedSections, setSelectedSections, state.sections, focused]);\n\n /**\n * If a section content has been updated with a value we don't want to keep,\n * Then we need to imperatively revert it (we can't let React do it because the value did not change in his internal representation).\n */\n const revertDOMSectionChange = useEventCallback(sectionIndex => {\n if (!sectionListRef.current) {\n return;\n }\n const section = state.sections[sectionIndex];\n sectionListRef.current.getSectionContent(sectionIndex).innerHTML = section.value || section.placeholder;\n interactions.syncSelectionToDOM();\n });\n const handleContainerClick = useEventCallback((event, ...args) => {\n // The click event on the clear button would propagate to the input, trigger this handler and result in a wrong section selection.\n // We avoid this by checking if the call of `handleContainerClick` is actually intended, or a side effect.\n if (event.isDefaultPrevented() || !sectionListRef.current) {\n return;\n }\n setFocused(true);\n onClick?.(event, ...args);\n if (parsedSelectedSections === 'all') {\n setTimeout(() => {\n const cursorPosition = document.getSelection().getRangeAt(0).startOffset;\n if (cursorPosition === 0) {\n setSelectedSections(sectionOrder.startIndex);\n return;\n }\n let sectionIndex = 0;\n let cursorOnStartOfSection = 0;\n while (cursorOnStartOfSection < cursorPosition && sectionIndex < state.sections.length) {\n const section = state.sections[sectionIndex];\n sectionIndex += 1;\n cursorOnStartOfSection += `${section.startSeparator}${section.value || section.placeholder}${section.endSeparator}`.length;\n }\n setSelectedSections(sectionIndex - 1);\n });\n } else if (!focused) {\n setFocused(true);\n setSelectedSections(sectionOrder.startIndex);\n } else {\n const hasClickedOnASection = sectionListRef.current.getRoot().contains(event.target);\n if (!hasClickedOnASection) {\n setSelectedSections(sectionOrder.startIndex);\n }\n }\n });\n const handleContainerInput = useEventCallback(event => {\n onInput?.(event);\n if (!sectionListRef.current || parsedSelectedSections !== 'all') {\n return;\n }\n const target = event.target;\n const keyPressed = target.textContent ?? '';\n sectionListRef.current.getRoot().innerHTML = state.sections.map(section => `${section.startSeparator}${section.value || section.placeholder}${section.endSeparator}`).join('');\n interactions.syncSelectionToDOM();\n if (keyPressed.length === 0 || keyPressed.charCodeAt(0) === 10) {\n resetCharacterQuery();\n clearValue();\n setSelectedSections('all');\n } else if (keyPressed.length > 1) {\n updateValueFromValueStr(keyPressed);\n } else {\n if (parsedSelectedSections === 'all') {\n setSelectedSections(0);\n }\n applyCharacterEditing({\n keyPressed,\n sectionIndex: 0\n });\n }\n });\n const handleContainerPaste = useEventCallback(event => {\n onPaste?.(event);\n if (readOnly || parsedSelectedSections !== 'all') {\n event.preventDefault();\n return;\n }\n const pastedValue = event.clipboardData.getData('text');\n event.preventDefault();\n resetCharacterQuery();\n updateValueFromValueStr(pastedValue);\n });\n const handleContainerFocus = useEventCallback((...args) => {\n onFocus?.(...args);\n if (focused || !sectionListRef.current) {\n return;\n }\n setFocused(true);\n const isFocusInsideASection = sectionListRef.current.getSectionIndexFromDOMElement(getActiveElement(document)) != null;\n if (!isFocusInsideASection) {\n setSelectedSections(sectionOrder.startIndex);\n }\n });\n const handleContainerBlur = useEventCallback((...args) => {\n onBlur?.(...args);\n setTimeout(() => {\n if (!sectionListRef.current) {\n return;\n }\n const activeElement = getActiveElement(document);\n const shouldBlur = !sectionListRef.current.getRoot().contains(activeElement);\n if (shouldBlur) {\n setFocused(false);\n setSelectedSections(null);\n }\n });\n });\n const getInputContainerClickHandler = useEventCallback(sectionIndex => event => {\n // The click event on the clear button would propagate to the input, trigger this handler and result in a wrong section selection.\n // We avoid this by checking if the call to this function is actually intended, or a side effect.\n if (event.isDefaultPrevented()) {\n return;\n }\n setSelectedSections(sectionIndex);\n });\n const handleInputContentMouseUp = useEventCallback(event => {\n // Without this, the browser will remove the selected when clicking inside an already-selected section.\n event.preventDefault();\n });\n const getInputContentFocusHandler = useEventCallback(sectionIndex => () => {\n setSelectedSections(sectionIndex);\n });\n const handleInputContentPaste = useEventCallback(event => {\n // prevent default to avoid the input `onInput` handler being called\n event.preventDefault();\n if (readOnly || disabled || typeof parsedSelectedSections !== 'number') {\n return;\n }\n const activeSection = state.sections[parsedSelectedSections];\n const pastedValue = event.clipboardData.getData('text');\n const lettersOnly = /^[a-zA-Z]+$/.test(pastedValue);\n const digitsOnly = /^[0-9]+$/.test(pastedValue);\n const digitsAndLetterOnly = /^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(pastedValue);\n const isValidPastedValue = activeSection.contentType === 'letter' && lettersOnly || activeSection.contentType === 'digit' && digitsOnly || activeSection.contentType === 'digit-with-letter' && digitsAndLetterOnly;\n if (isValidPastedValue) {\n resetCharacterQuery();\n updateSectionValue({\n activeSection,\n newSectionValue: pastedValue,\n shouldGoToNextSection: true\n });\n }\n // If the pasted value corresponds to a single section, but not the expected type, we skip the modification\n else if (!lettersOnly && !digitsOnly) {\n resetCharacterQuery();\n updateValueFromValueStr(pastedValue);\n }\n });\n const handleInputContentDragOver = useEventCallback(event => {\n event.preventDefault();\n event.dataTransfer.dropEffect = 'none';\n });\n const handleInputContentInput = useEventCallback(event => {\n if (!sectionListRef.current) {\n return;\n }\n const target = event.target;\n const keyPressed = target.textContent ?? '';\n const sectionIndex = sectionListRef.current.getSectionIndexFromDOMElement(target);\n const section = state.sections[sectionIndex];\n if (readOnly || !sectionListRef.current) {\n revertDOMSectionChange(sectionIndex);\n return;\n }\n if (keyPressed.length === 0) {\n if (section.value === '') {\n revertDOMSectionChange(sectionIndex);\n return;\n }\n const inputType = event.nativeEvent.inputType;\n if (inputType === 'insertParagraph' || inputType === 'insertLineBreak') {\n revertDOMSectionChange(sectionIndex);\n return;\n }\n resetCharacterQuery();\n clearActiveSection();\n return;\n }\n applyCharacterEditing({\n keyPressed,\n sectionIndex\n });\n\n // The DOM value needs to remain the one React is expecting.\n revertDOMSectionChange(sectionIndex);\n });\n useEnhancedEffect(() => {\n if (!focused || !sectionListRef.current) {\n return;\n }\n if (parsedSelectedSections === 'all') {\n sectionListRef.current.getRoot().focus();\n } else if (typeof parsedSelectedSections === 'number') {\n const domElement = sectionListRef.current.getSectionContent(parsedSelectedSections);\n if (domElement) {\n domElement.focus();\n }\n }\n }, [parsedSelectedSections, focused]);\n const sectionBoundaries = React.useMemo(() => {\n return state.sections.reduce((acc, next) => {\n acc[next.type] = sectionsValueBoundaries[next.type]({\n currentDate: null,\n contentType: next.contentType,\n format: next.format\n });\n return acc;\n }, {});\n }, [sectionsValueBoundaries, state.sections]);\n const isContainerEditable = parsedSelectedSections === 'all';\n const elements = React.useMemo(() => {\n return state.sections.map((section, index) => {\n const isEditable = !isContainerEditable && !disabled && !readOnly;\n return {\n container: {\n 'data-sectionindex': index,\n onClick: getInputContainerClickHandler(index)\n },\n content: {\n tabIndex: isContainerEditable || index > 0 ? -1 : 0,\n contentEditable: !isContainerEditable && !disabled && !readOnly,\n role: 'spinbutton',\n id: `${id}-${section.type}`,\n 'aria-labelledby': `${id}-${section.type}`,\n 'aria-readonly': readOnly,\n 'aria-valuenow': getSectionValueNow(section, utils),\n 'aria-valuemin': sectionBoundaries[section.type].minimum,\n 'aria-valuemax': sectionBoundaries[section.type].maximum,\n 'aria-valuetext': section.value ? getSectionValueText(section, utils) : translations.empty,\n 'aria-label': translations[section.type],\n 'aria-disabled': disabled,\n spellCheck: isEditable ? false : undefined,\n autoCapitalize: isEditable ? 'off' : undefined,\n autoCorrect: isEditable ? 'off' : undefined,\n [parseInt(React.version, 10) >= 17 ? 'enterKeyHint' : 'enterkeyhint']: isEditable ? 'next' : undefined,\n children: section.value || section.placeholder,\n onInput: handleInputContentInput,\n onPaste: handleInputContentPaste,\n onFocus: getInputContentFocusHandler(index),\n onDragOver: handleInputContentDragOver,\n onMouseUp: handleInputContentMouseUp,\n inputMode: section.contentType === 'letter' ? 'text' : 'numeric'\n },\n before: {\n children: section.startSeparator\n },\n after: {\n children: section.endSeparator\n }\n };\n });\n }, [state.sections, getInputContentFocusHandler, handleInputContentPaste, handleInputContentDragOver, handleInputContentInput, getInputContainerClickHandler, handleInputContentMouseUp, disabled, readOnly, isContainerEditable, translations, utils, sectionBoundaries, id]);\n const handleValueStrChange = useEventCallback(event => {\n updateValueFromValueStr(event.target.value);\n });\n const valueStr = React.useMemo(() => areAllSectionsEmpty ? '' : fieldValueManager.getV7HiddenInputValueFromSections(state.sections), [areAllSectionsEmpty, state.sections, fieldValueManager]);\n React.useEffect(() => {\n if (sectionListRef.current == null) {\n throw new Error(['MUI X: The `sectionListRef` prop has not been initialized by `PickersSectionList`', 'You probably tried to pass a component to the `textField` slot that contains an `` element instead of a `PickersSectionList`.', '', 'If you want to keep using an `` HTML element for the editing, please remove the `enableAccessibleFieldDOMStructure` prop from your picker or field component:', '', '', '', 'Learn more about the field accessible DOM structure on the MUI documentation: https://mui.com/x/react-date-pickers/fields/#fields-to-edit-a-single-element'].join('\\n'));\n }\n if (autoFocus && sectionListRef.current) {\n sectionListRef.current.getSectionContent(sectionOrder.startIndex).focus();\n }\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n return {\n interactions,\n returnedValue: {\n // Forwarded\n autoFocus,\n readOnly,\n focused: focusedProp ?? focused,\n sectionListRef: handleSectionListRef,\n onBlur: handleContainerBlur,\n onClick: handleContainerClick,\n onFocus: handleContainerFocus,\n onInput: handleContainerInput,\n onPaste: handleContainerPaste,\n // Additional\n enableAccessibleFieldDOMStructure: true,\n elements,\n // TODO v7: Try to set to undefined when there is a section selected.\n tabIndex: parsedSelectedSections === 0 ? -1 : 0,\n contentEditable: isContainerEditable,\n value: valueStr,\n onChange: handleValueStrChange,\n areAllSectionsEmpty\n }\n };\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport useForkRef from '@mui/utils/useForkRef';\nimport { getActiveElement } from \"../../utils/utils.js\";\nimport { getSectionVisibleValue, isAndroid } from \"./useField.utils.js\";\nconst cleanString = dirtyString => dirtyString.replace(/[\\u2066\\u2067\\u2068\\u2069]/g, '');\nexport const addPositionPropertiesToSections = (sections, localizedDigits, isRtl) => {\n let position = 0;\n let positionInInput = isRtl ? 1 : 0;\n const newSections = [];\n for (let i = 0; i < sections.length; i += 1) {\n const section = sections[i];\n const renderedValue = getSectionVisibleValue(section, isRtl ? 'input-rtl' : 'input-ltr', localizedDigits);\n const sectionStr = `${section.startSeparator}${renderedValue}${section.endSeparator}`;\n const sectionLength = cleanString(sectionStr).length;\n const sectionLengthInInput = sectionStr.length;\n\n // The ...InInput values consider the unicode characters but do include them in their indexes\n const cleanedValue = cleanString(renderedValue);\n const startInInput = positionInInput + (cleanedValue === '' ? 0 : renderedValue.indexOf(cleanedValue[0])) + section.startSeparator.length;\n const endInInput = startInInput + cleanedValue.length;\n newSections.push(_extends({}, section, {\n start: position,\n end: position + sectionLength,\n startInInput,\n endInInput\n }));\n position += sectionLength;\n // Move position to the end of string associated to the current section\n positionInInput += sectionLengthInInput;\n }\n return newSections;\n};\nexport const useFieldV6TextField = params => {\n const isRtl = useRtl();\n const focusTimeoutRef = React.useRef(undefined);\n const selectionSyncTimeoutRef = React.useRef(undefined);\n const {\n forwardedProps: {\n onFocus,\n onClick,\n onPaste,\n onBlur,\n inputRef: inputRefProp,\n placeholder: inPlaceholder\n },\n internalProps: {\n readOnly = false,\n disabled = false\n },\n parsedSelectedSections,\n activeSectionIndex,\n state,\n fieldValueManager,\n valueManager,\n applyCharacterEditing,\n resetCharacterQuery,\n updateSectionValue,\n updateValueFromValueStr,\n clearActiveSection,\n clearValue,\n setTempAndroidValueStr,\n setSelectedSections,\n getSectionsFromValue,\n areAllSectionsEmpty,\n localizedDigits\n } = params;\n const inputRef = React.useRef(null);\n const handleRef = useForkRef(inputRefProp, inputRef);\n const sections = React.useMemo(() => addPositionPropertiesToSections(state.sections, localizedDigits, isRtl), [state.sections, localizedDigits, isRtl]);\n const interactions = React.useMemo(() => ({\n syncSelectionToDOM: () => {\n if (!inputRef.current) {\n return;\n }\n if (parsedSelectedSections == null) {\n if (inputRef.current.scrollLeft) {\n // Ensure that input content is not marked as selected.\n // setting selection range to 0 causes issues in Safari.\n // https://bugs.webkit.org/show_bug.cgi?id=224425\n inputRef.current.scrollLeft = 0;\n }\n return;\n }\n\n // On multi input range pickers we want to update selection range only for the active input\n // This helps to avoid the focus jumping on Safari https://github.com/mui/mui-x/issues/9003\n // because WebKit implements the `setSelectionRange` based on the spec: https://bugs.webkit.org/show_bug.cgi?id=224425\n if (inputRef.current !== getActiveElement(document)) {\n return;\n }\n\n // Fix scroll jumping on iOS browser: https://github.com/mui/mui-x/issues/8321\n const currentScrollTop = inputRef.current.scrollTop;\n if (parsedSelectedSections === 'all') {\n inputRef.current.select();\n } else {\n const selectedSection = sections[parsedSelectedSections];\n const selectionStart = selectedSection.type === 'empty' ? selectedSection.startInInput - selectedSection.startSeparator.length : selectedSection.startInInput;\n const selectionEnd = selectedSection.type === 'empty' ? selectedSection.endInInput + selectedSection.endSeparator.length : selectedSection.endInInput;\n if (selectionStart !== inputRef.current.selectionStart || selectionEnd !== inputRef.current.selectionEnd) {\n if (inputRef.current === getActiveElement(document)) {\n inputRef.current.setSelectionRange(selectionStart, selectionEnd);\n }\n }\n clearTimeout(selectionSyncTimeoutRef.current);\n selectionSyncTimeoutRef.current = setTimeout(() => {\n // handle case when the selection is not updated correctly\n // could happen on Android\n if (inputRef.current && inputRef.current === getActiveElement(document) &&\n // The section might loose all selection, where `selectionStart === selectionEnd`\n // https://github.com/mui/mui-x/pull/13652\n inputRef.current.selectionStart === inputRef.current.selectionEnd && (inputRef.current.selectionStart !== selectionStart || inputRef.current.selectionEnd !== selectionEnd)) {\n interactions.syncSelectionToDOM();\n }\n });\n }\n\n // Even reading this variable seems to do the trick, but also setting it just to make use of it\n inputRef.current.scrollTop = currentScrollTop;\n },\n getActiveSectionIndexFromDOM: () => {\n const browserStartIndex = inputRef.current.selectionStart ?? 0;\n const browserEndIndex = inputRef.current.selectionEnd ?? 0;\n if (browserStartIndex === 0 && browserEndIndex === 0) {\n return null;\n }\n const nextSectionIndex = browserStartIndex <= sections[0].startInInput ? 1 // Special case if browser index is in invisible characters at the beginning.\n : sections.findIndex(section => section.startInInput - section.startSeparator.length > browserStartIndex);\n return nextSectionIndex === -1 ? sections.length - 1 : nextSectionIndex - 1;\n },\n focusField: (newSelectedSection = 0) => {\n inputRef.current?.focus();\n setSelectedSections(newSelectedSection);\n },\n setSelectedSections: newSelectedSections => setSelectedSections(newSelectedSections),\n isFieldFocused: () => inputRef.current === getActiveElement(document)\n }), [inputRef, parsedSelectedSections, sections, setSelectedSections]);\n const syncSelectionFromDOM = () => {\n const browserStartIndex = inputRef.current.selectionStart ?? 0;\n let nextSectionIndex;\n if (browserStartIndex <= sections[0].startInInput) {\n // Special case if browser index is in invisible characters at the beginning\n nextSectionIndex = 1;\n } else if (browserStartIndex >= sections[sections.length - 1].endInInput) {\n // If the click is after the last character of the input, then we want to select the 1st section.\n nextSectionIndex = 1;\n } else {\n nextSectionIndex = sections.findIndex(section => section.startInInput - section.startSeparator.length > browserStartIndex);\n }\n const sectionIndex = nextSectionIndex === -1 ? sections.length - 1 : nextSectionIndex - 1;\n setSelectedSections(sectionIndex);\n };\n const handleInputFocus = useEventCallback((...args) => {\n onFocus?.(...args);\n // The ref is guaranteed to be resolved at this point.\n const input = inputRef.current;\n clearTimeout(focusTimeoutRef.current);\n focusTimeoutRef.current = setTimeout(() => {\n // The ref changed, the component got remounted, the focus event is no longer relevant.\n if (!input || input !== inputRef.current) {\n return;\n }\n if (activeSectionIndex != null) {\n return;\n }\n if (\n // avoid selecting all sections when focusing empty field without value\n input.value.length && Number(input.selectionEnd) - Number(input.selectionStart) === input.value.length) {\n setSelectedSections('all');\n } else {\n syncSelectionFromDOM();\n }\n });\n });\n const handleInputClick = useEventCallback((event, ...args) => {\n // The click event on the clear button would propagate to the input, trigger this handler and result in a wrong section selection.\n // We avoid this by checking if the call of `handleInputClick` is actually intended, or a side effect.\n if (event.isDefaultPrevented()) {\n return;\n }\n onClick?.(event, ...args);\n syncSelectionFromDOM();\n });\n const handleInputPaste = useEventCallback(event => {\n onPaste?.(event);\n\n // prevent default to avoid the input `onChange` handler being called\n event.preventDefault();\n if (readOnly || disabled) {\n return;\n }\n const pastedValue = event.clipboardData.getData('text');\n if (typeof parsedSelectedSections === 'number') {\n const activeSection = state.sections[parsedSelectedSections];\n const lettersOnly = /^[a-zA-Z]+$/.test(pastedValue);\n const digitsOnly = /^[0-9]+$/.test(pastedValue);\n const digitsAndLetterOnly = /^(([a-zA-Z]+)|)([0-9]+)(([a-zA-Z]+)|)$/.test(pastedValue);\n const isValidPastedValue = activeSection.contentType === 'letter' && lettersOnly || activeSection.contentType === 'digit' && digitsOnly || activeSection.contentType === 'digit-with-letter' && digitsAndLetterOnly;\n if (isValidPastedValue) {\n resetCharacterQuery();\n updateSectionValue({\n activeSection,\n newSectionValue: pastedValue,\n shouldGoToNextSection: true\n });\n return;\n }\n if (lettersOnly || digitsOnly) {\n // The pasted value corresponds to a single section, but not the expected type,\n // skip the modification\n return;\n }\n }\n resetCharacterQuery();\n updateValueFromValueStr(pastedValue);\n });\n const handleContainerBlur = useEventCallback((...args) => {\n onBlur?.(...args);\n setSelectedSections(null);\n });\n const handleInputChange = useEventCallback(event => {\n if (readOnly) {\n return;\n }\n const targetValue = event.target.value;\n if (targetValue === '') {\n resetCharacterQuery();\n clearValue();\n return;\n }\n const eventData = event.nativeEvent.data;\n // Calling `.fill(04/11/2022)` in playwright will trigger a change event with the requested content to insert in `event.nativeEvent.data`\n // usual changes have only the currently typed character in the `event.nativeEvent.data`\n const shouldUseEventData = eventData && eventData.length > 1;\n const valueStr = shouldUseEventData ? eventData : targetValue;\n const cleanValueStr = cleanString(valueStr);\n if (parsedSelectedSections === 'all') {\n setSelectedSections(activeSectionIndex);\n }\n\n // If no section is selected or eventData should be used, we just try to parse the new value\n // This line is mostly triggered by imperative code / application tests.\n if (activeSectionIndex == null || shouldUseEventData) {\n updateValueFromValueStr(shouldUseEventData ? eventData : cleanValueStr);\n return;\n }\n let keyPressed;\n if (parsedSelectedSections === 'all' && cleanValueStr.length === 1) {\n keyPressed = cleanValueStr;\n } else {\n const prevValueStr = cleanString(fieldValueManager.getV6InputValueFromSections(sections, localizedDigits, isRtl));\n let startOfDiffIndex = -1;\n let endOfDiffIndex = -1;\n for (let i = 0; i < prevValueStr.length; i += 1) {\n if (startOfDiffIndex === -1 && prevValueStr[i] !== cleanValueStr[i]) {\n startOfDiffIndex = i;\n }\n if (endOfDiffIndex === -1 && prevValueStr[prevValueStr.length - i - 1] !== cleanValueStr[cleanValueStr.length - i - 1]) {\n endOfDiffIndex = i;\n }\n }\n const activeSection = sections[activeSectionIndex];\n const hasDiffOutsideOfActiveSection = startOfDiffIndex < activeSection.start || prevValueStr.length - endOfDiffIndex - 1 > activeSection.end;\n if (hasDiffOutsideOfActiveSection) {\n // TODO: Support if the new date is valid\n return;\n }\n\n // The active section being selected, the browser has replaced its value with the key pressed by the user.\n const activeSectionEndRelativeToNewValue = cleanValueStr.length - prevValueStr.length + activeSection.end - cleanString(activeSection.endSeparator || '').length;\n keyPressed = cleanValueStr.slice(activeSection.start + cleanString(activeSection.startSeparator || '').length, activeSectionEndRelativeToNewValue);\n }\n if (keyPressed.length === 0) {\n if (isAndroid()) {\n setTempAndroidValueStr(valueStr);\n }\n resetCharacterQuery();\n clearActiveSection();\n return;\n }\n applyCharacterEditing({\n keyPressed,\n sectionIndex: activeSectionIndex\n });\n });\n const placeholder = React.useMemo(() => {\n if (inPlaceholder !== undefined) {\n return inPlaceholder;\n }\n return fieldValueManager.getV6InputValueFromSections(getSectionsFromValue(valueManager.emptyValue), localizedDigits, isRtl);\n }, [inPlaceholder, fieldValueManager, getSectionsFromValue, valueManager.emptyValue, localizedDigits, isRtl]);\n const valueStr = React.useMemo(() => state.tempValueStrAndroid ?? fieldValueManager.getV6InputValueFromSections(state.sections, localizedDigits, isRtl), [state.sections, fieldValueManager, state.tempValueStrAndroid, localizedDigits, isRtl]);\n React.useEffect(() => {\n // Select all the sections when focused on mount (`autoFocus = true` on the input)\n if (inputRef.current && inputRef.current === getActiveElement(document)) {\n setSelectedSections('all');\n }\n return () => {\n clearTimeout(focusTimeoutRef.current);\n clearTimeout(selectionSyncTimeoutRef.current);\n };\n }, []); // eslint-disable-line react-hooks/exhaustive-deps\n\n const inputMode = React.useMemo(() => {\n if (activeSectionIndex == null) {\n return 'text';\n }\n if (state.sections[activeSectionIndex].contentType === 'letter') {\n return 'text';\n }\n return 'numeric';\n }, [activeSectionIndex, state.sections]);\n const inputHasFocus = inputRef.current && inputRef.current === getActiveElement(document);\n const shouldShowPlaceholder = !inputHasFocus && areAllSectionsEmpty;\n return {\n interactions,\n returnedValue: {\n // Forwarded\n readOnly,\n onBlur: handleContainerBlur,\n onClick: handleInputClick,\n onFocus: handleInputFocus,\n onPaste: handleInputPaste,\n inputRef: handleRef,\n // Additional\n enableAccessibleFieldDOMStructure: false,\n placeholder,\n inputMode,\n autoComplete: 'off',\n value: shouldShowPlaceholder ? '' : valueStr,\n onChange: handleInputChange\n }\n };\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { useValidation } from \"../../../validation/index.js\";\nimport { useUtils } from \"../useUtils.js\";\nimport { adjustSectionValue, getSectionOrder } from \"./useField.utils.js\";\nimport { useFieldState } from \"./useFieldState.js\";\nimport { useFieldCharacterEditing } from \"./useFieldCharacterEditing.js\";\nimport { useFieldV7TextField } from \"./useFieldV7TextField.js\";\nimport { useFieldV6TextField } from \"./useFieldV6TextField.js\";\nexport const useField = params => {\n const utils = useUtils();\n const {\n internalProps,\n internalProps: {\n unstableFieldRef,\n minutesStep,\n enableAccessibleFieldDOMStructure = false,\n disabled = false,\n readOnly = false\n },\n forwardedProps: {\n onKeyDown,\n error,\n clearable,\n onClear\n },\n fieldValueManager,\n valueManager,\n validator\n } = params;\n const isRtl = useRtl();\n const stateResponse = useFieldState(params);\n const {\n state,\n activeSectionIndex,\n parsedSelectedSections,\n setSelectedSections,\n clearValue,\n clearActiveSection,\n updateSectionValue,\n setTempAndroidValueStr,\n sectionsValueBoundaries,\n localizedDigits,\n timezone\n } = stateResponse;\n const characterEditingResponse = useFieldCharacterEditing({\n sections: state.sections,\n updateSectionValue,\n sectionsValueBoundaries,\n localizedDigits,\n setTempAndroidValueStr,\n timezone\n });\n const {\n resetCharacterQuery\n } = characterEditingResponse;\n const areAllSectionsEmpty = valueManager.areValuesEqual(utils, state.value, valueManager.emptyValue);\n const useFieldTextField = enableAccessibleFieldDOMStructure ? useFieldV7TextField : useFieldV6TextField;\n const sectionOrder = React.useMemo(() => getSectionOrder(state.sections, isRtl && !enableAccessibleFieldDOMStructure), [state.sections, isRtl, enableAccessibleFieldDOMStructure]);\n const {\n returnedValue,\n interactions\n } = useFieldTextField(_extends({}, params, stateResponse, characterEditingResponse, {\n areAllSectionsEmpty,\n sectionOrder\n }));\n const handleContainerKeyDown = useEventCallback(event => {\n onKeyDown?.(event);\n if (disabled) {\n return;\n }\n // eslint-disable-next-line default-case\n switch (true) {\n // Select all\n case (event.ctrlKey || event.metaKey) && String.fromCharCode(event.keyCode) === 'A' && !event.shiftKey && !event.altKey:\n {\n // prevent default to make sure that the next line \"select all\" while updating\n // the internal state at the same time.\n event.preventDefault();\n setSelectedSections('all');\n break;\n }\n\n // Move selection to next section\n case event.key === 'ArrowRight':\n {\n event.preventDefault();\n if (parsedSelectedSections == null) {\n setSelectedSections(sectionOrder.startIndex);\n } else if (parsedSelectedSections === 'all') {\n setSelectedSections(sectionOrder.endIndex);\n } else {\n const nextSectionIndex = sectionOrder.neighbors[parsedSelectedSections].rightIndex;\n if (nextSectionIndex !== null) {\n setSelectedSections(nextSectionIndex);\n }\n }\n break;\n }\n\n // Move selection to previous section\n case event.key === 'ArrowLeft':\n {\n event.preventDefault();\n if (parsedSelectedSections == null) {\n setSelectedSections(sectionOrder.endIndex);\n } else if (parsedSelectedSections === 'all') {\n setSelectedSections(sectionOrder.startIndex);\n } else {\n const nextSectionIndex = sectionOrder.neighbors[parsedSelectedSections].leftIndex;\n if (nextSectionIndex !== null) {\n setSelectedSections(nextSectionIndex);\n }\n }\n break;\n }\n\n // Reset the value of the selected section\n case event.key === 'Delete':\n {\n event.preventDefault();\n if (readOnly) {\n break;\n }\n if (parsedSelectedSections == null || parsedSelectedSections === 'all') {\n clearValue();\n } else {\n clearActiveSection();\n }\n resetCharacterQuery();\n break;\n }\n\n // Increment / decrement the selected section value\n case ['ArrowUp', 'ArrowDown', 'Home', 'End', 'PageUp', 'PageDown'].includes(event.key):\n {\n event.preventDefault();\n if (readOnly || activeSectionIndex == null) {\n break;\n }\n\n // if all sections are selected, mark the currently editing one as selected\n if (parsedSelectedSections === 'all') {\n setSelectedSections(activeSectionIndex);\n }\n const activeSection = state.sections[activeSectionIndex];\n const activeDateManager = fieldValueManager.getActiveDateManager(utils, state, activeSection);\n const newSectionValue = adjustSectionValue(utils, timezone, activeSection, event.key, sectionsValueBoundaries, localizedDigits, activeDateManager.date, {\n minutesStep\n });\n updateSectionValue({\n activeSection,\n newSectionValue,\n shouldGoToNextSection: false\n });\n break;\n }\n }\n });\n useEnhancedEffect(() => {\n interactions.syncSelectionToDOM();\n });\n const {\n hasValidationError\n } = useValidation({\n props: internalProps,\n validator,\n timezone,\n value: state.value,\n onError: internalProps.onError\n });\n const inputError = React.useMemo(() => {\n // only override when `error` is undefined.\n // in case of multi input fields, the `error` value is provided externally and will always be defined.\n if (error !== undefined) {\n return error;\n }\n return hasValidationError;\n }, [hasValidationError, error]);\n React.useEffect(() => {\n if (!inputError && activeSectionIndex == null) {\n resetCharacterQuery();\n }\n }, [state.referenceValue, activeSectionIndex, inputError]); // eslint-disable-line react-hooks/exhaustive-deps\n\n // If `tempValueStrAndroid` is still defined for some section when running `useEffect`,\n // Then `onChange` has only been called once, which means the user pressed `Backspace` to reset the section.\n // This causes a small flickering on Android,\n // But we can't use `useEnhancedEffect` which is always called before the second `onChange` call and then would cause false positives.\n React.useEffect(() => {\n if (state.tempValueStrAndroid != null && activeSectionIndex != null) {\n resetCharacterQuery();\n clearActiveSection();\n }\n }, [state.sections]); // eslint-disable-line react-hooks/exhaustive-deps\n\n React.useImperativeHandle(unstableFieldRef, () => ({\n getSections: () => state.sections,\n getActiveSectionIndex: interactions.getActiveSectionIndexFromDOM,\n setSelectedSections: interactions.setSelectedSections,\n focusField: interactions.focusField,\n isFieldFocused: interactions.isFieldFocused\n }));\n const handleClearValue = useEventCallback((event, ...args) => {\n event.preventDefault();\n onClear?.(event, ...args);\n clearValue();\n if (!interactions.isFieldFocused()) {\n // setSelectedSections is called internally\n interactions.focusField(0);\n } else {\n setSelectedSections(sectionOrder.startIndex);\n }\n });\n const commonForwardedProps = {\n onKeyDown: handleContainerKeyDown,\n onClear: handleClearValue,\n error: inputError,\n clearable: Boolean(clearable && !areAllSectionsEmpty && !readOnly && !disabled)\n };\n const commonAdditionalProps = {\n disabled,\n readOnly\n };\n return _extends({}, params.forwardedProps, commonForwardedProps, commonAdditionalProps, returnedValue);\n};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"clearable\", \"onClear\", \"InputProps\", \"sx\", \"slots\", \"slotProps\"],\n _excluded2 = [\"ownerState\"];\nimport * as React from 'react';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport MuiIconButton from '@mui/material/IconButton';\nimport InputAdornment from '@mui/material/InputAdornment';\nimport { ClearIcon } from \"../icons/index.js\";\nimport { usePickersTranslations } from \"./usePickersTranslations.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const useClearableField = props => {\n const translations = usePickersTranslations();\n const {\n clearable,\n onClear,\n InputProps,\n sx,\n slots,\n slotProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const IconButton = slots?.clearButton ?? MuiIconButton;\n // The spread is here to avoid this bug mui/material-ui#34056\n const _useSlotProps = useSlotProps({\n elementType: IconButton,\n externalSlotProps: slotProps?.clearButton,\n ownerState: {},\n className: 'clearButton',\n additionalProps: {\n title: translations.fieldClearLabel\n }\n }),\n iconButtonProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);\n const EndClearIcon = slots?.clearIcon ?? ClearIcon;\n const endClearIconProps = useSlotProps({\n elementType: EndClearIcon,\n externalSlotProps: slotProps?.clearIcon,\n ownerState: {}\n });\n return _extends({}, other, {\n InputProps: _extends({}, InputProps, {\n endAdornment: /*#__PURE__*/_jsxs(React.Fragment, {\n children: [clearable && /*#__PURE__*/_jsx(InputAdornment, {\n position: \"end\",\n sx: {\n marginRight: InputProps?.endAdornment ? -1 : -1.5\n },\n children: /*#__PURE__*/_jsx(IconButton, _extends({}, iconButtonProps, {\n onClick: onClear,\n children: /*#__PURE__*/_jsx(EndClearIcon, _extends({\n fontSize: \"small\"\n }, endClearIconProps))\n }))\n }), InputProps?.endAdornment]\n })\n }),\n sx: [{\n '& .clearButton': {\n opacity: 1\n },\n '@media (pointer: fine)': {\n '& .clearButton': {\n opacity: 0\n },\n '&:hover, &:focus-within': {\n '.clearButton': {\n opacity: 1\n }\n }\n }\n }, ...(Array.isArray(sx) ? sx : [sx])]\n });\n};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { DATE_TIME_VALIDATION_PROP_NAMES, DATE_VALIDATION_PROP_NAMES, TIME_VALIDATION_PROP_NAMES } from \"../validation/extractValidationProps.js\";\nconst SHARED_FIELD_INTERNAL_PROP_NAMES = ['value', 'defaultValue', 'referenceDate', 'format', 'formatDensity', 'onChange', 'timezone', 'onError', 'shouldRespectLeadingZeros', 'selectedSections', 'onSelectedSectionsChange', 'unstableFieldRef', 'enableAccessibleFieldDOMStructure', 'disabled', 'readOnly', 'dateSeparator'];\n/**\n * Split the props received by the field component into:\n * - `internalProps` which are used by the various hooks called by the field component.\n * - `forwardedProps` which are passed to the underlying component.\n * Note that some forwarded props might be used by the hooks as well.\n * For instance, hooks like `useDateField` need props like `autoFocus` to know how to behave.\n * @template TProps, TValueType\n * @param {TProps} props The props received by the field component.\n * @param {TValueType} valueType The type of the field value ('date', 'time', or 'date-time').\n */\nexport const useSplitFieldProps = (props, valueType) => {\n return React.useMemo(() => {\n const forwardedProps = _extends({}, props);\n const internalProps = {};\n const extractProp = propName => {\n if (forwardedProps.hasOwnProperty(propName)) {\n // @ts-ignore\n internalProps[propName] = forwardedProps[propName];\n delete forwardedProps[propName];\n }\n };\n SHARED_FIELD_INTERNAL_PROP_NAMES.forEach(extractProp);\n if (valueType === 'date') {\n DATE_VALIDATION_PROP_NAMES.forEach(extractProp);\n } else if (valueType === 'time') {\n TIME_VALIDATION_PROP_NAMES.forEach(extractProp);\n } else if (valueType === 'date-time') {\n DATE_VALIDATION_PROP_NAMES.forEach(extractProp);\n TIME_VALIDATION_PROP_NAMES.forEach(extractProp);\n DATE_TIME_VALIDATION_PROP_NAMES.forEach(extractProp);\n }\n return {\n forwardedProps,\n internalProps\n };\n }, [props, valueType]);\n};","import * as React from 'react';\nimport { LocalizationProvider } from \"../../LocalizationProvider/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const PickersContext = /*#__PURE__*/React.createContext(null);\n\n/**\n * Provides the context for the various parts of a picker component:\n * - contextValue: the context for the picker sub-components.\n * - localizationProvider: the translations passed through the props and through a parent LocalizationProvider.\n *\n * @ignore - do not document.\n */\nexport function PickersProvider(props) {\n const {\n contextValue,\n localeText,\n children\n } = props;\n return /*#__PURE__*/_jsx(PickersContext.Provider, {\n value: contextValue,\n children: /*#__PURE__*/_jsx(LocalizationProvider, {\n localeText: localeText,\n children: children\n })\n });\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { applyDefaultDate } from \"../utils/date-utils.js\";\nimport { useUtils, useDefaultDates } from \"./useUtils.js\";\nexport const useDefaultizedDateField = props => {\n const utils = useUtils();\n const defaultDates = useDefaultDates();\n return _extends({}, props, {\n disablePast: props.disablePast ?? false,\n disableFuture: props.disableFuture ?? false,\n format: props.format ?? utils.formats.keyboardDate,\n minDate: applyDefaultDate(utils, props.minDate, defaultDates.minDate),\n maxDate: applyDefaultDate(utils, props.maxDate, defaultDates.maxDate)\n });\n};\nexport const useDefaultizedTimeField = props => {\n const utils = useUtils();\n const ampm = props.ampm ?? utils.is12HourCycleInCurrentLocale();\n const defaultFormat = ampm ? utils.formats.fullTime12h : utils.formats.fullTime24h;\n return _extends({}, props, {\n disablePast: props.disablePast ?? false,\n disableFuture: props.disableFuture ?? false,\n format: props.format ?? defaultFormat\n });\n};\nexport const useDefaultizedDateTimeField = props => {\n const utils = useUtils();\n const defaultDates = useDefaultDates();\n const ampm = props.ampm ?? utils.is12HourCycleInCurrentLocale();\n const defaultFormat = ampm ? utils.formats.keyboardDateTime12h : utils.formats.keyboardDateTime24h;\n return _extends({}, props, {\n disablePast: props.disablePast ?? false,\n disableFuture: props.disableFuture ?? false,\n format: props.format ?? defaultFormat,\n disableIgnoringDatePartForTimeValidation: Boolean(props.minDateTime || props.maxDateTime),\n minDate: applyDefaultDate(utils, props.minDateTime ?? props.minDate, defaultDates.minDate),\n maxDate: applyDefaultDate(utils, props.maxDateTime ?? props.maxDate, defaultDates.maxDate),\n minTime: props.minDateTime ?? props.minTime,\n maxTime: props.maxDateTime ?? props.maxTime\n });\n};","'use client';\n\nimport { singleItemFieldValueManager, singleItemValueManager } from \"../internals/utils/valueManagers.js\";\nimport { useField } from \"../internals/hooks/useField/index.js\";\nimport { validateDate } from \"../validation/index.js\";\nimport { useSplitFieldProps } from \"../hooks/index.js\";\nimport { useDefaultizedDateField } from \"../internals/hooks/defaultizedFieldProps.js\";\nexport const useDateField = inProps => {\n const props = useDefaultizedDateField(inProps);\n const {\n forwardedProps,\n internalProps\n } = useSplitFieldProps(props, 'date');\n return useField({\n forwardedProps,\n internalProps,\n valueManager: singleItemValueManager,\n fieldValueManager: singleItemFieldValueManager,\n validator: validateDate,\n valueType: 'date'\n });\n};","import generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nexport function getPickersTextFieldUtilityClass(slot) {\n return generateUtilityClass('MuiPickersTextField', slot);\n}\nexport const pickersTextFieldClasses = generateUtilityClasses('MuiPickersTextField', ['root', 'focused', 'disabled', 'error', 'required']);","import generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nexport function getPickersInputBaseUtilityClass(slot) {\n return generateUtilityClass('MuiPickersInputBase', slot);\n}\nexport const pickersInputBaseClasses = generateUtilityClasses('MuiPickersInputBase', ['root', 'focused', 'disabled', 'error', 'notchedOutline', 'sectionContent', 'sectionBefore', 'sectionAfter', 'adornedStart', 'adornedEnd', 'input']);","import generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nexport function getPickersSectionListUtilityClass(slot) {\n return generateUtilityClass('MuiPickersSectionList', slot);\n}\nexport const pickersSectionListClasses = generateUtilityClasses('MuiPickersSectionList', ['root', 'section', 'sectionContent']);","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"slots\", \"slotProps\", \"elements\", \"sectionListRef\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useForkRef from '@mui/utils/useForkRef';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { getPickersSectionListUtilityClass, pickersSectionListClasses } from \"./pickersSectionListClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const PickersSectionListRoot = styled('div', {\n name: 'MuiPickersSectionList',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n direction: 'ltr /*! @noflip */',\n outline: 'none'\n});\nexport const PickersSectionListSection = styled('span', {\n name: 'MuiPickersSectionList',\n slot: 'Section',\n overridesResolver: (props, styles) => styles.section\n})({});\nexport const PickersSectionListSectionSeparator = styled('span', {\n name: 'MuiPickersSectionList',\n slot: 'SectionSeparator',\n overridesResolver: (props, styles) => styles.sectionSeparator\n})({\n whiteSpace: 'pre'\n});\nexport const PickersSectionListSectionContent = styled('span', {\n name: 'MuiPickersSectionList',\n slot: 'SectionContent',\n overridesResolver: (props, styles) => styles.sectionContent\n})({\n outline: 'none'\n});\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n section: ['section'],\n sectionContent: ['sectionContent']\n };\n return composeClasses(slots, getPickersSectionListUtilityClass, classes);\n};\nfunction PickersSection(props) {\n const {\n slots,\n slotProps,\n element,\n classes\n } = props;\n const Section = slots?.section ?? PickersSectionListSection;\n const sectionProps = useSlotProps({\n elementType: Section,\n externalSlotProps: slotProps?.section,\n externalForwardedProps: element.container,\n className: classes.section,\n ownerState: {}\n });\n const SectionContent = slots?.sectionContent ?? PickersSectionListSectionContent;\n const sectionContentProps = useSlotProps({\n elementType: SectionContent,\n externalSlotProps: slotProps?.sectionContent,\n externalForwardedProps: element.content,\n additionalProps: {\n suppressContentEditableWarning: true\n },\n className: classes.sectionContent,\n ownerState: {}\n });\n const SectionSeparator = slots?.sectionSeparator ?? PickersSectionListSectionSeparator;\n const sectionSeparatorBeforeProps = useSlotProps({\n elementType: SectionSeparator,\n externalSlotProps: slotProps?.sectionSeparator,\n externalForwardedProps: element.before,\n ownerState: {\n position: 'before'\n }\n });\n const sectionSeparatorAfterProps = useSlotProps({\n elementType: SectionSeparator,\n externalSlotProps: slotProps?.sectionSeparator,\n externalForwardedProps: element.after,\n ownerState: {\n position: 'after'\n }\n });\n return /*#__PURE__*/_jsxs(Section, _extends({}, sectionProps, {\n children: [/*#__PURE__*/_jsx(SectionSeparator, _extends({}, sectionSeparatorBeforeProps)), /*#__PURE__*/_jsx(SectionContent, _extends({}, sectionContentProps)), /*#__PURE__*/_jsx(SectionSeparator, _extends({}, sectionSeparatorAfterProps))]\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? PickersSection.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n classes: PropTypes.object.isRequired,\n element: PropTypes.shape({\n after: PropTypes.object.isRequired,\n before: PropTypes.object.isRequired,\n container: PropTypes.object.isRequired,\n content: PropTypes.object.isRequired\n }).isRequired,\n /**\n * The props used for each component slot.\n */\n slotProps: PropTypes.object,\n /**\n * Overridable component slots.\n */\n slots: PropTypes.object\n} : void 0;\n/**\n * Demos:\n *\n * - [Custom field](https://mui.com/x/react-date-pickers/custom-field/)\n *\n * API:\n *\n * - [PickersSectionList API](https://mui.com/x/api/date-pickers/pickers-section-list/)\n */\nconst PickersSectionList = /*#__PURE__*/React.forwardRef(function PickersSectionList(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersSectionList'\n });\n const {\n slots,\n slotProps,\n elements,\n sectionListRef\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const classes = useUtilityClasses(props);\n const rootRef = React.useRef(null);\n const handleRootRef = useForkRef(ref, rootRef);\n const getRoot = methodName => {\n if (!rootRef.current) {\n throw new Error(`MUI X: Cannot call sectionListRef.${methodName} before the mount of the component.`);\n }\n return rootRef.current;\n };\n React.useImperativeHandle(sectionListRef, () => ({\n getRoot() {\n return getRoot('getRoot');\n },\n getSectionContainer(index) {\n const root = getRoot('getSectionContainer');\n return root.querySelector(`.${pickersSectionListClasses.section}[data-sectionindex=\"${index}\"]`);\n },\n getSectionContent(index) {\n const root = getRoot('getSectionContent');\n return root.querySelector(`.${pickersSectionListClasses.section}[data-sectionindex=\"${index}\"] .${pickersSectionListClasses.sectionContent}`);\n },\n getSectionIndexFromDOMElement(element) {\n const root = getRoot('getSectionIndexFromDOMElement');\n if (element == null || !root.contains(element)) {\n return null;\n }\n let sectionContainer = null;\n if (element.classList.contains(pickersSectionListClasses.section)) {\n sectionContainer = element;\n } else if (element.classList.contains(pickersSectionListClasses.sectionContent)) {\n sectionContainer = element.parentElement;\n }\n if (sectionContainer == null) {\n return null;\n }\n return Number(sectionContainer.dataset.sectionindex);\n }\n }));\n const Root = slots?.root ?? PickersSectionListRoot;\n const rootProps = useSlotProps({\n elementType: Root,\n externalSlotProps: slotProps?.root,\n externalForwardedProps: other,\n additionalProps: {\n ref: handleRootRef,\n suppressContentEditableWarning: true\n },\n className: classes.root,\n ownerState: {}\n });\n return /*#__PURE__*/_jsx(Root, _extends({}, rootProps, {\n children: rootProps.contentEditable ? elements.map(({\n content,\n before,\n after\n }) => `${before.children}${content.children}${after.children}`).join('') : /*#__PURE__*/_jsx(React.Fragment, {\n children: elements.map((element, elementIndex) => /*#__PURE__*/_jsx(PickersSection, {\n slots: slots,\n slotProps: slotProps,\n element: element,\n classes: classes\n }, elementIndex))\n })\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? PickersSectionList.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n /**\n * If true, the whole element is editable.\n * Useful when all the sections are selected.\n */\n contentEditable: PropTypes.bool.isRequired,\n /**\n * The elements to render.\n * Each element contains the prop to edit a section of the value.\n */\n elements: PropTypes.arrayOf(PropTypes.shape({\n after: PropTypes.object.isRequired,\n before: PropTypes.object.isRequired,\n container: PropTypes.object.isRequired,\n content: PropTypes.object.isRequired\n })).isRequired,\n sectionListRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.shape({\n getRoot: PropTypes.func.isRequired,\n getSectionContainer: PropTypes.func.isRequired,\n getSectionContent: PropTypes.func.isRequired,\n getSectionIndexFromDOMElement: PropTypes.func.isRequired\n })\n })]),\n /**\n * The props used for each component slot.\n */\n slotProps: PropTypes.object,\n /**\n * Overridable component slots.\n */\n slots: PropTypes.object\n} : void 0;\nexport { PickersSectionList };","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"elements\", \"areAllSectionsEmpty\", \"defaultValue\", \"label\", \"value\", \"onChange\", \"id\", \"autoFocus\", \"endAdornment\", \"startAdornment\", \"renderSuffix\", \"slots\", \"slotProps\", \"contentEditable\", \"tabIndex\", \"onInput\", \"onPaste\", \"onKeyDown\", \"fullWidth\", \"name\", \"readOnly\", \"inputProps\", \"inputRef\", \"sectionListRef\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useFormControl } from '@mui/material/FormControl';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport useForkRef from '@mui/utils/useForkRef';\nimport { refType } from '@mui/utils';\nimport composeClasses from '@mui/utils/composeClasses';\nimport capitalize from '@mui/utils/capitalize';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport visuallyHidden from '@mui/utils/visuallyHidden';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { pickersInputBaseClasses, getPickersInputBaseUtilityClass } from \"./pickersInputBaseClasses.js\";\nimport { Unstable_PickersSectionList as PickersSectionList, Unstable_PickersSectionListRoot as PickersSectionListRoot, Unstable_PickersSectionListSection as PickersSectionListSection, Unstable_PickersSectionListSectionSeparator as PickersSectionListSectionSeparator, Unstable_PickersSectionListSectionContent as PickersSectionListSectionContent } from \"../../PickersSectionList/index.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst round = value => Math.round(value * 1e5) / 1e5;\nexport const PickersInputBaseRoot = styled('div', {\n name: 'MuiPickersInputBase',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(({\n theme\n}) => _extends({}, theme.typography.body1, {\n color: (theme.vars || theme).palette.text.primary,\n cursor: 'text',\n padding: 0,\n display: 'flex',\n justifyContent: 'flex-start',\n alignItems: 'center',\n position: 'relative',\n boxSizing: 'border-box',\n // Prevent padding issue with fullWidth.\n letterSpacing: `${round(0.15 / 16)}em`,\n variants: [{\n props: {\n fullWidth: true\n },\n style: {\n width: '100%'\n }\n }]\n}));\nexport const PickersInputBaseSectionsContainer = styled(PickersSectionListRoot, {\n name: 'MuiPickersInputBase',\n slot: 'SectionsContainer',\n overridesResolver: (props, styles) => styles.sectionsContainer\n})(({\n theme\n}) => ({\n padding: '4px 0 5px',\n fontFamily: theme.typography.fontFamily,\n fontSize: 'inherit',\n lineHeight: '1.4375em',\n // 23px\n flexGrow: 1,\n outline: 'none',\n display: 'flex',\n flexWrap: 'nowrap',\n overflow: 'hidden',\n letterSpacing: 'inherit',\n // Baseline behavior\n width: '182px',\n variants: [{\n props: {\n isRtl: true\n },\n style: {\n textAlign: 'right /*! @noflip */'\n }\n }, {\n props: {\n size: 'small'\n },\n style: {\n paddingTop: 1\n }\n }, {\n props: {\n adornedStart: false,\n focused: false,\n filled: false\n },\n style: {\n color: 'currentColor',\n opacity: 0\n }\n }, {\n // Can't use the object notation because label can be null or undefined\n props: ({\n adornedStart,\n focused,\n filled,\n label\n }) => !adornedStart && !focused && !filled && label == null,\n style: theme.vars ? {\n opacity: theme.vars.opacity.inputPlaceholder\n } : {\n opacity: theme.palette.mode === 'light' ? 0.42 : 0.5\n }\n }]\n}));\nconst PickersInputBaseSection = styled(PickersSectionListSection, {\n name: 'MuiPickersInputBase',\n slot: 'Section',\n overridesResolver: (props, styles) => styles.section\n})(({\n theme\n}) => ({\n fontFamily: theme.typography.fontFamily,\n fontSize: 'inherit',\n letterSpacing: 'inherit',\n lineHeight: '1.4375em',\n // 23px\n display: 'flex'\n}));\nconst PickersInputBaseSectionContent = styled(PickersSectionListSectionContent, {\n name: 'MuiPickersInputBase',\n slot: 'SectionContent',\n overridesResolver: (props, styles) => styles.content\n})(({\n theme\n}) => ({\n fontFamily: theme.typography.fontFamily,\n lineHeight: '1.4375em',\n // 23px\n letterSpacing: 'inherit',\n width: 'fit-content',\n outline: 'none'\n}));\nconst PickersInputBaseSectionSeparator = styled(PickersSectionListSectionSeparator, {\n name: 'MuiPickersInputBase',\n slot: 'Separator',\n overridesResolver: (props, styles) => styles.separator\n})(() => ({\n whiteSpace: 'pre',\n letterSpacing: 'inherit'\n}));\nconst PickersInputBaseInput = styled('input', {\n name: 'MuiPickersInputBase',\n slot: 'Input',\n overridesResolver: (props, styles) => styles.hiddenInput\n})(_extends({}, visuallyHidden));\nconst useUtilityClasses = ownerState => {\n const {\n focused,\n disabled,\n error,\n classes,\n fullWidth,\n readOnly,\n color,\n size,\n endAdornment,\n startAdornment\n } = ownerState;\n const slots = {\n root: ['root', focused && !disabled && 'focused', disabled && 'disabled', readOnly && 'readOnly', error && 'error', fullWidth && 'fullWidth', `color${capitalize(color)}`, size === 'small' && 'inputSizeSmall', Boolean(startAdornment) && 'adornedStart', Boolean(endAdornment) && 'adornedEnd'],\n notchedOutline: ['notchedOutline'],\n input: ['input'],\n sectionsContainer: ['sectionsContainer'],\n sectionContent: ['sectionContent'],\n sectionBefore: ['sectionBefore'],\n sectionAfter: ['sectionAfter']\n };\n return composeClasses(slots, getPickersInputBaseUtilityClass, classes);\n};\n/**\n * @ignore - internal component.\n */\nconst PickersInputBase = /*#__PURE__*/React.forwardRef(function PickersInputBase(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersInputBase'\n });\n const {\n elements,\n areAllSectionsEmpty,\n value,\n onChange,\n id,\n endAdornment,\n startAdornment,\n renderSuffix,\n slots,\n slotProps,\n contentEditable,\n tabIndex,\n onInput,\n onPaste,\n onKeyDown,\n name,\n readOnly,\n inputProps,\n inputRef,\n sectionListRef\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootRef = React.useRef(null);\n const handleRootRef = useForkRef(ref, rootRef);\n const handleInputRef = useForkRef(inputProps?.ref, inputRef);\n const isRtl = useRtl();\n const muiFormControl = useFormControl();\n if (!muiFormControl) {\n throw new Error('MUI X: PickersInputBase should always be used inside a PickersTextField component');\n }\n const handleInputFocus = event => {\n // Fix a bug with IE11 where the focus/blur events are triggered\n // while the component is disabled.\n if (muiFormControl.disabled) {\n event.stopPropagation();\n return;\n }\n muiFormControl.onFocus?.(event);\n };\n React.useEffect(() => {\n if (muiFormControl) {\n muiFormControl.setAdornedStart(Boolean(startAdornment));\n }\n }, [muiFormControl, startAdornment]);\n React.useEffect(() => {\n if (!muiFormControl) {\n return;\n }\n if (areAllSectionsEmpty) {\n muiFormControl.onEmpty();\n } else {\n muiFormControl.onFilled();\n }\n }, [muiFormControl, areAllSectionsEmpty]);\n const ownerState = _extends({}, props, muiFormControl, {\n isRtl\n });\n const classes = useUtilityClasses(ownerState);\n const InputRoot = slots?.root || PickersInputBaseRoot;\n const inputRootProps = useSlotProps({\n elementType: InputRoot,\n externalSlotProps: slotProps?.root,\n externalForwardedProps: other,\n additionalProps: {\n 'aria-invalid': muiFormControl.error,\n ref: handleRootRef\n },\n className: classes.root,\n ownerState\n });\n const InputSectionsContainer = slots?.input || PickersInputBaseSectionsContainer;\n return /*#__PURE__*/_jsxs(InputRoot, _extends({}, inputRootProps, {\n children: [startAdornment, /*#__PURE__*/_jsx(PickersSectionList, {\n sectionListRef: sectionListRef,\n elements: elements,\n contentEditable: contentEditable,\n tabIndex: tabIndex,\n className: classes.sectionsContainer,\n onFocus: handleInputFocus,\n onBlur: muiFormControl.onBlur,\n onInput: onInput,\n onPaste: onPaste,\n onKeyDown: onKeyDown,\n slots: {\n root: InputSectionsContainer,\n section: PickersInputBaseSection,\n sectionContent: PickersInputBaseSectionContent,\n sectionSeparator: PickersInputBaseSectionSeparator\n },\n slotProps: {\n root: {\n ownerState\n },\n sectionContent: {\n className: pickersInputBaseClasses.sectionContent\n },\n sectionSeparator: ({\n position\n }) => ({\n className: position === 'before' ? pickersInputBaseClasses.sectionBefore : pickersInputBaseClasses.sectionAfter\n })\n }\n }), endAdornment, renderSuffix ? renderSuffix(_extends({}, muiFormControl)) : null, /*#__PURE__*/_jsx(PickersInputBaseInput, _extends({\n name: name,\n className: classes.input,\n value: value,\n onChange: onChange,\n id: id,\n \"aria-hidden\": \"true\",\n tabIndex: -1,\n readOnly: readOnly,\n required: muiFormControl.required,\n disabled: muiFormControl.disabled\n }, inputProps, {\n ref: handleInputRef\n }))]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? PickersInputBase.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Is `true` if the current values equals the empty value.\n * For a single item value, it means that `value === null`\n * For a range value, it means that `value === [null, null]`\n */\n areAllSectionsEmpty: PropTypes.bool.isRequired,\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If true, the whole element is editable.\n * Useful when all the sections are selected.\n */\n contentEditable: PropTypes.bool.isRequired,\n /**\n * The elements to render.\n * Each element contains the prop to edit a section of the value.\n */\n elements: PropTypes.arrayOf(PropTypes.shape({\n after: PropTypes.object.isRequired,\n before: PropTypes.object.isRequired,\n container: PropTypes.object.isRequired,\n content: PropTypes.object.isRequired\n })).isRequired,\n endAdornment: PropTypes.node,\n fullWidth: PropTypes.bool,\n id: PropTypes.string,\n inputProps: PropTypes.object,\n inputRef: refType,\n label: PropTypes.node,\n margin: PropTypes.oneOf(['dense', 'none', 'normal']),\n name: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n onClick: PropTypes.func.isRequired,\n onInput: PropTypes.func.isRequired,\n onKeyDown: PropTypes.func.isRequired,\n onPaste: PropTypes.func.isRequired,\n ownerState: PropTypes.any,\n readOnly: PropTypes.bool,\n renderSuffix: PropTypes.func,\n sectionListRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.shape({\n getRoot: PropTypes.func.isRequired,\n getSectionContainer: PropTypes.func.isRequired,\n getSectionContent: PropTypes.func.isRequired,\n getSectionIndexFromDOMElement: PropTypes.func.isRequired\n })\n })]),\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * The components used for each slot inside.\n *\n * @default {}\n */\n slots: PropTypes.object,\n startAdornment: PropTypes.node,\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n value: PropTypes.string.isRequired\n} : void 0;\nexport { PickersInputBase };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport { pickersInputBaseClasses } from \"../PickersInputBase/index.js\";\nexport function getPickersOutlinedInputUtilityClass(slot) {\n return generateUtilityClass('MuiPickersOutlinedInput', slot);\n}\nexport const pickersOutlinedInputClasses = _extends({}, pickersInputBaseClasses, generateUtilityClasses('MuiPickersOutlinedInput', ['root', 'notchedOutline', 'input']));","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"className\", \"label\", \"notched\", \"shrink\"];\nimport * as React from 'react';\nimport { styled } from '@mui/material/styles';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst OutlineRoot = styled('fieldset', {\n name: 'MuiPickersOutlinedInput',\n slot: 'NotchedOutline',\n overridesResolver: (props, styles) => styles.notchedOutline\n})(({\n theme\n}) => {\n const borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';\n return {\n textAlign: 'left',\n position: 'absolute',\n bottom: 0,\n right: 0,\n top: -5,\n left: 0,\n margin: 0,\n padding: '0 8px',\n pointerEvents: 'none',\n borderRadius: 'inherit',\n borderStyle: 'solid',\n borderWidth: 1,\n overflow: 'hidden',\n minWidth: '0%',\n borderColor: theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : borderColor\n };\n});\nconst OutlineLabel = styled('span')(({\n theme\n}) => ({\n fontFamily: theme.typography.fontFamily,\n fontSize: 'inherit'\n}));\nconst OutlineLegend = styled('legend')(({\n theme\n}) => ({\n float: 'unset',\n // Fix conflict with bootstrap\n width: 'auto',\n // Fix conflict with bootstrap\n overflow: 'hidden',\n // Fix Horizontal scroll when label too long\n variants: [{\n props: {\n withLabel: false\n },\n style: {\n padding: 0,\n lineHeight: '11px',\n // sync with `height` in `legend` styles\n transition: theme.transitions.create('width', {\n duration: 150,\n easing: theme.transitions.easing.easeOut\n })\n }\n }, {\n props: {\n withLabel: true\n },\n style: {\n display: 'block',\n // Fix conflict with normalize.css and sanitize.css\n padding: 0,\n height: 11,\n // sync with `lineHeight` in `legend` styles\n fontSize: '0.75em',\n visibility: 'hidden',\n maxWidth: 0.01,\n transition: theme.transitions.create('max-width', {\n duration: 50,\n easing: theme.transitions.easing.easeOut\n }),\n whiteSpace: 'nowrap',\n '& > span': {\n paddingLeft: 5,\n paddingRight: 5,\n display: 'inline-block',\n opacity: 0,\n visibility: 'visible'\n }\n }\n }, {\n props: {\n withLabel: true,\n notched: true\n },\n style: {\n maxWidth: '100%',\n transition: theme.transitions.create('max-width', {\n duration: 100,\n easing: theme.transitions.easing.easeOut,\n delay: 50\n })\n }\n }]\n}));\n\n/**\n * @ignore - internal component.\n */\nexport default function Outline(props) {\n const {\n className,\n label\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const withLabel = label != null && label !== '';\n const ownerState = _extends({}, props, {\n withLabel\n });\n return /*#__PURE__*/_jsx(OutlineRoot, _extends({\n \"aria-hidden\": true,\n className: className\n }, other, {\n ownerState: ownerState,\n children: /*#__PURE__*/_jsx(OutlineLegend, {\n ownerState: ownerState,\n children: withLabel ? /*#__PURE__*/_jsx(OutlineLabel, {\n children: label\n }) :\n /*#__PURE__*/\n // notranslate needed while Google Translate will not fix zero-width space issue\n _jsx(OutlineLabel, {\n className: \"notranslate\",\n children: \"\\u200B\"\n })\n })\n }));\n}","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"label\", \"autoFocus\", \"ownerState\", \"notched\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useFormControl } from '@mui/material/FormControl';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { refType } from '@mui/utils';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { pickersOutlinedInputClasses, getPickersOutlinedInputUtilityClass } from \"./pickersOutlinedInputClasses.js\";\nimport Outline from \"./Outline.js\";\nimport { PickersInputBase } from \"../PickersInputBase/index.js\";\nimport { PickersInputBaseRoot, PickersInputBaseSectionsContainer } from \"../PickersInputBase/PickersInputBase.js\";\nimport { jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\nconst PickersOutlinedInputRoot = styled(PickersInputBaseRoot, {\n name: 'MuiPickersOutlinedInput',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(({\n theme\n}) => {\n const borderColor = theme.palette.mode === 'light' ? 'rgba(0, 0, 0, 0.23)' : 'rgba(255, 255, 255, 0.23)';\n return {\n padding: '0 14px',\n borderRadius: (theme.vars || theme).shape.borderRadius,\n [`&:hover .${pickersOutlinedInputClasses.notchedOutline}`]: {\n borderColor: (theme.vars || theme).palette.text.primary\n },\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n [`&:hover .${pickersOutlinedInputClasses.notchedOutline}`]: {\n borderColor: theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / 0.23)` : borderColor\n }\n },\n [`&.${pickersOutlinedInputClasses.focused} .${pickersOutlinedInputClasses.notchedOutline}`]: {\n borderStyle: 'solid',\n borderWidth: 2\n },\n [`&.${pickersOutlinedInputClasses.disabled}`]: {\n [`& .${pickersOutlinedInputClasses.notchedOutline}`]: {\n borderColor: (theme.vars || theme).palette.action.disabled\n },\n '*': {\n color: (theme.vars || theme).palette.action.disabled\n }\n },\n [`&.${pickersOutlinedInputClasses.error} .${pickersOutlinedInputClasses.notchedOutline}`]: {\n borderColor: (theme.vars || theme).palette.error.main\n },\n variants: Object.keys((theme.vars ?? theme).palette)\n // @ts-ignore\n .filter(key => (theme.vars ?? theme).palette[key]?.main ?? false).map(color => ({\n props: {\n color\n },\n style: {\n [`&.${pickersOutlinedInputClasses.focused}:not(.${pickersOutlinedInputClasses.error}) .${pickersOutlinedInputClasses.notchedOutline}`]: {\n // @ts-ignore\n borderColor: (theme.vars || theme).palette[color].main\n }\n }\n }))\n };\n});\nconst PickersOutlinedInputSectionsContainer = styled(PickersInputBaseSectionsContainer, {\n name: 'MuiPickersOutlinedInput',\n slot: 'SectionsContainer',\n overridesResolver: (props, styles) => styles.sectionsContainer\n})({\n padding: '16.5px 0',\n variants: [{\n props: {\n size: 'small'\n },\n style: {\n padding: '8.5px 0'\n }\n }]\n});\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n notchedOutline: ['notchedOutline'],\n input: ['input']\n };\n const composedClasses = composeClasses(slots, getPickersOutlinedInputUtilityClass, classes);\n return _extends({}, classes, composedClasses);\n};\n/**\n * @ignore - internal component.\n */\nconst PickersOutlinedInput = /*#__PURE__*/React.forwardRef(function PickersOutlinedInput(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersOutlinedInput'\n });\n const {\n label,\n ownerState: ownerStateProp,\n notched\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const muiFormControl = useFormControl();\n const ownerState = _extends({}, props, ownerStateProp, muiFormControl, {\n color: muiFormControl?.color || 'primary'\n });\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(PickersInputBase, _extends({\n slots: {\n root: PickersOutlinedInputRoot,\n input: PickersOutlinedInputSectionsContainer\n },\n renderSuffix: state => /*#__PURE__*/_jsx(Outline, {\n shrink: Boolean(notched || state.adornedStart || state.focused || state.filled),\n notched: Boolean(notched || state.adornedStart || state.focused || state.filled),\n className: classes.notchedOutline,\n label: label != null && label !== '' && muiFormControl?.required ? /*#__PURE__*/_jsxs(React.Fragment, {\n children: [label, \"\\u2009\", '*']\n }) : label,\n ownerState: ownerState\n })\n }, other, {\n label: label,\n classes: classes,\n ref: ref\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? PickersOutlinedInput.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Is `true` if the current values equals the empty value.\n * For a single item value, it means that `value === null`\n * For a range value, it means that `value === [null, null]`\n */\n areAllSectionsEmpty: PropTypes.bool.isRequired,\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If true, the whole element is editable.\n * Useful when all the sections are selected.\n */\n contentEditable: PropTypes.bool.isRequired,\n /**\n * The elements to render.\n * Each element contains the prop to edit a section of the value.\n */\n elements: PropTypes.arrayOf(PropTypes.shape({\n after: PropTypes.object.isRequired,\n before: PropTypes.object.isRequired,\n container: PropTypes.object.isRequired,\n content: PropTypes.object.isRequired\n })).isRequired,\n endAdornment: PropTypes.node,\n fullWidth: PropTypes.bool,\n id: PropTypes.string,\n inputProps: PropTypes.object,\n inputRef: refType,\n label: PropTypes.node,\n margin: PropTypes.oneOf(['dense', 'none', 'normal']),\n name: PropTypes.string,\n notched: PropTypes.bool,\n onChange: PropTypes.func.isRequired,\n onClick: PropTypes.func.isRequired,\n onInput: PropTypes.func.isRequired,\n onKeyDown: PropTypes.func.isRequired,\n onPaste: PropTypes.func.isRequired,\n ownerState: PropTypes.any,\n readOnly: PropTypes.bool,\n renderSuffix: PropTypes.func,\n sectionListRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.shape({\n getRoot: PropTypes.func.isRequired,\n getSectionContainer: PropTypes.func.isRequired,\n getSectionContent: PropTypes.func.isRequired,\n getSectionIndexFromDOMElement: PropTypes.func.isRequired\n })\n })]),\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * The components used for each slot inside.\n *\n * @default {}\n */\n slots: PropTypes.object,\n startAdornment: PropTypes.node,\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n value: PropTypes.string.isRequired\n} : void 0;\nexport { PickersOutlinedInput };\nPickersOutlinedInput.muiName = 'Input';","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport { pickersInputBaseClasses } from \"../PickersInputBase/index.js\";\nexport function getPickersFilledInputUtilityClass(slot) {\n return generateUtilityClass('MuiPickersFilledInput', slot);\n}\nexport const pickersFilledInputClasses = _extends({}, pickersInputBaseClasses, generateUtilityClasses('MuiPickersFilledInput', ['root', 'underline', 'input']));","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"label\", \"autoFocus\", \"disableUnderline\", \"ownerState\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useFormControl } from '@mui/material/FormControl';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { shouldForwardProp } from '@mui/system';\nimport { refType } from '@mui/utils';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { pickersFilledInputClasses, getPickersFilledInputUtilityClass } from \"./pickersFilledInputClasses.js\";\nimport { PickersInputBase } from \"../PickersInputBase/index.js\";\nimport { PickersInputBaseRoot, PickersInputBaseSectionsContainer } from \"../PickersInputBase/PickersInputBase.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PickersFilledInputRoot = styled(PickersInputBaseRoot, {\n name: 'MuiPickersFilledInput',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root,\n shouldForwardProp: prop => shouldForwardProp(prop) && prop !== 'disableUnderline'\n})(({\n theme\n}) => {\n const light = theme.palette.mode === 'light';\n const bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';\n const backgroundColor = light ? 'rgba(0, 0, 0, 0.06)' : 'rgba(255, 255, 255, 0.09)';\n const hoverBackground = light ? 'rgba(0, 0, 0, 0.09)' : 'rgba(255, 255, 255, 0.13)';\n const disabledBackground = light ? 'rgba(0, 0, 0, 0.12)' : 'rgba(255, 255, 255, 0.12)';\n return {\n backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor,\n borderTopLeftRadius: (theme.vars || theme).shape.borderRadius,\n borderTopRightRadius: (theme.vars || theme).shape.borderRadius,\n transition: theme.transitions.create('background-color', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n '&:hover': {\n backgroundColor: theme.vars ? theme.vars.palette.FilledInput.hoverBg : hoverBackground,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor\n }\n },\n [`&.${pickersFilledInputClasses.focused}`]: {\n backgroundColor: theme.vars ? theme.vars.palette.FilledInput.bg : backgroundColor\n },\n [`&.${pickersFilledInputClasses.disabled}`]: {\n backgroundColor: theme.vars ? theme.vars.palette.FilledInput.disabledBg : disabledBackground\n },\n variants: [...Object.keys((theme.vars ?? theme).palette)\n // @ts-ignore\n .filter(key => (theme.vars ?? theme).palette[key].main).map(color => ({\n props: {\n color,\n disableUnderline: false\n },\n style: {\n '&::after': {\n // @ts-ignore\n borderBottom: `2px solid ${(theme.vars || theme).palette[color]?.main}`\n }\n }\n })), {\n props: {\n disableUnderline: false\n },\n style: {\n '&::after': {\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\"',\n position: 'absolute',\n right: 0,\n transform: 'scaleX(0)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n },\n [`&.${pickersFilledInputClasses.focused}:after`]: {\n // translateX(0) is a workaround for Safari transform scale bug\n // See https://github.com/mui/material-ui/issues/31766\n transform: 'scaleX(1) translateX(0)'\n },\n [`&.${pickersFilledInputClasses.error}`]: {\n '&:before, &:after': {\n borderBottomColor: (theme.vars || theme).palette.error.main\n }\n },\n '&::before': {\n borderBottom: `1px solid ${theme.vars ? `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputUnderline})` : bottomLineColor}`,\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\\\\00a0\"',\n position: 'absolute',\n right: 0,\n transition: theme.transitions.create('border-bottom-color', {\n duration: theme.transitions.duration.shorter\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n },\n [`&:hover:not(.${pickersFilledInputClasses.disabled}, .${pickersFilledInputClasses.error}):before`]: {\n borderBottom: `1px solid ${(theme.vars || theme).palette.text.primary}`\n },\n [`&.${pickersFilledInputClasses.disabled}:before`]: {\n borderBottomStyle: 'dotted'\n }\n }\n }, {\n props: ({\n startAdornment\n }) => !!startAdornment,\n style: {\n paddingLeft: 12\n }\n }, {\n props: ({\n endAdornment\n }) => !!endAdornment,\n style: {\n paddingRight: 12\n }\n }]\n };\n});\nconst PickersFilledSectionsContainer = styled(PickersInputBaseSectionsContainer, {\n name: 'MuiPickersFilledInput',\n slot: 'sectionsContainer',\n overridesResolver: (props, styles) => styles.sectionsContainer\n})({\n paddingTop: 25,\n paddingRight: 12,\n paddingBottom: 8,\n paddingLeft: 12,\n variants: [{\n props: {\n size: 'small'\n },\n style: {\n paddingTop: 21,\n paddingBottom: 4\n }\n }, {\n props: ({\n startAdornment\n }) => !!startAdornment,\n style: {\n paddingLeft: 0\n }\n }, {\n props: ({\n endAdornment\n }) => !!endAdornment,\n style: {\n paddingRight: 0\n }\n }, {\n props: {\n hiddenLabel: true\n },\n style: {\n paddingTop: 16,\n paddingBottom: 17\n }\n }, {\n props: {\n hiddenLabel: true,\n size: 'small'\n },\n style: {\n paddingTop: 8,\n paddingBottom: 9\n }\n }]\n});\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableUnderline\n } = ownerState;\n const slots = {\n root: ['root', !disableUnderline && 'underline'],\n input: ['input']\n };\n const composedClasses = composeClasses(slots, getPickersFilledInputUtilityClass, classes);\n return _extends({}, classes, composedClasses);\n};\n/**\n * @ignore - internal component.\n */\nconst PickersFilledInput = /*#__PURE__*/React.forwardRef(function PickersFilledInput(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersFilledInput'\n });\n const {\n label,\n disableUnderline = false,\n ownerState: ownerStateProp\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const muiFormControl = useFormControl();\n const ownerState = _extends({}, props, ownerStateProp, muiFormControl, {\n color: muiFormControl?.color || 'primary'\n });\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(PickersInputBase, _extends({\n slots: {\n root: PickersFilledInputRoot,\n input: PickersFilledSectionsContainer\n },\n slotProps: {\n root: {\n disableUnderline\n }\n }\n }, other, {\n label: label,\n classes: classes,\n ref: ref\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? PickersFilledInput.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Is `true` if the current values equals the empty value.\n * For a single item value, it means that `value === null`\n * For a range value, it means that `value === [null, null]`\n */\n areAllSectionsEmpty: PropTypes.bool.isRequired,\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If true, the whole element is editable.\n * Useful when all the sections are selected.\n */\n contentEditable: PropTypes.bool.isRequired,\n disableUnderline: PropTypes.bool,\n /**\n * The elements to render.\n * Each element contains the prop to edit a section of the value.\n */\n elements: PropTypes.arrayOf(PropTypes.shape({\n after: PropTypes.object.isRequired,\n before: PropTypes.object.isRequired,\n container: PropTypes.object.isRequired,\n content: PropTypes.object.isRequired\n })).isRequired,\n endAdornment: PropTypes.node,\n fullWidth: PropTypes.bool,\n hiddenLabel: PropTypes.bool,\n id: PropTypes.string,\n inputProps: PropTypes.object,\n inputRef: refType,\n label: PropTypes.node,\n margin: PropTypes.oneOf(['dense', 'none', 'normal']),\n name: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n onClick: PropTypes.func.isRequired,\n onInput: PropTypes.func.isRequired,\n onKeyDown: PropTypes.func.isRequired,\n onPaste: PropTypes.func.isRequired,\n ownerState: PropTypes.any,\n readOnly: PropTypes.bool,\n renderSuffix: PropTypes.func,\n sectionListRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.shape({\n getRoot: PropTypes.func.isRequired,\n getSectionContainer: PropTypes.func.isRequired,\n getSectionContent: PropTypes.func.isRequired,\n getSectionIndexFromDOMElement: PropTypes.func.isRequired\n })\n })]),\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * The components used for each slot inside.\n *\n * @default {}\n */\n slots: PropTypes.object,\n startAdornment: PropTypes.node,\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n value: PropTypes.string.isRequired\n} : void 0;\nexport { PickersFilledInput };\nPickersFilledInput.muiName = 'Input';","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nimport generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport { pickersInputBaseClasses } from \"../PickersInputBase/index.js\";\nexport function getPickersInputUtilityClass(slot) {\n return generateUtilityClass('MuiPickersFilledInput', slot);\n}\nexport const pickersInputClasses = _extends({}, pickersInputBaseClasses, generateUtilityClasses('MuiPickersInput', ['root', 'input']));","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"label\", \"autoFocus\", \"disableUnderline\", \"ownerState\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { useFormControl } from '@mui/material/FormControl';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { refType } from '@mui/utils';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { pickersInputClasses, getPickersInputUtilityClass } from \"./pickersInputClasses.js\";\nimport { PickersInputBase } from \"../PickersInputBase/index.js\";\nimport { PickersInputBaseRoot } from \"../PickersInputBase/PickersInputBase.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PickersInputRoot = styled(PickersInputBaseRoot, {\n name: 'MuiPickersInput',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(({\n theme\n}) => {\n const light = theme.palette.mode === 'light';\n let bottomLineColor = light ? 'rgba(0, 0, 0, 0.42)' : 'rgba(255, 255, 255, 0.7)';\n if (theme.vars) {\n bottomLineColor = `rgba(${theme.vars.palette.common.onBackgroundChannel} / ${theme.vars.opacity.inputUnderline})`;\n }\n return {\n 'label + &': {\n marginTop: 16\n },\n variants: [...Object.keys((theme.vars ?? theme).palette)\n // @ts-ignore\n .filter(key => (theme.vars ?? theme).palette[key].main).map(color => ({\n props: {\n color\n },\n style: {\n '&::after': {\n // @ts-ignore\n borderBottom: `2px solid ${(theme.vars || theme).palette[color].main}`\n }\n }\n })), {\n props: {\n disableUnderline: false\n },\n style: {\n '&::after': {\n background: 'red',\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\"',\n position: 'absolute',\n right: 0,\n transform: 'scaleX(0)',\n transition: theme.transitions.create('transform', {\n duration: theme.transitions.duration.shorter,\n easing: theme.transitions.easing.easeOut\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n },\n [`&.${pickersInputClasses.focused}:after`]: {\n // translateX(0) is a workaround for Safari transform scale bug\n // See https://github.com/mui/material-ui/issues/31766\n transform: 'scaleX(1) translateX(0)'\n },\n [`&.${pickersInputClasses.error}`]: {\n '&:before, &:after': {\n borderBottomColor: (theme.vars || theme).palette.error.main\n }\n },\n '&::before': {\n borderBottom: `1px solid ${bottomLineColor}`,\n left: 0,\n bottom: 0,\n // Doing the other way around crash on IE11 \"''\" https://github.com/cssinjs/jss/issues/242\n content: '\"\\\\00a0\"',\n position: 'absolute',\n right: 0,\n transition: theme.transitions.create('border-bottom-color', {\n duration: theme.transitions.duration.shorter\n }),\n pointerEvents: 'none' // Transparent to the hover style.\n },\n [`&:hover:not(.${pickersInputClasses.disabled}, .${pickersInputClasses.error}):before`]: {\n borderBottom: `2px solid ${(theme.vars || theme).palette.text.primary}`,\n // Reset on touch devices, it doesn't add specificity\n '@media (hover: none)': {\n borderBottom: `1px solid ${bottomLineColor}`\n }\n },\n [`&.${pickersInputClasses.disabled}:before`]: {\n borderBottomStyle: 'dotted'\n }\n }\n }]\n };\n});\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n disableUnderline\n } = ownerState;\n const slots = {\n root: ['root', !disableUnderline && 'underline'],\n input: ['input']\n };\n const composedClasses = composeClasses(slots, getPickersInputUtilityClass, classes);\n return _extends({}, classes, composedClasses);\n};\n/**\n * @ignore - internal component.\n */\nconst PickersInput = /*#__PURE__*/React.forwardRef(function PickersInput(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersInput'\n });\n const {\n label,\n disableUnderline = false,\n ownerState: ownerStateProp\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const muiFormControl = useFormControl();\n const ownerState = _extends({}, props, ownerStateProp, muiFormControl, {\n disableUnderline,\n color: muiFormControl?.color || 'primary'\n });\n const classes = useUtilityClasses(ownerState);\n return /*#__PURE__*/_jsx(PickersInputBase, _extends({\n slots: {\n root: PickersInputRoot\n }\n }, other, {\n label: label,\n classes: classes,\n ref: ref\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? PickersInput.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Is `true` if the current values equals the empty value.\n * For a single item value, it means that `value === null`\n * For a range value, it means that `value === [null, null]`\n */\n areAllSectionsEmpty: PropTypes.bool.isRequired,\n className: PropTypes.string,\n /**\n * The component used for the root node.\n * Either a string to use a HTML element or a component.\n */\n component: PropTypes.elementType,\n /**\n * If true, the whole element is editable.\n * Useful when all the sections are selected.\n */\n contentEditable: PropTypes.bool.isRequired,\n disableUnderline: PropTypes.bool,\n /**\n * The elements to render.\n * Each element contains the prop to edit a section of the value.\n */\n elements: PropTypes.arrayOf(PropTypes.shape({\n after: PropTypes.object.isRequired,\n before: PropTypes.object.isRequired,\n container: PropTypes.object.isRequired,\n content: PropTypes.object.isRequired\n })).isRequired,\n endAdornment: PropTypes.node,\n fullWidth: PropTypes.bool,\n id: PropTypes.string,\n inputProps: PropTypes.object,\n inputRef: refType,\n label: PropTypes.node,\n margin: PropTypes.oneOf(['dense', 'none', 'normal']),\n name: PropTypes.string,\n onChange: PropTypes.func.isRequired,\n onClick: PropTypes.func.isRequired,\n onInput: PropTypes.func.isRequired,\n onKeyDown: PropTypes.func.isRequired,\n onPaste: PropTypes.func.isRequired,\n ownerState: PropTypes.any,\n readOnly: PropTypes.bool,\n renderSuffix: PropTypes.func,\n sectionListRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.shape({\n getRoot: PropTypes.func.isRequired,\n getSectionContainer: PropTypes.func.isRequired,\n getSectionContent: PropTypes.func.isRequired,\n getSectionIndexFromDOMElement: PropTypes.func.isRequired\n })\n })]),\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * The components used for each slot inside.\n *\n * @default {}\n */\n slots: PropTypes.object,\n startAdornment: PropTypes.node,\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n value: PropTypes.string.isRequired\n} : void 0;\nexport { PickersInput };\nPickersInput.muiName = 'Input';","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onFocus\", \"onBlur\", \"className\", \"color\", \"disabled\", \"error\", \"variant\", \"required\", \"InputProps\", \"inputProps\", \"inputRef\", \"sectionListRef\", \"elements\", \"areAllSectionsEmpty\", \"onClick\", \"onKeyDown\", \"onKeyUp\", \"onPaste\", \"onInput\", \"endAdornment\", \"startAdornment\", \"tabIndex\", \"contentEditable\", \"focused\", \"value\", \"onChange\", \"fullWidth\", \"id\", \"name\", \"helperText\", \"FormHelperTextProps\", \"label\", \"InputLabelProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { refType } from '@mui/utils';\nimport useForkRef from '@mui/utils/useForkRef';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useId from '@mui/utils/useId';\nimport InputLabel from '@mui/material/InputLabel';\nimport FormHelperText from '@mui/material/FormHelperText';\nimport FormControl from '@mui/material/FormControl';\nimport { getPickersTextFieldUtilityClass } from \"./pickersTextFieldClasses.js\";\nimport { PickersOutlinedInput } from \"./PickersOutlinedInput/index.js\";\nimport { PickersFilledInput } from \"./PickersFilledInput/index.js\";\nimport { PickersInput } from \"./PickersInput/index.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst VARIANT_COMPONENT = {\n standard: PickersInput,\n filled: PickersFilledInput,\n outlined: PickersOutlinedInput\n};\nconst PickersTextFieldRoot = styled(FormControl, {\n name: 'MuiPickersTextField',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\nconst useUtilityClasses = ownerState => {\n const {\n focused,\n disabled,\n classes,\n required\n } = ownerState;\n const slots = {\n root: ['root', focused && !disabled && 'focused', disabled && 'disabled', required && 'required']\n };\n return composeClasses(slots, getPickersTextFieldUtilityClass, classes);\n};\nconst PickersTextField = /*#__PURE__*/React.forwardRef(function PickersTextField(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersTextField'\n });\n const {\n // Props used by FormControl\n onFocus,\n onBlur,\n className,\n color = 'primary',\n disabled = false,\n error = false,\n variant = 'outlined',\n required = false,\n // Props used by PickersInput\n InputProps,\n inputProps,\n inputRef,\n sectionListRef,\n elements,\n areAllSectionsEmpty,\n onClick,\n onKeyDown,\n onKeyUp,\n onPaste,\n onInput,\n endAdornment,\n startAdornment,\n tabIndex,\n contentEditable,\n focused,\n value,\n onChange,\n fullWidth,\n id: idProp,\n name,\n // Props used by FormHelperText\n helperText,\n FormHelperTextProps,\n // Props used by InputLabel\n label,\n InputLabelProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const rootRef = React.useRef(null);\n const handleRootRef = useForkRef(ref, rootRef);\n const id = useId(idProp);\n const helperTextId = helperText && id ? `${id}-helper-text` : undefined;\n const inputLabelId = label && id ? `${id}-label` : undefined;\n const ownerState = _extends({}, props, {\n color,\n disabled,\n error,\n focused,\n required,\n variant\n });\n const classes = useUtilityClasses(ownerState);\n const PickersInputComponent = VARIANT_COMPONENT[variant];\n return /*#__PURE__*/_jsxs(PickersTextFieldRoot, _extends({\n className: clsx(classes.root, className),\n ref: handleRootRef,\n focused: focused,\n onFocus: onFocus,\n onBlur: onBlur,\n disabled: disabled,\n variant: variant,\n error: error,\n color: color,\n fullWidth: fullWidth,\n required: required,\n ownerState: ownerState\n }, other, {\n children: [/*#__PURE__*/_jsx(InputLabel, _extends({\n htmlFor: id,\n id: inputLabelId\n }, InputLabelProps, {\n children: label\n })), /*#__PURE__*/_jsx(PickersInputComponent, _extends({\n elements: elements,\n areAllSectionsEmpty: areAllSectionsEmpty,\n onClick: onClick,\n onKeyDown: onKeyDown,\n onKeyUp: onKeyUp,\n onInput: onInput,\n onPaste: onPaste,\n endAdornment: endAdornment,\n startAdornment: startAdornment,\n tabIndex: tabIndex,\n contentEditable: contentEditable,\n value: value,\n onChange: onChange,\n id: id,\n fullWidth: fullWidth,\n inputProps: inputProps,\n inputRef: inputRef,\n sectionListRef: sectionListRef,\n label: label,\n name: name,\n role: \"group\",\n \"aria-labelledby\": inputLabelId\n }, InputProps)), helperText && /*#__PURE__*/_jsx(FormHelperText, _extends({\n id: helperTextId\n }, FormHelperTextProps, {\n children: helperText\n }))]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? PickersTextField.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Is `true` if the current values equals the empty value.\n * For a single item value, it means that `value === null`\n * For a range value, it means that `value === [null, null]`\n */\n areAllSectionsEmpty: PropTypes.bool.isRequired,\n className: PropTypes.string,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']),\n component: PropTypes.elementType,\n /**\n * If true, the whole element is editable.\n * Useful when all the sections are selected.\n */\n contentEditable: PropTypes.bool.isRequired,\n disabled: PropTypes.bool.isRequired,\n /**\n * The elements to render.\n * Each element contains the prop to edit a section of the value.\n */\n elements: PropTypes.arrayOf(PropTypes.shape({\n after: PropTypes.object.isRequired,\n before: PropTypes.object.isRequired,\n container: PropTypes.object.isRequired,\n content: PropTypes.object.isRequired\n })).isRequired,\n endAdornment: PropTypes.node,\n error: PropTypes.bool.isRequired,\n /**\n * If `true`, the component is displayed in focused state.\n */\n focused: PropTypes.bool,\n FormHelperTextProps: PropTypes.object,\n fullWidth: PropTypes.bool,\n /**\n * The helper text content.\n */\n helperText: PropTypes.node,\n /**\n * If `true`, the label is hidden.\n * This is used to increase density for a `FilledInput`.\n * Be sure to add `aria-label` to the `input` element.\n * @default false\n */\n hiddenLabel: PropTypes.bool,\n id: PropTypes.string,\n InputLabelProps: PropTypes.object,\n inputProps: PropTypes.object,\n /**\n * Props applied to the Input element.\n * It will be a [`FilledInput`](/material-ui/api/filled-input/),\n * [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/)\n * component depending on the `variant` prop value.\n */\n InputProps: PropTypes.object,\n inputRef: refType,\n label: PropTypes.node,\n /**\n * If `dense` or `normal`, will adjust vertical spacing of this and contained components.\n * @default 'none'\n */\n margin: PropTypes.oneOf(['dense', 'none', 'normal']),\n name: PropTypes.string,\n onBlur: PropTypes.func.isRequired,\n onChange: PropTypes.func.isRequired,\n onClick: PropTypes.func.isRequired,\n onFocus: PropTypes.func.isRequired,\n onInput: PropTypes.func.isRequired,\n onKeyDown: PropTypes.func.isRequired,\n onPaste: PropTypes.func.isRequired,\n readOnly: PropTypes.bool,\n /**\n * If `true`, the label will indicate that the `input` is required.\n * @default false\n */\n required: PropTypes.bool,\n sectionListRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.shape({\n getRoot: PropTypes.func.isRequired,\n getSectionContainer: PropTypes.func.isRequired,\n getSectionContent: PropTypes.func.isRequired,\n getSectionIndexFromDOMElement: PropTypes.func.isRequired\n })\n })]),\n /**\n * The size of the component.\n * @default 'medium'\n */\n size: PropTypes.oneOf(['medium', 'small']),\n startAdornment: PropTypes.node,\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n value: PropTypes.string.isRequired,\n /**\n * The variant to use.\n * @default 'outlined'\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport { PickersTextField };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"enableAccessibleFieldDOMStructure\"],\n _excluded2 = [\"InputProps\", \"readOnly\"],\n _excluded3 = [\"onPaste\", \"onKeyDown\", \"inputMode\", \"readOnly\", \"InputProps\", \"inputProps\", \"inputRef\"];\nexport const convertFieldResponseIntoMuiTextFieldProps = _ref => {\n let {\n enableAccessibleFieldDOMStructure\n } = _ref,\n fieldResponse = _objectWithoutPropertiesLoose(_ref, _excluded);\n if (enableAccessibleFieldDOMStructure) {\n const {\n InputProps,\n readOnly\n } = fieldResponse,\n other = _objectWithoutPropertiesLoose(fieldResponse, _excluded2);\n return _extends({}, other, {\n InputProps: _extends({}, InputProps ?? {}, {\n readOnly\n })\n });\n }\n const {\n onPaste,\n onKeyDown,\n inputMode,\n readOnly,\n InputProps,\n inputProps,\n inputRef\n } = fieldResponse,\n other = _objectWithoutPropertiesLoose(fieldResponse, _excluded3);\n return _extends({}, other, {\n InputProps: _extends({}, InputProps ?? {}, {\n readOnly\n }),\n inputProps: _extends({}, inputProps ?? {}, {\n inputMode,\n onPaste,\n onKeyDown,\n ref: inputRef\n })\n });\n};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"slots\", \"slotProps\", \"InputProps\", \"inputProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport MuiTextField from '@mui/material/TextField';\nimport { useThemeProps } from '@mui/material/styles';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport { refType } from '@mui/utils';\nimport { useDateField } from \"./useDateField.js\";\nimport { useClearableField } from \"../hooks/index.js\";\nimport { PickersTextField } from \"../PickersTextField/index.js\";\nimport { convertFieldResponseIntoMuiTextFieldProps } from \"../internals/utils/convertFieldResponseIntoMuiTextFieldProps.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Demos:\n *\n * - [DateField](http://mui.com/x/react-date-pickers/date-field/)\n * - [Fields](https://mui.com/x/react-date-pickers/fields/)\n *\n * API:\n *\n * - [DateField API](https://mui.com/x/api/date-pickers/date-field/)\n */\nconst DateField = /*#__PURE__*/React.forwardRef(function DateField(inProps, inRef) {\n const themeProps = useThemeProps({\n props: inProps,\n name: 'MuiDateField'\n });\n const {\n slots,\n slotProps,\n InputProps,\n inputProps\n } = themeProps,\n other = _objectWithoutPropertiesLoose(themeProps, _excluded);\n const ownerState = themeProps;\n const TextField = slots?.textField ?? (inProps.enableAccessibleFieldDOMStructure ? PickersTextField : MuiTextField);\n const textFieldProps = useSlotProps({\n elementType: TextField,\n externalSlotProps: slotProps?.textField,\n externalForwardedProps: other,\n additionalProps: {\n ref: inRef\n },\n ownerState\n });\n\n // TODO: Remove when mui/material-ui#35088 will be merged\n textFieldProps.inputProps = _extends({}, inputProps, textFieldProps.inputProps);\n textFieldProps.InputProps = _extends({}, InputProps, textFieldProps.InputProps);\n const fieldResponse = useDateField(textFieldProps);\n const convertedFieldResponse = convertFieldResponseIntoMuiTextFieldProps(fieldResponse);\n const processedFieldProps = useClearableField(_extends({}, convertedFieldResponse, {\n slots,\n slotProps\n }));\n return /*#__PURE__*/_jsx(TextField, _extends({}, processedFieldProps));\n});\nprocess.env.NODE_ENV !== \"production\" ? DateField.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * If `true`, the `input` element is focused during the first mount.\n * @default false\n */\n autoFocus: PropTypes.bool,\n className: PropTypes.string,\n /**\n * If `true`, a clear button will be shown in the field allowing value clearing.\n * @default false\n */\n clearable: PropTypes.bool,\n /**\n * The color of the component.\n * It supports both default and custom theme colors, which can be added as shown in the\n * [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).\n * @default 'primary'\n */\n color: PropTypes.oneOf(['error', 'info', 'primary', 'secondary', 'success', 'warning']),\n component: PropTypes.elementType,\n /**\n * The default value. Use when the component is not controlled.\n */\n defaultValue: PropTypes.object,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, disable values after the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disableFuture: PropTypes.bool,\n /**\n * If `true`, disable values before the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disablePast: PropTypes.bool,\n /**\n * @default false\n */\n enableAccessibleFieldDOMStructure: PropTypes.bool,\n /**\n * If `true`, the component is displayed in focused state.\n */\n focused: PropTypes.bool,\n /**\n * Format of the date when rendered in the input(s).\n */\n format: PropTypes.string,\n /**\n * Density of the format when rendered in the input.\n * Setting `formatDensity` to `\"spacious\"` will add a space before and after each `/`, `-` and `.` character.\n * @default \"dense\"\n */\n formatDensity: PropTypes.oneOf(['dense', 'spacious']),\n /**\n * Props applied to the [`FormHelperText`](/material-ui/api/form-helper-text/) element.\n */\n FormHelperTextProps: PropTypes.object,\n /**\n * If `true`, the input will take up the full width of its container.\n * @default false\n */\n fullWidth: PropTypes.bool,\n /**\n * The helper text content.\n */\n helperText: PropTypes.node,\n /**\n * If `true`, the label is hidden.\n * This is used to increase density for a `FilledInput`.\n * Be sure to add `aria-label` to the `input` element.\n * @default false\n */\n hiddenLabel: PropTypes.bool,\n /**\n * The id of the `input` element.\n * Use this prop to make `label` and `helperText` accessible for screen readers.\n */\n id: PropTypes.string,\n /**\n * Props applied to the [`InputLabel`](/material-ui/api/input-label/) element.\n * Pointer events like `onClick` are enabled if and only if `shrink` is `true`.\n */\n InputLabelProps: PropTypes.object,\n /**\n * [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.\n */\n inputProps: PropTypes.object,\n /**\n * Props applied to the Input element.\n * It will be a [`FilledInput`](/material-ui/api/filled-input/),\n * [`OutlinedInput`](/material-ui/api/outlined-input/) or [`Input`](/material-ui/api/input/)\n * component depending on the `variant` prop value.\n */\n InputProps: PropTypes.object,\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n /**\n * The label content.\n */\n label: PropTypes.node,\n /**\n * If `dense` or `normal`, will adjust vertical spacing of this and contained components.\n * @default 'none'\n */\n margin: PropTypes.oneOf(['dense', 'none', 'normal']),\n /**\n * Maximal selectable date.\n * @default 2099-12-31\n */\n maxDate: PropTypes.object,\n /**\n * Minimal selectable date.\n * @default 1900-01-01\n */\n minDate: PropTypes.object,\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n onBlur: PropTypes.func,\n /**\n * Callback fired when the value changes.\n * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.\n * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.\n * @param {TValue} value The new value.\n * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value.\n */\n onChange: PropTypes.func,\n /**\n * Callback fired when the clear button is clicked.\n */\n onClear: PropTypes.func,\n /**\n * Callback fired when the error associated with the current value changes.\n * When a validation error is detected, the `error` parameter contains a non-null value.\n * This can be used to render an appropriate form error.\n * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.\n * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.\n * @param {TError} error The reason why the current value is not valid.\n * @param {TValue} value The value associated with the error.\n */\n onError: PropTypes.func,\n onFocus: PropTypes.func,\n /**\n * Callback fired when the selected sections change.\n * @param {FieldSelectedSections} newValue The new selected sections.\n */\n onSelectedSectionsChange: PropTypes.func,\n /**\n * It prevents the user from changing the value of the field\n * (not from interacting with the field).\n * @default false\n */\n readOnly: PropTypes.bool,\n /**\n * The date used to generate a part of the new value that is not present in the format when both `value` and `defaultValue` are empty.\n * For example, on time fields it will be used to determine the date to set.\n * @default The closest valid date using the validation props, except callbacks such as `shouldDisableDate`. Value is rounded to the most granular section used.\n */\n referenceDate: PropTypes.object,\n /**\n * If `true`, the label is displayed as required and the `input` element is required.\n * @default false\n */\n required: PropTypes.bool,\n /**\n * The currently selected sections.\n * This prop accepts four formats:\n * 1. If a number is provided, the section at this index will be selected.\n * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.\n * 3. If `\"all\"` is provided, all the sections will be selected.\n * 4. If `null` is provided, no section will be selected.\n * If not provided, the selected sections will be handled internally.\n */\n selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number]),\n /**\n * Disable specific date.\n *\n * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.\n *\n * @template TDate\n * @param {TDate} day The date to test.\n * @returns {boolean} If `true` the date will be disabled.\n */\n shouldDisableDate: PropTypes.func,\n /**\n * Disable specific month.\n * @template TDate\n * @param {TDate} month The month to test.\n * @returns {boolean} If `true`, the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n /**\n * Disable specific year.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} If `true`, the year will be disabled.\n */\n shouldDisableYear: PropTypes.func,\n /**\n * If `true`, the format will respect the leading zeroes (e.g: on dayjs, the format `M/D/YYYY` will render `8/16/2018`)\n * If `false`, the format will always add leading zeroes (e.g: on dayjs, the format `M/D/YYYY` will render `08/16/2018`)\n *\n * Warning n°1: Luxon is not able to respect the leading zeroes when using macro tokens (e.g: \"DD\"), so `shouldRespectLeadingZeros={true}` might lead to inconsistencies when using `AdapterLuxon`.\n *\n * Warning n°2: When `shouldRespectLeadingZeros={true}`, the field will add an invisible character on the sections containing a single digit to make sure `onChange` is fired.\n * If you need to get the clean value from the input, you can remove this character using `input.value.replace(/\\u200e/g, '')`.\n *\n * Warning n°3: When used in strict mode, dayjs and moment require to respect the leading zeros.\n * This mean that when using `shouldRespectLeadingZeros={false}`, if you retrieve the value directly from the input (not listening to `onChange`) and your format contains tokens without leading zeros, the value will not be parsed by your library.\n *\n * @default false\n */\n shouldRespectLeadingZeros: PropTypes.bool,\n /**\n * The size of the component.\n */\n size: PropTypes.oneOf(['medium', 'small']),\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * Overridable component slots.\n * @default {}\n */\n slots: PropTypes.object,\n style: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Choose which timezone to use for the value.\n * Example: \"default\", \"system\", \"UTC\", \"America/New_York\".\n * If you pass values from other timezones to some props, they will be converted to this timezone before being used.\n * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.\n * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.\n */\n timezone: PropTypes.string,\n /**\n * The ref object used to imperatively interact with the field.\n */\n unstableFieldRef: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n /**\n * The selected value.\n * Used when the component is controlled.\n */\n value: PropTypes.object,\n /**\n * The variant to use.\n * @default 'outlined'\n */\n variant: PropTypes.oneOf(['filled', 'outlined', 'standard'])\n} : void 0;\nexport { DateField };","'use client';\n\nimport * as React from 'react';\nimport { validateDate } from \"../validation/index.js\";\nimport { useLocalizationContext } from \"../internals/hooks/useUtils.js\";\nexport const useIsDateDisabled = ({\n shouldDisableDate,\n shouldDisableMonth,\n shouldDisableYear,\n minDate,\n maxDate,\n disableFuture,\n disablePast,\n timezone\n}) => {\n const adapter = useLocalizationContext();\n return React.useCallback(day => validateDate({\n adapter,\n value: day,\n timezone,\n props: {\n shouldDisableDate,\n shouldDisableMonth,\n shouldDisableYear,\n minDate,\n maxDate,\n disableFuture,\n disablePast\n }\n }) !== null, [adapter, shouldDisableDate, shouldDisableMonth, shouldDisableYear, minDate, maxDate, disableFuture, disablePast, timezone]);\n};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { useIsDateDisabled } from \"./useIsDateDisabled.js\";\nimport { useUtils } from \"../internals/hooks/useUtils.js\";\nimport { singleItemValueManager } from \"../internals/utils/valueManagers.js\";\nimport { SECTION_TYPE_GRANULARITY } from \"../internals/utils/getDefaultReferenceDate.js\";\nexport const createCalendarStateReducer = (reduceAnimations, disableSwitchToMonthOnDayFocus, utils) => (state, action) => {\n switch (action.type) {\n case 'changeMonth':\n return _extends({}, state, {\n slideDirection: action.direction,\n currentMonth: action.newMonth,\n isMonthSwitchingAnimating: !reduceAnimations\n });\n case 'changeMonthTimezone':\n {\n const newTimezone = action.newTimezone;\n if (utils.getTimezone(state.currentMonth) === newTimezone) {\n return state;\n }\n let newCurrentMonth = utils.setTimezone(state.currentMonth, newTimezone);\n if (utils.getMonth(newCurrentMonth) !== utils.getMonth(state.currentMonth)) {\n newCurrentMonth = utils.setMonth(newCurrentMonth, utils.getMonth(state.currentMonth));\n }\n return _extends({}, state, {\n currentMonth: newCurrentMonth\n });\n }\n case 'finishMonthSwitchingAnimation':\n return _extends({}, state, {\n isMonthSwitchingAnimating: false\n });\n case 'changeFocusedDay':\n {\n if (state.focusedDay != null && action.focusedDay != null && utils.isSameDay(action.focusedDay, state.focusedDay)) {\n return state;\n }\n const needMonthSwitch = action.focusedDay != null && !disableSwitchToMonthOnDayFocus && !utils.isSameMonth(state.currentMonth, action.focusedDay);\n return _extends({}, state, {\n focusedDay: action.focusedDay,\n isMonthSwitchingAnimating: needMonthSwitch && !reduceAnimations && !action.withoutMonthSwitchingAnimation,\n currentMonth: needMonthSwitch ? utils.startOfMonth(action.focusedDay) : state.currentMonth,\n slideDirection: action.focusedDay != null && utils.isAfterDay(action.focusedDay, state.currentMonth) ? 'left' : 'right'\n });\n }\n default:\n throw new Error('missing support');\n }\n};\nexport const useCalendarState = params => {\n const {\n value,\n referenceDate: referenceDateProp,\n disableFuture,\n disablePast,\n disableSwitchToMonthOnDayFocus = false,\n maxDate,\n minDate,\n onMonthChange,\n reduceAnimations,\n shouldDisableDate,\n timezone\n } = params;\n const utils = useUtils();\n const reducerFn = React.useRef(createCalendarStateReducer(Boolean(reduceAnimations), disableSwitchToMonthOnDayFocus, utils)).current;\n const referenceDate = React.useMemo(() => {\n return singleItemValueManager.getInitialReferenceValue({\n value,\n utils,\n timezone,\n props: params,\n referenceDate: referenceDateProp,\n granularity: SECTION_TYPE_GRANULARITY.day\n });\n },\n // We want the `referenceDate` to update on prop and `timezone` change (https://github.com/mui/mui-x/issues/10804)\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [referenceDateProp, timezone]);\n const [calendarState, dispatch] = React.useReducer(reducerFn, {\n isMonthSwitchingAnimating: false,\n focusedDay: referenceDate,\n currentMonth: utils.startOfMonth(referenceDate),\n slideDirection: 'left'\n });\n\n // Ensure that `calendarState.currentMonth` timezone is updated when `referenceDate` (or timezone changes)\n // https://github.com/mui/mui-x/issues/10804\n React.useEffect(() => {\n dispatch({\n type: 'changeMonthTimezone',\n newTimezone: utils.getTimezone(referenceDate)\n });\n }, [referenceDate, utils]);\n const handleChangeMonth = React.useCallback(payload => {\n dispatch(_extends({\n type: 'changeMonth'\n }, payload));\n if (onMonthChange) {\n onMonthChange(payload.newMonth);\n }\n }, [onMonthChange]);\n const changeMonth = React.useCallback(newDate => {\n const newDateRequested = newDate;\n if (utils.isSameMonth(newDateRequested, calendarState.currentMonth)) {\n return;\n }\n handleChangeMonth({\n newMonth: utils.startOfMonth(newDateRequested),\n direction: utils.isAfterDay(newDateRequested, calendarState.currentMonth) ? 'left' : 'right'\n });\n }, [calendarState.currentMonth, handleChangeMonth, utils]);\n const isDateDisabled = useIsDateDisabled({\n shouldDisableDate,\n minDate,\n maxDate,\n disableFuture,\n disablePast,\n timezone\n });\n const onMonthSwitchingAnimationEnd = React.useCallback(() => {\n dispatch({\n type: 'finishMonthSwitchingAnimation'\n });\n }, []);\n const changeFocusedDay = useEventCallback((newFocusedDate, withoutMonthSwitchingAnimation) => {\n if (!isDateDisabled(newFocusedDate)) {\n dispatch({\n type: 'changeFocusedDay',\n focusedDay: newFocusedDate,\n withoutMonthSwitchingAnimation\n });\n }\n });\n return {\n referenceDate,\n calendarState,\n changeMonth,\n changeFocusedDay,\n isDateDisabled,\n onMonthSwitchingAnimationEnd,\n handleChangeMonth\n };\n};","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport const getPickersFadeTransitionGroupUtilityClass = slot => generateUtilityClass('MuiPickersFadeTransitionGroup', slot);\nexport const pickersFadeTransitionGroupClasses = generateUtilityClasses('MuiPickersFadeTransitionGroup', ['root']);","import * as React from 'react';\nimport clsx from 'clsx';\nimport { TransitionGroup } from 'react-transition-group';\nimport Fade from '@mui/material/Fade';\nimport { styled, useTheme, useThemeProps } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { getPickersFadeTransitionGroupUtilityClass } from \"./pickersFadeTransitionGroupClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getPickersFadeTransitionGroupUtilityClass, classes);\n};\nconst PickersFadeTransitionGroupRoot = styled(TransitionGroup, {\n name: 'MuiPickersFadeTransitionGroup',\n slot: 'Root',\n overridesResolver: (_, styles) => styles.root\n})({\n display: 'block',\n position: 'relative'\n});\n\n/**\n * @ignore - do not document.\n */\nexport function PickersFadeTransitionGroup(inProps) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersFadeTransitionGroup'\n });\n const {\n children,\n className,\n reduceAnimations,\n transKey\n } = props;\n const classes = useUtilityClasses(props);\n const theme = useTheme();\n if (reduceAnimations) {\n return children;\n }\n return /*#__PURE__*/_jsx(PickersFadeTransitionGroupRoot, {\n className: clsx(classes.root, className),\n children: /*#__PURE__*/_jsx(Fade, {\n appear: false,\n mountOnEnter: true,\n unmountOnExit: true,\n timeout: {\n appear: theme.transitions.duration.enteringScreen,\n enter: theme.transitions.duration.enteringScreen,\n exit: 0\n },\n children: children\n }, transKey)\n });\n}","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport const getPickersSlideTransitionUtilityClass = slot => generateUtilityClass('MuiPickersSlideTransition', slot);\nexport const pickersSlideTransitionClasses = generateUtilityClasses('MuiPickersSlideTransition', ['root', 'slideEnter-left', 'slideEnter-right', 'slideEnterActive', 'slideExit', 'slideExitActiveLeft-left', 'slideExitActiveLeft-right']);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"className\", \"reduceAnimations\", \"slideDirection\", \"transKey\", \"classes\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { styled, useTheme, useThemeProps } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { CSSTransition, TransitionGroup } from 'react-transition-group';\nimport { getPickersSlideTransitionUtilityClass, pickersSlideTransitionClasses } from \"./pickersSlideTransitionClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n slideDirection\n } = ownerState;\n const slots = {\n root: ['root'],\n exit: ['slideExit'],\n enterActive: ['slideEnterActive'],\n enter: [`slideEnter-${slideDirection}`],\n exitActive: [`slideExitActiveLeft-${slideDirection}`]\n };\n return composeClasses(slots, getPickersSlideTransitionUtilityClass, classes);\n};\nconst PickersSlideTransitionRoot = styled(TransitionGroup, {\n name: 'MuiPickersSlideTransition',\n slot: 'Root',\n overridesResolver: (_, styles) => [styles.root, {\n [`.${pickersSlideTransitionClasses['slideEnter-left']}`]: styles['slideEnter-left']\n }, {\n [`.${pickersSlideTransitionClasses['slideEnter-right']}`]: styles['slideEnter-right']\n }, {\n [`.${pickersSlideTransitionClasses.slideEnterActive}`]: styles.slideEnterActive\n }, {\n [`.${pickersSlideTransitionClasses.slideExit}`]: styles.slideExit\n }, {\n [`.${pickersSlideTransitionClasses['slideExitActiveLeft-left']}`]: styles['slideExitActiveLeft-left']\n }, {\n [`.${pickersSlideTransitionClasses['slideExitActiveLeft-right']}`]: styles['slideExitActiveLeft-right']\n }]\n})(({\n theme\n}) => {\n const slideTransition = theme.transitions.create('transform', {\n duration: theme.transitions.duration.complex,\n easing: 'cubic-bezier(0.35, 0.8, 0.4, 1)'\n });\n return {\n display: 'block',\n position: 'relative',\n overflowX: 'hidden',\n '& > *': {\n position: 'absolute',\n top: 0,\n right: 0,\n left: 0\n },\n [`& .${pickersSlideTransitionClasses['slideEnter-left']}`]: {\n willChange: 'transform',\n transform: 'translate(100%)',\n zIndex: 1\n },\n [`& .${pickersSlideTransitionClasses['slideEnter-right']}`]: {\n willChange: 'transform',\n transform: 'translate(-100%)',\n zIndex: 1\n },\n [`& .${pickersSlideTransitionClasses.slideEnterActive}`]: {\n transform: 'translate(0%)',\n transition: slideTransition\n },\n [`& .${pickersSlideTransitionClasses.slideExit}`]: {\n transform: 'translate(0%)'\n },\n [`& .${pickersSlideTransitionClasses['slideExitActiveLeft-left']}`]: {\n willChange: 'transform',\n transform: 'translate(-100%)',\n transition: slideTransition,\n zIndex: 0\n },\n [`& .${pickersSlideTransitionClasses['slideExitActiveLeft-right']}`]: {\n willChange: 'transform',\n transform: 'translate(100%)',\n transition: slideTransition,\n zIndex: 0\n }\n };\n});\n\n/**\n * @ignore - do not document.\n */\nexport function PickersSlideTransition(inProps) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersSlideTransition'\n });\n const {\n children,\n className,\n reduceAnimations,\n transKey\n // extracting `classes` from `other`\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const classes = useUtilityClasses(props);\n const theme = useTheme();\n if (reduceAnimations) {\n return /*#__PURE__*/_jsx(\"div\", {\n className: clsx(classes.root, className),\n children: children\n });\n }\n const transitionClasses = {\n exit: classes.exit,\n enterActive: classes.enterActive,\n enter: classes.enter,\n exitActive: classes.exitActive\n };\n return /*#__PURE__*/_jsx(PickersSlideTransitionRoot, {\n className: clsx(classes.root, className),\n childFactory: element => /*#__PURE__*/React.cloneElement(element, {\n classNames: transitionClasses\n }),\n role: \"presentation\",\n children: /*#__PURE__*/_jsx(CSSTransition, _extends({\n mountOnEnter: true,\n unmountOnExit: true,\n timeout: theme.transitions.duration.complex,\n classNames: transitionClasses\n }, other, {\n children: children\n }), transKey)\n });\n}","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport const getDayCalendarUtilityClass = slot => generateUtilityClass('MuiDayCalendar', slot);\nexport const dayCalendarClasses = generateUtilityClasses('MuiDayCalendar', ['root', 'header', 'weekDayLabel', 'loadingContainer', 'slideTransition', 'monthContainer', 'weekContainer', 'weekNumberLabel', 'weekNumber']);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"parentProps\", \"day\", \"focusableDay\", \"selectedDays\", \"isDateDisabled\", \"currentMonthNumber\", \"isViewFocused\"],\n _excluded2 = [\"ownerState\"];\nimport * as React from 'react';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport Typography from '@mui/material/Typography';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { unstable_composeClasses as composeClasses, unstable_useControlled as useControlled } from '@mui/utils';\nimport clsx from 'clsx';\nimport { PickersDay } from \"../PickersDay/PickersDay.js\";\nimport { usePickersTranslations } from \"../hooks/usePickersTranslations.js\";\nimport { useUtils, useNow } from \"../internals/hooks/useUtils.js\";\nimport { DAY_SIZE, DAY_MARGIN } from \"../internals/constants/dimensions.js\";\nimport { PickersSlideTransition } from \"./PickersSlideTransition.js\";\nimport { useIsDateDisabled } from \"./useIsDateDisabled.js\";\nimport { findClosestEnabledDate, getWeekdays } from \"../internals/utils/date-utils.js\";\nimport { getDayCalendarUtilityClass } from \"./dayCalendarClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n header: ['header'],\n weekDayLabel: ['weekDayLabel'],\n loadingContainer: ['loadingContainer'],\n slideTransition: ['slideTransition'],\n monthContainer: ['monthContainer'],\n weekContainer: ['weekContainer'],\n weekNumberLabel: ['weekNumberLabel'],\n weekNumber: ['weekNumber']\n };\n return composeClasses(slots, getDayCalendarUtilityClass, classes);\n};\nconst weeksContainerHeight = (DAY_SIZE + DAY_MARGIN * 2) * 6;\nconst PickersCalendarDayRoot = styled('div', {\n name: 'MuiDayCalendar',\n slot: 'Root',\n overridesResolver: (_, styles) => styles.root\n})({});\nconst PickersCalendarDayHeader = styled('div', {\n name: 'MuiDayCalendar',\n slot: 'Header',\n overridesResolver: (_, styles) => styles.header\n})({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center'\n});\nconst PickersCalendarWeekDayLabel = styled(Typography, {\n name: 'MuiDayCalendar',\n slot: 'WeekDayLabel',\n overridesResolver: (_, styles) => styles.weekDayLabel\n})(({\n theme\n}) => ({\n width: 36,\n height: 40,\n margin: '0 2px',\n textAlign: 'center',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n color: (theme.vars || theme).palette.text.secondary\n}));\nconst PickersCalendarWeekNumberLabel = styled(Typography, {\n name: 'MuiDayCalendar',\n slot: 'WeekNumberLabel',\n overridesResolver: (_, styles) => styles.weekNumberLabel\n})(({\n theme\n}) => ({\n width: 36,\n height: 40,\n margin: '0 2px',\n textAlign: 'center',\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n color: theme.palette.text.disabled\n}));\nconst PickersCalendarWeekNumber = styled(Typography, {\n name: 'MuiDayCalendar',\n slot: 'WeekNumber',\n overridesResolver: (_, styles) => styles.weekNumber\n})(({\n theme\n}) => _extends({}, theme.typography.caption, {\n width: DAY_SIZE,\n height: DAY_SIZE,\n padding: 0,\n margin: `0 ${DAY_MARGIN}px`,\n color: theme.palette.text.disabled,\n fontSize: '0.75rem',\n alignItems: 'center',\n justifyContent: 'center',\n display: 'inline-flex'\n}));\nconst PickersCalendarLoadingContainer = styled('div', {\n name: 'MuiDayCalendar',\n slot: 'LoadingContainer',\n overridesResolver: (_, styles) => styles.loadingContainer\n})({\n display: 'flex',\n justifyContent: 'center',\n alignItems: 'center',\n minHeight: weeksContainerHeight\n});\nconst PickersCalendarSlideTransition = styled(PickersSlideTransition, {\n name: 'MuiDayCalendar',\n slot: 'SlideTransition',\n overridesResolver: (_, styles) => styles.slideTransition\n})({\n minHeight: weeksContainerHeight\n});\nconst PickersCalendarWeekContainer = styled('div', {\n name: 'MuiDayCalendar',\n slot: 'MonthContainer',\n overridesResolver: (_, styles) => styles.monthContainer\n})({\n overflow: 'hidden'\n});\nconst PickersCalendarWeek = styled('div', {\n name: 'MuiDayCalendar',\n slot: 'WeekContainer',\n overridesResolver: (_, styles) => styles.weekContainer\n})({\n margin: `${DAY_MARGIN}px 0`,\n display: 'flex',\n justifyContent: 'center'\n});\nfunction WrappedDay(_ref) {\n let {\n parentProps,\n day,\n focusableDay,\n selectedDays,\n isDateDisabled,\n currentMonthNumber,\n isViewFocused\n } = _ref,\n other = _objectWithoutPropertiesLoose(_ref, _excluded);\n const {\n disabled,\n disableHighlightToday,\n isMonthSwitchingAnimating,\n showDaysOutsideCurrentMonth,\n slots,\n slotProps,\n timezone\n } = parentProps;\n const utils = useUtils();\n const now = useNow(timezone);\n const isFocusableDay = focusableDay !== null && utils.isSameDay(day, focusableDay);\n const isSelected = selectedDays.some(selectedDay => utils.isSameDay(selectedDay, day));\n const isToday = utils.isSameDay(day, now);\n const Day = slots?.day ?? PickersDay;\n // We don't want to pass to ownerState down, to avoid re-rendering all the day whenever a prop changes.\n const _useSlotProps = useSlotProps({\n elementType: Day,\n externalSlotProps: slotProps?.day,\n additionalProps: _extends({\n disableHighlightToday,\n showDaysOutsideCurrentMonth,\n role: 'gridcell',\n isAnimating: isMonthSwitchingAnimating,\n // it is used in date range dragging logic by accessing `dataset.timestamp`\n 'data-timestamp': utils.toJsDate(day).valueOf()\n }, other),\n ownerState: _extends({}, parentProps, {\n day,\n selected: isSelected\n })\n }),\n dayProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);\n const isDisabled = React.useMemo(() => disabled || isDateDisabled(day), [disabled, isDateDisabled, day]);\n const outsideCurrentMonth = React.useMemo(() => utils.getMonth(day) !== currentMonthNumber, [utils, day, currentMonthNumber]);\n const isFirstVisibleCell = React.useMemo(() => {\n const startOfMonth = utils.startOfMonth(utils.setMonth(day, currentMonthNumber));\n if (!showDaysOutsideCurrentMonth) {\n return utils.isSameDay(day, startOfMonth);\n }\n return utils.isSameDay(day, utils.startOfWeek(startOfMonth));\n }, [currentMonthNumber, day, showDaysOutsideCurrentMonth, utils]);\n const isLastVisibleCell = React.useMemo(() => {\n const endOfMonth = utils.endOfMonth(utils.setMonth(day, currentMonthNumber));\n if (!showDaysOutsideCurrentMonth) {\n return utils.isSameDay(day, endOfMonth);\n }\n return utils.isSameDay(day, utils.endOfWeek(endOfMonth));\n }, [currentMonthNumber, day, showDaysOutsideCurrentMonth, utils]);\n return /*#__PURE__*/_jsx(Day, _extends({}, dayProps, {\n day: day,\n disabled: isDisabled,\n autoFocus: isViewFocused && isFocusableDay,\n today: isToday,\n outsideCurrentMonth: outsideCurrentMonth,\n isFirstVisibleCell: isFirstVisibleCell,\n isLastVisibleCell: isLastVisibleCell,\n selected: isSelected,\n tabIndex: isFocusableDay ? 0 : -1,\n \"aria-selected\": isSelected,\n \"aria-current\": isToday ? 'date' : undefined\n }));\n}\n\n/**\n * @ignore - do not document.\n */\nexport function DayCalendar(inProps) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiDayCalendar'\n });\n const utils = useUtils();\n const {\n onFocusedDayChange,\n className,\n currentMonth,\n selectedDays,\n focusedDay,\n loading,\n onSelectedDaysChange,\n onMonthSwitchingAnimationEnd,\n readOnly,\n reduceAnimations,\n renderLoading = () => /*#__PURE__*/_jsx(\"span\", {\n children: \"...\"\n }),\n slideDirection,\n TransitionProps,\n disablePast,\n disableFuture,\n minDate,\n maxDate,\n shouldDisableDate,\n shouldDisableMonth,\n shouldDisableYear,\n dayOfWeekFormatter = date => utils.format(date, 'weekdayShort').charAt(0).toUpperCase(),\n hasFocus,\n onFocusedViewChange,\n gridLabelId,\n displayWeekNumber,\n fixedWeekNumber,\n autoFocus,\n timezone\n } = props;\n const now = useNow(timezone);\n const classes = useUtilityClasses(props);\n const isRtl = useRtl();\n const isDateDisabled = useIsDateDisabled({\n shouldDisableDate,\n shouldDisableMonth,\n shouldDisableYear,\n minDate,\n maxDate,\n disablePast,\n disableFuture,\n timezone\n });\n const translations = usePickersTranslations();\n const [internalHasFocus, setInternalHasFocus] = useControlled({\n name: 'DayCalendar',\n state: 'hasFocus',\n controlled: hasFocus,\n default: autoFocus ?? false\n });\n const [internalFocusedDay, setInternalFocusedDay] = React.useState(() => focusedDay || now);\n const handleDaySelect = useEventCallback(day => {\n if (readOnly) {\n return;\n }\n onSelectedDaysChange(day);\n });\n const focusDay = day => {\n if (!isDateDisabled(day)) {\n onFocusedDayChange(day);\n setInternalFocusedDay(day);\n onFocusedViewChange?.(true);\n setInternalHasFocus(true);\n }\n };\n const handleKeyDown = useEventCallback((event, day) => {\n switch (event.key) {\n case 'ArrowUp':\n focusDay(utils.addDays(day, -7));\n event.preventDefault();\n break;\n case 'ArrowDown':\n focusDay(utils.addDays(day, 7));\n event.preventDefault();\n break;\n case 'ArrowLeft':\n {\n const newFocusedDayDefault = utils.addDays(day, isRtl ? 1 : -1);\n const nextAvailableMonth = utils.addMonths(day, isRtl ? 1 : -1);\n const closestDayToFocus = findClosestEnabledDate({\n utils,\n date: newFocusedDayDefault,\n minDate: isRtl ? newFocusedDayDefault : utils.startOfMonth(nextAvailableMonth),\n maxDate: isRtl ? utils.endOfMonth(nextAvailableMonth) : newFocusedDayDefault,\n isDateDisabled,\n timezone\n });\n focusDay(closestDayToFocus || newFocusedDayDefault);\n event.preventDefault();\n break;\n }\n case 'ArrowRight':\n {\n const newFocusedDayDefault = utils.addDays(day, isRtl ? -1 : 1);\n const nextAvailableMonth = utils.addMonths(day, isRtl ? -1 : 1);\n const closestDayToFocus = findClosestEnabledDate({\n utils,\n date: newFocusedDayDefault,\n minDate: isRtl ? utils.startOfMonth(nextAvailableMonth) : newFocusedDayDefault,\n maxDate: isRtl ? newFocusedDayDefault : utils.endOfMonth(nextAvailableMonth),\n isDateDisabled,\n timezone\n });\n focusDay(closestDayToFocus || newFocusedDayDefault);\n event.preventDefault();\n break;\n }\n case 'Home':\n focusDay(utils.startOfWeek(day));\n event.preventDefault();\n break;\n case 'End':\n focusDay(utils.endOfWeek(day));\n event.preventDefault();\n break;\n case 'PageUp':\n focusDay(utils.addMonths(day, 1));\n event.preventDefault();\n break;\n case 'PageDown':\n focusDay(utils.addMonths(day, -1));\n event.preventDefault();\n break;\n default:\n break;\n }\n });\n const handleFocus = useEventCallback((event, day) => focusDay(day));\n const handleBlur = useEventCallback((event, day) => {\n if (internalHasFocus && utils.isSameDay(internalFocusedDay, day)) {\n onFocusedViewChange?.(false);\n }\n });\n const currentMonthNumber = utils.getMonth(currentMonth);\n const currentYearNumber = utils.getYear(currentMonth);\n const validSelectedDays = React.useMemo(() => selectedDays.filter(day => !!day).map(day => utils.startOfDay(day)), [utils, selectedDays]);\n\n // need a new ref whenever the `key` of the transition changes: https://reactcommunity.org/react-transition-group/transition/#Transition-prop-nodeRef.\n const transitionKey = `${currentYearNumber}-${currentMonthNumber}`;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n const slideNodeRef = React.useMemo(() => /*#__PURE__*/React.createRef(), [transitionKey]);\n const focusableDay = React.useMemo(() => {\n const startOfMonth = utils.startOfMonth(currentMonth);\n const endOfMonth = utils.endOfMonth(currentMonth);\n if (isDateDisabled(internalFocusedDay) || utils.isAfterDay(internalFocusedDay, endOfMonth) || utils.isBeforeDay(internalFocusedDay, startOfMonth)) {\n return findClosestEnabledDate({\n utils,\n date: internalFocusedDay,\n minDate: startOfMonth,\n maxDate: endOfMonth,\n disablePast,\n disableFuture,\n isDateDisabled,\n timezone\n });\n }\n return internalFocusedDay;\n }, [currentMonth, disableFuture, disablePast, internalFocusedDay, isDateDisabled, utils, timezone]);\n const weeksToDisplay = React.useMemo(() => {\n const toDisplay = utils.getWeekArray(currentMonth);\n let nextMonth = utils.addMonths(currentMonth, 1);\n while (fixedWeekNumber && toDisplay.length < fixedWeekNumber) {\n const additionalWeeks = utils.getWeekArray(nextMonth);\n const hasCommonWeek = utils.isSameDay(toDisplay[toDisplay.length - 1][0], additionalWeeks[0][0]);\n additionalWeeks.slice(hasCommonWeek ? 1 : 0).forEach(week => {\n if (toDisplay.length < fixedWeekNumber) {\n toDisplay.push(week);\n }\n });\n nextMonth = utils.addMonths(nextMonth, 1);\n }\n return toDisplay;\n }, [currentMonth, fixedWeekNumber, utils]);\n return /*#__PURE__*/_jsxs(PickersCalendarDayRoot, {\n role: \"grid\",\n \"aria-labelledby\": gridLabelId,\n className: classes.root,\n children: [/*#__PURE__*/_jsxs(PickersCalendarDayHeader, {\n role: \"row\",\n className: classes.header,\n children: [displayWeekNumber && /*#__PURE__*/_jsx(PickersCalendarWeekNumberLabel, {\n variant: \"caption\",\n role: \"columnheader\",\n \"aria-label\": translations.calendarWeekNumberHeaderLabel,\n className: classes.weekNumberLabel,\n children: translations.calendarWeekNumberHeaderText\n }), getWeekdays(utils, now).map((weekday, i) => /*#__PURE__*/_jsx(PickersCalendarWeekDayLabel, {\n variant: \"caption\",\n role: \"columnheader\",\n \"aria-label\": utils.format(weekday, 'weekday'),\n className: classes.weekDayLabel,\n children: dayOfWeekFormatter(weekday)\n }, i.toString()))]\n }), loading ? /*#__PURE__*/_jsx(PickersCalendarLoadingContainer, {\n className: classes.loadingContainer,\n children: renderLoading()\n }) : /*#__PURE__*/_jsx(PickersCalendarSlideTransition, _extends({\n transKey: transitionKey,\n onExited: onMonthSwitchingAnimationEnd,\n reduceAnimations: reduceAnimations,\n slideDirection: slideDirection,\n className: clsx(className, classes.slideTransition)\n }, TransitionProps, {\n nodeRef: slideNodeRef,\n children: /*#__PURE__*/_jsx(PickersCalendarWeekContainer, {\n ref: slideNodeRef,\n role: \"rowgroup\",\n className: classes.monthContainer,\n children: weeksToDisplay.map((week, index) => /*#__PURE__*/_jsxs(PickersCalendarWeek, {\n role: \"row\",\n className: classes.weekContainer\n // fix issue of announcing row 1 as row 2\n // caused by week day labels row\n ,\n \"aria-rowindex\": index + 1,\n children: [displayWeekNumber && /*#__PURE__*/_jsx(PickersCalendarWeekNumber, {\n className: classes.weekNumber,\n role: \"rowheader\",\n \"aria-label\": translations.calendarWeekNumberAriaLabelText(utils.getWeekNumber(week[0])),\n children: translations.calendarWeekNumberText(utils.getWeekNumber(week[0]))\n }), week.map((day, dayIndex) => /*#__PURE__*/_jsx(WrappedDay, {\n parentProps: props,\n day: day,\n selectedDays: validSelectedDays,\n focusableDay: focusableDay,\n onKeyDown: handleKeyDown,\n onFocus: handleFocus,\n onBlur: handleBlur,\n onDaySelect: handleDaySelect,\n isDateDisabled: isDateDisabled,\n currentMonthNumber: currentMonthNumber,\n isViewFocused: internalHasFocus\n // fix issue of announcing column 1 as column 2 when `displayWeekNumber` is enabled\n ,\n \"aria-colindex\": dayIndex + 1\n }, day.toString()))]\n }, `week-${week[0]}`))\n })\n }))]\n });\n}","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport function getPickersMonthUtilityClass(slot) {\n return generateUtilityClass('MuiPickersMonth', slot);\n}\nexport const pickersMonthClasses = generateUtilityClasses('MuiPickersMonth', ['root', 'monthButton', 'disabled', 'selected']);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"autoFocus\", \"className\", \"children\", \"disabled\", \"selected\", \"value\", \"tabIndex\", \"onClick\", \"onKeyDown\", \"onFocus\", \"onBlur\", \"aria-current\", \"aria-label\", \"monthsPerRow\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { styled, alpha, useThemeProps } from '@mui/material/styles';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport { getPickersMonthUtilityClass, pickersMonthClasses } from \"./pickersMonthClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n selected,\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n monthButton: ['monthButton', disabled && 'disabled', selected && 'selected']\n };\n return composeClasses(slots, getPickersMonthUtilityClass, classes);\n};\nconst PickersMonthRoot = styled('div', {\n name: 'MuiPickersMonth',\n slot: 'Root',\n overridesResolver: (_, styles) => [styles.root]\n})({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flexBasis: '33.3%',\n variants: [{\n props: {\n monthsPerRow: 4\n },\n style: {\n flexBasis: '25%'\n }\n }]\n});\nconst MonthCalendarButton = styled('button', {\n name: 'MuiPickersMonth',\n slot: 'MonthButton',\n overridesResolver: (_, styles) => [styles.monthButton, {\n [`&.${pickersMonthClasses.disabled}`]: styles.disabled\n }, {\n [`&.${pickersMonthClasses.selected}`]: styles.selected\n }]\n})(({\n theme\n}) => _extends({\n color: 'unset',\n backgroundColor: 'transparent',\n border: 0,\n outline: 0\n}, theme.typography.subtitle1, {\n margin: '8px 0',\n height: 36,\n width: 72,\n borderRadius: 18,\n cursor: 'pointer',\n '&:focus': {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity)\n },\n '&:hover': {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity)\n },\n '&:disabled': {\n cursor: 'auto',\n pointerEvents: 'none'\n },\n [`&.${pickersMonthClasses.disabled}`]: {\n color: (theme.vars || theme).palette.text.secondary\n },\n [`&.${pickersMonthClasses.selected}`]: {\n color: (theme.vars || theme).palette.primary.contrastText,\n backgroundColor: (theme.vars || theme).palette.primary.main,\n '&:focus, &:hover': {\n backgroundColor: (theme.vars || theme).palette.primary.dark\n }\n }\n}));\n\n/**\n * @ignore - do not document.\n */\nexport const PickersMonth = /*#__PURE__*/React.memo(function PickersMonth(inProps) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersMonth'\n });\n const {\n autoFocus,\n className,\n children,\n disabled,\n selected,\n value,\n tabIndex,\n onClick,\n onKeyDown,\n onFocus,\n onBlur,\n 'aria-current': ariaCurrent,\n 'aria-label': ariaLabel\n // We don't want to forward this prop to the root element\n ,\n\n slots,\n slotProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ref = React.useRef(null);\n const classes = useUtilityClasses(props);\n\n // We can't forward the `autoFocus` to the button because it is a native button, not a MUI Button\n useEnhancedEffect(() => {\n if (autoFocus) {\n // `ref.current` being `null` would be a bug in MUI.\n ref.current?.focus();\n }\n }, [autoFocus]);\n const MonthButton = slots?.monthButton ?? MonthCalendarButton;\n const monthButtonProps = useSlotProps({\n elementType: MonthButton,\n externalSlotProps: slotProps?.monthButton,\n additionalProps: {\n children,\n disabled,\n tabIndex,\n ref,\n type: 'button',\n role: 'radio',\n 'aria-current': ariaCurrent,\n 'aria-checked': selected,\n 'aria-label': ariaLabel,\n onClick: event => onClick(event, value),\n onKeyDown: event => onKeyDown(event, value),\n onFocus: event => onFocus(event, value),\n onBlur: event => onBlur(event, value)\n },\n ownerState: props,\n className: classes.monthButton\n });\n return /*#__PURE__*/_jsx(PickersMonthRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: props\n }, other, {\n children: /*#__PURE__*/_jsx(MonthButton, _extends({}, monthButtonProps))\n }));\n});","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport function getMonthCalendarUtilityClass(slot) {\n return generateUtilityClass('MuiMonthCalendar', slot);\n}\nexport const monthCalendarClasses = generateUtilityClasses('MuiMonthCalendar', ['root']);","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"className\", \"value\", \"defaultValue\", \"referenceDate\", \"disabled\", \"disableFuture\", \"disablePast\", \"maxDate\", \"minDate\", \"onChange\", \"shouldDisableMonth\", \"readOnly\", \"disableHighlightToday\", \"autoFocus\", \"onMonthFocus\", \"hasFocus\", \"onFocusedViewChange\", \"monthsPerRow\", \"timezone\", \"gridLabelId\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { unstable_useControlled as useControlled, unstable_composeClasses as composeClasses, unstable_useEventCallback as useEventCallback } from '@mui/utils';\nimport { PickersMonth } from \"./PickersMonth.js\";\nimport { useUtils, useNow, useDefaultDates } from \"../internals/hooks/useUtils.js\";\nimport { getMonthCalendarUtilityClass } from \"./monthCalendarClasses.js\";\nimport { applyDefaultDate, getMonthsInYear } from \"../internals/utils/date-utils.js\";\nimport { singleItemValueManager } from \"../internals/utils/valueManagers.js\";\nimport { SECTION_TYPE_GRANULARITY } from \"../internals/utils/getDefaultReferenceDate.js\";\nimport { useControlledValueWithTimezone } from \"../internals/hooks/useValueWithTimezone.js\";\nimport { DIALOG_WIDTH } from \"../internals/constants/dimensions.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getMonthCalendarUtilityClass, classes);\n};\nexport function useMonthCalendarDefaultizedProps(props, name) {\n const utils = useUtils();\n const defaultDates = useDefaultDates();\n const themeProps = useThemeProps({\n props,\n name\n });\n return _extends({\n disableFuture: false,\n disablePast: false\n }, themeProps, {\n minDate: applyDefaultDate(utils, themeProps.minDate, defaultDates.minDate),\n maxDate: applyDefaultDate(utils, themeProps.maxDate, defaultDates.maxDate)\n });\n}\nconst MonthCalendarRoot = styled('div', {\n name: 'MuiMonthCalendar',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n display: 'flex',\n flexWrap: 'wrap',\n alignContent: 'stretch',\n padding: '0 4px',\n width: DIALOG_WIDTH,\n // avoid padding increasing width over defined\n boxSizing: 'border-box'\n});\n/**\n * Demos:\n *\n * - [DateCalendar](https://mui.com/x/react-date-pickers/date-calendar/)\n *\n * API:\n *\n * - [MonthCalendar API](https://mui.com/x/api/date-pickers/month-calendar/)\n */\nexport const MonthCalendar = /*#__PURE__*/React.forwardRef(function MonthCalendar(inProps, ref) {\n const props = useMonthCalendarDefaultizedProps(inProps, 'MuiMonthCalendar');\n const {\n className,\n value: valueProp,\n defaultValue,\n referenceDate: referenceDateProp,\n disabled,\n disableFuture,\n disablePast,\n maxDate,\n minDate,\n onChange,\n shouldDisableMonth,\n readOnly,\n autoFocus = false,\n onMonthFocus,\n hasFocus,\n onFocusedViewChange,\n monthsPerRow = 3,\n timezone: timezoneProp,\n gridLabelId,\n slots,\n slotProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n value,\n handleValueChange,\n timezone\n } = useControlledValueWithTimezone({\n name: 'MonthCalendar',\n timezone: timezoneProp,\n value: valueProp,\n defaultValue,\n referenceDate: referenceDateProp,\n onChange,\n valueManager: singleItemValueManager\n });\n const now = useNow(timezone);\n const isRtl = useRtl();\n const utils = useUtils();\n const referenceDate = React.useMemo(() => singleItemValueManager.getInitialReferenceValue({\n value,\n utils,\n props,\n timezone,\n referenceDate: referenceDateProp,\n granularity: SECTION_TYPE_GRANULARITY.month\n }), [] // eslint-disable-line react-hooks/exhaustive-deps\n );\n const ownerState = props;\n const classes = useUtilityClasses(ownerState);\n const todayMonth = React.useMemo(() => utils.getMonth(now), [utils, now]);\n const selectedMonth = React.useMemo(() => {\n if (value != null) {\n return utils.getMonth(value);\n }\n return null;\n }, [value, utils]);\n const [focusedMonth, setFocusedMonth] = React.useState(() => selectedMonth || utils.getMonth(referenceDate));\n const [internalHasFocus, setInternalHasFocus] = useControlled({\n name: 'MonthCalendar',\n state: 'hasFocus',\n controlled: hasFocus,\n default: autoFocus ?? false\n });\n const changeHasFocus = useEventCallback(newHasFocus => {\n setInternalHasFocus(newHasFocus);\n if (onFocusedViewChange) {\n onFocusedViewChange(newHasFocus);\n }\n });\n const isMonthDisabled = React.useCallback(dateToValidate => {\n const firstEnabledMonth = utils.startOfMonth(disablePast && utils.isAfter(now, minDate) ? now : minDate);\n const lastEnabledMonth = utils.startOfMonth(disableFuture && utils.isBefore(now, maxDate) ? now : maxDate);\n const monthToValidate = utils.startOfMonth(dateToValidate);\n if (utils.isBefore(monthToValidate, firstEnabledMonth)) {\n return true;\n }\n if (utils.isAfter(monthToValidate, lastEnabledMonth)) {\n return true;\n }\n if (!shouldDisableMonth) {\n return false;\n }\n return shouldDisableMonth(monthToValidate);\n }, [disableFuture, disablePast, maxDate, minDate, now, shouldDisableMonth, utils]);\n const handleMonthSelection = useEventCallback((event, month) => {\n if (readOnly) {\n return;\n }\n const newDate = utils.setMonth(value ?? referenceDate, month);\n handleValueChange(newDate);\n });\n const focusMonth = useEventCallback(month => {\n if (!isMonthDisabled(utils.setMonth(value ?? referenceDate, month))) {\n setFocusedMonth(month);\n changeHasFocus(true);\n if (onMonthFocus) {\n onMonthFocus(month);\n }\n }\n });\n React.useEffect(() => {\n setFocusedMonth(prevFocusedMonth => selectedMonth !== null && prevFocusedMonth !== selectedMonth ? selectedMonth : prevFocusedMonth);\n }, [selectedMonth]);\n const handleKeyDown = useEventCallback((event, month) => {\n const monthsInYear = 12;\n const monthsInRow = 3;\n switch (event.key) {\n case 'ArrowUp':\n focusMonth((monthsInYear + month - monthsInRow) % monthsInYear);\n event.preventDefault();\n break;\n case 'ArrowDown':\n focusMonth((monthsInYear + month + monthsInRow) % monthsInYear);\n event.preventDefault();\n break;\n case 'ArrowLeft':\n focusMonth((monthsInYear + month + (isRtl ? 1 : -1)) % monthsInYear);\n event.preventDefault();\n break;\n case 'ArrowRight':\n focusMonth((monthsInYear + month + (isRtl ? -1 : 1)) % monthsInYear);\n event.preventDefault();\n break;\n default:\n break;\n }\n });\n const handleMonthFocus = useEventCallback((event, month) => {\n focusMonth(month);\n });\n const handleMonthBlur = useEventCallback((event, month) => {\n if (focusedMonth === month) {\n changeHasFocus(false);\n }\n });\n return /*#__PURE__*/_jsx(MonthCalendarRoot, _extends({\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState,\n role: \"radiogroup\",\n \"aria-labelledby\": gridLabelId\n }, other, {\n children: getMonthsInYear(utils, value ?? referenceDate).map(month => {\n const monthNumber = utils.getMonth(month);\n const monthText = utils.format(month, 'monthShort');\n const monthLabel = utils.format(month, 'month');\n const isSelected = monthNumber === selectedMonth;\n const isDisabled = disabled || isMonthDisabled(month);\n return /*#__PURE__*/_jsx(PickersMonth, {\n selected: isSelected,\n value: monthNumber,\n onClick: handleMonthSelection,\n onKeyDown: handleKeyDown,\n autoFocus: internalHasFocus && monthNumber === focusedMonth,\n disabled: isDisabled,\n tabIndex: monthNumber === focusedMonth && !isDisabled ? 0 : -1,\n onFocus: handleMonthFocus,\n onBlur: handleMonthBlur,\n \"aria-current\": todayMonth === monthNumber ? 'date' : undefined,\n \"aria-label\": monthLabel,\n monthsPerRow: monthsPerRow,\n slots: slots,\n slotProps: slotProps,\n children: monthText\n }, monthText);\n })\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? MonthCalendar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n autoFocus: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n className: PropTypes.string,\n /**\n * The default selected value.\n * Used when the component is not controlled.\n */\n defaultValue: PropTypes.object,\n /**\n * If `true` picker is disabled\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, disable values after the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disableFuture: PropTypes.bool,\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n /**\n * If `true`, disable values before the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disablePast: PropTypes.bool,\n gridLabelId: PropTypes.string,\n hasFocus: PropTypes.bool,\n /**\n * Maximal selectable date.\n * @default 2099-12-31\n */\n maxDate: PropTypes.object,\n /**\n * Minimal selectable date.\n * @default 1900-01-01\n */\n minDate: PropTypes.object,\n /**\n * Months rendered per row.\n * @default 3\n */\n monthsPerRow: PropTypes.oneOf([3, 4]),\n /**\n * Callback fired when the value changes.\n * @template TDate\n * @param {TDate} value The new value.\n */\n onChange: PropTypes.func,\n onFocusedViewChange: PropTypes.func,\n onMonthFocus: PropTypes.func,\n /**\n * If `true` picker is readonly\n */\n readOnly: PropTypes.bool,\n /**\n * The date used to generate the new value when both `value` and `defaultValue` are empty.\n * @default The closest valid month using the validation props, except callbacks such as `shouldDisableMonth`.\n */\n referenceDate: PropTypes.object,\n /**\n * Disable specific month.\n * @template TDate\n * @param {TDate} month The month to test.\n * @returns {boolean} If `true`, the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * Overridable component slots.\n * @default {}\n */\n slots: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Choose which timezone to use for the value.\n * Example: \"default\", \"system\", \"UTC\", \"America/New_York\".\n * If you pass values from other timezones to some props, they will be converted to this timezone before being used.\n * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.\n * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.\n */\n timezone: PropTypes.string,\n /**\n * The selected value.\n * Used when the component is controlled.\n */\n value: PropTypes.object\n} : void 0;","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport function getPickersYearUtilityClass(slot) {\n return generateUtilityClass('MuiPickersYear', slot);\n}\nexport const pickersYearClasses = generateUtilityClasses('MuiPickersYear', ['root', 'yearButton', 'selected', 'disabled']);","import _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"autoFocus\", \"className\", \"children\", \"disabled\", \"selected\", \"value\", \"tabIndex\", \"onClick\", \"onKeyDown\", \"onFocus\", \"onBlur\", \"aria-current\", \"yearsPerRow\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport { styled, alpha, useThemeProps } from '@mui/material/styles';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport composeClasses from '@mui/utils/composeClasses';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport { getPickersYearUtilityClass, pickersYearClasses } from \"./pickersYearClasses.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n selected,\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n yearButton: ['yearButton', disabled && 'disabled', selected && 'selected']\n };\n return composeClasses(slots, getPickersYearUtilityClass, classes);\n};\nconst PickersYearRoot = styled('div', {\n name: 'MuiPickersYear',\n slot: 'Root',\n overridesResolver: (_, styles) => [styles.root]\n})({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flexBasis: '33.3%',\n variants: [{\n props: {\n yearsPerRow: 4\n },\n style: {\n flexBasis: '25%'\n }\n }]\n});\nconst YearCalendarButton = styled('button', {\n name: 'MuiPickersYear',\n slot: 'YearButton',\n overridesResolver: (_, styles) => [styles.yearButton, {\n [`&.${pickersYearClasses.disabled}`]: styles.disabled\n }, {\n [`&.${pickersYearClasses.selected}`]: styles.selected\n }]\n})(({\n theme\n}) => _extends({\n color: 'unset',\n backgroundColor: 'transparent',\n border: 0,\n outline: 0\n}, theme.typography.subtitle1, {\n margin: '6px 0',\n height: 36,\n width: 72,\n borderRadius: 18,\n cursor: 'pointer',\n '&:focus': {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.focusOpacity})` : alpha(theme.palette.action.active, theme.palette.action.focusOpacity)\n },\n '&:hover': {\n backgroundColor: theme.vars ? `rgba(${theme.vars.palette.action.activeChannel} / ${theme.vars.palette.action.hoverOpacity})` : alpha(theme.palette.action.active, theme.palette.action.hoverOpacity)\n },\n '&:disabled': {\n cursor: 'auto',\n pointerEvents: 'none'\n },\n [`&.${pickersYearClasses.disabled}`]: {\n color: (theme.vars || theme).palette.text.secondary\n },\n [`&.${pickersYearClasses.selected}`]: {\n color: (theme.vars || theme).palette.primary.contrastText,\n backgroundColor: (theme.vars || theme).palette.primary.main,\n '&:focus, &:hover': {\n backgroundColor: (theme.vars || theme).palette.primary.dark\n }\n }\n}));\n\n/**\n * @ignore - internal component.\n */\nexport const PickersYear = /*#__PURE__*/React.memo(function PickersYear(inProps) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersYear'\n });\n const {\n autoFocus,\n className,\n children,\n disabled,\n selected,\n value,\n tabIndex,\n onClick,\n onKeyDown,\n onFocus,\n onBlur,\n 'aria-current': ariaCurrent\n // We don't want to forward this prop to the root element\n ,\n\n slots,\n slotProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ref = React.useRef(null);\n const classes = useUtilityClasses(props);\n\n // We can't forward the `autoFocus` to the button because it is a native button, not a MUI Button\n useEnhancedEffect(() => {\n if (autoFocus) {\n // `ref.current` being `null` would be a bug in MUI.\n ref.current?.focus();\n }\n }, [autoFocus]);\n const YearButton = slots?.yearButton ?? YearCalendarButton;\n const yearButtonProps = useSlotProps({\n elementType: YearButton,\n externalSlotProps: slotProps?.yearButton,\n additionalProps: {\n children,\n disabled,\n tabIndex,\n ref,\n type: 'button',\n role: 'radio',\n 'aria-current': ariaCurrent,\n 'aria-checked': selected,\n onClick: event => onClick(event, value),\n onKeyDown: event => onKeyDown(event, value),\n onFocus: event => onFocus(event, value),\n onBlur: event => onBlur(event, value)\n },\n ownerState: props,\n className: classes.yearButton\n });\n return /*#__PURE__*/_jsx(PickersYearRoot, _extends({\n className: clsx(classes.root, className),\n ownerState: props\n }, other, {\n children: /*#__PURE__*/_jsx(YearButton, _extends({}, yearButtonProps))\n }));\n});","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport function getYearCalendarUtilityClass(slot) {\n return generateUtilityClass('MuiYearCalendar', slot);\n}\nexport const yearCalendarClasses = generateUtilityClasses('MuiYearCalendar', ['root']);","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"autoFocus\", \"className\", \"value\", \"defaultValue\", \"referenceDate\", \"disabled\", \"disableFuture\", \"disablePast\", \"maxDate\", \"minDate\", \"onChange\", \"readOnly\", \"shouldDisableYear\", \"disableHighlightToday\", \"onYearFocus\", \"hasFocus\", \"onFocusedViewChange\", \"yearsOrder\", \"yearsPerRow\", \"timezone\", \"gridLabelId\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { unstable_useForkRef as useForkRef, unstable_composeClasses as composeClasses, unstable_useControlled as useControlled, unstable_useEventCallback as useEventCallback } from '@mui/utils';\nimport { PickersYear } from \"./PickersYear.js\";\nimport { useUtils, useNow, useDefaultDates } from \"../internals/hooks/useUtils.js\";\nimport { getYearCalendarUtilityClass } from \"./yearCalendarClasses.js\";\nimport { applyDefaultDate } from \"../internals/utils/date-utils.js\";\nimport { singleItemValueManager } from \"../internals/utils/valueManagers.js\";\nimport { SECTION_TYPE_GRANULARITY } from \"../internals/utils/getDefaultReferenceDate.js\";\nimport { useControlledValueWithTimezone } from \"../internals/hooks/useValueWithTimezone.js\";\nimport { DIALOG_WIDTH, MAX_CALENDAR_HEIGHT } from \"../internals/constants/dimensions.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root']\n };\n return composeClasses(slots, getYearCalendarUtilityClass, classes);\n};\nfunction useYearCalendarDefaultizedProps(props, name) {\n const utils = useUtils();\n const defaultDates = useDefaultDates();\n const themeProps = useThemeProps({\n props,\n name\n });\n return _extends({\n disablePast: false,\n disableFuture: false\n }, themeProps, {\n yearsPerRow: themeProps.yearsPerRow ?? 3,\n minDate: applyDefaultDate(utils, themeProps.minDate, defaultDates.minDate),\n maxDate: applyDefaultDate(utils, themeProps.maxDate, defaultDates.maxDate)\n });\n}\nconst YearCalendarRoot = styled('div', {\n name: 'MuiYearCalendar',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n display: 'flex',\n flexDirection: 'row',\n flexWrap: 'wrap',\n overflowY: 'auto',\n height: '100%',\n padding: '0 4px',\n width: DIALOG_WIDTH,\n maxHeight: MAX_CALENDAR_HEIGHT,\n // avoid padding increasing width over defined\n boxSizing: 'border-box',\n position: 'relative'\n});\n/**\n * Demos:\n *\n * - [DateCalendar](https://mui.com/x/react-date-pickers/date-calendar/)\n *\n * API:\n *\n * - [YearCalendar API](https://mui.com/x/api/date-pickers/year-calendar/)\n */\nexport const YearCalendar = /*#__PURE__*/React.forwardRef(function YearCalendar(inProps, ref) {\n const props = useYearCalendarDefaultizedProps(inProps, 'MuiYearCalendar');\n const {\n autoFocus,\n className,\n value: valueProp,\n defaultValue,\n referenceDate: referenceDateProp,\n disabled,\n disableFuture,\n disablePast,\n maxDate,\n minDate,\n onChange,\n readOnly,\n shouldDisableYear,\n onYearFocus,\n hasFocus,\n onFocusedViewChange,\n yearsOrder = 'asc',\n yearsPerRow,\n timezone: timezoneProp,\n gridLabelId,\n slots,\n slotProps\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n value,\n handleValueChange,\n timezone\n } = useControlledValueWithTimezone({\n name: 'YearCalendar',\n timezone: timezoneProp,\n value: valueProp,\n defaultValue,\n referenceDate: referenceDateProp,\n onChange,\n valueManager: singleItemValueManager\n });\n const now = useNow(timezone);\n const isRtl = useRtl();\n const utils = useUtils();\n const referenceDate = React.useMemo(() => singleItemValueManager.getInitialReferenceValue({\n value,\n utils,\n props,\n timezone,\n referenceDate: referenceDateProp,\n granularity: SECTION_TYPE_GRANULARITY.year\n }), [] // eslint-disable-line react-hooks/exhaustive-deps\n );\n const ownerState = props;\n const classes = useUtilityClasses(ownerState);\n const todayYear = React.useMemo(() => utils.getYear(now), [utils, now]);\n const selectedYear = React.useMemo(() => {\n if (value != null) {\n return utils.getYear(value);\n }\n return null;\n }, [value, utils]);\n const [focusedYear, setFocusedYear] = React.useState(() => selectedYear || utils.getYear(referenceDate));\n const [internalHasFocus, setInternalHasFocus] = useControlled({\n name: 'YearCalendar',\n state: 'hasFocus',\n controlled: hasFocus,\n default: autoFocus ?? false\n });\n const changeHasFocus = useEventCallback(newHasFocus => {\n setInternalHasFocus(newHasFocus);\n if (onFocusedViewChange) {\n onFocusedViewChange(newHasFocus);\n }\n });\n const isYearDisabled = React.useCallback(dateToValidate => {\n if (disablePast && utils.isBeforeYear(dateToValidate, now)) {\n return true;\n }\n if (disableFuture && utils.isAfterYear(dateToValidate, now)) {\n return true;\n }\n if (minDate && utils.isBeforeYear(dateToValidate, minDate)) {\n return true;\n }\n if (maxDate && utils.isAfterYear(dateToValidate, maxDate)) {\n return true;\n }\n if (!shouldDisableYear) {\n return false;\n }\n const yearToValidate = utils.startOfYear(dateToValidate);\n return shouldDisableYear(yearToValidate);\n }, [disableFuture, disablePast, maxDate, minDate, now, shouldDisableYear, utils]);\n const handleYearSelection = useEventCallback((event, year) => {\n if (readOnly) {\n return;\n }\n const newDate = utils.setYear(value ?? referenceDate, year);\n handleValueChange(newDate);\n });\n const focusYear = useEventCallback(year => {\n if (!isYearDisabled(utils.setYear(value ?? referenceDate, year))) {\n setFocusedYear(year);\n changeHasFocus(true);\n onYearFocus?.(year);\n }\n });\n React.useEffect(() => {\n setFocusedYear(prevFocusedYear => selectedYear !== null && prevFocusedYear !== selectedYear ? selectedYear : prevFocusedYear);\n }, [selectedYear]);\n const verticalDirection = yearsOrder !== 'desc' ? yearsPerRow * 1 : yearsPerRow * -1;\n const horizontalDirection = isRtl && yearsOrder === 'asc' || !isRtl && yearsOrder === 'desc' ? -1 : 1;\n const handleKeyDown = useEventCallback((event, year) => {\n switch (event.key) {\n case 'ArrowUp':\n focusYear(year - verticalDirection);\n event.preventDefault();\n break;\n case 'ArrowDown':\n focusYear(year + verticalDirection);\n event.preventDefault();\n break;\n case 'ArrowLeft':\n focusYear(year - horizontalDirection);\n event.preventDefault();\n break;\n case 'ArrowRight':\n focusYear(year + horizontalDirection);\n event.preventDefault();\n break;\n default:\n break;\n }\n });\n const handleYearFocus = useEventCallback((event, year) => {\n focusYear(year);\n });\n const handleYearBlur = useEventCallback((event, year) => {\n if (focusedYear === year) {\n changeHasFocus(false);\n }\n });\n const scrollerRef = React.useRef(null);\n const handleRef = useForkRef(ref, scrollerRef);\n React.useEffect(() => {\n if (autoFocus || scrollerRef.current === null) {\n return;\n }\n const tabbableButton = scrollerRef.current.querySelector('[tabindex=\"0\"]');\n if (!tabbableButton) {\n return;\n }\n\n // Taken from useScroll in x-data-grid, but vertically centered\n const offsetHeight = tabbableButton.offsetHeight;\n const offsetTop = tabbableButton.offsetTop;\n const clientHeight = scrollerRef.current.clientHeight;\n const scrollTop = scrollerRef.current.scrollTop;\n const elementBottom = offsetTop + offsetHeight;\n if (offsetHeight > clientHeight || offsetTop < scrollTop) {\n // Button already visible\n return;\n }\n scrollerRef.current.scrollTop = elementBottom - clientHeight / 2 - offsetHeight / 2;\n }, [autoFocus]);\n const yearRange = utils.getYearRange([minDate, maxDate]);\n if (yearsOrder === 'desc') {\n yearRange.reverse();\n }\n return /*#__PURE__*/_jsx(YearCalendarRoot, _extends({\n ref: handleRef,\n className: clsx(classes.root, className),\n ownerState: ownerState,\n role: \"radiogroup\",\n \"aria-labelledby\": gridLabelId\n }, other, {\n children: yearRange.map(year => {\n const yearNumber = utils.getYear(year);\n const isSelected = yearNumber === selectedYear;\n const isDisabled = disabled || isYearDisabled(year);\n return /*#__PURE__*/_jsx(PickersYear, {\n selected: isSelected,\n value: yearNumber,\n onClick: handleYearSelection,\n onKeyDown: handleKeyDown,\n autoFocus: internalHasFocus && yearNumber === focusedYear,\n disabled: isDisabled,\n tabIndex: yearNumber === focusedYear && !isDisabled ? 0 : -1,\n onFocus: handleYearFocus,\n onBlur: handleYearBlur,\n \"aria-current\": todayYear === yearNumber ? 'date' : undefined,\n yearsPerRow: yearsPerRow,\n slots: slots,\n slotProps: slotProps,\n children: utils.format(year, 'year')\n }, utils.format(year, 'year'));\n })\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? YearCalendar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n autoFocus: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n className: PropTypes.string,\n /**\n * The default selected value.\n * Used when the component is not controlled.\n */\n defaultValue: PropTypes.object,\n /**\n * If `true` picker is disabled\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, disable values after the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disableFuture: PropTypes.bool,\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n /**\n * If `true`, disable values before the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disablePast: PropTypes.bool,\n gridLabelId: PropTypes.string,\n hasFocus: PropTypes.bool,\n /**\n * Maximal selectable date.\n * @default 2099-12-31\n */\n maxDate: PropTypes.object,\n /**\n * Minimal selectable date.\n * @default 1900-01-01\n */\n minDate: PropTypes.object,\n /**\n * Callback fired when the value changes.\n * @template TDate\n * @param {TDate} value The new value.\n */\n onChange: PropTypes.func,\n onFocusedViewChange: PropTypes.func,\n onYearFocus: PropTypes.func,\n /**\n * If `true` picker is readonly\n */\n readOnly: PropTypes.bool,\n /**\n * The date used to generate the new value when both `value` and `defaultValue` are empty.\n * @default The closest valid year using the validation props, except callbacks such as `shouldDisableYear`.\n */\n referenceDate: PropTypes.object,\n /**\n * Disable specific year.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} If `true`, the year will be disabled.\n */\n shouldDisableYear: PropTypes.func,\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * Overridable component slots.\n * @default {}\n */\n slots: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Choose which timezone to use for the value.\n * Example: \"default\", \"system\", \"UTC\", \"America/New_York\".\n * If you pass values from other timezones to some props, they will be converted to this timezone before being used.\n * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.\n * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.\n */\n timezone: PropTypes.string,\n /**\n * The selected value.\n * Used when the component is controlled.\n */\n value: PropTypes.object,\n /**\n * Years are displayed in ascending (chronological) order by default.\n * If `desc`, years are displayed in descending order.\n * @default 'asc'\n */\n yearsOrder: PropTypes.oneOf(['asc', 'desc']),\n /**\n * Years rendered per row.\n * @default 3\n */\n yearsPerRow: PropTypes.oneOf([3, 4])\n} : void 0;","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport const getPickersCalendarHeaderUtilityClass = slot => generateUtilityClass('MuiPickersCalendarHeader', slot);\nexport const pickersCalendarHeaderClasses = generateUtilityClasses('MuiPickersCalendarHeader', ['root', 'labelContainer', 'label', 'switchViewButton', 'switchViewIcon']);","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"slots\", \"slotProps\", \"currentMonth\", \"disabled\", \"disableFuture\", \"disablePast\", \"maxDate\", \"minDate\", \"onMonthChange\", \"onViewChange\", \"view\", \"reduceAnimations\", \"views\", \"labelId\", \"className\", \"timezone\", \"format\"],\n _excluded2 = [\"ownerState\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport Fade from '@mui/material/Fade';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport composeClasses from '@mui/utils/composeClasses';\nimport IconButton from '@mui/material/IconButton';\nimport { usePickersTranslations } from \"../hooks/usePickersTranslations.js\";\nimport { useUtils } from \"../internals/hooks/useUtils.js\";\nimport { PickersFadeTransitionGroup } from \"../DateCalendar/PickersFadeTransitionGroup.js\";\nimport { ArrowDropDownIcon } from \"../icons/index.js\";\nimport { PickersArrowSwitcher } from \"../internals/components/PickersArrowSwitcher/index.js\";\nimport { usePreviousMonthDisabled, useNextMonthDisabled } from \"../internals/hooks/date-helpers-hooks.js\";\nimport { getPickersCalendarHeaderUtilityClass, pickersCalendarHeaderClasses } from \"./pickersCalendarHeaderClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n labelContainer: ['labelContainer'],\n label: ['label'],\n switchViewButton: ['switchViewButton'],\n switchViewIcon: ['switchViewIcon']\n };\n return composeClasses(slots, getPickersCalendarHeaderUtilityClass, classes);\n};\nconst PickersCalendarHeaderRoot = styled('div', {\n name: 'MuiPickersCalendarHeader',\n slot: 'Root',\n overridesResolver: (_, styles) => styles.root\n})({\n display: 'flex',\n alignItems: 'center',\n marginTop: 12,\n marginBottom: 4,\n paddingLeft: 24,\n paddingRight: 12,\n // prevent jumping in safari\n maxHeight: 40,\n minHeight: 40\n});\nconst PickersCalendarHeaderLabelContainer = styled('div', {\n name: 'MuiPickersCalendarHeader',\n slot: 'LabelContainer',\n overridesResolver: (_, styles) => styles.labelContainer\n})(({\n theme\n}) => _extends({\n display: 'flex',\n overflow: 'hidden',\n alignItems: 'center',\n cursor: 'pointer',\n marginRight: 'auto'\n}, theme.typography.body1, {\n fontWeight: theme.typography.fontWeightMedium\n}));\nconst PickersCalendarHeaderLabel = styled('div', {\n name: 'MuiPickersCalendarHeader',\n slot: 'Label',\n overridesResolver: (_, styles) => styles.label\n})({\n marginRight: 6\n});\nconst PickersCalendarHeaderSwitchViewButton = styled(IconButton, {\n name: 'MuiPickersCalendarHeader',\n slot: 'SwitchViewButton',\n overridesResolver: (_, styles) => styles.switchViewButton\n})({\n marginRight: 'auto',\n variants: [{\n props: {\n view: 'year'\n },\n style: {\n [`.${pickersCalendarHeaderClasses.switchViewIcon}`]: {\n transform: 'rotate(180deg)'\n }\n }\n }]\n});\nconst PickersCalendarHeaderSwitchViewIcon = styled(ArrowDropDownIcon, {\n name: 'MuiPickersCalendarHeader',\n slot: 'SwitchViewIcon',\n overridesResolver: (_, styles) => styles.switchViewIcon\n})(({\n theme\n}) => ({\n willChange: 'transform',\n transition: theme.transitions.create('transform'),\n transform: 'rotate(0deg)'\n}));\n/**\n * Demos:\n *\n * - [DateCalendar](https://mui.com/x/react-date-pickers/date-calendar/)\n * - [DateRangeCalendar](https://mui.com/x/react-date-pickers/date-range-calendar/)\n * - [Custom slots and subcomponents](https://mui.com/x/react-date-pickers/custom-components/)\n *\n * API:\n *\n * - [PickersCalendarHeader API](https://mui.com/x/api/date-pickers/pickers-calendar-header/)\n */\nconst PickersCalendarHeader = /*#__PURE__*/React.forwardRef(function PickersCalendarHeader(inProps, ref) {\n const translations = usePickersTranslations();\n const utils = useUtils();\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersCalendarHeader'\n });\n const {\n slots,\n slotProps,\n currentMonth: month,\n disabled,\n disableFuture,\n disablePast,\n maxDate,\n minDate,\n onMonthChange,\n onViewChange,\n view,\n reduceAnimations,\n views,\n labelId,\n className,\n timezone,\n format = `${utils.formats.month} ${utils.formats.year}`\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = props;\n const classes = useUtilityClasses(props);\n const SwitchViewButton = slots?.switchViewButton ?? PickersCalendarHeaderSwitchViewButton;\n const switchViewButtonProps = useSlotProps({\n elementType: SwitchViewButton,\n externalSlotProps: slotProps?.switchViewButton,\n additionalProps: {\n size: 'small',\n 'aria-label': translations.calendarViewSwitchingButtonAriaLabel(view)\n },\n ownerState,\n className: classes.switchViewButton\n });\n const SwitchViewIcon = slots?.switchViewIcon ?? PickersCalendarHeaderSwitchViewIcon;\n // The spread is here to avoid this bug mui/material-ui#34056\n const _useSlotProps = useSlotProps({\n elementType: SwitchViewIcon,\n externalSlotProps: slotProps?.switchViewIcon,\n ownerState,\n className: classes.switchViewIcon\n }),\n switchViewIconProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);\n const selectNextMonth = () => onMonthChange(utils.addMonths(month, 1), 'left');\n const selectPreviousMonth = () => onMonthChange(utils.addMonths(month, -1), 'right');\n const isNextMonthDisabled = useNextMonthDisabled(month, {\n disableFuture,\n maxDate,\n timezone\n });\n const isPreviousMonthDisabled = usePreviousMonthDisabled(month, {\n disablePast,\n minDate,\n timezone\n });\n const handleToggleView = () => {\n if (views.length === 1 || !onViewChange || disabled) {\n return;\n }\n if (views.length === 2) {\n onViewChange(views.find(el => el !== view) || views[0]);\n } else {\n // switching only between first 2\n const nextIndexToOpen = views.indexOf(view) !== 0 ? 0 : 1;\n onViewChange(views[nextIndexToOpen]);\n }\n };\n\n // No need to display more information\n if (views.length === 1 && views[0] === 'year') {\n return null;\n }\n const label = utils.formatByString(month, format);\n return /*#__PURE__*/_jsxs(PickersCalendarHeaderRoot, _extends({}, other, {\n ownerState: ownerState,\n className: clsx(classes.root, className),\n ref: ref,\n children: [/*#__PURE__*/_jsxs(PickersCalendarHeaderLabelContainer, {\n role: \"presentation\",\n onClick: handleToggleView,\n ownerState: ownerState\n // putting this on the label item element below breaks when using transition\n ,\n \"aria-live\": \"polite\",\n className: classes.labelContainer,\n children: [/*#__PURE__*/_jsx(PickersFadeTransitionGroup, {\n reduceAnimations: reduceAnimations,\n transKey: label,\n children: /*#__PURE__*/_jsx(PickersCalendarHeaderLabel, {\n id: labelId,\n ownerState: ownerState,\n className: classes.label,\n children: label\n })\n }), views.length > 1 && !disabled && /*#__PURE__*/_jsx(SwitchViewButton, _extends({}, switchViewButtonProps, {\n children: /*#__PURE__*/_jsx(SwitchViewIcon, _extends({}, switchViewIconProps))\n }))]\n }), /*#__PURE__*/_jsx(Fade, {\n in: view === 'day',\n appear: !reduceAnimations,\n enter: !reduceAnimations,\n children: /*#__PURE__*/_jsx(PickersArrowSwitcher, {\n slots: slots,\n slotProps: slotProps,\n onGoToPrevious: selectPreviousMonth,\n isPreviousDisabled: isPreviousMonthDisabled,\n previousLabel: translations.previousMonth,\n onGoToNext: selectNextMonth,\n isNextDisabled: isNextMonthDisabled,\n nextLabel: translations.nextMonth\n })\n })]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? PickersCalendarHeader.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n className: PropTypes.string,\n currentMonth: PropTypes.object.isRequired,\n disabled: PropTypes.bool,\n disableFuture: PropTypes.bool,\n disablePast: PropTypes.bool,\n /**\n * Format used to display the date.\n * @default `${adapter.formats.month} ${adapter.formats.year}`\n */\n format: PropTypes.string,\n /**\n * Id of the calendar text element.\n * It is used to establish an `aria-labelledby` relationship with the calendar `grid` element.\n */\n labelId: PropTypes.string,\n maxDate: PropTypes.object.isRequired,\n minDate: PropTypes.object.isRequired,\n onMonthChange: PropTypes.func.isRequired,\n onViewChange: PropTypes.func,\n reduceAnimations: PropTypes.bool.isRequired,\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * Overridable component slots.\n * @default {}\n */\n slots: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n timezone: PropTypes.string.isRequired,\n view: PropTypes.oneOf(['day', 'month', 'year']).isRequired,\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired).isRequired\n} : void 0;\nexport { PickersCalendarHeader };","import useMediaQuery from '@mui/material/useMediaQuery';\nconst PREFERS_REDUCED_MOTION = '@media (prefers-reduced-motion: reduce)';\n\n// detect if user agent has Android version < 10 or iOS version < 13\nconst mobileVersionMatches = typeof navigator !== 'undefined' && navigator.userAgent.match(/android\\s(\\d+)|OS\\s(\\d+)/i);\nconst androidVersion = mobileVersionMatches && mobileVersionMatches[1] ? parseInt(mobileVersionMatches[1], 10) : null;\nconst iOSVersion = mobileVersionMatches && mobileVersionMatches[2] ? parseInt(mobileVersionMatches[2], 10) : null;\nexport const slowAnimationDevices = androidVersion && androidVersion < 10 || iOSVersion && iOSVersion < 13 || false;\nexport const useDefaultReduceAnimations = () => {\n const prefersReduced = useMediaQuery(PREFERS_REDUCED_MOTION, {\n defaultMatches: false\n });\n return prefersReduced || slowAnimationDevices;\n};","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport const getDateCalendarUtilityClass = slot => generateUtilityClass('MuiDateCalendar', slot);\nexport const dateCalendarClasses = generateUtilityClasses('MuiDateCalendar', ['root', 'viewTransitionContainer']);","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"autoFocus\", \"onViewChange\", \"value\", \"defaultValue\", \"referenceDate\", \"disableFuture\", \"disablePast\", \"onChange\", \"onYearChange\", \"onMonthChange\", \"reduceAnimations\", \"shouldDisableDate\", \"shouldDisableMonth\", \"shouldDisableYear\", \"view\", \"views\", \"openTo\", \"className\", \"disabled\", \"readOnly\", \"minDate\", \"maxDate\", \"disableHighlightToday\", \"focusedView\", \"onFocusedViewChange\", \"showDaysOutsideCurrentMonth\", \"fixedWeekNumber\", \"dayOfWeekFormatter\", \"slots\", \"slotProps\", \"loading\", \"renderLoading\", \"displayWeekNumber\", \"yearsOrder\", \"yearsPerRow\", \"monthsPerRow\", \"timezone\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { unstable_composeClasses as composeClasses, unstable_useId as useId, unstable_useEventCallback as useEventCallback } from '@mui/utils';\nimport { useCalendarState } from \"./useCalendarState.js\";\nimport { useDefaultDates, useUtils } from \"../internals/hooks/useUtils.js\";\nimport { PickersFadeTransitionGroup } from \"./PickersFadeTransitionGroup.js\";\nimport { DayCalendar } from \"./DayCalendar.js\";\nimport { MonthCalendar } from \"../MonthCalendar/index.js\";\nimport { YearCalendar } from \"../YearCalendar/index.js\";\nimport { useViews } from \"../internals/hooks/useViews.js\";\nimport { PickersCalendarHeader } from \"../PickersCalendarHeader/index.js\";\nimport { findClosestEnabledDate, applyDefaultDate, mergeDateAndTime } from \"../internals/utils/date-utils.js\";\nimport { PickerViewRoot } from \"../internals/components/PickerViewRoot/index.js\";\nimport { useDefaultReduceAnimations } from \"../internals/hooks/useDefaultReduceAnimations.js\";\nimport { getDateCalendarUtilityClass } from \"./dateCalendarClasses.js\";\nimport { useControlledValueWithTimezone } from \"../internals/hooks/useValueWithTimezone.js\";\nimport { singleItemValueManager } from \"../internals/utils/valueManagers.js\";\nimport { VIEW_HEIGHT } from \"../internals/constants/dimensions.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n viewTransitionContainer: ['viewTransitionContainer']\n };\n return composeClasses(slots, getDateCalendarUtilityClass, classes);\n};\nfunction useDateCalendarDefaultizedProps(props, name) {\n const utils = useUtils();\n const defaultDates = useDefaultDates();\n const defaultReduceAnimations = useDefaultReduceAnimations();\n const themeProps = useThemeProps({\n props,\n name\n });\n return _extends({}, themeProps, {\n loading: themeProps.loading ?? false,\n disablePast: themeProps.disablePast ?? false,\n disableFuture: themeProps.disableFuture ?? false,\n openTo: themeProps.openTo ?? 'day',\n views: themeProps.views ?? ['year', 'day'],\n reduceAnimations: themeProps.reduceAnimations ?? defaultReduceAnimations,\n renderLoading: themeProps.renderLoading ?? (() => /*#__PURE__*/_jsx(\"span\", {\n children: \"...\"\n })),\n minDate: applyDefaultDate(utils, themeProps.minDate, defaultDates.minDate),\n maxDate: applyDefaultDate(utils, themeProps.maxDate, defaultDates.maxDate)\n });\n}\nconst DateCalendarRoot = styled(PickerViewRoot, {\n name: 'MuiDateCalendar',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n display: 'flex',\n flexDirection: 'column',\n height: VIEW_HEIGHT\n});\nconst DateCalendarViewTransitionContainer = styled(PickersFadeTransitionGroup, {\n name: 'MuiDateCalendar',\n slot: 'ViewTransitionContainer',\n overridesResolver: (props, styles) => styles.viewTransitionContainer\n})({});\n/**\n * Demos:\n *\n * - [DatePicker](https://mui.com/x/react-date-pickers/date-picker/)\n * - [DateCalendar](https://mui.com/x/react-date-pickers/date-calendar/)\n * - [Validation](https://mui.com/x/react-date-pickers/validation/)\n *\n * API:\n *\n * - [DateCalendar API](https://mui.com/x/api/date-pickers/date-calendar/)\n */\nexport const DateCalendar = /*#__PURE__*/React.forwardRef(function DateCalendar(inProps, ref) {\n const utils = useUtils();\n const id = useId();\n const props = useDateCalendarDefaultizedProps(inProps, 'MuiDateCalendar');\n const {\n autoFocus,\n onViewChange,\n value: valueProp,\n defaultValue,\n referenceDate: referenceDateProp,\n disableFuture,\n disablePast,\n onChange,\n onYearChange,\n onMonthChange,\n reduceAnimations,\n shouldDisableDate,\n shouldDisableMonth,\n shouldDisableYear,\n view: inView,\n views,\n openTo,\n className,\n disabled,\n readOnly,\n minDate,\n maxDate,\n disableHighlightToday,\n focusedView: inFocusedView,\n onFocusedViewChange,\n showDaysOutsideCurrentMonth,\n fixedWeekNumber,\n dayOfWeekFormatter,\n slots,\n slotProps,\n loading,\n renderLoading,\n displayWeekNumber,\n yearsOrder,\n yearsPerRow,\n monthsPerRow,\n timezone: timezoneProp\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n value,\n handleValueChange,\n timezone\n } = useControlledValueWithTimezone({\n name: 'DateCalendar',\n timezone: timezoneProp,\n value: valueProp,\n defaultValue,\n referenceDate: referenceDateProp,\n onChange,\n valueManager: singleItemValueManager\n });\n const {\n view,\n setView,\n focusedView,\n setFocusedView,\n goToNextView,\n setValueAndGoToNextView\n } = useViews({\n view: inView,\n views,\n openTo,\n onChange: handleValueChange,\n onViewChange,\n autoFocus,\n focusedView: inFocusedView,\n onFocusedViewChange\n });\n const {\n referenceDate,\n calendarState,\n changeFocusedDay,\n changeMonth,\n handleChangeMonth,\n isDateDisabled,\n onMonthSwitchingAnimationEnd\n } = useCalendarState({\n value,\n referenceDate: referenceDateProp,\n reduceAnimations,\n onMonthChange,\n minDate,\n maxDate,\n shouldDisableDate,\n disablePast,\n disableFuture,\n timezone\n });\n\n // When disabled, limit the view to the selected date\n const minDateWithDisabled = disabled && value || minDate;\n const maxDateWithDisabled = disabled && value || maxDate;\n const gridLabelId = `${id}-grid-label`;\n const hasFocus = focusedView !== null;\n const CalendarHeader = slots?.calendarHeader ?? PickersCalendarHeader;\n const calendarHeaderProps = useSlotProps({\n elementType: CalendarHeader,\n externalSlotProps: slotProps?.calendarHeader,\n additionalProps: {\n views,\n view,\n currentMonth: calendarState.currentMonth,\n onViewChange: setView,\n onMonthChange: (newMonth, direction) => handleChangeMonth({\n newMonth,\n direction\n }),\n minDate: minDateWithDisabled,\n maxDate: maxDateWithDisabled,\n disabled,\n disablePast,\n disableFuture,\n reduceAnimations,\n timezone,\n labelId: gridLabelId\n },\n ownerState: props\n });\n const handleDateMonthChange = useEventCallback(newDate => {\n const startOfMonth = utils.startOfMonth(newDate);\n const endOfMonth = utils.endOfMonth(newDate);\n const closestEnabledDate = isDateDisabled(newDate) ? findClosestEnabledDate({\n utils,\n date: newDate,\n minDate: utils.isBefore(minDate, startOfMonth) ? startOfMonth : minDate,\n maxDate: utils.isAfter(maxDate, endOfMonth) ? endOfMonth : maxDate,\n disablePast,\n disableFuture,\n isDateDisabled,\n timezone\n }) : newDate;\n if (closestEnabledDate) {\n setValueAndGoToNextView(closestEnabledDate, 'finish');\n onMonthChange?.(startOfMonth);\n } else {\n goToNextView();\n changeMonth(startOfMonth);\n }\n changeFocusedDay(closestEnabledDate, true);\n });\n const handleDateYearChange = useEventCallback(newDate => {\n const startOfYear = utils.startOfYear(newDate);\n const endOfYear = utils.endOfYear(newDate);\n const closestEnabledDate = isDateDisabled(newDate) ? findClosestEnabledDate({\n utils,\n date: newDate,\n minDate: utils.isBefore(minDate, startOfYear) ? startOfYear : minDate,\n maxDate: utils.isAfter(maxDate, endOfYear) ? endOfYear : maxDate,\n disablePast,\n disableFuture,\n isDateDisabled,\n timezone\n }) : newDate;\n if (closestEnabledDate) {\n setValueAndGoToNextView(closestEnabledDate, 'finish');\n onYearChange?.(closestEnabledDate);\n } else {\n goToNextView();\n changeMonth(startOfYear);\n }\n changeFocusedDay(closestEnabledDate, true);\n });\n const handleSelectedDayChange = useEventCallback(day => {\n if (day) {\n // If there is a date already selected, then we want to keep its time\n return handleValueChange(mergeDateAndTime(utils, day, value ?? referenceDate), 'finish', view);\n }\n return handleValueChange(day, 'finish', view);\n });\n React.useEffect(() => {\n if (value != null && utils.isValid(value)) {\n changeMonth(value);\n }\n }, [value]); // eslint-disable-line\n\n const ownerState = props;\n const classes = useUtilityClasses(ownerState);\n const baseDateValidationProps = {\n disablePast,\n disableFuture,\n maxDate,\n minDate\n };\n const commonViewProps = {\n disableHighlightToday,\n readOnly,\n disabled,\n timezone,\n gridLabelId,\n slots,\n slotProps\n };\n const prevOpenViewRef = React.useRef(view);\n React.useEffect(() => {\n // If the view change and the focus was on the previous view\n // Then we update the focus.\n if (prevOpenViewRef.current === view) {\n return;\n }\n if (focusedView === prevOpenViewRef.current) {\n setFocusedView(view, true);\n }\n prevOpenViewRef.current = view;\n }, [focusedView, setFocusedView, view]);\n const selectedDays = React.useMemo(() => [value], [value]);\n return /*#__PURE__*/_jsxs(DateCalendarRoot, _extends({\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n children: [/*#__PURE__*/_jsx(CalendarHeader, _extends({}, calendarHeaderProps, {\n slots: slots,\n slotProps: slotProps\n })), /*#__PURE__*/_jsx(DateCalendarViewTransitionContainer, {\n reduceAnimations: reduceAnimations,\n className: classes.viewTransitionContainer,\n transKey: view,\n ownerState: ownerState,\n children: /*#__PURE__*/_jsxs(\"div\", {\n children: [view === 'year' && /*#__PURE__*/_jsx(YearCalendar, _extends({}, baseDateValidationProps, commonViewProps, {\n value: value,\n onChange: handleDateYearChange,\n shouldDisableYear: shouldDisableYear,\n hasFocus: hasFocus,\n onFocusedViewChange: isViewFocused => setFocusedView('year', isViewFocused),\n yearsOrder: yearsOrder,\n yearsPerRow: yearsPerRow,\n referenceDate: referenceDate\n })), view === 'month' && /*#__PURE__*/_jsx(MonthCalendar, _extends({}, baseDateValidationProps, commonViewProps, {\n hasFocus: hasFocus,\n className: className,\n value: value,\n onChange: handleDateMonthChange,\n shouldDisableMonth: shouldDisableMonth,\n onFocusedViewChange: isViewFocused => setFocusedView('month', isViewFocused),\n monthsPerRow: monthsPerRow,\n referenceDate: referenceDate\n })), view === 'day' && /*#__PURE__*/_jsx(DayCalendar, _extends({}, calendarState, baseDateValidationProps, commonViewProps, {\n onMonthSwitchingAnimationEnd: onMonthSwitchingAnimationEnd,\n onFocusedDayChange: changeFocusedDay,\n reduceAnimations: reduceAnimations,\n selectedDays: selectedDays,\n onSelectedDaysChange: handleSelectedDayChange,\n shouldDisableDate: shouldDisableDate,\n shouldDisableMonth: shouldDisableMonth,\n shouldDisableYear: shouldDisableYear,\n hasFocus: hasFocus,\n onFocusedViewChange: isViewFocused => setFocusedView('day', isViewFocused),\n showDaysOutsideCurrentMonth: showDaysOutsideCurrentMonth,\n fixedWeekNumber: fixedWeekNumber,\n dayOfWeekFormatter: dayOfWeekFormatter,\n displayWeekNumber: displayWeekNumber,\n loading: loading,\n renderLoading: renderLoading\n }))]\n })\n })]\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? DateCalendar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * If `true`, the main element is focused during the first mount.\n * This main element is:\n * - the element chosen by the visible view if any (i.e: the selected day on the `day` view).\n * - the `input` element if there is a field rendered.\n */\n autoFocus: PropTypes.bool,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n className: PropTypes.string,\n /**\n * Formats the day of week displayed in the calendar header.\n * @param {TDate} date The date of the day of week provided by the adapter.\n * @returns {string} The name to display.\n * @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()\n */\n dayOfWeekFormatter: PropTypes.func,\n /**\n * The default selected value.\n * Used when the component is not controlled.\n */\n defaultValue: PropTypes.object,\n /**\n * If `true`, the picker and text field are disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, disable values after the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disableFuture: PropTypes.bool,\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n /**\n * If `true`, disable values before the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disablePast: PropTypes.bool,\n /**\n * If `true`, the week number will be display in the calendar.\n */\n displayWeekNumber: PropTypes.bool,\n /**\n * The day view will show as many weeks as needed after the end of the current month to match this value.\n * Put it to 6 to have a fixed number of weeks in Gregorian calendars\n */\n fixedWeekNumber: PropTypes.number,\n /**\n * Controlled focused view.\n */\n focusedView: PropTypes.oneOf(['day', 'month', 'year']),\n /**\n * If `true`, calls `renderLoading` instead of rendering the day calendar.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n /**\n * Maximal selectable date.\n * @default 2099-12-31\n */\n maxDate: PropTypes.object,\n /**\n * Minimal selectable date.\n * @default 1900-01-01\n */\n minDate: PropTypes.object,\n /**\n * Months rendered per row.\n * @default 3\n */\n monthsPerRow: PropTypes.oneOf([3, 4]),\n /**\n * Callback fired when the value changes.\n * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.\n * @template TView The view type. Will be one of date or time views.\n * @param {TValue} value The new value.\n * @param {PickerSelectionState | undefined} selectionState Indicates if the date selection is complete.\n * @param {TView | undefined} selectedView Indicates the view in which the selection has been made.\n */\n onChange: PropTypes.func,\n /**\n * Callback fired on focused view change.\n * @template TView\n * @param {TView} view The new view to focus or not.\n * @param {boolean} hasFocus `true` if the view should be focused.\n */\n onFocusedViewChange: PropTypes.func,\n /**\n * Callback fired on month change.\n * @template TDate\n * @param {TDate} month The new month.\n */\n onMonthChange: PropTypes.func,\n /**\n * Callback fired on view change.\n * @template TView\n * @param {TView} view The new view.\n */\n onViewChange: PropTypes.func,\n /**\n * Callback fired on year change.\n * @template TDate\n * @param {TDate} year The new year.\n */\n onYearChange: PropTypes.func,\n /**\n * The default visible view.\n * Used when the component view is not controlled.\n * Must be a valid option from `views` list.\n */\n openTo: PropTypes.oneOf(['day', 'month', 'year']),\n /**\n * Make picker read only.\n * @default false\n */\n readOnly: PropTypes.bool,\n /**\n * If `true`, disable heavy animations.\n * @default `@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13\n */\n reduceAnimations: PropTypes.bool,\n /**\n * The date used to generate the new value when both `value` and `defaultValue` are empty.\n * @default The closest valid date using the validation props, except callbacks such as `shouldDisableDate`.\n */\n referenceDate: PropTypes.object,\n /**\n * Component displaying when passed `loading` true.\n * @returns {React.ReactNode} The node to render when loading.\n * @default () => ...\n */\n renderLoading: PropTypes.func,\n /**\n * Disable specific date.\n *\n * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.\n *\n * @template TDate\n * @param {TDate} day The date to test.\n * @returns {boolean} If `true` the date will be disabled.\n */\n shouldDisableDate: PropTypes.func,\n /**\n * Disable specific month.\n * @template TDate\n * @param {TDate} month The month to test.\n * @returns {boolean} If `true`, the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n /**\n * Disable specific year.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} If `true`, the year will be disabled.\n */\n shouldDisableYear: PropTypes.func,\n /**\n * If `true`, days outside the current month are rendered:\n *\n * - if `fixedWeekNumber` is defined, renders days to have the weeks requested.\n *\n * - if `fixedWeekNumber` is not defined, renders day to fill the first and last week of the current month.\n *\n * - ignored if `calendars` equals more than `1` on range pickers.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * Overridable component slots.\n * @default {}\n */\n slots: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Choose which timezone to use for the value.\n * Example: \"default\", \"system\", \"UTC\", \"America/New_York\".\n * If you pass values from other timezones to some props, they will be converted to this timezone before being used.\n * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.\n * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.\n */\n timezone: PropTypes.string,\n /**\n * The selected value.\n * Used when the component is controlled.\n */\n value: PropTypes.object,\n /**\n * The visible view.\n * Used when the component view is controlled.\n * Must be a valid option from `views` list.\n */\n view: PropTypes.oneOf(['day', 'month', 'year']),\n /**\n * Available views.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired),\n /**\n * Years are displayed in ascending (chronological) order by default.\n * If `desc`, years are displayed in descending order.\n * @default 'asc'\n */\n yearsOrder: PropTypes.oneOf(['asc', 'desc']),\n /**\n * Years rendered per row.\n * @default 3\n */\n yearsPerRow: PropTypes.oneOf([3, 4])\n} : void 0;","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport function getPickersToolbarUtilityClass(slot) {\n return generateUtilityClass('MuiPickersToolbar', slot);\n}\nexport const pickersToolbarClasses = generateUtilityClasses('MuiPickersToolbar', ['root', 'content']);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"children\", \"className\", \"toolbarTitle\", \"hidden\", \"titleId\", \"isLandscape\", \"classes\", \"landscapeDirection\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport Typography from '@mui/material/Typography';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { getPickersToolbarUtilityClass } from \"./pickersToolbarClasses.js\";\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n content: ['content']\n };\n return composeClasses(slots, getPickersToolbarUtilityClass, classes);\n};\nconst PickersToolbarRoot = styled('div', {\n name: 'MuiPickersToolbar',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(({\n theme\n}) => ({\n display: 'flex',\n flexDirection: 'column',\n alignItems: 'flex-start',\n justifyContent: 'space-between',\n padding: theme.spacing(2, 3),\n variants: [{\n props: {\n isLandscape: true\n },\n style: {\n height: 'auto',\n maxWidth: 160,\n padding: 16,\n justifyContent: 'flex-start',\n flexWrap: 'wrap'\n }\n }]\n}));\nconst PickersToolbarContent = styled('div', {\n name: 'MuiPickersToolbar',\n slot: 'Content',\n overridesResolver: (props, styles) => styles.content\n})({\n display: 'flex',\n flexWrap: 'wrap',\n width: '100%',\n flex: 1,\n justifyContent: 'space-between',\n alignItems: 'center',\n flexDirection: 'row',\n variants: [{\n props: {\n isLandscape: true\n },\n style: {\n justifyContent: 'flex-start',\n alignItems: 'flex-start',\n flexDirection: 'column'\n }\n }, {\n props: {\n isLandscape: true,\n landscapeDirection: 'row'\n },\n style: {\n flexDirection: 'row'\n }\n }]\n});\nexport const PickersToolbar = /*#__PURE__*/React.forwardRef(function PickersToolbar(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersToolbar'\n });\n const {\n children,\n className,\n toolbarTitle,\n hidden,\n titleId\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = props;\n const classes = useUtilityClasses(ownerState);\n if (hidden) {\n return null;\n }\n return /*#__PURE__*/_jsxs(PickersToolbarRoot, _extends({\n ref: ref,\n className: clsx(classes.root, className),\n ownerState: ownerState\n }, other, {\n children: [/*#__PURE__*/_jsx(Typography, {\n color: \"text.secondary\",\n variant: \"overline\",\n id: titleId,\n children: toolbarTitle\n }), /*#__PURE__*/_jsx(PickersToolbarContent, {\n className: classes.content,\n ownerState: ownerState,\n children: children\n })]\n }));\n});","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport function getDatePickerToolbarUtilityClass(slot) {\n return generateUtilityClass('MuiDatePickerToolbar', slot);\n}\nexport const datePickerToolbarClasses = generateUtilityClasses('MuiDatePickerToolbar', ['root', 'title']);","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"value\", \"isLandscape\", \"onChange\", \"toolbarFormat\", \"toolbarPlaceholder\", \"views\", \"className\", \"onViewChange\", \"view\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport Typography from '@mui/material/Typography';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { PickersToolbar } from \"../internals/components/PickersToolbar.js\";\nimport { usePickersTranslations } from \"../hooks/usePickersTranslations.js\";\nimport { useUtils } from \"../internals/hooks/useUtils.js\";\nimport { getDatePickerToolbarUtilityClass } from \"./datePickerToolbarClasses.js\";\nimport { resolveDateFormat } from \"../internals/utils/date-utils.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n title: ['title']\n };\n return composeClasses(slots, getDatePickerToolbarUtilityClass, classes);\n};\nconst DatePickerToolbarRoot = styled(PickersToolbar, {\n name: 'MuiDatePickerToolbar',\n slot: 'Root',\n overridesResolver: (_, styles) => styles.root\n})({});\nconst DatePickerToolbarTitle = styled(Typography, {\n name: 'MuiDatePickerToolbar',\n slot: 'Title',\n overridesResolver: (_, styles) => styles.title\n})({\n variants: [{\n props: {\n isLandscape: true\n },\n style: {\n margin: 'auto 16px auto auto'\n }\n }]\n});\n/**\n * Demos:\n *\n * - [DatePicker](https://mui.com/x/react-date-pickers/date-picker/)\n * - [Custom components](https://mui.com/x/react-date-pickers/custom-components/)\n *\n * API:\n *\n * - [DatePickerToolbar API](https://mui.com/x/api/date-pickers/date-picker-toolbar/)\n */\nexport const DatePickerToolbar = /*#__PURE__*/React.forwardRef(function DatePickerToolbar(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiDatePickerToolbar'\n });\n const {\n value,\n isLandscape,\n toolbarFormat,\n toolbarPlaceholder = '––',\n views,\n className\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const utils = useUtils();\n const translations = usePickersTranslations();\n const classes = useUtilityClasses(props);\n const dateText = React.useMemo(() => {\n if (!value) {\n return toolbarPlaceholder;\n }\n const formatFromViews = resolveDateFormat(utils, {\n format: toolbarFormat,\n views\n }, true);\n return utils.formatByString(value, formatFromViews);\n }, [value, toolbarFormat, toolbarPlaceholder, utils, views]);\n const ownerState = props;\n return /*#__PURE__*/_jsx(DatePickerToolbarRoot, _extends({\n ref: ref,\n toolbarTitle: translations.datePickerToolbarTitle,\n isLandscape: isLandscape,\n className: clsx(classes.root, className)\n }, other, {\n children: /*#__PURE__*/_jsx(DatePickerToolbarTitle, {\n variant: \"h4\",\n align: isLandscape ? 'left' : 'center',\n ownerState: ownerState,\n className: classes.title,\n children: dateText\n })\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? DatePickerToolbar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n className: PropTypes.string,\n disabled: PropTypes.bool,\n /**\n * If `true`, show the toolbar even in desktop mode.\n * @default `true` for Desktop, `false` for Mobile.\n */\n hidden: PropTypes.bool,\n isLandscape: PropTypes.bool.isRequired,\n onChange: PropTypes.func.isRequired,\n /**\n * Callback called when a toolbar is clicked\n * @template TView\n * @param {TView} view The view to open\n */\n onViewChange: PropTypes.func.isRequired,\n readOnly: PropTypes.bool,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n titleId: PropTypes.string,\n /**\n * Toolbar date format.\n */\n toolbarFormat: PropTypes.string,\n /**\n * Toolbar value placeholder—it is displayed when the value is empty.\n * @default \"––\"\n */\n toolbarPlaceholder: PropTypes.node,\n value: PropTypes.object,\n /**\n * Currently visible picker view.\n */\n view: PropTypes.oneOf(['day', 'month', 'year']).isRequired,\n /**\n * Available views.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired).isRequired\n} : void 0;","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { useThemeProps } from '@mui/material/styles';\nimport { useDefaultDates, useUtils } from \"../internals/hooks/useUtils.js\";\nimport { applyDefaultViewProps } from \"../internals/utils/views.js\";\nimport { applyDefaultDate } from \"../internals/utils/date-utils.js\";\nimport { DatePickerToolbar } from \"./DatePickerToolbar.js\";\nexport function useDatePickerDefaultizedProps(props, name) {\n const utils = useUtils();\n const defaultDates = useDefaultDates();\n const themeProps = useThemeProps({\n props,\n name\n });\n const localeText = React.useMemo(() => {\n if (themeProps.localeText?.toolbarTitle == null) {\n return themeProps.localeText;\n }\n return _extends({}, themeProps.localeText, {\n datePickerToolbarTitle: themeProps.localeText.toolbarTitle\n });\n }, [themeProps.localeText]);\n return _extends({}, themeProps, {\n localeText\n }, applyDefaultViewProps({\n views: themeProps.views,\n openTo: themeProps.openTo,\n defaultViews: ['year', 'day'],\n defaultOpenTo: 'day'\n }), {\n disableFuture: themeProps.disableFuture ?? false,\n disablePast: themeProps.disablePast ?? false,\n minDate: applyDefaultDate(utils, themeProps.minDate, defaultDates.minDate),\n maxDate: applyDefaultDate(utils, themeProps.maxDate, defaultDates.maxDate),\n slots: _extends({\n toolbar: DatePickerToolbar\n }, themeProps.slots)\n });\n}","import { unstable_generateUtilityClass as generateUtilityClass, unstable_generateUtilityClasses as generateUtilityClasses } from '@mui/utils';\nexport function getPickersPopperUtilityClass(slot) {\n return generateUtilityClass('MuiPickersPopper', slot);\n}\nexport const pickersPopperClasses = generateUtilityClasses('MuiPickersPopper', ['root', 'paper']);","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"PaperComponent\", \"popperPlacement\", \"ownerState\", \"children\", \"paperSlotProps\", \"paperClasses\", \"onPaperClick\", \"onPaperTouchStart\"];\nimport * as React from 'react';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport Grow from '@mui/material/Grow';\nimport Fade from '@mui/material/Fade';\nimport MuiPaper from '@mui/material/Paper';\nimport MuiPopper from '@mui/material/Popper';\nimport BaseFocusTrap from '@mui/material/Unstable_TrapFocus';\nimport { unstable_useForkRef as useForkRef, unstable_useEventCallback as useEventCallback, unstable_ownerDocument as ownerDocument, unstable_composeClasses as composeClasses } from '@mui/utils';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport { getPickersPopperUtilityClass } from \"./pickersPopperClasses.js\";\nimport { getActiveElement } from \"../utils/utils.js\";\nimport { useDefaultReduceAnimations } from \"../hooks/useDefaultReduceAnimations.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n classes\n } = ownerState;\n const slots = {\n root: ['root'],\n paper: ['paper']\n };\n return composeClasses(slots, getPickersPopperUtilityClass, classes);\n};\nconst PickersPopperRoot = styled(MuiPopper, {\n name: 'MuiPickersPopper',\n slot: 'Root',\n overridesResolver: (_, styles) => styles.root\n})(({\n theme\n}) => ({\n zIndex: theme.zIndex.modal\n}));\nconst PickersPopperPaper = styled(MuiPaper, {\n name: 'MuiPickersPopper',\n slot: 'Paper',\n overridesResolver: (_, styles) => styles.paper\n})({\n outline: 0,\n transformOrigin: 'top center',\n variants: [{\n props: ({\n placement\n }) => ['top', 'top-start', 'top-end'].includes(placement),\n style: {\n transformOrigin: 'bottom center'\n }\n }]\n});\nfunction clickedRootScrollbar(event, doc) {\n return doc.documentElement.clientWidth < event.clientX || doc.documentElement.clientHeight < event.clientY;\n}\n/**\n * Based on @mui/material/ClickAwayListener without the customization.\n * We can probably strip away even more since children won't be portaled.\n * @param {boolean} active Only listen to clicks when the popper is opened.\n * @param {(event: MouseEvent | TouchEvent) => void} onClickAway The callback to call when clicking outside the popper.\n * @returns {Array} The ref and event handler to listen to the outside clicks.\n */\nfunction useClickAwayListener(active, onClickAway) {\n const movedRef = React.useRef(false);\n const syntheticEventRef = React.useRef(false);\n const nodeRef = React.useRef(null);\n const activatedRef = React.useRef(false);\n React.useEffect(() => {\n if (!active) {\n return undefined;\n }\n\n // Ensure that this hook is not \"activated\" synchronously.\n // https://github.com/facebook/react/issues/20074\n function armClickAwayListener() {\n activatedRef.current = true;\n }\n document.addEventListener('mousedown', armClickAwayListener, true);\n document.addEventListener('touchstart', armClickAwayListener, true);\n return () => {\n document.removeEventListener('mousedown', armClickAwayListener, true);\n document.removeEventListener('touchstart', armClickAwayListener, true);\n activatedRef.current = false;\n };\n }, [active]);\n\n // The handler doesn't take event.defaultPrevented into account:\n //\n // event.preventDefault() is meant to stop default behaviors like\n // clicking a checkbox to check it, hitting a button to submit a form,\n // and hitting left arrow to move the cursor in a text input etc.\n // Only special HTML elements have these default behaviors.\n const handleClickAway = useEventCallback(event => {\n if (!activatedRef.current) {\n return;\n }\n\n // Given developers can stop the propagation of the synthetic event,\n // we can only be confident with a positive value.\n const insideReactTree = syntheticEventRef.current;\n syntheticEventRef.current = false;\n const doc = ownerDocument(nodeRef.current);\n\n // 1. IE11 support, which trigger the handleClickAway even after the unbind\n // 2. The child might render null.\n // 3. Behave like a blur listener.\n if (!nodeRef.current ||\n // is a TouchEvent?\n 'clientX' in event && clickedRootScrollbar(event, doc)) {\n return;\n }\n\n // Do not act if user performed touchmove\n if (movedRef.current) {\n movedRef.current = false;\n return;\n }\n let insideDOM;\n\n // If not enough, can use https://github.com/DieterHolvoet/event-propagation-path/blob/master/propagationPath.js\n if (event.composedPath) {\n insideDOM = event.composedPath().indexOf(nodeRef.current) > -1;\n } else {\n insideDOM = !doc.documentElement.contains(event.target) || nodeRef.current.contains(event.target);\n }\n if (!insideDOM && !insideReactTree) {\n onClickAway(event);\n }\n });\n\n // Keep track of mouse/touch events that bubbled up through the portal.\n const handleSynthetic = () => {\n syntheticEventRef.current = true;\n };\n React.useEffect(() => {\n if (active) {\n const doc = ownerDocument(nodeRef.current);\n const handleTouchMove = () => {\n movedRef.current = true;\n };\n doc.addEventListener('touchstart', handleClickAway);\n doc.addEventListener('touchmove', handleTouchMove);\n return () => {\n doc.removeEventListener('touchstart', handleClickAway);\n doc.removeEventListener('touchmove', handleTouchMove);\n };\n }\n return undefined;\n }, [active, handleClickAway]);\n React.useEffect(() => {\n // TODO This behavior is not tested automatically\n // It's unclear whether this is due to different update semantics in test (batched in act() vs discrete on click).\n // Or if this is a timing related issues due to different Transition components\n // Once we get rid of all the manual scheduling (for example setTimeout(update, 0)) we can revisit this code+test.\n if (active) {\n const doc = ownerDocument(nodeRef.current);\n doc.addEventListener('click', handleClickAway);\n return () => {\n doc.removeEventListener('click', handleClickAway);\n // cleanup `handleClickAway`\n syntheticEventRef.current = false;\n };\n }\n return undefined;\n }, [active, handleClickAway]);\n return [nodeRef, handleSynthetic, handleSynthetic];\n}\nconst PickersPopperPaperWrapper = /*#__PURE__*/React.forwardRef((props, ref) => {\n const {\n PaperComponent,\n popperPlacement,\n ownerState: inOwnerState,\n children,\n paperSlotProps,\n paperClasses,\n onPaperClick,\n onPaperTouchStart\n // picks up the style props provided by `Transition`\n // https://mui.com/material-ui/transitions/#child-requirement\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const ownerState = _extends({}, inOwnerState, {\n placement: popperPlacement\n });\n const paperProps = useSlotProps({\n elementType: PaperComponent,\n externalSlotProps: paperSlotProps,\n additionalProps: {\n tabIndex: -1,\n elevation: 8,\n ref\n },\n className: paperClasses,\n ownerState\n });\n return /*#__PURE__*/_jsx(PaperComponent, _extends({}, other, paperProps, {\n onClick: event => {\n onPaperClick(event);\n paperProps.onClick?.(event);\n },\n onTouchStart: event => {\n onPaperTouchStart(event);\n paperProps.onTouchStart?.(event);\n },\n ownerState: ownerState,\n children: children\n }));\n});\nexport function PickersPopper(inProps) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersPopper'\n });\n const {\n anchorEl,\n children,\n containerRef = null,\n shouldRestoreFocus,\n onBlur,\n onDismiss,\n open,\n role,\n placement,\n slots,\n slotProps,\n reduceAnimations: inReduceAnimations\n } = props;\n React.useEffect(() => {\n function handleKeyDown(nativeEvent) {\n if (open && nativeEvent.key === 'Escape') {\n onDismiss();\n }\n }\n document.addEventListener('keydown', handleKeyDown);\n return () => {\n document.removeEventListener('keydown', handleKeyDown);\n };\n }, [onDismiss, open]);\n const lastFocusedElementRef = React.useRef(null);\n React.useEffect(() => {\n if (role === 'tooltip' || shouldRestoreFocus && !shouldRestoreFocus()) {\n return;\n }\n if (open) {\n lastFocusedElementRef.current = getActiveElement(document);\n } else if (lastFocusedElementRef.current && lastFocusedElementRef.current instanceof HTMLElement) {\n // make sure the button is flushed with updated label, before returning focus to it\n // avoids issue, where screen reader could fail to announce selected date after selection\n setTimeout(() => {\n if (lastFocusedElementRef.current instanceof HTMLElement) {\n lastFocusedElementRef.current.focus();\n }\n });\n }\n }, [open, role, shouldRestoreFocus]);\n const [clickAwayRef, onPaperClick, onPaperTouchStart] = useClickAwayListener(open, onBlur ?? onDismiss);\n const paperRef = React.useRef(null);\n const handleRef = useForkRef(paperRef, containerRef);\n const handlePaperRef = useForkRef(handleRef, clickAwayRef);\n const ownerState = props;\n const classes = useUtilityClasses(ownerState);\n const defaultReduceAnimations = useDefaultReduceAnimations();\n const reduceAnimations = inReduceAnimations ?? defaultReduceAnimations;\n const handleKeyDown = event => {\n if (event.key === 'Escape') {\n // stop the propagation to avoid closing parent modal\n event.stopPropagation();\n onDismiss();\n }\n };\n const Transition = slots?.desktopTransition ?? reduceAnimations ? Fade : Grow;\n const FocusTrap = slots?.desktopTrapFocus ?? BaseFocusTrap;\n const Paper = slots?.desktopPaper ?? PickersPopperPaper;\n const Popper = slots?.popper ?? PickersPopperRoot;\n const popperProps = useSlotProps({\n elementType: Popper,\n externalSlotProps: slotProps?.popper,\n additionalProps: {\n transition: true,\n role,\n open,\n anchorEl,\n placement,\n onKeyDown: handleKeyDown\n },\n className: classes.root,\n ownerState: props\n });\n return /*#__PURE__*/_jsx(Popper, _extends({}, popperProps, {\n children: ({\n TransitionProps,\n placement: popperPlacement\n }) => /*#__PURE__*/_jsx(FocusTrap, _extends({\n open: open,\n disableAutoFocus: true\n // pickers are managing focus position manually\n // without this prop the focus is returned to the button before `aria-label` is updated\n // which would force screen readers to read too old label\n ,\n disableRestoreFocus: true,\n disableEnforceFocus: role === 'tooltip',\n isEnabled: () => true\n }, slotProps?.desktopTrapFocus, {\n children: /*#__PURE__*/_jsx(Transition, _extends({}, TransitionProps, slotProps?.desktopTransition, {\n children: /*#__PURE__*/_jsx(PickersPopperPaperWrapper, {\n PaperComponent: Paper,\n ownerState: ownerState,\n popperPlacement: popperPlacement,\n ref: handlePaperRef,\n onPaperClick: onPaperClick,\n onPaperTouchStart: onPaperTouchStart,\n paperClasses: classes.paper,\n paperSlotProps: slotProps?.desktopPaper,\n children: children\n })\n }))\n }))\n }));\n}","import * as React from 'react';\nexport const useOpenState = ({\n open,\n onOpen,\n onClose\n}) => {\n const isControllingOpenProp = React.useRef(typeof open === 'boolean').current;\n const [openState, setIsOpenState] = React.useState(false);\n\n // It is required to update inner state in useEffect in order to avoid situation when\n // Our component is not mounted yet, but `open` state is set to `true` (for example initially opened)\n React.useEffect(() => {\n if (isControllingOpenProp) {\n if (typeof open !== 'boolean') {\n throw new Error('You must not mix controlling and uncontrolled mode for `open` prop');\n }\n setIsOpenState(open);\n }\n }, [isControllingOpenProp, open]);\n const setIsOpen = React.useCallback(newIsOpen => {\n if (!isControllingOpenProp) {\n setIsOpenState(newIsOpen);\n }\n if (newIsOpen && onOpen) {\n onOpen();\n }\n if (!newIsOpen && onClose) {\n onClose();\n }\n }, [isControllingOpenProp, onOpen, onClose]);\n return {\n isOpen: openState,\n setIsOpen\n };\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { useOpenState } from \"../useOpenState.js\";\nimport { useLocalizationContext, useUtils } from \"../useUtils.js\";\nimport { useValidation } from \"../../../validation/index.js\";\nimport { useValueWithTimezone } from \"../useValueWithTimezone.js\";\n/**\n * Decide if the new value should be published\n * The published value will be passed to `onChange` if defined.\n */\nconst shouldPublishValue = params => {\n const {\n action,\n hasChanged,\n dateState,\n isControlled\n } = params;\n const isCurrentValueTheDefaultValue = !isControlled && !dateState.hasBeenModifiedSinceMount;\n\n // The field is responsible for only calling `onChange` when needed.\n if (action.name === 'setValueFromField') {\n return true;\n }\n if (action.name === 'setValueFromAction') {\n // If the component is not controlled, and the value has not been modified since the mount,\n // Then we want to publish the default value whenever the user pressed the \"Accept\", \"Today\" or \"Clear\" button.\n if (isCurrentValueTheDefaultValue && ['accept', 'today', 'clear'].includes(action.pickerAction)) {\n return true;\n }\n return hasChanged(dateState.lastPublishedValue);\n }\n if (action.name === 'setValueFromView' && action.selectionState !== 'shallow') {\n // On the first view,\n // If the value is not controlled, then clicking on any value (including the one equal to `defaultValue`) should call `onChange`\n if (isCurrentValueTheDefaultValue) {\n return true;\n }\n return hasChanged(dateState.lastPublishedValue);\n }\n if (action.name === 'setValueFromShortcut') {\n // On the first view,\n // If the value is not controlled, then clicking on any value (including the one equal to `defaultValue`) should call `onChange`\n if (isCurrentValueTheDefaultValue) {\n return true;\n }\n return hasChanged(dateState.lastPublishedValue);\n }\n return false;\n};\n\n/**\n * Decide if the new value should be committed.\n * The committed value will be passed to `onAccept` if defined.\n * It will also be used as a reset target when calling the `cancel` picker action (when clicking on the \"Cancel\" button).\n */\nconst shouldCommitValue = params => {\n const {\n action,\n hasChanged,\n dateState,\n isControlled,\n closeOnSelect\n } = params;\n const isCurrentValueTheDefaultValue = !isControlled && !dateState.hasBeenModifiedSinceMount;\n if (action.name === 'setValueFromAction') {\n // If the component is not controlled, and the value has not been modified since the mount,\n // Then we want to commit the default value whenever the user pressed the \"Accept\", \"Today\" or \"Clear\" button.\n if (isCurrentValueTheDefaultValue && ['accept', 'today', 'clear'].includes(action.pickerAction)) {\n return true;\n }\n return hasChanged(dateState.lastCommittedValue);\n }\n if (action.name === 'setValueFromView' && action.selectionState === 'finish' && closeOnSelect) {\n // On picker where the 1st view is also the last view,\n // If the value is not controlled, then clicking on any value (including the one equal to `defaultValue`) should call `onAccept`\n if (isCurrentValueTheDefaultValue) {\n return true;\n }\n return hasChanged(dateState.lastCommittedValue);\n }\n if (action.name === 'setValueFromShortcut') {\n return action.changeImportance === 'accept' && hasChanged(dateState.lastCommittedValue);\n }\n return false;\n};\n\n/**\n * Decide if the picker should be closed after the value is updated.\n */\nconst shouldClosePicker = params => {\n const {\n action,\n closeOnSelect\n } = params;\n if (action.name === 'setValueFromAction') {\n return true;\n }\n if (action.name === 'setValueFromView') {\n return action.selectionState === 'finish' && closeOnSelect;\n }\n if (action.name === 'setValueFromShortcut') {\n return action.changeImportance === 'accept';\n }\n return false;\n};\n\n/**\n * Manage the value lifecycle of all the pickers.\n */\nexport const usePickerValue = ({\n props,\n valueManager,\n valueType,\n wrapperVariant,\n validator\n}) => {\n const {\n onAccept,\n onChange,\n value: inValueWithoutRenderTimezone,\n defaultValue: inDefaultValue,\n closeOnSelect = wrapperVariant === 'desktop',\n timezone: timezoneProp,\n referenceDate\n } = props;\n const {\n current: defaultValue\n } = React.useRef(inDefaultValue);\n const {\n current: isControlled\n } = React.useRef(inValueWithoutRenderTimezone !== undefined);\n const [previousTimezoneProp, setPreviousTimezoneProp] = React.useState(timezoneProp);\n\n /* eslint-disable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\n if (process.env.NODE_ENV !== 'production') {\n React.useEffect(() => {\n if (isControlled !== (inValueWithoutRenderTimezone !== undefined)) {\n console.error([`MUI X: A component is changing the ${isControlled ? '' : 'un'}controlled value of a picker to be ${isControlled ? 'un' : ''}controlled.`, 'Elements should not switch from uncontrolled to controlled (or vice versa).', `Decide between using a controlled or uncontrolled value` + 'for the lifetime of the component.', \"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.\", 'More info: https://fb.me/react-controlled-components'].join('\\n'));\n }\n }, [inValueWithoutRenderTimezone]);\n React.useEffect(() => {\n if (!isControlled && defaultValue !== inDefaultValue) {\n console.error([`MUI X: A component is changing the defaultValue of an uncontrolled picker after being initialized. ` + `To suppress this warning opt to use a controlled value.`].join('\\n'));\n }\n }, [JSON.stringify(defaultValue)]);\n }\n /* eslint-enable react-hooks/rules-of-hooks, react-hooks/exhaustive-deps */\n\n const utils = useUtils();\n const adapter = useLocalizationContext();\n const {\n isOpen,\n setIsOpen\n } = useOpenState(props);\n const {\n timezone,\n value: inValueWithTimezoneToRender,\n handleValueChange\n } = useValueWithTimezone({\n timezone: timezoneProp,\n value: inValueWithoutRenderTimezone,\n defaultValue,\n referenceDate,\n onChange,\n valueManager\n });\n const [dateState, setDateState] = React.useState(() => {\n let initialValue;\n if (inValueWithTimezoneToRender !== undefined) {\n initialValue = inValueWithTimezoneToRender;\n } else if (defaultValue !== undefined) {\n initialValue = defaultValue;\n } else {\n initialValue = valueManager.emptyValue;\n }\n return {\n draft: initialValue,\n lastPublishedValue: initialValue,\n lastCommittedValue: initialValue,\n lastControlledValue: inValueWithoutRenderTimezone,\n hasBeenModifiedSinceMount: false\n };\n });\n const timezoneFromDraftValue = valueManager.getTimezone(utils, dateState.draft);\n if (previousTimezoneProp !== timezoneProp) {\n setPreviousTimezoneProp(timezoneProp);\n if (timezoneProp && timezoneFromDraftValue && timezoneProp !== timezoneFromDraftValue) {\n setDateState(prev => _extends({}, prev, {\n draft: valueManager.setTimezone(utils, timezoneProp, prev.draft)\n }));\n }\n }\n const {\n getValidationErrorForNewValue\n } = useValidation({\n props,\n validator,\n timezone,\n value: dateState.draft,\n onError: props.onError\n });\n const updateDate = useEventCallback(action => {\n const updaterParams = {\n action,\n dateState,\n hasChanged: comparison => !valueManager.areValuesEqual(utils, action.value, comparison),\n isControlled,\n closeOnSelect\n };\n const shouldPublish = shouldPublishValue(updaterParams);\n const shouldCommit = shouldCommitValue(updaterParams);\n const shouldClose = shouldClosePicker(updaterParams);\n setDateState(prev => _extends({}, prev, {\n draft: action.value,\n lastPublishedValue: shouldPublish ? action.value : prev.lastPublishedValue,\n lastCommittedValue: shouldCommit ? action.value : prev.lastCommittedValue,\n hasBeenModifiedSinceMount: true\n }));\n let cachedContext = null;\n const getContext = () => {\n if (!cachedContext) {\n const validationError = action.name === 'setValueFromField' ? action.context.validationError : getValidationErrorForNewValue(action.value);\n cachedContext = {\n validationError\n };\n if (action.name === 'setValueFromShortcut') {\n cachedContext.shortcut = action.shortcut;\n }\n }\n return cachedContext;\n };\n if (shouldPublish) {\n handleValueChange(action.value, getContext());\n }\n if (shouldCommit && onAccept) {\n onAccept(action.value, getContext());\n }\n if (shouldClose) {\n setIsOpen(false);\n }\n });\n if (dateState.lastControlledValue !== inValueWithoutRenderTimezone) {\n const isUpdateComingFromPicker = valueManager.areValuesEqual(utils, dateState.draft, inValueWithTimezoneToRender);\n setDateState(prev => _extends({}, prev, {\n lastControlledValue: inValueWithoutRenderTimezone\n }, isUpdateComingFromPicker ? {} : {\n lastCommittedValue: inValueWithTimezoneToRender,\n lastPublishedValue: inValueWithTimezoneToRender,\n draft: inValueWithTimezoneToRender,\n hasBeenModifiedSinceMount: true\n }));\n }\n const handleClear = useEventCallback(() => {\n updateDate({\n value: valueManager.emptyValue,\n name: 'setValueFromAction',\n pickerAction: 'clear'\n });\n });\n const handleAccept = useEventCallback(() => {\n updateDate({\n value: dateState.lastPublishedValue,\n name: 'setValueFromAction',\n pickerAction: 'accept'\n });\n });\n const handleDismiss = useEventCallback(() => {\n updateDate({\n value: dateState.lastPublishedValue,\n name: 'setValueFromAction',\n pickerAction: 'dismiss'\n });\n });\n const handleCancel = useEventCallback(() => {\n updateDate({\n value: dateState.lastCommittedValue,\n name: 'setValueFromAction',\n pickerAction: 'cancel'\n });\n });\n const handleSetToday = useEventCallback(() => {\n updateDate({\n value: valueManager.getTodayValue(utils, timezone, valueType),\n name: 'setValueFromAction',\n pickerAction: 'today'\n });\n });\n const handleOpen = useEventCallback(event => {\n event.preventDefault();\n setIsOpen(true);\n });\n const handleClose = useEventCallback(event => {\n event?.preventDefault();\n setIsOpen(false);\n });\n const handleChange = useEventCallback((newValue, selectionState = 'partial') => updateDate({\n name: 'setValueFromView',\n value: newValue,\n selectionState\n }));\n const handleSelectShortcut = useEventCallback((newValue, changeImportance, shortcut) => updateDate({\n name: 'setValueFromShortcut',\n value: newValue,\n changeImportance,\n shortcut\n }));\n const handleChangeFromField = useEventCallback((newValue, context) => updateDate({\n name: 'setValueFromField',\n value: newValue,\n context\n }));\n const actions = {\n onClear: handleClear,\n onAccept: handleAccept,\n onDismiss: handleDismiss,\n onCancel: handleCancel,\n onSetToday: handleSetToday,\n onOpen: handleOpen,\n onClose: handleClose\n };\n const fieldResponse = {\n value: dateState.draft,\n onChange: handleChangeFromField\n };\n const viewValue = React.useMemo(() => valueManager.cleanValue(utils, dateState.draft), [utils, valueManager, dateState.draft]);\n const viewResponse = {\n value: viewValue,\n onChange: handleChange,\n onClose: handleClose,\n open: isOpen\n };\n const isValid = testedValue => {\n const error = validator({\n adapter,\n value: testedValue,\n timezone,\n props\n });\n return !valueManager.hasError(error);\n };\n const layoutResponse = _extends({}, actions, {\n value: viewValue,\n onChange: handleChange,\n onSelectShortcut: handleSelectShortcut,\n isValid\n });\n const contextValue = React.useMemo(() => ({\n onOpen: handleOpen,\n onClose: handleClose,\n open: isOpen\n }), [isOpen, handleClose, handleOpen]);\n return {\n open: isOpen,\n fieldProps: fieldResponse,\n viewProps: viewResponse,\n layoutProps: layoutResponse,\n actions,\n contextValue\n };\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"className\", \"sx\"];\nimport * as React from 'react';\nimport useEnhancedEffect from '@mui/utils/useEnhancedEffect';\nimport useEventCallback from '@mui/utils/useEventCallback';\nimport { useViews } from \"../useViews.js\";\nimport { isTimeView } from \"../../utils/time-utils.js\";\n\n/**\n * Props used to handle the views that are common to all pickers.\n */\n\n/**\n * Props used to handle the views of the pickers.\n */\n\n/**\n * Props used to handle the value of the pickers.\n */\n\n/**\n * Manage the views of all the pickers:\n * - Handles the view switch\n * - Handles the switch between UI views and field views\n * - Handles the focus management when switching views\n */\nexport const usePickerViews = ({\n props,\n propsFromPickerValue,\n additionalViewProps,\n autoFocusView,\n rendererInterceptor,\n fieldRef\n}) => {\n const {\n onChange,\n open,\n onClose\n } = propsFromPickerValue;\n const {\n view: inView,\n views,\n openTo,\n onViewChange,\n viewRenderers,\n timezone\n } = props;\n const propsToForwardToView = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n view,\n setView,\n defaultView,\n focusedView,\n setFocusedView,\n setValueAndGoToNextView\n } = useViews({\n view: inView,\n views,\n openTo,\n onChange,\n onViewChange,\n autoFocus: autoFocusView\n });\n const {\n hasUIView,\n viewModeLookup\n } = React.useMemo(() => views.reduce((acc, viewForReduce) => {\n let viewMode;\n if (viewRenderers[viewForReduce] != null) {\n viewMode = 'UI';\n } else {\n viewMode = 'field';\n }\n acc.viewModeLookup[viewForReduce] = viewMode;\n if (viewMode === 'UI') {\n acc.hasUIView = true;\n }\n return acc;\n }, {\n hasUIView: false,\n viewModeLookup: {}\n }), [viewRenderers, views]);\n const timeViewsCount = React.useMemo(() => views.reduce((acc, viewForReduce) => {\n if (viewRenderers[viewForReduce] != null && isTimeView(viewForReduce)) {\n return acc + 1;\n }\n return acc;\n }, 0), [viewRenderers, views]);\n const currentViewMode = viewModeLookup[view];\n const shouldRestoreFocus = useEventCallback(() => currentViewMode === 'UI');\n const [popperView, setPopperView] = React.useState(currentViewMode === 'UI' ? view : null);\n if (popperView !== view && viewModeLookup[view] === 'UI') {\n setPopperView(view);\n }\n useEnhancedEffect(() => {\n // Handle case of `DateTimePicker` without time renderers\n if (currentViewMode === 'field' && open) {\n onClose();\n setTimeout(() => {\n fieldRef?.current?.setSelectedSections(view);\n // focusing the input before the range selection is done\n // calling it outside of timeout results in an inconsistent behavior between Safari And Chrome\n fieldRef?.current?.focusField(view);\n });\n }\n }, [view]); // eslint-disable-line react-hooks/exhaustive-deps\n\n useEnhancedEffect(() => {\n if (!open) {\n return;\n }\n let newView = view;\n\n // If the current view is a field view, go to the last popper view\n if (currentViewMode === 'field' && popperView != null) {\n newView = popperView;\n }\n\n // If the current view is not the default view and both are UI views\n if (newView !== defaultView && viewModeLookup[newView] === 'UI' && viewModeLookup[defaultView] === 'UI') {\n newView = defaultView;\n }\n if (newView !== view) {\n setView(newView);\n }\n setFocusedView(newView, true);\n }, [open]); // eslint-disable-line react-hooks/exhaustive-deps\n\n const layoutProps = {\n views,\n view: popperView,\n onViewChange: setView\n };\n return {\n hasUIView,\n shouldRestoreFocus,\n layoutProps,\n renderCurrentView: () => {\n if (popperView == null) {\n return null;\n }\n const renderer = viewRenderers[popperView];\n if (renderer == null) {\n return null;\n }\n const rendererProps = _extends({}, propsToForwardToView, additionalViewProps, propsFromPickerValue, {\n views,\n timezone,\n onChange: setValueAndGoToNextView,\n view: popperView,\n onViewChange: setView,\n focusedView,\n onFocusedViewChange: setFocusedView,\n showViewSwitcher: timeViewsCount > 1,\n timeViewsCount\n });\n if (rendererInterceptor) {\n return rendererInterceptor(viewRenderers, popperView, rendererProps);\n }\n return renderer(rendererProps);\n }\n };\n};","import * as React from 'react';\nimport { unstable_useEnhancedEffect as useEnhancedEffect } from '@mui/utils';\nimport { arrayIncludes } from \"../utils/utils.js\";\nfunction getOrientation() {\n if (typeof window === 'undefined') {\n return 'portrait';\n }\n if (window.screen && window.screen.orientation && window.screen.orientation.angle) {\n return Math.abs(window.screen.orientation.angle) === 90 ? 'landscape' : 'portrait';\n }\n\n // Support IOS safari\n if (window.orientation) {\n return Math.abs(Number(window.orientation)) === 90 ? 'landscape' : 'portrait';\n }\n return 'portrait';\n}\nexport const useIsLandscape = (views, customOrientation) => {\n const [orientation, setOrientation] = React.useState(getOrientation);\n useEnhancedEffect(() => {\n const eventHandler = () => {\n setOrientation(getOrientation());\n };\n window.addEventListener('orientationchange', eventHandler);\n return () => {\n window.removeEventListener('orientationchange', eventHandler);\n };\n }, []);\n if (arrayIncludes(views, ['hours', 'minutes', 'seconds'])) {\n // could not display 13:34:44 in landscape mode\n return false;\n }\n const orientationToUse = customOrientation || orientation;\n return orientationToUse === 'landscape';\n};","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport { useRtl } from '@mui/system/RtlProvider';\nimport { useIsLandscape } from \"../useIsLandscape.js\";\n\n/**\n * Props used to create the layout of the views.\n * Those props are exposed on all the pickers.\n */\n\n/**\n * Prepare the props for the view layout (managed by `PickersLayout`)\n */\nexport const usePickerLayoutProps = ({\n props,\n propsFromPickerValue,\n propsFromPickerViews,\n wrapperVariant\n}) => {\n const {\n orientation\n } = props;\n const isLandscape = useIsLandscape(propsFromPickerViews.views, orientation);\n const isRtl = useRtl();\n const layoutProps = _extends({}, propsFromPickerViews, propsFromPickerValue, {\n isLandscape,\n isRtl,\n wrapperVariant,\n disabled: props.disabled,\n readOnly: props.readOnly\n });\n return {\n layoutProps\n };\n};","import * as React from 'react';\nexport function usePickerOwnerState(parameters) {\n const {\n props,\n pickerValueResponse\n } = parameters;\n return React.useMemo(() => ({\n value: pickerValueResponse.viewProps.value,\n open: pickerValueResponse.open,\n disabled: props.disabled ?? false,\n readOnly: props.readOnly ?? false\n }), [pickerValueResponse.viewProps.value, pickerValueResponse.open, props.disabled, props.readOnly]);\n}","import { warnOnce } from '@mui/x-internals/warning';\nimport { usePickerValue } from \"./usePickerValue.js\";\nimport { usePickerViews } from \"./usePickerViews.js\";\nimport { usePickerLayoutProps } from \"./usePickerLayoutProps.js\";\nimport { usePickerOwnerState } from \"./usePickerOwnerState.js\";\nexport const usePicker = ({\n props,\n valueManager,\n valueType,\n wrapperVariant,\n additionalViewProps,\n validator,\n autoFocusView,\n rendererInterceptor,\n fieldRef\n}) => {\n if (process.env.NODE_ENV !== 'production') {\n if (props.renderInput != null) {\n warnOnce(['MUI X: The `renderInput` prop has been removed in version 6.0 of the Date and Time Pickers.', 'You can replace it with the `textField` component slot in most cases.', 'For more information, please have a look at the migration guide (https://mui.com/x/migration/migration-pickers-v5/#input-renderer-required-in-v5).']);\n }\n }\n const pickerValueResponse = usePickerValue({\n props,\n valueManager,\n valueType,\n wrapperVariant,\n validator\n });\n const pickerViewsResponse = usePickerViews({\n props,\n additionalViewProps,\n autoFocusView,\n fieldRef,\n propsFromPickerValue: pickerValueResponse.viewProps,\n rendererInterceptor\n });\n const pickerLayoutResponse = usePickerLayoutProps({\n props,\n wrapperVariant,\n propsFromPickerValue: pickerValueResponse.layoutProps,\n propsFromPickerViews: pickerViewsResponse.layoutProps\n });\n const pickerOwnerState = usePickerOwnerState({\n props,\n pickerValueResponse\n });\n return {\n // Picker value\n open: pickerValueResponse.open,\n actions: pickerValueResponse.actions,\n fieldProps: pickerValueResponse.fieldProps,\n // Picker views\n renderCurrentView: pickerViewsResponse.renderCurrentView,\n hasUIView: pickerViewsResponse.hasUIView,\n shouldRestoreFocus: pickerViewsResponse.shouldRestoreFocus,\n // Picker layout\n layoutProps: pickerLayoutResponse.layoutProps,\n // Picker context\n contextValue: pickerValueResponse.contextValue,\n // Picker owner state\n ownerState: pickerOwnerState\n };\n};","import generateUtilityClass from '@mui/utils/generateUtilityClass';\nimport generateUtilityClasses from '@mui/utils/generateUtilityClasses';\nexport function getPickersLayoutUtilityClass(slot) {\n return generateUtilityClass('MuiPickersLayout', slot);\n}\nexport const pickersLayoutClasses = generateUtilityClasses('MuiPickersLayout', ['root', 'landscape', 'contentWrapper', 'toolbar', 'actionBar', 'tabs', 'shortcuts']);","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"onAccept\", \"onClear\", \"onCancel\", \"onSetToday\", \"actions\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport Button from '@mui/material/Button';\nimport DialogActions from '@mui/material/DialogActions';\nimport { usePickersTranslations } from \"../hooks/usePickersTranslations.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Demos:\n *\n * - [Custom slots and subcomponents](https://mui.com/x/react-date-pickers/custom-components/)\n * - [Custom layout](https://mui.com/x/react-date-pickers/custom-layout/)\n *\n * API:\n *\n * - [PickersActionBar API](https://mui.com/x/api/date-pickers/pickers-action-bar/)\n */\nfunction PickersActionBar(props) {\n const {\n onAccept,\n onClear,\n onCancel,\n onSetToday,\n actions\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const translations = usePickersTranslations();\n if (actions == null || actions.length === 0) {\n return null;\n }\n const buttons = actions?.map(actionType => {\n switch (actionType) {\n case 'clear':\n return /*#__PURE__*/_jsx(Button, {\n onClick: onClear,\n children: translations.clearButtonLabel\n }, actionType);\n case 'cancel':\n return /*#__PURE__*/_jsx(Button, {\n onClick: onCancel,\n children: translations.cancelButtonLabel\n }, actionType);\n case 'accept':\n return /*#__PURE__*/_jsx(Button, {\n onClick: onAccept,\n children: translations.okButtonLabel\n }, actionType);\n case 'today':\n return /*#__PURE__*/_jsx(Button, {\n onClick: onSetToday,\n children: translations.todayButtonLabel\n }, actionType);\n default:\n return null;\n }\n });\n return /*#__PURE__*/_jsx(DialogActions, _extends({}, other, {\n children: buttons\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? PickersActionBar.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Ordered array of actions to display.\n * If empty, does not display that action bar.\n * @default `['cancel', 'accept']` for mobile and `[]` for desktop\n */\n actions: PropTypes.arrayOf(PropTypes.oneOf(['accept', 'cancel', 'clear', 'today']).isRequired),\n /**\n * If `true`, the actions do not have additional margin.\n * @default false\n */\n disableSpacing: PropTypes.bool,\n onAccept: PropTypes.func.isRequired,\n onCancel: PropTypes.func.isRequired,\n onClear: PropTypes.func.isRequired,\n onSetToday: PropTypes.func.isRequired,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport { PickersActionBar };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"items\", \"changeImportance\", \"isLandscape\", \"onChange\", \"isValid\"],\n _excluded2 = [\"getValue\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport List from '@mui/material/List';\nimport ListItem from '@mui/material/ListItem';\nimport Chip from '@mui/material/Chip';\nimport { VIEW_HEIGHT } from \"../internals/constants/dimensions.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Demos:\n *\n * - [Shortcuts](https://mui.com/x/react-date-pickers/shortcuts/)\n *\n * API:\n *\n * - [PickersShortcuts API](https://mui.com/x/api/date-pickers/pickers-shortcuts/)\n */\nfunction PickersShortcuts(props) {\n const {\n items,\n changeImportance = 'accept',\n onChange,\n isValid\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n if (items == null || items.length === 0) {\n return null;\n }\n const resolvedItems = items.map(_ref => {\n let {\n getValue\n } = _ref,\n item = _objectWithoutPropertiesLoose(_ref, _excluded2);\n const newValue = getValue({\n isValid\n });\n return _extends({}, item, {\n label: item.label,\n onClick: () => {\n onChange(newValue, changeImportance, item);\n },\n disabled: !isValid(newValue)\n });\n });\n return /*#__PURE__*/_jsx(List, _extends({\n dense: true,\n sx: [{\n maxHeight: VIEW_HEIGHT,\n maxWidth: 200,\n overflow: 'auto'\n }, ...(Array.isArray(other.sx) ? other.sx : [other.sx])]\n }, other, {\n children: resolvedItems.map(item => {\n return /*#__PURE__*/_jsx(ListItem, {\n children: /*#__PURE__*/_jsx(Chip, _extends({}, item))\n }, item.id ?? item.label);\n })\n }));\n}\nprocess.env.NODE_ENV !== \"production\" ? PickersShortcuts.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Importance of the change when picking a shortcut:\n * - \"accept\": fires `onChange`, fires `onAccept` and closes the picker.\n * - \"set\": fires `onChange` but do not fire `onAccept` and does not close the picker.\n * @default \"accept\"\n */\n changeImportance: PropTypes.oneOf(['accept', 'set']),\n className: PropTypes.string,\n component: PropTypes.elementType,\n /**\n * If `true`, compact vertical padding designed for keyboard and mouse input is used for\n * the list and list items.\n * The prop is available to descendant components as the `dense` context.\n * @default false\n */\n dense: PropTypes.bool,\n /**\n * If `true`, vertical padding is removed from the list.\n * @default false\n */\n disablePadding: PropTypes.bool,\n isLandscape: PropTypes.bool.isRequired,\n isValid: PropTypes.func.isRequired,\n /**\n * Ordered array of shortcuts to display.\n * If empty, does not display the shortcuts.\n * @default []\n */\n items: PropTypes.arrayOf(PropTypes.shape({\n getValue: PropTypes.func.isRequired,\n id: PropTypes.string,\n label: PropTypes.string.isRequired\n })),\n onChange: PropTypes.func.isRequired,\n style: PropTypes.object,\n /**\n * The content of the subheader, normally `ListSubheader`.\n */\n subheader: PropTypes.node,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object])\n} : void 0;\nexport { PickersShortcuts };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { PickersActionBar } from \"../PickersActionBar/index.js\";\nimport { getPickersLayoutUtilityClass } from \"./pickersLayoutClasses.js\";\nimport { PickersShortcuts } from \"../PickersShortcuts/index.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nfunction toolbarHasView(toolbarProps) {\n return toolbarProps.view !== null;\n}\nconst useUtilityClasses = ownerState => {\n const {\n classes,\n isLandscape\n } = ownerState;\n const slots = {\n root: ['root', isLandscape && 'landscape'],\n contentWrapper: ['contentWrapper'],\n toolbar: ['toolbar'],\n actionBar: ['actionBar'],\n tabs: ['tabs'],\n landscape: ['landscape'],\n shortcuts: ['shortcuts']\n };\n return composeClasses(slots, getPickersLayoutUtilityClass, classes);\n};\nconst usePickerLayout = props => {\n const {\n wrapperVariant,\n onAccept,\n onClear,\n onCancel,\n onSetToday,\n view,\n views,\n onViewChange,\n value,\n onChange,\n onSelectShortcut,\n isValid,\n isLandscape,\n disabled,\n readOnly,\n children,\n slots,\n slotProps\n // TODO: Remove this \"as\" hack. It get introduced to mark `value` prop in PickersLayoutProps as not required.\n // The true type should be\n // - For pickers value: TDate | null\n // - For range pickers value: [TDate | null, TDate | null]\n } = props;\n const classes = useUtilityClasses(props);\n\n // Action bar\n const ActionBar = slots?.actionBar ?? PickersActionBar;\n const actionBarProps = useSlotProps({\n elementType: ActionBar,\n externalSlotProps: slotProps?.actionBar,\n additionalProps: {\n onAccept,\n onClear,\n onCancel,\n onSetToday,\n actions: wrapperVariant === 'desktop' ? [] : ['cancel', 'accept']\n },\n className: classes.actionBar,\n ownerState: _extends({}, props, {\n wrapperVariant\n })\n });\n const actionBar = /*#__PURE__*/_jsx(ActionBar, _extends({}, actionBarProps));\n\n // Toolbar\n const Toolbar = slots?.toolbar;\n const toolbarProps = useSlotProps({\n elementType: Toolbar,\n externalSlotProps: slotProps?.toolbar,\n additionalProps: {\n isLandscape,\n onChange,\n value,\n view,\n onViewChange,\n views,\n disabled,\n readOnly\n },\n className: classes.toolbar,\n ownerState: _extends({}, props, {\n wrapperVariant\n })\n });\n const toolbar = toolbarHasView(toolbarProps) && !!Toolbar ? /*#__PURE__*/_jsx(Toolbar, _extends({}, toolbarProps)) : null;\n\n // Content\n const content = children;\n\n // Tabs\n const Tabs = slots?.tabs;\n const tabs = view && Tabs ? /*#__PURE__*/_jsx(Tabs, _extends({\n view: view,\n onViewChange: onViewChange,\n className: classes.tabs\n }, slotProps?.tabs)) : null;\n\n // Shortcuts\n const Shortcuts = slots?.shortcuts ?? PickersShortcuts;\n const shortcutsProps = useSlotProps({\n elementType: Shortcuts,\n externalSlotProps: slotProps?.shortcuts,\n additionalProps: {\n isValid,\n isLandscape,\n onChange: onSelectShortcut\n },\n className: classes.shortcuts,\n ownerState: {\n isValid,\n isLandscape,\n onChange: onSelectShortcut,\n wrapperVariant\n }\n });\n const shortcuts = view && !!Shortcuts ? /*#__PURE__*/_jsx(Shortcuts, _extends({}, shortcutsProps)) : null;\n return {\n toolbar,\n content,\n tabs,\n actionBar,\n shortcuts\n };\n};\nexport default usePickerLayout;","'use client';\n\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { styled, useThemeProps } from '@mui/material/styles';\nimport composeClasses from '@mui/utils/composeClasses';\nimport { pickersLayoutClasses, getPickersLayoutUtilityClass } from \"./pickersLayoutClasses.js\";\nimport usePickerLayout from \"./usePickerLayout.js\";\nimport { jsxs as _jsxs, jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n isLandscape,\n classes\n } = ownerState;\n const slots = {\n root: ['root', isLandscape && 'landscape'],\n contentWrapper: ['contentWrapper']\n };\n return composeClasses(slots, getPickersLayoutUtilityClass, classes);\n};\nexport const PickersLayoutRoot = styled('div', {\n name: 'MuiPickersLayout',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n display: 'grid',\n gridAutoColumns: 'max-content auto max-content',\n gridAutoRows: 'max-content auto max-content',\n [`& .${pickersLayoutClasses.actionBar}`]: {\n gridColumn: '1 / 4',\n gridRow: 3\n },\n variants: [{\n props: {\n isLandscape: true\n },\n style: {\n [`& .${pickersLayoutClasses.toolbar}`]: {\n gridColumn: 1,\n gridRow: '2 / 3'\n },\n [`.${pickersLayoutClasses.shortcuts}`]: {\n gridColumn: '2 / 4',\n gridRow: 1\n }\n }\n }, {\n props: {\n isLandscape: true,\n isRtl: true\n },\n style: {\n [`& .${pickersLayoutClasses.toolbar}`]: {\n gridColumn: 3\n }\n }\n }, {\n props: {\n isLandscape: false\n },\n style: {\n [`& .${pickersLayoutClasses.toolbar}`]: {\n gridColumn: '2 / 4',\n gridRow: 1\n },\n [`& .${pickersLayoutClasses.shortcuts}`]: {\n gridColumn: 1,\n gridRow: '2 / 3'\n }\n }\n }, {\n props: {\n isLandscape: false,\n isRtl: true\n },\n style: {\n [`& .${pickersLayoutClasses.shortcuts}`]: {\n gridColumn: 3\n }\n }\n }]\n});\nexport const PickersLayoutContentWrapper = styled('div', {\n name: 'MuiPickersLayout',\n slot: 'ContentWrapper',\n overridesResolver: (props, styles) => styles.contentWrapper\n})({\n gridColumn: 2,\n gridRow: 2,\n display: 'flex',\n flexDirection: 'column'\n});\n/**\n * Demos:\n *\n * - [Custom layout](https://mui.com/x/react-date-pickers/custom-layout/)\n *\n * API:\n *\n * - [PickersLayout API](https://mui.com/x/api/date-pickers/pickers-layout/)\n */\nconst PickersLayout = /*#__PURE__*/React.forwardRef(function PickersLayout(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiPickersLayout'\n });\n const {\n toolbar,\n content,\n tabs,\n actionBar,\n shortcuts\n } = usePickerLayout(props);\n const {\n sx,\n className,\n isLandscape,\n wrapperVariant\n } = props;\n const classes = useUtilityClasses(props);\n return /*#__PURE__*/_jsxs(PickersLayoutRoot, {\n ref: ref,\n sx: sx,\n className: clsx(classes.root, className),\n ownerState: props,\n children: [isLandscape ? shortcuts : toolbar, isLandscape ? toolbar : shortcuts, /*#__PURE__*/_jsx(PickersLayoutContentWrapper, {\n className: classes.contentWrapper,\n children: wrapperVariant === 'desktop' ? /*#__PURE__*/_jsxs(React.Fragment, {\n children: [content, tabs]\n }) : /*#__PURE__*/_jsxs(React.Fragment, {\n children: [tabs, content]\n })\n }), actionBar]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? PickersLayout.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n children: PropTypes.node,\n /**\n * Override or extend the styles applied to the component.\n */\n classes: PropTypes.object,\n className: PropTypes.string,\n disabled: PropTypes.bool,\n isLandscape: PropTypes.bool.isRequired,\n /**\n * `true` if the application is in right-to-left direction.\n */\n isRtl: PropTypes.bool.isRequired,\n isValid: PropTypes.func.isRequired,\n onAccept: PropTypes.func.isRequired,\n onCancel: PropTypes.func.isRequired,\n onChange: PropTypes.func.isRequired,\n onClear: PropTypes.func.isRequired,\n onClose: PropTypes.func.isRequired,\n onDismiss: PropTypes.func.isRequired,\n onOpen: PropTypes.func.isRequired,\n onSelectShortcut: PropTypes.func.isRequired,\n onSetToday: PropTypes.func.isRequired,\n onViewChange: PropTypes.func.isRequired,\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n readOnly: PropTypes.bool,\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * Overridable component slots.\n * @default {}\n */\n slots: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n value: PropTypes.any,\n view: PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']),\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'year']).isRequired).isRequired,\n wrapperVariant: PropTypes.oneOf(['desktop', 'mobile'])\n} : void 0;\nexport { PickersLayout };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"props\", \"getOpenDialogAriaText\"],\n _excluded2 = [\"ownerState\"],\n _excluded3 = [\"ownerState\"];\nimport * as React from 'react';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport MuiInputAdornment from '@mui/material/InputAdornment';\nimport IconButton from '@mui/material/IconButton';\nimport useForkRef from '@mui/utils/useForkRef';\nimport useId from '@mui/utils/useId';\nimport { PickersPopper } from \"../../components/PickersPopper.js\";\nimport { usePicker } from \"../usePicker/index.js\";\nimport { PickersLayout } from \"../../../PickersLayout/index.js\";\nimport { PickersProvider } from \"../../components/PickersProvider.js\";\n\n/**\n * Hook managing all the single-date desktop pickers:\n * - DesktopDatePicker\n * - DesktopDateTimePicker\n * - DesktopTimePicker\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const useDesktopPicker = _ref => {\n let {\n props,\n getOpenDialogAriaText\n } = _ref,\n pickerParams = _objectWithoutPropertiesLoose(_ref, _excluded);\n const {\n slots,\n slotProps: innerSlotProps,\n className,\n sx,\n format,\n formatDensity,\n enableAccessibleFieldDOMStructure,\n selectedSections,\n onSelectedSectionsChange,\n timezone,\n name,\n label,\n inputRef,\n readOnly,\n disabled,\n autoFocus,\n localeText,\n reduceAnimations\n } = props;\n const containerRef = React.useRef(null);\n const fieldRef = React.useRef(null);\n const labelId = useId();\n const isToolbarHidden = innerSlotProps?.toolbar?.hidden ?? false;\n const {\n open,\n actions,\n hasUIView,\n layoutProps,\n renderCurrentView,\n shouldRestoreFocus,\n fieldProps: pickerFieldProps,\n contextValue,\n ownerState\n } = usePicker(_extends({}, pickerParams, {\n props,\n fieldRef,\n autoFocusView: true,\n additionalViewProps: {},\n wrapperVariant: 'desktop'\n }));\n const InputAdornment = slots.inputAdornment ?? MuiInputAdornment;\n const _useSlotProps = useSlotProps({\n elementType: InputAdornment,\n externalSlotProps: innerSlotProps?.inputAdornment,\n additionalProps: {\n position: 'end'\n },\n ownerState: props\n }),\n inputAdornmentProps = _objectWithoutPropertiesLoose(_useSlotProps, _excluded2);\n const OpenPickerButton = slots.openPickerButton ?? IconButton;\n const _useSlotProps2 = useSlotProps({\n elementType: OpenPickerButton,\n externalSlotProps: innerSlotProps?.openPickerButton,\n additionalProps: {\n disabled: disabled || readOnly,\n onClick: open ? actions.onClose : actions.onOpen,\n 'aria-label': getOpenDialogAriaText(pickerFieldProps.value),\n edge: inputAdornmentProps.position\n },\n ownerState: props\n }),\n openPickerButtonProps = _objectWithoutPropertiesLoose(_useSlotProps2, _excluded3);\n const OpenPickerIcon = slots.openPickerIcon;\n const openPickerIconProps = useSlotProps({\n elementType: OpenPickerIcon,\n externalSlotProps: innerSlotProps?.openPickerIcon,\n ownerState\n });\n const Field = slots.field;\n const fieldProps = useSlotProps({\n elementType: Field,\n externalSlotProps: innerSlotProps?.field,\n additionalProps: _extends({}, pickerFieldProps, isToolbarHidden && {\n id: labelId\n }, {\n readOnly,\n disabled,\n className,\n sx,\n format,\n formatDensity,\n enableAccessibleFieldDOMStructure,\n selectedSections,\n onSelectedSectionsChange,\n timezone,\n label,\n name,\n autoFocus: autoFocus && !props.open,\n focused: open ? true : undefined\n }, inputRef ? {\n inputRef\n } : {}),\n ownerState: props\n });\n\n // TODO: Move to `useSlotProps` when https://github.com/mui/material-ui/pull/35088 will be merged\n if (hasUIView) {\n fieldProps.InputProps = _extends({}, fieldProps.InputProps, {\n ref: containerRef\n }, !props.disableOpenPicker && {\n [`${inputAdornmentProps.position}Adornment`]: /*#__PURE__*/_jsx(InputAdornment, _extends({}, inputAdornmentProps, {\n children: /*#__PURE__*/_jsx(OpenPickerButton, _extends({}, openPickerButtonProps, {\n children: /*#__PURE__*/_jsx(OpenPickerIcon, _extends({}, openPickerIconProps))\n }))\n }))\n });\n }\n const slotsForField = _extends({\n textField: slots.textField,\n clearIcon: slots.clearIcon,\n clearButton: slots.clearButton\n }, fieldProps.slots);\n const Layout = slots.layout ?? PickersLayout;\n let labelledById = labelId;\n if (isToolbarHidden) {\n if (label) {\n labelledById = `${labelId}-label`;\n } else {\n labelledById = undefined;\n }\n }\n const slotProps = _extends({}, innerSlotProps, {\n toolbar: _extends({}, innerSlotProps?.toolbar, {\n titleId: labelId\n }),\n popper: _extends({\n 'aria-labelledby': labelledById\n }, innerSlotProps?.popper)\n });\n const handleFieldRef = useForkRef(fieldRef, fieldProps.unstableFieldRef);\n const renderPicker = () => /*#__PURE__*/_jsxs(PickersProvider, {\n contextValue: contextValue,\n localeText: localeText,\n children: [/*#__PURE__*/_jsx(Field, _extends({}, fieldProps, {\n slots: slotsForField,\n slotProps: slotProps,\n unstableFieldRef: handleFieldRef\n })), /*#__PURE__*/_jsx(PickersPopper, _extends({\n role: \"dialog\",\n placement: \"bottom-start\",\n anchorEl: containerRef.current\n }, actions, {\n open: open,\n slots: slots,\n slotProps: slotProps,\n shouldRestoreFocus: shouldRestoreFocus,\n reduceAnimations: reduceAnimations,\n children: /*#__PURE__*/_jsx(Layout, _extends({}, layoutProps, slotProps?.layout, {\n slots: slots,\n slotProps: slotProps,\n children: renderCurrentView()\n }))\n }))]\n });\n return {\n renderPicker\n };\n};","import * as React from 'react';\nimport { DateCalendar } from \"../DateCalendar/index.js\";\nimport { isDatePickerView } from \"../internals/utils/date-utils.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const renderDateViewCalendar = ({\n view,\n onViewChange,\n views,\n focusedView,\n onFocusedViewChange,\n value,\n defaultValue,\n referenceDate,\n onChange,\n className,\n classes,\n disableFuture,\n disablePast,\n minDate,\n maxDate,\n shouldDisableDate,\n shouldDisableMonth,\n shouldDisableYear,\n reduceAnimations,\n onMonthChange,\n monthsPerRow,\n onYearChange,\n yearsOrder,\n yearsPerRow,\n slots,\n slotProps,\n loading,\n renderLoading,\n disableHighlightToday,\n readOnly,\n disabled,\n showDaysOutsideCurrentMonth,\n dayOfWeekFormatter,\n sx,\n autoFocus,\n fixedWeekNumber,\n displayWeekNumber,\n timezone\n}) => /*#__PURE__*/_jsx(DateCalendar, {\n view: view,\n onViewChange: onViewChange,\n views: views.filter(isDatePickerView),\n focusedView: focusedView && isDatePickerView(focusedView) ? focusedView : null,\n onFocusedViewChange: onFocusedViewChange,\n value: value,\n defaultValue: defaultValue,\n referenceDate: referenceDate,\n onChange: onChange,\n className: className,\n classes: classes,\n disableFuture: disableFuture,\n disablePast: disablePast,\n minDate: minDate,\n maxDate: maxDate,\n shouldDisableDate: shouldDisableDate,\n shouldDisableMonth: shouldDisableMonth,\n shouldDisableYear: shouldDisableYear,\n reduceAnimations: reduceAnimations,\n onMonthChange: onMonthChange,\n monthsPerRow: monthsPerRow,\n onYearChange: onYearChange,\n yearsOrder: yearsOrder,\n yearsPerRow: yearsPerRow,\n slots: slots,\n slotProps: slotProps,\n loading: loading,\n renderLoading: renderLoading,\n disableHighlightToday: disableHighlightToday,\n readOnly: readOnly,\n disabled: disabled,\n showDaysOutsideCurrentMonth: showDaysOutsideCurrentMonth,\n dayOfWeekFormatter: dayOfWeekFormatter,\n sx: sx,\n autoFocus: autoFocus,\n fixedWeekNumber: fixedWeekNumber,\n displayWeekNumber: displayWeekNumber,\n timezone: timezone\n});","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport resolveComponentProps from '@mui/utils/resolveComponentProps';\nimport { refType } from '@mui/utils';\nimport { singleItemValueManager } from \"../internals/utils/valueManagers.js\";\nimport { useDatePickerDefaultizedProps } from \"../DatePicker/shared.js\";\nimport { usePickersTranslations } from \"../hooks/usePickersTranslations.js\";\nimport { useUtils } from \"../internals/hooks/useUtils.js\";\nimport { validateDate, extractValidationProps } from \"../validation/index.js\";\nimport { useDesktopPicker } from \"../internals/hooks/useDesktopPicker/index.js\";\nimport { CalendarIcon } from \"../icons/index.js\";\nimport { DateField } from \"../DateField/index.js\";\nimport { renderDateViewCalendar } from \"../dateViewRenderers/index.js\";\nimport { resolveDateFormat } from \"../internals/utils/date-utils.js\";\nimport { buildGetOpenDialogAriaText } from \"../locales/utils/getPickersLocalization.js\";\n/**\n * Demos:\n *\n * - [DatePicker](https://mui.com/x/react-date-pickers/date-picker/)\n * - [Validation](https://mui.com/x/react-date-pickers/validation/)\n *\n * API:\n *\n * - [DesktopDatePicker API](https://mui.com/x/api/date-pickers/desktop-date-picker/)\n */\nconst DesktopDatePicker = /*#__PURE__*/React.forwardRef(function DesktopDatePicker(inProps, ref) {\n const translations = usePickersTranslations();\n const utils = useUtils();\n\n // Props with the default values common to all date pickers\n const defaultizedProps = useDatePickerDefaultizedProps(inProps, 'MuiDesktopDatePicker');\n const viewRenderers = _extends({\n day: renderDateViewCalendar,\n month: renderDateViewCalendar,\n year: renderDateViewCalendar\n }, defaultizedProps.viewRenderers);\n\n // Props with the default values specific to the desktop variant\n const props = _extends({}, defaultizedProps, {\n viewRenderers,\n format: resolveDateFormat(utils, defaultizedProps, false),\n yearsPerRow: defaultizedProps.yearsPerRow ?? 4,\n slots: _extends({\n openPickerIcon: CalendarIcon,\n field: DateField\n }, defaultizedProps.slots),\n slotProps: _extends({}, defaultizedProps.slotProps, {\n field: ownerState => _extends({}, resolveComponentProps(defaultizedProps.slotProps?.field, ownerState), extractValidationProps(defaultizedProps), {\n ref\n }),\n toolbar: _extends({\n hidden: true\n }, defaultizedProps.slotProps?.toolbar)\n })\n });\n const {\n renderPicker\n } = useDesktopPicker({\n props,\n valueManager: singleItemValueManager,\n valueType: 'date',\n getOpenDialogAriaText: buildGetOpenDialogAriaText({\n utils,\n formatKey: 'fullDate',\n contextTranslation: translations.openDatePickerDialogue,\n propsTranslation: props.localeText?.openDatePickerDialogue\n }),\n validator: validateDate\n });\n return renderPicker();\n});\nDesktopDatePicker.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * If `true`, the main element is focused during the first mount.\n * This main element is:\n * - the element chosen by the visible view if any (i.e: the selected day on the `day` view).\n * - the `input` element if there is a field rendered.\n */\n autoFocus: PropTypes.bool,\n className: PropTypes.string,\n /**\n * If `true`, the popover or modal will close after submitting the full date.\n * @default `true` for desktop, `false` for mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n closeOnSelect: PropTypes.bool,\n /**\n * Formats the day of week displayed in the calendar header.\n * @param {TDate} date The date of the day of week provided by the adapter.\n * @returns {string} The name to display.\n * @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()\n */\n dayOfWeekFormatter: PropTypes.func,\n /**\n * The default value.\n * Used when the component is not controlled.\n */\n defaultValue: PropTypes.object,\n /**\n * If `true`, the picker and text field are disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, disable values after the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disableFuture: PropTypes.bool,\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n /**\n * If `true`, the open picker button will not be rendered (renders only the field).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n /**\n * If `true`, disable values before the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disablePast: PropTypes.bool,\n /**\n * If `true`, the week number will be display in the calendar.\n */\n displayWeekNumber: PropTypes.bool,\n /**\n * @default false\n */\n enableAccessibleFieldDOMStructure: PropTypes.any,\n /**\n * The day view will show as many weeks as needed after the end of the current month to match this value.\n * Put it to 6 to have a fixed number of weeks in Gregorian calendars\n */\n fixedWeekNumber: PropTypes.number,\n /**\n * Format of the date when rendered in the input(s).\n * Defaults to localized format based on the used `views`.\n */\n format: PropTypes.string,\n /**\n * Density of the format when rendered in the input.\n * Setting `formatDensity` to `\"spacious\"` will add a space before and after each `/`, `-` and `.` character.\n * @default \"dense\"\n */\n formatDensity: PropTypes.oneOf(['dense', 'spacious']),\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n /**\n * The label content.\n */\n label: PropTypes.node,\n /**\n * If `true`, calls `renderLoading` instead of rendering the day calendar.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n /**\n * Locale for components texts.\n * Allows overriding texts coming from `LocalizationProvider` and `theme`.\n */\n localeText: PropTypes.object,\n /**\n * Maximal selectable date.\n * @default 2099-12-31\n */\n maxDate: PropTypes.object,\n /**\n * Minimal selectable date.\n * @default 1900-01-01\n */\n minDate: PropTypes.object,\n /**\n * Months rendered per row.\n * @default 3\n */\n monthsPerRow: PropTypes.oneOf([3, 4]),\n /**\n * Name attribute used by the `input` element in the Field.\n */\n name: PropTypes.string,\n /**\n * Callback fired when the value is accepted.\n * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.\n * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.\n * @param {TValue} value The value that was just accepted.\n * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value.\n */\n onAccept: PropTypes.func,\n /**\n * Callback fired when the value changes.\n * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.\n * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.\n * @param {TValue} value The new value.\n * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value.\n */\n onChange: PropTypes.func,\n /**\n * Callback fired when the popup requests to be closed.\n * Use in controlled mode (see `open`).\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the error associated with the current value changes.\n * When a validation error is detected, the `error` parameter contains a non-null value.\n * This can be used to render an appropriate form error.\n * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.\n * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.\n * @param {TError} error The reason why the current value is not valid.\n * @param {TValue} value The value associated with the error.\n */\n onError: PropTypes.func,\n /**\n * Callback fired on month change.\n * @template TDate\n * @param {TDate} month The new month.\n */\n onMonthChange: PropTypes.func,\n /**\n * Callback fired when the popup requests to be opened.\n * Use in controlled mode (see `open`).\n */\n onOpen: PropTypes.func,\n /**\n * Callback fired when the selected sections change.\n * @param {FieldSelectedSections} newValue The new selected sections.\n */\n onSelectedSectionsChange: PropTypes.func,\n /**\n * Callback fired on view change.\n * @template TView\n * @param {TView} view The new view.\n */\n onViewChange: PropTypes.func,\n /**\n * Callback fired on year change.\n * @template TDate\n * @param {TDate} year The new year.\n */\n onYearChange: PropTypes.func,\n /**\n * Control the popup or dialog open state.\n * @default false\n */\n open: PropTypes.bool,\n /**\n * The default visible view.\n * Used when the component view is not controlled.\n * Must be a valid option from `views` list.\n */\n openTo: PropTypes.oneOf(['day', 'month', 'year']),\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n readOnly: PropTypes.bool,\n /**\n * If `true`, disable heavy animations.\n * @default `@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13\n */\n reduceAnimations: PropTypes.bool,\n /**\n * The date used to generate the new value when both `value` and `defaultValue` are empty.\n * @default The closest valid date-time using the validation props, except callbacks like `shouldDisable<...>`.\n */\n referenceDate: PropTypes.object,\n /**\n * Component displaying when passed `loading` true.\n * @returns {React.ReactNode} The node to render when loading.\n * @default () => ...\n */\n renderLoading: PropTypes.func,\n /**\n * The currently selected sections.\n * This prop accepts four formats:\n * 1. If a number is provided, the section at this index will be selected.\n * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.\n * 3. If `\"all\"` is provided, all the sections will be selected.\n * 4. If `null` is provided, no section will be selected.\n * If not provided, the selected sections will be handled internally.\n */\n selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number]),\n /**\n * Disable specific date.\n *\n * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.\n *\n * @template TDate\n * @param {TDate} day The date to test.\n * @returns {boolean} If `true` the date will be disabled.\n */\n shouldDisableDate: PropTypes.func,\n /**\n * Disable specific month.\n * @template TDate\n * @param {TDate} month The month to test.\n * @returns {boolean} If `true`, the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n /**\n * Disable specific year.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} If `true`, the year will be disabled.\n */\n shouldDisableYear: PropTypes.func,\n /**\n * If `true`, days outside the current month are rendered:\n *\n * - if `fixedWeekNumber` is defined, renders days to have the weeks requested.\n *\n * - if `fixedWeekNumber` is not defined, renders day to fill the first and last week of the current month.\n *\n * - ignored if `calendars` equals more than `1` on range pickers.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * Overridable component slots.\n * @default {}\n */\n slots: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Choose which timezone to use for the value.\n * Example: \"default\", \"system\", \"UTC\", \"America/New_York\".\n * If you pass values from other timezones to some props, they will be converted to this timezone before being used.\n * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.\n * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.\n */\n timezone: PropTypes.string,\n /**\n * The selected value.\n * Used when the component is controlled.\n */\n value: PropTypes.object,\n /**\n * The visible view.\n * Used when the component view is controlled.\n * Must be a valid option from `views` list.\n */\n view: PropTypes.oneOf(['day', 'month', 'year']),\n /**\n * Define custom view renderers for each section.\n * If `null`, the section will only have field editing.\n * If `undefined`, internally defined view will be used.\n */\n viewRenderers: PropTypes.shape({\n day: PropTypes.func,\n month: PropTypes.func,\n year: PropTypes.func\n }),\n /**\n * Available views.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired),\n /**\n * Years are displayed in ascending (chronological) order by default.\n * If `desc`, years are displayed in descending order.\n * @default 'asc'\n */\n yearsOrder: PropTypes.oneOf(['asc', 'desc']),\n /**\n * Years rendered per row.\n * @default 4\n */\n yearsPerRow: PropTypes.oneOf([3, 4])\n};\nexport { DesktopDatePicker };","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport DialogContent from '@mui/material/DialogContent';\nimport Fade from '@mui/material/Fade';\nimport MuiDialog, { dialogClasses } from '@mui/material/Dialog';\nimport { styled } from '@mui/material/styles';\nimport { DIALOG_WIDTH } from \"../constants/dimensions.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst PickersModalDialogRoot = styled(MuiDialog)({\n [`& .${dialogClasses.container}`]: {\n outline: 0\n },\n [`& .${dialogClasses.paper}`]: {\n outline: 0,\n minWidth: DIALOG_WIDTH\n }\n});\nconst PickersModalDialogContent = styled(DialogContent)({\n '&:first-of-type': {\n padding: 0\n }\n});\nexport function PickersModalDialog(props) {\n const {\n children,\n onDismiss,\n open,\n slots,\n slotProps\n } = props;\n const Dialog = slots?.dialog ?? PickersModalDialogRoot;\n const Transition = slots?.mobileTransition ?? Fade;\n return /*#__PURE__*/_jsx(Dialog, _extends({\n open: open,\n onClose: onDismiss\n }, slotProps?.dialog, {\n TransitionComponent: Transition,\n TransitionProps: slotProps?.mobileTransition,\n PaperComponent: slots?.mobilePaper,\n PaperProps: slotProps?.mobilePaper,\n children: /*#__PURE__*/_jsx(PickersModalDialogContent, {\n children: children\n })\n }));\n}","import _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"props\", \"getOpenDialogAriaText\"];\nimport * as React from 'react';\nimport useSlotProps from '@mui/utils/useSlotProps';\nimport useForkRef from '@mui/utils/useForkRef';\nimport useId from '@mui/utils/useId';\nimport { PickersModalDialog } from \"../../components/PickersModalDialog.js\";\nimport { usePicker } from \"../usePicker/index.js\";\nimport { onSpaceOrEnter } from \"../../utils/utils.js\";\nimport { PickersLayout } from \"../../../PickersLayout/index.js\";\nimport { PickersProvider } from \"../../components/PickersProvider.js\";\n\n/**\n * Hook managing all the single-date mobile pickers:\n * - MobileDatePicker\n * - MobileDateTimePicker\n * - MobileTimePicker\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const useMobilePicker = _ref => {\n let {\n props,\n getOpenDialogAriaText\n } = _ref,\n pickerParams = _objectWithoutPropertiesLoose(_ref, _excluded);\n const {\n slots,\n slotProps: innerSlotProps,\n className,\n sx,\n format,\n formatDensity,\n enableAccessibleFieldDOMStructure,\n selectedSections,\n onSelectedSectionsChange,\n timezone,\n name,\n label,\n inputRef,\n readOnly,\n disabled,\n localeText\n } = props;\n const fieldRef = React.useRef(null);\n const labelId = useId();\n const isToolbarHidden = innerSlotProps?.toolbar?.hidden ?? false;\n const {\n open,\n actions,\n layoutProps,\n renderCurrentView,\n fieldProps: pickerFieldProps,\n contextValue\n } = usePicker(_extends({}, pickerParams, {\n props,\n fieldRef,\n autoFocusView: true,\n additionalViewProps: {},\n wrapperVariant: 'mobile'\n }));\n const Field = slots.field;\n const fieldProps = useSlotProps({\n elementType: Field,\n externalSlotProps: innerSlotProps?.field,\n additionalProps: _extends({}, pickerFieldProps, isToolbarHidden && {\n id: labelId\n }, !(disabled || readOnly) && {\n onClick: actions.onOpen,\n onKeyDown: onSpaceOrEnter(actions.onOpen)\n }, {\n readOnly: readOnly ?? true,\n disabled,\n className,\n sx,\n format,\n formatDensity,\n enableAccessibleFieldDOMStructure,\n selectedSections,\n onSelectedSectionsChange,\n timezone,\n label,\n name\n }, inputRef ? {\n inputRef\n } : {}),\n ownerState: props\n });\n\n // TODO: Move to `useSlotProps` when https://github.com/mui/material-ui/pull/35088 will be merged\n fieldProps.inputProps = _extends({}, fieldProps.inputProps, {\n 'aria-label': getOpenDialogAriaText(pickerFieldProps.value)\n });\n const slotsForField = _extends({\n textField: slots.textField\n }, fieldProps.slots);\n const Layout = slots.layout ?? PickersLayout;\n let labelledById = labelId;\n if (isToolbarHidden) {\n if (label) {\n labelledById = `${labelId}-label`;\n } else {\n labelledById = undefined;\n }\n }\n const slotProps = _extends({}, innerSlotProps, {\n toolbar: _extends({}, innerSlotProps?.toolbar, {\n titleId: labelId\n }),\n mobilePaper: _extends({\n 'aria-labelledby': labelledById\n }, innerSlotProps?.mobilePaper)\n });\n const handleFieldRef = useForkRef(fieldRef, fieldProps.unstableFieldRef);\n const renderPicker = () => /*#__PURE__*/_jsxs(PickersProvider, {\n contextValue: contextValue,\n localeText: localeText,\n children: [/*#__PURE__*/_jsx(Field, _extends({}, fieldProps, {\n slots: slotsForField,\n slotProps: slotProps,\n unstableFieldRef: handleFieldRef\n })), /*#__PURE__*/_jsx(PickersModalDialog, _extends({}, actions, {\n open: open,\n slots: slots,\n slotProps: slotProps,\n children: /*#__PURE__*/_jsx(Layout, _extends({}, layoutProps, slotProps?.layout, {\n slots: slots,\n slotProps: slotProps,\n children: renderCurrentView()\n }))\n }))]\n });\n return {\n renderPicker\n };\n};","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport resolveComponentProps from '@mui/utils/resolveComponentProps';\nimport { refType } from '@mui/utils';\nimport { useMobilePicker } from \"../internals/hooks/useMobilePicker/index.js\";\nimport { useDatePickerDefaultizedProps } from \"../DatePicker/shared.js\";\nimport { usePickersTranslations } from \"../hooks/usePickersTranslations.js\";\nimport { useUtils } from \"../internals/hooks/useUtils.js\";\nimport { extractValidationProps, validateDate } from \"../validation/index.js\";\nimport { DateField } from \"../DateField/index.js\";\nimport { singleItemValueManager } from \"../internals/utils/valueManagers.js\";\nimport { renderDateViewCalendar } from \"../dateViewRenderers/index.js\";\nimport { resolveDateFormat } from \"../internals/utils/date-utils.js\";\nimport { buildGetOpenDialogAriaText } from \"../locales/utils/getPickersLocalization.js\";\n/**\n * Demos:\n *\n * - [DatePicker](https://mui.com/x/react-date-pickers/date-picker/)\n * - [Validation](https://mui.com/x/react-date-pickers/validation/)\n *\n * API:\n *\n * - [MobileDatePicker API](https://mui.com/x/api/date-pickers/mobile-date-picker/)\n */\nconst MobileDatePicker = /*#__PURE__*/React.forwardRef(function MobileDatePicker(inProps, ref) {\n const translations = usePickersTranslations();\n const utils = useUtils();\n\n // Props with the default values common to all date pickers\n const defaultizedProps = useDatePickerDefaultizedProps(inProps, 'MuiMobileDatePicker');\n const viewRenderers = _extends({\n day: renderDateViewCalendar,\n month: renderDateViewCalendar,\n year: renderDateViewCalendar\n }, defaultizedProps.viewRenderers);\n\n // Props with the default values specific to the mobile variant\n const props = _extends({}, defaultizedProps, {\n viewRenderers,\n format: resolveDateFormat(utils, defaultizedProps, false),\n slots: _extends({\n field: DateField\n }, defaultizedProps.slots),\n slotProps: _extends({}, defaultizedProps.slotProps, {\n field: ownerState => _extends({}, resolveComponentProps(defaultizedProps.slotProps?.field, ownerState), extractValidationProps(defaultizedProps), {\n ref\n }),\n toolbar: _extends({\n hidden: false\n }, defaultizedProps.slotProps?.toolbar)\n })\n });\n const {\n renderPicker\n } = useMobilePicker({\n props,\n valueManager: singleItemValueManager,\n valueType: 'date',\n getOpenDialogAriaText: buildGetOpenDialogAriaText({\n utils,\n formatKey: 'fullDate',\n contextTranslation: translations.openDatePickerDialogue,\n propsTranslation: props.localeText?.openDatePickerDialogue\n }),\n validator: validateDate\n });\n return renderPicker();\n});\nMobileDatePicker.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * If `true`, the main element is focused during the first mount.\n * This main element is:\n * - the element chosen by the visible view if any (i.e: the selected day on the `day` view).\n * - the `input` element if there is a field rendered.\n */\n autoFocus: PropTypes.bool,\n className: PropTypes.string,\n /**\n * If `true`, the popover or modal will close after submitting the full date.\n * @default `true` for desktop, `false` for mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n closeOnSelect: PropTypes.bool,\n /**\n * Formats the day of week displayed in the calendar header.\n * @param {TDate} date The date of the day of week provided by the adapter.\n * @returns {string} The name to display.\n * @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()\n */\n dayOfWeekFormatter: PropTypes.func,\n /**\n * The default value.\n * Used when the component is not controlled.\n */\n defaultValue: PropTypes.object,\n /**\n * If `true`, the picker and text field are disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, disable values after the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disableFuture: PropTypes.bool,\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n /**\n * If `true`, the open picker button will not be rendered (renders only the field).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n /**\n * If `true`, disable values before the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disablePast: PropTypes.bool,\n /**\n * If `true`, the week number will be display in the calendar.\n */\n displayWeekNumber: PropTypes.bool,\n /**\n * @default false\n */\n enableAccessibleFieldDOMStructure: PropTypes.any,\n /**\n * The day view will show as many weeks as needed after the end of the current month to match this value.\n * Put it to 6 to have a fixed number of weeks in Gregorian calendars\n */\n fixedWeekNumber: PropTypes.number,\n /**\n * Format of the date when rendered in the input(s).\n * Defaults to localized format based on the used `views`.\n */\n format: PropTypes.string,\n /**\n * Density of the format when rendered in the input.\n * Setting `formatDensity` to `\"spacious\"` will add a space before and after each `/`, `-` and `.` character.\n * @default \"dense\"\n */\n formatDensity: PropTypes.oneOf(['dense', 'spacious']),\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n /**\n * The label content.\n */\n label: PropTypes.node,\n /**\n * If `true`, calls `renderLoading` instead of rendering the day calendar.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n /**\n * Locale for components texts.\n * Allows overriding texts coming from `LocalizationProvider` and `theme`.\n */\n localeText: PropTypes.object,\n /**\n * Maximal selectable date.\n * @default 2099-12-31\n */\n maxDate: PropTypes.object,\n /**\n * Minimal selectable date.\n * @default 1900-01-01\n */\n minDate: PropTypes.object,\n /**\n * Months rendered per row.\n * @default 3\n */\n monthsPerRow: PropTypes.oneOf([3, 4]),\n /**\n * Name attribute used by the `input` element in the Field.\n */\n name: PropTypes.string,\n /**\n * Callback fired when the value is accepted.\n * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.\n * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.\n * @param {TValue} value The value that was just accepted.\n * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value.\n */\n onAccept: PropTypes.func,\n /**\n * Callback fired when the value changes.\n * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.\n * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.\n * @param {TValue} value The new value.\n * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value.\n */\n onChange: PropTypes.func,\n /**\n * Callback fired when the popup requests to be closed.\n * Use in controlled mode (see `open`).\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the error associated with the current value changes.\n * When a validation error is detected, the `error` parameter contains a non-null value.\n * This can be used to render an appropriate form error.\n * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.\n * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.\n * @param {TError} error The reason why the current value is not valid.\n * @param {TValue} value The value associated with the error.\n */\n onError: PropTypes.func,\n /**\n * Callback fired on month change.\n * @template TDate\n * @param {TDate} month The new month.\n */\n onMonthChange: PropTypes.func,\n /**\n * Callback fired when the popup requests to be opened.\n * Use in controlled mode (see `open`).\n */\n onOpen: PropTypes.func,\n /**\n * Callback fired when the selected sections change.\n * @param {FieldSelectedSections} newValue The new selected sections.\n */\n onSelectedSectionsChange: PropTypes.func,\n /**\n * Callback fired on view change.\n * @template TView\n * @param {TView} view The new view.\n */\n onViewChange: PropTypes.func,\n /**\n * Callback fired on year change.\n * @template TDate\n * @param {TDate} year The new year.\n */\n onYearChange: PropTypes.func,\n /**\n * Control the popup or dialog open state.\n * @default false\n */\n open: PropTypes.bool,\n /**\n * The default visible view.\n * Used when the component view is not controlled.\n * Must be a valid option from `views` list.\n */\n openTo: PropTypes.oneOf(['day', 'month', 'year']),\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n readOnly: PropTypes.bool,\n /**\n * If `true`, disable heavy animations.\n * @default `@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13\n */\n reduceAnimations: PropTypes.bool,\n /**\n * The date used to generate the new value when both `value` and `defaultValue` are empty.\n * @default The closest valid date-time using the validation props, except callbacks like `shouldDisable<...>`.\n */\n referenceDate: PropTypes.object,\n /**\n * Component displaying when passed `loading` true.\n * @returns {React.ReactNode} The node to render when loading.\n * @default () => ...\n */\n renderLoading: PropTypes.func,\n /**\n * The currently selected sections.\n * This prop accepts four formats:\n * 1. If a number is provided, the section at this index will be selected.\n * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.\n * 3. If `\"all\"` is provided, all the sections will be selected.\n * 4. If `null` is provided, no section will be selected.\n * If not provided, the selected sections will be handled internally.\n */\n selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number]),\n /**\n * Disable specific date.\n *\n * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.\n *\n * @template TDate\n * @param {TDate} day The date to test.\n * @returns {boolean} If `true` the date will be disabled.\n */\n shouldDisableDate: PropTypes.func,\n /**\n * Disable specific month.\n * @template TDate\n * @param {TDate} month The month to test.\n * @returns {boolean} If `true`, the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n /**\n * Disable specific year.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} If `true`, the year will be disabled.\n */\n shouldDisableYear: PropTypes.func,\n /**\n * If `true`, days outside the current month are rendered:\n *\n * - if `fixedWeekNumber` is defined, renders days to have the weeks requested.\n *\n * - if `fixedWeekNumber` is not defined, renders day to fill the first and last week of the current month.\n *\n * - ignored if `calendars` equals more than `1` on range pickers.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * Overridable component slots.\n * @default {}\n */\n slots: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Choose which timezone to use for the value.\n * Example: \"default\", \"system\", \"UTC\", \"America/New_York\".\n * If you pass values from other timezones to some props, they will be converted to this timezone before being used.\n * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.\n * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.\n */\n timezone: PropTypes.string,\n /**\n * The selected value.\n * Used when the component is controlled.\n */\n value: PropTypes.object,\n /**\n * The visible view.\n * Used when the component view is controlled.\n * Must be a valid option from `views` list.\n */\n view: PropTypes.oneOf(['day', 'month', 'year']),\n /**\n * Define custom view renderers for each section.\n * If `null`, the section will only have field editing.\n * If `undefined`, internally defined view will be used.\n */\n viewRenderers: PropTypes.shape({\n day: PropTypes.func,\n month: PropTypes.func,\n year: PropTypes.func\n }),\n /**\n * Available views.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired),\n /**\n * Years are displayed in ascending (chronological) order by default.\n * If `desc`, years are displayed in descending order.\n * @default 'asc'\n */\n yearsOrder: PropTypes.oneOf(['asc', 'desc']),\n /**\n * Years rendered per row.\n * @default 3\n */\n yearsPerRow: PropTypes.oneOf([3, 4])\n};\nexport { MobileDatePicker };","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"desktopModeMediaQuery\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport useMediaQuery from '@mui/material/useMediaQuery';\nimport { useThemeProps } from '@mui/material/styles';\nimport { refType } from '@mui/utils';\nimport { DesktopDatePicker } from \"../DesktopDatePicker/index.js\";\nimport { MobileDatePicker } from \"../MobileDatePicker/index.js\";\nimport { DEFAULT_DESKTOP_MODE_MEDIA_QUERY } from \"../internals/utils/utils.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * Demos:\n *\n * - [DatePicker](https://mui.com/x/react-date-pickers/date-picker/)\n * - [Validation](https://mui.com/x/react-date-pickers/validation/)\n *\n * API:\n *\n * - [DatePicker API](https://mui.com/x/api/date-pickers/date-picker/)\n */\nconst DatePicker = /*#__PURE__*/React.forwardRef(function DatePicker(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'MuiDatePicker'\n });\n const {\n desktopModeMediaQuery = DEFAULT_DESKTOP_MODE_MEDIA_QUERY\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n\n // defaults to `true` in environments where `window.matchMedia` would not be available (i.e. test/jsdom)\n const isDesktop = useMediaQuery(desktopModeMediaQuery, {\n defaultMatches: true\n });\n if (isDesktop) {\n return /*#__PURE__*/_jsx(DesktopDatePicker, _extends({\n ref: ref\n }, other));\n }\n return /*#__PURE__*/_jsx(MobileDatePicker, _extends({\n ref: ref\n }, other));\n});\nprocess.env.NODE_ENV !== \"production\" ? DatePicker.propTypes = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit the TypeScript types and run \"pnpm proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * If `true`, the main element is focused during the first mount.\n * This main element is:\n * - the element chosen by the visible view if any (i.e: the selected day on the `day` view).\n * - the `input` element if there is a field rendered.\n */\n autoFocus: PropTypes.bool,\n className: PropTypes.string,\n /**\n * If `true`, the popover or modal will close after submitting the full date.\n * @default `true` for desktop, `false` for mobile (based on the chosen wrapper and `desktopModeMediaQuery` prop).\n */\n closeOnSelect: PropTypes.bool,\n /**\n * Formats the day of week displayed in the calendar header.\n * @param {TDate} date The date of the day of week provided by the adapter.\n * @returns {string} The name to display.\n * @default (date: TDate) => adapter.format(date, 'weekdayShort').charAt(0).toUpperCase()\n */\n dayOfWeekFormatter: PropTypes.func,\n /**\n * The default value.\n * Used when the component is not controlled.\n */\n defaultValue: PropTypes.object,\n /**\n * CSS media query when `Mobile` mode will be changed to `Desktop`.\n * @default '@media (pointer: fine)'\n * @example '@media (min-width: 720px)' or theme.breakpoints.up(\"sm\")\n */\n desktopModeMediaQuery: PropTypes.string,\n /**\n * If `true`, the picker and text field are disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * If `true`, disable values after the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disableFuture: PropTypes.bool,\n /**\n * If `true`, today's date is rendering without highlighting with circle.\n * @default false\n */\n disableHighlightToday: PropTypes.bool,\n /**\n * If `true`, the open picker button will not be rendered (renders only the field).\n * @default false\n */\n disableOpenPicker: PropTypes.bool,\n /**\n * If `true`, disable values before the current date for date components, time for time components and both for date time components.\n * @default false\n */\n disablePast: PropTypes.bool,\n /**\n * If `true`, the week number will be display in the calendar.\n */\n displayWeekNumber: PropTypes.bool,\n /**\n * @default false\n */\n enableAccessibleFieldDOMStructure: PropTypes.any,\n /**\n * The day view will show as many weeks as needed after the end of the current month to match this value.\n * Put it to 6 to have a fixed number of weeks in Gregorian calendars\n */\n fixedWeekNumber: PropTypes.number,\n /**\n * Format of the date when rendered in the input(s).\n * Defaults to localized format based on the used `views`.\n */\n format: PropTypes.string,\n /**\n * Density of the format when rendered in the input.\n * Setting `formatDensity` to `\"spacious\"` will add a space before and after each `/`, `-` and `.` character.\n * @default \"dense\"\n */\n formatDensity: PropTypes.oneOf(['dense', 'spacious']),\n /**\n * Pass a ref to the `input` element.\n */\n inputRef: refType,\n /**\n * The label content.\n */\n label: PropTypes.node,\n /**\n * If `true`, calls `renderLoading` instead of rendering the day calendar.\n * Can be used to preload information and show it in calendar.\n * @default false\n */\n loading: PropTypes.bool,\n /**\n * Locale for components texts.\n * Allows overriding texts coming from `LocalizationProvider` and `theme`.\n */\n localeText: PropTypes.object,\n /**\n * Maximal selectable date.\n * @default 2099-12-31\n */\n maxDate: PropTypes.object,\n /**\n * Minimal selectable date.\n * @default 1900-01-01\n */\n minDate: PropTypes.object,\n /**\n * Months rendered per row.\n * @default 3\n */\n monthsPerRow: PropTypes.oneOf([3, 4]),\n /**\n * Name attribute used by the `input` element in the Field.\n */\n name: PropTypes.string,\n /**\n * Callback fired when the value is accepted.\n * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.\n * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.\n * @param {TValue} value The value that was just accepted.\n * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value.\n */\n onAccept: PropTypes.func,\n /**\n * Callback fired when the value changes.\n * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.\n * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.\n * @param {TValue} value The new value.\n * @param {FieldChangeHandlerContext} context The context containing the validation result of the current value.\n */\n onChange: PropTypes.func,\n /**\n * Callback fired when the popup requests to be closed.\n * Use in controlled mode (see `open`).\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the error associated with the current value changes.\n * When a validation error is detected, the `error` parameter contains a non-null value.\n * This can be used to render an appropriate form error.\n * @template TError The validation error type. It will be either `string` or a `null`. It can be in `[start, end]` format in case of range value.\n * @template TValue The value type. It will be the same type as `value` or `null`. It can be in `[start, end]` format in case of range value.\n * @param {TError} error The reason why the current value is not valid.\n * @param {TValue} value The value associated with the error.\n */\n onError: PropTypes.func,\n /**\n * Callback fired on month change.\n * @template TDate\n * @param {TDate} month The new month.\n */\n onMonthChange: PropTypes.func,\n /**\n * Callback fired when the popup requests to be opened.\n * Use in controlled mode (see `open`).\n */\n onOpen: PropTypes.func,\n /**\n * Callback fired when the selected sections change.\n * @param {FieldSelectedSections} newValue The new selected sections.\n */\n onSelectedSectionsChange: PropTypes.func,\n /**\n * Callback fired on view change.\n * @template TView\n * @param {TView} view The new view.\n */\n onViewChange: PropTypes.func,\n /**\n * Callback fired on year change.\n * @template TDate\n * @param {TDate} year The new year.\n */\n onYearChange: PropTypes.func,\n /**\n * Control the popup or dialog open state.\n * @default false\n */\n open: PropTypes.bool,\n /**\n * The default visible view.\n * Used when the component view is not controlled.\n * Must be a valid option from `views` list.\n */\n openTo: PropTypes.oneOf(['day', 'month', 'year']),\n /**\n * Force rendering in particular orientation.\n */\n orientation: PropTypes.oneOf(['landscape', 'portrait']),\n readOnly: PropTypes.bool,\n /**\n * If `true`, disable heavy animations.\n * @default `@media(prefers-reduced-motion: reduce)` || `navigator.userAgent` matches Android <10 or iOS <13\n */\n reduceAnimations: PropTypes.bool,\n /**\n * The date used to generate the new value when both `value` and `defaultValue` are empty.\n * @default The closest valid date-time using the validation props, except callbacks like `shouldDisable<...>`.\n */\n referenceDate: PropTypes.object,\n /**\n * Component displaying when passed `loading` true.\n * @returns {React.ReactNode} The node to render when loading.\n * @default () => ...\n */\n renderLoading: PropTypes.func,\n /**\n * The currently selected sections.\n * This prop accepts four formats:\n * 1. If a number is provided, the section at this index will be selected.\n * 2. If a string of type `FieldSectionType` is provided, the first section with that name will be selected.\n * 3. If `\"all\"` is provided, all the sections will be selected.\n * 4. If `null` is provided, no section will be selected.\n * If not provided, the selected sections will be handled internally.\n */\n selectedSections: PropTypes.oneOfType([PropTypes.oneOf(['all', 'day', 'empty', 'hours', 'meridiem', 'minutes', 'month', 'seconds', 'weekDay', 'year']), PropTypes.number]),\n /**\n * Disable specific date.\n *\n * Warning: This function can be called multiple times (for example when rendering date calendar, checking if focus can be moved to a certain date, etc.). Expensive computations can impact performance.\n *\n * @template TDate\n * @param {TDate} day The date to test.\n * @returns {boolean} If `true` the date will be disabled.\n */\n shouldDisableDate: PropTypes.func,\n /**\n * Disable specific month.\n * @template TDate\n * @param {TDate} month The month to test.\n * @returns {boolean} If `true`, the month will be disabled.\n */\n shouldDisableMonth: PropTypes.func,\n /**\n * Disable specific year.\n * @template TDate\n * @param {TDate} year The year to test.\n * @returns {boolean} If `true`, the year will be disabled.\n */\n shouldDisableYear: PropTypes.func,\n /**\n * If `true`, days outside the current month are rendered:\n *\n * - if `fixedWeekNumber` is defined, renders days to have the weeks requested.\n *\n * - if `fixedWeekNumber` is not defined, renders day to fill the first and last week of the current month.\n *\n * - ignored if `calendars` equals more than `1` on range pickers.\n * @default false\n */\n showDaysOutsideCurrentMonth: PropTypes.bool,\n /**\n * The props used for each component slot.\n * @default {}\n */\n slotProps: PropTypes.object,\n /**\n * Overridable component slots.\n * @default {}\n */\n slots: PropTypes.object,\n /**\n * The system prop that allows defining system overrides as well as additional CSS styles.\n */\n sx: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func, PropTypes.object, PropTypes.bool])), PropTypes.func, PropTypes.object]),\n /**\n * Choose which timezone to use for the value.\n * Example: \"default\", \"system\", \"UTC\", \"America/New_York\".\n * If you pass values from other timezones to some props, they will be converted to this timezone before being used.\n * @see See the {@link https://mui.com/x/react-date-pickers/timezone/ timezones documentation} for more details.\n * @default The timezone of the `value` or `defaultValue` prop is defined, 'default' otherwise.\n */\n timezone: PropTypes.string,\n /**\n * The selected value.\n * Used when the component is controlled.\n */\n value: PropTypes.object,\n /**\n * The visible view.\n * Used when the component view is controlled.\n * Must be a valid option from `views` list.\n */\n view: PropTypes.oneOf(['day', 'month', 'year']),\n /**\n * Define custom view renderers for each section.\n * If `null`, the section will only have field editing.\n * If `undefined`, internally defined view will be used.\n */\n viewRenderers: PropTypes.shape({\n day: PropTypes.func,\n month: PropTypes.func,\n year: PropTypes.func\n }),\n /**\n * Available views.\n */\n views: PropTypes.arrayOf(PropTypes.oneOf(['day', 'month', 'year']).isRequired),\n /**\n * Years are displayed in ascending (chronological) order by default.\n * If `desc`, years are displayed in descending order.\n * @default 'asc'\n */\n yearsOrder: PropTypes.oneOf(['asc', 'desc']),\n /**\n * Years rendered per row.\n * @default 4 on desktop, 3 on mobile\n */\n yearsPerRow: PropTypes.oneOf([3, 4])\n} : void 0;\nexport { DatePicker };","!function(t,e){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=e():\"function\"==typeof define&&define.amd?define(e):(t=\"undefined\"!=typeof globalThis?globalThis:t||self).dayjs=e()}(this,(function(){\"use strict\";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()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,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}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)25){var f=r(this).startOf(t).add(1,t).date(n),s=r(this).endOf(e);if(f.isBefore(s))return 1}var a=r(this).startOf(t).date(n).startOf(e).subtract(1,\"millisecond\"),o=this.diff(a,e,!0);return o<0?r(this).startOf(\"week\").week():Math.ceil(o)},f.weeks=function(e){return void 0===e&&(e=null),this.week(e)}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_customParseFormat=t()}(this,(function(){\"use strict\";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\"},t=/(\\[[^[]*\\])|([-_:/.,()\\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,n=/\\d/,r=/\\d\\d/,i=/\\d\\d?/,o=/\\d*[^-_:/,()\\s\\d]+/,s={},a=function(e){return(e=+e)+(e>68?1900:2e3)};var f=function(e){return function(t){this[e]=+t}},h=[/[+-]\\d\\d:?(\\d\\d)?|Z/,function(e){(this.zone||(this.zone={})).offset=function(e){if(!e)return 0;if(\"Z\"===e)return 0;var t=e.match(/([+-]|\\d\\d)/g),n=60*t[1]+(+t[2]||0);return 0===n?0:\"+\"===t[0]?-n:n}(e)}],u=function(e){var t=s[e];return t&&(t.indexOf?t:t.s.concat(t.f))},d=function(e,t){var n,r=s.meridiem;if(r){for(var i=1;i<=24;i+=1)if(e.indexOf(r(i,0,t))>-1){n=i>12;break}}else n=e===(t?\"pm\":\"PM\");return n},c={A:[o,function(e){this.afternoon=d(e,!1)}],a:[o,function(e){this.afternoon=d(e,!0)}],Q:[n,function(e){this.month=3*(e-1)+1}],S:[n,function(e){this.milliseconds=100*+e}],SS:[r,function(e){this.milliseconds=10*+e}],SSS:[/\\d{3}/,function(e){this.milliseconds=+e}],s:[i,f(\"seconds\")],ss:[i,f(\"seconds\")],m:[i,f(\"minutes\")],mm:[i,f(\"minutes\")],H:[i,f(\"hours\")],h:[i,f(\"hours\")],HH:[i,f(\"hours\")],hh:[i,f(\"hours\")],D:[i,f(\"day\")],DD:[r,f(\"day\")],Do:[o,function(e){var t=s.ordinal,n=e.match(/\\d+/);if(this.day=n[0],t)for(var r=1;r<=31;r+=1)t(r).replace(/\\[|\\]/g,\"\")===e&&(this.day=r)}],w:[i,f(\"week\")],ww:[r,f(\"week\")],M:[i,f(\"month\")],MM:[r,f(\"month\")],MMM:[o,function(e){var t=u(\"months\"),n=(u(\"monthsShort\")||t.map((function(e){return e.slice(0,3)}))).indexOf(e)+1;if(n<1)throw new Error;this.month=n%12||n}],MMMM:[o,function(e){var t=u(\"months\").indexOf(e)+1;if(t<1)throw new Error;this.month=t%12||t}],Y:[/[+-]?\\d+/,f(\"year\")],YY:[r,function(e){this.year=a(e)}],YYYY:[/\\d{4}/,f(\"year\")],Z:h,ZZ:h};function l(n){var r,i;r=n,i=s&&s.formats;for(var o=(n=r.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g,(function(t,n,r){var o=r&&r.toUpperCase();return n||i[r]||e[r]||i[o].replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g,(function(e,t,n){return t||n.slice(1)}))}))).match(t),a=o.length,f=0;f-1)return new Date((\"X\"===t?1e3:1)*e);var i=l(t)(e),o=i.year,s=i.month,a=i.day,f=i.hours,h=i.minutes,u=i.seconds,d=i.milliseconds,c=i.zone,m=i.week,M=new Date,Y=a||(o||s?1:M.getDate()),p=o||M.getFullYear(),v=0;o&&!s||(v=s>0?s-1:M.getMonth());var D,w=f||0,g=h||0,y=u||0,L=d||0;return c?new Date(Date.UTC(p,v,Y,w,g,y,L+60*c.offset*1e3)):n?new Date(Date.UTC(p,v,Y,w,g,y,L)):(D=new Date(p,v,Y,w,g,y,L),m&&(D=r(D).week(m).toDate()),D)}catch(e){return new Date(\"\")}}(t,a,r,n),this.init(),d&&!0!==d&&(this.$L=this.locale(d).$L),u&&t!=this.format(a)&&(this.$d=new Date(\"\")),s={}}else if(a instanceof Array)for(var c=a.length,m=1;m<=c;m+=1){o[1]=a[m-1];var M=n.apply(this,o);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}m===c&&(this.$d=new Date(\"\"))}else i.call(this,e)}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_localizedFormat=t()}(this,(function(){\"use strict\";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)}}}));","!function(e,i){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=i():\"function\"==typeof define&&define.amd?define(i):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isBetween=i()}(this,(function(){\"use strict\";return function(e,i,t){i.prototype.isBetween=function(e,i,s,f){var n=t(e),o=t(i),r=\"(\"===(f=f||\"()\")[0],u=\")\"===f[1];return(r?this.isAfter(n,s):!this.isBefore(n,s))&&(u?this.isBefore(o,s):!this.isAfter(o,s))||(r?this.isBefore(n,s):!this.isAfter(n,s))&&(u?this.isAfter(o,s):!this.isBefore(o,s))}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_advancedFormat=t()}(this,(function(){\"use strict\";return function(e,t){var r=t.prototype,n=r.format;r.format=function(e){var t=this,r=this.$locale();if(!this.isValid())return n.bind(this)(e);var s=this.$utils(),a=(e||\"YYYY-MM-DDTHH:mm:ssZ\").replace(/\\[([^\\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,(function(e){switch(e){case\"Q\":return Math.ceil((t.$M+1)/3);case\"Do\":return r.ordinal(t.$D);case\"gggg\":return t.weekYear();case\"GGGG\":return t.isoWeekYear();case\"wo\":return r.ordinal(t.week(),\"W\");case\"w\":case\"ww\":return s.s(t.week(),\"w\"===e?1:2,\"0\");case\"W\":case\"WW\":return s.s(t.isoWeek(),\"W\"===e?1:2,\"0\");case\"k\":case\"kk\":return s.s(String(0===t.$H?24:t.$H),\"k\"===e?1:2,\"0\");case\"X\":return Math.floor(t.$d.getTime()/1e3);case\"x\":return t.$d.getTime();case\"z\":return\"[\"+t.offsetName()+\"]\";case\"zzz\":return\"[\"+t.offsetName(\"long\")+\"]\";default:return e}}));return n.bind(this)(a)}}}));","import _extends from \"@babel/runtime/helpers/esm/extends\";\n/* eslint-disable class-methods-use-this */\nimport defaultDayjs from 'dayjs';\nimport weekOfYearPlugin from 'dayjs/plugin/weekOfYear';\nimport customParseFormatPlugin from 'dayjs/plugin/customParseFormat';\nimport localizedFormatPlugin from 'dayjs/plugin/localizedFormat';\nimport isBetweenPlugin from 'dayjs/plugin/isBetween';\nimport advancedFormatPlugin from 'dayjs/plugin/advancedFormat';\nimport { warnOnce } from '@mui/x-internals/warning';\ndefaultDayjs.extend(localizedFormatPlugin);\ndefaultDayjs.extend(weekOfYearPlugin);\ndefaultDayjs.extend(isBetweenPlugin);\ndefaultDayjs.extend(advancedFormatPlugin);\nconst formatTokenMap = {\n // Year\n YY: 'year',\n YYYY: {\n sectionType: 'year',\n contentType: 'digit',\n maxLength: 4\n },\n // Month\n M: {\n sectionType: 'month',\n contentType: 'digit',\n maxLength: 2\n },\n MM: 'month',\n MMM: {\n sectionType: 'month',\n contentType: 'letter'\n },\n MMMM: {\n sectionType: 'month',\n contentType: 'letter'\n },\n // Day of the month\n D: {\n sectionType: 'day',\n contentType: 'digit',\n maxLength: 2\n },\n DD: 'day',\n Do: {\n sectionType: 'day',\n contentType: 'digit-with-letter'\n },\n // Day of the week\n d: {\n sectionType: 'weekDay',\n contentType: 'digit',\n maxLength: 2\n },\n dd: {\n sectionType: 'weekDay',\n contentType: 'letter'\n },\n ddd: {\n sectionType: 'weekDay',\n contentType: 'letter'\n },\n dddd: {\n sectionType: 'weekDay',\n contentType: 'letter'\n },\n // Meridiem\n A: 'meridiem',\n a: 'meridiem',\n // Hours\n H: {\n sectionType: 'hours',\n contentType: 'digit',\n maxLength: 2\n },\n HH: 'hours',\n h: {\n sectionType: 'hours',\n contentType: 'digit',\n maxLength: 2\n },\n hh: 'hours',\n // Minutes\n m: {\n sectionType: 'minutes',\n contentType: 'digit',\n maxLength: 2\n },\n mm: 'minutes',\n // Seconds\n s: {\n sectionType: 'seconds',\n contentType: 'digit',\n maxLength: 2\n },\n ss: 'seconds'\n};\nconst defaultFormats = {\n year: 'YYYY',\n month: 'MMMM',\n monthShort: 'MMM',\n dayOfMonth: 'D',\n dayOfMonthFull: 'Do',\n weekday: 'dddd',\n weekdayShort: 'dd',\n hours24h: 'HH',\n hours12h: 'hh',\n meridiem: 'A',\n minutes: 'mm',\n seconds: 'ss',\n fullDate: 'll',\n keyboardDate: 'L',\n shortDate: 'MMM D',\n normalDate: 'D MMMM',\n normalDateWithWeekday: 'ddd, MMM D',\n fullTime: 'LT',\n fullTime12h: 'hh:mm A',\n fullTime24h: 'HH:mm',\n keyboardDateTime: 'L LT',\n keyboardDateTime12h: 'L hh:mm A',\n keyboardDateTime24h: 'L HH:mm'\n};\nconst MISSING_UTC_PLUGIN = ['Missing UTC plugin', 'To be able to use UTC or timezones, you have to enable the `utc` plugin', 'Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc'].join('\\n');\nconst MISSING_TIMEZONE_PLUGIN = ['Missing timezone plugin', 'To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin', 'Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone'].join('\\n');\nconst withLocale = (dayjs, locale) => !locale ? dayjs : (...args) => dayjs(...args).locale(locale);\n/**\n * Based on `@date-io/dayjs`\n *\n * MIT License\n *\n * Copyright (c) 2017 Dmitriy Kovalenko\n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in all\n * copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n * SOFTWARE.\n */\nexport class AdapterDayjs {\n constructor({\n locale: _locale,\n formats\n } = {}) {\n this.isMUIAdapter = true;\n this.isTimezoneCompatible = true;\n this.lib = 'dayjs';\n this.dayjs = void 0;\n this.locale = void 0;\n this.formats = void 0;\n this.escapedCharacters = {\n start: '[',\n end: ']'\n };\n this.formatTokenMap = formatTokenMap;\n this.setLocaleToValue = value => {\n const expectedLocale = this.getCurrentLocaleCode();\n if (expectedLocale === value.locale()) {\n return value;\n }\n return value.locale(expectedLocale);\n };\n this.hasUTCPlugin = () => typeof defaultDayjs.utc !== 'undefined';\n this.hasTimezonePlugin = () => typeof defaultDayjs.tz !== 'undefined';\n this.isSame = (value, comparing, comparisonTemplate) => {\n const comparingInValueTimezone = this.setTimezone(comparing, this.getTimezone(value));\n return value.format(comparisonTemplate) === comparingInValueTimezone.format(comparisonTemplate);\n };\n /**\n * Replaces \"default\" by undefined and \"system\" by the system timezone before passing it to `dayjs`.\n */\n this.cleanTimezone = timezone => {\n switch (timezone) {\n case 'default':\n {\n return undefined;\n }\n case 'system':\n {\n return defaultDayjs.tz.guess();\n }\n default:\n {\n return timezone;\n }\n }\n };\n this.createSystemDate = value => {\n if (this.hasUTCPlugin() && this.hasTimezonePlugin()) {\n const timezone = defaultDayjs.tz.guess();\n\n // We can't change the system timezone in the tests\n /* istanbul ignore next */\n if (timezone !== 'UTC') {\n return defaultDayjs.tz(value, timezone);\n }\n return defaultDayjs(value);\n }\n return defaultDayjs(value);\n };\n this.createUTCDate = value => {\n /* istanbul ignore next */\n if (!this.hasUTCPlugin()) {\n throw new Error(MISSING_UTC_PLUGIN);\n }\n return defaultDayjs.utc(value);\n };\n this.createTZDate = (value, timezone) => {\n /* istanbul ignore next */\n if (!this.hasUTCPlugin()) {\n throw new Error(MISSING_UTC_PLUGIN);\n }\n\n /* istanbul ignore next */\n if (!this.hasTimezonePlugin()) {\n throw new Error(MISSING_TIMEZONE_PLUGIN);\n }\n const keepLocalTime = value !== undefined && !value.endsWith('Z');\n return defaultDayjs(value).tz(this.cleanTimezone(timezone), keepLocalTime);\n };\n this.getLocaleFormats = () => {\n const locales = defaultDayjs.Ls;\n const locale = this.locale || 'en';\n let localeObject = locales[locale];\n if (localeObject === undefined) {\n /* istanbul ignore next */\n if (process.env.NODE_ENV !== 'production') {\n warnOnce(['MUI X: Your locale has not been found.', 'Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.', \"Or you forget to import the locale from 'dayjs/locale/{localeUsed}'\", 'fallback on English locale.']);\n }\n localeObject = locales.en;\n }\n return localeObject.formats;\n };\n /**\n * If the new day does not have the same offset as the old one (when switching to summer day time for example),\n * Then dayjs will not automatically adjust the offset (moment does).\n * We have to parse again the value to make sure the `fixOffset` method is applied.\n * See https://github.com/iamkun/dayjs/blob/b3624de619d6e734cd0ffdbbd3502185041c1b60/src/plugin/timezone/index.js#L72\n */\n this.adjustOffset = value => {\n if (!this.hasTimezonePlugin()) {\n return value;\n }\n const timezone = this.getTimezone(value);\n if (timezone !== 'UTC') {\n const fixedValue = value.tz(this.cleanTimezone(timezone), true);\n // TODO: Simplify the case when we raise the `dayjs` peer dep to 1.11.12 (https://github.com/iamkun/dayjs/releases/tag/v1.11.12)\n /* istanbul ignore next */\n // @ts-ignore\n if (fixedValue.$offset === (value.$offset ?? 0)) {\n return value;\n }\n // Change only what is needed to avoid creating a new object with unwanted data\n // Especially important when used in an environment where utc or timezone dates are used only in some places\n // Reference: https://github.com/mui/mui-x/issues/13290\n // @ts-ignore\n value.$offset = fixedValue.$offset;\n }\n return value;\n };\n this.date = (value, timezone = 'default') => {\n if (value === null) {\n return null;\n }\n let parsedValue;\n if (timezone === 'UTC') {\n parsedValue = this.createUTCDate(value);\n } else if (timezone === 'system' || timezone === 'default' && !this.hasTimezonePlugin()) {\n parsedValue = this.createSystemDate(value);\n } else {\n parsedValue = this.createTZDate(value, timezone);\n }\n if (this.locale === undefined) {\n return parsedValue;\n }\n return parsedValue.locale(this.locale);\n };\n this.getInvalidDate = () => defaultDayjs(new Date('Invalid date'));\n this.getTimezone = value => {\n if (this.hasTimezonePlugin()) {\n // @ts-ignore\n const zone = value.$x?.$timezone;\n if (zone) {\n return zone;\n }\n }\n if (this.hasUTCPlugin() && value.isUTC()) {\n return 'UTC';\n }\n return 'system';\n };\n this.setTimezone = (value, timezone) => {\n if (this.getTimezone(value) === timezone) {\n return value;\n }\n if (timezone === 'UTC') {\n /* istanbul ignore next */\n if (!this.hasUTCPlugin()) {\n throw new Error(MISSING_UTC_PLUGIN);\n }\n return value.utc();\n }\n\n // We know that we have the UTC plugin.\n // Otherwise, the value timezone would always equal \"system\".\n // And it would be caught by the first \"if\" of this method.\n if (timezone === 'system') {\n return value.local();\n }\n if (!this.hasTimezonePlugin()) {\n if (timezone === 'default') {\n return value;\n }\n\n /* istanbul ignore next */\n throw new Error(MISSING_TIMEZONE_PLUGIN);\n }\n return defaultDayjs.tz(value, this.cleanTimezone(timezone));\n };\n this.toJsDate = value => {\n return value.toDate();\n };\n this.parse = (value, format) => {\n if (value === '') {\n return null;\n }\n return this.dayjs(value, format, this.locale, true);\n };\n this.getCurrentLocaleCode = () => {\n return this.locale || 'en';\n };\n this.is12HourCycleInCurrentLocale = () => {\n /* istanbul ignore next */\n return /A|a/.test(this.getLocaleFormats().LT || '');\n };\n this.expandFormat = format => {\n const localeFormats = this.getLocaleFormats();\n\n // @see https://github.com/iamkun/dayjs/blob/dev/src/plugin/localizedFormat/index.js\n const t = formatBis => formatBis.replace(/(\\[[^\\]]+])|(MMMM|MM|DD|dddd)/g, (_, a, b) => a || b.slice(1));\n return format.replace(/(\\[[^\\]]+])|(LTS?|l{1,4}|L{1,4})/g, (_, a, b) => {\n const B = b && b.toUpperCase();\n return a || localeFormats[b] || t(localeFormats[B]);\n });\n };\n this.isValid = value => {\n if (value == null) {\n return false;\n }\n return value.isValid();\n };\n this.format = (value, formatKey) => {\n return this.formatByString(value, this.formats[formatKey]);\n };\n this.formatByString = (value, formatString) => {\n return this.dayjs(value).format(formatString);\n };\n this.formatNumber = numberToFormat => {\n return numberToFormat;\n };\n this.isEqual = (value, comparing) => {\n if (value === null && comparing === null) {\n return true;\n }\n if (value === null || comparing === null) {\n return false;\n }\n return value.toDate().getTime() === comparing.toDate().getTime();\n };\n this.isSameYear = (value, comparing) => {\n return this.isSame(value, comparing, 'YYYY');\n };\n this.isSameMonth = (value, comparing) => {\n return this.isSame(value, comparing, 'YYYY-MM');\n };\n this.isSameDay = (value, comparing) => {\n return this.isSame(value, comparing, 'YYYY-MM-DD');\n };\n this.isSameHour = (value, comparing) => {\n return value.isSame(comparing, 'hour');\n };\n this.isAfter = (value, comparing) => {\n return value > comparing;\n };\n this.isAfterYear = (value, comparing) => {\n if (!this.hasUTCPlugin()) {\n return value.isAfter(comparing, 'year');\n }\n return !this.isSameYear(value, comparing) && value.utc() > comparing.utc();\n };\n this.isAfterDay = (value, comparing) => {\n if (!this.hasUTCPlugin()) {\n return value.isAfter(comparing, 'day');\n }\n return !this.isSameDay(value, comparing) && value.utc() > comparing.utc();\n };\n this.isBefore = (value, comparing) => {\n return value < comparing;\n };\n this.isBeforeYear = (value, comparing) => {\n if (!this.hasUTCPlugin()) {\n return value.isBefore(comparing, 'year');\n }\n return !this.isSameYear(value, comparing) && value.utc() < comparing.utc();\n };\n this.isBeforeDay = (value, comparing) => {\n if (!this.hasUTCPlugin()) {\n return value.isBefore(comparing, 'day');\n }\n return !this.isSameDay(value, comparing) && value.utc() < comparing.utc();\n };\n this.isWithinRange = (value, [start, end]) => {\n return value >= start && value <= end;\n };\n this.startOfYear = value => {\n return this.adjustOffset(value.startOf('year'));\n };\n this.startOfMonth = value => {\n return this.adjustOffset(value.startOf('month'));\n };\n this.startOfWeek = value => {\n return this.adjustOffset(this.setLocaleToValue(value).startOf('week'));\n };\n this.startOfDay = value => {\n return this.adjustOffset(value.startOf('day'));\n };\n this.endOfYear = value => {\n return this.adjustOffset(value.endOf('year'));\n };\n this.endOfMonth = value => {\n return this.adjustOffset(value.endOf('month'));\n };\n this.endOfWeek = value => {\n return this.adjustOffset(this.setLocaleToValue(value).endOf('week'));\n };\n this.endOfDay = value => {\n return this.adjustOffset(value.endOf('day'));\n };\n this.addYears = (value, amount) => {\n return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), 'year') : value.add(amount, 'year'));\n };\n this.addMonths = (value, amount) => {\n return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), 'month') : value.add(amount, 'month'));\n };\n this.addWeeks = (value, amount) => {\n return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), 'week') : value.add(amount, 'week'));\n };\n this.addDays = (value, amount) => {\n return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), 'day') : value.add(amount, 'day'));\n };\n this.addHours = (value, amount) => {\n return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), 'hour') : value.add(amount, 'hour'));\n };\n this.addMinutes = (value, amount) => {\n return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), 'minute') : value.add(amount, 'minute'));\n };\n this.addSeconds = (value, amount) => {\n return this.adjustOffset(amount < 0 ? value.subtract(Math.abs(amount), 'second') : value.add(amount, 'second'));\n };\n this.getYear = value => {\n return value.year();\n };\n this.getMonth = value => {\n return value.month();\n };\n this.getDate = value => {\n return value.date();\n };\n this.getHours = value => {\n return value.hour();\n };\n this.getMinutes = value => {\n return value.minute();\n };\n this.getSeconds = value => {\n return value.second();\n };\n this.getMilliseconds = value => {\n return value.millisecond();\n };\n this.setYear = (value, year) => {\n return this.adjustOffset(value.set('year', year));\n };\n this.setMonth = (value, month) => {\n return this.adjustOffset(value.set('month', month));\n };\n this.setDate = (value, date) => {\n return this.adjustOffset(value.set('date', date));\n };\n this.setHours = (value, hours) => {\n return this.adjustOffset(value.set('hour', hours));\n };\n this.setMinutes = (value, minutes) => {\n return this.adjustOffset(value.set('minute', minutes));\n };\n this.setSeconds = (value, seconds) => {\n return this.adjustOffset(value.set('second', seconds));\n };\n this.setMilliseconds = (value, milliseconds) => {\n return this.adjustOffset(value.set('millisecond', milliseconds));\n };\n this.getDaysInMonth = value => {\n return value.daysInMonth();\n };\n this.getWeekArray = value => {\n const start = this.startOfWeek(this.startOfMonth(value));\n const end = this.endOfWeek(this.endOfMonth(value));\n let count = 0;\n let current = start;\n const nestedWeeks = [];\n while (current < end) {\n const weekNumber = Math.floor(count / 7);\n nestedWeeks[weekNumber] = nestedWeeks[weekNumber] || [];\n nestedWeeks[weekNumber].push(current);\n current = this.addDays(current, 1);\n count += 1;\n }\n return nestedWeeks;\n };\n this.getWeekNumber = value => {\n return value.week();\n };\n this.getYearRange = ([start, end]) => {\n const startDate = this.startOfYear(start);\n const endDate = this.endOfYear(end);\n const years = [];\n let current = startDate;\n while (this.isBefore(current, endDate)) {\n years.push(current);\n current = this.addYears(current, 1);\n }\n return years;\n };\n this.dayjs = withLocale(defaultDayjs, _locale);\n this.locale = _locale;\n this.formats = _extends({}, defaultFormats, formats);\n\n // Moved plugins to the constructor to allow for users to use options on the library\n // for reference: https://github.com/mui/mui-x/pull/11151\n defaultDayjs.extend(customParseFormatPlugin);\n }\n getDayOfWeek(value) {\n return value.day() + 1;\n }\n}","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define(t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_plugin_isSameOrAfter=t()}(this,(function(){\"use strict\";return function(e,t){t.prototype.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)}}}));","!function(e,t){\"object\"==typeof exports&&\"undefined\"!=typeof module?module.exports=t(require(\"dayjs\")):\"function\"==typeof define&&define.amd?define([\"dayjs\"],t):(e=\"undefined\"!=typeof globalThis?globalThis:e||self).dayjs_locale_pl=t(e.dayjs)}(this,(function(e){\"use strict\";function t(e){return e&&\"object\"==typeof e&&\"default\"in e?e:{default:e}}var i=t(e);function a(e){return e%10<5&&e%10>1&&~~(e/10)%10!=1}function n(e,t,i){var n=e+\" \";switch(i){case\"m\":return t?\"minuta\":\"minutę\";case\"mm\":return n+(a(e)?\"minuty\":\"minut\");case\"h\":return t?\"godzina\":\"godzinę\";case\"hh\":return n+(a(e)?\"godziny\":\"godzin\");case\"MM\":return n+(a(e)?\"miesiące\":\"miesięcy\");case\"yy\":return n+(a(e)?\"lata\":\"lat\")}}var r=\"stycznia_lutego_marca_kwietnia_maja_czerwca_lipca_sierpnia_września_października_listopada_grudnia\".split(\"_\"),_=\"styczeń_luty_marzec_kwiecień_maj_czerwiec_lipiec_sierpień_wrzesień_październik_listopad_grudzień\".split(\"_\"),s=/D MMMM/,d=function(e,t){return s.test(t)?r[e.month()]:_[e.month()]};d.s=_,d.f=r;var o={name:\"pl\",weekdays:\"niedziela_poniedziałek_wtorek_środa_czwartek_piątek_sobota\".split(\"_\"),weekdaysShort:\"ndz_pon_wt_śr_czw_pt_sob\".split(\"_\"),weekdaysMin:\"Nd_Pn_Wt_Śr_Cz_Pt_So\".split(\"_\"),months:d,monthsShort:\"sty_lut_mar_kwi_maj_cze_lip_sie_wrz_paź_lis_gru\".split(\"_\"),ordinal:function(e){return e+\".\"},weekStart:1,yearStart:4,relativeTime:{future:\"za %s\",past:\"%s temu\",s:\"kilka sekund\",m:n,mm:n,h:n,hh:n,d:\"1 dzień\",dd:\"%d dni\",M:\"miesiąc\",MM:n,y:\"rok\",yy:n},formats:{LT:\"HH:mm\",LTS:\"HH:mm:ss\",L:\"DD.MM.YYYY\",LL:\"D MMMM YYYY\",LLL:\"D MMMM YYYY HH:mm\",LLLL:\"dddd, D MMMM YYYY HH:mm\"}};return i.default.locale(o,null,!0),o}));","import React, { useState, useEffect, useContext } from \"react\";\nimport { Controller, useForm } from \"react-hook-form\";\nimport { sendLoadingPostRequest } from \"../../request/request\";\nimport { Dictionary } from \"../../types/Dictionary\";\nimport {\n TextField,\n ThemeProvider,\n Autocomplete,\n createTheme,\n styled,\n} from \"@mui/material\";\nimport { DatePicker, LocalizationProvider } from \"@mui/x-date-pickers\";\nimport { AdapterDayjs } from \"@mui/x-date-pickers/AdapterDayjs\";\nimport dayjs from \"dayjs\";\nimport isSameOrAfter from \"dayjs/plugin/isSameOrAfter\";\nimport localizedFormat from \"dayjs/plugin/localizedFormat\";\nimport customParseFormat from \"dayjs/plugin/customParseFormat\";\nimport \"dayjs/locale/pl\";\n\ndayjs.extend(isSameOrAfter);\ndayjs.extend(localizedFormat);\ndayjs.extend(customParseFormat);\ndayjs.locale(\"pl\");\n\nconst StyledTextField = styled(TextField)(({ theme }) => ({\n width: \"100%\",\n height: 50,\n}));\n\nconst defaultMaterialTheme = createTheme({\n palette: {\n primary: {\n main: \"#000000\",\n },\n },\n components: {\n MuiFormHelperText: {\n styleOverrides: {\n root: {\n display: \"none\",\n },\n },\n },\n },\n});\n\nconst Calendar = (props: any) => {\n const handleChange = (date: any) => {\n if (props.onChange) {\n props.onChange(date ? dayjs(date).format(\"YYYY-MM-DD\") : null);\n }\n };\n\n return (\n \n \n \n \n \n );\n};\n\nexport { Calendar };\n","/** Checks if value is string */\nfunction isString(str) {\n return typeof str === 'string' || str instanceof String;\n}\n\n/** Checks if value is object */\nfunction isObject(obj) {\n var _obj$constructor;\n return typeof obj === 'object' && obj != null && (obj == null || (_obj$constructor = obj.constructor) == null ? void 0 : _obj$constructor.name) === 'Object';\n}\nfunction pick(obj, keys) {\n if (Array.isArray(keys)) return pick(obj, (_, k) => keys.includes(k));\n return Object.entries(obj).reduce((acc, _ref) => {\n let [k, v] = _ref;\n if (keys(v, k)) acc[k] = v;\n return acc;\n }, {});\n}\n\n/** Direction */\nconst DIRECTION = {\n NONE: 'NONE',\n LEFT: 'LEFT',\n FORCE_LEFT: 'FORCE_LEFT',\n RIGHT: 'RIGHT',\n FORCE_RIGHT: 'FORCE_RIGHT'\n};\n\n/** Direction */\n\nfunction forceDirection(direction) {\n switch (direction) {\n case DIRECTION.LEFT:\n return DIRECTION.FORCE_LEFT;\n case DIRECTION.RIGHT:\n return DIRECTION.FORCE_RIGHT;\n default:\n return direction;\n }\n}\n\n/** Escapes regular expression control chars */\nfunction escapeRegExp(str) {\n return str.replace(/([.*+?^=!:${}()|[\\]/\\\\])/g, '\\\\$1');\n}\n\n// cloned from https://github.com/epoberezkin/fast-deep-equal with small changes\nfunction objectIncludes(b, a) {\n if (a === b) return true;\n const arrA = Array.isArray(a),\n arrB = Array.isArray(b);\n let i;\n if (arrA && arrB) {\n if (a.length != b.length) return false;\n for (i = 0; i < a.length; i++) if (!objectIncludes(a[i], b[i])) return false;\n return true;\n }\n if (arrA != arrB) return false;\n if (a && b && typeof a === 'object' && typeof b === 'object') {\n const dateA = a instanceof Date,\n dateB = b instanceof Date;\n if (dateA && dateB) return a.getTime() == b.getTime();\n if (dateA != dateB) return false;\n const regexpA = a instanceof RegExp,\n regexpB = b instanceof RegExp;\n if (regexpA && regexpB) return a.toString() == b.toString();\n if (regexpA != regexpB) return false;\n const keys = Object.keys(a);\n // if (keys.length !== Object.keys(b).length) return false;\n\n for (i = 0; i < keys.length; i++) if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n for (i = 0; i < keys.length; i++) if (!objectIncludes(b[keys[i]], a[keys[i]])) return false;\n return true;\n } else if (a && b && typeof a === 'function' && typeof b === 'function') {\n return a.toString() === b.toString();\n }\n return false;\n}\n\n/** Selection range */\n\nexport { DIRECTION, escapeRegExp, forceDirection, isObject, isString, objectIncludes, pick };\n","import { DIRECTION } from './utils.js';\n\n/** Provides details of changing input */\nclass ActionDetails {\n /** Current input value */\n\n /** Current cursor position */\n\n /** Old input value */\n\n /** Old selection */\n\n constructor(opts) {\n Object.assign(this, opts);\n\n // double check if left part was changed (autofilling, other non-standard input triggers)\n while (this.value.slice(0, this.startChangePos) !== this.oldValue.slice(0, this.startChangePos)) {\n --this.oldSelection.start;\n }\n if (this.insertedCount) {\n // double check right part\n while (this.value.slice(this.cursorPos) !== this.oldValue.slice(this.oldSelection.end)) {\n if (this.value.length - this.cursorPos < this.oldValue.length - this.oldSelection.end) ++this.oldSelection.end;else ++this.cursorPos;\n }\n }\n }\n\n /** Start changing position */\n get startChangePos() {\n return Math.min(this.cursorPos, this.oldSelection.start);\n }\n\n /** Inserted symbols count */\n get insertedCount() {\n return this.cursorPos - this.startChangePos;\n }\n\n /** Inserted symbols */\n get inserted() {\n return this.value.substr(this.startChangePos, this.insertedCount);\n }\n\n /** Removed symbols count */\n get removedCount() {\n // Math.max for opposite operation\n return Math.max(this.oldSelection.end - this.startChangePos ||\n // for Delete\n this.oldValue.length - this.value.length, 0);\n }\n\n /** Removed symbols */\n get removed() {\n return this.oldValue.substr(this.startChangePos, this.removedCount);\n }\n\n /** Unchanged head symbols */\n get head() {\n return this.value.substring(0, this.startChangePos);\n }\n\n /** Unchanged tail symbols */\n get tail() {\n return this.value.substring(this.startChangePos + this.insertedCount);\n }\n\n /** Remove direction */\n get removeDirection() {\n if (!this.removedCount || this.insertedCount) return DIRECTION.NONE;\n\n // align right if delete at right\n return (this.oldSelection.end === this.cursorPos || this.oldSelection.start === this.cursorPos) &&\n // if not range removed (event with backspace)\n this.oldSelection.end === this.oldSelection.start ? DIRECTION.RIGHT : DIRECTION.LEFT;\n }\n}\n\nexport { ActionDetails as default };\n","/** Applies mask on element */\nfunction IMask(el, opts) {\n // currently available only for input-like elements\n return new IMask.InputMask(el, opts);\n}\n\nexport { IMask as default };\n","import { isString, isObject, pick } from '../core/utils.js';\nimport IMask from '../core/holder.js';\n\n// TODO can't use overloads here because of https://github.com/microsoft/TypeScript/issues/50754\n// export function maskedClass(mask: string): typeof MaskedPattern;\n// export function maskedClass(mask: DateConstructor): typeof MaskedDate;\n// export function maskedClass(mask: NumberConstructor): typeof MaskedNumber;\n// export function maskedClass(mask: Array | ArrayConstructor): typeof MaskedDynamic;\n// export function maskedClass(mask: MaskedDate): typeof MaskedDate;\n// export function maskedClass(mask: MaskedNumber): typeof MaskedNumber;\n// export function maskedClass(mask: MaskedEnum): typeof MaskedEnum;\n// export function maskedClass(mask: MaskedRange): typeof MaskedRange;\n// export function maskedClass(mask: MaskedRegExp): typeof MaskedRegExp;\n// export function maskedClass(mask: MaskedFunction): typeof MaskedFunction;\n// export function maskedClass(mask: MaskedPattern): typeof MaskedPattern;\n// export function maskedClass(mask: MaskedDynamic): typeof MaskedDynamic;\n// export function maskedClass(mask: Masked): typeof Masked;\n// export function maskedClass(mask: typeof Masked): typeof Masked;\n// export function maskedClass(mask: typeof MaskedDate): typeof MaskedDate;\n// export function maskedClass(mask: typeof MaskedNumber): typeof MaskedNumber;\n// export function maskedClass(mask: typeof MaskedEnum): typeof MaskedEnum;\n// export function maskedClass(mask: typeof MaskedRange): typeof MaskedRange;\n// export function maskedClass(mask: typeof MaskedRegExp): typeof MaskedRegExp;\n// export function maskedClass(mask: typeof MaskedFunction): typeof MaskedFunction;\n// export function maskedClass(mask: typeof MaskedPattern): typeof MaskedPattern;\n// export function maskedClass(mask: typeof MaskedDynamic): typeof MaskedDynamic;\n// export function maskedClass (mask: Mask): Mask;\n// export function maskedClass(mask: RegExp): typeof MaskedRegExp;\n// export function maskedClass(mask: (value: string, ...args: any[]) => boolean): typeof MaskedFunction;\n\n/** Get Masked class by mask type */\nfunction maskedClass(mask) /* TODO */{\n if (mask == null) throw new Error('mask property should be defined');\n if (mask instanceof RegExp) return IMask.MaskedRegExp;\n if (isString(mask)) return IMask.MaskedPattern;\n if (mask === Date) return IMask.MaskedDate;\n if (mask === Number) return IMask.MaskedNumber;\n if (Array.isArray(mask) || mask === Array) return IMask.MaskedDynamic;\n if (IMask.Masked && mask.prototype instanceof IMask.Masked) return mask;\n if (IMask.Masked && mask instanceof IMask.Masked) return mask.constructor;\n if (mask instanceof Function) return IMask.MaskedFunction;\n console.warn('Mask not found for mask', mask); // eslint-disable-line no-console\n return IMask.Masked;\n}\nfunction normalizeOpts(opts) {\n if (!opts) throw new Error('Options in not defined');\n if (IMask.Masked) {\n if (opts.prototype instanceof IMask.Masked) return {\n mask: opts\n };\n\n /*\n handle cases like:\n 1) opts = Masked\n 2) opts = { mask: Masked, ...instanceOpts }\n */\n const {\n mask = undefined,\n ...instanceOpts\n } = opts instanceof IMask.Masked ? {\n mask: opts\n } : isObject(opts) && opts.mask instanceof IMask.Masked ? opts : {};\n if (mask) {\n const _mask = mask.mask;\n return {\n ...pick(mask, (_, k) => !k.startsWith('_')),\n mask: mask.constructor,\n _mask,\n ...instanceOpts\n };\n }\n }\n if (!isObject(opts)) return {\n mask: opts\n };\n return {\n ...opts\n };\n}\n\n// TODO can't use overloads here because of https://github.com/microsoft/TypeScript/issues/50754\n\n// From masked\n// export default function createMask (opts: Opts): ReturnMasked;\n// // From masked class\n// export default function createMask, ReturnMasked extends Masked=InstanceType> (opts: Opts): ReturnMasked;\n// export default function createMask, ReturnMasked extends MaskedDate=MaskedDate> (opts: Opts): ReturnMasked;\n// export default function createMask, ReturnMasked extends MaskedNumber=MaskedNumber> (opts: Opts): ReturnMasked;\n// export default function createMask, ReturnMasked extends MaskedEnum=MaskedEnum> (opts: Opts): ReturnMasked;\n// export default function createMask, ReturnMasked extends MaskedRange=MaskedRange> (opts: Opts): ReturnMasked;\n// export default function createMask, ReturnMasked extends MaskedRegExp=MaskedRegExp> (opts: Opts): ReturnMasked;\n// export default function createMask, ReturnMasked extends MaskedFunction=MaskedFunction> (opts: Opts): ReturnMasked;\n// export default function createMask, ReturnMasked extends MaskedPattern=MaskedPattern> (opts: Opts): ReturnMasked;\n// export default function createMask, ReturnMasked extends MaskedDynamic=MaskedDynamic> (opts: Opts): ReturnMasked;\n// // From mask opts\n// export default function createMask, ReturnMasked=Opts extends MaskedOptions ? M : never> (opts: Opts): ReturnMasked;\n// export default function createMask> (opts: Opts): ReturnMasked;\n// export default function createMask> (opts: Opts): ReturnMasked;\n// export default function createMask> (opts: Opts): ReturnMasked;\n// export default function createMask> (opts: Opts): ReturnMasked;\n// export default function createMask> (opts: Opts): ReturnMasked;\n// export default function createMask> (opts: Opts): ReturnMasked;\n// export default function createMask, ReturnMasked extends MaskedRegExp=MaskedRegExp> (opts: Opts): ReturnMasked;\n// export default function createMask, ReturnMasked extends MaskedFunction=MaskedFunction> (opts: Opts): ReturnMasked;\n\n/** Creates new {@link Masked} depending on mask type */\nfunction createMask(opts) {\n if (IMask.Masked && opts instanceof IMask.Masked) return opts;\n const nOpts = normalizeOpts(opts);\n const MaskedClass = maskedClass(nOpts.mask);\n if (!MaskedClass) throw new Error(\"Masked class is not found for provided mask \" + nOpts.mask + \", appropriate module needs to be imported manually before creating mask.\");\n if (nOpts.mask === MaskedClass) delete nOpts.mask;\n if (nOpts._mask) {\n nOpts.mask = nOpts._mask;\n delete nOpts._mask;\n }\n return new MaskedClass(nOpts);\n}\nIMask.createMask = createMask;\n\nexport { createMask as default, maskedClass, normalizeOpts };\n","import IMask from '../core/holder.js';\n\n/** Generic element API to use with mask */\nclass MaskElement {\n /** */\n\n /** */\n\n /** */\n\n /** Safely returns selection start */\n get selectionStart() {\n let start;\n try {\n start = this._unsafeSelectionStart;\n } catch {}\n return start != null ? start : this.value.length;\n }\n\n /** Safely returns selection end */\n get selectionEnd() {\n let end;\n try {\n end = this._unsafeSelectionEnd;\n } catch {}\n return end != null ? end : this.value.length;\n }\n\n /** Safely sets element selection */\n select(start, end) {\n if (start == null || end == null || start === this.selectionStart && end === this.selectionEnd) return;\n try {\n this._unsafeSelect(start, end);\n } catch {}\n }\n\n /** */\n get isActive() {\n return false;\n }\n /** */\n\n /** */\n\n /** */\n}\nIMask.MaskElement = MaskElement;\n\nexport { MaskElement as default };\n","import MaskElement from './mask-element.js';\nimport IMask from '../core/holder.js';\n\nconst KEY_Z = 90;\nconst KEY_Y = 89;\n\n/** Bridge between HTMLElement and {@link Masked} */\nclass HTMLMaskElement extends MaskElement {\n /** HTMLElement to use mask on */\n\n constructor(input) {\n super();\n this.input = input;\n this._onKeydown = this._onKeydown.bind(this);\n this._onInput = this._onInput.bind(this);\n this._onBeforeinput = this._onBeforeinput.bind(this);\n this._onCompositionEnd = this._onCompositionEnd.bind(this);\n }\n get rootElement() {\n var _this$input$getRootNo, _this$input$getRootNo2, _this$input;\n return (_this$input$getRootNo = (_this$input$getRootNo2 = (_this$input = this.input).getRootNode) == null ? void 0 : _this$input$getRootNo2.call(_this$input)) != null ? _this$input$getRootNo : document;\n }\n\n /** Is element in focus */\n get isActive() {\n return this.input === this.rootElement.activeElement;\n }\n\n /** Binds HTMLElement events to mask internal events */\n bindEvents(handlers) {\n this.input.addEventListener('keydown', this._onKeydown);\n this.input.addEventListener('input', this._onInput);\n this.input.addEventListener('beforeinput', this._onBeforeinput);\n this.input.addEventListener('compositionend', this._onCompositionEnd);\n this.input.addEventListener('drop', handlers.drop);\n this.input.addEventListener('click', handlers.click);\n this.input.addEventListener('focus', handlers.focus);\n this.input.addEventListener('blur', handlers.commit);\n this._handlers = handlers;\n }\n _onKeydown(e) {\n if (this._handlers.redo && (e.keyCode === KEY_Z && e.shiftKey && (e.metaKey || e.ctrlKey) || e.keyCode === KEY_Y && e.ctrlKey)) {\n e.preventDefault();\n return this._handlers.redo(e);\n }\n if (this._handlers.undo && e.keyCode === KEY_Z && (e.metaKey || e.ctrlKey)) {\n e.preventDefault();\n return this._handlers.undo(e);\n }\n if (!e.isComposing) this._handlers.selectionChange(e);\n }\n _onBeforeinput(e) {\n if (e.inputType === 'historyUndo' && this._handlers.undo) {\n e.preventDefault();\n return this._handlers.undo(e);\n }\n if (e.inputType === 'historyRedo' && this._handlers.redo) {\n e.preventDefault();\n return this._handlers.redo(e);\n }\n }\n _onCompositionEnd(e) {\n this._handlers.input(e);\n }\n _onInput(e) {\n if (!e.isComposing) this._handlers.input(e);\n }\n\n /** Unbinds HTMLElement events to mask internal events */\n unbindEvents() {\n this.input.removeEventListener('keydown', this._onKeydown);\n this.input.removeEventListener('input', this._onInput);\n this.input.removeEventListener('beforeinput', this._onBeforeinput);\n this.input.removeEventListener('compositionend', this._onCompositionEnd);\n this.input.removeEventListener('drop', this._handlers.drop);\n this.input.removeEventListener('click', this._handlers.click);\n this.input.removeEventListener('focus', this._handlers.focus);\n this.input.removeEventListener('blur', this._handlers.commit);\n this._handlers = {};\n }\n}\nIMask.HTMLMaskElement = HTMLMaskElement;\n\nexport { HTMLMaskElement as default };\n","import HTMLMaskElement from './html-mask-element.js';\nimport IMask from '../core/holder.js';\nimport './mask-element.js';\n\n/** Bridge between InputElement and {@link Masked} */\nclass HTMLInputMaskElement extends HTMLMaskElement {\n /** InputElement to use mask on */\n\n constructor(input) {\n super(input);\n this.input = input;\n }\n\n /** Returns InputElement selection start */\n get _unsafeSelectionStart() {\n return this.input.selectionStart != null ? this.input.selectionStart : this.value.length;\n }\n\n /** Returns InputElement selection end */\n get _unsafeSelectionEnd() {\n return this.input.selectionEnd;\n }\n\n /** Sets InputElement selection */\n _unsafeSelect(start, end) {\n this.input.setSelectionRange(start, end);\n }\n get value() {\n return this.input.value;\n }\n set value(value) {\n this.input.value = value;\n }\n}\nIMask.HTMLMaskElement = HTMLMaskElement;\n\nexport { HTMLInputMaskElement as default };\n","import HTMLMaskElement from './html-mask-element.js';\nimport IMask from '../core/holder.js';\nimport './mask-element.js';\n\nclass HTMLContenteditableMaskElement extends HTMLMaskElement {\n /** Returns HTMLElement selection start */\n get _unsafeSelectionStart() {\n const root = this.rootElement;\n const selection = root.getSelection && root.getSelection();\n const anchorOffset = selection && selection.anchorOffset;\n const focusOffset = selection && selection.focusOffset;\n if (focusOffset == null || anchorOffset == null || anchorOffset < focusOffset) {\n return anchorOffset;\n }\n return focusOffset;\n }\n\n /** Returns HTMLElement selection end */\n get _unsafeSelectionEnd() {\n const root = this.rootElement;\n const selection = root.getSelection && root.getSelection();\n const anchorOffset = selection && selection.anchorOffset;\n const focusOffset = selection && selection.focusOffset;\n if (focusOffset == null || anchorOffset == null || anchorOffset > focusOffset) {\n return anchorOffset;\n }\n return focusOffset;\n }\n\n /** Sets HTMLElement selection */\n _unsafeSelect(start, end) {\n if (!this.rootElement.createRange) return;\n const range = this.rootElement.createRange();\n range.setStart(this.input.firstChild || this.input, start);\n range.setEnd(this.input.lastChild || this.input, end);\n const root = this.rootElement;\n const selection = root.getSelection && root.getSelection();\n if (selection) {\n selection.removeAllRanges();\n selection.addRange(range);\n }\n }\n\n /** HTMLElement value */\n get value() {\n return this.input.textContent || '';\n }\n set value(value) {\n this.input.textContent = value;\n }\n}\nIMask.HTMLContenteditableMaskElement = HTMLContenteditableMaskElement;\n\nexport { HTMLContenteditableMaskElement as default };\n","class InputHistory {\n constructor() {\n this.states = [];\n this.currentIndex = 0;\n }\n get currentState() {\n return this.states[this.currentIndex];\n }\n get isEmpty() {\n return this.states.length === 0;\n }\n push(state) {\n // if current index points before the last element then remove the future\n if (this.currentIndex < this.states.length - 1) this.states.length = this.currentIndex + 1;\n this.states.push(state);\n if (this.states.length > InputHistory.MAX_LENGTH) this.states.shift();\n this.currentIndex = this.states.length - 1;\n }\n go(steps) {\n this.currentIndex = Math.min(Math.max(this.currentIndex + steps, 0), this.states.length - 1);\n return this.currentState;\n }\n undo() {\n return this.go(-1);\n }\n redo() {\n return this.go(+1);\n }\n clear() {\n this.states.length = 0;\n this.currentIndex = 0;\n }\n}\nInputHistory.MAX_LENGTH = 100;\n\nexport { InputHistory as default };\n","import { DIRECTION } from '../core/utils.js';\nimport ActionDetails from '../core/action-details.js';\nimport createMask, { maskedClass } from '../masked/factory.js';\nimport MaskElement from './mask-element.js';\nimport HTMLInputMaskElement from './html-input-mask-element.js';\nimport HTMLContenteditableMaskElement from './html-contenteditable-mask-element.js';\nimport IMask from '../core/holder.js';\nimport InputHistory from './input-history.js';\nimport './html-mask-element.js';\n\n/** Listens to element events and controls changes between element and {@link Masked} */\nclass InputMask {\n /**\n View element\n */\n\n /** Internal {@link Masked} model */\n\n constructor(el, opts) {\n this.el = el instanceof MaskElement ? el : el.isContentEditable && el.tagName !== 'INPUT' && el.tagName !== 'TEXTAREA' ? new HTMLContenteditableMaskElement(el) : new HTMLInputMaskElement(el);\n this.masked = createMask(opts);\n this._listeners = {};\n this._value = '';\n this._unmaskedValue = '';\n this._rawInputValue = '';\n this.history = new InputHistory();\n this._saveSelection = this._saveSelection.bind(this);\n this._onInput = this._onInput.bind(this);\n this._onChange = this._onChange.bind(this);\n this._onDrop = this._onDrop.bind(this);\n this._onFocus = this._onFocus.bind(this);\n this._onClick = this._onClick.bind(this);\n this._onUndo = this._onUndo.bind(this);\n this._onRedo = this._onRedo.bind(this);\n this.alignCursor = this.alignCursor.bind(this);\n this.alignCursorFriendly = this.alignCursorFriendly.bind(this);\n this._bindEvents();\n\n // refresh\n this.updateValue();\n this._onChange();\n }\n maskEquals(mask) {\n var _this$masked;\n return mask == null || ((_this$masked = this.masked) == null ? void 0 : _this$masked.maskEquals(mask));\n }\n\n /** Masked */\n get mask() {\n return this.masked.mask;\n }\n set mask(mask) {\n if (this.maskEquals(mask)) return;\n if (!(mask instanceof IMask.Masked) && this.masked.constructor === maskedClass(mask)) {\n // TODO \"any\" no idea\n this.masked.updateOptions({\n mask\n });\n return;\n }\n const masked = mask instanceof IMask.Masked ? mask : createMask({\n mask\n });\n masked.unmaskedValue = this.masked.unmaskedValue;\n this.masked = masked;\n }\n\n /** Raw value */\n get value() {\n return this._value;\n }\n set value(str) {\n if (this.value === str) return;\n this.masked.value = str;\n this.updateControl('auto');\n }\n\n /** Unmasked value */\n get unmaskedValue() {\n return this._unmaskedValue;\n }\n set unmaskedValue(str) {\n if (this.unmaskedValue === str) return;\n this.masked.unmaskedValue = str;\n this.updateControl('auto');\n }\n\n /** Raw input value */\n get rawInputValue() {\n return this._rawInputValue;\n }\n set rawInputValue(str) {\n if (this.rawInputValue === str) return;\n this.masked.rawInputValue = str;\n this.updateControl();\n this.alignCursor();\n }\n\n /** Typed unmasked value */\n get typedValue() {\n return this.masked.typedValue;\n }\n set typedValue(val) {\n if (this.masked.typedValueEquals(val)) return;\n this.masked.typedValue = val;\n this.updateControl('auto');\n }\n\n /** Display value */\n get displayValue() {\n return this.masked.displayValue;\n }\n\n /** Starts listening to element events */\n _bindEvents() {\n this.el.bindEvents({\n selectionChange: this._saveSelection,\n input: this._onInput,\n drop: this._onDrop,\n click: this._onClick,\n focus: this._onFocus,\n commit: this._onChange,\n undo: this._onUndo,\n redo: this._onRedo\n });\n }\n\n /** Stops listening to element events */\n _unbindEvents() {\n if (this.el) this.el.unbindEvents();\n }\n\n /** Fires custom event */\n _fireEvent(ev, e) {\n const listeners = this._listeners[ev];\n if (!listeners) return;\n listeners.forEach(l => l(e));\n }\n\n /** Current selection start */\n get selectionStart() {\n return this._cursorChanging ? this._changingCursorPos : this.el.selectionStart;\n }\n\n /** Current cursor position */\n get cursorPos() {\n return this._cursorChanging ? this._changingCursorPos : this.el.selectionEnd;\n }\n set cursorPos(pos) {\n if (!this.el || !this.el.isActive) return;\n this.el.select(pos, pos);\n this._saveSelection();\n }\n\n /** Stores current selection */\n _saveSelection( /* ev */\n ) {\n if (this.displayValue !== this.el.value) {\n console.warn('Element value was changed outside of mask. Syncronize mask using `mask.updateValue()` to work properly.'); // eslint-disable-line no-console\n }\n this._selection = {\n start: this.selectionStart,\n end: this.cursorPos\n };\n }\n\n /** Syncronizes model value from view */\n updateValue() {\n this.masked.value = this.el.value;\n this._value = this.masked.value;\n this._unmaskedValue = this.masked.unmaskedValue;\n this._rawInputValue = this.masked.rawInputValue;\n }\n\n /** Syncronizes view from model value, fires change events */\n updateControl(cursorPos) {\n const newUnmaskedValue = this.masked.unmaskedValue;\n const newValue = this.masked.value;\n const newRawInputValue = this.masked.rawInputValue;\n const newDisplayValue = this.displayValue;\n const isChanged = this.unmaskedValue !== newUnmaskedValue || this.value !== newValue || this._rawInputValue !== newRawInputValue;\n this._unmaskedValue = newUnmaskedValue;\n this._value = newValue;\n this._rawInputValue = newRawInputValue;\n if (this.el.value !== newDisplayValue) this.el.value = newDisplayValue;\n if (cursorPos === 'auto') this.alignCursor();else if (cursorPos != null) this.cursorPos = cursorPos;\n if (isChanged) this._fireChangeEvents();\n if (!this._historyChanging && (isChanged || this.history.isEmpty)) this.history.push({\n unmaskedValue: newUnmaskedValue,\n selection: {\n start: this.selectionStart,\n end: this.cursorPos\n }\n });\n }\n\n /** Updates options with deep equal check, recreates {@link Masked} model if mask type changes */\n updateOptions(opts) {\n const {\n mask,\n ...restOpts\n } = opts; // TODO types, yes, mask is optional\n\n const updateMask = !this.maskEquals(mask);\n const updateOpts = this.masked.optionsIsChanged(restOpts);\n if (updateMask) this.mask = mask;\n if (updateOpts) this.masked.updateOptions(restOpts); // TODO\n\n if (updateMask || updateOpts) this.updateControl();\n }\n\n /** Updates cursor */\n updateCursor(cursorPos) {\n if (cursorPos == null) return;\n this.cursorPos = cursorPos;\n\n // also queue change cursor for mobile browsers\n this._delayUpdateCursor(cursorPos);\n }\n\n /** Delays cursor update to support mobile browsers */\n _delayUpdateCursor(cursorPos) {\n this._abortUpdateCursor();\n this._changingCursorPos = cursorPos;\n this._cursorChanging = setTimeout(() => {\n if (!this.el) return; // if was destroyed\n this.cursorPos = this._changingCursorPos;\n this._abortUpdateCursor();\n }, 10);\n }\n\n /** Fires custom events */\n _fireChangeEvents() {\n this._fireEvent('accept', this._inputEvent);\n if (this.masked.isComplete) this._fireEvent('complete', this._inputEvent);\n }\n\n /** Aborts delayed cursor update */\n _abortUpdateCursor() {\n if (this._cursorChanging) {\n clearTimeout(this._cursorChanging);\n delete this._cursorChanging;\n }\n }\n\n /** Aligns cursor to nearest available position */\n alignCursor() {\n this.cursorPos = this.masked.nearestInputPos(this.masked.nearestInputPos(this.cursorPos, DIRECTION.LEFT));\n }\n\n /** Aligns cursor only if selection is empty */\n alignCursorFriendly() {\n if (this.selectionStart !== this.cursorPos) return; // skip if range is selected\n this.alignCursor();\n }\n\n /** Adds listener on custom event */\n on(ev, handler) {\n if (!this._listeners[ev]) this._listeners[ev] = [];\n this._listeners[ev].push(handler);\n return this;\n }\n\n /** Removes custom event listener */\n off(ev, handler) {\n if (!this._listeners[ev]) return this;\n if (!handler) {\n delete this._listeners[ev];\n return this;\n }\n const hIndex = this._listeners[ev].indexOf(handler);\n if (hIndex >= 0) this._listeners[ev].splice(hIndex, 1);\n return this;\n }\n\n /** Handles view input event */\n _onInput(e) {\n this._inputEvent = e;\n this._abortUpdateCursor();\n const details = new ActionDetails({\n // new state\n value: this.el.value,\n cursorPos: this.cursorPos,\n // old state\n oldValue: this.displayValue,\n oldSelection: this._selection\n });\n const oldRawValue = this.masked.rawInputValue;\n const offset = this.masked.splice(details.startChangePos, details.removed.length, details.inserted, details.removeDirection, {\n input: true,\n raw: true\n }).offset;\n\n // force align in remove direction only if no input chars were removed\n // otherwise we still need to align with NONE (to get out from fixed symbols for instance)\n const removeDirection = oldRawValue === this.masked.rawInputValue ? details.removeDirection : DIRECTION.NONE;\n let cursorPos = this.masked.nearestInputPos(details.startChangePos + offset, removeDirection);\n if (removeDirection !== DIRECTION.NONE) cursorPos = this.masked.nearestInputPos(cursorPos, DIRECTION.NONE);\n this.updateControl(cursorPos);\n delete this._inputEvent;\n }\n\n /** Handles view change event and commits model value */\n _onChange() {\n if (this.displayValue !== this.el.value) this.updateValue();\n this.masked.doCommit();\n this.updateControl();\n this._saveSelection();\n }\n\n /** Handles view drop event, prevents by default */\n _onDrop(ev) {\n ev.preventDefault();\n ev.stopPropagation();\n }\n\n /** Restore last selection on focus */\n _onFocus(ev) {\n this.alignCursorFriendly();\n }\n\n /** Restore last selection on focus */\n _onClick(ev) {\n this.alignCursorFriendly();\n }\n _onUndo() {\n this._applyHistoryState(this.history.undo());\n }\n _onRedo() {\n this._applyHistoryState(this.history.redo());\n }\n _applyHistoryState(state) {\n if (!state) return;\n this._historyChanging = true;\n this.unmaskedValue = state.unmaskedValue;\n this.el.select(state.selection.start, state.selection.end);\n this._saveSelection();\n this._historyChanging = false;\n }\n\n /** Unbind view events and removes element reference */\n destroy() {\n this._unbindEvents();\n this._listeners.length = 0;\n delete this.el;\n }\n}\nIMask.InputMask = InputMask;\n\nexport { InputMask as default };\n","import IMask from './holder.js';\n\n/** Provides details of changing model value */\nclass ChangeDetails {\n /** Inserted symbols */\n\n /** Additional offset if any changes occurred before tail */\n\n /** Raw inserted is used by dynamic mask */\n\n /** Can skip chars */\n\n static normalize(prep) {\n return Array.isArray(prep) ? prep : [prep, new ChangeDetails()];\n }\n constructor(details) {\n Object.assign(this, {\n inserted: '',\n rawInserted: '',\n tailShift: 0,\n skip: false\n }, details);\n }\n\n /** Aggregate changes */\n aggregate(details) {\n this.inserted += details.inserted;\n this.rawInserted += details.rawInserted;\n this.tailShift += details.tailShift;\n this.skip = this.skip || details.skip;\n return this;\n }\n\n /** Total offset considering all changes */\n get offset() {\n return this.tailShift + this.inserted.length;\n }\n get consumed() {\n return Boolean(this.rawInserted) || this.skip;\n }\n equals(details) {\n return this.inserted === details.inserted && this.tailShift === details.tailShift && this.rawInserted === details.rawInserted && this.skip === details.skip;\n }\n}\nIMask.ChangeDetails = ChangeDetails;\n\nexport { ChangeDetails as default };\n","/** Provides details of continuous extracted tail */\nclass ContinuousTailDetails {\n /** Tail value as string */\n\n /** Tail start position */\n\n /** Start position */\n\n constructor(value, from, stop) {\n if (value === void 0) {\n value = '';\n }\n if (from === void 0) {\n from = 0;\n }\n this.value = value;\n this.from = from;\n this.stop = stop;\n }\n toString() {\n return this.value;\n }\n extend(tail) {\n this.value += String(tail);\n }\n appendTo(masked) {\n return masked.append(this.toString(), {\n tail: true\n }).aggregate(masked._appendPlaceholder());\n }\n get state() {\n return {\n value: this.value,\n from: this.from,\n stop: this.stop\n };\n }\n set state(state) {\n Object.assign(this, state);\n }\n unshift(beforePos) {\n if (!this.value.length || beforePos != null && this.from >= beforePos) return '';\n const shiftChar = this.value[0];\n this.value = this.value.slice(1);\n return shiftChar;\n }\n shift() {\n if (!this.value.length) return '';\n const shiftChar = this.value[this.value.length - 1];\n this.value = this.value.slice(0, -1);\n return shiftChar;\n }\n}\n\nexport { ContinuousTailDetails as default };\n","import ChangeDetails from '../core/change-details.js';\nimport ContinuousTailDetails from '../core/continuous-tail-details.js';\nimport { isString, DIRECTION, objectIncludes, forceDirection } from '../core/utils.js';\nimport IMask from '../core/holder.js';\n\n/** Append flags */\n\n/** Extract flags */\n\n// see https://github.com/microsoft/TypeScript/issues/6223\n\n/** Provides common masking stuff */\nclass Masked {\n /** */\n\n /** */\n\n /** Transforms value before mask processing */\n\n /** Transforms each char before mask processing */\n\n /** Validates if value is acceptable */\n\n /** Does additional processing at the end of editing */\n\n /** Format typed value to string */\n\n /** Parse string to get typed value */\n\n /** Enable characters overwriting */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n constructor(opts) {\n this._value = '';\n this._update({\n ...Masked.DEFAULTS,\n ...opts\n });\n this._initialized = true;\n }\n\n /** Sets and applies new options */\n updateOptions(opts) {\n if (!this.optionsIsChanged(opts)) return;\n this.withValueRefresh(this._update.bind(this, opts));\n }\n\n /** Sets new options */\n _update(opts) {\n Object.assign(this, opts);\n }\n\n /** Mask state */\n get state() {\n return {\n _value: this.value,\n _rawInputValue: this.rawInputValue\n };\n }\n set state(state) {\n this._value = state._value;\n }\n\n /** Resets value */\n reset() {\n this._value = '';\n }\n get value() {\n return this._value;\n }\n set value(value) {\n this.resolve(value, {\n input: true\n });\n }\n\n /** Resolve new value */\n resolve(value, flags) {\n if (flags === void 0) {\n flags = {\n input: true\n };\n }\n this.reset();\n this.append(value, flags, '');\n this.doCommit();\n }\n get unmaskedValue() {\n return this.value;\n }\n set unmaskedValue(value) {\n this.resolve(value, {});\n }\n get typedValue() {\n return this.parse ? this.parse(this.value, this) : this.unmaskedValue;\n }\n set typedValue(value) {\n if (this.format) {\n this.value = this.format(value, this);\n } else {\n this.unmaskedValue = String(value);\n }\n }\n\n /** Value that includes raw user input */\n get rawInputValue() {\n return this.extractInput(0, this.displayValue.length, {\n raw: true\n });\n }\n set rawInputValue(value) {\n this.resolve(value, {\n raw: true\n });\n }\n get displayValue() {\n return this.value;\n }\n get isComplete() {\n return true;\n }\n get isFilled() {\n return this.isComplete;\n }\n\n /** Finds nearest input position in direction */\n nearestInputPos(cursorPos, direction) {\n return cursorPos;\n }\n totalInputPositions(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n return Math.min(this.displayValue.length, toPos - fromPos);\n }\n\n /** Extracts value in range considering flags */\n extractInput(fromPos, toPos, flags) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n return this.displayValue.slice(fromPos, toPos);\n }\n\n /** Extracts tail in range */\n extractTail(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n return new ContinuousTailDetails(this.extractInput(fromPos, toPos), fromPos);\n }\n\n /** Appends tail */\n appendTail(tail) {\n if (isString(tail)) tail = new ContinuousTailDetails(String(tail));\n return tail.appendTo(this);\n }\n\n /** Appends char */\n _appendCharRaw(ch, flags) {\n if (!ch) return new ChangeDetails();\n this._value += ch;\n return new ChangeDetails({\n inserted: ch,\n rawInserted: ch\n });\n }\n\n /** Appends char */\n _appendChar(ch, flags, checkTail) {\n if (flags === void 0) {\n flags = {};\n }\n const consistentState = this.state;\n let details;\n [ch, details] = this.doPrepareChar(ch, flags);\n if (ch) {\n details = details.aggregate(this._appendCharRaw(ch, flags));\n\n // TODO handle `skip`?\n\n // try `autofix` lookahead\n if (!details.rawInserted && this.autofix === 'pad') {\n const noFixState = this.state;\n this.state = consistentState;\n let fixDetails = this.pad(flags);\n const chDetails = this._appendCharRaw(ch, flags);\n fixDetails = fixDetails.aggregate(chDetails);\n\n // if fix was applied or\n // if details are equal use skip restoring state optimization\n if (chDetails.rawInserted || fixDetails.equals(details)) {\n details = fixDetails;\n } else {\n this.state = noFixState;\n }\n }\n }\n if (details.inserted) {\n let consistentTail;\n let appended = this.doValidate(flags) !== false;\n if (appended && checkTail != null) {\n // validation ok, check tail\n const beforeTailState = this.state;\n if (this.overwrite === true) {\n consistentTail = checkTail.state;\n for (let i = 0; i < details.rawInserted.length; ++i) {\n checkTail.unshift(this.displayValue.length - details.tailShift);\n }\n }\n let tailDetails = this.appendTail(checkTail);\n appended = tailDetails.rawInserted.length === checkTail.toString().length;\n\n // not ok, try shift\n if (!(appended && tailDetails.inserted) && this.overwrite === 'shift') {\n this.state = beforeTailState;\n consistentTail = checkTail.state;\n for (let i = 0; i < details.rawInserted.length; ++i) {\n checkTail.shift();\n }\n tailDetails = this.appendTail(checkTail);\n appended = tailDetails.rawInserted.length === checkTail.toString().length;\n }\n\n // if ok, rollback state after tail\n if (appended && tailDetails.inserted) this.state = beforeTailState;\n }\n\n // revert all if something went wrong\n if (!appended) {\n details = new ChangeDetails();\n this.state = consistentState;\n if (checkTail && consistentTail) checkTail.state = consistentTail;\n }\n }\n return details;\n }\n\n /** Appends optional placeholder at the end */\n _appendPlaceholder() {\n return new ChangeDetails();\n }\n\n /** Appends optional eager placeholder at the end */\n _appendEager() {\n return new ChangeDetails();\n }\n\n /** Appends symbols considering flags */\n append(str, flags, tail) {\n if (!isString(str)) throw new Error('value should be string');\n const checkTail = isString(tail) ? new ContinuousTailDetails(String(tail)) : tail;\n if (flags != null && flags.tail) flags._beforeTailState = this.state;\n let details;\n [str, details] = this.doPrepare(str, flags);\n for (let ci = 0; ci < str.length; ++ci) {\n const d = this._appendChar(str[ci], flags, checkTail);\n if (!d.rawInserted && !this.doSkipInvalid(str[ci], flags, checkTail)) break;\n details.aggregate(d);\n }\n if ((this.eager === true || this.eager === 'append') && flags != null && flags.input && str) {\n details.aggregate(this._appendEager());\n }\n\n // append tail but aggregate only tailShift\n if (checkTail != null) {\n details.tailShift += this.appendTail(checkTail).tailShift;\n // TODO it's a good idea to clear state after appending ends\n // but it causes bugs when one append calls another (when dynamic dispatch set rawInputValue)\n // this._resetBeforeTailState();\n }\n return details;\n }\n remove(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n this._value = this.displayValue.slice(0, fromPos) + this.displayValue.slice(toPos);\n return new ChangeDetails();\n }\n\n /** Calls function and reapplies current value */\n withValueRefresh(fn) {\n if (this._refreshing || !this._initialized) return fn();\n this._refreshing = true;\n const rawInput = this.rawInputValue;\n const value = this.value;\n const ret = fn();\n this.rawInputValue = rawInput;\n // append lost trailing chars at the end\n if (this.value && this.value !== value && value.indexOf(this.value) === 0) {\n this.append(value.slice(this.displayValue.length), {}, '');\n this.doCommit();\n }\n delete this._refreshing;\n return ret;\n }\n runIsolated(fn) {\n if (this._isolated || !this._initialized) return fn(this);\n this._isolated = true;\n const state = this.state;\n const ret = fn(this);\n this.state = state;\n delete this._isolated;\n return ret;\n }\n doSkipInvalid(ch, flags, checkTail) {\n return Boolean(this.skipInvalid);\n }\n\n /** Prepares string before mask processing */\n doPrepare(str, flags) {\n if (flags === void 0) {\n flags = {};\n }\n return ChangeDetails.normalize(this.prepare ? this.prepare(str, this, flags) : str);\n }\n\n /** Prepares each char before mask processing */\n doPrepareChar(str, flags) {\n if (flags === void 0) {\n flags = {};\n }\n return ChangeDetails.normalize(this.prepareChar ? this.prepareChar(str, this, flags) : str);\n }\n\n /** Validates if value is acceptable */\n doValidate(flags) {\n return (!this.validate || this.validate(this.value, this, flags)) && (!this.parent || this.parent.doValidate(flags));\n }\n\n /** Does additional processing at the end of editing */\n doCommit() {\n if (this.commit) this.commit(this.value, this);\n }\n splice(start, deleteCount, inserted, removeDirection, flags) {\n if (inserted === void 0) {\n inserted = '';\n }\n if (removeDirection === void 0) {\n removeDirection = DIRECTION.NONE;\n }\n if (flags === void 0) {\n flags = {\n input: true\n };\n }\n const tailPos = start + deleteCount;\n const tail = this.extractTail(tailPos);\n const eagerRemove = this.eager === true || this.eager === 'remove';\n let oldRawValue;\n if (eagerRemove) {\n removeDirection = forceDirection(removeDirection);\n oldRawValue = this.extractInput(0, tailPos, {\n raw: true\n });\n }\n let startChangePos = start;\n const details = new ChangeDetails();\n\n // if it is just deletion without insertion\n if (removeDirection !== DIRECTION.NONE) {\n startChangePos = this.nearestInputPos(start, deleteCount > 1 && start !== 0 && !eagerRemove ? DIRECTION.NONE : removeDirection);\n\n // adjust tailShift if start was aligned\n details.tailShift = startChangePos - start;\n }\n details.aggregate(this.remove(startChangePos));\n if (eagerRemove && removeDirection !== DIRECTION.NONE && oldRawValue === this.rawInputValue) {\n if (removeDirection === DIRECTION.FORCE_LEFT) {\n let valLength;\n while (oldRawValue === this.rawInputValue && (valLength = this.displayValue.length)) {\n details.aggregate(new ChangeDetails({\n tailShift: -1\n })).aggregate(this.remove(valLength - 1));\n }\n } else if (removeDirection === DIRECTION.FORCE_RIGHT) {\n tail.unshift();\n }\n }\n return details.aggregate(this.append(inserted, flags, tail));\n }\n maskEquals(mask) {\n return this.mask === mask;\n }\n optionsIsChanged(opts) {\n return !objectIncludes(this, opts);\n }\n typedValueEquals(value) {\n const tval = this.typedValue;\n return value === tval || Masked.EMPTY_VALUES.includes(value) && Masked.EMPTY_VALUES.includes(tval) || (this.format ? this.format(value, this) === this.format(this.typedValue, this) : false);\n }\n pad(flags) {\n return new ChangeDetails();\n }\n}\nMasked.DEFAULTS = {\n skipInvalid: true\n};\nMasked.EMPTY_VALUES = [undefined, null, ''];\nIMask.Masked = Masked;\n\nexport { Masked as default };\n","import ChangeDetails from '../../core/change-details.js';\nimport { isString } from '../../core/utils.js';\nimport ContinuousTailDetails from '../../core/continuous-tail-details.js';\nimport IMask from '../../core/holder.js';\n\nclass ChunksTailDetails {\n /** */\n\n constructor(chunks, from) {\n if (chunks === void 0) {\n chunks = [];\n }\n if (from === void 0) {\n from = 0;\n }\n this.chunks = chunks;\n this.from = from;\n }\n toString() {\n return this.chunks.map(String).join('');\n }\n extend(tailChunk) {\n if (!String(tailChunk)) return;\n tailChunk = isString(tailChunk) ? new ContinuousTailDetails(String(tailChunk)) : tailChunk;\n const lastChunk = this.chunks[this.chunks.length - 1];\n const extendLast = lastChunk && (\n // if stops are same or tail has no stop\n lastChunk.stop === tailChunk.stop || tailChunk.stop == null) &&\n // if tail chunk goes just after last chunk\n tailChunk.from === lastChunk.from + lastChunk.toString().length;\n if (tailChunk instanceof ContinuousTailDetails) {\n // check the ability to extend previous chunk\n if (extendLast) {\n // extend previous chunk\n lastChunk.extend(tailChunk.toString());\n } else {\n // append new chunk\n this.chunks.push(tailChunk);\n }\n } else if (tailChunk instanceof ChunksTailDetails) {\n if (tailChunk.stop == null) {\n // unwrap floating chunks to parent, keeping `from` pos\n let firstTailChunk;\n while (tailChunk.chunks.length && tailChunk.chunks[0].stop == null) {\n firstTailChunk = tailChunk.chunks.shift(); // not possible to be `undefined` because length was checked above\n firstTailChunk.from += tailChunk.from;\n this.extend(firstTailChunk);\n }\n }\n\n // if tail chunk still has value\n if (tailChunk.toString()) {\n // if chunks contains stops, then popup stop to container\n tailChunk.stop = tailChunk.blockIndex;\n this.chunks.push(tailChunk);\n }\n }\n }\n appendTo(masked) {\n if (!(masked instanceof IMask.MaskedPattern)) {\n const tail = new ContinuousTailDetails(this.toString());\n return tail.appendTo(masked);\n }\n const details = new ChangeDetails();\n for (let ci = 0; ci < this.chunks.length; ++ci) {\n const chunk = this.chunks[ci];\n const lastBlockIter = masked._mapPosToBlock(masked.displayValue.length);\n const stop = chunk.stop;\n let chunkBlock;\n if (stop != null && (\n // if block not found or stop is behind lastBlock\n !lastBlockIter || lastBlockIter.index <= stop)) {\n if (chunk instanceof ChunksTailDetails ||\n // for continuous block also check if stop is exist\n masked._stops.indexOf(stop) >= 0) {\n details.aggregate(masked._appendPlaceholder(stop));\n }\n chunkBlock = chunk instanceof ChunksTailDetails && masked._blocks[stop];\n }\n if (chunkBlock) {\n const tailDetails = chunkBlock.appendTail(chunk);\n details.aggregate(tailDetails);\n\n // get not inserted chars\n const remainChars = chunk.toString().slice(tailDetails.rawInserted.length);\n if (remainChars) details.aggregate(masked.append(remainChars, {\n tail: true\n }));\n } else {\n details.aggregate(masked.append(chunk.toString(), {\n tail: true\n }));\n }\n }\n return details;\n }\n get state() {\n return {\n chunks: this.chunks.map(c => c.state),\n from: this.from,\n stop: this.stop,\n blockIndex: this.blockIndex\n };\n }\n set state(state) {\n const {\n chunks,\n ...props\n } = state;\n Object.assign(this, props);\n this.chunks = chunks.map(cstate => {\n const chunk = \"chunks\" in cstate ? new ChunksTailDetails() : new ContinuousTailDetails();\n chunk.state = cstate;\n return chunk;\n });\n }\n unshift(beforePos) {\n if (!this.chunks.length || beforePos != null && this.from >= beforePos) return '';\n const chunkShiftPos = beforePos != null ? beforePos - this.from : beforePos;\n let ci = 0;\n while (ci < this.chunks.length) {\n const chunk = this.chunks[ci];\n const shiftChar = chunk.unshift(chunkShiftPos);\n if (chunk.toString()) {\n // chunk still contains value\n // but not shifted - means no more available chars to shift\n if (!shiftChar) break;\n ++ci;\n } else {\n // clean if chunk has no value\n this.chunks.splice(ci, 1);\n }\n if (shiftChar) return shiftChar;\n }\n return '';\n }\n shift() {\n if (!this.chunks.length) return '';\n let ci = this.chunks.length - 1;\n while (0 <= ci) {\n const chunk = this.chunks[ci];\n const shiftChar = chunk.shift();\n if (chunk.toString()) {\n // chunk still contains value\n // but not shifted - means no more available chars to shift\n if (!shiftChar) break;\n --ci;\n } else {\n // clean if chunk has no value\n this.chunks.splice(ci, 1);\n }\n if (shiftChar) return shiftChar;\n }\n return '';\n }\n}\n\nexport { ChunksTailDetails as default };\n","import { DIRECTION } from '../../core/utils.js';\n\nclass PatternCursor {\n constructor(masked, pos) {\n this.masked = masked;\n this._log = [];\n const {\n offset,\n index\n } = masked._mapPosToBlock(pos) || (pos < 0 ?\n // first\n {\n index: 0,\n offset: 0\n } :\n // last\n {\n index: this.masked._blocks.length,\n offset: 0\n });\n this.offset = offset;\n this.index = index;\n this.ok = false;\n }\n get block() {\n return this.masked._blocks[this.index];\n }\n get pos() {\n return this.masked._blockStartPos(this.index) + this.offset;\n }\n get state() {\n return {\n index: this.index,\n offset: this.offset,\n ok: this.ok\n };\n }\n set state(s) {\n Object.assign(this, s);\n }\n pushState() {\n this._log.push(this.state);\n }\n popState() {\n const s = this._log.pop();\n if (s) this.state = s;\n return s;\n }\n bindBlock() {\n if (this.block) return;\n if (this.index < 0) {\n this.index = 0;\n this.offset = 0;\n }\n if (this.index >= this.masked._blocks.length) {\n this.index = this.masked._blocks.length - 1;\n this.offset = this.block.displayValue.length; // TODO this is stupid type error, `block` depends on index that was changed above\n }\n }\n _pushLeft(fn) {\n this.pushState();\n for (this.bindBlock(); 0 <= this.index; --this.index, this.offset = ((_this$block = this.block) == null ? void 0 : _this$block.displayValue.length) || 0) {\n var _this$block;\n if (fn()) return this.ok = true;\n }\n return this.ok = false;\n }\n _pushRight(fn) {\n this.pushState();\n for (this.bindBlock(); this.index < this.masked._blocks.length; ++this.index, this.offset = 0) {\n if (fn()) return this.ok = true;\n }\n return this.ok = false;\n }\n pushLeftBeforeFilled() {\n return this._pushLeft(() => {\n if (this.block.isFixed || !this.block.value) return;\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.FORCE_LEFT);\n if (this.offset !== 0) return true;\n });\n }\n pushLeftBeforeInput() {\n // cases:\n // filled input: 00|\n // optional empty input: 00[]|\n // nested block: XX<[]>|\n return this._pushLeft(() => {\n if (this.block.isFixed) return;\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.LEFT);\n return true;\n });\n }\n pushLeftBeforeRequired() {\n return this._pushLeft(() => {\n if (this.block.isFixed || this.block.isOptional && !this.block.value) return;\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.LEFT);\n return true;\n });\n }\n pushRightBeforeFilled() {\n return this._pushRight(() => {\n if (this.block.isFixed || !this.block.value) return;\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.FORCE_RIGHT);\n if (this.offset !== this.block.value.length) return true;\n });\n }\n pushRightBeforeInput() {\n return this._pushRight(() => {\n if (this.block.isFixed) return;\n\n // const o = this.offset;\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.NONE);\n // HACK cases like (STILL DOES NOT WORK FOR NESTED)\n // aa|X\n // aaX_ - this will not work\n // if (o && o === this.offset && this.block instanceof PatternInputDefinition) continue;\n return true;\n });\n }\n pushRightBeforeRequired() {\n return this._pushRight(() => {\n if (this.block.isFixed || this.block.isOptional && !this.block.value) return;\n\n // TODO check |[*]XX_\n this.offset = this.block.nearestInputPos(this.offset, DIRECTION.NONE);\n return true;\n });\n }\n}\n\nexport { PatternCursor as default };\n","import ChangeDetails from '../../core/change-details.js';\nimport { DIRECTION, isString } from '../../core/utils.js';\nimport ContinuousTailDetails from '../../core/continuous-tail-details.js';\nimport '../../core/holder.js';\n\nclass PatternFixedDefinition {\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n constructor(opts) {\n Object.assign(this, opts);\n this._value = '';\n this.isFixed = true;\n }\n get value() {\n return this._value;\n }\n get unmaskedValue() {\n return this.isUnmasking ? this.value : '';\n }\n get rawInputValue() {\n return this._isRawInput ? this.value : '';\n }\n get displayValue() {\n return this.value;\n }\n reset() {\n this._isRawInput = false;\n this._value = '';\n }\n remove(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this._value.length;\n }\n this._value = this._value.slice(0, fromPos) + this._value.slice(toPos);\n if (!this._value) this._isRawInput = false;\n return new ChangeDetails();\n }\n nearestInputPos(cursorPos, direction) {\n if (direction === void 0) {\n direction = DIRECTION.NONE;\n }\n const minPos = 0;\n const maxPos = this._value.length;\n switch (direction) {\n case DIRECTION.LEFT:\n case DIRECTION.FORCE_LEFT:\n return minPos;\n case DIRECTION.NONE:\n case DIRECTION.RIGHT:\n case DIRECTION.FORCE_RIGHT:\n default:\n return maxPos;\n }\n }\n totalInputPositions(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this._value.length;\n }\n return this._isRawInput ? toPos - fromPos : 0;\n }\n extractInput(fromPos, toPos, flags) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this._value.length;\n }\n if (flags === void 0) {\n flags = {};\n }\n return flags.raw && this._isRawInput && this._value.slice(fromPos, toPos) || '';\n }\n get isComplete() {\n return true;\n }\n get isFilled() {\n return Boolean(this._value);\n }\n _appendChar(ch, flags) {\n if (flags === void 0) {\n flags = {};\n }\n if (this.isFilled) return new ChangeDetails();\n const appendEager = this.eager === true || this.eager === 'append';\n const appended = this.char === ch;\n const isResolved = appended && (this.isUnmasking || flags.input || flags.raw) && (!flags.raw || !appendEager) && !flags.tail;\n const details = new ChangeDetails({\n inserted: this.char,\n rawInserted: isResolved ? this.char : ''\n });\n this._value = this.char;\n this._isRawInput = isResolved && (flags.raw || flags.input);\n return details;\n }\n _appendEager() {\n return this._appendChar(this.char, {\n tail: true\n });\n }\n _appendPlaceholder() {\n const details = new ChangeDetails();\n if (this.isFilled) return details;\n this._value = details.inserted = this.char;\n return details;\n }\n extractTail() {\n return new ContinuousTailDetails('');\n }\n appendTail(tail) {\n if (isString(tail)) tail = new ContinuousTailDetails(String(tail));\n return tail.appendTo(this);\n }\n append(str, flags, tail) {\n const details = this._appendChar(str[0], flags);\n if (tail != null) {\n details.tailShift += this.appendTail(tail).tailShift;\n }\n return details;\n }\n doCommit() {}\n get state() {\n return {\n _value: this._value,\n _rawInputValue: this.rawInputValue\n };\n }\n set state(state) {\n this._value = state._value;\n this._isRawInput = Boolean(state._rawInputValue);\n }\n pad(flags) {\n return this._appendPlaceholder();\n }\n}\n\nexport { PatternFixedDefinition as default };\n","import createMask from '../factory.js';\nimport ChangeDetails from '../../core/change-details.js';\nimport { DIRECTION } from '../../core/utils.js';\nimport '../../core/holder.js';\n\nclass PatternInputDefinition {\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n /** */\n\n constructor(opts) {\n const {\n parent,\n isOptional,\n placeholderChar,\n displayChar,\n lazy,\n eager,\n ...maskOpts\n } = opts;\n this.masked = createMask(maskOpts);\n Object.assign(this, {\n parent,\n isOptional,\n placeholderChar,\n displayChar,\n lazy,\n eager\n });\n }\n reset() {\n this.isFilled = false;\n this.masked.reset();\n }\n remove(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.value.length;\n }\n if (fromPos === 0 && toPos >= 1) {\n this.isFilled = false;\n return this.masked.remove(fromPos, toPos);\n }\n return new ChangeDetails();\n }\n get value() {\n return this.masked.value || (this.isFilled && !this.isOptional ? this.placeholderChar : '');\n }\n get unmaskedValue() {\n return this.masked.unmaskedValue;\n }\n get rawInputValue() {\n return this.masked.rawInputValue;\n }\n get displayValue() {\n return this.masked.value && this.displayChar || this.value;\n }\n get isComplete() {\n return Boolean(this.masked.value) || this.isOptional;\n }\n _appendChar(ch, flags) {\n if (flags === void 0) {\n flags = {};\n }\n if (this.isFilled) return new ChangeDetails();\n const state = this.masked.state;\n // simulate input\n let details = this.masked._appendChar(ch, this.currentMaskFlags(flags));\n if (details.inserted && this.doValidate(flags) === false) {\n details = new ChangeDetails();\n this.masked.state = state;\n }\n if (!details.inserted && !this.isOptional && !this.lazy && !flags.input) {\n details.inserted = this.placeholderChar;\n }\n details.skip = !details.inserted && !this.isOptional;\n this.isFilled = Boolean(details.inserted);\n return details;\n }\n append(str, flags, tail) {\n // TODO probably should be done via _appendChar\n return this.masked.append(str, this.currentMaskFlags(flags), tail);\n }\n _appendPlaceholder() {\n if (this.isFilled || this.isOptional) return new ChangeDetails();\n this.isFilled = true;\n return new ChangeDetails({\n inserted: this.placeholderChar\n });\n }\n _appendEager() {\n return new ChangeDetails();\n }\n extractTail(fromPos, toPos) {\n return this.masked.extractTail(fromPos, toPos);\n }\n appendTail(tail) {\n return this.masked.appendTail(tail);\n }\n extractInput(fromPos, toPos, flags) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.value.length;\n }\n return this.masked.extractInput(fromPos, toPos, flags);\n }\n nearestInputPos(cursorPos, direction) {\n if (direction === void 0) {\n direction = DIRECTION.NONE;\n }\n const minPos = 0;\n const maxPos = this.value.length;\n const boundPos = Math.min(Math.max(cursorPos, minPos), maxPos);\n switch (direction) {\n case DIRECTION.LEFT:\n case DIRECTION.FORCE_LEFT:\n return this.isComplete ? boundPos : minPos;\n case DIRECTION.RIGHT:\n case DIRECTION.FORCE_RIGHT:\n return this.isComplete ? boundPos : maxPos;\n case DIRECTION.NONE:\n default:\n return boundPos;\n }\n }\n totalInputPositions(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.value.length;\n }\n return this.value.slice(fromPos, toPos).length;\n }\n doValidate(flags) {\n return this.masked.doValidate(this.currentMaskFlags(flags)) && (!this.parent || this.parent.doValidate(this.currentMaskFlags(flags)));\n }\n doCommit() {\n this.masked.doCommit();\n }\n get state() {\n return {\n _value: this.value,\n _rawInputValue: this.rawInputValue,\n masked: this.masked.state,\n isFilled: this.isFilled\n };\n }\n set state(state) {\n this.masked.state = state.masked;\n this.isFilled = state.isFilled;\n }\n currentMaskFlags(flags) {\n var _flags$_beforeTailSta;\n return {\n ...flags,\n _beforeTailState: (flags == null || (_flags$_beforeTailSta = flags._beforeTailState) == null ? void 0 : _flags$_beforeTailSta.masked) || (flags == null ? void 0 : flags._beforeTailState)\n };\n }\n pad(flags) {\n return new ChangeDetails();\n }\n}\nPatternInputDefinition.DEFAULT_DEFINITIONS = {\n '0': /\\d/,\n 'a': /[\\u0041-\\u005A\\u0061-\\u007A\\u00AA\\u00B5\\u00BA\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02C1\\u02C6-\\u02D1\\u02E0-\\u02E4\\u02EC\\u02EE\\u0370-\\u0374\\u0376\\u0377\\u037A-\\u037D\\u0386\\u0388-\\u038A\\u038C\\u038E-\\u03A1\\u03A3-\\u03F5\\u03F7-\\u0481\\u048A-\\u0527\\u0531-\\u0556\\u0559\\u0561-\\u0587\\u05D0-\\u05EA\\u05F0-\\u05F2\\u0620-\\u064A\\u066E\\u066F\\u0671-\\u06D3\\u06D5\\u06E5\\u06E6\\u06EE\\u06EF\\u06FA-\\u06FC\\u06FF\\u0710\\u0712-\\u072F\\u074D-\\u07A5\\u07B1\\u07CA-\\u07EA\\u07F4\\u07F5\\u07FA\\u0800-\\u0815\\u081A\\u0824\\u0828\\u0840-\\u0858\\u08A0\\u08A2-\\u08AC\\u0904-\\u0939\\u093D\\u0950\\u0958-\\u0961\\u0971-\\u0977\\u0979-\\u097F\\u0985-\\u098C\\u098F\\u0990\\u0993-\\u09A8\\u09AA-\\u09B0\\u09B2\\u09B6-\\u09B9\\u09BD\\u09CE\\u09DC\\u09DD\\u09DF-\\u09E1\\u09F0\\u09F1\\u0A05-\\u0A0A\\u0A0F\\u0A10\\u0A13-\\u0A28\\u0A2A-\\u0A30\\u0A32\\u0A33\\u0A35\\u0A36\\u0A38\\u0A39\\u0A59-\\u0A5C\\u0A5E\\u0A72-\\u0A74\\u0A85-\\u0A8D\\u0A8F-\\u0A91\\u0A93-\\u0AA8\\u0AAA-\\u0AB0\\u0AB2\\u0AB3\\u0AB5-\\u0AB9\\u0ABD\\u0AD0\\u0AE0\\u0AE1\\u0B05-\\u0B0C\\u0B0F\\u0B10\\u0B13-\\u0B28\\u0B2A-\\u0B30\\u0B32\\u0B33\\u0B35-\\u0B39\\u0B3D\\u0B5C\\u0B5D\\u0B5F-\\u0B61\\u0B71\\u0B83\\u0B85-\\u0B8A\\u0B8E-\\u0B90\\u0B92-\\u0B95\\u0B99\\u0B9A\\u0B9C\\u0B9E\\u0B9F\\u0BA3\\u0BA4\\u0BA8-\\u0BAA\\u0BAE-\\u0BB9\\u0BD0\\u0C05-\\u0C0C\\u0C0E-\\u0C10\\u0C12-\\u0C28\\u0C2A-\\u0C33\\u0C35-\\u0C39\\u0C3D\\u0C58\\u0C59\\u0C60\\u0C61\\u0C85-\\u0C8C\\u0C8E-\\u0C90\\u0C92-\\u0CA8\\u0CAA-\\u0CB3\\u0CB5-\\u0CB9\\u0CBD\\u0CDE\\u0CE0\\u0CE1\\u0CF1\\u0CF2\\u0D05-\\u0D0C\\u0D0E-\\u0D10\\u0D12-\\u0D3A\\u0D3D\\u0D4E\\u0D60\\u0D61\\u0D7A-\\u0D7F\\u0D85-\\u0D96\\u0D9A-\\u0DB1\\u0DB3-\\u0DBB\\u0DBD\\u0DC0-\\u0DC6\\u0E01-\\u0E30\\u0E32\\u0E33\\u0E40-\\u0E46\\u0E81\\u0E82\\u0E84\\u0E87\\u0E88\\u0E8A\\u0E8D\\u0E94-\\u0E97\\u0E99-\\u0E9F\\u0EA1-\\u0EA3\\u0EA5\\u0EA7\\u0EAA\\u0EAB\\u0EAD-\\u0EB0\\u0EB2\\u0EB3\\u0EBD\\u0EC0-\\u0EC4\\u0EC6\\u0EDC-\\u0EDF\\u0F00\\u0F40-\\u0F47\\u0F49-\\u0F6C\\u0F88-\\u0F8C\\u1000-\\u102A\\u103F\\u1050-\\u1055\\u105A-\\u105D\\u1061\\u1065\\u1066\\u106E-\\u1070\\u1075-\\u1081\\u108E\\u10A0-\\u10C5\\u10C7\\u10CD\\u10D0-\\u10FA\\u10FC-\\u1248\\u124A-\\u124D\\u1250-\\u1256\\u1258\\u125A-\\u125D\\u1260-\\u1288\\u128A-\\u128D\\u1290-\\u12B0\\u12B2-\\u12B5\\u12B8-\\u12BE\\u12C0\\u12C2-\\u12C5\\u12C8-\\u12D6\\u12D8-\\u1310\\u1312-\\u1315\\u1318-\\u135A\\u1380-\\u138F\\u13A0-\\u13F4\\u1401-\\u166C\\u166F-\\u167F\\u1681-\\u169A\\u16A0-\\u16EA\\u1700-\\u170C\\u170E-\\u1711\\u1720-\\u1731\\u1740-\\u1751\\u1760-\\u176C\\u176E-\\u1770\\u1780-\\u17B3\\u17D7\\u17DC\\u1820-\\u1877\\u1880-\\u18A8\\u18AA\\u18B0-\\u18F5\\u1900-\\u191C\\u1950-\\u196D\\u1970-\\u1974\\u1980-\\u19AB\\u19C1-\\u19C7\\u1A00-\\u1A16\\u1A20-\\u1A54\\u1AA7\\u1B05-\\u1B33\\u1B45-\\u1B4B\\u1B83-\\u1BA0\\u1BAE\\u1BAF\\u1BBA-\\u1BE5\\u1C00-\\u1C23\\u1C4D-\\u1C4F\\u1C5A-\\u1C7D\\u1CE9-\\u1CEC\\u1CEE-\\u1CF1\\u1CF5\\u1CF6\\u1D00-\\u1DBF\\u1E00-\\u1F15\\u1F18-\\u1F1D\\u1F20-\\u1F45\\u1F48-\\u1F4D\\u1F50-\\u1F57\\u1F59\\u1F5B\\u1F5D\\u1F5F-\\u1F7D\\u1F80-\\u1FB4\\u1FB6-\\u1FBC\\u1FBE\\u1FC2-\\u1FC4\\u1FC6-\\u1FCC\\u1FD0-\\u1FD3\\u1FD6-\\u1FDB\\u1FE0-\\u1FEC\\u1FF2-\\u1FF4\\u1FF6-\\u1FFC\\u2071\\u207F\\u2090-\\u209C\\u2102\\u2107\\u210A-\\u2113\\u2115\\u2119-\\u211D\\u2124\\u2126\\u2128\\u212A-\\u212D\\u212F-\\u2139\\u213C-\\u213F\\u2145-\\u2149\\u214E\\u2183\\u2184\\u2C00-\\u2C2E\\u2C30-\\u2C5E\\u2C60-\\u2CE4\\u2CEB-\\u2CEE\\u2CF2\\u2CF3\\u2D00-\\u2D25\\u2D27\\u2D2D\\u2D30-\\u2D67\\u2D6F\\u2D80-\\u2D96\\u2DA0-\\u2DA6\\u2DA8-\\u2DAE\\u2DB0-\\u2DB6\\u2DB8-\\u2DBE\\u2DC0-\\u2DC6\\u2DC8-\\u2DCE\\u2DD0-\\u2DD6\\u2DD8-\\u2DDE\\u2E2F\\u3005\\u3006\\u3031-\\u3035\\u303B\\u303C\\u3041-\\u3096\\u309D-\\u309F\\u30A1-\\u30FA\\u30FC-\\u30FF\\u3105-\\u312D\\u3131-\\u318E\\u31A0-\\u31BA\\u31F0-\\u31FF\\u3400-\\u4DB5\\u4E00-\\u9FCC\\uA000-\\uA48C\\uA4D0-\\uA4FD\\uA500-\\uA60C\\uA610-\\uA61F\\uA62A\\uA62B\\uA640-\\uA66E\\uA67F-\\uA697\\uA6A0-\\uA6E5\\uA717-\\uA71F\\uA722-\\uA788\\uA78B-\\uA78E\\uA790-\\uA793\\uA7A0-\\uA7AA\\uA7F8-\\uA801\\uA803-\\uA805\\uA807-\\uA80A\\uA80C-\\uA822\\uA840-\\uA873\\uA882-\\uA8B3\\uA8F2-\\uA8F7\\uA8FB\\uA90A-\\uA925\\uA930-\\uA946\\uA960-\\uA97C\\uA984-\\uA9B2\\uA9CF\\uAA00-\\uAA28\\uAA40-\\uAA42\\uAA44-\\uAA4B\\uAA60-\\uAA76\\uAA7A\\uAA80-\\uAAAF\\uAAB1\\uAAB5\\uAAB6\\uAAB9-\\uAABD\\uAAC0\\uAAC2\\uAADB-\\uAADD\\uAAE0-\\uAAEA\\uAAF2-\\uAAF4\\uAB01-\\uAB06\\uAB09-\\uAB0E\\uAB11-\\uAB16\\uAB20-\\uAB26\\uAB28-\\uAB2E\\uABC0-\\uABE2\\uAC00-\\uD7A3\\uD7B0-\\uD7C6\\uD7CB-\\uD7FB\\uF900-\\uFA6D\\uFA70-\\uFAD9\\uFB00-\\uFB06\\uFB13-\\uFB17\\uFB1D\\uFB1F-\\uFB28\\uFB2A-\\uFB36\\uFB38-\\uFB3C\\uFB3E\\uFB40\\uFB41\\uFB43\\uFB44\\uFB46-\\uFBB1\\uFBD3-\\uFD3D\\uFD50-\\uFD8F\\uFD92-\\uFDC7\\uFDF0-\\uFDFB\\uFE70-\\uFE74\\uFE76-\\uFEFC\\uFF21-\\uFF3A\\uFF41-\\uFF5A\\uFF66-\\uFFBE\\uFFC2-\\uFFC7\\uFFCA-\\uFFCF\\uFFD2-\\uFFD7\\uFFDA-\\uFFDC]/,\n // http://stackoverflow.com/a/22075070\n '*': /./\n};\n\nexport { PatternInputDefinition as default };\n","import Masked from './base.js';\nimport IMask from '../core/holder.js';\nimport '../core/change-details.js';\nimport '../core/continuous-tail-details.js';\nimport '../core/utils.js';\n\n/** Masking by RegExp */\nclass MaskedRegExp extends Masked {\n /** */\n\n /** Enable characters overwriting */\n\n /** */\n\n /** */\n\n /** */\n\n updateOptions(opts) {\n super.updateOptions(opts);\n }\n _update(opts) {\n const mask = opts.mask;\n if (mask) opts.validate = value => value.search(mask) >= 0;\n super._update(opts);\n }\n}\nIMask.MaskedRegExp = MaskedRegExp;\n\nexport { MaskedRegExp as default };\n","import ChangeDetails from '../core/change-details.js';\nimport IMask from '../core/holder.js';\nimport { DIRECTION } from '../core/utils.js';\nimport Masked from './base.js';\nimport createMask, { normalizeOpts } from './factory.js';\nimport ChunksTailDetails from './pattern/chunk-tail-details.js';\nimport PatternCursor from './pattern/cursor.js';\nimport PatternFixedDefinition from './pattern/fixed-definition.js';\nimport PatternInputDefinition from './pattern/input-definition.js';\nimport './regexp.js';\nimport '../core/continuous-tail-details.js';\n\n/** Pattern mask */\nclass MaskedPattern extends Masked {\n /** */\n\n /** */\n\n /** Single char for empty input */\n\n /** Single char for filled input */\n\n /** Show placeholder only when needed */\n\n /** Enable characters overwriting */\n\n /** */\n\n /** */\n\n /** */\n\n constructor(opts) {\n super({\n ...MaskedPattern.DEFAULTS,\n ...opts,\n definitions: Object.assign({}, PatternInputDefinition.DEFAULT_DEFINITIONS, opts == null ? void 0 : opts.definitions)\n });\n }\n updateOptions(opts) {\n super.updateOptions(opts);\n }\n _update(opts) {\n opts.definitions = Object.assign({}, this.definitions, opts.definitions);\n super._update(opts);\n this._rebuildMask();\n }\n _rebuildMask() {\n const defs = this.definitions;\n this._blocks = [];\n this.exposeBlock = undefined;\n this._stops = [];\n this._maskedBlocks = {};\n const pattern = this.mask;\n if (!pattern || !defs) return;\n let unmaskingBlock = false;\n let optionalBlock = false;\n for (let i = 0; i < pattern.length; ++i) {\n if (this.blocks) {\n const p = pattern.slice(i);\n const bNames = Object.keys(this.blocks).filter(bName => p.indexOf(bName) === 0);\n // order by key length\n bNames.sort((a, b) => b.length - a.length);\n // use block name with max length\n const bName = bNames[0];\n if (bName) {\n const {\n expose,\n repeat,\n ...bOpts\n } = normalizeOpts(this.blocks[bName]); // TODO type Opts\n const blockOpts = {\n lazy: this.lazy,\n eager: this.eager,\n placeholderChar: this.placeholderChar,\n displayChar: this.displayChar,\n overwrite: this.overwrite,\n autofix: this.autofix,\n ...bOpts,\n repeat,\n parent: this\n };\n const maskedBlock = repeat != null ? new IMask.RepeatBlock(blockOpts /* TODO */) : createMask(blockOpts);\n if (maskedBlock) {\n this._blocks.push(maskedBlock);\n if (expose) this.exposeBlock = maskedBlock;\n\n // store block index\n if (!this._maskedBlocks[bName]) this._maskedBlocks[bName] = [];\n this._maskedBlocks[bName].push(this._blocks.length - 1);\n }\n i += bName.length - 1;\n continue;\n }\n }\n let char = pattern[i];\n let isInput = (char in defs);\n if (char === MaskedPattern.STOP_CHAR) {\n this._stops.push(this._blocks.length);\n continue;\n }\n if (char === '{' || char === '}') {\n unmaskingBlock = !unmaskingBlock;\n continue;\n }\n if (char === '[' || char === ']') {\n optionalBlock = !optionalBlock;\n continue;\n }\n if (char === MaskedPattern.ESCAPE_CHAR) {\n ++i;\n char = pattern[i];\n if (!char) break;\n isInput = false;\n }\n const def = isInput ? new PatternInputDefinition({\n isOptional: optionalBlock,\n lazy: this.lazy,\n eager: this.eager,\n placeholderChar: this.placeholderChar,\n displayChar: this.displayChar,\n ...normalizeOpts(defs[char]),\n parent: this\n }) : new PatternFixedDefinition({\n char,\n eager: this.eager,\n isUnmasking: unmaskingBlock\n });\n this._blocks.push(def);\n }\n }\n get state() {\n return {\n ...super.state,\n _blocks: this._blocks.map(b => b.state)\n };\n }\n set state(state) {\n if (!state) {\n this.reset();\n return;\n }\n const {\n _blocks,\n ...maskedState\n } = state;\n this._blocks.forEach((b, bi) => b.state = _blocks[bi]);\n super.state = maskedState;\n }\n reset() {\n super.reset();\n this._blocks.forEach(b => b.reset());\n }\n get isComplete() {\n return this.exposeBlock ? this.exposeBlock.isComplete : this._blocks.every(b => b.isComplete);\n }\n get isFilled() {\n return this._blocks.every(b => b.isFilled);\n }\n get isFixed() {\n return this._blocks.every(b => b.isFixed);\n }\n get isOptional() {\n return this._blocks.every(b => b.isOptional);\n }\n doCommit() {\n this._blocks.forEach(b => b.doCommit());\n super.doCommit();\n }\n get unmaskedValue() {\n return this.exposeBlock ? this.exposeBlock.unmaskedValue : this._blocks.reduce((str, b) => str += b.unmaskedValue, '');\n }\n set unmaskedValue(unmaskedValue) {\n if (this.exposeBlock) {\n const tail = this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock)) + this.exposeBlock.displayValue.length);\n this.exposeBlock.unmaskedValue = unmaskedValue;\n this.appendTail(tail);\n this.doCommit();\n } else super.unmaskedValue = unmaskedValue;\n }\n get value() {\n return this.exposeBlock ? this.exposeBlock.value :\n // TODO return _value when not in change?\n this._blocks.reduce((str, b) => str += b.value, '');\n }\n set value(value) {\n if (this.exposeBlock) {\n const tail = this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock)) + this.exposeBlock.displayValue.length);\n this.exposeBlock.value = value;\n this.appendTail(tail);\n this.doCommit();\n } else super.value = value;\n }\n get typedValue() {\n return this.exposeBlock ? this.exposeBlock.typedValue : super.typedValue;\n }\n set typedValue(value) {\n if (this.exposeBlock) {\n const tail = this.extractTail(this._blockStartPos(this._blocks.indexOf(this.exposeBlock)) + this.exposeBlock.displayValue.length);\n this.exposeBlock.typedValue = value;\n this.appendTail(tail);\n this.doCommit();\n } else super.typedValue = value;\n }\n get displayValue() {\n return this._blocks.reduce((str, b) => str += b.displayValue, '');\n }\n appendTail(tail) {\n return super.appendTail(tail).aggregate(this._appendPlaceholder());\n }\n _appendEager() {\n var _this$_mapPosToBlock;\n const details = new ChangeDetails();\n let startBlockIndex = (_this$_mapPosToBlock = this._mapPosToBlock(this.displayValue.length)) == null ? void 0 : _this$_mapPosToBlock.index;\n if (startBlockIndex == null) return details;\n\n // TODO test if it works for nested pattern masks\n if (this._blocks[startBlockIndex].isFilled) ++startBlockIndex;\n for (let bi = startBlockIndex; bi < this._blocks.length; ++bi) {\n const d = this._blocks[bi]._appendEager();\n if (!d.inserted) break;\n details.aggregate(d);\n }\n return details;\n }\n _appendCharRaw(ch, flags) {\n if (flags === void 0) {\n flags = {};\n }\n const blockIter = this._mapPosToBlock(this.displayValue.length);\n const details = new ChangeDetails();\n if (!blockIter) return details;\n for (let bi = blockIter.index, block; block = this._blocks[bi]; ++bi) {\n var _flags$_beforeTailSta;\n const blockDetails = block._appendChar(ch, {\n ...flags,\n _beforeTailState: (_flags$_beforeTailSta = flags._beforeTailState) == null || (_flags$_beforeTailSta = _flags$_beforeTailSta._blocks) == null ? void 0 : _flags$_beforeTailSta[bi]\n });\n details.aggregate(blockDetails);\n if (blockDetails.consumed) break; // go next char\n }\n return details;\n }\n extractTail(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n const chunkTail = new ChunksTailDetails();\n if (fromPos === toPos) return chunkTail;\n this._forEachBlocksInRange(fromPos, toPos, (b, bi, bFromPos, bToPos) => {\n const blockChunk = b.extractTail(bFromPos, bToPos);\n blockChunk.stop = this._findStopBefore(bi);\n blockChunk.from = this._blockStartPos(bi);\n if (blockChunk instanceof ChunksTailDetails) blockChunk.blockIndex = bi;\n chunkTail.extend(blockChunk);\n });\n return chunkTail;\n }\n extractInput(fromPos, toPos, flags) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n if (flags === void 0) {\n flags = {};\n }\n if (fromPos === toPos) return '';\n let input = '';\n this._forEachBlocksInRange(fromPos, toPos, (b, _, fromPos, toPos) => {\n input += b.extractInput(fromPos, toPos, flags);\n });\n return input;\n }\n _findStopBefore(blockIndex) {\n let stopBefore;\n for (let si = 0; si < this._stops.length; ++si) {\n const stop = this._stops[si];\n if (stop <= blockIndex) stopBefore = stop;else break;\n }\n return stopBefore;\n }\n\n /** Appends placeholder depending on laziness */\n _appendPlaceholder(toBlockIndex) {\n const details = new ChangeDetails();\n if (this.lazy && toBlockIndex == null) return details;\n const startBlockIter = this._mapPosToBlock(this.displayValue.length);\n if (!startBlockIter) return details;\n const startBlockIndex = startBlockIter.index;\n const endBlockIndex = toBlockIndex != null ? toBlockIndex : this._blocks.length;\n this._blocks.slice(startBlockIndex, endBlockIndex).forEach(b => {\n if (!b.lazy || toBlockIndex != null) {\n var _blocks2;\n details.aggregate(b._appendPlaceholder((_blocks2 = b._blocks) == null ? void 0 : _blocks2.length));\n }\n });\n return details;\n }\n\n /** Finds block in pos */\n _mapPosToBlock(pos) {\n let accVal = '';\n for (let bi = 0; bi < this._blocks.length; ++bi) {\n const block = this._blocks[bi];\n const blockStartPos = accVal.length;\n accVal += block.displayValue;\n if (pos <= accVal.length) {\n return {\n index: bi,\n offset: pos - blockStartPos\n };\n }\n }\n }\n _blockStartPos(blockIndex) {\n return this._blocks.slice(0, blockIndex).reduce((pos, b) => pos += b.displayValue.length, 0);\n }\n _forEachBlocksInRange(fromPos, toPos, fn) {\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n const fromBlockIter = this._mapPosToBlock(fromPos);\n if (fromBlockIter) {\n const toBlockIter = this._mapPosToBlock(toPos);\n // process first block\n const isSameBlock = toBlockIter && fromBlockIter.index === toBlockIter.index;\n const fromBlockStartPos = fromBlockIter.offset;\n const fromBlockEndPos = toBlockIter && isSameBlock ? toBlockIter.offset : this._blocks[fromBlockIter.index].displayValue.length;\n fn(this._blocks[fromBlockIter.index], fromBlockIter.index, fromBlockStartPos, fromBlockEndPos);\n if (toBlockIter && !isSameBlock) {\n // process intermediate blocks\n for (let bi = fromBlockIter.index + 1; bi < toBlockIter.index; ++bi) {\n fn(this._blocks[bi], bi, 0, this._blocks[bi].displayValue.length);\n }\n\n // process last block\n fn(this._blocks[toBlockIter.index], toBlockIter.index, 0, toBlockIter.offset);\n }\n }\n }\n remove(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n const removeDetails = super.remove(fromPos, toPos);\n this._forEachBlocksInRange(fromPos, toPos, (b, _, bFromPos, bToPos) => {\n removeDetails.aggregate(b.remove(bFromPos, bToPos));\n });\n return removeDetails;\n }\n nearestInputPos(cursorPos, direction) {\n if (direction === void 0) {\n direction = DIRECTION.NONE;\n }\n if (!this._blocks.length) return 0;\n const cursor = new PatternCursor(this, cursorPos);\n if (direction === DIRECTION.NONE) {\n // -------------------------------------------------\n // NONE should only go out from fixed to the right!\n // -------------------------------------------------\n if (cursor.pushRightBeforeInput()) return cursor.pos;\n cursor.popState();\n if (cursor.pushLeftBeforeInput()) return cursor.pos;\n return this.displayValue.length;\n }\n\n // FORCE is only about a|* otherwise is 0\n if (direction === DIRECTION.LEFT || direction === DIRECTION.FORCE_LEFT) {\n // try to break fast when *|a\n if (direction === DIRECTION.LEFT) {\n cursor.pushRightBeforeFilled();\n if (cursor.ok && cursor.pos === cursorPos) return cursorPos;\n cursor.popState();\n }\n\n // forward flow\n cursor.pushLeftBeforeInput();\n cursor.pushLeftBeforeRequired();\n cursor.pushLeftBeforeFilled();\n\n // backward flow\n if (direction === DIRECTION.LEFT) {\n cursor.pushRightBeforeInput();\n cursor.pushRightBeforeRequired();\n if (cursor.ok && cursor.pos <= cursorPos) return cursor.pos;\n cursor.popState();\n if (cursor.ok && cursor.pos <= cursorPos) return cursor.pos;\n cursor.popState();\n }\n if (cursor.ok) return cursor.pos;\n if (direction === DIRECTION.FORCE_LEFT) return 0;\n cursor.popState();\n if (cursor.ok) return cursor.pos;\n cursor.popState();\n if (cursor.ok) return cursor.pos;\n return 0;\n }\n if (direction === DIRECTION.RIGHT || direction === DIRECTION.FORCE_RIGHT) {\n // forward flow\n cursor.pushRightBeforeInput();\n cursor.pushRightBeforeRequired();\n if (cursor.pushRightBeforeFilled()) return cursor.pos;\n if (direction === DIRECTION.FORCE_RIGHT) return this.displayValue.length;\n\n // backward flow\n cursor.popState();\n if (cursor.ok) return cursor.pos;\n cursor.popState();\n if (cursor.ok) return cursor.pos;\n return this.nearestInputPos(cursorPos, DIRECTION.LEFT);\n }\n return cursorPos;\n }\n totalInputPositions(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n let total = 0;\n this._forEachBlocksInRange(fromPos, toPos, (b, _, bFromPos, bToPos) => {\n total += b.totalInputPositions(bFromPos, bToPos);\n });\n return total;\n }\n\n /** Get block by name */\n maskedBlock(name) {\n return this.maskedBlocks(name)[0];\n }\n\n /** Get all blocks by name */\n maskedBlocks(name) {\n const indices = this._maskedBlocks[name];\n if (!indices) return [];\n return indices.map(gi => this._blocks[gi]);\n }\n pad(flags) {\n const details = new ChangeDetails();\n this._forEachBlocksInRange(0, this.displayValue.length, b => details.aggregate(b.pad(flags)));\n return details;\n }\n}\nMaskedPattern.DEFAULTS = {\n ...Masked.DEFAULTS,\n lazy: true,\n placeholderChar: '_'\n};\nMaskedPattern.STOP_CHAR = '`';\nMaskedPattern.ESCAPE_CHAR = '\\\\';\nMaskedPattern.InputDefinition = PatternInputDefinition;\nMaskedPattern.FixedDefinition = PatternFixedDefinition;\nIMask.MaskedPattern = MaskedPattern;\n\nexport { MaskedPattern as default };\n","import ChangeDetails from '../core/change-details.js';\nimport IMask from '../core/holder.js';\nimport MaskedPattern from './pattern.js';\nimport '../core/utils.js';\nimport './base.js';\nimport '../core/continuous-tail-details.js';\nimport './factory.js';\nimport './pattern/chunk-tail-details.js';\nimport './pattern/cursor.js';\nimport './pattern/fixed-definition.js';\nimport './pattern/input-definition.js';\nimport './regexp.js';\n\n/** Pattern which accepts ranges */\nclass MaskedRange extends MaskedPattern {\n /**\n Optionally sets max length of pattern.\n Used when pattern length is longer then `to` param length. Pads zeros at start in this case.\n */\n\n /** Min bound */\n\n /** Max bound */\n\n get _matchFrom() {\n return this.maxLength - String(this.from).length;\n }\n constructor(opts) {\n super(opts); // mask will be created in _update\n }\n updateOptions(opts) {\n super.updateOptions(opts);\n }\n _update(opts) {\n const {\n to = this.to || 0,\n from = this.from || 0,\n maxLength = this.maxLength || 0,\n autofix = this.autofix,\n ...patternOpts\n } = opts;\n this.to = to;\n this.from = from;\n this.maxLength = Math.max(String(to).length, maxLength);\n this.autofix = autofix;\n const fromStr = String(this.from).padStart(this.maxLength, '0');\n const toStr = String(this.to).padStart(this.maxLength, '0');\n let sameCharsCount = 0;\n while (sameCharsCount < toStr.length && toStr[sameCharsCount] === fromStr[sameCharsCount]) ++sameCharsCount;\n patternOpts.mask = toStr.slice(0, sameCharsCount).replace(/0/g, '\\\\0') + '0'.repeat(this.maxLength - sameCharsCount);\n super._update(patternOpts);\n }\n get isComplete() {\n return super.isComplete && Boolean(this.value);\n }\n boundaries(str) {\n let minstr = '';\n let maxstr = '';\n const [, placeholder, num] = str.match(/^(\\D*)(\\d*)(\\D*)/) || [];\n if (num) {\n minstr = '0'.repeat(placeholder.length) + num;\n maxstr = '9'.repeat(placeholder.length) + num;\n }\n minstr = minstr.padEnd(this.maxLength, '0');\n maxstr = maxstr.padEnd(this.maxLength, '9');\n return [minstr, maxstr];\n }\n doPrepareChar(ch, flags) {\n if (flags === void 0) {\n flags = {};\n }\n let details;\n [ch, details] = super.doPrepareChar(ch.replace(/\\D/g, ''), flags);\n if (!ch) details.skip = !this.isComplete;\n return [ch, details];\n }\n _appendCharRaw(ch, flags) {\n if (flags === void 0) {\n flags = {};\n }\n if (!this.autofix || this.value.length + 1 > this.maxLength) return super._appendCharRaw(ch, flags);\n const fromStr = String(this.from).padStart(this.maxLength, '0');\n const toStr = String(this.to).padStart(this.maxLength, '0');\n const [minstr, maxstr] = this.boundaries(this.value + ch);\n if (Number(maxstr) < this.from) return super._appendCharRaw(fromStr[this.value.length], flags);\n if (Number(minstr) > this.to) {\n if (!flags.tail && this.autofix === 'pad' && this.value.length + 1 < this.maxLength) {\n return super._appendCharRaw(fromStr[this.value.length], flags).aggregate(this._appendCharRaw(ch, flags));\n }\n return super._appendCharRaw(toStr[this.value.length], flags);\n }\n return super._appendCharRaw(ch, flags);\n }\n doValidate(flags) {\n const str = this.value;\n const firstNonZero = str.search(/[^0]/);\n if (firstNonZero === -1 && str.length <= this._matchFrom) return true;\n const [minstr, maxstr] = this.boundaries(str);\n return this.from <= Number(maxstr) && Number(minstr) <= this.to && super.doValidate(flags);\n }\n pad(flags) {\n const details = new ChangeDetails();\n if (this.value.length === this.maxLength) return details;\n const value = this.value;\n const padLength = this.maxLength - this.value.length;\n if (padLength) {\n this.reset();\n for (let i = 0; i < padLength; ++i) {\n details.aggregate(super._appendCharRaw('0', flags));\n }\n\n // append tail\n value.split('').forEach(ch => this._appendCharRaw(ch));\n }\n return details;\n }\n}\nIMask.MaskedRange = MaskedRange;\n\nexport { MaskedRange as default };\n","import MaskedPattern from './pattern.js';\nimport MaskedRange from './range.js';\nimport IMask from '../core/holder.js';\nimport { isString } from '../core/utils.js';\nimport '../core/change-details.js';\nimport './base.js';\nimport '../core/continuous-tail-details.js';\nimport './factory.js';\nimport './pattern/chunk-tail-details.js';\nimport './pattern/cursor.js';\nimport './pattern/fixed-definition.js';\nimport './pattern/input-definition.js';\nimport './regexp.js';\n\nconst DefaultPattern = 'd{.}`m{.}`Y';\n\n// Make format and parse required when pattern is provided\n\n/** Date mask */\nclass MaskedDate extends MaskedPattern {\n static extractPatternOptions(opts) {\n const {\n mask,\n pattern,\n ...patternOpts\n } = opts;\n return {\n ...patternOpts,\n mask: isString(mask) ? mask : pattern\n };\n }\n\n /** Pattern mask for date according to {@link MaskedDate#format} */\n\n /** Start date */\n\n /** End date */\n\n /** Format typed value to string */\n\n /** Parse string to get typed value */\n\n constructor(opts) {\n super(MaskedDate.extractPatternOptions({\n ...MaskedDate.DEFAULTS,\n ...opts\n }));\n }\n updateOptions(opts) {\n super.updateOptions(opts);\n }\n _update(opts) {\n const {\n mask,\n pattern,\n blocks,\n ...patternOpts\n } = {\n ...MaskedDate.DEFAULTS,\n ...opts\n };\n const patternBlocks = Object.assign({}, MaskedDate.GET_DEFAULT_BLOCKS());\n // adjust year block\n if (opts.min) patternBlocks.Y.from = opts.min.getFullYear();\n if (opts.max) patternBlocks.Y.to = opts.max.getFullYear();\n if (opts.min && opts.max && patternBlocks.Y.from === patternBlocks.Y.to) {\n patternBlocks.m.from = opts.min.getMonth() + 1;\n patternBlocks.m.to = opts.max.getMonth() + 1;\n if (patternBlocks.m.from === patternBlocks.m.to) {\n patternBlocks.d.from = opts.min.getDate();\n patternBlocks.d.to = opts.max.getDate();\n }\n }\n Object.assign(patternBlocks, this.blocks, blocks);\n super._update({\n ...patternOpts,\n mask: isString(mask) ? mask : pattern,\n blocks: patternBlocks\n });\n }\n doValidate(flags) {\n const date = this.date;\n return super.doValidate(flags) && (!this.isComplete || this.isDateExist(this.value) && date != null && (this.min == null || this.min <= date) && (this.max == null || date <= this.max));\n }\n\n /** Checks if date is exists */\n isDateExist(str) {\n return this.format(this.parse(str, this), this).indexOf(str) >= 0;\n }\n\n /** Parsed Date */\n get date() {\n return this.typedValue;\n }\n set date(date) {\n this.typedValue = date;\n }\n get typedValue() {\n return this.isComplete ? super.typedValue : null;\n }\n set typedValue(value) {\n super.typedValue = value;\n }\n maskEquals(mask) {\n return mask === Date || super.maskEquals(mask);\n }\n optionsIsChanged(opts) {\n return super.optionsIsChanged(MaskedDate.extractPatternOptions(opts));\n }\n}\nMaskedDate.GET_DEFAULT_BLOCKS = () => ({\n d: {\n mask: MaskedRange,\n from: 1,\n to: 31,\n maxLength: 2\n },\n m: {\n mask: MaskedRange,\n from: 1,\n to: 12,\n maxLength: 2\n },\n Y: {\n mask: MaskedRange,\n from: 1900,\n to: 9999\n }\n});\nMaskedDate.DEFAULTS = {\n ...MaskedPattern.DEFAULTS,\n mask: Date,\n pattern: DefaultPattern,\n format: (date, masked) => {\n if (!date) return '';\n const day = String(date.getDate()).padStart(2, '0');\n const month = String(date.getMonth() + 1).padStart(2, '0');\n const year = date.getFullYear();\n return [day, month, year].join('.');\n },\n parse: (str, masked) => {\n const [day, month, year] = str.split('.').map(Number);\n return new Date(year, month - 1, day);\n }\n};\nIMask.MaskedDate = MaskedDate;\n\nexport { MaskedDate as default };\n","import { DIRECTION, objectIncludes } from '../core/utils.js';\nimport ChangeDetails from '../core/change-details.js';\nimport createMask, { normalizeOpts } from './factory.js';\nimport Masked from './base.js';\nimport IMask from '../core/holder.js';\nimport '../core/continuous-tail-details.js';\n\n/** Dynamic mask for choosing appropriate mask in run-time */\nclass MaskedDynamic extends Masked {\n constructor(opts) {\n super({\n ...MaskedDynamic.DEFAULTS,\n ...opts\n });\n this.currentMask = undefined;\n }\n updateOptions(opts) {\n super.updateOptions(opts);\n }\n _update(opts) {\n super._update(opts);\n if ('mask' in opts) {\n this.exposeMask = undefined;\n // mask could be totally dynamic with only `dispatch` option\n this.compiledMasks = Array.isArray(opts.mask) ? opts.mask.map(m => {\n const {\n expose,\n ...maskOpts\n } = normalizeOpts(m);\n const masked = createMask({\n overwrite: this._overwrite,\n eager: this._eager,\n skipInvalid: this._skipInvalid,\n ...maskOpts\n });\n if (expose) this.exposeMask = masked;\n return masked;\n }) : [];\n\n // this.currentMask = this.doDispatch(''); // probably not needed but lets see\n }\n }\n _appendCharRaw(ch, flags) {\n if (flags === void 0) {\n flags = {};\n }\n const details = this._applyDispatch(ch, flags);\n if (this.currentMask) {\n details.aggregate(this.currentMask._appendChar(ch, this.currentMaskFlags(flags)));\n }\n return details;\n }\n _applyDispatch(appended, flags, tail) {\n if (appended === void 0) {\n appended = '';\n }\n if (flags === void 0) {\n flags = {};\n }\n if (tail === void 0) {\n tail = '';\n }\n const prevValueBeforeTail = flags.tail && flags._beforeTailState != null ? flags._beforeTailState._value : this.value;\n const inputValue = this.rawInputValue;\n const insertValue = flags.tail && flags._beforeTailState != null ? flags._beforeTailState._rawInputValue : inputValue;\n const tailValue = inputValue.slice(insertValue.length);\n const prevMask = this.currentMask;\n const details = new ChangeDetails();\n const prevMaskState = prevMask == null ? void 0 : prevMask.state;\n\n // clone flags to prevent overwriting `_beforeTailState`\n this.currentMask = this.doDispatch(appended, {\n ...flags\n }, tail);\n\n // restore state after dispatch\n if (this.currentMask) {\n if (this.currentMask !== prevMask) {\n // if mask changed reapply input\n this.currentMask.reset();\n if (insertValue) {\n this.currentMask.append(insertValue, {\n raw: true\n });\n details.tailShift = this.currentMask.value.length - prevValueBeforeTail.length;\n }\n if (tailValue) {\n details.tailShift += this.currentMask.append(tailValue, {\n raw: true,\n tail: true\n }).tailShift;\n }\n } else if (prevMaskState) {\n // Dispatch can do something bad with state, so\n // restore prev mask state\n this.currentMask.state = prevMaskState;\n }\n }\n return details;\n }\n _appendPlaceholder() {\n const details = this._applyDispatch();\n if (this.currentMask) {\n details.aggregate(this.currentMask._appendPlaceholder());\n }\n return details;\n }\n _appendEager() {\n const details = this._applyDispatch();\n if (this.currentMask) {\n details.aggregate(this.currentMask._appendEager());\n }\n return details;\n }\n appendTail(tail) {\n const details = new ChangeDetails();\n if (tail) details.aggregate(this._applyDispatch('', {}, tail));\n return details.aggregate(this.currentMask ? this.currentMask.appendTail(tail) : super.appendTail(tail));\n }\n currentMaskFlags(flags) {\n var _flags$_beforeTailSta, _flags$_beforeTailSta2;\n return {\n ...flags,\n _beforeTailState: ((_flags$_beforeTailSta = flags._beforeTailState) == null ? void 0 : _flags$_beforeTailSta.currentMaskRef) === this.currentMask && ((_flags$_beforeTailSta2 = flags._beforeTailState) == null ? void 0 : _flags$_beforeTailSta2.currentMask) || flags._beforeTailState\n };\n }\n doDispatch(appended, flags, tail) {\n if (flags === void 0) {\n flags = {};\n }\n if (tail === void 0) {\n tail = '';\n }\n return this.dispatch(appended, this, flags, tail);\n }\n doValidate(flags) {\n return super.doValidate(flags) && (!this.currentMask || this.currentMask.doValidate(this.currentMaskFlags(flags)));\n }\n doPrepare(str, flags) {\n if (flags === void 0) {\n flags = {};\n }\n let [s, details] = super.doPrepare(str, flags);\n if (this.currentMask) {\n let currentDetails;\n [s, currentDetails] = super.doPrepare(s, this.currentMaskFlags(flags));\n details = details.aggregate(currentDetails);\n }\n return [s, details];\n }\n doPrepareChar(str, flags) {\n if (flags === void 0) {\n flags = {};\n }\n let [s, details] = super.doPrepareChar(str, flags);\n if (this.currentMask) {\n let currentDetails;\n [s, currentDetails] = super.doPrepareChar(s, this.currentMaskFlags(flags));\n details = details.aggregate(currentDetails);\n }\n return [s, details];\n }\n reset() {\n var _this$currentMask;\n (_this$currentMask = this.currentMask) == null || _this$currentMask.reset();\n this.compiledMasks.forEach(m => m.reset());\n }\n get value() {\n return this.exposeMask ? this.exposeMask.value : this.currentMask ? this.currentMask.value : '';\n }\n set value(value) {\n if (this.exposeMask) {\n this.exposeMask.value = value;\n this.currentMask = this.exposeMask;\n this._applyDispatch();\n } else super.value = value;\n }\n get unmaskedValue() {\n return this.exposeMask ? this.exposeMask.unmaskedValue : this.currentMask ? this.currentMask.unmaskedValue : '';\n }\n set unmaskedValue(unmaskedValue) {\n if (this.exposeMask) {\n this.exposeMask.unmaskedValue = unmaskedValue;\n this.currentMask = this.exposeMask;\n this._applyDispatch();\n } else super.unmaskedValue = unmaskedValue;\n }\n get typedValue() {\n return this.exposeMask ? this.exposeMask.typedValue : this.currentMask ? this.currentMask.typedValue : '';\n }\n set typedValue(typedValue) {\n if (this.exposeMask) {\n this.exposeMask.typedValue = typedValue;\n this.currentMask = this.exposeMask;\n this._applyDispatch();\n return;\n }\n let unmaskedValue = String(typedValue);\n\n // double check it\n if (this.currentMask) {\n this.currentMask.typedValue = typedValue;\n unmaskedValue = this.currentMask.unmaskedValue;\n }\n this.unmaskedValue = unmaskedValue;\n }\n get displayValue() {\n return this.currentMask ? this.currentMask.displayValue : '';\n }\n get isComplete() {\n var _this$currentMask2;\n return Boolean((_this$currentMask2 = this.currentMask) == null ? void 0 : _this$currentMask2.isComplete);\n }\n get isFilled() {\n var _this$currentMask3;\n return Boolean((_this$currentMask3 = this.currentMask) == null ? void 0 : _this$currentMask3.isFilled);\n }\n remove(fromPos, toPos) {\n const details = new ChangeDetails();\n if (this.currentMask) {\n details.aggregate(this.currentMask.remove(fromPos, toPos))\n // update with dispatch\n .aggregate(this._applyDispatch());\n }\n return details;\n }\n get state() {\n var _this$currentMask4;\n return {\n ...super.state,\n _rawInputValue: this.rawInputValue,\n compiledMasks: this.compiledMasks.map(m => m.state),\n currentMaskRef: this.currentMask,\n currentMask: (_this$currentMask4 = this.currentMask) == null ? void 0 : _this$currentMask4.state\n };\n }\n set state(state) {\n const {\n compiledMasks,\n currentMaskRef,\n currentMask,\n ...maskedState\n } = state;\n if (compiledMasks) this.compiledMasks.forEach((m, mi) => m.state = compiledMasks[mi]);\n if (currentMaskRef != null) {\n this.currentMask = currentMaskRef;\n this.currentMask.state = currentMask;\n }\n super.state = maskedState;\n }\n extractInput(fromPos, toPos, flags) {\n return this.currentMask ? this.currentMask.extractInput(fromPos, toPos, flags) : '';\n }\n extractTail(fromPos, toPos) {\n return this.currentMask ? this.currentMask.extractTail(fromPos, toPos) : super.extractTail(fromPos, toPos);\n }\n doCommit() {\n if (this.currentMask) this.currentMask.doCommit();\n super.doCommit();\n }\n nearestInputPos(cursorPos, direction) {\n return this.currentMask ? this.currentMask.nearestInputPos(cursorPos, direction) : super.nearestInputPos(cursorPos, direction);\n }\n get overwrite() {\n return this.currentMask ? this.currentMask.overwrite : this._overwrite;\n }\n set overwrite(overwrite) {\n this._overwrite = overwrite;\n }\n get eager() {\n return this.currentMask ? this.currentMask.eager : this._eager;\n }\n set eager(eager) {\n this._eager = eager;\n }\n get skipInvalid() {\n return this.currentMask ? this.currentMask.skipInvalid : this._skipInvalid;\n }\n set skipInvalid(skipInvalid) {\n this._skipInvalid = skipInvalid;\n }\n get autofix() {\n return this.currentMask ? this.currentMask.autofix : this._autofix;\n }\n set autofix(autofix) {\n this._autofix = autofix;\n }\n maskEquals(mask) {\n return Array.isArray(mask) ? this.compiledMasks.every((m, mi) => {\n if (!mask[mi]) return;\n const {\n mask: oldMask,\n ...restOpts\n } = mask[mi];\n return objectIncludes(m, restOpts) && m.maskEquals(oldMask);\n }) : super.maskEquals(mask);\n }\n typedValueEquals(value) {\n var _this$currentMask5;\n return Boolean((_this$currentMask5 = this.currentMask) == null ? void 0 : _this$currentMask5.typedValueEquals(value));\n }\n}\n/** Currently chosen mask */\n/** Currently chosen mask */\n/** Compliled {@link Masked} options */\n/** Chooses {@link Masked} depending on input value */\nMaskedDynamic.DEFAULTS = {\n ...Masked.DEFAULTS,\n dispatch: (appended, masked, flags, tail) => {\n if (!masked.compiledMasks.length) return;\n const inputValue = masked.rawInputValue;\n\n // simulate input\n const inputs = masked.compiledMasks.map((m, index) => {\n const isCurrent = masked.currentMask === m;\n const startInputPos = isCurrent ? m.displayValue.length : m.nearestInputPos(m.displayValue.length, DIRECTION.FORCE_LEFT);\n if (m.rawInputValue !== inputValue) {\n m.reset();\n m.append(inputValue, {\n raw: true\n });\n } else if (!isCurrent) {\n m.remove(startInputPos);\n }\n m.append(appended, masked.currentMaskFlags(flags));\n m.appendTail(tail);\n return {\n index,\n weight: m.rawInputValue.length,\n totalInputPositions: m.totalInputPositions(0, Math.max(startInputPos, m.nearestInputPos(m.displayValue.length, DIRECTION.FORCE_LEFT)))\n };\n });\n\n // pop masks with longer values first\n inputs.sort((i1, i2) => i2.weight - i1.weight || i2.totalInputPositions - i1.totalInputPositions);\n return masked.compiledMasks[inputs[0].index];\n }\n};\nIMask.MaskedDynamic = MaskedDynamic;\n\nexport { MaskedDynamic as default };\n","import MaskedPattern from './pattern.js';\nimport IMask from '../core/holder.js';\nimport ChangeDetails from '../core/change-details.js';\nimport { DIRECTION } from '../core/utils.js';\nimport ContinuousTailDetails from '../core/continuous-tail-details.js';\nimport './base.js';\nimport './factory.js';\nimport './pattern/chunk-tail-details.js';\nimport './pattern/cursor.js';\nimport './pattern/fixed-definition.js';\nimport './pattern/input-definition.js';\nimport './regexp.js';\n\n/** Pattern which validates enum values */\nclass MaskedEnum extends MaskedPattern {\n constructor(opts) {\n super({\n ...MaskedEnum.DEFAULTS,\n ...opts\n }); // mask will be created in _update\n }\n updateOptions(opts) {\n super.updateOptions(opts);\n }\n _update(opts) {\n const {\n enum: enum_,\n ...eopts\n } = opts;\n if (enum_) {\n const lengths = enum_.map(e => e.length);\n const requiredLength = Math.min(...lengths);\n const optionalLength = Math.max(...lengths) - requiredLength;\n eopts.mask = '*'.repeat(requiredLength);\n if (optionalLength) eopts.mask += '[' + '*'.repeat(optionalLength) + ']';\n this.enum = enum_;\n }\n super._update(eopts);\n }\n _appendCharRaw(ch, flags) {\n if (flags === void 0) {\n flags = {};\n }\n const matchFrom = Math.min(this.nearestInputPos(0, DIRECTION.FORCE_RIGHT), this.value.length);\n const matches = this.enum.filter(e => this.matchValue(e, this.unmaskedValue + ch, matchFrom));\n if (matches.length) {\n if (matches.length === 1) {\n this._forEachBlocksInRange(0, this.value.length, (b, bi) => {\n const mch = matches[0][bi];\n if (bi >= this.value.length || mch === b.value) return;\n b.reset();\n b._appendChar(mch, flags);\n });\n }\n const d = super._appendCharRaw(matches[0][this.value.length], flags);\n if (matches.length === 1) {\n matches[0].slice(this.unmaskedValue.length).split('').forEach(mch => d.aggregate(super._appendCharRaw(mch)));\n }\n return d;\n }\n return new ChangeDetails({\n skip: !this.isComplete\n });\n }\n extractTail(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n // just drop tail\n return new ContinuousTailDetails('', fromPos);\n }\n remove(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n if (fromPos === toPos) return new ChangeDetails();\n const matchFrom = Math.min(super.nearestInputPos(0, DIRECTION.FORCE_RIGHT), this.value.length);\n let pos;\n for (pos = fromPos; pos >= 0; --pos) {\n const matches = this.enum.filter(e => this.matchValue(e, this.value.slice(matchFrom, pos), matchFrom));\n if (matches.length > 1) break;\n }\n const details = super.remove(pos, toPos);\n details.tailShift += pos - fromPos;\n return details;\n }\n get isComplete() {\n return this.enum.indexOf(this.value) >= 0;\n }\n}\n/** Match enum value */\nMaskedEnum.DEFAULTS = {\n ...MaskedPattern.DEFAULTS,\n matchValue: (estr, istr, matchFrom) => estr.indexOf(istr, matchFrom) === matchFrom\n};\nIMask.MaskedEnum = MaskedEnum;\n\nexport { MaskedEnum as default };\n","import Masked from './base.js';\nimport IMask from '../core/holder.js';\nimport '../core/change-details.js';\nimport '../core/continuous-tail-details.js';\nimport '../core/utils.js';\n\n/** Masking by custom Function */\nclass MaskedFunction extends Masked {\n /** */\n\n /** Enable characters overwriting */\n\n /** */\n\n /** */\n\n /** */\n\n updateOptions(opts) {\n super.updateOptions(opts);\n }\n _update(opts) {\n super._update({\n ...opts,\n validate: opts.mask\n });\n }\n}\nIMask.MaskedFunction = MaskedFunction;\n\nexport { MaskedFunction as default };\n","import { escapeRegExp, DIRECTION } from '../core/utils.js';\nimport ChangeDetails from '../core/change-details.js';\nimport Masked from './base.js';\nimport IMask from '../core/holder.js';\nimport '../core/continuous-tail-details.js';\n\nvar _MaskedNumber;\n/** Number mask */\nclass MaskedNumber extends Masked {\n /** Single char */\n\n /** Single char */\n\n /** Array of single chars */\n\n /** */\n\n /** */\n\n /** Digits after point */\n\n /** Flag to remove leading and trailing zeros in the end of editing */\n\n /** Flag to pad trailing zeros after point in the end of editing */\n\n /** Enable characters overwriting */\n\n /** */\n\n /** */\n\n /** */\n\n /** Format typed value to string */\n\n /** Parse string to get typed value */\n\n constructor(opts) {\n super({\n ...MaskedNumber.DEFAULTS,\n ...opts\n });\n }\n updateOptions(opts) {\n super.updateOptions(opts);\n }\n _update(opts) {\n super._update(opts);\n this._updateRegExps();\n }\n _updateRegExps() {\n const start = '^' + (this.allowNegative ? '[+|\\\\-]?' : '');\n const mid = '\\\\d*';\n const end = (this.scale ? \"(\" + escapeRegExp(this.radix) + \"\\\\d{0,\" + this.scale + \"})?\" : '') + '$';\n this._numberRegExp = new RegExp(start + mid + end);\n this._mapToRadixRegExp = new RegExp(\"[\" + this.mapToRadix.map(escapeRegExp).join('') + \"]\", 'g');\n this._thousandsSeparatorRegExp = new RegExp(escapeRegExp(this.thousandsSeparator), 'g');\n }\n _removeThousandsSeparators(value) {\n return value.replace(this._thousandsSeparatorRegExp, '');\n }\n _insertThousandsSeparators(value) {\n // https://stackoverflow.com/questions/2901102/how-to-print-a-number-with-commas-as-thousands-separators-in-javascript\n const parts = value.split(this.radix);\n parts[0] = parts[0].replace(/\\B(?=(\\d{3})+(?!\\d))/g, this.thousandsSeparator);\n return parts.join(this.radix);\n }\n doPrepareChar(ch, flags) {\n if (flags === void 0) {\n flags = {};\n }\n const [prepCh, details] = super.doPrepareChar(this._removeThousandsSeparators(this.scale && this.mapToRadix.length && (\n /*\n radix should be mapped when\n 1) input is done from keyboard = flags.input && flags.raw\n 2) unmasked value is set = !flags.input && !flags.raw\n and should not be mapped when\n 1) value is set = flags.input && !flags.raw\n 2) raw value is set = !flags.input && flags.raw\n */\n flags.input && flags.raw || !flags.input && !flags.raw) ? ch.replace(this._mapToRadixRegExp, this.radix) : ch), flags);\n if (ch && !prepCh) details.skip = true;\n if (prepCh && !this.allowPositive && !this.value && prepCh !== '-') details.aggregate(this._appendChar('-'));\n return [prepCh, details];\n }\n _separatorsCount(to, extendOnSeparators) {\n if (extendOnSeparators === void 0) {\n extendOnSeparators = false;\n }\n let count = 0;\n for (let pos = 0; pos < to; ++pos) {\n if (this._value.indexOf(this.thousandsSeparator, pos) === pos) {\n ++count;\n if (extendOnSeparators) to += this.thousandsSeparator.length;\n }\n }\n return count;\n }\n _separatorsCountFromSlice(slice) {\n if (slice === void 0) {\n slice = this._value;\n }\n return this._separatorsCount(this._removeThousandsSeparators(slice).length, true);\n }\n extractInput(fromPos, toPos, flags) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n [fromPos, toPos] = this._adjustRangeWithSeparators(fromPos, toPos);\n return this._removeThousandsSeparators(super.extractInput(fromPos, toPos, flags));\n }\n _appendCharRaw(ch, flags) {\n if (flags === void 0) {\n flags = {};\n }\n const prevBeforeTailValue = flags.tail && flags._beforeTailState ? flags._beforeTailState._value : this._value;\n const prevBeforeTailSeparatorsCount = this._separatorsCountFromSlice(prevBeforeTailValue);\n this._value = this._removeThousandsSeparators(this.value);\n const oldValue = this._value;\n this._value += ch;\n const num = this.number;\n let accepted = !isNaN(num);\n let skip = false;\n if (accepted) {\n let fixedNum;\n if (this.min != null && this.min < 0 && this.number < this.min) fixedNum = this.min;\n if (this.max != null && this.max > 0 && this.number > this.max) fixedNum = this.max;\n if (fixedNum != null) {\n if (this.autofix) {\n this._value = this.format(fixedNum, this).replace(MaskedNumber.UNMASKED_RADIX, this.radix);\n skip || (skip = oldValue === this._value && !flags.tail); // if not changed on tail it's still ok to proceed\n } else {\n accepted = false;\n }\n }\n accepted && (accepted = Boolean(this._value.match(this._numberRegExp)));\n }\n let appendDetails;\n if (!accepted) {\n this._value = oldValue;\n appendDetails = new ChangeDetails();\n } else {\n appendDetails = new ChangeDetails({\n inserted: this._value.slice(oldValue.length),\n rawInserted: skip ? '' : ch,\n skip\n });\n }\n this._value = this._insertThousandsSeparators(this._value);\n const beforeTailValue = flags.tail && flags._beforeTailState ? flags._beforeTailState._value : this._value;\n const beforeTailSeparatorsCount = this._separatorsCountFromSlice(beforeTailValue);\n appendDetails.tailShift += (beforeTailSeparatorsCount - prevBeforeTailSeparatorsCount) * this.thousandsSeparator.length;\n return appendDetails;\n }\n _findSeparatorAround(pos) {\n if (this.thousandsSeparator) {\n const searchFrom = pos - this.thousandsSeparator.length + 1;\n const separatorPos = this.value.indexOf(this.thousandsSeparator, searchFrom);\n if (separatorPos <= pos) return separatorPos;\n }\n return -1;\n }\n _adjustRangeWithSeparators(from, to) {\n const separatorAroundFromPos = this._findSeparatorAround(from);\n if (separatorAroundFromPos >= 0) from = separatorAroundFromPos;\n const separatorAroundToPos = this._findSeparatorAround(to);\n if (separatorAroundToPos >= 0) to = separatorAroundToPos + this.thousandsSeparator.length;\n return [from, to];\n }\n remove(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n [fromPos, toPos] = this._adjustRangeWithSeparators(fromPos, toPos);\n const valueBeforePos = this.value.slice(0, fromPos);\n const valueAfterPos = this.value.slice(toPos);\n const prevBeforeTailSeparatorsCount = this._separatorsCount(valueBeforePos.length);\n this._value = this._insertThousandsSeparators(this._removeThousandsSeparators(valueBeforePos + valueAfterPos));\n const beforeTailSeparatorsCount = this._separatorsCountFromSlice(valueBeforePos);\n return new ChangeDetails({\n tailShift: (beforeTailSeparatorsCount - prevBeforeTailSeparatorsCount) * this.thousandsSeparator.length\n });\n }\n nearestInputPos(cursorPos, direction) {\n if (!this.thousandsSeparator) return cursorPos;\n switch (direction) {\n case DIRECTION.NONE:\n case DIRECTION.LEFT:\n case DIRECTION.FORCE_LEFT:\n {\n const separatorAtLeftPos = this._findSeparatorAround(cursorPos - 1);\n if (separatorAtLeftPos >= 0) {\n const separatorAtLeftEndPos = separatorAtLeftPos + this.thousandsSeparator.length;\n if (cursorPos < separatorAtLeftEndPos || this.value.length <= separatorAtLeftEndPos || direction === DIRECTION.FORCE_LEFT) {\n return separatorAtLeftPos;\n }\n }\n break;\n }\n case DIRECTION.RIGHT:\n case DIRECTION.FORCE_RIGHT:\n {\n const separatorAtRightPos = this._findSeparatorAround(cursorPos);\n if (separatorAtRightPos >= 0) {\n return separatorAtRightPos + this.thousandsSeparator.length;\n }\n }\n }\n return cursorPos;\n }\n doCommit() {\n if (this.value) {\n const number = this.number;\n let validnum = number;\n\n // check bounds\n if (this.min != null) validnum = Math.max(validnum, this.min);\n if (this.max != null) validnum = Math.min(validnum, this.max);\n if (validnum !== number) this.unmaskedValue = this.format(validnum, this);\n let formatted = this.value;\n if (this.normalizeZeros) formatted = this._normalizeZeros(formatted);\n if (this.padFractionalZeros && this.scale > 0) formatted = this._padFractionalZeros(formatted);\n this._value = formatted;\n }\n super.doCommit();\n }\n _normalizeZeros(value) {\n const parts = this._removeThousandsSeparators(value).split(this.radix);\n\n // remove leading zeros\n parts[0] = parts[0].replace(/^(\\D*)(0*)(\\d*)/, (match, sign, zeros, num) => sign + num);\n // add leading zero\n if (value.length && !/\\d$/.test(parts[0])) parts[0] = parts[0] + '0';\n if (parts.length > 1) {\n parts[1] = parts[1].replace(/0*$/, ''); // remove trailing zeros\n if (!parts[1].length) parts.length = 1; // remove fractional\n }\n return this._insertThousandsSeparators(parts.join(this.radix));\n }\n _padFractionalZeros(value) {\n if (!value) return value;\n const parts = value.split(this.radix);\n if (parts.length < 2) parts.push('');\n parts[1] = parts[1].padEnd(this.scale, '0');\n return parts.join(this.radix);\n }\n doSkipInvalid(ch, flags, checkTail) {\n if (flags === void 0) {\n flags = {};\n }\n const dropFractional = this.scale === 0 && ch !== this.thousandsSeparator && (ch === this.radix || ch === MaskedNumber.UNMASKED_RADIX || this.mapToRadix.includes(ch));\n return super.doSkipInvalid(ch, flags, checkTail) && !dropFractional;\n }\n get unmaskedValue() {\n return this._removeThousandsSeparators(this._normalizeZeros(this.value)).replace(this.radix, MaskedNumber.UNMASKED_RADIX);\n }\n set unmaskedValue(unmaskedValue) {\n super.unmaskedValue = unmaskedValue;\n }\n get typedValue() {\n return this.parse(this.unmaskedValue, this);\n }\n set typedValue(n) {\n this.rawInputValue = this.format(n, this).replace(MaskedNumber.UNMASKED_RADIX, this.radix);\n }\n\n /** Parsed Number */\n get number() {\n return this.typedValue;\n }\n set number(number) {\n this.typedValue = number;\n }\n get allowNegative() {\n return this.min != null && this.min < 0 || this.max != null && this.max < 0;\n }\n get allowPositive() {\n return this.min != null && this.min > 0 || this.max != null && this.max > 0;\n }\n typedValueEquals(value) {\n // handle 0 -> '' case (typed = 0 even if value = '')\n // for details see https://github.com/uNmAnNeR/imaskjs/issues/134\n return (super.typedValueEquals(value) || MaskedNumber.EMPTY_VALUES.includes(value) && MaskedNumber.EMPTY_VALUES.includes(this.typedValue)) && !(value === 0 && this.value === '');\n }\n}\n_MaskedNumber = MaskedNumber;\nMaskedNumber.UNMASKED_RADIX = '.';\nMaskedNumber.EMPTY_VALUES = [...Masked.EMPTY_VALUES, 0];\nMaskedNumber.DEFAULTS = {\n ...Masked.DEFAULTS,\n mask: Number,\n radix: ',',\n thousandsSeparator: '',\n mapToRadix: [_MaskedNumber.UNMASKED_RADIX],\n min: Number.MIN_SAFE_INTEGER,\n max: Number.MAX_SAFE_INTEGER,\n scale: 2,\n normalizeZeros: true,\n padFractionalZeros: false,\n parse: Number,\n format: n => n.toLocaleString('en-US', {\n useGrouping: false,\n maximumFractionDigits: 20\n })\n};\nIMask.MaskedNumber = MaskedNumber;\n\nexport { MaskedNumber as default };\n","import createMask from './factory.js';\nimport IMask from '../core/holder.js';\nimport '../core/utils.js';\n\n/** Mask pipe source and destination types */\nconst PIPE_TYPE = {\n MASKED: 'value',\n UNMASKED: 'unmaskedValue',\n TYPED: 'typedValue'\n};\n/** Creates new pipe function depending on mask type, source and destination options */\nfunction createPipe(arg, from, to) {\n if (from === void 0) {\n from = PIPE_TYPE.MASKED;\n }\n if (to === void 0) {\n to = PIPE_TYPE.MASKED;\n }\n const masked = createMask(arg);\n return value => masked.runIsolated(m => {\n m[from] = value;\n return m[to];\n });\n}\n\n/** Pipes value through mask depending on mask type, source and destination options */\nfunction pipe(value, mask, from, to) {\n return createPipe(mask, from, to)(value);\n}\nIMask.PIPE_TYPE = PIPE_TYPE;\nIMask.createPipe = createPipe;\nIMask.pipe = pipe;\n\nexport { PIPE_TYPE, createPipe, pipe };\n","import ChangeDetails from '../core/change-details.js';\nimport IMask from '../core/holder.js';\nimport createMask, { normalizeOpts } from './factory.js';\nimport MaskedPattern from './pattern.js';\nimport '../core/utils.js';\nimport './base.js';\nimport '../core/continuous-tail-details.js';\nimport './pattern/chunk-tail-details.js';\nimport './pattern/cursor.js';\nimport './pattern/fixed-definition.js';\nimport './pattern/input-definition.js';\nimport './regexp.js';\n\n/** Pattern mask */\nclass RepeatBlock extends MaskedPattern {\n get repeatFrom() {\n var _ref;\n return (_ref = Array.isArray(this.repeat) ? this.repeat[0] : this.repeat === Infinity ? 0 : this.repeat) != null ? _ref : 0;\n }\n get repeatTo() {\n var _ref2;\n return (_ref2 = Array.isArray(this.repeat) ? this.repeat[1] : this.repeat) != null ? _ref2 : Infinity;\n }\n constructor(opts) {\n super(opts);\n }\n updateOptions(opts) {\n super.updateOptions(opts);\n }\n _update(opts) {\n var _ref3, _ref4, _this$_blocks;\n const {\n repeat,\n ...blockOpts\n } = normalizeOpts(opts); // TODO type\n this._blockOpts = Object.assign({}, this._blockOpts, blockOpts);\n const block = createMask(this._blockOpts);\n this.repeat = (_ref3 = (_ref4 = repeat != null ? repeat : block.repeat) != null ? _ref4 : this.repeat) != null ? _ref3 : Infinity; // TODO type\n\n super._update({\n mask: 'm'.repeat(Math.max(this.repeatTo === Infinity && ((_this$_blocks = this._blocks) == null ? void 0 : _this$_blocks.length) || 0, this.repeatFrom)),\n blocks: {\n m: block\n },\n eager: block.eager,\n overwrite: block.overwrite,\n skipInvalid: block.skipInvalid,\n lazy: block.lazy,\n placeholderChar: block.placeholderChar,\n displayChar: block.displayChar\n });\n }\n _allocateBlock(bi) {\n if (bi < this._blocks.length) return this._blocks[bi];\n if (this.repeatTo === Infinity || this._blocks.length < this.repeatTo) {\n this._blocks.push(createMask(this._blockOpts));\n this.mask += 'm';\n return this._blocks[this._blocks.length - 1];\n }\n }\n _appendCharRaw(ch, flags) {\n if (flags === void 0) {\n flags = {};\n }\n const details = new ChangeDetails();\n for (let bi = (_this$_mapPosToBlock$ = (_this$_mapPosToBlock = this._mapPosToBlock(this.displayValue.length)) == null ? void 0 : _this$_mapPosToBlock.index) != null ? _this$_mapPosToBlock$ : Math.max(this._blocks.length - 1, 0), block, allocated;\n // try to get a block or\n // try to allocate a new block if not allocated already\n block = (_this$_blocks$bi = this._blocks[bi]) != null ? _this$_blocks$bi : allocated = !allocated && this._allocateBlock(bi); ++bi) {\n var _this$_mapPosToBlock$, _this$_mapPosToBlock, _this$_blocks$bi, _flags$_beforeTailSta;\n const blockDetails = block._appendChar(ch, {\n ...flags,\n _beforeTailState: (_flags$_beforeTailSta = flags._beforeTailState) == null || (_flags$_beforeTailSta = _flags$_beforeTailSta._blocks) == null ? void 0 : _flags$_beforeTailSta[bi]\n });\n if (blockDetails.skip && allocated) {\n // remove the last allocated block and break\n this._blocks.pop();\n this.mask = this.mask.slice(1);\n break;\n }\n details.aggregate(blockDetails);\n if (blockDetails.consumed) break; // go next char\n }\n return details;\n }\n _trimEmptyTail(fromPos, toPos) {\n var _this$_mapPosToBlock2, _this$_mapPosToBlock3;\n if (fromPos === void 0) {\n fromPos = 0;\n }\n const firstBlockIndex = Math.max(((_this$_mapPosToBlock2 = this._mapPosToBlock(fromPos)) == null ? void 0 : _this$_mapPosToBlock2.index) || 0, this.repeatFrom, 0);\n let lastBlockIndex;\n if (toPos != null) lastBlockIndex = (_this$_mapPosToBlock3 = this._mapPosToBlock(toPos)) == null ? void 0 : _this$_mapPosToBlock3.index;\n if (lastBlockIndex == null) lastBlockIndex = this._blocks.length - 1;\n let removeCount = 0;\n for (let blockIndex = lastBlockIndex; firstBlockIndex <= blockIndex; --blockIndex, ++removeCount) {\n if (this._blocks[blockIndex].unmaskedValue) break;\n }\n if (removeCount) {\n this._blocks.splice(lastBlockIndex - removeCount + 1, removeCount);\n this.mask = this.mask.slice(removeCount);\n }\n }\n reset() {\n super.reset();\n this._trimEmptyTail();\n }\n remove(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos === void 0) {\n toPos = this.displayValue.length;\n }\n const removeDetails = super.remove(fromPos, toPos);\n this._trimEmptyTail(fromPos, toPos);\n return removeDetails;\n }\n totalInputPositions(fromPos, toPos) {\n if (fromPos === void 0) {\n fromPos = 0;\n }\n if (toPos == null && this.repeatTo === Infinity) return Infinity;\n return super.totalInputPositions(fromPos, toPos);\n }\n get state() {\n return super.state;\n }\n set state(state) {\n this._blocks.length = state._blocks.length;\n this.mask = this.mask.slice(0, this._blocks.length);\n super.state = state;\n }\n}\nIMask.RepeatBlock = RepeatBlock;\n\nexport { RepeatBlock as default };\n","export { default as InputMask } from './controls/input.js';\nimport IMask from './core/holder.js';\nexport { default as HTMLContenteditableMaskElement } from './controls/html-contenteditable-mask-element.js';\nexport { default as HTMLInputMaskElement } from './controls/html-input-mask-element.js';\nexport { default as HTMLMaskElement } from './controls/html-mask-element.js';\nexport { default as MaskElement } from './controls/mask-element.js';\nexport { default as ChangeDetails } from './core/change-details.js';\nexport { DIRECTION, forceDirection } from './core/utils.js';\nexport { default as Masked } from './masked/base.js';\nexport { default as MaskedDate } from './masked/date.js';\nexport { default as MaskedDynamic } from './masked/dynamic.js';\nexport { default as MaskedEnum } from './masked/enum.js';\nexport { default as createMask, normalizeOpts } from './masked/factory.js';\nexport { default as MaskedFunction } from './masked/function.js';\nexport { default as MaskedNumber } from './masked/number.js';\nexport { default as MaskedPattern } from './masked/pattern.js';\nexport { default as ChunksTailDetails } from './masked/pattern/chunk-tail-details.js';\nexport { default as PatternFixedDefinition } from './masked/pattern/fixed-definition.js';\nexport { default as PatternInputDefinition } from './masked/pattern/input-definition.js';\nexport { PIPE_TYPE, createPipe, pipe } from './masked/pipe.js';\nexport { default as MaskedRange } from './masked/range.js';\nexport { default as MaskedRegExp } from './masked/regexp.js';\nexport { default as RepeatBlock } from './masked/repeat.js';\nimport './core/action-details.js';\nimport './controls/input-history.js';\nimport './core/continuous-tail-details.js';\nimport './masked/pattern/cursor.js';\n\ntry {\n globalThis.IMask = IMask;\n} catch {}\n\nexport { IMask as default };\n","import React from 'react';\nimport PropTypes from 'prop-types';\nimport IMask from 'imask/esm/imask';\n\nconst MASK_PROPS = {\n // common\n mask: PropTypes.oneOfType([PropTypes.array, PropTypes.func, PropTypes.string, PropTypes.instanceOf(RegExp), PropTypes.oneOf([Date, Number, IMask.Masked]), PropTypes.instanceOf(IMask.Masked)]),\n value: PropTypes.any,\n unmask: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['typed'])]),\n prepare: PropTypes.func,\n prepareChar: PropTypes.func,\n validate: PropTypes.func,\n commit: PropTypes.func,\n overwrite: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['shift'])]),\n eager: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['append', 'remove'])]),\n skipInvalid: PropTypes.bool,\n // events\n onAccept: PropTypes.func,\n onComplete: PropTypes.func,\n // pattern\n placeholderChar: PropTypes.string,\n displayChar: PropTypes.string,\n lazy: PropTypes.bool,\n definitions: PropTypes.object,\n blocks: PropTypes.object,\n // enum\n enum: PropTypes.arrayOf(PropTypes.string),\n // range\n maxLength: PropTypes.number,\n from: PropTypes.number,\n to: PropTypes.number,\n // date\n pattern: PropTypes.string,\n format: PropTypes.func,\n parse: PropTypes.func,\n autofix: PropTypes.oneOfType([PropTypes.bool, PropTypes.oneOf(['pad'])]),\n // number\n radix: PropTypes.string,\n thousandsSeparator: PropTypes.string,\n mapToRadix: PropTypes.arrayOf(PropTypes.string),\n scale: PropTypes.number,\n normalizeZeros: PropTypes.bool,\n padFractionalZeros: PropTypes.bool,\n min: PropTypes.oneOfType([PropTypes.number, PropTypes.instanceOf(Date)]),\n max: PropTypes.oneOfType([PropTypes.number, PropTypes.instanceOf(Date)]),\n // dynamic\n dispatch: PropTypes.func,\n // ref\n inputRef: PropTypes.oneOfType([PropTypes.func, PropTypes.shape({\n current: PropTypes.object\n })])\n};\nconst MASK_PROPS_NAMES = Object.keys(MASK_PROPS).filter(p => p !== 'value');\nconst NON_MASK_OPTIONS_NAMES = ['value', 'unmask', 'onAccept', 'onComplete', 'inputRef'];\nconst MASK_OPTIONS_NAMES = MASK_PROPS_NAMES.filter(pName => NON_MASK_OPTIONS_NAMES.indexOf(pName) < 0);\nfunction IMaskMixin(ComposedComponent) {\n var _Class;\n const MaskedComponent = (_Class = class MaskedComponent extends React.Component {\n constructor(props) {\n super(props);\n this._inputRef = this._inputRef.bind(this);\n }\n componentDidMount() {\n if (!this.props.mask) return;\n this.initMask();\n }\n componentDidUpdate() {\n const props = this.props;\n const maskOptions = this._extractMaskOptionsFromProps(props);\n if (maskOptions.mask) {\n if (this.maskRef) {\n this.maskRef.updateOptions(maskOptions); // TODO fix\n if ('value' in props && props.value !== undefined) this.maskValue = props.value;\n } else {\n this.initMask(maskOptions);\n }\n } else {\n this.destroyMask();\n if ('value' in props && props.value !== undefined) {\n var _this$element;\n if ((_this$element = this.element) != null && _this$element.isContentEditable && this.element.tagName !== 'INPUT' && this.element.tagName !== 'TEXTAREA') this.element.textContent = props.value;else this.element.value = props.value;\n }\n }\n }\n componentWillUnmount() {\n this.destroyMask();\n }\n _inputRef(el) {\n this.element = el;\n if (this.props.inputRef) {\n if (Object.prototype.hasOwnProperty.call(this.props.inputRef, 'current')) this.props.inputRef.current = el;else this.props.inputRef(el);\n }\n }\n initMask(maskOptions) {\n if (maskOptions === void 0) {\n maskOptions = this._extractMaskOptionsFromProps(this.props);\n }\n this.maskRef = IMask(this.element, maskOptions).on('accept', this._onAccept.bind(this)).on('complete', this._onComplete.bind(this));\n if ('value' in this.props && this.props.value !== undefined) this.maskValue = this.props.value;\n }\n destroyMask() {\n if (this.maskRef) {\n this.maskRef.destroy();\n delete this.maskRef;\n }\n }\n _extractMaskOptionsFromProps(props) {\n const {\n ...cloneProps\n } = props;\n\n // keep only mask options\n Object.keys(cloneProps).filter(prop => MASK_OPTIONS_NAMES.indexOf(prop) < 0).forEach(nonMaskProp => {\n delete cloneProps[nonMaskProp];\n });\n return cloneProps;\n }\n _extractNonMaskProps(props) {\n const {\n ...cloneProps\n } = props;\n MASK_PROPS_NAMES.forEach(maskProp => {\n if (maskProp !== 'maxLength') delete cloneProps[maskProp];\n });\n if (!('defaultValue' in cloneProps)) cloneProps.defaultValue = props.mask ? '' : cloneProps.value;\n delete cloneProps.value;\n return cloneProps;\n }\n get maskValue() {\n if (!this.maskRef) return '';\n if (this.props.unmask === 'typed') return this.maskRef.typedValue;\n if (this.props.unmask) return this.maskRef.unmaskedValue;\n return this.maskRef.value;\n }\n set maskValue(value) {\n if (!this.maskRef) return;\n value = value == null && this.props.unmask !== 'typed' ? '' : value;\n if (this.props.unmask === 'typed') this.maskRef.typedValue = value;else if (this.props.unmask) this.maskRef.unmaskedValue = value;else this.maskRef.value = value;\n }\n _onAccept(e) {\n if (this.props.onAccept && this.maskRef) this.props.onAccept(this.maskValue, this.maskRef, e);\n }\n _onComplete(e) {\n if (this.props.onComplete && this.maskRef) this.props.onComplete(this.maskValue, this.maskRef, e);\n }\n render() {\n return React.createElement(ComposedComponent, {\n ...this._extractNonMaskProps(this.props),\n inputRef: this._inputRef\n });\n }\n }, _Class.displayName = void 0, _Class.propTypes = void 0, _Class);\n const nestedComponentName = ComposedComponent.displayName || ComposedComponent.name || 'Component';\n MaskedComponent.displayName = \"IMask(\" + nestedComponentName + \")\";\n MaskedComponent.propTypes = MASK_PROPS;\n return React.forwardRef((props, ref) => React.createElement(MaskedComponent, {\n ...props,\n ref\n }));\n}\n\nexport { IMaskMixin as default };\n","import React from 'react';\nimport IMaskMixin from './mixin.js';\nimport 'prop-types';\nimport 'imask/esm/imask';\n\nconst IMaskInputClass = IMaskMixin(_ref => {\n let {\n inputRef,\n ...props\n } = _ref;\n return React.createElement('input', {\n ...props,\n ref: inputRef\n });\n});\nconst IMaskInputFn = (props, ref) => React.createElement(IMaskInputClass, {\n ...props,\n ref\n}) // TODO fix no idea\n;\nconst IMaskInput = React.forwardRef(IMaskInputFn);\n\nexport { IMaskInput as default };\n","import { forwardRef, useState } from \"react\";\nimport { IMaskInput } from \"react-imask\";\n\nexport const TextMaskCustom = forwardRef(\n function TextMaskCustom(props, ref) {\n const { maskValue, value, onChange, onBlur } = props;\n\n const [focus, setFocus] = useState(false);\n\n const TextMaskStyle: React.CSSProperties = {\n height: 55,\n fontFamily: \"Ubuntu\",\n width: \"100%\",\n paddingLeft: \"15px\",\n boxShadow: \"none\",\n outlineStyle: \"none\",\n border: \"none\",\n font: \"inherit\",\n };\n\n return (\n {\n if (onChange) {\n const e = {\n target: {\n value: val,\n name: props?.name,\n },\n };\n if (value != val) {\n onChange(e as any);\n }\n }\n }}\n onBlur={(e: any) => {\n setFocus(false);\n if (onBlur) onBlur(e);\n }}\n onFocus={() => setFocus(true)}\n />\n );\n }\n);\n","import dayjs from \"dayjs\";\n\nexport function getBirthDateFromPesel(pesel: string): string | undefined {\n if (!/^\\d{11}$/.test(pesel)) {\n return undefined;\n }\n\n const yearPart = parseInt(pesel.substring(0, 2), 10);\n const monthPart = parseInt(pesel.substring(2, 4), 10);\n const dayPart = parseInt(pesel.substring(4, 6), 10);\n\n if (dayPart < 1 || dayPart > 31) {\n return undefined;\n }\n\n let century = 1900;\n let month = monthPart;\n if (month >= 1 && month <= 12) {\n century = 1900;\n } else if (month >= 21 && month <= 32) {\n century = 2000;\n month -= 20;\n } else if (month >= 41 && month <= 52) {\n century = 2100;\n month -= 40;\n } else if (month >= 61 && month <= 72) {\n century = 2200;\n month -= 60;\n } else if (month >= 81 && month <= 92) {\n century = 1800;\n month -= 80;\n } else {\n return undefined;\n }\n\n const fullYear = century + yearPart;\n\n const birthDate = new Date(fullYear, month - 1, dayPart);\n\n if (\n birthDate.getFullYear() !== fullYear ||\n birthDate.getMonth() !== month - 1 ||\n birthDate.getDate() !== dayPart\n ) {\n return undefined;\n }\n\n return dayjs(birthDate).format(\"YYYY-MM-DD\");\n}\n","import React, { useState, useEffect, useContext, forwardRef } from \"react\";\nimport { Controller, useForm } from \"react-hook-form\";\nimport { sendLoadingPostRequest } from \"../../request/request\";\nimport { Dictionary } from \"../../types/Dictionary\";\nimport {\n TextField,\n ThemeProvider,\n Autocomplete,\n createTheme,\n styled,\n} from \"@mui/material\";\n\nimport { DictionaryCombo } from \"../../types/DictionaryCombo\";\nimport { IStep2FormInput } from \"../../types/IStep2FormInput\";\nimport { IIdentificationModel } from \"../../types/IIdentificationModel\";\nimport FormContext from \"../../contexts/FormContext\";\nimport { Calendar } from \"../Calendar/Calendar\";\nimport {\n onlyFirstCapitalize,\n toTitleCase,\n capitalize,\n} from \"../../helpers/string\";\nimport { LoadingPanel } from \"../LoadingPanel/LoadingPanel\";\nimport dayjs from \"dayjs\";\nimport isSameOrAfter from \"dayjs/plugin/isSameOrAfter\";\nimport localizedFormat from \"dayjs/plugin/localizedFormat\";\nimport customParseFormat from \"dayjs/plugin/customParseFormat\";\nimport \"dayjs/locale/pl\";\nimport { TextMaskCustom } from \"../MaskComponent/TextMaskCustom\";\nimport { getBirthDateFromPesel } from \"../../helpers/GetFirthDateFromPesel\";\n\ndayjs.extend(isSameOrAfter);\ndayjs.extend(localizedFormat);\ndayjs.extend(customParseFormat);\ndayjs.locale(\"pl\");\n\ndeclare type IdentificationVariant = \"identification\" | \"secondIdentification\";\n\ninterface IStep2Form {\n setStep: React.Dispatch>;\n}\n\nconst StyledTextField = styled(TextField)(({ theme }) => ({\n width: \"100%\",\n \"& .MuiOutlinedInput-root .MuiAutocomplete-input:first-child\": {\n height: 40,\n },\n\n \"& .MuiInputLabel-root.MuiInputLabel-shrink\": {\n transform: \"translate(14px, -6px) scale(0.75) !important\",\n },\n \"& .MuiInputLabel-root\": {\n transform: \"translate(14px, 20px) scale(1)\",\n },\n}));\n\nconst defaultMaterialTheme = createTheme({\n palette: {\n primary: {\n main: \"#000000\",\n },\n },\n components: {\n MuiFormHelperText: {\n styleOverrides: {\n root: {\n display: \"none\",\n },\n },\n },\n },\n});\n\nconst genders: DictionaryCombo[] = [\n { id: 1, name: \"Kobieta\" },\n { id: 2, name: \"Mężczyzna\" },\n];\n\nconst Step2Form = ({ setStep }: IStep2Form) => {\n const context = useContext(FormContext);\n\n //const { height, width } = useWindowDimensions();\n\n const {\n register,\n handleSubmit,\n control,\n formState: { errors },\n reset,\n getValues,\n setValue,\n clearErrors,\n setError,\n trigger,\n } = useForm({\n defaultValues: context.step2,\n mode: \"onChange\",\n shouldFocusError: false,\n });\n const [names, setName] = useState([]);\n const [dictionary, setDictionary] = useState();\n const [loading, setLoading] = useState(false);\n const [disablePesel, setDisablePesel] = useState(false);\n const [disableExpirationDate, setDisableExpirationDate] = useState(false);\n const [showOtherPostalAddress, setShowOtherPostalAddress] = useState(false);\n const [showMatherFater, setShowMatherFather] = useState(false);\n const [checkOtherAddressPostalCode, setCheckOtherAddressPostalCode] =\n useState(false);\n const [checkResident, setCheckResident] = useState(false);\n const [disablePoland, setDisablePoland] = useState(false);\n const [poland, setPoland] = useState();\n const [fileName1, setFileName1] = useState();\n const [fileName2, setFileName2] = useState();\n const [fileName3, setFileName3] = useState();\n const [file1Error, setFile1Error] = useState();\n const [file2Error, setFile2Error] = useState();\n const [file3Error, setFile3Error] = useState();\n const [identityType, setIdentityType] = useState();\n\n const {\n pesel,\n withoutPesel,\n birthDate,\n gender,\n countryOfBirth,\n address,\n citizenship,\n profession,\n identification,\n otherPostalAddress,\n identificationPhotos,\n homeAddressPhoto,\n } = getValues();\n\n const file1Input = React.createRef();\n const file2Input = React.createRef();\n const file5Input = React.createRef();\n\n const inputReference1 = React.createRef();\n const inputReference2 = React.createRef();\n const inputReference3 = React.createRef();\n\n useEffect(() => {\n window.scrollTo(0, 0);\n dayjs.locale(\"pl\");\n getDictionary();\n\n if (context.step2) {\n setDisablePesel(context.step2.withoutPesel);\n setDisableExpirationDate(\n context.step2.identification.withoutExpirationDate\n );\n setShowOtherPostalAddress(context.step2.otherPostalAddress);\n if (context.step2.address && context.step2.address.country) {\n setShowMatherFather(\n context.step2.address?.country?.name?.toLocaleLowerCase() !== \"polska\"\n );\n }\n if (context.step2.postalAddress && context.step2.postalAddress.country) {\n setCheckOtherAddressPostalCode(\n context.step2.postalAddress?.country?.name?.toLocaleLowerCase() ===\n \"polska\"\n );\n }\n if (\n context.step2.identificationPhotos != null &&\n context.step2.identificationPhotos?.mainSide != null\n ) {\n setFileName1(context.step2.identificationPhotos?.mainSide[0]?.name);\n }\n if (\n context.step2.identificationPhotos != null &&\n context.step2.identificationPhotos?.backSide != null\n ) {\n setFileName2(context.step2.identificationPhotos?.backSide[0]?.name);\n }\n if (context.step2.homeAddressPhoto != null) {\n setFileName3(context.step2.homeAddressPhoto[0]?.name);\n }\n setIdentityType(context.step2?.identification?.type?.name ?? undefined);\n if (\n context.step2?.identification?.type?.name?.toLocaleLowerCase() ===\n \"paszport\"\n ) {\n clearErrors(\"identificationPhotos.backSide\");\n reset({\n ...getValues(),\n identificationPhotos: {\n backSide: undefined,\n mainSide: getValues()?.identificationPhotos?.mainSide,\n },\n });\n }\n }\n }, []);\n\n function getErrorList(obj: any) {\n const result: string[] = [];\n\n function parseObjectKeys(obj: any, prefix?: string) {\n for (var prop in obj) {\n var sub = obj[prop];\n if (typeof sub == \"object\") {\n if (Object.keys(sub).indexOf(\"message\") === -1) {\n parseObjectKeys(sub, prop);\n } else {\n result.push(`${prefix ? prefix + \".\" : \"\"}${prop}`);\n }\n }\n }\n }\n\n parseObjectKeys(obj);\n\n return result;\n }\n\n useEffect(() => {\n const errorsKeys = getErrorList(errors);\n if (errorsKeys != null) {\n for (let i = 0; i < names.length; i++) {\n const currName = names[i];\n if (errorsKeys.indexOf(currName) > -1) {\n const firstErrorElement = document.getElementsByName(currName)[0];\n firstErrorElement.scrollIntoView({\n behavior: `smooth`,\n block: \"center\",\n });\n break;\n }\n }\n }\n }, [names, errors]);\n\n const handleOnSubmit = (event: any) => {\n const form = Array.from(event?.target);\n const names = form\n .map((item: any) => item.name)\n .filter((name: string) => name !== \"\");\n setName(names);\n handleSubmit(onSubmit)(event);\n };\n\n const getDictionary = async () => {\n //reloadOptions();\n const { data: response, success } = await sendLoadingPostRequest<\n never,\n Dictionary\n >({\n loadingFunction: setLoading,\n endpoint: \"Dictionary/GetAll\",\n });\n if (success && response?.data) {\n const poland = response?.data.countries.filter(\n (item) => item?.name?.toLocaleLowerCase() === \"polska\"\n )[0];\n setPoland(poland);\n\n setDictionary(response?.data);\n }\n };\n\n const onSubmit = async (data: IStep2FormInput) => {\n const identity = dictionary?.identityDocumentTypes.find(\n (f) => f.name?.toLowerCase() === \"dowód osobisty\"\n );\n const showMatherFaterSection =\n data?.address?.country?.name?.toLocaleLowerCase() !== \"polska\" ||\n data.withoutPesel;\n const { data: confirmResponse, success } = await sendLoadingPostRequest<\n any,\n boolean\n >({\n loadingFunction: setLoading,\n endpoint: \"Agreement/Step2\",\n params: {\n ...data,\n identification: {\n ...data.identification,\n type: identity,\n },\n identificationPhotos: {\n mainSide: await getBase64(identificationPhotos.mainSide),\n backSide: await getBase64(identificationPhotos.backSide),\n },\n homeAddressPhoto: await getBase64(homeAddressPhoto),\n address: {\n ...data.address,\n fatherName: showMatherFaterSection ? data?.address?.fatherName : \"\",\n motherName: showMatherFaterSection ? data?.address?.motherName : \"\",\n },\n },\n });\n\n if (success) {\n if (context.setStep2) context.setStep2(data);\n setStep(7);\n }\n };\n\n const setCheckbox = () => {\n const { withoutPesel } = getValues();\n if (!withoutPesel) {\n clearErrors(\"pesel\");\n reset({\n ...getValues(),\n pesel: \"\",\n address: {\n ...getValues().address,\n country: undefined,\n },\n });\n setDisablePoland(true);\n setShowMatherFather(true);\n } else {\n setDisablePoland(false);\n reset({\n ...getValues(),\n address: {\n ...getValues().address,\n country: poland,\n },\n });\n setShowMatherFather(false);\n }\n setValue(\"withoutPesel\", !withoutPesel);\n setDisablePesel(!withoutPesel);\n };\n\n const setPostalAddressCheckbox = () => {\n const { otherPostalAddress } = getValues();\n setValue(\"otherPostalAddress\", !otherPostalAddress);\n if (otherPostalAddress) {\n clearErrors(\"postalAddress.country\");\n clearErrors(\"postalAddress.postCode\");\n clearErrors(\"postalAddress.city\");\n clearErrors(\"postalAddress.street\");\n clearErrors(\"postalAddress.house\");\n clearErrors(\"postalAddress.apartment\");\n reset({\n ...getValues(),\n postalAddress: undefined,\n });\n } else {\n reset({\n ...getValues(),\n postalAddress: {\n country: poland,\n },\n });\n setCheckOtherAddressPostalCode(true);\n }\n setShowOtherPostalAddress(!otherPostalAddress);\n };\n\n const handleExpirationDate = () => {\n const withoutExpirationDate = getValues(\n \"identification.withoutExpirationDate\"\n );\n if (!withoutExpirationDate) {\n clearErrors(\"identification.expirationDate\");\n setValue(\"identification.expirationDate\", undefined);\n }\n setValue(\"identification.withoutExpirationDate\", !withoutExpirationDate);\n setDisableExpirationDate(!withoutExpirationDate);\n };\n\n const addYearToExpirationDate = () => {\n const { identification } = getValues();\n const withoutExpirationDate = getValues(\n \"identification.withoutExpirationDate\"\n );\n if (\n identification.type?.name === \"Dowód osobisty\" &&\n identification.releaseDate &&\n !withoutExpirationDate\n ) {\n setValue(\n \"identification.expirationDate\",\n dayjs(identification.releaseDate).add(10, \"years\").format(\"YYYY-MM-DD\"),\n {\n shouldValidate: true,\n }\n );\n }\n };\n\n const getAddressCountries = () => {\n const countries = dictionary?.countries.reduce(polandFirst, []) ?? [];\n if (disablePoland) {\n return countries.filter(\n (item) => item?.name?.toLocaleLowerCase() !== \"polska\"\n );\n }\n return countries;\n };\n\n const IdentityTab = (\n identificationVariant: IdentificationVariant,\n identification: IIdentificationModel\n ) => {\n return (\n <>\n
\n
\n (\n {\n field.onChange(event.target.value);\n addYearToExpirationDate();\n }}\n onBlur={(event: any) => {\n if (event.target.value)\n field.onChange(capitalize(event.target.value));\n }}\n inputProps={{\n maxLength: 20,\n }}\n />\n )}\n name=\"identification.seriesAndNumber\"\n control={control}\n rules={{\n required: \"Seria i numer jest wymagana\",\n validate: (value) =>\n validateIdentityDocumentNumber(value, true, 3, 6),\n maxLength: {\n value: 20,\n message: \"Seria i numer są za długie\",\n },\n }}\n />\n {errors.identification?.seriesAndNumber &&\n errors.identification?.seriesAndNumber.type === \"validate\" && (\n \n \n Nieprawidłowy Numer dowodu\n \n )}\n {errors.identification?.seriesAndNumber &&\n errors.identification?.seriesAndNumber.type !== \"validate\" && (\n \n \n {errors.identification.seriesAndNumber.message}\n \n )}\n
\n
\n\n
\n
\n (\n {\n setValue(\n \"identification.releaseDate\",\n date ? dayjs(date).format(\"YYYY-MM-DD\") : undefined,\n {\n shouldValidate: true,\n }\n );\n addYearToExpirationDate();\n }}\n renderInput={(props: any) => (\n \n )}\n />\n )}\n name=\"identification.releaseDate\"\n control={control}\n rules={{\n required: \"Data wydania jest wymagana\",\n validate: {\n minDate: (value) => {\n return dayjs(value).isBefore(dayjs());\n },\n },\n }}\n />\n {errors.identification?.releaseDate &&\n errors.identification?.releaseDate.type === \"required\" && (\n \n \n {errors.identification.releaseDate.message}\n \n )}\n {errors.identification?.releaseDate &&\n errors.identification?.releaseDate.type !== \"required\" && (\n \n \n Podano błędną datę\n \n )}\n
\n
\n\n
\n
\n (\n {\n setValue(\n \"identification.expirationDate\",\n date ? dayjs(date).format(\"YYYY-MM-DD\") : undefined,\n {\n shouldValidate: true,\n }\n );\n }}\n renderInput={(props: any) => (\n \n )}\n />\n )}\n name=\"identification.expirationDate\"\n control={control}\n rules={{\n required: !disableExpirationDate\n ? \"Data ważności jest wymagana\"\n : undefined,\n validate: {\n minDate: (value) => {\n return dayjs(value).isSameOrAfter(dayjs());\n },\n },\n }}\n />\n {errors.identification?.expirationDate &&\n errors.identification?.expirationDate.type === \"required\" && (\n \n \n {errors.identification.expirationDate.message}\n \n )}\n {errors.identification?.expirationDate &&\n errors.identification?.expirationDate.type !== \"required\" && (\n \n \n Podano błędną datę\n \n )}\n
\n
\n\n
\n \n \n \n
\n
\n\n
\n
\n (\n <>\n {\n field.onChange(newValue);\n }}\n getOptionLabel={(option) => option.name}\n isOptionEqualToValue={(option, value) =>\n option.id === value.id\n }\n renderInput={(params) => (\n \n )}\n noOptionsText={\"Brak danych\"}\n />\n \n )}\n name=\"identification.issuingCountry\"\n control={control}\n rules={{\n required: \"Kraj wydania jest wymagany\",\n }}\n />\n {errors.identification?.issuingCountry && (\n \n \n Kraj wydania jest wymagany\n \n )}\n
\n
\n \n );\n };\n\n const AddressTab = () => {\n return (\n <>\n
\n
\n (\n <>\n {\n field.onChange(newValue);\n setShowMatherFather(\n newValue?.name?.toLocaleLowerCase() !== \"polska\"\n );\n if (newValue?.name?.toLocaleLowerCase() === \"polska\") {\n clearErrors(\"address.motherName\");\n clearErrors(\"address.fatherName\");\n setValue(\"address.motherName\", \"\");\n setValue(\"address.fatherName\", \"\");\n } else {\n clearErrors(\"address.postCode\");\n }\n checkIsResident();\n }}\n getOptionLabel={(option) => option.name}\n isOptionEqualToValue={(option, value) =>\n option?.id === value?.id\n }\n renderInput={(params) => (\n \n )}\n noOptionsText={\"Brak danych\"}\n />\n \n )}\n name=\"address.country\"\n control={control}\n rules={{\n required: \"Kraj zamieszkania jest wymagany\",\n }}\n />\n {errors.address?.country && (\n \n \n Kraj jest wymagany\n \n )}\n
\n
\n
\n
\n
\n (\n {\n field.onChange(event.target.value);\n }}\n onBlur={(event: any) => {\n if (event.target.value)\n field.onChange(onlyFirstCapitalize(event.target.value));\n }}\n error={errors.address?.fatherName != null}\n inputProps={{\n maxLength: 200,\n }}\n />\n )}\n name=\"address.fatherName\"\n control={control}\n rules={{\n required: showMatherFater\n ? \"Imię ojca jest wymagane\"\n : undefined,\n minLength: {\n value: 2,\n message: \"Imię ojca jest za krótkie\",\n },\n maxLength: {\n value: 200,\n message: \"Imię ojca jest za długie\",\n },\n }}\n />\n {errors.address?.fatherName && (\n \n \n {errors.address.fatherName.message}\n \n )}\n
\n
\n
\n
\n (\n {\n field.onChange(event.target.value);\n }}\n onBlur={(event: any) => {\n if (event.target.value)\n field.onChange(onlyFirstCapitalize(event.target.value));\n }}\n error={errors.address?.motherName != null}\n inputProps={{\n maxLength: 200,\n }}\n />\n )}\n name=\"address.motherName\"\n control={control}\n rules={{\n required: showMatherFater\n ? \"Imię matki jest wymagane\"\n : undefined,\n minLength: {\n value: 2,\n message: \"Imię matki jest za krótkie\",\n },\n maxLength: {\n value: 200,\n message: \"Imię matki jest za długie\",\n },\n }}\n />\n {errors.address?.motherName && (\n \n \n {errors.address.motherName.message}\n \n )}\n
\n
\n
\n\n
\n
\n \n !showMatherFater ? (\n \n ) : (\n {\n field.onChange(event.target.value);\n }}\n label=\"Kod pocztowy\"\n name=\"address.postCode\"\n variant=\"outlined\"\n error={errors.address?.postCode != null}\n inputProps={{\n maxLength: 9,\n }}\n />\n )\n }\n name=\"address.postCode\"\n control={control}\n rules={{\n required: \"Kod pocztowy jest wymagany\",\n maxLength: {\n value: 9,\n message: \"Kod pocztowy jest za długi\",\n },\n pattern: !showMatherFater\n ? {\n value: /\\b[0-9][0-9]-[0-9][0-9][0-9]\\b/,\n message: \"Nieprawidłowy kod pocztowy\",\n }\n : undefined,\n }}\n />\n {errors.address?.postCode && (\n \n \n {errors.address.postCode.message}\n \n )}\n
\n
\n\n
\n
\n (\n {\n field.onChange(event.target.value);\n }}\n onBlur={(event: any) => {\n if (event.target.value)\n field.onChange(toTitleCase(event.target.value));\n }}\n inputProps={{\n maxLength: 200,\n }}\n />\n )}\n name=\"address.city\"\n control={control}\n rules={{\n required: \"Miejscowość jest wymagana\",\n maxLength: {\n value: 200,\n message: \"Miejscowość jest za długa\",\n },\n }}\n />\n {errors.address?.city && (\n \n \n {errors.address.city.message}\n \n )}\n
\n
\n\n
\n
\n (\n {\n field.onChange(event.target.value);\n }}\n onBlur={(event: any) => {\n if (event.target.value)\n field.onChange(toTitleCase(event.target.value));\n }}\n error={errors.address?.street != null}\n inputProps={{\n maxLength: 200,\n }}\n />\n )}\n name=\"address.street\"\n control={control}\n rules={{\n maxLength: {\n value: 200,\n message: \"Ulica jest za długa\",\n },\n }}\n />\n {errors.address?.street && (\n \n \n {errors.address.street.message}\n \n )}\n
\n
\n\n
\n
\n (\n {\n field.onChange(event.target.value);\n }}\n error={errors.address?.house != null}\n inputProps={{\n maxLength: 10,\n }}\n />\n )}\n name=\"address.house\"\n control={control}\n rules={{\n required: \"Numer domu jest wymagany\",\n maxLength: {\n value: 10,\n message: \"Numer domu jest za długi\",\n },\n }}\n />\n {errors.address?.house && (\n \n \n {errors.address.house.message}\n \n )}\n
\n
\n\n
\n
\n (\n {\n field.onChange(event.target.value);\n }}\n inputProps={{\n maxLength: 10,\n }}\n />\n )}\n name=\"address.apartment\"\n control={control}\n rules={{\n maxLength: {\n value: 10,\n message: \"Numer mieszkania jest za długi\",\n },\n }}\n />\n {errors.address?.apartment && (\n \n \n {errors.address.apartment.message}\n \n )}\n
\n
\n \n );\n };\n\n const getBase64 = async (file: any) => {\n if (file && file.length > 0) {\n var reader = new FileReader();\n reader.readAsDataURL(file[0]);\n return new Promise((resolve) => {\n reader.onload = () => {\n resolve(reader.result);\n };\n });\n }\n return \"\";\n };\n\n const compareDictionary = (a: DictionaryCombo, b: DictionaryCombo) => {\n if (a.name < b.name) {\n return -1;\n }\n if (a.name > b.name) {\n return 1;\n }\n return 0;\n };\n\n const polandFirst = (acc: DictionaryCombo[], element: DictionaryCombo) => {\n if (element.name?.toLocaleLowerCase() === \"polska\") {\n return [element, ...acc];\n }\n return [...acc, element];\n };\n\n function validateIdentityDocumentNumber(\n number: string | undefined,\n fromPoland: boolean,\n numberOfLetters: number,\n numberOfDigits: number\n ): boolean {\n if (!number) {\n return false;\n }\n\n if (!fromPoland) {\n return true;\n }\n\n if (number.length != numberOfLetters + numberOfDigits) {\n return false;\n }\n\n const letterValues = \"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ\";\n const weights = [7, 3, 1];\n\n let sum = 0;\n for (let i = 0; i < numberOfLetters; i++) {\n const letterValueIndex = letterValues.indexOf(number[i]);\n if (letterValueIndex < 10) {\n return false;\n }\n\n sum += letterValueIndex * weights[i % 3];\n }\n\n const digitsStartIndexWithoutCheckSum = numberOfLetters + 1;\n const numberOfDigitsWithoutCheckSum = numberOfDigits - 1;\n for (let i = 0; i < numberOfDigitsWithoutCheckSum; i++) {\n const letterValueIndex = letterValues.indexOf(\n number[i + digitsStartIndexWithoutCheckSum]\n );\n if (letterValueIndex < 0 || letterValueIndex > 9) {\n return false;\n }\n\n sum += letterValueIndex * weights[(i + numberOfLetters) % 3];\n }\n\n const checkSum = sum % 10;\n\n return checkSum == letterValues.indexOf(number[numberOfLetters]);\n }\n\n const checkPesel = (pesel: string) => {\n // 1. Sprawdzenie długości i wyłącznie cyfr\n if (!/^\\d{11}$/.test(pesel)) {\n return false;\n }\n\n // 2. Sprawdzanie miesiąca (2-3 cyfra) i dnia (4-5 cyfra)\n const monthWithCentury = Number(pesel.substring(2, 4));\n if (!monthWithCentury || monthWithCentury % 20 > 12) {\n return false;\n }\n const day = Number(pesel.substring(4, 6));\n if (day < 1 || day > 31) {\n return false;\n }\n\n // 3. Walidacja sumy kontrolnej PESEL\n const weights = [1, 3, 7, 9]; // wagi cyklicznie powtarzane\n const digits = pesel.split(\"\").map((digit) => parseInt(digit, 10));\n const controlDigit = digits[10];\n digits.pop(); // usuwa ostatnią cyfrę (kontrolną)\n\n const controlSum =\n digits.reduce((acc, curr, idx) => {\n return acc + curr * weights[idx % 4];\n }, 0) % 10;\n\n const isChecksumValid =\n 10 - (controlSum === 0 ? 10 : controlSum) === controlDigit;\n if (!isChecksumValid) {\n return false;\n }\n\n // 4. Wyliczenie faktycznej daty urodzenia (dayjs)\n const birthDateStr = getBirthDateFromPesel(pesel);\n // zakładamy, że getBirthDateFromPesel zwraca np. \"YYYY-MM-DD\"\n const birthDate = dayjs(birthDateStr);\n\n // 5. Sprawdzenie, czy osoba ma >= 18 lat\n // Porównujemy różnicę w latach z dokładnością (opcjonalnie 'year', 'month', 'day' - w tym przypadku 'year' wystarczy).\n if (dayjs().diff(birthDate, \"year\", true) < 18) {\n return false;\n }\n\n // 6. (Opcjonalne) sprawdzenie, czy nie jest starsza niż 105 lat\n if (dayjs().diff(birthDate, \"year\", true) > 105) {\n return false;\n }\n\n // 7. Jeśli wszystko jest ok, ustawiamy stan w komponencie i zwracamy true\n setValue(\"birthDate\", birthDateStr, {\n shouldValidate: true,\n });\n\n const gender = Number(pesel[9]) % 2 === 1 ? genders[1] : genders[0];\n setValue(\"gender\", gender, {\n shouldValidate: true,\n });\n return true;\n };\n\n function FileListItems(files: any) {\n if (files && files[0]) {\n if (files[0].size === 0) return \"Plik jest za mały.\";\n const kbSize = files[0].size / 1024;\n const mbSize = kbSize / 1024;\n\n if (mbSize > 4) {\n return \"Plik jest za duży\";\n }\n\n const mimeType = files[0].type;\n const name = files[0].name;\n if (\n mimeType === \"image/png\" ||\n mimeType === \"image/jpeg\" ||\n mimeType === \"application/pdf\"\n ) {\n const b = new ClipboardEvent(\"\").clipboardData || new DataTransfer();\n for (let i = 0, len = files.length; i < len; i++) b.items.add(files[i]);\n return b.files;\n }\n return \"Nieobsługiwany format (obsługiwane formaty: .jpg .png .pdf)\";\n }\n return undefined;\n }\n\n const checkIsResident = () => {\n // const { withoutPesel, address } = getValues();\n // if (withoutPesel && address?.country?.name?.toLocaleLowerCase() === 'polska') {\n // setValue(\"withoutPesel\", false);\n // setDisablePesel(false);\n // setCheckResident(true);\n // }\n };\n\n return (\n <>\n \n {\n e.key === \"Enter\" && e.preventDefault();\n }}\n onSubmit={handleOnSubmit}\n >\n
\n\n

Dane osobowe

\n
\n
\n (\n {\n field.onChange(event.target.value);\n checkPesel(event.target.value);\n setCheckResident(false);\n }}\n inputProps={{\n maxLength: 11,\n }}\n />\n )}\n name=\"pesel\"\n control={control}\n rules={{\n required: !disablePesel ? \"PESEL jest wymagany\" : undefined,\n validate: (value) => disablePesel || checkPesel(value),\n }}\n />\n {errors.pesel && errors.pesel.type === \"validate\" && (\n \n \n Nieprawidłowy PESEL\n \n )}\n {checkResident ? (\n

\n W przypadku\n rezydentów wymagany numer PESEL\n

\n ) : errors.pesel && errors.pesel.type !== \"validate\" ? (\n \n \n {errors.pesel.message ?? \"Nieprawidłowy PESEL\"}\n \n ) : null}\n
\n
\n\n
\n \n \n \n
\n \n\n
\n
\n (\n {\n setValue(\n \"birthDate\",\n date ? dayjs(date).format(\"YYYY-MM-DD\") : undefined,\n {\n shouldValidate: true,\n }\n );\n setValue(\"pesel\", \"\", {\n shouldValidate: true,\n });\n setValue(\"gender\", undefined, {\n shouldValidate: true,\n });\n checkIsResident();\n }}\n renderInput={(props: any) => (\n \n )}\n />\n )}\n name=\"birthDate\"\n control={control}\n rules={{\n required: \"Data urodzenia jest wymagana\",\n validate: {\n minDate: (value) => {\n return dayjs(value, \"YYYY-MM-DD\").isBefore(\n dayjs().subtract(18, \"years\")\n );\n },\n maxDate: (value) => {\n return dayjs(value, \"YYYY-MM-DD\").isAfter(\n dayjs().subtract(105, \"years\")\n );\n },\n },\n }}\n />\n {errors.birthDate && errors.birthDate.type === \"required\" && (\n \n \n {errors.birthDate.message}\n \n )}\n {errors.birthDate && errors.birthDate.type !== \"required\" && (\n \n \n Podano błędną datę\n \n )}\n
\n
\n\n
\n
\n (\n {\n field.onChange(event.target.value);\n }}\n onBlur={(event: any) => {\n if (event.target.value)\n field.onChange(onlyFirstCapitalize(event.target.value));\n }}\n inputProps={{\n maxLength: 50,\n }}\n />\n )}\n name=\"secondName\"\n control={control}\n rules={{\n minLength: {\n value: 2,\n message: \"Imię jest za krótkie\",\n },\n maxLength: {\n value: 50,\n message: \"Imię jest za długie\",\n },\n }}\n />\n {errors.secondName && (\n \n \n {errors.secondName.message}\n \n )}\n
\n
\n\n
\n
\n (\n <>\n {\n field.onChange(newValue);\n }}\n getOptionLabel={(option) => option.name}\n renderInput={(params) => (\n \n )}\n noOptionsText={\"Brak danych\"}\n />\n \n )}\n name=\"gender\"\n control={control}\n rules={{\n required: \"Płeć jest wymagana\",\n }}\n />\n {errors.gender && (\n \n \n Płeć jest wymagana\n \n )}\n
\n
\n\n
\n
\n (\n {\n field.onChange(event.target.value);\n }}\n onBlur={(event: any) => {\n if (event.target.value)\n field.onChange(toTitleCase(event.target.value));\n }}\n error={errors.placeOfBirth != null}\n inputProps={{\n maxLength: 200,\n }}\n />\n )}\n name=\"placeOfBirth\"\n control={control}\n rules={{\n required: \"Miejsce urodzenia jest wymagane\",\n maxLength: {\n value: 200,\n message: \"Miejsce urodzenia jest za długie\",\n },\n }}\n />\n {errors.placeOfBirth && (\n \n \n {errors.placeOfBirth.message}\n \n )}\n
\n
\n\n
\n
\n (\n <>\n {\n field.onChange(newValue);\n }}\n getOptionLabel={(option) => option.name}\n isOptionEqualToValue={(option, value) =>\n option.id === value.id\n }\n renderInput={(params) => (\n \n )}\n noOptionsText={\"Brak danych\"}\n />\n \n )}\n name=\"countryOfBirth\"\n control={control}\n rules={{\n required: \"Kraj urodzenia jest wymagany\",\n }}\n />\n {errors.countryOfBirth && (\n \n \n Kraj urodzenia jest wymagany\n \n )}\n
\n
\n\n
\n
\n (\n <>\n {\n field.onChange(newValue);\n }}\n getOptionLabel={(option) => option.name}\n isOptionEqualToValue={(option, value) =>\n option.id === value.id\n }\n renderInput={(params) => (\n \n )}\n noOptionsText={\"Brak danych\"}\n />\n \n )}\n name=\"citizenship\"\n control={control}\n rules={{\n required: \"Kraj obywatelstwa jest wymagany\",\n }}\n />\n {errors.citizenship && (\n \n \n Kraj obywatelstwa jest wymagany\n \n )}\n
\n
\n\n
\n
\n (\n {\n field.onChange(event.target.value);\n }}\n onBlur={(event: any) => {\n if (event.target.value)\n field.onChange(toTitleCase(event.target.value));\n }}\n error={errors.mothersMaidenName != null}\n inputProps={{\n maxLength: 200,\n }}\n />\n )}\n name=\"mothersMaidenName\"\n control={control}\n rules={{\n required: \"Nazwisko panieńskie matki jest wymagane\",\n minLength: {\n value: 2,\n message: \"Nazwisko panieńskie matki jest za krótkie\",\n },\n maxLength: {\n value: 200,\n message: \"Nazwisko panieńskie matki jest za długie\",\n },\n }}\n />\n {errors.mothersMaidenName && (\n \n \n {errors.mothersMaidenName.message}\n \n )}\n
\n
\n\n
\n\n

Dowód osobisty

\n\n {IdentityTab(\"identification\", identification)}\n\n
\n

Adres zamieszkania

\n\n {AddressTab()}\n\n
\n \n \n \n
\n \n\n {showOtherPostalAddress ? (\n <>\n
\n

Adres korespondencyjny

\n\n
\n
\n (\n <>\n {\n field.onChange(newValue);\n setCheckOtherAddressPostalCode(\n newValue?.name?.toLocaleLowerCase() === \"polska\"\n );\n if (\n newValue?.name?.toLocaleLowerCase() !== \"polska\"\n ) {\n clearErrors(\"address.postCode\");\n }\n }}\n getOptionLabel={(option) => option.name}\n isOptionEqualToValue={(option: any, value: any) =>\n option.id === value.id\n }\n renderInput={(params) => (\n \n )}\n noOptionsText={\"Brak danych\"}\n />\n \n )}\n name=\"postalAddress.country\"\n control={control}\n rules={{\n required: \"Kraj jest wymagany\",\n }}\n />\n {errors.postalAddress?.country && (\n \n \n Kraj jest wymagany\n \n )}\n
\n
\n\n
\n
\n \n checkOtherAddressPostalCode ? (\n \n ) : (\n {\n field.onChange(event.target.value);\n clearErrors(\"postalAddress.postCode\");\n }}\n label=\"Kod pocztowy\"\n name=\"postalAddress.postCode\"\n variant=\"outlined\"\n error={errors.postalAddress?.postCode != null}\n inputProps={{\n maxLength: 9,\n }}\n />\n )\n }\n name=\"postalAddress.postCode\"\n control={control}\n rules={{\n required: \"Kod pocztowy jest wymagany\",\n maxLength: {\n value: 9,\n message: \"Kod pocztowy jest za długi\",\n },\n pattern:\n showOtherPostalAddress && checkOtherAddressPostalCode\n ? {\n value: /\\b[0-9][0-9]-[0-9][0-9][0-9]\\b/,\n message: \"Nieprawidłowy kod pocztowy\",\n }\n : undefined,\n }}\n />\n {errors.postalAddress?.postCode && (\n \n \n {errors.postalAddress.postCode.message}\n \n )}\n
\n
\n\n
\n
\n (\n {\n field.onChange(event.target.value);\n }}\n onBlur={(event: any) => {\n if (event.target.value)\n field.onChange(toTitleCase(event.target.value));\n }}\n inputProps={{\n maxLength: 200,\n }}\n />\n )}\n name=\"postalAddress.city\"\n control={control}\n rules={{\n required: \"Miejscowość jest wymagana\",\n maxLength: {\n value: 200,\n message: \"Miejscowość jest za długa\",\n },\n }}\n />\n {errors.postalAddress?.city && (\n \n \n {errors.postalAddress.city.message}\n \n )}\n
\n
\n\n
\n
\n (\n {\n field.onChange(event.target.value);\n }}\n onBlur={(event: any) => {\n if (event.target.value)\n field.onChange(toTitleCase(event.target.value));\n }}\n inputProps={{\n maxLength: 200,\n }}\n />\n )}\n name=\"postalAddress.street\"\n control={control}\n rules={{\n maxLength: {\n value: 200,\n message: \"Ulica jest za długa\",\n },\n }}\n />\n {errors.postalAddress?.street && (\n \n \n {errors.postalAddress.street.message}\n \n )}\n
\n
\n\n
\n
\n (\n {\n field.onChange(event.target.value);\n }}\n inputProps={{\n maxLength: 10,\n }}\n />\n )}\n name=\"postalAddress.house\"\n control={control}\n rules={{\n required: \"Numer domu jest wymagany\",\n maxLength: {\n value: 10,\n message: \"Numer domu jest za długi\",\n },\n }}\n />\n {errors.postalAddress?.house && (\n \n \n {errors.postalAddress.house.message}\n \n )}\n
\n
\n\n
\n
\n (\n {\n field.onChange(event.target.value);\n }}\n inputProps={{\n maxLength: 10,\n }}\n />\n )}\n name=\"postalAddress.apartment\"\n control={control}\n rules={{\n maxLength: {\n value: 10,\n message: \"Numer mieszkania jest za długi\",\n },\n }}\n />\n
\n
\n \n ) : null}\n\n
\n
\n {\n return value && value.length > 0;\n },\n },\n })}\n onChange={(e) => {\n if (e && e.target && e.target.files && e.target.files[0]) {\n const file = FileListItems([e.target.files[0]]);\n\n if (file instanceof FileList) {\n setValue(\n \"identificationPhotos.mainSide\",\n (file as FileList) ?? undefined,\n {\n shouldValidate: true,\n }\n );\n setFile1Error(undefined);\n } else {\n setFile1Error(file as string);\n setFileName1(\"\");\n setValue(\"identificationPhotos.mainSide\", undefined, {\n shouldValidate: true,\n });\n }\n setFileName1(e.target.files[0]?.name ?? \"\");\n }\n }}\n accept=\"image/jpeg,image/png,application/pdf\"\n name=\"identificationPhotos.mainSide\"\n ref={inputReference1}\n type=\"file\"\n hidden\n />\n 0,\n }}\n />\n {fileName1 ? (\n {\n event.preventDefault();\n if (inputReference1 != null) {\n inputReference1?.current?.click();\n }\n }}\n className=\"reAttachmentBtn mt-3\"\n type=\"submit\"\n value=\"Zmień plik\"\n />\n ) : (\n {\n event.preventDefault();\n if (inputReference1 != null) {\n inputReference1?.current?.click();\n }\n }}\n className=\"attachmentBtn mt-3\"\n type=\"submit\"\n value=\"Dołącz plik\"\n />\n )}\n
\n
\n {file1Error ? (\n

\n \n {file1Error}\n

\n ) : (\n errors.identificationPhotos?.mainSide && (\n \n \n Plik jest wymagany\n \n )\n )}\n {identityType?.toLocaleLowerCase() !== \"paszport\" ? (\n <>\n
\n
\n {\n return value && value.length > 0;\n },\n },\n })}\n onChange={(e) => {\n if (\n e &&\n e.target &&\n e.target.files &&\n e.target.files[0]\n ) {\n const file = FileListItems([e.target.files[0]]);\n\n if (file instanceof FileList) {\n setValue(\n \"identificationPhotos.backSide\",\n (file as FileList) ?? undefined,\n {\n shouldValidate: true,\n }\n );\n setFile2Error(undefined);\n } else {\n setFile2Error(file as string);\n setFileName2(undefined);\n setValue(\"identificationPhotos.backSide\", undefined, {\n shouldValidate: true,\n });\n }\n setFileName2(e.target.files[0]?.name ?? \"\");\n }\n }}\n accept=\"image/jpeg,image/png,application/pdf\"\n name=\"identificationPhotos.backSide\"\n ref={inputReference2}\n type=\"file\"\n hidden\n />\n 0,\n }}\n />\n {fileName2 ? (\n {\n event.preventDefault();\n if (inputReference2 != null) {\n inputReference2?.current?.click();\n }\n }}\n className=\"reAttachmentBtn mt-3\"\n type=\"submit\"\n value=\"Zmień plik\"\n />\n ) : (\n {\n event.preventDefault();\n if (inputReference2 != null) {\n inputReference2?.current?.click();\n }\n }}\n className=\"attachmentBtn mt-3\"\n type=\"submit\"\n value=\"Dołącz plik\"\n />\n )}\n
\n
\n {file2Error ? (\n

\n \n {file2Error}\n

\n ) : (\n errors.identificationPhotos?.backSide && (\n \n \n Plik jest wymagany\n \n )\n )}\n \n ) : null}\n\n
\n
\n
\n {\n setStep(1);\n if (context.setStep2) {\n context.setStep2(undefined);\n }\n if (context.setPPP) {\n context.setPPP(undefined);\n }\n }}\n className=\"backBtn\"\n >\n Cofnij\n \n \n
\n
\n
\n \n {loading && }\n
\n \n );\n};\n\nexport { Step2Form };\n","interface IRowProps {\n children: string | JSX.Element | undefined;\n label: string;\n disableUpperCase?: boolean;\n breakWord?: boolean;\n}\n\nconst Row = ({ children, label, disableUpperCase, breakWord }: IRowProps) => {\n return (\n \n {label}\n \n {children}\n \n \n );\n};\n\nexport { Row };\n","import \"./Table.css\";\n\ninterface ITableProps {\n children: JSX.Element | string;\n}\n\nconst Table = ({ children }: ITableProps) => {\n return (\n \n {children}\n
\n );\n};\n\nexport { Table };\n","\"use client\";\n\nimport createSvgIcon from \"./utils/createSvgIcon.js\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon(/*#__PURE__*/_jsx(\"path\", {\n d: \"m12 16.5 4-4h-3v-9h-2v9H8zm9-13h-6v1.99h6v14.03H3V5.49h6V3.5H3c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-14c0-1.1-.9-2-2-2\"\n}), 'SystemUpdateAlt');","import { TextField, createTheme, ThemeProvider, styled } from \"@mui/material\";\nimport { useMachine } from \"@xstate/react\";\nimport React, { useState, useEffect, useContext } from \"react\";\nimport { useForm, Controller } from \"react-hook-form\";\nimport { createMachine } from \"xstate\";\nimport FormContext from \"../../contexts/FormContext\";\nimport { sendLoadingPostRequest } from \"../../request/request\";\nimport { IAddressModel } from \"../../types/IAddressModel\";\nimport { IIdentificationModel } from \"../../types/IIdentificationModel\";\nimport { LoadingPanel } from \"../LoadingPanel/LoadingPanel\";\nimport { Row } from \"./Row\";\nimport { Table } from \"./Table\";\nimport useWindowDimensions from \"../../hooks/useWindowDimensions\";\nimport SystemUpdateAltIcon from \"@mui/icons-material/SystemUpdateAlt\";\nimport { IBeneficiaryItem } from \"../../types/IBeneficiaryItem\";\nimport { SurveyListType } from \"../../types/SurveyListType\";\nimport { PPPType } from \"../../types/PPPType\";\n\ninterface IStep3Form {\n setStep: React.Dispatch>;\n}\n\ninterface IRenderTextProps {\n children: React.ReactNode;\n}\n\ninterface RenderIdentity {\n identification: IIdentificationModel;\n}\n\ninterface RenderAddress {\n address: IAddressModel;\n}\n\ninterface IConfirmPhone {\n code: string;\n}\n\ninterface RenderBeneficiary {\n beneficiary: IBeneficiaryItem;\n}\n\nconst defaultMaterialTheme = createTheme({\n palette: {\n primary: {\n main: \"#000000\",\n },\n },\n});\n\nconst toggleMachine = createMachine({\n id: \"toggle\",\n initial: \"initial\",\n states: {\n initial: {\n on: { TOGGLE: \"confirmPhone\" },\n },\n confirmPhone: {\n on: { TOGGLE: \"initial\" },\n },\n },\n});\n\nconst TextFieldStyled = styled(TextField)(({ theme }) => ({\n width: \"100%\",\n \"& .MuiOutlinedInput-root .MuiAutocomplete-input:first-child\": {\n height: 40,\n },\n}));\n\nconst showQuestion: number[] = [8, 9];\n\nconst Step3Form = ({ setStep }: IStep3Form) => {\n const { step1, step2, ppp, setPPP, setNumber } = useContext(FormContext);\n\n const { height, width } = useWindowDimensions();\n\n const {\n register,\n handleSubmit,\n control,\n formState: { errors },\n reset,\n getValues,\n setValue,\n clearErrors,\n setError,\n } = useForm();\n const [state, send] = useMachine(toggleMachine);\n const [loading, setLoading] = useState(false);\n const [errorCode, setErrorCode] = useState(false);\n const [dataCheck, setDataCheck] = useState(false);\n const [showError, setShowError] = useState(false);\n const [counter, setCounter] = useState(step2?.counter ?? 0);\n\n const sendPPPData = async () => {\n const localData = {\n survey: ppp?.survey,\n surveyHighRisk: ppp?.surveyHighRisk,\n isHighRisk: ppp?.isHighRisk,\n withBeneficiary: ppp?.withBeneficiary,\n firstBeneficiary: ppp?.firstBeneficiary,\n secondBeneficiary: ppp?.secondBeneficiary,\n thirdBeneficiary: ppp?.thirdBeneficiary,\n };\n\n const {} = await sendLoadingPostRequest({\n loadingFunction: setLoading,\n endpoint: \"Agreement/PPP\",\n params: {\n surveyList: localData,\n profession: step2?.profession,\n },\n });\n };\n\n useEffect(() => {\n window.scrollTo(0, 0);\n sendPPPData();\n }, []);\n\n useEffect(() => {\n if (dataCheck) {\n setShowError(false);\n }\n }, [dataCheck]);\n\n useEffect(() => {\n if (step2 != null) {\n step2.counter = counter;\n }\n }, [counter]);\n\n const isEmpty = (text?: string) => {\n if (text == null || text === \"\") return true;\n return false;\n };\n\n const confirmPhone = async (data: IConfirmPhone) => {\n if (dataCheck) {\n if (state.value === \"confirmPhone\") {\n const { code } = getValues();\n const { data: confirmResponse, success } = await sendLoadingPostRequest<\n IConfirmPhone,\n string\n >({\n loadingFunction: setLoading,\n endpoint: \"Agreement/VerifyAndSend\",\n params: {\n code,\n },\n });\n\n if (success) {\n if (confirmResponse?.data && confirmResponse?.data !== \"Błędny kod\") {\n if (setNumber != null) {\n setNumber(confirmResponse?.data ?? \"\");\n }\n setStep(6);\n } else if (!confirmResponse?.data) {\n setStep(-2);\n } else {\n setErrorCode(true);\n }\n } else {\n setErrorCode(true);\n }\n } else {\n var response = await sendCode();\n if (response) {\n send({ type: \"TOGGLE\" });\n }\n }\n } else {\n setShowError(true);\n }\n };\n\n const sendCode = async () => {\n setStep(5);\n setCounter((prev) => prev + 1);\n const { success } = await sendLoadingPostRequest({\n loadingFunction: setLoading,\n endpoint: \"Agreement/SendSms\",\n });\n\n return success;\n };\n\n const getBase64 = async (file: any): Promise => {\n if (file && file.length > 0) {\n var reader = new FileReader();\n reader.readAsDataURL(file[0]);\n return new Promise((resolve) => {\n reader.onload = () => {\n resolve((reader.result as string) ?? \"\");\n };\n });\n }\n return \"\";\n };\n\n const downloadPDF = async (pdf: any, name: string) => {\n const file = pdf[0];\n const { name: fileName } = file;\n\n const mimeType = fileName.substr(fileName.lastIndexOf(\".\") + 1);\n\n const downloadLink = document.createElement(\"a\");\n const baseFile = await getBase64(pdf);\n if (baseFile) {\n if (mimeType) {\n const fileName = `${name}.${mimeType}`;\n\n downloadLink.href = baseFile;\n downloadLink.download = fileName;\n downloadLink.click();\n }\n }\n };\n\n const clearPPP = async () => {\n if (setPPP != null) {\n const { data: response, success } = await sendLoadingPostRequest<\n never,\n SurveyListType\n >({\n loadingFunction: setLoading,\n endpoint: \"agreement/GetPPP\",\n });\n if (success && response?.data) {\n const resp = response?.data;\n if (resp == null) return;\n\n setPPP((prev) =>\n prev != null\n ? {\n ...prev,\n surveyHighRisk: resp.surveyHighRisk,\n }\n : undefined\n );\n }\n }\n };\n\n const encodeWhiteSpaces = (str: string | undefined) => {\n if (isEmpty(str)) return \"\";\n return str\n ?.split(\"\")\n .map(function (c) {\n return c === \" \" ? \" \" : c;\n })\n .join(\"\");\n };\n\n const RenderIdentity = ({ identification }: RenderIdentity) => {\n return (\n <>\n Dowód osobisty\n\n {identification?.seriesAndNumber}\n\n {identification?.releaseDate}\n\n \n {identification?.expirationDate ?? \"Nieoznaczona\"}\n \n\n {identification?.issuingCountry.name}\n \n );\n };\n\n const RenderAddress = ({ address }: RenderAddress) => {\n return (\n <>\n \n

\n {address?.country?.name}\n

\n
\n\n \n

\n {address.postCode}\n

\n
\n\n \n

\n {address.city}\n

\n
\n\n {address.street ? (\n \n

\n {address.street}\n

\n
\n ) : null}\n\n \n

\n {address.house}\n

\n
\n\n {address.apartment ? (\n \n

\n {address.apartment}\n

\n
\n ) : null}\n \n );\n };\n\n const RenderBenficiary = ({ beneficiary }: RenderBeneficiary) => {\n return (\n <>\n \n

\n {beneficiary.firstName}\n

\n
\n\n \n

\n {beneficiary.lastName}\n

\n
\n\n {beneficiary.citizenship ? (\n \n

\n {beneficiary.citizenship?.name}\n

\n
\n ) : null}\n\n {beneficiary.pesel ? (\n \n

\n {beneficiary.pesel}\n

\n
\n ) : null}\n\n {beneficiary.birthDate ? (\n \n

\n {beneficiary.birthDate}\n

\n
\n ) : null}\n\n {beneficiary.placeOfBirth ? (\n \n

\n {beneficiary.placeOfBirth}\n

\n
\n ) : null}\n\n {beneficiary.countryOfBirth ? (\n \n

\n {beneficiary.countryOfBirth.name}\n

\n
\n ) : null}\n\n {beneficiary.documentType ? (\n \n

\n {beneficiary.documentType.name}\n

\n
\n ) : null}\n\n {beneficiary.seriesAndNumber ? (\n \n

\n {beneficiary.seriesAndNumber}\n

\n
\n ) : null}\n\n {beneficiary.issuingCountry ? (\n \n

\n {beneficiary.issuingCountry.name}\n

\n
\n ) : null}\n\n {beneficiary.country ? (\n \n

\n {beneficiary.country.name}\n

\n
\n ) : null}\n\n {beneficiary.postCode ? (\n \n

\n {beneficiary.postCode}\n

\n
\n ) : null}\n\n {beneficiary.city ? (\n \n

\n {beneficiary.city}\n

\n
\n ) : null}\n\n {beneficiary.street ? (\n \n

\n {beneficiary.street}\n

\n
\n ) : null}\n\n {beneficiary.house ? (\n \n

\n {beneficiary.house}\n

\n
\n ) : null}\n\n {beneficiary.apartment ? (\n \n

\n {beneficiary.apartment}\n

\n
\n ) : null}\n\n {beneficiary.option === 1 ? (\n \n

\n Jestem osobą PEP: {beneficiary.pppText}\n

\n
\n ) : null}\n\n {beneficiary.option === 2 ? (\n \n

\n Członek rodziny PEP: {beneficiary.pppText}\n

\n
\n ) : null}\n\n {beneficiary.option === 3 ? (\n \n

\n Bliski współpracownik osoby PEP: {beneficiary.pppText}\n

\n
\n ) : null}\n\n {beneficiary.option === 0 ? (\n \n

\n nie jest osobą zajmującą eksponowane stanowisko polityczne,\n członkiem rodziny osoby zajmującej eksponowane stanowisko\n polityczne ani osobą znaną jako bliski współpracownik osoby\n zajmującej eksponowane stanowisko polityczne.\n

\n
\n ) : null}\n \n );\n };\n\n return (\n <>\n \n <>\n
\n

Dane osobowe

\n {step1?.firstName}\n\n {step2?.secondName ? (\n {step2?.secondName}\n ) : null}\n\n {step1?.lastName}\n\n {step1?.phone}\n\n \n {step1?.mail}\n \n\n {step2?.pesel ? step2?.pesel : \"brak\"}\n\n {step2?.birthDate}\n\n {step2?.gender?.name}\n\n {step2?.placeOfBirth}\n\n {step2?.countryOfBirth?.name}\n\n {step2?.citizenship?.name}\n\n \n {step2?.mothersMaidenName}\n \n\n {step2?.address.motherName ? (\n {step2?.address.motherName}\n ) : null}\n {step2?.address.fatherName ? (\n {step2?.address.fatherName}\n ) : null}\n\n {step2?.profession?.name}\n\n {step2?.identification ? (\n <>\n
\n\n

Dowód osobisty

\n \n \n ) : null}\n\n {step2?.address ? (\n <>\n
\n

Adres zamieszkania

\n \n \n ) : null}\n\n {step2?.postalAddress ? (\n <>\n
\n\n

Adres korespondencyjny

\n \n \n ) : null}\n\n
\n\n

\n Ankieta Przeciwdziałania Praniu Pieniędzy:\n

\n\n {ppp?.survey ? (\n <>\n {ppp?.survey.questions\n .filter(\n (question) => showQuestion.indexOf(question.type) !== -1\n )\n .map((question) => {\n return (\n \n <>\n {question?.answers\n ?.filter((answer) => answer.isSelected)\n .map((item) => {\n if (item.showTextBox) {\n return (\n \n {item.answerText} {item.additionalText}\n

\n );\n } else {\n return (\n \n {item.answerText}\n

\n );\n }\n })}\n \n
\n );\n })}\n \n ) : null}\n\n {ppp?.surveyHighRisk != null &&\n ppp?.surveyHighRisk?.questions.filter((f) =>\n f.answers?.find((answer) => answer.isSelected === true)\n )?.length > 0 ? (\n <>\n {ppp?.surveyHighRisk.questions\n .filter(\n (question) => showQuestion.indexOf(question.type) !== -1\n )\n .map((question) => {\n return (\n \n <>\n {question?.answers\n ?.filter((answer) => answer.isSelected)\n .map((item) => {\n if (\n item.showTextBox &&\n isEmpty(item.answerText) === false\n ) {\n return (\n \n {item.answerText} {item.additionalText}\n

\n );\n } else {\n if (isEmpty(item.answerText) === false)\n return (\n \n {item.answerText}\n

\n );\n }\n })}\n \n
\n );\n })}\n \n ) : null}\n\n {ppp?.withBeneficiary == true && ppp?.firstBeneficiary ? (\n <>\n
\n

Beneficjent rzeczywisty

\n\n \n \n ) : null}\n\n {ppp?.withBeneficiary == true && ppp?.secondBeneficiary ? (\n <>\n
\n

Beneficjent rzeczywisty 2

\n\n \n \n ) : null}\n\n {ppp?.withBeneficiary == true && ppp?.thirdBeneficiary ? (\n <>\n
\n

Beneficjent rzeczywisty 3

\n\n \n \n ) : null}\n\n
\n

Załączniki

\n \n
\n
\n {step2?.identificationPhotos.mainSide ? (\n <>\n
\n \n downloadPDF(\n step2?.identificationPhotos.mainSide,\n \"Dokument_tozsamości_nr_1_strona_ze_zdjeciem\"\n )\n }\n >\n \n \n Dowód osobisty - strona ze zdjęciem\n \n
\n
\n \n ) : null}\n {step2?.identificationPhotos.backSide ? (\n <>\n
\n \n downloadPDF(\n step2?.identificationPhotos.backSide,\n \"Dokument_tozsamości_nr_1_druga_strona\"\n )\n }\n >\n \n \n Dowód osobisty - druga strona\n \n
\n \n \n ) : null}\n \n
\n
\n setDataCheck((prev) => !prev)}\n className=\"custom-control custom-checkbox\"\n >\n \n \n
\n \n
\n\n
\n \n {state.value === \"confirmPhone\" ? (\n \n
\n
\n
\n (\n {\n field.onChange(event.target.value);\n setErrorCode(false);\n }}\n inputProps={{\n maxLength: 6,\n }}\n />\n )}\n name=\"code\"\n control={control}\n rules={{\n required: \"Kod weryfikacyjny jest wymagany\",\n }}\n />\n
\n
\n
\n
\n \n
\n
\n
\n {errors.code && (\n

\n \n {errors.code.message}\n

\n )}\n {errorCode && (\n

\n \n Podano błędny kod\n

\n )}\n
\n
\n\n
\n Aby kontynuować należy w polu powyżej wpisać kod weryfikacyjny\n nr {counter} wysłany w wiadomości SMS na podany numer telefonu.\n Jeśli kod nie dotarł należy kliknąć przycisk „Pobierz ponownie\n kod\".\n
\n
\n ) : null}\n \n\n {showError && loading === false && (\n \n \n Zaznaczenie oświadczenia jest wymagane.\n \n )}\n\n
\n
\n
\n {state.value === \"confirmPhone\" ? (\n <>\n {width <= 321 ? (\n <>\n {\n event.preventDefault();\n clearErrors(\"code\");\n setStep(4);\n send({ type: \"TOGGLE\" });\n }}\n className=\"backBtn\"\n >\n Cofnij\n \n \n Pobierz kod\n \n \n ) : (\n <>\n {\n event.preventDefault();\n clearErrors(\"code\");\n setStep(4);\n send({ type: \"TOGGLE\" });\n }}\n className=\"backBtn\"\n >\n Cofnij\n \n \n Pobierz ponownie kod\n \n \n )}\n \n ) : (\n <>\n {\n await clearPPP();\n setStep(7);\n }}\n className=\"backBtn\"\n >\n Cofnij\n \n \n \n )}\n
\n
\n
\n \n {loading && }\n \n );\n};\n\nexport { Step3Form };\n","export default \"__VITE_ASSET__D2UEXI7___\"","import React, { useContext, useEffect } from 'react';\nimport grafika_2 from '../../assets/grafika_2.svg';\nimport FormContext from '../../contexts/FormContext';\nimport './FinalForm.css';\n\ninterface IStep3Form {\n setStep: React.Dispatch>;\n}\n\nconst FinalForm = ({\n setStep\n}: IStep3Form) => {\n const {\n number\n } = useContext(FormContext);\n\n useEffect(() => {\n window.scrollTo(0, 0);\n }, []);\n\n\n return (\n <>\n

\n Dziękujemy!\n

\n

\n Twój wniosek o numerze {number} został złożony.\n

\n \n Co dalej?\n \n

\n Najpóźniej w kolejnym dniu roboczym otrzymasz:\n

\n \n na adres e-mail:\n \n
    \n
  • Umowę Dostępu do naszego systemu - Platformy Xelion,
  • \n
  • indywidualny Identyfikator,
  • \n
  • link do logowania do naszego systemu - Platformy Xelion,
  • \n
\n \n na numer telefonu komórkowego:\n \n
    \n
  • SMS zawierający indywidualny Telekod.
  • \n
\n
\n \"\"\n
\n

\n Krok 1. Logowanie do Platformy Xelion\n

\n
    \n
  • Skorzystaj z linku do logowania
  • \n
  • Wybierz opcję ,,Pierwsze logowanie\".
  • \n
  • Korzystając z Identyfikatora i Telekodu, ustanów swoje hasło do logowania.
  • \n
  • Zaloguj się do Platformy Xelion.
  • \n
\n

\n Krok 2. Zawarcie Umowy\n

\n
    \n
  • Uzupełnij niezbędne oświadczenia i ankiety.
  • \n
  • Zawrzyj Umowę o świadczenie usług maklerskich i innych usług przez Dom Inwestycyjny Xelion sp. z o.o.
  • \n
\n

\n Krok 3. Inwestuj z nami!\n

\n \n \n );\n};\n\nexport {\n FinalForm\n}","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.parse = parse;\nexports.serialize = serialize;\n/**\n * RegExp to match cookie-name in RFC 6265 sec 4.1.1\n * This refers out to the obsoleted definition of token in RFC 2616 sec 2.2\n * which has been replaced by the token definition in RFC 7230 appendix B.\n *\n * cookie-name = token\n * token = 1*tchar\n * tchar = \"!\" / \"#\" / \"$\" / \"%\" / \"&\" / \"'\" /\n * \"*\" / \"+\" / \"-\" / \".\" / \"^\" / \"_\" /\n * \"`\" / \"|\" / \"~\" / DIGIT / ALPHA\n *\n * Note: Allowing more characters - https://github.com/jshttp/cookie/issues/191\n * Allow same range as cookie value, except `=`, which delimits end of name.\n */\nconst cookieNameRegExp = /^[\\u0021-\\u003A\\u003C\\u003E-\\u007E]+$/;\n/**\n * RegExp to match cookie-value in RFC 6265 sec 4.1.1\n *\n * cookie-value = *cookie-octet / ( DQUOTE *cookie-octet DQUOTE )\n * cookie-octet = %x21 / %x23-2B / %x2D-3A / %x3C-5B / %x5D-7E\n * ; US-ASCII characters excluding CTLs,\n * ; whitespace DQUOTE, comma, semicolon,\n * ; and backslash\n *\n * Allowing more characters: https://github.com/jshttp/cookie/issues/191\n * Comma, backslash, and DQUOTE are not part of the parsing algorithm.\n */\nconst cookieValueRegExp = /^[\\u0021-\\u003A\\u003C-\\u007E]*$/;\n/**\n * RegExp to match domain-value in RFC 6265 sec 4.1.1\n *\n * domain-value = \n * ; defined in [RFC1034], Section 3.5, as\n * ; enhanced by [RFC1123], Section 2.1\n * =