@govtechsg/sgds-web-component 3.25.0 → 3.25.1-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Checkbox/index.umd.min.js +233 -233
- package/components/Checkbox/index.umd.min.js.map +1 -1
- package/components/Checkbox/sgds-checkbox.d.ts +1 -0
- package/components/Checkbox/sgds-checkbox.js +6 -1
- package/components/Checkbox/sgds-checkbox.js.map +1 -1
- package/components/ComboBox/index.umd.min.js +241 -242
- package/components/ComboBox/index.umd.min.js.map +1 -1
- package/components/ComboBox/sgds-combo-box.js +0 -1
- package/components/ComboBox/sgds-combo-box.js.map +1 -1
- package/components/DataTable/data-table.js +6 -0
- package/components/DataTable/data-table.js.map +1 -0
- package/components/DataTable/index.d.ts +12 -0
- package/components/DataTable/index.js +11 -0
- package/components/DataTable/index.js.map +1 -0
- package/components/DataTable/index.umd.min.js +2633 -0
- package/components/DataTable/index.umd.min.js.map +1 -0
- package/components/DataTable/sgds-data-table-cell.d.ts +15 -0
- package/components/DataTable/sgds-data-table-cell.js +32 -0
- package/components/DataTable/sgds-data-table-cell.js.map +1 -0
- package/components/DataTable/sgds-data-table-head.d.ts +28 -0
- package/components/DataTable/sgds-data-table-head.js +69 -0
- package/components/DataTable/sgds-data-table-head.js.map +1 -0
- package/components/DataTable/sgds-data-table-row.d.ts +76 -0
- package/components/DataTable/sgds-data-table-row.js +333 -0
- package/components/DataTable/sgds-data-table-row.js.map +1 -0
- package/components/DataTable/sgds-data-table.d.ts +82 -0
- package/components/DataTable/sgds-data-table.js +405 -0
- package/components/DataTable/sgds-data-table.js.map +1 -0
- package/components/Datepicker/datepicker-calendar.js +4 -4
- package/components/Datepicker/datepicker-calendar.js.map +1 -1
- package/components/Datepicker/datepicker-header.js +2 -2
- package/components/Datepicker/datepicker-header.js.map +1 -1
- package/components/Datepicker/datepicker-input.js +13 -48
- package/components/Datepicker/datepicker-input.js.map +1 -1
- package/components/Datepicker/index.umd.min.js +341 -341
- package/components/Datepicker/index.umd.min.js.map +1 -1
- package/components/Datepicker/sgds-datepicker.js +6 -6
- package/components/Datepicker/sgds-datepicker.js.map +1 -1
- package/components/Footer/index.umd.min.js +1 -1
- package/components/Input/index.umd.min.js +2 -2
- package/components/Input/index.umd.min.js.map +1 -1
- package/components/Input/input.js +1 -1
- package/components/QuantityToggle/index.umd.min.js +1 -1
- package/components/QuantityToggle/index.umd.min.js.map +1 -1
- package/components/Select/index.umd.min.js +21 -22
- package/components/Select/index.umd.min.js.map +1 -1
- package/components/Select/sgds-select.js +0 -1
- package/components/Select/sgds-select.js.map +1 -1
- package/components/Sidebar/index.umd.min.js +24 -24
- package/components/Sidebar/index.umd.min.js.map +1 -1
- package/components/Sidebar/sgds-sidebar-group.d.ts +1 -0
- package/components/Sidebar/sgds-sidebar-group.js +7 -1
- package/components/Sidebar/sgds-sidebar-group.js.map +1 -1
- package/components/Sidebar/sgds-sidebar-section.d.ts +1 -0
- package/components/Sidebar/sgds-sidebar-section.js +12 -2
- package/components/Sidebar/sgds-sidebar-section.js.map +1 -1
- package/components/Sidebar/sgds-sidebar.d.ts +5 -4
- package/components/Sidebar/sgds-sidebar.js.map +1 -1
- package/components/Sidebar/sidebar-element.d.ts +2 -2
- package/components/Sidebar/sidebar-element.js +12 -34
- package/components/Sidebar/sidebar-element.js.map +1 -1
- package/components/Sidebar/types.d.ts +3 -0
- package/components/Subnav/index.umd.min.js +1 -1
- package/components/Tab/index.umd.min.js +8 -8
- package/components/Tab/index.umd.min.js.map +1 -1
- package/components/Tab/sgds-tab-group.d.ts +2 -0
- package/components/Tab/sgds-tab-group.js +9 -0
- package/components/Tab/sgds-tab-group.js.map +1 -1
- package/components/Tab/tab-group.js +1 -1
- package/components/Tab/tab-panel.js +1 -1
- package/components/Tab/tab.js +1 -1
- package/components/Textarea/index.umd.min.js +1 -1
- package/components/index.d.ts +4 -0
- package/components/index.js +4 -0
- package/components/index.js.map +1 -1
- package/components/index.umd.min.js +567 -475
- package/components/index.umd.min.js.map +1 -1
- package/css/fouc.css +4 -0
- package/css/grid.css +347 -124
- package/css/grid.js +1 -1
- package/css/utility.css +0 -1
- package/custom-elements.json +1541 -149
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/index.umd.min.js +422 -330
- package/index.umd.min.js.map +1 -1
- package/package.json +1 -3
- package/react/components/Checkbox/sgds-checkbox.cjs.js +6 -1
- package/react/components/Checkbox/sgds-checkbox.cjs.js.map +1 -1
- package/react/components/Checkbox/sgds-checkbox.js +6 -1
- package/react/components/Checkbox/sgds-checkbox.js.map +1 -1
- package/react/components/ComboBox/sgds-combo-box.cjs.js +0 -1
- package/react/components/ComboBox/sgds-combo-box.cjs.js.map +1 -1
- package/react/components/ComboBox/sgds-combo-box.js +0 -1
- package/react/components/ComboBox/sgds-combo-box.js.map +1 -1
- package/react/components/DataTable/data-table.cjs.js +11 -0
- package/react/components/DataTable/data-table.cjs.js.map +1 -0
- package/react/components/DataTable/data-table.js +7 -0
- package/react/components/DataTable/data-table.js.map +1 -0
- package/react/components/DataTable/sgds-data-table-cell.cjs.js +38 -0
- package/react/components/DataTable/sgds-data-table-cell.cjs.js.map +1 -0
- package/react/components/DataTable/sgds-data-table-cell.js +33 -0
- package/react/components/DataTable/sgds-data-table-cell.js.map +1 -0
- package/react/components/DataTable/sgds-data-table-head.cjs.js +75 -0
- package/react/components/DataTable/sgds-data-table-head.cjs.js.map +1 -0
- package/react/components/DataTable/sgds-data-table-head.js +70 -0
- package/react/components/DataTable/sgds-data-table-head.js.map +1 -0
- package/react/components/DataTable/sgds-data-table-row.cjs.js +339 -0
- package/react/components/DataTable/sgds-data-table-row.cjs.js.map +1 -0
- package/react/components/DataTable/sgds-data-table-row.js +334 -0
- package/react/components/DataTable/sgds-data-table-row.js.map +1 -0
- package/react/components/DataTable/sgds-data-table.cjs.js +411 -0
- package/react/components/DataTable/sgds-data-table.cjs.js.map +1 -0
- package/react/components/DataTable/sgds-data-table.js +406 -0
- package/react/components/DataTable/sgds-data-table.js.map +1 -0
- package/react/components/Datepicker/datepicker-calendar.cjs.js +4 -4
- package/react/components/Datepicker/datepicker-calendar.cjs.js.map +1 -1
- package/react/components/Datepicker/datepicker-calendar.js +4 -4
- package/react/components/Datepicker/datepicker-calendar.js.map +1 -1
- package/react/components/Datepicker/datepicker-header.cjs.js +2 -2
- package/react/components/Datepicker/datepicker-header.cjs.js.map +1 -1
- package/react/components/Datepicker/datepicker-header.js +2 -2
- package/react/components/Datepicker/datepicker-header.js.map +1 -1
- package/react/components/Datepicker/datepicker-input.cjs.js +13 -52
- package/react/components/Datepicker/datepicker-input.cjs.js.map +1 -1
- package/react/components/Datepicker/datepicker-input.js +13 -48
- package/react/components/Datepicker/datepicker-input.js.map +1 -1
- package/react/components/Datepicker/sgds-datepicker.cjs.js +6 -6
- package/react/components/Datepicker/sgds-datepicker.cjs.js.map +1 -1
- package/react/components/Datepicker/sgds-datepicker.js +6 -6
- package/react/components/Datepicker/sgds-datepicker.js.map +1 -1
- package/react/components/Input/input.cjs.js +1 -1
- package/react/components/Input/input.js +1 -1
- package/react/components/Select/sgds-select.cjs.js +0 -1
- package/react/components/Select/sgds-select.cjs.js.map +1 -1
- package/react/components/Select/sgds-select.js +0 -1
- package/react/components/Select/sgds-select.js.map +1 -1
- package/react/components/Sidebar/sgds-sidebar-group.cjs.js +7 -1
- package/react/components/Sidebar/sgds-sidebar-group.cjs.js.map +1 -1
- package/react/components/Sidebar/sgds-sidebar-group.js +7 -1
- package/react/components/Sidebar/sgds-sidebar-group.js.map +1 -1
- package/react/components/Sidebar/sgds-sidebar-section.cjs.js +12 -2
- package/react/components/Sidebar/sgds-sidebar-section.cjs.js.map +1 -1
- package/react/components/Sidebar/sgds-sidebar-section.js +12 -2
- package/react/components/Sidebar/sgds-sidebar-section.js.map +1 -1
- package/react/components/Sidebar/sgds-sidebar.cjs.js.map +1 -1
- package/react/components/Sidebar/sgds-sidebar.js.map +1 -1
- package/react/components/Sidebar/sidebar-element.cjs.js +12 -34
- package/react/components/Sidebar/sidebar-element.cjs.js.map +1 -1
- package/react/components/Sidebar/sidebar-element.js +12 -34
- package/react/components/Sidebar/sidebar-element.js.map +1 -1
- package/react/components/Tab/sgds-tab-group.cjs.js +9 -0
- package/react/components/Tab/sgds-tab-group.cjs.js.map +1 -1
- package/react/components/Tab/sgds-tab-group.js +9 -0
- package/react/components/Tab/sgds-tab-group.js.map +1 -1
- package/react/components/Tab/tab-group.cjs.js +1 -1
- package/react/components/Tab/tab-group.js +1 -1
- package/react/components/Tab/tab-panel.cjs.js +1 -1
- package/react/components/Tab/tab-panel.js +1 -1
- package/react/components/Tab/tab.cjs.js +1 -1
- package/react/components/Tab/tab.js +1 -1
- package/react/css/grid.cjs.js +1 -1
- package/react/css/grid.js +1 -1
- package/react/data-table/index.cjs.js +44 -0
- package/react/data-table/index.cjs.js.map +1 -0
- package/react/data-table/index.d.ts +4 -0
- package/react/data-table/index.js +20 -0
- package/react/data-table/index.js.map +1 -0
- package/react/data-table-cell/index.cjs.js +40 -0
- package/react/data-table-cell/index.cjs.js.map +1 -0
- package/react/data-table-cell/index.d.ts +4 -0
- package/react/data-table-cell/index.js +16 -0
- package/react/data-table-cell/index.js.map +1 -0
- package/react/data-table-head/index.cjs.js +40 -0
- package/react/data-table-head/index.cjs.js.map +1 -0
- package/react/data-table-head/index.d.ts +4 -0
- package/react/data-table-head/index.js +16 -0
- package/react/data-table-head/index.js.map +1 -0
- package/react/data-table-row/index.cjs.js +45 -0
- package/react/data-table-row/index.cjs.js.map +1 -0
- package/react/data-table-row/index.d.ts +4 -0
- package/react/data-table-row/index.js +21 -0
- package/react/data-table-row/index.js.map +1 -0
- package/react/index.cjs.js +126 -118
- package/react/index.cjs.js.map +1 -1
- package/react/index.d.ts +4 -0
- package/react/index.js +4 -0
- package/react/index.js.map +1 -1
- package/react/styles/form-text-control.cjs.js +1 -1
- package/react/styles/form-text-control.js +1 -1
- package/react/utils/date-helpers.cjs.js +120 -0
- package/react/utils/date-helpers.cjs.js.map +1 -0
- package/react/utils/date-helpers.js +108 -0
- package/react/utils/date-helpers.js.map +1 -0
- package/react/utils/date-mask.cjs.js +203 -0
- package/react/utils/date-mask.cjs.js.map +1 -0
- package/react/utils/date-mask.js +199 -0
- package/react/utils/date-mask.js.map +1 -0
- package/react/utils/time.cjs.js +7 -7
- package/react/utils/time.cjs.js.map +1 -1
- package/react/utils/time.js +1 -1
- package/react/utils/time.js.map +1 -1
- package/styles/form-text-control.js +1 -1
- package/types/react.d.ts +101 -0
- package/utils/date-helpers.d.ts +22 -0
- package/utils/date-helpers.js +107 -0
- package/utils/date-helpers.js.map +1 -0
- package/utils/date-mask.d.ts +44 -0
- package/utils/date-mask.js +198 -0
- package/utils/date-mask.js.map +1 -0
- package/utils/time.js +1 -1
- package/utils/time.js.map +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sgds-select.js","sources":["../../../src/components/Select/sgds-select.ts"],"sourcesContent":["import { html, nothing, PropertyValueMap } from \"lit\";\nimport { property, queryAssignedElements } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { ref } from \"lit/directives/ref.js\";\nimport { SelectElement } from \"../../base/select-element\";\nimport formTextControlStyles from \"../../styles/form-text-control.css\";\nimport { watch } from \"../../utils/watch\";\nimport SgdsIcon from \"../Icon/sgds-icon\";\nimport selectStyle from \"./select.css\";\nimport SgdsSelectOption from \"./sgds-select-option\";\nimport SgdsSpinner from \"../Spinner/sgds-spinner\";\n/**\n * @summary Select is used to make one selection from a list through keyboard or mouse actions\n *\n * @event sgds-select - Emitted when an option is selected.\n * @event sgds-change - Emitted when the select value changes.\n * @event sgds-focus - Emitted when user input is focused.\n * @event sgds-blur - Emitted when user input is blurred.\n * @event sgds-invalid - Emitted when the select's invalid state is set to true.\n * @event sgds-valid - Emitted when the select's invalid state is set to false.\n *\n * @slot default - slot for sgds-select-option passed into select's menu\n */\nexport class SgdsSelect extends SelectElement {\n static styles = [...SelectElement.styles, formTextControlStyles, selectStyle];\n static childName = \"sgds-select-option\";\n /** @internal */\n static dependencies = {\n \"sgds-icon\": SgdsIcon,\n \"sgds-spinner\": SgdsSpinner,\n [SgdsSelect.childName]: SgdsSelectOption\n };\n /** Disables native and sgds validation for the select. */\n @property({ type: Boolean, reflect: true }) noValidate = false;\n\n connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener(\"sgds-hide\", async () => {\n const sgdsInput = await this._input;\n sgdsInput.focus();\n });\n }\n @queryAssignedElements({ flatten: true, selector: \"sgds-select-option\" })\n protected options: SgdsSelectOption[];\n\n async firstUpdated(changedProperties: PropertyValueMap<this>) {\n super.firstUpdated(changedProperties);\n this._updateDisplayValue();\n this.input = await this._input;\n this._mixinValidate(this.input);\n if (this.menuIsOpen) {\n await this.updateFloatingPosition();\n }\n }\n\n private async _handleSlotChange(e: Event) {\n const assignedElements = (e.target as HTMLSlotElement).assignedElements({ flatten: true });\n\n assignedElements.forEach(el =>\n el.addEventListener(\"click\", (e: Event) => {\n const option = e.target as SgdsSelectOption;\n if (option.disabled) return;\n this._handleItemSelected(e);\n })\n );\n assignedElements.forEach(el =>\n el.addEventListener(\"keydown\", (e: KeyboardEvent) => {\n if (e.key === \"Enter\") {\n this._handleItemSelected(e);\n }\n })\n );\n this.menuList = await this._getMenuListFromOptions(assignedElements);\n this._updateDisplayValue();\n this.input = await this._input;\n this._mixinValidate(this.input);\n }\n private _updateDisplayValue() {\n if (this.value && this.menuList.length > 0) {\n const initialSelectedItem = this.menuList.filter(({ value }) => value === this.value);\n this.displayValue = initialSelectedItem[0].label;\n\n this._setActiveToOption();\n }\n }\n private _setActiveToOption() {\n const activeIndex = this.menuList.findIndex(item => item.value.toString() === this.value);\n this.options.forEach((option, index) => {\n option.active = index === activeIndex;\n });\n }\n\n @watch(\"value\", { waitUntilFirstUpdate: true })\n async _handleValueChange() {\n this._setActiveToOption();\n\n // when value change, always emit a change event\n this.emit(\"sgds-change\");\n\n if (this.value) {\n this.emit(\"sgds-select\");\n }\n const sgdsInput = await this._input;\n this._mixinSetFormValue();\n this._mixinValidate(sgdsInput);\n\n this._updateDisplayValue();\n if (!this._isTouched && this.value === \"\") return;\n if (this._mixinShouldSkipSgdsValidation()) return;\n\n this.invalid = !this._mixinReportValidity();\n }\n\n protected async _handleItemSelected(e: Event) {\n const itemEl = e.target as SgdsSelectOption;\n const itemLabel = itemEl.textContent?.trim() ?? \"\";\n const itemValueAttr = itemEl.getAttribute(\"value\") ?? itemLabel;\n const foundItem = {\n label: itemLabel,\n value: itemValueAttr\n };\n this.value = foundItem.value.toString();\n this.displayValue = foundItem.label;\n this.hideMenu();\n }\n\n protected _handleFocus() {\n this.emit(\"sgds-focus\");\n }\n\n protected async _handleInputBlur(e: Event) {\n e.preventDefault();\n this.emit(\"sgds-blur\");\n }\n\n /** For form reset */\n protected async _mixinResetFormControl() {\n this.value = this.defaultValue;\n const initialItem = this.menuList.filter(({ value }) => value === this.value);\n if (initialItem.length <= 0) {\n this.displayValue = \"\";\n } else {\n this.displayValue = initialItem[0].label;\n }\n this._mixinResetValidity(await this._input);\n }\n private _blockInputKeydown = (e: KeyboardEvent) => {\n if (e.key !== \"Tab\") {\n e.preventDefault();\n }\n };\n /** Applicable for menuList prop only */\n protected _renderMenu() {\n const menu = this.menuList.map(item => {\n const isActive = item.value === this.value;\n return html`\n <sgds-select-option\n ?active=${isActive}\n value=${item.value}\n ?disabled=${item.disabled}\n @click=${item.disabled ? null : this._handleItemSelected}\n @keydown=${(e: KeyboardEvent) => {\n if (e.key === \"Enter\") {\n this._handleItemSelected(e);\n }\n }}\n >\n ${item.label}\n </sgds-select-option>\n `;\n });\n return this.menuList.length === 0 ? this._renderEmptyMenu() : menu;\n }\n protected _renderInput() {\n const wantFeedbackStyle = this.hasFeedback;\n return html`\n <div\n ${ref(this.myDropdown)}\n class=\"form-control-group ${classMap({\n disabled: this.disabled,\n readonly: this.readonly,\n \"is-invalid\": this.invalid && wantFeedbackStyle\n })}\"\n @click=${this._handleClick}\n >\n <input\n class=\"form-control\"\n type=\"text\"\n id=${this._controlId}\n name=${ifDefined(this.name)}\n placeholder=${ifDefined(this.placeholder)}\n aria-invalid=${this.invalid ? \"true\" : \"false\"}\n ?autofocus=${this.autofocus}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n .value=${this.displayValue}\n @blur=${this._handleInputBlur}\n @focus=${this._handleFocus}\n aria-describedby=${ifDefined(this.invalid && this.hasFeedback ? `${this._controlId}-invalid` : undefined)}\n aria-labelledby=\"${this._labelId} ${this._controlId}Help ${this.invalid && this.hasFeedback\n ? `${this._controlId}-invalid`\n : \"\"}\"\n @keydown=${this._blockInputKeydown}\n />\n <sgds-icon name=\"chevron-down\" size=\"md\"></sgds-icon>\n </div>\n `;\n }\n\n render() {\n return html`\n <div\n class=${classMap({\n disabled: this.disabled,\n select: true,\n \"form-control-container\": true,\n \"m-width-160\": true\n })}\n >\n ${this._renderLabel()}\n <!-- The input -->\n ${this._renderInput()} ${this._renderFeedback()}\n <div\n id=${this.dropdownMenuId}\n class=\"dropdown-menu\"\n part=\"menu\"\n tabindex=\"-1\"\n role=\"menu\"\n aria-label=${this.label || \"Options\"}\n ${ref(this.menuRef)}\n >\n <slot id=\"default\" class=${classMap({ \"is-loading\": this.loading })} @slotchange=${this._handleSlotChange}\n >${this._renderMenu()}</slot\n >\n ${this.loading ? this._renderLoadingMenu() : nothing}\n </div>\n </div>\n `;\n }\n}\n\nexport default SgdsSelect;\n"],"names":["formTextControlStyles","selectStyle"],"mappings":";;;;;;;;;;;;;;AAYA;;;;;;;;;;;AAWG;AACG,MAAO,UAAW,SAAQ,aAAa,CAAA;AAA7C,IAAA,WAAA,GAAA;;;QAU8C,IAAU,CAAA,UAAA,GAAG,KAAK,CAAC;AAiHvD,QAAA,IAAA,CAAA,kBAAkB,GAAG,CAAC,CAAgB,KAAI;AAChD,YAAA,IAAI,CAAC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,GAAG,aAAa,CAAC,MAAM,EAAEA,QAAqB,EAAEC,UAAW,CAA/D,CAAiE;AACvE,UAAS,CAAA,SAAA,GAAG,oBAAH,CAAwB;AACxC;AACO,UAAA,CAAA,YAAY,GAAG;AACpB,IAAA,WAAW,EAAE,QAAQ;AACrB,IAAA,cAAc,EAAE,WAAW;AAC3B,IAAA,CAAC,UAAU,CAAC,SAAS,GAAG,gBAAgB;AACzC,CAJkB,CAIjB;AAE0C,UAAA,CAAA;IAA3C,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;AAAoB,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,YAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAUrD,UAAA,CAAA;IADT,qBAAqB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,oBAAoB,EAAE,CAAC;AACnC,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,SAAA,EAAA,KAAA,CAAA,CAAA,CAAA;AAkDhC,UAAA,CAAA;IADL,KAAK,CAAC,OAAO,EAAE,EAAE,oBAAoB,EAAE,IAAI,EAAE,CAAC;AAmB9C,CAAA,EAAA,UAAA,CAAA,SAAA,EAAA,oBAAA,EAAA,IAAA,CAAA;;;;"}
|
|
1
|
+
{"version":3,"file":"sgds-select.js","sources":["../../../src/components/Select/sgds-select.ts"],"sourcesContent":["import { html, nothing, PropertyValueMap } from \"lit\";\nimport { property, queryAssignedElements } from \"lit/decorators.js\";\nimport { classMap } from \"lit/directives/class-map.js\";\nimport { ifDefined } from \"lit/directives/if-defined.js\";\nimport { ref } from \"lit/directives/ref.js\";\nimport { SelectElement } from \"../../base/select-element\";\nimport formTextControlStyles from \"../../styles/form-text-control.css\";\nimport { watch } from \"../../utils/watch\";\nimport SgdsIcon from \"../Icon/sgds-icon\";\nimport selectStyle from \"./select.css\";\nimport SgdsSelectOption from \"./sgds-select-option\";\nimport SgdsSpinner from \"../Spinner/sgds-spinner\";\n/**\n * @summary Select is used to make one selection from a list through keyboard or mouse actions\n *\n * @event sgds-select - Emitted when an option is selected.\n * @event sgds-change - Emitted when the select value changes.\n * @event sgds-focus - Emitted when user input is focused.\n * @event sgds-blur - Emitted when user input is blurred.\n * @event sgds-invalid - Emitted when the select's invalid state is set to true.\n * @event sgds-valid - Emitted when the select's invalid state is set to false.\n *\n * @slot default - slot for sgds-select-option passed into select's menu\n */\nexport class SgdsSelect extends SelectElement {\n static styles = [...SelectElement.styles, formTextControlStyles, selectStyle];\n static childName = \"sgds-select-option\";\n /** @internal */\n static dependencies = {\n \"sgds-icon\": SgdsIcon,\n \"sgds-spinner\": SgdsSpinner,\n [SgdsSelect.childName]: SgdsSelectOption\n };\n /** Disables native and sgds validation for the select. */\n @property({ type: Boolean, reflect: true }) noValidate = false;\n\n connectedCallback(): void {\n super.connectedCallback();\n this.addEventListener(\"sgds-hide\", async () => {\n const sgdsInput = await this._input;\n sgdsInput.focus();\n });\n }\n @queryAssignedElements({ flatten: true, selector: \"sgds-select-option\" })\n protected options: SgdsSelectOption[];\n\n async firstUpdated(changedProperties: PropertyValueMap<this>) {\n super.firstUpdated(changedProperties);\n this._updateDisplayValue();\n this.input = await this._input;\n this._mixinValidate(this.input);\n if (this.menuIsOpen) {\n await this.updateFloatingPosition();\n }\n }\n\n private async _handleSlotChange(e: Event) {\n const assignedElements = (e.target as HTMLSlotElement).assignedElements({ flatten: true });\n\n assignedElements.forEach(el =>\n el.addEventListener(\"click\", (e: Event) => {\n const option = e.target as SgdsSelectOption;\n if (option.disabled) return;\n this._handleItemSelected(e);\n })\n );\n assignedElements.forEach(el =>\n el.addEventListener(\"keydown\", (e: KeyboardEvent) => {\n if (e.key === \"Enter\") {\n this._handleItemSelected(e);\n }\n })\n );\n this.menuList = await this._getMenuListFromOptions(assignedElements);\n this._updateDisplayValue();\n this.input = await this._input;\n this._mixinValidate(this.input);\n }\n private _updateDisplayValue() {\n if (this.value && this.menuList.length > 0) {\n const initialSelectedItem = this.menuList.filter(({ value }) => value === this.value);\n this.displayValue = initialSelectedItem[0].label;\n\n this._setActiveToOption();\n }\n }\n private _setActiveToOption() {\n const activeIndex = this.menuList.findIndex(item => item.value.toString() === this.value);\n this.options.forEach((option, index) => {\n option.active = index === activeIndex;\n });\n }\n\n @watch(\"value\", { waitUntilFirstUpdate: true })\n async _handleValueChange() {\n this._setActiveToOption();\n\n // when value change, always emit a change event\n this.emit(\"sgds-change\");\n\n if (this.value) {\n this.emit(\"sgds-select\");\n }\n const sgdsInput = await this._input;\n this._mixinSetFormValue();\n this._mixinValidate(sgdsInput);\n\n this._updateDisplayValue();\n if (!this._isTouched && this.value === \"\") return;\n if (this._mixinShouldSkipSgdsValidation()) return;\n\n this.invalid = !this._mixinReportValidity();\n }\n\n protected async _handleItemSelected(e: Event) {\n const itemEl = e.target as SgdsSelectOption;\n const itemLabel = itemEl.textContent?.trim() ?? \"\";\n const itemValueAttr = itemEl.getAttribute(\"value\") ?? itemLabel;\n const foundItem = {\n label: itemLabel,\n value: itemValueAttr\n };\n this.value = foundItem.value.toString();\n this.displayValue = foundItem.label;\n this.hideMenu();\n }\n\n protected _handleFocus() {\n this.emit(\"sgds-focus\");\n }\n\n protected async _handleInputBlur(e: Event) {\n e.preventDefault();\n this.emit(\"sgds-blur\");\n }\n\n /** For form reset */\n protected async _mixinResetFormControl() {\n this.value = this.defaultValue;\n const initialItem = this.menuList.filter(({ value }) => value === this.value);\n if (initialItem.length <= 0) {\n this.displayValue = \"\";\n } else {\n this.displayValue = initialItem[0].label;\n }\n this._mixinResetValidity(await this._input);\n }\n private _blockInputKeydown = (e: KeyboardEvent) => {\n if (e.key !== \"Tab\") {\n e.preventDefault();\n }\n };\n /** Applicable for menuList prop only */\n protected _renderMenu() {\n const menu = this.menuList.map(item => {\n const isActive = item.value === this.value;\n return html`\n <sgds-select-option\n ?active=${isActive}\n value=${item.value}\n ?disabled=${item.disabled}\n @click=${item.disabled ? null : this._handleItemSelected}\n @keydown=${(e: KeyboardEvent) => {\n if (e.key === \"Enter\") {\n this._handleItemSelected(e);\n }\n }}\n >\n ${item.label}\n </sgds-select-option>\n `;\n });\n return this.menuList.length === 0 ? this._renderEmptyMenu() : menu;\n }\n protected _renderInput() {\n const wantFeedbackStyle = this.hasFeedback;\n return html`\n <div\n ${ref(this.myDropdown)}\n class=\"form-control-group ${classMap({\n disabled: this.disabled,\n readonly: this.readonly,\n \"is-invalid\": this.invalid && wantFeedbackStyle\n })}\"\n @click=${this._handleClick}\n >\n <input\n class=\"form-control\"\n type=\"text\"\n id=${this._controlId}\n name=${ifDefined(this.name)}\n placeholder=${ifDefined(this.placeholder)}\n aria-invalid=${this.invalid ? \"true\" : \"false\"}\n ?autofocus=${this.autofocus}\n ?disabled=${this.disabled}\n ?readonly=${this.readonly}\n ?required=${this.required}\n .value=${this.displayValue}\n @blur=${this._handleInputBlur}\n @focus=${this._handleFocus}\n aria-describedby=${ifDefined(this.invalid && this.hasFeedback ? `${this._controlId}-invalid` : undefined)}\n aria-labelledby=\"${this._labelId} ${this._controlId}Help ${this.invalid && this.hasFeedback\n ? `${this._controlId}-invalid`\n : \"\"}\"\n @keydown=${this._blockInputKeydown}\n />\n <sgds-icon name=\"chevron-down\" size=\"md\"></sgds-icon>\n </div>\n `;\n }\n\n render() {\n return html`\n <div\n class=${classMap({\n disabled: this.disabled,\n select: true,\n \"form-control-container\": true,\n \"m-width-160\": true\n })}\n >\n ${this._renderLabel()}\n <!-- The input -->\n ${this._renderInput()} ${this._renderFeedback()}\n <div\n id=${this.dropdownMenuId}\n class=\"dropdown-menu\"\n tabindex=\"-1\"\n role=\"menu\"\n aria-label=${this.label || \"Options\"}\n ${ref(this.menuRef)}\n >\n <slot id=\"default\" class=${classMap({ \"is-loading\": this.loading })} @slotchange=${this._handleSlotChange}\n >${this._renderMenu()}</slot\n >\n ${this.loading ? this._renderLoadingMenu() : nothing}\n </div>\n </div>\n `;\n }\n}\n\nexport default SgdsSelect;\n"],"names":["formTextContro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S.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),i=new WeakMap;class o{constructor(e,t,l){if(this._$cssResult$=!0,l!==r)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this._strings=t}get styleSheet(){let e=this._styleSheet;const t=this._strings;if(l&&void 0===e){const l=void 0!==t&&1===t.length;l&&(e=i.get(t)),void 0===e&&((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),l&&i.set(t,e))}return e}toString(){return this.cssText}}const n=(e,...t)=>{const l=1===e.length?e[0]:t.reduce((t,l,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(l)+e[r+1],e[0]);return new o(l,e,r)},a=e=>{let t="";for(const l of e.cssRules)t+=l.cssText;return new o("string"==typeof(l=t)?l:String(l),void 0,r);var l},s=l?e=>e:e=>e instanceof CSSStyleSheet?a(e):e,{is:c,defineProperty:d,getOwnPropertyDescriptor:h,getOwnPropertyNames:u,getOwnPropertySymbols:v,getPrototypeOf:p}=Object,f=globalThis;let g;const w=f.trustedTypes,m=w?w.emptyScript:"",_=f.reactiveElementPolyfillSupportDevMode;f.litIssuedWarnings??=new Set,g=(e,t)=>{t+=` See https://lit.dev/msg/${e} for more information.`,f.litIssuedWarnings.has(t)||f.litIssuedWarnings.has(e)||(console.warn(t),f.litIssuedWarnings.add(t))},queueMicrotask(()=>{g("dev-mode","Lit is in dev mode. Not recommended for production!"),f.ShadyDOM?.inUse&&void 0===_&&g("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")});const b=(e,t)=>e,x={toAttribute(e,t){switch(t){case Boolean:e=e?m:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let l=e;switch(t){case Boolean:l=null!==e;break;case Number:l=null===e?null:Number(e);break;case Object:case Array:try{l=JSON.parse(e)}catch(e){l=null}}return l}},Z=(e,t)=>!c(e,t),y={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:Z};Symbol.metadata??=Symbol("metadata"),f.litPropertyMetadata??=new WeakMap;class C extends HTMLElement{static addInitializer(e){this.__prepare(),(this._initializers??=[]).push(e)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap&&[...this.__attributeToPropertyMap.keys()]}static createProperty(e,t=y){if(t.state&&(t.attribute=!1),this.__prepare(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const l=Symbol.for(`${String(e)} (@property() cache)`),r=this.getPropertyDescriptor(e,l,t);void 0!==r&&d(this.prototype,e,r)}}static getPropertyDescriptor(e,t,l){const{get:r,set:i}=h(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};if(null==r){if("value"in(h(this.prototype,e)??{}))throw new Error(`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it's actually declared as a value on the prototype. Usually this is due to using @property or @state on a method.`);g("reactive-property-without-getter",`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it does not have a getter. This will be an error in a future version of Lit.`)}return{get:r,set(t){const o=r?.call(this);i?.call(this,t),this.requestUpdate(e,o,l)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??y}static __prepare(){if(this.hasOwnProperty(b("elementProperties")))return;const e=p(this);e.finalize(),void 0!==e._initializers&&(this._initializers=[...e._initializers]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(b("properties"))){const e=this.properties,t=[...u(e),...v(e)];for(const l of t)this.createProperty(l,e[l])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,l]of t)this.elementProperties.set(e,l)}this.__attributeToPropertyMap=new Map;for(const[e,t]of this.elementProperties){const l=this.__attributeNameForProperty(e,t);void 0!==l&&this.__attributeToPropertyMap.set(l,e)}this.elementStyles=this.finalizeStyles(this.styles),this.hasOwnProperty("createProperty")&&g("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&g("no-override-get-property-descriptor","Overriding ReactiveElement.getPropertyDescriptor() is deprecated. The override will not be called with standard decorators")}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const l=new Set(e.flat(1/0).reverse());for(const e of l)t.unshift(s(e))}else void 0!==e&&t.push(s(e));return t}static __attributeNameForProperty(e,t){const l=t.attribute;return!1===l?void 0:"string"==typeof l?l:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this.__instanceProperties=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.__reflectingProperty=null,this.__initialize()}__initialize(){this.__updatePromise=new Promise(e=>this.enableUpdating=e),this._$changedProperties=new Map,this.__saveInstanceProperties(),this.requestUpdate(),this.constructor._initializers?.forEach(e=>e(this))}addController(e){(this.__controllers??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this.__controllers?.delete(e)}__saveInstanceProperties(){const e=new Map,t=this.constructor.elementProperties;for(const l of t.keys())this.hasOwnProperty(l)&&(e.set(l,this[l]),delete this[l]);e.size>0&&(this.__instanceProperties=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,r)=>{if(l)e.adoptedStyleSheets=r.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const l of r){const r=document.createElement("style"),i=t.litNonce;void 0!==i&&r.setAttribute("nonce",i),r.textContent=l.cssText,e.appendChild(r)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this.__controllers?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this.__controllers?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,l){this._$attributeToProperty(e,l)}__propertyToAttribute(e,t){const l=this.constructor.elementProperties.get(e),r=this.constructor.__attributeNameForProperty(e,l);if(void 0!==r&&!0===l.reflect){const i=(void 0!==l.converter?.toAttribute?l.converter:x).toAttribute(t,l.type);this.constructor.enabledWarnings.includes("migration")&&void 0===i&&g("undefined-attribute-value",`The attribute value for the ${e} property is undefined on element ${this.localName}. The attribute will be removed, but in the previous version of \`ReactiveElement\`, the attribute would not have changed.`),this.__reflectingProperty=e,null==i?this.removeAttribute(r):this.setAttribute(r,i),this.__reflectingProperty=null}}_$attributeToProperty(e,t){const l=this.constructor,r=l.__attributeToPropertyMap.get(e);if(void 0!==r&&this.__reflectingProperty!==r){const e=l.getPropertyOptions(r),i="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:x;this.__reflectingProperty=r;const o=i.fromAttribute(t,e.type);this[r]=o??this.__defaultValues?.get(r)??o,this.__reflectingProperty=null}}requestUpdate(e,t,l,r=!1,i){if(void 0!==e){e instanceof Event&&g("","The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()");const o=this.constructor;!1===r&&(i=this[e]),l??=o.getPropertyOptions(e);if(!((l.hasChanged??Z)(i,t)||l.useDefault&&l.reflect&&i===this.__defaultValues?.get(e)&&!this.hasAttribute(o.__attributeNameForProperty(e,l))))return;this._$changeProperty(e,t,l)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(e,t,{useDefault:l,reflect:r,wrapped:i},o){l&&!(this.__defaultValues??=new Map).has(e)&&(this.__defaultValues.set(e,o??t??this[e]),!0!==i||void 0!==o)||(this._$changedProperties.has(e)||(this.hasUpdated||l||(t=void 0),this._$changedProperties.set(e,t)),!0===r&&this.__reflectingProperty!==e&&(this.__reflectingProperties??=new Set).add(e))}async __enqueueUpdate(){this.isUpdatePending=!0;try{await this.__updatePromise}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){const e=this.performUpdate();return this.constructor.enabledWarnings.includes("async-perform-update")&&"function"==typeof e?.then&&g("async-perform-update",`Element ${this.localName} returned a Promise from performUpdate(). This behavior is deprecated and will be removed in a future version of ReactiveElement.`),e}performUpdate(){if(!this.isUpdatePending)return;var e;if(e={kind:"update"},f.emitLitDebugLogEvents&&f.dispatchEvent(new CustomEvent("lit-debug",{detail:e})),!this.hasUpdated){this.renderRoot??=this.createRenderRoot();{const e=[...this.constructor.elementProperties.keys()].filter(e=>this.hasOwnProperty(e)&&e in p(this));if(e.length)throw new Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${e.join(", ")}. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information.`)}if(this.__instanceProperties){for(const[e,t]of this.__instanceProperties)this[e]=t;this.__instanceProperties=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,l]of e){const{wrapped:e}=l,r=this[t];!0!==e||this._$changedProperties.has(t)||void 0===r||this._$changeProperty(t,void 0,l,r)}}let t=!1;const l=this._$changedProperties;try{t=this.shouldUpdate(l),t?(this.willUpdate(l),this.__controllers?.forEach(e=>e.hostUpdate?.()),this.update(l)):this.__markUpdated()}catch(e){throw t=!1,this.__markUpdated(),e}t&&this._$didUpdate(l)}willUpdate(e){}_$didUpdate(e){this.__controllers?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e),this.isUpdatePending&&this.constructor.enabledWarnings.includes("change-in-update")&&g("change-in-update",`Element ${this.localName} scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update.`)}__markUpdated(){this._$changedProperties=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.__updatePromise}shouldUpdate(e){return!0}update(e){this.__reflectingProperties&&=this.__reflectingProperties.forEach(e=>this.__propertyToAttribute(e,this[e])),this.__markUpdated()}updated(e){}firstUpdated(e){}}C.elementStyles=[],C.shadowRootOptions={mode:"open"},C[b("elementProperties")]=new Map,C[b("finalized")]=new Map,_?.({ReactiveElement:C});{C.enabledWarnings=["change-in-update","async-perform-update"];const e=function(e){e.hasOwnProperty(b("enabledWarnings"))||(e.enabledWarnings=e.enabledWarnings.slice())};C.enableWarning=function(t){e(this),this.enabledWarnings.includes(t)||this.enabledWarnings.push(t)},C.disableWarning=function(t){e(this);const l=this.enabledWarnings.indexOf(t);l>=0&&this.enabledWarnings.splice(l,1)}}(f.reactiveElementVersions??=[]).push("2.1.2"),f.reactiveElementVersions.length>1&&queueMicrotask(()=>{g("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});
|
|
7
|
+
const t=globalThis,l=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,r=Symbol(),i=new WeakMap;class o{constructor(e,t,l){if(this._$cssResult$=!0,l!==r)throw new Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this._strings=t}get styleSheet(){let e=this._styleSheet;const t=this._strings;if(l&&void 0===e){const l=void 0!==t&&1===t.length;l&&(e=i.get(t)),void 0===e&&((this._styleSheet=e=new CSSStyleSheet).replaceSync(this.cssText),l&&i.set(t,e))}return e}toString(){return this.cssText}}const n=(e,...t)=>{const l=1===e.length?e[0]:t.reduce((t,l,r)=>t+(e=>{if(!0===e._$cssResult$)return e.cssText;if("number"==typeof e)return e;throw new Error(`Value passed to 'css' function must be a 'css' function result: ${e}. Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.`)})(l)+e[r+1],e[0]);return new o(l,e,r)},a=e=>{let t="";for(const l of e.cssRules)t+=l.cssText;return new o("string"==typeof(l=t)?l:String(l),void 0,r);var l},s=l?e=>e:e=>e instanceof CSSStyleSheet?a(e):e,{is:c,defineProperty:d,getOwnPropertyDescriptor:h,getOwnPropertyNames:u,getOwnPropertySymbols:v,getPrototypeOf:p}=Object,f=globalThis;let g;const w=f.trustedTypes,m=w?w.emptyScript:"",_=f.reactiveElementPolyfillSupportDevMode;f.litIssuedWarnings??=new Set,g=(e,t)=>{t+=` See https://lit.dev/msg/${e} for more information.`,f.litIssuedWarnings.has(t)||f.litIssuedWarnings.has(e)||(console.warn(t),f.litIssuedWarnings.add(t))},queueMicrotask(()=>{g("dev-mode","Lit is in dev mode. Not recommended for production!"),f.ShadyDOM?.inUse&&void 0===_&&g("polyfill-support-missing","Shadow DOM is being polyfilled via `ShadyDOM` but the `polyfill-support` module has not been loaded.")});const b=(e,t)=>e,x={toAttribute(e,t){switch(t){case Boolean:e=e?m:null;break;case Object:case Array:e=null==e?e:JSON.stringify(e)}return e},fromAttribute(e,t){let l=e;switch(t){case Boolean:l=null!==e;break;case Number:l=null===e?null:Number(e);break;case Object:case Array:try{l=JSON.parse(e)}catch(e){l=null}}return l}},Z=(e,t)=>!c(e,t),C={attribute:!0,type:String,converter:x,reflect:!1,useDefault:!1,hasChanged:Z};Symbol.metadata??=Symbol("metadata"),f.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(e){this.__prepare(),(this._initializers??=[]).push(e)}static get observedAttributes(){return this.finalize(),this.__attributeToPropertyMap&&[...this.__attributeToPropertyMap.keys()]}static createProperty(e,t=C){if(t.state&&(t.attribute=!1),this.__prepare(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const l=Symbol.for(`${String(e)} (@property() cache)`),r=this.getPropertyDescriptor(e,l,t);void 0!==r&&d(this.prototype,e,r)}}static getPropertyDescriptor(e,t,l){const{get:r,set:i}=h(this.prototype,e)??{get(){return this[t]},set(e){this[t]=e}};if(null==r){if("value"in(h(this.prototype,e)??{}))throw new Error(`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it's actually declared as a value on the prototype. Usually this is due to using @property or @state on a method.`);g("reactive-property-without-getter",`Field ${JSON.stringify(String(e))} on ${this.name} was declared as a reactive property but it does not have a getter. This will be an error in a future version of Lit.`)}return{get:r,set(t){const o=r?.call(this);i?.call(this,t),this.requestUpdate(e,o,l)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??C}static __prepare(){if(this.hasOwnProperty(b("elementProperties")))return;const e=p(this);e.finalize(),void 0!==e._initializers&&(this._initializers=[...e._initializers]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(b("finalized")))return;if(this.finalized=!0,this.__prepare(),this.hasOwnProperty(b("properties"))){const e=this.properties,t=[...u(e),...v(e)];for(const l of t)this.createProperty(l,e[l])}const e=this[Symbol.metadata];if(null!==e){const t=litPropertyMetadata.get(e);if(void 0!==t)for(const[e,l]of t)this.elementProperties.set(e,l)}this.__attributeToPropertyMap=new Map;for(const[e,t]of this.elementProperties){const l=this.__attributeNameForProperty(e,t);void 0!==l&&this.__attributeToPropertyMap.set(l,e)}this.elementStyles=this.finalizeStyles(this.styles),this.hasOwnProperty("createProperty")&&g("no-override-create-property","Overriding ReactiveElement.createProperty() is deprecated. The override will not be called with standard decorators"),this.hasOwnProperty("getPropertyDescriptor")&&g("no-override-get-property-descriptor","Overriding ReactiveElement.getPropertyDescriptor() is deprecated. The override will not be called with standard decorators")}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const l=new Set(e.flat(1/0).reverse());for(const e of l)t.unshift(s(e))}else void 0!==e&&t.push(s(e));return t}static __attributeNameForProperty(e,t){const l=t.attribute;return!1===l?void 0:"string"==typeof l?l:"string"==typeof e?e.toLowerCase():void 0}constructor(){super(),this.__instanceProperties=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this.__reflectingProperty=null,this.__initialize()}__initialize(){this.__updatePromise=new Promise(e=>this.enableUpdating=e),this._$changedProperties=new Map,this.__saveInstanceProperties(),this.requestUpdate(),this.constructor._initializers?.forEach(e=>e(this))}addController(e){(this.__controllers??=new Set).add(e),void 0!==this.renderRoot&&this.isConnected&&e.hostConnected?.()}removeController(e){this.__controllers?.delete(e)}__saveInstanceProperties(){const e=new Map,t=this.constructor.elementProperties;for(const l of t.keys())this.hasOwnProperty(l)&&(e.set(l,this[l]),delete this[l]);e.size>0&&(this.__instanceProperties=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return((e,r)=>{if(l)e.adoptedStyleSheets=r.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(const l of r){const r=document.createElement("style"),i=t.litNonce;void 0!==i&&r.setAttribute("nonce",i),r.textContent=l.cssText,e.appendChild(r)}})(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this.__controllers?.forEach(e=>e.hostConnected?.())}enableUpdating(e){}disconnectedCallback(){this.__controllers?.forEach(e=>e.hostDisconnected?.())}attributeChangedCallback(e,t,l){this._$attributeToProperty(e,l)}__propertyToAttribute(e,t){const l=this.constructor.elementProperties.get(e),r=this.constructor.__attributeNameForProperty(e,l);if(void 0!==r&&!0===l.reflect){const i=(void 0!==l.converter?.toAttribute?l.converter:x).toAttribute(t,l.type);this.constructor.enabledWarnings.includes("migration")&&void 0===i&&g("undefined-attribute-value",`The attribute value for the ${e} property is undefined on element ${this.localName}. The attribute will be removed, but in the previous version of \`ReactiveElement\`, the attribute would not have changed.`),this.__reflectingProperty=e,null==i?this.removeAttribute(r):this.setAttribute(r,i),this.__reflectingProperty=null}}_$attributeToProperty(e,t){const l=this.constructor,r=l.__attributeToPropertyMap.get(e);if(void 0!==r&&this.__reflectingProperty!==r){const e=l.getPropertyOptions(r),i="function"==typeof e.converter?{fromAttribute:e.converter}:void 0!==e.converter?.fromAttribute?e.converter:x;this.__reflectingProperty=r;const o=i.fromAttribute(t,e.type);this[r]=o??this.__defaultValues?.get(r)??o,this.__reflectingProperty=null}}requestUpdate(e,t,l,r=!1,i){if(void 0!==e){e instanceof Event&&g("","The requestUpdate() method was called with an Event as the property name. This is probably a mistake caused by binding this.requestUpdate as an event listener. Instead bind a function that will call it with no arguments: () => this.requestUpdate()");const o=this.constructor;!1===r&&(i=this[e]),l??=o.getPropertyOptions(e);if(!((l.hasChanged??Z)(i,t)||l.useDefault&&l.reflect&&i===this.__defaultValues?.get(e)&&!this.hasAttribute(o.__attributeNameForProperty(e,l))))return;this._$changeProperty(e,t,l)}!1===this.isUpdatePending&&(this.__updatePromise=this.__enqueueUpdate())}_$changeProperty(e,t,{useDefault:l,reflect:r,wrapped:i},o){l&&!(this.__defaultValues??=new Map).has(e)&&(this.__defaultValues.set(e,o??t??this[e]),!0!==i||void 0!==o)||(this._$changedProperties.has(e)||(this.hasUpdated||l||(t=void 0),this._$changedProperties.set(e,t)),!0===r&&this.__reflectingProperty!==e&&(this.__reflectingProperties??=new Set).add(e))}async __enqueueUpdate(){this.isUpdatePending=!0;try{await this.__updatePromise}catch(e){Promise.reject(e)}const e=this.scheduleUpdate();return null!=e&&await e,!this.isUpdatePending}scheduleUpdate(){const e=this.performUpdate();return this.constructor.enabledWarnings.includes("async-perform-update")&&"function"==typeof e?.then&&g("async-perform-update",`Element ${this.localName} returned a Promise from performUpdate(). This behavior is deprecated and will be removed in a future version of ReactiveElement.`),e}performUpdate(){if(!this.isUpdatePending)return;var e;if(e={kind:"update"},f.emitLitDebugLogEvents&&f.dispatchEvent(new CustomEvent("lit-debug",{detail:e})),!this.hasUpdated){this.renderRoot??=this.createRenderRoot();{const e=[...this.constructor.elementProperties.keys()].filter(e=>this.hasOwnProperty(e)&&e in p(this));if(e.length)throw new Error(`The following properties on element ${this.localName} will not trigger updates as expected because they are set using class fields: ${e.join(", ")}. Native class fields and some compiled output will overwrite accessors used for detecting changes. See https://lit.dev/msg/class-field-shadowing for more information.`)}if(this.__instanceProperties){for(const[e,t]of this.__instanceProperties)this[e]=t;this.__instanceProperties=void 0}const e=this.constructor.elementProperties;if(e.size>0)for(const[t,l]of e){const{wrapped:e}=l,r=this[t];!0!==e||this._$changedProperties.has(t)||void 0===r||this._$changeProperty(t,void 0,l,r)}}let t=!1;const l=this._$changedProperties;try{t=this.shouldUpdate(l),t?(this.willUpdate(l),this.__controllers?.forEach(e=>e.hostUpdate?.()),this.update(l)):this.__markUpdated()}catch(e){throw t=!1,this.__markUpdated(),e}t&&this._$didUpdate(l)}willUpdate(e){}_$didUpdate(e){this.__controllers?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e),this.isUpdatePending&&this.constructor.enabledWarnings.includes("change-in-update")&&g("change-in-update",`Element ${this.localName} scheduled an update (generally because a property was set) after an update completed, causing a new update to be scheduled. This is inefficient and should be avoided unless the next update can only be scheduled as a side effect of the previous update.`)}__markUpdated(){this._$changedProperties=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this.__updatePromise}shouldUpdate(e){return!0}update(e){this.__reflectingProperties&&=this.__reflectingProperties.forEach(e=>this.__propertyToAttribute(e,this[e])),this.__markUpdated()}updated(e){}firstUpdated(e){}}y.elementStyles=[],y.shadowRootOptions={mode:"open"},y[b("elementProperties")]=new Map,y[b("finalized")]=new Map,_?.({ReactiveElement:y});{y.enabledWarnings=["change-in-update","async-perform-update"];const e=function(e){e.hasOwnProperty(b("enabledWarnings"))||(e.enabledWarnings=e.enabledWarnings.slice())};y.enableWarning=function(t){e(this),this.enabledWarnings.includes(t)||this.enabledWarnings.push(t)},y.disableWarning=function(t){e(this);const l=this.enabledWarnings.indexOf(t);l>=0&&this.enabledWarnings.splice(l,1)}}(f.reactiveElementVersions??=[]).push("2.1.2"),f.reactiveElementVersions.length>1&&queueMicrotask(()=>{g("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")});
|
|
8
8
|
/**
|
|
9
9
|
* @license
|
|
10
10
|
* Copyright 2017 Google LLC
|
|
@@ -16,13 +16,13 @@ const M=globalThis,V=e=>{M.emitLitDebugLogEvents&&M.dispatchEvent(new CustomEven
|
|
|
16
16
|
* Copyright 2017 Google LLC
|
|
17
17
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
18
18
|
*/
|
|
19
|
-
const me=globalThis;let _e;me.litIssuedWarnings??=new Set,_e=(e,t)=>{t+=` See https://lit.dev/msg/${e} for more information.`,me.litIssuedWarnings.has(t)||me.litIssuedWarnings.has(e)||(console.warn(t),me.litIssuedWarnings.add(t))};class be extends
|
|
19
|
+
const me=globalThis;let _e;me.litIssuedWarnings??=new Set,_e=(e,t)=>{t+=` See https://lit.dev/msg/${e} for more information.`,me.litIssuedWarnings.has(t)||me.litIssuedWarnings.has(e)||(console.warn(t),me.litIssuedWarnings.add(t))};class be extends y{constructor(){super(...arguments),this.renderOptions={host:this},this.__childPart=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this.__childPart=we(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.__childPart?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.__childPart?.setConnected(!1)}render(){return te}}var xe;be._$litElement$=!0,be[(xe="finalized",xe)]=!0,me.litElementHydrateSupport?.({LitElement:be});const Ze=me.litElementPolyfillSupportDevMode;
|
|
20
20
|
/**
|
|
21
21
|
* @license
|
|
22
22
|
* Copyright 2017 Google LLC
|
|
23
23
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
24
24
|
*/
|
|
25
|
-
let
|
|
25
|
+
let Ce;Ze?.({LitElement:be}),(me.litElementVersions??=[]).push("4.2.2"),me.litElementVersions.length>1&&queueMicrotask(()=>{_e("multiple-versions","Multiple versions of Lit loaded. Loading multiple versions is not recommended.")}),globalThis.litIssuedWarnings??=new Set,Ce=(e,t)=>{t+=` See https://lit.dev/msg/${e} for more information.`,globalThis.litIssuedWarnings.has(t)||globalThis.litIssuedWarnings.has(e)||(console.warn(t),globalThis.litIssuedWarnings.add(t))};const ye={attribute:!0,type:String,converter:x,reflect:!1,hasChanged:Z},Me=(e=ye,t,l)=>{const{kind:r,metadata:i}=l;null==i&&Ce("missing-class-metadata",`The class ${t} is missing decorator metadata. This could mean that you're using a compiler that supports decorators but doesn't support decorator metadata, such as TypeScript 5.1. Please update your compiler.`);let o=globalThis.litPropertyMetadata.get(i);if(void 0===o&&globalThis.litPropertyMetadata.set(i,o=new Map),"setter"===r&&((e=Object.create(e)).wrapped=!0),o.set(l.name,e),"accessor"===r){const{name:r}=l;return{set(l){const i=t.get.call(this);t.set.call(this,l),this.requestUpdate(r,i,e,!0,l)},init(t){return void 0!==t&&this._$changeProperty(r,void 0,e,t),t}}}if("setter"===r){const{name:r}=l;return function(l){const i=this[r];t.call(this,l),this.requestUpdate(r,i,e,!0,l)}}throw new Error(`Unsupported decorator location: ${r}`)};function Ve(e){return(t,l)=>"object"==typeof l?Me(e,t,l):((e,t,l)=>{const r=t.hasOwnProperty(l);return t.constructor.createProperty(l,e),r?Object.getOwnPropertyDescriptor(t,l):void 0})(e,t,l)}
|
|
26
26
|
/**
|
|
27
27
|
* @license
|
|
28
28
|
* Copyright 2017 Google LLC
|
|
@@ -89,7 +89,7 @@ class Te{constructor(e,t,l,r){if(this.subscribe=!1,this.provided=!1,this.value=v
|
|
|
89
89
|
* @license
|
|
90
90
|
* Copyright 2022 Google LLC
|
|
91
91
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
92
|
-
*/function Ue({context:e,subscribe:t}){return(l,r)=>{"object"==typeof r?r.addInitializer(function(){new Te(this,{context:e,callback:e=>{l.set.call(this,e)},subscribe:t})}):l.constructor.addInitializer(l=>{new Te(l,{context:e,callback:e=>{l[r]=e},subscribe:t})})}}const We="sidebar-active-group",qe="sidebar-active",Fe="sidebar-collapsed",Ge="sidebar-drawer-items",Ke="sidebar-drawer-open",Je="sidebar-drawer-overlay";function Ye(e,t){const l=Object.assign({waitUntilFirstUpdate:!1},t);return(t,r)=>{const{update:i}=t;if(e in t){const o=e;t.update=function(e){if(e.has(o)){const t=e.get(o),i=this[o];t!==i&&(l.waitUntilFirstUpdate&&!this.hasUpdated||this[r](t,i))}i.call(this,e)}}}}var Xe=n`.sidebar-item{border-radius:var(--sgds-border-radius-md);cursor:pointer;padding:var(--sgds-padding-xs);transition:background-color .15s ease-in-out,color .15s ease-in-out}.sidebar-item.active,.sidebar-item:focus-visible,.sidebar-item:hover{background-color:var(--sgds-bg-translucent-subtle)}.sidebar-item:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.sidebar-item-label-wrapper,.sidebar-item-label-wrapper>div{align-items:center;display:flex;gap:var(--sgds-gap-xs)}.sidebar-item-label-wrapper{justify-content:space-between}.sidebar-item-label{-webkit-line-clamp:2;-webkit-box-orient:vertical;line-clamp:2;display:-webkit-box;font-size:var(--sgds-font-size-label-sm);line-height:var(--sgds-line-height-2-xs);max-height:calc(var(--sgds-line-height-20, 20px)*2);overflow:hidden}.sidebar-item-label.offset{color:var(--sgds-color-subtle);margin-left:var(--sgds-margin-2-xl)}.sidebar-item-leaf.active .sidebar-item-label.offset,.sidebar-item-leaf:focus-visible .sidebar-item-label.offset,.sidebar-item-leaf:hover .sidebar-item-label.offset{color:var(--sgds-color-default)}.sidebar-item-leaf.active,.sidebar-item-leaf:focus-visible,.sidebar-item-leaf:hover{background-color:var(--sgds-bg-translucent-subtle)}.sidebar-item-label-wrapper .sidebar-item.active{background-color:var(--sgds-surface-raised);color:var(--sgds-primary-color-default)}.sidebar-item-label-wrapper .sidebar-item-indicator{align-items:center;display:flex;gap:var(--sgds-gap-2-xs)}.sidebar-item--collapsed .sidebar-item-indicator,.sidebar-item--collapsed .sidebar-item-label{display:none}.sidebar-item--collapsed .sidebar-item-label-wrapper{justify-content:center}.sidebar-submenu{overflow:hidden}.sidebar-submenu>div{margin-top:-100%;opacity:0;pointer-events:none;transition:all var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard)}.sidebar-submenu.show>div{margin-top:0;opacity:1;pointer-events:auto}.sidebar-submenu--collapsed{display:none}`;const Qe={announcement:()=>Promise.resolve().then(function(){return tr}),archive:()=>Promise.resolve().then(function(){return rr}),"arrow-bar-down":()=>Promise.resolve().then(function(){return or}),"arrow-bar-left":()=>Promise.resolve().then(function(){return ar}),"arrow-bar-right":()=>Promise.resolve().then(function(){return cr}),"arrow-bar-up":()=>Promise.resolve().then(function(){return hr}),"arrow-circle-down":()=>Promise.resolve().then(function(){return vr}),"arrow-circle-left":()=>Promise.resolve().then(function(){return fr}),"arrow-circle-right":()=>Promise.resolve().then(function(){return wr}),"arrow-circle-up":()=>Promise.resolve().then(function(){return _r}),"arrow-clockwise":()=>Promise.resolve().then(function(){return xr}),"arrow-down":()=>Promise.resolve().then(function(){return yr}),"arrow-left":()=>Promise.resolve().then(function(){return Mr}),"arrow-repeat":()=>Promise.resolve().then(function(){return Hr}),"arrow-right":()=>Promise.resolve().then(function(){return zr}),"arrow-square-down":()=>Promise.resolve().then(function(){return $r}),"arrow-square-left":()=>Promise.resolve().then(function(){return jr}),"arrow-square-right":()=>Promise.resolve().then(function(){return Lr}),"arrow-square-up":()=>Promise.resolve().then(function(){return Sr}),"arrow-up":()=>Promise.resolve().then(function(){return Tr}),"bank-fill":()=>Promise.resolve().then(function(){return Ir}),"bell-slash":()=>Promise.resolve().then(function(){return Nr}),bell:()=>Promise.resolve().then(function(){return Wr}),"bi-funnel":()=>Promise.resolve().then(function(){return Fr}),"bookmark-fill":()=>Promise.resolve().then(function(){return Kr}),bookmark:()=>Promise.resolve().then(function(){return Yr}),"box-arrow-up-right":()=>Promise.resolve().then(function(){return Qr}),"box-seam":()=>Promise.resolve().then(function(){return ti}),building:()=>Promise.resolve().then(function(){return ri}),bus:()=>Promise.resolve().then(function(){return oi}),calculator:()=>Promise.resolve().then(function(){return ai}),"calendar-check":()=>Promise.resolve().then(function(){return ci}),"calendar-heart":()=>Promise.resolve().then(function(){return hi}),"calendar-x":()=>Promise.resolve().then(function(){return vi}),calendar:()=>Promise.resolve().then(function(){return fi}),camera:()=>Promise.resolve().then(function(){return wi}),car:()=>Promise.resolve().then(function(){return _i}),"chat-dots":()=>Promise.resolve().then(function(){return xi}),"chat-left-text":()=>Promise.resolve().then(function(){return yi}),chat:()=>Promise.resolve().then(function(){return Mi}),"check-circle-fill":()=>Promise.resolve().then(function(){return Hi}),"check-circle":()=>Promise.resolve().then(function(){return zi}),check:()=>Promise.resolve().then(function(){return $i}),"chevron-down":()=>Promise.resolve().then(function(){return ji}),"chevron-left":()=>Promise.resolve().then(function(){return Li}),"chevron-right":()=>Promise.resolve().then(function(){return Si}),"chevron-selector-vertical":()=>Promise.resolve().then(function(){return Ti}),"chevron-up":()=>Promise.resolve().then(function(){return Ii}),clock:()=>Promise.resolve().then(function(){return Ni}),"cloud-check":()=>Promise.resolve().then(function(){return Wi}),"cloud-download":()=>Promise.resolve().then(function(){return Fi}),"cloud-upload":()=>Promise.resolve().then(function(){return Ki}),cloud:()=>Promise.resolve().then(function(){return Yi}),"code-square":()=>Promise.resolve().then(function(){return Qi}),"coins-hand":()=>Promise.resolve().then(function(){return to}),compass:()=>Promise.resolve().then(function(){return ro}),copy:()=>Promise.resolve().then(function(){return oo}),"cpu-chip-ai":()=>Promise.resolve().then(function(){return ao}),cross:()=>Promise.resolve().then(function(){return co}),"cursor-fill":()=>Promise.resolve().then(function(){return uo}),cursor:()=>Promise.resolve().then(function(){return po}),"dash-circle":()=>Promise.resolve().then(function(){return go}),"dash-square":()=>Promise.resolve().then(function(){return mo}),dash:()=>Promise.resolve().then(function(){return bo}),database:()=>Promise.resolve().then(function(){return Zo}),dataflow:()=>Promise.resolve().then(function(){return Co}),download:()=>Promise.resolve().then(function(){return Vo}),edit:()=>Promise.resolve().then(function(){return Po}),"exclamation-circle-fill":()=>Promise.resolve().then(function(){return Oo}),"exclamation-circle":()=>Promise.resolve().then(function(){return Ao}),"exclamation-triangle-fill":()=>Promise.resolve().then(function(){return Bo}),"exclamation-triangle":()=>Promise.resolve().then(function(){return ko}),exclamation:()=>Promise.resolve().then(function(){return Eo}),"eye-fill":()=>Promise.resolve().then(function(){return Ro}),"eye-slash-fill":()=>Promise.resolve().then(function(){return Do}),"eye-slash":()=>Promise.resolve().then(function(){return Uo}),eye:()=>Promise.resolve().then(function(){return qo}),"face-smile-fill":()=>Promise.resolve().then(function(){return Go}),"face-smile":()=>Promise.resolve().then(function(){return Jo}),facebook:()=>Promise.resolve().then(function(){return Xo}),"file-earmark-text":()=>Promise.resolve().then(function(){return en}),"file-pdf":()=>Promise.resolve().then(function(){return ln}),"file-plus":()=>Promise.resolve().then(function(){return on}),"file-text":()=>Promise.resolve().then(function(){return an}),file:()=>Promise.resolve().then(function(){return cn}),files:()=>Promise.resolve().then(function(){return hn}),fingerprint:()=>Promise.resolve().then(function(){return vn}),flash:()=>Promise.resolve().then(function(){return fn}),"folder-check":()=>Promise.resolve().then(function(){return wn}),"folder-minus":()=>Promise.resolve().then(function(){return _n}),"folder-plus":()=>Promise.resolve().then(function(){return xn}),folder:()=>Promise.resolve().then(function(){return yn}),gear:()=>Promise.resolve().then(function(){return Mn}),"geo-alt":()=>Promise.resolve().then(function(){return Hn}),"geo-fill":()=>Promise.resolve().then(function(){return zn}),geo:()=>Promise.resolve().then(function(){return $n}),"globe-alt":()=>Promise.resolve().then(function(){return jn}),globe:()=>Promise.resolve().then(function(){return Ln}),google:()=>Promise.resolve().then(function(){return Sn}),"grid-alt":()=>Promise.resolve().then(function(){return Tn}),"grid-fill":()=>Promise.resolve().then(function(){return In}),"hand-thumbs-down":()=>Promise.resolve().then(function(){return Nn}),"hand-thumbs-up":()=>Promise.resolve().then(function(){return Wn}),"hard-drive":()=>Promise.resolve().then(function(){return Fn}),heart:()=>Promise.resolve().then(function(){return Kn}),"house-door":()=>Promise.resolve().then(function(){return Yn}),house:()=>Promise.resolve().then(function(){return Qn}),image:()=>Promise.resolve().then(function(){return ta}),"in-box":()=>Promise.resolve().then(function(){return ra}),"info-circle-fill":()=>Promise.resolve().then(function(){return oa}),"info-circle":()=>Promise.resolve().then(function(){return aa}),instagram:()=>Promise.resolve().then(function(){return ca}),key:()=>Promise.resolve().then(function(){return ha}),"laptop-gear":()=>Promise.resolve().then(function(){return va}),laptop:()=>Promise.resolve().then(function(){return fa}),layers:()=>Promise.resolve().then(function(){return wa}),"layout-text-window-reverse":()=>Promise.resolve().then(function(){return _a}),"layout-text-window":()=>Promise.resolve().then(function(){return xa}),layout:()=>Promise.resolve().then(function(){return ya}),"life-buoy":()=>Promise.resolve().then(function(){return Ma}),lightbulb:()=>Promise.resolve().then(function(){return Ha}),link:()=>Promise.resolve().then(function(){return za}),linkedin:()=>Promise.resolve().then(function(){return $a}),list:()=>Promise.resolve().then(function(){return ja}),"lock-fill":()=>Promise.resolve().then(function(){return La}),lock:()=>Promise.resolve().then(function(){return Sa}),login:()=>Promise.resolve().then(function(){return Ta}),logout:()=>Promise.resolve().then(function(){return Ia}),luggage:()=>Promise.resolve().then(function(){return Na}),"mail-open":()=>Promise.resolve().then(function(){return Wa}),mail:()=>Promise.resolve().then(function(){return Fa}),map:()=>Promise.resolve().then(function(){return Ka}),meetup:()=>Promise.resolve().then(function(){return Ya}),menu:()=>Promise.resolve().then(function(){return Qa}),microphone:()=>Promise.resolve().then(function(){return ts}),monitor:()=>Promise.resolve().then(function(){return rs}),moon:()=>Promise.resolve().then(function(){return os}),move:()=>Promise.resolve().then(function(){return as}),paperclip:()=>Promise.resolve().then(function(){return cs}),passcode:()=>Promise.resolve().then(function(){return hs}),passport:()=>Promise.resolve().then(function(){return vs}),pause:()=>Promise.resolve().then(function(){return fs}),pencil:()=>Promise.resolve().then(function(){return ws}),"pending-circle":()=>Promise.resolve().then(function(){return _s}),"person-dash":()=>Promise.resolve().then(function(){return xs}),"person-plus":()=>Promise.resolve().then(function(){return ys}),"person-x":()=>Promise.resolve().then(function(){return Ms}),person:()=>Promise.resolve().then(function(){return Hs}),phone:()=>Promise.resolve().then(function(){return zs}),"pin-map-fill":()=>Promise.resolve().then(function(){return $s}),pin:()=>Promise.resolve().then(function(){return js}),placeholder:()=>Promise.resolve().then(function(){return Ls}),plane:()=>Promise.resolve().then(function(){return Ss}),play:()=>Promise.resolve().then(function(){return Ts}),"plus-circle":()=>Promise.resolve().then(function(){return Is}),"plus-square":()=>Promise.resolve().then(function(){return Ns}),plus:()=>Promise.resolve().then(function(){return Ws}),printer:()=>Promise.resolve().then(function(){return Fs}),"question-circle":()=>Promise.resolve().then(function(){return Ks}),rocket:()=>Promise.resolve().then(function(){return Ys}),save:()=>Promise.resolve().then(function(){return Qs}),search:()=>Promise.resolve().then(function(){return tc}),send:()=>Promise.resolve().then(function(){return rc}),"sg-crest":()=>Promise.resolve().then(function(){return oc}),share:()=>Promise.resolve().then(function(){return ac}),"shield-tick":()=>Promise.resolve().then(function(){return cc}),"sidebar-collapse":()=>Promise.resolve().then(function(){return hc}),"sidebar-expand":()=>Promise.resolve().then(function(){return vc}),"slash-circle":()=>Promise.resolve().then(function(){return fc}),"slash-divider":()=>Promise.resolve().then(function(){return wc}),sliders:()=>Promise.resolve().then(function(){return _c}),"sort-ascending":()=>Promise.resolve().then(function(){return xc}),"sort-descending":()=>Promise.resolve().then(function(){return yc}),speedometer:()=>Promise.resolve().then(function(){return Mc}),"star-ai":()=>Promise.resolve().then(function(){return Hc}),"star-fill":()=>Promise.resolve().then(function(){return zc}),star:()=>Promise.resolve().then(function(){return $c}),stoplights:()=>Promise.resolve().then(function(){return jc}),sun:()=>Promise.resolve().then(function(){return Lc}),"switch-horizontal":()=>Promise.resolve().then(function(){return Sc}),"switch-vertical":()=>Promise.resolve().then(function(){return Tc}),tablet:()=>Promise.resolve().then(function(){return Ic}),telegram:()=>Promise.resolve().then(function(){return Nc}),telephone:()=>Promise.resolve().then(function(){return Wc}),"three-dots-vertical":()=>Promise.resolve().then(function(){return Fc}),"three-dots":()=>Promise.resolve().then(function(){return Kc}),ticket:()=>Promise.resolve().then(function(){return Yc}),"toggle-off":()=>Promise.resolve().then(function(){return Qc}),"toggle-on":()=>Promise.resolve().then(function(){return td}),train:()=>Promise.resolve().then(function(){return rd}),translate:()=>Promise.resolve().then(function(){return od}),trash:()=>Promise.resolve().then(function(){return ad}),"trend-down":()=>Promise.resolve().then(function(){return cd}),"trend-up":()=>Promise.resolve().then(function(){return hd}),truck:()=>Promise.resolve().then(function(){return vd}),"twitter-x":()=>Promise.resolve().then(function(){return fd}),unlock:()=>Promise.resolve().then(function(){return wd}),upload:()=>Promise.resolve().then(function(){return _d}),"user-check":()=>Promise.resolve().then(function(){return xd}),"user-circle":()=>Promise.resolve().then(function(){return yd}),"user-pause":()=>Promise.resolve().then(function(){return Md}),"user-square":()=>Promise.resolve().then(function(){return Hd}),users:()=>Promise.resolve().then(function(){return zd}),"video-recorder":()=>Promise.resolve().then(function(){return $d}),"volume-max":()=>Promise.resolve().then(function(){return jd}),"volume-x":()=>Promise.resolve().then(function(){return Ld}),"window-dash":()=>Promise.resolve().then(function(){return Sd}),"window-desktop":()=>Promise.resolve().then(function(){return Td}),"window-dock":()=>Promise.resolve().then(function(){return Id}),"window-fullscreen":()=>Promise.resolve().then(function(){return Nd}),"window-plus":()=>Promise.resolve().then(function(){return Wd}),"window-sidebar":()=>Promise.resolve().then(function(){return Fd}),"window-split":()=>Promise.resolve().then(function(){return Kd}),"window-stack":()=>Promise.resolve().then(function(){return Yd}),"window-x":()=>Promise.resolve().then(function(){return Qd}),window:()=>Promise.resolve().then(function(){return th}),"xcircle-fill":()=>Promise.resolve().then(function(){return rh}),xcircle:()=>Promise.resolve().then(function(){return oh}),youtube:()=>Promise.resolve().then(function(){return ah}),"zoom-in":()=>Promise.resolve().then(function(){return ch}),"zoom-out":()=>Promise.resolve().then(function(){return hh})};var et=n`:host{color:inherit;display:inline-flex;vertical-align:bottom}:host(.icon-left){margin-right:.25rem}:host(.icon-right){margin-left:.25rem}:host([size=xs]) svg{height:var(--sgds-icon-size-xs);width:var(--sgds-icon-size-xs)}:host([size=sm]) svg{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}:host([size=md]) svg{height:var(--sgds-icon-size-md);width:var(--sgds-icon-size-md)}:host([size=xl]) svg{height:var(--sgds-icon-size-xl);width:var(--sgds-icon-size-xl)}:host([size="2-xl"]) svg{height:var(--sgds-icon-size-2-xl);width:var(--sgds-icon-size-2-xl)}:host([size="3-xl"]) svg{height:var(--sgds-icon-size-3-xl);width:var(--sgds-icon-size-3-xl)}svg{display:inline-block;height:var(--sgds-icon-size-lg);width:var(--sgds-icon-size-lg)}`;const tt=new Map;class lt extends ke{constructor(){super(...arguments),this.size="lg"}willUpdate(e){e.has("name")&&this._loadIcon(this.name)}async _loadIcon(e){if(!e)return void(this._icon=void 0);if(tt.has(e))return void(this._icon=tt.get(e));const t=Qe[e];if(!t)return console.warn(`Icon not found: ${e}`),void(this._icon=void 0);try{const l=await t();tt.set(e,l.default),this._icon=l.default}catch(t){console.warn(`Failed to load icon: ${e}`),this._icon=void 0}}updated(){var e;const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("svg");t&&(this.ariaLabel?(t.removeAttribute("aria-hidden"),t.setAttribute("aria-label",this.ariaLabel)):(t.removeAttribute("aria-label"),t.setAttribute("aria-hidden","true")))}render(){var e;return null!==(e=this._icon)&&void 0!==e?e:le}}lt.styles=[...ke.styles,et],e([Ve({type:String,reflect:!0})],lt.prototype,"name",void 0),e([Ve({type:String,reflect:!0})],lt.prototype,"size",void 0),e([Ve({type:String})],lt.prototype,"ariaLabel",void 0),e([He()],lt.prototype,"_icon",void 0),
|
|
92
|
+
*/function Ue({context:e,subscribe:t}){return(l,r)=>{"object"==typeof r?r.addInitializer(function(){new Te(this,{context:e,callback:e=>{l.set.call(this,e)},subscribe:t})}):l.constructor.addInitializer(l=>{new Te(l,{context:e,callback:e=>{l[r]=e},subscribe:t})})}}const We="sidebar-active-group",qe="sidebar-active",Fe="sidebar-collapsed",Ge="sidebar-drawer-items",Ke="sidebar-drawer-open",Je="sidebar-drawer-overlay";function Ye(e,t){const l=Object.assign({waitUntilFirstUpdate:!1},t);return(t,r)=>{const{update:i}=t;if(e in t){const o=e;t.update=function(e){if(e.has(o)){const t=e.get(o),i=this[o];t!==i&&(l.waitUntilFirstUpdate&&!this.hasUpdated||this[r](t,i))}i.call(this,e)}}}}var Xe=n`.sidebar-item{border-radius:var(--sgds-border-radius-md);cursor:pointer;padding:var(--sgds-padding-xs);transition:background-color .15s ease-in-out,color .15s ease-in-out}.sidebar-item.active,.sidebar-item:focus-visible,.sidebar-item:hover{background-color:var(--sgds-bg-translucent-subtle)}.sidebar-item:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.sidebar-item-label-wrapper,.sidebar-item-label-wrapper>div{align-items:center;display:flex;gap:var(--sgds-gap-xs)}.sidebar-item-label-wrapper{justify-content:space-between}.sidebar-item-label{-webkit-line-clamp:2;-webkit-box-orient:vertical;line-clamp:2;display:-webkit-box;font-size:var(--sgds-font-size-label-sm);line-height:var(--sgds-line-height-2-xs);max-height:calc(var(--sgds-line-height-20, 20px)*2);overflow:hidden}.sidebar-item-label.offset{color:var(--sgds-color-subtle);margin-left:var(--sgds-margin-2-xl)}.sidebar-item-leaf.active .sidebar-item-label.offset,.sidebar-item-leaf:focus-visible .sidebar-item-label.offset,.sidebar-item-leaf:hover .sidebar-item-label.offset{color:var(--sgds-color-default)}.sidebar-item-leaf.active,.sidebar-item-leaf:focus-visible,.sidebar-item-leaf:hover{background-color:var(--sgds-bg-translucent-subtle)}.sidebar-item-label-wrapper .sidebar-item.active{background-color:var(--sgds-surface-raised);color:var(--sgds-primary-color-default)}.sidebar-item-label-wrapper .sidebar-item-indicator{align-items:center;display:flex;gap:var(--sgds-gap-2-xs)}.sidebar-item--collapsed .sidebar-item-indicator,.sidebar-item--collapsed .sidebar-item-label{display:none}.sidebar-item--collapsed .sidebar-item-label-wrapper{justify-content:center}.sidebar-submenu{overflow:hidden}.sidebar-submenu>div{margin-top:-100%;opacity:0;pointer-events:none;transition:all var(--sgds-motion-duration-standard) var(--sgds-motion-easing-standard)}.sidebar-submenu.show>div{margin-top:0;opacity:1;pointer-events:auto}.sidebar-submenu--collapsed{display:none}`;const Qe={announcement:()=>Promise.resolve().then(function(){return tr}),archive:()=>Promise.resolve().then(function(){return rr}),"arrow-bar-down":()=>Promise.resolve().then(function(){return or}),"arrow-bar-left":()=>Promise.resolve().then(function(){return ar}),"arrow-bar-right":()=>Promise.resolve().then(function(){return cr}),"arrow-bar-up":()=>Promise.resolve().then(function(){return hr}),"arrow-circle-down":()=>Promise.resolve().then(function(){return vr}),"arrow-circle-left":()=>Promise.resolve().then(function(){return fr}),"arrow-circle-right":()=>Promise.resolve().then(function(){return wr}),"arrow-circle-up":()=>Promise.resolve().then(function(){return _r}),"arrow-clockwise":()=>Promise.resolve().then(function(){return xr}),"arrow-down":()=>Promise.resolve().then(function(){return Cr}),"arrow-left":()=>Promise.resolve().then(function(){return Mr}),"arrow-repeat":()=>Promise.resolve().then(function(){return Hr}),"arrow-right":()=>Promise.resolve().then(function(){return zr}),"arrow-square-down":()=>Promise.resolve().then(function(){return $r}),"arrow-square-left":()=>Promise.resolve().then(function(){return jr}),"arrow-square-right":()=>Promise.resolve().then(function(){return Lr}),"arrow-square-up":()=>Promise.resolve().then(function(){return Sr}),"arrow-up":()=>Promise.resolve().then(function(){return Tr}),"bank-fill":()=>Promise.resolve().then(function(){return Ir}),"bell-slash":()=>Promise.resolve().then(function(){return Nr}),bell:()=>Promise.resolve().then(function(){return Wr}),"bi-funnel":()=>Promise.resolve().then(function(){return Fr}),"bookmark-fill":()=>Promise.resolve().then(function(){return Kr}),bookmark:()=>Promise.resolve().then(function(){return Yr}),"box-arrow-up-right":()=>Promise.resolve().then(function(){return Qr}),"box-seam":()=>Promise.resolve().then(function(){return ti}),building:()=>Promise.resolve().then(function(){return ri}),bus:()=>Promise.resolve().then(function(){return oi}),calculator:()=>Promise.resolve().then(function(){return ai}),"calendar-check":()=>Promise.resolve().then(function(){return ci}),"calendar-heart":()=>Promise.resolve().then(function(){return hi}),"calendar-x":()=>Promise.resolve().then(function(){return vi}),calendar:()=>Promise.resolve().then(function(){return fi}),camera:()=>Promise.resolve().then(function(){return wi}),car:()=>Promise.resolve().then(function(){return _i}),"chat-dots":()=>Promise.resolve().then(function(){return xi}),"chat-left-text":()=>Promise.resolve().then(function(){return Ci}),chat:()=>Promise.resolve().then(function(){return Mi}),"check-circle-fill":()=>Promise.resolve().then(function(){return Hi}),"check-circle":()=>Promise.resolve().then(function(){return zi}),check:()=>Promise.resolve().then(function(){return $i}),"chevron-down":()=>Promise.resolve().then(function(){return ji}),"chevron-left":()=>Promise.resolve().then(function(){return Li}),"chevron-right":()=>Promise.resolve().then(function(){return Si}),"chevron-selector-vertical":()=>Promise.resolve().then(function(){return Ti}),"chevron-up":()=>Promise.resolve().then(function(){return Ii}),clock:()=>Promise.resolve().then(function(){return Ni}),"cloud-check":()=>Promise.resolve().then(function(){return Wi}),"cloud-download":()=>Promise.resolve().then(function(){return Fi}),"cloud-upload":()=>Promise.resolve().then(function(){return Ki}),cloud:()=>Promise.resolve().then(function(){return Yi}),"code-square":()=>Promise.resolve().then(function(){return Qi}),"coins-hand":()=>Promise.resolve().then(function(){return to}),compass:()=>Promise.resolve().then(function(){return ro}),copy:()=>Promise.resolve().then(function(){return oo}),"cpu-chip-ai":()=>Promise.resolve().then(function(){return ao}),cross:()=>Promise.resolve().then(function(){return co}),"cursor-fill":()=>Promise.resolve().then(function(){return uo}),cursor:()=>Promise.resolve().then(function(){return po}),"dash-circle":()=>Promise.resolve().then(function(){return go}),"dash-square":()=>Promise.resolve().then(function(){return mo}),dash:()=>Promise.resolve().then(function(){return bo}),database:()=>Promise.resolve().then(function(){return Zo}),dataflow:()=>Promise.resolve().then(function(){return yo}),download:()=>Promise.resolve().then(function(){return Vo}),edit:()=>Promise.resolve().then(function(){return Po}),"exclamation-circle-fill":()=>Promise.resolve().then(function(){return Oo}),"exclamation-circle":()=>Promise.resolve().then(function(){return Ao}),"exclamation-triangle-fill":()=>Promise.resolve().then(function(){return Bo}),"exclamation-triangle":()=>Promise.resolve().then(function(){return ko}),exclamation:()=>Promise.resolve().then(function(){return Eo}),"eye-fill":()=>Promise.resolve().then(function(){return Ro}),"eye-slash-fill":()=>Promise.resolve().then(function(){return Do}),"eye-slash":()=>Promise.resolve().then(function(){return Uo}),eye:()=>Promise.resolve().then(function(){return qo}),"face-smile-fill":()=>Promise.resolve().then(function(){return Go}),"face-smile":()=>Promise.resolve().then(function(){return Jo}),facebook:()=>Promise.resolve().then(function(){return Xo}),"file-earmark-text":()=>Promise.resolve().then(function(){return en}),"file-pdf":()=>Promise.resolve().then(function(){return ln}),"file-plus":()=>Promise.resolve().then(function(){return on}),"file-text":()=>Promise.resolve().then(function(){return an}),file:()=>Promise.resolve().then(function(){return cn}),files:()=>Promise.resolve().then(function(){return hn}),fingerprint:()=>Promise.resolve().then(function(){return vn}),flash:()=>Promise.resolve().then(function(){return fn}),"folder-check":()=>Promise.resolve().then(function(){return wn}),"folder-minus":()=>Promise.resolve().then(function(){return _n}),"folder-plus":()=>Promise.resolve().then(function(){return xn}),folder:()=>Promise.resolve().then(function(){return Cn}),gear:()=>Promise.resolve().then(function(){return Mn}),"geo-alt":()=>Promise.resolve().then(function(){return Hn}),"geo-fill":()=>Promise.resolve().then(function(){return zn}),geo:()=>Promise.resolve().then(function(){return $n}),"globe-alt":()=>Promise.resolve().then(function(){return jn}),globe:()=>Promise.resolve().then(function(){return Ln}),google:()=>Promise.resolve().then(function(){return Sn}),"grid-alt":()=>Promise.resolve().then(function(){return Tn}),"grid-fill":()=>Promise.resolve().then(function(){return In}),"hand-thumbs-down":()=>Promise.resolve().then(function(){return Nn}),"hand-thumbs-up":()=>Promise.resolve().then(function(){return Wn}),"hard-drive":()=>Promise.resolve().then(function(){return Fn}),heart:()=>Promise.resolve().then(function(){return Kn}),"house-door":()=>Promise.resolve().then(function(){return Yn}),house:()=>Promise.resolve().then(function(){return Qn}),image:()=>Promise.resolve().then(function(){return ta}),"in-box":()=>Promise.resolve().then(function(){return ra}),"info-circle-fill":()=>Promise.resolve().then(function(){return oa}),"info-circle":()=>Promise.resolve().then(function(){return aa}),instagram:()=>Promise.resolve().then(function(){return ca}),key:()=>Promise.resolve().then(function(){return ha}),"laptop-gear":()=>Promise.resolve().then(function(){return va}),laptop:()=>Promise.resolve().then(function(){return fa}),layers:()=>Promise.resolve().then(function(){return wa}),"layout-text-window-reverse":()=>Promise.resolve().then(function(){return _a}),"layout-text-window":()=>Promise.resolve().then(function(){return xa}),layout:()=>Promise.resolve().then(function(){return Ca}),"life-buoy":()=>Promise.resolve().then(function(){return Ma}),lightbulb:()=>Promise.resolve().then(function(){return Ha}),link:()=>Promise.resolve().then(function(){return za}),linkedin:()=>Promise.resolve().then(function(){return $a}),list:()=>Promise.resolve().then(function(){return ja}),"lock-fill":()=>Promise.resolve().then(function(){return La}),lock:()=>Promise.resolve().then(function(){return Sa}),login:()=>Promise.resolve().then(function(){return Ta}),logout:()=>Promise.resolve().then(function(){return Ia}),luggage:()=>Promise.resolve().then(function(){return Na}),"mail-open":()=>Promise.resolve().then(function(){return Wa}),mail:()=>Promise.resolve().then(function(){return Fa}),map:()=>Promise.resolve().then(function(){return Ka}),meetup:()=>Promise.resolve().then(function(){return Ya}),menu:()=>Promise.resolve().then(function(){return Qa}),microphone:()=>Promise.resolve().then(function(){return ts}),monitor:()=>Promise.resolve().then(function(){return rs}),moon:()=>Promise.resolve().then(function(){return os}),move:()=>Promise.resolve().then(function(){return as}),paperclip:()=>Promise.resolve().then(function(){return cs}),passcode:()=>Promise.resolve().then(function(){return hs}),passport:()=>Promise.resolve().then(function(){return vs}),pause:()=>Promise.resolve().then(function(){return fs}),pencil:()=>Promise.resolve().then(function(){return ws}),"pending-circle":()=>Promise.resolve().then(function(){return _s}),"person-dash":()=>Promise.resolve().then(function(){return xs}),"person-plus":()=>Promise.resolve().then(function(){return Cs}),"person-x":()=>Promise.resolve().then(function(){return Ms}),person:()=>Promise.resolve().then(function(){return Hs}),phone:()=>Promise.resolve().then(function(){return zs}),"pin-map-fill":()=>Promise.resolve().then(function(){return $s}),pin:()=>Promise.resolve().then(function(){return js}),placeholder:()=>Promise.resolve().then(function(){return Ls}),plane:()=>Promise.resolve().then(function(){return Ss}),play:()=>Promise.resolve().then(function(){return Ts}),"plus-circle":()=>Promise.resolve().then(function(){return Is}),"plus-square":()=>Promise.resolve().then(function(){return Ns}),plus:()=>Promise.resolve().then(function(){return Ws}),printer:()=>Promise.resolve().then(function(){return Fs}),"question-circle":()=>Promise.resolve().then(function(){return Ks}),rocket:()=>Promise.resolve().then(function(){return Ys}),save:()=>Promise.resolve().then(function(){return Qs}),search:()=>Promise.resolve().then(function(){return tc}),send:()=>Promise.resolve().then(function(){return rc}),"sg-crest":()=>Promise.resolve().then(function(){return oc}),share:()=>Promise.resolve().then(function(){return ac}),"shield-tick":()=>Promise.resolve().then(function(){return cc}),"sidebar-collapse":()=>Promise.resolve().then(function(){return hc}),"sidebar-expand":()=>Promise.resolve().then(function(){return vc}),"slash-circle":()=>Promise.resolve().then(function(){return fc}),"slash-divider":()=>Promise.resolve().then(function(){return wc}),sliders:()=>Promise.resolve().then(function(){return _c}),"sort-ascending":()=>Promise.resolve().then(function(){return xc}),"sort-descending":()=>Promise.resolve().then(function(){return Cc}),speedometer:()=>Promise.resolve().then(function(){return Mc}),"star-ai":()=>Promise.resolve().then(function(){return Hc}),"star-fill":()=>Promise.resolve().then(function(){return zc}),star:()=>Promise.resolve().then(function(){return $c}),stoplights:()=>Promise.resolve().then(function(){return jc}),sun:()=>Promise.resolve().then(function(){return Lc}),"switch-horizontal":()=>Promise.resolve().then(function(){return Sc}),"switch-vertical":()=>Promise.resolve().then(function(){return Tc}),tablet:()=>Promise.resolve().then(function(){return Ic}),telegram:()=>Promise.resolve().then(function(){return Nc}),telephone:()=>Promise.resolve().then(function(){return Wc}),"three-dots-vertical":()=>Promise.resolve().then(function(){return Fc}),"three-dots":()=>Promise.resolve().then(function(){return Kc}),ticket:()=>Promise.resolve().then(function(){return Yc}),"toggle-off":()=>Promise.resolve().then(function(){return Qc}),"toggle-on":()=>Promise.resolve().then(function(){return td}),train:()=>Promise.resolve().then(function(){return rd}),translate:()=>Promise.resolve().then(function(){return od}),trash:()=>Promise.resolve().then(function(){return ad}),"trend-down":()=>Promise.resolve().then(function(){return cd}),"trend-up":()=>Promise.resolve().then(function(){return hd}),truck:()=>Promise.resolve().then(function(){return vd}),"twitter-x":()=>Promise.resolve().then(function(){return fd}),unlock:()=>Promise.resolve().then(function(){return wd}),upload:()=>Promise.resolve().then(function(){return _d}),"user-check":()=>Promise.resolve().then(function(){return xd}),"user-circle":()=>Promise.resolve().then(function(){return Cd}),"user-pause":()=>Promise.resolve().then(function(){return Md}),"user-square":()=>Promise.resolve().then(function(){return Hd}),users:()=>Promise.resolve().then(function(){return zd}),"video-recorder":()=>Promise.resolve().then(function(){return $d}),"volume-max":()=>Promise.resolve().then(function(){return jd}),"volume-x":()=>Promise.resolve().then(function(){return Ld}),"window-dash":()=>Promise.resolve().then(function(){return Sd}),"window-desktop":()=>Promise.resolve().then(function(){return Td}),"window-dock":()=>Promise.resolve().then(function(){return Id}),"window-fullscreen":()=>Promise.resolve().then(function(){return Nd}),"window-plus":()=>Promise.resolve().then(function(){return Wd}),"window-sidebar":()=>Promise.resolve().then(function(){return Fd}),"window-split":()=>Promise.resolve().then(function(){return Kd}),"window-stack":()=>Promise.resolve().then(function(){return Yd}),"window-x":()=>Promise.resolve().then(function(){return Qd}),window:()=>Promise.resolve().then(function(){return th}),"xcircle-fill":()=>Promise.resolve().then(function(){return rh}),xcircle:()=>Promise.resolve().then(function(){return oh}),youtube:()=>Promise.resolve().then(function(){return ah}),"zoom-in":()=>Promise.resolve().then(function(){return ch}),"zoom-out":()=>Promise.resolve().then(function(){return hh})};var et=n`:host{color:inherit;display:inline-flex;vertical-align:bottom}:host(.icon-left){margin-right:.25rem}:host(.icon-right){margin-left:.25rem}:host([size=xs]) svg{height:var(--sgds-icon-size-xs);width:var(--sgds-icon-size-xs)}:host([size=sm]) svg{height:var(--sgds-icon-size-sm);width:var(--sgds-icon-size-sm)}:host([size=md]) svg{height:var(--sgds-icon-size-md);width:var(--sgds-icon-size-md)}:host([size=xl]) svg{height:var(--sgds-icon-size-xl);width:var(--sgds-icon-size-xl)}:host([size="2-xl"]) svg{height:var(--sgds-icon-size-2-xl);width:var(--sgds-icon-size-2-xl)}:host([size="3-xl"]) svg{height:var(--sgds-icon-size-3-xl);width:var(--sgds-icon-size-3-xl)}svg{display:inline-block;height:var(--sgds-icon-size-lg);width:var(--sgds-icon-size-lg)}`;const tt=new Map;class lt extends ke{constructor(){super(...arguments),this.size="lg"}willUpdate(e){e.has("name")&&this._loadIcon(this.name)}async _loadIcon(e){if(!e)return void(this._icon=void 0);if(tt.has(e))return void(this._icon=tt.get(e));const t=Qe[e];if(!t)return console.warn(`Icon not found: ${e}`),void(this._icon=void 0);try{const l=await t();tt.set(e,l.default),this._icon=l.default}catch(t){console.warn(`Failed to load icon: ${e}`),this._icon=void 0}}updated(){var e;const t=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector("svg");t&&(this.ariaLabel?(t.removeAttribute("aria-hidden"),t.setAttribute("aria-label",this.ariaLabel)):(t.removeAttribute("aria-label"),t.setAttribute("aria-hidden","true")))}render(){var e;return null!==(e=this._icon)&&void 0!==e?e:le}}lt.styles=[...ke.styles,et],e([Ve({type:String,reflect:!0})],lt.prototype,"name",void 0),e([Ve({type:String,reflect:!0})],lt.prototype,"size",void 0),e([Ve({type:String})],lt.prototype,"ariaLabel",void 0),e([He()],lt.prototype,"_icon",void 0),
|
|
93
93
|
/**
|
|
94
94
|
* @license
|
|
95
95
|
* Copyright 2020 Google LLC
|
|
@@ -101,14 +101,14 @@ window.ShadyDOM?.inUse&&!0===window.ShadyDOM?.noPatch&&window.ShadyDOM.wrap;
|
|
|
101
101
|
* Copyright 2020 Google LLC
|
|
102
102
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
103
103
|
*/
|
|
104
|
-
const rt=()=>new it;class it{}const ot=Math.min,nt=Math.max,at=Math.round,st=Math.floor,ct=e=>({x:e,y:e}),dt={left:"right",right:"left",bottom:"top",top:"bottom"},ht={start:"end",end:"start"};function ut(e,t,l){return nt(e,ot(t,l))}function vt(e,t){return"function"==typeof e?e(t):e}function pt(e){return e.split("-")[0]}function ft(e){return e.split("-")[1]}function gt(e){return"x"===e?"y":"x"}function wt(e){return"y"===e?"height":"width"}const mt=new Set(["top","bottom"]);function _t(e){return mt.has(pt(e))?"y":"x"}function bt(e){return gt(_t(e))}function xt(e,t,l){void 0===l&&(l=!1);const r=ft(e),i=bt(e),o=wt(i);let n="x"===i?r===(l?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(n=Pt(n)),[n,Pt(n)]}function Zt(e){return e.replace(/start|end/g,e=>ht[e])}const yt=["left","right"],Ct=["right","left"],Mt=["top","bottom"],Vt=["bottom","top"];function Ht(e,t,l,r){const i=ft(e);let o=function(e,t,l){switch(e){case"top":case"bottom":return l?t?Ct:yt:t?yt:Ct;case"left":case"right":return t?Mt:Vt;default:return[]}}(pt(e),"start"===l,r);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(Zt)))),o}function Pt(e){return e.replace(/left|right|bottom|top/g,e=>dt[e])}function zt(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Ot(e){const{x:t,y:l,width:r,height:i}=e;return{width:r,height:i,top:l,left:t,right:t+r,bottom:l+i,x:t,y:l}}function $t(e,t,l){let{reference:r,floating:i}=e;const o=_t(t),n=bt(t),a=wt(n),s=pt(t),c="y"===o,d=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,u=r[a]/2-i[a]/2;let v;switch(s){case"top":v={x:d,y:r.y-i.height};break;case"bottom":v={x:d,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:h};break;case"left":v={x:r.x-i.width,y:h};break;default:v={x:r.x,y:r.y}}switch(ft(t)){case"start":v[n]-=u*(l&&c?-1:1);break;case"end":v[n]+=u*(l&&c?-1:1)}return v}async function At(e,t){var l;void 0===t&&(t={});const{x:r,y:i,platform:o,rects:n,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:v=0}=vt(t,e),p=zt(v),f=a[u?"floating"===h?"reference":"floating":h],g=Ot(await o.getClippingRect({element:null==(l=await(null==o.isElement?void 0:o.isElement(f)))||l?f:f.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:s})),w="floating"===h?{x:r,y:i,width:n.floating.width,height:n.floating.height}:n.reference,m=await(null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),_=await(null==o.isElement?void 0:o.isElement(m))&&await(null==o.getScale?void 0:o.getScale(m))||{x:1,y:1},b=Ot(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:m,strategy:s}):w);return{top:(g.top-b.top+p.top)/_.y,bottom:(b.bottom-g.bottom+p.bottom)/_.y,left:(g.left-b.left+p.left)/_.x,right:(b.right-g.right+p.right)/_.x}}const jt=new Set(["left","top"]);function Bt(){return"undefined"!=typeof window}function Lt(e){return Et(e)?(e.nodeName||"").toLowerCase():"#document"}function kt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function St(e){var t;return null==(t=(Et(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Et(e){return!!Bt()&&(e instanceof Node||e instanceof kt(e).Node)}function Tt(e){return!!Bt()&&(e instanceof Element||e instanceof kt(e).Element)}function Rt(e){return!!Bt()&&(e instanceof HTMLElement||e instanceof kt(e).HTMLElement)}function It(e){return!(!Bt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof kt(e).ShadowRoot)}const Dt=new Set(["inline","contents"]);function Nt(e){const{overflow:t,overflowX:l,overflowY:r,display:i}=tl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+l)&&!Dt.has(i)}const Ut=new Set(["table","td","th"]);function Wt(e){return Ut.has(Lt(e))}const qt=[":popover-open",":modal"];function Ft(e){return qt.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Gt=["transform","translate","scale","rotate","perspective"],Kt=["transform","translate","scale","rotate","perspective","filter"],Jt=["paint","layout","strict","content"];function Yt(e){const t=Xt(),l=Tt(e)?tl(e):e;return Gt.some(e=>!!l[e]&&"none"!==l[e])||!!l.containerType&&"normal"!==l.containerType||!t&&!!l.backdropFilter&&"none"!==l.backdropFilter||!t&&!!l.filter&&"none"!==l.filter||Kt.some(e=>(l.willChange||"").includes(e))||Jt.some(e=>(l.contain||"").includes(e))}function Xt(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Qt=new Set(["html","body","#document"]);function el(e){return Qt.has(Lt(e))}function tl(e){return kt(e).getComputedStyle(e)}function ll(e){return Tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function rl(e){if("html"===Lt(e))return e;const t=e.assignedSlot||e.parentNode||It(e)&&e.host||St(e);return It(t)?t.host:t}function il(e){const t=rl(e);return el(t)?e.ownerDocument?e.ownerDocument.body:e.body:Rt(t)&&Nt(t)?t:il(t)}function ol(e,t,l){var r;void 0===t&&(t=[]),void 0===l&&(l=!0);const i=il(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),n=kt(i);if(o){const e=nl(n);return t.concat(n,n.visualViewport||[],Nt(i)?i:[],e&&l?ol(e):[])}return t.concat(i,ol(i,[],l))}function nl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function al(e){const t=tl(e);let l=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Rt(e),o=i?e.offsetWidth:l,n=i?e.offsetHeight:r,a=at(l)!==o||at(r)!==n;return a&&(l=o,r=n),{width:l,height:r,$:a}}function sl(e){return Tt(e)?e:e.contextElement}function cl(e){const t=sl(e);if(!Rt(t))return ct(1);const l=t.getBoundingClientRect(),{width:r,height:i,$:o}=al(t);let n=(o?at(l.width):l.width)/r,a=(o?at(l.height):l.height)/i;return n&&Number.isFinite(n)||(n=1),a&&Number.isFinite(a)||(a=1),{x:n,y:a}}const dl=ct(0);function hl(e){const t=kt(e);return Xt()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:dl}function ul(e,t,l,r){void 0===t&&(t=!1),void 0===l&&(l=!1);const i=e.getBoundingClientRect(),o=sl(e);let n=ct(1);t&&(r?Tt(r)&&(n=cl(r)):n=cl(e));const a=function(e,t,l){return void 0===t&&(t=!1),!(!l||t&&l!==kt(e))&&t}(o,l,r)?hl(o):ct(0);let s=(i.left+a.x)/n.x,c=(i.top+a.y)/n.y,d=i.width/n.x,h=i.height/n.y;if(o){const e=kt(o),t=r&&Tt(r)?kt(r):r;let l=e,i=nl(l);for(;i&&r&&t!==l;){const e=cl(i),t=i.getBoundingClientRect(),r=tl(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,n=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,h*=e.y,s+=o,c+=n,l=kt(i),i=nl(l)}}return Ot({width:d,height:h,x:s,y:c})}function vl(e,t){const l=ll(e).scrollLeft;return t?t.left+l:ul(St(e)).left+l}function pl(e,t){const l=e.getBoundingClientRect();return{x:l.left+t.scrollLeft-vl(e,l),y:l.top+t.scrollTop}}const fl=new Set(["absolute","fixed"]);function gl(e,t,l){let r;if("viewport"===t)r=function(e,t){const l=kt(e),r=St(e),i=l.visualViewport;let o=r.clientWidth,n=r.clientHeight,a=0,s=0;if(i){o=i.width,n=i.height;const e=Xt();(!e||e&&"fixed"===t)&&(a=i.offsetLeft,s=i.offsetTop)}const c=vl(r);if(c<=0){const e=r.ownerDocument,t=e.body,l=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(l.marginLeft)+parseFloat(l.marginRight)||0,n=Math.abs(r.clientWidth-t.clientWidth-i);n<=25&&(o-=n)}else c<=25&&(o+=c);return{width:o,height:n,x:a,y:s}}(e,l);else if("document"===t)r=function(e){const t=St(e),l=ll(e),r=e.ownerDocument.body,i=nt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=nt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let n=-l.scrollLeft+vl(e);const a=-l.scrollTop;return"rtl"===tl(r).direction&&(n+=nt(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:n,y:a}}(St(e));else if(Tt(t))r=function(e,t){const l=ul(e,!0,"fixed"===t),r=l.top+e.clientTop,i=l.left+e.clientLeft,o=Rt(e)?cl(e):ct(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,l);else{const l=hl(e);r={x:t.x-l.x,y:t.y-l.y,width:t.width,height:t.height}}return Ot(r)}function wl(e,t){const l=rl(e);return!(l===t||!Tt(l)||el(l))&&("fixed"===tl(l).position||wl(l,t))}function ml(e,t,l){const r=Rt(t),i=St(t),o="fixed"===l,n=ul(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const s=ct(0);function c(){s.x=vl(i)}if(r||!r&&!o)if(("body"!==Lt(t)||Nt(i))&&(a=ll(t)),r){const e=ul(t,!0,o,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&c();o&&!r&&i&&c();const d=!i||r||o?ct(0):pl(i,a);return{x:n.left+a.scrollLeft-s.x-d.x,y:n.top+a.scrollTop-s.y-d.y,width:n.width,height:n.height}}function _l(e){return"static"===tl(e).position}function bl(e,t){if(!Rt(e)||"fixed"===tl(e).position)return null;if(t)return t(e);let l=e.offsetParent;return St(e)===l&&(l=l.ownerDocument.body),l}function xl(e,t){const l=kt(e);if(Ft(e))return l;if(!Rt(e)){let t=rl(e);for(;t&&!el(t);){if(Tt(t)&&!_l(t))return t;t=rl(t)}return l}let r=bl(e,t);for(;r&&Wt(r)&&_l(r);)r=bl(r,t);return r&&el(r)&&_l(r)&&!Yt(r)?l:r||function(e){let t=rl(e);for(;Rt(t)&&!el(t);){if(Yt(t))return t;if(Ft(t))return null;t=rl(t)}return null}(e)||l}const Zl={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:l,offsetParent:r,strategy:i}=e;const o="fixed"===i,n=St(r),a=!!t&&Ft(t.floating);if(r===n||a&&o)return l;let s={scrollLeft:0,scrollTop:0},c=ct(1);const d=ct(0),h=Rt(r);if((h||!h&&!o)&&(("body"!==Lt(r)||Nt(n))&&(s=ll(r)),Rt(r))){const e=ul(r);c=cl(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const u=!n||h||o?ct(0):pl(n,s);return{width:l.width*c.x,height:l.height*c.y,x:l.x*c.x-s.scrollLeft*c.x+d.x+u.x,y:l.y*c.y-s.scrollTop*c.y+d.y+u.y}},getDocumentElement:St,getClippingRect:function(e){let{element:t,boundary:l,rootBoundary:r,strategy:i}=e;const o=[..."clippingAncestors"===l?Ft(t)?[]:function(e,t){const l=t.get(e);if(l)return l;let r=ol(e,[],!1).filter(e=>Tt(e)&&"body"!==Lt(e)),i=null;const o="fixed"===tl(e).position;let n=o?rl(e):e;for(;Tt(n)&&!el(n);){const t=tl(n),l=Yt(n);l||"fixed"!==t.position||(i=null),(o?!l&&!i:!l&&"static"===t.position&&i&&fl.has(i.position)||Nt(n)&&!l&&wl(e,n))?r=r.filter(e=>e!==n):i=t,n=rl(n)}return t.set(e,r),r}(t,this._c):[].concat(l),r],n=o[0],a=o.reduce((e,l)=>{const r=gl(t,l,i);return e.top=nt(r.top,e.top),e.right=ot(r.right,e.right),e.bottom=ot(r.bottom,e.bottom),e.left=nt(r.left,e.left),e},gl(t,n,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:xl,getElementRects:async function(e){const t=this.getOffsetParent||xl,l=this.getDimensions,r=await l(e.floating);return{reference:ml(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:l}=al(e);return{width:t,height:l}},getScale:cl,isElement:Tt,isRTL:function(e){return"rtl"===tl(e).direction}};function yl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Cl(e,t,l,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=sl(e),d=i||o?[...c?ol(c):[],...ol(t)]:[];d.forEach(e=>{i&&e.addEventListener("scroll",l,{passive:!0}),o&&e.addEventListener("resize",l)});const h=c&&a?function(e,t){let l,r=null;const i=St(e);function o(){var e;clearTimeout(l),null==(e=r)||e.disconnect(),r=null}return function n(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),o();const c=e.getBoundingClientRect(),{left:d,top:h,width:u,height:v}=c;if(a||t(),!u||!v)return;const p={rootMargin:-st(h)+"px "+-st(i.clientWidth-(d+u))+"px "+-st(i.clientHeight-(h+v))+"px "+-st(d)+"px",threshold:nt(0,ot(1,s))||1};let f=!0;function g(t){const r=t[0].intersectionRatio;if(r!==s){if(!f)return n();r?n(!1,r):l=setTimeout(()=>{n(!1,1e-7)},1e3)}1!==r||yl(c,e.getBoundingClientRect())||n(),f=!1}try{r=new IntersectionObserver(g,{...p,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(g,p)}r.observe(e)}(!0),o}(c,l):null;let u,v=-1,p=null;n&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),l()}),c&&!s&&p.observe(c),p.observe(t));let f=s?ul(e):null;return s&&function t(){const r=ul(e);f&&!yl(f,r)&&l();f=r,u=requestAnimationFrame(t)}(),l(),()=>{var e;d.forEach(e=>{i&&e.removeEventListener("scroll",l),o&&e.removeEventListener("resize",l)}),null==h||h(),null==(e=p)||e.disconnect(),p=null,s&&cancelAnimationFrame(u)}}const Ml=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var l,r;const{x:i,y:o,placement:n,middlewareData:a}=t,s=await async function(e,t){const{placement:l,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),n=pt(l),a=ft(l),s="y"===_t(l),c=jt.has(n)?-1:1,d=o&&s?-1:1,h=vt(t,e);let{mainAxis:u,crossAxis:v,alignmentAxis:p}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&"number"==typeof p&&(v="end"===a?-1*p:p),s?{x:v*d,y:u*c}:{x:u*c,y:v*d}}(t,e);return n===(null==(l=a.offset)?void 0:l.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:i+s.x,y:o+s.y,data:{...s,placement:n}}}}},Vl=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:l,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:n=!1,limiter:a={fn:e=>{let{x:t,y:l}=e;return{x:t,y:l}}},...s}=vt(e,t),c={x:l,y:r},d=await At(t,s),h=_t(pt(i)),u=gt(h);let v=c[u],p=c[h];if(o){const e="y"===u?"bottom":"right";v=ut(v+d["y"===u?"top":"left"],v,v-d[e])}if(n){const e="y"===h?"bottom":"right";p=ut(p+d["y"===h?"top":"left"],p,p-d[e])}const f=a.fn({...t,[u]:v,[h]:p});return{...f,data:{x:f.x-l,y:f.y-r,enabled:{[u]:o,[h]:n}}}}}},Hl=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var l,r;const{placement:i,middlewareData:o,rects:n,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:f=!0,...g}=vt(e,t);if(null!=(l=o.arrow)&&l.alignmentOffset)return{};const w=pt(i),m=_t(a),_=pt(a)===a,b=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=u||(_||!f?[Pt(a)]:function(e){const t=Pt(e);return[Zt(e),t,Zt(t)]}(a)),Z="none"!==p;!u&&Z&&x.push(...Ht(a,f,p,b));const y=[a,...x],C=await At(t,g),M=[];let V=(null==(r=o.flip)?void 0:r.overflows)||[];if(d&&M.push(C[w]),h){const e=xt(i,n,b);M.push(C[e[0]],C[e[1]])}if(V=[...V,{placement:i,overflows:M}],!M.every(e=>e<=0)){var H,P;const e=((null==(H=o.flip)?void 0:H.index)||0)+1,t=y[e];if(t){if(!("alignment"===h&&m!==_t(t))||V.every(e=>_t(e.placement)!==m||e.overflows[0]>0))return{data:{index:e,overflows:V},reset:{placement:t}}}let l=null==(P=V.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:P.placement;if(!l)switch(v){case"bestFit":{var z;const e=null==(z=V.filter(e=>{if(Z){const t=_t(e.placement);return t===m||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:z[0];e&&(l=e);break}case"initialPlacement":l=a}if(i!==l)return{reset:{placement:l}}}return{}}}},Pl=(e,t,l)=>{const r=new Map,i={platform:Zl,...l},o={...i.platform,_c:r};return(async(e,t,l)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:n}=l,a=o.filter(Boolean),s=await(null==n.isRTL?void 0:n.isRTL(t));let c=await n.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:h}=$t(c,r,s),u=r,v={},p=0;for(let l=0;l<a.length;l++){const{name:o,fn:f}=a[l],{x:g,y:w,data:m,reset:_}=await f({x:d,y:h,initialPlacement:r,placement:u,strategy:i,middlewareData:v,rects:c,platform:n,elements:{reference:e,floating:t}});d=null!=g?g:d,h=null!=w?w:h,v={...v,[o]:{...v[o],...m}},_&&p<=50&&(p++,"object"==typeof _&&(_.placement&&(u=_.placement),_.rects&&(c=!0===_.rects?await n.getElementRects({reference:e,floating:t,strategy:i}):_.rects),({x:d,y:h}=$t(c,u,s))),l=-1)}return{x:d,y:h,placement:u,strategy:i,middlewareData:v}})(e,t,{...i,platform:o})};class zl extends ke{constructor(){super(...arguments),this.myDropdown=rt(),this.dropdownMenuId=function(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}("dropdown-menu","div"),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.floatingOpts={},this.menuIsOpen=!1,this.close="default",this.disabled=!1,this.readonly=!1,this.menuRef=rt(),this._handleClickOutOfElement=e=>{this.menuIsOpen&&(e.composedPath().includes(this)||this.hideMenu(!0))}}connectedCallback(){super.connectedCallback(),"inside"!==this.close&&document.addEventListener("click",this._handleClickOutOfElement),this.addEventListener("keydown",this._handleKeyboardMenuEvent)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this.removeEventListener("keydown",this._handleKeyboardMenuEvent),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&requestAnimationFrame(async()=>{await this.updateFloatingPosition(),this._startAutoUpdate()})}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this._startAutoUpdate())}_startAutoUpdate(){this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=Cl(this.myDropdown.value,this.menuRef.value,()=>this.updateFloatingPosition()))}hideMenu(e){this.menuIsOpen&&(this.emit("sgds-hide",{detail:{isOutside:e}}),this.menuIsOpen=!1,setTimeout(()=>this.emit("sgds-after-hide"),0),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0))}toggleMenu(){this.menuIsOpen?this.hideMenu():this.showMenu()}_handleKeyboardMenuEvent(e){if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}}mergeMiddleware(e,t){const l=e=>{var t;return(null==e?void 0:e.name)||(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)},r=t.map(l),i=e.map(e=>{const i=l(e),o=r.indexOf(i);return-1!==o?t[o]:e}).concat(t.filter(t=>!e.some(e=>l(e)===l(t))));return i}async updateFloatingPosition(){if(!this.myDropdown.value||!this.menuRef.value)return;let e="bottom-start";switch(this.drop){case"up":e=this.menuAlignRight?"top-end":"top-start";break;case"right":e="right-start";break;case"left":e="left-start";break;case"down":e=this.menuAlignRight?"bottom-end":"bottom-start";break;default:e="bottom-start"}const t=[Ml(8),this.noFlip?void 0:Hl(),Vl()].filter(Boolean);let l=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(l=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const r=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:l}),{x:i,y:o,strategy:n,placement:a}=await Pl(this.myDropdown.value,this.menuRef.value,r);this.menuRef.value.setAttribute("data-placement",a),Object.assign(this.menuRef.value.style,{position:n,left:`${i}px`,top:`${o}px`})}}e([Ve({type:Boolean,state:!0})],zl.prototype,"noFlip",void 0),e([Ve({type:Boolean,reflect:!0,state:!0})],zl.prototype,"menuAlignRight",void 0),e([Ve({type:String,reflect:!0,state:!0})],zl.prototype,"drop",void 0),e([Ve({type:Object})],zl.prototype,"floatingOpts",void 0),e([Ve({type:Boolean,reflect:!0})],zl.prototype,"menuIsOpen",void 0),e([Ve({type:Boolean,reflect:!0})],zl.prototype,"disabled",void 0),e([Ve({type:Boolean,reflect:!0})],zl.prototype,"readonly",void 0);class Ol extends ke{constructor(){super(...arguments),this.title="",this.name="",this._sidebarCollapsed=!1,this._sidebarActiveItem=null,this._sidebarActiveGroup=null,this._drawerItems=null,this._showDrawer=!1,this._isOverlay=!1,this._childLevel=1,this._selected=!1,this._hidden=!1,this._childElements=[],this._childActive=!1}connectedCallback(){super.connectedCallback(),this._getChildLevel(),this.addEventListener("keydown",this._handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeyDown)}firstUpdated(e){super.firstUpdated(e),this._getChildLevel()}updated(){2===this._childLevel&&(this._hidden=!this.closest(".sidebar-nested-overlay"))}_handleSlotChange(){this._childElements=this._defaultNodes}_handleClick(){this.emit("i-sgds-click",{detail:{element:this,level:this._childLevel}})}_handleKeyDown(e){var t,l,r,i;const o=e.target;switch(e.key){case" ":case"Enter":return e.preventDefault(),e.stopPropagation(),void(e.target===this&&this._handleClick());case"ArrowDown":{e.preventDefault(),e.stopPropagation();const l=o._childElements[0],r=((null==l?void 0:l._hidden)?null:l)||o.nextElementSibling||(null===(t=o.parentElement)||void 0===t?void 0:t.nextElementSibling);if(null==r?void 0:r.shadowRoot){const e=r.shadowRoot.querySelector("[tabindex]");null==e||e.focus()}return}case"ArrowUp":{e.preventDefault(),e.stopPropagation();const t=null===(l=o.previousElementSibling)||void 0===l?void 0:l._childElements,r=t?t[(null==t?void 0:t.length)-1]:null,i=((null==r?void 0:r._hidden)?null:r)||o.previousElementSibling||o.parentElement;if(null==i?void 0:i.shadowRoot){const e=i.shadowRoot.querySelector("[tabindex]");null==e||e.focus()}return}case"ArrowLeft":if(e.preventDefault(),e.stopPropagation(),this._sidebarActiveGroup===this)this._showDrawer&&this._handleClick();else{if(o._childLevel>=2&&(null===(r=this._sidebarActiveGroup)||void 0===r?void 0:r.shadowRoot)){const e=this._sidebarActiveGroup.shadowRoot.querySelector("[tabindex]");null==e||e.focus()}}return;case"ArrowRight":if(e.preventDefault(),e.stopPropagation(),this._sidebarActiveGroup===this){if(null===(i=this._drawerItems)||void 0===i?void 0:i.length)if(this._showDrawer){const e=this._drawerItems[0];if(null==e?void 0:e.shadowRoot){const t=e.shadowRoot.querySelector("[tabindex]");null==t||t.focus()}}else this._handleClick()}else 1===this._childLevel&&this._childElements.length>0&&this._handleClick();return}}_getChildLevel(){let e=this.parentElement,t=1;for(;"sgds-sidebar-group"===(null==e?void 0:e.tagName.toLowerCase());)t+=1,e=e.parentElement;const l=null==e?void 0:e.classList.contains("sidebar-nested-overlay");this._childLevel=l?t+1:t}}Ol.styles=zl.styles,e([Ve({type:String,reflect:!0})],Ol.prototype,"title",void 0),e([Ve({type:String,reflect:!0})],Ol.prototype,"name",void 0),e([Ue({context:Fe,subscribe:!0}),He()],Ol.prototype,"_sidebarCollapsed",void 0),e([Ue({context:qe,subscribe:!0}),He()],Ol.prototype,"_sidebarActiveItem",void 0),e([Ue({context:We,subscribe:!0}),He()],Ol.prototype,"_sidebarActiveGroup",void 0),e([Ue({context:Ge,subscribe:!0}),He()],Ol.prototype,"_drawerItems",void 0),e([Ue({context:Ke,subscribe:!0}),He()],Ol.prototype,"_showDrawer",void 0),e([Ue({context:Je,subscribe:!0}),He()],Ol.prototype,"_isOverlay",void 0),e([He()],Ol.prototype,"_childLevel",void 0),e([He()],Ol.prototype,"_selected",void 0),e([He()],Ol.prototype,"_hidden",void 0),e([He()],Ol.prototype,"_childElements",void 0),e([He()],Ol.prototype,"_childActive",void 0),e([Oe({flatten:!0})],Ol.prototype,"_defaultNodes",void 0);class $l extends Ol{constructor(){super(...arguments),this._showMenu=!1}get showMenu(){return this._showMenu}_handleActiveItemContext(){this._childLevel>1&&this._sidebarActiveItem&&this.contains(this._sidebarActiveItem)&&(this._showMenu=!0)}_handleClick(){1!==this._childLevel?(this._showMenu=!this._showMenu,this._childElements.forEach(e=>{e._hidden=!this._showMenu})):super._handleClick()}_getIcon(){return 1===this._childLevel?"chevron-right":this._showMenu?"chevron-down":"chevron-up"}render(){return Q`
|
|
104
|
+
const rt=()=>new it;class it{}const ot=Math.min,nt=Math.max,at=Math.round,st=Math.floor,ct=e=>({x:e,y:e}),dt={left:"right",right:"left",bottom:"top",top:"bottom"},ht={start:"end",end:"start"};function ut(e,t,l){return nt(e,ot(t,l))}function vt(e,t){return"function"==typeof e?e(t):e}function pt(e){return e.split("-")[0]}function ft(e){return e.split("-")[1]}function gt(e){return"x"===e?"y":"x"}function wt(e){return"y"===e?"height":"width"}const mt=new Set(["top","bottom"]);function _t(e){return mt.has(pt(e))?"y":"x"}function bt(e){return gt(_t(e))}function xt(e,t,l){void 0===l&&(l=!1);const r=ft(e),i=bt(e),o=wt(i);let n="x"===i?r===(l?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[o]>t.floating[o]&&(n=Pt(n)),[n,Pt(n)]}function Zt(e){return e.replace(/start|end/g,e=>ht[e])}const Ct=["left","right"],yt=["right","left"],Mt=["top","bottom"],Vt=["bottom","top"];function Ht(e,t,l,r){const i=ft(e);let o=function(e,t,l){switch(e){case"top":case"bottom":return l?t?yt:Ct:t?Ct:yt;case"left":case"right":return t?Mt:Vt;default:return[]}}(pt(e),"start"===l,r);return i&&(o=o.map(e=>e+"-"+i),t&&(o=o.concat(o.map(Zt)))),o}function Pt(e){return e.replace(/left|right|bottom|top/g,e=>dt[e])}function zt(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function Ot(e){const{x:t,y:l,width:r,height:i}=e;return{width:r,height:i,top:l,left:t,right:t+r,bottom:l+i,x:t,y:l}}function $t(e,t,l){let{reference:r,floating:i}=e;const o=_t(t),n=bt(t),a=wt(n),s=pt(t),c="y"===o,d=r.x+r.width/2-i.width/2,h=r.y+r.height/2-i.height/2,u=r[a]/2-i[a]/2;let v;switch(s){case"top":v={x:d,y:r.y-i.height};break;case"bottom":v={x:d,y:r.y+r.height};break;case"right":v={x:r.x+r.width,y:h};break;case"left":v={x:r.x-i.width,y:h};break;default:v={x:r.x,y:r.y}}switch(ft(t)){case"start":v[n]-=u*(l&&c?-1:1);break;case"end":v[n]+=u*(l&&c?-1:1)}return v}async function At(e,t){var l;void 0===t&&(t={});const{x:r,y:i,platform:o,rects:n,elements:a,strategy:s}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:h="floating",altBoundary:u=!1,padding:v=0}=vt(t,e),p=zt(v),f=a[u?"floating"===h?"reference":"floating":h],g=Ot(await o.getClippingRect({element:null==(l=await(null==o.isElement?void 0:o.isElement(f)))||l?f:f.contextElement||await(null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:s})),w="floating"===h?{x:r,y:i,width:n.floating.width,height:n.floating.height}:n.reference,m=await(null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),_=await(null==o.isElement?void 0:o.isElement(m))&&await(null==o.getScale?void 0:o.getScale(m))||{x:1,y:1},b=Ot(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:m,strategy:s}):w);return{top:(g.top-b.top+p.top)/_.y,bottom:(b.bottom-g.bottom+p.bottom)/_.y,left:(g.left-b.left+p.left)/_.x,right:(b.right-g.right+p.right)/_.x}}const jt=new Set(["left","top"]);function Bt(){return"undefined"!=typeof window}function Lt(e){return Et(e)?(e.nodeName||"").toLowerCase():"#document"}function kt(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function St(e){var t;return null==(t=(Et(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function Et(e){return!!Bt()&&(e instanceof Node||e instanceof kt(e).Node)}function Tt(e){return!!Bt()&&(e instanceof Element||e instanceof kt(e).Element)}function Rt(e){return!!Bt()&&(e instanceof HTMLElement||e instanceof kt(e).HTMLElement)}function It(e){return!(!Bt()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof kt(e).ShadowRoot)}const Dt=new Set(["inline","contents"]);function Nt(e){const{overflow:t,overflowX:l,overflowY:r,display:i}=tl(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+l)&&!Dt.has(i)}const Ut=new Set(["table","td","th"]);function Wt(e){return Ut.has(Lt(e))}const qt=[":popover-open",":modal"];function Ft(e){return qt.some(t=>{try{return e.matches(t)}catch(e){return!1}})}const Gt=["transform","translate","scale","rotate","perspective"],Kt=["transform","translate","scale","rotate","perspective","filter"],Jt=["paint","layout","strict","content"];function Yt(e){const t=Xt(),l=Tt(e)?tl(e):e;return Gt.some(e=>!!l[e]&&"none"!==l[e])||!!l.containerType&&"normal"!==l.containerType||!t&&!!l.backdropFilter&&"none"!==l.backdropFilter||!t&&!!l.filter&&"none"!==l.filter||Kt.some(e=>(l.willChange||"").includes(e))||Jt.some(e=>(l.contain||"").includes(e))}function Xt(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}const Qt=new Set(["html","body","#document"]);function el(e){return Qt.has(Lt(e))}function tl(e){return kt(e).getComputedStyle(e)}function ll(e){return Tt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function rl(e){if("html"===Lt(e))return e;const t=e.assignedSlot||e.parentNode||It(e)&&e.host||St(e);return It(t)?t.host:t}function il(e){const t=rl(e);return el(t)?e.ownerDocument?e.ownerDocument.body:e.body:Rt(t)&&Nt(t)?t:il(t)}function ol(e,t,l){var r;void 0===t&&(t=[]),void 0===l&&(l=!0);const i=il(e),o=i===(null==(r=e.ownerDocument)?void 0:r.body),n=kt(i);if(o){const e=nl(n);return t.concat(n,n.visualViewport||[],Nt(i)?i:[],e&&l?ol(e):[])}return t.concat(i,ol(i,[],l))}function nl(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function al(e){const t=tl(e);let l=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Rt(e),o=i?e.offsetWidth:l,n=i?e.offsetHeight:r,a=at(l)!==o||at(r)!==n;return a&&(l=o,r=n),{width:l,height:r,$:a}}function sl(e){return Tt(e)?e:e.contextElement}function cl(e){const t=sl(e);if(!Rt(t))return ct(1);const l=t.getBoundingClientRect(),{width:r,height:i,$:o}=al(t);let n=(o?at(l.width):l.width)/r,a=(o?at(l.height):l.height)/i;return n&&Number.isFinite(n)||(n=1),a&&Number.isFinite(a)||(a=1),{x:n,y:a}}const dl=ct(0);function hl(e){const t=kt(e);return Xt()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:dl}function ul(e,t,l,r){void 0===t&&(t=!1),void 0===l&&(l=!1);const i=e.getBoundingClientRect(),o=sl(e);let n=ct(1);t&&(r?Tt(r)&&(n=cl(r)):n=cl(e));const a=function(e,t,l){return void 0===t&&(t=!1),!(!l||t&&l!==kt(e))&&t}(o,l,r)?hl(o):ct(0);let s=(i.left+a.x)/n.x,c=(i.top+a.y)/n.y,d=i.width/n.x,h=i.height/n.y;if(o){const e=kt(o),t=r&&Tt(r)?kt(r):r;let l=e,i=nl(l);for(;i&&r&&t!==l;){const e=cl(i),t=i.getBoundingClientRect(),r=tl(i),o=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,n=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;s*=e.x,c*=e.y,d*=e.x,h*=e.y,s+=o,c+=n,l=kt(i),i=nl(l)}}return Ot({width:d,height:h,x:s,y:c})}function vl(e,t){const l=ll(e).scrollLeft;return t?t.left+l:ul(St(e)).left+l}function pl(e,t){const l=e.getBoundingClientRect();return{x:l.left+t.scrollLeft-vl(e,l),y:l.top+t.scrollTop}}const fl=new Set(["absolute","fixed"]);function gl(e,t,l){let r;if("viewport"===t)r=function(e,t){const l=kt(e),r=St(e),i=l.visualViewport;let o=r.clientWidth,n=r.clientHeight,a=0,s=0;if(i){o=i.width,n=i.height;const e=Xt();(!e||e&&"fixed"===t)&&(a=i.offsetLeft,s=i.offsetTop)}const c=vl(r);if(c<=0){const e=r.ownerDocument,t=e.body,l=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(l.marginLeft)+parseFloat(l.marginRight)||0,n=Math.abs(r.clientWidth-t.clientWidth-i);n<=25&&(o-=n)}else c<=25&&(o+=c);return{width:o,height:n,x:a,y:s}}(e,l);else if("document"===t)r=function(e){const t=St(e),l=ll(e),r=e.ownerDocument.body,i=nt(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=nt(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let n=-l.scrollLeft+vl(e);const a=-l.scrollTop;return"rtl"===tl(r).direction&&(n+=nt(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:n,y:a}}(St(e));else if(Tt(t))r=function(e,t){const l=ul(e,!0,"fixed"===t),r=l.top+e.clientTop,i=l.left+e.clientLeft,o=Rt(e)?cl(e):ct(1);return{width:e.clientWidth*o.x,height:e.clientHeight*o.y,x:i*o.x,y:r*o.y}}(t,l);else{const l=hl(e);r={x:t.x-l.x,y:t.y-l.y,width:t.width,height:t.height}}return Ot(r)}function wl(e,t){const l=rl(e);return!(l===t||!Tt(l)||el(l))&&("fixed"===tl(l).position||wl(l,t))}function ml(e,t,l){const r=Rt(t),i=St(t),o="fixed"===l,n=ul(e,!0,o,t);let a={scrollLeft:0,scrollTop:0};const s=ct(0);function c(){s.x=vl(i)}if(r||!r&&!o)if(("body"!==Lt(t)||Nt(i))&&(a=ll(t)),r){const e=ul(t,!0,o,t);s.x=e.x+t.clientLeft,s.y=e.y+t.clientTop}else i&&c();o&&!r&&i&&c();const d=!i||r||o?ct(0):pl(i,a);return{x:n.left+a.scrollLeft-s.x-d.x,y:n.top+a.scrollTop-s.y-d.y,width:n.width,height:n.height}}function _l(e){return"static"===tl(e).position}function bl(e,t){if(!Rt(e)||"fixed"===tl(e).position)return null;if(t)return t(e);let l=e.offsetParent;return St(e)===l&&(l=l.ownerDocument.body),l}function xl(e,t){const l=kt(e);if(Ft(e))return l;if(!Rt(e)){let t=rl(e);for(;t&&!el(t);){if(Tt(t)&&!_l(t))return t;t=rl(t)}return l}let r=bl(e,t);for(;r&&Wt(r)&&_l(r);)r=bl(r,t);return r&&el(r)&&_l(r)&&!Yt(r)?l:r||function(e){let t=rl(e);for(;Rt(t)&&!el(t);){if(Yt(t))return t;if(Ft(t))return null;t=rl(t)}return null}(e)||l}const Zl={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:l,offsetParent:r,strategy:i}=e;const o="fixed"===i,n=St(r),a=!!t&&Ft(t.floating);if(r===n||a&&o)return l;let s={scrollLeft:0,scrollTop:0},c=ct(1);const d=ct(0),h=Rt(r);if((h||!h&&!o)&&(("body"!==Lt(r)||Nt(n))&&(s=ll(r)),Rt(r))){const e=ul(r);c=cl(r),d.x=e.x+r.clientLeft,d.y=e.y+r.clientTop}const u=!n||h||o?ct(0):pl(n,s);return{width:l.width*c.x,height:l.height*c.y,x:l.x*c.x-s.scrollLeft*c.x+d.x+u.x,y:l.y*c.y-s.scrollTop*c.y+d.y+u.y}},getDocumentElement:St,getClippingRect:function(e){let{element:t,boundary:l,rootBoundary:r,strategy:i}=e;const o=[..."clippingAncestors"===l?Ft(t)?[]:function(e,t){const l=t.get(e);if(l)return l;let r=ol(e,[],!1).filter(e=>Tt(e)&&"body"!==Lt(e)),i=null;const o="fixed"===tl(e).position;let n=o?rl(e):e;for(;Tt(n)&&!el(n);){const t=tl(n),l=Yt(n);l||"fixed"!==t.position||(i=null),(o?!l&&!i:!l&&"static"===t.position&&i&&fl.has(i.position)||Nt(n)&&!l&&wl(e,n))?r=r.filter(e=>e!==n):i=t,n=rl(n)}return t.set(e,r),r}(t,this._c):[].concat(l),r],n=o[0],a=o.reduce((e,l)=>{const r=gl(t,l,i);return e.top=nt(r.top,e.top),e.right=ot(r.right,e.right),e.bottom=ot(r.bottom,e.bottom),e.left=nt(r.left,e.left),e},gl(t,n,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:xl,getElementRects:async function(e){const t=this.getOffsetParent||xl,l=this.getDimensions,r=await l(e.floating);return{reference:ml(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:l}=al(e);return{width:t,height:l}},getScale:cl,isElement:Tt,isRTL:function(e){return"rtl"===tl(e).direction}};function Cl(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yl(e,t,l,r){void 0===r&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:n="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:s=!1}=r,c=sl(e),d=i||o?[...c?ol(c):[],...ol(t)]:[];d.forEach(e=>{i&&e.addEventListener("scroll",l,{passive:!0}),o&&e.addEventListener("resize",l)});const h=c&&a?function(e,t){let l,r=null;const i=St(e);function o(){var e;clearTimeout(l),null==(e=r)||e.disconnect(),r=null}return function n(a,s){void 0===a&&(a=!1),void 0===s&&(s=1),o();const c=e.getBoundingClientRect(),{left:d,top:h,width:u,height:v}=c;if(a||t(),!u||!v)return;const p={rootMargin:-st(h)+"px "+-st(i.clientWidth-(d+u))+"px "+-st(i.clientHeight-(h+v))+"px "+-st(d)+"px",threshold:nt(0,ot(1,s))||1};let f=!0;function g(t){const r=t[0].intersectionRatio;if(r!==s){if(!f)return n();r?n(!1,r):l=setTimeout(()=>{n(!1,1e-7)},1e3)}1!==r||Cl(c,e.getBoundingClientRect())||n(),f=!1}try{r=new IntersectionObserver(g,{...p,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(g,p)}r.observe(e)}(!0),o}(c,l):null;let u,v=-1,p=null;n&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&p&&(p.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var e;null==(e=p)||e.observe(t)})),l()}),c&&!s&&p.observe(c),p.observe(t));let f=s?ul(e):null;return s&&function t(){const r=ul(e);f&&!Cl(f,r)&&l();f=r,u=requestAnimationFrame(t)}(),l(),()=>{var e;d.forEach(e=>{i&&e.removeEventListener("scroll",l),o&&e.removeEventListener("resize",l)}),null==h||h(),null==(e=p)||e.disconnect(),p=null,s&&cancelAnimationFrame(u)}}const Ml=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var l,r;const{x:i,y:o,placement:n,middlewareData:a}=t,s=await async function(e,t){const{placement:l,platform:r,elements:i}=e,o=await(null==r.isRTL?void 0:r.isRTL(i.floating)),n=pt(l),a=ft(l),s="y"===_t(l),c=jt.has(n)?-1:1,d=o&&s?-1:1,h=vt(t,e);let{mainAxis:u,crossAxis:v,alignmentAxis:p}="number"==typeof h?{mainAxis:h,crossAxis:0,alignmentAxis:null}:{mainAxis:h.mainAxis||0,crossAxis:h.crossAxis||0,alignmentAxis:h.alignmentAxis};return a&&"number"==typeof p&&(v="end"===a?-1*p:p),s?{x:v*d,y:u*c}:{x:u*c,y:v*d}}(t,e);return n===(null==(l=a.offset)?void 0:l.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:i+s.x,y:o+s.y,data:{...s,placement:n}}}}},Vl=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:l,y:r,placement:i}=t,{mainAxis:o=!0,crossAxis:n=!1,limiter:a={fn:e=>{let{x:t,y:l}=e;return{x:t,y:l}}},...s}=vt(e,t),c={x:l,y:r},d=await At(t,s),h=_t(pt(i)),u=gt(h);let v=c[u],p=c[h];if(o){const e="y"===u?"bottom":"right";v=ut(v+d["y"===u?"top":"left"],v,v-d[e])}if(n){const e="y"===h?"bottom":"right";p=ut(p+d["y"===h?"top":"left"],p,p-d[e])}const f=a.fn({...t,[u]:v,[h]:p});return{...f,data:{x:f.x-l,y:f.y-r,enabled:{[u]:o,[h]:n}}}}}},Hl=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var l,r;const{placement:i,middlewareData:o,rects:n,initialPlacement:a,platform:s,elements:c}=t,{mainAxis:d=!0,crossAxis:h=!0,fallbackPlacements:u,fallbackStrategy:v="bestFit",fallbackAxisSideDirection:p="none",flipAlignment:f=!0,...g}=vt(e,t);if(null!=(l=o.arrow)&&l.alignmentOffset)return{};const w=pt(i),m=_t(a),_=pt(a)===a,b=await(null==s.isRTL?void 0:s.isRTL(c.floating)),x=u||(_||!f?[Pt(a)]:function(e){const t=Pt(e);return[Zt(e),t,Zt(t)]}(a)),Z="none"!==p;!u&&Z&&x.push(...Ht(a,f,p,b));const C=[a,...x],y=await At(t,g),M=[];let V=(null==(r=o.flip)?void 0:r.overflows)||[];if(d&&M.push(y[w]),h){const e=xt(i,n,b);M.push(y[e[0]],y[e[1]])}if(V=[...V,{placement:i,overflows:M}],!M.every(e=>e<=0)){var H,P;const e=((null==(H=o.flip)?void 0:H.index)||0)+1,t=C[e];if(t){if(!("alignment"===h&&m!==_t(t))||V.every(e=>_t(e.placement)!==m||e.overflows[0]>0))return{data:{index:e,overflows:V},reset:{placement:t}}}let l=null==(P=V.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:P.placement;if(!l)switch(v){case"bestFit":{var z;const e=null==(z=V.filter(e=>{if(Z){const t=_t(e.placement);return t===m||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:z[0];e&&(l=e);break}case"initialPlacement":l=a}if(i!==l)return{reset:{placement:l}}}return{}}}},Pl=(e,t,l)=>{const r=new Map,i={platform:Zl,...l},o={...i.platform,_c:r};return(async(e,t,l)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:n}=l,a=o.filter(Boolean),s=await(null==n.isRTL?void 0:n.isRTL(t));let c=await n.getElementRects({reference:e,floating:t,strategy:i}),{x:d,y:h}=$t(c,r,s),u=r,v={},p=0;for(let l=0;l<a.length;l++){const{name:o,fn:f}=a[l],{x:g,y:w,data:m,reset:_}=await f({x:d,y:h,initialPlacement:r,placement:u,strategy:i,middlewareData:v,rects:c,platform:n,elements:{reference:e,floating:t}});d=null!=g?g:d,h=null!=w?w:h,v={...v,[o]:{...v[o],...m}},_&&p<=50&&(p++,"object"==typeof _&&(_.placement&&(u=_.placement),_.rects&&(c=!0===_.rects?await n.getElementRects({reference:e,floating:t,strategy:i}):_.rects),({x:d,y:h}=$t(c,u,s))),l=-1)}return{x:d,y:h,placement:u,strategy:i,middlewareData:v}})(e,t,{...i,platform:o})};class zl extends ke{constructor(){super(...arguments),this.myDropdown=rt(),this.dropdownMenuId=function(e="",t=""){return`id-${Math.random().toString().substring(2,6)}-sgds-${e}-${t}`}("dropdown-menu","div"),this.noFlip=!1,this.menuAlignRight=!1,this.drop="down",this.floatingOpts={},this.menuIsOpen=!1,this.close="default",this.disabled=!1,this.readonly=!1,this.menuRef=rt(),this._handleClickOutOfElement=e=>{this.menuIsOpen&&(e.composedPath().includes(this)||this.hideMenu(!0))}}connectedCallback(){super.connectedCallback(),"inside"!==this.close&&document.addEventListener("click",this._handleClickOutOfElement),this.addEventListener("keydown",this._handleKeyboardMenuEvent)}disconnectedCallback(){super.disconnectedCallback(),document.removeEventListener("click",this._handleClickOutOfElement),this.removeEventListener("keydown",this._handleKeyboardMenuEvent),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0)}firstUpdated(e){super.firstUpdated(e),this.menuIsOpen&&requestAnimationFrame(async()=>{await this.updateFloatingPosition(),this._startAutoUpdate()})}async showMenu(){this.disabled||this.menuIsOpen||(this.menuIsOpen=!0,this.emit("sgds-show"),await this.updateFloatingPosition(),this.emit("sgds-after-show"),this._startAutoUpdate())}_startAutoUpdate(){this.myDropdown.value&&this.menuRef.value&&(this._cleanupAutoUpdate=yl(this.myDropdown.value,this.menuRef.value,()=>this.updateFloatingPosition()))}hideMenu(e){this.menuIsOpen&&(this.emit("sgds-hide",{detail:{isOutside:e}}),this.menuIsOpen=!1,setTimeout(()=>this.emit("sgds-after-hide"),0),this._cleanupAutoUpdate&&(this._cleanupAutoUpdate(),this._cleanupAutoUpdate=void 0))}toggleMenu(){this.menuIsOpen?this.hideMenu():this.showMenu()}_handleKeyboardMenuEvent(e){if(!this.readonly)switch(e.key){case"ArrowDown":case"ArrowUp":e.preventDefault(),this.menuIsOpen||this.showMenu();break;case"Escape":this.hideMenu()}}mergeMiddleware(e,t){const l=e=>{var t;return(null==e?void 0:e.name)||(null===(t=null==e?void 0:e.constructor)||void 0===t?void 0:t.name)},r=t.map(l),i=e.map(e=>{const i=l(e),o=r.indexOf(i);return-1!==o?t[o]:e}).concat(t.filter(t=>!e.some(e=>l(e)===l(t))));return i}async updateFloatingPosition(){if(!this.myDropdown.value||!this.menuRef.value)return;let e="bottom-start";switch(this.drop){case"up":e=this.menuAlignRight?"top-end":"top-start";break;case"right":e="right-start";break;case"left":e="left-start";break;case"down":e=this.menuAlignRight?"bottom-end":"bottom-start";break;default:e="bottom-start"}const t=[Ml(8),this.noFlip?void 0:Hl(),Vl()].filter(Boolean);let l=t;Array.isArray(this.floatingOpts.middleware)&&this.floatingOpts.middleware.length>0&&(l=this.mergeMiddleware(t,this.floatingOpts.middleware.filter(Boolean)));const r=Object.assign(Object.assign({strategy:"fixed",placement:e},this.floatingOpts),{middleware:l}),{x:i,y:o,strategy:n,placement:a}=await Pl(this.myDropdown.value,this.menuRef.value,r);this.menuRef.value.setAttribute("data-placement",a),Object.assign(this.menuRef.value.style,{position:n,left:`${i}px`,top:`${o}px`})}}e([Ve({type:Boolean,state:!0})],zl.prototype,"noFlip",void 0),e([Ve({type:Boolean,reflect:!0,state:!0})],zl.prototype,"menuAlignRight",void 0),e([Ve({type:String,reflect:!0,state:!0})],zl.prototype,"drop",void 0),e([Ve({type:Object})],zl.prototype,"floatingOpts",void 0),e([Ve({type:Boolean,reflect:!0})],zl.prototype,"menuIsOpen",void 0),e([Ve({type:Boolean,reflect:!0})],zl.prototype,"disabled",void 0),e([Ve({type:Boolean,reflect:!0})],zl.prototype,"readonly",void 0);class Ol extends ke{constructor(){super(...arguments),this.title="",this.name="",this._sidebarCollapsed=!1,this._sidebarActiveItem=null,this._sidebarActiveGroup=null,this._drawerItems=null,this._showDrawer=!1,this._isOverlay=!1,this._childLevel=1,this._selected=!1,this._hidden=!1,this._childElements=[],this._childActive=!1}connectedCallback(){super.connectedCallback(),this._getChildLevel(),this.addEventListener("keydown",this._handleKeyDown)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("keydown",this._handleKeyDown)}firstUpdated(e){super.firstUpdated(e),this._getChildLevel()}updated(){var e;if(2===this._childLevel)this._hidden=!this.closest(".sidebar-nested-overlay");else if(this._childLevel>=3){const t=!!this.closest(".sidebar-nested-overlay"),l=this.parentElement,r=null!==(e=null==l?void 0:l.showMenu)&&void 0!==e&&e;this._hidden=!t||!r}}_handleSlotChange(){this._childElements=this._defaultNodes}_handleClick(){this.emit("i-sgds-click",{detail:{element:this,level:this._childLevel}})}_handleKeyDown(e){var t,l;const r=e.target;switch(e.key){case" ":case"Enter":return e.preventDefault(),e.stopPropagation(),void(e.target===this&&this._handleClick());case"ArrowLeft":if(e.preventDefault(),e.stopPropagation(),this._sidebarActiveGroup===this)this._showDrawer&&this._handleClick();else{if(r._childLevel>=2&&(null===(t=this._sidebarActiveGroup)||void 0===t?void 0:t.shadowRoot)){const e=this._sidebarActiveGroup.shadowRoot.querySelector("[tabindex]");null==e||e.focus()}}return;case"ArrowRight":if(e.preventDefault(),e.stopPropagation(),this._sidebarActiveGroup===this){if(null===(l=this._drawerItems)||void 0===l?void 0:l.length)if(this._showDrawer){const e=this._drawerItems[0];if(null==e?void 0:e.shadowRoot){const t=e.shadowRoot.querySelector("[tabindex]");null==t||t.focus()}}else this._handleClick()}else 1===this._childLevel&&this._childElements.length>0&&this._handleClick();return}}_getChildLevel(){let e=this.parentElement,t=1;for(;"sgds-sidebar-group"===(null==e?void 0:e.tagName.toLowerCase());)t+=1,e=e.parentElement;const l=null==e?void 0:e.classList.contains("sidebar-nested-overlay");this._childLevel=l?t+1:t}}Ol.styles=zl.styles,e([Ve({type:String,reflect:!0})],Ol.prototype,"title",void 0),e([Ve({type:String,reflect:!0})],Ol.prototype,"name",void 0),e([Ue({context:Fe,subscribe:!0}),He()],Ol.prototype,"_sidebarCollapsed",void 0),e([Ue({context:qe,subscribe:!0}),He()],Ol.prototype,"_sidebarActiveItem",void 0),e([Ue({context:We,subscribe:!0}),He()],Ol.prototype,"_sidebarActiveGroup",void 0),e([Ue({context:Ge,subscribe:!0}),He()],Ol.prototype,"_drawerItems",void 0),e([Ue({context:Ke,subscribe:!0}),He()],Ol.prototype,"_showDrawer",void 0),e([Ue({context:Je,subscribe:!0}),He()],Ol.prototype,"_isOverlay",void 0),e([He()],Ol.prototype,"_childLevel",void 0),e([He()],Ol.prototype,"_selected",void 0),e([He()],Ol.prototype,"_hidden",void 0),e([He()],Ol.prototype,"_childElements",void 0),e([He()],Ol.prototype,"_childActive",void 0),e([Oe({flatten:!0})],Ol.prototype,"_defaultNodes",void 0);class $l extends Ol{constructor(){super(...arguments),this._showMenu=!1}get showMenu(){return this._showMenu}_handleActiveItemContext(){this._childLevel>1&&this._sidebarActiveItem&&this.contains(this._sidebarActiveItem)&&(this._showMenu=!0)}_handleClick(){1!==this._childLevel?(this._showMenu=!this._showMenu,this._childElements.forEach(e=>{e._hidden=!this._showMenu})):super._handleClick()}_getIcon(){return 1===this._childLevel?"chevron-right":this._showMenu?"chevron-down":"chevron-up"}_handleSlotChange(){super._handleSlotChange(),this._childElements.forEach(e=>{e._hidden=!this._showMenu})}render(){return Q`
|
|
105
105
|
<div
|
|
106
106
|
role="button"
|
|
107
107
|
class=${je({"sidebar-item":!0,"sidebar-item--collapsed":!this._isOverlay&&this._sidebarCollapsed&&1===this._childLevel,active:this._selected})}
|
|
108
108
|
@click=${()=>this._handleClick()}
|
|
109
109
|
aria-label=${this.title||this.name}
|
|
110
110
|
aria-expanded=${this._showMenu}
|
|
111
|
-
tabindex=${this.
|
|
111
|
+
tabindex=${this._hidden?-1:0}
|
|
112
112
|
>
|
|
113
113
|
<div class="sidebar-item-label-wrapper">
|
|
114
114
|
<div>
|
|
@@ -254,7 +254,7 @@ const Al=e=>e??le,jl=Symbol.for(""),Bl=e=>{if(e?.r===jl)return e?._$litStatic$},
|
|
|
254
254
|
</span>`:le}
|
|
255
255
|
</div>
|
|
256
256
|
</div>
|
|
257
|
-
`}}Kl.styles=[...ke.styles,Xe];var Jl=n`.sidebar-section{display:flex;flex-direction:column}.sidebar-section-label{align-items:center;border-radius:var(--sgds-border-radius-md);color:var(--sgds-label-color-subtle);cursor:pointer;display:flex;font-size:var(--sgds-font-size-label-xs);gap:var(--sgds-gap-2-xs);line-height:var(--sgds-line-height-2-xs);padding:var(--sgds-padding-xs) var(--sgds-padding-sm)}.sidebar-section-label--collapsible{cursor:pointer}.sidebar-section-label--collapsible:focus-visible,.sidebar-section-label--collapsible:hover{color:var(--sgds-label-color-default)}.sidebar-section-label--collapsible:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.sidebar-section--collapsed .sidebar-section-label{height:0;margin:0;opacity:0;overflow:hidden;padding:0;pointer-events:none;width:0}.sidebar-section-content{overflow:hidden;padding:0 var(--sgds-padding-xs)}.sidebar-section-content>div{margin-top:0;pointer-events:auto;transition:all var(--sgds-motion-duration-slow) var(--sgds-motion-easing-standard)}.sidebar-section-content.sidebar-section-content--collapsed>div{margin-top:-100%;pointer-events:none}.sidebar-section--collapsed .sidebar-section-content--collapsed>div{margin-top:0}.sidebar-section-separator{margin-bottom:var(--sgds-margin-md)}`,Yl=n`:host{--container-size:8px}:host([orientation=horizontal]){border-top:var(--border-width) solid var(--sgds-border-color-muted);display:block;margin:calc((var(--container-size) - var(--border-width))/2) 0;width:100%}:host([orientation=vertical]){border-left:var(--border-width) solid var(--sgds-border-color-muted);display:inline-block;height:100%;margin:0 calc((var(--container-size) - var(--border-width))/2)}:host([thickness=thin]){--border-width:var(--sgds-border-width-1)}:host([thickness=thick]){--border-width:var(--sgds-border-width-2)}:host([thickness=thicker]){--border-width:var(--sgds-border-width-4)}`;class Xl extends ke{constructor(){super(...arguments),this.orientation="horizontal",this.thickness="thin"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator"),this.setAttribute("aria-orientation",this.orientation)}}Xl.styles=[Yl],e([Ve({type:String,reflect:!0})],Xl.prototype,"orientation",void 0),e([Ve({type:String,reflect:!0})],Xl.prototype,"thickness",void 0);class Ql extends Ol{constructor(){super(...arguments),this.title="",this.collapsed=!1,this.collapsible=!1,this.separator=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group"),this._childLevel=-1}updated(){super.updated(),this.title?this.setAttribute("aria-label",this.title):this.removeAttribute("aria-label")}_handleClick(){this.collapsible&&(this.collapsed=!this.collapsed)}render(){return Q`
|
|
257
|
+
`}}Kl.styles=[...ke.styles,Xe];var Jl=n`.sidebar-section{display:flex;flex-direction:column}.sidebar-section-label{align-items:center;border-radius:var(--sgds-border-radius-md);color:var(--sgds-label-color-subtle);cursor:pointer;display:flex;font-size:var(--sgds-font-size-label-xs);gap:var(--sgds-gap-2-xs);line-height:var(--sgds-line-height-2-xs);padding:var(--sgds-padding-xs) var(--sgds-padding-sm)}.sidebar-section-label--collapsible{cursor:pointer}.sidebar-section-label--collapsible:focus-visible,.sidebar-section-label--collapsible:hover{color:var(--sgds-label-color-default)}.sidebar-section-label--collapsible:focus-visible{outline:var(--sgds-outline-focus);outline-offset:var(--sgds-outline-offset-focus)}.sidebar-section--collapsed .sidebar-section-label{height:0;margin:0;opacity:0;overflow:hidden;padding:0;pointer-events:none;width:0}.sidebar-section-content{overflow:hidden;padding:0 var(--sgds-padding-xs)}.sidebar-section-content>div{margin-top:0;pointer-events:auto;transition:all var(--sgds-motion-duration-slow) var(--sgds-motion-easing-standard)}.sidebar-section-content.sidebar-section-content--collapsed>div{margin-top:-100%;pointer-events:none}.sidebar-section--collapsed .sidebar-section-content--collapsed>div{margin-top:0}.sidebar-section-separator{margin-bottom:var(--sgds-margin-md)}`,Yl=n`:host{--container-size:8px}:host([orientation=horizontal]){border-top:var(--border-width) solid var(--sgds-border-color-muted);display:block;margin:calc((var(--container-size) - var(--border-width))/2) 0;width:100%}:host([orientation=vertical]){border-left:var(--border-width) solid var(--sgds-border-color-muted);display:inline-block;height:100%;margin:0 calc((var(--container-size) - var(--border-width))/2)}:host([thickness=thin]){--border-width:var(--sgds-border-width-1)}:host([thickness=thick]){--border-width:var(--sgds-border-width-2)}:host([thickness=thicker]){--border-width:var(--sgds-border-width-4)}`;class Xl extends ke{constructor(){super(...arguments),this.orientation="horizontal",this.thickness="thin"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator"),this.setAttribute("aria-orientation",this.orientation)}}Xl.styles=[Yl],e([Ve({type:String,reflect:!0})],Xl.prototype,"orientation",void 0),e([Ve({type:String,reflect:!0})],Xl.prototype,"thickness",void 0);class Ql extends Ol{constructor(){super(...arguments),this.title="",this.collapsed=!1,this.collapsible=!1,this.separator=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group"),this._childLevel=-1}updated(){super.updated(),this.title?this.setAttribute("aria-label",this.title):this.removeAttribute("aria-label")}_handleClick(){this.collapsible&&(this.collapsed=!this.collapsed,this._childElements.forEach(e=>{e._hidden=this.collapsed}))}_handleSlotChange(){super._handleSlotChange(),this._childElements.forEach(e=>{e._hidden=this.collapsed})}render(){return Q`
|
|
258
258
|
<div
|
|
259
259
|
class=${je({"sidebar-section":!0,"sidebar-section--collapsed":!this._isOverlay&&this._sidebarCollapsed})}
|
|
260
260
|
>
|
|
@@ -264,7 +264,7 @@ const Al=e=>e??le,jl=Symbol.for(""),Bl=e=>{if(e?.r===jl)return e?._$litStatic$},
|
|
|
264
264
|
@click=${this._handleClick}
|
|
265
265
|
aria-expanded=${!this.collapsed}
|
|
266
266
|
aria-disabled=${!this.collapsible}
|
|
267
|
-
tabindex=${this.collapsible?0:-1}
|
|
267
|
+
tabindex=${this.collapsible&&!this._sidebarCollapsed?0:-1}
|
|
268
268
|
>
|
|
269
269
|
<span>${this.title}</span>
|
|
270
270
|
${this.collapsible?Q`<sgds-icon name=${this.collapsed?"chevron-down":"chevron-up"} size="sm"></sgds-icon>`:le}
|
|
@@ -398,7 +398,7 @@ const Al=e=>e??le,jl=Symbol.for(""),Bl=e=>{if(e?.r===jl)return e?._$litStatic$},
|
|
|
398
398
|
clip-rule="evenodd"
|
|
399
399
|
/>
|
|
400
400
|
</svg>
|
|
401
|
-
`,
|
|
401
|
+
`,Cr=Object.freeze({__proto__:null,default:Zr}),yr=Q`
|
|
402
402
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
403
403
|
<path
|
|
404
404
|
fill="currentColor"
|
|
@@ -407,7 +407,7 @@ const Al=e=>e??le,jl=Symbol.for(""),Bl=e=>{if(e?.r===jl)return e?._$litStatic$},
|
|
|
407
407
|
clip-rule="evenodd"
|
|
408
408
|
/>
|
|
409
409
|
</svg>
|
|
410
|
-
`,Mr=Object.freeze({__proto__:null,default:
|
|
410
|
+
`,Mr=Object.freeze({__proto__:null,default:yr}),Vr=Q`
|
|
411
411
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
412
412
|
<path
|
|
413
413
|
fill="currentColor"
|
|
@@ -687,7 +687,7 @@ const Al=e=>e??le,jl=Symbol.for(""),Bl=e=>{if(e?.r===jl)return e?._$litStatic$},
|
|
|
687
687
|
clip-rule="evenodd"
|
|
688
688
|
/>
|
|
689
689
|
</svg>
|
|
690
|
-
`,
|
|
690
|
+
`,Ci=Object.freeze({__proto__:null,default:Zi}),yi=Q`
|
|
691
691
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
692
692
|
<path
|
|
693
693
|
fill="currentColor"
|
|
@@ -696,7 +696,7 @@ const Al=e=>e??le,jl=Symbol.for(""),Bl=e=>{if(e?.r===jl)return e?._$litStatic$},
|
|
|
696
696
|
clip-rule="evenodd"
|
|
697
697
|
/>
|
|
698
698
|
</svg>
|
|
699
|
-
`,Mi=Object.freeze({__proto__:null,default:
|
|
699
|
+
`,Mi=Object.freeze({__proto__:null,default:yi}),Vi=Q`
|
|
700
700
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
701
701
|
<path
|
|
702
702
|
fill="currentColor"
|
|
@@ -943,7 +943,7 @@ const Al=e=>e??le,jl=Symbol.for(""),Bl=e=>{if(e?.r===jl)return e?._$litStatic$},
|
|
|
943
943
|
clip-rule="evenodd"
|
|
944
944
|
/>
|
|
945
945
|
</svg>
|
|
946
|
-
`,Zo=Object.freeze({__proto__:null,default:xo}),
|
|
946
|
+
`,Zo=Object.freeze({__proto__:null,default:xo}),Co=Q`
|
|
947
947
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
948
948
|
<path
|
|
949
949
|
fill="currentColor"
|
|
@@ -972,7 +972,7 @@ const Al=e=>e??le,jl=Symbol.for(""),Bl=e=>{if(e?.r===jl)return e?._$litStatic$},
|
|
|
972
972
|
clip-rule="evenodd"
|
|
973
973
|
/>
|
|
974
974
|
</svg>
|
|
975
|
-
`,
|
|
975
|
+
`,yo=Object.freeze({__proto__:null,default:Co}),Mo=Q`
|
|
976
976
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
977
977
|
<path
|
|
978
978
|
fill="currentColor"
|
|
@@ -1253,7 +1253,7 @@ const Al=e=>e??le,jl=Symbol.for(""),Bl=e=>{if(e?.r===jl)return e?._$litStatic$},
|
|
|
1253
1253
|
clip-rule="evenodd"
|
|
1254
1254
|
/>
|
|
1255
1255
|
</svg>
|
|
1256
|
-
`,
|
|
1256
|
+
`,Cn=Object.freeze({__proto__:null,default:Zn}),yn=Q`
|
|
1257
1257
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
1258
1258
|
<path
|
|
1259
1259
|
fill="currentColor"
|
|
@@ -1262,7 +1262,7 @@ const Al=e=>e??le,jl=Symbol.for(""),Bl=e=>{if(e?.r===jl)return e?._$litStatic$},
|
|
|
1262
1262
|
clip-rule="evenodd"
|
|
1263
1263
|
/>
|
|
1264
1264
|
</svg>
|
|
1265
|
-
`,Mn=Object.freeze({__proto__:null,default:
|
|
1265
|
+
`,Mn=Object.freeze({__proto__:null,default:yn}),Vn=Q`
|
|
1266
1266
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
1267
1267
|
<path
|
|
1268
1268
|
fill="currentColor"
|
|
@@ -1514,7 +1514,7 @@ const Al=e=>e??le,jl=Symbol.for(""),Bl=e=>{if(e?.r===jl)return e?._$litStatic$},
|
|
|
1514
1514
|
clip-rule="evenodd"
|
|
1515
1515
|
/>
|
|
1516
1516
|
</svg>
|
|
1517
|
-
`,
|
|
1517
|
+
`,Ca=Object.freeze({__proto__:null,default:Za}),ya=Q`
|
|
1518
1518
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
1519
1519
|
<path
|
|
1520
1520
|
fill="currentColor"
|
|
@@ -1523,7 +1523,7 @@ const Al=e=>e??le,jl=Symbol.for(""),Bl=e=>{if(e?.r===jl)return e?._$litStatic$},
|
|
|
1523
1523
|
clip-rule="evenodd"
|
|
1524
1524
|
/>
|
|
1525
1525
|
</svg>
|
|
1526
|
-
`,Ma=Object.freeze({__proto__:null,default:
|
|
1526
|
+
`,Ma=Object.freeze({__proto__:null,default:ya}),Va=Q`
|
|
1527
1527
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
1528
1528
|
<path
|
|
1529
1529
|
fill="currentColor"
|
|
@@ -1779,7 +1779,7 @@ const Al=e=>e??le,jl=Symbol.for(""),Bl=e=>{if(e?.r===jl)return e?._$litStatic$},
|
|
|
1779
1779
|
clip-rule="evenodd"
|
|
1780
1780
|
/>
|
|
1781
1781
|
</svg>
|
|
1782
|
-
`,
|
|
1782
|
+
`,Cs=Object.freeze({__proto__:null,default:Zs}),ys=Q`
|
|
1783
1783
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
1784
1784
|
<path
|
|
1785
1785
|
fill="currentColor"
|
|
@@ -1788,7 +1788,7 @@ const Al=e=>e??le,jl=Symbol.for(""),Bl=e=>{if(e?.r===jl)return e?._$litStatic$},
|
|
|
1788
1788
|
clip-rule="evenodd"
|
|
1789
1789
|
/>
|
|
1790
1790
|
</svg>
|
|
1791
|
-
`,Ms=Object.freeze({__proto__:null,default:
|
|
1791
|
+
`,Ms=Object.freeze({__proto__:null,default:ys}),Vs=Q`
|
|
1792
1792
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
1793
1793
|
<path
|
|
1794
1794
|
fill="currentColor"
|
|
@@ -2067,7 +2067,7 @@ const Al=e=>e??le,jl=Symbol.for(""),Bl=e=>{if(e?.r===jl)return e?._$litStatic$},
|
|
|
2067
2067
|
d="M16.5 11.375c.345 0 .625.28.625.625v6.52l2.44-2.372a.625.625 0 1 1 .87.895l-3.5 3.405a.625.625 0 0 1-.87 0l-3.5-3.405a.625.625 0 1 1 .87-.895l2.44 2.372V12c0-.345.28-.625.625-.625Zm-8.5 6a.625.625 0 1 1 0 1.25H4a.625.625 0 1 1 0-1.25h4Zm4-6a.625.625 0 1 1 0 1.25H4a.625.625 0 1 1 0-1.25h8Zm5-6a.625.625 0 1 1 0 1.25H4a.625.625 0 1 1 0-1.25h13Z"
|
|
2068
2068
|
/>
|
|
2069
2069
|
</svg>
|
|
2070
|
-
`,
|
|
2070
|
+
`,Cc=Object.freeze({__proto__:null,default:Zc}),yc=Q`
|
|
2071
2071
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
2072
2072
|
<path
|
|
2073
2073
|
fill="currentColor"
|
|
@@ -2076,7 +2076,7 @@ const Al=e=>e??le,jl=Symbol.for(""),Bl=e=>{if(e?.r===jl)return e?._$litStatic$},
|
|
|
2076
2076
|
clip-rule="evenodd"
|
|
2077
2077
|
/>
|
|
2078
2078
|
</svg>
|
|
2079
|
-
`,Mc=Object.freeze({__proto__:null,default:
|
|
2079
|
+
`,Mc=Object.freeze({__proto__:null,default:yc}),Vc=Q`
|
|
2080
2080
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
2081
2081
|
<path
|
|
2082
2082
|
fill="currentColor"
|
|
@@ -2329,7 +2329,7 @@ const Al=e=>e??le,jl=Symbol.for(""),Bl=e=>{if(e?.r===jl)return e?._$litStatic$},
|
|
|
2329
2329
|
clip-rule="evenodd"
|
|
2330
2330
|
/>
|
|
2331
2331
|
</svg>
|
|
2332
|
-
`,
|
|
2332
|
+
`,Cd=Object.freeze({__proto__:null,default:Zd}),yd=Q`
|
|
2333
2333
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
2334
2334
|
<path
|
|
2335
2335
|
fill="currentColor"
|
|
@@ -2342,7 +2342,7 @@ const Al=e=>e??le,jl=Symbol.for(""),Bl=e=>{if(e?.r===jl)return e?._$litStatic$},
|
|
|
2342
2342
|
clip-rule="evenodd"
|
|
2343
2343
|
/>
|
|
2344
2344
|
</svg>
|
|
2345
|
-
`,Md=Object.freeze({__proto__:null,default:
|
|
2345
|
+
`,Md=Object.freeze({__proto__:null,default:yd}),Vd=Q`
|
|
2346
2346
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none" viewBox="0 0 24 24">
|
|
2347
2347
|
<path
|
|
2348
2348
|
fill="currentColor"
|