@vonage/vivid 5.2.0 → 5.4.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/accordion-item/definition.cjs +2 -1
- package/accordion-item/definition.js +3 -2
- package/alert/definition.cjs +1 -1
- package/alert/definition.js +2 -2
- package/alert/index.cjs +1 -1
- package/alert/index.js +1 -1
- package/audio-player/definition.cjs +4 -2
- package/audio-player/definition.js +4 -2
- package/audio-player/index.cjs +5 -3
- package/audio-player/index.js +5 -3
- package/badge/definition.js +1 -1
- package/badge/index.cjs +2 -2
- package/badge/index.js +4 -4
- package/banner/definition.js +1 -1
- package/banner/index.cjs +3 -3
- package/banner/index.js +6 -6
- package/breadcrumb-item/index.cjs +1 -1
- package/breadcrumb-item/index.js +1 -1
- package/bundled/affix.cjs +7 -7
- package/bundled/affix.js +5 -5
- package/bundled/anchored.cjs +1 -1
- package/bundled/anchored.js +6 -6
- package/bundled/attribute-binding-behaviour.cjs +1 -1
- package/bundled/attribute-binding-behaviour.js +15 -13
- package/bundled/base-color-picker.cjs +13 -0
- package/bundled/base-color-picker.js +194 -0
- package/bundled/button.cjs +1 -1
- package/bundled/button.js +2 -2
- package/bundled/calendar-picker.template.cjs +7 -7
- package/bundled/calendar-picker.template.js +118 -118
- package/bundled/char-count.cjs +1 -1
- package/bundled/char-count.js +1 -1
- package/bundled/children.cjs +1 -1
- package/bundled/children.js +28 -20
- package/bundled/definition.cjs +3 -3
- package/bundled/definition.js +38 -38
- package/bundled/definition10.cjs +72 -18
- package/bundled/definition10.js +351 -65
- package/bundled/definition11.cjs +19 -10
- package/bundled/definition11.js +217 -36
- package/bundled/definition12.cjs +10 -1
- package/bundled/definition12.js +38 -14
- package/bundled/definition13.cjs +1 -73
- package/bundled/definition13.js +15 -354
- package/bundled/definition15.cjs +1 -1
- package/bundled/definition15.js +1 -1
- package/bundled/definition16.cjs +2 -2
- package/bundled/definition16.js +8 -8
- package/bundled/definition17.cjs +7 -7
- package/bundled/definition17.js +17 -17
- package/bundled/definition19.cjs +23 -24
- package/bundled/definition19.js +151 -163
- package/bundled/definition2.cjs +9 -5
- package/bundled/definition2.js +21 -17
- package/bundled/definition22.cjs +9 -9
- package/bundled/definition22.js +31 -31
- package/bundled/definition3.cjs +1 -1
- package/bundled/definition3.js +1 -1
- package/bundled/definition6.cjs +3 -3
- package/bundled/definition6.js +28 -28
- package/bundled/definition7.cjs +1 -1
- package/bundled/definition7.js +6 -6
- package/bundled/definition8.cjs +2 -2
- package/bundled/definition8.js +4 -4
- package/bundled/definition9.cjs +5 -5
- package/bundled/definition9.js +394 -392
- package/bundled/delegates-aria.cjs +1 -1
- package/bundled/delegates-aria.js +59 -46
- package/bundled/form-associated.cjs +1 -1
- package/bundled/form-associated.js +3 -3
- package/bundled/host-semantics.cjs +1 -1
- package/bundled/host-semantics.js +48 -34
- package/bundled/listbox.cjs +1 -1
- package/bundled/listbox.js +82 -102
- package/bundled/localized.cjs +1 -1
- package/bundled/localized.js +51 -36
- package/bundled/mixins.cjs +18 -18
- package/bundled/mixins.js +99 -93
- package/bundled/normalize.cjs +1 -0
- package/bundled/normalize.js +7 -0
- package/bundled/picker-field.template.cjs +1 -1
- package/bundled/picker-field.template.js +4 -4
- package/bundled/ref.cjs +1 -1
- package/bundled/ref.js +8 -25
- package/bundled/repeat.cjs +1 -1
- package/bundled/repeat.js +459 -233
- package/bundled/slider.template.cjs +1 -1
- package/bundled/slider.template.js +2 -2
- package/bundled/slotted.cjs +1 -1
- package/bundled/slotted.js +62 -45
- package/bundled/time-selection-picker.template.cjs +1 -1
- package/bundled/time-selection-picker.template.js +5 -5
- package/bundled/vivid-element.cjs +5 -1
- package/bundled/vivid-element.js +2159 -1162
- package/bundled/when.cjs +1 -1
- package/bundled/when.js +8 -7
- package/calendar/definition.cjs +1 -1
- package/calendar/definition.js +2 -2
- package/calendar/index.cjs +1 -1
- package/calendar/index.js +15 -15
- package/calendar-event/index.cjs +1 -1
- package/calendar-event/index.js +1 -1
- package/card/definition.cjs +11 -3
- package/card/definition.js +11 -3
- package/card/index.cjs +19 -11
- package/card/index.js +35 -27
- package/color-picker/definition.cjs +1079 -0
- package/color-picker/definition.js +1073 -0
- package/color-picker/index.cjs +127 -0
- package/color-picker/index.js +726 -0
- package/combobox/definition.cjs +8 -28
- package/combobox/definition.js +10 -30
- package/combobox/index.cjs +7 -7
- package/combobox/index.js +60 -74
- package/contextual-help/index.cjs +1 -1
- package/contextual-help/index.js +1 -1
- package/custom-elements.json +1670 -163
- package/data-grid/definition.cjs +862 -27
- package/data-grid/definition.js +863 -28
- package/data-grid/index.cjs +25 -25
- package/data-grid/index.js +175 -168
- package/date-picker/definition.cjs +1 -1
- package/date-picker/definition.js +1 -1
- package/date-picker/index.cjs +1 -1
- package/date-picker/index.js +2 -2
- package/date-range-picker/definition.cjs +1 -1
- package/date-range-picker/definition.js +1 -1
- package/date-range-picker/index.cjs +1 -1
- package/date-range-picker/index.js +2 -2
- package/date-time-picker/definition.cjs +1 -1
- package/date-time-picker/definition.js +1 -1
- package/date-time-picker/index.cjs +1 -1
- package/date-time-picker/index.js +2 -2
- package/dial-pad/definition.cjs +4 -0
- package/dial-pad/definition.js +4 -0
- package/dial-pad/index.cjs +3 -3
- package/dial-pad/index.js +42 -39
- package/dialog/definition.cjs +6 -3
- package/dialog/definition.js +6 -3
- package/dialog/index.cjs +22 -19
- package/dialog/index.js +48 -45
- package/elevation/definition.cjs +1 -1
- package/elevation/definition.js +1 -1
- package/empty-state/definition.cjs +7 -2
- package/empty-state/definition.js +7 -2
- package/empty-state/index.cjs +10 -5
- package/empty-state/index.js +18 -13
- package/fab/definition.js +1 -1
- package/fab/index.cjs +2 -2
- package/fab/index.js +4 -4
- package/file-picker/definition.cjs +2 -2
- package/file-picker/definition.js +3 -3
- package/file-picker/index.cjs +1 -1
- package/file-picker/index.js +4 -4
- package/header/definition.cjs +1 -1
- package/header/definition.js +1 -1
- package/icon/definition.cjs +10 -6
- package/icon/definition.js +10 -6
- package/index.cjs +7 -4
- package/index.js +3 -3
- package/lib/accordion/accordion.d.ts +1 -1
- package/lib/accordion/definition.d.ts +1 -1
- package/lib/accordion-item/accordion-item.d.ts +2 -2
- package/lib/action-group/action-group.d.ts +2 -2
- package/lib/alert/alert.d.ts +4 -4
- package/lib/audio-player/audio-player.d.ts +3 -3
- package/lib/avatar/avatar.d.ts +2 -2
- package/lib/badge/badge.d.ts +2 -2
- package/lib/banner/banner.d.ts +6 -6
- package/lib/breadcrumb/breadcrumb.d.ts +2 -2
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +2 -2
- package/lib/button/button.d.ts +6 -6
- package/lib/button/button.template.d.ts +2 -1
- package/lib/calendar/calendar.d.ts +1 -1
- package/lib/calendar-event/calendar-event.d.ts +2 -2
- package/lib/card/card.d.ts +2 -2
- package/lib/checkbox/checkbox.d.ts +12 -12
- package/lib/color-picker/color-picker.d.ts +2420 -0
- package/lib/color-picker/color-picker.template.d.ts +3 -0
- package/lib/color-picker/definition.d.ts +4 -0
- package/lib/color-picker/locale.d.ts +9 -0
- package/lib/combobox/combobox.d.ts +15 -14
- package/lib/combobox/combobox.options.d.ts +1 -1
- package/lib/components.d.ts +1 -0
- package/lib/data-grid/data-grid-cell.d.ts +4 -4
- package/lib/data-grid/data-grid-row.d.ts +3 -4
- package/lib/data-grid/data-grid.d.ts +1 -2
- package/lib/date-picker/date-picker.d.ts +54 -54
- package/lib/date-range-picker/date-range-picker.d.ts +28 -28
- package/lib/date-time-picker/date-time-picker.d.ts +56 -56
- package/lib/dial-pad/dial-pad.d.ts +3 -2
- package/lib/dialog/dialog.d.ts +4 -4
- package/lib/divider/divider.d.ts +3 -3
- package/lib/fab/fab.d.ts +2 -2
- package/lib/file-picker/file-picker.d.ts +14 -14
- package/lib/header/header.d.ts +2 -2
- package/lib/menu/menu.d.ts +4 -4
- package/lib/menu-item/menu-item-role.d.ts +1 -1
- package/lib/menu-item/menu-item.d.ts +4 -4
- package/lib/nav/nav.d.ts +2 -2
- package/lib/nav-disclosure/nav-disclosure.d.ts +4 -4
- package/lib/nav-item/nav-item.d.ts +4 -4
- package/lib/note/note.d.ts +2 -2
- package/lib/number-field/number-field.d.ts +18 -18
- package/lib/option/option.d.ts +4 -4
- package/lib/pagination/pagination.d.ts +2 -2
- package/lib/popup/popup.d.ts +1 -1
- package/lib/progress/progress.d.ts +2 -2
- package/lib/progress-ring/progress-ring.d.ts +2 -2
- package/lib/radio/radio.d.ts +6 -6
- package/lib/radio-group/radio-group.d.ts +2 -2
- package/lib/range-slider/range-slider.d.ts +6 -6
- package/lib/rich-text-editor/menubar/menubar.d.ts +2 -2
- package/lib/rich-text-editor/rich-text-editor.d.ts +2 -2
- package/lib/searchable-select/locale.d.ts +4 -0
- package/lib/searchable-select/option-tag.d.ts +2 -2
- package/lib/searchable-select/searchable-select.d.ts +21 -18
- package/lib/select/select.d.ts +19 -17
- package/lib/selectable-box/selectable-box.d.ts +2 -2
- package/lib/simple-color-picker/locale.d.ts +0 -1
- package/lib/simple-color-picker/simple-color-picker.d.ts +47 -821
- package/lib/slider/slider.d.ts +7 -7
- package/lib/split-button/split-button.d.ts +6 -6
- package/lib/switch/switch.d.ts +4 -4
- package/lib/tab/tab.d.ts +6 -6
- package/lib/tab-panel/tab-panel.d.ts +2 -2
- package/lib/tabs/tabs.d.ts +2 -2
- package/lib/tag/tag.d.ts +6 -6
- package/lib/tag-group/tag-group.d.ts +2 -2
- package/lib/tag-name-map.d.ts +2 -1
- package/lib/text-area/text-area.d.ts +17 -17
- package/lib/text-field/text-field.d.ts +19 -19
- package/lib/time-picker/time-picker.d.ts +28 -28
- package/lib/toggletip/toggletip.d.ts +4 -4
- package/lib/tooltip/tooltip.d.ts +2 -2
- package/lib/tree-item/tree-item.d.ts +4 -4
- package/lib/tree-view/tree-view.d.ts +2 -2
- package/lib/video-player/video-player.d.ts +2 -2
- package/locales/de-DE.cjs +17 -2
- package/locales/de-DE.js +17 -2
- package/locales/en-GB.cjs +17 -2
- package/locales/en-GB.js +17 -2
- package/locales/en-US.cjs +17 -2
- package/locales/en-US.js +17 -2
- package/locales/ja-JP.cjs +17 -2
- package/locales/ja-JP.js +17 -2
- package/locales/zh-CN.cjs +17 -2
- package/locales/zh-CN.js +17 -2
- package/menu/definition.cjs +6 -6
- package/menu/definition.js +7 -7
- package/nav-disclosure/definition.js +1 -1
- package/nav-item/definition.js +1 -1
- package/note/definition.js +1 -1
- package/note/index.cjs +2 -2
- package/note/index.js +4 -4
- package/number-field/definition.cjs +1 -1
- package/number-field/definition.js +3 -3
- package/number-field/index.cjs +5 -5
- package/number-field/index.js +21 -21
- package/option/definition.cjs +6 -77
- package/option/definition.js +3 -78
- package/option/index.cjs +1 -1
- package/option/index.js +1 -1
- package/package.json +34 -8
- package/pagination/definition.cjs +2 -1
- package/pagination/definition.js +2 -1
- package/pagination/index.cjs +12 -12
- package/pagination/index.js +59 -59
- package/popup/definition.cjs +2 -2
- package/popup/definition.js +2 -2
- package/progress/index.cjs +1 -1
- package/progress/index.js +1 -1
- package/radio/definition.cjs +9 -9
- package/radio/definition.js +10 -10
- package/radio-group/definition.cjs +2 -1
- package/radio-group/definition.js +2 -1
- package/radio-group/index.cjs +5 -5
- package/radio-group/index.js +80 -77
- package/range-slider/definition.cjs +1 -1
- package/range-slider/definition.js +1 -1
- package/range-slider/index.cjs +1 -1
- package/range-slider/index.js +1 -1
- package/rich-text-editor/definition.cjs +3 -4
- package/rich-text-editor/definition.js +3 -4
- package/rich-text-editor/index.cjs +27 -27
- package/rich-text-editor/index.js +1208 -1198
- package/searchable-select/definition.cjs +106 -14
- package/searchable-select/definition.js +107 -15
- package/searchable-select/index.cjs +81 -69
- package/searchable-select/index.js +362 -276
- package/select/definition.cjs +25 -42
- package/select/definition.js +26 -43
- package/selectable-box/definition.cjs +1 -1
- package/selectable-box/definition.js +1 -1
- package/selectable-box/index.cjs +3 -3
- package/selectable-box/index.js +20 -20
- package/shared/aria/aria-change-subscription.d.ts +0 -1
- package/shared/aria/aria-mixin.d.ts +3 -3
- package/shared/aria/delegate-aria-behavior.d.ts +5 -10
- package/shared/aria/delegates-aria.d.ts +3 -3
- package/shared/aria/host-semantics-behavior.d.ts +5 -8
- package/shared/aria/host-semantics.d.ts +3 -3
- package/shared/color-picker/base-color-picker.d.ts +436 -0
- package/shared/color-picker/index.d.ts +1 -0
- package/shared/color-picker/locale.d.ts +3 -0
- package/shared/color-picker/utils.d.ts +1 -0
- package/shared/deprecation/replaced-props.d.ts +317 -2
- package/shared/design-system/defineVividComponent.d.ts +2 -2
- package/shared/feedback/feedback-message.d.ts +2 -2
- package/shared/feedback/mixins.d.ts +4 -4
- package/shared/foundation/button/button.d.ts +4 -4
- package/shared/foundation/form-associated/form-associated.d.ts +4 -4
- package/shared/foundation/listbox/listbox.d.ts +4 -0
- package/shared/foundation/vivid-element/vivid-element.d.ts +335 -8
- package/shared/localization/Locale.d.ts +4 -0
- package/shared/patterns/affix.d.ts +4 -4
- package/shared/patterns/anchored.d.ts +4 -4
- package/shared/patterns/char-count/char-count.d.ts +2 -2
- package/shared/patterns/form-elements/form-element.d.ts +4 -4
- package/shared/patterns/form-elements/with-contextual-help.d.ts +6 -6
- package/shared/patterns/form-elements/with-error-text.d.ts +6 -6
- package/shared/patterns/form-elements/with-success-text.d.ts +2 -2
- package/shared/patterns/linkable.d.ts +2 -2
- package/shared/patterns/localized.d.ts +2 -2
- package/shared/patterns/trapped-focus.d.ts +2 -2
- package/shared/picker-field/mixins/calendar-picker.d.ts +14 -14
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +14 -14
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +2 -2
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +28 -28
- package/shared/picker-field/mixins/single-date-picker.d.ts +40 -40
- package/shared/picker-field/mixins/single-value-picker.d.ts +12 -12
- package/shared/picker-field/mixins/time-selection-picker.d.ts +29 -29
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +28 -28
- package/shared/picker-field/picker-field.d.ts +14 -14
- package/shared/templating/attribute-binding-behaviour.d.ts +3 -4
- package/shared/templating/render-in-light-dom.d.ts +13 -12
- package/side-drawer/index.cjs +1 -1
- package/side-drawer/index.js +1 -1
- package/simple-color-picker/definition.cjs +29 -216
- package/simple-color-picker/definition.js +30 -217
- package/simple-color-picker/index.cjs +9 -21
- package/simple-color-picker/index.js +71 -185
- package/slider/definition.cjs +1 -1
- package/slider/definition.js +1 -1
- package/split-button/definition.js +1 -1
- package/styles/core/all.css +1 -1
- package/styles/core/theme.css +1 -1
- package/styles/core/typography.css +1 -1
- package/styles/tokens/theme-dark.css +4 -4
- package/styles/tokens/theme-light.css +4 -4
- package/styles/tokens/vivid-2-compat.css +1 -1
- package/switch/index.cjs +2 -2
- package/switch/index.js +4 -4
- package/tab/definition.js +1 -1
- package/tabs/definition.cjs +1 -1
- package/tabs/definition.js +2 -2
- package/tabs/index.cjs +2 -2
- package/tabs/index.js +16 -16
- package/tag/definition.js +1 -1
- package/tag/index.cjs +1 -1
- package/tag/index.js +1 -1
- package/text-area/index.cjs +3 -3
- package/text-area/index.js +8 -8
- package/text-field/definition.cjs +2 -2
- package/text-field/definition.js +4 -4
- package/text-field/index.cjs +1 -1
- package/text-field/index.js +1 -1
- package/time-picker/definition.cjs +1 -1
- package/time-picker/definition.js +1 -1
- package/time-picker/index.cjs +1 -1
- package/time-picker/index.js +2 -2
- package/toggletip/definition.cjs +2 -2
- package/toggletip/definition.js +3 -3
- package/tooltip/definition.cjs +1 -1
- package/tooltip/definition.js +1 -1
- package/tree-item/definition.cjs +1 -1
- package/tree-item/definition.js +1 -1
- package/tree-view/definition.cjs +2 -2
- package/tree-view/definition.js +3 -3
- package/tree-view/index.cjs +2 -2
- package/tree-view/index.js +6 -6
- package/unbundled/_commonjsHelpers.cjs +36 -0
- package/unbundled/_commonjsHelpers.js +32 -0
- package/unbundled/affix.cjs +1 -1
- package/unbundled/affix.js +2 -2
- package/unbundled/attribute-binding-behaviour.cjs +11 -10
- package/unbundled/attribute-binding-behaviour.js +11 -10
- package/unbundled/base-color-picker.cjs +278 -0
- package/unbundled/base-color-picker.js +275 -0
- package/unbundled/button.cjs +1 -1
- package/unbundled/button.js +2 -2
- package/unbundled/calendar-picker.template.cjs +4 -4
- package/unbundled/calendar-picker.template.js +5 -5
- package/unbundled/definition.js +1 -1
- package/unbundled/definition2.cjs +1 -1
- package/unbundled/definition2.js +3 -3
- package/unbundled/definition3.cjs +222 -140
- package/unbundled/definition3.js +220 -138
- package/unbundled/definition4.cjs +145 -235
- package/unbundled/definition4.js +143 -233
- package/unbundled/definition5.cjs +269 -27
- package/unbundled/definition5.js +267 -26
- package/unbundled/definition6.cjs +56 -0
- package/unbundled/definition6.js +52 -0
- package/unbundled/delegates-aria.cjs +67 -33
- package/unbundled/delegates-aria.js +69 -35
- package/unbundled/form-associated.cjs +2 -2
- package/unbundled/form-associated.js +3 -3
- package/unbundled/host-semantics.cjs +47 -22
- package/unbundled/host-semantics.js +48 -23
- package/unbundled/listbox.cjs +41 -63
- package/unbundled/listbox.js +39 -61
- package/unbundled/mixins.cjs +34 -27
- package/unbundled/mixins.js +35 -28
- package/unbundled/picker-field.template.cjs +3 -3
- package/unbundled/picker-field.template.js +4 -4
- package/unbundled/slider.template.cjs +1 -1
- package/unbundled/slider.template.js +1 -1
- package/unbundled/time-selection-picker.template.cjs +4 -4
- package/unbundled/time-selection-picker.template.js +5 -5
- package/unbundled/vivid-element.cjs +22 -15
- package/unbundled/vivid-element.js +23 -15
- package/video-player/definition.cjs +69047 -1
- package/video-player/definition.js +69047 -1
- package/video-player/index.cjs +36 -36
- package/video-player/index.js +1895 -1905
- package/visually-hidden/index.cjs +1 -1
- package/visually-hidden/index.js +1 -1
- package/vivid.api.json +719 -224
- package/bundled/option.cjs +0 -1
- package/bundled/option.js +0 -158
- package/unbundled/option.cjs +0 -217
- package/unbundled/option.js +0 -214
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";const d=require("./numbers.cjs"),r=require("./definition9.cjs"),m=require("./delegates-aria.cjs"),
|
|
1
|
+
"use strict";const d=require("./numbers.cjs"),r=require("./definition9.cjs"),m=require("./delegates-aria.cjs"),i=require("./ref.cjs"),p=require("./when.cjs"),n=require("./vivid-element.cjs"),s=require("./class-names.cjs"),l=require("./aria.cjs"),v=t=>{const a=t.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return Math.max(0,(a[1]?a[1].length:0)-(a[2]?+a[2]:0))},h=(t,a)=>{const e=v(a),o=Math.pow(10,e),u=Math.round(t/a)*a;return Math.round(u*o)/o},$=t=>t>0?t:1,g={fromView(t){const a=Number(t);return $(a)},toView(t){return t.toString()}},T=(t,a,e)=>t+(a-t)*e,b=(t,a,e)=>d.limit(0,1,(e-t)/(a-t)),f=({disabled:t,connotation:a})=>s.classNames("control",["disabled",!!t],[`connotation-${a}`,!!a]),V=({_focusVisible:t})=>s.classNames("thumb-container",["focus-visible",t]),c=(t,a)=>{const e=t?["right","center","","100% repeat-x"]:["bottom","top","100%","repeat-y"];return n.html` <div
|
|
2
2
|
class="mark"
|
|
3
3
|
style="
|
|
4
4
|
background: linear-gradient(to ${e[0]}, currentcolor 1px, transparent 0px)
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { l as m } from "./numbers.js";
|
|
2
2
|
import { P as u, a as n } from "./definition9.js";
|
|
3
3
|
import { d as p } from "./delegates-aria.js";
|
|
4
|
-
import { c as l } from "./class-names.js";
|
|
5
4
|
import { r as i } from "./ref.js";
|
|
6
5
|
import { w as d } from "./when.js";
|
|
7
|
-
import { O as s } from "./aria.js";
|
|
8
6
|
import { h as o } from "./vivid-element.js";
|
|
7
|
+
import { c as l } from "./class-names.js";
|
|
8
|
+
import { O as s } from "./aria.js";
|
|
9
9
|
const $ = (a) => {
|
|
10
10
|
const e = a.toString().match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
|
|
11
11
|
return Math.max(
|
package/bundled/slotted.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const i=require("./vivid-element.cjs"),d=s=>s.nodeType===1,c=s=>s?t=>t.nodeType===1&&t.matches(s):d;class n extends i.StatelessAttachedAttributeDirective{get id(){return this._id}set id(t){this._id=t,this._controllerProperty=`${t}-c`}bind(t){const e=t.targets[this.targetNodeId];e[this._controllerProperty]=t,this.updateTarget(t.source,this.computeNodes(e)),this.observe(e),t.onUnbind(this)}unbind(t){const e=t.targets[this.targetNodeId];this.updateTarget(t.source,i.emptyArray),this.disconnect(e),e[this._controllerProperty]=null}getSource(t){return t[this._controllerProperty].source}updateTarget(t,e){t[this.options.property]=e}computeNodes(t){let e=this.getNodes(t);return"filter"in this.options&&(e=e.filter(this.options.filter)),e}}const r="slotchange";class o extends n{observe(t){t.addEventListener(r,this)}disconnect(t){t.removeEventListener(r,this)}getNodes(t){return t.assignedNodes(this.options)}handleEvent(t){const e=t.currentTarget;this.updateTarget(this.getSource(e),this.computeNodes(e))}}i.HTMLDirective.define(o);function h(s){return i.isString(s)&&(s={property:s}),new o(s)}exports.NodeObservationDirective=n;exports.elements=c;exports.slotted=h;
|
package/bundled/slotted.js
CHANGED
|
@@ -1,81 +1,98 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
return t.nodeType === 1 && t.matches(e);
|
|
5
|
-
} : function(t, s, i) {
|
|
6
|
-
return t.nodeType === 1;
|
|
7
|
-
};
|
|
8
|
-
}
|
|
9
|
-
class a {
|
|
1
|
+
import { S as o, e as n, H as d, i as a } from "./vivid-element.js";
|
|
2
|
+
const c = (s) => s.nodeType === 1, u = (s) => s ? (t) => t.nodeType === 1 && t.matches(s) : c;
|
|
3
|
+
class h extends o {
|
|
10
4
|
/**
|
|
11
|
-
*
|
|
12
|
-
* @param target - The target to assign the nodes property on.
|
|
13
|
-
* @param options - The options to use in configuring node observation.
|
|
5
|
+
* The unique id of the factory.
|
|
14
6
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
7
|
+
get id() {
|
|
8
|
+
return this._id;
|
|
9
|
+
}
|
|
10
|
+
set id(t) {
|
|
11
|
+
this._id = t, this._controllerProperty = `${t}-c`;
|
|
17
12
|
}
|
|
18
13
|
/**
|
|
19
14
|
* Bind this behavior to the source.
|
|
20
15
|
* @param source - The source to bind to.
|
|
21
16
|
* @param context - The execution context that the binding is operating within.
|
|
17
|
+
* @param targets - The targets that behaviors in a view can attach to.
|
|
22
18
|
*/
|
|
23
19
|
bind(t) {
|
|
24
|
-
const
|
|
25
|
-
this.
|
|
20
|
+
const e = t.targets[this.targetNodeId];
|
|
21
|
+
e[this._controllerProperty] = t, this.updateTarget(t.source, this.computeNodes(e)), this.observe(e), t.onUnbind(this);
|
|
26
22
|
}
|
|
27
23
|
/**
|
|
28
24
|
* Unbinds this behavior from the source.
|
|
29
25
|
* @param source - The source to unbind from.
|
|
26
|
+
* @param context - The execution context that the binding is operating within.
|
|
27
|
+
* @param targets - The targets that behaviors in a view can attach to.
|
|
30
28
|
*/
|
|
31
|
-
unbind() {
|
|
32
|
-
|
|
29
|
+
unbind(t) {
|
|
30
|
+
const e = t.targets[this.targetNodeId];
|
|
31
|
+
this.updateTarget(t.source, n), this.disconnect(e), e[this._controllerProperty] = null;
|
|
33
32
|
}
|
|
34
|
-
/**
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
return
|
|
33
|
+
/**
|
|
34
|
+
* Gets the data source for the target.
|
|
35
|
+
* @param target - The target to get the source for.
|
|
36
|
+
* @returns The source.
|
|
37
|
+
*/
|
|
38
|
+
getSource(t) {
|
|
39
|
+
return t[this._controllerProperty].source;
|
|
41
40
|
}
|
|
42
|
-
|
|
43
|
-
|
|
41
|
+
/**
|
|
42
|
+
* Updates the source property with the computed nodes.
|
|
43
|
+
* @param source - The source object to assign the nodes property to.
|
|
44
|
+
* @param value - The nodes to assign to the source object property.
|
|
45
|
+
*/
|
|
46
|
+
updateTarget(t, e) {
|
|
47
|
+
t[this.options.property] = e;
|
|
44
48
|
}
|
|
45
|
-
}
|
|
46
|
-
class h extends a {
|
|
47
49
|
/**
|
|
48
|
-
*
|
|
49
|
-
* @param target - The
|
|
50
|
-
* @
|
|
50
|
+
* Computes the set of nodes that should be assigned to the source property.
|
|
51
|
+
* @param target - The target to compute the nodes for.
|
|
52
|
+
* @returns The computed nodes.
|
|
53
|
+
* @remarks
|
|
54
|
+
* Applies filters if provided.
|
|
51
55
|
*/
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
computeNodes(t) {
|
|
57
|
+
let e = this.getNodes(t);
|
|
58
|
+
return "filter" in this.options && (e = e.filter(this.options.filter)), e;
|
|
54
59
|
}
|
|
60
|
+
}
|
|
61
|
+
const i = "slotchange";
|
|
62
|
+
class r extends h {
|
|
55
63
|
/**
|
|
56
64
|
* Begins observation of the nodes.
|
|
65
|
+
* @param target - The target to observe.
|
|
57
66
|
*/
|
|
58
|
-
observe() {
|
|
59
|
-
|
|
67
|
+
observe(t) {
|
|
68
|
+
t.addEventListener(i, this);
|
|
60
69
|
}
|
|
61
70
|
/**
|
|
62
71
|
* Disconnects observation of the nodes.
|
|
72
|
+
* @param target - The target to unobserve.
|
|
63
73
|
*/
|
|
64
|
-
disconnect() {
|
|
65
|
-
|
|
74
|
+
disconnect(t) {
|
|
75
|
+
t.removeEventListener(i, this);
|
|
66
76
|
}
|
|
67
77
|
/**
|
|
68
|
-
* Retrieves the nodes that should be assigned to the
|
|
78
|
+
* Retrieves the raw nodes that should be assigned to the source property.
|
|
79
|
+
* @param target - The target to get the node to.
|
|
69
80
|
*/
|
|
70
|
-
getNodes() {
|
|
71
|
-
return
|
|
81
|
+
getNodes(t) {
|
|
82
|
+
return t.assignedNodes(this.options);
|
|
83
|
+
}
|
|
84
|
+
/** @internal */
|
|
85
|
+
handleEvent(t) {
|
|
86
|
+
const e = t.currentTarget;
|
|
87
|
+
this.updateTarget(this.getSource(e), this.computeNodes(e));
|
|
72
88
|
}
|
|
73
89
|
}
|
|
74
|
-
|
|
75
|
-
|
|
90
|
+
d.define(r);
|
|
91
|
+
function p(s) {
|
|
92
|
+
return a(s) && (s = { property: s }), new r(s);
|
|
76
93
|
}
|
|
77
94
|
export {
|
|
78
|
-
|
|
95
|
+
h as N,
|
|
79
96
|
u as e,
|
|
80
|
-
|
|
97
|
+
p as s
|
|
81
98
|
};
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
${_(P)} ${_(w)}
|
|
28
28
|
${C.when(M,_(x))}
|
|
29
29
|
${C.when(E,_(f))}
|
|
30
|
-
</div>`;var ee=Object.defineProperty,v=(e,t,o,i)=>{for(var r=void 0,n=e.length-1,s;n>=0;n--)(s=e[n])&&(r=s(t,o,r)||r);return r&&ee(t,o,r),r};class u extends j.Localized(l.VividElement){constructor(){super(...arguments),this.minutesStep=1,this.clock="24h",this.focusedPickerClass="focused",this._onFocusOut=()=>{this._clearFocusedClasses()},this._onPointerDown=()=>{this._clearFocusedClasses()}}valueChanged(t,o){o!==void 0&&!S(o)&&(this.value=void 0)}scrollSelectedOptionsToTop(){P.getSelectedOptionValue(this)&&h(this,"hours",P.getSelectedOptionValue(this),"start"),w.getSelectedOptionValue(this)&&h(this,"minutes",w.getSelectedOptionValue(this),"start"),M(this)&&x.getSelectedOptionValue(this)&&h(this,"seconds",x.getSelectedOptionValue(this),"start"),E(this)&&f.getSelectedOptionValue(this)&&h(this,"meridies",f.getSelectedOptionValue(this),"start")}focus(t){this.shadowRoot.querySelector(".picker").focus(t),this._applyFocusedClass()}_applyFocusedClass(){const t=this.shadowRoot.querySelectorAll(".picker");requestAnimationFrame(()=>{const o=this.shadowRoot.activeElement;t.forEach(i=>{i===o?i.parentElement?.classList.add(this.focusedPickerClass):i.parentElement?.classList.remove(this.focusedPickerClass)})})}_clearFocusedClasses(){this.shadowRoot.querySelectorAll(".picker").forEach(o=>{o.parentElement?.classList.remove(this.focusedPickerClass)})}}v([l.observable],u.prototype,"value");v([l.observable],u.prototype,"minutesStep");v([l.observable],u.prototype,"secondsStep");v([l.observable],u.prototype,"clock");v([l.observable],u.prototype,"min");v([l.observable],u.prototype,"max");const te=':host{display:inline-block}.time-pickers{display:flex;overflow:hidden;justify-content:center;padding:4px;block-size:calc(28px * var(--_inline-time-picker-num-options-visible) + 4px * (var(--_inline-time-picker-num-options-visible) - 1));gap:4px}.time-pickers .picker-wrapper{position:relative;display:flex;flex-direction:column;border-radius:4px}.time-pickers .picker-wrapper.focused:has(.picker:focus-visible){--focus-stroke-gap-color: transparent;--focus-inset: -2px;box-shadow:0 0 0 4px color-mix(in srgb,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))}.time-pickers .picker{position:relative;display:flex;overflow:hidden scroll;flex-direction:column;padding:0 4px;border-radius:4px;margin:0 -4px;gap:4px;inline-size:50px;list-style:none;scrollbar-width:none}@media (hover: hover){.time-pickers .picker:hover{scrollbar-width:auto}}.time-pickers .picker:after{display:block;flex-shrink:0;block-size:calc(28px * (var(--_inline-time-picker-num-options-visible) - 1) + 4px * (var(--_inline-time-picker-num-options-visible) - 1 - 1));content:""}.time-pickers .picker:focus-visible{outline:none}.time-pickers .option{--_connotation-color-primary: var(--vvd-time-picker-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-firm: var(--vvd-time-picker-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-time-picker-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-time-picker-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-dim: var(--vvd-time-picker-accent-dim, var(--vvd-color-neutral-200));--_connotation-color-pale: var(--vvd-time-picker-accent-pale, var(--vvd-color-neutral-300))}.time-pickers .option{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.time-pickers .option:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.time-pickers .option.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.time-pickers .option:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.time-pickers .option.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.time-pickers .option.selected:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}@media (hover: hover){.time-pickers .option.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}}.time-pickers .option.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.time-pickers .option.selected:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: transparent}.time-pickers .option.selected.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: transparent}.time-pickers .option{display:flex;flex-shrink:0;align-items:center;justify-content:center;border-radius:4px;background-color:var(--_appearance-color-fill);block-size:28px;color:var(--_appearance-color-text);cursor:pointer;font:var(--vvd-typography-base);inline-size:50px}.time-pickers .picker-wrapper:not(.focused) .picker:focus-visible .option.selected{--focus-stroke-gap-color: transparent;box-shadow:0 0 0 4px color-mix(in srgb,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))}',oe=l.defineVividComponent("inline-time-picker",u,Z,[],{styles:te,shadowOptions:{delegatesFocus:!0}}),L=(e,t,o)=>{const i=c(e);let n=`${m(o?V(i.hours):i.hours)}:${i.minuteStr}`;return t&&(n+=`:${i.secondStr}`),o&&(n+=` ${i.meridiem}`),n},T=e=>e>="0"&&e<="9",F=(e,t)=>{const o=e.toLowerCase(),i=[];let r;for(let p=0;p<o.length;p++){const d=o[p];if(d==="a"&&o[p+1]==="m"&&(p++,r="AM"),d==="p"&&o[p+1]==="m"&&(p++,r="PM"),T(d)){let k=d;for(;T(o[p+1]);)p++,k+=o[p];i.push(Number.parseInt(k,10))}}if(i.length===0||i.length>3)throw new Error("Invalid time format");if(r&&(i[0]<1||i[0]>12))throw new Error("Invalid time format");(r||t)&&i[0]===12&&(i[0]=0),r==="PM"&&(i[0]=i[0]+12);const[n,s=0,a=0]=i;if(n>23||s>59||a>59)throw new Error("Invalid value");return[n,s,a].map(m).join(":")};var ie=Object.defineProperty,re=Object.getOwnPropertyDescriptor,b=(e,t,o,i)=>{for(var r=i>1?void 0:i?re(t,o):t,n=e.length-1,s;n>=0;n--)(s=e[n])&&(r=(i?s(t,o,r):s(r))||r);return i&&r&&ie(t,o,r),r};const q=e=>{class t extends e{constructor(){super(...arguments),this.minutesStep=null,this.secondsStep=null,this.#t={handleChange:()=>{this.value&&(this._presentationValue=this._toPresentationValue(this.value))}}}get _displaySeconds(){return this.secondsStep!==null}get _use12hClock(){return this.clock?this.clock==="12h":this.locale.timePicker.defaultTo12HourClock}get _timePlaceholder(){let i="hh:mm";return this._displaySeconds&&(i+=":ss"),this._use12hClock&&(i+=" aa"),i}#t;#e;#o(){this.#e=l.Observable.binding(()=>this._use12hClock,this.#t),this.#e.observe(this,l.defaultExecutionContext)}#i(){this.#e.disconnect()}connectedCallback(){super.connectedCallback(),this.#o()}disconnectedCallback(){super.disconnectedCallback(),this.#i()}_onPickerButtonClick(){super._onPickerButtonClick(),this._popupOpen&&(l.DOM.processUpdates(),this._inlineTimePickerEl.scrollSelectedOptionsToTop())}_onInlineTimePickerChange(i){this._updateValueDueToUserInteraction(this._withUpdatedTime(i.detail),!1)}_onInlineTimePickerLastColumnSelected(){this._closePopup()}}return b([l.attr({attribute:"minutes-step",converter:l.nullableNumberConverter})],t.prototype,"minutesStep",2),b([l.attr({attribute:"seconds-step",converter:l.nullableNumberConverter})],t.prototype,"secondsStep",2),b([l.attr],t.prototype,"clock",2),b([l.volatile],t.prototype,"_use12hClock",1),t};var ne=Object.defineProperty,A=(e,t,o,i)=>{for(var r=void 0,n=e.length-1,s;n>=0;n--)(s=e[n])&&(r=s(t,o,r)||r);return r&&ne(t,o,r),r};const y={fromView:e=>e&&S(e)?e:"",toView(e){return e}};class $ extends q(D.SingleValuePicker(O.PickerField)){constructor(){super(),this._isValidValue=S,this.min="",this.max="",this.proxy.type="time",this.proxy.step="1"}_toPresentationValue(t){return L(t,this._displaySeconds,this._use12hClock)}_parsePresentationValue(t){return F(t,this._use12hClock)}get _timeValue(){return this.value}_withUpdatedTime(t){return t}get _resolvedMinTime(){return this.min||null}get _resolvedMaxTime(){return this.max||null}minChanged(t,o){this.proxy instanceof HTMLInputElement&&(this.proxy.min=o,this.validate())}maxChanged(t,o){this.proxy instanceof HTMLInputElement&&(this.proxy.max=o,this.validate())}get _textFieldPlaceholder(){return this._timePlaceholder}get _pickerButtonIcon(){return"clock-line"}get _pickerButtonLabel(){return this.value?this.locale.timePicker.changeTimeLabel(this._toPresentationValue(this.value)):this.locale.timePicker.chooseTimeLabel}_onPickerButtonClick(){super._onPickerButtonClick(),this._popupOpen&&(l.DOM.processUpdates(),this._focusableElsWithinDialog()[0]?.focus())}get _dialogLabel(){return this.locale.timePicker.chooseTimeLabel}_focusableElsWithinDialog(){return this._dialogEl.querySelectorAll("#inline-time-picker, .vwc-button")}_getCustomValidationError(){return this._isPresentationValueInvalid()?this.locale.timePicker.invalidTimeError:null}}A([l.attr({converter:y})],$.prototype,"min");A([l.attr({converter:y})],$.prototype,"max");const se=(e,t)=>{const o=e.tagFor(u);return l.html`
|
|
30
|
+
</div>`;var ee=Object.defineProperty,v=(e,t,o,i)=>{for(var r=void 0,n=e.length-1,s;n>=0;n--)(s=e[n])&&(r=s(t,o,r)||r);return r&&ee(t,o,r),r};class u extends j.Localized(l.VividElement){constructor(){super(...arguments),this.minutesStep=1,this.clock="24h",this.focusedPickerClass="focused",this._onFocusOut=()=>{this._clearFocusedClasses()},this._onPointerDown=()=>{this._clearFocusedClasses()}}valueChanged(t,o){o!==void 0&&!S(o)&&(this.value=void 0)}scrollSelectedOptionsToTop(){P.getSelectedOptionValue(this)&&h(this,"hours",P.getSelectedOptionValue(this),"start"),w.getSelectedOptionValue(this)&&h(this,"minutes",w.getSelectedOptionValue(this),"start"),M(this)&&x.getSelectedOptionValue(this)&&h(this,"seconds",x.getSelectedOptionValue(this),"start"),E(this)&&f.getSelectedOptionValue(this)&&h(this,"meridies",f.getSelectedOptionValue(this),"start")}focus(t){this.shadowRoot.querySelector(".picker").focus(t),this._applyFocusedClass()}_applyFocusedClass(){const t=this.shadowRoot.querySelectorAll(".picker");requestAnimationFrame(()=>{const o=this.shadowRoot.activeElement;t.forEach(i=>{i===o?i.parentElement?.classList.add(this.focusedPickerClass):i.parentElement?.classList.remove(this.focusedPickerClass)})})}_clearFocusedClasses(){this.shadowRoot.querySelectorAll(".picker").forEach(o=>{o.parentElement?.classList.remove(this.focusedPickerClass)})}}v([l.observable],u.prototype,"value");v([l.observable],u.prototype,"minutesStep");v([l.observable],u.prototype,"secondsStep");v([l.observable],u.prototype,"clock");v([l.observable],u.prototype,"min");v([l.observable],u.prototype,"max");const te=':host{display:inline-block}.time-pickers{display:flex;overflow:hidden;justify-content:center;padding:4px;block-size:calc(28px * var(--_inline-time-picker-num-options-visible) + 4px * (var(--_inline-time-picker-num-options-visible) - 1));gap:4px}.time-pickers .picker-wrapper{position:relative;display:flex;flex-direction:column;border-radius:4px}.time-pickers .picker-wrapper.focused:has(.picker:focus-visible){--focus-stroke-gap-color: transparent;--focus-inset: -2px;box-shadow:0 0 0 4px color-mix(in srgb,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))}.time-pickers .picker{position:relative;display:flex;overflow:hidden scroll;flex-direction:column;padding:0 4px;border-radius:4px;margin:0 -4px;gap:4px;inline-size:50px;list-style:none;scrollbar-width:none}@media (hover: hover){.time-pickers .picker:hover{scrollbar-width:auto}}.time-pickers .picker:after{display:block;flex-shrink:0;block-size:calc(28px * (var(--_inline-time-picker-num-options-visible) - 1) + 4px * (var(--_inline-time-picker-num-options-visible) - 1 - 1));content:""}.time-pickers .picker:focus-visible{outline:none}.time-pickers .option{--_connotation-color-primary: var(--vvd-time-picker-accent-primary, var(--vvd-color-canvas-text));--_connotation-color-firm: var(--vvd-time-picker-accent-firm, var(--vvd-color-canvas-text));--_connotation-color-faint: var(--vvd-time-picker-accent-faint, var(--vvd-color-neutral-50));--_connotation-color-soft: var(--vvd-time-picker-accent-soft, var(--vvd-color-neutral-100));--_connotation-color-dim: var(--vvd-time-picker-accent-dim, var(--vvd-color-neutral-200));--_connotation-color-pale: var(--vvd-time-picker-accent-pale, var(--vvd-color-neutral-300))}.time-pickers .option{--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: transparent;--_appearance-color-outline: transparent}@media (hover: hover){.time-pickers .option:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}}.time-pickers .option.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-faint);--_appearance-color-outline: transparent}.time-pickers .option:active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.time-pickers .option.active:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}.time-pickers .option.selected:where(:not(.disabled,:disabled)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-soft);--_appearance-color-outline: transparent}@media (hover: hover){.time-pickers .option.selected:hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}}.time-pickers .option.selected.hover:where(:not(.disabled,:disabled,.readonly)){--_appearance-color-text: var(--_connotation-color-firm);--_appearance-color-fill: var(--_connotation-color-dim);--_appearance-color-outline: transparent}.time-pickers .option.selected:disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: transparent}.time-pickers .option.selected.disabled{--_appearance-color-text: var(--vvd-color-neutral-300);--_appearance-color-fill: var(--vvd-color-neutral-200);--_appearance-color-outline: transparent}.time-pickers .option{display:flex;flex-shrink:0;align-items:center;justify-content:center;border-radius:4px;background-color:var(--_appearance-color-fill);block-size:28px;color:var(--_appearance-color-text);cursor:pointer;font:var(--vvd-typography-base);inline-size:50px}.time-pickers .picker-wrapper:not(.focused) .picker:focus-visible .option.selected{--focus-stroke-gap-color: transparent;box-shadow:0 0 0 4px color-mix(in srgb,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))}',oe=l.defineVividComponent("inline-time-picker",u,Z,[],{styles:te,shadowOptions:{delegatesFocus:!0}}),L=(e,t,o)=>{const i=c(e);let n=`${m(o?V(i.hours):i.hours)}:${i.minuteStr}`;return t&&(n+=`:${i.secondStr}`),o&&(n+=` ${i.meridiem}`),n},T=e=>e>="0"&&e<="9",F=(e,t)=>{const o=e.toLowerCase(),i=[];let r;for(let p=0;p<o.length;p++){const d=o[p];if(d==="a"&&o[p+1]==="m"&&(p++,r="AM"),d==="p"&&o[p+1]==="m"&&(p++,r="PM"),T(d)){let k=d;for(;T(o[p+1]);)p++,k+=o[p];i.push(Number.parseInt(k,10))}}if(i.length===0||i.length>3)throw new Error("Invalid time format");if(r&&(i[0]<1||i[0]>12))throw new Error("Invalid time format");(r||t)&&i[0]===12&&(i[0]=0),r==="PM"&&(i[0]=i[0]+12);const[n,s=0,a=0]=i;if(n>23||s>59||a>59)throw new Error("Invalid value");return[n,s,a].map(m).join(":")};var ie=Object.defineProperty,re=Object.getOwnPropertyDescriptor,b=(e,t,o,i)=>{for(var r=i>1?void 0:i?re(t,o):t,n=e.length-1,s;n>=0;n--)(s=e[n])&&(r=(i?s(t,o,r):s(r))||r);return i&&r&&ie(t,o,r),r};const q=e=>{class t extends e{constructor(){super(...arguments),this.minutesStep=null,this.secondsStep=null,this.#t={handleChange:()=>{this.value&&(this._presentationValue=this._toPresentationValue(this.value))}}}get _displaySeconds(){return this.secondsStep!==null}get _use12hClock(){return this.clock?this.clock==="12h":this.locale.timePicker.defaultTo12HourClock}get _timePlaceholder(){let i="hh:mm";return this._displaySeconds&&(i+=":ss"),this._use12hClock&&(i+=" aa"),i}#t;#e;#o(){this.#e=l.Observable.binding(()=>this._use12hClock,this.#t),this.#e.observe(this,l.ExecutionContext.default)}#i(){this.#e.dispose()}connectedCallback(){super.connectedCallback(),this.#o()}disconnectedCallback(){super.disconnectedCallback(),this.#i()}_onPickerButtonClick(){super._onPickerButtonClick(),this._popupOpen&&(l.Updates.process(),this._inlineTimePickerEl.scrollSelectedOptionsToTop())}_onInlineTimePickerChange(i){this._updateValueDueToUserInteraction(this._withUpdatedTime(i.detail),!1)}_onInlineTimePickerLastColumnSelected(){this._closePopup()}}return b([l.attr({attribute:"minutes-step",converter:l.nullableNumberConverter})],t.prototype,"minutesStep",2),b([l.attr({attribute:"seconds-step",converter:l.nullableNumberConverter})],t.prototype,"secondsStep",2),b([l.attr],t.prototype,"clock",2),b([l.volatile],t.prototype,"_use12hClock",1),t};var ne=Object.defineProperty,A=(e,t,o,i)=>{for(var r=void 0,n=e.length-1,s;n>=0;n--)(s=e[n])&&(r=s(t,o,r)||r);return r&&ne(t,o,r),r};const y={fromView:e=>e&&S(e)?e:"",toView(e){return e}};class $ extends q(D.SingleValuePicker(O.PickerField)){constructor(){super(),this._isValidValue=S,this.min="",this.max="",this.proxy.type="time",this.proxy.step="1"}_toPresentationValue(t){return L(t,this._displaySeconds,this._use12hClock)}_parsePresentationValue(t){return F(t,this._use12hClock)}get _timeValue(){return this.value}_withUpdatedTime(t){return t}get _resolvedMinTime(){return this.min||null}get _resolvedMaxTime(){return this.max||null}minChanged(t,o){this.proxy instanceof HTMLInputElement&&(this.proxy.min=o,this.validate())}maxChanged(t,o){this.proxy instanceof HTMLInputElement&&(this.proxy.max=o,this.validate())}get _textFieldPlaceholder(){return this._timePlaceholder}get _pickerButtonIcon(){return"clock-line"}get _pickerButtonLabel(){return this.value?this.locale.timePicker.changeTimeLabel(this._toPresentationValue(this.value)):this.locale.timePicker.chooseTimeLabel}_onPickerButtonClick(){super._onPickerButtonClick(),this._popupOpen&&(l.Updates.process(),this._focusableElsWithinDialog()[0]?.focus())}get _dialogLabel(){return this.locale.timePicker.chooseTimeLabel}_focusableElsWithinDialog(){return this._dialogEl.querySelectorAll("#inline-time-picker, .vwc-button")}_getCustomValidationError(){return this._isPresentationValueInvalid()?this.locale.timePicker.invalidTimeError:null}}A([l.attr({converter:y})],$.prototype,"min");A([l.attr({converter:y})],$.prototype,"max");const se=(e,t)=>{const o=e.tagFor(u);return l.html`
|
|
31
31
|
<${o}
|
|
32
32
|
id='inline-time-picker'
|
|
33
33
|
${z.ref("_inlineTimePickerEl")}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { h as S, V as N, o as h, d as H, a as f, n as C, O as R,
|
|
1
|
+
import { h as S, V as N, o as h, d as H, a as f, n as C, O as R, E as q, U as V, v as j } from "./vivid-element.js";
|
|
2
2
|
import { i as B, P as z } from "./picker-field.template.js";
|
|
3
3
|
import { S as U } from "./single-value-picker.js";
|
|
4
4
|
import { s as W } from "./scrollIntoView.js";
|
|
@@ -364,10 +364,10 @@ const de = (e) => {
|
|
|
364
364
|
this.#e = R.binding(
|
|
365
365
|
() => this._use12hClock,
|
|
366
366
|
this.#t
|
|
367
|
-
), this.#e.observe(this, q);
|
|
367
|
+
), this.#e.observe(this, q.default);
|
|
368
368
|
}
|
|
369
369
|
#r() {
|
|
370
|
-
this.#e.
|
|
370
|
+
this.#e.dispose();
|
|
371
371
|
}
|
|
372
372
|
/**
|
|
373
373
|
* @internal
|
|
@@ -386,7 +386,7 @@ const de = (e) => {
|
|
|
386
386
|
* @internal
|
|
387
387
|
*/
|
|
388
388
|
_onPickerButtonClick() {
|
|
389
|
-
super._onPickerButtonClick(), this._popupOpen && (V.
|
|
389
|
+
super._onPickerButtonClick(), this._popupOpen && (V.process(), this._inlineTimePickerEl.scrollSelectedOptionsToTop());
|
|
390
390
|
}
|
|
391
391
|
// --- Inline time picker ---
|
|
392
392
|
/**
|
|
@@ -511,7 +511,7 @@ class D extends de(
|
|
|
511
511
|
* @internal
|
|
512
512
|
*/
|
|
513
513
|
_onPickerButtonClick() {
|
|
514
|
-
super._onPickerButtonClick(), this._popupOpen && (V.
|
|
514
|
+
super._onPickerButtonClick(), this._popupOpen && (V.process(), this._focusableElsWithinDialog()[0]?.focus());
|
|
515
515
|
}
|
|
516
516
|
// --- Dialog ---
|
|
517
517
|
/**
|
|
@@ -1 +1,5 @@
|
|
|
1
|
-
"use strict";const v=function(){if(typeof globalThis<"u")return globalThis;if(typeof global<"u")return global;if(typeof self<"u")return self;if(typeof window<"u")return window;try{return new Function("return this")()}catch{return{}}}();v.trustedTypes===void 0&&(v.trustedTypes={createPolicy:(s,e)=>e});const ee={configurable:!1,enumerable:!1,writable:!1};v.FAST===void 0&&Reflect.defineProperty(v,"FAST",Object.assign({value:Object.create(null)},ee));const S=v.FAST;if(S.getById===void 0){const s=Object.create(null);Reflect.defineProperty(S,"getById",Object.assign({value(e,t){let i=s[e];return i===void 0&&(i=t?s[e]=t():null),i}},ee))}const ge=Object.freeze([]);function R(){const s=new WeakMap;return function(e){let t=s.get(e);if(t===void 0){let i=Reflect.getPrototypeOf(e);for(;t===void 0&&i!==null;)t=s.get(i),i=Reflect.getPrototypeOf(i);t=t===void 0?[]:t.slice(0),s.set(e,t)}return t}}const M=v.FAST.getById(1,()=>{const s=[],e=[];function t(){if(e.length)throw e.shift()}function i(o){try{o.call()}catch(a){e.push(a),setTimeout(t,0)}}function n(){let a=0;for(;a<s.length;)if(i(s[a]),a++,a>1024){for(let c=0,l=s.length-a;c<l;c++)s[c]=s[c+a];s.length-=a,a=0}s.length=0}function r(o){s.length<1&&v.requestAnimationFrame(n),s.push(o)}return Object.freeze({enqueue:r,process:n})}),te=v.trustedTypes.createPolicy("fast-html",{createHTML:s=>s});let E=te;const y=`fast-${Math.random().toString(36).substring(2,8)}`,se=`${y}{`,_=`}${y}`,u=Object.freeze({supportsAdoptedStyleSheets:Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype,setHTMLPolicy(s){if(E!==te)throw new Error("The HTML policy can only be set once.");E=s},createHTML(s){return E.createHTML(s)},isMarker(s){return s&&s.nodeType===8&&s.data.startsWith(y)},extractDirectiveIndexFromMarker(s){return parseInt(s.data.replace(`${y}:`,""))},createInterpolationPlaceholder(s){return`${se}${s}${_}`},createCustomAttributePlaceholder(s,e){return`${s}="${this.createInterpolationPlaceholder(e)}"`},createBlockPlaceholder(s){return`<!--${y}:${s}-->`},queueUpdate:M.enqueue,processUpdates:M.process,nextUpdate(){return new Promise(M.enqueue)},setAttribute(s,e,t){t==null?s.removeAttribute(e):s.setAttribute(e,t)},setBooleanAttribute(s,e,t){t?s.setAttribute(e,""):s.removeAttribute(e)},removeChildNodes(s){for(let e=s.firstChild;e!==null;e=s.firstChild)s.removeChild(e)},createTemplateWalker(s){return document.createTreeWalker(s,133,null,!1)}});class x{constructor(e,t){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.source=e,this.sub1=t}has(e){return this.spillover===void 0?this.sub1===e||this.sub2===e:this.spillover.indexOf(e)!==-1}subscribe(e){const t=this.spillover;if(t===void 0){if(this.has(e))return;if(this.sub1===void 0){this.sub1=e;return}if(this.sub2===void 0){this.sub2=e;return}this.spillover=[this.sub1,this.sub2,e],this.sub1=void 0,this.sub2=void 0}else t.indexOf(e)===-1&&t.push(e)}unsubscribe(e){const t=this.spillover;if(t===void 0)this.sub1===e?this.sub1=void 0:this.sub2===e&&(this.sub2=void 0);else{const i=t.indexOf(e);i!==-1&&t.splice(i,1)}}notify(e){const t=this.spillover,i=this.source;if(t===void 0){const n=this.sub1,r=this.sub2;n!==void 0&&n.handleChange(i,e),r!==void 0&&r.handleChange(i,e)}else for(let n=0,r=t.length;n<r;++n)t[n].handleChange(i,e)}}class ie{constructor(e){this.subscribers={},this.sourceSubscribers=null,this.source=e}notify(e){var t;const i=this.subscribers[e];i!==void 0&&i.notify(e),(t=this.sourceSubscribers)===null||t===void 0||t.notify(e)}subscribe(e,t){var i;if(t){let n=this.subscribers[t];n===void 0&&(this.subscribers[t]=n=new x(this.source)),n.subscribe(e)}else this.sourceSubscribers=(i=this.sourceSubscribers)!==null&&i!==void 0?i:new x(this.source),this.sourceSubscribers.subscribe(e)}unsubscribe(e,t){var i;if(t){const n=this.subscribers[t];n!==void 0&&n.unsubscribe(e)}else(i=this.sourceSubscribers)===null||i===void 0||i.unsubscribe(e)}}const b=S.getById(2,()=>{const s=/(:|&&|\|\||if)/,e=new WeakMap,t=u.queueUpdate;let i,n=l=>{throw new Error("Must call enableArrayObservation before observing arrays.")};function r(l){let h=l.$fastController||e.get(l);return h===void 0&&(Array.isArray(l)?h=n(l):e.set(l,h=new ie(l))),h}const o=R();class a{constructor(h){this.name=h,this.field=`_${h}`,this.callback=`${h}Changed`}getValue(h){return i!==void 0&&i.watch(h,this.name),h[this.field]}setValue(h,d){const f=this.field,m=h[f];if(m!==d){h[f]=d;const g=h[this.callback];typeof g=="function"&&g.call(h,m,d),r(h).notify(this.name)}}}class c extends x{constructor(h,d,f=!1){super(h,d),this.binding=h,this.isVolatileBinding=f,this.needsRefresh=!0,this.needsQueue=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}observe(h,d){this.needsRefresh&&this.last!==null&&this.disconnect();const f=i;i=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;const m=this.binding(h,d);return i=f,m}disconnect(){if(this.last!==null){let h=this.first;for(;h!==void 0;)h.notifier.unsubscribe(this,h.propertyName),h=h.next;this.last=null,this.needsRefresh=this.needsQueue=!0}}watch(h,d){const f=this.last,m=r(h),g=f===null?this.first:{};if(g.propertySource=h,g.propertyName=d,g.notifier=m,m.subscribe(this,d),f!==null){if(!this.needsRefresh){let q;i=void 0,q=f.propertySource[f.propertyName],i=this,h===q&&(this.needsRefresh=!0)}f.next=g}this.last=g}handleChange(){this.needsQueue&&(this.needsQueue=!1,t(this))}call(){this.last!==null&&(this.needsQueue=!0,this.notify(this))}records(){let h=this.first;return{next:()=>{const d=h;return d===void 0?{value:void 0,done:!0}:(h=h.next,{value:d,done:!1})},[Symbol.iterator]:function(){return this}}}}return Object.freeze({setArrayObserverFactory(l){n=l},getNotifier:r,track(l,h){i!==void 0&&i.watch(l,h)},trackVolatile(){i!==void 0&&(i.needsRefresh=!0)},notify(l,h){r(l).notify(h)},defineProperty(l,h){typeof h=="string"&&(h=new a(h)),o(l).push(h),Reflect.defineProperty(l,h.name,{enumerable:!0,get:function(){return h.getValue(this)},set:function(d){h.setValue(this,d)}})},getAccessors:o,binding(l,h,d=this.isVolatileBinding(l)){return new c(l,h,d)},isVolatileBinding(l){return s.test(l.toString())}})});function ve(s,e){b.defineProperty(s,e)}function me(s,e,t){return Object.assign({},t,{get:function(){return b.trackVolatile(),t.get.apply(this)}})}const U=S.getById(3,()=>{let s=null;return{get(){return s},set(e){s=e}}});class w{constructor(){this.index=0,this.length=0,this.parent=null,this.parentContext=null}get event(){return U.get()}get isEven(){return this.index%2===0}get isOdd(){return this.index%2!==0}get isFirst(){return this.index===0}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}static setEvent(e){U.set(e)}}b.defineProperty(w.prototype,"index");b.defineProperty(w.prototype,"length");const C=Object.seal(new w);class k{constructor(){this.targetIndex=0}}class ne extends k{constructor(){super(...arguments),this.createPlaceholder=u.createInterpolationPlaceholder}}class ye extends k{constructor(e,t,i){super(),this.name=e,this.behavior=t,this.options=i}createPlaceholder(e){return u.createCustomAttributePlaceholder(this.name,e)}createBehavior(e){return new this.behavior(e,this.options)}}function Ce(s,e){this.source=s,this.context=e,this.bindingObserver===null&&(this.bindingObserver=b.binding(this.binding,this,this.isBindingVolatile)),this.updateTarget(this.bindingObserver.observe(s,e))}function Se(s,e){this.source=s,this.context=e,this.target.addEventListener(this.targetName,this)}function we(){this.bindingObserver.disconnect(),this.source=null,this.context=null}function xe(){this.bindingObserver.disconnect(),this.source=null,this.context=null;const s=this.target.$fastView;s!==void 0&&s.isComposed&&(s.unbind(),s.needsBindOnly=!0)}function Te(){this.target.removeEventListener(this.targetName,this),this.source=null,this.context=null}function Ae(s){u.setAttribute(this.target,this.targetName,s)}function Be(s){u.setBooleanAttribute(this.target,this.targetName,s)}function Ne(s){if(s==null&&(s=""),s.create){this.target.textContent="";let e=this.target.$fastView;e===void 0?e=s.create():this.target.$fastTemplate!==s&&(e.isComposed&&(e.remove(),e.unbind()),e=s.create()),e.isComposed?e.needsBindOnly&&(e.needsBindOnly=!1,e.bind(this.source,this.context)):(e.isComposed=!0,e.bind(this.source,this.context),e.insertBefore(this.target),this.target.$fastView=e,this.target.$fastTemplate=s)}else{const e=this.target.$fastView;e!==void 0&&e.isComposed&&(e.isComposed=!1,e.remove(),e.needsBindOnly?e.needsBindOnly=!1:e.unbind()),this.target.textContent=s}}function ke(s){this.target[this.targetName]=s}function Fe(s){const e=this.classVersions||Object.create(null),t=this.target;let i=this.version||0;if(s!=null&&s.length){const n=s.split(/\s+/);for(let r=0,o=n.length;r<o;++r){const a=n[r];a!==""&&(e[a]=i,t.classList.add(a))}}if(this.classVersions=e,this.version=i+1,i!==0){i-=1;for(const n in e)e[n]===i&&t.classList.remove(n)}}class H extends ne{constructor(e){super(),this.binding=e,this.bind=Ce,this.unbind=we,this.updateTarget=Ae,this.isBindingVolatile=b.isVolatileBinding(this.binding)}get targetName(){return this.originalTargetName}set targetName(e){if(this.originalTargetName=e,e!==void 0)switch(e[0]){case":":if(this.cleanedTargetName=e.substr(1),this.updateTarget=ke,this.cleanedTargetName==="innerHTML"){const t=this.binding;this.binding=(i,n)=>u.createHTML(t(i,n))}break;case"?":this.cleanedTargetName=e.substr(1),this.updateTarget=Be;break;case"@":this.cleanedTargetName=e.substr(1),this.bind=Se,this.unbind=Te;break;default:this.cleanedTargetName=e,e==="class"&&(this.updateTarget=Fe);break}}targetAtContent(){this.updateTarget=Ne,this.unbind=xe}createBehavior(e){return new Me(e,this.binding,this.isBindingVolatile,this.bind,this.unbind,this.updateTarget,this.cleanedTargetName)}}class Me{constructor(e,t,i,n,r,o,a){this.source=null,this.context=null,this.bindingObserver=null,this.target=e,this.binding=t,this.isBindingVolatile=i,this.bind=n,this.unbind=r,this.updateTarget=o,this.targetName=a}handleChange(){this.updateTarget(this.bindingObserver.observe(this.source,this.context))}handleEvent(e){w.setEvent(e);const t=this.binding(this.source,this.context);w.setEvent(null),t!==!0&&e.preventDefault()}}let O=null;class j{addFactory(e){e.targetIndex=this.targetIndex,this.behaviorFactories.push(e)}captureContentBinding(e){e.targetAtContent(),this.addFactory(e)}reset(){this.behaviorFactories=[],this.targetIndex=-1}release(){O=this}static borrow(e){const t=O||new j;return t.directives=e,t.reset(),O=null,t}}function Ee(s){if(s.length===1)return s[0];let e;const t=s.length,i=s.map(o=>typeof o=="string"?()=>o:(e=o.targetName||e,o.binding)),n=(o,a)=>{let c="";for(let l=0;l<t;++l)c+=i[l](o,a);return c},r=new H(n);return r.targetName=e,r}const Oe=_.length;function re(s,e){const t=e.split(se);if(t.length===1)return null;const i=[];for(let n=0,r=t.length;n<r;++n){const o=t[n],a=o.indexOf(_);let c;if(a===-1)c=o;else{const l=parseInt(o.substring(0,a));i.push(s.directives[l]),c=o.substring(a+Oe)}c!==""&&i.push(c)}return i}function W(s,e,t=!1){const i=e.attributes;for(let n=0,r=i.length;n<r;++n){const o=i[n],a=o.value,c=re(s,a);let l=null;c===null?t&&(l=new H(()=>a),l.targetName=o.name):l=Ee(c),l!==null&&(e.removeAttributeNode(o),n--,r--,s.addFactory(l))}}function Ie(s,e,t){const i=re(s,e.textContent);if(i!==null){let n=e;for(let r=0,o=i.length;r<o;++r){const a=i[r],c=r===0?e:n.parentNode.insertBefore(document.createTextNode(""),n.nextSibling);typeof a=="string"?c.textContent=a:(c.textContent=" ",s.captureContentBinding(a)),n=c,s.targetIndex++,c!==e&&t.nextNode()}s.targetIndex--}}function Ve(s,e){const t=s.content;document.adoptNode(t);const i=j.borrow(e);W(i,s,!0);const n=i.behaviorFactories;i.reset();const r=u.createTemplateWalker(t);let o;for(;o=r.nextNode();)switch(i.targetIndex++,o.nodeType){case 1:W(i,o);break;case 3:Ie(i,o,r);break;case 8:u.isMarker(o)&&i.addFactory(e[u.extractDirectiveIndexFromMarker(o)])}let a=0;(u.isMarker(t.firstChild)||t.childNodes.length===1&&e.length)&&(t.insertBefore(document.createComment(""),t.firstChild),a=-1);const c=i.behaviorFactories;return i.release(),{fragment:t,viewBehaviorFactories:c,hostBehaviorFactories:n,targetOffset:a}}const I=document.createRange();class oe{constructor(e,t){this.fragment=e,this.behaviors=t,this.source=null,this.context=null,this.firstChild=e.firstChild,this.lastChild=e.lastChild}appendTo(e){e.appendChild(this.fragment)}insertBefore(e){if(this.fragment.hasChildNodes())e.parentNode.insertBefore(this.fragment,e);else{const t=this.lastChild;if(e.previousSibling===t)return;const i=e.parentNode;let n=this.firstChild,r;for(;n!==t;)r=n.nextSibling,i.insertBefore(n,e),n=r;i.insertBefore(t,e)}}remove(){const e=this.fragment,t=this.lastChild;let i=this.firstChild,n;for(;i!==t;)n=i.nextSibling,e.appendChild(i),i=n;e.appendChild(t)}dispose(){const e=this.firstChild.parentNode,t=this.lastChild;let i=this.firstChild,n;for(;i!==t;)n=i.nextSibling,e.removeChild(i),i=n;e.removeChild(t);const r=this.behaviors,o=this.source;for(let a=0,c=r.length;a<c;++a)r[a].unbind(o)}bind(e,t){const i=this.behaviors;if(this.source!==e)if(this.source!==null){const n=this.source;this.source=e,this.context=t;for(let r=0,o=i.length;r<o;++r){const a=i[r];a.unbind(n),a.bind(e,t)}}else{this.source=e,this.context=t;for(let n=0,r=i.length;n<r;++n)i[n].bind(e,t)}}unbind(){if(this.source===null)return;const e=this.behaviors,t=this.source;for(let i=0,n=e.length;i<n;++i)e[i].unbind(t);this.source=null}static disposeContiguousBatch(e){if(e.length!==0){I.setStartBefore(e[0].firstChild),I.setEndAfter(e[e.length-1].lastChild),I.deleteContents();for(let t=0,i=e.length;t<i;++t){const n=e[t],r=n.behaviors,o=n.source;for(let a=0,c=r.length;a<c;++a)r[a].unbind(o)}}}}class Q{constructor(e,t){this.behaviorCount=0,this.hasHostBehaviors=!1,this.fragment=null,this.targetOffset=0,this.viewBehaviorFactories=null,this.hostBehaviorFactories=null,this.html=e,this.directives=t}create(e){if(this.fragment===null){let l;const h=this.html;if(typeof h=="string"){l=document.createElement("template"),l.innerHTML=u.createHTML(h);const f=l.content.firstElementChild;f!==null&&f.tagName==="TEMPLATE"&&(l=f)}else l=h;const d=Ve(l,this.directives);this.fragment=d.fragment,this.viewBehaviorFactories=d.viewBehaviorFactories,this.hostBehaviorFactories=d.hostBehaviorFactories,this.targetOffset=d.targetOffset,this.behaviorCount=this.viewBehaviorFactories.length+this.hostBehaviorFactories.length,this.hasHostBehaviors=this.hostBehaviorFactories.length>0}const t=this.fragment.cloneNode(!0),i=this.viewBehaviorFactories,n=new Array(this.behaviorCount),r=u.createTemplateWalker(t);let o=0,a=this.targetOffset,c=r.nextNode();for(let l=i.length;o<l;++o){const h=i[o],d=h.targetIndex;for(;c!==null;)if(a===d){n[o]=h.createBehavior(c);break}else c=r.nextNode(),a++}if(this.hasHostBehaviors){const l=this.hostBehaviorFactories;for(let h=0,d=l.length;h<d;++h,++o)n[o]=l[h].createBehavior(e)}return new oe(t,n)}render(e,t,i){typeof t=="string"&&(t=document.getElementById(t)),i===void 0&&(i=t);const n=this.create(i);return n.bind(e,C),n.appendTo(t),n}}const $e=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/;function Pe(s,...e){const t=[];let i="";for(let n=0,r=s.length-1;n<r;++n){const o=s[n];let a=e[n];if(i+=o,a instanceof Q){const c=a;a=()=>c}if(typeof a=="function"&&(a=new H(a)),a instanceof ne){const c=$e.exec(o);c!==null&&(a.targetName=c[2])}a instanceof k?(i+=a.createPlaceholder(t.length),t.push(a)):i+=a}return i+=s[s.length-1],new Q(i,t)}class p{constructor(){this.targets=new WeakSet}addStylesTo(e){this.targets.add(e)}removeStylesFrom(e){this.targets.delete(e)}isAttachedTo(e){return this.targets.has(e)}withBehaviors(...e){return this.behaviors=this.behaviors===null?e:this.behaviors.concat(e),this}}p.create=(()=>{if(u.supportsAdoptedStyleSheets){const s=new Map;return e=>new Re(e,s)}return s=>new je(s)})();function D(s){return s.map(e=>e instanceof p?D(e.styles):[e]).reduce((e,t)=>e.concat(t),[])}function ae(s){return s.map(e=>e instanceof p?e.behaviors:null).reduce((e,t)=>t===null?e:(e===null&&(e=[]),e.concat(t)),null)}const Le=Symbol("prependToAdoptedStyleSheets");function le(s){const e=[],t=[];return s.forEach(i=>(i[Le]?e:t).push(i)),{prepend:e,append:t}}let he=(s,e)=>{const{prepend:t,append:i}=le(e);s.adoptedStyleSheets=[...t,...s.adoptedStyleSheets,...i]},ce=(s,e)=>{s.adoptedStyleSheets=s.adoptedStyleSheets.filter(t=>e.indexOf(t)===-1)};if(u.supportsAdoptedStyleSheets)try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),he=(s,e)=>{const{prepend:t,append:i}=le(e);s.adoptedStyleSheets.splice(0,0,...t),s.adoptedStyleSheets.push(...i)},ce=(s,e)=>{for(const t of e){const i=s.adoptedStyleSheets.indexOf(t);i!==-1&&s.adoptedStyleSheets.splice(i,1)}}}catch{}class Re extends p{constructor(e,t){super(),this.styles=e,this.styleSheetCache=t,this._styleSheets=void 0,this.behaviors=ae(e)}get styleSheets(){if(this._styleSheets===void 0){const e=this.styles,t=this.styleSheetCache;this._styleSheets=D(e).map(i=>{if(i instanceof CSSStyleSheet)return i;let n=t.get(i);return n===void 0&&(n=new CSSStyleSheet,n.replaceSync(i),t.set(i,n)),n})}return this._styleSheets}addStylesTo(e){he(e,this.styleSheets),super.addStylesTo(e)}removeStylesFrom(e){ce(e,this.styleSheets),super.removeStylesFrom(e)}}let _e=0;function He(){return`fast-style-class-${++_e}`}class je extends p{constructor(e){super(),this.styles=e,this.behaviors=null,this.behaviors=ae(e),this.styleSheets=D(e),this.styleClass=He()}addStylesTo(e){const t=this.styleSheets,i=this.styleClass;e=this.normalizeTarget(e);for(let n=0;n<t.length;n++){const r=document.createElement("style");r.innerHTML=t[n],r.className=i,e.append(r)}super.addStylesTo(e)}removeStylesFrom(e){e=this.normalizeTarget(e);const t=e.querySelectorAll(`.${this.styleClass}`);for(let i=0,n=t.length;i<n;++i)e.removeChild(t[i]);super.removeStylesFrom(e)}isAttachedTo(e){return super.isAttachedTo(this.normalizeTarget(e))}normalizeTarget(e){return e===document?document.body:e}}const de=Object.freeze({locate:R()}),De={toView(s){return s?"true":"false"},fromView(s){return!(s==null||s==="false"||s===!1||s===0)}},ze={toView(s){if(s==null)return null;const e=s*1;return isNaN(e)?null:e.toString()},fromView(s){if(s==null)return null;const e=s*1;return isNaN(e)?null:e}};class T{constructor(e,t,i=t.toLowerCase(),n="reflect",r){this.guards=new Set,this.Owner=e,this.name=t,this.attribute=i,this.mode=n,this.converter=r,this.fieldName=`_${t}`,this.callbackName=`${t}Changed`,this.hasCallback=this.callbackName in e.prototype,n==="boolean"&&r===void 0&&(this.converter=De)}setValue(e,t){const i=e[this.fieldName],n=this.converter;n!==void 0&&(t=n.fromView(t)),i!==t&&(e[this.fieldName]=t,this.tryReflectToAttribute(e),this.hasCallback&&e[this.callbackName](i,t),e.$fastController.notify(this.name))}getValue(e){return b.track(e,this.name),e[this.fieldName]}onAttributeChangedCallback(e,t){this.guards.has(e)||(this.guards.add(e),this.setValue(e,t),this.guards.delete(e))}tryReflectToAttribute(e){const t=this.mode,i=this.guards;i.has(e)||t==="fromView"||u.queueUpdate(()=>{i.add(e);const n=e[this.fieldName];switch(t){case"reflect":const r=this.converter;u.setAttribute(e,this.attribute,r!==void 0?r.toView(n):n);break;case"boolean":u.setBooleanAttribute(e,this.attribute,n);break}i.delete(e)})}static collect(e,...t){const i=[];t.push(de.locate(e));for(let n=0,r=t.length;n<r;++n){const o=t[n];if(o!==void 0)for(let a=0,c=o.length;a<c;++a){const l=o[a];typeof l=="string"?i.push(new T(e,l)):i.push(new T(e,l.property,l.attribute,l.mode,l.converter))}}return i}}function ue(s,e){let t;function i(n,r){arguments.length>1&&(t.property=r),de.locate(n.constructor).push(t)}if(arguments.length>1){t={},i(s,e);return}return t=s===void 0?{}:s,i}const K={mode:"open"},G={},P=S.getById(4,()=>{const s=new Map;return Object.freeze({register(e){return s.has(e.type)?!1:(s.set(e.type,e),!0)},getByType(e){return s.get(e)}})});class F{constructor(e,t=e.definition){typeof t=="string"&&(t={name:t}),this.type=e,this.name=t.name,this.template=t.template;const i=T.collect(e,t.attributes),n=new Array(i.length),r={},o={};for(let a=0,c=i.length;a<c;++a){const l=i[a];n[a]=l.attribute,r[l.name]=l,o[l.attribute]=l}this.attributes=i,this.observedAttributes=n,this.propertyLookup=r,this.attributeLookup=o,this.shadowOptions=t.shadowOptions===void 0?K:t.shadowOptions===null?void 0:Object.assign(Object.assign({},K),t.shadowOptions),this.elementOptions=t.elementOptions===void 0?G:Object.assign(Object.assign({},G),t.elementOptions),this.styles=t.styles===void 0?void 0:Array.isArray(t.styles)?p.create(t.styles):t.styles instanceof p?t.styles:p.create([t.styles])}get isDefined(){return!!P.getByType(this.type)}define(e=customElements){const t=this.type;if(P.register(this)){const i=this.attributes,n=t.prototype;for(let r=0,o=i.length;r<o;++r)b.defineProperty(n,i[r]);Reflect.defineProperty(t,"observedAttributes",{value:this.observedAttributes,enumerable:!0})}return e.get(this.name)||e.define(this.name,t,this.elementOptions),this}}F.forType=P.getByType;const fe=new WeakMap,qe={bubbles:!0,composed:!0,cancelable:!0};function V(s){return s.shadowRoot||fe.get(s)||null}class z extends ie{constructor(e,t){super(e),this.boundObservables=null,this.behaviors=null,this.needsInitialization=!0,this._template=null,this._styles=null,this._isConnected=!1,this.$fastController=this,this.view=null,this.element=e,this.definition=t;const i=t.shadowOptions;if(i!==void 0){const r=e.attachShadow(i);i.mode==="closed"&&fe.set(e,r)}const n=b.getAccessors(e);if(n.length>0){const r=this.boundObservables=Object.create(null);for(let o=0,a=n.length;o<a;++o){const c=n[o].name,l=e[c];l!==void 0&&(delete e[c],r[c]=l)}}}get isConnected(){return b.track(this,"isConnected"),this._isConnected}setIsConnected(e){this._isConnected=e,b.notify(this,"isConnected")}get template(){return this._template}set template(e){this._template!==e&&(this._template=e,this.needsInitialization||this.renderTemplate(e))}get styles(){return this._styles}set styles(e){this._styles!==e&&(this._styles!==null&&this.removeStyles(this._styles),this._styles=e,!this.needsInitialization&&e!==null&&this.addStyles(e))}addStyles(e){const t=V(this.element)||this.element.getRootNode();if(e instanceof HTMLStyleElement)t.append(e);else if(!e.isAttachedTo(t)){const i=e.behaviors;e.addStylesTo(t),i!==null&&this.addBehaviors(i)}}removeStyles(e){const t=V(this.element)||this.element.getRootNode();if(e instanceof HTMLStyleElement)t.removeChild(e);else if(e.isAttachedTo(t)){const i=e.behaviors;e.removeStylesFrom(t),i!==null&&this.removeBehaviors(i)}}addBehaviors(e){const t=this.behaviors||(this.behaviors=new Map),i=e.length,n=[];for(let r=0;r<i;++r){const o=e[r];t.has(o)?t.set(o,t.get(o)+1):(t.set(o,1),n.push(o))}if(this._isConnected){const r=this.element;for(let o=0;o<n.length;++o)n[o].bind(r,C)}}removeBehaviors(e,t=!1){const i=this.behaviors;if(i===null)return;const n=e.length,r=[];for(let o=0;o<n;++o){const a=e[o];if(i.has(a)){const c=i.get(a)-1;c===0||t?i.delete(a)&&r.push(a):i.set(a,c)}}if(this._isConnected){const o=this.element;for(let a=0;a<r.length;++a)r[a].unbind(o)}}onConnectedCallback(){if(this._isConnected)return;const e=this.element;this.needsInitialization?this.finishInitialization():this.view!==null&&this.view.bind(e,C);const t=this.behaviors;if(t!==null)for(const[i]of t)i.bind(e,C);this.setIsConnected(!0)}onDisconnectedCallback(){if(!this._isConnected)return;this.setIsConnected(!1);const e=this.view;e!==null&&e.unbind();const t=this.behaviors;if(t!==null){const i=this.element;for(const[n]of t)n.unbind(i)}}onAttributeChangedCallback(e,t,i){const n=this.definition.attributeLookup[e];n!==void 0&&n.onAttributeChangedCallback(this.element,i)}emit(e,t,i){return this._isConnected?this.element.dispatchEvent(new CustomEvent(e,Object.assign(Object.assign({detail:t},qe),i))):!1}finishInitialization(){const e=this.element,t=this.boundObservables;if(t!==null){const n=Object.keys(t);for(let r=0,o=n.length;r<o;++r){const a=n[r];e[a]=t[a]}this.boundObservables=null}const i=this.definition;this._template===null&&(this.element.resolveTemplate?this._template=this.element.resolveTemplate():i.template&&(this._template=i.template||null)),this._template!==null&&this.renderTemplate(this._template),this._styles===null&&(this.element.resolveStyles?this._styles=this.element.resolveStyles():i.styles&&(this._styles=i.styles||null)),this._styles!==null&&this.addStyles(this._styles),this.needsInitialization=!1}renderTemplate(e){const t=this.element,i=V(t)||t;this.view!==null?(this.view.dispose(),this.view=null):this.needsInitialization||u.removeChildNodes(i),e&&(this.view=e.render(t,i,t))}static forCustomElement(e){const t=e.$fastController;if(t!==void 0)return t;const i=F.forType(e.constructor);if(i===void 0)throw new Error("Missing FASTElement definition.");return e.$fastController=new z(e,i)}}function J(s){return class extends s{constructor(){super(),z.forCustomElement(this)}$emit(e,t,i){return this.$fastController.emit(e,t,i)}connectedCallback(){this.$fastController.onConnectedCallback()}disconnectedCallback(){this.$fastController.onDisconnectedCallback()}attributeChangedCallback(e,t,i){this.$fastController.onAttributeChangedCallback(e,t,i)}}}const Ue=Object.assign(J(HTMLElement),{from(s){return J(s)},define(s,e){return new F(s,e).define().type}});function We(s,e){return s instanceof Function?s(e):s}const X=new Set,$=new Map,Qe=s=>(e="vwc")=>{const t=n=>`${e}-${n}`,i=n=>{const r=t(n.name);let o=n.type;if(o.componentName=n.name,X.has(r))return;$.has(o)&&$.get(o)!==r&&(o=class extends o{}),X.add(r),$.set(o,r);for(const l of n.dependencies)i(l);const a=new Map([[n.type,r],...n.dependencies.map(l=>[l.type,t(l.name)])]),c={tagFor(l){if(!a.has(l))throw new Error(`Could not get tag for ${l.name} as it is not a dependency of ${n.name}.`);return a.get(l)},tagForNonDependency(l){return t(l)}};new F(o,{...n.options,template:We(n.template,c),name:`${e}-${n.name}`}).define()};i(s)},Ke=(s,e,t,i,n)=>({name:s,type:e,template:t,dependencies:i,options:n}),Y=new WeakMap,A=s=>{let e=Y.get(s);return e||(e=[],Y.set(s,e)),e},Ge=(s,e)=>{A(s).push(e)},Je=(s,e)=>{A(s).splice(A(s).indexOf(e),1)},Xe=(s,e)=>{A(s).forEach(t=>t(s,e))},Ye=s=>s==="delegate",Z=s=>`vvd${s.charAt(0).toUpperCase()}${s.slice(1)}`,be=(s,e)=>{if(Ye(s._vividAriaBehaviour)){const t=s[e];s[`_${e}`]=null,s.removeAttribute(N(e)),s[`_${e}`]=t,s[e]!==null?s.dataset[Z(e)]=s[e]:delete s.dataset[Z(e)]}else u.setAttribute(s,N(e),s[e])},B=new WeakMap,Ze=(s,e)=>{const t=B.get(s);t?t.add(e):B.set(s,new Set([e]))},et=(s,e)=>{s.isConnected?be(s,e):Ze(s,e)},tt=s=>{const e=B.get(s);if(e){for(const t of e)be(s,t);B.delete(s)}},L=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColIndexText","ariaColSpan","ariaCurrent","ariaDescription","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowIndexText","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText","ariaRelevant"],N=s=>s.replace("aria","aria-").toLowerCase(),st=s=>{class e extends s{constructor(...i){super(...i),this._vividAriaBehaviour="default";for(const n of L)this[`_${n}`]=null}connectedCallback(){super.connectedCallback(),tt(this)}}for(const t of L)ue({attribute:N(t),mode:"fromView"})(e.prototype,t),e.prototype[`${t}Changed`]=function(){et(this,t),this._vividAriaBehaviour!=="default"&&Xe(this,t)};return e},pe=R(),it=s=>(e,t)=>{pe(e.constructor).push({newPropertyName:t,...s})},nt=s=>{class e extends s{#e(i){let n=!1,r=!1;const o=h=>r&&i.fromDeprecated(h[i.deprecatedPropertyName])===h[i.newPropertyName],a=h=>n&&i.toDeprecated&&i.toDeprecated(h[i.newPropertyName])===h[i.deprecatedPropertyName],c={handleChange(h,d){if(d===i.newPropertyName){if(n=!0,!i.toDeprecated||o(h))return;h[i.deprecatedPropertyName]=i.toDeprecated(h[i.newPropertyName])}if(d===i.deprecatedPropertyName){if(r=!0,a(h))return;h[i.newPropertyName]=i.fromDeprecated(h[i.deprecatedPropertyName])}}},l=b.getNotifier(this);l.subscribe(c,i.newPropertyName),l.subscribe(c,i.deprecatedPropertyName)}constructor(...i){super(...i);for(const n of pe(this.constructor))this.#e(n)}}return e};class rt extends st(nt(Ue)){static{this.VIVID_VERSION="5.2.0"}connectedCallback(){super.connectedCallback();const e=this.constructor.componentName;this.setAttribute("data-vvd-component",e)}}exports.AttachedBehaviorHTMLDirective=ye;exports.DOM=u;exports.ElementStyles=p;exports.HTMLDirective=k;exports.HTMLView=oe;exports.Observable=b;exports.SubscriberSet=x;exports.VividElement=rt;exports.ariaAttributeName=N;exports.ariaMixinProperties=L;exports.attr=ue;exports.createRegisterFunction=Qe;exports.defaultExecutionContext=C;exports.defineVividComponent=Ke;exports.emptyArray=ge;exports.html=Pe;exports.nullableNumberConverter=ze;exports.observable=ve;exports.replaces=it;exports.subscribeToAriaPropertyChanges=Ge;exports.unsubscribeFromAriaPropertyChanges=Je;exports.volatile=me;
|
|
1
|
+
"use strict";let D;const mt="fast-kernel";try{if(document.currentScript)D=document.currentScript.getAttribute(mt);else{const i=document.getElementsByTagName("script");D=i[i.length-1].getAttribute(mt)}}catch{D="isolate"}let x;switch(D){case"share":x=Object.freeze({updateQueue:1,observable:2,contextEvent:3,elementRegistry:4});break;case"share-v2":x=Object.freeze({updateQueue:1.2,observable:2.2,contextEvent:3.2,elementRegistry:4.2});break;default:const i=`-${Math.random().toString(36).substring(2,8)}`;x=Object.freeze({updateQueue:`1.2${i}`,observable:`2.2${i}`,contextEvent:`3.2${i}`,elementRegistry:`4.2${i}`});break}const M=i=>typeof i=="function",N=i=>typeof i=="string",qt=()=>{};var P=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ye(i){return i&&i.__esModule&&Object.prototype.hasOwnProperty.call(i,"default")?i.default:i}function ve(i){if(i.__esModule)return i;var t=i.default;if(typeof t=="function"){var e=function s(){return this instanceof s?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};e.prototype=t.prototype}else e={};return Object.defineProperty(e,"__esModule",{value:!0}),Object.keys(i).forEach(function(s){var n=Object.getOwnPropertyDescriptor(i,s);Object.defineProperty(e,s,n.get?n:{enumerable:!0,get:function(){return i[s]}})}),e}(function(){if(!(typeof globalThis<"u"))if(typeof P<"u")P.globalThis=P;else if(typeof self<"u")self.globalThis=self;else if(typeof window<"u")window.globalThis=window;else{const t=new Function("return this")();t.globalThis=t}})();const Qt={configurable:!1,enumerable:!1,writable:!1};globalThis.FAST===void 0&&Reflect.defineProperty(globalThis,"FAST",Object.assign({value:Object.create(null)},Qt));const y=globalThis.FAST;if(y.getById===void 0){const i=Object.create(null);Reflect.defineProperty(y,"getById",Object.assign({value(t,e){let s=i[t];return s===void 0&&(s=e?i[t]=e():null),s}},Qt))}y.error===void 0&&Object.assign(y,{warn(){},error(i){return new Error(`Error ${i}`)},addMessages(){}});const me=Object.freeze([]);function Gt(){const i=new Map;return Object.freeze({register(t){return i.has(t.type)?!1:(i.set(t.type,t),!0)},getByType(t){return i.get(t)},getForInstance(t){if(t!=null)return i.get(t.constructor)}})}function Jt(){const i=new WeakMap;return function(t){let e=i.get(t);if(e===void 0){let s=Reflect.getPrototypeOf(t);for(;e===void 0&&s!==null;)e=i.get(s),s=Reflect.getPrototypeOf(s);e=e===void 0?[]:e.slice(0),i.set(t,e)}return e}}function E(i){i.prototype.toJSON=qt}const g=Object.freeze({none:0,attribute:1,booleanAttribute:2,property:3,content:4,tokenList:5,event:6}),wt=i=>i,we=globalThis.trustedTypes?globalThis.trustedTypes.createPolicy("fast-html",{createHTML:wt}):{createHTML:wt};let z=Object.freeze({createHTML(i){return we.createHTML(i)},protect(i,t,e,s){return s}});const Se=z,C=Object.freeze({get policy(){return z},setPolicy(i){if(z!==Se)throw y.error(1201);z=i},setAttribute(i,t,e){e==null?i.removeAttribute(t):i.setAttribute(t,e)},setBooleanAttribute(i,t,e){e?i.setAttribute(t,""):i.removeAttribute(t)}}),dt=y.getById(x.updateQueue,()=>{const i=[],t=[],e=globalThis.requestAnimationFrame;let s=!0;function n(){if(t.length)throw t.shift()}function r(d){try{d.call()}catch(l){if(s)t.push(l),setTimeout(n,0);else throw i.length=0,l}}function a(){let l=0;for(;l<i.length;)if(r(i[l]),l++,l>1024){for(let o=0,h=i.length-l;o<h;o++)i[o]=i[o+l];i.length-=l,l=0}i.length=0}function c(d){i.push(d),i.length<2&&(s?e(a):a())}return Object.freeze({enqueue:c,next:()=>new Promise(c),process:a,setMode:d=>s=d})});class q{constructor(t,e){this.sub1=void 0,this.sub2=void 0,this.spillover=void 0,this.subject=t,this.sub1=e}has(t){return this.spillover===void 0?this.sub1===t||this.sub2===t:this.spillover.indexOf(t)!==-1}subscribe(t){const e=this.spillover;if(e===void 0){if(this.has(t))return;if(this.sub1===void 0){this.sub1=t;return}if(this.sub2===void 0){this.sub2=t;return}this.spillover=[this.sub1,this.sub2,t],this.sub1=void 0,this.sub2=void 0}else e.indexOf(t)===-1&&e.push(t)}unsubscribe(t){const e=this.spillover;if(e===void 0)this.sub1===t?this.sub1=void 0:this.sub2===t&&(this.sub2=void 0);else{const s=e.indexOf(t);s!==-1&&e.splice(s,1)}}notify(t){const e=this.spillover,s=this.subject;if(e===void 0){const n=this.sub1,r=this.sub2;n!==void 0&&n.handleChange(s,t),r!==void 0&&r.handleChange(s,t)}else for(let n=0,r=e.length;n<r;++n)e[n].handleChange(s,t)}}class Kt{constructor(t){this.subscribers={},this.subjectSubscribers=null,this.subject=t}notify(t){var e,s;(e=this.subscribers[t])===null||e===void 0||e.notify(t),(s=this.subjectSubscribers)===null||s===void 0||s.notify(t)}subscribe(t,e){var s,n;let r;e?r=(s=this.subscribers[e])!==null&&s!==void 0?s:this.subscribers[e]=new q(this.subject):r=(n=this.subjectSubscribers)!==null&&n!==void 0?n:this.subjectSubscribers=new q(this.subject),r.subscribe(t)}unsubscribe(t,e){var s,n;e?(s=this.subscribers[e])===null||s===void 0||s.unsubscribe(t):(n=this.subjectSubscribers)===null||n===void 0||n.unsubscribe(t)}}const Z=Object.freeze({unknown:void 0,coupled:1}),p=y.getById(x.observable,()=>{const i=dt.enqueue,t=/(:|&&|\|\||if|\?\.)/,e=new WeakMap;let s,n=l=>{throw y.error(1101)};function r(l){var o;let h=(o=l.$fastController)!==null&&o!==void 0?o:e.get(l);return h===void 0&&(Array.isArray(l)?h=n(l):e.set(l,h=new Kt(l))),h}const a=Jt();class c{constructor(o){this.name=o,this.field=`_${o}`,this.callback=`${o}Changed`}getValue(o){return s!==void 0&&s.watch(o,this.name),o[this.field]}setValue(o,h){const u=this.field,b=o[u];if(b!==h){o[u]=h;const k=o[this.callback];M(k)&&k.call(o,b,h),r(o).notify(this.name)}}}class d extends q{constructor(o,h,u=!1){super(o,h),this.expression=o,this.isVolatileBinding=u,this.needsRefresh=!0,this.needsQueue=!0,this.isAsync=!0,this.first=this,this.last=null,this.propertySource=void 0,this.propertyName=void 0,this.notifier=void 0,this.next=void 0}setMode(o){this.isAsync=this.needsQueue=o}bind(o){this.controller=o;const h=this.observe(o.source,o.context);return!o.isBound&&this.requiresUnbind(o)&&o.onUnbind(this),h}requiresUnbind(o){return o.sourceLifetime!==Z.coupled||this.first!==this.last||this.first.propertySource!==o.source}unbind(o){this.dispose()}observe(o,h){this.needsRefresh&&this.last!==null&&this.dispose();const u=s;s=this.needsRefresh?this:void 0,this.needsRefresh=this.isVolatileBinding;let b;try{b=this.expression(o,h)}finally{s=u}return b}disconnect(){this.dispose()}dispose(){if(this.last!==null){let o=this.first;for(;o!==void 0;)o.notifier.unsubscribe(this,o.propertyName),o=o.next;this.last=null,this.needsRefresh=this.needsQueue=this.isAsync}}watch(o,h){const u=this.last,b=r(o),k=u===null?this.first:{};if(k.propertySource=o,k.propertyName=h,k.notifier=b,b.subscribe(this,h),u!==null){if(!this.needsRefresh){let vt;s=void 0,vt=u.propertySource[u.propertyName],s=this,o===vt&&(this.needsRefresh=!0)}u.next=k}this.last=k}handleChange(){this.needsQueue?(this.needsQueue=!1,i(this)):this.isAsync||this.call()}call(){this.last!==null&&(this.needsQueue=this.isAsync,this.notify(this))}*records(){let o=this.first;for(;o!==void 0;)yield o,o=o.next}}return E(d),Object.freeze({setArrayObserverFactory(l){n=l},getNotifier:r,track(l,o){s&&s.watch(l,o)},trackVolatile(){s&&(s.needsRefresh=!0)},notify(l,o){r(l).notify(o)},defineProperty(l,o){N(o)&&(o=new c(o)),a(l).push(o),Reflect.defineProperty(l,o.name,{enumerable:!0,get(){return o.getValue(this)},set(h){o.setValue(this,h)}})},getAccessors:a,binding(l,o,h=this.isVolatileBinding(l)){return new d(l,o,h)},isVolatileBinding(l){return t.test(l.toString())}})});function Ce(i,t){p.defineProperty(i,t)}function Te(i,t,e){return Object.assign({},e,{get(){return p.trackVolatile(),e.get.apply(this)}})}const St=y.getById(x.contextEvent,()=>{let i=null;return{get(){return i},set(t){i=t}}}),A=Object.freeze({default:{index:0,length:0,get event(){return A.getEvent()},eventDetail(){return this.event.detail},eventTarget(){return this.event.target}},getEvent(){return St.get()},setEvent(i){St.set(i)}});class tt{constructor(t,e,s=!1){this.evaluate=t,this.policy=e,this.isVolatile=s}}class $e extends tt{createObserver(t){return p.binding(this.evaluate,t,this.isVolatile)}}function ht(i,t,e=p.isVolatileBinding(i)){return new $e(i,t,e)}class Xt extends tt{createObserver(){return this}bind(t){return this.evaluate(t.source,t.context)}}E(Xt);function ut(i,t){return new Xt(i,t)}let Ct;function Yt(i){return i.map(t=>t instanceof m?Yt(t.styles):[t]).reduce((t,e)=>t.concat(e),[])}class m{constructor(t){this.styles=t,this.targets=new WeakSet,this._strategy=null,this.behaviors=t.map(e=>e instanceof m?e.behaviors:null).reduce((e,s)=>s===null?e:e===null?s:e.concat(s),null)}get strategy(){return this._strategy===null&&this.withStrategy(Ct),this._strategy}addStylesTo(t){this.strategy.addStylesTo(t),this.targets.add(t)}removeStylesFrom(t){this.strategy.removeStylesFrom(t),this.targets.delete(t)}isAttachedTo(t){return this.targets.has(t)}withBehaviors(...t){return this.behaviors=this.behaviors===null?t:this.behaviors.concat(t),this}withStrategy(t){return this._strategy=new t(Yt(this.styles)),this}static setDefaultStrategy(t){Ct=t}static normalize(t){return t===void 0?void 0:Array.isArray(t)?new m(t):t instanceof m?t:new m([t])}}m.supportsAdoptedStyleSheets=Array.isArray(document.adoptedStyleSheets)&&"replace"in CSSStyleSheet.prototype;const Tt=/fe-b\$\$start\$\$(\d+)\$\$(.+)\$\$fe-b/,$t=/fe-b\$\$end\$\$(\d+)\$\$(.+)\$\$fe-b/,kt=/fe-repeat\$\$start\$\$(\d+)\$\$fe-repeat/,Nt=/fe-repeat\$\$end\$\$(\d+)\$\$fe-repeat/,Bt=/^(?:.{0,1000})fe-eb\$\$start\$\$(.+?)\$\$fe-eb/,xt=/fe-eb\$\$end\$\$(.{0,1000})\$\$fe-eb(?:.{0,1000})$/;function At(i){return i&&i.nodeType===Node.COMMENT_NODE}const w=Object.freeze({attributeMarkerName:"data-fe-b",attributeBindingSeparator:" ",contentBindingStartMarker(i,t){return`fe-b$$start$$${i}$$${t}$$fe-b`},contentBindingEndMarker(i,t){return`fe-b$$end$$${i}$$${t}$$fe-b`},repeatStartMarker(i){return`fe-repeat$$start$$${i}$$fe-repeat`},repeatEndMarker(i){return`fe-repeat$$end$$${i}$$fe-repeat`},isContentBindingStartMarker(i){return Tt.test(i)},isContentBindingEndMarker(i){return $t.test(i)},isRepeatViewStartMarker(i){return kt.test(i)},isRepeatViewEndMarker(i){return Nt.test(i)},isElementBoundaryStartMarker(i){return At(i)&&Bt.test(i.data.trim())},isElementBoundaryEndMarker(i){return At(i)&&xt.test(i.data)},parseAttributeBinding(i){const t=i.getAttribute(this.attributeMarkerName);return t===null?t:t.split(this.attributeBindingSeparator).map(e=>parseInt(e))},parseEnumeratedAttributeBinding(i){const t=[],e=this.attributeMarkerName.length+1,s=`${this.attributeMarkerName}-`;for(const n of i.getAttributeNames())if(n.startsWith(s)){const r=Number(n.slice(e));if(!Number.isNaN(r))t.push(r);else throw new Error(`Invalid attribute marker name: ${n}. Expected format is ${s}<number>.`)}return t.length===0?null:t},parseContentBindingStartMarker(i){return Ot(Tt,i)},parseContentBindingEndMarker(i){return Ot($t,i)},parseRepeatStartMarker(i){return Mt(kt,i)},parseRepeatEndMarker(i){return Mt(Nt,i)},parseElementBoundaryStartMarker(i){return Et(Bt,i.trim())},parseElementBoundaryEndMarker(i){return Et(xt,i)}});function Mt(i,t){const e=i.exec(t);return e===null?e:parseInt(e[1])}function Et(i,t){const e=i.exec(t);return e===null?e:e[1]}function Ot(i,t){const e=i.exec(t);return e===null?e:[parseInt(e[1]),e[2]]}const Q=Symbol.for("fe-hydration");function V(i){return i[Q]===Q}const ft=`fast-${Math.random().toString(36).substring(2,8)}`,U=`${ft}{`,_=`}${ft}`,ke=_.length;let Ne=0;const j=()=>`${ft}-${++Ne}`,pt=Object.freeze({interpolation:i=>`${U}${i}${_}`,attribute:i=>`${j()}="${U}${i}${_}"`,comment:i=>`<!--${U}${i}${_}-->`}),et=Object.freeze({parse(i,t){const e=i.split(U);if(e.length===1)return null;const s=[];for(let n=0,r=e.length;n<r;++n){const a=e[n],c=a.indexOf(_);let d;if(c===-1)d=a;else{const l=a.substring(0,c);s.push(t[l]),d=a.substring(c+ke)}d!==""&&s.push(d)}return s}}),nt=Gt(),T=Object.freeze({getForInstance:nt.getForInstance,getByType:nt.getByType,define(i,t){return t=t||{},t.type=i,nt.register(t),i},assignAspect(i,t){if(!t){i.aspectType=g.content;return}switch(i.sourceAspect=t,t[0]){case":":i.targetAspect=t.substring(1),i.aspectType=i.targetAspect==="classList"?g.tokenList:g.property;break;case"?":i.targetAspect=t.substring(1),i.aspectType=g.booleanAttribute;break;case"@":i.targetAspect=t.substring(1),i.aspectType=g.event;break;default:i.targetAspect=t,i.aspectType=g.attribute;break}}});class Zt{constructor(t){this.options=t}createHTML(t){return pt.attribute(t(this))}createBehavior(){return this}}E(Zt);class te extends Error{constructor(t,e,s){super(t),this.factories=e,this.node=s}}function bt(i){return i.nodeType===Node.COMMENT_NODE}function ee(i){return i.nodeType===Node.TEXT_NODE}function ie(i,t){const e=document.createRange();return e.setStart(i,0),e.setEnd(t,bt(t)||ee(t)?t.data.length:t.childNodes.length),e}function Be(i){return i instanceof DocumentFragment&&"mode"in i}function xe(i,t,e){const s=ie(i,t),n=s.commonAncestorContainer,r=document.createTreeWalker(n,NodeFilter.SHOW_ELEMENT+NodeFilter.SHOW_COMMENT+NodeFilter.SHOW_TEXT,{acceptNode(l){return s.comparePoint(l,0)===0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT}}),a={},c={};let d=r.currentNode=i;for(;d!==null;){switch(d.nodeType){case Node.ELEMENT_NODE:{Ae(d,e,a);break}case Node.COMMENT_NODE:{Me(d,r,e,a,c);break}}d=r.nextNode()}return s.detach(),{targets:a,boundaries:c}}function Ae(i,t,e){var s;const n=(s=w.parseAttributeBinding(i))!==null&&s!==void 0?s:w.parseEnumeratedAttributeBinding(i);if(n!==null){for(const r of n){if(!t[r])throw new te(`HydrationView was unable to successfully target factory on ${i.nodeName} inside ${i.getRootNode().host.nodeName}. This likely indicates a template mismatch between SSR rendering and hydration.`,t,i);G(t[r],i,e)}i.removeAttribute(w.attributeMarkerName)}}function Me(i,t,e,s,n){if(w.isElementBoundaryStartMarker(i)){Ee(i,t);return}if(w.isContentBindingStartMarker(i.data)){const r=w.parseContentBindingStartMarker(i.data);if(r===null)return;const[a,c]=r,d=e[a],l=[];let o=t.nextSibling();i.data="";const h=o;for(;o!==null;){if(bt(o)){const u=w.parseContentBindingEndMarker(o.data);if(u&&u[1]===c)break}l.push(o),o=t.nextSibling()}if(o===null){const u=i.getRootNode();throw new Error(`Error hydrating Comment node inside "${Be(u)?u.host.nodeName:u.nodeName}".`)}if(o.data="",l.length===1&&ee(l[0]))G(d,l[0],s);else{o!==h&&o.previousSibling!==null&&(n[d.targetNodeId]={first:h,last:o.previousSibling});const u=o.parentNode.insertBefore(document.createTextNode(""),o);G(d,u,s)}}}function Ee(i,t){const e=w.parseElementBoundaryStartMarker(i.data);let s=t.nextSibling();for(;s!==null;){if(bt(s)){const n=w.parseElementBoundaryEndMarker(s.data);if(n&&n===e)break}s=t.nextSibling()}}function G(i,t,e){if(i.targetNodeId===void 0)throw new Error("Factory could not be target to the node");e[i.targetNodeId]=t}var se;function lt(i,t){const e=i.parentNode;let s=i,n;for(;s!==t;){if(n=s.nextSibling,!n)throw new Error(`Unmatched first/last child inside "${t.getRootNode().host.nodeName}".`);e.removeChild(s),s=n}e.removeChild(t)}class ne{constructor(){this.index=0,this.length=0}get event(){return A.getEvent()}get isEven(){return this.index%2===0}get isOdd(){return this.index%2!==0}get isFirst(){return this.index===0}get isInMiddle(){return!this.isFirst&&!this.isLast}get isLast(){return this.index===this.length-1}eventDetail(){return this.event.detail}eventTarget(){return this.event.target}}class H extends ne{constructor(t,e,s){super(),this.fragment=t,this.factories=e,this.targets=s,this.behaviors=null,this.unbindables=[],this.source=null,this.isBound=!1,this.sourceLifetime=Z.unknown,this.context=this,this.firstChild=t.firstChild,this.lastChild=t.lastChild}appendTo(t){t.appendChild(this.fragment)}insertBefore(t){if(this.fragment.hasChildNodes())t.parentNode.insertBefore(this.fragment,t);else{const e=this.lastChild;if(t.previousSibling===e)return;const s=t.parentNode;let n=this.firstChild,r;for(;n!==e;)r=n.nextSibling,s.insertBefore(n,t),n=r;s.insertBefore(e,t)}}remove(){const t=this.fragment,e=this.lastChild;let s=this.firstChild,n;for(;s!==e;)n=s.nextSibling,t.appendChild(s),s=n;t.appendChild(e)}dispose(){lt(this.firstChild,this.lastChild),this.unbind()}onUnbind(t){this.unbindables.push(t)}bind(t,e=this){if(this.source===t)return;let s=this.behaviors;if(s===null){this.source=t,this.context=e,this.behaviors=s=new Array(this.factories.length);const n=this.factories;for(let r=0,a=n.length;r<a;++r){const c=n[r].createBehavior();c.bind(this),s[r]=c}}else{this.source!==null&&this.evaluateUnbindables(),this.isBound=!1,this.source=t,this.context=e;for(let n=0,r=s.length;n<r;++n)s[n].bind(this)}this.isBound=!0}unbind(){!this.isBound||this.source===null||(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}evaluateUnbindables(){const t=this.unbindables;for(let e=0,s=t.length;e<s;++e)t[e].unbind(this);t.length=0}static disposeContiguousBatch(t){if(t.length!==0){lt(t[0].firstChild,t[t.length-1].lastChild);for(let e=0,s=t.length;e<s;++e)t[e].unbind()}}}E(H);p.defineProperty(H.prototype,"index");p.defineProperty(H.prototype,"length");const B={unhydrated:"unhydrated",hydrating:"hydrating",hydrated:"hydrated"};class Oe extends Error{constructor(t,e,s,n){super(t),this.factory=e,this.fragment=s,this.templateString=n}}class _e extends ne{constructor(t,e,s,n){super(),this.firstChild=t,this.lastChild=e,this.sourceTemplate=s,this.hostBindingTarget=n,this[se]=Q,this.context=this,this.source=null,this.isBound=!1,this.sourceLifetime=Z.unknown,this.unbindables=[],this.fragment=null,this.behaviors=null,this._hydrationStage=B.unhydrated,this._bindingViewBoundaries={},this._targets={},this.factories=s.compile().factories}get hydrationStage(){return this._hydrationStage}get targets(){return this._targets}get bindingViewBoundaries(){return this._bindingViewBoundaries}insertBefore(t){if(this.fragment!==null)if(this.fragment.hasChildNodes())t.parentNode.insertBefore(this.fragment,t);else{const e=this.lastChild;if(t.previousSibling===e)return;const s=t.parentNode;let n=this.firstChild,r;for(;n!==e;)r=n.nextSibling,s.insertBefore(n,t),n=r;s.insertBefore(e,t)}}appendTo(t){this.fragment!==null&&t.appendChild(this.fragment)}remove(){const t=this.fragment||(this.fragment=document.createDocumentFragment()),e=this.lastChild;let s=this.firstChild,n;for(;s!==e;){if(n=s.nextSibling,!n)throw new Error(`Unmatched first/last child inside "${e.getRootNode().host.nodeName}".`);t.appendChild(s),s=n}t.appendChild(e)}bind(t,e=this){var s;if(this.hydrationStage!==B.hydrated&&(this._hydrationStage=B.hydrating),this.source===t)return;let n=this.behaviors;if(n===null){this.source=t,this.context=e;try{const{targets:a,boundaries:c}=xe(this.firstChild,this.lastChild,this.factories);this._targets=a,this._bindingViewBoundaries=c}catch(a){if(a instanceof te){let c=this.sourceTemplate.html;typeof c!="string"&&(c=c.innerHTML),a.templateString=c}throw a}this.behaviors=n=new Array(this.factories.length);const r=this.factories;for(let a=0,c=r.length;a<c;++a){const d=r[a];if(d.targetNodeId==="h"&&this.hostBindingTarget&&G(d,this.hostBindingTarget,this._targets),d.targetNodeId in this.targets){const l=d.createBehavior();l.bind(this),n[a]=l}else{let l=this.sourceTemplate.html;typeof l!="string"&&(l=l.innerHTML);const o=((s=this.firstChild)===null||s===void 0?void 0:s.getRootNode()).host,h=o?.nodeName||"unknown",u=d,b=[`HydrationView was unable to successfully target bindings inside "<${h.toLowerCase()}>".`,`
|
|
2
|
+
Mismatch Details:`,` - Expected target node ID: "${d.targetNodeId}"`,` - Available target IDs: [${Object.keys(this.targets).join(", ")||"none"}]`];throw d.targetTagName&&b.push(` - Expected tag name: "${d.targetTagName}"`),u.sourceAspect&&b.push(` - Source aspect: "${u.sourceAspect}"`),u.aspectType!==void 0&&b.push(` - Aspect type: ${u.aspectType}`),b.push(`
|
|
3
|
+
This usually means:`," 1. The server-rendered HTML doesn't match the client template"," 2. The hydration markers are missing or corrupted"," 3. The DOM structure was modified before hydration",`
|
|
4
|
+
Template: ${l.slice(0,200)}${l.length>200?"...":""}`),new Oe(b.join(`
|
|
5
|
+
`),d,ie(this.firstChild,this.lastChild).cloneContents(),l)}}}else{this.source!==null&&this.evaluateUnbindables(),this.isBound=!1,this.source=t,this.context=e;for(let r=0,a=n.length;r<a;++r)n[r].bind(this)}this.isBound=!0,this._hydrationStage=B.hydrated}unbind(){!this.isBound||this.source===null||(this.evaluateUnbindables(),this.source=null,this.context=this,this.isBound=!1)}dispose(){lt(this.firstChild,this.lastChild),this.unbind()}onUnbind(t){this.unbindables.push(t)}evaluateUnbindables(){const t=this.unbindables;for(let e=0,s=t.length;e<s;++e)t[e].unbind(this);t.length=0}}se=Q;E(_e);function Re(i){return i.create!==void 0}function Le(i,t,e,s){if(e==null&&(e=""),Re(e)){i.textContent="";let n=i.$fastView;if(n===void 0)if(V(s)&&V(e)&&s.bindingViewBoundaries[this.targetNodeId]!==void 0&&s.hydrationStage!==B.hydrated){const r=s.bindingViewBoundaries[this.targetNodeId];n=e.hydrate(r.first,r.last)}else n=e.create();else i.$fastTemplate!==e&&(n.isComposed&&(n.remove(),n.unbind()),n=e.create());n.isComposed?n.needsBindOnly&&(n.needsBindOnly=!1,n.bind(s.source,s.context)):(n.isComposed=!0,n.bind(s.source,s.context),n.insertBefore(i),i.$fastView=n,i.$fastTemplate=e)}else{const n=i.$fastView;n!==void 0&&n.isComposed&&(n.isComposed=!1,n.remove(),n.needsBindOnly?n.needsBindOnly=!1:n.unbind()),i.textContent=e}}function Ve(i,t,e){var s;const n=`${this.id}-t`,r=(s=i[n])!==null&&s!==void 0?s:i[n]={v:0,cv:Object.create(null)},a=r.cv;let c=r.v;const d=i[t];if(e!=null&&e.length){const l=e.split(/\s+/);for(let o=0,h=l.length;o<h;++o){const u=l[o];u!==""&&(a[u]=c,d.add(u))}}if(r.v=c+1,c!==0){c-=1;for(const l in a)a[l]===c&&d.remove(l)}}const je={[g.attribute]:C.setAttribute,[g.booleanAttribute]:C.setBooleanAttribute,[g.property]:(i,t,e)=>i[t]=e,[g.content]:Le,[g.tokenList]:Ve,[g.event]:()=>{}};class O{constructor(t){this.dataBinding=t,this.updateTarget=null,this.aspectType=g.content}createHTML(t){return pt.interpolation(t(this))}createBehavior(){var t;if(this.updateTarget===null){const e=je[this.aspectType],s=(t=this.dataBinding.policy)!==null&&t!==void 0?t:this.policy;if(!e)throw y.error(1205);this.data=`${this.id}-d`,this.updateTarget=s.protect(this.targetTagName,this.aspectType,this.targetAspect,e)}return this}bind(t){var e;const s=t.targets[this.targetNodeId],n=V(t)&&t.hydrationStage&&t.hydrationStage!==B.hydrated;switch(this.aspectType){case g.event:s[this.data]=t,s.addEventListener(this.targetAspect,this,this.dataBinding.options);break;case g.content:t.onUnbind(this);default:const r=(e=s[this.data])!==null&&e!==void 0?e:s[this.data]=this.dataBinding.createObserver(this,this);if(r.target=s,r.controller=t,n&&(this.aspectType===g.attribute||this.aspectType===g.booleanAttribute)){r.bind(t);break}this.updateTarget(s,this.targetAspect,r.bind(t),t);break}}unbind(t){const s=t.targets[this.targetNodeId].$fastView;s!==void 0&&s.isComposed&&(s.unbind(),s.needsBindOnly=!0)}handleEvent(t){const e=t.currentTarget[this.data];if(e.isBound){A.setEvent(t);const s=this.dataBinding.evaluate(e.source,e.context);A.setEvent(null),s!==!0&&t.preventDefault()}}handleChange(t,e){const s=e.target,n=e.controller;this.updateTarget(s,this.targetAspect,e.bind(n),n)}}T.define(O,{aspected:!0});const re=(i,t)=>`${i}.${t}`,_t={},S={index:0,node:null};function Rt(i){i.startsWith("fast-")||y.warn(1204,{name:i})}const Fe=new Proxy(document.createElement("div"),{get(i,t){Rt(t);const e=Reflect.get(i,t);return M(e)?e.bind(i):e},set(i,t,e){return Rt(t),Reflect.set(i,t,e)}});class He{constructor(t,e,s){this.fragment=t,this.directives=e,this.policy=s,this.proto=null,this.nodeIds=new Set,this.descriptors={},this.factories=[]}addFactory(t,e,s,n,r){var a,c;this.nodeIds.has(s)||(this.nodeIds.add(s),this.addTargetDescriptor(e,s,n)),t.id=(a=t.id)!==null&&a!==void 0?a:j(),t.targetNodeId=s,t.targetTagName=r,t.policy=(c=t.policy)!==null&&c!==void 0?c:this.policy,this.factories.push(t)}freeze(){return this.proto=Object.create(null,this.descriptors),this}addTargetDescriptor(t,e,s){const n=this.descriptors;if(e==="r"||e==="h"||n[e])return;if(!n[t]){const a=t.lastIndexOf("."),c=t.substring(0,a),d=parseInt(t.substring(a+1));this.addTargetDescriptor(c,t,d)}let r=_t[e];if(!r){const a=`_${e}`;_t[e]=r={get(){var c;return(c=this[a])!==null&&c!==void 0?c:this[a]=this[t].childNodes[s]}}}n[e]=r}createView(t){const e=this.fragment.cloneNode(!0),s=Object.create(this.proto);s.r=e,s.h=t??Fe;for(const n of this.nodeIds)s[n];return new H(e,this.factories,s)}}function oe(i,t,e,s,n,r=!1){const a=e.attributes,c=i.directives;for(let d=0,l=a.length;d<l;++d){const o=a[d],h=o.value,u=et.parse(h,c);let b=null;u===null?r&&(b=new O(ut(()=>h,i.policy)),T.assignAspect(b,o.name)):b=gt.aggregate(u,i.policy),b!==null&&(e.removeAttributeNode(o),d--,l--,i.addFactory(b,t,s,n,e.tagName))}}function Ie(i,t,e,s,n){const r=et.parse(t.textContent,i.directives);if(r===null)return S.node=t.nextSibling,S.index=n+1,S;let a,c=a=t;for(let d=0,l=r.length;d<l;++d){const o=r[d];d!==0&&(n++,s=re(e,n),a=c.parentNode.insertBefore(document.createTextNode(""),c.nextSibling)),N(o)?a.textContent=o:(a.textContent=" ",T.assignAspect(o),i.addFactory(o,e,s,n,null)),c=a}return S.index=n+1,S.node=c.nextSibling,S}function ae(i,t,e){let s=0,n=t.firstChild;for(;n;){const r=De(i,e,n,s);n=r.node,s=r.index}}function De(i,t,e,s){const n=re(t,s);switch(e.nodeType){case 1:oe(i,t,e,n,s),ae(i,e,n);break;case 3:return Ie(i,e,t,n,s);case 8:const r=et.parse(e.data,i.directives);r!==null&&i.addFactory(gt.aggregate(r),t,n,s,null);break}return S.index=s+1,S.node=e.nextSibling,S}function Pe(i,t){return i&&i.nodeType==8&&et.parse(i.data,t)!==null}const Lt="TEMPLATE",gt={compile(i,t,e=C.policy){let s;if(N(i)){s=document.createElement(Lt),s.innerHTML=e.createHTML(i);const a=s.content.firstElementChild;a!==null&&a.tagName===Lt&&(s=a)}else s=i;!s.content.firstChild&&!s.content.lastChild&&s.content.appendChild(document.createComment(""));const n=document.adoptNode(s.content),r=new He(n,t,e);return oe(r,"",s,"h",0,!0),(Pe(n.firstChild,t)||n.childNodes.length===1&&Object.keys(t).length>0)&&n.insertBefore(document.createComment(""),n.firstChild),ae(r,n,"r"),S.node=null,r.freeze()},setDefaultStrategy(i){this.compile=i},aggregate(i,t=C.policy){if(i.length===1)return i[0];let e,s=!1,n;const r=i.length,a=i.map(l=>N(l)?()=>l:(e=l.sourceAspect||e,s=s||l.dataBinding.isVolatile,n=n||l.dataBinding.policy,l.dataBinding.evaluate)),c=(l,o)=>{let h="";for(let u=0;u<r;++u)h+=a[u](l,o);return h},d=new O(ht(c,n??t,s));return T.assignAspect(d,e),d}},ze=/([ \x09\x0a\x0c\x0d])([^\0-\x1F\x7F-\x9F "'>=/]+)([ \x09\x0a\x0c\x0d]*=[ \x09\x0a\x0c\x0d]*(?:[^ \x09\x0a\x0c\x0d"'`<>=]*|"[^"]*|'[^']*))$/,Ue=Object.create(null);class F{constructor(t,e=Ue){this.html=t,this.factories=e}createHTML(t){const e=this.factories;for(const s in e)t(e[s]);return this.html}}F.empty=new F("");T.define(F);function We(i,t,e,s=T.getForInstance(i)){if(s.aspected){const n=ze.exec(t);n!==null&&T.assignAspect(i,n[2])}return i.createHTML(e)}class it{constructor(t,e={},s){this.policy=s,this.result=null,this.html=t,this.factories=e}compile(){return this.result===null&&(this.result=gt.compile(this.html,this.factories,this.policy)),this.result}create(t){return this.compile().createView(t)}inline(){return new F(N(this.html)?this.html:this.html.innerHTML,this.factories)}withPolicy(t){if(this.result)throw y.error(1208);if(this.policy)throw y.error(1207);return this.policy=t,this}render(t,e,s){const n=this.create(s);return n.bind(t),n.appendTo(e),n}static create(t,e,s){let n="";const r=Object.create(null),a=c=>{var d;const l=(d=c.id)!==null&&d!==void 0?d:c.id=j();return r[l]=c,l};for(let c=0,d=t.length-1;c<d;++c){const l=t[c];let o=e[c],h;if(n+=l,M(o))o=new O(ht(o));else if(o instanceof tt)o=new O(o);else if(!(h=T.getForInstance(o))){const u=o;o=new O(ut(()=>u))}n+=We(o,l,a,h)}return new it(n+t[t.length-1],r,s)}}E(it);const yt=(i,...t)=>{if(Array.isArray(i)&&Array.isArray(i.raw))return it.create(i,t);throw y.error(1206)};yt.partial=i=>new F(i);const Vt="boolean",jt="reflect",le=Object.freeze({locate:Jt()}),qe={toView(i){return i?"true":"false"},fromView(i){return!(i==null||i==="false"||i===!1||i===0)}};function Ft(i){if(i==null)return null;const t=i*1;return isNaN(t)?null:t}const Qe={toView(i){const t=Ft(i);return t&&t.toString()},fromView:Ft};class J{constructor(t,e,s=e.toLowerCase(),n=jt,r){this.guards=new Set,this.Owner=t,this.name=e,this.attribute=s,this.mode=n,this.converter=r,this.fieldName=`_${e}`,this.callbackName=`${e}Changed`,this.hasCallback=this.callbackName in t.prototype,n===Vt&&r===void 0&&(this.converter=qe)}setValue(t,e){const s=t[this.fieldName],n=this.converter;n!==void 0&&(e=n.fromView(e)),s!==e&&(t[this.fieldName]=e,this.tryReflectToAttribute(t),this.hasCallback&&t[this.callbackName](s,e),t.$fastController.notify(this.name))}getValue(t){return p.track(t,this.name),t[this.fieldName]}onAttributeChangedCallback(t,e){this.guards.has(t)||(this.guards.add(t),this.setValue(t,e),this.guards.delete(t))}tryReflectToAttribute(t){const e=this.mode,s=this.guards;s.has(t)||e==="fromView"||dt.enqueue(()=>{s.add(t);const n=t[this.fieldName];switch(e){case jt:const r=this.converter;C.setAttribute(t,this.attribute,r!==void 0?r.toView(n):n);break;case Vt:C.setBooleanAttribute(t,this.attribute,n);break}s.delete(t)})}static collect(t,...e){const s=[];e.push(le.locate(t));for(let n=0,r=e.length;n<r;++n){const a=e[n];if(a!==void 0)for(let c=0,d=a.length;c<d;++c){const l=a[c];N(l)?s.push(new J(t,l)):s.push(new J(t,l.property,l.attribute,l.mode,l.converter))}}return s}}function ce(i,t){let e;function s(n,r){arguments.length>1&&(e.property=r),le.locate(n.constructor).push(e)}if(arguments.length>1){e={},s(i,t);return}return e=i===void 0?{}:i,s}var Ge=function(i,t,e,s){function n(r){return r instanceof e?r:new e(function(a){a(r)})}return new(e||(e=Promise))(function(r,a){function c(o){try{l(s.next(o))}catch(h){a(h)}}function d(o){try{l(s.throw(o))}catch(h){a(h)}}function l(o){o.done?r(o.value):n(o.value).then(c,d)}l((s=s.apply(i,t||[])).next())})};const Ht={mode:"open"},It={},rt=new Set,R=y.getById(x.elementRegistry,()=>Gt()),Je={deferAndHydrate:"defer-and-hydrate"};class f{constructor(t,e=t.definition){var s;this.platformDefined=!1,N(e)&&(e={name:e}),this.type=t,this.name=e.name,this.template=e.template,this.templateOptions=e.templateOptions,this.registry=(s=e.registry)!==null&&s!==void 0?s:customElements;const n=t.prototype,r=J.collect(t,e.attributes),a=new Array(r.length),c={},d={};for(let l=0,o=r.length;l<o;++l){const h=r[l];a[l]=h.attribute,c[h.name]=h,d[h.attribute]=h,p.defineProperty(n,h)}Reflect.defineProperty(t,"observedAttributes",{value:a,enumerable:!0}),this.attributes=r,this.propertyLookup=c,this.attributeLookup=d,this.shadowOptions=e.shadowOptions===void 0?Ht:e.shadowOptions===null?void 0:Object.assign(Object.assign({},Ht),e.shadowOptions),this.elementOptions=e.elementOptions===void 0?It:Object.assign(Object.assign({},It),e.elementOptions),this.styles=m.normalize(e.styles),R.register(this),p.defineProperty(f.isRegistered,this.name),f.isRegistered[this.name]=this.type}get isDefined(){return this.platformDefined}define(t=this.registry){var e,s;const n=this.type;return t.get(this.name)||(this.platformDefined=!0,t.define(this.name,n,this.elementOptions),(s=(e=this.lifecycleCallbacks)===null||e===void 0?void 0:e.elementDidDefine)===null||s===void 0||s.call(e,this.name)),this}static compose(t,e){return rt.has(t)||R.getByType(t)?new f(class extends t{},e):new f(t,e)}static registerBaseType(t){rt.add(t)}static composeAsync(t,e){return new Promise(s=>{(rt.has(t)||R.getByType(t))&&s(new f(class extends t{},e));const n=new f(t,e);p.getNotifier(n).subscribe({handleChange:()=>{var r,a;(a=(r=n.lifecycleCallbacks)===null||r===void 0?void 0:r.templateDidUpdate)===null||a===void 0||a.call(r,n.name),s(n)}},"template")})}}f.isRegistered={};f.getByType=R.getByType;f.getForInstance=R.getForInstance;f.registerAsync=i=>Ge(void 0,void 0,void 0,function*(){return new Promise(t=>{f.isRegistered[i]&&t(f.isRegistered[i]),p.getNotifier(f.isRegistered).subscribe({handleChange:()=>t(f.isRegistered[i])},i)})});p.defineProperty(f.prototype,"template");class Ke extends MutationObserver{constructor(t){function e(s){this.callback.call(null,s.filter(n=>this.observedNodes.has(n.target)))}super(e),this.callback=t,this.observedNodes=new Set}observe(t,e){this.observedNodes.add(t),super.observe(t,e)}unobserve(t){this.observedNodes.delete(t),this.observedNodes.size<1&&this.disconnect()}}const Xe=Object.freeze({create(i){const t=[],e={};let s=null,n=!1;return{source:i,context:A.default,targets:e,get isBound(){return n},addBehaviorFactory(r,a){var c,d,l,o;const h=r;h.id=(c=h.id)!==null&&c!==void 0?c:j(),h.targetNodeId=(d=h.targetNodeId)!==null&&d!==void 0?d:j(),h.targetTagName=(l=a.tagName)!==null&&l!==void 0?l:null,h.policy=(o=h.policy)!==null&&o!==void 0?o:C.policy,this.addTarget(h.targetNodeId,a),this.addBehavior(h.createBehavior())},addTarget(r,a){e[r]=a},addBehavior(r){t.push(r),n&&r.bind(this)},onUnbind(r){s===null&&(s=[]),s.push(r)},connectedCallback(r){n||(n=!0,t.forEach(a=>a.bind(this)))},disconnectedCallback(r){n&&(n=!1,s!==null&&s.forEach(a=>a.unbind(this)))}}}}),Ye={bubbles:!0,composed:!0,cancelable:!0},W="isConnected",de=new WeakMap;function L(i){var t,e;return(e=(t=i.shadowRoot)!==null&&t!==void 0?t:de.get(i))!==null&&e!==void 0?e:null}let Dt;class $ extends Kt{constructor(t,e){super(t),this.boundObservables=null,this.needsInitialization=!0,this.hasExistingShadowRoot=!1,this._template=null,this.stage=3,this.guardBehaviorConnection=!1,this.behaviors=null,this.behaviorsConnected=!1,this._mainStyles=null,this.$fastController=this,this.view=null,this.source=t,this.definition=e,this.shadowOptions=e.shadowOptions;const s=p.getAccessors(t);if(s.length>0){const n=this.boundObservables=Object.create(null);for(let r=0,a=s.length;r<a;++r){const c=s[r].name,d=t[c];d!==void 0&&(delete t[c],n[c]=d)}}}get isConnected(){return p.track(this,W),this.stage===1}get context(){var t,e;return(e=(t=this.view)===null||t===void 0?void 0:t.context)!==null&&e!==void 0?e:A.default}get isBound(){var t,e;return(e=(t=this.view)===null||t===void 0?void 0:t.isBound)!==null&&e!==void 0?e:!1}get sourceLifetime(){var t;return(t=this.view)===null||t===void 0?void 0:t.sourceLifetime}get template(){var t;if(this._template===null){const e=this.definition;this.source.resolveTemplate?this._template=this.source.resolveTemplate():e.template&&(this._template=(t=e.template)!==null&&t!==void 0?t:null)}return this._template}set template(t){this._template!==t&&(this._template=t,this.needsInitialization||this.renderTemplate(t))}get shadowOptions(){return this._shadowRootOptions}set shadowOptions(t){if(this._shadowRootOptions===void 0&&t!==void 0){this._shadowRootOptions=t;let e=this.source.shadowRoot;e?this.hasExistingShadowRoot=!0:(e=this.source.attachShadow(t),t.mode==="closed"&&de.set(this.source,e))}}get mainStyles(){var t;if(this._mainStyles===null){const e=this.definition;this.source.resolveStyles?this._mainStyles=this.source.resolveStyles():e.styles&&(this._mainStyles=(t=e.styles)!==null&&t!==void 0?t:null)}return this._mainStyles}set mainStyles(t){this._mainStyles!==t&&(this._mainStyles!==null&&this.removeStyles(this._mainStyles),this._mainStyles=t,this.needsInitialization||this.addStyles(t))}onUnbind(t){var e;(e=this.view)===null||e===void 0||e.onUnbind(t)}addBehavior(t){var e,s;const n=(e=this.behaviors)!==null&&e!==void 0?e:this.behaviors=new Map,r=(s=n.get(t))!==null&&s!==void 0?s:0;r===0?(n.set(t,1),t.addedCallback&&t.addedCallback(this),t.connectedCallback&&!this.guardBehaviorConnection&&(this.stage===1||this.stage===0)&&t.connectedCallback(this)):n.set(t,r+1)}removeBehavior(t,e=!1){const s=this.behaviors;if(s===null)return;const n=s.get(t);n!==void 0&&(n===1||e?(s.delete(t),t.disconnectedCallback&&this.stage!==3&&t.disconnectedCallback(this),t.removedCallback&&t.removedCallback(this)):s.set(t,n-1))}addStyles(t){var e;if(!t)return;const s=this.source;if(t instanceof HTMLElement)((e=L(s))!==null&&e!==void 0?e:this.source).append(t);else if(!t.isAttachedTo(s)){const n=t.behaviors;if(t.addStylesTo(s),n!==null)for(let r=0,a=n.length;r<a;++r)this.addBehavior(n[r])}}removeStyles(t){var e;if(!t)return;const s=this.source;if(t instanceof HTMLElement)((e=L(s))!==null&&e!==void 0?e:s).removeChild(t);else if(t.isAttachedTo(s)){const n=t.behaviors;if(t.removeStylesFrom(s),n!==null)for(let r=0,a=n.length;r<a;++r)this.removeBehavior(n[r])}}connect(){this.stage===3&&(this.stage=0,this.bindObservables(),this.connectBehaviors(),this.needsInitialization?(this.renderTemplate(this.template),this.addStyles(this.mainStyles),this.needsInitialization=!1):this.view!==null&&this.view.bind(this.source),this.stage=1,p.notify(this,W))}bindObservables(){if(this.boundObservables!==null){const t=this.source,e=this.boundObservables,s=Object.keys(e);for(let n=0,r=s.length;n<r;++n){const a=s[n];t[a]=e[a]}this.boundObservables=null}}connectBehaviors(){if(this.behaviorsConnected===!1){const t=this.behaviors;if(t!==null){this.guardBehaviorConnection=!0;for(const e of t.keys())e.connectedCallback&&e.connectedCallback(this);this.guardBehaviorConnection=!1}this.behaviorsConnected=!0}}disconnectBehaviors(){if(this.behaviorsConnected===!0){const t=this.behaviors;if(t!==null)for(const e of t.keys())e.disconnectedCallback&&e.disconnectedCallback(this);this.behaviorsConnected=!1}}disconnect(){this.stage===1&&(this.stage=2,p.notify(this,W),this.view!==null&&this.view.unbind(),this.disconnectBehaviors(),this.stage=3)}onAttributeChangedCallback(t,e,s){const n=this.definition.attributeLookup[t];n!==void 0&&n.onAttributeChangedCallback(this.source,s)}emit(t,e,s){return this.stage===1?this.source.dispatchEvent(new CustomEvent(t,Object.assign(Object.assign({detail:e},Ye),s))):!1}renderTemplate(t){var e;const s=this.source,n=(e=L(s))!==null&&e!==void 0?e:s;if(this.view!==null)this.view.dispose(),this.view=null;else if(!this.needsInitialization||this.hasExistingShadowRoot){this.hasExistingShadowRoot=!1;for(let r=n.firstChild;r!==null;r=n.firstChild)n.removeChild(r)}t&&(this.view=t.render(s,n,s),this.view.sourceLifetime=Z.coupled)}static forCustomElement(t,e=!1){const s=t.$fastController;if(s!==void 0&&!e)return s;const n=f.getForInstance(t);if(n===void 0)throw y.error(1401);return p.getNotifier(n).subscribe({handleChange:()=>{$.forCustomElement(t,!0),t.$fastController.connect()}},"template"),p.getNotifier(n).subscribe({handleChange:()=>{$.forCustomElement(t,!0),t.$fastController.connect()}},"shadowOptions"),t.$fastController=new Dt(t,n)}static setStrategy(t){Dt=t}}E($);$.setStrategy($);function K(i){var t;return"adoptedStyleSheets"in i?i:(t=L(i))!==null&&t!==void 0?t:i.getRootNode()}class st{constructor(t){const e=st.styleSheetCache;this.sheets=t.map(s=>{if(s instanceof CSSStyleSheet)return s;let n=e.get(s);return n===void 0&&(n=new CSSStyleSheet,n.replaceSync(s),e.set(s,n)),n})}addStylesTo(t){he(K(t),this.sheets)}removeStylesFrom(t){ue(K(t),this.sheets)}}st.styleSheetCache=new Map;let Ze=0;const ti=()=>`fast-${++Ze}`;function Pt(i){return i===document?document.body:i}class ei{constructor(t){this.styles=t,this.styleClass=ti()}addStylesTo(t){t=Pt(K(t));const e=this.styles,s=this.styleClass;for(let n=0;n<e.length;n++){const r=document.createElement("style");r.innerHTML=e[n],r.className=s,t.append(r)}}removeStylesFrom(t){t=Pt(K(t));const e=t.querySelectorAll(`.${this.styleClass}`);for(let s=0,n=e.length;s<n;++s)t.removeChild(e[s])}}let he=(i,t)=>{i.adoptedStyleSheets=[...i.adoptedStyleSheets,...t]},ue=(i,t)=>{i.adoptedStyleSheets=i.adoptedStyleSheets.filter(e=>t.indexOf(e)===-1)};if(m.supportsAdoptedStyleSheets){try{document.adoptedStyleSheets.push(),document.adoptedStyleSheets.splice(),he=(i,t)=>{i.adoptedStyleSheets.push(...t)},ue=(i,t)=>{for(const e of t){const s=i.adoptedStyleSheets.indexOf(e);s!==-1&&i.adoptedStyleSheets.splice(s,1)}}}catch{}m.setDefaultStrategy(st)}else m.setDefaultStrategy(ei);const ot="defer-hydration",I="needs-hydration";class v extends ${static config(t){return v.lifecycleCallbacks=t,this}static hydrationObserverHandler(t){for(const e of t)v.hydrationObserver.unobserve(e.target),e.target.$fastController.connect()}static checkHydrationComplete(){var t,e;document.querySelector(`[${I}]`)||(e=(t=v.lifecycleCallbacks)===null||t===void 0?void 0:t.hydrationComplete)===null||e===void 0||e.call(t)}static forCustomElement(t,e){const s=f.getForInstance(t);return s?.templateOptions===Je.deferAndHydrate&&!s.template&&(t.toggleAttribute(ot,!0),t.toggleAttribute(I,!0)),super.forCustomElement(t,e)}connect(){var t,e,s,n,r,a;if(this.needsHydration===void 0&&(this.needsHydration=this.source.getAttribute(I)!==null),this.source.hasAttribute(ot)){v.hydrationObserver.observe(this.source,{attributeFilter:[ot]});return}if(!this.needsHydration){super.connect();return}if(this.stage!==3)return;(e=(t=v.lifecycleCallbacks)===null||t===void 0?void 0:t.elementWillHydrate)===null||e===void 0||e.call(t,this.definition.name),this.stage=0,this.bindObservables(),this.connectBehaviors();const c=this.source,d=(s=L(c))!==null&&s!==void 0?s:c;if(this.template)if(V(this.template)){let l=d.firstChild,o=d.lastChild;c.shadowRoot===null&&(w.isElementBoundaryStartMarker(l)&&(l.data="",l=l.nextSibling),w.isElementBoundaryEndMarker(o)&&(o.data="",o=o.previousSibling)),this.view=this.template.hydrate(l,o,c),(n=this.view)===null||n===void 0||n.bind(this.source)}else this.renderTemplate(this.template);this.addStyles(this.mainStyles),this.stage=1,this.source.removeAttribute(I),this.needsInitialization=this.needsHydration=!1,p.notify(this,W),(a=(r=v.lifecycleCallbacks)===null||r===void 0?void 0:r.elementDidHydrate)===null||a===void 0||a.call(r,this.definition.name),v.checkHydrationComplete()}disconnect(){super.disconnect(),v.hydrationObserver.unobserve(this.source)}static install(){$.setStrategy(v)}}v.hydrationObserver=new Ke(v.hydrationObserverHandler);var ii=function(i,t,e,s){function n(r){return r instanceof e?r:new e(function(a){a(r)})}return new(e||(e=Promise))(function(r,a){function c(o){try{l(s.next(o))}catch(h){a(h)}}function d(o){try{l(s.throw(o))}catch(h){a(h)}}function l(o){o.done?r(o.value):n(o.value).then(c,d)}l((s=s.apply(i,t||[])).next())})};function fe(i){const t=class extends i{constructor(){super(),$.forCustomElement(this)}$emit(e,s,n){return this.$fastController.emit(e,s,n)}connectedCallback(){this.$fastController.connect()}disconnectedCallback(){this.$fastController.disconnect()}attributeChangedCallback(e,s,n){this.$fastController.onAttributeChangedCallback(e,s,n)}};return f.registerBaseType(t),t}function si(i,t){return M(i)?f.compose(i,t):f.compose(this,i)}function ni(i,t){return ii(this,void 0,void 0,function*(){return M(i)?(yield f.composeAsync(i,t)).define().type:(yield f.composeAsync(this,i)).define().type})}function ri(i,t){return M(i)?f.compose(i,t).define().type:f.compose(this,i).define().type}function oi(i){return fe(i)}const ai=Object.assign(fe(HTMLElement),{from:oi,define:ri,compose:si,defineAsync:ni});function li(i,t){return i instanceof Function?i(t):i}const zt=new Set,at=new Map,ci=i=>(t="vwc")=>{const e=n=>`${t}-${n}`,s=n=>{const r=e(n.name);let a=n.type;if(a.componentName=n.name,zt.has(r))return;at.has(a)&&at.get(a)!==r&&(a=class extends a{}),zt.add(r),at.set(a,r);for(const o of n.dependencies)s(o);const c=new Map([[n.type,r],...n.dependencies.map(o=>[o.type,e(o.name)])]),l={tagFor:(o,h)=>{if(!c.has(o))throw new Error(`Could not get tag for ${o.name} as it is not a dependency of ${n.name}.`);const u=c.get(o);return h?u:yt.partial(u)},tagForNonDependency(o){return e(o)}};f.compose(a,{...n.options,template:li(n.template,l),name:`${t}-${n.name}`}).define()};s(i)},di=(i,t,e,s,n)=>({name:i,type:t,template:e,dependencies:s,options:n}),Ut=new WeakMap,pe=i=>{let t=Ut.get(i);return t||(t=[],Ut.set(i,t)),t},hi=(i,t)=>{pe(i).push(t)},ui=(i,t)=>{pe(i).forEach(e=>e(i,t))},fi=i=>i==="delegate",Wt=i=>`vvd${i.charAt(0).toUpperCase()}${i.slice(1)}`,be=(i,t)=>{if(fi(i._vividAriaBehaviour)){const e=i[t];i[`_${t}`]=null,i.removeAttribute(Y(t)),i[`_${t}`]=e,i[t]!==null?i.dataset[Wt(t)]=i[t]:delete i.dataset[Wt(t)]}else C.setAttribute(i,Y(t),i[t])},X=new WeakMap,pi=(i,t)=>{const e=X.get(i);e?e.add(t):X.set(i,new Set([t]))},bi=(i,t)=>{i.isConnected?be(i,t):pi(i,t)},gi=i=>{const t=X.get(i);if(t){for(const e of t)be(i,e);X.delete(i)}},ct=["role","ariaAtomic","ariaAutoComplete","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColIndexText","ariaColSpan","ariaCurrent","ariaDescription","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowIndexText","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText","ariaRelevant"],Y=i=>i.replace("aria","aria-").toLowerCase(),yi=i=>{class t extends i{constructor(...s){super(...s),this._vividAriaBehaviour="default";for(const n of ct)this[`_${n}`]=null}connectedCallback(){super.connectedCallback(),gi(this)}}for(const e of ct)ce({attribute:Y(e),mode:"fromView"})(t.prototype,e),t.prototype[`${e}Changed`]=function(){bi(this,e),this._vividAriaBehaviour!=="default"&&ui(this,e)};return t};function vi(){const i=new WeakMap;return t=>(i.has(t)||i.set(t,[]),i.get(t))}const ge=vi(),mi=i=>(t,e)=>{ge(t.constructor).push({newPropertyName:e,...i})},wi=i=>{class t extends i{#t(s){let n=!1,r=!1;const a=o=>r&&s.fromDeprecated(o[s.deprecatedPropertyName])===o[s.newPropertyName],c=o=>n&&s.toDeprecated&&s.toDeprecated(o[s.newPropertyName])===o[s.deprecatedPropertyName],d={handleChange(o,h){if(h===s.newPropertyName){if(n=!0,!s.toDeprecated||a(o))return;o[s.deprecatedPropertyName]=s.toDeprecated(o[s.newPropertyName])}if(h===s.deprecatedPropertyName){if(r=!0,c(o))return;o[s.newPropertyName]=s.fromDeprecated(o[s.deprecatedPropertyName])}}},l=p.getNotifier(this);l.subscribe(d,s.newPropertyName),l.subscribe(d,s.deprecatedPropertyName)}constructor(...s){super(...s);for(const n of ge(this.constructor))this.#t(n)}}return t};class Si extends yi(wi(ai)){static{this.VIVID_VERSION="5.4.0"}connectedCallback(){super.connectedCallback();const t=this.constructor.componentName;this.setAttribute("data-vvd-component",t)}}exports.Binding=tt;exports.DOM=C;exports.ElementStyles=m;exports.ExecutionContext=A;exports.HTMLDirective=T;exports.HTMLView=H;exports.HydrationMarkup=w;exports.HydrationStage=B;exports.Markup=pt;exports.Observable=p;exports.StatelessAttachedAttributeDirective=Zt;exports.SubscriberSet=q;exports.Updates=dt;exports.ViewBehaviorOrchestrator=Xe;exports.VividElement=Si;exports.ariaAttributeName=Y;exports.ariaMixinProperties=ct;exports.attr=ce;exports.commonjsGlobal=P;exports.createRegisterFunction=ci;exports.defineVividComponent=di;exports.emptyArray=me;exports.getAugmentedNamespace=ve;exports.getDefaultExportFromCjs=ye;exports.html=yt;exports.isFunction=M;exports.isHydratable=V;exports.isString=N;exports.noop=qt;exports.nullableNumberConverter=Qe;exports.observable=Ce;exports.oneTime=ut;exports.oneWay=ht;exports.replaces=mi;exports.subscribeToAriaPropertyChanges=hi;exports.volatile=Te;
|