{"version":3,"file":"use-garage-search-079b5f39.js","sources":["../../../node_modules/@mui/utils/usePreviousProps/usePreviousProps.js","../../../node_modules/@mui/base/useAutocomplete/useAutocomplete.js","../../../node_modules/@mui/joy/ListSubheader/ListSubheaderContext.js","../../../node_modules/@mui/joy/ListItem/ListItem.js","../../../node_modules/@mui/joy/internal/svg-icons/ArrowDropDown.js","../../../node_modules/@mui/joy/Chip/chipClasses.js","../../../node_modules/@mui/joy/Chip/ChipContext.js","../../../node_modules/@mui/joy/Chip/Chip.js","../../../node_modules/@mui/joy/internal/svg-icons/Cancel.js","../../../node_modules/@mui/joy/ChipDelete/chipDeleteClasses.js","../../../node_modules/@mui/joy/ChipDelete/ChipDelete.js","../../../node_modules/@mui/joy/ListSubheader/listSubheaderClasses.js","../../../node_modules/@mui/joy/ListSubheader/ListSubheader.js","../../../node_modules/@mui/joy/Autocomplete/autocompleteClasses.js","../../../node_modules/@mui/joy/AutocompleteListbox/AutocompleteListbox.js","../../../node_modules/@mui/joy/AutocompleteOption/AutocompleteOption.js","../../../node_modules/@mui/joy/Autocomplete/Autocomplete.js","../../../node_modules/jotai/esm/vanilla.mjs","../../../node_modules/jotai/esm/react.mjs","../../../node_modules/@googlemaps/js-api-loader/dist/index.esm.js","../../../node_modules/@googlemaps/react-wrapper/dist/index.umd.js","../../../node_modules/@mui/icons-material/Search.js","../../../node_modules/use-places-autocomplete/dist/index.esm.js","../../../app/frontend/components/places-autocomplete.tsx","../../../app/frontend/components/search-modal.tsx","../../../app/frontend/state.tsx","../../../app/frontend/hooks/use-garage-search.ts"],"sourcesContent":["'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;","'use client';\n\n/* eslint-disable no-constant-condition */\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport * as React from 'react';\nimport { unstable_setRef as setRef, unstable_useEventCallback as useEventCallback, unstable_useControlled as useControlled, unstable_useId as useId, usePreviousProps } from '@mui/utils';\n\n// https://stackoverflow.com/questions/990904/remove-accents-diacritics-in-a-string-in-javascript\n// Give up on IE11 support for this feature\nfunction stripDiacritics(string) {\n return typeof string.normalize !== 'undefined' ? string.normalize('NFD').replace(/[\\u0300-\\u036f]/g, '') : string;\n}\nexport function createFilterOptions(config = {}) {\n const {\n ignoreAccents = true,\n ignoreCase = true,\n limit,\n matchFrom = 'any',\n stringify,\n trim = false\n } = config;\n return (options, {\n inputValue,\n getOptionLabel\n }) => {\n let input = trim ? inputValue.trim() : inputValue;\n if (ignoreCase) {\n input = input.toLowerCase();\n }\n if (ignoreAccents) {\n input = stripDiacritics(input);\n }\n const filteredOptions = !input ? options : options.filter(option => {\n let candidate = (stringify || getOptionLabel)(option);\n if (ignoreCase) {\n candidate = candidate.toLowerCase();\n }\n if (ignoreAccents) {\n candidate = stripDiacritics(candidate);\n }\n return matchFrom === 'start' ? candidate.indexOf(input) === 0 : candidate.indexOf(input) > -1;\n });\n return typeof limit === 'number' ? filteredOptions.slice(0, limit) : filteredOptions;\n };\n}\n\n// To replace with .findIndex() once we stop IE11 support.\nfunction findIndex(array, comp) {\n for (let i = 0; i < array.length; i += 1) {\n if (comp(array[i])) {\n return i;\n }\n }\n return -1;\n}\nconst defaultFilterOptions = createFilterOptions();\n\n// Number of options to jump in list box when `Page Up` and `Page Down` keys are used.\nconst pageSize = 5;\nconst defaultIsActiveElementInListbox = listboxRef => {\n var _listboxRef$current$p;\n return listboxRef.current !== null && ((_listboxRef$current$p = listboxRef.current.parentElement) == null ? void 0 : _listboxRef$current$p.contains(document.activeElement));\n};\nexport function useAutocomplete(props) {\n const {\n // eslint-disable-next-line @typescript-eslint/naming-convention\n unstable_isActiveElementInListbox = defaultIsActiveElementInListbox,\n // eslint-disable-next-line @typescript-eslint/naming-convention\n unstable_classNamePrefix = 'Mui',\n autoComplete = false,\n autoHighlight = false,\n autoSelect = false,\n blurOnSelect = false,\n clearOnBlur = !props.freeSolo,\n clearOnEscape = false,\n componentName = 'useAutocomplete',\n defaultValue = props.multiple ? [] : null,\n disableClearable = false,\n disableCloseOnSelect = false,\n disabled: disabledProp,\n disabledItemsFocusable = false,\n disableListWrap = false,\n filterOptions = defaultFilterOptions,\n filterSelectedOptions = false,\n freeSolo = false,\n getOptionDisabled,\n getOptionLabel: getOptionLabelProp = option => {\n var _option$label;\n return (_option$label = option.label) != null ? _option$label : option;\n },\n groupBy,\n handleHomeEndKeys = !props.freeSolo,\n id: idProp,\n includeInputInList = false,\n inputValue: inputValueProp,\n isOptionEqualToValue = (option, value) => option === value,\n multiple = false,\n onChange,\n onClose,\n onHighlightChange,\n onInputChange,\n onOpen,\n open: openProp,\n openOnFocus = false,\n options,\n readOnly = false,\n selectOnFocus = !props.freeSolo,\n value: valueProp\n } = props;\n const id = useId(idProp);\n let getOptionLabel = getOptionLabelProp;\n getOptionLabel = option => {\n const optionLabel = getOptionLabelProp(option);\n if (typeof optionLabel !== 'string') {\n if (process.env.NODE_ENV !== 'production') {\n const erroneousReturn = optionLabel === undefined ? 'undefined' : `${typeof optionLabel} (${optionLabel})`;\n console.error(`MUI: The \\`getOptionLabel\\` method of ${componentName} returned ${erroneousReturn} instead of a string for ${JSON.stringify(option)}.`);\n }\n return String(optionLabel);\n }\n return optionLabel;\n };\n const ignoreFocus = React.useRef(false);\n const firstFocus = React.useRef(true);\n const inputRef = React.useRef(null);\n const listboxRef = React.useRef(null);\n const [anchorEl, setAnchorEl] = React.useState(null);\n const [focusedTag, setFocusedTag] = React.useState(-1);\n const defaultHighlighted = autoHighlight ? 0 : -1;\n const highlightedIndexRef = React.useRef(defaultHighlighted);\n const [value, setValueState] = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: componentName\n });\n const [inputValue, setInputValueState] = useControlled({\n controlled: inputValueProp,\n default: '',\n name: componentName,\n state: 'inputValue'\n });\n const [focused, setFocused] = React.useState(false);\n const resetInputValue = React.useCallback((event, newValue) => {\n // retain current `inputValue` if new option isn't selected and `clearOnBlur` is false\n // When `multiple` is enabled, `newValue` is an array of all selected items including the newly selected item\n const isOptionSelected = multiple ? value.length < newValue.length : newValue !== null;\n if (!isOptionSelected && !clearOnBlur) {\n return;\n }\n let newInputValue;\n if (multiple) {\n newInputValue = '';\n } else if (newValue == null) {\n newInputValue = '';\n } else {\n const optionLabel = getOptionLabel(newValue);\n newInputValue = typeof optionLabel === 'string' ? optionLabel : '';\n }\n if (inputValue === newInputValue) {\n return;\n }\n setInputValueState(newInputValue);\n if (onInputChange) {\n onInputChange(event, newInputValue, 'reset');\n }\n }, [getOptionLabel, inputValue, multiple, onInputChange, setInputValueState, clearOnBlur, value]);\n const [open, setOpenState] = useControlled({\n controlled: openProp,\n default: false,\n name: componentName,\n state: 'open'\n });\n const [inputPristine, setInputPristine] = React.useState(true);\n const inputValueIsSelectedValue = !multiple && value != null && inputValue === getOptionLabel(value);\n const popupOpen = open && !readOnly;\n const filteredOptions = popupOpen ? filterOptions(options.filter(option => {\n if (filterSelectedOptions && (multiple ? value : [value]).some(value2 => value2 !== null && isOptionEqualToValue(option, value2))) {\n return false;\n }\n return true;\n }),\n // we use the empty string to manipulate `filterOptions` to not filter any options\n // i.e. the filter predicate always returns true\n {\n inputValue: inputValueIsSelectedValue && inputPristine ? '' : inputValue,\n getOptionLabel\n }) : [];\n const previousProps = usePreviousProps({\n filteredOptions,\n value,\n inputValue\n });\n React.useEffect(() => {\n const valueChange = value !== previousProps.value;\n if (focused && !valueChange) {\n return;\n }\n\n // Only reset the input's value when freeSolo if the component's value changes.\n if (freeSolo && !valueChange) {\n return;\n }\n resetInputValue(null, value);\n }, [value, resetInputValue, focused, previousProps.value, freeSolo]);\n const listboxAvailable = open && filteredOptions.length > 0 && !readOnly;\n if (process.env.NODE_ENV !== 'production') {\n if (value !== null && !freeSolo && options.length > 0) {\n const missingValue = (multiple ? value : [value]).filter(value2 => !options.some(option => isOptionEqualToValue(option, value2)));\n if (missingValue.length > 0) {\n console.warn([`MUI: The value provided to ${componentName} is invalid.`, `None of the options match with \\`${missingValue.length > 1 ? JSON.stringify(missingValue) : JSON.stringify(missingValue[0])}\\`.`, 'You can use the `isOptionEqualToValue` prop to customize the equality test.'].join('\\n'));\n }\n }\n }\n const focusTag = useEventCallback(tagToFocus => {\n if (tagToFocus === -1) {\n inputRef.current.focus();\n } else {\n anchorEl.querySelector(`[data-tag-index=\"${tagToFocus}\"]`).focus();\n }\n });\n\n // Ensure the focusedTag is never inconsistent\n React.useEffect(() => {\n if (multiple && focusedTag > value.length - 1) {\n setFocusedTag(-1);\n focusTag(-1);\n }\n }, [value, multiple, focusedTag, focusTag]);\n function validOptionIndex(index, direction) {\n if (!listboxRef.current || index === -1) {\n return -1;\n }\n let nextFocus = index;\n while (true) {\n // Out of range\n if (direction === 'next' && nextFocus === filteredOptions.length || direction === 'previous' && nextFocus === -1) {\n return -1;\n }\n const option = listboxRef.current.querySelector(`[data-option-index=\"${nextFocus}\"]`);\n\n // Same logic as MenuList.js\n const nextFocusDisabled = disabledItemsFocusable ? false : !option || option.disabled || option.getAttribute('aria-disabled') === 'true';\n if (option && !option.hasAttribute('tabindex') || nextFocusDisabled) {\n // Move to the next element.\n nextFocus += direction === 'next' ? 1 : -1;\n } else {\n return nextFocus;\n }\n }\n }\n const setHighlightedIndex = useEventCallback(({\n event,\n index,\n reason = 'auto'\n }) => {\n highlightedIndexRef.current = index;\n\n // does the index exist?\n if (index === -1) {\n inputRef.current.removeAttribute('aria-activedescendant');\n } else {\n inputRef.current.setAttribute('aria-activedescendant', `${id}-option-${index}`);\n }\n if (onHighlightChange) {\n onHighlightChange(event, index === -1 ? null : filteredOptions[index], reason);\n }\n if (!listboxRef.current) {\n return;\n }\n const prev = listboxRef.current.querySelector(`[role=\"option\"].${unstable_classNamePrefix}-focused`);\n if (prev) {\n prev.classList.remove(`${unstable_classNamePrefix}-focused`);\n prev.classList.remove(`${unstable_classNamePrefix}-focusVisible`);\n }\n let listboxNode = listboxRef.current;\n if (listboxRef.current.getAttribute('role') !== 'listbox') {\n listboxNode = listboxRef.current.parentElement.querySelector('[role=\"listbox\"]');\n }\n\n // \"No results\"\n if (!listboxNode) {\n return;\n }\n if (index === -1) {\n listboxNode.scrollTop = 0;\n return;\n }\n const option = listboxRef.current.querySelector(`[data-option-index=\"${index}\"]`);\n if (!option) {\n return;\n }\n option.classList.add(`${unstable_classNamePrefix}-focused`);\n if (reason === 'keyboard') {\n option.classList.add(`${unstable_classNamePrefix}-focusVisible`);\n }\n\n // Scroll active descendant into view.\n // Logic copied from https://www.w3.org/WAI/content-assets/wai-aria-practices/patterns/combobox/examples/js/select-only.js\n // In case of mouse clicks and touch (in mobile devices) we avoid scrolling the element and keep both behaviors same.\n // Consider this API instead once it has a better browser support:\n // .scrollIntoView({ scrollMode: 'if-needed', block: 'nearest' });\n if (listboxNode.scrollHeight > listboxNode.clientHeight && reason !== 'mouse' && reason !== 'touch') {\n const element = option;\n const scrollBottom = listboxNode.clientHeight + listboxNode.scrollTop;\n const elementBottom = element.offsetTop + element.offsetHeight;\n if (elementBottom > scrollBottom) {\n listboxNode.scrollTop = elementBottom - listboxNode.clientHeight;\n } else if (element.offsetTop - element.offsetHeight * (groupBy ? 1.3 : 0) < listboxNode.scrollTop) {\n listboxNode.scrollTop = element.offsetTop - element.offsetHeight * (groupBy ? 1.3 : 0);\n }\n }\n });\n const changeHighlightedIndex = useEventCallback(({\n event,\n diff,\n direction = 'next',\n reason = 'auto'\n }) => {\n if (!popupOpen) {\n return;\n }\n const getNextIndex = () => {\n const maxIndex = filteredOptions.length - 1;\n if (diff === 'reset') {\n return defaultHighlighted;\n }\n if (diff === 'start') {\n return 0;\n }\n if (diff === 'end') {\n return maxIndex;\n }\n const newIndex = highlightedIndexRef.current + diff;\n if (newIndex < 0) {\n if (newIndex === -1 && includeInputInList) {\n return -1;\n }\n if (disableListWrap && highlightedIndexRef.current !== -1 || Math.abs(diff) > 1) {\n return 0;\n }\n return maxIndex;\n }\n if (newIndex > maxIndex) {\n if (newIndex === maxIndex + 1 && includeInputInList) {\n return -1;\n }\n if (disableListWrap || Math.abs(diff) > 1) {\n return maxIndex;\n }\n return 0;\n }\n return newIndex;\n };\n const nextIndex = validOptionIndex(getNextIndex(), direction);\n setHighlightedIndex({\n index: nextIndex,\n reason,\n event\n });\n\n // Sync the content of the input with the highlighted option.\n if (autoComplete && diff !== 'reset') {\n if (nextIndex === -1) {\n inputRef.current.value = inputValue;\n } else {\n const option = getOptionLabel(filteredOptions[nextIndex]);\n inputRef.current.value = option;\n\n // The portion of the selected suggestion that has not been typed by the user,\n // a completion string, appears inline after the input cursor in the textbox.\n const index = option.toLowerCase().indexOf(inputValue.toLowerCase());\n if (index === 0 && inputValue.length > 0) {\n inputRef.current.setSelectionRange(inputValue.length, option.length);\n }\n }\n }\n });\n const checkHighlightedOptionExists = () => {\n const isSameValue = (value1, value2) => {\n const label1 = value1 ? getOptionLabel(value1) : '';\n const label2 = value2 ? getOptionLabel(value2) : '';\n return label1 === label2;\n };\n if (highlightedIndexRef.current !== -1 && previousProps.filteredOptions && previousProps.filteredOptions.length !== filteredOptions.length && previousProps.inputValue === inputValue && (multiple ? value.length === previousProps.value.length && previousProps.value.every((val, i) => getOptionLabel(value[i]) === getOptionLabel(val)) : isSameValue(previousProps.value, value))) {\n const previousHighlightedOption = previousProps.filteredOptions[highlightedIndexRef.current];\n if (previousHighlightedOption) {\n const previousHighlightedOptionExists = filteredOptions.some(option => {\n return getOptionLabel(option) === getOptionLabel(previousHighlightedOption);\n });\n if (previousHighlightedOptionExists) {\n return true;\n }\n }\n }\n return false;\n };\n const syncHighlightedIndex = React.useCallback(() => {\n if (!popupOpen) {\n return;\n }\n\n // Check if the previously highlighted option still exists in the updated filtered options list and if the value and inputValue haven't changed\n // If it exists and the value and the inputValue haven't changed, return, otherwise continue execution\n if (checkHighlightedOptionExists()) {\n return;\n }\n const valueItem = multiple ? value[0] : value;\n\n // The popup is empty, reset\n if (filteredOptions.length === 0 || valueItem == null) {\n changeHighlightedIndex({\n diff: 'reset'\n });\n return;\n }\n if (!listboxRef.current) {\n return;\n }\n\n // Synchronize the value with the highlighted index\n if (valueItem != null) {\n const currentOption = filteredOptions[highlightedIndexRef.current];\n\n // Keep the current highlighted index if possible\n if (multiple && currentOption && findIndex(value, val => isOptionEqualToValue(currentOption, val)) !== -1) {\n return;\n }\n const itemIndex = findIndex(filteredOptions, optionItem => isOptionEqualToValue(optionItem, valueItem));\n if (itemIndex === -1) {\n changeHighlightedIndex({\n diff: 'reset'\n });\n } else {\n setHighlightedIndex({\n index: itemIndex\n });\n }\n return;\n }\n\n // Prevent the highlighted index to leak outside the boundaries.\n if (highlightedIndexRef.current >= filteredOptions.length - 1) {\n setHighlightedIndex({\n index: filteredOptions.length - 1\n });\n return;\n }\n\n // Restore the focus to the previous index.\n setHighlightedIndex({\n index: highlightedIndexRef.current\n });\n // Ignore filteredOptions (and options, isOptionEqualToValue, getOptionLabel) not to break the scroll position\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [\n // Only sync the highlighted index when the option switch between empty and not\n filteredOptions.length,\n // Don't sync the highlighted index with the value when multiple\n // eslint-disable-next-line react-hooks/exhaustive-deps\n multiple ? false : value, filterSelectedOptions, changeHighlightedIndex, setHighlightedIndex, popupOpen, inputValue, multiple]);\n const handleListboxRef = useEventCallback(node => {\n setRef(listboxRef, node);\n if (!node) {\n return;\n }\n syncHighlightedIndex();\n });\n if (process.env.NODE_ENV !== 'production') {\n // eslint-disable-next-line react-hooks/rules-of-hooks\n React.useEffect(() => {\n if (!inputRef.current || inputRef.current.nodeName !== 'INPUT') {\n if (inputRef.current && inputRef.current.nodeName === 'TEXTAREA') {\n console.warn([`A textarea element was provided to ${componentName} where input was expected.`, `This is not a supported scenario but it may work under certain conditions.`, `A textarea keyboard navigation may conflict with Autocomplete controls (e.g. enter and arrow keys).`, `Make sure to test keyboard navigation and add custom event handlers if necessary.`].join('\\n'));\n } else {\n console.error([`MUI: Unable to find the input element. It was resolved to ${inputRef.current} while an HTMLInputElement was expected.`, `Instead, ${componentName} expects an input element.`, '', componentName === 'useAutocomplete' ? 'Make sure you have bound getInputProps correctly and that the normal ref/effect resolutions order is guaranteed.' : 'Make sure you have customized the input component correctly.'].join('\\n'));\n }\n }\n }, [componentName]);\n }\n React.useEffect(() => {\n syncHighlightedIndex();\n }, [syncHighlightedIndex]);\n const handleOpen = event => {\n if (open) {\n return;\n }\n setOpenState(true);\n setInputPristine(true);\n if (onOpen) {\n onOpen(event);\n }\n };\n const handleClose = (event, reason) => {\n if (!open) {\n return;\n }\n setOpenState(false);\n if (onClose) {\n onClose(event, reason);\n }\n };\n const handleValue = (event, newValue, reason, details) => {\n if (multiple) {\n if (value.length === newValue.length && value.every((val, i) => val === newValue[i])) {\n return;\n }\n } else if (value === newValue) {\n return;\n }\n if (onChange) {\n onChange(event, newValue, reason, details);\n }\n setValueState(newValue);\n };\n const isTouch = React.useRef(false);\n const selectNewValue = (event, option, reasonProp = 'selectOption', origin = 'options') => {\n let reason = reasonProp;\n let newValue = option;\n if (multiple) {\n newValue = Array.isArray(value) ? value.slice() : [];\n if (process.env.NODE_ENV !== 'production') {\n const matches = newValue.filter(val => isOptionEqualToValue(option, val));\n if (matches.length > 1) {\n console.error([`MUI: The \\`isOptionEqualToValue\\` method of ${componentName} does not handle the arguments correctly.`, `The component expects a single value to match a given option but found ${matches.length} matches.`].join('\\n'));\n }\n }\n const itemIndex = findIndex(newValue, valueItem => isOptionEqualToValue(option, valueItem));\n if (itemIndex === -1) {\n newValue.push(option);\n } else if (origin !== 'freeSolo') {\n newValue.splice(itemIndex, 1);\n reason = 'removeOption';\n }\n }\n resetInputValue(event, newValue);\n handleValue(event, newValue, reason, {\n option\n });\n if (!disableCloseOnSelect && (!event || !event.ctrlKey && !event.metaKey)) {\n handleClose(event, reason);\n }\n if (blurOnSelect === true || blurOnSelect === 'touch' && isTouch.current || blurOnSelect === 'mouse' && !isTouch.current) {\n inputRef.current.blur();\n }\n };\n function validTagIndex(index, direction) {\n if (index === -1) {\n return -1;\n }\n let nextFocus = index;\n while (true) {\n // Out of range\n if (direction === 'next' && nextFocus === value.length || direction === 'previous' && nextFocus === -1) {\n return -1;\n }\n const option = anchorEl.querySelector(`[data-tag-index=\"${nextFocus}\"]`);\n\n // Same logic as MenuList.js\n if (!option || !option.hasAttribute('tabindex') || option.disabled || option.getAttribute('aria-disabled') === 'true') {\n nextFocus += direction === 'next' ? 1 : -1;\n } else {\n return nextFocus;\n }\n }\n }\n const handleFocusTag = (event, direction) => {\n if (!multiple) {\n return;\n }\n if (inputValue === '') {\n handleClose(event, 'toggleInput');\n }\n let nextTag = focusedTag;\n if (focusedTag === -1) {\n if (inputValue === '' && direction === 'previous') {\n nextTag = value.length - 1;\n }\n } else {\n nextTag += direction === 'next' ? 1 : -1;\n if (nextTag < 0) {\n nextTag = 0;\n }\n if (nextTag === value.length) {\n nextTag = -1;\n }\n }\n nextTag = validTagIndex(nextTag, direction);\n setFocusedTag(nextTag);\n focusTag(nextTag);\n };\n const handleClear = event => {\n ignoreFocus.current = true;\n setInputValueState('');\n if (onInputChange) {\n onInputChange(event, '', 'clear');\n }\n handleValue(event, multiple ? [] : null, 'clear');\n };\n const handleKeyDown = other => event => {\n if (other.onKeyDown) {\n other.onKeyDown(event);\n }\n if (event.defaultMuiPrevented) {\n return;\n }\n if (focusedTag !== -1 && ['ArrowLeft', 'ArrowRight'].indexOf(event.key) === -1) {\n setFocusedTag(-1);\n focusTag(-1);\n }\n\n // Wait until IME is settled.\n if (event.which !== 229) {\n switch (event.key) {\n case 'Home':\n if (popupOpen && handleHomeEndKeys) {\n // Prevent scroll of the page\n event.preventDefault();\n changeHighlightedIndex({\n diff: 'start',\n direction: 'next',\n reason: 'keyboard',\n event\n });\n }\n break;\n case 'End':\n if (popupOpen && handleHomeEndKeys) {\n // Prevent scroll of the page\n event.preventDefault();\n changeHighlightedIndex({\n diff: 'end',\n direction: 'previous',\n reason: 'keyboard',\n event\n });\n }\n break;\n case 'PageUp':\n // Prevent scroll of the page\n event.preventDefault();\n changeHighlightedIndex({\n diff: -pageSize,\n direction: 'previous',\n reason: 'keyboard',\n event\n });\n handleOpen(event);\n break;\n case 'PageDown':\n // Prevent scroll of the page\n event.preventDefault();\n changeHighlightedIndex({\n diff: pageSize,\n direction: 'next',\n reason: 'keyboard',\n event\n });\n handleOpen(event);\n break;\n case 'ArrowDown':\n // Prevent cursor move\n event.preventDefault();\n changeHighlightedIndex({\n diff: 1,\n direction: 'next',\n reason: 'keyboard',\n event\n });\n handleOpen(event);\n break;\n case 'ArrowUp':\n // Prevent cursor move\n event.preventDefault();\n changeHighlightedIndex({\n diff: -1,\n direction: 'previous',\n reason: 'keyboard',\n event\n });\n handleOpen(event);\n break;\n case 'ArrowLeft':\n handleFocusTag(event, 'previous');\n break;\n case 'ArrowRight':\n handleFocusTag(event, 'next');\n break;\n case 'Enter':\n if (highlightedIndexRef.current !== -1 && popupOpen) {\n const option = filteredOptions[highlightedIndexRef.current];\n const disabled = getOptionDisabled ? getOptionDisabled(option) : false;\n\n // Avoid early form validation, let the end-users continue filling the form.\n event.preventDefault();\n if (disabled) {\n return;\n }\n selectNewValue(event, option, 'selectOption');\n\n // Move the selection to the end.\n if (autoComplete) {\n inputRef.current.setSelectionRange(inputRef.current.value.length, inputRef.current.value.length);\n }\n } else if (freeSolo && inputValue !== '' && inputValueIsSelectedValue === false) {\n if (multiple) {\n // Allow people to add new values before they submit the form.\n event.preventDefault();\n }\n selectNewValue(event, inputValue, 'createOption', 'freeSolo');\n }\n break;\n case 'Escape':\n if (popupOpen) {\n // Avoid Opera to exit fullscreen mode.\n event.preventDefault();\n // Avoid the Modal to handle the event.\n event.stopPropagation();\n handleClose(event, 'escape');\n } else if (clearOnEscape && (inputValue !== '' || multiple && value.length > 0)) {\n // Avoid Opera to exit fullscreen mode.\n event.preventDefault();\n // Avoid the Modal to handle the event.\n event.stopPropagation();\n handleClear(event);\n }\n break;\n case 'Backspace':\n if (multiple && !readOnly && inputValue === '' && value.length > 0) {\n const index = focusedTag === -1 ? value.length - 1 : focusedTag;\n const newValue = value.slice();\n newValue.splice(index, 1);\n handleValue(event, newValue, 'removeOption', {\n option: value[index]\n });\n }\n break;\n case 'Delete':\n if (multiple && !readOnly && inputValue === '' && value.length > 0 && focusedTag !== -1) {\n const index = focusedTag;\n const newValue = value.slice();\n newValue.splice(index, 1);\n handleValue(event, newValue, 'removeOption', {\n option: value[index]\n });\n }\n break;\n default:\n }\n }\n };\n const handleFocus = event => {\n setFocused(true);\n if (openOnFocus && !ignoreFocus.current) {\n handleOpen(event);\n }\n };\n const handleBlur = event => {\n // Ignore the event when using the scrollbar with IE11\n if (unstable_isActiveElementInListbox(listboxRef)) {\n inputRef.current.focus();\n return;\n }\n setFocused(false);\n firstFocus.current = true;\n ignoreFocus.current = false;\n if (autoSelect && highlightedIndexRef.current !== -1 && popupOpen) {\n selectNewValue(event, filteredOptions[highlightedIndexRef.current], 'blur');\n } else if (autoSelect && freeSolo && inputValue !== '') {\n selectNewValue(event, inputValue, 'blur', 'freeSolo');\n } else if (clearOnBlur) {\n resetInputValue(event, value);\n }\n handleClose(event, 'blur');\n };\n const handleInputChange = event => {\n const newValue = event.target.value;\n if (inputValue !== newValue) {\n setInputValueState(newValue);\n setInputPristine(false);\n if (onInputChange) {\n onInputChange(event, newValue, 'input');\n }\n }\n if (newValue === '') {\n if (!disableClearable && !multiple) {\n handleValue(event, null, 'clear');\n }\n } else {\n handleOpen(event);\n }\n };\n const handleOptionMouseMove = event => {\n const index = Number(event.currentTarget.getAttribute('data-option-index'));\n if (highlightedIndexRef.current !== index) {\n setHighlightedIndex({\n event,\n index,\n reason: 'mouse'\n });\n }\n };\n const handleOptionTouchStart = event => {\n setHighlightedIndex({\n event,\n index: Number(event.currentTarget.getAttribute('data-option-index')),\n reason: 'touch'\n });\n isTouch.current = true;\n };\n const handleOptionClick = event => {\n const index = Number(event.currentTarget.getAttribute('data-option-index'));\n selectNewValue(event, filteredOptions[index], 'selectOption');\n isTouch.current = false;\n };\n const handleTagDelete = index => event => {\n const newValue = value.slice();\n newValue.splice(index, 1);\n handleValue(event, newValue, 'removeOption', {\n option: value[index]\n });\n };\n const handlePopupIndicator = event => {\n if (open) {\n handleClose(event, 'toggleInput');\n } else {\n handleOpen(event);\n }\n };\n\n // Prevent input blur when interacting with the combobox\n const handleMouseDown = event => {\n // Prevent focusing the input if click is anywhere outside the Autocomplete\n if (!event.currentTarget.contains(event.target)) {\n return;\n }\n if (event.target.getAttribute('id') !== id) {\n event.preventDefault();\n }\n };\n\n // Focus the input when interacting with the combobox\n const handleClick = event => {\n // Prevent focusing the input if click is anywhere outside the Autocomplete\n if (!event.currentTarget.contains(event.target)) {\n return;\n }\n inputRef.current.focus();\n if (selectOnFocus && firstFocus.current && inputRef.current.selectionEnd - inputRef.current.selectionStart === 0) {\n inputRef.current.select();\n }\n firstFocus.current = false;\n };\n const handleInputMouseDown = event => {\n if (!disabledProp && (inputValue === '' || !open)) {\n handlePopupIndicator(event);\n }\n };\n let dirty = freeSolo && inputValue.length > 0;\n dirty = dirty || (multiple ? value.length > 0 : value !== null);\n let groupedOptions = filteredOptions;\n if (groupBy) {\n // used to keep track of key and indexes in the result array\n const indexBy = new Map();\n let warn = false;\n groupedOptions = filteredOptions.reduce((acc, option, index) => {\n const group = groupBy(option);\n if (acc.length > 0 && acc[acc.length - 1].group === group) {\n acc[acc.length - 1].options.push(option);\n } else {\n if (process.env.NODE_ENV !== 'production') {\n if (indexBy.get(group) && !warn) {\n console.warn(`MUI: The options provided combined with the \\`groupBy\\` method of ${componentName} returns duplicated headers.`, 'You can solve the issue by sorting the options with the output of `groupBy`.');\n warn = true;\n }\n indexBy.set(group, true);\n }\n acc.push({\n key: index,\n index,\n group,\n options: [option]\n });\n }\n return acc;\n }, []);\n }\n if (disabledProp && focused) {\n handleBlur();\n }\n return {\n getRootProps: (other = {}) => _extends({\n 'aria-owns': listboxAvailable ? `${id}-listbox` : null\n }, other, {\n onKeyDown: handleKeyDown(other),\n onMouseDown: handleMouseDown,\n onClick: handleClick\n }),\n getInputLabelProps: () => ({\n id: `${id}-label`,\n htmlFor: id\n }),\n getInputProps: () => ({\n id,\n value: inputValue,\n onBlur: handleBlur,\n onFocus: handleFocus,\n onChange: handleInputChange,\n onMouseDown: handleInputMouseDown,\n // if open then this is handled imperatively so don't let react override\n // only have an opinion about this when closed\n 'aria-activedescendant': popupOpen ? '' : null,\n 'aria-autocomplete': autoComplete ? 'both' : 'list',\n 'aria-controls': listboxAvailable ? `${id}-listbox` : undefined,\n 'aria-expanded': listboxAvailable,\n // Disable browser's suggestion that might overlap with the popup.\n // Handle autocomplete but not autofill.\n autoComplete: 'off',\n ref: inputRef,\n autoCapitalize: 'none',\n spellCheck: 'false',\n role: 'combobox',\n disabled: disabledProp\n }),\n getClearProps: () => ({\n tabIndex: -1,\n onClick: handleClear\n }),\n getPopupIndicatorProps: () => ({\n tabIndex: -1,\n onClick: handlePopupIndicator\n }),\n getTagProps: ({\n index\n }) => _extends({\n key: index,\n 'data-tag-index': index,\n tabIndex: -1\n }, !readOnly && {\n onDelete: handleTagDelete(index)\n }),\n getListboxProps: () => ({\n role: 'listbox',\n id: `${id}-listbox`,\n 'aria-labelledby': `${id}-label`,\n ref: handleListboxRef,\n onMouseDown: event => {\n // Prevent blur\n event.preventDefault();\n }\n }),\n getOptionProps: ({\n index,\n option\n }) => {\n const selected = (multiple ? value : [value]).some(value2 => value2 != null && isOptionEqualToValue(option, value2));\n const disabled = getOptionDisabled ? getOptionDisabled(option) : false;\n return {\n key: getOptionLabel(option),\n tabIndex: -1,\n role: 'option',\n id: `${id}-option-${index}`,\n onMouseMove: handleOptionMouseMove,\n onClick: handleOptionClick,\n onTouchStart: handleOptionTouchStart,\n 'data-option-index': index,\n 'aria-disabled': disabled,\n 'aria-selected': selected\n };\n },\n id,\n inputValue,\n value,\n dirty,\n expanded: popupOpen && anchorEl,\n popupOpen,\n focused: focused || focusedTag !== -1,\n anchorEl,\n setAnchorEl,\n focusedTag,\n groupedOptions\n };\n}","import * as React from 'react';\nconst ListSubheaderDispatch = /*#__PURE__*/React.createContext(undefined);\nexport default ListSubheaderDispatch;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"component\", \"className\", \"children\", \"nested\", \"sticky\", \"variant\", \"color\", \"startAction\", \"endAction\", \"role\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_capitalize as capitalize, unstable_isMuiElement as isMuiElement } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { styled, useThemeProps } from '../styles';\nimport { useColorInversion } from '../styles/ColorInversion';\nimport useSlot from '../utils/useSlot';\nimport { getListItemUtilityClass } from './listItemClasses';\nimport NestedListContext from '../List/NestedListContext';\nimport RowListContext from '../List/RowListContext';\nimport WrapListContext from '../List/WrapListContext';\nimport ComponentListContext from '../List/ComponentListContext';\nimport ListSubheaderDispatch from '../ListSubheader/ListSubheaderContext';\nimport GroupListContext from '../List/GroupListContext';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n sticky,\n nested,\n nesting,\n variant,\n color\n } = ownerState;\n const slots = {\n root: ['root', nested && 'nested', nesting && 'nesting', sticky && 'sticky', color && `color${capitalize(color)}`, variant && `variant${capitalize(variant)}`],\n startAction: ['startAction'],\n endAction: ['endAction']\n };\n return composeClasses(slots, getListItemUtilityClass, {});\n};\nexport const StyledListItem = styled('li')(({\n theme,\n ownerState\n}) => {\n var _theme$variants;\n return [!ownerState.nested && {\n // add negative margin to ListItemButton equal to this ListItem padding\n '--ListItemButton-marginInline': `calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))`,\n '--ListItemButton-marginBlock': 'calc(-1 * var(--ListItem-paddingY))',\n alignItems: 'center',\n marginInline: 'var(--ListItem-marginInline)'\n }, ownerState.nested && {\n // add negative margin to NestedList equal to this ListItem padding\n '--NestedList-marginRight': 'calc(-1 * var(--ListItem-paddingRight))',\n '--NestedList-marginLeft': 'calc(-1 * var(--ListItem-paddingLeft))',\n '--NestedListItem-paddingLeft': `calc(var(--ListItem-paddingLeft) + var(--List-nestedInsetStart))`,\n // add negative margin to ListItem, ListItemButton to make them start from the edge.\n '--ListItemButton-marginBlock': '0px',\n '--ListItemButton-marginInline': 'calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))',\n '--ListItem-marginInline': 'calc(-1 * var(--ListItem-paddingLeft)) calc(-1 * var(--ListItem-paddingRight))',\n flexDirection: 'column'\n }, // Base styles\n _extends({\n // Integration with control elements, e.g. Checkbox, Radio.\n '--unstable_actionRadius': 'calc(var(--ListItem-radius) - var(--variant-borderWidth, 0px))'\n }, ownerState.startAction && {\n '--unstable_startActionWidth': '2rem' // to add sufficient padding-left on ListItemButton\n }, ownerState.endAction && {\n '--unstable_endActionWidth': '2.5rem' // to add sufficient padding-right on ListItemButton\n }, {\n boxSizing: 'border-box',\n borderRadius: 'var(--ListItem-radius)',\n display: 'flex',\n flex: 'none',\n // prevent children from shrinking when the List's height is limited.\n position: 'relative',\n paddingBlockStart: ownerState.nested ? 0 : 'var(--ListItem-paddingY)',\n paddingBlockEnd: ownerState.nested ? 0 : 'var(--ListItem-paddingY)',\n paddingInlineStart: 'var(--ListItem-paddingLeft)',\n paddingInlineEnd: 'var(--ListItem-paddingRight)'\n }, ownerState['data-first-child'] === undefined && _extends({}, ownerState.row ? {\n marginInlineStart: 'var(--List-gap)'\n } : {\n marginBlockStart: 'var(--List-gap)'\n }), ownerState.row && ownerState.wrap && {\n marginInlineStart: 'var(--List-gap)',\n marginBlockStart: 'var(--List-gap)'\n }, {\n minBlockSize: 'var(--ListItem-minHeight)'\n }, ownerState.sticky && {\n // sticky in list item can be found in grouped options\n position: 'sticky',\n top: 'var(--ListItem-stickyTop, 0px)',\n // integration with Menu and Select.\n zIndex: 1,\n background: `var(--ListItem-stickyBackground, ${theme.vars.palette.background.body})`\n }), (_theme$variants = theme.variants[ownerState.variant]) == null ? void 0 : _theme$variants[ownerState.color]];\n});\nconst ListItemRoot = styled(StyledListItem, {\n name: 'JoyListItem',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\nconst ListItemStartAction = styled('div', {\n name: 'JoyListItem',\n slot: 'StartAction',\n overridesResolver: (props, styles) => styles.startAction\n})(({\n ownerState\n}) => ({\n display: 'inherit',\n position: 'absolute',\n top: ownerState.nested ? 'calc(var(--ListItem-minHeight) / 2)' : '50%',\n left: 0,\n transform: 'translate(var(--ListItem-startActionTranslateX), -50%)',\n zIndex: 1 // to stay on top of ListItemButton (default `position: relative`).\n}));\n\nconst ListItemEndAction = styled('div', {\n name: 'JoyListItem',\n slot: 'StartAction',\n overridesResolver: (props, styles) => styles.startAction\n})(({\n ownerState\n}) => ({\n display: 'inherit',\n position: 'absolute',\n top: ownerState.nested ? 'calc(var(--ListItem-minHeight) / 2)' : '50%',\n right: 0,\n transform: 'translate(var(--ListItem-endActionTranslateX), -50%)'\n}));\n/**\n *\n * Demos:\n *\n * - [Lists](https://mui.com/joy-ui/react-list/)\n *\n * API:\n *\n * - [ListItem API](https://mui.com/joy-ui/api/list-item/)\n */\nconst ListItem = /*#__PURE__*/React.forwardRef(function ListItem(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'JoyListItem'\n });\n const group = React.useContext(GroupListContext);\n const listComponent = React.useContext(ComponentListContext);\n const row = React.useContext(RowListContext);\n const wrap = React.useContext(WrapListContext);\n const nesting = React.useContext(NestedListContext);\n const {\n component: componentProp,\n className,\n children,\n nested = false,\n sticky = false,\n variant = 'plain',\n color: colorProp = 'neutral',\n startAction,\n endAction,\n role: roleProp,\n slots = {},\n slotProps = {}\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n getColor\n } = useColorInversion(variant);\n const color = getColor(inProps.color, colorProp);\n const [subheaderId, setSubheaderId] = React.useState('');\n const [listElement, listRole] = (listComponent == null ? void 0 : listComponent.split(':')) || ['', ''];\n const component = componentProp || (listElement && !listElement.match(/^(ul|ol|menu)$/) ? 'div' : undefined);\n let role = group === 'menu' ? 'none' : undefined;\n if (listComponent) {\n // ListItem can be used inside Menu to create nested menus, so it should have role=\"none\"\n // https://www.w3.org/WAI/ARIA/apg/patterns/menubar/examples/menubar-navigation/\n role = {\n menu: 'none',\n menubar: 'none',\n group: 'presentation'\n }[listRole];\n }\n if (roleProp) {\n role = roleProp;\n }\n const ownerState = _extends({}, props, {\n sticky,\n startAction,\n endAction,\n row,\n wrap,\n variant,\n color,\n nesting,\n nested,\n component,\n role\n });\n const classes = useUtilityClasses(ownerState);\n const externalForwardedProps = _extends({}, other, {\n component,\n slots,\n slotProps\n });\n const [SlotRoot, rootProps] = useSlot('root', {\n additionalProps: {\n role\n },\n ref,\n className: clsx(classes.root, className),\n elementType: ListItemRoot,\n externalForwardedProps,\n ownerState\n });\n const [SlotStartAction, startActionProps] = useSlot('startAction', {\n className: classes.startAction,\n elementType: ListItemStartAction,\n externalForwardedProps,\n ownerState\n });\n const [SlotEndAction, endActionProps] = useSlot('endAction', {\n className: classes.endAction,\n elementType: ListItemEndAction,\n externalForwardedProps,\n ownerState\n });\n return /*#__PURE__*/_jsx(ListSubheaderDispatch.Provider, {\n value: setSubheaderId,\n children: /*#__PURE__*/_jsx(NestedListContext.Provider, {\n value: nested ? subheaderId || true : false,\n children: /*#__PURE__*/_jsxs(SlotRoot, _extends({}, rootProps, {\n children: [startAction && /*#__PURE__*/_jsx(SlotStartAction, _extends({}, startActionProps, {\n children: startAction\n })), React.Children.map(children, (child, index) => /*#__PURE__*/React.isValidElement(child) ? /*#__PURE__*/React.cloneElement(child, _extends({}, index === 0 && {\n 'data-first-child': ''\n }, isMuiElement(child, ['ListItem']) && {\n // The ListItem of ListItem should not be 'li'\n component: child.props.component || 'div'\n })) : child), endAction && /*#__PURE__*/_jsx(SlotEndAction, _extends({}, endActionProps, {\n children: endAction\n }))]\n }))\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? ListItem.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'neutral'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['danger', 'neutral', 'primary', '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 element to display at the end of ListItem.\n */\n endAction: PropTypes.node,\n /**\n * If `true`, the component can contain NestedList.\n * @default false\n */\n nested: PropTypes.bool,\n /**\n * @ignore\n */\n role: PropTypes /* @typescript-to-proptypes-ignore */.string,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n endAction: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n startAction: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n endAction: PropTypes.elementType,\n root: PropTypes.elementType,\n startAction: PropTypes.elementType\n }),\n /**\n * The element to display at the start of ListItem.\n */\n startAction: PropTypes.node,\n /**\n * If `true`, the component has sticky position (with top = 0).\n * @default false\n */\n sticky: 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 /**\n * The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.\n * @default 'plain'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['outlined', 'plain', 'soft', 'solid']), PropTypes.string])\n} : void 0;\n\n// @ts-ignore internal logic to prevent
  • in
  • \nListItem.muiName = 'ListItem';\nexport default ListItem;","'use client';\n\nimport * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default createSvgIcon( /*#__PURE__*/_jsx(\"path\", {\n d: \"M7 10l5 5 5-5z\"\n}), 'ArrowDropDown');","import { generateUtilityClass, generateUtilityClasses } from '../className';\nexport function getChipUtilityClass(slot) {\n return generateUtilityClass('MuiChip', slot);\n}\nconst chipClasses = generateUtilityClasses('MuiChip', ['root', 'clickable', 'colorPrimary', 'colorNeutral', 'colorDanger', 'colorSuccess', 'colorWarning', 'colorContext', 'disabled', 'endDecorator', 'focusVisible', 'label', 'labelSm', 'labelMd', 'labelLg', 'sizeSm', 'sizeMd', 'sizeLg', 'startDecorator', 'variantPlain', 'variantSolid', 'variantSoft', 'variantOutlined']);\nexport default chipClasses;","import * as React from 'react';\nconst ChipColorContext = /*#__PURE__*/React.createContext({\n disabled: undefined,\n variant: undefined,\n color: undefined\n});\nexport default ChipColorContext;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"className\", \"color\", \"onClick\", \"disabled\", \"size\", \"variant\", \"startDecorator\", \"endDecorator\", \"component\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { useButton } from '@mui/base/useButton';\nimport { unstable_capitalize as capitalize, unstable_useId as useId } from '@mui/utils';\nimport { useThemeProps } from '../styles';\nimport styled from '../styles/styled';\nimport { VariantColorProvider } from '../styles/variantColorInheritance';\nimport { useColorInversion } from '../styles/ColorInversion';\nimport { resolveSxValue } from '../styles/styleUtils';\nimport chipClasses, { getChipUtilityClass } from './chipClasses';\nimport ChipContext from './ChipContext';\nimport useSlot from '../utils/useSlot';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n size,\n color,\n clickable,\n variant,\n focusVisible\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', color && `color${capitalize(color)}`, size && `size${capitalize(size)}`, variant && `variant${capitalize(variant)}`, clickable && 'clickable'],\n action: ['action', disabled && 'disabled', focusVisible && 'focusVisible'],\n label: ['label', size && `label${capitalize(size)}`],\n startDecorator: ['startDecorator'],\n endDecorator: ['endDecorator']\n };\n return composeClasses(slots, getChipUtilityClass, {});\n};\nconst ChipRoot = styled('div', {\n name: 'JoyChip',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(({\n theme,\n ownerState\n}) => {\n var _theme$variants, _theme$variants2, _theme$variants3;\n const variantStyle = (_theme$variants = theme.variants[ownerState.variant]) == null ? void 0 : _theme$variants[ownerState.color];\n const {\n borderRadius\n } = resolveSxValue({\n theme,\n ownerState\n }, ['borderRadius']);\n return [_extends({\n // for controlling chip delete margin offset\n '--Chip-decoratorChildOffset': 'min(calc(var(--Chip-paddingInline) - (var(--_Chip-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Chip-decoratorChildHeight)) / 2), var(--Chip-paddingInline))',\n '--Chip-decoratorChildRadius': 'max(var(--_Chip-radius) - var(--variant-borderWidth, 0px) - var(--_Chip-paddingBlock), min(var(--_Chip-paddingBlock) + var(--variant-borderWidth, 0px), var(--_Chip-radius) / 2))',\n '--Chip-deleteRadius': 'var(--Chip-decoratorChildRadius)',\n '--Chip-deleteSize': 'var(--Chip-decoratorChildHeight)',\n '--Avatar-radius': 'var(--Chip-decoratorChildRadius)',\n '--Avatar-size': 'var(--Chip-decoratorChildHeight)',\n '--Icon-margin': 'initial',\n // reset the icon's margin.\n '--Icon-color': 'currentColor',\n '--unstable_actionRadius': 'var(--_Chip-radius)'\n }, ownerState.size === 'sm' && {\n '--Chip-paddingInline': '0.5rem',\n '--Chip-decoratorChildHeight': 'calc(min(1.125rem, var(--_Chip-minHeight)) - 2 * var(--variant-borderWidth, 0px))',\n '--Icon-fontSize': theme.vars.fontSize.sm,\n '--_Chip-minHeight': 'var(--Chip-minHeight, 1.5rem)',\n gap: '0.25rem'\n }, ownerState.size === 'md' && {\n '--Chip-paddingInline': '0.75rem',\n '--Chip-decoratorChildHeight': 'min(1.375rem, var(--_Chip-minHeight))',\n '--Icon-fontSize': theme.vars.fontSize.lg,\n '--_Chip-minHeight': 'var(--Chip-minHeight, 2rem)',\n gap: '0.375rem'\n }, ownerState.size === 'lg' && {\n '--Chip-paddingInline': '1rem',\n '--Chip-decoratorChildHeight': 'min(1.75rem, var(--_Chip-minHeight))',\n '--Icon-fontSize': theme.vars.fontSize.xl,\n '--_Chip-minHeight': 'var(--Chip-minHeight, 2.5rem)',\n gap: '0.5rem'\n }, {\n '--_Chip-radius': 'var(--Chip-radius, 1.5rem)',\n '--_Chip-paddingBlock': 'max((var(--_Chip-minHeight) - 2 * var(--variant-borderWidth, 0px) - var(--Chip-decoratorChildHeight)) / 2, 0px)',\n minHeight: 'var(--_Chip-minHeight)',\n maxWidth: 'max-content',\n // to prevent Chip from stretching to full width when used with flexbox\n paddingInline: 'var(--Chip-paddingInline)',\n borderRadius: 'var(--_Chip-radius)',\n position: 'relative',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n whiteSpace: 'nowrap',\n textDecoration: 'none',\n verticalAlign: 'middle',\n boxSizing: 'border-box'\n }, theme.typography[`body-${{\n sm: 'xs',\n md: 'sm',\n lg: 'md'\n }[ownerState.size]}`], {\n fontWeight: theme.vars.fontWeight.md,\n [`&.${chipClasses.disabled}`]: {\n color: (_theme$variants2 = theme.variants[`${ownerState.variant}Disabled`]) == null || (_theme$variants2 = _theme$variants2[ownerState.color]) == null ? void 0 : _theme$variants2.color\n }\n }), ...(!ownerState.clickable ? [_extends({\n backgroundColor: theme.vars.palette.background.surface\n }, variantStyle, {\n [`&.${chipClasses.disabled}`]: (_theme$variants3 = theme.variants[`${ownerState.variant}Disabled`]) == null ? void 0 : _theme$variants3[ownerState.color]\n })] : [{\n '--variant-borderWidth': '0px',\n color: variantStyle == null ? void 0 : variantStyle.color\n }]), borderRadius !== undefined && {\n '--_Chip-radius': borderRadius\n }];\n});\nconst ChipLabel = styled('span', {\n name: 'JoyChip',\n slot: 'Label',\n overridesResolver: (props, styles) => styles.label\n})(({\n ownerState\n}) => _extends({\n display: 'inline-block',\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n order: 1,\n minInlineSize: 0,\n flexGrow: 1\n}, ownerState.clickable && {\n zIndex: 1,\n pointerEvents: 'none'\n}));\nconst ChipAction = styled('button', {\n name: 'JoyChip',\n slot: 'Action',\n overridesResolver: (props, styles) => styles.action\n})(({\n theme,\n ownerState\n}) => {\n var _theme$variants4, _theme$variants5, _theme$variants6, _theme$variants7;\n return [{\n '--Icon-color': ownerState.color !== 'neutral' || ownerState.variant === 'solid' ? 'currentColor' : theme.vars.palette.text.icon,\n position: 'absolute',\n zIndex: 0,\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n width: '100%',\n // To fix Firefox issue (https://github.com/mui/material-ui/issues/36877)\n border: 'none',\n cursor: 'pointer',\n padding: 'initial',\n margin: 'initial',\n backgroundColor: 'initial',\n textDecoration: 'none',\n borderRadius: 'inherit',\n [theme.focus.selector]: theme.focus.default\n }, _extends({\n backgroundColor: theme.vars.palette.background.surface\n }, (_theme$variants4 = theme.variants[ownerState.variant]) == null ? void 0 : _theme$variants4[ownerState.color]), {\n '&:hover': (_theme$variants5 = theme.variants[`${ownerState.variant}Hover`]) == null ? void 0 : _theme$variants5[ownerState.color]\n }, {\n '&:active': (_theme$variants6 = theme.variants[`${ownerState.variant}Active`]) == null ? void 0 : _theme$variants6[ownerState.color]\n }, {\n [`&.${chipClasses.disabled}`]: (_theme$variants7 = theme.variants[`${ownerState.variant}Disabled`]) == null ? void 0 : _theme$variants7[ownerState.color]\n }];\n});\nconst ChipStartDecorator = styled('span', {\n name: 'JoyChip',\n slot: 'StartDecorator',\n overridesResolver: (props, styles) => styles.startDecorator\n})({\n '--Avatar-marginInlineStart': 'calc(var(--Chip-decoratorChildOffset) * -1)',\n '--IconButton-margin': '0 0 0 calc(var(--Chip-decoratorChildOffset) * -1)',\n '--Icon-margin': '0 0 0 calc(var(--Chip-paddingInline) / -4)',\n display: 'inherit',\n // set zIndex to 1 with order to stay on top of other controls, e.g. Checkbox, Radio\n order: 0,\n zIndex: 1,\n pointerEvents: 'none'\n});\nconst ChipEndDecorator = styled('span', {\n name: 'JoyChip',\n slot: 'EndDecorator',\n overridesResolver: (props, styles) => styles.endDecorator\n})({\n '--IconButton-margin': '0 calc(var(--Chip-decoratorChildOffset) * -1) 0 0',\n '--Icon-margin': '0 calc(var(--Chip-paddingInline) / -4) 0 0',\n display: 'inherit',\n // set zIndex to 1 with order to stay on top of other controls, e.g. Checkbox, Radio\n order: 2,\n zIndex: 1,\n pointerEvents: 'none'\n});\n\n/**\n * Chips represent complex entities in small blocks, such as a contact.\n *\n * Demos:\n *\n * - [Chip](https://mui.com/joy-ui/react-chip/)\n *\n * API:\n *\n * - [Chip API](https://mui.com/joy-ui/api/chip/)\n */\nconst Chip = /*#__PURE__*/React.forwardRef(function Chip(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'JoyChip'\n });\n const {\n children,\n className,\n color: colorProp = 'neutral',\n onClick,\n disabled = false,\n size = 'md',\n variant = 'soft',\n startDecorator,\n endDecorator,\n component,\n slots = {},\n slotProps = {}\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n getColor\n } = useColorInversion(variant);\n const color = getColor(inProps.color, colorProp);\n const clickable = !!onClick || !!slotProps.action;\n const ownerState = _extends({}, props, {\n disabled,\n size,\n color,\n variant,\n clickable,\n focusVisible: false\n });\n const resolvedActionProps = typeof slotProps.action === 'function' ? slotProps.action(ownerState) : slotProps.action;\n const actionRef = React.useRef(null);\n const {\n focusVisible,\n getRootProps\n } = useButton(_extends({}, resolvedActionProps, {\n disabled,\n rootRef: actionRef\n }));\n ownerState.focusVisible = focusVisible;\n const classes = useUtilityClasses(ownerState);\n const externalForwardedProps = _extends({}, other, {\n component,\n slots,\n slotProps\n });\n const [SlotRoot, rootProps] = useSlot('root', {\n ref,\n className: clsx(classes.root, className),\n elementType: ChipRoot,\n externalForwardedProps,\n ownerState\n });\n const [SlotLabel, labelProps] = useSlot('label', {\n className: classes.label,\n elementType: ChipLabel,\n externalForwardedProps,\n ownerState\n });\n\n // @ts-ignore internal logic.\n const id = useId(labelProps.id);\n const [SlotAction, actionProps] = useSlot('action', {\n className: classes.action,\n elementType: ChipAction,\n externalForwardedProps,\n ownerState,\n getSlotProps: getRootProps,\n additionalProps: {\n 'aria-labelledby': id,\n as: resolvedActionProps == null ? void 0 : resolvedActionProps.component,\n onClick\n }\n });\n const [SlotStartDecorator, startDecoratorProps] = useSlot('startDecorator', {\n className: classes.startDecorator,\n elementType: ChipStartDecorator,\n externalForwardedProps,\n ownerState\n });\n const [SlotEndDecorator, endDecoratorProps] = useSlot('endDecorator', {\n className: classes.endDecorator,\n elementType: ChipEndDecorator,\n externalForwardedProps,\n ownerState\n });\n const chipContextValue = React.useMemo(() => ({\n disabled\n }), [disabled]);\n return /*#__PURE__*/_jsx(ChipContext.Provider, {\n value: chipContextValue,\n children: /*#__PURE__*/_jsx(VariantColorProvider, {\n variant: variant,\n color: colorProp,\n children: /*#__PURE__*/_jsxs(SlotRoot, _extends({}, rootProps, {\n children: [clickable && /*#__PURE__*/_jsx(SlotAction, _extends({}, actionProps)), /*#__PURE__*/_jsx(SlotLabel, _extends({}, labelProps, {\n id: id,\n children: children\n })), startDecorator && /*#__PURE__*/_jsx(SlotStartDecorator, _extends({}, startDecoratorProps, {\n children: startDecorator\n })), endDecorator && /*#__PURE__*/_jsx(SlotEndDecorator, _extends({}, endDecoratorProps, {\n children: endDecorator\n }))]\n }))\n })\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Chip.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'neutral'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['danger', 'neutral', 'primary', '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 * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * Element placed after the children.\n */\n endDecorator: PropTypes.node,\n /**\n * Element action click handler.\n */\n onClick: PropTypes.func,\n /**\n * The size of the component.\n * It accepts theme values between 'sm' and 'lg'.\n * @default 'md'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['lg', 'md', 'sm']), PropTypes.string]),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n action: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n endDecorator: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n label: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n startDecorator: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n action: PropTypes.elementType,\n endDecorator: PropTypes.elementType,\n label: PropTypes.elementType,\n root: PropTypes.elementType,\n startDecorator: PropTypes.elementType\n }),\n /**\n * Element placed before the children.\n */\n startDecorator: 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 /**\n * The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.\n * @default 'soft'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['outlined', 'plain', 'soft', 'solid']), PropTypes.string])\n} : void 0;\nexport default Chip;","'use client';\n\nimport * as React from 'react';\nimport createSvgIcon from '../../utils/createSvgIcon';\n\n/**\n * @ignore - internal component.\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport default 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}), 'Cancel');","import { generateUtilityClass, generateUtilityClasses } from '../className';\nexport function getChipDeleteUtilityClass(slot) {\n return generateUtilityClass('MuiChipDelete', slot);\n}\nconst chipDeleteClasses = generateUtilityClasses('MuiChipDelete', ['root', 'disabled', 'focusVisible', 'colorPrimary', 'colorNeutral', 'colorDanger', 'colorSuccess', 'colorWarning', 'colorContext', 'variantPlain', 'variantSolid', 'variantSoft', 'variantOutlined']);\nexport default chipDeleteClasses;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nvar _Cancel;\nconst _excluded = [\"children\", \"variant\", \"color\", \"disabled\", \"onKeyDown\", \"onDelete\", \"onClick\", \"component\", \"slots\", \"slotProps\"],\n _excluded2 = [\"onDelete\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport { unstable_capitalize as capitalize, unstable_useForkRef as useForkRef } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { useButton } from '@mui/base/useButton';\nimport { useThemeProps } from '../styles';\nimport styled from '../styles/styled';\nimport { useVariantColor } from '../styles/variantColorInheritance';\nimport { useColorInversion } from '../styles/ColorInversion';\nimport Cancel from '../internal/svg-icons/Cancel';\nimport { getChipDeleteUtilityClass } from './chipDeleteClasses';\nimport ChipContext from '../Chip/ChipContext';\nimport useSlot from '../utils/useSlot';\nimport { StyledIconButton } from '../IconButton/IconButton';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n focusVisible,\n variant,\n color,\n disabled\n } = ownerState;\n const slots = {\n root: ['root', disabled && 'disabled', focusVisible && 'focusVisible', variant && `variant${capitalize(variant)}`, color && `color${capitalize(color)}`]\n };\n return composeClasses(slots, getChipDeleteUtilityClass, {});\n};\nconst ChipDeleteRoot = styled(StyledIconButton, {\n name: 'JoyChipDelete',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({\n '--IconButton-size': 'var(--Chip-deleteSize, 2rem)',\n '--Icon-fontSize': 'calc(var(--IconButton-size, 2rem) / 1.3)',\n pointerEvents: 'visible',\n // force the ChipDelete to be hoverable because the decorator can have pointerEvents 'none'\n borderRadius: 'var(--Chip-deleteRadius, 50%)',\n zIndex: 1,\n // overflow above sibling button or anchor\n padding: 0 // reset user agent stylesheet\n});\n\n/**\n *\n * Demos:\n *\n * - [Chip](https://mui.com/joy-ui/react-chip/)\n *\n * API:\n *\n * - [ChipDelete API](https://mui.com/joy-ui/api/chip-delete/)\n */\nconst ChipDelete = /*#__PURE__*/React.forwardRef(function ChipDelete(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'JoyChipDelete'\n });\n const {\n children,\n variant: variantProp = 'plain',\n color: colorProp = 'neutral',\n disabled: disabledProp,\n onKeyDown,\n onDelete,\n onClick,\n component,\n slots = {},\n slotProps = {}\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const chipContext = React.useContext(ChipContext);\n const {\n variant = variantProp,\n color: inheritedColor = colorProp\n } = useVariantColor(inProps.variant, inProps.color);\n const {\n getColor\n } = useColorInversion(variant);\n const color = getColor(inProps.color, inheritedColor);\n const disabled = disabledProp != null ? disabledProp : chipContext.disabled;\n const buttonRef = React.useRef(null);\n const handleRef = useForkRef(buttonRef, ref);\n const {\n focusVisible,\n getRootProps\n } = useButton(_extends({}, props, {\n disabled,\n rootRef: handleRef\n }));\n const ownerState = _extends({}, props, {\n disabled,\n variant,\n color,\n focusVisible\n });\n const classes = useUtilityClasses(ownerState);\n const externalForwardedProps = _extends({}, other, {\n component,\n slots,\n slotProps\n });\n const handleClickDelete = event => {\n if (!disabled && onDelete) {\n onDelete(event);\n }\n if (onClick) {\n onClick(event);\n }\n };\n const handleKeyDelete = event => {\n if (['Backspace', 'Enter', 'Delete'].includes(event.key)) {\n event.preventDefault();\n if (!disabled && onDelete) {\n onDelete(event);\n }\n }\n if (onKeyDown) {\n onKeyDown(event);\n }\n };\n const [SlotRoot, rootProps] = useSlot('root', {\n ref,\n elementType: ChipDeleteRoot,\n getSlotProps: getRootProps,\n externalForwardedProps,\n ownerState,\n additionalProps: {\n as: component,\n onKeyDown: handleKeyDelete,\n onClick: handleClickDelete\n },\n className: classes.root\n });\n const restOfRootProps = _objectWithoutPropertiesLoose(rootProps, _excluded2);\n return /*#__PURE__*/_jsx(SlotRoot, _extends({}, restOfRootProps, {\n children: children != null ? children : _Cancel || (_Cancel = /*#__PURE__*/_jsx(Cancel, {}))\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? ChipDelete.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * If provided, it will replace the default icon.\n */\n children: PropTypes.node,\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'neutral'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['danger', 'neutral', 'primary', '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 * If `true`, the component is disabled.\n * If `undefined`, the value inherits from the parent chip via a React context.\n */\n disabled: PropTypes.bool,\n /**\n * @ignore\n */\n onClick: PropTypes.func,\n /**\n * Callback fired when the component is not disabled and either:\n * - `Backspace`, `Enter` or `Delete` is pressed.\n * - The component is clicked.\n */\n onDelete: PropTypes.func,\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\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 [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.\n * @default 'plain'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['outlined', 'plain', 'soft', 'solid']), PropTypes.string])\n} : void 0;\nexport default ChipDelete;","import { generateUtilityClass, generateUtilityClasses } from '../className';\nexport function getListSubheaderUtilityClass(slot) {\n return generateUtilityClass('MuiListSubheader', slot);\n}\nconst listSubheaderClasses = generateUtilityClasses('MuiListSubheader', ['root', 'sticky', 'colorPrimary', 'colorNeutral', 'colorDanger', 'colorSuccess', 'colorWarning', 'colorContext', 'variantPlain', 'variantSoft', 'variantOutlined', 'variantSolid']);\nexport default listSubheaderClasses;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"component\", \"className\", \"children\", \"id\", \"sticky\", \"variant\", \"color\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { unstable_useId as useId, unstable_capitalize as capitalize } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { styled, useThemeProps } from '../styles';\nimport { useColorInversion } from '../styles/ColorInversion';\nimport { getListSubheaderUtilityClass } from './listSubheaderClasses';\nimport ListSubheaderDispatch from './ListSubheaderContext';\nimport useSlot from '../utils/useSlot';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n variant,\n color,\n sticky\n } = ownerState;\n const slots = {\n root: ['root', sticky && 'sticky', color && `color${capitalize(color)}`, variant && `variant${capitalize(variant)}`]\n };\n return composeClasses(slots, getListSubheaderUtilityClass, {});\n};\nconst ListSubheaderRoot = styled('div', {\n name: 'JoyListSubheader',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(({\n theme,\n ownerState\n}) => {\n var _theme$vars$palette, _theme$variants;\n return _extends({\n boxSizing: 'border-box',\n display: 'flex',\n alignItems: 'center',\n marginInline: 'var(--ListItem-marginInline)',\n paddingBlock: 'var(--ListItem-paddingY)',\n paddingInlineStart: 'var(--ListItem-paddingLeft)',\n paddingInlineEnd: 'var(--ListItem-paddingRight)',\n minBlockSize: 'var(--ListItem-minHeight)'\n }, theme.typography['body-xs'], {\n fontSize: 'max(0.75em, 0.625rem)',\n textTransform: 'uppercase',\n letterSpacing: '0.1em'\n }, ownerState.sticky && {\n position: 'sticky',\n top: 'var(--ListItem-stickyTop, 0px)',\n // integration with Menu and Select.\n zIndex: 1,\n background: 'var(--ListItem-stickyBackground)'\n }, {\n color: ownerState.color && ownerState.color !== 'context' ? `rgba(${(_theme$vars$palette = theme.vars.palette[ownerState.color]) == null ? void 0 : _theme$vars$palette.mainChannel} / 1)` : theme.vars.palette.text.tertiary\n }, (_theme$variants = theme.variants[ownerState.variant]) == null ? void 0 : _theme$variants[ownerState.color]);\n});\n/**\n *\n * Demos:\n *\n * - [Lists](https://mui.com/joy-ui/react-list/)\n *\n * API:\n *\n * - [ListSubheader API](https://mui.com/joy-ui/api/list-subheader/)\n */\nconst ListSubheader = /*#__PURE__*/React.forwardRef(function ListSubheader(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'JoyListSubheader'\n });\n const {\n component,\n className,\n children,\n id: idOverride,\n sticky = false,\n variant,\n color: colorProp,\n slots = {},\n slotProps = {}\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n getColor\n } = useColorInversion(variant);\n const color = getColor(inProps.color, colorProp);\n const id = useId(idOverride);\n const setSubheaderId = React.useContext(ListSubheaderDispatch);\n React.useEffect(() => {\n if (setSubheaderId) {\n setSubheaderId(id || '');\n }\n }, [setSubheaderId, id]);\n const ownerState = _extends({}, props, {\n id,\n sticky,\n variant,\n color: variant ? color != null ? color : 'neutral' : color\n });\n const classes = useUtilityClasses(ownerState);\n const externalForwardedProps = _extends({}, other, {\n component,\n slots,\n slotProps\n });\n const [SlotRoot, rootProps] = useSlot('root', {\n ref,\n className: clsx(classes.root, className),\n elementType: ListSubheaderRoot,\n externalForwardedProps,\n ownerState,\n additionalProps: {\n as: component,\n id\n }\n });\n return /*#__PURE__*/_jsx(SlotRoot, _extends({}, rootProps, {\n children: children\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? ListSubheader.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * The content of the component.\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['danger', 'neutral', 'primary', '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 * @ignore\n */\n id: PropTypes.string,\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\n /**\n * If `true`, the component has sticky position (with top = 0).\n * @default false\n */\n sticky: 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 /**\n * The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['outlined', 'plain', 'soft', 'solid']), PropTypes.string])\n} : void 0;\nexport default ListSubheader;","import { generateUtilityClass, generateUtilityClasses } from '../className';\nexport function getAutocompleteUtilityClass(slot) {\n return generateUtilityClass('MuiAutocomplete', slot);\n}\nconst autocompleteClasses = generateUtilityClasses('MuiAutocomplete', ['root', 'wrapper', 'input', 'startDecorator', 'endDecorator', 'formControl', 'focused', 'disabled', 'error', 'multiple', 'limitTag', 'hasPopupIcon', 'hasClearIcon', 'clearIndicator', 'popupIndicator', 'popupIndicatorOpen', 'listbox', 'option', 'loading', 'noOptions', 'colorPrimary', 'colorNeutral', 'colorDanger', 'colorSuccess', 'colorWarning', 'colorContext', 'sizeSm', 'sizeMd', 'sizeLg', 'variantPlain', 'variantOutlined', 'variantSoft', 'variantSolid']);\nexport default autocompleteClasses;","'use client';\n\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nconst _excluded = [\"anchorEl\", \"direction\", \"disablePortal\", \"keepMounted\", \"modifiers\", \"open\", \"placement\", \"popperOptions\", \"popperRef\", \"TransitionProps\"],\n _excluded2 = [\"children\", \"className\", \"component\", \"color\", \"variant\", \"size\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { unstable_capitalize as capitalize } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { StyledList } from '../List/List';\nimport { styled, useThemeProps } from '../styles';\nimport { VariantColorProvider } from '../styles/variantColorInheritance';\nimport { getAutocompleteListboxUtilityClass } from './autocompleteListboxClasses';\nimport listItemClasses from '../ListItem/listItemClasses';\nimport listClasses from '../List/listClasses';\nimport { scopedVariables } from '../List/ListProvider';\nimport { useColorInversion } from '../styles/ColorInversion';\nimport useSlot from '../utils/useSlot';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n variant,\n color,\n size\n } = ownerState;\n const slots = {\n root: ['root', variant && `variant${capitalize(variant)}`, color && `color${capitalize(color)}`, size && `size${capitalize(size)}`]\n };\n return composeClasses(slots, getAutocompleteListboxUtilityClass, {});\n};\nconst excludePopperProps = _ref => {\n let other = _objectWithoutPropertiesLoose(_ref, _excluded);\n return other;\n};\nexport const StyledAutocompleteListbox = styled(StyledList)(({\n theme,\n ownerState\n}) => {\n var _theme$variants;\n const variantStyle = (_theme$variants = theme.variants[ownerState.variant]) == null ? void 0 : _theme$variants[ownerState.color];\n return _extends({\n '--focus-outline-offset': `calc(${theme.vars.focus.thickness} * -1)`,\n // to prevent the focus outline from being cut by overflow\n '--ListItem-stickyBackground': (variantStyle == null ? void 0 : variantStyle.backgroundColor) || (variantStyle == null ? void 0 : variantStyle.background) || theme.vars.palette.background.popup,\n '--ListItem-stickyTop': 'calc(var(--List-padding, var(--ListDivider-gap)) * -1)'\n }, scopedVariables, {\n boxShadow: theme.shadow.md,\n borderRadius: `var(--List-radius, ${theme.vars.radius.sm})`\n }, !(variantStyle != null && variantStyle.backgroundColor) && {\n backgroundColor: theme.vars.palette.background.popup\n }, {\n zIndex: theme.vars.zIndex.popup,\n overflow: 'auto',\n maxHeight: '40vh',\n position: 'relative',\n // to make sure that the listbox is positioned for grouped options to work.\n '&:empty': {\n visibility: 'hidden'\n },\n [`& .${listItemClasses.nested}, & .${listItemClasses.nested} .${listClasses.root}`]: {\n // For grouped options autocomplete:\n // Force the position to make the scroll into view logic works because the `element.offsetTop` should reference to the listbox, not the grouped list.\n // See the implementation of the `useAutocomplete` line:370\n //\n // Resource: https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/offsetTop\n position: 'initial'\n }\n });\n});\nconst AutocompleteListboxRoot = styled(StyledAutocompleteListbox, {\n name: 'JoyAutocompleteListbox',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\n/**\n *\n * Demos:\n *\n * - [Autocomplete](https://mui.com/joy-ui/react-autocomplete/)\n *\n * API:\n *\n * - [AutocompleteListbox API](https://mui.com/joy-ui/api/autocomplete-listbox/)\n */\nconst AutocompleteListbox = /*#__PURE__*/React.forwardRef(function AutocompleteListbox(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'JoyAutocompleteListbox'\n });\n const {\n children,\n className,\n component,\n color: colorProp = 'neutral',\n variant = 'outlined',\n size = 'md',\n slots = {},\n slotProps = {}\n } = props,\n otherProps = _objectWithoutPropertiesLoose(props, _excluded2);\n const {\n getColor\n } = useColorInversion(variant);\n const color = getColor(inProps.color, colorProp);\n const ownerState = _extends({}, props, {\n size,\n color,\n variant,\n nesting: false,\n row: false,\n wrap: false\n });\n const other = excludePopperProps(otherProps);\n const classes = useUtilityClasses(ownerState);\n const externalForwardedProps = _extends({}, other, {\n component,\n slots,\n slotProps\n });\n const [SlotRoot, rootProps] = useSlot('root', {\n ref,\n className: clsx(classes.root, className),\n elementType: AutocompleteListboxRoot,\n externalForwardedProps,\n ownerState,\n additionalProps: {\n role: 'listbox'\n }\n });\n return /*#__PURE__*/_jsx(VariantColorProvider, {\n variant: variant,\n color: colorProp,\n children: /*#__PURE__*/_jsx(SlotRoot, _extends({}, rootProps, {\n children: children\n }))\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? AutocompleteListbox.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'neutral'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['danger', 'neutral', 'primary', '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 size of the component (affect other nested list* components).\n * @default 'md'\n */\n size: PropTypes.oneOf(['sm', 'md', 'lg']),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\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 [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.\n * @default 'outlined'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['contained', 'light', 'outlined', 'text']), PropTypes.string])\n} : void 0;\nexport default AutocompleteListbox;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nconst _excluded = [\"children\", \"component\", \"color\", \"variant\", \"className\", \"slots\", \"slotProps\"];\nimport * as React from 'react';\nimport clsx from 'clsx';\nimport PropTypes from 'prop-types';\nimport { unstable_capitalize as capitalize } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { StyledListItemButton } from '../ListItemButton/ListItemButton';\nimport { styled, useThemeProps } from '../styles';\nimport { useVariantColor } from '../styles/variantColorInheritance';\nimport { getAutocompleteOptionUtilityClass } from './autocompleteOptionClasses';\nimport { useColorInversion } from '../styles/ColorInversion';\nimport useSlot from '../utils/useSlot';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst useUtilityClasses = ownerState => {\n const {\n color,\n variant\n } = ownerState;\n const slots = {\n root: ['root', color && `color${capitalize(color)}`, variant && `variant${capitalize(variant)}`]\n };\n return composeClasses(slots, getAutocompleteOptionUtilityClass, {});\n};\nexport const StyledAutocompleteOption = styled(StyledListItemButton)(({\n theme,\n ownerState\n}) => {\n var _theme$variants, _theme$variants2;\n return {\n '&[aria-disabled=\"true\"]': (_theme$variants = theme.variants[`${ownerState.variant}Disabled`]) == null ? void 0 : _theme$variants[ownerState.color],\n '&[aria-selected=\"true\"]': _extends({}, (_theme$variants2 = theme.variants[`${ownerState.variant}Active`]) == null ? void 0 : _theme$variants2[ownerState.color], {\n fontWeight: theme.vars.fontWeight.md\n })\n };\n});\nconst AutocompleteOptionRoot = styled(StyledAutocompleteOption, {\n name: 'JoyAutocompleteOption',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})({});\n/**\n *\n * Demos:\n *\n * - [Autocomplete](https://mui.com/joy-ui/react-autocomplete/)\n *\n * API:\n *\n * - [AutocompleteOption API](https://mui.com/joy-ui/api/autocomplete-option/)\n */\nconst AutocompleteOption = /*#__PURE__*/React.forwardRef(function AutocompleteOption(inProps, ref) {\n const props = useThemeProps({\n props: inProps,\n name: 'JoyAutocompleteOption'\n });\n const {\n children,\n component = 'li',\n color: colorProp = 'neutral',\n variant: variantProp = 'plain',\n className,\n slots = {},\n slotProps = {}\n } = props,\n other = _objectWithoutPropertiesLoose(props, _excluded);\n const {\n variant = variantProp,\n color: inheritedColor = colorProp\n } = useVariantColor(inProps.variant, inProps.color);\n const {\n getColor\n } = useColorInversion(variant);\n const color = getColor(inProps.color, inheritedColor);\n const ownerState = _extends({}, props, {\n component,\n color,\n variant\n });\n const classes = useUtilityClasses(ownerState);\n const externalForwardedProps = _extends({}, other, {\n component,\n slots,\n slotProps\n });\n const [SlotRoot, rootProps] = useSlot('root', {\n ref,\n className: clsx(classes.root, className),\n elementType: AutocompleteOptionRoot,\n externalForwardedProps,\n ownerState,\n additionalProps: {\n as: component,\n role: 'option'\n }\n });\n return /*#__PURE__*/_jsx(SlotRoot, _extends({}, rootProps, {\n children: children\n }));\n});\nprocess.env.NODE_ENV !== \"production\" ? AutocompleteOption.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * @ignore\n */\n children: PropTypes.node,\n /**\n * @ignore\n */\n className: PropTypes.string,\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'neutral'\n */\n color: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['danger', 'neutral', 'primary', '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 props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n root: PropTypes.elementType\n }),\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 [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.\n * @default 'plain'\n */\n variant: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['contained', 'light', 'outlined', 'text']), PropTypes.string])\n} : void 0;\nexport default AutocompleteOption;","'use client';\n\nimport _objectWithoutPropertiesLoose from \"@babel/runtime/helpers/esm/objectWithoutPropertiesLoose\";\nimport _extends from \"@babel/runtime/helpers/esm/extends\";\nvar _ClearIcon, _ArrowDropDownIcon;\nconst _excluded = [\"autoComplete\", \"autoHighlight\", \"autoSelect\", \"blurOnSelect\", \"clearOnBlur\", \"clearOnEscape\", \"defaultValue\", \"disableCloseOnSelect\", \"disabledItemsFocusable\", \"disableListWrap\", \"filterSelectedOptions\", \"handleHomeEndKeys\", \"includeInputInList\", \"openOnFocus\", \"selectOnFocus\"],\n _excluded2 = [\"aria-describedby\", \"aria-label\", \"aria-labelledby\", \"autoFocus\", \"clearIcon\", \"clearText\", \"closeText\", \"disableClearable\", \"disabled\", \"endDecorator\", \"error\", \"filterOptions\", \"forcePopupIcon\", \"freeSolo\", \"getLimitTagsText\", \"getOptionDisabled\", \"getOptionLabel\", \"isOptionEqualToValue\", \"groupBy\", \"id\", \"inputValue\", \"limitTags\", \"loading\", \"loadingText\", \"multiple\", \"name\", \"noOptionsText\", \"onChange\", \"onClose\", \"onHighlightChange\", \"onInputChange\", \"onOpen\", \"open\", \"openText\", \"options\", \"placeholder\", \"popupIcon\", \"readOnly\", \"renderGroup\", \"renderOption\", \"renderTags\", \"required\", \"type\", \"startDecorator\", \"size\", \"color\", \"variant\", \"value\", \"component\", \"slots\", \"slotProps\"],\n _excluded3 = [\"onDelete\"],\n _excluded4 = [\"onBlur\", \"onFocus\", \"onMouseDown\"];\nimport * as React from 'react';\nimport PropTypes from 'prop-types';\nimport clsx from 'clsx';\nimport { chainPropTypes, integerPropType, unstable_useForkRef as useForkRef, unstable_capitalize as capitalize } from '@mui/utils';\nimport { unstable_composeClasses as composeClasses } from '@mui/base/composeClasses';\nimport { useAutocomplete } from '@mui/base/useAutocomplete';\nimport { Popper } from '@mui/base/Popper';\nimport { useThemeProps } from '../styles';\nimport ClearIcon from '../internal/svg-icons/Close';\nimport ArrowDropDownIcon from '../internal/svg-icons/ArrowDropDown';\nimport styled from '../styles/styled';\nimport { VariantColorProvider, getChildVariantAndColor } from '../styles/variantColorInheritance';\n// slot components\nimport { StyledIconButton } from '../IconButton/IconButton';\n// default render components\nimport Chip, { chipClasses } from '../Chip';\nimport ChipDelete from '../ChipDelete';\nimport { StyledInputRoot, StyledInputHtml, StyledInputStartDecorator, StyledInputEndDecorator } from '../Input/Input';\nimport List from '../List';\nimport ListProvider from '../List/ListProvider';\nimport ListSubheader from '../ListSubheader';\nimport ListItem from '../ListItem';\nimport autocompleteClasses, { getAutocompleteUtilityClass } from './autocompleteClasses';\nimport FormControlContext from '../FormControl/FormControlContext';\nimport { StyledAutocompleteListbox } from '../AutocompleteListbox/AutocompleteListbox';\nimport { StyledAutocompleteOption } from '../AutocompleteOption/AutocompleteOption';\nimport useSlot from '../utils/useSlot';\nimport ColorInversion, { useColorInversion } from '../styles/ColorInversion';\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nimport { jsxs as _jsxs } from \"react/jsx-runtime\";\nconst defaultIsActiveElementInListbox = listboxRef => listboxRef.current !== null && listboxRef.current.contains(document.activeElement);\n// @ts-ignore\nconst defaultGetOptionLabel = option => {\n var _option$label;\n return (_option$label = option.label) != null ? _option$label : option;\n};\nconst defaultLimitTagsText = more => `+${more}`;\nconst defaultRenderGroup = params => /*#__PURE__*/_jsxs(ListItem, {\n nested: true,\n children: [/*#__PURE__*/_jsx(ListSubheader, {\n sticky: true,\n children: params.group\n }), /*#__PURE__*/_jsx(List, {\n children: params.children\n })]\n}, params.key);\nconst useUtilityClasses = ownerState => {\n const {\n disabled,\n focused,\n hasClearIcon,\n hasPopupIcon,\n popupOpen,\n variant,\n color,\n size,\n multiple\n } = ownerState;\n const slots = {\n root: ['root', focused && 'focused', hasClearIcon && 'hasClearIcon', hasPopupIcon && 'hasPopupIcon', variant && `variant${capitalize(variant)}`, color && `color${capitalize(color)}`, size && `size${capitalize(size)}`],\n wrapper: ['wrapper', multiple && 'multiple'],\n input: ['input'],\n startDecorator: ['startDecorator'],\n endDecorator: ['endDecorator'],\n clearIndicator: ['clearIndicator'],\n popupIndicator: ['popupIndicator', popupOpen && 'popupIndicatorOpen', disabled && 'disabled'],\n listbox: ['listbox'],\n option: ['option'],\n loading: ['loading'],\n noOptions: ['noOptions'],\n limitTag: ['limitTag']\n };\n return composeClasses(slots, getAutocompleteUtilityClass, {});\n};\nconst AutocompleteRoot = styled(StyledInputRoot, {\n name: 'JoyAutocomplete',\n slot: 'Root',\n overridesResolver: (props, styles) => styles.root\n})(({\n ownerState\n}) => _extends({\n '--Autocomplete-wrapperGap': '3px'\n}, ownerState.size === 'lg' && {\n '--Autocomplete-wrapperGap': '4px'\n}, {\n /* Avoid double tap issue on iOS */\n '@media (pointer: fine)': {\n [`&:hover .${autocompleteClasses.clearIndicator}`]: {\n visibility: 'visible'\n }\n }\n}, ownerState.multiple && !ownerState.startDecorator && {\n paddingInlineStart: 0\n}));\n\n/**\n * Wrapper groups the chips (multi selection) and the input\n * so that start/end decorators can stay in the normal flow.\n */\nconst AutocompleteWrapper = styled('div', {\n name: 'JoyAutocomplete',\n slot: 'Wrapper',\n overridesResolver: (props, styles) => styles.wrapper\n})(({\n ownerState\n}) => ({\n flex: 1,\n // stretch to fill the root slot\n minWidth: 0,\n // won't push end decorator out of the autocomplete\n display: 'flex',\n alignItems: 'center',\n flexWrap: 'wrap',\n [`&.${autocompleteClasses.multiple}`]: _extends({\n paddingBlockEnd: 'min(var(--_Input-paddingBlock), var(--Autocomplete-wrapperGap))'\n }, ownerState.startDecorator && Array.isArray(ownerState.value) && ownerState.value.length > 0 && {\n marginBlockStart: 'min(var(--_Input-paddingBlock) - var(--Autocomplete-wrapperGap), 0px)',\n marginInlineStart: 'calc(-1 * var(--Autocomplete-wrapperGap))',\n [`& .${autocompleteClasses.input}`]: {\n marginInlineStart: 'max(var(--Autocomplete-wrapperGap), var(--Input-gap))'\n }\n }),\n [`& .${chipClasses.root}`]: {\n // TODO: use flexbox `gap` later.\n minWidth: 0,\n marginInlineStart: 'var(--Autocomplete-wrapperGap)',\n marginBlockStart: 'var(--Autocomplete-wrapperGap)'\n }\n}));\nconst AutocompleteInput = styled(StyledInputHtml, {\n name: 'JoyAutocomplete',\n slot: 'Input',\n overridesResolver: (props, styles) => styles.input\n})(({\n ownerState\n}) => _extends({\n minWidth: 30,\n minHeight: 'var(--Chip-minHeight)'\n}, ownerState.multiple && _extends({\n marginBlockStart: 'var(--Autocomplete-wrapperGap)'\n}, !ownerState.startDecorator && {\n marginInlineStart: 'var(--Input-paddingInline)'\n})));\nconst AutocompleteStartDecorator = styled(StyledInputStartDecorator, {\n name: 'JoyAutocomplete',\n slot: 'StartDecorator',\n overridesResolver: (props, styles) => styles.startDecorator\n})({});\nconst AutocompleteEndDecorator = styled(StyledInputEndDecorator, {\n name: 'JoyAutocomplete',\n slot: 'EndDecorator',\n overridesResolver: (props, styles) => styles.endDecorator\n})(({\n ownerState\n}) => _extends({}, (ownerState.hasClearIcon || ownerState.hasPopupIcon) && {\n '--Button-margin': '0px',\n '--IconButton-margin': '0px',\n '--Icon-margin': '0px'\n}));\nconst AutocompleteClearIndicator = styled(StyledIconButton, {\n name: 'JoyAutocomplete',\n slot: 'ClearIndicator',\n overridesResolver: (props, styles) => styles.clearIndicator\n})(({\n ownerState\n}) => _extends({\n alignSelf: 'center'\n}, !ownerState.hasPopupIcon && {\n marginInlineEnd: 'calc(var(--Input-decoratorChildOffset) * -1)'\n}, {\n marginInlineStart: 'calc(var(--_Input-paddingBlock) / 2)',\n visibility: ownerState.focused ? 'visible' : 'hidden'\n}));\nconst AutocompletePopupIndicator = styled(StyledIconButton, {\n name: 'JoyAutocomplete',\n slot: 'PopupIndicator',\n overridesResolver: (props, styles) => styles.popupIndicator\n})({\n alignSelf: 'center',\n marginInlineStart: 'calc(var(--_Input-paddingBlock) / 2)',\n marginInlineEnd: 'calc(var(--Input-decoratorChildOffset) * -1)',\n [`&.${autocompleteClasses.popupIndicatorOpen}`]: {\n transform: 'rotate(180deg)',\n '--Icon-color': 'currentColor'\n }\n});\nconst AutocompleteListbox = styled(StyledAutocompleteListbox, {\n name: 'JoyAutocomplete',\n slot: 'Listbox',\n overridesResolver: (props, styles) => styles.listbox\n})(({\n theme\n}) => ({\n // `unstable_popup-zIndex` is a private variable that lets other component, e.g. Modal, to override the z-index so that the listbox can be displayed above the Modal.\n zIndex: `var(--unstable_popup-zIndex, ${theme.vars.zIndex.popup})`\n}));\nconst AutocompleteOption = styled(StyledAutocompleteOption, {\n name: 'JoyAutocomplete',\n slot: 'Option',\n overridesResolver: (props, styles) => styles.option\n})({});\nconst AutocompleteLoading = styled(ListItem, {\n name: 'JoyAutocomplete',\n slot: 'Loading',\n overridesResolver: (props, styles) => styles.loading\n})(({\n theme\n}) => ({\n color: (theme.vars || theme).palette.text.secondary\n}));\nconst AutocompleteNoOptions = styled(ListItem, {\n name: 'JoyAutocomplete',\n slot: 'NoOptions',\n overridesResolver: (props, styles) => styles.noOptions\n})(({\n theme\n}) => ({\n color: (theme.vars || theme).palette.text.secondary\n}));\nconst AutocompleteLimitTag = styled('div', {\n name: 'JoyAutocomplete',\n slot: 'NoOptions',\n overridesResolver: (props, styles) => styles.noOptions\n})({\n marginInlineStart: 'calc(var(--Input-paddingInline) / 2)',\n marginBlockStart: 'var(--_Input-paddingBlock)'\n});\nconst excludeUseAutocompleteParams = _ref => {\n let other = _objectWithoutPropertiesLoose(_ref, _excluded);\n return other;\n};\n/**\n *\n * Demos:\n *\n * - [Autocomplete](https://mui.com/joy-ui/react-autocomplete/)\n *\n * API:\n *\n * - [Autocomplete API](https://mui.com/joy-ui/api/autocomplete/)\n */\nconst Autocomplete = /*#__PURE__*/React.forwardRef(function Autocomplete(inProps, ref) {\n var _ref2, _inProps$error, _ref3, _inProps$size, _inProps$color, _formControl$color, _ref4;\n const props = useThemeProps({\n props: inProps,\n name: 'JoyAutocomplete'\n });\n const {\n 'aria-describedby': ariaDescribedby,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n autoFocus,\n clearIcon = _ClearIcon || (_ClearIcon = /*#__PURE__*/_jsx(ClearIcon, {\n fontSize: \"md\"\n })),\n clearText = 'Clear',\n closeText = 'Close',\n disableClearable = false,\n disabled: disabledProp,\n endDecorator,\n error: errorProp = false,\n forcePopupIcon = 'auto',\n freeSolo = false,\n getLimitTagsText = defaultLimitTagsText,\n getOptionLabel = defaultGetOptionLabel,\n groupBy,\n id,\n limitTags = -1,\n loading = false,\n loadingText = 'Loading…',\n multiple = false,\n name,\n noOptionsText = 'No options',\n openText = 'Open',\n placeholder,\n popupIcon = _ArrowDropDownIcon || (_ArrowDropDownIcon = /*#__PURE__*/_jsx(ArrowDropDownIcon, {})),\n readOnly = false,\n renderGroup = defaultRenderGroup,\n renderOption: renderOptionProp,\n renderTags,\n required,\n type,\n startDecorator,\n size: sizeProp = 'md',\n color: colorProp = 'neutral',\n variant = 'outlined',\n component,\n slots = {},\n slotProps = {}\n } = props,\n otherProps = _objectWithoutPropertiesLoose(props, _excluded2);\n const other = excludeUseAutocompleteParams(otherProps);\n const {\n getColor\n } = useColorInversion(variant);\n const formControl = React.useContext(FormControlContext);\n const error = (_ref2 = (_inProps$error = inProps.error) != null ? _inProps$error : formControl == null ? void 0 : formControl.error) != null ? _ref2 : errorProp;\n const size = (_ref3 = (_inProps$size = inProps.size) != null ? _inProps$size : formControl == null ? void 0 : formControl.size) != null ? _ref3 : sizeProp;\n const rootColor = (_inProps$color = inProps.color) != null ? _inProps$color : error ? 'danger' : (_formControl$color = formControl == null ? void 0 : formControl.color) != null ? _formControl$color : colorProp;\n const color = getColor(inProps.color, rootColor);\n const disabled = (_ref4 = disabledProp != null ? disabledProp : formControl == null ? void 0 : formControl.disabled) != null ? _ref4 : false;\n const {\n getRootProps,\n getInputProps,\n getPopupIndicatorProps,\n getClearProps,\n getTagProps,\n getListboxProps,\n getOptionProps,\n value,\n dirty,\n popupOpen,\n focused,\n focusedTag,\n anchorEl,\n setAnchorEl,\n inputValue,\n groupedOptions\n } = useAutocomplete(_extends({}, props, {\n id: id != null ? id : formControl == null ? void 0 : formControl.htmlFor,\n componentName: 'Autocomplete',\n unstable_classNamePrefix: 'Mui',\n unstable_isActiveElementInListbox: defaultIsActiveElementInListbox\n }));\n const {\n onMouseDown: handleInputMouseDown\n } = getInputProps();\n const {\n onClick: handleRootOnClick\n } = getRootProps();\n const hasClearIcon = !disableClearable && !disabled && dirty && !readOnly;\n const hasPopupIcon = (!freeSolo || forcePopupIcon === true) && forcePopupIcon !== false;\n\n // If you modify this, make sure to keep the `AutocompleteOwnerState` type in sync.\n const ownerState = _extends({}, props, {\n value,\n disabled,\n focused,\n getOptionLabel,\n hasOptions: !!groupedOptions.length,\n hasClearIcon,\n hasPopupIcon,\n inputFocused: focusedTag === -1,\n popupOpen,\n size,\n color,\n variant\n });\n const classes = useUtilityClasses(ownerState);\n const externalForwardedProps = _extends({}, other, {\n component,\n slots,\n slotProps\n });\n let selectedOptions;\n if (multiple && value.length > 0) {\n const getCustomizedTagProps = params => {\n const _getTagProps = getTagProps(params),\n {\n onDelete\n } = _getTagProps,\n tagProps = _objectWithoutPropertiesLoose(_getTagProps, _excluded3);\n return _extends({\n disabled,\n size,\n onClick: onDelete\n }, tagProps);\n };\n if (renderTags) {\n selectedOptions = renderTags(value, getCustomizedTagProps, ownerState);\n } else {\n selectedOptions = value.map((option, index) => {\n return /*#__PURE__*/_jsx(Chip, {\n size: size,\n variant: \"soft\",\n color: color === 'context' ? undefined : 'neutral',\n endDecorator: /*#__PURE__*/_jsx(ChipDelete, _extends({}, getCustomizedTagProps({\n index\n }))),\n children: getOptionLabel(option)\n }, index);\n });\n }\n }\n const rootRef = useForkRef(ref, setAnchorEl);\n const rootStateClasses = {\n [autocompleteClasses.disabled]: disabled,\n [autocompleteClasses.error]: error,\n [autocompleteClasses.focused]: focused,\n [autocompleteClasses.formControl]: Boolean(formControl)\n };\n const [SlotRoot, rootProps] = useSlot('root', {\n ref: rootRef,\n className: [classes.root, rootStateClasses],\n elementType: AutocompleteRoot,\n externalForwardedProps,\n ownerState,\n getSlotProps: getRootProps,\n additionalProps: {\n onClick: event => {\n if (handleRootOnClick) {\n handleRootOnClick(event);\n }\n if (event.currentTarget === event.target && handleInputMouseDown) {\n handleInputMouseDown(event);\n }\n }\n }\n });\n const [SlotWrapper, wrapperProps] = useSlot('wrapper', {\n className: classes.wrapper,\n elementType: AutocompleteWrapper,\n externalForwardedProps,\n ownerState\n });\n const inputStateClasses = {\n [autocompleteClasses.disabled]: disabled\n };\n const [SlotInput, inputProps] = useSlot('input', {\n className: [classes.input, inputStateClasses],\n elementType: AutocompleteInput,\n getSlotProps: handlers => {\n const _getInputProps = getInputProps(),\n {\n onBlur,\n onFocus,\n onMouseDown\n } = _getInputProps,\n inputSlotProps = _objectWithoutPropertiesLoose(_getInputProps, _excluded4);\n return _extends({}, inputSlotProps, {\n onBlur: event => {\n var _handlers$onBlur;\n onBlur == null ? void 0 : onBlur(event);\n (_handlers$onBlur = handlers.onBlur) == null ? void 0 : _handlers$onBlur.call(handlers, event);\n },\n onFocus: event => {\n var _handlers$onFocus;\n onFocus == null ? void 0 : onFocus(event);\n (_handlers$onFocus = handlers.onFocus) == null ? void 0 : _handlers$onFocus.call(handlers, event);\n },\n onMouseDown: event => {\n var _handlers$onMouseDown;\n onMouseDown == null ? void 0 : onMouseDown(event);\n (_handlers$onMouseDown = handlers.onMouseDown) == null ? void 0 : _handlers$onMouseDown.call(handlers, event);\n }\n });\n },\n externalForwardedProps,\n ownerState,\n additionalProps: {\n autoFocus,\n placeholder,\n name,\n readOnly,\n disabled,\n required: required != null ? required : formControl == null ? void 0 : formControl.required,\n type,\n 'aria-invalid': error || undefined,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby != null ? ariaDescribedby : formControl == null ? void 0 : formControl['aria-describedby']\n }\n });\n const [SlotStartDecorator, startDecoratorProps] = useSlot('startDecorator', {\n className: classes.startDecorator,\n elementType: AutocompleteStartDecorator,\n externalForwardedProps,\n ownerState\n });\n const [SlotEndDecorator, endDecoratorProps] = useSlot('endDecorator', {\n className: classes.endDecorator,\n elementType: AutocompleteEndDecorator,\n externalForwardedProps,\n ownerState\n });\n const [SlotClearIndicator, clearIndicatorProps] = useSlot('clearIndicator', {\n className: classes.clearIndicator,\n elementType: AutocompleteClearIndicator,\n getSlotProps: getClearProps,\n externalForwardedProps,\n ownerState,\n getSlotOwnerState: mergedProps => ({\n size: mergedProps.size || size,\n variant: mergedProps.variant || getChildVariantAndColor(variant, rootColor).variant || 'plain',\n color: mergedProps.color || getChildVariantAndColor(variant, rootColor).color || 'neutral',\n disableColorInversion: !!inProps.color\n }),\n additionalProps: {\n 'aria-label': clearText,\n title: clearText\n }\n });\n const [SlotPopupIndicator, popupIndicatorProps] = useSlot('popupIndicator', {\n className: classes.popupIndicator,\n elementType: AutocompletePopupIndicator,\n getSlotProps: getPopupIndicatorProps,\n externalForwardedProps,\n ownerState,\n getSlotOwnerState: mergedProps => ({\n size: mergedProps.size || size,\n variant: mergedProps.variant || getChildVariantAndColor(variant, rootColor).variant || 'plain',\n color: mergedProps.color || getChildVariantAndColor(variant, rootColor).color || 'neutral',\n disableColorInversion: !!inProps.color\n }),\n additionalProps: {\n disabled,\n 'aria-label': popupOpen ? closeText : openText,\n title: popupOpen ? closeText : openText,\n type: 'button'\n }\n });\n const [SlotListbox, listboxProps] = useSlot('listbox', {\n className: classes.listbox,\n elementType: AutocompleteListbox,\n getSlotProps: getListboxProps,\n externalForwardedProps,\n ownerState,\n getSlotOwnerState: mergedProps => ({\n size: mergedProps.size || size,\n variant: mergedProps.variant || variant,\n color: mergedProps.color || (!mergedProps.disablePortal ? rootColor : color),\n disableColorInversion: !mergedProps.disablePortal\n }),\n additionalProps: {\n anchorEl,\n open: popupOpen,\n style: anchorEl ? {\n width: anchorEl.clientWidth\n } : {}\n }\n });\n const [SlotLoading, loadingProps] = useSlot('loading', {\n className: classes.loading,\n elementType: AutocompleteLoading,\n externalForwardedProps,\n ownerState\n });\n const [SlotNoOptions, noOptionsProps] = useSlot('noOptions', {\n className: classes.noOptions,\n elementType: AutocompleteNoOptions,\n externalForwardedProps,\n ownerState,\n additionalProps: {\n role: 'presentation',\n onMouseDown: event => {\n // Prevent input blur when interacting with the \"no options\" content\n event.preventDefault();\n }\n }\n });\n const [SlotLimitTag, limitTagProps] = useSlot('limitTag', {\n className: classes.limitTag,\n elementType: AutocompleteLimitTag,\n externalForwardedProps,\n ownerState\n });\n if (limitTags > -1 && Array.isArray(selectedOptions)) {\n const more = selectedOptions.length - limitTags;\n if (!focused && more > 0) {\n selectedOptions = selectedOptions.splice(0, limitTags);\n selectedOptions.push( /*#__PURE__*/_jsx(SlotLimitTag, _extends({}, limitTagProps, {\n children: getLimitTagsText(more)\n }), selectedOptions.length));\n }\n }\n const [SlotOption, baseOptionProps] = useSlot('option', {\n className: classes.option,\n elementType: AutocompleteOption,\n externalForwardedProps,\n ownerState,\n getSlotOwnerState: mergedProps => ({\n variant: mergedProps.variant || getChildVariantAndColor(variant, rootColor).variant || 'plain',\n color: mergedProps.color || getChildVariantAndColor(variant, rootColor).color || 'neutral',\n disableColorInversion: !listboxProps.disablePortal\n }),\n additionalProps: {\n as: 'li'\n }\n });\n const defaultRenderOption = (optionProps, option) => /*#__PURE__*/_jsx(SlotOption, _extends({}, optionProps, {\n children: getOptionLabel(option)\n }));\n const renderOption = renderOptionProp || defaultRenderOption;\n const renderListOption = (option, index) => {\n const optionProps = getOptionProps({\n option,\n index\n });\n return renderOption(_extends({}, baseOptionProps, optionProps), option, {\n // `aria-selected` prop will always by boolean, see useAutocomplete hook.\n selected: !!optionProps['aria-selected'],\n inputValue,\n ownerState\n });\n };\n\n // Wait for `listboxProps` because `slotProps.listbox` could be a function.\n const modifiers = React.useMemo(() => [{\n name: 'offset',\n options: {\n offset: [0, 4]\n }\n }, ...(listboxProps.modifiers || [])], [listboxProps.modifiers]);\n let popup = null;\n if (anchorEl) {\n var _listboxProps$ownerSt, _props$slots;\n popup = /*#__PURE__*/_jsx(VariantColorProvider, {\n variant: variant,\n color: rootColor,\n children: /*#__PURE__*/_jsx(ListProvider, {\n nested: true,\n children: /*#__PURE__*/_jsxs(SlotListbox, _extends({}, listboxProps, {\n className: clsx(listboxProps.className, ((_listboxProps$ownerSt = listboxProps.ownerState) == null ? void 0 : _listboxProps$ownerSt.color) === 'context' && autocompleteClasses.colorContext)\n // @ts-ignore internal logic (too complex to typed PopperOwnProps to SlotListbox but this should be removed when we have `usePopper`)\n ,\n modifiers: modifiers\n }, !((_props$slots = props.slots) != null && _props$slots.listbox) && {\n as: Popper,\n slots: {\n root: listboxProps.as || 'ul'\n }\n }, {\n children: [groupedOptions.map((option, index) => {\n if (groupBy) {\n const typedOption = option;\n return renderGroup({\n key: String(typedOption.key),\n group: typedOption.group,\n children: typedOption.options.map((option2, index2) => renderListOption(option2, typedOption.index + index2))\n });\n }\n return renderListOption(option, index);\n }), loading && groupedOptions.length === 0 ? /*#__PURE__*/_jsx(SlotLoading, _extends({}, loadingProps, {\n children: loadingText\n })) : null, groupedOptions.length === 0 && !freeSolo && !loading ? /*#__PURE__*/_jsx(SlotNoOptions, _extends({}, noOptionsProps, {\n children: noOptionsText\n })) : null]\n }))\n })\n });\n if (!listboxProps.disablePortal) {\n // For portal popup, the children should not inherit color inversion from the upper parent.\n popup = /*#__PURE__*/_jsx(ColorInversion.Provider, {\n value: undefined,\n children: popup\n });\n }\n }\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsxs(SlotRoot, _extends({}, rootProps, {\n children: [startDecorator && /*#__PURE__*/_jsx(SlotStartDecorator, _extends({}, startDecoratorProps, {\n children: startDecorator\n })), /*#__PURE__*/_jsxs(SlotWrapper, _extends({}, wrapperProps, {\n children: [selectedOptions, /*#__PURE__*/_jsx(SlotInput, _extends({}, inputProps))]\n })), endDecorator && /*#__PURE__*/_jsx(SlotEndDecorator, _extends({}, endDecoratorProps, {\n children: endDecorator\n })), hasClearIcon ? /*#__PURE__*/_jsx(SlotClearIndicator, _extends({}, clearIndicatorProps, {\n children: clearIcon\n })) : null, hasPopupIcon ? /*#__PURE__*/_jsx(SlotPopupIndicator, _extends({}, popupIndicatorProps, {\n children: popupIcon\n })) : null]\n })), popup]\n });\n});\nprocess.env.NODE_ENV !== \"production\" ? Autocomplete.propTypes /* remove-proptypes */ = {\n // ----------------------------- Warning --------------------------------\n // | These PropTypes are generated from the TypeScript type definitions |\n // | To update them edit TypeScript types and run \"yarn proptypes\" |\n // ----------------------------------------------------------------------\n /**\n * Identifies the element (or elements) that describes the object.\n * @see aria-labelledby\n */\n 'aria-describedby': PropTypes.string,\n /**\n * Defines a string value that labels the current element.\n * @see aria-labelledby.\n */\n 'aria-label': PropTypes.string,\n /**\n * Identifies the element (or elements) that labels the current element.\n * @see aria-describedby.\n */\n 'aria-labelledby': PropTypes.string,\n /**\n * If `true`, the `input` element is focused during the first mount.\n */\n autoFocus: PropTypes.bool,\n /**\n * The icon to display in place of the default clear icon.\n * @default \n */\n clearIcon: PropTypes.node,\n /**\n * Override the default text for the *clear* icon button.\n *\n * For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).\n * @default 'Clear'\n */\n clearText: PropTypes.string,\n /**\n * Override the default text for the *close popup* icon button.\n *\n * For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).\n * @default 'Close'\n */\n closeText: PropTypes.string,\n /**\n * The color of the component. It supports those theme colors that make sense for this component.\n * @default 'neutral'\n */\n color: PropTypes.oneOf(['danger', 'neutral', 'primary', 'success', 'warning']),\n /**\n * The default value. Use when the component is not controlled.\n * @default props.multiple ? [] : null\n */\n defaultValue: chainPropTypes(PropTypes.any, props => {\n if (props.multiple && props.defaultValue !== undefined && !Array.isArray(props.defaultValue)) {\n return new Error(['MUI: The Autocomplete expects the `defaultValue` prop to be an array when `multiple={true}` or undefined.', `However, ${props.defaultValue} was provided.`].join('\\n'));\n }\n return null;\n }),\n /**\n * If `true`, the input can't be cleared.\n * @default false\n */\n disableClearable: PropTypes.bool,\n /**\n * If `true`, the component is disabled.\n * @default false\n */\n disabled: PropTypes.bool,\n /**\n * Trailing adornment for this input.\n */\n endDecorator: PropTypes.node,\n /**\n * If `true`, the `input` will indicate an error.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n * @default false\n */\n error: PropTypes.bool,\n /**\n * A function that determines the filtered options to be rendered on search.\n *\n * @default createFilterOptions()\n * @param {Value[]} options The options to render.\n * @param {object} state The state of the component.\n * @returns {Value[]}\n */\n filterOptions: PropTypes.func,\n /**\n * Force the visibility display of the popup icon.\n * @default 'auto'\n */\n forcePopupIcon: PropTypes.oneOfType([PropTypes.oneOf(['auto']), PropTypes.bool]),\n /**\n * If `true`, the Autocomplete is free solo, meaning that the user input is not bound to provided options.\n * @default false\n */\n freeSolo: PropTypes.bool,\n /**\n * The label to display when the tags are truncated (`limitTags`).\n *\n * @param {string | number} more The number of truncated tags.\n * @returns {ReactNode}\n * @default (more: string | number) => `+${more}`\n */\n getLimitTagsText: PropTypes.func,\n /**\n * Used to determine the disabled state for a given option.\n *\n * @param {Value} option The option to test.\n * @returns {boolean}\n */\n getOptionDisabled: PropTypes.func,\n /**\n * Used to determine the string value for a given option.\n * It's used to fill the input (and the list box options if `renderOption` is not provided).\n *\n * If used in free solo mode, it must accept both the type of the options and a string.\n *\n * @param {Value} option\n * @returns {string}\n * @default (option) => option.label ?? option\n */\n getOptionLabel: PropTypes.func,\n /**\n * If provided, the options will be grouped under the returned string.\n * The groupBy value is also used as the text for group headings when `renderGroup` is not provided.\n *\n * @param {Value} options The options to group.\n * @returns {string}\n */\n groupBy: PropTypes.func,\n /**\n * This prop is used to help implement the accessibility logic.\n * If you don't provide an id it will fall back to a randomly generated one.\n */\n id: PropTypes.string,\n /**\n * The input value.\n */\n inputValue: PropTypes.string,\n /**\n * Used to determine if the option represents the given value.\n * Uses strict equality by default.\n * ⚠️ Both arguments need to be handled, an option can only match with one value.\n *\n * @param {Value} option The option to test.\n * @param {Value} value The value to test against.\n * @returns {boolean}\n */\n isOptionEqualToValue: PropTypes.func,\n /**\n * The maximum number of tags that will be visible when not focused.\n * Set `-1` to disable the limit.\n * @default -1\n */\n limitTags: integerPropType,\n /**\n * If `true`, the component is in a loading state.\n * This shows the `loadingText` in place of suggestions (only if there are no suggestions to show, e.g. `options` are empty).\n * @default false\n */\n loading: PropTypes.bool,\n /**\n * Text to display when in a loading state.\n *\n * For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).\n * @default 'Loading…'\n */\n loadingText: PropTypes.node,\n /**\n * If `true`, `value` must be an array and the menu will support multiple selections.\n * @default false\n */\n multiple: PropTypes.bool,\n /**\n * Name attribute of the `input` element.\n */\n name: PropTypes.string,\n /**\n * Text to display when there are no options.\n *\n * For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).\n * @default 'No options'\n */\n noOptionsText: PropTypes.node,\n /**\n * Callback fired when the value changes.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n * @param {Value|Value[]} value The new value of the component.\n * @param {string} reason One of \"createOption\", \"selectOption\", \"removeOption\", \"blur\" or \"clear\".\n * @param {string} [details]\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 * @param {React.SyntheticEvent} event The event source of the callback.\n * @param {string} reason Can be: `\"toggleInput\"`, `\"escape\"`, `\"selectOption\"`, `\"removeOption\"`, `\"blur\"`.\n */\n onClose: PropTypes.func,\n /**\n * Callback fired when the highlight option changes.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n * @param {Value} option The highlighted option.\n * @param {string} reason Can be: `\"keyboard\"`, `\"auto\"`, `\"mouse\"`, `\"touch\"`.\n */\n onHighlightChange: PropTypes.func,\n /**\n * Callback fired when the input value changes.\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n * @param {string} value The new value of the text input.\n * @param {string} reason Can be: `\"input\"` (user input), `\"reset\"` (programmatic change), `\"clear\"`.\n */\n onInputChange: PropTypes.func,\n /**\n * @ignore\n */\n onKeyDown: PropTypes.func,\n /**\n * Callback fired when the popup requests to be opened.\n * Use in controlled mode (see open).\n *\n * @param {React.SyntheticEvent} event The event source of the callback.\n */\n onOpen: PropTypes.func,\n /**\n * If `true`, the component is shown.\n */\n open: PropTypes.bool,\n /**\n * Override the default text for the *open popup* icon button.\n *\n * For localization purposes, you can use the provided [translations](/material-ui/guides/localization/).\n * @default 'Open'\n */\n openText: PropTypes.string,\n /**\n * Array of options.\n */\n options: PropTypes.array.isRequired,\n /**\n * The input placeholder\n */\n placeholder: PropTypes.string,\n /**\n * The icon to display in place of the default popup icon.\n * @default \n */\n popupIcon: PropTypes.node,\n /**\n * If `true`, the component becomes readonly. It is also supported for multiple tags where the tag cannot be deleted.\n * @default false\n */\n readOnly: PropTypes.bool,\n /**\n * Render the group.\n *\n * @param {AutocompleteRenderGroupParams} params The group to render.\n * @returns {ReactNode}\n */\n renderGroup: PropTypes.func,\n /**\n * Render the option, use `getOptionLabel` by default.\n *\n * @param {object} props The props to apply on the li element.\n * @param {T} option The option to render.\n * @param {object} state The state of the component.\n * @returns {ReactNode}\n */\n renderOption: PropTypes.func,\n /**\n * Render the selected value.\n *\n * @param {T[]} value The `value` provided to the component.\n * @param {function} getTagProps A tag props getter.\n * @param {object} ownerState The state of the Autocomplete component.\n * @returns {ReactNode}\n */\n renderTags: PropTypes.func,\n /**\n * If `true`, the `input` element is required.\n * The prop defaults to the value (`false`) inherited from the parent FormControl component.\n */\n required: PropTypes.bool,\n /**\n * The size of the component.\n * @default 'md'\n */\n size: PropTypes /* @typescript-to-proptypes-ignore */.oneOfType([PropTypes.oneOf(['sm', 'md', 'lg']), PropTypes.string]),\n /**\n * The props used for each slot inside.\n * @default {}\n */\n slotProps: PropTypes.shape({\n clearIndicator: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n endDecorator: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n input: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n limitTag: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n listbox: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n loading: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n noOptions: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n option: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n popupIndicator: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n root: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n startDecorator: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),\n wrapper: PropTypes.oneOfType([PropTypes.func, PropTypes.object])\n }),\n /**\n * The components used for each slot inside.\n * @default {}\n */\n slots: PropTypes.shape({\n clearIndicator: PropTypes.elementType,\n endDecorator: PropTypes.elementType,\n input: PropTypes.elementType,\n limitTag: PropTypes.elementType,\n listbox: PropTypes.elementType,\n loading: PropTypes.elementType,\n noOptions: PropTypes.elementType,\n option: PropTypes.elementType,\n popupIndicator: PropTypes.elementType,\n root: PropTypes.elementType,\n startDecorator: PropTypes.elementType,\n wrapper: PropTypes.elementType\n }),\n /**\n * Leading adornment for this input.\n */\n startDecorator: 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 /**\n * Type of the `input` element. It should be [a valid HTML5 input type](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Form_%3Cinput%3E_types).\n */\n type: PropTypes.string,\n /**\n * The value of the autocomplete.\n *\n * The value must have reference equality with the option in order to be selected.\n * You can customize the equality behavior with the `isOptionEqualToValue` prop.\n */\n value: chainPropTypes(PropTypes.any, props => {\n if (props.multiple && props.value !== undefined && !Array.isArray(props.value)) {\n return new Error(['MUI: The Autocomplete expects the `value` prop to be an array when `multiple={true}` or undefined.', `However, ${props.value} was provided.`].join('\\n'));\n }\n return null;\n }),\n /**\n * The [global variant](https://mui.com/joy-ui/main-features/global-variants/) to use.\n * @default 'outlined'\n */\n variant: PropTypes.oneOf(['outlined', 'plain', 'soft', 'solid'])\n} : void 0;\nexport default Autocomplete;","let keyCount = 0;\nfunction atom(read, write) {\n const key = `atom${++keyCount}`;\n const config = {\n toString: () => key\n };\n if (typeof read === \"function\") {\n config.read = read;\n } else {\n config.init = read;\n config.read = defaultRead;\n config.write = defaultWrite;\n }\n if (write) {\n config.write = write;\n }\n return config;\n}\nfunction defaultRead(get) {\n return get(this);\n}\nfunction defaultWrite(get, set, arg) {\n return set(\n this,\n typeof arg === \"function\" ? arg(get(this)) : arg\n );\n}\n\nconst isSelfAtom = (atom, a) => atom.unstable_is ? atom.unstable_is(a) : a === atom;\nconst hasInitialValue = (atom) => \"init\" in atom;\nconst isActuallyWritableAtom = (atom) => !!atom.write;\nconst cancelPromiseMap = /* @__PURE__ */ new WeakMap();\nconst registerCancelPromise = (promise, cancel) => {\n cancelPromiseMap.set(promise, cancel);\n promise.catch(() => {\n }).finally(() => cancelPromiseMap.delete(promise));\n};\nconst cancelPromise = (promise, next) => {\n const cancel = cancelPromiseMap.get(promise);\n if (cancel) {\n cancelPromiseMap.delete(promise);\n cancel(next);\n }\n};\nconst resolvePromise = (promise, value) => {\n promise.status = \"fulfilled\";\n promise.value = value;\n};\nconst rejectPromise = (promise, e) => {\n promise.status = \"rejected\";\n promise.reason = e;\n};\nconst isPromiseLike = (x) => typeof (x == null ? void 0 : x.then) === \"function\";\nconst isEqualAtomValue = (a, b) => !!a && \"v\" in a && \"v\" in b && Object.is(a.v, b.v);\nconst isEqualAtomError = (a, b) => !!a && \"e\" in a && \"e\" in b && Object.is(a.e, b.e);\nconst hasPromiseAtomValue = (a) => !!a && \"v\" in a && a.v instanceof Promise;\nconst isEqualPromiseAtomValue = (a, b) => \"v\" in a && \"v\" in b && a.v.orig && a.v.orig === b.v.orig;\nconst returnAtomValue = (atomState) => {\n if (\"e\" in atomState) {\n throw atomState.e;\n }\n return atomState.v;\n};\nconst createStore$1 = () => {\n const atomStateMap = /* @__PURE__ */ new WeakMap();\n const mountedMap = /* @__PURE__ */ new WeakMap();\n const pendingStack = [];\n const pendingMap = /* @__PURE__ */ new WeakMap();\n let devListenersRev2;\n let mountedAtoms;\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n devListenersRev2 = /* @__PURE__ */ new Set();\n mountedAtoms = /* @__PURE__ */ new Set();\n }\n const getAtomState = (atom) => atomStateMap.get(atom);\n const addPendingDependent = (atom, atomState) => {\n atomState.d.forEach((_, a) => {\n if (!pendingMap.has(a)) {\n const aState = getAtomState(a);\n pendingMap.set(a, [aState, /* @__PURE__ */ new Set()]);\n if (aState) {\n addPendingDependent(a, aState);\n }\n }\n pendingMap.get(a)[1].add(atom);\n });\n };\n const setAtomState = (atom, atomState) => {\n var _a;\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n Object.freeze(atomState);\n }\n const prevAtomState = getAtomState(atom);\n atomStateMap.set(atom, atomState);\n (_a = pendingStack[pendingStack.length - 1]) == null ? void 0 : _a.add(atom);\n if (!pendingMap.has(atom)) {\n pendingMap.set(atom, [prevAtomState, /* @__PURE__ */ new Set()]);\n addPendingDependent(atom, atomState);\n }\n if (hasPromiseAtomValue(prevAtomState)) {\n const next = \"v\" in atomState ? atomState.v instanceof Promise ? atomState.v : Promise.resolve(atomState.v) : Promise.reject(atomState.e);\n if (prevAtomState.v !== next) {\n cancelPromise(prevAtomState.v, next);\n }\n }\n };\n const updateDependencies = (atom, nextAtomState, nextDependencies, keepPreviousDependencies) => {\n const dependencies = new Map(\n keepPreviousDependencies ? nextAtomState.d : null\n );\n let changed = false;\n nextDependencies.forEach((aState, a) => {\n if (!aState && isSelfAtom(atom, a)) {\n aState = nextAtomState;\n }\n if (aState) {\n dependencies.set(a, aState);\n if (nextAtomState.d.get(a) !== aState) {\n changed = true;\n }\n } else if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\"[Bug] atom state not found\");\n }\n });\n if (changed || nextAtomState.d.size !== dependencies.size) {\n nextAtomState.d = dependencies;\n }\n };\n const setAtomValue = (atom, value, nextDependencies, keepPreviousDependencies) => {\n const prevAtomState = getAtomState(atom);\n const nextAtomState = {\n d: (prevAtomState == null ? void 0 : prevAtomState.d) || /* @__PURE__ */ new Map(),\n v: value\n };\n if (nextDependencies) {\n updateDependencies(\n atom,\n nextAtomState,\n nextDependencies,\n keepPreviousDependencies\n );\n }\n if (isEqualAtomValue(prevAtomState, nextAtomState) && prevAtomState.d === nextAtomState.d) {\n return prevAtomState;\n }\n if (hasPromiseAtomValue(prevAtomState) && hasPromiseAtomValue(nextAtomState) && isEqualPromiseAtomValue(prevAtomState, nextAtomState)) {\n if (prevAtomState.d === nextAtomState.d) {\n return prevAtomState;\n } else {\n nextAtomState.v = prevAtomState.v;\n }\n }\n setAtomState(atom, nextAtomState);\n return nextAtomState;\n };\n const setAtomValueOrPromise = (atom, valueOrPromise, nextDependencies, abortPromise) => {\n if (isPromiseLike(valueOrPromise)) {\n let continuePromise;\n const updatePromiseDependencies = () => {\n const prevAtomState = getAtomState(atom);\n if (!hasPromiseAtomValue(prevAtomState) || prevAtomState.v !== promise) {\n return;\n }\n const nextAtomState = setAtomValue(\n atom,\n promise,\n nextDependencies\n );\n if (mountedMap.has(atom) && prevAtomState.d !== nextAtomState.d) {\n mountDependencies(atom, nextAtomState, prevAtomState.d);\n }\n };\n const promise = new Promise((resolve, reject) => {\n let settled = false;\n valueOrPromise.then(\n (v) => {\n if (!settled) {\n settled = true;\n resolvePromise(promise, v);\n resolve(v);\n updatePromiseDependencies();\n }\n },\n (e) => {\n if (!settled) {\n settled = true;\n rejectPromise(promise, e);\n reject(e);\n updatePromiseDependencies();\n }\n }\n );\n continuePromise = (next) => {\n if (!settled) {\n settled = true;\n next.then(\n (v) => resolvePromise(promise, v),\n (e) => rejectPromise(promise, e)\n );\n resolve(next);\n }\n };\n });\n promise.orig = valueOrPromise;\n promise.status = \"pending\";\n registerCancelPromise(promise, (next) => {\n if (next) {\n continuePromise(next);\n }\n abortPromise == null ? void 0 : abortPromise();\n });\n return setAtomValue(atom, promise, nextDependencies, true);\n }\n return setAtomValue(atom, valueOrPromise, nextDependencies);\n };\n const setAtomError = (atom, error, nextDependencies) => {\n const prevAtomState = getAtomState(atom);\n const nextAtomState = {\n d: (prevAtomState == null ? void 0 : prevAtomState.d) || /* @__PURE__ */ new Map(),\n e: error\n };\n if (nextDependencies) {\n updateDependencies(atom, nextAtomState, nextDependencies);\n }\n if (isEqualAtomError(prevAtomState, nextAtomState) && prevAtomState.d === nextAtomState.d) {\n return prevAtomState;\n }\n setAtomState(atom, nextAtomState);\n return nextAtomState;\n };\n const readAtomState = (atom, force) => {\n const atomState = getAtomState(atom);\n if (!(force == null ? void 0 : force(atom)) && atomState) {\n if (mountedMap.has(atom)) {\n return atomState;\n }\n if (Array.from(atomState.d).every(([a, s]) => {\n if (a === atom) {\n return true;\n }\n const aState = readAtomState(a, force);\n return aState === s || isEqualAtomValue(aState, s);\n })) {\n return atomState;\n }\n }\n const nextDependencies = /* @__PURE__ */ new Map();\n let isSync = true;\n const getter = (a) => {\n if (isSelfAtom(atom, a)) {\n const aState2 = getAtomState(a);\n if (aState2) {\n nextDependencies.set(a, aState2);\n return returnAtomValue(aState2);\n }\n if (hasInitialValue(a)) {\n nextDependencies.set(a, void 0);\n return a.init;\n }\n throw new Error(\"no atom init\");\n }\n const aState = readAtomState(a, force);\n nextDependencies.set(a, aState);\n return returnAtomValue(aState);\n };\n let controller;\n let setSelf;\n const options = {\n get signal() {\n if (!controller) {\n controller = new AbortController();\n }\n return controller.signal;\n },\n get setSelf() {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !isActuallyWritableAtom(atom)) {\n console.warn(\"setSelf function cannot be used with read-only atom\");\n }\n if (!setSelf && isActuallyWritableAtom(atom)) {\n setSelf = (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && isSync) {\n console.warn(\"setSelf function cannot be called in sync\");\n }\n if (!isSync) {\n return writeAtom(atom, ...args);\n }\n };\n }\n return setSelf;\n }\n };\n try {\n const valueOrPromise = atom.read(getter, options);\n return setAtomValueOrPromise(\n atom,\n valueOrPromise,\n nextDependencies,\n () => controller == null ? void 0 : controller.abort()\n );\n } catch (error) {\n return setAtomError(atom, error, nextDependencies);\n } finally {\n isSync = false;\n }\n };\n const readAtom = (atom) => returnAtomValue(readAtomState(atom));\n const recomputeDependents = (atom) => {\n const getDependents = (a) => {\n var _a, _b;\n const dependents = new Set((_a = mountedMap.get(a)) == null ? void 0 : _a.t);\n (_b = pendingMap.get(a)) == null ? void 0 : _b[1].forEach((dependent) => {\n dependents.add(dependent);\n });\n return dependents;\n };\n const topsortedAtoms = new Array();\n const markedAtoms = /* @__PURE__ */ new Set();\n const visit = (n) => {\n if (markedAtoms.has(n)) {\n return;\n }\n markedAtoms.add(n);\n for (const m of getDependents(n)) {\n if (n !== m) {\n visit(m);\n }\n }\n topsortedAtoms.push(n);\n };\n visit(atom);\n const changedAtoms = /* @__PURE__ */ new Set([atom]);\n const isMarked = (a) => markedAtoms.has(a);\n for (let i = topsortedAtoms.length - 1; i >= 0; --i) {\n const a = topsortedAtoms[i];\n const prevAtomState = getAtomState(a);\n if (!prevAtomState) {\n continue;\n }\n let hasChangedDeps = false;\n for (const dep of prevAtomState.d.keys()) {\n if (dep !== a && changedAtoms.has(dep)) {\n hasChangedDeps = true;\n break;\n }\n }\n if (hasChangedDeps) {\n const nextAtomState = readAtomState(a, isMarked);\n addPendingDependent(a, nextAtomState);\n if (!isEqualAtomValue(prevAtomState, nextAtomState)) {\n changedAtoms.add(a);\n }\n }\n markedAtoms.delete(a);\n }\n };\n const writeAtomState = (atom, ...args) => {\n const getter = (a) => returnAtomValue(readAtomState(a));\n const setter = (a, ...args2) => {\n const isSync = pendingStack.length > 0;\n if (!isSync) {\n pendingStack.push(/* @__PURE__ */ new Set([a]));\n }\n let r;\n if (isSelfAtom(atom, a)) {\n if (!hasInitialValue(a)) {\n throw new Error(\"atom not writable\");\n }\n const prevAtomState = getAtomState(a);\n const nextAtomState = setAtomValueOrPromise(a, args2[0]);\n if (!isEqualAtomValue(prevAtomState, nextAtomState)) {\n recomputeDependents(a);\n }\n } else {\n r = writeAtomState(a, ...args2);\n }\n if (!isSync) {\n const flushed = flushPending(pendingStack.pop());\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n devListenersRev2.forEach(\n (l) => l({ type: \"async-write\", flushed })\n );\n }\n }\n return r;\n };\n const result = atom.write(getter, setter, ...args);\n return result;\n };\n const writeAtom = (atom, ...args) => {\n pendingStack.push(/* @__PURE__ */ new Set([atom]));\n const result = writeAtomState(atom, ...args);\n const flushed = flushPending(pendingStack.pop());\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n devListenersRev2.forEach((l) => l({ type: \"write\", flushed }));\n }\n return result;\n };\n const mountAtom = (atom, initialDependent, onMountQueue) => {\n var _a;\n const existingMount = mountedMap.get(atom);\n if (existingMount) {\n if (initialDependent) {\n existingMount.t.add(initialDependent);\n }\n return existingMount;\n }\n const queue = onMountQueue || [];\n (_a = getAtomState(atom)) == null ? void 0 : _a.d.forEach((_, a) => {\n if (a !== atom) {\n mountAtom(a, atom, queue);\n }\n });\n readAtomState(atom);\n const mounted = {\n t: new Set(initialDependent && [initialDependent]),\n l: /* @__PURE__ */ new Set()\n };\n mountedMap.set(atom, mounted);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n mountedAtoms.add(atom);\n }\n if (isActuallyWritableAtom(atom) && atom.onMount) {\n const { onMount } = atom;\n queue.push(() => {\n const onUnmount = onMount((...args) => writeAtom(atom, ...args));\n if (onUnmount) {\n mounted.u = onUnmount;\n }\n });\n }\n if (!onMountQueue) {\n queue.forEach((f) => f());\n }\n return mounted;\n };\n const canUnmountAtom = (atom, mounted) => !mounted.l.size && (!mounted.t.size || mounted.t.size === 1 && mounted.t.has(atom));\n const tryUnmountAtom = (atom, mounted) => {\n if (!canUnmountAtom(atom, mounted)) {\n return;\n }\n const onUnmount = mounted.u;\n if (onUnmount) {\n onUnmount();\n }\n mountedMap.delete(atom);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n mountedAtoms.delete(atom);\n }\n const atomState = getAtomState(atom);\n if (atomState) {\n if (hasPromiseAtomValue(atomState)) {\n cancelPromise(atomState.v);\n }\n atomState.d.forEach((_, a) => {\n if (a !== atom) {\n const mountedDep = mountedMap.get(a);\n if (mountedDep) {\n mountedDep.t.delete(atom);\n tryUnmountAtom(a, mountedDep);\n }\n }\n });\n } else if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\"[Bug] could not find atom state to unmount\", atom);\n }\n };\n const mountDependencies = (atom, atomState, prevDependencies) => {\n const depSet = new Set(atomState.d.keys());\n const maybeUnmountAtomSet = /* @__PURE__ */ new Set();\n prevDependencies == null ? void 0 : prevDependencies.forEach((_, a) => {\n if (depSet.has(a)) {\n depSet.delete(a);\n return;\n }\n maybeUnmountAtomSet.add(a);\n const mounted = mountedMap.get(a);\n if (mounted) {\n mounted.t.delete(atom);\n }\n });\n depSet.forEach((a) => {\n mountAtom(a, atom);\n });\n maybeUnmountAtomSet.forEach((a) => {\n const mounted = mountedMap.get(a);\n if (mounted) {\n tryUnmountAtom(a, mounted);\n }\n });\n };\n const flushPending = (pendingAtoms) => {\n let flushed;\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n flushed = /* @__PURE__ */ new Set();\n }\n const pending = [];\n const collectPending = (pendingAtom) => {\n var _a;\n if (!pendingMap.has(pendingAtom)) {\n return;\n }\n const [prevAtomState, dependents] = pendingMap.get(pendingAtom);\n pendingMap.delete(pendingAtom);\n pending.push([pendingAtom, prevAtomState]);\n dependents.forEach(collectPending);\n (_a = getAtomState(pendingAtom)) == null ? void 0 : _a.d.forEach((_, a) => collectPending(a));\n };\n pendingAtoms.forEach(collectPending);\n pending.forEach(([atom, prevAtomState]) => {\n const atomState = getAtomState(atom);\n if (!atomState) {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n console.warn(\"[Bug] no atom state to flush\");\n }\n return;\n }\n if (atomState !== prevAtomState) {\n const mounted = mountedMap.get(atom);\n if (mounted && atomState.d !== (prevAtomState == null ? void 0 : prevAtomState.d)) {\n mountDependencies(atom, atomState, prevAtomState == null ? void 0 : prevAtomState.d);\n }\n if (mounted && !// TODO This seems pretty hacky. Hope to fix it.\n // Maybe we could `mountDependencies` in `setAtomState`?\n (!hasPromiseAtomValue(prevAtomState) && (isEqualAtomValue(prevAtomState, atomState) || isEqualAtomError(prevAtomState, atomState)))) {\n mounted.l.forEach((listener) => listener());\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n flushed.add(atom);\n }\n }\n }\n });\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n return flushed;\n }\n };\n const subscribeAtom = (atom, listener) => {\n const mounted = mountAtom(atom);\n const flushed = flushPending([atom]);\n const listeners = mounted.l;\n listeners.add(listener);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n devListenersRev2.forEach(\n (l) => l({ type: \"sub\", flushed })\n );\n }\n return () => {\n listeners.delete(listener);\n tryUnmountAtom(atom, mounted);\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n devListenersRev2.forEach((l) => l({ type: \"unsub\" }));\n }\n };\n };\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n return {\n get: readAtom,\n set: writeAtom,\n sub: subscribeAtom,\n // store dev methods (these are tentative and subject to change without notice)\n dev_subscribe_store: (l) => {\n devListenersRev2.add(l);\n return () => {\n devListenersRev2.delete(l);\n };\n },\n dev_get_mounted_atoms: () => mountedAtoms.values(),\n dev_get_atom_state: (a) => atomStateMap.get(a),\n dev_get_mounted: (a) => mountedMap.get(a),\n dev_restore_atoms: (values) => {\n pendingStack.push(/* @__PURE__ */ new Set());\n for (const [atom, valueOrPromise] of values) {\n if (hasInitialValue(atom)) {\n setAtomValueOrPromise(atom, valueOrPromise);\n recomputeDependents(atom);\n }\n }\n const flushed = flushPending(pendingStack.pop());\n devListenersRev2.forEach(\n (l) => l({ type: \"restore\", flushed })\n );\n }\n };\n }\n return {\n get: readAtom,\n set: writeAtom,\n sub: subscribeAtom\n };\n};\nlet defaultStore;\nconst getDefaultStore$1 = () => {\n if (!defaultStore) {\n defaultStore = createStore$1();\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\") {\n globalThis.__JOTAI_DEFAULT_STORE__ || (globalThis.__JOTAI_DEFAULT_STORE__ = defaultStore);\n if (globalThis.__JOTAI_DEFAULT_STORE__ !== defaultStore) {\n console.warn(\n \"Detected multiple Jotai instances. It may cause unexpected behavior with the default store. https://github.com/pmndrs/jotai/discussions/2044\"\n );\n }\n }\n }\n return defaultStore;\n};\n\nSymbol(\n (import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" ? \"CONTINUE_PROMISE\" : \"\"\n);\n\nconst createStore = createStore$1;\nconst getDefaultStore = getDefaultStore$1;\n\nexport { atom, createStore, getDefaultStore };\n","'use client';\nimport ReactExports, { createContext, useContext, useRef, createElement, useReducer, useEffect, useDebugValue, useCallback } from 'react';\nimport { getDefaultStore, createStore } from 'jotai/vanilla';\n\nconst StoreContext = createContext(\n void 0\n);\nconst useStore = (options) => {\n const store = useContext(StoreContext);\n return (options == null ? void 0 : options.store) || store || getDefaultStore();\n};\nconst Provider = ({\n children,\n store\n}) => {\n const storeRef = useRef();\n if (!store && !storeRef.current) {\n storeRef.current = createStore();\n }\n return createElement(\n StoreContext.Provider,\n {\n value: store || storeRef.current\n },\n children\n );\n};\n\nconst isPromiseLike = (x) => typeof (x == null ? void 0 : x.then) === \"function\";\nconst use = ReactExports.use || ((promise) => {\n if (promise.status === \"pending\") {\n throw promise;\n } else if (promise.status === \"fulfilled\") {\n return promise.value;\n } else if (promise.status === \"rejected\") {\n throw promise.reason;\n } else {\n promise.status = \"pending\";\n promise.then(\n (v) => {\n promise.status = \"fulfilled\";\n promise.value = v;\n },\n (e) => {\n promise.status = \"rejected\";\n promise.reason = e;\n }\n );\n throw promise;\n }\n});\nfunction useAtomValue(atom, options) {\n const store = useStore(options);\n const [[valueFromReducer, storeFromReducer, atomFromReducer], rerender] = useReducer(\n (prev) => {\n const nextValue = store.get(atom);\n if (Object.is(prev[0], nextValue) && prev[1] === store && prev[2] === atom) {\n return prev;\n }\n return [nextValue, store, atom];\n },\n void 0,\n () => [store.get(atom), store, atom]\n );\n let value = valueFromReducer;\n if (storeFromReducer !== store || atomFromReducer !== atom) {\n rerender();\n value = store.get(atom);\n }\n const delay = options == null ? void 0 : options.delay;\n useEffect(() => {\n const unsub = store.sub(atom, () => {\n if (typeof delay === \"number\") {\n setTimeout(rerender, delay);\n return;\n }\n rerender();\n });\n rerender();\n return unsub;\n }, [store, atom, delay]);\n useDebugValue(value);\n return isPromiseLike(value) ? use(value) : value;\n}\n\nfunction useSetAtom(atom, options) {\n const store = useStore(options);\n const setAtom = useCallback(\n (...args) => {\n if ((import.meta.env ? import.meta.env.MODE : void 0) !== \"production\" && !(\"write\" in atom)) {\n throw new Error(\"not writable atom\");\n }\n return store.set(atom, ...args);\n },\n [store, atom]\n );\n return setAtom;\n}\n\nfunction useAtom(atom, options) {\n return [\n useAtomValue(atom, options),\n // We do wrong type assertion here, which results in throwing an error.\n useSetAtom(atom, options)\n ];\n}\n\nexport { Provider, useAtom, useAtomValue, useSetAtom, useStore };\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n\r\nfunction __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\n\n// do not edit .js files directly - edit src/index.jst\n\n\n\nvar fastDeepEqual = function equal(a, b) {\n if (a === b) return true;\n\n if (a && b && typeof a == 'object' && typeof b == 'object') {\n if (a.constructor !== b.constructor) return false;\n\n var length, i, keys;\n if (Array.isArray(a)) {\n length = a.length;\n if (length != b.length) return false;\n for (i = length; i-- !== 0;)\n if (!equal(a[i], b[i])) return false;\n return true;\n }\n\n\n\n if (a.constructor === RegExp) return a.source === b.source && a.flags === b.flags;\n if (a.valueOf !== Object.prototype.valueOf) return a.valueOf() === b.valueOf();\n if (a.toString !== Object.prototype.toString) return a.toString() === b.toString();\n\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) return false;\n\n for (i = length; i-- !== 0;)\n if (!Object.prototype.hasOwnProperty.call(b, keys[i])) return false;\n\n for (i = length; i-- !== 0;) {\n var key = keys[i];\n\n if (!equal(a[key], b[key])) return false;\n }\n\n return true;\n }\n\n // true if both NaN, false otherwise\n return a!==a && b!==b;\n};\n\n/**\n * Copyright 2019 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at.\n *\n * Http://www.apache.org/licenses/LICENSE-2.0.\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nconst DEFAULT_ID = \"__googleMapsScriptId\";\n/**\n * The status of the [[Loader]].\n */\nvar LoaderStatus;\n(function (LoaderStatus) {\n LoaderStatus[LoaderStatus[\"INITIALIZED\"] = 0] = \"INITIALIZED\";\n LoaderStatus[LoaderStatus[\"LOADING\"] = 1] = \"LOADING\";\n LoaderStatus[LoaderStatus[\"SUCCESS\"] = 2] = \"SUCCESS\";\n LoaderStatus[LoaderStatus[\"FAILURE\"] = 3] = \"FAILURE\";\n})(LoaderStatus || (LoaderStatus = {}));\n/**\n * [[Loader]] makes it easier to add Google Maps JavaScript API to your application\n * dynamically using\n * [Promises](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise).\n * It works by dynamically creating and appending a script node to the the\n * document head and wrapping the callback function so as to return a promise.\n *\n * ```\n * const loader = new Loader({\n * apiKey: \"\",\n * version: \"weekly\",\n * libraries: [\"places\"]\n * });\n *\n * loader.load().then((google) => {\n * const map = new google.maps.Map(...)\n * })\n * ```\n */\nclass Loader {\n /**\n * Creates an instance of Loader using [[LoaderOptions]]. No defaults are set\n * using this library, instead the defaults are set by the Google Maps\n * JavaScript API server.\n *\n * ```\n * const loader = Loader({apiKey, version: 'weekly', libraries: ['places']});\n * ```\n */\n constructor({ apiKey, authReferrerPolicy, channel, client, id = DEFAULT_ID, language, libraries = [], mapIds, nonce, region, retries = 3, url = \"https://maps.googleapis.com/maps/api/js\", version, }) {\n this.callbacks = [];\n this.done = false;\n this.loading = false;\n this.errors = [];\n this.apiKey = apiKey;\n this.authReferrerPolicy = authReferrerPolicy;\n this.channel = channel;\n this.client = client;\n this.id = id || DEFAULT_ID; // Do not allow empty string\n this.language = language;\n this.libraries = libraries;\n this.mapIds = mapIds;\n this.nonce = nonce;\n this.region = region;\n this.retries = retries;\n this.url = url;\n this.version = version;\n if (Loader.instance) {\n if (!fastDeepEqual(this.options, Loader.instance.options)) {\n throw new Error(`Loader must not be called again with different options. ${JSON.stringify(this.options)} !== ${JSON.stringify(Loader.instance.options)}`);\n }\n return Loader.instance;\n }\n Loader.instance = this;\n }\n get options() {\n return {\n version: this.version,\n apiKey: this.apiKey,\n channel: this.channel,\n client: this.client,\n id: this.id,\n libraries: this.libraries,\n language: this.language,\n region: this.region,\n mapIds: this.mapIds,\n nonce: this.nonce,\n url: this.url,\n authReferrerPolicy: this.authReferrerPolicy,\n };\n }\n get status() {\n if (this.errors.length) {\n return LoaderStatus.FAILURE;\n }\n if (this.done) {\n return LoaderStatus.SUCCESS;\n }\n if (this.loading) {\n return LoaderStatus.LOADING;\n }\n return LoaderStatus.INITIALIZED;\n }\n get failed() {\n return this.done && !this.loading && this.errors.length >= this.retries + 1;\n }\n /**\n * CreateUrl returns the Google Maps JavaScript API script url given the [[LoaderOptions]].\n *\n * @ignore\n * @deprecated\n */\n createUrl() {\n let url = this.url;\n url += `?callback=__googleMapsCallback`;\n if (this.apiKey) {\n url += `&key=${this.apiKey}`;\n }\n if (this.channel) {\n url += `&channel=${this.channel}`;\n }\n if (this.client) {\n url += `&client=${this.client}`;\n }\n if (this.libraries.length > 0) {\n url += `&libraries=${this.libraries.join(\",\")}`;\n }\n if (this.language) {\n url += `&language=${this.language}`;\n }\n if (this.region) {\n url += `®ion=${this.region}`;\n }\n if (this.version) {\n url += `&v=${this.version}`;\n }\n if (this.mapIds) {\n url += `&map_ids=${this.mapIds.join(\",\")}`;\n }\n if (this.authReferrerPolicy) {\n url += `&auth_referrer_policy=${this.authReferrerPolicy}`;\n }\n return url;\n }\n deleteScript() {\n const script = document.getElementById(this.id);\n if (script) {\n script.remove();\n }\n }\n /**\n * Load the Google Maps JavaScript API script and return a Promise.\n * @deprecated, use importLibrary() instead.\n */\n load() {\n return this.loadPromise();\n }\n /**\n * Load the Google Maps JavaScript API script and return a Promise.\n *\n * @ignore\n * @deprecated, use importLibrary() instead.\n */\n loadPromise() {\n return new Promise((resolve, reject) => {\n this.loadCallback((err) => {\n if (!err) {\n resolve(window.google);\n }\n else {\n reject(err.error);\n }\n });\n });\n }\n importLibrary(name) {\n this.execute();\n return google.maps.importLibrary(name);\n }\n /**\n * Load the Google Maps JavaScript API script with a callback.\n * @deprecated, use importLibrary() instead.\n */\n loadCallback(fn) {\n this.callbacks.push(fn);\n this.execute();\n }\n /**\n * Set the script on document.\n */\n setScript() {\n var _a, _b;\n if (document.getElementById(this.id)) {\n // TODO wrap onerror callback for cases where the script was loaded elsewhere\n this.callback();\n return;\n }\n const params = {\n key: this.apiKey,\n channel: this.channel,\n client: this.client,\n libraries: this.libraries.length && this.libraries,\n v: this.version,\n mapIds: this.mapIds,\n language: this.language,\n region: this.region,\n authReferrerPolicy: this.authReferrerPolicy,\n };\n // keep the URL minimal:\n Object.keys(params).forEach(\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n (key) => !params[key] && delete params[key]);\n if (!((_b = (_a = window === null || window === void 0 ? void 0 : window.google) === null || _a === void 0 ? void 0 : _a.maps) === null || _b === void 0 ? void 0 : _b.importLibrary)) {\n // tweaked copy of https://developers.google.com/maps/documentation/javascript/load-maps-js-api#dynamic-library-import\n // which also sets the base url, the id, and the nonce\n /* eslint-disable */\n ((g) => {\n // @ts-ignore\n let h, a, k, p = \"The Google Maps JavaScript API\", c = \"google\", l = \"importLibrary\", q = \"__ib__\", m = document, b = window;\n // @ts-ignore\n b = b[c] || (b[c] = {});\n // @ts-ignore\n const d = b.maps || (b.maps = {}), r = new Set(), e = new URLSearchParams(), u = () => \n // @ts-ignore\n h || (h = new Promise((f, n) => __awaiter(this, void 0, void 0, function* () {\n var _a;\n yield (a = m.createElement(\"script\"));\n a.id = this.id;\n e.set(\"libraries\", [...r] + \"\");\n // @ts-ignore\n for (k in g)\n e.set(k.replace(/[A-Z]/g, (t) => \"_\" + t[0].toLowerCase()), g[k]);\n e.set(\"callback\", c + \".maps.\" + q);\n a.src = this.url + `?` + e;\n d[q] = f;\n a.onerror = () => (h = n(Error(p + \" could not load.\")));\n // @ts-ignore\n a.nonce = this.nonce || ((_a = m.querySelector(\"script[nonce]\")) === null || _a === void 0 ? void 0 : _a.nonce) || \"\";\n m.head.append(a);\n })));\n // @ts-ignore\n d[l] ? console.warn(p + \" only loads once. Ignoring:\", g) : (d[l] = (f, ...n) => r.add(f) && u().then(() => d[l](f, ...n)));\n })(params);\n /* eslint-enable */\n }\n // While most libraries populate the global namespace when loaded via bootstrap params,\n // this is not the case for \"marker\" when used with the inline bootstrap loader\n // (and maybe others in the future). So ensure there is an importLibrary for each:\n const libraryPromises = this.libraries.map((library) => this.importLibrary(library));\n // ensure at least one library, to kick off loading...\n if (!libraryPromises.length) {\n libraryPromises.push(this.importLibrary(\"core\"));\n }\n Promise.all(libraryPromises).then(() => this.callback(), (error) => {\n const event = new ErrorEvent(\"error\", { error }); // for backwards compat\n this.loadErrorCallback(event);\n });\n }\n /**\n * Reset the loader state.\n */\n reset() {\n this.deleteScript();\n this.done = false;\n this.loading = false;\n this.errors = [];\n this.onerrorEvent = null;\n }\n resetIfRetryingFailed() {\n if (this.failed) {\n this.reset();\n }\n }\n loadErrorCallback(e) {\n this.errors.push(e);\n if (this.errors.length <= this.retries) {\n const delay = this.errors.length * Math.pow(2, this.errors.length);\n console.error(`Failed to load Google Maps script, retrying in ${delay} ms.`);\n setTimeout(() => {\n this.deleteScript();\n this.setScript();\n }, delay);\n }\n else {\n this.onerrorEvent = e;\n this.callback();\n }\n }\n callback() {\n this.done = true;\n this.loading = false;\n this.callbacks.forEach((cb) => {\n cb(this.onerrorEvent);\n });\n this.callbacks = [];\n }\n execute() {\n this.resetIfRetryingFailed();\n if (this.done) {\n this.callback();\n }\n else {\n // short circuit and warn if google.maps is already loaded\n if (window.google && window.google.maps && window.google.maps.version) {\n console.warn(\"Google Maps already loaded outside @googlemaps/js-api-loader.\" +\n \"This may result in undesirable behavior as options and script parameters may not match.\");\n this.callback();\n return;\n }\n if (this.loading) ;\n else {\n this.loading = true;\n this.setScript();\n }\n }\n }\n}\n\nexport { DEFAULT_ID, Loader, LoaderStatus };\n//# sourceMappingURL=index.esm.js.map\n","(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@googlemaps/js-api-loader'), require('react')) :\n typeof define === 'function' && define.amd ? define(['exports', '@googlemaps/js-api-loader', 'react'], factory) :\n (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Loader = {}, global.jsApiLoader, global.React));\n})(this, (function (exports, jsApiLoader, React) { 'use strict';\n\n function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }\n\n var React__default = /*#__PURE__*/_interopDefaultLegacy(React);\n\n /**\n * Copyright 2021 Google LLC. All Rights Reserved.\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at.\n *\n * Http://www.apache.org/licenses/LICENSE-2.0.\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n exports.Status = void 0;\n (function (Status) {\n Status[\"LOADING\"] = \"LOADING\";\n Status[\"FAILURE\"] = \"FAILURE\";\n Status[\"SUCCESS\"] = \"SUCCESS\";\n })(exports.Status || (exports.Status = {}));\n /**\n * A component to wrap the loading of the Google Maps JavaScript API.\n *\n * ```\n * import { Wrapper } from '@googlemaps/react-wrapper';\n *\n * const MyApp = () => (\n * \t\n * \t\t\n * \t\n * );\n * ```\n *\n * @param props\n */\n const Wrapper = ({ children, render, callback, ...options }) => {\n const [status, setStatus] = React.useState(exports.Status.LOADING);\n React.useEffect(() => {\n const loader = new jsApiLoader.Loader(options);\n const setStatusAndExecuteCallback = (status) => {\n if (callback)\n callback(status, loader);\n setStatus(status);\n };\n setStatusAndExecuteCallback(exports.Status.LOADING);\n loader.load().then(() => setStatusAndExecuteCallback(exports.Status.SUCCESS), () => setStatusAndExecuteCallback(exports.Status.FAILURE));\n }, []);\n if (status === exports.Status.SUCCESS && children)\n return React__default[\"default\"].createElement(React__default[\"default\"].Fragment, null, children);\n if (render)\n return render(status);\n return React__default[\"default\"].createElement(React__default[\"default\"].Fragment, null);\n };\n\n exports.Wrapper = Wrapper;\n\n Object.defineProperty(exports, '__esModule', { value: true });\n\n}));\n","\"use strict\";\n\"use client\";\n\nvar _interopRequireDefault = require(\"@babel/runtime/helpers/interopRequireDefault\");\nObject.defineProperty(exports, \"__esModule\", {\n value: true\n});\nexports.default = void 0;\nvar _createSvgIcon = _interopRequireDefault(require(\"./utils/createSvgIcon\"));\nvar _jsxRuntime = require(\"react/jsx-runtime\");\nvar _default = exports.default = (0, _createSvgIcon.default)( /*#__PURE__*/(0, _jsxRuntime.jsx)(\"path\", {\n d: \"M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14\"\n}), 'Search');","import { useRef, useState, useCallback, useEffect } from 'react';\n\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nvar useLatest = (function (val) {\n var ref = useRef(val);\n ref.current = val;\n return ref;\n});\n\nvar _debounce = (function (fn, delay) {\n var timer; // eslint-disable-next-line func-names\n\n return function () {\n var _this = 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 if (timer !== null) {\n clearTimeout(timer);\n timer = null;\n }\n\n timer = setTimeout(function () {\n return fn.apply(_this, args);\n }, delay);\n };\n});\n\nvar loadApiErr = \"💡 use-places-autocomplete: Google Maps Places API library must be loaded. See: https://github.com/wellyshen/use-places-autocomplete#load-the-library\";\n\nvar usePlacesAutocomplete = function usePlacesAutocomplete(_temp) {\n var _ref = _temp === void 0 ? {} : _temp,\n requestOptions = _ref.requestOptions,\n _ref$debounce = _ref.debounce,\n debounce = _ref$debounce === void 0 ? 200 : _ref$debounce,\n _ref$cache = _ref.cache,\n cache = _ref$cache === void 0 ? 24 * 60 * 60 : _ref$cache,\n _ref$cacheKey = _ref.cacheKey,\n cacheKey = _ref$cacheKey === void 0 ? \"upa\" : _ref$cacheKey,\n googleMaps = _ref.googleMaps,\n callbackName = _ref.callbackName,\n _ref$defaultValue = _ref.defaultValue,\n defaultValue = _ref$defaultValue === void 0 ? \"\" : _ref$defaultValue,\n _ref$initOnMount = _ref.initOnMount,\n initOnMount = _ref$initOnMount === void 0 ? true : _ref$initOnMount;\n\n var _useState = useState(false),\n ready = _useState[0],\n setReady = _useState[1];\n\n var _useState2 = useState(defaultValue),\n value = _useState2[0],\n setVal = _useState2[1];\n\n var _useState3 = useState({\n loading: false,\n status: \"\",\n data: []\n }),\n suggestions = _useState3[0],\n setSuggestions = _useState3[1];\n\n var asRef = useRef();\n var requestOptionsRef = useLatest(requestOptions);\n var googleMapsRef = useLatest(googleMaps);\n var init = useCallback(function () {\n var _google$maps;\n\n if (asRef.current) return;\n var _window = window,\n google = _window.google;\n var gMaps = googleMapsRef.current;\n var placesLib = (gMaps == null ? void 0 : gMaps.places) || (google == null ? void 0 : (_google$maps = google.maps) == null ? void 0 : _google$maps.places);\n\n if (!placesLib) {\n console.error(loadApiErr);\n return;\n }\n\n asRef.current = new placesLib.AutocompleteService();\n setReady(true);\n }, [googleMapsRef]);\n var clearSuggestions = useCallback(function () {\n setSuggestions({\n loading: false,\n status: \"\",\n data: []\n });\n }, []);\n var clearCache = useCallback(function (key) {\n if (key === void 0) {\n key = cacheKey;\n }\n\n try {\n sessionStorage.removeItem(key);\n } catch (error) {// Skip exception\n }\n }, [cacheKey]); // eslint-disable-next-line react-hooks/exhaustive-deps\n\n var fetchPredictions = useCallback(_debounce(function (val) {\n var _asRef$current;\n\n if (!val) {\n clearSuggestions();\n return;\n }\n\n setSuggestions(function (prevState) {\n return _extends({}, prevState, {\n loading: true\n });\n });\n var cachedData = {};\n\n try {\n cachedData = JSON.parse(sessionStorage.getItem(cacheKey) || \"{}\");\n } catch (error) {// Skip exception\n }\n\n if (cache) {\n cachedData = Object.keys(cachedData).reduce(function (acc, key) {\n if (cachedData[key].maxAge - Date.now() >= 0) acc[key] = cachedData[key];\n return acc;\n }, {});\n\n if (cachedData[val]) {\n setSuggestions({\n loading: false,\n status: \"OK\",\n data: cachedData[val].data\n });\n return;\n }\n }\n\n (_asRef$current = asRef.current) == null ? void 0 : _asRef$current.getPlacePredictions(_extends({}, requestOptionsRef.current, {\n input: val\n }), function (data, status) {\n setSuggestions({\n loading: false,\n status: status,\n data: data || []\n });\n\n if (cache && status === \"OK\") {\n cachedData[val] = {\n data: data,\n maxAge: Date.now() + cache * 1000\n };\n\n try {\n sessionStorage.setItem(cacheKey, JSON.stringify(cachedData));\n } catch (error) {// Skip exception\n }\n }\n });\n }, debounce), [cache, cacheKey, clearSuggestions, requestOptionsRef]);\n var setValue = useCallback(function (val, shouldFetchData) {\n if (shouldFetchData === void 0) {\n shouldFetchData = true;\n }\n\n setVal(val);\n if (asRef.current && shouldFetchData) fetchPredictions(val);\n }, [fetchPredictions]);\n useEffect(function () {\n if (!initOnMount) return function () {\n return null;\n };\n var _window2 = window,\n google = _window2.google;\n\n if (!googleMapsRef.current && !(google != null && google.maps) && callbackName) {\n window[callbackName] = init;\n } else {\n init();\n }\n\n return function () {\n // @ts-ignore\n if (window[callbackName]) delete window[callbackName];\n };\n }, [callbackName, googleMapsRef, init, initOnMount]);\n return {\n ready: ready,\n value: value,\n suggestions: suggestions,\n setValue: setValue,\n clearSuggestions: clearSuggestions,\n clearCache: clearCache,\n init: init\n };\n};\n\n/* eslint-disable compat/compat */\nvar geocodeErr = \"💡 use-places-autocomplete: Please provide an address when using getGeocode() with the componentRestrictions.\";\nvar getGeocode = function getGeocode(args) {\n var geocoder = new window.google.maps.Geocoder();\n return new Promise(function (resolve, reject) {\n geocoder.geocode(args, function (results, status) {\n if (status !== \"OK\") reject(status);\n\n if (!args.address && args.componentRestrictions) {\n console.error(geocodeErr);\n resolve(results);\n }\n\n resolve(results);\n });\n });\n};\nvar getLatLng = function getLatLng(result) {\n var _result$geometry$loca = result.geometry.location,\n lat = _result$geometry$loca.lat,\n lng = _result$geometry$loca.lng;\n return {\n lat: lat(),\n lng: lng()\n };\n};\nvar getZipCode = function getZipCode(result, useShortName) {\n var foundZip = result.address_components.find(function (_ref) {\n var types = _ref.types;\n return types.includes(\"postal_code\");\n });\n if (!foundZip) return undefined;\n return useShortName ? foundZip.short_name : foundZip.long_name;\n};\nvar getDetailsErr = \"💡 use-places-autocomplete: Please provide a place Id when using getDetails() either as a string or as part of an Autocomplete Prediction.\";\nvar getDetails = function getDetails(args) {\n var PlacesService = new window.google.maps.places.PlacesService(document.createElement(\"div\"));\n\n if (!args.placeId) {\n console.error(getDetailsErr);\n return Promise.reject(getDetailsErr);\n }\n\n return new Promise(function (resolve, reject) {\n PlacesService.getDetails(args, function (results, status) {\n if (status !== \"OK\") reject(status);\n resolve(results);\n });\n });\n};\n\nexport { usePlacesAutocomplete as default, getDetails, getGeocode, getLatLng, getZipCode };\n//# sourceMappingURL=index.esm.js.map\n","import React from 'react'\nimport Autocomplete from '@mui/joy/Autocomplete'\nimport { useTranslation } from 'react-i18next'\nimport usePlacesAutocomplete from \"use-places-autocomplete\"\n\nimport { SearchIcon } from './icons'\n\nexport default function PlacesAutocomplete({\n location,\n handleSelect,\n autocompleteType,\n} : {\n location: string | null,\n handleSelect: Function,\n autocompleteType: 'light' | 'full',\n}) {\n\n const { t } = useTranslation()\n\n const {\n ready,\n value,\n suggestions: { status, data },\n setValue,\n } = usePlacesAutocomplete({\n requestOptions: {\n componentRestrictions: { country: 'cz' },\n //types: ['geocode'],\n }\n })\n\n if (autocompleteType === 'light') {\n return (\n {\n handleSelect(event, newValue, 'location')\n }}\n onInputChange={(event, newInputValue) => {\n handleSelect(event, newInputValue, 'location')\n setValue(newInputValue)\n }}\n loading={status !== \"OK\"}\n loadingText={t('search.whereEmpty')}\n value={location ?? ''}\n inputValue={location ?? ''}\n options={status === \"OK\" ? data.map(({ description }) => description) : []}\n sx={{\n fontSize: '1rem',\n minHeight: 0,\n paddingLeft: '0.25rem',\n paddingRight: '0.25rem',\n borderColor: 'transparent',\n borderRadius: '0.25rem',\n backgroundColor: 'white',\n boxShadow: 'none',\n lineHeight: '28px',\n '--Input-focusedHighlight': 'var(--joy-palette-secondary-200)',\n '&:hover:not(.Joy-focused)': {\n borderColor: 'var(--joy-palette-secondary-200)',\n }\n }}\n slotProps={{\n listbox: {\n sx: () => ({\n zIndex: 2000,\n backgroundColor: 'white',\n minWidth: {\n md: '300px !important',\n },\n inset: {\n lg: '0 auto auto 50px !important',\n },\n }),\n },\n }}\n />\n )\n } else {\n return(\n }\n placeholder={t('search.wherePlaceholder')}\n freeSolo\n disableClearable\n onChange={(event, newValue) => {\n handleSelect(event, newValue, 'location')\n }}\n onInputChange={(event, newInputValue) => {\n handleSelect(event, newInputValue, 'location')\n setValue(newInputValue)\n }}\n loading={status !== \"OK\"}\n loadingText={t('search.whereEmpty')}\n value={location ?? ''}\n inputValue={location ?? ''}\n options={status === \"OK\" ? data.map(({ description }) => description) : []}\n sx={{\n backgroundColor: 'white',\n //boxShadow: 'none',\n lineHeight: '28px',\n }}\n slotProps={{\n listbox: {\n sx: () => ({\n zIndex: 2000,\n backgroundColor: 'white',\n })\n }\n }}\n />\n )\n }\n}\n","import React, { type SyntheticEvent, type MouseEventHandler } from 'react'\nimport Button from '@mui/joy/Button'\nimport Box from '@mui/joy/Box'\nimport Modal from '@mui/joy/Modal'\nimport ModalClose from '@mui/joy/ModalClose'\nimport ModalDialog from '@mui/joy/ModalDialog'\nimport FormLabel from '@mui/joy/FormLabel'\nimport FormControl from '@mui/joy/FormControl'\nimport { useTranslation } from 'react-i18next'\nimport moment from 'moment-timezone/builds/moment-timezone-with-data-10-year-range.js'\nimport 'moment/dist/locale/cs'\nimport 'moment/dist/locale/de'\nimport 'moment/dist/locale/pl'\nimport type { Moment } from 'moment'\nimport { Wrapper } from '@googlemaps/react-wrapper'\nimport IconButton from '@mui/joy/IconButton'\nimport SearchIcon from '@mui/icons-material/Search'\nimport ArrowBackIosNewRoundedIcon from '@mui/icons-material/ArrowBackIosNewRounded'\n\n// React-dates picker\nimport 'react-dates-gte-react-17/initialize'\nimport { DayPickerRangeController } from 'react-dates-gte-react-17'\nimport 'react-dates-gte-react-17/lib/css/_datepicker.css'\nimport '../styles/react-dates-overrides.scss'\n\nimport type {\n SearchType,\n TimeHighlight,\n} from '../types'\nimport { ArrowForwardIcon } from './icons'\nimport TimePicker from './time-picker'\nimport {\n isInclusivelyAfterDay,\n getDayLimits,\n} from '../helpers'\nimport PlacesAutocomplete from './places-autocomplete'\nimport { END_DATE, RESERVATION_MIN_HOURS, START_DATE } from '../constants'\nimport type { SearchSubmissionType } from '../types'\n\nexport default function SearchModal({\n searchModalOpen,\n handleToggleSearchModalOpen,\n currentSearch,\n modalType,\n handleSearchReset,\n handleSelect,\n handleDateChange,\n handleFocusChange,\n garagesMap,\n reservationDays,\n reservationHours,\n selectedCETDateTime,\n currentCETDateTime,\n searchLink,\n setSearch,\n garageDetail,\n home,\n timeHighlight,\n} : {\n searchModalOpen: boolean,\n handleToggleSearchModalOpen: () => void,\n currentSearch: SearchType,\n modalType: 'mobile' | 'desktop',\n handleSearchReset: MouseEventHandler,\n handleSelect: (event: SyntheticEvent | null, newValue: string | null, name : string) => void,\n handleDateChange: ({ startDate, endDate, }: {\n startDate: Moment | null,\n endDate: Moment | null,\n }, focusedInput: typeof START_DATE | typeof END_DATE) => void,\n handleFocusChange: (focusedInput: typeof START_DATE | typeof END_DATE) => void,\n garagesMap?: boolean | undefined,\n reservationDays: number,\n reservationHours: number,\n selectedCETDateTime: Moment,\n currentCETDateTime: Moment,\n searchLink?: string,\n setSearch?: (newSearch: SearchSubmissionType) => void,\n garageDetail?: boolean | undefined,\n home?: boolean | undefined,\n timeHighlight: TimeHighlight,\n}) {\n\n const { t, i18n } = useTranslation()\n const userLang = i18n.language\n\n // Set moment locale from i18n, moment locale used by react-dates\n moment.locale(userLang)\n if (userLang === 'cs') {\n moment.updateLocale('cs', {\n months : [\n \"leden\", \"únor\", \"březen\", \"duben\", \"květen\", \"červen\", \"červenec\",\n \"srpen\", \"září\", \"říjen\", \"listopad\", \"prosinec\"\n ],\n weekdaysMin : [\n \"Ne\", \"Po\", \"Út\", \"St\", \"Čt\", \"Pá\", \"So\"\n ],\n weekdays : [\n \"Neděle\", \"Pondělí\", \"Úterý\", \"Středa\", \"Čtvrtek\", \"Pátek\", \"Sobota\"\n ]\n })\n }\n moment.tz.setDefault('Europe/Prague')\n\n const {\n maximumStayDays,\n maximumDaysInAdvance,\n } = getDayLimits()\n\n const isOutsideRange = (day: Moment): boolean => {\n // Check if day is today or later\n if (!(isInclusivelyAfterDay(day, moment()))) return true\n // Check if day isn't over 150 days from today\n if (isInclusivelyAfterDay(day, moment().add(maximumDaysInAdvance + 1, 'days'))) return true\n\n // endDate cannot be more than 30 nights from startDate\n if (currentSearch.startDate &&\n currentSearch.focusedInput === END_DATE &&\n isInclusivelyAfterDay(day, currentSearch.startDate.clone().add(maximumStayDays + 1, 'days'))\n ) return true\n\n return false\n }\n\n const reservationTooShort = reservationDays < 1 && reservationHours < RESERVATION_MIN_HOURS\n const reservationInThePast = selectedCETDateTime < currentCETDateTime\n\n if (modalType === 'mobile') {\n return (\n handleToggleSearchModalOpen()}>\n \n \n {!garageDetail &&\n \n {t('search.where')}\n \n \n \n \n }\n \n {t('search.selectDate')}\n \n \n {/* display=\"flex\" is a fix for Safari height: 100% not working properly in PWA */}\n \n {\n if (currentSearch.focusedInput === START_DATE) {\n handleDateChange(e, START_DATE)\n } else {\n handleDateChange(e, END_DATE)\n }\n }} // PropTypes.func.isRequired,\n focusedInput={currentSearch.focusedInput} // PropTypes.oneOf([START_DATE, END_DATE]) or null,\n onFocusChange={focusedInput => handleFocusChange(focusedInput)} // PropTypes.func.isRequired,\n // Keep to shift to a specific month when startDate selected, happens by default\n initialVisibleMonth={() => moment()} // PropTypes.func or null,\n orientation=\"verticalScrollable\"\n numberOfMonths={7}\n verticalHeight={300}\n noNavButtons\n noBorder\n renderKeyboardShortcutsButton={() => {}}\n monthFormat=\"MMMM YYYY\"\n minimumNights={0}\n isOutsideRange={day => isOutsideRange(day)}\n minDate={moment()}\n maxDate={moment().add(maximumDaysInAdvance + 1, 'days')}\n daySize={46}\n />\n \n \n {!currentSearch.startDate ? t('search.selectStart') :\n !currentSearch.endDate ? \n \n {t('search.selectEnd')}\n \n : \n (reservationDays || reservationHours) ?\n \n {t('search.reservationLength')+':'}\n {reservationDays ? t('search.days', {count: reservationDays}) : ''} \n {reservationHours ? t('search.hours', {count: reservationHours}) : ''}\n \n :\n {t('search.reservationLength')+': '+t('search.hours', {count: 0})}\n }\n \n {reservationInThePast &&\n \n {t('search.startInThePast')}\n \n }\n {reservationTooShort &&\n \n {t('search.reservationTooShort')}\n \n }\n \n \n \n {t('search.arrivalAfter')}\n \n {currentSearch.startDate !== null ?\n moment(currentSearch.startDate).locale(userLang).format('dddd, DD. MMM') :\n '- -. - -. - - - -'\n }\n \n \n \n \n \n \n {t('search.departureBefore')}\n \n {currentSearch.endDate !== null ?\n moment(currentSearch.endDate).locale(userLang).format('dddd, DD. MMM') :\n '- -. - -. - - - -'\n }\n \n \n \n \n \n \n handleToggleSearchModalOpen()} sx={{\n '&:hover': {\n '& svg': {\n fill: 'var(--joy-palette-primary-900)',\n },\n },\n }}>\n \n \n \n \n {t('search.reset')}\n \n setSearch({\n startDate: currentSearch.startDate,\n startTime: currentSearch.startTime,\n endDate: currentSearch.endDate,\n endTime: currentSearch.endTime,\n location: currentSearch.location,\n }) : undefined}\n sx={{\n fontSize: '15px',\n padding: '0.5rem 1rem',\n borderRadius: '7px',\n // imitate disabled for link\n ...(!currentSearch.startDate ||\n !currentSearch.endDate ||\n reservationTooShort ||\n reservationInThePast) ? {\n pointerEvents: 'none',\n cursor: 'default',\n color: '#fff',\n backgroundColor: '#828282',\n } : {},\n // legacy application stylesheet override\n '&:hover': {\n color: 'secondary.solidBg',\n },\n }}\n startDecorator={\n \n }\n >\n {garageDetail ? t('search.edit') : t('search.search')}\n \n \n \n \n \n )\n }\n\n return (\n handleToggleSearchModalOpen()}>\n \n {home &&\n \n }\n \n \n {t('search.reservationDate')}\n \n \n {currentSearch.startDate !== null ?\n \n \n {moment(currentSearch.startDate).format('dddd, ')}\n \n {moment(currentSearch.startDate).format('D. MMMM')}\n :\n '- -. - -. - - - -'}, {currentSearch.startTime ?? '--:--'}\n \n \n \n \n {currentSearch.endDate !== null ?\n \n \n {moment(currentSearch.endDate).format('dddd, ')}\n \n {moment(currentSearch.endDate).format('D. MMMM')}\n :\n '- -. - -. - - - -'}, {currentSearch.endTime ?? '--:--'}\n \n \n \n {!garageDetail &&\n \n \n {t('search.where')}\n \n \n \n \n \n }\n \n \n \n \n \n {\n if (currentSearch.focusedInput === START_DATE) {\n handleDateChange(e, START_DATE)\n } else {\n handleDateChange(e, END_DATE)\n }\n }} // Required\n focusedInput={currentSearch.focusedInput} // Required\n onFocusChange={focusedInput => handleFocusChange(focusedInput)} // Required\n numberOfMonths={2}\n verticalHeight={400}\n noBorder\n renderKeyboardShortcutsButton={() => {}}\n monthFormat=\"MMMM YYYY\"\n minimumNights={0}\n isOutsideRange={day => isOutsideRange(day)}\n minDate={moment()}\n maxDate={moment().add(maximumDaysInAdvance + 1, 'days')}\n transitionDuration={0}\n />\n \n \n \n \n \n \n \n {t('search.reset')}\n \n \n \n {!currentSearch.startDate ? t('search.selectStart') :\n !currentSearch.endDate ? \n \n {t('search.selectEnd')}\n \n : \n (reservationDays || reservationHours) ?\n \n {t('search.reservationLength')+':'}\n {reservationDays ? t('search.days', {count: reservationDays}) : ''} \n {reservationHours ? t('search.hours', {count: reservationHours}) : ''}\n \n :\n {t('search.reservationLength')+': '+t('search.hours', {count: 0})}\n }\n {reservationInThePast &&\n {t('search.startInThePast')}\n }\n {reservationTooShort &&\n {t('search.reservationTooShort')}\n }\n \n setSearch({\n startDate: currentSearch.startDate,\n startTime: currentSearch.startTime,\n endDate: currentSearch.endDate,\n endTime: currentSearch.endTime,\n location: currentSearch.location,\n }) : undefined}\n sx={{\n paddingLeft: '1.5rem',\n paddingRight: '1.5rem',\n // imitate disabled for link\n ...(!currentSearch.startDate ||\n !currentSearch.endDate ||\n reservationTooShort ||\n reservationInThePast) ? {\n pointerEvents: 'none',\n cursor: 'default',\n color: '#fff',\n backgroundColor: '#828282',\n } : {},\n // legacy application stylesheet override\n '&:hover': {\n color: 'secondary.solidBg',\n }\n }}\n >\n {garageDetail ? t('search.edit') : t('search.search')}\n \n \n \n \n \n )\n}","import { atom } from 'jotai'\nimport type { SearchSubmissionType } from './types'\nimport { getSearchParams } from './helpers'\nimport moment from 'moment-timezone/builds/moment-timezone-with-data-10-year-range.js'\n\nconst {\n paramLocation,\n paramBeginsAtDate,\n paramBeginsAtTime,\n paramEndsAtDate,\n paramEndsAtTime,\n} = getSearchParams()\n\nexport const searchSubmissionAtom = atom({\n startDate: moment(paramBeginsAtDate, ['DD.MM.YYYY', 'YYYY-MM-DD']),\n startTime: paramBeginsAtTime,\n endDate: moment(paramEndsAtDate, ['DD.MM.YYYY', 'YYYY-MM-DD']),\n endTime: paramEndsAtTime,\n location: paramLocation,\n})\n","import {\n useState,\n useEffect,\n type ChangeEvent,\n} from 'react'\nimport type { SyntheticEvent } from 'react'\nimport { useAtomValue } from 'jotai'\nimport moment from 'moment-timezone/builds/moment-timezone-with-data-10-year-range.js'\nimport type { Moment } from 'moment'\n\nimport type {\n SearchType,\n TimeHighlight,\n} from '../types'\nimport { RESERVATION_MIN_HOURS, START_DATE } from '../constants'\nimport type { END_DATE } from '../constants'\nimport { searchSubmissionAtom } from '../state'\n\nexport const useGarageSearch = () => {\n\n const searchSubmission = useAtomValue(searchSubmissionAtom)\n\n const initialSearch: SearchType = {\n startDate: searchSubmission.startDate,\n startTime: searchSubmission.startTime,\n endDate: searchSubmission.endDate,\n endTime: searchSubmission.endTime,\n location: searchSubmission.location,\n focusedInput: START_DATE,\n }\n \n const [currentSearch, setCurrentSearch] = useState(initialSearch)\n\n // Animation trigger for time picker upon date selection\n const [timeHighlight, setTimeHighlight] = useState({\n startTime: false,\n endTime: false,\n })\n\n useEffect(() => {\n const timer = setTimeout(() => {\n if (timeHighlight.startTime === true || timeHighlight.endTime === true) {\n setTimeHighlight({\n startTime: false,\n endTime: false,\n })\n }\n }, 400)\n return () => clearTimeout(timer)\n }, [timeHighlight.startTime, timeHighlight.endTime])\n\n const [mobileSearchDialog, setMobileSearchDialog] = useState(false)\n const [desktopSearchDialog, setDesktopSearchDialog] = useState(false)\n\n const handleToggleMobileSearchDialog = () => {\n setMobileSearchDialog(!mobileSearchDialog)\n handleSearchReset()\n }\n\n const handleToggleDesktopSearchDialog = () => {\n setDesktopSearchDialog(!desktopSearchDialog)\n handleSearchReset()\n }\n\n /**\n * Saves content of a textField into the state object\n */\n const handleChange = (\n event: ChangeEvent | null,\n name: string,\n ) => {\n const newValue = event?.target.value\n setCurrentSearch(prevState => (\n {\n ...prevState,\n [name]: newValue,\n }\n ))\n }\n \n /**\n * Saves content of a textField into the state object\n */\n const handleSelect = (\n _event: SyntheticEvent | null,\n newValue: string | null,\n name: string,\n ) => {\n setCurrentSearch(prevState => (\n {\n ...prevState,\n [name]: newValue,\n }\n ))\n }\n\n /**\n * Saves date into the state object\n */\n const handleDateChange = (\n {\n startDate,\n endDate,\n }: {\n startDate: Moment | null,\n endDate: Moment | null,\n },\n focusedInput: typeof START_DATE | typeof END_DATE,\n ) => {\n if (focusedInput === START_DATE) {\n setCurrentSearch(prevState => (\n {\n ...prevState,\n startDate,\n endDate: null,\n }\n ))\n setTimeHighlight(prevState => (\n {\n ...prevState,\n startTime: true,\n }\n ))\n } else {\n setCurrentSearch(prevState => (\n {\n ...prevState,\n startDate,\n endDate,\n }\n ))\n setTimeHighlight(prevState => (\n {\n ...prevState,\n endTime: true,\n }\n ))\n }\n }\n\n /**\n * Shifts focus between start and end date\n * @param {*} focusedInput\n */\n const handleFocusChange = (focusedInput: typeof START_DATE | typeof END_DATE) => {\n setCurrentSearch(prevState => (\n {\n ...prevState,\n // Force the focusedInput to always be truthy so that dates are always selectable\n focusedInput: !focusedInput ? START_DATE : focusedInput,\n }\n ))\n }\n\n /**\n * Resets the search\n */\n const handleSearchReset = () => {\n setCurrentSearch(initialSearch)\n }\n \n const formattedStartDate = currentSearch.startDate ? `${moment(currentSearch.startDate).format('YYYY-MM-DD')}T${currentSearch.startTime}` : null\n const formattedEndDate = currentSearch.endDate ? `${moment(currentSearch.endDate).format('YYYY-MM-DD')}T${currentSearch.endTime}` : null\n let reservationDays: number\n let reservationHours: number\n const differenceInHours = moment(formattedEndDate).startOf('hour').diff(moment(formattedStartDate).startOf('hour'), 'hours')\n if (differenceInHours > 24) {\n reservationDays = Math.floor(differenceInHours/24)\n reservationHours = differenceInHours%24\n } else {\n reservationDays = 0\n reservationHours = differenceInHours\n }\n\n const currentDateTime = moment()\n const currentCETDateTime = currentDateTime.clone().tz(\"Europe/Prague\").subtract({hours: 1})\n const selectedCETDateTime = moment(`${currentSearch.startDate?.format('YYYY-MM-DD')} ${currentSearch.startTime}`)\n\n const reservationTooShort = reservationDays < 1 && reservationHours < RESERVATION_MIN_HOURS\n const reservationInThePast = selectedCETDateTime < currentCETDateTime\n\n return {\n currentSearch,\n handleChange,\n handleSelect,\n handleDateChange,\n handleFocusChange,\n mobileSearchDialog,\n setMobileSearchDialog,\n handleToggleMobileSearchDialog,\n desktopSearchDialog,\n setDesktopSearchDialog,\n handleToggleDesktopSearchDialog,\n handleSearchReset,\n reservationTooShort,\n reservationInThePast,\n reservationDays,\n reservationHours,\n selectedCETDateTime,\n currentCETDateTime,\n timeHighlight,\n }\n}\n"],"names":["usePreviousProps","value","ref","React.useRef","React.useEffect","usePreviousProps$1","stripDiacritics","string","createFilterOptions","config","ignoreAccents","ignoreCase","limit","matchFrom","stringify","trim","options","inputValue","getOptionLabel","input","filteredOptions","option","candidate","findIndex","array","comp","i","defaultFilterOptions","pageSize","defaultIsActiveElementInListbox","listboxRef","_listboxRef$current$p","useAutocomplete","props","unstable_isActiveElementInListbox","unstable_classNamePrefix","autoComplete","autoHighlight","autoSelect","blurOnSelect","clearOnBlur","clearOnEscape","componentName","defaultValue","disableClearable","disableCloseOnSelect","disabledProp","disabledItemsFocusable","disableListWrap","filterOptions","filterSelectedOptions","freeSolo","getOptionDisabled","getOptionLabelProp","_option$label","groupBy","handleHomeEndKeys","idProp","includeInputInList","inputValueProp","isOptionEqualToValue","multiple","onChange","onClose","onHighlightChange","onInputChange","onOpen","openProp","openOnFocus","readOnly","selectOnFocus","valueProp","id","useId","optionLabel","ignoreFocus","firstFocus","inputRef","anchorEl","setAnchorEl","React.useState","focusedTag","setFocusedTag","defaultHighlighted","highlightedIndexRef","setValueState","useControlled","setInputValueState","focused","setFocused","resetInputValue","React.useCallback","event","newValue","newInputValue","open","setOpenState","inputPristine","setInputPristine","inputValueIsSelectedValue","popupOpen","value2","previousProps","valueChange","listboxAvailable","focusTag","useEventCallback","tagToFocus","validOptionIndex","index","direction","nextFocus","nextFocusDisabled","setHighlightedIndex","reason","prev","listboxNode","element","scrollBottom","elementBottom","changeHighlightedIndex","diff","nextIndex","maxIndex","newIndex","checkHighlightedOptionExists","isSameValue","value1","label1","label2","val","previousHighlightedOption","syncHighlightedIndex","valueItem","currentOption","itemIndex","optionItem","handleListboxRef","node","setRef","handleOpen","handleClose","handleValue","details","isTouch","selectNewValue","reasonProp","origin","validTagIndex","handleFocusTag","nextTag","handleClear","handleKeyDown","other","disabled","handleFocus","handleBlur","handleInputChange","handleOptionMouseMove","handleOptionTouchStart","handleOptionClick","handleTagDelete","handlePopupIndicator","handleMouseDown","handleClick","handleInputMouseDown","dirty","groupedOptions","acc","group","_extends","selected","ListSubheaderDispatch","React.createContext","ListSubheaderDispatch$1","_excluded","useUtilityClasses","ownerState","sticky","nested","nesting","variant","color","slots","capitalize","composeClasses","getListItemUtilityClass","StyledListItem","styled","theme","_theme$variants","ListItemRoot","styles","ListItemStartAction","ListItemEndAction","ListItem","React.forwardRef","inProps","useThemeProps","React.useContext","GroupListContext","listComponent","ComponentListContext","row","RowListContext","wrap","WrapListContext","NestedListContext","componentProp","className","children","colorProp","startAction","endAction","roleProp","slotProps","_objectWithoutPropertiesLoose","getColor","useColorInversion","subheaderId","setSubheaderId","listElement","listRole","component","role","classes","externalForwardedProps","SlotRoot","rootProps","useSlot","clsx","SlotStartAction","startActionProps","SlotEndAction","endActionProps","_jsx","_jsxs","React.Children","child","React.isValidElement","React.cloneElement","isMuiElement","ListItem$1","ArrowDropDownIcon","createSvgIcon","getChipUtilityClass","slot","generateUtilityClass","chipClasses","generateUtilityClasses","chipClasses$1","ChipColorContext","ChipContext","size","clickable","focusVisible","ChipRoot","_theme$variants2","_theme$variants3","variantStyle","borderRadius","resolveSxValue","ChipLabel","ChipAction","_theme$variants4","_theme$variants5","_theme$variants6","_theme$variants7","ChipStartDecorator","ChipEndDecorator","Chip","onClick","startDecorator","endDecorator","resolvedActionProps","actionRef","getRootProps","useButton","SlotLabel","labelProps","SlotAction","actionProps","SlotStartDecorator","startDecoratorProps","SlotEndDecorator","endDecoratorProps","chipContextValue","React.useMemo","VariantColorProvider","Chip$1","Cancel","getChipDeleteUtilityClass","_Cancel","_excluded2","ChipDeleteRoot","StyledIconButton","ChipDelete","variantProp","onKeyDown","onDelete","chipContext","inheritedColor","useVariantColor","buttonRef","handleRef","useForkRef","handleClickDelete","handleKeyDelete","restOfRootProps","ChipDelete$1","getListSubheaderUtilityClass","ListSubheaderRoot","_theme$vars$palette","ListSubheader","idOverride","ListSubheader$1","getAutocompleteUtilityClass","autocompleteClasses","autocompleteClasses$1","StyledAutocompleteListbox","StyledList","scopedVariables","listItemClasses","listClasses","StyledAutocompleteOption","StyledListItemButton","_ClearIcon","_ArrowDropDownIcon","_excluded3","_excluded4","defaultGetOptionLabel","defaultLimitTagsText","more","defaultRenderGroup","params","List","hasClearIcon","hasPopupIcon","AutocompleteRoot","StyledInputRoot","AutocompleteWrapper","AutocompleteInput","StyledInputHtml","AutocompleteStartDecorator","StyledInputStartDecorator","AutocompleteEndDecorator","StyledInputEndDecorator","AutocompleteClearIndicator","AutocompletePopupIndicator","AutocompleteListbox","AutocompleteOption","AutocompleteLoading","AutocompleteNoOptions","AutocompleteLimitTag","excludeUseAutocompleteParams","_ref","Autocomplete","_ref2","_inProps$error","_ref3","_inProps$size","_inProps$color","_formControl$color","_ref4","ariaDescribedby","ariaLabel","ariaLabelledby","autoFocus","clearIcon","ClearIcon","clearText","closeText","errorProp","forcePopupIcon","getLimitTagsText","limitTags","loading","loadingText","name","noOptionsText","openText","placeholder","popupIcon","renderGroup","renderOptionProp","renderTags","required","type","sizeProp","otherProps","formControl","FormControlContext","error","rootColor","getInputProps","getPopupIndicatorProps","getClearProps","getTagProps","getListboxProps","getOptionProps","handleRootOnClick","selectedOptions","getCustomizedTagProps","_getTagProps","tagProps","rootRef","rootStateClasses","SlotWrapper","wrapperProps","inputStateClasses","SlotInput","inputProps","handlers","_getInputProps","onBlur","onFocus","onMouseDown","inputSlotProps","_handlers$onBlur","_handlers$onFocus","_handlers$onMouseDown","SlotClearIndicator","clearIndicatorProps","mergedProps","getChildVariantAndColor","SlotPopupIndicator","popupIndicatorProps","SlotListbox","listboxProps","SlotLoading","loadingProps","SlotNoOptions","noOptionsProps","SlotLimitTag","limitTagProps","SlotOption","baseOptionProps","renderOption","optionProps","renderListOption","modifiers","popup","_listboxProps$ownerSt","_props$slots","ListProvider","Popper","typedOption","option2","index2","ColorInversion","React.Fragment","Autocomplete$1","keyCount","atom","read","write","key","defaultRead","defaultWrite","get","set","arg","isSelfAtom","a","hasInitialValue","isActuallyWritableAtom","cancelPromiseMap","registerCancelPromise","promise","cancel","cancelPromise","next","resolvePromise","rejectPromise","isPromiseLike","x","isEqualAtomValue","b","isEqualAtomError","hasPromiseAtomValue","isEqualPromiseAtomValue","returnAtomValue","atomState","createStore$1","atomStateMap","mountedMap","pendingStack","pendingMap","devListenersRev2","mountedAtoms","getAtomState","addPendingDependent","_","aState","setAtomState","_a","prevAtomState","updateDependencies","nextAtomState","nextDependencies","keepPreviousDependencies","dependencies","changed","setAtomValue","setAtomValueOrPromise","valueOrPromise","abortPromise","continuePromise","updatePromiseDependencies","mountDependencies","resolve","reject","settled","v","e","setAtomError","readAtomState","force","s","isSync","getter","aState2","controller","setSelf","args","writeAtom","readAtom","recomputeDependents","getDependents","_b","dependents","dependent","topsortedAtoms","markedAtoms","visit","n","m","changedAtoms","isMarked","hasChangedDeps","dep","writeAtomState","setter","args2","r","flushed","flushPending","result","mountAtom","initialDependent","onMountQueue","existingMount","queue","mounted","onMount","onUnmount","f","canUnmountAtom","tryUnmountAtom","mountedDep","prevDependencies","depSet","maybeUnmountAtomSet","pendingAtoms","pending","collectPending","pendingAtom","listener","listeners","defaultStore","getDefaultStore$1","createStore","getDefaultStore","StoreContext","createContext","useStore","store","useContext","Provider","storeRef","useRef","createElement","use","ReactExports","useAtomValue","valueFromReducer","storeFromReducer","atomFromReducer","rerender","useReducer","nextValue","delay","useEffect","unsub","useDebugValue","useSetAtom","useCallback","useAtom","__awaiter","thisArg","_arguments","P","generator","adopt","fulfilled","step","rejected","fastDeepEqual","equal","length","keys","DEFAULT_ID","LoaderStatus","Loader","apiKey","authReferrerPolicy","channel","client","language","libraries","mapIds","nonce","region","retries","url","version","script","err","fn","g","h","k","p","c","l","q","d","u","t","libraryPromises","library","cb","global","factory","exports","require$$0","require$$1","this","jsApiLoader","React","_interopDefaultLegacy","React__default","Status","Wrapper","render","callback","status","setStatus","loader","setStatusAndExecuteCallback","_interopRequireDefault","Search","default_1","_createSvgIcon","_jsxRuntime","require$$2","target","source","useLatest","_debounce","timer","_this","_len","_key","loadApiErr","usePlacesAutocomplete","_temp","requestOptions","_ref$debounce","debounce","_ref$cache","cache","_ref$cacheKey","cacheKey","googleMaps","callbackName","_ref$defaultValue","_ref$initOnMount","initOnMount","_useState","useState","ready","setReady","_useState2","setVal","_useState3","suggestions","setSuggestions","asRef","requestOptionsRef","googleMapsRef","init","_google$maps","_window","google","gMaps","placesLib","clearSuggestions","clearCache","fetchPredictions","_asRef$current","prevState","cachedData","data","setValue","shouldFetchData","_window2","PlacesAutocomplete","location","handleSelect","autocompleteType","useTranslation","description","SearchIcon","SearchModal","searchModalOpen","handleToggleSearchModalOpen","currentSearch","modalType","handleSearchReset","handleDateChange","handleFocusChange","garagesMap","reservationDays","reservationHours","selectedCETDateTime","currentCETDateTime","searchLink","setSearch","garageDetail","home","timeHighlight","i18n","userLang","moment","maximumStayDays","maximumDaysInAdvance","getDayLimits","isOutsideRange","day","isInclusivelyAfterDay","END_DATE","reservationTooShort","RESERVATION_MIN_HOURS","reservationInThePast","Modal","ModalDialog","Box","FormControl","FormLabel","DayPickerRangeController","START_DATE","focusedInput","TimePicker","IconButton","ArrowBackIosNewRoundedIcon","Button","ModalClose","ArrowForwardIcon","paramLocation","paramBeginsAtDate","paramBeginsAtTime","paramEndsAtDate","paramEndsAtTime","getSearchParams","searchSubmissionAtom","useGarageSearch","searchSubmission","initialSearch","setCurrentSearch","setTimeHighlight","mobileSearchDialog","setMobileSearchDialog","desktopSearchDialog","setDesktopSearchDialog","handleToggleMobileSearchDialog","handleToggleDesktopSearchDialog","handleChange","_event","startDate","endDate","formattedStartDate","formattedEndDate","differenceInHours"],"mappings":"6pBAGA,MAAMA,GAAmBC,GAAS,CAChC,MAAMC,EAAMC,SAAa,CAAA,CAAE,EAC3BC,OAAAA,EAAAA,UAAgB,IAAM,CACpBF,EAAI,QAAUD,CAClB,CAAG,EACMC,EAAI,OACb,EACAG,GAAeL,GCDf,SAASM,GAAgBC,EAAQ,CAC/B,OAAO,OAAOA,EAAO,UAAc,IAAcA,EAAO,UAAU,KAAK,EAAE,QAAQ,mBAAoB,EAAE,EAAIA,CAC7G,CACO,SAASC,GAAoBC,EAAS,GAAI,CAC/C,KAAM,CACJ,cAAAC,EAAgB,GAChB,WAAAC,EAAa,GACb,MAAAC,EACA,UAAAC,EAAY,MACZ,UAAAC,EACA,KAAAC,EAAO,EACR,EAAGN,EACJ,MAAO,CAACO,EAAS,CACf,WAAAC,EACA,eAAAC,CACJ,IAAQ,CACJ,IAAIC,EAAQJ,EAAOE,EAAW,KAAI,EAAKA,EACnCN,IACFQ,EAAQA,EAAM,eAEZT,IACFS,EAAQb,GAAgBa,CAAK,GAE/B,MAAMC,EAAmBD,EAAkBH,EAAQ,OAAOK,GAAU,CAClE,IAAIC,GAAaR,GAAaI,GAAgBG,CAAM,EACpD,OAAIV,IACFW,EAAYA,EAAU,eAEpBZ,IACFY,EAAYhB,GAAgBgB,CAAS,GAEhCT,I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