@vonage/vivid 5.15.0 → 5.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/accordion/definition.cjs +0 -5
- package/accordion/definition.js +0 -5
- package/accordion/index.cjs +1 -1
- package/accordion/index.js +3 -14
- package/accordion-item/definition.cjs +1 -1
- package/accordion-item/definition.js +1 -1
- package/alert/definition.cjs +2 -2
- package/alert/definition.js +2 -2
- package/alert/index.cjs +1 -1
- package/alert/index.js +1 -1
- package/audio-player/definition.cjs +2 -6
- package/audio-player/definition.js +2 -6
- package/audio-player/index.cjs +1 -1
- package/audio-player/index.js +2 -8
- package/banner/definition.cjs +1 -1
- package/banner/definition.js +1 -1
- package/breadcrumb/definition.cjs +0 -1
- package/breadcrumb/definition.js +0 -1
- package/breadcrumb/index.cjs +1 -1
- package/breadcrumb/index.js +0 -1
- package/breadcrumb-item/definition.cjs +1 -1
- package/breadcrumb-item/definition.js +1 -1
- package/breadcrumb-item/index.cjs +1 -1
- package/breadcrumb-item/index.js +1 -1
- package/bundled/attribute-binding-behaviour.cjs +1 -1
- package/bundled/attribute-binding-behaviour.js +1 -3
- package/bundled/base-color-picker.cjs +1 -1
- package/bundled/base-color-picker.js +2 -7
- package/bundled/base-progress.cjs +1 -1
- package/bundled/base-progress.js +0 -3
- package/bundled/button.cjs +1 -1
- package/bundled/button.js +1 -10
- package/bundled/calendar-picker.template.cjs +1 -1
- package/bundled/calendar-picker.template.js +90 -42
- package/bundled/children.js +1 -1
- package/bundled/definition.cjs +1 -1
- package/bundled/definition.js +1 -1
- package/bundled/definition10.cjs +1 -1
- package/bundled/definition10.js +0 -10
- package/bundled/definition11.cjs +1 -1
- package/bundled/definition11.js +0 -1
- package/bundled/definition12.cjs +2 -2
- package/bundled/definition12.js +1 -2
- package/bundled/definition13.cjs +1 -1
- package/bundled/definition13.js +1 -1
- package/bundled/definition17.cjs +1 -1
- package/bundled/definition17.js +1 -4
- package/bundled/definition18.cjs +1 -1
- package/bundled/definition18.js +6 -18
- package/bundled/definition19.cjs +2 -2
- package/bundled/definition19.js +8 -24
- package/bundled/definition2.cjs +5 -5
- package/bundled/definition2.js +26 -27
- package/bundled/definition20.cjs +1 -1
- package/bundled/definition20.js +1 -1
- package/bundled/definition22.cjs +5 -5
- package/bundled/definition22.js +2 -3
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +1 -2
- package/bundled/definition5.cjs +1 -1
- package/bundled/definition5.js +1 -6
- package/bundled/definition6.cjs +1 -1
- package/bundled/definition6.js +1 -2
- package/bundled/definition7.cjs +1 -1
- package/bundled/definition7.js +2 -5
- package/bundled/definition8.cjs +1 -1
- package/bundled/definition8.js +2 -13
- package/bundled/definition9.js +9 -9
- package/bundled/delegates-aria.cjs +1 -1
- package/bundled/delegates-aria.js +1 -3
- package/bundled/floating-ui.dom.cjs +1 -1
- package/bundled/floating-ui.dom.js +491 -487
- package/bundled/form-associated.cjs +1 -1
- package/bundled/form-associated.js +9 -18
- package/bundled/key-codes.cjs +1 -1
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +10 -27
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +48 -48
- package/bundled/mixins.cjs +2 -2
- package/bundled/mixins.js +1 -4
- package/bundled/normalize.js +2 -2
- package/bundled/picker-field.template.cjs +1 -1
- package/bundled/picker-field.template.js +0 -1
- package/bundled/scrollIntoView.cjs +1 -1
- package/bundled/scrollIntoView.js +1 -4
- package/bundled/slider.template.cjs +1 -1
- package/bundled/slider.template.js +1 -1
- package/bundled/slottable-request.js +1 -1
- package/bundled/text-field.cjs +1 -1
- package/bundled/text-field.js +1 -1
- package/bundled/time-selection-picker.template.cjs +2 -2
- package/bundled/time-selection-picker.template.js +3 -6
- package/bundled/vivid-element.cjs +3 -3
- package/bundled/vivid-element.js +302 -293
- package/button/definition.cjs +1 -1
- package/button/definition.js +1 -1
- package/calendar/definition.cjs +0 -2
- package/calendar/definition.js +1 -3
- package/calendar/index.cjs +1 -1
- package/calendar/index.js +6 -8
- package/card/definition.cjs +1 -1
- package/card/definition.js +1 -1
- package/card/index.cjs +1 -1
- package/card/index.js +1 -1
- package/checkbox/definition.cjs +1 -2
- package/checkbox/definition.js +1 -2
- package/color-picker/definition.cjs +1 -6
- package/color-picker/definition.js +1 -6
- package/color-picker/index.cjs +1 -1
- package/color-picker/index.js +2 -7
- package/combobox/definition.cjs +2 -8
- package/combobox/definition.js +2 -8
- package/combobox/index.cjs +1 -1
- package/combobox/index.js +2 -9
- package/contextual-help/definition.cjs +1 -1
- package/contextual-help/definition.js +1 -1
- package/custom-elements.json +37 -720
- package/data-grid/definition.cjs +72 -85
- package/data-grid/definition.js +75 -88
- package/data-grid/index.cjs +2 -2
- package/data-grid/index.js +7 -39
- package/date-picker/definition.cjs +1 -1
- package/date-picker/definition.js +1 -1
- package/date-range-picker/definition.cjs +1 -3
- package/date-range-picker/definition.js +1 -3
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +1 -5
- package/date-time-picker/definition.cjs +1 -1
- package/date-time-picker/definition.js +1 -1
- package/dial-pad/definition.cjs +2 -11
- package/dial-pad/definition.js +3 -12
- package/dial-pad/index.cjs +1 -1
- package/dial-pad/index.js +14 -38
- package/dialog/definition.cjs +2 -3
- package/dialog/definition.js +2 -3
- package/dialog/index.cjs +1 -1
- package/dialog/index.js +1 -2
- package/empty-state/definition.js +1 -1
- package/fab/definition.cjs +1 -2
- package/fab/definition.js +1 -2
- package/fab/index.cjs +1 -1
- package/fab/index.js +1 -2
- package/file-picker/definition.cjs +2 -5
- package/file-picker/definition.js +3 -6
- package/file-picker/index.cjs +1 -1
- package/file-picker/index.js +1 -4
- package/icon/definition.cjs +7 -5
- package/icon/definition.js +7 -5
- package/index.cjs +95 -95
- package/index.js +18 -18
- package/layout/definition.cjs +1 -1
- package/layout/definition.js +1 -1
- package/layout/index.cjs +1 -1
- package/layout/index.js +1 -1
- package/lib/card/card.d.ts +0 -2
- package/lib/combobox/combobox.d.ts +1 -1
- package/lib/icon/icon.d.ts +0 -1
- package/lib/menu/menu.d.ts +0 -1
- package/lib/menu-item/menu-item.d.ts +0 -1
- package/lib/pagination/pagination.d.ts +0 -3
- package/lib/select/select.d.ts +2 -2
- package/lib/table/table-head.d.ts +1 -0
- package/lib/tabs/tabs.d.ts +0 -1
- package/lib/text-field/text-field.d.ts +0 -1
- package/locales/de-DE.cjs +95 -95
- package/locales/de-DE.js +95 -95
- package/locales/en-GB.cjs +1 -1
- package/locales/en-GB.js +1 -1
- package/locales/en-US.cjs +95 -95
- package/locales/en-US.js +95 -95
- package/locales/ja-JP.cjs +94 -94
- package/locales/ja-JP.js +94 -94
- package/locales/zh-CN.cjs +94 -94
- package/locales/zh-CN.js +94 -94
- package/menu/definition.cjs +2 -3
- package/menu/definition.js +2 -3
- package/menu-item/definition.cjs +1 -1
- package/menu-item/definition.js +1 -1
- package/nav-disclosure/definition.cjs +1 -1
- package/nav-disclosure/definition.js +1 -1
- package/nav-disclosure/index.cjs +1 -1
- package/nav-disclosure/index.js +1 -1
- package/nav-item/definition.cjs +1 -1
- package/nav-item/definition.js +1 -1
- package/nav-item/index.cjs +1 -1
- package/nav-item/index.js +1 -1
- package/number-field/definition.cjs +2 -2
- package/number-field/definition.js +2 -2
- package/number-field/index.cjs +1 -1
- package/number-field/index.js +1 -1
- package/package.json +20 -18
- package/pagination/definition.cjs +1 -3
- package/pagination/definition.js +3 -5
- package/pagination/index.cjs +3 -3
- package/pagination/index.js +4 -6
- package/popover/definition.cjs +1 -8
- package/popover/definition.js +1 -8
- package/popover/index.cjs +1 -1
- package/popover/index.js +6 -17
- package/popup/definition.cjs +1 -1
- package/popup/definition.js +1 -1
- package/radio/definition.cjs +1 -5
- package/radio/definition.js +1 -5
- package/radio-group/definition.js +2 -2
- package/range-slider/definition.cjs +1 -1
- package/range-slider/definition.js +2 -2
- package/range-slider/index.cjs +1 -1
- package/range-slider/index.js +1 -1
- package/rich-text-editor/definition.cjs +128 -43
- package/rich-text-editor/definition.js +128 -43
- package/rich-text-editor/index.cjs +12 -12
- package/rich-text-editor/index.js +1577 -1532
- package/rich-text-view/definition.js +1 -1
- package/searchable-select/definition.cjs +2 -5
- package/searchable-select/definition.js +2 -5
- package/searchable-select/index.cjs +1 -1
- package/searchable-select/index.js +2 -6
- package/select/definition.cjs +4 -14
- package/select/definition.js +5 -15
- package/selectable-box/definition.cjs +1 -1
- package/selectable-box/definition.js +2 -2
- package/selectable-box/index.cjs +1 -1
- package/selectable-box/index.js +1 -1
- package/side-drawer/definition.cjs +1 -1
- package/side-drawer/definition.js +2 -2
- package/side-drawer/index.cjs +1 -1
- package/side-drawer/index.js +2 -5
- package/simple-color-picker/definition.cjs +18 -9
- package/simple-color-picker/definition.js +19 -10
- package/simple-color-picker/index.cjs +5 -5
- package/simple-color-picker/index.js +23 -23
- package/slider/definition.cjs +1 -6
- package/slider/definition.js +3 -8
- package/split-button/definition.cjs +1 -1
- package/split-button/definition.js +2 -2
- package/split-button/index.cjs +1 -1
- package/split-button/index.js +1 -1
- package/status/definition.cjs +9 -3
- package/status/definition.js +11 -5
- package/status/index.cjs +10 -7
- package/status/index.js +46 -39
- package/styles/core/all.css +6 -5
- package/styles/core/theme.css +6 -5
- package/styles/core/typography.css +1 -2
- package/styles/tokens/theme-dark.css +17 -21
- package/styles/tokens/theme-light.css +17 -21
- package/styles/tokens/vivid-2-compat.css +1 -2
- package/switch/definition.cjs +1 -2
- package/switch/definition.js +2 -3
- package/switch/index.cjs +1 -1
- package/switch/index.js +1 -2
- package/tab/definition.cjs +1 -1
- package/tab/definition.js +2 -2
- package/tab-panel/definition.js +1 -1
- package/table/definition.cjs +17 -11
- package/table/definition.js +19 -13
- package/table/index.cjs +18 -14
- package/table/index.js +55 -48
- package/tabs/definition.cjs +0 -2
- package/tabs/definition.js +2 -4
- package/tabs/index.cjs +1 -1
- package/tabs/index.js +0 -2
- package/tag/definition.cjs +1 -1
- package/tag/definition.js +2 -2
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/tag-group/definition.js +1 -1
- package/text-area/definition.cjs +1 -7
- package/text-area/definition.js +2 -8
- package/text-area/index.cjs +1 -1
- package/text-area/index.js +1 -7
- package/text-field/definition.cjs +0 -10
- package/text-field/definition.js +1 -11
- package/time-picker/definition.cjs +1 -1
- package/time-picker/definition.js +2 -2
- package/toggletip/definition.cjs +0 -2
- package/toggletip/definition.js +1 -3
- package/tooltip/definition.cjs +0 -1
- package/tooltip/definition.js +1 -2
- package/tree-view/definition.cjs +0 -16
- package/tree-view/definition.js +1 -17
- package/tree-view/index.cjs +1 -1
- package/tree-view/index.js +0 -16
- package/unbundled/_commonjsHelpers.cjs +6 -2
- package/unbundled/_commonjsHelpers.js +6 -2
- package/unbundled/anchored.js +1 -1
- package/unbundled/attribute-binding-behaviour.cjs +0 -1
- package/unbundled/attribute-binding-behaviour.js +0 -1
- package/unbundled/base-color-picker.cjs +0 -3
- package/unbundled/base-color-picker.js +0 -3
- package/unbundled/base-progress.cjs +0 -3
- package/unbundled/base-progress.js +0 -3
- package/unbundled/button.cjs +1 -10
- package/unbundled/button.js +1 -10
- package/unbundled/calendar-picker.template.cjs +2 -4
- package/unbundled/calendar-picker.template.js +2 -4
- package/unbundled/data-grid.options.js +1 -1
- package/unbundled/definition.cjs +349 -170
- package/unbundled/definition.js +348 -170
- package/unbundled/definition2.cjs +169 -351
- package/unbundled/definition2.js +169 -350
- package/unbundled/definition3.cjs +1 -2
- package/unbundled/definition3.js +1 -2
- package/unbundled/definition4.cjs +1 -2
- package/unbundled/definition4.js +3 -4
- package/unbundled/definition5.cjs +1 -1
- package/unbundled/definition5.js +2 -2
- package/unbundled/delegates-aria.cjs +1 -1
- package/unbundled/delegates-aria.js +1 -1
- package/unbundled/enums.js +1 -1
- package/unbundled/form-associated.cjs +4 -5
- package/unbundled/form-associated.js +4 -5
- package/unbundled/host-semantics.cjs +1 -0
- package/unbundled/host-semantics.js +2 -1
- package/unbundled/key-codes.js +1 -1
- package/unbundled/listbox.cjs +6 -14
- package/unbundled/listbox.js +6 -14
- package/unbundled/mixins.cjs +0 -2
- package/unbundled/mixins.js +2 -4
- package/unbundled/picker-field.template.cjs +1 -2
- package/unbundled/picker-field.template.js +1 -2
- package/unbundled/scrollIntoView.cjs +0 -1
- package/unbundled/scrollIntoView.js +0 -1
- package/unbundled/slider.template.js +1 -1
- package/unbundled/slottable-request.cjs +2 -2
- package/unbundled/slottable-request.js +2 -2
- package/unbundled/text-field.cjs +1 -1
- package/unbundled/text-field.js +1 -1
- package/unbundled/time-selection-picker.template.cjs +1 -4
- package/unbundled/time-selection-picker.template.js +1 -4
- package/unbundled/vivid-element.cjs +2 -1
- package/unbundled/vivid-element.js +2 -1
- package/video-player/definition.cjs +7953 -7720
- package/video-player/definition.js +7955 -7722
- package/video-player/index.cjs +38 -54
- package/video-player/index.js +12785 -12735
- package/visually-hidden/definition.js +1 -1
- package/vivid.api.json +16 -341
package/bundled/definition8.js
CHANGED
|
@@ -9,7 +9,7 @@ import { F as O } from "./form-element.js";
|
|
|
9
9
|
import { w as v } from "./when.js";
|
|
10
10
|
import { s as F } from "./slotted.js";
|
|
11
11
|
import { c as T } from "./class-names.js";
|
|
12
|
-
const B = ':host{display:inline-flex;flex-direction:column;gap:4px;vertical-align:middle;--_low-ink-color: var(--vvd-color-neutral-600)}:host([disabled]){cursor:not-allowed}.base.connotation-cta{--_connotation-color-primary: var(--vvd-checkbox-cta-primary, var(--vvd-color-cta-500));--_connotation-color-primary-text: var(--vvd-checkbox-cta-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-checkbox-cta-primary-increment, var(--vvd-color-cta-600));--_connotation-color-fierce: var(--vvd-checkbox-cta-fierce, var(--vvd-color-cta-700));--_connotation-color-intermediate: var(--vvd-checkbox-cta-intermediate, var(--vvd-color-cta-500));--_connotation-color-firm: var(--vvd-checkbox-cta-firm, var(--vvd-color-cta-600))}.base:not(.connotation-cta){--_connotation-color-primary: var(--vvd-checkbox-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-checkbox-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-checkbox-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-fierce: var(--vvd-checkbox-accent-fierce, var(--vvd-color-neutral-700));--_connotation-color-intermediate: var(--vvd-checkbox-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-firm: var(--vvd-checkbox-accent-firm, var(--vvd-color-canvas-text))}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-500)}@media
|
|
12
|
+
const B = ':host{display:inline-flex;flex-direction:column;gap:4px;vertical-align:middle;--_low-ink-color: var(--vvd-color-neutral-600)}:host([disabled]){cursor:not-allowed}.base.connotation-cta{--_connotation-color-primary: var(--vvd-checkbox-cta-primary, var(--vvd-color-cta-500));--_connotation-color-primary-text: var(--vvd-checkbox-cta-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-checkbox-cta-primary-increment, var(--vvd-color-cta-600));--_connotation-color-fierce: var(--vvd-checkbox-cta-fierce, var(--vvd-color-cta-700));--_connotation-color-intermediate: var(--vvd-checkbox-cta-intermediate, var(--vvd-color-cta-500));--_connotation-color-firm: var(--vvd-checkbox-cta-firm, var(--vvd-color-cta-600))}.base:not(.connotation-cta){--_connotation-color-primary: var(--vvd-checkbox-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-primary-text: var(--vvd-checkbox-accent-primary-text, var(--vvd-color-canvas));--_connotation-color-primary-increment: var(--vvd-checkbox-accent-primary-increment, var(--vvd-color-neutral-800));--_connotation-color-fierce: var(--vvd-checkbox-accent-fierce, var(--vvd-color-neutral-700));--_connotation-color-intermediate: var(--vvd-checkbox-accent-intermediate, var(--vvd-color-neutral-500));--_connotation-color-firm: var(--vvd-checkbox-accent-firm, var(--vvd-color-canvas-text))}.base{--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-500)}@media(hover:hover){.base:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-700)}}.base.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-canvas);--_appearance-color-outline: var(--vvd-color-neutral-700)}.base:checked:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary);--_appearance-color-outline: var(--_connotation-color-primary)}.base.checked:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary);--_appearance-color-outline: var(--_connotation-color-primary)}@media(hover:hover){.base:checked:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary-increment);--_appearance-color-outline: var(--_connotation-color-primary-increment)}}.base.checked.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-primary-text);--_appearance-color-fill: var(--_connotation-color-primary-increment);--_appearance-color-outline: var(--_connotation-color-primary-increment)}.base:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.base.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-100);--_appearance-color-outline: var(--vvd-color-neutral-300)}.base.readonly:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--vvd-color-canvas-text);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: var(--vvd-color-neutral-400)}.base{display:inline-flex;align-items:start;gap:8px;vertical-align:middle}.base:focus-visible{outline:none}@supports (user-select: none){.base{user-select:none}}.base:not(.disabled){cursor:pointer}.base.disabled{pointer-events:none}.control{position:relative;display:flex;flex-shrink:0;align-items:center;justify-content:center;border-radius:4px;background-color:var(--_appearance-color-fill);block-size:calc(1px*(20 + 4*clamp(-1,var(--vvd-size-density, 0),2)));box-shadow:inset 0 0 0 2px var(--_appearance-color-outline);color:var(--_appearance-color-text);inline-size:calc(1px*(20 + 4*clamp(-1,var(--vvd-size-density, 0),2)))}.base:focus-visible .control{--focus-stroke-gap-color: transparent}.base:focus-visible .control:after{box-shadow:0 0 0 4px color-mix(in srgb,var(--focus-stroke-color, var(--vvd-color-cta-500)),transparent 85%),inset 0 0 0 3px var(--focus-stroke-gap-color, currentColor);outline:1px solid var(--focus-stroke-color, var(--vvd-color-cta-500));outline-offset:calc(-1px - var(--focus-inset, 0px));position:absolute;display:block;border-radius:var(--focus-border-radius, inherit);block-size:calc(100% + var(--focus-block-size-addition, 4px));content:"";inline-size:calc(100% + var(--focus-block-size-addition, 4px));inset-block-start:50%;inset-inline-start:50%;transform:translate(-50%,-50%)}.base.error:not(.checked) .control{background-color:var(--vvd-color-canvas);box-shadow:inset 0 0 0 2px var(--vvd-color-alert-500)}.indicator{font-size:calc(1px*(20 + 4*clamp(-1,var(--vvd-size-density, 0),2)) - 4px)}.base:not(.checked) .indicator.checkmark{display:none}.base.checked .indicator.minus,.base:not(.indeterminate) .indicator.minus{display:none}label{display:flex;flex-wrap:wrap;align-items:center;color:var(--vvd-color-canvas-text);column-gap:4px;cursor:pointer;font:var(--vvd-typography-base)}.hide-label label{display:none}.icon{font-size:calc(1px*(20 + 4*clamp(-1,var(--vvd-size-density, 0),2))*.6);line-height:1}';
|
|
13
13
|
var D = Object.defineProperty, c = (o, a, e, n) => {
|
|
14
14
|
for (var r = void 0, i = o.length - 1, l; i >= 0; i--)
|
|
15
15
|
(l = o[i]) && (r = l(a, e, r) || r);
|
|
@@ -24,24 +24,13 @@ class t extends g(
|
|
|
24
24
|
)
|
|
25
25
|
) {
|
|
26
26
|
constructor() {
|
|
27
|
-
super(), this.tabindex = null, this.proxy = document.createElement("input"), this.initialValue = "on", this.defaultSlottedNodes = [], this.indeterminate = !1, this.keypressHandler = (a) =>
|
|
28
|
-
if (a.target instanceof HTMLAnchorElement)
|
|
29
|
-
return !0;
|
|
30
|
-
if (!this.disabled && !this.readOnly)
|
|
31
|
-
switch (a.key) {
|
|
32
|
-
case E:
|
|
33
|
-
this.indeterminate && (this.indeterminate = !1), this.checked = !this.checked;
|
|
34
|
-
break;
|
|
35
|
-
}
|
|
36
|
-
return !1;
|
|
37
|
-
}, this.clickHandler = (a) => a.target instanceof HTMLAnchorElement ? !0 : (!this.disabled && !this.readOnly && (this.indeterminate && (this.indeterminate = !1), this.checked = !this.checked), !1), this.proxy.setAttribute("type", "checkbox");
|
|
27
|
+
super(), this.tabindex = null, this.proxy = document.createElement("input"), this.initialValue = "on", this.defaultSlottedNodes = [], this.indeterminate = !1, this.keypressHandler = (a) => a.target instanceof HTMLAnchorElement ? !0 : (!this.disabled && !this.readOnly && a.key === E && (this.indeterminate && (this.indeterminate = !1), this.checked = !this.checked), !1), this.clickHandler = (a) => a.target instanceof HTMLAnchorElement ? !0 : (!this.disabled && !this.readOnly && (this.indeterminate && (this.indeterminate = !1), this.checked = !this.checked), !1), this.proxy.setAttribute("type", "checkbox");
|
|
38
28
|
}
|
|
39
29
|
// Map to proxy element
|
|
40
30
|
/**
|
|
41
31
|
* @internal
|
|
42
32
|
*/
|
|
43
33
|
readOnlyChanged() {
|
|
44
|
-
/* v8 ignore if -- @preserve */
|
|
45
34
|
this.proxy instanceof HTMLInputElement && (this.proxy.readOnly = this.readOnly);
|
|
46
35
|
}
|
|
47
36
|
/**
|
package/bundled/definition9.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { B as b, b as f } from "./definition3.js";
|
|
2
2
|
import { E as g, e as v } from "./definition4.js";
|
|
3
3
|
import { V as w, a as l, n as y, o as x, h as c, c as P, d as E } from "./vivid-element.js";
|
|
4
|
-
import { i as $,
|
|
4
|
+
import { i as $, h as k, s as C, a as F, b as z, o as V, c as A, d as _, e as u, f as D } from "./floating-ui.dom.js";
|
|
5
5
|
import { r as d } from "./ref.js";
|
|
6
6
|
import { w as m } from "./when.js";
|
|
7
7
|
import { c as B } from "./class-names.js";
|
|
@@ -15,7 +15,7 @@ const n = {
|
|
|
15
15
|
AutoPlacementHorizontal: "auto-placement-horizontal",
|
|
16
16
|
AutoPlacementVertical: "auto-placement-vertical"
|
|
17
17
|
}, H = {
|
|
18
|
-
[n.Flip]:
|
|
18
|
+
[n.Flip]: D(),
|
|
19
19
|
[n.AutoPlacementHorizontal]: u({
|
|
20
20
|
allowedPlacements: [
|
|
21
21
|
"bottom",
|
|
@@ -45,8 +45,8 @@ class i extends w {
|
|
|
45
45
|
let t = [
|
|
46
46
|
$(),
|
|
47
47
|
H[this.placementStrategy],
|
|
48
|
-
|
|
49
|
-
|
|
48
|
+
k(),
|
|
49
|
+
C({
|
|
50
50
|
apply({ availableWidth: o, availableHeight: a, elements: p }) {
|
|
51
51
|
Object.assign(p.floating.style, {
|
|
52
52
|
maxWidth: `${o}px`,
|
|
@@ -54,12 +54,12 @@ class i extends w {
|
|
|
54
54
|
});
|
|
55
55
|
}
|
|
56
56
|
}),
|
|
57
|
-
|
|
57
|
+
F()
|
|
58
58
|
], e = this.offset ?? 0;
|
|
59
59
|
return this.arrow && (e += 12, t = [
|
|
60
60
|
...t,
|
|
61
|
-
|
|
62
|
-
]), e > 0 && t.unshift(
|
|
61
|
+
z({ element: this.arrowEl, padding: 10 })
|
|
62
|
+
]), e > 0 && t.unshift(V(e)), t;
|
|
63
63
|
}
|
|
64
64
|
#a;
|
|
65
65
|
openChanged(t, e) {
|
|
@@ -90,7 +90,7 @@ class i extends w {
|
|
|
90
90
|
super.disconnectedCallback(), this.#t();
|
|
91
91
|
}
|
|
92
92
|
#t() {
|
|
93
|
-
this.#a?.(), this.open && this.controlEl && this.controlEl.classList.add("open"), this.anchorEl && this.open && this.popupEl && (this.#a =
|
|
93
|
+
this.#a?.(), this.open && this.controlEl && this.controlEl.classList.add("open"), this.anchorEl && this.open && this.popupEl && (this.#a = A(
|
|
94
94
|
this.anchorEl,
|
|
95
95
|
this.popupEl,
|
|
96
96
|
this.#r,
|
|
@@ -112,7 +112,7 @@ class i extends w {
|
|
|
112
112
|
async updatePosition() {
|
|
113
113
|
if (!this.open || !this.anchorEl)
|
|
114
114
|
return;
|
|
115
|
-
const t = await
|
|
115
|
+
const t = await _(this.anchorEl, this.popupEl, {
|
|
116
116
|
placement: this.placement,
|
|
117
117
|
strategy: this.strategy,
|
|
118
118
|
middleware: this.#i
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const h=require("./attribute-binding-behaviour.cjs"),o=require("./vivid-element.cjs");class g{constructor(e,t){this.target=null,this.bindingBehaviours=[],this.onSourceAriaPropertyChanged=(r,i)=>{!this.forwardedProperties.has(i)||i in this.boundProperties||this.forwardPropertyToTarget(this.target,i,r[i])},this.target=e,this.boundProperties=t.boundProperties,this.forwardedProperties=t.forwardedProperties}bind(e){const t=e.source;this.bindPropertiesToTarget(t,this.boundProperties,this.target),this.startForwardingPropertiesToTarget(t,this.forwardedProperties,this.target)}bindPropertiesToTarget(e,t,r){for(const[i,a]of Object.entries(t)){const n=a instanceof Function?a:()=>a;this.bindingBehaviours.push(new h.AttributeBindingBehavior(r,o.oneWay(n),o.Observable.isVolatileBinding(n),o.ariaAttributeName(i)))}for(const i of this.bindingBehaviours)i.bind({source:e,context:e.$fastController.context})}startForwardingPropertiesToTarget(e,t,r){for(const i of t)
|
|
1
|
+
"use strict";const h=require("./attribute-binding-behaviour.cjs"),o=require("./vivid-element.cjs");class g{constructor(e,t){this.target=null,this.bindingBehaviours=[],this.onSourceAriaPropertyChanged=(r,i)=>{!this.forwardedProperties.has(i)||i in this.boundProperties||this.forwardPropertyToTarget(this.target,i,r[i])},this.target=e,this.boundProperties=t.boundProperties,this.forwardedProperties=t.forwardedProperties}bind(e){const t=e.source;this.bindPropertiesToTarget(t,this.boundProperties,this.target),this.startForwardingPropertiesToTarget(t,this.forwardedProperties,this.target)}bindPropertiesToTarget(e,t,r){for(const[i,a]of Object.entries(t)){const n=a instanceof Function?a:()=>a;this.bindingBehaviours.push(new h.AttributeBindingBehavior(r,o.oneWay(n),o.Observable.isVolatileBinding(n),o.ariaAttributeName(i)))}for(const i of this.bindingBehaviours)i.bind({source:e,context:e.$fastController.context})}startForwardingPropertiesToTarget(e,t,r){for(const i of t)i in this.boundProperties||this.forwardPropertyToTarget(r,i,e[i]);o.subscribeToAriaPropertyChanges(e,this.onSourceAriaPropertyChanged)}forwardPropertyToTarget(e,t,r){r==null||r===!1?e.removeAttribute(o.ariaAttributeName(t)):e.setAttribute(o.ariaAttributeName(t),String(r))}}class d extends o.StatelessAttachedAttributeDirective{constructor(e,t){super("vvd-delegate-aria"),this.boundProperties=e,this.forwardedProperties=t,this.targetNodeId=""}bind(e){const t=e.targets[this.targetNodeId];new g(t,{boundProperties:this.boundProperties,forwardedProperties:this.forwardedProperties}).bind(e)}}o.HTMLDirective.define(d);function u(s={},e={}){const t=new Set((e.onlySpecified?[]:o.ariaMixinProperties).filter(r=>!(r in s)));return new d(s,t)}const b=s=>{class e extends s{constructor(){super(...arguments),this._vividAriaBehaviour="delegate"}}return e};exports.DelegatesAria=b;exports.delegateAria=u;
|
|
@@ -40,10 +40,8 @@ class P {
|
|
|
40
40
|
// this.bindingBehaviours = [];
|
|
41
41
|
// }
|
|
42
42
|
startForwardingPropertiesToTarget(e, r, t) {
|
|
43
|
-
for (const i of r)
|
|
44
|
-
/* v8 ignore else -- @preserve */
|
|
43
|
+
for (const i of r)
|
|
45
44
|
i in this.boundProperties || this.forwardPropertyToTarget(t, i, e[i]);
|
|
46
|
-
}
|
|
47
45
|
c(
|
|
48
46
|
e,
|
|
49
47
|
this.onSourceAriaPropertyChanged
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const Dt=["top","right","bottom","left"],vt=["start","end"],bt=Dt.reduce((t,e)=>t.concat(e,e+"-"+vt[0],e+"-"+vt[1]),[]),N=Math.min,L=Math.max,it=Math.round,ot=Math.floor,I=t=>({x:t,y:t}),Xt={left:"right",right:"left",bottom:"top",top:"bottom"},Yt={start:"end",end:"start"};function dt(t,e,n){return L(t,N(e,n))}function j(t,e){return typeof t=="function"?t(e):t}function W(t){return t.split("-")[0]}function H(t){return t.split("-")[1]}function Ft(t){return t==="x"?"y":"x"}function ht(t){return t==="y"?"height":"width"}const jt=new Set(["top","bottom"]);function z(t){return jt.has(W(t))?"y":"x"}function gt(t){return Ft(z(t))}function Mt(t,e,n){n===void 0&&(n=!1);const o=H(t),i=gt(t),s=ht(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=rt(r)),[r,rt(r)]}function qt(t){const e=rt(t);return[st(t),e,st(e)]}function st(t){return t.replace(/start|end/g,e=>Yt[e])}const Rt=["left","right"],Ot=["right","left"],Ut=["top","bottom"],Kt=["bottom","top"];function Gt(t,e,n){switch(t){case"top":case"bottom":return n?e?Ot:Rt:e?Rt:Ot;case"left":case"right":return e?Ut:Kt;default:return[]}}function Jt(t,e,n,o){const i=H(t);let s=Gt(W(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(st)))),s}function rt(t){return t.replace(/left|right|bottom|top/g,e=>Xt[e])}function Qt(t){return{top:0,right:0,bottom:0,left:0,...t}}function pt(t){return typeof t!="number"?Qt(t):{top:t,right:t,bottom:t,left:t}}function J(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function At(t,e,n){let{reference:o,floating:i}=t;const s=z(e),r=gt(e),c=ht(r),a=W(e),f=s==="y",u=o.x+o.width/2-i.width/2,l=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2;let d;switch(a){case"top":d={x:u,y:o.y-i.height};break;case"bottom":d={x:u,y:o.y+o.height};break;case"right":d={x:o.x+o.width,y:l};break;case"left":d={x:o.x-i.width,y:l};break;default:d={x:o.x,y:o.y}}switch(H(e)){case"start":d[r]-=m*(n&&f?-1:1);break;case"end":d[r]+=m*(n&&f?-1:1);break}return d}const Zt=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=s.filter(Boolean),a=await(r.isRTL==null?void 0:r.isRTL(e));let f=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:l}=At(f,o,a),m=o,d={},h=0;for(let g=0;g<c.length;g++){const{name:p,fn:w}=c[g],{x,y:v,data:R,reset:b}=await w({x:u,y:l,initialPlacement:o,placement:m,strategy:i,middlewareData:d,rects:f,platform:r,elements:{reference:t,floating:e}});u=x??u,l=v??l,d={...d,[p]:{...d[p],...R}},b&&h<=50&&(h++,typeof b=="object"&&(b.placement&&(m=b.placement),b.rects&&(f=b.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):b.rects),{x:u,y:l}=At(f,m,a)),g=-1)}return{x:u,y:l,placement:m,strategy:i,middlewareData:d}};async function Q(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:r,elements:c,strategy:a}=t,{boundary:f="clippingAncestors",rootBoundary:u="viewport",elementContext:l="floating",altBoundary:m=!1,padding:d=0}=j(e,t),h=pt(d),p=c[m?l==="floating"?"reference":"floating":l],w=J(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(p)))==null||n?p:p.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:f,rootBoundary:u,strategy:a})),x=l==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,v=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),R=await(s.isElement==null?void 0:s.isElement(v))?await(s.getScale==null?void 0:s.getScale(v))||{x:1,y:1}:{x:1,y:1},b=J(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:v,strategy:a}):x);return{top:(w.top-b.top+h.top)/R.y,bottom:(b.bottom-w.bottom+h.bottom)/R.y,left:(w.left-b.left+h.left)/R.x,right:(b.right-w.right+h.right)/R.x}}const te=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:s,platform:r,elements:c,middlewareData:a}=e,{element:f,padding:u=0}=j(t,e)||{};if(f==null)return{};const l=pt(u),m={x:n,y:o},d=gt(i),h=ht(d),g=await r.getDimensions(f),p=d==="y",w=p?"top":"left",x=p?"bottom":"right",v=p?"clientHeight":"clientWidth",R=s.reference[h]+s.reference[d]-m[d]-s.floating[h],b=m[d]-s.reference[d],A=await(r.getOffsetParent==null?void 0:r.getOffsetParent(f));let O=A?A[v]:0;(!O||!await(r.isElement==null?void 0:r.isElement(A)))&&(O=c.floating[v]||s.floating[h]);const B=R/2-b/2,P=O/2-g[h]/2-1,y=N(l[w],P),S=N(l[x],P),T=y,E=O-g[h]-S,C=O/2-g[h]/2+B,$=dt(T,C,E),k=!a.arrow&&H(i)!=null&&C!==$&&s.reference[h]/2-(C<T?y:S)-g[h]/2<0,D=k?C<T?C-T:C-E:0;return{[d]:m[d]+D,data:{[d]:$,centerOffset:C-$-D,...k&&{alignmentOffset:D}},reset:k}}});function ee(t,e,n){return(t?[...n.filter(i=>H(i)===t),...n.filter(i=>H(i)!==t)]:n.filter(i=>W(i)===i)).filter(i=>t?H(i)===t||(e?st(i)!==i:!1):!0)}const ne=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;const{rects:s,middlewareData:r,placement:c,platform:a,elements:f}=e,{crossAxis:u=!1,alignment:l,allowedPlacements:m=bt,autoAlignment:d=!0,...h}=j(t,e),g=l!==void 0||m===bt?ee(l||null,d,m):m,p=await Q(e,h),w=((n=r.autoPlacement)==null?void 0:n.index)||0,x=g[w];if(x==null)return{};const v=Mt(x,s,await(a.isRTL==null?void 0:a.isRTL(f.floating)));if(c!==x)return{reset:{placement:g[0]}};const R=[p[W(x)],p[v[0]],p[v[1]]],b=[...((o=r.autoPlacement)==null?void 0:o.overflows)||[],{placement:x,overflows:R}],A=g[w+1];if(A)return{data:{index:w+1,overflows:b},reset:{placement:A}};const O=b.map(y=>{const S=H(y.placement);return[y.placement,S&&u?y.overflows.slice(0,2).reduce((T,E)=>T+E,0):y.overflows[0],y.overflows]}).sort((y,S)=>y[1]-S[1]),P=((i=O.filter(y=>y[2].slice(0,H(y[0])?2:3).every(S=>S<=0))[0])==null?void 0:i[0])||O[0][0];return P!==c?{data:{index:w+1,overflows:b},reset:{placement:P}}:{}}}},oe=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:a,elements:f}=e,{mainAxis:u=!0,crossAxis:l=!0,fallbackPlacements:m,fallbackStrategy:d="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...p}=j(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const w=W(i),x=z(c),v=W(c)===c,R=await(a.isRTL==null?void 0:a.isRTL(f.floating)),b=m||(v||!g?[rt(c)]:qt(c)),A=h!=="none";!m&&A&&b.push(...Jt(c,g,h,R));const O=[c,...b],B=await Q(e,p),P=[];let y=((o=s.flip)==null?void 0:o.overflows)||[];if(u&&P.push(B[w]),l){const C=Mt(i,r,R);P.push(B[C[0]],B[C[1]])}if(y=[...y,{placement:i,overflows:P}],!P.every(C=>C<=0)){var S,T;const C=(((S=s.flip)==null?void 0:S.index)||0)+1,$=O[C];if($&&(!(l==="alignment"?x!==z($):!1)||y.every(F=>z(F.placement)===x?F.overflows[0]>0:!0)))return{data:{index:C,overflows:y},reset:{placement:$}};let k=(T=y.filter(D=>D.overflows[0]<=0).sort((D,F)=>D.overflows[1]-F.overflows[1])[0])==null?void 0:T.placement;if(!k)switch(d){case"bestFit":{var E;const D=(E=y.filter(F=>{if(A){const q=z(F.placement);return q===x||q==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(q=>q>0).reduce((q,It)=>q+It,0)]).sort((F,q)=>F[1]-q[1])[0])==null?void 0:E[0];D&&(k=D);break}case"initialPlacement":k=c;break}if(i!==k)return{reset:{placement:k}}}return{}}}};function St(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ct(t){return Dt.some(e=>t[e]>=0)}const ie=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n}=e,{strategy:o="referenceHidden",...i}=j(t,e);switch(o){case"referenceHidden":{const s=await Q(e,{...i,elementContext:"reference"}),r=St(s,n.reference);return{data:{referenceHiddenOffsets:r,referenceHidden:Ct(r)}}}case"escaped":{const s=await Q(e,{...i,altBoundary:!0}),r=St(s,n.floating);return{data:{escapedOffsets:r,escaped:Ct(r)}}}default:return{}}}}};function Bt(t){const e=N(...t.map(s=>s.left)),n=N(...t.map(s=>s.top)),o=L(...t.map(s=>s.right)),i=L(...t.map(s=>s.bottom));return{x:e,y:n,width:o-e,height:i-n}}function se(t){const e=t.slice().sort((i,s)=>i.y-s.y),n=[];let o=null;for(let i=0;i<e.length;i++){const s=e[i];!o||s.y-o.y>o.height/2?n.push([s]):n[n.length-1].push(s),o=s}return n.map(i=>J(Bt(i)))}const re=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:o,rects:i,platform:s,strategy:r}=e,{padding:c=2,x:a,y:f}=j(t,e),u=Array.from(await(s.getClientRects==null?void 0:s.getClientRects(o.reference))||[]),l=se(u),m=J(Bt(u)),d=pt(c);function h(){if(l.length===2&&l[0].left>l[1].right&&a!=null&&f!=null)return l.find(p=>a>p.left-d.left&&a<p.right+d.right&&f>p.top-d.top&&f<p.bottom+d.bottom)||m;if(l.length>=2){if(z(n)==="y"){const y=l[0],S=l[l.length-1],T=W(n)==="top",E=y.top,C=S.bottom,$=T?y.left:S.left,k=T?y.right:S.right,D=k-$,F=C-E;return{top:E,bottom:C,left:$,right:k,width:D,height:F,x:$,y:E}}const p=W(n)==="left",w=L(...l.map(y=>y.right)),x=N(...l.map(y=>y.left)),v=l.filter(y=>p?y.left===x:y.right===w),R=v[0].top,b=v[v.length-1].bottom,A=x,O=w,B=O-A,P=b-R;return{top:R,bottom:b,left:A,right:O,width:B,height:P,x:A,y:R}}return m}const g=await s.getElementRects({reference:{getBoundingClientRect:h},floating:o.floating,strategy:r});return i.reference.x!==g.reference.x||i.reference.y!==g.reference.y||i.reference.width!==g.reference.width||i.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}},ce=new Set(["left","top"]);async function le(t,e){const{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=W(n),c=H(n),a=z(n)==="y",f=ce.has(r)?-1:1,u=s&&a?-1:1,l=j(e,t);let{mainAxis:m,crossAxis:d,alignmentAxis:h}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return c&&typeof h=="number"&&(d=c==="end"?h*-1:h),a?{x:d*u,y:m*f}:{x:m*f,y:d*u}}const ae=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:s,placement:r,middlewareData:c}=e,a=await le(e,t);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+a.x,y:s+a.y,data:{...a,placement:r}}}}},fe=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:s=!0,crossAxis:r=!1,limiter:c={fn:p=>{let{x:w,y:x}=p;return{x:w,y:x}}},...a}=j(t,e),f={x:n,y:o},u=await Q(e,a),l=z(W(i)),m=Ft(l);let d=f[m],h=f[l];if(s){const p=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=d+u[p],v=d-u[w];d=dt(x,d,v)}if(r){const p=l==="y"?"top":"left",w=l==="y"?"bottom":"right",x=h+u[p],v=h-u[w];h=dt(x,h,v)}const g=c.fn({...e,[m]:d,[l]:h});return{...g,data:{x:g.x-n,y:g.y-o,enabled:{[m]:s,[l]:r}}}}}},ue=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:s,platform:r,elements:c}=e,{apply:a=()=>{},...f}=j(t,e),u=await Q(e,f),l=W(i),m=H(i),d=z(i)==="y",{width:h,height:g}=s.floating;let p,w;l==="top"||l==="bottom"?(p=l,w=m===(await(r.isRTL==null?void 0:r.isRTL(c.floating))?"start":"end")?"left":"right"):(w=l,p=m==="end"?"top":"bottom");const x=g-u.top-u.bottom,v=h-u.left-u.right,R=N(g-u[p],x),b=N(h-u[w],v),A=!e.middlewareData.shift;let O=R,B=b;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(B=v),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(O=x),A&&!m){const y=L(u.left,0),S=L(u.right,0),T=L(u.top,0),E=L(u.bottom,0);d?B=h-2*(y!==0||S!==0?y+S:L(u.left,u.right)):O=g-2*(T!==0||E!==0?T+E:L(u.top,u.bottom))}await a({...e,availableWidth:B,availableHeight:O});const P=await r.getDimensions(c.floating);return h!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function ct(){return typeof window<"u"}function tt(t){return kt(t)?(t.nodeName||"").toLowerCase():"#document"}function M(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function Y(t){var e;return(e=(kt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function kt(t){return ct()?t instanceof Node||t instanceof M(t).Node:!1}function V(t){return ct()?t instanceof Element||t instanceof M(t).Element:!1}function X(t){return ct()?t instanceof HTMLElement||t instanceof M(t).HTMLElement:!1}function Lt(t){return!ct()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof M(t).ShadowRoot}const de=new Set(["inline","contents"]);function nt(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=_(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!de.has(i)}const me=new Set(["table","td","th"]);function he(t){return me.has(tt(t))}const ge=[":popover-open",":modal"];function lt(t){return ge.some(e=>{try{return t.matches(e)}catch{return!1}})}const pe=["transform","translate","scale","rotate","perspective"],we=["transform","translate","scale","rotate","perspective","filter"],xe=["paint","layout","strict","content"];function wt(t){const e=xt(),n=V(t)?_(t):t;return pe.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||we.some(o=>(n.willChange||"").includes(o))||xe.some(o=>(n.contain||"").includes(o))}function ye(t){let e=U(t);for(;X(e)&&!Z(e);){if(wt(e))return e;if(lt(e))return null;e=U(e)}return null}function xt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const ve=new Set(["html","body","#document"]);function Z(t){return ve.has(tt(t))}function _(t){return M(t).getComputedStyle(t)}function at(t){return V(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function U(t){if(tt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Lt(t)&&t.host||Y(t);return Lt(e)?e.host:e}function Wt(t){const e=U(t);return Z(e)?t.ownerDocument?t.ownerDocument.body:t.body:X(e)&&nt(e)?e:Wt(e)}function et(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Wt(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),r=M(i);if(s){const c=mt(r);return e.concat(r,r.visualViewport||[],nt(i)?i:[],c&&n?et(c):[])}return e.concat(i,et(i,[],n))}function mt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function $t(t){const e=_(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=X(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,c=it(n)!==s||it(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function yt(t){return V(t)?t:t.contextElement}function G(t){const e=yt(t);if(!X(e))return I(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=$t(e);let r=(s?it(n.width):n.width)/o,c=(s?it(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const be=I(0);function Ht(t){const e=M(t);return!xt()||!e.visualViewport?be:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Re(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==M(t)?!1:e}function K(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=yt(t);let r=I(1);e&&(o?V(o)&&(r=G(o)):r=G(t));const c=Re(s,n,o)?Ht(s):I(0);let a=(i.left+c.x)/r.x,f=(i.top+c.y)/r.y,u=i.width/r.x,l=i.height/r.y;if(s){const m=M(s),d=o&&V(o)?M(o):o;let h=m,g=mt(h);for(;g&&o&&d!==h;){const p=G(g),w=g.getBoundingClientRect(),x=_(g),v=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*p.x,R=w.top+(g.clientTop+parseFloat(x.paddingTop))*p.y;a*=p.x,f*=p.y,u*=p.x,l*=p.y,a+=v,f+=R,h=M(g),g=mt(h)}}return J({width:u,height:l,x:a,y:f})}function ft(t,e){const n=at(t).scrollLeft;return e?e.left+n:K(Y(t)).left+n}function Nt(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-ft(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function Oe(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed",r=Y(o),c=e?lt(e.floating):!1;if(o===r||c&&s)return n;let a={scrollLeft:0,scrollTop:0},f=I(1);const u=I(0),l=X(o);if((l||!l&&!s)&&((tt(o)!=="body"||nt(r))&&(a=at(o)),X(o))){const d=K(o);f=G(o),u.x=d.x+o.clientLeft,u.y=d.y+o.clientTop}const m=r&&!l&&!s?Nt(r,a):I(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-a.scrollLeft*f.x+u.x+m.x,y:n.y*f.y-a.scrollTop*f.y+u.y+m.y}}function Ae(t){return Array.from(t.getClientRects())}function Se(t){const e=Y(t),n=at(t),o=t.ownerDocument.body,i=L(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=L(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+ft(t);const c=-n.scrollTop;return _(o).direction==="rtl"&&(r+=L(e.clientWidth,o.clientWidth)-i),{width:i,height:s,x:r,y:c}}const Pt=25;function Ce(t,e){const n=M(t),o=Y(t),i=n.visualViewport;let s=o.clientWidth,r=o.clientHeight,c=0,a=0;if(i){s=i.width,r=i.height;const u=xt();(!u||u&&e==="fixed")&&(c=i.offsetLeft,a=i.offsetTop)}const f=ft(o);if(f<=0){const u=o.ownerDocument,l=u.body,m=getComputedStyle(l),d=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(o.clientWidth-l.clientWidth-d);h<=Pt&&(s-=h)}else f<=Pt&&(s+=f);return{width:s,height:r,x:c,y:a}}const Le=new Set(["absolute","fixed"]);function Pe(t,e){const n=K(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=X(t)?G(t):I(1),r=t.clientWidth*s.x,c=t.clientHeight*s.y,a=i*s.x,f=o*s.y;return{width:r,height:c,x:a,y:f}}function Tt(t,e,n){let o;if(e==="viewport")o=Ce(t,n);else if(e==="document")o=Se(Y(t));else if(V(e))o=Pe(e,n);else{const i=Ht(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return J(o)}function Vt(t,e){const n=U(t);return n===e||!V(n)||Z(n)?!1:_(n).position==="fixed"||Vt(n,e)}function Te(t,e){const n=e.get(t);if(n)return n;let o=et(t,[],!1).filter(c=>V(c)&&tt(c)!=="body"),i=null;const s=_(t).position==="fixed";let r=s?U(t):t;for(;V(r)&&!Z(r);){const c=_(r),a=wt(r);!a&&c.position==="fixed"&&(i=null),(s?!a&&!i:!a&&c.position==="static"&&!!i&&Le.has(i.position)||nt(r)&&!a&&Vt(t,r))?o=o.filter(u=>u!==r):i=c,r=U(r)}return e.set(t,o),o}function Ee(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[...n==="clippingAncestors"?lt(e)?[]:Te(e,this._c):[].concat(n),o],c=r[0],a=r.reduce((f,u)=>{const l=Tt(e,u,i);return f.top=L(l.top,f.top),f.right=N(l.right,f.right),f.bottom=N(l.bottom,f.bottom),f.left=L(l.left,f.left),f},Tt(e,c,i));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}}function De(t){const{width:e,height:n}=$t(t);return{width:e,height:n}}function Fe(t,e,n){const o=X(e),i=Y(e),s=n==="fixed",r=K(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const a=I(0);function f(){a.x=ft(i)}if(o||!o&&!s)if((tt(e)!=="body"||nt(i))&&(c=at(e)),o){const d=K(e,!0,s,e);a.x=d.x+e.clientLeft,a.y=d.y+e.clientTop}else i&&f();s&&!o&&i&&f();const u=i&&!o&&!s?Nt(i,c):I(0),l=r.left+c.scrollLeft-a.x-u.x,m=r.top+c.scrollTop-a.y-u.y;return{x:l,y:m,width:r.width,height:r.height}}function ut(t){return _(t).position==="static"}function Et(t,e){if(!X(t)||_(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return Y(t)===n&&(n=n.ownerDocument.body),n}function _t(t,e){const n=M(t);if(lt(t))return n;if(!X(t)){let i=U(t);for(;i&&!Z(i);){if(V(i)&&!ut(i))return i;i=U(i)}return n}let o=Et(t,e);for(;o&&he(o)&&ut(o);)o=Et(o,e);return o&&Z(o)&&ut(o)&&!wt(o)?n:o||ye(t)||n}const Me=async function(t){const e=this.getOffsetParent||_t,n=this.getDimensions,o=await n(t.floating);return{reference:Fe(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Be(t){return _(t).direction==="rtl"}const ke={convertOffsetParentRelativeRectToViewportRelativeRect:Oe,getDocumentElement:Y,getClippingRect:Ee,getOffsetParent:_t,getElementRects:Me,getClientRects:Ae,getDimensions:De,getScale:G,isElement:V,isRTL:Be};function zt(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function We(t,e){let n=null,o;const i=Y(t);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function r(c,a){c===void 0&&(c=!1),a===void 0&&(a=1),s();const f=t.getBoundingClientRect(),{left:u,top:l,width:m,height:d}=f;if(c||e(),!m||!d)return;const h=ot(l),g=ot(i.clientWidth-(u+m)),p=ot(i.clientHeight-(l+d)),w=ot(u),v={rootMargin:-h+"px "+-g+"px "+-p+"px "+-w+"px",threshold:L(0,N(1,a))||1};let R=!0;function b(A){const O=A[0].intersectionRatio;if(O!==a){if(!R)return r();O?r(!1,O):o=setTimeout(()=>{r(!1,1e-7)},1e3)}O===1&&!zt(f,t.getBoundingClientRect())&&r(),R=!1}try{n=new IntersectionObserver(b,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(b,v)}n.observe(t)}return r(!0),s}function $e(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,f=yt(t),u=i||s?[...f?et(f):[],...et(e)]:[];u.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),s&&w.addEventListener("resize",n)});const l=f&&c?We(f,n):null;let m=-1,d=null;r&&(d=new ResizeObserver(w=>{let[x]=w;x&&x.target===f&&d&&(d.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var v;(v=d)==null||v.observe(e)})),n()}),f&&!a&&d.observe(f),d.observe(e));let h,g=a?K(t):null;a&&p();function p(){const w=K(t);g&&!zt(g,w)&&n(),g=w,h=requestAnimationFrame(p)}return n(),()=>{var w;u.forEach(x=>{i&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),l?.(),(w=d)==null||w.disconnect(),d=null,a&&cancelAnimationFrame(h)}}const He=ae,Ne=ne,Ve=fe,_e=oe,ze=ue,Ie=ie,Xe=te,Ye=re,je=(t,e,n)=>{const o=new Map,i={platform:ke,...n},s={...i.platform,_c:o};return Zt(t,e,{...i,platform:s})};exports.arrow=Xe;exports.autoPlacement=Ne;exports.autoUpdate=$e;exports.computePosition=je;exports.flip=_e;exports.hide=Ie;exports.inline=Ye;exports.offset=He;exports.shift=Ve;exports.size=ze;
|
|
1
|
+
"use strict";const Ft=["top","right","bottom","left"],bt=["start","end"],Rt=Ft.reduce((t,e)=>t.concat(e,e+"-"+bt[0],e+"-"+bt[1]),[]),H=Math.min,L=Math.max,it=Math.round,ot=Math.floor,I=t=>({x:t,y:t}),Yt={left:"right",right:"left",bottom:"top",top:"bottom"};function mt(t,e,n){return L(t,H(e,n))}function Y(t,e){return typeof t=="function"?t(e):t}function $(t){return t.split("-")[0]}function N(t){return t.split("-")[1]}function Mt(t){return t==="x"?"y":"x"}function gt(t){return t==="y"?"height":"width"}function z(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function pt(t){return Mt(z(t))}function Bt(t,e,n){n===void 0&&(n=!1);const o=N(t),i=pt(t),r=gt(i);let s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=st(s)),[s,st(s)]}function jt(t){const e=st(t);return[rt(t),e,rt(e)]}function rt(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Ot=["left","right"],At=["right","left"],Ut=["top","bottom"],qt=["bottom","top"];function Kt(t,e,n){switch(t){case"top":case"bottom":return n?e?At:Ot:e?Ot:At;case"left":case"right":return e?Ut:qt;default:return[]}}function Gt(t,e,n,o){const i=N(t);let r=Kt($(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(rt)))),r}function st(t){const e=$(t);return Yt[e]+t.slice(e.length)}function Jt(t){return{top:0,right:0,bottom:0,left:0,...t}}function wt(t){return typeof t!="number"?Jt(t):{top:t,right:t,bottom:t,left:t}}function Q(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Ct(t,e,n){let{reference:o,floating:i}=t;const r=z(e),s=pt(e),c=gt(s),f=$(e),d=r==="y",u=o.x+o.width/2-i.width/2,l=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2;let a;switch(f){case"top":a={x:u,y:o.y-i.height};break;case"bottom":a={x:u,y:o.y+o.height};break;case"right":a={x:o.x+o.width,y:l};break;case"left":a={x:o.x-i.width,y:l};break;default:a={x:o.x,y:o.y}}switch(N(e)){case"start":a[s]-=m*(n&&d?-1:1);break;case"end":a[s]+=m*(n&&d?-1:1);break}return a}async function Qt(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:r,rects:s,elements:c,strategy:f}=t,{boundary:d="clippingAncestors",rootBoundary:u="viewport",elementContext:l="floating",altBoundary:m=!1,padding:a=0}=Y(e,t),h=wt(a),w=c[m?l==="floating"?"reference":"floating":l],p=Q(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(w)))==null||n?w:w.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:d,rootBoundary:u,strategy:f})),x=l==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),b=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},O=Q(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:f}):x);return{top:(p.top-O.top+h.top)/b.y,bottom:(O.bottom-p.bottom+h.bottom)/b.y,left:(p.left-O.left+h.left)/b.x,right:(O.right-p.right+h.right)/b.x}}const Zt=50,te=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=s.detectOverflow?s:{...s,detectOverflow:Qt},f=await(s.isRTL==null?void 0:s.isRTL(e));let d=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:u,y:l}=Ct(d,o,f),m=o,a=0;const h={};for(let g=0;g<r.length;g++){const w=r[g];if(!w)continue;const{name:p,fn:x}=w,{x:y,y:b,data:O,reset:R}=await x({x:u,y:l,initialPlacement:o,placement:m,strategy:i,middlewareData:h,rects:d,platform:c,elements:{reference:t,floating:e}});u=y??u,l=b??l,h[p]={...h[p],...O},R&&a<Zt&&(a++,typeof R=="object"&&(R.placement&&(m=R.placement),R.rects&&(d=R.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):R.rects),{x:u,y:l}=Ct(d,m,f)),g=-1)}return{x:u,y:l,placement:m,strategy:i,middlewareData:h}},ee=t=>({name:"arrow",options:t,async fn(e){const{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:f}=e,{element:d,padding:u=0}=Y(t,e)||{};if(d==null)return{};const l=wt(u),m={x:n,y:o},a=pt(i),h=gt(a),g=await s.getDimensions(d),w=a==="y",p=w?"top":"left",x=w?"bottom":"right",y=w?"clientHeight":"clientWidth",b=r.reference[h]+r.reference[a]-m[a]-r.floating[h],O=m[a]-r.reference[a],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(d));let A=R?R[y]:0;(!A||!await(s.isElement==null?void 0:s.isElement(R)))&&(A=c.floating[y]||r.floating[h]);const B=b/2-O/2,P=A/2-g[h]/2-1,v=H(l[p],P),C=H(l[x],P),T=v,E=A-g[h]-C,S=A/2-g[h]/2+B,k=mt(T,S,E),W=!f.arrow&&N(i)!=null&&S!==k&&r.reference[h]/2-(S<T?v:C)-g[h]/2<0,D=W?S<T?S-T:S-E:0;return{[a]:m[a]+D,data:{[a]:k,centerOffset:S-k-D,...W&&{alignmentOffset:D}},reset:W}}});function ne(t,e,n){return(t?[...n.filter(i=>N(i)===t),...n.filter(i=>N(i)!==t)]:n.filter(i=>$(i)===i)).filter(i=>t?N(i)===t||(e?rt(i)!==i:!1):!0)}const oe=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;const{rects:r,middlewareData:s,placement:c,platform:f,elements:d}=e,{crossAxis:u=!1,alignment:l,allowedPlacements:m=Rt,autoAlignment:a=!0,...h}=Y(t,e),g=l!==void 0||m===Rt?ne(l||null,a,m):m,w=await f.detectOverflow(e,h),p=((n=s.autoPlacement)==null?void 0:n.index)||0,x=g[p];if(x==null)return{};const y=Bt(x,r,await(f.isRTL==null?void 0:f.isRTL(d.floating)));if(c!==x)return{reset:{placement:g[0]}};const b=[w[$(x)],w[y[0]],w[y[1]]],O=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:x,overflows:b}],R=g[p+1];if(R)return{data:{index:p+1,overflows:O},reset:{placement:R}};const A=O.map(v=>{const C=N(v.placement);return[v.placement,C&&u?v.overflows.slice(0,2).reduce((T,E)=>T+E,0):v.overflows[0],v.overflows]}).sort((v,C)=>v[1]-C[1]),P=((i=A.filter(v=>v[2].slice(0,N(v[0])?2:3).every(C=>C<=0))[0])==null?void 0:i[0])||A[0][0];return P!==c?{data:{index:p+1,overflows:O},reset:{placement:P}}:{}}}},ie=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:f,elements:d}=e,{mainAxis:u=!0,crossAxis:l=!0,fallbackPlacements:m,fallbackStrategy:a="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:g=!0,...w}=Y(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};const p=$(i),x=z(c),y=$(c)===c,b=await(f.isRTL==null?void 0:f.isRTL(d.floating)),O=m||(y||!g?[st(c)]:jt(c)),R=h!=="none";!m&&R&&O.push(...Gt(c,g,h,b));const A=[c,...O],B=await f.detectOverflow(e,w),P=[];let v=((o=r.flip)==null?void 0:o.overflows)||[];if(u&&P.push(B[p]),l){const S=Bt(i,s,b);P.push(B[S[0]],B[S[1]])}if(v=[...v,{placement:i,overflows:P}],!P.every(S=>S<=0)){var C,T;const S=(((C=r.flip)==null?void 0:C.index)||0)+1,k=A[S];if(k&&(!(l==="alignment"?x!==z(k):!1)||v.every(F=>z(F.placement)===x?F.overflows[0]>0:!0)))return{data:{index:S,overflows:v},reset:{placement:k}};let W=(T=v.filter(D=>D.overflows[0]<=0).sort((D,F)=>D.overflows[1]-F.overflows[1])[0])==null?void 0:T.placement;if(!W)switch(a){case"bestFit":{var E;const D=(E=v.filter(F=>{if(R){const U=z(F.placement);return U===x||U==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(U=>U>0).reduce((U,Xt)=>U+Xt,0)]).sort((F,U)=>F[1]-U[1])[0])==null?void 0:E[0];D&&(W=D);break}case"initialPlacement":W=c;break}if(i!==W)return{reset:{placement:W}}}return{}}}};function St(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Lt(t){return Ft.some(e=>t[e]>=0)}const re=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){const{rects:n,platform:o}=e,{strategy:i="referenceHidden",...r}=Y(t,e);switch(i){case"referenceHidden":{const s=await o.detectOverflow(e,{...r,elementContext:"reference"}),c=St(s,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:Lt(c)}}}case"escaped":{const s=await o.detectOverflow(e,{...r,altBoundary:!0}),c=St(s,n.floating);return{data:{escapedOffsets:c,escaped:Lt(c)}}}default:return{}}}}};function Wt(t){const e=H(...t.map(r=>r.left)),n=H(...t.map(r=>r.top)),o=L(...t.map(r=>r.right)),i=L(...t.map(r=>r.bottom));return{x:e,y:n,width:o-e,height:i-n}}function se(t){const e=t.slice().sort((i,r)=>i.y-r.y),n=[];let o=null;for(let i=0;i<e.length;i++){const r=e[i];!o||r.y-o.y>o.height/2?n.push([r]):n[n.length-1].push(r),o=r}return n.map(i=>Q(Wt(i)))}const ce=function(t){return t===void 0&&(t={}),{name:"inline",options:t,async fn(e){const{placement:n,elements:o,rects:i,platform:r,strategy:s}=e,{padding:c=2,x:f,y:d}=Y(t,e),u=Array.from(await(r.getClientRects==null?void 0:r.getClientRects(o.reference))||[]),l=se(u),m=Q(Wt(u)),a=wt(c);function h(){if(l.length===2&&l[0].left>l[1].right&&f!=null&&d!=null)return l.find(w=>f>w.left-a.left&&f<w.right+a.right&&d>w.top-a.top&&d<w.bottom+a.bottom)||m;if(l.length>=2){if(z(n)==="y"){const v=l[0],C=l[l.length-1],T=$(n)==="top",E=v.top,S=C.bottom,k=T?v.left:C.left,W=T?v.right:C.right,D=W-k,F=S-E;return{top:E,bottom:S,left:k,right:W,width:D,height:F,x:k,y:E}}const w=$(n)==="left",p=L(...l.map(v=>v.right)),x=H(...l.map(v=>v.left)),y=l.filter(v=>w?v.left===x:v.right===p),b=y[0].top,O=y[y.length-1].bottom,R=x,A=p,B=A-R,P=O-b;return{top:b,bottom:O,left:R,right:A,width:B,height:P,x:R,y:b}}return m}const g=await r.getElementRects({reference:{getBoundingClientRect:h},floating:o.floating,strategy:s});return i.reference.x!==g.reference.x||i.reference.y!==g.reference.y||i.reference.width!==g.reference.width||i.reference.height!==g.reference.height?{reset:{rects:g}}:{}}}},le=new Set(["left","top"]);async function fe(t,e){const{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=$(n),c=N(n),f=z(n)==="y",d=le.has(s)?-1:1,u=r&&f?-1:1,l=Y(e,t);let{mainAxis:m,crossAxis:a,alignmentAxis:h}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return c&&typeof h=="number"&&(a=c==="end"?h*-1:h),f?{x:a*u,y:m*d}:{x:m*d,y:a*u}}const ae=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:r,placement:s,middlewareData:c}=e,f=await fe(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+f.x,y:r+f.y,data:{...f,placement:s}}}}},ue=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i,platform:r}=e,{mainAxis:s=!0,crossAxis:c=!1,limiter:f={fn:p=>{let{x,y}=p;return{x,y}}},...d}=Y(t,e),u={x:n,y:o},l=await r.detectOverflow(e,d),m=z($(i)),a=Mt(m);let h=u[a],g=u[m];if(s){const p=a==="y"?"top":"left",x=a==="y"?"bottom":"right",y=h+l[p],b=h-l[x];h=mt(y,h,b)}if(c){const p=m==="y"?"top":"left",x=m==="y"?"bottom":"right",y=g+l[p],b=g-l[x];g=mt(y,g,b)}const w=f.fn({...e,[a]:h,[m]:g});return{...w,data:{x:w.x-n,y:w.y-o,enabled:{[a]:s,[m]:c}}}}}},de=function(t){return t===void 0&&(t={}),{name:"size",options:t,async fn(e){var n,o;const{placement:i,rects:r,platform:s,elements:c}=e,{apply:f=()=>{},...d}=Y(t,e),u=await s.detectOverflow(e,d),l=$(i),m=N(i),a=z(i)==="y",{width:h,height:g}=r.floating;let w,p;l==="top"||l==="bottom"?(w=l,p=m===(await(s.isRTL==null?void 0:s.isRTL(c.floating))?"start":"end")?"left":"right"):(p=l,w=m==="end"?"top":"bottom");const x=g-u.top-u.bottom,y=h-u.left-u.right,b=H(g-u[w],x),O=H(h-u[p],y),R=!e.middlewareData.shift;let A=b,B=O;if((n=e.middlewareData.shift)!=null&&n.enabled.x&&(B=y),(o=e.middlewareData.shift)!=null&&o.enabled.y&&(A=x),R&&!m){const v=L(u.left,0),C=L(u.right,0),T=L(u.top,0),E=L(u.bottom,0);a?B=h-2*(v!==0||C!==0?v+C:L(u.left,u.right)):A=g-2*(T!==0||E!==0?T+E:L(u.top,u.bottom))}await f({...e,availableWidth:B,availableHeight:A});const P=await s.getDimensions(c.floating);return h!==P.width||g!==P.height?{reset:{rects:!0}}:{}}}};function ct(){return typeof window<"u"}function tt(t){return $t(t)?(t.nodeName||"").toLowerCase():"#document"}function M(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function X(t){var e;return(e=($t(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function $t(t){return ct()?t instanceof Node||t instanceof M(t).Node:!1}function _(t){return ct()?t instanceof Element||t instanceof M(t).Element:!1}function j(t){return ct()?t instanceof HTMLElement||t instanceof M(t).HTMLElement:!1}function Pt(t){return!ct()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof M(t).ShadowRoot}function nt(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=V(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&i!=="inline"&&i!=="contents"}function me(t){return/^(table|td|th)$/.test(tt(t))}function lt(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const he=/transform|translate|scale|rotate|perspective|filter/,ge=/paint|layout|strict|content/,K=t=>!!t&&t!=="none";let ut;function xt(t){const e=_(t)?V(t):t;return K(e.transform)||K(e.translate)||K(e.scale)||K(e.rotate)||K(e.perspective)||!yt()&&(K(e.backdropFilter)||K(e.filter))||he.test(e.willChange||"")||ge.test(e.contain||"")}function pe(t){let e=q(t);for(;j(e)&&!Z(e);){if(xt(e))return e;if(lt(e))return null;e=q(e)}return null}function yt(){return ut==null&&(ut=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ut}function Z(t){return/^(html|body|#document)$/.test(tt(t))}function V(t){return M(t).getComputedStyle(t)}function ft(t){return _(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function q(t){if(tt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Pt(t)&&t.host||X(t);return Pt(e)?e.host:e}function kt(t){const e=q(t);return Z(e)?t.ownerDocument?t.ownerDocument.body:t.body:j(e)&&nt(e)?e:kt(e)}function et(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=kt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=M(i);if(r){const c=ht(s);return e.concat(s,s.visualViewport||[],nt(i)?i:[],c&&n?et(c):[])}else return e.concat(i,et(i,[],n))}function ht(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function Nt(t){const e=V(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=j(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=it(n)!==r||it(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function vt(t){return _(t)?t:t.contextElement}function J(t){const e=vt(t);if(!j(e))return I(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:r}=Nt(e);let s=(r?it(n.width):n.width)/o,c=(r?it(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const we=I(0);function Ht(t){const e=M(t);return!yt()||!e.visualViewport?we:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function xe(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==M(t)?!1:e}function G(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),r=vt(t);let s=I(1);e&&(o?_(o)&&(s=J(o)):s=J(t));const c=xe(r,n,o)?Ht(r):I(0);let f=(i.left+c.x)/s.x,d=(i.top+c.y)/s.y,u=i.width/s.x,l=i.height/s.y;if(r){const m=M(r),a=o&&_(o)?M(o):o;let h=m,g=ht(h);for(;g&&o&&a!==h;){const w=J(g),p=g.getBoundingClientRect(),x=V(g),y=p.left+(g.clientLeft+parseFloat(x.paddingLeft))*w.x,b=p.top+(g.clientTop+parseFloat(x.paddingTop))*w.y;f*=w.x,d*=w.y,u*=w.x,l*=w.y,f+=y,d+=b,h=M(g),g=ht(h)}}return Q({width:u,height:l,x:f,y:d})}function at(t,e){const n=ft(t).scrollLeft;return e?e.left+n:G(X(t)).left+n}function _t(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-at(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function ye(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const r=i==="fixed",s=X(o),c=e?lt(e.floating):!1;if(o===s||c&&r)return n;let f={scrollLeft:0,scrollTop:0},d=I(1);const u=I(0),l=j(o);if((l||!l&&!r)&&((tt(o)!=="body"||nt(s))&&(f=ft(o)),l)){const a=G(o);d=J(o),u.x=a.x+o.clientLeft,u.y=a.y+o.clientTop}const m=s&&!l&&!r?_t(s,f):I(0);return{width:n.width*d.x,height:n.height*d.y,x:n.x*d.x-f.scrollLeft*d.x+u.x+m.x,y:n.y*d.y-f.scrollTop*d.y+u.y+m.y}}function ve(t){return Array.from(t.getClientRects())}function be(t){const e=X(t),n=ft(t),o=t.ownerDocument.body,i=L(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=L(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let s=-n.scrollLeft+at(t);const c=-n.scrollTop;return V(o).direction==="rtl"&&(s+=L(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}const Tt=25;function Re(t,e){const n=M(t),o=X(t),i=n.visualViewport;let r=o.clientWidth,s=o.clientHeight,c=0,f=0;if(i){r=i.width,s=i.height;const u=yt();(!u||u&&e==="fixed")&&(c=i.offsetLeft,f=i.offsetTop)}const d=at(o);if(d<=0){const u=o.ownerDocument,l=u.body,m=getComputedStyle(l),a=u.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,h=Math.abs(o.clientWidth-l.clientWidth-a);h<=Tt&&(r-=h)}else d<=Tt&&(r+=d);return{width:r,height:s,x:c,y:f}}function Oe(t,e){const n=G(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=j(t)?J(t):I(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,f=i*r.x,d=o*r.y;return{width:s,height:c,x:f,y:d}}function Et(t,e,n){let o;if(e==="viewport")o=Re(t,n);else if(e==="document")o=be(X(t));else if(_(e))o=Oe(e,n);else{const i=Ht(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return Q(o)}function Vt(t,e){const n=q(t);return n===e||!_(n)||Z(n)?!1:V(n).position==="fixed"||Vt(n,e)}function Ae(t,e){const n=e.get(t);if(n)return n;let o=et(t,[],!1).filter(c=>_(c)&&tt(c)!=="body"),i=null;const r=V(t).position==="fixed";let s=r?q(t):t;for(;_(s)&&!Z(s);){const c=V(s),f=xt(s);!f&&c.position==="fixed"&&(i=null),(r?!f&&!i:!f&&c.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||nt(s)&&!f&&Vt(t,s))?o=o.filter(u=>u!==s):i=c,s=q(s)}return e.set(t,o),o}function Ce(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const s=[...n==="clippingAncestors"?lt(e)?[]:Ae(e,this._c):[].concat(n),o],c=Et(e,s[0],i);let f=c.top,d=c.right,u=c.bottom,l=c.left;for(let m=1;m<s.length;m++){const a=Et(e,s[m],i);f=L(a.top,f),d=H(a.right,d),u=H(a.bottom,u),l=L(a.left,l)}return{width:d-l,height:u-f,x:l,y:f}}function Se(t){const{width:e,height:n}=Nt(t);return{width:e,height:n}}function Le(t,e,n){const o=j(e),i=X(e),r=n==="fixed",s=G(t,!0,r,e);let c={scrollLeft:0,scrollTop:0};const f=I(0);function d(){f.x=at(i)}if(o||!o&&!r)if((tt(e)!=="body"||nt(i))&&(c=ft(e)),o){const a=G(e,!0,r,e);f.x=a.x+e.clientLeft,f.y=a.y+e.clientTop}else i&&d();r&&!o&&i&&d();const u=i&&!o&&!r?_t(i,c):I(0),l=s.left+c.scrollLeft-f.x-u.x,m=s.top+c.scrollTop-f.y-u.y;return{x:l,y:m,width:s.width,height:s.height}}function dt(t){return V(t).position==="static"}function Dt(t,e){if(!j(t)||V(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return X(t)===n&&(n=n.ownerDocument.body),n}function zt(t,e){const n=M(t);if(lt(t))return n;if(!j(t)){let i=q(t);for(;i&&!Z(i);){if(_(i)&&!dt(i))return i;i=q(i)}return n}let o=Dt(t,e);for(;o&&me(o)&&dt(o);)o=Dt(o,e);return o&&Z(o)&&dt(o)&&!xt(o)?n:o||pe(t)||n}const Pe=async function(t){const e=this.getOffsetParent||zt,n=this.getDimensions,o=await n(t.floating);return{reference:Le(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Te(t){return V(t).direction==="rtl"}const Ee={convertOffsetParentRelativeRectToViewportRelativeRect:ye,getDocumentElement:X,getClippingRect:Ce,getOffsetParent:zt,getElementRects:Pe,getClientRects:ve,getDimensions:Se,getScale:J,isElement:_,isRTL:Te};function It(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function De(t,e){let n=null,o;const i=X(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,f){c===void 0&&(c=!1),f===void 0&&(f=1),r();const d=t.getBoundingClientRect(),{left:u,top:l,width:m,height:a}=d;if(c||e(),!m||!a)return;const h=ot(l),g=ot(i.clientWidth-(u+m)),w=ot(i.clientHeight-(l+a)),p=ot(u),y={rootMargin:-h+"px "+-g+"px "+-w+"px "+-p+"px",threshold:L(0,H(1,f))||1};let b=!0;function O(R){const A=R[0].intersectionRatio;if(A!==f){if(!b)return s();A?s(!1,A):o=setTimeout(()=>{s(!1,1e-7)},1e3)}A===1&&!It(d,t.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(O,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(O,y)}n.observe(t)}return s(!0),r}function Fe(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:f=!1}=o,d=vt(t),u=i||r?[...d?et(d):[],...e?et(e):[]]:[];u.forEach(p=>{i&&p.addEventListener("scroll",n,{passive:!0}),r&&p.addEventListener("resize",n)});const l=d&&c?De(d,n):null;let m=-1,a=null;s&&(a=new ResizeObserver(p=>{let[x]=p;x&&x.target===d&&a&&e&&(a.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=a)==null||y.observe(e)})),n()}),d&&!f&&a.observe(d),e&&a.observe(e));let h,g=f?G(t):null;f&&w();function w(){const p=G(t);g&&!It(g,p)&&n(),g=p,h=requestAnimationFrame(w)}return n(),()=>{var p;u.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),l?.(),(p=a)==null||p.disconnect(),a=null,f&&cancelAnimationFrame(h)}}const Me=ae,Be=oe,We=ue,$e=ie,ke=de,Ne=re,He=ee,_e=ce,Ve=(t,e,n)=>{const o=new Map,i={platform:Ee,...n},r={...i.platform,_c:o};return te(t,e,{...i,platform:r})};exports.arrow=He;exports.autoPlacement=Be;exports.autoUpdate=Fe;exports.computePosition=Ve;exports.flip=$e;exports.hide=Ne;exports.inline=_e;exports.offset=Me;exports.shift=We;exports.size=ke;
|