@vonage/vivid 4.31.0 → 5.1.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/{shared/definition2.cjs → accordion/definition.cjs} +20 -20
- package/{shared/definition2.js → accordion/definition.js} +5 -7
- package/accordion/index.cjs +5 -5
- package/accordion/index.js +129 -3
- package/accordion-item/definition.cjs +145 -0
- package/accordion-item/definition.js +139 -0
- package/accordion-item/index.cjs +1 -5
- package/accordion-item/index.js +2 -3
- package/{shared/definition3.cjs → action-group/definition.cjs} +12 -9
- package/{shared/definition3.js → action-group/definition.js} +5 -4
- package/action-group/index.cjs +6 -5
- package/action-group/index.js +49 -3
- package/{shared/definition4.cjs → alert/definition.cjs} +33 -31
- package/{shared/definition4.js → alert/definition.js} +11 -11
- package/alert/index.cjs +30 -5
- package/alert/index.js +158 -3
- package/{shared/definition5.cjs → audio-player/definition.cjs} +58 -57
- package/{shared/definition5.js → audio-player/definition.js} +11 -12
- package/audio-player/index.cjs +68 -4
- package/audio-player/index.js +309 -2
- package/{shared/definition6.cjs → avatar/definition.cjs} +28 -26
- package/{shared/definition6.js → avatar/definition.js} +7 -7
- package/avatar/index.cjs +18 -5
- package/avatar/index.js +93 -3
- package/{shared/definition7.cjs → badge/definition.cjs} +18 -16
- package/{shared/definition7.js → badge/definition.js} +6 -6
- package/badge/index.cjs +4 -5
- package/badge/index.js +66 -3
- package/{shared/definition8.cjs → banner/definition.cjs} +26 -25
- package/{shared/definition8.js → banner/definition.js} +10 -11
- package/banner/index.cjs +29 -4
- package/banner/index.js +128 -2
- package/{shared/definition10.cjs → breadcrumb/definition.cjs} +11 -9
- package/{shared/definition10.js → breadcrumb/definition.js} +5 -5
- package/breadcrumb/index.cjs +12 -5
- package/breadcrumb/index.js +69 -3
- package/{shared/definition9.cjs → breadcrumb-item/definition.cjs} +18 -15
- package/{shared/definition9.js → breadcrumb-item/definition.js} +7 -7
- package/breadcrumb-item/index.cjs +5 -5
- package/breadcrumb-item/index.js +33 -3
- package/bundled/_has.cjs +1 -0
- package/bundled/_has.js +34 -0
- package/bundled/affix.cjs +13 -0
- package/bundled/affix.js +63 -0
- package/bundled/anchored.cjs +4 -0
- package/bundled/anchored.js +67 -0
- package/bundled/aria.cjs +1 -0
- package/bundled/aria.js +7 -0
- package/bundled/attribute-binding-behaviour.cjs +1 -0
- package/bundled/attribute-binding-behaviour.js +27 -0
- package/bundled/base-progress.cjs +1 -0
- package/bundled/base-progress.js +57 -0
- package/bundled/breadcrumb-item.cjs +1 -0
- package/bundled/breadcrumb-item.js +21 -0
- package/bundled/button.cjs +1 -0
- package/bundled/button.js +106 -0
- package/bundled/calendar-event.cjs +1 -0
- package/bundled/calendar-event.js +34 -0
- package/bundled/calendar-picker.template.cjs +148 -0
- package/bundled/calendar-picker.template.js +3371 -0
- package/bundled/char-count.cjs +13 -0
- package/bundled/char-count.js +54 -0
- package/bundled/children.cjs +1 -0
- package/bundled/children.js +38 -0
- package/bundled/class-names.cjs +1 -0
- package/bundled/class-names.js +9 -0
- package/bundled/definition.cjs +39 -0
- package/bundled/definition.js +122 -0
- package/bundled/definition10.cjs +19 -0
- package/bundled/definition10.js +73 -0
- package/bundled/definition11.cjs +10 -0
- package/bundled/definition11.js +44 -0
- package/bundled/definition12.cjs +1 -0
- package/bundled/definition12.js +20 -0
- package/bundled/definition13.cjs +73 -0
- package/bundled/definition13.js +359 -0
- package/bundled/definition14.cjs +5 -0
- package/bundled/definition14.js +29 -0
- package/bundled/definition15.cjs +30 -0
- package/bundled/definition15.js +80 -0
- package/bundled/definition16.cjs +19 -0
- package/bundled/definition16.js +103 -0
- package/bundled/definition17.cjs +13 -0
- package/bundled/definition17.js +137 -0
- package/bundled/definition18.cjs +12 -0
- package/bundled/definition18.js +94 -0
- package/bundled/definition19.cjs +67 -0
- package/bundled/definition19.js +666 -0
- package/bundled/definition2.cjs +20 -0
- package/bundled/definition2.js +180 -0
- package/bundled/definition20.cjs +20 -0
- package/bundled/definition20.js +106 -0
- package/bundled/definition21.cjs +5 -0
- package/bundled/definition21.js +19 -0
- package/bundled/definition22.cjs +24 -0
- package/bundled/definition22.js +151 -0
- package/bundled/definition3.cjs +29 -0
- package/bundled/definition3.js +195 -0
- package/bundled/definition4.cjs +6 -0
- package/bundled/definition4.js +42 -0
- package/bundled/definition5.cjs +1 -0
- package/bundled/definition5.js +345 -0
- package/bundled/definition6.cjs +31 -0
- package/bundled/definition6.js +265 -0
- package/bundled/definition7.cjs +30 -0
- package/bundled/definition7.js +288 -0
- package/bundled/definition8.cjs +19 -0
- package/bundled/definition8.js +145 -0
- package/bundled/definition9.cjs +14 -0
- package/bundled/definition9.js +1406 -0
- package/bundled/delegates-aria.cjs +1 -0
- package/bundled/delegates-aria.js +77 -0
- package/bundled/divider.cjs +1 -0
- package/bundled/divider.js +34 -0
- package/bundled/dom.cjs +1 -0
- package/bundled/dom.js +6 -0
- package/bundled/enums.cjs +1 -0
- package/bundled/enums.js +9 -0
- package/bundled/form-associated.cjs +1 -0
- package/bundled/form-associated.js +320 -0
- package/bundled/form-element.cjs +1 -0
- package/bundled/form-element.js +56 -0
- package/bundled/host-semantics.cjs +1 -0
- package/bundled/host-semantics.js +57 -0
- package/bundled/index.cjs +1 -0
- package/bundled/index.js +6 -0
- package/bundled/key-codes.cjs +1 -0
- package/bundled/key-codes.js +16 -0
- package/bundled/linkable.cjs +15 -0
- package/bundled/linkable.js +49 -0
- package/bundled/listbox.cjs +1 -0
- package/bundled/listbox.js +345 -0
- package/bundled/localized.cjs +1 -0
- package/bundled/localized.js +459 -0
- package/bundled/mixins.cjs +33 -0
- package/bundled/mixins.js +226 -0
- package/bundled/numbers.cjs +1 -0
- package/bundled/numbers.js +14 -0
- package/bundled/option.cjs +1 -0
- package/bundled/option.js +158 -0
- package/bundled/picker-field.template.cjs +62 -0
- package/bundled/picker-field.template.js +234 -0
- package/bundled/playbackRates.cjs +1 -0
- package/bundled/playbackRates.js +11 -0
- package/bundled/ref.cjs +1 -0
- package/bundled/ref.js +32 -0
- package/bundled/repeat.cjs +1 -0
- package/bundled/repeat.js +341 -0
- package/bundled/scrollIntoView.cjs +1 -0
- package/bundled/scrollIntoView.js +33 -0
- package/bundled/single-date-picker.cjs +1 -0
- package/bundled/single-date-picker.js +39 -0
- package/bundled/single-value-picker.cjs +1 -0
- package/bundled/single-value-picker.js +87 -0
- package/bundled/slider.template.cjs +41 -0
- package/bundled/slider.template.js +100 -0
- package/bundled/slotted.cjs +1 -0
- package/bundled/slotted.js +81 -0
- package/bundled/strings.cjs +1 -0
- package/bundled/strings.js +7 -0
- package/bundled/text-field.cjs +1 -0
- package/bundled/text-field.js +4 -0
- package/bundled/time-selection-picker.template.cjs +46 -0
- package/bundled/time-selection-picker.template.js +575 -0
- package/bundled/vivid-element.cjs +1 -0
- package/bundled/vivid-element.js +1761 -0
- package/bundled/when.cjs +1 -0
- package/bundled/when.js +11 -0
- package/bundled/with-contextual-help.cjs +1 -0
- package/bundled/with-contextual-help.js +22 -0
- package/bundled/with-error-text.cjs +1 -0
- package/bundled/with-error-text.js +39 -0
- package/bundled/with-success-text.cjs +1 -0
- package/bundled/with-success-text.js +16 -0
- package/button/definition.cjs +14 -0
- package/button/definition.js +4 -0
- package/button/index.cjs +1 -5
- package/button/index.js +2 -3
- package/{shared/definition13.cjs → calendar/definition.cjs} +27 -449
- package/{shared/definition13.js → calendar/definition.js} +7 -431
- package/calendar/index.cjs +53 -5
- package/calendar/index.js +431 -3
- package/{shared/definition12.cjs → calendar-event/definition.cjs} +12 -9
- package/{shared/definition12.js → calendar-event/definition.js} +6 -6
- package/calendar-event/index.cjs +9 -5
- package/calendar-event/index.js +43 -3
- package/card/definition.cjs +186 -0
- package/{shared/definition14.js → card/definition.js} +10 -11
- package/card/index.cjs +47 -5
- package/card/index.js +163 -3
- package/{shared/definition15.cjs → checkbox/definition.cjs} +35 -30
- package/{shared/definition15.js → checkbox/definition.js} +17 -14
- package/checkbox/index.cjs +1 -5
- package/checkbox/index.js +2 -3
- package/{shared/definition16.cjs → combobox/definition.cjs} +50 -52
- package/{shared/definition16.js → combobox/definition.js} +19 -23
- package/combobox/index.cjs +65 -5
- package/combobox/index.js +512 -3
- package/contextual-help/definition.cjs +62 -0
- package/contextual-help/definition.js +57 -0
- package/contextual-help/index.cjs +1 -0
- package/contextual-help/index.js +2 -0
- package/custom-elements.json +2735 -711
- package/{shared/definition17.cjs → data-grid/definition.cjs} +169 -196
- package/{shared/definition17.js → data-grid/definition.js} +71 -100
- package/data-grid/index.cjs +81 -5
- package/data-grid/index.js +1011 -3
- package/{shared/definition18.cjs → date-picker/definition.cjs} +20 -17
- package/{shared/definition18.js → date-picker/definition.js} +12 -11
- package/date-picker/index.cjs +1 -5
- package/date-picker/index.js +115 -3
- package/{shared/definition19.cjs → date-range-picker/definition.cjs} +26 -23
- package/{shared/definition19.js → date-range-picker/definition.js} +10 -9
- package/date-range-picker/index.cjs +1 -5
- package/date-range-picker/index.js +335 -3
- package/{shared/definition20.cjs → date-time-picker/definition.cjs} +27 -24
- package/{shared/definition20.js → date-time-picker/definition.js} +13 -12
- package/date-time-picker/index.cjs +8 -5
- package/date-time-picker/index.js +216 -3
- package/{shared/definition21.cjs → dial-pad/definition.cjs} +39 -40
- package/{shared/definition21.js → dial-pad/definition.js} +9 -12
- package/dial-pad/index.cjs +54 -5
- package/dial-pad/index.js +214 -3
- package/{shared/definition22.cjs → dialog/definition.cjs} +48 -47
- package/{shared/definition22.js → dialog/definition.js} +10 -11
- package/dialog/index.cjs +44 -5
- package/dialog/index.js +257 -3
- package/{shared/definition23.cjs → divider/definition.cjs} +10 -6
- package/{shared/definition23.js → divider/definition.js} +6 -5
- package/divider/index.cjs +1 -5
- package/divider/index.js +2 -3
- package/elevation/definition.cjs +11 -0
- package/elevation/definition.js +2 -0
- package/elevation/index.cjs +1 -5
- package/elevation/index.js +2 -3
- package/empty-state/definition.cjs +81 -0
- package/empty-state/definition.js +75 -0
- package/empty-state/index.cjs +14 -5
- package/empty-state/index.js +64 -3
- package/fab/definition.cjs +105 -0
- package/fab/definition.js +99 -0
- package/fab/index.cjs +20 -5
- package/fab/index.js +86 -3
- package/file-picker/definition.cjs +510 -0
- package/file-picker/definition.js +504 -0
- package/file-picker/index.cjs +58 -5
- package/file-picker/index.js +381 -3
- package/{shared/definition27.cjs → header/definition.cjs} +14 -11
- package/{shared/definition27.js → header/definition.js} +6 -5
- package/header/index.cjs +19 -5
- package/header/index.js +57 -3
- package/{shared/definition28.cjs → icon/definition.cjs} +25 -149
- package/{shared/definition28.js → icon/definition.js} +6 -132
- package/icon/index.cjs +1 -5
- package/icon/index.js +2 -3
- package/index.cjs +268 -264
- package/index.js +72 -71
- package/{shared/definition29.cjs → layout/definition.cjs} +13 -10
- package/{shared/definition29.js → layout/definition.js} +4 -3
- package/layout/index.cjs +3 -5
- package/layout/index.js +52 -3
- package/lib/accordion-item/accordion-item.d.ts +42 -2
- package/lib/action-group/action-group.d.ts +42 -2
- package/lib/alert/alert.d.ts +84 -4
- package/lib/audio-player/audio-player.d.ts +42 -2
- package/lib/avatar/avatar.d.ts +42 -2
- package/lib/badge/badge.d.ts +42 -2
- package/lib/banner/banner.d.ts +126 -6
- package/lib/breadcrumb/breadcrumb.d.ts +42 -2
- package/lib/breadcrumb-item/breadcrumb-item.d.ts +42 -2
- package/lib/button/button.d.ts +127 -6
- package/lib/calendar-event/calendar-event.d.ts +42 -2
- package/lib/card/card.d.ts +42 -2
- package/lib/checkbox/checkbox.d.ts +252 -13
- package/lib/combobox/combobox.d.ts +252 -12
- package/lib/components.d.ts +1 -0
- package/lib/contextual-help/contextual-help.d.ts +5 -0
- package/lib/contextual-help/contextual-help.template.d.ts +3 -0
- package/lib/contextual-help/definition.d.ts +1 -0
- package/lib/data-grid/data-grid-cell.d.ts +418 -3
- package/lib/data-grid/data-grid-row.d.ts +379 -1
- package/lib/date-picker/date-picker.d.ts +374 -54
- package/lib/date-range-picker/date-range-picker.d.ts +188 -28
- package/lib/date-time-picker/date-time-picker.d.ts +376 -56
- package/lib/dial-pad/dial-pad.d.ts +42 -2
- package/lib/dialog/dialog.d.ts +84 -4
- package/lib/divider/divider.d.ts +42 -2
- package/lib/fab/fab.d.ts +43 -2
- package/lib/file-picker/accept.d.ts +1 -0
- package/lib/file-picker/data-transfer.d.ts +1 -0
- package/lib/file-picker/file-picker.d.ts +259 -31
- package/lib/file-picker/locale.d.ts +1 -0
- package/lib/header/header.d.ts +42 -2
- package/lib/menu/menu.d.ts +84 -4
- package/lib/menu-item/menu-item.d.ts +84 -4
- package/lib/nav/nav.d.ts +42 -2
- package/lib/nav-disclosure/nav-disclosure.d.ts +84 -4
- package/lib/nav-item/nav-item.d.ts +84 -4
- package/lib/note/note.d.ts +42 -2
- package/lib/number-field/number-field.d.ts +840 -104
- package/lib/option/option.d.ts +85 -4
- package/lib/pagination/pagination.d.ts +42 -2
- package/lib/progress/progress.d.ts +42 -2
- package/lib/progress-ring/progress-ring.d.ts +42 -2
- package/lib/radio/radio.d.ts +126 -7
- package/lib/radio-group/radio-group.d.ts +42 -2
- package/lib/range-slider/range-slider.d.ts +126 -6
- package/lib/rich-text-editor/menubar/menubar.d.ts +42 -2
- package/lib/rich-text-editor/rich-text-editor.d.ts +42 -2
- package/lib/searchable-select/option-tag.d.ts +42 -2
- package/lib/searchable-select/searchable-select.d.ts +336 -16
- package/lib/select/select.d.ts +294 -14
- package/lib/selectable-box/selectable-box.d.ts +42 -3
- package/lib/simple-color-picker/definition.d.ts +4 -0
- package/lib/simple-color-picker/locale.d.ts +4 -0
- package/lib/simple-color-picker/simple-color-picker.d.ts +1600 -0
- package/lib/simple-color-picker/simple-color-picker.template.d.ts +3 -0
- package/lib/slider/slider.d.ts +126 -6
- package/lib/split-button/split-button.d.ts +128 -6
- package/lib/switch/switch.d.ts +84 -4
- package/lib/tab/tab.d.ts +126 -6
- package/lib/tab-panel/tab-panel.d.ts +42 -2
- package/lib/tag/tag.d.ts +126 -6
- package/lib/tag-group/tag-group.d.ts +42 -2
- package/lib/tag-name-map.d.ts +2 -1
- package/lib/text-area/text-area.d.ts +787 -91
- package/lib/text-field/text-field.d.ts +840 -104
- package/lib/time-picker/time-picker.d.ts +188 -28
- package/lib/toggletip/toggletip.d.ts +84 -4
- package/lib/tooltip/tooltip.d.ts +42 -2
- package/lib/tree-item/tree-item.d.ts +84 -4
- package/lib/tree-view/tree-view.d.ts +42 -2
- package/lib/video-player/video-player.d.ts +42 -2
- package/locales/de-DE.cjs +13 -1
- package/locales/de-DE.js +13 -1
- package/locales/en-GB.cjs +13 -1
- package/locales/en-GB.js +13 -1
- package/locales/en-US.cjs +13 -1
- package/locales/en-US.js +13 -1
- package/locales/ja-JP.cjs +13 -1
- package/locales/ja-JP.js +13 -1
- package/locales/zh-CN.cjs +13 -1
- package/locales/zh-CN.js +13 -1
- package/{shared/definition31.cjs → menu/definition.cjs} +46 -46
- package/{shared/definition31.js → menu/definition.js} +16 -18
- package/menu/index.cjs +1 -5
- package/menu/index.js +2 -3
- package/menu-item/definition.cjs +14 -0
- package/menu-item/definition.js +3 -0
- package/menu-item/index.cjs +1 -5
- package/menu-item/index.js +2 -3
- package/{shared/definition34.cjs → nav/definition.cjs} +7 -4
- package/{shared/definition34.js → nav/definition.js} +4 -3
- package/nav/index.cjs +5 -5
- package/nav/index.js +13 -3
- package/nav-disclosure/definition.cjs +122 -0
- package/nav-disclosure/definition.js +116 -0
- package/nav-disclosure/index.cjs +16 -5
- package/nav-disclosure/index.js +96 -3
- package/{shared/definition33.cjs → nav-item/definition.cjs} +19 -16
- package/{shared/definition33.js → nav-item/definition.js} +9 -8
- package/nav-item/index.cjs +2 -5
- package/nav-item/index.js +59 -3
- package/{shared/definition35.cjs → note/definition.cjs} +15 -13
- package/{shared/definition35.js → note/definition.js} +6 -6
- package/note/index.cjs +9 -5
- package/note/index.js +44 -3
- package/number-field/definition.cjs +438 -0
- package/{shared/definition36.js → number-field/definition.js} +31 -27
- package/number-field/index.cjs +60 -5
- package/number-field/index.js +369 -3
- package/option/definition.cjs +84 -0
- package/option/definition.js +78 -0
- package/option/index.cjs +1 -5
- package/option/index.js +2 -3
- package/package.json +15 -4
- package/{shared/definition38.cjs → pagination/definition.cjs} +31 -33
- package/{shared/definition38.js → pagination/definition.js} +7 -11
- package/pagination/index.cjs +43 -5
- package/pagination/index.js +194 -3
- package/popup/definition.cjs +13 -0
- package/popup/definition.js +4 -0
- package/popup/index.cjs +1 -5
- package/popup/index.js +2 -3
- package/{shared/definition40.cjs → progress/definition.cjs} +17 -15
- package/{shared/definition40.js → progress/definition.js} +6 -6
- package/progress/index.cjs +17 -5
- package/progress/index.js +69 -3
- package/{shared/definition39.cjs → progress-ring/definition.cjs} +17 -15
- package/{shared/definition39.js → progress-ring/definition.js} +7 -7
- package/progress-ring/index.cjs +1 -5
- package/progress-ring/index.js +2 -3
- package/{shared/definition42.cjs → radio/definition.cjs} +20 -23
- package/{shared/definition42.js → radio/definition.js} +8 -13
- package/radio/index.cjs +1 -5
- package/radio/index.js +2 -3
- package/{shared/definition41.cjs → radio-group/definition.cjs} +31 -30
- package/{shared/definition41.js → radio-group/definition.js} +8 -9
- package/radio-group/index.cjs +23 -5
- package/radio-group/index.js +255 -3
- package/{shared/definition43.cjs → range-slider/definition.cjs} +62 -61
- package/{shared/definition43.js → range-slider/definition.js} +13 -14
- package/range-slider/index.cjs +68 -5
- package/range-slider/index.js +456 -3
- package/rich-text-editor/definition.cjs +1206 -0
- package/rich-text-editor/definition.js +1200 -0
- package/rich-text-editor/index.cjs +133 -4
- package/rich-text-editor/index.js +10386 -2
- package/{shared/definition45.cjs → searchable-select/definition.cjs} +119 -116
- package/{shared/definition45.js → searchable-select/definition.js} +25 -24
- package/searchable-select/index.cjs +164 -5
- package/searchable-select/index.js +1025 -3
- package/{shared/definition46.cjs → select/definition.cjs} +80 -83
- package/{shared/definition46.js → select/definition.js} +19 -24
- package/select/index.cjs +1 -5
- package/select/index.js +2 -3
- package/{shared/definition47.cjs → selectable-box/definition.cjs} +26 -32
- package/{shared/definition47.js → selectable-box/definition.js} +9 -17
- package/selectable-box/index.cjs +28 -5
- package/selectable-box/index.js +136 -3
- package/shared/aria/aria-mixin.d.ts +43 -3
- package/shared/aria/attribute-removal.d.ts +3 -0
- package/shared/aria/delegate-aria-behavior.d.ts +0 -3
- package/shared/aria/delegates-aria.d.ts +42 -2
- package/shared/aria/host-semantics.d.ts +42 -2
- package/shared/color-picker/index.d.ts +2 -0
- package/shared/color-picker/types.d.ts +4 -0
- package/shared/color-picker/utils.d.ts +3 -0
- package/shared/feedback/feedback-message.d.ts +42 -2
- package/shared/feedback/mixins.d.ts +84 -4
- package/shared/foundation/button/button.d.ts +84 -4
- package/shared/foundation/form-associated/form-associated.d.ts +84 -4
- package/shared/foundation/vivid-element/vivid-element.d.ts +43 -3
- package/shared/localization/Locale.d.ts +2 -0
- package/shared/patterns/affix.d.ts +84 -4
- package/shared/patterns/anchored.d.ts +84 -4
- package/shared/patterns/char-count/char-count.d.ts +42 -2
- package/shared/patterns/form-elements/form-element.d.ts +84 -4
- package/shared/patterns/form-elements/with-contextual-help.d.ts +1238 -0
- package/shared/patterns/form-elements/with-error-text.d.ts +126 -6
- package/shared/patterns/form-elements/with-success-text.d.ts +42 -2
- package/shared/patterns/linkable.d.ts +42 -2
- package/shared/patterns/localized.d.ts +42 -2
- package/shared/patterns/trapped-focus.d.ts +42 -2
- package/shared/picker-field/mixins/calendar-picker.d.ts +94 -14
- package/shared/picker-field/mixins/calendar-picker.template.d.ts +94 -14
- package/shared/picker-field/mixins/inline-time-picker/inline-time-picker.d.ts +42 -2
- package/shared/picker-field/mixins/min-max-calendar-picker.d.ts +188 -28
- package/shared/picker-field/mixins/single-date-picker.d.ts +280 -40
- package/shared/picker-field/mixins/single-value-picker.d.ts +92 -12
- package/shared/picker-field/mixins/time-selection-picker.d.ts +188 -28
- package/shared/picker-field/mixins/time-selection-picker.template.d.ts +188 -28
- package/shared/picker-field/picker-field.d.ts +252 -12
- package/{shared/definition48.cjs → side-drawer/definition.cjs} +16 -14
- package/{shared/definition48.js → side-drawer/definition.js} +5 -5
- package/side-drawer/index.cjs +17 -3
- package/side-drawer/index.js +100 -2
- package/simple-color-picker/definition.cjs +398 -0
- package/simple-color-picker/definition.js +392 -0
- package/simple-color-picker/index.cjs +31 -0
- package/simple-color-picker/index.js +250 -0
- package/{shared/definition49.cjs → slider/definition.cjs} +46 -53
- package/{shared/definition49.js → slider/definition.js} +11 -20
- package/slider/index.cjs +1 -5
- package/slider/index.js +2 -3
- package/split-button/definition.cjs +176 -0
- package/split-button/definition.js +170 -0
- package/split-button/index.cjs +26 -5
- package/split-button/index.js +149 -3
- 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/{shared/definition51.cjs → switch/definition.cjs} +20 -19
- package/{shared/definition51.js → switch/definition.js} +8 -9
- package/switch/index.cjs +16 -5
- package/switch/index.js +102 -3
- package/tab/definition.cjs +127 -0
- package/tab/definition.js +121 -0
- package/tab/index.cjs +1 -5
- package/tab/index.js +2 -3
- package/{shared/definition52.cjs → tab-panel/definition.cjs} +7 -4
- package/{shared/definition52.js → tab-panel/definition.js} +4 -3
- package/tab-panel/index.cjs +1 -5
- package/tab-panel/index.js +2 -3
- package/{shared/definition54.cjs → tabs/definition.cjs} +47 -40
- package/{shared/definition54.js → tabs/definition.js} +19 -14
- package/tabs/index.cjs +31 -5
- package/tabs/index.js +321 -3
- package/tag/definition.cjs +156 -0
- package/tag/definition.js +150 -0
- package/tag/index.cjs +19 -5
- package/tag/index.js +118 -3
- package/{shared/definition55.cjs → tag-group/definition.cjs} +9 -6
- package/{shared/definition55.js → tag-group/definition.js} +5 -4
- package/tag-group/index.cjs +8 -5
- package/tag-group/index.js +26 -3
- package/text-area/definition.cjs +355 -0
- package/text-area/definition.js +349 -0
- package/text-area/index.cjs +41 -5
- package/text-area/index.js +293 -3
- package/{shared/definition58.cjs → text-field/definition.cjs} +70 -52
- package/{shared/definition58.js → text-field/definition.js} +40 -24
- package/text-field/index.cjs +1 -5
- package/text-field/index.js +2 -3
- package/time-picker/definition.cjs +43 -0
- package/{shared/definition59.js → time-picker/definition.js} +9 -8
- package/time-picker/index.cjs +1 -5
- package/time-picker/index.js +29 -3
- package/{shared/definition60.cjs → toggletip/definition.cjs} +20 -18
- package/{shared/definition60.js → toggletip/definition.js} +8 -8
- package/toggletip/index.cjs +1 -5
- package/toggletip/index.js +2 -3
- package/{shared/definition61.cjs → tooltip/definition.cjs} +16 -13
- package/{shared/definition61.js → tooltip/definition.js} +7 -6
- package/tooltip/index.cjs +1 -5
- package/tooltip/index.js +2 -3
- package/tree-item/definition.cjs +13 -0
- package/tree-item/definition.js +3 -0
- package/tree-item/index.cjs +1 -5
- package/tree-item/index.js +2 -3
- package/{shared/definition63.cjs → tree-view/definition.cjs} +42 -44
- package/{shared/definition63.js → tree-view/definition.js} +7 -11
- package/tree-view/index.cjs +13 -5
- package/tree-view/index.js +171 -3
- package/{shared → unbundled}/affix.cjs +10 -11
- package/{shared → unbundled}/affix.js +2 -3
- package/{shared → unbundled}/anchored.cjs +7 -8
- package/{shared → unbundled}/anchored.js +1 -2
- package/{shared → unbundled}/attribute-binding-behaviour.cjs +3 -3
- package/{shared → unbundled}/attribute-binding-behaviour.js +1 -1
- package/{shared → unbundled}/base-progress.cjs +6 -5
- package/{shared → unbundled}/base-progress.js +2 -1
- package/{shared → unbundled}/breadcrumb-item.cjs +3 -2
- package/{shared → unbundled}/breadcrumb-item.js +2 -1
- package/{shared → unbundled}/button.cjs +10 -9
- package/{shared → unbundled}/button.js +2 -1
- package/{shared → unbundled}/calendar-event.cjs +8 -7
- package/{shared → unbundled}/calendar-event.js +2 -1
- package/unbundled/calendar-picker.template.cjs +917 -0
- package/unbundled/calendar-picker.template.js +906 -0
- package/{shared → unbundled}/char-count.cjs +6 -7
- package/{shared → unbundled}/char-count.js +2 -3
- package/unbundled/definition.cjs +225 -0
- package/unbundled/definition.js +220 -0
- package/{shared/definition30.cjs → unbundled/definition2.cjs} +49 -46
- package/{shared/definition30.js → unbundled/definition2.js} +14 -11
- package/unbundled/definition3.cjs +207 -0
- package/{shared/definition62.js → unbundled/definition3.js} +6 -10
- package/unbundled/definition4.cjs +298 -0
- package/unbundled/definition4.js +293 -0
- package/{shared/definition65.cjs → unbundled/definition5.cjs} +7 -6
- package/{shared/definition65.js → unbundled/definition5.js} +3 -2
- package/{shared → unbundled}/delegates-aria.cjs +8 -28
- package/{shared → unbundled}/delegates-aria.js +6 -26
- package/{shared → unbundled}/divider.cjs +13 -7
- package/{shared → unbundled}/divider.js +11 -5
- package/{shared → unbundled}/form-associated.cjs +13 -13
- package/{shared → unbundled}/form-associated.js +2 -2
- package/{shared → unbundled}/form-element.cjs +3 -3
- package/{shared → unbundled}/form-element.js +1 -1
- package/{shared → unbundled}/host-semantics.cjs +2 -1
- package/{shared → unbundled}/host-semantics.js +2 -1
- package/unbundled/key-codes.cjs +10 -0
- package/unbundled/key-codes.js +7 -0
- package/{shared → unbundled}/linkable.cjs +11 -12
- package/{shared → unbundled}/linkable.js +1 -2
- package/{shared → unbundled}/listbox.cjs +22 -38
- package/{shared → unbundled}/listbox.js +4 -20
- package/{shared → unbundled}/localized.cjs +2 -2
- package/{shared → unbundled}/localized.js +1 -1
- package/{shared → unbundled}/mixins.cjs +27 -83
- package/{shared → unbundled}/mixins.js +6 -62
- package/{shared → unbundled}/option.cjs +42 -17
- package/{shared → unbundled}/option.js +29 -4
- package/{shared → unbundled}/picker-field.template.cjs +21 -21
- package/{shared → unbundled}/picker-field.template.js +7 -7
- package/{shared → unbundled}/slider.template.cjs +15 -19
- package/{shared → unbundled}/slider.template.js +3 -7
- package/unbundled/text-field.cjs +5 -0
- package/unbundled/text-field.js +3 -0
- package/{shared → unbundled}/time-selection-picker.template.cjs +28 -30
- package/{shared → unbundled}/time-selection-picker.template.js +4 -6
- package/unbundled/vivid-element.cjs +283 -0
- package/unbundled/vivid-element.js +274 -0
- package/unbundled/with-contextual-help.cjs +29 -0
- package/unbundled/with-contextual-help.js +27 -0
- package/{shared → unbundled}/with-error-text.cjs +2 -2
- package/{shared → unbundled}/with-error-text.js +1 -1
- package/{shared → unbundled}/with-success-text.cjs +2 -2
- package/{shared → unbundled}/with-success-text.js +1 -1
- package/video-player/definition.cjs +536 -0
- package/video-player/definition.js +530 -0
- package/video-player/index.cjs +536 -3
- package/video-player/index.js +35912 -2
- package/{shared/definition66.cjs → visually-hidden/definition.cjs} +6 -3
- package/{shared/definition66.js → visually-hidden/definition.js} +3 -2
- package/visually-hidden/index.cjs +1 -5
- package/visually-hidden/index.js +2 -3
- package/vivid.api.json +716 -914
- package/shared/_has.cjs +0 -58
- package/shared/_has.js +0 -54
- package/shared/aria.cjs +0 -11
- package/shared/aria.js +0 -9
- package/shared/calendar-picker.template.cjs +0 -6377
- package/shared/calendar-picker.template.js +0 -6366
- package/shared/children.cjs +0 -61
- package/shared/children.js +0 -59
- package/shared/class-names.cjs +0 -17
- package/shared/class-names.js +0 -15
- package/shared/definition.cjs +0 -145
- package/shared/definition.js +0 -141
- package/shared/definition11.cjs +0 -220
- package/shared/definition11.js +0 -215
- package/shared/definition14.cjs +0 -185
- package/shared/definition24.cjs +0 -80
- package/shared/definition24.js +0 -76
- package/shared/definition25.cjs +0 -90
- package/shared/definition25.js +0 -86
- package/shared/definition26.cjs +0 -2514
- package/shared/definition26.js +0 -2510
- package/shared/definition32.cjs +0 -120
- package/shared/definition32.js +0 -116
- package/shared/definition36.cjs +0 -432
- package/shared/definition37.cjs +0 -71
- package/shared/definition37.js +0 -68
- package/shared/definition44.cjs +0 -14666
- package/shared/definition44.js +0 -14662
- package/shared/definition50.cjs +0 -148
- package/shared/definition50.js +0 -144
- package/shared/definition53.cjs +0 -124
- package/shared/definition53.js +0 -120
- package/shared/definition56.cjs +0 -154
- package/shared/definition56.js +0 -150
- package/shared/definition57.cjs +0 -335
- package/shared/definition57.js +0 -331
- package/shared/definition59.cjs +0 -39
- package/shared/definition62.cjs +0 -211
- package/shared/definition64.cjs +0 -69579
- package/shared/definition64.js +0 -69575
- package/shared/definition67.cjs +0 -2227
- package/shared/definition67.js +0 -2222
- package/shared/dom.cjs +0 -10
- package/shared/dom.js +0 -8
- package/shared/key-codes.cjs +0 -32
- package/shared/key-codes.js +0 -18
- package/shared/numbers.cjs +0 -38
- package/shared/numbers.js +0 -34
- package/shared/ref.cjs +0 -43
- package/shared/ref.js +0 -41
- package/shared/repeat.cjs +0 -767
- package/shared/repeat.js +0 -764
- package/shared/slotted.cjs +0 -123
- package/shared/slotted.js +0 -119
- package/shared/strings.cjs +0 -11
- package/shared/strings.js +0 -9
- package/shared/text-field.cjs +0 -5
- package/shared/text-field.js +0 -3
- package/shared/vivid-element.cjs +0 -2771
- package/shared/vivid-element.js +0 -2748
- package/shared/when.cjs +0 -31
- package/shared/when.js +0 -29
- /package/{shared → unbundled}/enums.cjs +0 -0
- /package/{shared → unbundled}/enums.js +0 -0
- /package/{shared → unbundled}/index.cjs +0 -0
- /package/{shared → unbundled}/index.js +0 -0
- /package/{shared → unbundled}/playbackRates.cjs +0 -0
- /package/{shared → unbundled}/playbackRates.js +0 -0
- /package/{shared → unbundled}/scrollIntoView.cjs +0 -0
- /package/{shared → unbundled}/scrollIntoView.js +0 -0
- /package/{shared → unbundled}/single-date-picker.cjs +0 -0
- /package/{shared → unbundled}/single-date-picker.js +0 -0
- /package/{shared → unbundled}/single-value-picker.cjs +0 -0
- /package/{shared → unbundled}/single-value-picker.js +0 -0
|
@@ -0,0 +1,575 @@
|
|
|
1
|
+
import { h as S, V as N, o as h, d as H, a as f, n as C, O as R, b as q, D as V, v as j } from "./vivid-element.js";
|
|
2
|
+
import { i as B, P as z } from "./picker-field.template.js";
|
|
3
|
+
import { S as U } from "./single-value-picker.js";
|
|
4
|
+
import { s as W } from "./scrollIntoView.js";
|
|
5
|
+
import { w as O } from "./when.js";
|
|
6
|
+
import { r as K } from "./repeat.js";
|
|
7
|
+
import { c as G } from "./class-names.js";
|
|
8
|
+
import { L as J } from "./localized.js";
|
|
9
|
+
import { r as Q } from "./ref.js";
|
|
10
|
+
const w = (e) => {
|
|
11
|
+
const t = e.split(":");
|
|
12
|
+
if (t.length !== 3)
|
|
13
|
+
return !1;
|
|
14
|
+
const [o, r, i] = t;
|
|
15
|
+
if (o.length !== 2 || r.length !== 2 || i.length !== 2)
|
|
16
|
+
return !1;
|
|
17
|
+
const n = parseInt(o, 10), s = parseInt(r, 10), a = parseInt(i, 10);
|
|
18
|
+
return !(isNaN(n) || isNaN(s) || isNaN(a) || n < 0 || n > 23 || s < 0 || s > 59 || a < 0 || a > 59);
|
|
19
|
+
}, P = (e) => Number.parseInt(e, 10), d = (e) => e.toString().padStart(2, "0"), l = (e) => {
|
|
20
|
+
const [t, o, r] = e.split(":"), i = P(t), n = P(o), s = P(r);
|
|
21
|
+
return {
|
|
22
|
+
hourStr: t,
|
|
23
|
+
hours: i,
|
|
24
|
+
minuteStr: o,
|
|
25
|
+
minutes: n,
|
|
26
|
+
secondStr: r,
|
|
27
|
+
seconds: s,
|
|
28
|
+
meridiem: i < 12 ? "AM" : "PM"
|
|
29
|
+
};
|
|
30
|
+
}, xe = (e, t) => e > t ? 1 : e < t ? -1 : 0, M = (e) => e % 12 || 12, X = (e, t) => e === "AM" && t < 12 || e === "PM" && t >= 12, Y = (e, t, o) => {
|
|
31
|
+
const r = [], i = e ? l(e).hours : 0, n = t ? l(t).hours : 23;
|
|
32
|
+
for (let s = i; s <= n; s++)
|
|
33
|
+
o && !X(o, s) || r.push({
|
|
34
|
+
value: d(s),
|
|
35
|
+
label: d(o ? M(s) : s)
|
|
36
|
+
});
|
|
37
|
+
return r;
|
|
38
|
+
}, Z = (e, t, o, r) => {
|
|
39
|
+
const i = [];
|
|
40
|
+
let n = 0, s = 59;
|
|
41
|
+
if (o) {
|
|
42
|
+
const { hourStr: a, minutes: c } = l(o);
|
|
43
|
+
t && l(t).hourStr === a && (n = c);
|
|
44
|
+
}
|
|
45
|
+
if (r) {
|
|
46
|
+
const { hourStr: a, minutes: c } = l(r);
|
|
47
|
+
t && l(t).hourStr === a && (s = c);
|
|
48
|
+
}
|
|
49
|
+
for (let a = n; a <= s; a += Math.max(1, e ?? 1)) {
|
|
50
|
+
const c = d(a);
|
|
51
|
+
i.push({
|
|
52
|
+
value: c,
|
|
53
|
+
label: c
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
return i;
|
|
57
|
+
}, ee = (e, t, o, r) => {
|
|
58
|
+
const i = [];
|
|
59
|
+
let n = 0, s = 59;
|
|
60
|
+
if (o) {
|
|
61
|
+
const a = l(o);
|
|
62
|
+
t && (l(t).hourStr === a.hourStr && l(t).minuteStr) === a.minuteStr && (n = a.seconds);
|
|
63
|
+
}
|
|
64
|
+
if (r) {
|
|
65
|
+
const a = l(r);
|
|
66
|
+
t && (l(t).hourStr === a.hourStr && l(t).minuteStr) === a.minuteStr && (s = a.seconds);
|
|
67
|
+
}
|
|
68
|
+
for (let a = n; a <= s; a += Math.max(1, e)) {
|
|
69
|
+
const c = d(a);
|
|
70
|
+
i.push({
|
|
71
|
+
value: c,
|
|
72
|
+
label: c
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
return i;
|
|
76
|
+
}, te = (e, t) => {
|
|
77
|
+
const o = [];
|
|
78
|
+
return (e ? l(e).meridiem === "PM" : !1) || o.push({
|
|
79
|
+
value: "AM",
|
|
80
|
+
label: "AM"
|
|
81
|
+
}), (t ? l(t).meridiem === "AM" : !1) || o.push({
|
|
82
|
+
value: "PM",
|
|
83
|
+
label: "PM"
|
|
84
|
+
}), o;
|
|
85
|
+
}, x = {
|
|
86
|
+
id: "hours",
|
|
87
|
+
getLabel: (e) => e.locale.timePicker.hoursLabel,
|
|
88
|
+
getOptions: (e) => Y(
|
|
89
|
+
e.min,
|
|
90
|
+
e.max,
|
|
91
|
+
e.clock === "12h" ? k.getSelectedOptionValue(e) ?? k.getOptions(e)[0].value : void 0
|
|
92
|
+
),
|
|
93
|
+
getSelectedOptionValue: (e) => e.value ? l(e.value).hourStr : void 0,
|
|
94
|
+
updatedValue: (e, t) => {
|
|
95
|
+
if (e.value) {
|
|
96
|
+
const { minuteStr: o, secondStr: r } = l(e.value);
|
|
97
|
+
return `${t}:${o}:${r}`;
|
|
98
|
+
} else
|
|
99
|
+
return `${t}:00:00`;
|
|
100
|
+
}
|
|
101
|
+
}, y = {
|
|
102
|
+
id: "minutes",
|
|
103
|
+
getLabel: (e) => e.locale.timePicker.minutesLabel,
|
|
104
|
+
getOptions: (e) => Z(e.minutesStep, e.value, e.min, e.max),
|
|
105
|
+
getSelectedOptionValue: (e) => e.value ? l(e.value).minuteStr : void 0,
|
|
106
|
+
updatedValue: (e, t) => {
|
|
107
|
+
if (e.value) {
|
|
108
|
+
const { hourStr: o, secondStr: r } = l(e.value);
|
|
109
|
+
return `${o}:${t}:${r}`;
|
|
110
|
+
} else
|
|
111
|
+
return `00:${t}:00`;
|
|
112
|
+
}
|
|
113
|
+
}, $ = {
|
|
114
|
+
id: "seconds",
|
|
115
|
+
getLabel: (e) => e.locale.timePicker.secondsLabel,
|
|
116
|
+
getOptions: (e) => ee(e.secondsStep, e.value, e.min, e.max),
|
|
117
|
+
getSelectedOptionValue: (e) => e.value ? l(e.value).secondStr : void 0,
|
|
118
|
+
updatedValue: (e, t) => {
|
|
119
|
+
if (e.value) {
|
|
120
|
+
const { hourStr: o, minuteStr: r } = l(e.value);
|
|
121
|
+
return `${o}:${r}:${t}`;
|
|
122
|
+
} else
|
|
123
|
+
return `00:00:${t}`;
|
|
124
|
+
}
|
|
125
|
+
}, k = {
|
|
126
|
+
id: "meridies",
|
|
127
|
+
getLabel: (e) => e.locale.timePicker.meridiesLabel,
|
|
128
|
+
getOptions: (e) => te(e.min, e.max),
|
|
129
|
+
getSelectedOptionValue: (e) => e.value ? l(e.value).meridiem : void 0,
|
|
130
|
+
updatedValue: (e, t) => {
|
|
131
|
+
if (e.value) {
|
|
132
|
+
const { hours: o, minuteStr: r, secondStr: i } = l(e.value);
|
|
133
|
+
let n = o;
|
|
134
|
+
return t === "AM" && o >= 12 ? n -= 12 : t === "PM" && o < 12 && (n += 12), `${d(n)}:${r}:${i}`;
|
|
135
|
+
} else
|
|
136
|
+
return t === "AM" ? "00:00:00" : "12:00:00";
|
|
137
|
+
}
|
|
138
|
+
}, E = (e) => e.secondsStep !== void 0, I = (e) => e.clock === "12h", oe = (e, t, o) => {
|
|
139
|
+
L(e, t.updatedValue(e, o)), m(e, t.id, o, "start");
|
|
140
|
+
const n = e.shadowRoot.querySelector(`#${t.id}`)?.closest(".picker-wrapper")?.nextElementSibling?.querySelector(
|
|
141
|
+
".picker"
|
|
142
|
+
);
|
|
143
|
+
n ? n.focus() : e.$emit("last-column-selected", void 0, {
|
|
144
|
+
bubbles: !1
|
|
145
|
+
});
|
|
146
|
+
}, re = (e, t, o) => {
|
|
147
|
+
const r = t.getOptions(e), i = t.getSelectedOptionValue(e), n = {
|
|
148
|
+
ArrowUp: -1,
|
|
149
|
+
ArrowDown: 1
|
|
150
|
+
}[o.key];
|
|
151
|
+
if (n) {
|
|
152
|
+
o.preventDefault();
|
|
153
|
+
const s = r.findIndex((_) => _.value === i), c = ((s === -1 ? 0 : s + n) + r.length) % r.length, u = r[c].value;
|
|
154
|
+
L(e, t.updatedValue(e, u)), m(e, t.id, u, "nearest"), e._clearFocusedClasses();
|
|
155
|
+
}
|
|
156
|
+
return !0;
|
|
157
|
+
}, m = (e, t, o, r) => {
|
|
158
|
+
const i = e.shadowRoot.querySelector(
|
|
159
|
+
`#${t}-${o}`
|
|
160
|
+
);
|
|
161
|
+
i && W(i, i.parentElement, r);
|
|
162
|
+
}, ie = (e, t) => {
|
|
163
|
+
if (t.key === "Tab") {
|
|
164
|
+
const o = e.shadowRoot.querySelectorAll(".picker"), r = t.shiftKey ? o[0] : o[o.length - 1];
|
|
165
|
+
e.shadowRoot.activeElement !== r && B(t), e._applyFocusedClass();
|
|
166
|
+
}
|
|
167
|
+
return !0;
|
|
168
|
+
}, L = (e, t) => {
|
|
169
|
+
e.$emit("change", t, { bubbles: !1, composed: !1 });
|
|
170
|
+
}, b = (e) => S`<div class="picker-wrapper">
|
|
171
|
+
<ul
|
|
172
|
+
id="${e.id}"
|
|
173
|
+
class="picker"
|
|
174
|
+
role="listbox"
|
|
175
|
+
tabindex="0"
|
|
176
|
+
aria-label="${e.getLabel}"
|
|
177
|
+
aria-activedescendant="${(t) => e.getSelectedOptionValue(t) ? `${e.id}-${e.getSelectedOptionValue(t)}` : void 0}"
|
|
178
|
+
@keydown="${(t, o) => re(t, e, o.event)}"
|
|
179
|
+
>
|
|
180
|
+
${K(
|
|
181
|
+
(t) => e.getOptions(t),
|
|
182
|
+
S`<li
|
|
183
|
+
id="${(t) => `${e.id}-${t.value}`}"
|
|
184
|
+
class="${(t, o) => G("option", [
|
|
185
|
+
"selected",
|
|
186
|
+
e.getSelectedOptionValue(o.parent) === t.value
|
|
187
|
+
])}"
|
|
188
|
+
aria-selected="${(t, o) => e.getSelectedOptionValue(o.parent) === t.value}"
|
|
189
|
+
role="option"
|
|
190
|
+
@click="${(t, o) => oe(o.parent, e, t.value)}"
|
|
191
|
+
>
|
|
192
|
+
${(t) => t.label}
|
|
193
|
+
</li>`
|
|
194
|
+
)}
|
|
195
|
+
</ul>
|
|
196
|
+
</div>`, ne = () => S`<div
|
|
197
|
+
class="time-pickers"
|
|
198
|
+
@keydown="${(e, { event: t }) => ie(e, t)}"
|
|
199
|
+
@focusout="${(e) => e._onFocusOut()}"
|
|
200
|
+
@pointerdown="${(e) => e._onPointerDown()}"
|
|
201
|
+
>
|
|
202
|
+
${b(x)} ${b(y)}
|
|
203
|
+
${O(E, b($))}
|
|
204
|
+
${O(I, b(k))}
|
|
205
|
+
</div>`;
|
|
206
|
+
var se = Object.defineProperty, v = (e, t, o, r) => {
|
|
207
|
+
for (var i = void 0, n = e.length - 1, s; n >= 0; n--)
|
|
208
|
+
(s = e[n]) && (i = s(t, o, i) || i);
|
|
209
|
+
return i && se(t, o, i), i;
|
|
210
|
+
};
|
|
211
|
+
class p extends J(N) {
|
|
212
|
+
constructor() {
|
|
213
|
+
super(...arguments), this.minutesStep = 1, this.clock = "24h", this.focusedPickerClass = "focused", this._onFocusOut = () => {
|
|
214
|
+
this._clearFocusedClasses();
|
|
215
|
+
}, this._onPointerDown = () => {
|
|
216
|
+
this._clearFocusedClasses();
|
|
217
|
+
};
|
|
218
|
+
}
|
|
219
|
+
valueChanged(t, o) {
|
|
220
|
+
o !== void 0 && !w(o) && (this.value = void 0);
|
|
221
|
+
}
|
|
222
|
+
scrollSelectedOptionsToTop() {
|
|
223
|
+
x.getSelectedOptionValue(this) && m(
|
|
224
|
+
this,
|
|
225
|
+
"hours",
|
|
226
|
+
x.getSelectedOptionValue(this),
|
|
227
|
+
"start"
|
|
228
|
+
), y.getSelectedOptionValue(this) && m(
|
|
229
|
+
this,
|
|
230
|
+
"minutes",
|
|
231
|
+
y.getSelectedOptionValue(this),
|
|
232
|
+
"start"
|
|
233
|
+
), E(this) && $.getSelectedOptionValue(this) && m(
|
|
234
|
+
this,
|
|
235
|
+
"seconds",
|
|
236
|
+
$.getSelectedOptionValue(this),
|
|
237
|
+
"start"
|
|
238
|
+
), I(this) && k.getSelectedOptionValue(this) && m(
|
|
239
|
+
this,
|
|
240
|
+
"meridies",
|
|
241
|
+
k.getSelectedOptionValue(this),
|
|
242
|
+
"start"
|
|
243
|
+
);
|
|
244
|
+
}
|
|
245
|
+
focus(t) {
|
|
246
|
+
this.shadowRoot.querySelector(
|
|
247
|
+
".picker"
|
|
248
|
+
).focus(t), this._applyFocusedClass();
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* @internal
|
|
252
|
+
* Apply 'focused' class to the wrapper element of an active picker
|
|
253
|
+
*/
|
|
254
|
+
_applyFocusedClass() {
|
|
255
|
+
const t = this.shadowRoot.querySelectorAll(".picker");
|
|
256
|
+
requestAnimationFrame(() => {
|
|
257
|
+
const o = this.shadowRoot.activeElement;
|
|
258
|
+
t.forEach((r) => {
|
|
259
|
+
r === o ? r.parentElement?.classList.add(this.focusedPickerClass) : r.parentElement?.classList.remove(this.focusedPickerClass);
|
|
260
|
+
});
|
|
261
|
+
});
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* @internal
|
|
265
|
+
* Clear 'focused' classes from all pickers wrappers
|
|
266
|
+
*/
|
|
267
|
+
_clearFocusedClasses() {
|
|
268
|
+
this.shadowRoot.querySelectorAll(".picker").forEach((o) => {
|
|
269
|
+
o.parentElement?.classList.remove(this.focusedPickerClass);
|
|
270
|
+
});
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
v([
|
|
274
|
+
h
|
|
275
|
+
], p.prototype, "value");
|
|
276
|
+
v([
|
|
277
|
+
h
|
|
278
|
+
], p.prototype, "minutesStep");
|
|
279
|
+
v([
|
|
280
|
+
h
|
|
281
|
+
], p.prototype, "secondsStep");
|
|
282
|
+
v([
|
|
283
|
+
h
|
|
284
|
+
], p.prototype, "clock");
|
|
285
|
+
v([
|
|
286
|
+
h
|
|
287
|
+
], p.prototype, "min");
|
|
288
|
+
v([
|
|
289
|
+
h
|
|
290
|
+
], p.prototype, "max");
|
|
291
|
+
const ae = ':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))}', ye = H(
|
|
292
|
+
"inline-time-picker",
|
|
293
|
+
p,
|
|
294
|
+
ne,
|
|
295
|
+
[],
|
|
296
|
+
{
|
|
297
|
+
styles: ae,
|
|
298
|
+
shadowOptions: {
|
|
299
|
+
delegatesFocus: !0
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
), le = (e, t, o) => {
|
|
303
|
+
const r = l(e);
|
|
304
|
+
let n = `${d(
|
|
305
|
+
o ? M(r.hours) : r.hours
|
|
306
|
+
)}:${r.minuteStr}`;
|
|
307
|
+
return t && (n += `:${r.secondStr}`), o && (n += ` ${r.meridiem}`), n;
|
|
308
|
+
}, T = (e) => e >= "0" && e <= "9", ce = (e, t) => {
|
|
309
|
+
const o = e.toLowerCase(), r = [];
|
|
310
|
+
let i;
|
|
311
|
+
for (let c = 0; c < o.length; c++) {
|
|
312
|
+
const u = o[c];
|
|
313
|
+
if (u === "a" && o[c + 1] === "m" && (c++, i = "AM"), u === "p" && o[c + 1] === "m" && (c++, i = "PM"), T(u)) {
|
|
314
|
+
let _ = u;
|
|
315
|
+
for (; T(o[c + 1]); )
|
|
316
|
+
c++, _ += o[c];
|
|
317
|
+
r.push(Number.parseInt(_, 10));
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
if (r.length === 0 || r.length > 3)
|
|
321
|
+
throw new Error("Invalid time format");
|
|
322
|
+
if (i && (r[0] < 1 || r[0] > 12))
|
|
323
|
+
throw new Error("Invalid time format");
|
|
324
|
+
(i || t) && r[0] === 12 && (r[0] = 0), i === "PM" && (r[0] = r[0] + 12);
|
|
325
|
+
const [n, s = 0, a = 0] = r;
|
|
326
|
+
if (n > 23 || s > 59 || a > 59)
|
|
327
|
+
throw new Error("Invalid value");
|
|
328
|
+
return [n, s, a].map(d).join(":");
|
|
329
|
+
};
|
|
330
|
+
var pe = Object.defineProperty, ue = Object.getOwnPropertyDescriptor, g = (e, t, o, r) => {
|
|
331
|
+
for (var i = r > 1 ? void 0 : r ? ue(t, o) : t, n = e.length - 1, s; n >= 0; n--)
|
|
332
|
+
(s = e[n]) && (i = (r ? s(t, o, i) : s(i)) || i);
|
|
333
|
+
return r && i && pe(t, o, i), i;
|
|
334
|
+
};
|
|
335
|
+
const de = (e) => {
|
|
336
|
+
class t extends e {
|
|
337
|
+
constructor() {
|
|
338
|
+
super(...arguments), this.minutesStep = null, this.secondsStep = null, this.#t = {
|
|
339
|
+
handleChange: () => {
|
|
340
|
+
this.value && (this._presentationValue = this._toPresentationValue(this.value));
|
|
341
|
+
}
|
|
342
|
+
};
|
|
343
|
+
}
|
|
344
|
+
// --- Core ---
|
|
345
|
+
/**
|
|
346
|
+
* @internal
|
|
347
|
+
*/
|
|
348
|
+
get _displaySeconds() {
|
|
349
|
+
return this.secondsStep !== null;
|
|
350
|
+
}
|
|
351
|
+
get _use12hClock() {
|
|
352
|
+
return this.clock ? this.clock === "12h" : this.locale.timePicker.defaultTo12HourClock;
|
|
353
|
+
}
|
|
354
|
+
/**
|
|
355
|
+
* @internal
|
|
356
|
+
*/
|
|
357
|
+
get _timePlaceholder() {
|
|
358
|
+
let r = "hh:mm";
|
|
359
|
+
return this._displaySeconds && (r += ":ss"), this._use12hClock && (r += " aa"), r;
|
|
360
|
+
}
|
|
361
|
+
#t;
|
|
362
|
+
#e;
|
|
363
|
+
#o() {
|
|
364
|
+
this.#e = R.binding(
|
|
365
|
+
() => this._use12hClock,
|
|
366
|
+
this.#t
|
|
367
|
+
), this.#e.observe(this, q);
|
|
368
|
+
}
|
|
369
|
+
#r() {
|
|
370
|
+
this.#e.disconnect();
|
|
371
|
+
}
|
|
372
|
+
/**
|
|
373
|
+
* @internal
|
|
374
|
+
*/
|
|
375
|
+
connectedCallback() {
|
|
376
|
+
super.connectedCallback(), this.#o();
|
|
377
|
+
}
|
|
378
|
+
/**
|
|
379
|
+
* @internal
|
|
380
|
+
*/
|
|
381
|
+
disconnectedCallback() {
|
|
382
|
+
super.disconnectedCallback(), this.#r();
|
|
383
|
+
}
|
|
384
|
+
// --- Picker button ---
|
|
385
|
+
/**
|
|
386
|
+
* @internal
|
|
387
|
+
*/
|
|
388
|
+
_onPickerButtonClick() {
|
|
389
|
+
super._onPickerButtonClick(), this._popupOpen && (V.processUpdates(), this._inlineTimePickerEl.scrollSelectedOptionsToTop());
|
|
390
|
+
}
|
|
391
|
+
// --- Inline time picker ---
|
|
392
|
+
/**
|
|
393
|
+
* @internal
|
|
394
|
+
*/
|
|
395
|
+
_onInlineTimePickerChange(r) {
|
|
396
|
+
this._updateValueDueToUserInteraction(
|
|
397
|
+
this._withUpdatedTime(r.detail),
|
|
398
|
+
!1
|
|
399
|
+
);
|
|
400
|
+
}
|
|
401
|
+
/**
|
|
402
|
+
* @internal
|
|
403
|
+
*/
|
|
404
|
+
_onInlineTimePickerLastColumnSelected() {
|
|
405
|
+
this._closePopup();
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
return g([
|
|
409
|
+
f({ attribute: "minutes-step", converter: C })
|
|
410
|
+
], t.prototype, "minutesStep", 2), g([
|
|
411
|
+
f({ attribute: "seconds-step", converter: C })
|
|
412
|
+
], t.prototype, "secondsStep", 2), g([
|
|
413
|
+
f
|
|
414
|
+
], t.prototype, "clock", 2), g([
|
|
415
|
+
j
|
|
416
|
+
], t.prototype, "_use12hClock", 1), t;
|
|
417
|
+
};
|
|
418
|
+
var me = Object.defineProperty, A = (e, t, o, r) => {
|
|
419
|
+
for (var i = void 0, n = e.length - 1, s; n >= 0; n--)
|
|
420
|
+
(s = e[n]) && (i = s(t, o, i) || i);
|
|
421
|
+
return i && me(t, o, i), i;
|
|
422
|
+
};
|
|
423
|
+
const F = {
|
|
424
|
+
fromView: (e) => e && w(e) ? e : "",
|
|
425
|
+
toView(e) {
|
|
426
|
+
return e;
|
|
427
|
+
}
|
|
428
|
+
};
|
|
429
|
+
class D extends de(
|
|
430
|
+
U(z)
|
|
431
|
+
) {
|
|
432
|
+
// --- Core ---
|
|
433
|
+
constructor() {
|
|
434
|
+
super(), this._isValidValue = w, this.min = "", this.max = "", this.proxy.type = "time", this.proxy.step = "1";
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* @internal
|
|
438
|
+
*/
|
|
439
|
+
_toPresentationValue(t) {
|
|
440
|
+
return le(
|
|
441
|
+
t,
|
|
442
|
+
this._displaySeconds,
|
|
443
|
+
this._use12hClock
|
|
444
|
+
);
|
|
445
|
+
}
|
|
446
|
+
/**
|
|
447
|
+
* @internal
|
|
448
|
+
*/
|
|
449
|
+
_parsePresentationValue(t) {
|
|
450
|
+
return ce(t, this._use12hClock);
|
|
451
|
+
}
|
|
452
|
+
/**
|
|
453
|
+
* @internal
|
|
454
|
+
*/
|
|
455
|
+
get _timeValue() {
|
|
456
|
+
return this.value;
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* @internal
|
|
460
|
+
*/
|
|
461
|
+
_withUpdatedTime(t) {
|
|
462
|
+
return t;
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* @internal
|
|
466
|
+
*/
|
|
467
|
+
get _resolvedMinTime() {
|
|
468
|
+
return this.min || null;
|
|
469
|
+
}
|
|
470
|
+
/**
|
|
471
|
+
* @internal
|
|
472
|
+
*/
|
|
473
|
+
get _resolvedMaxTime() {
|
|
474
|
+
return this.max || null;
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
* @internal
|
|
478
|
+
*/
|
|
479
|
+
minChanged(t, o) {
|
|
480
|
+
this.proxy instanceof HTMLInputElement && (this.proxy.min = o, this.validate());
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
* @internal
|
|
484
|
+
*/
|
|
485
|
+
maxChanged(t, o) {
|
|
486
|
+
this.proxy instanceof HTMLInputElement && (this.proxy.max = o, this.validate());
|
|
487
|
+
}
|
|
488
|
+
// --- Text field ---
|
|
489
|
+
/**
|
|
490
|
+
* @internal
|
|
491
|
+
*/
|
|
492
|
+
get _textFieldPlaceholder() {
|
|
493
|
+
return this._timePlaceholder;
|
|
494
|
+
}
|
|
495
|
+
// --- Picker button ---
|
|
496
|
+
/**
|
|
497
|
+
* @internal
|
|
498
|
+
*/
|
|
499
|
+
get _pickerButtonIcon() {
|
|
500
|
+
return "clock-line";
|
|
501
|
+
}
|
|
502
|
+
/**
|
|
503
|
+
* @internal
|
|
504
|
+
*/
|
|
505
|
+
get _pickerButtonLabel() {
|
|
506
|
+
return this.value ? this.locale.timePicker.changeTimeLabel(
|
|
507
|
+
this._toPresentationValue(this.value)
|
|
508
|
+
) : this.locale.timePicker.chooseTimeLabel;
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* @internal
|
|
512
|
+
*/
|
|
513
|
+
_onPickerButtonClick() {
|
|
514
|
+
super._onPickerButtonClick(), this._popupOpen && (V.processUpdates(), this._focusableElsWithinDialog()[0]?.focus());
|
|
515
|
+
}
|
|
516
|
+
// --- Dialog ---
|
|
517
|
+
/**
|
|
518
|
+
* @internal
|
|
519
|
+
*/
|
|
520
|
+
get _dialogLabel() {
|
|
521
|
+
return this.locale.timePicker.chooseTimeLabel;
|
|
522
|
+
}
|
|
523
|
+
/**
|
|
524
|
+
* @internal
|
|
525
|
+
*/
|
|
526
|
+
_focusableElsWithinDialog() {
|
|
527
|
+
return this._dialogEl.querySelectorAll(
|
|
528
|
+
"#inline-time-picker, .vwc-button"
|
|
529
|
+
);
|
|
530
|
+
}
|
|
531
|
+
// --- Validation ---
|
|
532
|
+
/**
|
|
533
|
+
* @internal
|
|
534
|
+
*/
|
|
535
|
+
_getCustomValidationError() {
|
|
536
|
+
return this._isPresentationValueInvalid() ? this.locale.timePicker.invalidTimeError : null;
|
|
537
|
+
}
|
|
538
|
+
}
|
|
539
|
+
A([
|
|
540
|
+
f({ converter: F })
|
|
541
|
+
], D.prototype, "min");
|
|
542
|
+
A([
|
|
543
|
+
f({ converter: F })
|
|
544
|
+
], D.prototype, "max");
|
|
545
|
+
const $e = (e, t) => {
|
|
546
|
+
const o = e.tagFor(p);
|
|
547
|
+
return S`
|
|
548
|
+
<${o}
|
|
549
|
+
id='inline-time-picker'
|
|
550
|
+
${Q("_inlineTimePickerEl")}
|
|
551
|
+
style="--_inline-time-picker-num-options-visible: ${() => t}"
|
|
552
|
+
tabindex='1'
|
|
553
|
+
:value='${(r) => r._timeValue || void 0}'
|
|
554
|
+
:clock='${(r) => r._use12hClock ? "12h" : "24h"}'
|
|
555
|
+
:min='${(r) => r._resolvedMinTime || void 0}'
|
|
556
|
+
:max='${(r) => r._resolvedMaxTime || void 0}'
|
|
557
|
+
:minutesStep='${(r) => r.minutesStep ?? 1}'
|
|
558
|
+
:secondsStep='${(r) => r.secondsStep ?? void 0}'
|
|
559
|
+
@change='${(r, i) => r._onInlineTimePickerChange(i.event)}'
|
|
560
|
+
@last-column-selected='${(r) => r._onInlineTimePickerLastColumnSelected()}'
|
|
561
|
+
>
|
|
562
|
+
</${o}>
|
|
563
|
+
`;
|
|
564
|
+
};
|
|
565
|
+
export {
|
|
566
|
+
de as T,
|
|
567
|
+
F as V,
|
|
568
|
+
$e as a,
|
|
569
|
+
ye as b,
|
|
570
|
+
xe as c,
|
|
571
|
+
D as d,
|
|
572
|
+
le as f,
|
|
573
|
+
w as i,
|
|
574
|
+
ce as p
|
|
575
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
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.1.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;
|