@tylertech/forge 2.17.0 → 2.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +178 -10
- package/dist/esm/accordion/index.js +1 -1
- package/dist/esm/app-bar/help-button/index.js +1 -1
- package/dist/esm/app-bar/index.js +1 -1
- package/dist/esm/app-bar/menu-button/index.js +1 -1
- package/dist/esm/app-bar/notification-button/index.js +1 -1
- package/dist/esm/app-bar/profile-button/index.js +1 -1
- package/dist/esm/app-bar/search/index.js +1 -1
- package/dist/esm/autocomplete/index.js +1 -1
- package/dist/esm/banner/index.js +1 -1
- package/dist/esm/bottom-sheet/index.js +1 -1
- package/dist/esm/calendar/index.js +1 -1
- package/dist/esm/chip-field/index.js +1 -1
- package/dist/esm/chips/chip/index.js +1 -1
- package/dist/esm/chips/chip-set/index.js +1 -1
- package/dist/esm/chips/index.js +1 -1
- package/dist/esm/chunks/{chunk.S2N5KJ7S.js → chunk.23QPY6PU.js} +2 -2
- package/dist/esm/chunks/{chunk.65II7E54.js → chunk.2NA4LVTZ.js} +2 -2
- package/dist/esm/chunks/{chunk.NOO2ZZKZ.js → chunk.3DYMGITQ.js} +2 -2
- package/dist/esm/chunks/{chunk.UW2HWAVL.js → chunk.42QTJZSF.js} +2 -2
- package/dist/esm/chunks/{chunk.LLK7YGQW.js → chunk.54KXJVRY.js} +2 -2
- package/dist/esm/chunks/{chunk.BKAZC53W.js → chunk.55HRCXPA.js} +2 -2
- package/dist/esm/chunks/{chunk.T6NVM7TN.js → chunk.67G7HT5S.js} +2 -2
- package/dist/esm/chunks/{chunk.AEKZWVNO.js → chunk.7G53ACL4.js} +2 -2
- package/dist/esm/chunks/{chunk.AEKZWVNO.js.map → chunk.7G53ACL4.js.map} +3 -3
- package/dist/esm/chunks/{chunk.YMBLWKRP.js → chunk.7IHNVPY5.js} +2 -2
- package/dist/esm/chunks/{chunk.RGAPFLQE.js → chunk.7LX3X2DU.js} +2 -2
- package/dist/esm/chunks/{chunk.XFAOB6LU.js → chunk.7NHFZL6J.js} +2 -2
- package/dist/esm/chunks/{chunk.D24CE6KE.js → chunk.AZFF62ZK.js} +2 -2
- package/dist/esm/chunks/chunk.BINM3NUA.js +7 -0
- package/dist/esm/chunks/chunk.BINM3NUA.js.map +7 -0
- package/dist/esm/chunks/{chunk.IWMA7NUU.js → chunk.D43PPRFO.js} +2 -2
- package/dist/esm/chunks/{chunk.SATUJNQX.js → chunk.ETJMASRZ.js} +2 -2
- package/dist/esm/chunks/{chunk.FOLQAW63.js → chunk.F7ZYEFH5.js} +2 -2
- package/dist/esm/chunks/chunk.GBUXAJPY.js +7 -0
- package/dist/esm/chunks/chunk.GBUXAJPY.js.map +7 -0
- package/dist/esm/chunks/{chunk.6CAOHLX6.js → chunk.GEWDZDXN.js} +2 -2
- package/dist/esm/chunks/{chunk.6CAOHLX6.js.map → chunk.GEWDZDXN.js.map} +2 -2
- package/dist/esm/chunks/{chunk.MSFGXRCM.js → chunk.IV2GMOPB.js} +2 -2
- package/dist/esm/chunks/chunk.IWICN773.js +7 -0
- package/dist/esm/chunks/chunk.IWICN773.js.map +7 -0
- package/dist/esm/chunks/{chunk.H4ZMVM5H.js → chunk.J2FXLTZT.js} +2 -2
- package/dist/esm/chunks/{chunk.H4ZMVM5H.js.map → chunk.J2FXLTZT.js.map} +1 -1
- package/dist/esm/chunks/{chunk.HTH3CEDN.js → chunk.J2PHUKSR.js} +2 -2
- package/dist/esm/chunks/{chunk.BKNYDA4V.js → chunk.JCDIPDQR.js} +2 -2
- package/dist/esm/chunks/{chunk.BAVLVCGK.js → chunk.JOLJ7WVN.js} +2 -2
- package/dist/esm/chunks/{chunk.BAVLVCGK.js.map → chunk.JOLJ7WVN.js.map} +2 -2
- package/dist/esm/chunks/chunk.KCC3C3WH.js +7 -0
- package/dist/esm/chunks/chunk.KCC3C3WH.js.map +7 -0
- package/dist/esm/chunks/{chunk.XIZILH2M.js → chunk.KNVCEYY2.js} +2 -2
- package/dist/esm/chunks/chunk.KQK2XX5H.js +7 -0
- package/dist/esm/chunks/chunk.KQK2XX5H.js.map +7 -0
- package/dist/esm/chunks/{chunk.PYXKGV4Z.js → chunk.MXVJSEF3.js} +2 -2
- package/dist/esm/chunks/{chunk.PYXKGV4Z.js.map → chunk.MXVJSEF3.js.map} +2 -2
- package/dist/esm/chunks/{chunk.SQTM36C3.js → chunk.N6XHXCZE.js} +2 -2
- package/dist/esm/chunks/{chunk.AB5XER3E.js → chunk.NOXJK2U7.js} +2 -2
- package/dist/esm/chunks/{chunk.JDLEPQKN.js → chunk.OEZZ2NEY.js} +2 -2
- package/dist/esm/chunks/{chunk.MS77SPS4.js → chunk.QZ2NXIGY.js} +2 -2
- package/dist/esm/chunks/{chunk.MS77SPS4.js.map → chunk.QZ2NXIGY.js.map} +2 -2
- package/dist/esm/chunks/{chunk.CG5CVENX.js → chunk.RLWX5BFQ.js} +2 -2
- package/dist/esm/chunks/{chunk.274MFEUZ.js → chunk.SFTWKDQV.js} +2 -2
- package/dist/esm/chunks/{chunk.Q5YD3PKM.js → chunk.TH7RLTJK.js} +2 -2
- package/dist/esm/chunks/{chunk.USXO7YKN.js → chunk.TOM77CWD.js} +2 -2
- package/dist/esm/chunks/chunk.U773QUMB.js +12 -0
- package/dist/esm/chunks/{chunk.K6LBO4KJ.js → chunk.UVL4TIK2.js} +2 -2
- package/dist/esm/chunks/chunk.WOTVTBJS.js +7 -0
- package/dist/esm/chunks/chunk.WOTVTBJS.js.map +7 -0
- package/dist/esm/chunks/chunk.WPJEXVHM.js +7 -0
- package/dist/esm/chunks/{chunk.NQZXAC65.js.map → chunk.WPJEXVHM.js.map} +2 -2
- package/dist/esm/chunks/{chunk.NX4EECNP.js → chunk.XTMXGKUO.js} +2 -2
- package/dist/esm/chunks/{chunk.2DAPNN6B.js → chunk.Y2I2VRMF.js} +2 -2
- package/dist/esm/chunks/{chunk.ERO7T6WC.js → chunk.Z4HBPQ42.js} +2 -2
- package/dist/esm/color-picker/index.js +1 -1
- package/dist/esm/date-picker/index.js +1 -1
- package/dist/esm/date-range-picker/index.js +1 -1
- package/dist/esm/expansion-panel/index.js +1 -1
- package/dist/esm/icon/index.js +1 -1
- package/dist/esm/icon-button/index.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/keyboard-shortcut/index.js +1 -1
- package/dist/esm/list-dropdown/index.js +1 -1
- package/dist/esm/menu/index.js +1 -1
- package/dist/esm/open-icon/index.js +1 -1
- package/dist/esm/paginator/index.js +1 -1
- package/dist/esm/profile-card/index.js +1 -1
- package/dist/esm/quantity-field/index.js +1 -1
- package/dist/esm/select/core/index.js +1 -1
- package/dist/esm/select/index.js +1 -1
- package/dist/esm/select/option/index.js +1 -1
- package/dist/esm/select/select/index.js +1 -1
- package/dist/esm/select/select-dropdown/index.js +1 -1
- package/dist/esm/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view/index.js +1 -1
- package/dist/esm/split-view/split-view-panel/index.js +1 -1
- package/dist/esm/stepper/index.js +1 -1
- package/dist/esm/stepper/step/index.js +1 -1
- package/dist/esm/stepper/stepper/index.js +1 -1
- package/dist/esm/table/index.js +1 -1
- package/dist/esm/tabs/index.js +1 -1
- package/dist/esm/tabs/tab-bar/index.js +1 -1
- package/dist/esm/time-picker/index.js +1 -1
- package/dist/esm/toast/index.js +1 -1
- package/esm/autocomplete/autocomplete-constants.d.ts +3 -0
- package/esm/autocomplete/autocomplete-foundation.d.ts +3 -1
- package/esm/autocomplete/autocomplete-foundation.js +14 -0
- package/esm/autocomplete/autocomplete.d.ts +7 -1
- package/esm/autocomplete/autocomplete.js +7 -0
- package/esm/calendar/calendar-foundation.js +6 -0
- package/esm/chip-field/chip-field-adapter.js +1 -1
- package/esm/chip-field/chip-field.js +2 -2
- package/esm/date-picker/base/base-date-picker-foundation.js +1 -1
- package/esm/date-range-picker/date-range-picker-foundation.js +2 -2
- package/esm/icon/icon-adapter.d.ts +0 -2
- package/esm/icon/icon-adapter.js +4 -5
- package/esm/icon/icon-foundation.js +0 -1
- package/esm/keyboard-shortcut/keyboard-shortcut-constants.d.ts +1 -0
- package/esm/keyboard-shortcut/keyboard-shortcut-foundation.d.ts +6 -0
- package/esm/keyboard-shortcut/keyboard-shortcut-foundation.js +9 -0
- package/esm/keyboard-shortcut/keyboard-shortcut.d.ts +4 -0
- package/esm/keyboard-shortcut/keyboard-shortcut.js +3 -0
- package/esm/list-dropdown/list-dropdown-constants.d.ts +4 -0
- package/esm/list-dropdown/list-dropdown-utils.js +14 -3
- package/esm/paginator/paginator-adapter.d.ts +2 -0
- package/esm/paginator/paginator-adapter.js +57 -0
- package/esm/select/core/base-select-adapter.js +3 -0
- package/esm/select/option/option-constants.d.ts +1 -0
- package/esm/select/option/option-constants.js +1 -0
- package/esm/select/option/option-foundation.d.ts +13 -0
- package/esm/select/option/option-foundation.js +28 -0
- package/esm/select/option/option.d.ts +7 -0
- package/esm/select/option/option.js +13 -0
- package/esm/split-view/split-view-panel/split-view-panel.js +1 -1
- package/esm/time-picker/time-picker-foundation.js +3 -3
- package/package.json +1 -1
- package/styles/chip-field/_base.scss +1 -0
- package/styles/chip-field/_selector.scss +2 -2
- package/dist/esm/chunks/chunk.A4UN74PV.js +0 -7
- package/dist/esm/chunks/chunk.A4UN74PV.js.map +0 -7
- package/dist/esm/chunks/chunk.FFVZ6JMP.js +0 -7
- package/dist/esm/chunks/chunk.FFVZ6JMP.js.map +0 -7
- package/dist/esm/chunks/chunk.IMEODSRH.js +0 -7
- package/dist/esm/chunks/chunk.IMEODSRH.js.map +0 -7
- package/dist/esm/chunks/chunk.NQZXAC65.js +0 -7
- package/dist/esm/chunks/chunk.S2YVOMLW.js +0 -7
- package/dist/esm/chunks/chunk.S2YVOMLW.js.map +0 -7
- package/dist/esm/chunks/chunk.S7ZU6JKB.js +0 -7
- package/dist/esm/chunks/chunk.S7ZU6JKB.js.map +0 -7
- package/dist/esm/chunks/chunk.W3GR3VDN.js +0 -12
- package/dist/esm/chunks/chunk.XY45YU7I.js +0 -7
- package/dist/esm/chunks/chunk.XY45YU7I.js.map +0 -7
- /package/dist/esm/chunks/{chunk.S2N5KJ7S.js.map → chunk.23QPY6PU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.65II7E54.js.map → chunk.2NA4LVTZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.NOO2ZZKZ.js.map → chunk.3DYMGITQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.UW2HWAVL.js.map → chunk.42QTJZSF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.LLK7YGQW.js.map → chunk.54KXJVRY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BKAZC53W.js.map → chunk.55HRCXPA.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.T6NVM7TN.js.map → chunk.67G7HT5S.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.YMBLWKRP.js.map → chunk.7IHNVPY5.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.RGAPFLQE.js.map → chunk.7LX3X2DU.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XFAOB6LU.js.map → chunk.7NHFZL6J.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.D24CE6KE.js.map → chunk.AZFF62ZK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.IWMA7NUU.js.map → chunk.D43PPRFO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SATUJNQX.js.map → chunk.ETJMASRZ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.FOLQAW63.js.map → chunk.F7ZYEFH5.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.MSFGXRCM.js.map → chunk.IV2GMOPB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.HTH3CEDN.js.map → chunk.J2PHUKSR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.BKNYDA4V.js.map → chunk.JCDIPDQR.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.XIZILH2M.js.map → chunk.KNVCEYY2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.SQTM36C3.js.map → chunk.N6XHXCZE.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.AB5XER3E.js.map → chunk.NOXJK2U7.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.JDLEPQKN.js.map → chunk.OEZZ2NEY.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.CG5CVENX.js.map → chunk.RLWX5BFQ.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.274MFEUZ.js.map → chunk.SFTWKDQV.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.Q5YD3PKM.js.map → chunk.TH7RLTJK.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.USXO7YKN.js.map → chunk.TOM77CWD.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.W3GR3VDN.js.map → chunk.U773QUMB.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.K6LBO4KJ.js.map → chunk.UVL4TIK2.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.NX4EECNP.js.map → chunk.XTMXGKUO.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.2DAPNN6B.js.map → chunk.Y2I2VRMF.js.map} +0 -0
- /package/dist/esm/chunks/{chunk.ERO7T6WC.js.map → chunk.Z4HBPQ42.js.map} +0 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/list-dropdown/list-dropdown-constants.ts", "../../../../../../node_modules/@tylertech/forge-core/esm/events/event-aware.js", "../../../../../../node_modules/@tylertech/forge-core/esm/scroll/scroll-types.js", "../../../../../../node_modules/@tylertech/forge-core/esm/scroll/scroll-axis-observer.js", "../../src/list-dropdown/list-dropdown-utils.ts", "../../src/list-dropdown/list-dropdown-foundation.ts", "../../src/list-dropdown/list-dropdown-adapter.ts", "../../src/list-dropdown/list-dropdown.ts", "../../src/list-dropdown/list-dropdown-aware-foundation.ts", "../../src/list-dropdown/cascading-list-dropdown-aware-foundation.ts"],
|
|
4
|
+
"sourcesContent": ["import { IconExternalType, IIconComponent } from '../icon';\nimport { IPopupPosition, PopupPlacement } from '../popup';\n\nconst attributes = {\n POPUP_CLASSES: 'popup-classes',\n OPTION_LIMIT: 'option-limit',\n OBSERVE_SCROLL: 'observe-scroll',\n OBSERVE_SCROLL_THRESHOLD: 'observe-scroll-threshold',\n SYNC_POPUP_WIDTH: 'sync-popup-width',\n CONSTRAIN_POPUP_WIDTH: 'constrain-popup-width',\n WRAP_OPTION_TEXT: 'wrap-option-text',\n\n // Internal\n CHECKBOX_ELEMENT: 'data-list-dropdown-checkbox',\n DATA_ALLOW_FOCUS: 'data-list-dropdown-allow-focus'\n};\n\nconst classes = {\n GROUP_WRAPPER: 'forge-list-dropdown__group-wrapper'\n};\n\nexport const LIST_DROPDOWN_CONSTANTS = {\n attributes,\n classes\n};\n\nexport type ListDropdownOptionBuilder<T = HTMLElement> = (option: IListDropdownOption, parentElement: T) => HTMLElement | string | void;\nexport type ListDropdownHeaderBuilder = () => HTMLElement;\nexport type ListDropdownFooterBuilder = () => HTMLElement;\nexport type ListDropdownOptionGroupBuilder<T = any> = (option: IListDropdownOptionGroup<T>) => HTMLElement | string;\nexport type ListDropdownTransformCallback = (label: string) => string | HTMLElement;\nexport type ListDropdownIconType = 'font' | 'component';\n\nexport interface IBaseListDropdownOption<T = any> {\n value: T;\n label: string;\n secondaryLabel?: string;\n disabled?: boolean;\n divider?: boolean;\n optionClass?: string | string[];\n leadingIcon?: string;\n leadingIconClass?: string;\n leadingIconType?: ListDropdownIconType;\n leadingIconComponentProps?: Partial<IIconComponent>;\n trailingIcon?: string;\n trailingIconClass?: string;\n trailingIconType?: ListDropdownIconType;\n trailingIconComponentProps?: Partial<IIconComponent>;\n leadingBuilder?: () => HTMLElement;\n trailingBuilder?: () => HTMLElement;\n}\n\nexport interface IListDropdownOption<T = any> extends IBaseListDropdownOption<T> {\n options?: Array<IListDropdownOption | IListDropdownOptionGroup>;\n elementAttributes?: Map<string, string>;\n}\n\nexport interface IListDropdownOptionGroup<T = any, K = any> {\n text?: string;\n value?: K;\n builder?: ListDropdownOptionGroupBuilder;\n options: IListDropdownOption<T>[];\n}\n\nexport interface IListDropdownSelectEventData {\n value: IListDropdownOption | IListDropdownOption[];\n}\n\nexport interface IListDropdownConfig<T = any> {\n id: string;\n options: Array<IListDropdownOption | IListDropdownOptionGroup>;\n selectCallback: (value: T) => void;\n \n // Optional values\n activeChangeCallback?: (id: string) => void;\n closeCallback?: () => void;\n syncWidth?: boolean;\n constrainViewportWidth?: boolean;\n wrapOptionText?: boolean;\n selectedValues?: T[];\n multiple?: boolean;\n activeStartIndex?: number;\n visibleStartIndex?: number;\n transform?: ListDropdownTransformCallback;\n allowBusy?: boolean;\n asyncStyle?: ListDropdownAsyncStyle;\n iconClass?: string;\n dense?: boolean;\n type?: ListDropdownType;\n popupClasses?: string | string[];\n popupOffset?: IPopupPosition;\n popupStatic?: boolean;\n popupPlacement?: PopupPlacement;\n popupFallbackPlacements?: PopupPlacement[];\n optionLimit?: number;\n optionBuilder?: ListDropdownOptionBuilder;\n observeScroll?: boolean;\n observeScrollThreshold?: number;\n targetWidthCallback?: () => number;\n scrollEndListener?: () => void;\n headerBuilder?: ListDropdownHeaderBuilder;\n footerBuilder?: ListDropdownFooterBuilder;\n cascade?: boolean;\n cascadingElementFactory?: (config: IListDropdownCascadingElementFactoryConfig) => HTMLElement;\n}\n\nexport interface IListDropdownCascadingElementFactoryConfig {\n index: number;\n options: Array<IListDropdownOption | IListDropdownOptionGroup>;\n parentValue: any;\n}\n\nexport const DEFAULT_LIST_DROPDOWN_CONFIG: Partial<IListDropdownConfig> = {\n options: [],\n syncWidth: false,\n selectedValues: [],\n multiple: false\n};\n\nexport interface IListDropdownOpenConfig extends IListDropdownConfig {}\n\nexport enum ListDropdownType {\n None = 'none',\n Standard = 'standard',\n Menu = 'menu'\n}\n\nexport enum ListDropdownAsyncStyle {\n Spinner = 'spinner',\n Skeleton = 'skeleton'\n}\n", "export class EventAware {\n constructor() {\n this._listenerMap = new Map();\n }\n _emit(type, data) {\n const listeners = this._listenerMap.get(type);\n if (listeners && listeners.length) {\n listeners.forEach(cb => cb({ type, data }));\n }\n }\n hasListeners(type) {\n return type ? this._listenerMap.has(type) : this._listenerMap.size > 0;\n }\n addListener(type, listener) {\n if (!this._listenerMap.has(type)) {\n this._listenerMap.set(type, [listener]);\n }\n else {\n const listeners = this._listenerMap.get(type);\n if (listeners) {\n listeners.push(listener);\n }\n }\n }\n removeListener(type, listener) {\n const listeners = this._listenerMap.get(type);\n if (listeners && listeners.length && listeners.includes(listener)) {\n listeners.splice(listeners.indexOf(listener), 1);\n if (!listeners.length) {\n this._listenerMap.delete(type);\n }\n }\n }\n}\n", "export var ScrollDirection;\n(function (ScrollDirection) {\n ScrollDirection[\"Up\"] = \"up\";\n ScrollDirection[\"Down\"] = \"down\";\n ScrollDirection[\"Left\"] = \"left\";\n ScrollDirection[\"Right\"] = \"right\";\n})(ScrollDirection || (ScrollDirection = {}));\nexport var ScrollEvents;\n(function (ScrollEvents) {\n ScrollEvents[\"Scroll\"] = \"scroll\";\n ScrollEvents[\"Scrolled\"] = \"scrolled\";\n ScrollEvents[\"ScrolledStart\"] = \"scrolled-start\";\n ScrollEvents[\"ScrolledEnd\"] = \"scrolled-end\";\n})(ScrollEvents || (ScrollEvents = {}));\n", "import { EventAware } from '../events/event-aware';\nimport { ScrollEvents, ScrollDirection } from './scroll-types';\nimport { isDefined, throttle, isNumber } from '../utils';\nconst DEFAULT_SCROLL_THROTTLE = 100;\n/**\n * Provides facilties for observing and reacting to scroll events and information on a given element.\n */\nexport class ScrollAxisObserver extends EventAware {\n constructor(_element, _config = {}) {\n super();\n this._element = _element;\n this._config = _config;\n this._axis = 'vertical';\n this._scrollThreshold = 0;\n this._lastScrollPosition = 0;\n this._lastScrollTop = 0;\n this._lastScrollLeft = 0;\n this._isListening = false;\n this._initialize();\n }\n destroy() {\n this.stop();\n }\n start() {\n if (!this._isListening) {\n this._element.addEventListener('scroll', this._scrollListener);\n this._isListening = true;\n }\n }\n stop() {\n this._element.removeEventListener('scroll', this._scrollListener);\n this._isListening = false;\n }\n _initialize() {\n if (this._config.throttle) {\n const wait = this._config.throttleTime || DEFAULT_SCROLL_THROTTLE;\n this._scrollListener = throttle(() => this._onScroll(), wait);\n }\n else {\n this._scrollListener = () => this._onScroll();\n }\n if (!isDefined(this._config.paused) || !this._config.paused) {\n this.start();\n }\n if (isDefined(this._config.axis)) {\n this._axis = this._config.axis;\n }\n if (isDefined(this._config.scrollThreshold) && isNumber(this._config.scrollThreshold)) {\n this._scrollThreshold = this._config.scrollThreshold;\n }\n }\n _isScrollAxis() {\n const isVertical = this._lastScrollTop !== this._element.scrollTop;\n const isHorizontal = this._lastScrollLeft !== this._element.scrollLeft;\n return (this._axis === 'vertical' && isVertical) || (this._axis === 'horizontal' && isHorizontal);\n }\n _onScroll() {\n if (!this._isScrollAxis()) {\n return;\n }\n const position = this.scrollPosition;\n const direction = this._lastScrollPosition - position < 0 ? this._axis === 'vertical' ? ScrollDirection.Down : ScrollDirection.Right : this._axis === 'vertical' ? ScrollDirection.Up : ScrollDirection.Left;\n this._emit(ScrollEvents.Scroll, { direction, position });\n if (this._lastScrollPosition <= this._scrollThreshold && position > this._scrollThreshold) {\n this._emit(ScrollEvents.Scrolled, true);\n }\n else if (this._lastScrollPosition >= this._scrollThreshold && (this._scrollThreshold > 0 ? position < this._scrollThreshold : position === 0)) {\n this._emit(ScrollEvents.Scrolled, false);\n }\n const scrollStart = Math.round(position - this._scrollThreshold);\n const scrollEnd = Math.round(this.scrollSize - position);\n if (this._lastScrollPosition >= this._scrollThreshold && scrollStart <= 0) {\n this._emit(ScrollEvents.ScrolledStart);\n }\n else if (this._lastScrollPosition <= (this.scrollSize - this._scrollThreshold) && scrollEnd <= this._scrollThreshold) {\n this._emit(ScrollEvents.ScrolledEnd);\n }\n this._lastScrollPosition = position || 0;\n this._lastScrollTop = this._element.scrollTop || 0;\n this._lastScrollLeft = this._element.scrollLeft || 0;\n }\n get scrollPosition() {\n return this._axis === 'vertical' ? this._element.scrollTop : this._element.scrollLeft;\n }\n get isScrolled() {\n return this.scrollPosition > this._scrollThreshold;\n }\n get isScrolledStart() {\n return this.scrollPosition === 0;\n }\n get isScrolledEnd() {\n return this.scrollPosition === this._element.scrollWidth;\n }\n get isScrollable() {\n if (this._axis === 'vertical') {\n return this._element.scrollHeight > this._element.clientHeight;\n }\n return this._element.scrollWidth > this._element.clientWidth;\n }\n get scrollSize() {\n return (this._axis === 'vertical' ? this._element.scrollHeight : this._element.scrollWidth) - this.elementSize;\n }\n get elementSize() {\n return this._axis === 'vertical' ? this._element.clientHeight : this._element.clientWidth;\n }\n setScrollPosition(position) {\n if (this._axis === 'vertical') {\n this._element.scrollTop = position;\n }\n else {\n this._element.scrollLeft = position;\n }\n }\n}\n", "import { addClass, getEventPath, isDeepEqual, isDefined, isObject } from '@tylertech/forge-core';\nimport { tylIconCheckBox, tylIconCheckBoxOutlineBlank } from '@tylertech/tyler-icons/standard';\nimport { ICON_CLASS_NAME } from '../constants';\nimport { IIconComponent } from '../icon';\nimport { ILinearProgressComponent, LINEAR_PROGRESS_CONSTANTS } from '../linear-progress';\nimport { IListComponent, LIST_CONSTANTS } from '../list/list';\nimport { IPopupComponent, PopupAnimationType, POPUP_CONSTANTS } from '../popup';\nimport { ISkeletonComponent, SKELETON_CONSTANTS } from '../skeleton';\nimport { IListDropdownCascadingElementFactoryConfig, IListDropdownOpenConfig, IListDropdownOption, IListDropdownOptionGroup, ListDropdownAsyncStyle, ListDropdownIconType, ListDropdownType, LIST_DROPDOWN_CONSTANTS } from './list-dropdown-constants';\n\nexport enum ListDropdownOptionType { Option, Group }\n\n/**\n * Creates the floating dropdown element container.\n * @param config \n * @param targetElement \n */\nexport function createDropdown(config: IListDropdownOpenConfig, targetElement: HTMLElement): IPopupComponent {\n const dropdownElement = createPopupDropdown(config, targetElement);\n const dropdownId = `list-dropdown-popup-${config.id}`;\n\n // Prevent mousedown events from changing focus. We keep focus in the target element at all times while open.\n dropdownElement.addEventListener('mousedown', evt => {\n const composedPath = getEventPath(evt);\n\n // We allow for custom header and footer templates and these elements could be focusable so we need to allow access into them\n const isFromCustomTemplate = composedPath.find(el => el.nodeType === 1 && el.hasAttribute(LIST_DROPDOWN_CONSTANTS.attributes.DATA_ALLOW_FOCUS));\n if (isFromCustomTemplate) {\n return;\n }\n\n const isWithinDropdownElement = composedPath.find(el => el.id === dropdownId || el.id === config.id);\n if (isWithinDropdownElement) {\n evt.preventDefault();\n }\n });\n\n // Set roles and other attributes based on our type\n switch (config.type) {\n case ListDropdownType.Menu:\n dropdownElement.setAttribute('role', 'menu');\n dropdownElement.setAttribute('aria-orientation', 'vertical');\n break;\n default:\n dropdownElement.setAttribute('role', 'listbox');\n }\n\n if (config.id) {\n dropdownElement.id = dropdownId;\n }\n if (config.popupClasses) {\n addClass(config.popupClasses, dropdownElement);\n }\n\n return dropdownElement;\n}\n\nexport function createPopupDropdown(config: IListDropdownOpenConfig, targetElement: HTMLElement): IPopupComponent {\n const popupElement = document.createElement('forge-popup');\n popupElement.targetElement = targetElement;\n popupElement.placement = config.popupPlacement || 'bottom-start';\n popupElement.manageFocus = false;\n popupElement.static = !!config.popupStatic;\n\n if (config.popupFallbackPlacements?.length) {\n popupElement.fallbackPlacements = config.popupFallbackPlacements;\n }\n\n if (config.constrainViewportWidth) {\n popupElement.setAttribute(POPUP_CONSTANTS.attributes.CONSTRAIN_VIEWPORT_WIDTH, '');\n }\n\n if (config.popupOffset) {\n popupElement.offset = config.popupOffset;\n }\n\n // Set the animations based on our type\n switch (config.type) {\n case ListDropdownType.Menu:\n popupElement.animationType = PopupAnimationType.Menu;\n break;\n case ListDropdownType.None:\n popupElement.animationType = PopupAnimationType.None;\n break;\n default:\n popupElement.animationType = PopupAnimationType.Dropdown;\n }\n return popupElement;\n}\n\nexport function createList(config: IListDropdownOpenConfig): IListComponent {\n const listElement = document.createElement(LIST_CONSTANTS.elementName) as IListComponent;\n listElement.id = `list-dropdown-list-${config.id}`;\n listElement.propagateClick = false;\n return listElement;\n}\n\n/**\n * Creates the list to place inside of the dropdown.\n * @param config \n */\nexport function createListItems(config: IListDropdownOpenConfig, listElement: IListComponent, options?: Array<IListDropdownOption | IListDropdownOptionGroup>, startIndex = 0, renderSelected = true): void {\n // Ensure the options are provided in the form a group (if no groups provided, then we have one anonymous group of options)\n const groups = getOptionsByGroup(options || config.options);\n const flatOptions = getFlattenedOptions(groups);\n\n const limitOptions = config.optionLimit ? true : false;\n let optionLimit = config.optionLimit || 0;\n let optionIdIndex = startIndex;\n\n // Iterate over our groups and render the optional headers and options for that group\n for (const group of groups) {\n let optionParent: IListComponent | HTMLElement = listElement;\n\n // Check for a group header builder callback\n if (group.builder && typeof group.builder === 'function') {\n const headerElement = group.builder(group);\n if (headerElement) {\n const groupWrapper = document.createElement('div');\n groupWrapper.classList.add(LIST_DROPDOWN_CONSTANTS.classes.GROUP_WRAPPER);\n optionParent = groupWrapper;\n\n if (typeof headerElement === 'string') {\n groupWrapper.innerHTML = headerElement;\n } else if (headerElement instanceof HTMLElement) {\n groupWrapper.appendChild(headerElement);\n }\n\n listElement.appendChild(groupWrapper);\n }\n } else if (group.text) {\n // We are rendering just text as a group header so create the group header element with predefined styles\n const groupWrapper = document.createElement('div');\n groupWrapper.classList.add(LIST_DROPDOWN_CONSTANTS.classes.GROUP_WRAPPER);\n\n const listHeaderElement = document.createElement('div');\n listHeaderElement.textContent = group.text;\n listHeaderElement.classList.add('forge-typography--overline');\n listHeaderElement.style.fontFamily = 'Roboto,sans-serif';\n listHeaderElement.style.fontSize = '0.75rem';\n listHeaderElement.style.lineHeight = '2rem';\n listHeaderElement.style.letterSpacing = '0.16667em';\n listHeaderElement.style.fontWeight = '500';\n listHeaderElement.style.margin = '4px 8px';\n\n optionParent = groupWrapper;\n groupWrapper.appendChild(listHeaderElement);\n listElement.appendChild(groupWrapper);\n }\n\n // Loop over the options for this group\n for (const option of group.options) {\n // First we check if this option is just a divider\n if (option.divider) {\n const dividerElement = createDivider();\n listElement.appendChild(dividerElement);\n continue;\n }\n\n // Check if an option limit has been provided to reduce amount of options that need to be rendered\n if (limitOptions && --optionLimit < 0) {\n break;\n }\n \n // Create and configure the list element\n const isSelected = config.selectedValues ? config.selectedValues.some(v => isDeepEqual(v, option.value)) : false;\n\n // We don't render selected options that are appended dynamically since those are always displayed at the top of the list\n if (!renderSelected && isSelected) {\n continue;\n }\n\n let listItemElement = document.createElement('forge-list-item');\n listItemElement.value = option.value;\n listItemElement.id = `list-dropdown-option-${config.id}-${optionIdIndex++}`;\n listItemElement.style.cursor = 'pointer';\n\n if (config.wrapOptionText) {\n listItemElement.wrap = true;\n }\n \n // Add any CSS classes to the option list-item\n if (option.optionClass && (typeof option.optionClass === 'string' || Array.isArray(option.optionClass) && option.optionClass.length)) {\n addClass(option.optionClass, listItemElement);\n }\n\n // Set role based on type\n switch (config.type) {\n case ListDropdownType.Menu:\n listItemElement.setAttribute('role', 'menuitem');\n break;\n case ListDropdownType.None:\n break;\n default:\n listItemElement.setAttribute('role', 'option');\n }\n\n if (config.dense) {\n listItemElement.dense = true;\n }\n\n // Check for a custom option template builder\n if (config.optionBuilder && typeof config.optionBuilder === 'function') {\n const element = config.optionBuilder(option, listItemElement);\n if (element) {\n if (typeof element === 'string') {\n listItemElement.innerHTML = element;\n } else {\n listItemElement.appendChild(element);\n }\n }\n } else {\n if (typeof config.transform !== 'function') {\n listItemElement.textContent = option.label || '';\n } else {\n const result = config.transform(option.label);\n if (typeof result === 'string') {\n listItemElement.textContent = result;\n } else if (typeof result === 'object' && (result as HTMLElement).nodeType !== undefined) {\n listItemElement.appendChild(result);\n }\n }\n }\n\n // Check for secondary (subtitle) text\n if (option.secondaryLabel) {\n const secondaryLabelElement = document.createElement('span');\n secondaryLabelElement.slot = 'subtitle';\n secondaryLabelElement.textContent = option.secondaryLabel;\n listItemElement.twoLine = true;\n listItemElement.appendChild(secondaryLabelElement);\n }\n\n // If multiple selections are enabled then we need to create and append a leading checkbox element\n if (config.multiple) {\n const checkboxElement = createCheckboxElement(isSelected);\n listItemElement.appendChild(checkboxElement);\n listItemElement.setAttribute('aria-selected', `${isSelected}`);\n listItemElement.setAttribute('aria-checked', `${isSelected}`);\n }\n\n if (option.elementAttributes) {\n option.elementAttributes.forEach((value: string, key: string) => {\n listItemElement.setAttribute(key, value);\n });\n }\n\n // Leading element/icon\n if (option.leadingBuilder) {\n const element = option.leadingBuilder();\n if (isObject(element)) {\n element.slot = 'leading';\n listItemElement.appendChild(element);\n }\n } else if (option.leadingIcon) {\n const leadingIconElement = createIconElement(option.leadingIconType, option.leadingIcon, option.leadingIconClass || config.iconClass, option.leadingIconComponentProps);\n leadingIconElement.slot = 'leading';\n listItemElement.appendChild(leadingIconElement);\n }\n\n // Trailing element/icon\n if (option.trailingBuilder) {\n const element = option.trailingBuilder();\n if (isObject(element)) {\n element.slot = 'trailing';\n listItemElement.appendChild(element);\n }\n } else if (option.trailingIcon) {\n const trailingIconElement = createIconElement(option.trailingIconType, option.trailingIcon, option.trailingIconClass || config.iconClass, option.trailingIconComponentProps);\n trailingIconElement.slot = 'trailing';\n listItemElement.appendChild(trailingIconElement);\n }\n\n // Update the disabled state\n if (option.disabled) {\n listItemElement.disabled = option.disabled;\n listItemElement.setAttribute('aria-disabled', 'true');\n } else {\n listItemElement.style.cursor = 'pointer';\n listItemElement.setAttribute('aria-disabled', 'false');\n }\n\n // Update the selected state\n if (isSelected) {\n listItemElement.selected = true;\n }\n listItemElement.setAttribute('aria-selected', isSelected ? 'true' : 'false');\n\n // If we have any child options, we need to render a child menu for this list item\n if (!option.disabled && typeof config.cascadingElementFactory === 'function' && Array.isArray(option.options) && option.options.length) {\n // Create the trailing indicator icon to show that a child menu exists for this option. \n const optionIconElement = document.createElement('forge-icon');\n optionIconElement.name = 'arrow_right';\n optionIconElement.slot = 'trailing';\n listItemElement.appendChild(optionIconElement);\n\n const nonDividerOptions = flatOptions.filter(o => !o.divider);\n\n // Create the nested cascading element wrapper\n const factoryConfig: IListDropdownCascadingElementFactoryConfig = {\n index: nonDividerOptions.indexOf(option),\n options: option.options,\n parentValue: option.value\n };\n const cascadingElement = config.cascadingElementFactory.call(null, factoryConfig);\n cascadingElement.appendChild(listItemElement);\n listItemElement = cascadingElement;\n }\n\n optionParent.appendChild(listItemElement);\n }\n }\n}\n\nexport function createCheckboxElement(selected: boolean): HTMLElement {\n const checkboxElement = document.createElement('forge-icon');\n checkboxElement.setAttribute(LIST_DROPDOWN_CONSTANTS.attributes.CHECKBOX_ELEMENT, '');\n checkboxElement.name = selected ? tylIconCheckBox.name : tylIconCheckBoxOutlineBlank.name;\n checkboxElement.slot = 'leading';\n checkboxElement.style.marginRight = '16px';\n checkboxElement.style.verticalAlign = 'middle';\n return checkboxElement;\n}\n\nfunction createDivider(): HTMLElement {\n const divider = document.createElement('forge-divider');\n divider.setAttribute('aria-hidden', 'true');\n return divider;\n}\n\nfunction createIconElement(type: ListDropdownIconType = 'font', iconName: string, iconClass?: string, componentProps?: Partial<IIconComponent>): HTMLElement {\n if (type === 'component') {\n const icon = document.createElement('forge-icon');\n if (iconClass) {\n icon.classList.add(iconClass);\n }\n icon.setAttribute('aria-hidden', 'true');\n icon.name = iconName;\n if (componentProps) {\n Object.assign(icon, componentProps);\n }\n return icon;\n }\n\n const iconElement = document.createElement('i');\n iconElement.classList.add(iconClass || ICON_CLASS_NAME);\n iconElement.setAttribute('aria-hidden', 'true');\n iconElement.textContent = iconName;\n return iconElement;\n}\n\nexport function createAsyncElement(asyncStyle?: ListDropdownAsyncStyle): HTMLElement {\n switch (asyncStyle) {\n case ListDropdownAsyncStyle.Skeleton:\n return createSkeletonElement();\n default:\n return createSpinnerElement();\n }\n}\n\nfunction createSpinnerElement(): HTMLElement {\n const div = document.createElement('div');\n div.style.display = 'flex';\n div.style.justifyContent = 'center';\n div.style.alignItems = 'center';\n div.style.padding = '8px';\n div.style.boxSizing = 'border-box';\n\n const spinner = document.createElement('forge-circular-progress');\n spinner.style.setProperty('--forge-circular-progress-size', '24px');\n div.appendChild(spinner);\n\n return div;\n}\n\nfunction createSkeletonElement(): HTMLElement {\n const list = document.createElement('forge-list');\n const div = document.createElement('div');\n div.style.minWidth = '192px';\n for (let i = 0; i < 3; i++) {\n const listItemSkeleton = document.createElement(SKELETON_CONSTANTS.elementName) as ISkeletonComponent;\n listItemSkeleton.setAttribute('list-item', '');\n div.appendChild(listItemSkeleton);\n }\n list.appendChild(div);\n return list;\n}\n\nexport function createBusyElement(): ILinearProgressComponent {\n const linearProgress = document.createElement(LINEAR_PROGRESS_CONSTANTS.elementName) as ILinearProgressComponent;\n linearProgress.determinate = false;\n linearProgress.style.position = 'absolute';\n linearProgress.style.top = '0';\n linearProgress.style.left = '0';\n linearProgress.style.right = '0';\n linearProgress.style.width = '100%';\n return linearProgress;\n}\n\nfunction getOptionsByGroup(options: Array<IListDropdownOption | IListDropdownOptionGroup>): IListDropdownOptionGroup[] {\n return isListDropdownOptionType(options, ListDropdownOptionType.Group) ? (options as IListDropdownOptionGroup[]) : [{ text: '', options }] as IListDropdownOptionGroup[];\n}\n\n/**\n * Determines if the provided options are of the specified type.\n * @param options The options either grouped or individual.\n * @param type The type of option to detect.\n */\nexport function isListDropdownOptionType(options: Array<IListDropdownOption | IListDropdownOptionGroup>, type: ListDropdownOptionType): type is ListDropdownOptionType {\n const isOptionGroups = options.some((o: IListDropdownOption | IListDropdownOptionGroup) => isDefined(o) && isObject(o) && o.hasOwnProperty('options') && (o.hasOwnProperty('text') || o.hasOwnProperty('builder')));\n const isOptionTypes = options.some((o: IListDropdownOption | IListDropdownOptionGroup) => isDefined(o) && isObject(o) && o.hasOwnProperty('label') && o.hasOwnProperty('value'));\n return (isOptionGroups && type === ListDropdownOptionType.Group) || (isOptionTypes && type === ListDropdownOptionType.Option);\n}\n\nexport function getFlattenedOptions(options: Array<IListDropdownOptionGroup | IListDropdownOption>): IListDropdownOption[] {\n if (isListDropdownOptionType(options, ListDropdownOptionType.Group)) {\n const groups = options as IListDropdownOptionGroup[];\n return groups.reduce((flatOpts, group) => flatOpts.concat(group.options), [] as IListDropdownOption[]);\n }\n return [...options as IListDropdownOption[]];\n}\n", "import { IListDropdownAdapter } from './list-dropdown-adapter';\nimport { DEFAULT_LIST_DROPDOWN_CONFIG, IListDropdownConfig, IListDropdownOption, IListDropdownOptionGroup } from './list-dropdown-constants';\nimport { getFlattenedOptions } from './list-dropdown-utils';\n\nexport interface IListDropdownFoundation {\n dropdownElement: HTMLElement | undefined;\n open(): void;\n close(): void;\n getActiveOptionIndex(): number;\n getActiveOption(): IListDropdownOption | undefined;\n toggleOptionMultiple(index: number, isSelected: boolean): void;\n activateSelectedOption(): void;\n activateFirstOption(): number;\n activateOption(index: number): void;\n setSelectedValues(values: any): void;\n clearActiveOption(): void;\n setOptions(options: Array<IListDropdownOption | IListDropdownOptionGroup>): void;\n appendOptions(options: Array<IListDropdownOption | IListDropdownOptionGroup>): void;\n scrollSelectedOptionIntoView(animate?: boolean): void;\n setScrollBottomListener(listener: () => void, threshold?: number): void;\n removeScrollBottomListener(): void;\n setBusyVisibility(isVisible: boolean): void;\n handleKey(key: string): void;\n}\n\nexport class ListDropdownFoundation implements IListDropdownFoundation {\n private _config: IListDropdownConfig;\n private _open = false;\n private _selectListener: (value: any, id: string) => void;\n private _closeListener: () => void;\n private _scrollEndListener: () => void;\n\n constructor(private _adapter: IListDropdownAdapter, config: IListDropdownConfig) {\n this._config = Object.assign({ ...DEFAULT_LIST_DROPDOWN_CONFIG }, { ...config });\n this._selectListener = (value, id) => this._onSelect(value, id);\n this._closeListener = () => {\n if (typeof this._config.closeCallback === 'function') {\n this._config.closeCallback();\n }\n };\n this._scrollEndListener = () => {\n if (this._config.observeScroll && typeof this._config.scrollEndListener === 'function') {\n this._config.scrollEndListener();\n }\n };\n }\n\n public destroy(): void {\n if (this._open) {\n this.close();\n }\n }\n\n public open(): void {\n if (!this._open) {\n this._open = true;\n this._adapter.open(this._config, this._selectListener, this._closeListener);\n window.requestAnimationFrame(() => {\n if (this._open) {\n this.activateInitialOption();\n }\n });\n\n if (this._config.observeScroll && this._config.scrollEndListener) {\n this._adapter.setScrollBottomListener(this._scrollEndListener, this._config.observeScrollThreshold || 0);\n }\n }\n }\n\n public close(): void {\n if (this._open) {\n this._open = false;\n this._adapter.close();\n if (this._config.observeScroll && this._config.scrollEndListener) {\n this._adapter.removeScrollBottomListener(this._scrollEndListener);\n }\n }\n }\n\n private _onSelect(value: any, id: string): void {\n if (typeof this._config.activeChangeCallback === 'function') {\n this._config.activeChangeCallback(id);\n }\n\n if (typeof this._config.selectCallback === 'function') {\n this._config.selectCallback(value);\n }\n\n if (this._open) {\n const sync = this._config.syncWidth === undefined ? true : false;\n // Keep the popup width at least the same as the target if the target size has now changed\n this._adapter.syncWidth(sync);\n }\n }\n\n public getActiveOptionIndex(): number {\n return this._adapter.getActiveOptionIndex();\n }\n\n public getActiveOption(): IListDropdownOption | undefined {\n const index = this.getActiveOptionIndex();\n return index >= 0 ? this._nonDividerOptions[index] : undefined;\n }\n \n public toggleOptionMultiple(index: number, isSelected: boolean): void {\n return this._adapter.toggleOptionMultiple(index, isSelected);\n }\n\n public activateSelectedOption(): void {\n this._adapter.activateSelectedOption(this._config);\n }\n\n public activateFirstOption(): number {\n const index = this._nonDividerOptions.findIndex(o => !o.disabled);\n if (index !== -1) {\n this.activateOption(index);\n }\n return index;\n }\n\n public activateLastOption(): number {\n const options = this._nonDividerOptions;\n const index = (options.length - 1) - options.findIndex(o => !o.disabled);\n if (index !== -1) {\n this.activateOption(index);\n }\n return index;\n }\n\n public activateOption(index: number, animate?: boolean): void {\n return this._adapter.activateOption(index, this._config.activeChangeCallback, animate);\n }\n\n public activateInitialOption(): void {\n if (typeof this._config.activeStartIndex === 'number' && this._nonDividerOptions[this._config.activeStartIndex]) {\n this.activateOption(this._config.activeStartIndex, false);\n this._adapter.scrollSelectedOptionIntoView(false);\n } else if (this._config.selectedValues && this._config.selectedValues.length) {\n this._adapter.scrollSelectedOptionIntoView(false);\n } else if (typeof this._config.visibleStartIndex === 'number' && this._nonDividerOptions[this._config.visibleStartIndex]) {\n this._adapter.scrollOptionIntoView(this._config.visibleStartIndex);\n }\n }\n\n public setSelectedValues(values: any[]): void {\n if (!Array.isArray(values)) {\n values = [values];\n }\n if (!this._config.multiple && values.length > 1) {\n values = [values[0]];\n }\n this._config.selectedValues = values;\n this._adapter.setSelectedValues(values, this._config.multiple);\n }\n\n public clearActiveOption(): void {\n this._adapter.clearActiveOption();\n }\n\n public setOptions(options: Array<IListDropdownOption | IListDropdownOptionGroup>): void {\n this._config.options = options;\n if (!this._open) {\n return;\n }\n this._adapter.setOptions(this._config);\n this.activateInitialOption();\n }\n\n public appendOptions(options: Array<IListDropdownOption | IListDropdownOptionGroup>): void {\n this._config.options = [...this._config.options, ...options] as Array<IListDropdownOption | IListDropdownOptionGroup>;\n if (!this._open) {\n return;\n }\n this._adapter.appendOptions(options, this._config);\n }\n\n public get dropdownElement(): HTMLElement | undefined {\n return this._adapter.dropdownElement;\n }\n\n public scrollSelectedOptionIntoView(animate = true): void {\n this._adapter.scrollSelectedOptionIntoView(animate);\n }\n\n public setScrollBottomListener(listener: () => void, threshold?: number): void {\n this._config.scrollEndListener = listener;\n this._config.observeScroll = true;\n this._config.observeScrollThreshold = threshold;\n this._adapter.setScrollBottomListener(this._scrollEndListener, this._config.observeScrollThreshold || 0);\n }\n\n public removeScrollBottomListener(): void {\n this._config.scrollEndListener = undefined;\n this._adapter.removeScrollBottomListener(this._scrollEndListener);\n }\n\n public setBusyVisibility(isVisible: boolean): void {\n if (!this._config.allowBusy) {\n return;\n }\n this._adapter.setBusyVisibility(isVisible);\n }\n\n public handleKey(key: string): void {\n switch (key) {\n case 'Enter':\n case 'NumpadEnter':\n const activeOptionIndex = this.getActiveOptionIndex();\n const activeOption = this._nonDividerOptions[activeOptionIndex];\n if (this._canSelectOption(activeOption)) {\n const id = this._adapter.getActiveOptionIdByIndex(activeOptionIndex);\n if (id) {\n this._onSelect(activeOption.value, id);\n }\n }\n break;\n case 'Up':\n case 'ArrowUp':\n case 'Down':\n case 'ArrowDown':\n const options = this._nonDividerOptions;\n if (options.length && options.every(o => !this._canSelectOption(o))) {\n return;\n }\n const index = this._getNextActiveOptionIndex(key);\n this.activateOption(index);\n break;\n case 'Home':\n this.activateFirstOption();\n break;\n case 'End':\n this.activateLastOption();\n break;\n }\n }\n\n private _canSelectOption(option: IListDropdownOption): boolean {\n return option && !option.disabled && !option.divider;\n }\n\n private _getNextActiveOptionIndex(key: string): number {\n let index = this._adapter.getActiveOptionIndex();\n if (index === -1) {\n index = this._adapter.getSelectedOptionIndex();\n }\n if (key === 'ArrowUp' || key === 'Up') {\n return this._getPreviousHighlightableOptionIndex(index, this._nonDividerOptions);\n }\n return this._getNextHighlightableOptionIndex(index, this._nonDividerOptions);\n }\n\n private _getPreviousHighlightableOptionIndex(startIndex: number, options: IListDropdownOption[]): number {\n const index = startIndex <= 0 ? options.length - 1 : startIndex - 1;\n if (options[index].disabled) {\n return this._getPreviousHighlightableOptionIndex(index, options);\n }\n return index;\n }\n\n private _getNextHighlightableOptionIndex(startIndex: number, options: IListDropdownOption[]): number {\n const index = startIndex === options.length - 1 ? 0 : startIndex + 1;\n if (options[index].disabled) {\n return this._getNextHighlightableOptionIndex(index, options);\n }\n return index;\n }\n\n private get _flatOptions(): IListDropdownOption[] {\n return getFlattenedOptions(this._config.options);\n }\n\n private get _nonDividerOptions(): IListDropdownOption[] {\n return this._flatOptions.filter(o => !o.divider);\n }\n}\n", "import { IListDropdownOption, IListDropdownOpenConfig, IListDropdownOptionGroup, LIST_DROPDOWN_CONSTANTS } from './list-dropdown-constants';\nimport { createDropdown, createList, createListItems, createAsyncElement, createBusyElement, createCheckboxElement } from './list-dropdown-utils';\nimport { IPopupComponent, POPUP_CONSTANTS } from '../popup';\nimport { IListComponent } from '../list/list';\nimport { LIST_ITEM_CONSTANTS, IListItemComponent, IListItemSelectEventData } from '../list/list-item';\nimport { ScrollEvents, getShadowElement, IScrollObserverConfiguration, ScrollAxisObserver, removeAllChildren, isFunction, removeElement, replaceElement, createVisuallyHiddenElement, isDeepEqual, tryScrollIntoView } from '@tylertech/forge-core';\nimport { ILinearProgressComponent } from '../linear-progress';\nimport { ICON_CONSTANTS, IIconComponent } from '../icon';\n\nexport interface IListDropdownAdapter {\n dropdownElement: HTMLElement | undefined;\n open(config: IListDropdownOpenConfig, selectCallback: (value: any, id: string) => void, closeCb: () => void): void;\n close(): void;\n setScrollBottomListener(listener: () => void, scrollThreshold: number): void;\n removeScrollBottomListener(listener: () => void): void;\n getActiveOptionIndex(): number;\n getSelectedOptionIndex(): number;\n getActiveOptionIdByIndex(index: number): string | null;\n toggleOptionMultiple(index: number, isSelected: boolean): void;\n scrollOptionIntoView(index: number): void;\n scrollSelectedOptionIntoView(animate?: boolean): void;\n activateSelectedOption(config: IListDropdownOpenConfig): void;\n activateOption(index: number, activeChangeCallback: ((id: string) => void) | undefined, animate?: boolean): void;\n setSelectedValues(values: any[], multiple?: boolean): void;\n clearActiveOption(): void;\n syncWidth(sync: boolean, targetWidthCallback?: () => number): void;\n setOptions(config: IListDropdownOpenConfig): void;\n appendOptions(options: Array<IListDropdownOption | IListDropdownOptionGroup>, config: IListDropdownOpenConfig): void;\n setBusyVisibility(isVisible: boolean): void;\n getScreenWidth(): number;\n}\n\nexport class ListDropdownAdapter implements IListDropdownAdapter {\n private _dropdownElement: IPopupComponent | undefined;\n private _listElement: IListComponent | undefined;\n private _announcerElement: HTMLElement | undefined;\n private _scrollObserver: ScrollAxisObserver | undefined;\n private _asyncElement: HTMLElement | undefined;\n private _busyElement: ILinearProgressComponent;\n private _headerElement: HTMLElement;\n private _footerElement: HTMLElement;\n\n constructor(private _targetElement: HTMLElement) {}\n\n public get dropdownElement(): HTMLElement | undefined {\n return this._dropdownElement;\n }\n\n public open(config: IListDropdownOpenConfig, selectCallback: (value: any, id: string) => void, closeCb: () => void): void {\n // Now lets create the popup and append the children\n this._dropdownElement = createDropdown(config, this._targetElement);\n this.syncWidth(!!config.syncWidth, config.targetWidthCallback);\n\n // If we are configured to show a busy indicator (linear progress bar across the top), then create and append it first\n if (config.allowBusy) {\n this._busyElement = createBusyElement();\n this._busyElement.style.display = 'none';\n this._dropdownElement.appendChild(this._busyElement);\n }\n\n // Create the header element if a builder exists\n if (config.headerBuilder) {\n this._headerElement = config.headerBuilder();\n if (this._headerElement) {\n this._headerElement.setAttribute(LIST_DROPDOWN_CONSTANTS.attributes.DATA_ALLOW_FOCUS, '');\n }\n }\n \n // Create the footer element if a builder exists\n if (config.footerBuilder) {\n this._footerElement = config.footerBuilder();\n if (this._footerElement) {\n this._footerElement.setAttribute(LIST_DROPDOWN_CONSTANTS.attributes.DATA_ALLOW_FOCUS, '');\n }\n }\n\n // Create the list from our config\n this._listElement = createList(config);\n\n // Add the listener for when list items are selected from the dropdown\n this._listElement.addEventListener(LIST_ITEM_CONSTANTS.events.SELECT, (evt: CustomEvent<IListItemSelectEventData>) => {\n evt.detail.listItem.setAttribute('aria-selected', 'true');\n selectCallback(evt.detail.value, evt.detail.listItem.id);\n });\n\n // Determine if we need to show the list or the async element first\n if (config.options.length) {\n // Now we can create an append the list items\n createListItems(config, this._listElement);\n this._dropdownElement.appendChild(this._listElement);\n\n // Always append the optional header element **first**\n if (this._headerElement) {\n this._dropdownElement.insertAdjacentElement('afterbegin', this._headerElement);\n }\n\n // Always append the optional footer element **last**\n if (this._footerElement) {\n this._dropdownElement.appendChild(this._footerElement);\n }\n } else if (config.allowBusy) {\n this._asyncElement = createAsyncElement(config.asyncStyle);\n this._dropdownElement.appendChild(this._asyncElement);\n }\n\n // Create the announcer element for a11y\n this._announcerElement = createVisuallyHiddenElement();\n this._announcerElement.id = `${config.id}-activedescendant`;\n this._dropdownElement.appendChild(this._announcerElement);\n\n // Open the popup\n this._dropdownElement.open = true;\n }\n\n public close(): void {\n if (!this._dropdownElement) {\n return;\n }\n this._dropdownElement.open = false;\n this._dropdownElement = undefined;\n this._listElement = undefined;\n this._announcerElement = undefined;\n }\n\n public setScrollBottomListener(listener: () => void, scrollThreshold: number): void {\n if (this._dropdownElement) {\n if (!this._scrollObserver) {\n const scrollTarget = getShadowElement(this._dropdownElement, POPUP_CONSTANTS.selectors.CONTAINER);\n const scrollConfig: IScrollObserverConfiguration = { scrollThreshold };\n this._scrollObserver = new ScrollAxisObserver(scrollTarget, scrollConfig);\n this._scrollObserver.addListener(ScrollEvents.ScrolledEnd, listener);\n }\n }\n }\n\n public removeScrollBottomListener(listener: () => void): void {\n if (this._scrollObserver) {\n this._scrollObserver.removeListener(ScrollEvents.ScrolledEnd, listener);\n }\n }\n\n public getActiveOptionIndex(): number {\n if (!this._dropdownElement) {\n return -1;\n }\n const listItems = this._getListItemElements();\n const activeListItem = [...listItems].reverse().find(li => li.active);\n return activeListItem ? listItems.indexOf(activeListItem) : -1;\n }\n\n public getSelectedOptionIndex(): number {\n const listItems = this._getListItemElements();\n return listItems.findIndex(li => li.selected);\n }\n\n public getActiveOptionIdByIndex(index: number): string | null {\n if (!this._dropdownElement) {\n return null;\n }\n const listItems = this._getListItemElements();\n const item = listItems[index];\n return item ? item.id : null;\n }\n\n public toggleOptionMultiple(index: number, isSelected: boolean): void {\n if (!this._dropdownElement) {\n return;\n }\n\n const listItems = this._getListItemElements();\n if (listItems.length && listItems[index]) {\n this._toggleSelectedOption(listItems[index], isSelected);\n }\n }\n\n public scrollOptionIntoView(index: number, animate = true): void {\n const listItem = this._getListItemElements()[index];\n if (listItem) {\n this._scrollListItemIntoView(listItem, animate ? 'smooth' : 'auto', 'center');\n }\n }\n\n public scrollSelectedOptionIntoView(animate = true): void {\n const listItem = this._getSelectedListItem();\n this._scrollListItemIntoView(listItem, animate ? 'smooth' : 'auto', 'center');\n }\n\n public activateSelectedOption(config: IListDropdownOpenConfig): void {\n const listItems = this._getListItemElements();\n if (listItems.length) {\n const activeListItems = listItems.filter(li => li.active);\n activeListItems.forEach(li => li.active = false);\n }\n \n const listItem = this._getSelectedListItem();\n if (listItem) {\n this._activateListOption(listItem, config.activeChangeCallback);\n }\n }\n\n public activateOption(index: number, activeChangeCallback: ((id: string) => void) | undefined, animate = true): void {\n if (!this._dropdownElement) {\n return;\n }\n const listItems = this._getListItemElements();\n if (listItems.length) {\n const activeListItems = listItems.filter(li => li.active);\n activeListItems.forEach(li => li.active = false);\n this._activateListOption(listItems[index], activeChangeCallback);\n this._scrollListItemIntoView(listItems[index], animate ? 'smooth' : 'auto');\n }\n }\n\n public setSelectedValues(values: any[], multiple = false): void {\n if (!this._dropdownElement) {\n return;\n }\n const listItems = this._getListItemElements();\n for (const listItem of listItems) {\n const isSelected = values.some(v => isDeepEqual(v, listItem.value));\n listItem.selected = isSelected;\n\n if (multiple) {\n const checkboxElement = listItem.querySelector(`[${LIST_DROPDOWN_CONSTANTS.attributes.CHECKBOX_ELEMENT}]`) as IIconComponent;\n if (checkboxElement) {\n const newCheckboxElement = createCheckboxElement(isSelected);\n replaceElement(newCheckboxElement, checkboxElement);\n }\n }\n }\n }\n\n public clearActiveOption(): void {\n const listItems = this._getListItemElements();\n listItems.forEach(li => li.active = false);\n }\n\n public syncWidth(sync: boolean, targetWidthCallback?: () => number): void {\n if (this._dropdownElement) {\n this._dropdownElement.style[sync ? 'width' : 'minWidth'] = `${this._getTargetElementWidth(targetWidthCallback)}px`;\n }\n }\n\n public setOptions(config: IListDropdownOpenConfig): void {\n if (!this._dropdownElement || !this._listElement) {\n return;\n }\n if (this._asyncElement && this._asyncElement.isConnected) {\n removeElement(this._asyncElement);\n }\n if (this._busyElement) {\n this._busyElement.close();\n }\n if (!this._listElement.isConnected) {\n this._dropdownElement.appendChild(this._listElement);\n }\n \n removeAllChildren(this._listElement);\n createListItems(config, this._listElement);\n\n if (this._headerElement && !this._headerElement.isConnected) {\n this._dropdownElement.insertAdjacentElement('afterbegin', this._headerElement);\n }\n if (this._footerElement && !this._footerElement.isConnected) {\n this._dropdownElement.insertAdjacentElement('beforeend', this._footerElement);\n }\n if ('position' in this._dropdownElement && typeof this._dropdownElement.position === 'function') {\n this._dropdownElement.position();\n }\n }\n\n public appendOptions(options: Array<IListDropdownOption | IListDropdownOptionGroup>, config: IListDropdownOpenConfig): void {\n if (!this._dropdownElement || !this._listElement) {\n return;\n }\n createListItems(config, this._listElement, options, this._listElement.childElementCount, false);\n }\n\n public setBusyVisibility(isVisible: boolean): void {\n if (!this._dropdownElement) {\n return;\n }\n if (isVisible) {\n this._busyElement.style.removeProperty('display');\n this._busyElement.open();\n } else {\n this._busyElement.close();\n }\n }\n\n public getScreenWidth(): number {\n return window.innerWidth;\n }\n\n private _getListItemElements(): IListItemComponent[] {\n return this._dropdownElement ? Array.from(this._dropdownElement.querySelectorAll(LIST_ITEM_CONSTANTS.elementName)) as IListItemComponent[] : [];\n }\n\n private _toggleSelectedOption(listItem: IListItemComponent, isSelected: boolean): void {\n if (!this._dropdownElement) {\n return;\n }\n\n // First we need to remove the active state from any other list items\n const listItems = this._getListItemElements();\n if (listItems.length) {\n const activeItems = listItems.filter(li => li !== listItem && li.active);\n if (activeItems.length) {\n activeItems.forEach(ai => ai.active = false);\n }\n }\n\n // Now we can toggle the selected state and sync the active state\n listItem.selected = isSelected;\n listItem.setAttribute('aria-selected', `${isSelected}`);\n listItem.setAttribute('aria-checked', `${isSelected}`);\n\n if (isSelected) {\n listItem.active = true;\n }\n\n // Toggle the checkbox icon based on the selected state\n const checkboxElement = listItem.querySelector(`${ICON_CONSTANTS.elementName}[slot=leading]`) as IIconComponent;\n if (checkboxElement) {\n const newCheckboxElement = createCheckboxElement(isSelected);\n replaceElement(newCheckboxElement, checkboxElement);\n }\n }\n\n private _getTargetElementWidth(cb?: () => number): number {\n if (cb && isFunction(cb)) {\n return cb();\n }\n return this._targetElement.getBoundingClientRect().width;\n }\n\n private _activateListOption(listItem: IListItemComponent | undefined, activeChangeCallback?: (id: string) => void): void {\n if (listItem && !listItem.disabled) {\n listItem.active = true;\n if (activeChangeCallback && isFunction(activeChangeCallback)) {\n activeChangeCallback(listItem.id);\n }\n }\n }\n\n private _scrollListItemIntoView(listItem: HTMLElement | undefined, behavior: 'auto' | 'smooth' = 'auto', block: 'nearest' | 'center' = 'nearest'): void {\n if (listItem && this._dropdownElement && this._dropdownElement.isConnected) {\n const scrollContainer = getShadowElement(this._dropdownElement, POPUP_CONSTANTS.selectors.CONTAINER);\n if (scrollContainer) {\n tryScrollIntoView(scrollContainer, listItem, behavior, block);\n }\n }\n }\n\n private _getSelectedListItem(): IListItemComponent | undefined {\n const listItems = this._getListItemElements();\n return listItems.find(li => li.selected);\n }\n}\n", "import { tylIconCheckBox, tylIconCheckBoxOutlineBlank } from '@tylertech/tyler-icons/standard';\n\nimport { IListDropdownConfig, IListDropdownOption, IListDropdownOptionGroup } from './list-dropdown-constants';\nimport { ListDropdownFoundation } from './list-dropdown-foundation';\nimport { ListDropdownAdapter } from './list-dropdown-adapter';\nimport { IconRegistry } from '../icon';\n\nexport interface IListDropdown {\n dropdownElement: HTMLElement | undefined;\n open(): void;\n close(): void;\n destroy(): void;\n getActiveOptionIndex(): number;\n getActiveOption(): IListDropdownOption | undefined;\n toggleOptionMultiple(index: number, isSelected: boolean): void;\n activateSelectedOption(): void;\n activateFirstOption(): number;\n activateOption(index: number): void;\n activateInitialOption(): void;\n clearActiveOption(): void;\n setSelectedValues(values: any[]): void;\n setOptions(options: Array<IListDropdownOption | IListDropdownOptionGroup>): void;\n appendOptions(options: Array<IListDropdownOption | IListDropdownOptionGroup>): void;\n scrollSelectedOptionIntoView(animate?: boolean): void;\n setScrollBottomListener(listener: () => void, threshold?: number): void;\n removeScrollBottomListener(): void;\n setBusyVisibility(isVisible: boolean): void;\n handleKey(key: string): void;\n}\n\nexport class ListDropdown implements IListDropdown {\n private _foundation: ListDropdownFoundation;\n\n constructor(private _targetElement: HTMLElement, config: IListDropdownConfig) {\n IconRegistry.define([tylIconCheckBox, tylIconCheckBoxOutlineBlank]);\n this._foundation = new ListDropdownFoundation(new ListDropdownAdapter(this._targetElement), config);\n }\n\n public destroy(): void {\n this._foundation.destroy();\n }\n\n /** Opens the dropdown. */\n public open(): void {\n this._foundation.open();\n }\n\n /** Closes the dropdown. */\n public close(): void {\n this._foundation.close();\n }\n\n /** Gets the currently highlighted option index in the dropdown. */\n public getActiveOptionIndex(): number {\n return this._foundation.getActiveOptionIndex();\n }\n\n public getActiveOption(): IListDropdownOption | undefined {\n return this._foundation.getActiveOption();\n }\n \n /** Toggles the selected option by index. Only applies when in multiselect mode. */\n public toggleOptionMultiple(index: number, isSelected: boolean): void {\n return this._foundation.toggleOptionMultiple(index, isSelected);\n }\n \n /** Activates the first selected option. */\n public activateSelectedOption(): void {\n this._foundation.activateSelectedOption();\n }\n\n /** Activates the first non-disabled option. */\n public activateFirstOption(): number {\n return this._foundation.activateFirstOption();\n }\n\n /** Activates (highlights) an option by index. */\n public activateOption(index: number): void {\n return this._foundation.activateOption(index);\n }\n\n /** Activates the first activatable option. */\n public activateInitialOption(): void {\n return this._foundation.activateInitialOption();\n }\n\n /** Clears the active option from the dropdown */\n public clearActiveOption(): void {\n this._foundation.clearActiveOption();\n }\n\n /** Sets the selected values. Only applies when in multiselect mode. */\n public setSelectedValues(values: any[]): void {\n return this._foundation.setSelectedValues(values);\n }\n\n public get dropdownElement(): HTMLElement | undefined {\n return this._foundation.dropdownElement;\n }\n\n public setOptions(options: Array<IListDropdownOption | IListDropdownOptionGroup>): void {\n this._foundation.setOptions(options);\n }\n\n public appendOptions(options: Array<IListDropdownOption | IListDropdownOptionGroup>): void {\n this._foundation.appendOptions(options);\n }\n\n public scrollSelectedOptionIntoView(animate?: boolean): void {\n this._foundation.scrollSelectedOptionIntoView();\n }\n\n public setScrollBottomListener(listener: () => void, threshold?: number): void {\n this._foundation.setScrollBottomListener(listener, threshold);\n }\n\n public removeScrollBottomListener(): void {\n this._foundation.removeScrollBottomListener();\n }\n\n public setBusyVisibility(isVisible: boolean): void {\n this._foundation.setBusyVisibility(isVisible);\n }\n\n public handleKey(key: string): void {\n this._foundation.handleKey(key);\n }\n}\n", "import { ICustomElementFoundation } from '@tylertech/forge-core';\n\nimport { ListDropdownHeaderBuilder, ListDropdownFooterBuilder } from './list-dropdown-constants';\n\nexport interface IListDropdownAwareFoundation extends ICustomElementFoundation {\n popupClasses: string | string[];\n popupHeaderBuilder: ListDropdownHeaderBuilder;\n popupFooterBuilder: ListDropdownHeaderBuilder;\n syncPopupWidth: boolean;\n optionLimit: number;\n observeScroll: boolean;\n observeScrollThreshold: number;\n constrainPopupWidth: boolean;\n wrapOptionText: boolean;\n}\n\nexport abstract class ListDropdownAwareFoundation implements IListDropdownAwareFoundation {\n protected _popupClasses: string | string[] = [];\n protected _popupHeaderBuilder: ListDropdownHeaderBuilder;\n protected _popupFooterBuilder: ListDropdownFooterBuilder;\n protected _syncPopupWidth = false;\n protected _optionLimit = 0;\n protected _observeScroll = false;\n protected _observeScrollThreshold = 0;\n protected _constrainPopupWidth = true;\n protected _wrapOptionText = false;\n\n public get syncPopupWidth(): boolean {\n return this._syncPopupWidth;\n }\n public set syncPopupWidth(value: boolean) {\n this._syncPopupWidth = value;\n }\n\n public get popupClasses(): string | string[] {\n return this._popupClasses;\n }\n public set popupClasses(value: string | string[]) {\n if (typeof value === 'string') {\n value = [value];\n }\n if (Array.isArray(value)) {\n this._popupClasses = value;\n }\n }\n\n public get observeScroll(): boolean {\n return this._observeScroll;\n }\n public set observeScroll(value: boolean) {\n this._observeScroll = value;\n }\n\n public get observeScrollThreshold(): number {\n return this._observeScrollThreshold;\n }\n public set observeScrollThreshold(value: number) {\n this._observeScrollThreshold = value;\n }\n\n public get optionLimit(): number {\n return this._optionLimit;\n }\n public set optionLimit(value: number) {\n this._optionLimit = value;\n }\n\n public get popupHeaderBuilder(): ListDropdownHeaderBuilder {\n return this._popupHeaderBuilder;\n }\n public set popupHeaderBuilder(value: ListDropdownHeaderBuilder) {\n this._popupHeaderBuilder = value;\n }\n\n public get popupFooterBuilder(): ListDropdownFooterBuilder {\n return this._popupFooterBuilder;\n }\n public set popupFooterBuilder(value: ListDropdownFooterBuilder) {\n this._popupFooterBuilder = value;\n }\n\n public get constrainPopupWidth(): boolean {\n return this._constrainPopupWidth;\n }\n public set constrainPopupWidth(value: boolean) {\n this._constrainPopupWidth = value;\n }\n\n public get wrapOptionText(): boolean {\n return this._wrapOptionText;\n }\n public set wrapOptionText(value: boolean) {\n this._wrapOptionText = value;\n }\n\n protected _applySelection(): void {}\n}\n", "import { IListDropdownAwareFoundation, ListDropdownAwareFoundation } from './list-dropdown-aware-foundation';\n\nexport interface ICascadingListDropdownAwareFoundation extends IListDropdownAwareFoundation {}\n\nexport interface ICascadingListDropdownAwareFoundationConfiguration {\n popupTimeout: number;\n targetTimeout: number;\n}\n\nexport abstract class CascadingListDropdownAwareFoundation<T> extends ListDropdownAwareFoundation implements ICascadingListDropdownAwareFoundation {\n protected _open = false;\n protected _options: T[] = [];\n protected _childOpen = false;\n protected _popupHasMouse = false; // Used to determine if the popup element is under the users mouse\n protected _mouseCoords: { x: number; y: number };\n protected _activeMouseLeaveTimeout: number;\n protected _targetMouseEnterListener: (evt: MouseEvent) => void;\n protected _targetMouseLeaveListener: (evt: MouseEvent) => void;\n protected _childPopupMouseEnterListener: (evt: MouseEvent) => void;\n protected _childPopupMouseLeaveListener: (evt: MouseEvent) => void;\n protected _documentMouseMoveListener: (evt: MouseEvent) => void;\n \n protected abstract _attachCascadingListeners(): void;\n protected abstract _detachCascadingListeners(): void;\n protected abstract _onCascadingOptionSelected(data: any): void;\n protected abstract _onCascadingChildOpen(index: number): void;\n protected abstract _onCascadingChildClose(index: number): void;\n protected abstract _closeDropdown(): void;\n protected abstract _openDropdown({ fromKeyboard }: { fromKeyboard?: boolean }): void;\n protected abstract _setCascadeTargetInactive(): void;\n protected abstract _isOwnElement(element: Element): boolean;\n\n constructor(private _config: ICascadingListDropdownAwareFoundationConfiguration) {\n super();\n this._targetMouseEnterListener = evt => this._onTargetMouseEnter(evt);\n this._targetMouseLeaveListener = evt => this._onTargetMouseLeave(evt);\n this._childPopupMouseEnterListener = () => this._onChildPopupMouseEnter();\n this._childPopupMouseLeaveListener = () => this._onChildPopupMouseLeave();\n this._documentMouseMoveListener = evt => this._mouseCoords = { x: evt.pageX, y: evt.pageY };\n }\n\n private _onChildPopupMouseEnter(): void {\n this._popupHasMouse = true;\n }\n\n private _onChildPopupMouseLeave(): void {\n this._popupHasMouse = false;\n setTimeout(() => {\n const mouseElement = document.elementFromPoint(this._mouseCoords.x, this._mouseCoords.y);\n if (!this._popupHasMouse && !this._childOpen && (!mouseElement || !this._isOwnElement(mouseElement))) {\n this._setCascadeTargetInactive();\n this._closeDropdown();\n }\n }, this._config.popupTimeout);\n }\n\n private _onTargetMouseEnter(evt: MouseEvent): void {\n if (!this._options.length) {\n return;\n }\n this._openDropdown({ fromKeyboard: false });\n }\n\n private _onTargetMouseLeave(evt: MouseEvent): void {\n // We wrap this in a timeout to allow for the user to take an indirect path toward an open child menu. This\n // allows for the popup to stay open while the user is moving their mouse to it (makes the transition easier and more smooth)\n this._activeMouseLeaveTimeout = window.setTimeout(() => {\n // Ignore this if our open state has changed, or if we have a child popup open now\n if (!this._open || this._childOpen) {\n return;\n }\n if (this._mouseCoords) {\n // We ignore this event if the mouse moved to an element within our own popup\n const mouseElement = document.elementFromPoint(this._mouseCoords.x, this._mouseCoords.y);\n if (mouseElement && this._isOwnElement(mouseElement)) {\n return;\n }\n }\n this._setCascadeTargetInactive();\n this._closeDropdown();\n }, this._config.targetTimeout);\n }\n\n protected _clearMouseLeaveTimeout(): void {\n if (this._activeMouseLeaveTimeout !== undefined) {\n window.clearTimeout(this._activeMouseLeaveTimeout);\n }\n }\n}\n"],
|
|
5
|
+
"mappings": "4lBAGA,IAAMA,GAAa,CACjB,cAAe,gBACf,aAAc,eACd,eAAgB,iBAChB,yBAA0B,2BAC1B,iBAAkB,mBAClB,sBAAuB,wBACvB,iBAAkB,mBAGlB,iBAAkB,8BAClB,iBAAkB,gCACpB,EAEMC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xB,IAAI,KAAK,aAAc,CAErB,IAAMC,EAAe,SAAS,iBAAiB,KAAK,aAAa,EAAG,KAAK,aAAa,CAAC,EACvF,GAAIA,GAAgB,KAAK,cAAcA,CAAY,EACjD,MAEJ,CACA,KAAK,0BAA0B,EAC/B,KAAK,eAAe,EACtB,EAAG,KAAK,QAAQ,aAAa,CAC/B,CAEU,yBAAgC,CACpC,KAAK,2BAA6B,QACpC,OAAO,aAAa,KAAK,wBAAwB,CAErD,CACF",
|
|
6
|
+
"names": ["attributes", "classes", "LIST_DROPDOWN_CONSTANTS", "DEFAULT_LIST_DROPDOWN_CONFIG", "ListDropdownType", "ListDropdownAsyncStyle", "EventAware", "type", "data", "listeners", "cb", "listener", "ScrollDirection", "ScrollEvents", "DEFAULT_SCROLL_THROTTLE", "ScrollAxisObserver", "EventAware", "_element", "_config", "wait", "throttle", "isDefined", "isNumber", "isVertical", "isHorizontal", "position", "direction", "ScrollDirection", "ScrollEvents", "scrollStart", "scrollEnd", "createDropdown", "config", "targetElement", "dropdownElement", "createPopupDropdown", "dropdownId", "evt", "composedPath", "getEventPath", "el", "LIST_DROPDOWN_CONSTANTS", "addClass", "_a", "popupElement", "POPUP_CONSTANTS", "createList", "listElement", "LIST_CONSTANTS", "createListItems", "options", "startIndex", "renderSelected", "groups", "getOptionsByGroup", "flatOptions", "getFlattenedOptions", "limitOptions", "optionLimit", "optionIdIndex", "group", "optionParent", "headerElement", "groupWrapper", "listHeaderElement", "option", "dividerElement", "createDivider", "isSelected", "v", "isDeepEqual", "listItemElement", "element", "result", "secondaryLabelElement", "checkboxElement", "createCheckboxElement", "value", "key", "isObject", "leadingIconElement", "createIconElement", "trailingIconElement", "optionIconElement", "factoryConfig", "o", "cascadingElement", "selected", "tylIconCheckBox", "tylIconCheckBoxOutlineBlank", "divider", "type", "iconName", "iconClass", "componentProps", "icon", "iconElement", "ICON_CLASS_NAME", "createAsyncElement", "asyncStyle", "createSkeletonElement", "createSpinnerElement", "div", "spinner", "list", "i", "listItemSkeleton", "SKELETON_CONSTANTS", "createBusyElement", "linearProgress", "LINEAR_PROGRESS_CONSTANTS", "isListDropdownOptionType", "isOptionGroups", "isDefined", "isOptionTypes", "flatOpts", "ListDropdownFoundation", "_adapter", "config", "__spreadValues", "DEFAULT_LIST_DROPDOWN_CONFIG", "value", "id", "sync", "index", "isSelected", "o", "options", "animate", "values", "listener", "threshold", "isVisible", "key", "activeOptionIndex", "activeOption", "option", "startIndex", "getFlattenedOptions", "ListDropdownAdapter", "_targetElement", "config", "selectCallback", "closeCb", "createDropdown", "createBusyElement", "LIST_DROPDOWN_CONSTANTS", "createList", "LIST_ITEM_CONSTANTS", "evt", "createListItems", "createAsyncElement", "createVisuallyHiddenElement", "listener", "scrollThreshold", "scrollTarget", "getShadowElement", "POPUP_CONSTANTS", "scrollConfig", "ScrollAxisObserver", "ScrollEvents", "listItems", "activeListItem", "li", "index", "item", "isSelected", "animate", "listItem", "activeChangeCallback", "values", "multiple", "v", "isDeepEqual", "checkboxElement", "newCheckboxElement", "createCheckboxElement", "replaceElement", "sync", "targetWidthCallback", "removeElement", "removeAllChildren", "options", "isVisible", "activeItems", "ai", "ICON_CONSTANTS", "cb", "isFunction", "behavior", "block", "scrollContainer", "tryScrollIntoView", "ListDropdown", "_targetElement", "config", "IconRegistry", "tylIconCheckBox", "tylIconCheckBoxOutlineBlank", "ListDropdownFoundation", "ListDropdownAdapter", "index", "isSelected", "values", "options", "animate", "listener", "threshold", "isVisible", "key", "ListDropdownAwareFoundation", "value", "CascadingListDropdownAwareFoundation", "ListDropdownAwareFoundation", "_config", "evt", "mouseElement"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2023 Tyler Technologies, Inc.
|
|
4
|
+
* License: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import{A as Ne,B as T,C as Ye,D as q,a as r,f as w,g as v,h as De,i as we,j as Ee,l as m,m as ke,n as xe,o as Ce,p as Me,q as Te,r as Oe,s as Se,t as Ae,u as G,v as Be,w as Ie,x as U,y as Le,z as Fe}from"./chunk.44WDRTRR.js";import{a as M,j as ye}from"./chunk.PADHAJLS.js";import{a as E}from"./chunk.YPZNIYQL.js";import{a as ae}from"./chunk.4DAIIJ37.js";import{c as ve}from"./chunk.CE6NTUWI.js";import{b as be}from"./chunk.RLWX5BFQ.js";import{a as se,c as le,r as de,s as ce,v as ue}from"./chunk.MZLPUI6R.js";import{d as me}from"./chunk.73GVVX4K.js";import{d as fe,l as ge}from"./chunk.IWICN773.js";import{e as b,f as he,g as _e}from"./chunk.U6WGJELL.js";import{a as pe}from"./chunk.BESB4RGK.js";import{a as ne}from"./chunk.5KC43VFL.js";import{a as c}from"./chunk.KTGSZEAG.js";import{a as oe}from"./chunk.QOA2O575.js";import{a as ie,e as re,g as D}from"./chunk.HOXFK44F.js";import{b as Q,d as L,u as F,v as ee,w as te}from"./chunk.4LA6HEA7.js";import{b as A,g as B,i as C,k as g,l as I}from"./chunk.J2M2MXP2.js";import{f as d}from"./chunk.MCIQXNKY.js";function V(o,e,t=0){let a=[],i=O(new Date(e,o,1),t),n=new Date(i);n.setDate(i.getDate()+r.numbers.MONTH_LENGTH);for(let s=i;s<n;s.setDate(s.getDate()+1))a.push(new Date(s));return a}function _t(o,e=0){let t=[],a=O(o,e),i=new Date(a);i.setDate(a.getDate()+7);for(let n=a;n<i;n.setDate(n.getDate()+1))t.push(new Date(n));return t}function O(o,e=0){let t=o.getDay(),a=new Date(o),i=t>=e?t-e:7+(t-e);return a.setDate(o.getDate()-i),a.setHours(0,0,0,0),a}function Re(o,e=0){let t=O(o,e);return t.setDate(t.getDate()+6),t}function ft(o,e){return new Date(e,o,1).getDay()}function N(o=0){let e=[],t=o;do e.push(t),t+=1,t%=7;while(t!==o);return e}function He(o){return b(new Date,o)}function p(o,e,t){return o.getMonth()===e&&o.getFullYear()===t}function Ze(o,e,t){return o>e&&o<t||b(o,e)||b(o,t)}function Y(o){return o.sort((e,t)=>e.getTime()-t.getTime())}function We(o){let e=[];for(let t=0;t<o.length;t+=7){let a=o.slice(t,t+7);e.push(a)}return e}function y(o){if(!o.length)return new E;if(o.length===1)return new E({from:new Date(o[0])});let e=R(o);return new E({from:e[0],to:e[e.length-1]})}function Pe(o){let e=[];return o.from&&e.push(new Date(o.from)),o.to&&e.push(new Date(o.to)),e}function R(o){if(!o.length)return[];if(o.length===1)return[new Date(o[0])];let e=Y(o.slice().map(t=>new Date(t)));return[new Date(e[0]),new Date(e[e.length-1])]}function H(o,e,t){return!e||!t?[]:o.filter(a=>Ze(a,e,t))}function K(o){let e=`${o.length} event${o.length===1?"":"s"}`,t=o.map(a=>a.label).join(", ");return t!=null&&t.length&&(e+=`: ${t}`),e}function Je(o){var a,i;let e=new Date;return((i=(a=o.match(/-?[0-9]*[a-zA-Z]/g))==null?void 0:a.map(n=>n.trim()))!=null?i:[]).forEach(n=>{let s=n.slice(-1),u=+n.slice(0,-1);switch(s){case"y":e.setFullYear(e.getFullYear()+u);break;case"m":e.setMonth(e.getMonth()+u);break;case"w":e.setDate(e.getDate()+u*7);break;case"d":e.setDate(e.getDate()+u);break}}),e.setHours(0,0,0,0),e}function ze(o){let e=o.split(":");if((e==null?void 0:e.length)<2)return{min:1970,max:1970};let t=new Date().getFullYear(),a=e.slice(0,2).map(i=>i.startsWith("-")?t-+i.substring(1):i.startsWith("+")?t+ +i.substring(1):+i);return{min:a[0],max:a[1]}}function Ge(o){var n,s,u,_,f,j,Z,J;let e=(s=(n=o.min)==null?void 0:n.getFullYear())!=null?s:0,t=(_=(u=o.max)==null?void 0:u.getFullYear())!=null?_:0,a=(j=(f=o.min)==null?void 0:f.getMonth())!=null?j:-1,i=(J=(Z=o.max)==null?void 0:Z.getMonth())!=null?J:12;return[...Array(12).keys()].map(x=>{let $e=o.min?o.selectedYear<e||o.selectedYear===e&&x<a:!1,Xe=o.max?o.selectedYear>t||o.selectedYear===t&&x>i:!1;return{value:x,label:w(x,"long",o.locale),selected:x===o.selectedMonth,disabled:$e||Xe}})}function Ue(o){let e=[],t=o.yearInView%r.numbers.YEARS_IN_VIEW,a=o.yearInView-t;for(let i=a;i<a+r.numbers.YEARS_IN_VIEW;i++)e.push({value:i,label:v(i,"numeric",o.locale),selected:i===o.selectedYear,disabled:i<o.min||i>o.max});return e}function qe(o){let e=[];for(let t=o.min;t<=o.max;t++)e.push({value:t,label:v(t,"numeric",o.locale),selected:t===o.selectedYear});return e}function k(o,e){return e.some(t=>b(t,o))}function h(o,e){return!!(e.minDate&&o<e.minDate||e.maxDate&&o>e.maxDate||e.otherMonth||e.disabledDates.some(t=>b(t,o))||e.disabledDaysOfWeek.includes(o.getDay())||e.builder&&e.builder(o))}function S(o,e){return e.findIndex(t=>b(t,o))}function W(o,e,t){let a=e.filter(i=>b(i.date,o));if(t){let i=t(o);i&&(C(i)?a.push(...i):a.push(i))}return a}function Ve(o,e){if(!o.length)return[];let t=new Date(o[0]),a=o[o.length-1],i=[];for(;t<=a;)(!e||!h(t,e))&&i.push(new Date(t)),t.setDate(t.getDate()+1);return i}function $(o){let e=null;return typeof o=="string"&&!o.length&&(o=null),o!=null&&(B(new Date(o))?e=new Date(o):o.length&&(e=Je(o)),e==null||e.setHours(0,0,0,0)),e}function X(o,e,t){return t||!ae(o).length||!!(e==="date"&&T(o))||!!(e!=="date"&&Ye(o,r.ids.MENU))}var P=class extends ne{constructor(t){super(t);this._container=D(t,r.selectors.CALENDAR),this._dateView=D(t,r.selectors.DATE_VIEW),this._dayRow=D(t,r.selectors.DAY_ROW),this._dateGrid=D(t,r.selectors.DATE_GRID),this._menu=D(t,r.selectors.MENU)}toggleContainerAttribute(t,a,i){F(this._container,t,a,i)}registerMonthButtonListener(t){let a=this._container.querySelector(r.selectors.MONTH_BUTTON);a==null||a.addEventListener("click",t)}unregisterMonthButtonListener(t){let a=this._container.querySelector(r.selectors.MONTH_BUTTON);a==null||a.removeEventListener("click",t)}registerYearButtonListener(t){let a=this._container.querySelector(r.selectors.YEAR_BUTTON);a==null||a.addEventListener("click",t)}unregisterYearButtonListener(t){let a=this._container.querySelector(r.selectors.YEAR_BUTTON);a==null||a.removeEventListener("click",t)}registerMenuListener(t){this._menu.addEventListener(M.events.SELECT,t)}unregisterMenuListener(t){this._menu.removeEventListener(M.events.SELECT,t)}registerMenuFocusChangeEventListener(t){this._menu.addEventListener(M.events.FOCUS_CHANGE,t)}unregisterMenuFocusChangeEventListener(t){this._menu.addEventListener(M.events.FOCUS_CHANGE,t)}registerNextButtonListener(t){let a=this._container.querySelector(r.selectors.NEXT_BUTTON);a==null||a.addEventListener("click",t)}unregisterNextButtonListener(t){let a=this._container.querySelector(r.selectors.NEXT_BUTTON);a==null||a.removeEventListener("click",t)}registerPreviousButtonListener(t){let a=this._container.querySelector(r.selectors.PREVIOUS_BUTTON);a==null||a.addEventListener("click",t)}unregisterPreviousButtonListener(t){let a=this._container.querySelector(r.selectors.PREVIOUS_BUTTON);a==null||a.removeEventListener("click",t)}registerClearButtonListener(t){let a=this._container.querySelector(r.selectors.CLEAR_BUTTON);a==null||a.addEventListener("click",t)}unregisterClearButtonListener(t){let a=this._container.querySelector(r.selectors.CLEAR_BUTTON);a==null||a.removeEventListener("click",t)}registerTodayButtonListener(t){let a=this._container.querySelector(r.selectors.TODAY_BUTTON);a==null||a.addEventListener("click",t)}unregisterTodayButtonListener(t){let a=this._container.querySelector(r.selectors.TODAY_BUTTON);a==null||a.removeEventListener("click",t)}registerDateClickListener(t){this._dateGrid.addEventListener("click",t)}unregisterDateClickListener(t){this._dateGrid.removeEventListener("click",t)}registerKeydownListener(t){this._container.addEventListener("keydown",t)}registerHoverListener(t){this._dateGrid.addEventListener("mouseover",t)}unregisterHoverListener(t){this._dateGrid.removeEventListener("mouseover",t)}registerPreventFocusListener(t){this._container.addEventListener("mousedown",t)}unregisterPreventFocusListener(t){this._container.removeEventListener("mousedown",t)}setContainerClass(t,a){this._container.classList.toggle(t,a)}setHeader(){let t=this._container.querySelector(r.selectors.ACCESSIBLE_HEADER);t==null||t.remove();let a=this._container.querySelector(r.selectors.HEADER);a?a.replaceWith(G()):this._container.prepend(G())}removeHeader(){let t=this._container.querySelector(r.selectors.HEADER);t==null||t.remove();let a=this._container.querySelector(r.selectors.ACCESSIBLE_HEADER);a?a.replaceWith(U()):this._container.prepend(U())}setNextButtonDisabled(t){let a=this._container.querySelector(r.selectors.NEXT_BUTTON);a==null||a.toggleAttribute("disabled",t)}setPreviousButtonDisabled(t){let a=this._container.querySelector(r.selectors.PREVIOUS_BUTTON);a==null||a.toggleAttribute("disabled",t)}setNextButtonLabel(t){let a=this._container.querySelector(r.selectors.NEXT_BUTTON);a==null||a.setAttribute("aria-label",t);let i=this._container.querySelector(r.selectors.NEXT_BUTTON_TOOLTIP);i&&(i.innerHTML=t)}setPreviousButtonLabel(t){let a=this._container.querySelector(r.selectors.PREVIOUS_BUTTON);a==null||a.setAttribute("aria-label",t);let i=this._container.querySelector(r.selectors.PREVIOUS_BUTTON_TOOLTIP);i&&(i.innerHTML=t)}setMonthButtonPressed(t){let a=this._container.querySelector(r.selectors.MONTH_BUTTON);a&&(a.setAttribute("aria-pressed",t.toString()),this._container.classList.toggle(r.classes.MONTH_MENU_OPEN,t))}setYearButtonPressed(t){let a=this._container.querySelector(r.selectors.YEAR_BUTTON);a&&(a.setAttribute("aria-pressed",t.toString()),this._container.classList.toggle(r.classes.YEAR_MENU_OPEN,t))}setMonth(t,a){let i=this._container.querySelector(r.selectors.MONTH_BUTTON);if(i){let s=Be(t,a);i.replaceChildren(s[0],s[1]);return}let n=this._container.querySelector(r.selectors.ACCESSIBLE_MONTH);n&&(n.textContent=w(t,"long",a))}setYear(t,a){let i=this._container.querySelector(r.selectors.YEAR_BUTTON);if(i){let s=Ie(t,a);i.replaceChildren(s[0],s[1]);return}let n=this._container.querySelector(r.selectors.ACCESSIBLE_YEAR);n&&(n.textContent=v(t,"numeric",a))}setFooter(){this._container.querySelector(r.selectors.FOOTER)||this._container.appendChild(Le())}removeFooter(){var a;let t=this._container.querySelector(r.selectors.FOOTER);(a=t==null?void 0:t.parentNode)==null||a.removeChild(t)}setClearButton(){let t=this._container.querySelector(r.selectors.FOOTER);if(!t)return;t.querySelector(r.selectors.CLEAR_BUTTON)||t.prepend(Fe())}removeClearButton(){var a;let t=this._container.querySelector(r.selectors.CLEAR_BUTTON);(a=t==null?void 0:t.parentNode)==null||a.removeChild(t)}setTodayButton(){let t=this._container.querySelector(r.selectors.FOOTER);if(!t)return;t.querySelector(r.selectors.TODAY_BUTTON)||t.appendChild(Ne())}removeTodayButton(){var a;let t=this._container.querySelector(r.selectors.TODAY_BUTTON);(a=t==null?void 0:t.parentNode)==null||a.removeChild(t)}setDays(t,a){L(this._dayRow),t.forEach(i=>{let n=xe(i,a==null?void 0:a.locale);a!=null&&a.builder&&(n=a.builder(i,n)),this._dayRow.appendChild(n)})}setDates(t,a){L(this._dateGrid),We(t).forEach((i,n)=>{let s=Ce(i,n,a);this._dateGrid.appendChild(s)})}replaceDate(t,a){let i=this._dateGrid.querySelector(`#${m(t.date)}`);if(i){let n=Me(t,a==null?void 0:a.locale);a!=null&&a.builder?i.replaceWith(a.builder(t,n)):i.replaceWith(n)}}replaceDateWithSpacer(t){let a=this._dateGrid.querySelector(`#${m(t)}`);a==null||a.replaceWith(Te(t))}setDateDisabled(t,a){let i=this._dateGrid.querySelector(`#${m(t)}`);i&&(i.toggleAttribute("disabled",a),i.setAttribute("aria-disabled",a.toString()))}setDateSelected(t,a){let i=this._dateGrid.querySelector(`#${m(t)}`);i&&(i.classList.toggle(r.classes.DATE_SELECTED,a),i.setAttribute("aria-selected",a.toString()))}setWeekend(t,a){let i=this._dateGrid.querySelector(`#${m(t)}`),n=i==null?void 0:i.querySelector(r.selectors.DATE_INNER);!n||ee(n,"part",r.parts.WEEKEND,a)}appendDateAttribute(t,a,i){let n=this._dateGrid.querySelector(`#${m(t)}`);n&&te(n,a,i)}setMultiple(t){this._dateView.setAttribute("aria-multiselectable",t.toString())}setDateViewHidden(t){F(this._dateView,t,"aria-hidden",t.toString()),this.setAllDatesUnfocusable()}setRange(t){this._dateGrid.querySelectorAll(r.selectors.RANGE).forEach(i=>i.classList.remove(r.classes.RANGE)),t&&t.forEach(i=>{let n=this._dateGrid.querySelector(`#${m(i)}`);n==null||n.classList.add(r.classes.RANGE)})}setRangeStart(t){let a=this._dateGrid.querySelector(r.selectors.RANGE_START);if(a==null||a.classList.remove(r.classes.RANGE_START),!t)return;let i=this._dateGrid.querySelector(`#${m(t)}`);i==null||i.classList.add(r.classes.RANGE_START)}setRangeEnd(t){let a=this._dateGrid.querySelector(r.selectors.RANGE_END);if(a==null||a.classList.remove(r.classes.RANGE_END),!t)return;let i=this._dateGrid.querySelector(`#${m(t)}`);i==null||i.classList.add(r.classes.RANGE_END)}setActiveDate(t,a,i){let n=t.toDateString();this._dateGrid.querySelectorAll(r.selectors.DATE).forEach(u=>{let _=u.getAttribute(r.attributes.DATA_DATE)===n;q(u,_?0:-1,a,i)})}setAllDatesUnfocusable(){this._dateGrid.querySelectorAll(r.selectors.DATE).forEach(a=>q(a,-1,!1,!0))}setDateDescription(t,a){let i=this._dateGrid.querySelector(`#${m(t)}`);!i||F(i,!!a,a)}setDateTooltip(t,a){let i=this._dateGrid.querySelector(`#${m(t)}`);if(!i)return;let n=i.querySelector(r.selectors.TOOLTIP);n?a!=null&&a.length?n.textContent=a:n.remove():a!=null&&a.length&&i.prepend(Ae(a))}setEventWrapperOnDate(t,a){let i=this._dateGrid.querySelector(`#${m(t)}`);if(!i)return;let n=i.querySelector(r.selectors.EVENT_WRAPPER);n?a?L(n):n.remove():a&&i.appendChild(Oe(t))}setEvent(t,a){let i=this._dateGrid.querySelector(`#${ke(t.date)}`);i==null||i.appendChild(Se(t,a))}openMenuAsGrid(t,a){this._menu.openAsGrid(t,a)}openMenuAsList(t,a){this._menu.openAsList(t,a)}closeMenu(){this._menu.close()}setMenuAnimation(t){this._menu.animationType=t}animateIntoSelectionMenu(t,a,i){this._menu.animateIn(t,a,i)}moveMenuFocusDown(){this._menu.moveFocusDown()}moveMenuFocusBackward(){return this._menu.moveFocusBackward()}moveMenuFocusForward(){return this._menu.moveFocusForward()}moveMenuFocusUp(){this._menu.moveFocusUp()}selectFocusedMenuItem(){this._menu.selectFocusedItem()}setPreventFocusOnMenu(t){this._menu.preventFocus=t}};var z=class{constructor(e){this._adapter=e;this._dates=[];this._month=new Date().getMonth();this._year=new Date().getFullYear();this._showToday=!0;this._showOtherMonths=!1;this._fixedHeight=!1;this._events=[];this._value=[];this._mode="single";this._readonly=!1;this._selectionFollowsMonth=!1;this._rangeSelectionState="none";this._allowSingleDateRange=!0;this._min=null;this._max=null;this._minAttribute=null;this._maxAttribute=null;this._disabledDates=[];this._disabledDaysOfWeek=[];this._constrainToEnabled=!0;this._showHeader=!0;this._clearButton=!1;this._todayButton=!1;this._view="date";this._menuAnimation="scale";this._menuYear=null;this._listYears=!0;this._menuIncludedYear=new Date().getFullYear();this._menuYearsInView=null;this._yearRange=`-${r.numbers.DEFAULT_MIN_YEAR_OFFSET}:+${r.numbers.DEFAULT_MAX_YEAR_OFFSET}`;this._weekendDays=null;this._localeFirstDayOfWeek=0;this._localeWeekendDays=[];this._rtl=!1;this._preventFocus=!1;this._isInitialized=!1;this._clearButtonListener=()=>this._onClearClicked(),this._dateClickListener=t=>this._onDateClick(t),this._keydownListener=t=>this._onKeydown(t),this._hoverListener=t=>this._onHover(t),this._menuFocusChangeListener=t=>this._onMenuFocusChange(t),this._menuListener=t=>this._onMenuSelect(t),this._monthButtonListener=()=>this._onMonthButtonClicked(),this._nextButtonListener=()=>this._onNextButtonClicked(),this._preventFocusListener=t=>t.preventDefault(),this._previousButtonListener=()=>this._onPreviousButtonClicked(),this._todayButtonListener=()=>this._onTodayClicked(),this._yearButtonListener=()=>this._onYearButtonClicked()}initialize(){this._adapter.registerMenuListener(this._menuListener),this._adapter.registerMenuFocusChangeEventListener(this._menuFocusChangeListener),this._adapter.registerKeydownListener(this._keydownListener),this._applyMin(),this._applyMax(),this._applyFixedHeight(),this._applyReadOnly(),this._applyShowToday(),this._applyPreventFocus(),this._applyShowHeader(),this._applyMonth(),this._applyYear(),this._applyListYears(),this._applyMenuAnimation(),this._applyLocale(),this._applyClearButton(),this._applyTodayButton(),this._applyFirstDayOfWeek(),this._applyShowOtherMonths(),this._createDateView(),this._applyConstrainToEnabled(),this._applyAllowSingleDateRange(),this._applyMode(),this._applyYearRange(),this._applySelectionFollowsMonth(),this._isInitialized=!0}disconnect(){this._isInitialized=!1}_onMonthButtonClicked(){this._toggleMonthMenu()}_toggleMonthMenu(e=!1){this._view!=="month"?this._openMonthMenu(e):this._closeMenu(!1,e)}_onYearButtonClicked(){this._toggleYearMenu()}_toggleYearMenu(e=!1){this._view!=="year"?this._openYearMenu(e):this._closeMenu(!1,e)}_onMenuFocusChange(e){this._emitFocusChangeEvent(e.detail)}_onMenuSelect(e){switch(this._view){case"month":this._onMonthSelected(e.detail);break;case"year":this._onYearSelected(e.detail);break}}_onNextButtonClicked(){this._view==="date"?(this._goToNextMonth(),this._setFocusInMonth(1,!1)):this._view==="month"?this._goToNextYear():this._goToNextSetOfYears()}_onPreviousButtonClicked(){this._view==="date"?(this._goToPreviousMonth(),this._setFocusInMonth(2,!1)):this._view==="month"?this._goToPreviousYear():this._goToPreviousSetOfYears()}_onHover(e){if(this._mode==="range"){let t=T(e,!1);if(!t)return;let a=new Date(Date.parse(t.getAttribute(r.attributes.DATA_DATE)));p(a,this._month,this._year)&&this._setRangePreview(a)}}_onDateClick(e){let t=T(e,!1);if(!t)return;let a=t.getAttribute(r.attributes.DATA_DATE);if(!a)return;let i=new Date(a);p(i,this._month,this._year)&&(this._focusedDate=i,this._beforeDateSelected(i)),this._resumeTabindexOnDate(!1)}_onKeydown(e){switch(e.key){case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":this._handleArrowKey(e);break;case"Home":case"End":case"PageUp":case"PageDown":this._handleNavigationKey(e);break;case" ":case"Enter":this._handleEnterOrSpaceKey(e);break;case"m":case"M":e.preventDefault(),this._toggleMonthMenu(!0);break;case"y":case"Y":e.preventDefault(),this._toggleYearMenu(!0);break;case"t":case"T":case"n":case"N":e.preventDefault(),this.today();break;case"Delete":case"Backspace":e.preventDefault(),this._deselectAllDates();break;case"Escape":this._view!=="date"&&(e.preventDefault(),e.stopPropagation(),this._closeMenu(!1,!0));break}}_handleArrowKey(e){if(!X(e,this._view,this._preventFocus))return;e.preventDefault();let t;switch(e.key){case"ArrowLeft":t=this._rtl?"next":"previous";break;case"ArrowRight":t=this._rtl?"previous":"next";break;case"ArrowUp":t="up";break;case"ArrowDown":t="down";break}switch(t){case"previous":this._view==="date"?this._moveFocusToPreviousDate(!0):!this._adapter.moveMenuFocusBackward()&&this._canGoBackward()&&(this._view==="month"?this._goToPreviousYear(!0):this._goToPreviousSetOfYears(!0));break;case"next":this._view==="date"?this._moveFocusToNextDate(!0):!this._adapter.moveMenuFocusForward()&&this._canGoForward()&&(this._view==="month"?this._goToNextYear(!0):this._goToNextSetOfYears(!0));break;case"up":this._view==="date"?this._moveFocusToPreviousWeek(!0):this._adapter.moveMenuFocusUp();break;case"down":this._view==="date"?this._moveFocusToNextWeek(!0):this._adapter.moveMenuFocusDown();break}this._mode==="range"&&this._setRangePreview(this._focusedDate)}_handleNavigationKey(e){switch(e.preventDefault(),e.key){case"Home":if(this._view!=="date")break;e.shiftKey?this._moveFocusToFirstOfMonth(!0):this._moveFocusToFirstOfWeek(!0);break;case"End":if(this._view!=="date")break;e.shiftKey?this._moveFocusToLastOfMonth(!0):this._moveFocusToLastOfWeek(!0);break;case"PageUp":this._view==="date"?e.shiftKey?this._moveFocusToPreviousYear(!0):this._moveFocusToPreviousMonth(!0):this._view==="month"&&!e.shiftKey&&this._canGoBackward()?this._goToPreviousYear(!0):this._view==="year"&&!e.shiftKey&&this._canGoBackward()&&this._goToPreviousSetOfYears(!0);break;case"PageDown":this._view==="date"?e.shiftKey?this._moveFocusToNextYear(!0):this._moveFocusToNextMonth(!0):this._view==="month"&&!e.shiftKey&&this._canGoForward()?this._goToNextYear(!0):this._view==="year"&&!e.shiftKey&&this._canGoForward()&&this._goToNextSetOfYears(!0);break}}_handleEnterOrSpaceKey(e){if(!!X(e,this._view,this._preventFocus))switch(e.preventDefault(),this._view){case"date":if(this._readonly)break;this._setSelectOnFocusedDate();break;case"month":case"year":this._adapter.selectFocusedMenuItem();break}}_onMonthSelected(e){this._year!==this._menuYear&&this._menuYear!=null&&(this._year=this._menuYear,this._setYear()),this._month=e,this._setMonth(!0),this._trySetValueMonthAndYear(this._month,this._year,"month"),this._closeMenu(!0)}_onYearSelected(e){this._year=e,this._setYear(!0),this._trySetValueMonthAndYear(this._month,this._year,"year"),this._closeMenu(!0)}_onClearClicked(){this.clear()}_onTodayClicked(){this.today()}_trySetValueMonthAndYear(e,t,a="date"){var s;if(!this.selectionFollowsMonth||this._mode!=="single"||!((s=this._value)!=null&&s.length))return;let i=new Date(this._value[0]),n=_e(e,t);i.setDate(Math.min(i.getDate(),n)),i.setFullYear(t),i.setMonth(e),!h(i,this._getDisabledDateParams())&&this._beforeDateSelected(i,a)}_setInitialDateFocus(e=!1){let t=new Date;if(p(t,this._month,this._year)&&!h(t,this._getDisabledDateParams(!1))){this._setFocusedDate(t,e);return}let a=new Date(this._year,this._month,1);this._setFocusedDate(this._getNextEnabledDate(a,1,!1,!0,!0),e)}_resumeTabindexOnDate(e){return p(this._focusedDate,this._month,this._year)?(this._adapter.setActiveDate(this._focusedDate,e,this._preventFocus),this._emitFocusChangeEvent(this._focusedDate),!0):!1}_moveFocusToNextDate(e){this._setFocusedDate(this._getNextEnabledDate(this._focusedDate),e)}_moveFocusToPreviousDate(e){this._setFocusedDate(this._getPreviousEnabledDate(this._focusedDate),e)}_moveFocusToNextWeek(e){this._setFocusedDate(this._getNextEnabledDate(this._focusedDate,7,!0),e)}_moveFocusToPreviousWeek(e){this._setFocusedDate(this._getPreviousEnabledDate(this._focusedDate,7,!0),e)}_moveFocusToFirstOfWeek(e){this._setFocusedDate(this._getFirstEnabledDayOfWeek(this._focusedDate,!0),e)}_moveFocusToLastOfWeek(e){this._setFocusedDate(this._getLastEnabledDayOfWeek(this._focusedDate,!0),e)}_moveFocusToFirstOfMonth(e){let t=new Date(this._year,this._month,1);this._setFocusedDate(this._getNextEnabledDate(t,1,!1,!0),e)}_moveFocusToLastOfMonth(e){let t=new Date(this._year,this._month+1,0);this._setFocusedDate(this._getPreviousEnabledDate(t,1,!1,!0),e)}_moveFocusToNextMonth(e){let t=S(this._focusedDate,this._dates),a=(this._month+1)%12,i=a===0?this._year+1:this._year;this._setFocusedDate(this._getDateAtIndexInMonth(t,a,i),e)}_moveFocusToPreviousMonth(e){let t=S(this._focusedDate,this._dates),a=this._month===0?11:this._month-1,i=a===11?this._year-1:this._year;this._setFocusedDate(this._getDateAtIndexInMonth(t,a,i),e)}_moveFocusToNextYear(e){let t=S(this._focusedDate,this._dates);this._setFocusedDate(this._getDateAtIndexInMonth(t,this._month,this._year+1),e)}_moveFocusToPreviousYear(e){let t=S(this._focusedDate,this._dates);this._setFocusedDate(this._getDateAtIndexInMonth(t,this._month,this._year-1),e)}_setFocusInMonth(e,t){switch(e){case 1:this._moveFocusToFirstOfMonth(t);break;case 2:this._moveFocusToLastOfMonth(t);break;default:this._resumeTabindexOnDate(t);break}}_setSelectOnFocusedDate(){p(this._focusedDate,this._month,this._year)&&!h(this._focusedDate,this._getDisabledDateParams(!1))&&this._beforeDateSelected(this._focusedDate)}_emitFocusChangeEvent(e){let t={type:this._view,value:e};switch(this._view){case"date":t.selected=k(e,this._value),t.text=e.toLocaleDateString(this.locale,{month:"long",day:"2-digit",year:"numeric"});break;case"month":t.selected=this._month===e,t.text=w(e,"long");break;case"year":t.selected=this._year===e,t.text=v(e,"numeric");break}this._adapter.emitHostEvent(r.events.FOCUS_CHANGE,t)}_getPreviousEnabledDate(e,t=1,a=!1,i=!1,n=!1){let s=this._getDisabledDateParams(),u=new Date(e);if(i&&!h(u,s))return u;let _=e.getMonth(),f=!1;do u.setDate(u.getDate()-t),a&&(t=1),(n&&u.getMonth()!==_||this._min&&u<this._min)&&(f=!0);while(!f&&h(u,s));return f?null:u}_getNextEnabledDate(e,t=1,a=!1,i=!1,n=!1){let s=this._getDisabledDateParams(),u=new Date(e);if(i&&!h(u,s))return u;let _=e.getMonth(),f=!1;do u.setDate(u.getDate()+t),a&&(t=1),(n&&u.getMonth()!==_||this._max&&u>this._max)&&(f=!0);while(!f&&h(u,s));return f?null:u}_getClosestEnabledDate(e,t=!1,a=!1){if(this._min&&e<this._min)return this._getFirstEnabledDate();if(this._max&&e>this._max)return this._getLastEnabledDate();let i=this._getDisabledDateParams();if(a&&!h(e,i))return new Date(e);let n=e.getDate(),s,u=!1,_=!1,f=1;for(;!u||!_;){if(!u){if(s=new Date(e),s.setDate(n+f),u=!p(s,e.getMonth(),e.getFullYear()),!u&&!h(s,i))return s;this._max&&s>this._max&&(u=!0)}if(!_){if(s=new Date(e),s.setDate(n-f),_=!p(s,e.getMonth(),e.getFullYear()),!_&&!h(s,i))return s;this._min&&s<this._min&&(_=!0)}f+=1}return null}_getFirstEnabledDayOfWeek(e,t=!0){let a=O(e),i=this._getDisabledDateParams(t?a.getMonth()!==e.getMonth()||a.getFullYear()!==e.getFullYear():void 0),n=0;for(;n<7&&h(a,i);)a.setDate(a.getDate()+1),i.otherMonth=t?a.getMonth()!==e.getMonth()||a.getFullYear()!==e.getFullYear():void 0,n+=1;return n<7?a:null}_getLastEnabledDayOfWeek(e,t=!0){let a=Re(e),i=this._getDisabledDateParams(t?a.getMonth()!==e.getMonth()||a.getFullYear()!==e.getFullYear():void 0),n=0;for(;n<7&&h(a,i);)a.setDate(a.getDate()-1),i.otherMonth=t?a.getMonth()!==e.getMonth()||a.getFullYear()!==e.getFullYear():void 0,n+=1;return n<7?a:null}_getDateAtIndexInMonth(e,t,a){var n;let i=V(t,a,(n=this._firstDayOfWeek)!=null?n:this._localeFirstDayOfWeek);return this._min&&i[e]<this._min?this._getFirstEnabledDate():this._max&&i[e]>this._max?this._getLastEnabledDate():p(i[e],t,a)?this._getClosestEnabledDate(i[e],!0):e<20?this._getNextEnabledDate(i[e],7,!0):this._getPreviousEnabledDate(i[e],7,!0)}_getFirstEnabledDate(){return this._min?this._getNextEnabledDate(this._min,1,!1,!0):null}_getLastEnabledDate(){return this._max?this._getPreviousEnabledDate(this._max,1,!1,!0):null}_setFocusedDate(e,t){if(!e)return;let a=this._month!==e.getMonth(),i=this._year!==e.getFullYear();(a||i)&&(a&&(this._month=e.getMonth(),this._setMonth()),i&&(this._year=e.getFullYear(),this._setYear()),this._resetDateGrid()),this._focusedDate=e,this._adapter.setActiveDate(this._focusedDate,t,this._preventFocus),this._emitFocusChangeEvent(this._focusedDate)}_getDisabledDateParams(e){return{builder:this._disabledDateBuilder,disabledDates:this._disabledDates,disabledDaysOfWeek:this._disabledDaysOfWeek,maxDate:this._max,minDate:this._min,otherMonth:e}}_createDateView(){this._resetDateGrid(),(!this._focusedDate||!this._resumeTabindexOnDate(!1))&&this._setInitialDateFocus()}_openMonthMenu(e=!1){this._view="month",this._menuYear==null&&(this._menuYear=this._year),this._showHeader&&(this._setNavButtonLabels(),this._adapter.setMonthButtonPressed(!0),this._adapter.setYearButtonPressed(!1)),this._adapter.openMenuAsGrid(this._getMonthsForMenu(),e),this._adapter.setDateViewHidden(!0),this._setNavigationButtonStates(),this._adapter.emitHostEvent(r.events.VIEW_CHANGE,this._view)}_openYearMenu(e=!1){var t;this._view="year",this._menuIncludedYear=(t=this._menuYear)!=null?t:this._year,this._showHeader&&(this._setNavButtonLabels(),this._adapter.setMonthButtonPressed(!1),this._adapter.setYearButtonPressed(!0)),this._listYears?this._adapter.openMenuAsList(this._getYearsForMenu(),e):this._adapter.openMenuAsGrid(this._getYearsForMenu(),e),this._adapter.setDateViewHidden(!0),this._setNavigationButtonStates(),this._adapter.emitHostEvent(r.events.VIEW_CHANGE,this._view)}_getMonthsForMenu(){var t;let e={locale:this._locale,max:this._max,min:this._min,selectedMonth:this._year===this._menuYear?this._month:-1,selectedYear:(t=this._menuYear)!=null?t:this._year};return Ge(e)}_getYearsForMenu(){let e=this._min?this._min.getFullYear():this._minYear,t=this._max?this._max.getFullYear():this._maxYear,a={locale:this._locale,max:t,min:e,selectedYear:this._year,yearInView:this._menuIncludedYear},i=this._listYears?qe(a):Ue(a);return this._menuYearsInView={min:i[0].value,max:i[i.length-1].value},i}_closeMenu(e,t=!1){this._view="date",this._menuYear=null,this._adapter.closeMenu(),this._adapter.setDateViewHidden(!1),this._adapter.setYear(this._year,this._locale),e&&this._resetDateGrid(),this._showHeader&&(this._setNavButtonLabels(),this._setNavigationButtonStates(),this._adapter.setMonthButtonPressed(!1),this._adapter.setYearButtonPressed(!1)),this._resumeTabindexOnDate(t)||this._setInitialDateFocus(t),this._adapter.emitHostEvent(r.events.VIEW_CHANGE,this._view)}_setNavButtonLabels(){switch(this._view){case"date":this._adapter.setPreviousButtonLabel("Previous month"),this._adapter.setNextButtonLabel("Next month");break;case"month":this._adapter.setPreviousButtonLabel("Previous year"),this._adapter.setNextButtonLabel("Next year");break;case"year":this._adapter.setPreviousButtonLabel("Previous years"),this._adapter.setNextButtonLabel("Next years");break}}_resetDateGrid(){var t;this._dates=V(this._month,this._year,(t=this._firstDayOfWeek)!=null?t:this._localeFirstDayOfWeek);let e=this._dates.map(a=>this._getDateConfig(a));this._adapter.setDates(e,{builder:this._dateBuilder,locale:this._locale,showOtherMonths:this._showOtherMonths}),this._setNavigationButtonStates(),this._applyWeekendDays(),this._applyEvents(),this._mode==="range"&&(this._adapter.setRangeStart(this._value[0]),this._setRangePreview())}_getDateConfig(e){let t=p(e,this._month,this._year);return{date:new Date(e),selected:k(e,this._value),today:He(e),thisMonth:t,disabled:h(e,this._getDisabledDateParams(!t))}}_getCalendarDate(e){return{date:new Date(e),selected:k(e,this._value),events:W(e,this._events,this._eventBuilder)}}_setEventsOnDate(e){var i;if(!this._showOtherMonths&&!p(e,this._month,this._year)){this._adapter.setEventWrapperOnDate(e,!1);return}let t=W(e,this._events,this._eventBuilder);this._adapter.setEventWrapperOnDate(e,!!t.length),t.forEach((n,s)=>{s>2||this._adapter.setEvent(n,s===2&&t.length>3)});let a=t.length?K(t):"";this._tooltipBuilder&&(a=(i=this._tooltipBuilder(this._getCalendarDate(e),a))!=null?i:""),this._adapter.setDateTooltip(e,a)}_beforeDateSelected(e,t="date"){this._dateSelectCallback?Promise.resolve(this._dateSelectCallback(this._getCalendarDate(e))).then(a=>{a&&this._onDateSelected(e,void 0,t)}):this._onDateSelected(e,void 0,t)}_onDateSelected(e,t,a="date"){if(this._mode==="range"&&this._emitRangeSelectionEvent(e)){this._applyRangeSelection(e),this._rangeSelectionStore=void 0;return}let i=k(e,this._value),n={date:new Date(e),selected:i,type:a};!this._adapter.emitHostEvent(r.events.DATE_SELECT,n,!0,!0)||(this._rangeSelectionStore=void 0,this._mode==="single"?i&&!t||t===!1?this._deselectDate(e):(t===void 0||t===!0)&&(this._value.length&&this._deselectDate(this._value[0]),this._selectDate(e)):i&&!t||t===!1?this._deselectDate(e):(t===void 0||t===!0)&&this._selectDate(e),Y(this._value))}_emitRangeSelectionEvent(e){let t={date:new Date(e),selected:k(e,this._value),type:"date"};switch(this._rangeSelectionState){case"none":case"to":t.range=y([e]),t.rangeSelectionState="from";break;case"from":b(e,this._value[0])?this._allowSingleDateRange?(t.range=y([this._value[0],e]),t.rangeSelectionState="to"):(t.range=y([]),t.rangeSelectionState="none"):e<this._value[0]?(t.range=y([e]),t.rangeSelectionState="from"):(t.range=y([this._value[0],e]),t.rangeSelectionState="to");break}return this._adapter.emitHostEvent(r.events.DATE_SELECT,t,!0,!0)}_applyRangeSelection(e){switch(this._rangeSelectionState){case"none":case"to":this._deselectAllDates(),this._selectDate(e),this._adapter.setRange(null),this._adapter.setRangeStart(e),this._rangeSelectionState="from";break;case"from":b(e,this._value[0])?this._allowSingleDateRange?(this._value.push(e),this._rangeSelectionState="to"):(this._deselectDate(e),this._rangeSelectionState="none"):e<this._value[0]?(this._deselectDate(this._value[0]),this._selectDate(e),this._adapter.setRangeStart(e)):(this._selectDate(e),this._setRangePreview(e),this._rangeSelectionState="to");break}}_setRangePreview(e){switch(this._rangeSelectionState){case"from":if(!e)return;e<this._value[0]?this._adapter.setRange(null):(this._adapter.setRange(H(this._dates,this._value[0],e)),this._adapter.setRangeEnd(e));break;case"to":this._adapter.setRange(H(this._dates,this._value[0],this._value[1])),this._adapter.setRangeEnd(this._value[1]);break}}_clearRangePreview(){this._adapter.setRange(null),this._adapter.setRangeStart(null),this._adapter.setRangeEnd(null)}_selectDate(e){this._value.push(e),this._focusedDate=e,this._adapter.setDateSelected(e,!0)}_deselectDate(e){let t=this._value.findIndex(a=>b(a,e));t>-1&&this._value.splice(t,1),this._adapter.setDateSelected(e,!1)}_deselectAllDates(){this._value.forEach(e=>this._adapter.setDateSelected(e,!1)),this._clearRangePreview(),this._value=[]}_goToDate(e,t){let a=e.getFullYear(),i=e.getMonth();this._focusedDate=e,this._year!==a||this._month!==i?(this._month=i,this._setMonth(),this._year=a,this._setYear(),this._view!=="date"?this._closeMenu(!1,t):this._resetDateGrid()):this._view!=="date"&&this._closeMenu(!1,t),this._adapter.setActiveDate(e,t,this._preventFocus),this._emitFocusChangeEvent(this._focusedDate)}_goToNextMonth(){this._month<11?this._month+=1:(this._month=0,this._year+=1,this._setYear()),this._setMonth(),this._resetDateGrid()}_goToPreviousMonth(){this._month>0?this._month-=1:(this._month=11,this._year-=1,this._setYear()),this._setMonth(),this._resetDateGrid()}_goToNextYear(e=!1){this._view==="month"?(this._menuYear&&(this._menuYear+=1,this._setMenuYear()),this._adapter.animateIntoSelectionMenu(this._getMonthsForMenu(),this._rtl?"left":"right",e)):(this._year+=1,this._setYear(),this._resetDateGrid())}_goToPreviousYear(e=!1){this._view==="month"?(this._menuYear&&(this._menuYear-=1,this._setMenuYear()),this._adapter.animateIntoSelectionMenu(this._getMonthsForMenu(),this._rtl?"right":"left",e)):(this._year-=1,this._setYear(),this._resetDateGrid())}_goToNextSetOfYears(e=!1){this._menuIncludedYear+=r.numbers.YEARS_IN_VIEW,this._adapter.animateIntoSelectionMenu(this._getYearsForMenu(),this._rtl?"left":"right",e),this._setNavigationButtonStates()}_goToPreviousSetOfYears(e=!1){this._menuIncludedYear-=r.numbers.YEARS_IN_VIEW,this._adapter.animateIntoSelectionMenu(this._getYearsForMenu(),this._rtl?"right":"left",e),this._setNavigationButtonStates()}_canGoBackward(e){var t;if(!e&&!this._constrainToEnabled)return!0;switch(this._view){case"date":return!this._min||this._min<new Date(this._year,this._month,1);case"month":let a=(t=this._min)==null?void 0:t.getFullYear();return this._menuYear!=null&&(a==null||a<this._menuYear);case"year":return!!this._menuYearsInView&&this._minYear<this._menuYearsInView.min;default:return!1}}_canGoForward(e){var t;if(!e&&!this._constrainToEnabled)return!0;switch(this._view){case"date":return!this._max||this._max>he(this._month,this._year);case"month":let a=(t=this._max)==null?void 0:t.getFullYear();return this._menuYear!=null&&(a==null||a>this._menuYear);case"year":return!!this._menuYearsInView&&this._maxYear>this._menuYearsInView.max;default:return!1}}_setNavigationButtonStates(){if(!!this._showHeader){if(!this._constrainToEnabled){this._adapter.setPreviousButtonDisabled(!1),this._adapter.setNextButtonDisabled(!1);return}this._adapter.setPreviousButtonDisabled(!this._canGoBackward()),this._adapter.setNextButtonDisabled(!this._canGoForward())}}_setMonth(e){this._adapter.setMonth(this._month,this._locale),this._adapter.setHostAttribute(r.attributes.MONTH,this._month.toString()),this._isInitialized&&(this._setNavigationButtonStates(),this._adapter.emitHostEvent(r.events.MONTH_CHANGE,{month:this._month,userSelected:e!=null?e:!1,year:this._year}))}_setYear(e){this._adapter.setYear(this._year,this._locale),this._adapter.setHostAttribute(r.attributes.YEAR,this._year.toString()),this._isInitialized&&(this._setNavigationButtonStates(),this._adapter.emitHostEvent(r.events.MONTH_CHANGE,{month:this._month,userSelected:e!=null?e:!1,year:this._year}))}_setMenuYear(){this._menuYear!=null&&(this._setNavigationButtonStates(),this._adapter.setYear(this._menuYear,this._locale))}_applyAllowSingleDateRange(){this._adapter.toggleHostAttribute(r.attributes.ALLOW_SINGLE_DATE_RANGE,this._allowSingleDateRange),this._adapter.setContainerClass(r.classes.ALLOW_SINGLE_DATE_RANGE,this._allowSingleDateRange)}_applyClearButton(){this._adapter.toggleHostAttribute(r.attributes.CLEAR_BUTTON,!0,this._clearButton.toString()),this._clearButton?(this._adapter.setFooter(),this._adapter.setClearButton(),this._adapter.registerClearButtonListener(this._clearButtonListener)):(this._adapter.unregisterClearButtonListener(this._clearButtonListener),this._adapter.removeClearButton(),this._todayButton||this._adapter.removeFooter())}_applyConstrainToEnabled(){this._adapter.toggleHostAttribute(r.attributes.CONSTRAIN_TO_ENABLED,!0,this._constrainToEnabled.toString()),this._isInitialized&&this._setNavigationButtonStates()}_applyDateBuilder(){this._view==="date"&&(this._resetDateGrid(),this._resumeTabindexOnDate(!1))}_applyDayBuilder(){var e;this._adapter.setDays(N((e=this._firstDayOfWeek)!=null?e:this._localeFirstDayOfWeek),{builder:this._dayBuilder,locale:this._locale})}_applyDisabledDates(){switch(this._view){case"date":this._dates.forEach(e=>{let t=p(e,this._month,this._year),a=this._getDisabledDateParams(!t);this._adapter.setDateDisabled(e,h(e,a))});break;case"month":this._openMonthMenu();break;case"year":this._openYearMenu();break}this._setNavigationButtonStates()}_applyEvents(){this._view==="date"&&this._dates.forEach(e=>{this._setEventsOnDate(e)})}_applyFirstDayOfWeek(){var e,t;this._adapter.toggleHostAttribute(r.attributes.FIRST_DAY_OF_WEEK,A(this._firstDayOfWeek),((e=this._firstDayOfWeek)!=null?e:0).toString()),this._adapter.setDays(N((t=this._firstDayOfWeek)!=null?t:this._localeFirstDayOfWeek),{builder:this._dayBuilder,locale:this._locale}),this._isInitialized&&this._view==="date"&&(this._resetDateGrid(),this._resumeTabindexOnDate(!1))}_applyFixedHeight(){this._adapter.toggleHostAttribute(r.attributes.FIXED_HEIGHT,this._fixedHeight),this._adapter.setContainerClass(r.classes.FIXED_HEIGHT,this._fixedHeight)}_applyListYears(){this._adapter.toggleHostAttribute(r.attributes.LIST_YEARS,this._listYears),this._isInitialized&&this._view==="year"&&this._openYearMenu()}_applyLocale(){var e;if(this._adapter.toggleHostAttribute(r.attributes.LOCALE,!!this._locale,this._locale),this._adapter.toggleContainerAttribute(!!this._locale,"lang",this._locale),this._localeFirstDayOfWeek=De(this._locale),this._localeWeekendDays=we(this._locale),this._applyRtl(),this._isInitialized)switch(this._adapter.setMonth(this._month,this._locale),this._adapter.setYear(this._year,this._locale),this._view){case"date":this._adapter.setDays(N((e=this._firstDayOfWeek)!=null?e:this._localeFirstDayOfWeek),{builder:this._dayBuilder,locale:this._locale}),this._resetDateGrid(),this._resumeTabindexOnDate(!1);break;case"month":this._openMonthMenu();break;case"year":this._openYearMenu();break}}_applyMenuAnimation(){this._adapter.setHostAttribute(r.attributes.MENU_ANIMATION,this._menuAnimation),this._adapter.setMenuAnimation(this._menuAnimation)}_applyMin(){if(this._adapter.toggleHostAttribute(r.attributes.MIN,!!this._minAttribute,this._minAttribute),this._min&&this._min.getMonth()>this._month&&(this._month=this._min.getMonth()),this._isInitialized&&(this._applyDisabledDates(),this._min&&this._min>this._focusedDate)){let e=this._getFirstEnabledDate();e&&this._goToDate(e,!1)}}_applyMax(){if(this._adapter.toggleHostAttribute(r.attributes.MAX,!!this._maxAttribute,this._maxAttribute),this._max&&this._max.getMonth()<this._month&&(this._month=this._max.getMonth()),this._isInitialized&&(this._applyDisabledDates(),this._max&&this._max<this._focusedDate)){let e=this._getLastEnabledDate();e&&this._goToDate(e,!1)}}_applyMode(e){switch(this._mode){case"single":this._applySingleMode();break;case"multiple":this._applyMultipleMode(e==="range");break;case"range":this._applyRangeMode();break}this._mode!=="range"&&(this._rangeSelectionState="none",this._adapter.unregisterHoverListener(this._hoverListener),this._clearRangePreview())}_applySingleMode(){if(this._adapter.setHostAttribute(r.attributes.MODE,"single"),this._adapter.setMultiple(!1),this._value.length>1)for(let e=this._value.length-2;e>=0;e-=1)this._deselectDate(this._value[e])}_applyMultipleMode(e=!1){if(this._adapter.setHostAttribute(r.attributes.MODE,"multiple"),this._adapter.setMultiple(!0),e){let t=Ve(this._value,this._getDisabledDateParams());this._deselectAllDates(),t.forEach(a=>{this._selectDate(a)})}}_applyRangeMode(){var t,a;this._adapter.setHostAttribute(r.attributes.MODE,"range"),this._adapter.setMultiple(!1);let e=R(this._value);this._deselectAllDates(),e.forEach(i=>{this._selectDate(i)}),this._rangeSelectionState=this._value[0]?this._value[1]?"to":"from":"none",this._adapter.registerHoverListener(this._hoverListener),this._adapter.setRange(H(this._dates,this._value[0],this._value[1])),this._adapter.setRangeStart((t=this._value[0])!=null?t:null),this._adapter.setRangeEnd((a=this._value[1])!=null?a:null)}_applyMonth(){this._setMonth(),this._isInitialized&&this._view==="date"&&(this._resetDateGrid(),this._moveFocusToFirstOfMonth(!1))}_applyPreventFocus(){this._adapter.toggleHostAttribute(r.attributes.PREVENT_FOCUS,this._preventFocus),this._adapter.setContainerClass(r.classes.PREVENT_FOCUS,this._preventFocus),this._adapter.setPreventFocusOnMenu(this._preventFocus),this._preventFocus?this._adapter.registerPreventFocusListener(this._preventFocusListener):this._adapter.unregisterPreventFocusListener(this._preventFocusListener),this._isInitialized&&this._view==="date"&&this._resumeTabindexOnDate(!1)}_applyReadOnly(){this._adapter.toggleHostAttribute(r.attributes.READONLY,this._readonly),this._adapter.toggleHostAttribute("aria-readonly",this._readonly,"true"),this._adapter.setContainerClass(r.classes.READONLY,this._readonly),this._readonly?(this._adapter.unregisterDateClickListener(this._dateClickListener),this._adapter.unregisterHoverListener(this._hoverListener)):(this._adapter.registerDateClickListener(this._dateClickListener),this._mode==="range"&&this._adapter.registerHoverListener(this._hoverListener))}_applyRtl(){this._rtl=Ee(this._locale),this._adapter.setContainerClass(r.classes.RTL,this._rtl),this._adapter.toggleContainerAttribute(this._rtl,"dir","rtl")}_applySelectionFollowsMonth(){this._adapter.setHostAttribute(r.attributes.SELECTION_FOLLOWS_MONTH,this._selectionFollowsMonth.toString())}_applyShowHeader(){this._adapter.toggleHostAttribute(r.attributes.SHOW_HEADER,this._showHeader,this._showHeader.toString()),this._showHeader?(this._adapter.setHeader(),this._adapter.registerMonthButtonListener(this._monthButtonListener),this._adapter.registerNextButtonListener(this._nextButtonListener),this._adapter.registerPreviousButtonListener(this._previousButtonListener),this._adapter.registerYearButtonListener(this._yearButtonListener),this._setNavButtonLabels()):(this._adapter.unregisterMonthButtonListener(this._monthButtonListener),this._adapter.unregisterNextButtonListener(this._nextButtonListener),this._adapter.unregisterPreviousButtonListener(this._previousButtonListener),this._adapter.unregisterYearButtonListener(this._yearButtonListener),this._adapter.removeHeader()),this._isInitialized&&(this._adapter.setMonth(this._month,this._locale),this._adapter.setYear(this._year,this._locale),this._setNavigationButtonStates())}_applyShowOtherMonths(){if(this._adapter.toggleHostAttribute(r.attributes.SHOW_OTHER_MONTHS,this._showOtherMonths),this._isInitialized&&this._view==="date"){let e=!1;this._dates.forEach((t,a)=>{p(t,this._month,this._year)||((a===r.numbers.PENULTIMATE_WEEK_BEGIN_INDEX||a===r.numbers.FINAL_WEEK_BEGIN_INDEX)&&(e=!0),this._showOtherMonths&&!e?this._adapter.replaceDate(this._getDateConfig(t),{builder:this._dateBuilder,locale:this._locale}):this._adapter.replaceDateWithSpacer(t),this._setEventsOnDate(t),this._applyWeekendDays())})}}_applyShowToday(){this._adapter.toggleHostAttribute(r.attributes.SHOW_TODAY,this._showToday),this._adapter.setContainerClass(r.classes.SHOW_TODAY,this._showToday)}_applyTodayButton(){this._adapter.toggleHostAttribute(r.attributes.TODAY_BUTTON,!0,this._todayButton.toString()),this._todayButton?(this._adapter.setFooter(),this._adapter.setTodayButton(),this._adapter.registerTodayButtonListener(this._todayButtonListener)):(this._adapter.unregisterTodayButtonListener(this._todayButtonListener),this._adapter.removeTodayButton(),this._clearButton||this._adapter.removeFooter())}_applyTooltipBuilder(){this._view==="date"&&this._dates.forEach(e=>{var i;if(!this._showOtherMonths&&!p(e,this._month,this._year))return;let t=W(e,this._events,this._eventBuilder),a=K(t);this._tooltipBuilder&&(a=(i=this._tooltipBuilder(this._getCalendarDate(e),a))!=null?i:""),this._adapter.setDateTooltip(e,a)})}_applyWeekendDays(){var t;let e=(t=this._weekendDays)!=null?t:this._localeWeekendDays;this._view==="date"&&this._dates.forEach(a=>{let i=a.getDay();this._adapter.setWeekend(a,(this._showOtherMonths||p(a,this._month,this._year))&&e.includes(i))})}_applyValue(e){e=e.map(t=>new Date(t)),Y(e),this._deselectAllDates(),e.forEach(t=>this._selectDate(t)),this._mode==="range"&&(this._rangeSelectionState=this._value.length===2?"to":this._value.length===1?"from":"none",this._clearRangePreview(),this._adapter.setRangeStart(this._value[0]),this._setRangePreview())}_applyView(){switch(this._adapter.setHostAttribute(r.attributes.VIEW,this._view),this._view){case"date":this._closeMenu();break;case"month":this._openMonthMenu();break;case"year":this._openYearMenu();break}}_applyYear(){this._setYear(),this._isInitialized&&this._view==="date"&&(this._resetDateGrid(),this._moveFocusToFirstOfMonth(!1))}_applyYearRange(){this._adapter.setHostAttribute(r.attributes.YEAR_RANGE,this._yearRange);let e=ze(this._yearRange);this._minYear=e.min,this._maxYear=e.max,this._view==="year"&&(this._openYearMenu(),this._setNavigationButtonStates())}get activeDate(){return new Date(this._focusedDate)}get allowSingleDateRange(){return this._allowSingleDateRange}set allowSingleDateRange(e){this._allowSingleDateRange!==e&&(this._allowSingleDateRange=e,this._applyAllowSingleDateRange())}get clearButton(){return this._clearButton}set clearButton(e){this._clearButton!==e&&(this._clearButton=e,this._isInitialized&&this._applyClearButton())}get clearCallback(){return this._clearCallback}set clearCallback(e){this._clearCallback=e}get constrainToEnabled(){return this._constrainToEnabled}set constrainToEnabled(e){this._constrainToEnabled!==e&&(this._constrainToEnabled=e,this._isInitialized&&this._applyConstrainToEnabled())}get dateBuilder(){return this._dateBuilder}set dateBuilder(e){this._dateBuilder=e,this._isInitialized&&this._applyDateBuilder()}get dateSelectCallback(){return this._dateSelectCallback}set dateSelectCallback(e){this._dateSelectCallback=e}get dayBuilder(){return this.dayBuilder}set dayBuilder(e){this._dayBuilder=e,this._isInitialized&&this._applyDayBuilder()}get disabledDateBuilder(){return this._disabledDateBuilder}set disabledDateBuilder(e){this._disabledDateBuilder=e,this._isInitialized&&this._applyDisabledDates()}get disabledDates(){let e=this._disabledDates.map(t=>new Date(t));return e.length?e:null}set disabledDates(e){let t=e?C(e)?e:[e]:[];this._disabledDates=t.map(a=>{let i=new Date(a);return i.setHours(0,0,0,0),i}),this._isInitialized&&this._applyDisabledDates()}get disabledDaysOfWeek(){return this._disabledDaysOfWeek.length?[...this._disabledDaysOfWeek]:null}set disabledDaysOfWeek(e){this._disabledDaysOfWeek=A(e)?C(e)?e:[e]:[],this._isInitialized&&this._applyDisabledDates()}get eventBuilder(){return this._eventBuilder}set eventBuilder(e){this._eventBuilder=e,this._isInitialized&&this._applyEvents()}get events(){return this._events?[...this._events]:null}set events(e){this._events=e!=null&&e.length?[...e]:[],this._isInitialized&&this._applyEvents()}get firstDayOfWeek(){return this._firstDayOfWeek}set firstDayOfWeek(e){this._firstDayOfWeek!==e&&(this._firstDayOfWeek=A(e)?+e:e,this._isInitialized&&this._applyFirstDayOfWeek())}get fixedHeight(){return this._fixedHeight}set fixedHeight(e){this._fixedHeight!==e&&(this._fixedHeight=e,this._isInitialized&&this._applyFixedHeight())}get listYears(){return this._listYears}set listYears(e){this._listYears!==e&&(this._listYears=e,this._applyListYears())}get locale(){return this._locale}set locale(e){typeof e=="string"&&!e.length&&(e=void 0),this._locale!==e&&(this._locale=e,this._isInitialized&&this._applyLocale())}get max(){return this._max}set max(e){var t;this._maxAttribute!==e&&(this._maxAttribute=(t=e==null?void 0:e.toString())!=null?t:null,this._max=$(e),this._applyMax())}get menuAnimation(){return this._menuAnimation}set menuAnimation(e){this._menuAnimation!==e&&(this._menuAnimation=e,this._isInitialized&&this._applyMenuAnimation())}get min(){return this._min}set min(e){var t;this._minAttribute!==e&&(this._minAttribute=(t=e==null?void 0:e.toString())!=null?t:null,this._min=$(e),this._applyMin())}get mode(){return this._mode}set mode(e){if(this._mode!==e){let t=this._mode;this._mode=e,this._isInitialized&&this._applyMode(t)}}get month(){return this._month}set month(e){if(this._month!==e){let t=isNaN(+e)?this._month:+e;if(this._month===t)return;this._month=+e,this._isInitialized&&this._applyMonth()}}get preventFocus(){return this._preventFocus}set preventFocus(e){this._preventFocus!==e&&(this._preventFocus=e,this._isInitialized&&this._applyPreventFocus())}get readonly(){return this._readonly}set readonly(e){this._readonly!==e&&(this._readonly=e,this._isInitialized&&this._applyReadOnly())}get selectionFollowsMonth(){return this._selectionFollowsMonth}set selectionFollowsMonth(e){this._selectionFollowsMonth!==e&&(this._selectionFollowsMonth=e,this._isInitialized&&this._applySelectionFollowsMonth())}get showHeader(){return this._showHeader}set showHeader(e){this._showHeader!==e&&(this._showHeader=e,this._isInitialized&&this._applyShowHeader())}get showOtherMonths(){return this._showOtherMonths}set showOtherMonths(e){this._showOtherMonths!==e&&(this._showOtherMonths=e,this._isInitialized&&this._applyShowOtherMonths())}get showToday(){return this._showToday}set showToday(e){this._showToday!==e&&(this._showToday=e,this._isInitialized&&this._applyShowToday())}get todayButton(){return this._todayButton}set todayButton(e){this._todayButton!==e&&(this._todayButton=e,this._isInitialized&&this._applyTodayButton())}get todayCallback(){return this._todayCallback}set todayCallback(e){this._todayCallback=e}get tooltipBuilder(){return this._tooltipBuilder}set tooltipBuilder(e){this._tooltipBuilder=e,this._isInitialized&&this._applyTooltipBuilder()}get value(){var t;if(this._mode==="range")return(t=this._rangeSelectionStore)!=null?t:y(this._value);let e=this._value.map(a=>new Date(a));return this._mode==="multiple"?e:e.length?e[0]:null}set value(e){let t=[];if(this._rangeSelectionStore=void 0,!e||Array.isArray(e)&&!e.length)this._value=[];else if(Array.isArray(e))switch(this._mode){case"single":t=[e[0]];break;case"multiple":t=e;break;case"range":let a=R(e);t.push(a[0]),a.length>1&&t.push(a[1]);break}else B(new Date(e))?t=[e]:(this._rangeSelectionStore=new E(e),t=Pe(e));this._applyValue(t)}get view(){return this._view}set view(e){this._view!==e&&(this._view=e,this._applyView())}get weekendDays(){return this._weekendDays?[...this._weekendDays]:null}set weekendDays(e){var t;this._weekendDays=(t=e==null?void 0:e.map(a=>+a))!=null?t:null,this._isInitialized&&this._applyWeekendDays()}get year(){return this._year}set year(e){if(this._year!==e){let t=isNaN(+e)?this._year:+e;if(this._year===t)return;this._year=t,this._isInitialized&&this._applyYear()}}get yearRange(){return this._yearRange}set yearRange(e){this._yearRange!==e&&(this._yearRange=e,this._isInitialized&&this._applyYearRange())}clear(){this._deselectAllDates(),this._clearCallback&&this._clearCallback()}deselectDate(e,t){this._onDateSelected(e,!1),t&&(this._focusedDate=e,this._resumeTabindexOnDate(!0))}goToDate(e,t){this._goToDate(e,t!=null?t:!1)}handleExternalKeyEvent(e){this._onKeydown(e)}layout(){this._applyFirstDayOfWeek(),this._createDateView(),this._applyShowHeader(),this._applyConstrainToEnabled()}selectDate(e,t){this._onDateSelected(e,!0),t&&(this._focusedDate=e,this._resumeTabindexOnDate(!0))}setActiveDate(e,t){return this._dates.some(a=>b(a,e)&&(this._showOtherMonths||p(a,this._month,this._year)))?(this._goToDate(e,t!=null?t:!1),!0):!1}today(){let e=new Date;e.setHours(0,0,0,0),this._goToDate(e,!0),this._todayCallback&&this._todayCallback()}toggleDate(e,t){this._onDateSelected(e)}};var Qe='<template><div class="forge-calendar" part="root"><div id="view" class="forge-calendar__view" part="view"><div id="date-view" class="forge-calendar__date-view" role="grid" part="date-view"><div role="rowgroup" part="date-view-container"><div id="day-row" class="forge-calendar__date-view__row" role="row" part="date-view-row"></div></div><div id="date-grid" class="forge-calendar__date-grid" role="rowgroup" part="date-grid-container"></div></div><forge-calendar-menu id="menu" part="calendar-menu"></forge-calendar-menu></div></div></template>',et='.mdc-elevation-overlay{position:absolute;border-radius:inherit;pointer-events:none;opacity:0;opacity:var(--mdc-elevation-overlay-opacity, 0);-webkit-transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);transition:opacity 280ms cubic-bezier(.4, 0, .2, 1);background-color:#fff;background-color:var(--mdc-elevation-overlay-color,#fff)}.forge-button{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-button-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-button-font-size, .875rem);line-height:2.25rem;line-height:var(--mdc-typography-button-line-height, 2.25rem);font-weight:500;font-weight:var(--mdc-typography-button-font-weight,500);letter-spacing:.0892857143em;letter-spacing:var(--mdc-typography-button-letter-spacing, .0892857143em);text-decoration:none;-webkit-text-decoration:var(--mdc-typography-button-text-decoration,none);text-decoration:var(--mdc-typography-button-text-decoration,none);text-transform:uppercase;text-transform:var(--mdc-typography-button-text-transform,uppercase);position:relative;display:-webkit-inline-box;display:inline-flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;min-width:64px;border:none;outline:0;line-height:inherit;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;overflow:visible;vertical-align:middle}.forge-button .mdc-elevation-overlay{width:100%;height:100%;top:0;left:0}.forge-button::-moz-focus-inner{padding:0;border:0}.forge-button:active{outline:0}.forge-button:hover{cursor:pointer}.forge-button:disabled{cursor:default;pointer-events:none}.forge-button .forge-button__icon{margin-left:0;margin-right:8px;display:inline-block;font-size:1.125rem;height:1.125rem;vertical-align:top;width:1.125rem}.forge-button .forge-button__icon[dir=rtl],[dir=rtl] .forge-button .forge-button__icon{margin-left:8px;margin-right:0}.forge-button__label~.forge-button__icon{margin-left:8px;margin-right:0}.forge-button__label~.forge-button__icon[dir=rtl],[dir=rtl] .forge-button__label~.forge-button__icon{margin-left:0;margin-right:8px}svg.forge-button__icon{fill:currentColor}.forge-button--outlined .forge-button__icon,.forge-button--raised .forge-button__icon,.forge-button--unelevated .forge-button__icon{margin-left:-4px;margin-right:8px}.forge-button--outlined .forge-button__icon[dir=rtl],.forge-button--raised .forge-button__icon[dir=rtl],.forge-button--unelevated .forge-button__icon[dir=rtl],[dir=rtl] .forge-button--outlined .forge-button__icon,[dir=rtl] .forge-button--raised .forge-button__icon,[dir=rtl] .forge-button--unelevated .forge-button__icon{margin-left:8px;margin-right:-4px}.forge-button--outlined .forge-button__label~.forge-button__icon,.forge-button--raised .forge-button__label~.forge-button__icon,.forge-button--unelevated .forge-button__label~.forge-button__icon{margin-left:8px;margin-right:-4px}.forge-button--outlined .forge-button__label~.forge-button__icon[dir=rtl],.forge-button--raised .forge-button__label~.forge-button__icon[dir=rtl],.forge-button--unelevated .forge-button__label~.forge-button__icon[dir=rtl],[dir=rtl] .forge-button--outlined .forge-button__label~.forge-button__icon,[dir=rtl] .forge-button--raised .forge-button__label~.forge-button__icon,[dir=rtl] .forge-button--unelevated .forge-button__label~.forge-button__icon{margin-left:-4px;margin-right:8px}@-webkit-keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@keyframes mdc-ripple-fg-radius-in{from{-webkit-animation-timing-function:cubic-bezier(0.4,0,0.2,1);animation-timing-function:cubic-bezier(0.4,0,0.2,1);-webkit-transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1);transform:translate(var(--mdc-ripple-fg-translate-start,0)) scale(1)}to{-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}}@-webkit-keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@keyframes mdc-ripple-fg-opacity-in{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:0}to{opacity:var(--mdc-ripple-fg-opacity, 0)}}@-webkit-keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}@keyframes mdc-ripple-fg-opacity-out{from{-webkit-animation-timing-function:linear;animation-timing-function:linear;opacity:var(--mdc-ripple-fg-opacity, 0)}to{opacity:0}}.forge-button{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.forge-button .forge-button__ripple::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-button .forge-button__ripple::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-button.mdc-ripple-upgraded .forge-button__ripple::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-button.mdc-ripple-upgraded .forge-button__ripple::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-button.mdc-ripple-upgraded--unbounded .forge-button__ripple::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-button.mdc-ripple-upgraded--foreground-activation .forge-button__ripple::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-button.mdc-ripple-upgraded--foreground-deactivation .forge-button__ripple::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{top:calc(50% - 100%);left:calc(50% - 100%);width:200%;height:200%}.forge-button.mdc-ripple-upgraded .forge-button__ripple::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-button .forge-button__ripple{position:absolute;-webkit-box-sizing:content-box;box-sizing:content-box;width:100%;height:100%;overflow:hidden}.forge-button:not(.forge-button--outlined) .forge-button__ripple{top:0;left:0}.forge-button--raised{-webkit-box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);box-shadow:0 3px 1px -2px rgba(0,0,0,.2),0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12);-webkit-transition:-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1);transition:box-shadow 280ms cubic-bezier(.4, 0, .2, 1),-webkit-box-shadow 280ms cubic-bezier(.4, 0, .2, 1)}.forge-button--raised:focus,.forge-button--raised:hover{-webkit-box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12);box-shadow:0 2px 4px -1px rgba(0,0,0,.2),0 4px 5px 0 rgba(0,0,0,.14),0 1px 10px 0 rgba(0,0,0,.12)}.forge-button--raised:active{-webkit-box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12);box-shadow:0 5px 5px -3px rgba(0,0,0,.2),0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12)}.forge-button--raised:disabled{-webkit-box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12);box-shadow:0 0 0 0 rgba(0,0,0,.2),0 0 0 0 rgba(0,0,0,.14),0 0 0 0 rgba(0,0,0,.12)}.forge-button--outlined{border-style:solid}.forge-button{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px);padding:0 8px 0 8px}.forge-button:not(:disabled){background-color:transparent}.forge-button:disabled{background-color:transparent}.forge-button:not(:disabled){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-button:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button .forge-button__ripple::after,.forge-button .forge-button__ripple::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-button.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button:hover .forge-button__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-button.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-button:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-button .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--unelevated{padding:0 16px 0 16px;height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--unelevated:not(:disabled){background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5)}.forge-button--unelevated:disabled{background-color:rgba(0,0,0,.12);background-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-button--unelevated:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-button--unelevated:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--unelevated .forge-button__ripple::after,.forge-button--unelevated .forge-button__ripple::before{background-color:#fff;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-primary,#fff))}.forge-button--unelevated.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--unelevated:hover .forge-button__ripple::before{opacity:.08;opacity:var(--mdc-ripple-hover-opacity, .08)}.forge-button--unelevated.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--unelevated:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-button--unelevated:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--unelevated:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-button--unelevated.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-button--unelevated .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--raised{padding:0 16px 0 16px;height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--raised:not(:disabled){background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5)}.forge-button--raised:disabled{background-color:rgba(0,0,0,.12);background-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-button--raised:not(:disabled){color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-button--raised:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--raised .forge-button__ripple::after,.forge-button--raised .forge-button__ripple::before{background-color:#fff;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-primary,#fff))}.forge-button--raised.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--raised:hover .forge-button__ripple::before{opacity:.08;opacity:var(--mdc-ripple-hover-opacity, .08)}.forge-button--raised.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--raised:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-focus-opacity, .24)}.forge-button--raised:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--raised:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.24;opacity:var(--mdc-ripple-press-opacity, .24)}.forge-button--raised.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.24)}.forge-button--raised .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--outlined{height:36px;border-radius:4px;border-radius:var(--mdc-shape-small,4px);padding:0 15px 0 15px;border-width:1px}.forge-button--outlined:not(:disabled){background-color:transparent}.forge-button--outlined:disabled{background-color:transparent}.forge-button--outlined:not(:disabled){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-button--outlined:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-button--outlined .forge-button__ripple::after,.forge-button--outlined .forge-button__ripple::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-button--outlined.mdc-ripple-surface--hover .forge-button__ripple::before,.forge-button--outlined:hover .forge-button__ripple::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-button--outlined.mdc-ripple-upgraded--background-focused .forge-button__ripple::before,.forge-button--outlined:not(.mdc-ripple-upgraded):focus .forge-button__ripple::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-button--outlined:not(.mdc-ripple-upgraded) .forge-button__ripple::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-button--outlined:not(.mdc-ripple-upgraded):active .forge-button__ripple::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-button--outlined.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-button--outlined .forge-button__ripple{border-radius:4px;border-radius:var(--mdc-shape-small,4px)}.forge-button--outlined:not(:disabled){border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5)}.forge-button--outlined:disabled{border-color:rgba(0,0,0,.12);border-color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-button--outlined .forge-button__ripple{top:-1px;left:-1px;border:1px solid transparent}.forge-button--dense{height:24px;margin-top:0;margin-bottom:0;height:1.5rem}forge-button{display:inline-block}forge-button[hidden]{display:none}forge-button[disabled]{cursor:not-allowed}a.forge-hyperlink{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);text-decoration:none}a.forge-hyperlink:visited{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}a.forge-hyperlink[disabled]{pointer-events:none;cursor:default}a.forge-hyperlink:focus,a.forge-hyperlink:hover:not([disabled]){text-decoration:underline}button.forge-hyperlink{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);cursor:pointer;border:none;background-color:transparent;font-size:inherit;padding:0;outline:0;text-align:left}button.forge-hyperlink[disabled]{pointer-events:none;cursor:default}button.forge-hyperlink:hover:not([disabled]){text-decoration:underline}.forge-icon-button{display:-webkit-inline-box;display:inline-flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;border:none;outline:0;background-color:transparent;fill:currentColor;color:inherit;font-size:24px;text-decoration:none;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;width:48px;height:48px;padding:12px}.forge-icon-button forge-icon,.forge-icon-button img,.forge-icon-button svg{width:24px;height:24px}.forge-icon-button:disabled{color:rgba(0,0,0,.38);color:var(--mdc-theme-text-disabled-on-light,rgba(0,0,0,.38))}.forge-icon-button:disabled{cursor:default;pointer-events:none}.forge-icon-button__icon{display:inline-block}.forge-icon-button__icon.forge-icon-button__icon--on{display:none}.forge-icon-button--on .forge-icon-button__icon{display:none}.forge-icon-button--on .forge-icon-button__icon.forge-icon-button__icon--on{display:inline-block}.forge-icon-button{--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;will-change:transform,opacity}.forge-icon-button::after,.forge-icon-button::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.forge-icon-button::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-icon-button::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-icon-button.mdc-ripple-upgraded::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-icon-button.mdc-ripple-upgraded::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-icon-button.mdc-ripple-upgraded--unbounded::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-icon-button.mdc-ripple-upgraded--foreground-activation::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-icon-button.mdc-ripple-upgraded--foreground-deactivation::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-icon-button::after,.forge-icon-button::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.forge-icon-button.mdc-ripple-upgraded::after,.forge-icon-button.mdc-ripple-upgraded::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-icon-button.mdc-ripple-upgraded::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-icon-button::after,.forge-icon-button::before{background-color:#000;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-surface,#000))}.forge-icon-button.mdc-ripple-surface--hover::before,.forge-icon-button:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-icon-button.mdc-ripple-upgraded--background-focused::before,.forge-icon-button:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-icon-button:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-icon-button:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-icon-button.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}forge-icon-button{position:relative;display:inline-block;overflow:visible}.forge-icon-button--on{color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5)}.forge-icon-button--on::after,.forge-icon-button--on::before{background-color:#3f51b5;background-color:var(--mdc-ripple-color,var(--mdc-theme-primary,#3f51b5))}.forge-icon-button--on.mdc-ripple-surface--hover::before,.forge-icon-button--on:hover::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-icon-button--on.mdc-ripple-upgraded--background-focused::before,.forge-icon-button--on:not(.mdc-ripple-upgraded):focus::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-icon-button--on:not(.mdc-ripple-upgraded)::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-icon-button--on:not(.mdc-ripple-upgraded):active::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-icon-button--on.mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-icon-button--on::before{background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5);opacity:.08}.forge-icon-button--dense{width:28px;height:28px;padding:2px;padding:0}.forge-icon-button--dense-1{width:44px;height:44px;padding:10px}.forge-icon-button--dense-2{width:40px;height:40px;padding:8px}.forge-icon-button--dense-3{width:36px;height:36px;padding:6px}.forge-icon-button--dense-4{width:32px;height:32px;padding:4px}.forge-icon-button--dense-5{width:28px;height:28px;padding:2px}.forge-icon-button--dense-6{width:24px;height:24px;padding:0}.forge-icon-button--with-badge forge-badge{z-index:1;z-index:var(--forge-z-index-surface,1);pointer-events:none;--forge-badge-max-width:32px;--forge-badge-border:1px solid transparent}.forge-icon-button--with-badge forge-badge[app-bar-context]{--forge-badge-border:2px solid var(--forge-app-bar-theme-background)}.forge-calendar{width:100%;width:var(--forge-calendar-width,100%);height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;position:relative}.forge-calendar__header{padding:0;padding:var(--forge-calendar-controls-padding,0);display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:justify;justify-content:space-between}.forge-calendar__footer{padding:0;padding:var(--forge-calendar-controls-padding,0);display:-webkit-box;display:flex;-webkit-box-align:center;align-items:center;-webkit-box-pack:justify;justify-content:space-between}.forge-calendar__view{position:relative}.forge-calendar__date-view{display:block}.forge-calendar__date-view__row{display:grid;grid-template-columns:repeat(7,1fr)}.forge-calendar__date-grid{display:grid}.forge-calendar__day{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-caption-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.75rem;font-size:var(--mdc-typography-caption-font-size, .75rem);line-height:1.25rem;line-height:var(--mdc-typography-caption-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-caption-font-weight,400);letter-spacing:.0333333333em;letter-spacing:var(--mdc-typography-caption-letter-spacing, .0333333333em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-decoration:var(--mdc-typography-caption-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-caption-text-transform,inherit);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;min-width:0;padding:0;font-weight:700;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.forge-calendar__day::after{float:left;padding-top:100%;content:""}.forge-calendar__date{margin-top:2px;margin-top:var(--forge-calendar-row-gap,2px);min-width:0;padding:0;border-radius:50%;position:relative;outline:0;cursor:default;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.forge-calendar__date::after{float:left;padding-top:100%;content:""}.forge-calendar__date .mdc-ripple-surface{border-radius:inherit}.forge-calendar__date .mdc-ripple-surface::after,.forge-calendar__date .mdc-ripple-surface::before{position:absolute;width:calc(100% - 2px)!important;height:calc(100% - 2px)!important;top:calc(2px / 2)!important;left:calc(2px / 2)!important;border-radius:inherit!important}.forge-calendar__date__inner{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:Roboto,sans-serif;font-family:var(--mdc-typography-body2-font-family, var(--mdc-typography-font-family, Roboto, sans-serif));font-size:.875rem;font-size:var(--mdc-typography-body2-font-size, .875rem);line-height:1.25rem;line-height:var(--mdc-typography-body2-line-height, 1.25rem);font-weight:400;font-weight:var(--mdc-typography-body2-font-weight,400);letter-spacing:.0178571429em;letter-spacing:var(--mdc-typography-body2-letter-spacing, .0178571429em);text-decoration:inherit;-webkit-text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-decoration:var(--mdc-typography-body2-text-decoration,inherit);text-transform:inherit;text-transform:var(--mdc-typography-body2-text-transform,inherit);position:absolute;width:calc(100% - 2px);height:calc(100% - 2px);top:calc(2px / 2);left:calc(2px / 2);display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;-webkit-box-align:center;align-items:center;border-radius:inherit;-webkit-box-sizing:border-box;box-sizing:border-box}.forge-calendar--show-today .forge-calendar__date--today:not([disabled]){color:#3f51b5;color:var(--mdc-theme-primary,#3f51b5);border-color:#3f51b5;border-color:var(--mdc-theme-primary,#3f51b5)}.forge-calendar--show-today .forge-calendar__date--today .forge-calendar__date__inner{border-color:inherit;border-width:1px;border-style:solid;font-weight:700}.forge-calendar--show-today .forge-calendar__date--today.forge-calendar__date--selected{color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]){--mdc-ripple-fg-size:0;--mdc-ripple-left:0;--mdc-ripple-top:0;--mdc-ripple-fg-scale:1;--mdc-ripple-fg-translate-end:0;--mdc-ripple-fg-translate-start:0;-webkit-tap-highlight-color:transparent;cursor:pointer}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::after,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::before{position:absolute;border-radius:50%;opacity:0;pointer-events:none;content:""}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::before{-webkit-transition:opacity 15ms linear,background-color 15ms linear;transition:opacity 15ms linear,background-color 15ms linear;z-index:1;z-index:var(--mdc-ripple-z-index,1)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::after{z-index:0;z-index:var(--mdc-ripple-z-index,0)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded .mdc-ripple-surface::before{-webkit-transform:scale(var(--mdc-ripple-fg-scale,1));transform:scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded .mdc-ripple-surface::after{top:0;left:0;-webkit-transform:scale(0);transform:scale(0);-webkit-transform-origin:center center;transform-origin:center center}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded--unbounded .mdc-ripple-surface::after{top:var(--mdc-ripple-top,0);left:var(--mdc-ripple-left,0)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded--foreground-activation .mdc-ripple-surface::after{-webkit-animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards;animation:mdc-ripple-fg-radius-in 225ms forwards,mdc-ripple-fg-opacity-in 75ms forwards}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded--foreground-deactivation .mdc-ripple-surface::after{-webkit-animation:mdc-ripple-fg-opacity-out 150ms;animation:mdc-ripple-fg-opacity-out 150ms;-webkit-transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1));transform:translate(var(--mdc-ripple-fg-translate-end,0)) scale(var(--mdc-ripple-fg-scale,1))}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::after,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::before{top:calc(50% - 50%);left:calc(50% - 50%);width:100%;height:100%}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded .mdc-ripple-surface::after,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded .mdc-ripple-surface::before{top:var(--mdc-ripple-top,calc(50% - 50%));left:var(--mdc-ripple-left,calc(50% - 50%));width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded .mdc-ripple-surface::after{width:var(--mdc-ripple-fg-size,100%);height:var(--mdc-ripple-fg-size,100%)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::after,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]) .mdc-ripple-surface::before{background-color:#000;background-color:var(--mdc-ripple-color,var(--mdc-theme-on-surface,#000))}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-surface--hover .mdc-ripple-surface::before,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]):hover .mdc-ripple-surface::before{opacity:.04;opacity:var(--mdc-ripple-hover-opacity, .04)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded--background-focused .mdc-ripple-surface::before,.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]):not(.mdc-ripple-upgraded):focus .mdc-ripple-surface::before{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-focus-opacity, .12)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]):not(.mdc-ripple-upgraded) .mdc-ripple-surface::after{-webkit-transition:opacity 150ms linear;transition:opacity 150ms linear}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]):not(.mdc-ripple-upgraded):active .mdc-ripple-surface::after{-webkit-transition-duration:75ms;transition-duration:75ms;opacity:.12;opacity:var(--mdc-ripple-press-opacity, .12)}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date:not([disabled]).mdc-ripple-upgraded{--mdc-ripple-fg-opacity:var(--mdc-ripple-press-opacity, 0.12)}.forge-calendar__date--selected:not([disabled]) .forge-calendar__date__inner{background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5);color:#fff;color:var(--mdc-theme-on-primary,#fff)}.forge-calendar__date--selected[disabled] .forge-calendar__date__inner{background-color:#f5f5f5;background-color:var(--forge-theme-form-field-disabled-on-background,#f5f5f5);color:rgba(0,0,0,.12);color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-calendar:not(.forge-calendar--readonly) .forge-calendar__date--selected:hover .forge-calendar__date__inner{opacity:.87}.forge-calendar__date--selected.mdc-ripple-upgraded--background-focused .forge-calendar__date__inner,.forge-calendar__date--selected:focus .forge-calendar__date__inner{opacity:.54}.forge-calendar__date[disabled]{color:rgba(0,0,0,.12);color:var(--mdc-theme-text-disabled-on-background,rgba(0,0,0,.12))}.forge-calendar__date-spacer{pointer-events:none}.forge-calendar--fixed-height .forge-calendar__date-spacer{margin-top:2px;margin-top:var(--forge-calendar-row-gap,2px)}.forge-calendar--fixed-height .forge-calendar__date-spacer::after{float:left;padding-top:100%;content:""}.forge-calendar__range:not(.forge-calendar__date-spacer) .forge-calendar__range__target{background-color:#3f51b5;background-color:var(--mdc-theme-primary,#3f51b5);position:absolute;width:100%;height:100%;opacity:.14;border-radius:0}.forge-calendar__range:not(.forge-calendar__date-spacer).forge-calendar__range--start .forge-calendar__range__target{border-top-left-radius:50%;border-bottom-left-radius:50%}.forge-calendar__range:not(.forge-calendar__date-spacer).forge-calendar__range--end .forge-calendar__range__target{border-top-right-radius:50%;border-bottom-right-radius:50%}.forge-calendar__range:not(.forge-calendar__range--start):first-of-type .forge-calendar__range__target{border-top-left-radius:4px;border-bottom-left-radius:4px}.forge-calendar__range:not(.forge-calendar__range--end):last-of-type .forge-calendar__range__target{border-top-right-radius:4px;border-bottom-right-radius:4px}.forge-calendar--allow-single-date-range .forge-calendar__range--start.forge-calendar__range--end .forge-calendar__range__target{-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s;-webkit-transform:scale(1.15);transform:scale(1.15);-webkit-transform-origin:center;transform-origin:center}.forge-calendar__event{font-size:12px;font-size:var(--forge-calendar-event-dot-size, 12px)}.forge-calendar__event[data-event-theme=primary]{color:#3f51b5;color:var(--forge-calendar-theme-event-primary-accent,#3f51b5)}.forge-calendar__event[data-event-theme=secondary]{color:#ffc107;color:var(--forge-calendar-theme-event-secondary-accent,#ffc107)}.forge-calendar__event[data-event-theme=blue]{color:#2196f3;color:var(--forge-calendar-theme-event-blue-accent,#2196f3)}.forge-calendar__event[data-event-theme=light-green]{color:#8bc34a;color:var(--forge-calendar-theme-event-light-green-accent,#8bc34a)}.forge-calendar__event[data-event-theme=cyan]{color:#00bcd4;color:var(--forge-calendar-theme-event-cyan-accent,#00bcd4)}.forge-calendar__event[data-event-theme=teal]{color:#009688;color:var(--forge-calendar-theme-event-teal-accent,#009688)}.forge-calendar__event[data-event-theme=orange]{color:#ff9800;color:var(--forge-calendar-theme-event-orange-accent,#ff9800)}.forge-calendar__event[data-event-theme=blue-grey]{color:#607d8b;color:var(--forge-calendar-theme-event-blue-grey-accent,#607d8b)}.forge-calendar__event[data-event-theme=grey]{color:#9e9e9e;color:var(--forge-calendar-theme-event-grey-accent,#9e9e9e)}.forge-calendar__event[data-event-theme=red]{color:#f44336;color:var(--forge-calendar-theme-event-red-accent,#f44336)}.forge-calendar__event[data-event-theme=pink]{color:#e91e63;color:var(--forge-calendar-theme-event-pink-accent,#e91e63)}.forge-calendar__event[data-event-theme=purple]{color:#9c27b0;color:var(--forge-calendar-theme-event-purple-accent,#9c27b0)}.forge-calendar__event[data-event-theme=light-blue]{color:#03a9f4;color:var(--forge-calendar-theme-event-light-blue-accent,#03a9f4)}.forge-calendar__event[data-event-theme=deep-purple]{color:#673ab7;color:var(--forge-calendar-theme-event-deep-purple-accent,#673ab7)}.forge-calendar__event[data-event-theme=green]{color:#4caf50;color:var(--forge-calendar-theme-event-green-accent,#4caf50)}.forge-calendar__event[data-event-theme=lime]{color:#cddc39;color:var(--forge-calendar-theme-event-lime-accent,#cddc39)}.forge-calendar__event[data-event-theme=yellow]{color:#ffeb3b;color:var(--forge-calendar-theme-event-yellow-accent,#ffeb3b)}.forge-calendar__event[data-event-theme=brown]{color:#795548;color:var(--forge-calendar-theme-event-brown-accent,#795548)}.forge-calendar__event[data-event-theme=deep-orange]{color:#ff5722;color:var(--forge-calendar-theme-event-deep-orange-accent,#ff5722)}.forge-calendar__date[disabled] .forge-calendar__event{opacity:.14}.forge-calendar__event--overflow{color:#000;color:var(--mdc-theme-on-surface,#000);background-color:var(--mdc-theme-surface);border-radius:50%}.forge-calendar__event__wrapper{display:-webkit-box;display:flex;-webkit-box-pack:center;justify-content:center;gap:2px;position:absolute;bottom:0;left:0;width:100%;padding-bottom:2px;pointer-events:none}.forge-calendar__date-spacer .forge-calendar__event__wrapper{display:none}.forge-calendar--rtl .forge-calendar__header forge-icon-button forge-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}#accessible-header{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;outline:0;-webkit-appearance:none;-moz-appearance:none}#month-button forge-icon{-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.forge-calendar--month-menu-open #month-button forge-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}#year-button forge-icon{-webkit-transition:-webkit-transform .2s;transition:-webkit-transform .2s;transition:transform .2s;transition:transform .2s,-webkit-transform .2s}.forge-calendar--year-menu-open #year-button forge-icon{-webkit-transform:rotate(180deg);transform:rotate(180deg)}:host{--forge-calendar-event-stroke-color:#ffffff;--forge-calendar-event-stroke-color:var(--mdc-theme-surface, #ffffff);display:inline-block}:host([hidden]){display:none}:host([forge-popup-context=true]){--forge-calendar-event-stroke-color:#ffffff;--forge-calendar-event-stroke-color:var(--forge-theme-elevated-surface, #ffffff)}',l=class extends HTMLElement{constructor(){super();fe.define([de,ce,le,ue,se]),re(this,Qe,et),this._foundation=new z(new P(this))}static get observedAttributes(){return[r.attributes.ALLOW_SINGLE_DATE_RANGE,r.attributes.CLEAR_BUTTON,r.attributes.CONSTRAIN_TO_ENABLED,r.attributes.FIRST_DAY_OF_WEEK,r.attributes.FIXED_HEIGHT,r.attributes.LIST_YEARS,r.attributes.LOCALE,r.attributes.MAX,r.attributes.MENU_ANIMATION,r.attributes.MIN,r.attributes.MODE,r.attributes.MONTH,r.attributes.PREVENT_FOCUS,r.attributes.READONLY,r.attributes.SELECTION_FOLLOWS_MONTH,r.attributes.SHOW_HEADER,r.attributes.SHOW_OTHER_MONTHS,r.attributes.SHOW_TODAY,r.attributes.TODAY_BUTTON,r.attributes.VIEW,r.attributes.YEAR,r.attributes.YEAR_RANGE]}connectedCallback(){!this.hasAttribute(r.attributes.POPUP_CONTEXT)&&Q(this).some(t=>t.tagName.toLowerCase()==="forge-popup")&&this.setAttribute(r.attributes.POPUP_CONTEXT,"true"),this._foundation.initialize()}disconnectedCallback(){this._foundation.disconnect()}attributeChangedCallback(t,a,i){switch(t){case r.attributes.ALLOW_SINGLE_DATE_RANGE:this.allowSingleDateRange=g(i);break;case r.attributes.CLEAR_BUTTON:this.clearButton=g(i);break;case r.attributes.CONSTRAIN_TO_ENABLED:this.constrainToEnabled=g(i);break;case r.attributes.FIRST_DAY_OF_WEEK:this.firstDayOfWeek=I(i);break;case r.attributes.FIXED_HEIGHT:this.fixedHeight=g(i);break;case r.attributes.LIST_YEARS:this.listYears=g(i);break;case r.attributes.LOCALE:this.locale=i;break;case r.attributes.MAX:this.max=i;break;case r.attributes.MENU_ANIMATION:this.menuAnimation=i;break;case r.attributes.MIN:this.min=i;break;case r.attributes.MODE:this.mode=i;break;case r.attributes.MONTH:this.month=I(i);break;case r.attributes.PREVENT_FOCUS:this.preventFocus=g(i);break;case r.attributes.READONLY:this.readonly=g(i);break;case r.attributes.SELECTION_FOLLOWS_MONTH:this.selectionFollowsMonth=g(i);break;case r.attributes.SHOW_HEADER:this.showHeader=g(i);break;case r.attributes.SHOW_OTHER_MONTHS:this.showOtherMonths=g(i);break;case r.attributes.SHOW_TODAY:this.showToday=g(i);break;case r.attributes.TODAY_BUTTON:this.todayButton=g(i);break;case r.attributes.VIEW:this.view=i;break;case r.attributes.YEAR:this.year=I(i);break;case r.attributes.YEAR_RANGE:this.yearRange=i;break}}clear(){this._foundation.clear()}deselectDate(t){this._foundation.deselectDate(new Date(t))}goToDate(t,a){this._foundation.goToDate(new Date(t),a)}handleKey(t){this._foundation.handleExternalKeyEvent(t)}layout(){this._foundation.layout()}selectDate(t){this._foundation.selectDate(new Date(t))}setActiveDate(t,a){return this._foundation.setActiveDate(new Date(t),a)}today(){this._foundation.today()}toggleDate(t,a){this._foundation.toggleDate(new Date(t),a)}};d([c({set:!1})],l.prototype,"activeDate",2),d([c()],l.prototype,"allowSingleDateRange",2),d([c()],l.prototype,"clearButton",2),d([c()],l.prototype,"clearCallback",2),d([c()],l.prototype,"constrainToEnabled",2),d([c()],l.prototype,"dateBuilder",2),d([c()],l.prototype,"dateSelectCallback",2),d([c()],l.prototype,"dayBuilder",2),d([c()],l.prototype,"disabledDateBuilder",2),d([c()],l.prototype,"disabledDates",2),d([c()],l.prototype,"disabledDaysOfWeek",2),d([c()],l.prototype,"eventBuilder",2),d([c()],l.prototype,"events",2),d([c()],l.prototype,"firstDayOfWeek",2),d([c()],l.prototype,"fixedHeight",2),d([c()],l.prototype,"listYears",2),d([c()],l.prototype,"locale",2),d([c()],l.prototype,"max",2),d([c()],l.prototype,"menuAnimation",2),d([c()],l.prototype,"min",2),d([c()],l.prototype,"mode",2),d([c()],l.prototype,"month",2),d([c()],l.prototype,"preventFocus",2),d([c()],l.prototype,"readonly",2),d([c()],l.prototype,"selectionFollowsMonth",2),d([c()],l.prototype,"showHeader",2),d([c()],l.prototype,"showOtherMonths",2),d([c()],l.prototype,"showToday",2),d([c()],l.prototype,"todayButton",2),d([c()],l.prototype,"todayCallback",2),d([c()],l.prototype,"tooltipBuilder",2),d([c()],l.prototype,"value",2),d([c()],l.prototype,"view",2),d([c()],l.prototype,"weekendDays",2),d([c()],l.prototype,"year",2),d([c()],l.prototype,"yearRange",2),l=d([oe({name:r.elementName,dependencies:[ve,ye,be,ge,me]})],l);var Ke=class extends pe{constructor(e){super(e)}_build(){return document.createElement(r.elementName)}onDateSelect(e){this._element.addEventListener(r.events.DATE_SELECT,e)}onFocusChange(e){this._element.addEventListener(r.events.FOCUS_CHANGE,e)}onMonthChange(e){this._element.addEventListener(r.events.MONTH_CHANGE,e)}onViewChange(e){this._element.addEventListener(r.events.VIEW_CHANGE,e)}};function qa(){ie(l)}export{V as a,_t as b,O as c,Re as d,ft as e,N as f,He as g,p as h,Ze as i,Y as j,We as k,y as l,Pe as m,R as n,H as o,K as p,Je as q,ze as r,Ge as s,Ue as t,qe as u,k as v,h as w,S as x,W as y,Ve as z,$ as A,X as B,P as C,z as D,l as E,Ke as F,qa as G};
|
|
7
|
+
//# sourceMappingURL=chunk.WPJEXVHM.js.map
|