@solid-design-system/components 5.15.5 → 5.15.7
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/cdn/chunks/chunk.6NSE3DZZ.js +11 -0
- package/cdn/chunks/{chunk.CNOQLSAS.js → chunk.B6DU5WQZ.js} +4 -4
- package/cdn/chunks/{chunk.GC5HUEMT.js → chunk.IG2VTTYZ.js} +1 -1
- package/cdn/chunks/{chunk.AVWCANBI.js → chunk.JRJ6FNRH.js} +1 -1
- package/cdn/chunks/{chunk.M275INNC.js → chunk.LUO6B5O2.js} +9 -8
- package/cdn/chunks/{chunk.H2TFK3FW.js → chunk.QQ5HSBA6.js} +1 -1
- package/cdn/chunks/{chunk.Q3NMER3S.js → chunk.R5CCLEF5.js} +1 -1
- package/cdn/chunks/{chunk.SBW3IQVN.js → chunk.XF6C6IZ7.js} +1 -1
- package/cdn/components/accordion/accordion.js +1 -1
- package/cdn/components/accordion-group/accordion-group.js +1 -1
- package/cdn/components/audio/audio.js +1 -1
- package/cdn/components/carousel/carousel.js +1 -1
- package/cdn/components/checkbox/checkbox.js +1 -1
- package/cdn/components/checkbox-group/checkbox-group.js +1 -1
- package/cdn/components/combobox/combobox.js +1 -1
- package/cdn/components/dialog/dialog.js +1 -1
- package/cdn/components/drawer/drawer.js +1 -1
- package/cdn/components/expandable/expandable.js +1 -1
- package/cdn/components/flipcard/flipcard.js +1 -1
- package/cdn/components/icon/icon.js +1 -1
- package/cdn/components/icon/library.internal.js +1 -1
- package/cdn/components/icon/library.js +1 -1
- package/cdn/components/input/input.js +1 -1
- package/cdn/components/navigation-item/navigation-item.js +1 -1
- package/cdn/components/notification/notification.js +1 -1
- package/cdn/components/option/option.js +1 -1
- package/cdn/components/quickfact/quickfact.js +1 -1
- package/cdn/components/scrollable/scrollable.js +1 -1
- package/cdn/components/select/select.js +1 -1
- package/cdn/components/step/step.js +1 -1
- package/cdn/components/tab-group/tab-group.js +1 -1
- package/cdn/components/tag/tag.js +1 -1
- package/cdn/components/textarea/textarea.js +1 -1
- package/cdn/components/tooltip/tooltip.js +1 -1
- package/cdn/components/video/video.js +1 -1
- package/cdn/custom-elements.json +966 -966
- package/cdn/solid-components.bundle.js +12 -11
- package/cdn/solid-components.iife.js +12 -11
- package/cdn/solid-components.js +1 -1
- package/cdn/utilities/icon-library.js +1 -1
- package/cdn/web-types.json +1 -1
- package/cdn-versioned/chunks/chunk.2HR2JHBL.js +1 -1
- package/cdn-versioned/chunks/chunk.35XMPPY5.js +1 -1
- package/cdn-versioned/chunks/chunk.3OGPT34F.js +1 -1
- package/cdn-versioned/chunks/chunk.4OSXAE67.js +1 -1
- package/cdn-versioned/chunks/chunk.4VGPLUHG.js +1 -1
- package/cdn-versioned/chunks/chunk.5FGVDYO4.js +1 -1
- package/cdn-versioned/chunks/chunk.5UU57WGX.js +1 -1
- package/cdn-versioned/chunks/chunk.5YR2BW6Z.js +1 -1
- package/cdn-versioned/chunks/chunk.6DD53IIK.js +1 -1
- package/cdn-versioned/chunks/chunk.6DEKOOVF.js +1 -1
- package/cdn-versioned/chunks/chunk.6DJJYTKZ.js +2 -2
- package/cdn-versioned/chunks/chunk.6LY4CQS5.js +1 -1
- package/cdn-versioned/chunks/chunk.6NSE3DZZ.js +11 -0
- package/cdn-versioned/chunks/chunk.77KBPY6M.js +1 -1
- package/cdn-versioned/chunks/chunk.7GJAULJA.js +1 -1
- package/cdn-versioned/chunks/chunk.7JV32P5Q.js +1 -1
- package/cdn-versioned/chunks/chunk.7ZT7XD7H.js +1 -1
- package/cdn-versioned/chunks/{chunk.CNOQLSAS.js → chunk.B6DU5WQZ.js} +4 -4
- package/cdn-versioned/chunks/chunk.BGKGDPBP.js +1 -1
- package/cdn-versioned/chunks/chunk.C2K5FJG6.js +1 -1
- package/cdn-versioned/chunks/chunk.CE5ZCTLG.js +1 -1
- package/cdn-versioned/chunks/chunk.CEVVDV52.js +1 -1
- package/cdn-versioned/chunks/chunk.DKTLAKVD.js +1 -1
- package/cdn-versioned/chunks/chunk.EBQAL4SG.js +1 -1
- package/cdn-versioned/chunks/chunk.EC63I62M.js +1 -1
- package/cdn-versioned/chunks/chunk.ENG4CGOQ.js +1 -1
- package/cdn-versioned/chunks/chunk.EWX245UT.js +1 -1
- package/cdn-versioned/chunks/chunk.GB43ZI2M.js +1 -1
- package/cdn-versioned/chunks/chunk.GJAPEOYB.js +1 -1
- package/cdn-versioned/chunks/chunk.GVD7DPUX.js +1 -1
- package/cdn-versioned/chunks/chunk.HVSHE3SX.js +1 -1
- package/cdn-versioned/chunks/{chunk.GC5HUEMT.js → chunk.IG2VTTYZ.js} +4 -4
- package/cdn-versioned/chunks/chunk.IHKACSKZ.js +1 -1
- package/cdn-versioned/chunks/chunk.IQ4XSBN6.js +1 -1
- package/cdn-versioned/chunks/chunk.JGGJ7DHB.js +1 -1
- package/cdn-versioned/chunks/{chunk.AVWCANBI.js → chunk.JRJ6FNRH.js} +1 -1
- package/cdn-versioned/chunks/chunk.KD3QQ6GF.js +1 -1
- package/cdn-versioned/chunks/chunk.LFTOGDCS.js +1 -1
- package/cdn-versioned/chunks/chunk.LUHUBO4Y.js +1 -1
- package/cdn-versioned/chunks/{chunk.M275INNC.js → chunk.LUO6B5O2.js} +9 -8
- package/cdn-versioned/chunks/chunk.LZDITSGD.js +1 -1
- package/cdn-versioned/chunks/chunk.M4XF4HY6.js +2 -2
- package/cdn-versioned/chunks/chunk.N4VPOI2K.js +1 -1
- package/cdn-versioned/chunks/chunk.O6KTLPCX.js +1 -1
- package/cdn-versioned/chunks/chunk.OLYZZSH7.js +1 -1
- package/cdn-versioned/chunks/chunk.OZ4RSXMQ.js +1 -1
- package/cdn-versioned/chunks/{chunk.H2TFK3FW.js → chunk.QQ5HSBA6.js} +1 -1
- package/cdn-versioned/chunks/chunk.QVM2KJMY.js +1 -1
- package/cdn-versioned/chunks/{chunk.Q3NMER3S.js → chunk.R5CCLEF5.js} +1 -1
- package/cdn-versioned/chunks/chunk.RBVN4ZNT.js +1 -1
- package/cdn-versioned/chunks/chunk.RCDKFEMZ.js +1 -1
- package/cdn-versioned/chunks/chunk.RPGHXS3H.js +1 -1
- package/cdn-versioned/chunks/chunk.RW5KPI4Z.js +1 -1
- package/cdn-versioned/chunks/chunk.RYTJY7J3.js +1 -1
- package/cdn-versioned/chunks/chunk.SOCURUDK.js +1 -1
- package/cdn-versioned/chunks/chunk.UQR7JBGF.js +1 -1
- package/cdn-versioned/chunks/chunk.VPFGICJP.js +1 -1
- package/cdn-versioned/chunks/chunk.W7A3TU2Z.js +1 -1
- package/cdn-versioned/chunks/chunk.WG74SLXL.js +1 -1
- package/cdn-versioned/chunks/chunk.WZDZQ6LB.js +1 -1
- package/cdn-versioned/chunks/chunk.X3PHFNB7.js +1 -1
- package/cdn-versioned/chunks/{chunk.SBW3IQVN.js → chunk.XF6C6IZ7.js} +1 -1
- package/cdn-versioned/chunks/chunk.ZRK4JWRJ.js +1 -1
- package/cdn-versioned/components/accordion/accordion.d.ts +1 -1
- package/cdn-versioned/components/accordion/accordion.js +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/cdn-versioned/components/accordion-group/accordion-group.js +1 -1
- package/cdn-versioned/components/animation/animation.d.ts +1 -1
- package/cdn-versioned/components/audio/audio.d.ts +1 -1
- package/cdn-versioned/components/audio/audio.js +1 -1
- package/cdn-versioned/components/badge/badge.d.ts +1 -1
- package/cdn-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/cdn-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/cdn-versioned/components/button/button.d.ts +1 -1
- package/cdn-versioned/components/button-group/button-group.d.ts +1 -1
- package/cdn-versioned/components/carousel/carousel.d.ts +1 -1
- package/cdn-versioned/components/carousel/carousel.js +1 -1
- package/cdn-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/cdn-versioned/components/checkbox/checkbox.js +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/cdn-versioned/components/checkbox-group/checkbox-group.js +1 -1
- package/cdn-versioned/components/combobox/combobox.d.ts +1 -1
- package/cdn-versioned/components/combobox/combobox.js +1 -1
- package/cdn-versioned/components/dialog/dialog.d.ts +1 -1
- package/cdn-versioned/components/dialog/dialog.js +1 -1
- package/cdn-versioned/components/divider/divider.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.d.ts +1 -1
- package/cdn-versioned/components/drawer/drawer.js +1 -1
- package/cdn-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/cdn-versioned/components/expandable/expandable.d.ts +1 -1
- package/cdn-versioned/components/expandable/expandable.js +1 -1
- package/cdn-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/cdn-versioned/components/flipcard/flipcard.js +1 -1
- package/cdn-versioned/components/header/header.d.ts +1 -1
- package/cdn-versioned/components/icon/icon.d.ts +1 -1
- package/cdn-versioned/components/icon/icon.js +1 -1
- package/cdn-versioned/components/icon/library.internal.js +1 -1
- package/cdn-versioned/components/icon/library.js +1 -1
- package/cdn-versioned/components/include/include.d.ts +1 -1
- package/cdn-versioned/components/input/input.d.ts +1 -1
- package/cdn-versioned/components/input/input.js +1 -1
- package/cdn-versioned/components/link/link.d.ts +1 -1
- package/cdn-versioned/components/loader/loader.d.ts +1 -1
- package/cdn-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/cdn-versioned/components/menu/menu.d.ts +1 -1
- package/cdn-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/cdn-versioned/components/navigation-item/navigation-item.js +1 -1
- package/cdn-versioned/components/notification/notification.d.ts +1 -1
- package/cdn-versioned/components/notification/notification.js +1 -1
- package/cdn-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/cdn-versioned/components/option/option.d.ts +1 -1
- package/cdn-versioned/components/option/option.js +1 -1
- package/cdn-versioned/components/popup/popup.d.ts +1 -1
- package/cdn-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/cdn-versioned/components/quickfact/quickfact.js +1 -1
- package/cdn-versioned/components/radio/radio.d.ts +1 -1
- package/cdn-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/cdn-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/cdn-versioned/components/range/range.d.ts +1 -1
- package/cdn-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/cdn-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/cdn-versioned/components/scrollable/scrollable.js +1 -1
- package/cdn-versioned/components/select/select.d.ts +1 -1
- package/cdn-versioned/components/select/select.js +1 -1
- package/cdn-versioned/components/spinner/spinner.d.ts +1 -1
- package/cdn-versioned/components/step/step.d.ts +1 -1
- package/cdn-versioned/components/step/step.js +1 -1
- package/cdn-versioned/components/step-group/step-group.d.ts +1 -1
- package/cdn-versioned/components/switch/switch.d.ts +1 -1
- package/cdn-versioned/components/tab/tab.d.ts +1 -1
- package/cdn-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/cdn-versioned/components/tab-group/tab-group.js +1 -1
- package/cdn-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/cdn-versioned/components/tag/tag.d.ts +1 -1
- package/cdn-versioned/components/tag/tag.js +1 -1
- package/cdn-versioned/components/textarea/textarea.d.ts +1 -1
- package/cdn-versioned/components/textarea/textarea.js +1 -1
- package/cdn-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/cdn-versioned/components/tooltip/tooltip.js +1 -1
- package/cdn-versioned/components/video/video.d.ts +1 -1
- package/cdn-versioned/components/video/video.js +1 -1
- package/cdn-versioned/custom-elements.json +1198 -1198
- package/cdn-versioned/internal/form.js +3 -3
- package/cdn-versioned/solid-components.bundle.js +21 -20
- package/cdn-versioned/solid-components.css +2 -2
- package/cdn-versioned/solid-components.iife.js +21 -20
- package/cdn-versioned/solid-components.js +1 -1
- package/cdn-versioned/utilities/icon-library.js +1 -1
- package/cdn-versioned/vscode.html-custom-data.json +91 -91
- package/cdn-versioned/web-types.json +154 -154
- package/dist/chunks/{chunk.XK3MBLKI.js → chunk.4PS5R3HQ.js} +1 -1
- package/dist/chunks/{chunk.U44CWPXO.js → chunk.55YNHA4Y.js} +1 -1
- package/dist/chunks/{chunk.6JH5RYK5.js → chunk.5FANE6X5.js} +1 -1
- package/{dist-versioned/chunks/chunk.M4ZYKLLS.js → dist/chunks/chunk.5SNCWTQU.js} +7 -6
- package/dist/chunks/{chunk.QENOXTAG.js → chunk.AZRZJLYB.js} +2 -2
- package/dist/chunks/{chunk.GCRESMVG.js → chunk.TLVK4R6I.js} +1 -1
- package/dist/chunks/{chunk.45EBRFJS.js → chunk.X4WBXLQO.js} +1 -1
- package/dist/chunks/{chunk.2AQLDT5K.js → chunk.Y62XG7YE.js} +17 -1
- package/dist/components/accordion/accordion.js +3 -3
- package/dist/components/accordion-group/accordion-group.js +3 -3
- package/dist/components/audio/audio.js +3 -3
- package/dist/components/carousel/carousel.js +4 -4
- package/dist/components/checkbox/checkbox.js +3 -3
- package/dist/components/checkbox-group/checkbox-group.js +3 -3
- package/dist/components/combobox/combobox.js +4 -4
- package/dist/components/dialog/dialog.js +3 -3
- package/dist/components/drawer/drawer.js +3 -3
- package/dist/components/expandable/expandable.js +3 -3
- package/dist/components/flipcard/flipcard.js +3 -3
- package/dist/components/icon/icon.js +3 -3
- package/dist/components/icon/library.internal.js +1 -1
- package/dist/components/icon/library.js +2 -2
- package/dist/components/input/input.js +4 -4
- package/dist/components/navigation-item/navigation-item.js +3 -3
- package/dist/components/notification/notification.js +3 -3
- package/dist/components/option/option.js +3 -3
- package/dist/components/quickfact/quickfact.js +3 -3
- package/dist/components/scrollable/scrollable.js +3 -3
- package/dist/components/select/select.js +4 -4
- package/dist/components/step/step.js +3 -3
- package/dist/components/tab-group/tab-group.js +3 -3
- package/dist/components/tag/tag.js +3 -3
- package/dist/components/textarea/textarea.js +4 -4
- package/dist/components/tooltip/tooltip.js +3 -3
- package/dist/components/video/video.js +3 -3
- package/dist/custom-elements.json +966 -966
- package/dist/solid-components.js +8 -8
- package/dist/utilities/icon-library.js +2 -2
- package/dist/web-types.json +1 -1
- package/dist-versioned/chunks/chunk.257BQ5G3.js +2 -2
- package/dist-versioned/chunks/chunk.2TPMKDGR.js +1 -1
- package/dist-versioned/chunks/chunk.2Z23SMCT.js +2 -2
- package/dist-versioned/chunks/chunk.34JZVZG6.js +2 -2
- package/dist-versioned/chunks/chunk.4CMRVAWO.js +6 -6
- package/dist-versioned/chunks/{chunk.XK3MBLKI.js → chunk.4PS5R3HQ.js} +24 -24
- package/dist-versioned/chunks/{chunk.U44CWPXO.js → chunk.55YNHA4Y.js} +3 -3
- package/dist-versioned/chunks/{chunk.6JH5RYK5.js → chunk.5FANE6X5.js} +1 -1
- package/{dist/chunks/chunk.M4ZYKLLS.js → dist-versioned/chunks/chunk.5SNCWTQU.js} +7 -6
- package/dist-versioned/chunks/chunk.6DKXZWRN.js +4 -4
- package/dist-versioned/chunks/chunk.6S62Y3SN.js +2 -2
- package/dist-versioned/chunks/chunk.A6F5UBS5.js +1 -1
- package/dist-versioned/chunks/chunk.AO5E3XWU.js +2 -2
- package/dist-versioned/chunks/{chunk.QENOXTAG.js → chunk.AZRZJLYB.js} +27 -27
- package/dist-versioned/chunks/chunk.C7HV6GLS.js +1 -1
- package/dist-versioned/chunks/chunk.CWOPJ6AE.js +2 -2
- package/dist-versioned/chunks/chunk.CYAZC6LN.js +3 -3
- package/dist-versioned/chunks/chunk.CZ5NVXDL.js +2 -2
- package/dist-versioned/chunks/chunk.DC7DGLHJ.js +1 -1
- package/dist-versioned/chunks/chunk.DT3ZL7JI.js +12 -12
- package/dist-versioned/chunks/chunk.ELPOH7TW.js +11 -11
- package/dist-versioned/chunks/chunk.F2UZ5T7G.js +5 -5
- package/dist-versioned/chunks/chunk.HBX6PDXK.js +4 -4
- package/dist-versioned/chunks/chunk.IJ2YK4AW.js +4 -4
- package/dist-versioned/chunks/chunk.IJIJ7YVU.js +1 -1
- package/dist-versioned/chunks/chunk.ILB62SSN.js +3 -3
- package/dist-versioned/chunks/chunk.IYSGB2DQ.js +5 -5
- package/dist-versioned/chunks/chunk.J3K6PVKE.js +2 -2
- package/dist-versioned/chunks/chunk.JSVTNGBN.js +2 -2
- package/dist-versioned/chunks/chunk.KEJFWGZI.js +4 -4
- package/dist-versioned/chunks/chunk.KENPSAUU.js +1 -1
- package/dist-versioned/chunks/chunk.KZLAI4DK.js +1 -1
- package/dist-versioned/chunks/chunk.LNGJFVKN.js +2 -2
- package/dist-versioned/chunks/chunk.M55G2PHP.js +2 -2
- package/dist-versioned/chunks/chunk.MDZHXHUH.js +3 -3
- package/dist-versioned/chunks/chunk.MML77VKL.js +2 -2
- package/dist-versioned/chunks/chunk.NR3OWI4Y.js +1 -1
- package/dist-versioned/chunks/chunk.NSCG7U5D.js +14 -14
- package/dist-versioned/chunks/chunk.NZFEW5QU.js +1 -1
- package/dist-versioned/chunks/chunk.PAGQREWS.js +4 -4
- package/dist-versioned/chunks/chunk.PUT4BQ4M.js +5 -5
- package/dist-versioned/chunks/chunk.PVFVGCKE.js +1 -1
- package/dist-versioned/chunks/chunk.QGSAYCDJ.js +5 -5
- package/dist-versioned/chunks/chunk.QIWHR4XZ.js +1 -1
- package/dist-versioned/chunks/chunk.QW32IQ37.js +6 -6
- package/dist-versioned/chunks/chunk.RVZPI7LZ.js +8 -8
- package/dist-versioned/chunks/chunk.THYGJ3F3.js +2 -2
- package/dist-versioned/chunks/{chunk.GCRESMVG.js → chunk.TLVK4R6I.js} +3 -3
- package/dist-versioned/chunks/chunk.TUOYTASX.js +3 -3
- package/dist-versioned/chunks/chunk.U6LFASA7.js +1 -1
- package/dist-versioned/chunks/chunk.UIQBHPD3.js +2 -2
- package/dist-versioned/chunks/chunk.WDWZFQ4X.js +2 -2
- package/dist-versioned/chunks/{chunk.45EBRFJS.js → chunk.X4WBXLQO.js} +2 -2
- package/dist-versioned/chunks/chunk.XCQC3F3H.js +3 -3
- package/dist-versioned/chunks/chunk.XIRK4KQ5.js +3 -3
- package/dist-versioned/chunks/chunk.XVNT7HIE.js +1 -1
- package/dist-versioned/chunks/chunk.XX3EFOOF.js +3 -3
- package/dist-versioned/chunks/chunk.XZDQNDB2.js +12 -12
- package/dist-versioned/chunks/{chunk.2AQLDT5K.js → chunk.Y62XG7YE.js} +23 -7
- package/dist-versioned/chunks/chunk.Y7TQJEA7.js +2 -2
- package/dist-versioned/chunks/chunk.YFRXAKBQ.js +1 -1
- package/dist-versioned/chunks/chunk.YXP3Q4D5.js +2 -2
- package/dist-versioned/chunks/chunk.ZNPGMZAM.js +1 -1
- package/dist-versioned/components/accordion/accordion.d.ts +1 -1
- package/dist-versioned/components/accordion/accordion.js +3 -3
- package/dist-versioned/components/accordion-group/accordion-group.d.ts +1 -1
- package/dist-versioned/components/accordion-group/accordion-group.js +3 -3
- package/dist-versioned/components/animation/animation.d.ts +1 -1
- package/dist-versioned/components/audio/audio.d.ts +1 -1
- package/dist-versioned/components/audio/audio.js +3 -3
- package/dist-versioned/components/badge/badge.d.ts +1 -1
- package/dist-versioned/components/brandshape/brandshape.d.ts +1 -1
- package/dist-versioned/components/breadcrumb/breadcrumb.d.ts +1 -1
- package/dist-versioned/components/breadcrumb-item/breadcrumb-item.d.ts +1 -1
- package/dist-versioned/components/button/button.d.ts +1 -1
- package/dist-versioned/components/button-group/button-group.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.d.ts +1 -1
- package/dist-versioned/components/carousel/carousel.js +4 -4
- package/dist-versioned/components/carousel-item/carousel-item.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.d.ts +1 -1
- package/dist-versioned/components/checkbox/checkbox.js +3 -3
- package/dist-versioned/components/checkbox-group/checkbox-group.d.ts +1 -1
- package/dist-versioned/components/checkbox-group/checkbox-group.js +3 -3
- package/dist-versioned/components/combobox/combobox.d.ts +1 -1
- package/dist-versioned/components/combobox/combobox.js +4 -4
- package/dist-versioned/components/dialog/dialog.d.ts +1 -1
- package/dist-versioned/components/dialog/dialog.js +3 -3
- package/dist-versioned/components/divider/divider.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.d.ts +1 -1
- package/dist-versioned/components/drawer/drawer.js +3 -3
- package/dist-versioned/components/dropdown/dropdown.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.d.ts +1 -1
- package/dist-versioned/components/expandable/expandable.js +3 -3
- package/dist-versioned/components/flipcard/flipcard.d.ts +1 -1
- package/dist-versioned/components/flipcard/flipcard.js +3 -3
- package/dist-versioned/components/header/header.d.ts +1 -1
- package/dist-versioned/components/icon/icon.d.ts +1 -1
- package/dist-versioned/components/icon/icon.js +3 -3
- package/dist-versioned/components/icon/library.internal.js +1 -1
- package/dist-versioned/components/icon/library.js +2 -2
- package/dist-versioned/components/include/include.d.ts +1 -1
- package/dist-versioned/components/input/input.d.ts +1 -1
- package/dist-versioned/components/input/input.js +4 -4
- package/dist-versioned/components/link/link.d.ts +1 -1
- package/dist-versioned/components/loader/loader.d.ts +1 -1
- package/dist-versioned/components/map-marker/map-marker.d.ts +1 -1
- package/dist-versioned/components/menu/menu.d.ts +1 -1
- package/dist-versioned/components/menu-item/menu-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.d.ts +1 -1
- package/dist-versioned/components/navigation-item/navigation-item.js +3 -3
- package/dist-versioned/components/notification/notification.d.ts +1 -1
- package/dist-versioned/components/notification/notification.js +3 -3
- package/dist-versioned/components/optgroup/optgroup.d.ts +1 -1
- package/dist-versioned/components/option/option.d.ts +1 -1
- package/dist-versioned/components/option/option.js +3 -3
- package/dist-versioned/components/popup/popup.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.d.ts +1 -1
- package/dist-versioned/components/quickfact/quickfact.js +3 -3
- package/dist-versioned/components/radio/radio.d.ts +1 -1
- package/dist-versioned/components/radio-button/radio-button.d.ts +1 -1
- package/dist-versioned/components/radio-group/radio-group.d.ts +1 -1
- package/dist-versioned/components/range/range.d.ts +1 -1
- package/dist-versioned/components/range-tick/range-tick.d.ts +1 -1
- package/dist-versioned/components/scrollable/scrollable.d.ts +1 -1
- package/dist-versioned/components/scrollable/scrollable.js +3 -3
- package/dist-versioned/components/select/select.d.ts +1 -1
- package/dist-versioned/components/select/select.js +4 -4
- package/dist-versioned/components/spinner/spinner.d.ts +1 -1
- package/dist-versioned/components/step/step.d.ts +1 -1
- package/dist-versioned/components/step/step.js +3 -3
- package/dist-versioned/components/step-group/step-group.d.ts +1 -1
- package/dist-versioned/components/switch/switch.d.ts +1 -1
- package/dist-versioned/components/tab/tab.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.d.ts +1 -1
- package/dist-versioned/components/tab-group/tab-group.js +3 -3
- package/dist-versioned/components/tab-panel/tab-panel.d.ts +1 -1
- package/dist-versioned/components/tag/tag.d.ts +1 -1
- package/dist-versioned/components/tag/tag.js +3 -3
- package/dist-versioned/components/textarea/textarea.d.ts +1 -1
- package/dist-versioned/components/textarea/textarea.js +4 -4
- package/dist-versioned/components/tooltip/tooltip.d.ts +1 -1
- package/dist-versioned/components/tooltip/tooltip.js +3 -3
- package/dist-versioned/components/video/video.d.ts +1 -1
- package/dist-versioned/components/video/video.js +3 -3
- package/dist-versioned/custom-elements.json +1198 -1198
- package/dist-versioned/internal/form.js +3 -3
- package/dist-versioned/solid-components.css +2 -2
- package/dist-versioned/solid-components.js +8 -8
- package/dist-versioned/utilities/icon-library.js +2 -2
- package/dist-versioned/vscode.html-custom-data.json +91 -91
- package/dist-versioned/web-types.json +154 -154
- package/package.json +1 -1
- package/cdn/chunks/chunk.G43QKY2C.js +0 -11
- package/cdn-versioned/chunks/chunk.G43QKY2C.js +0 -11
|
@@ -41,10 +41,9 @@ var vr=Object.defineProperty,Ba=Object.defineProperties,Ra=Object.getOwnProperty
|
|
|
41
41
|
<path d="M12 18.96c-5.263 0-10-5.68-10-6.96 0-1.28 4.737-6.96 10-6.96S22 10.72 22 12c0 1.28-4.737 6.96-10 6.96ZM4.1 12c.76 1.197 4.07 4.96 7.9 4.96s7.14-3.767 7.9-4.96c-.76-1.197-4.07-4.96-7.9-4.96S4.86 10.807 4.1 12Z"/>
|
|
42
42
|
<path d="M3 22a1 1 0 0 1-.707-1.707l18-18a1 1 0 0 1 1.414 1.414l-18 18A.991.991 0 0 1 3 22Z"/>
|
|
43
43
|
</svg>
|
|
44
|
-
`,"info-circle":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2Zm0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16Z"/><path d="M13.333 7.833a1.5 1.5 0 1 1-3.001-.001 1.5 1.5 0 0 1 3.001.001ZM13 11.667a1 1 0 0 0-1-1h-1a1 1 0 0 0 0 2v2.667h2v-3.667Z"/><path d="M11 16.333v-1h-1a1 1 0 0 0 0 2h2a1 1 0 0 1-1-1Zm3-1h-1v1a1 1 0 0 1-1 1h2a1 1 0 0 0 0-2Z"/><path d="M13 16.333v-1h-2v1a1 1 0 0 0 2 0Z"/></svg>',"status-check"
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
</svg>
|
|
44
|
+
`,"info-circle":'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2Zm0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16Z"/><path d="M13.333 7.833a1.5 1.5 0 1 1-3.001-.001 1.5 1.5 0 0 1 3.001.001ZM13 11.667a1 1 0 0 0-1-1h-1a1 1 0 0 0 0 2v2.667h2v-3.667Z"/><path d="M11 16.333v-1h-1a1 1 0 0 0 0 2h2a1 1 0 0 1-1-1Zm3-1h-1v1a1 1 0 0 1-1 1h2a1 1 0 0 0 0-2Z"/><path d="M13 16.333v-1h-2v1a1 1 0 0 0 2 0Z"/></svg>',"status-check":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 12 13">
|
|
45
|
+
<path fill="currentColor" d="m9.947 1.138-.005.008-.001.003-5.56 8.34-2.434-2.447-.004-.004a.648.648 0 0 0-1.093.475c0 .172.066.328.175.444l.003.004 3 2.999c.117.117.28.19.46.19h.065c.2-.021.37-.13.475-.286l.005-.008.001-.002 5.994-8.992a.65.65 0 0 0-.18-.902l-.007-.005-.002-.002a.65.65 0 0 0-.892.185Z"/>
|
|
46
|
+
</svg>
|
|
48
47
|
`,"status-minus":`
|
|
49
48
|
<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12" fill="none">
|
|
50
49
|
<path d="M10 5.375H2C1.65496 5.375 1.375 5.65496 1.375 6C1.375 6.34504 1.65496 6.625 2 6.625H10C10.345 6.625 10.625 6.34504 10.625 6C10.625 5.65496 10.345 5.375 10 5.375Z" fill="currentColor"/>
|
|
@@ -62,8 +61,10 @@ var vr=Object.defineProperty,Ba=Object.defineProperties,Ra=Object.getOwnProperty
|
|
|
62
61
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64">
|
|
63
62
|
<path d="m57.44 29.76-37.333-24A2.667 2.667 0 0 0 16 8v48a2.668 2.668 0 0 0 2.667 2.666 2.672 2.672 0 0 0 1.45-.431l-.01.005 37.333-24a2.67 2.67 0 0 0 1.192-2.221c0-.923-.47-1.74-1.184-2.216l-.01-.006.002-.037ZM21.333 51.112V12.89l29.734 19.112-29.734 19.11Z"/>
|
|
64
63
|
</svg>
|
|
65
|
-
`,"confirm-circle"
|
|
66
|
-
<
|
|
64
|
+
`,"confirm-circle":`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
|
65
|
+
<path fill="currentColor" d="M12 2a10 10 0 1 0 0 20 10 10 0 0 0 0-20Zm0 18a8 8 0 1 1 0-16 8 8 0 0 1 0 16Z"/>
|
|
66
|
+
<path fill="currentColor" d="M15.8 7.5a1 1 0 0 0-1.4.3L10.9 14 9 12.3a1 1 0 0 0-1.6.7c0 .3 0 .5.2.7l2.7 2.7c.2.1.4.3.7.3h.1c.3 0 .6-.3.8-.5l4.3-7.4.1-.5a1 1 0 0 0-.5-.8Z"/>
|
|
67
|
+
</svg>`,warning:`
|
|
67
68
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12.893 2.55295C12.725 2.22395 12.388 2.00195 12 2.00195C11.612 2.00195 11.275 2.22295 11.109 2.54695L2.10598 20.553C2.03998 20.683 2.00098 20.837 2.00098 21C2.00098 21.552 2.44798 21.999 2.99998 22H21C21.552 21.999 21.999 21.552 21.999 21C21.999 20.837 21.96 20.683 21.891 20.548L21.894 20.554L12.893 2.55295ZM4.61698 20L12 5.23695L19.383 20H4.61698Z"/><path d="M11 10.667V15C11 15.552 11.448 16 12 16C12.552 16 13 15.552 13 15V10.667C13 10.115 12.552 9.66695 12 9.66695C11.448 9.66695 11 10.115 11 10.667Z"/><path d="M13 18C13 18.552 12.552 19 12 19C11.448 19 11 18.552 11 18C11 17.448 11.448 17 12 17C12.552 17 13 17.448 13 18Z"/></svg>`,"exclamation-circle":`
|
|
68
69
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 17C13 17.552 12.552 18 12 18C11.448 18 11 17.552 11 17C11 16.448 11.448 16 12 16C12.552 16 13 16.448 13 17Z"/><path d="M12 6C11.448 6 11 6.448 11 7V13C11 13.552 11.448 14 12 14C12.552 14 13 13.552 13 13V7C13 6.448 12.552 6 12 6Z"/><path d="M12 2C6.477 2 2 6.477 2 12C2 17.523 6.477 22 12 22C17.523 22 22 17.523 22 12C22 6.477 17.523 2 12 2ZM12 20C7.582 20 4 16.418 4 12C4 7.582 7.582 4 12 4C16.418 4 20 7.582 20 12C20 16.418 16.418 20 12 20Z"/></svg>`,"magnifying-glass":`
|
|
69
70
|
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path fill="currentColor" d="M21.707 20.293l-6.967-6.96c-0.046-0.046-0.096-0.087-0.15-0.124l-0.004-0.002c0.882-1.162 1.413-2.632 1.413-4.227 0-3.881-3.146-7.027-7.027-7.027s-7.027 3.146-7.027 7.027c0 3.881 3.146 7.027 7.027 7.027 1.594 0 3.065-0.531 4.244-1.426l-0.017 0.013c0.039 0.057 0.081 0.107 0.127 0.153l6.967 6.967c0.181 0.181 0.431 0.292 0.707 0.292s0.526-0.112 0.707-0.292v0c0.183-0.181 0.296-0.432 0.296-0.71s-0.113-0.529-0.296-0.71l-0-0zM9 14c-2.761 0-5-2.239-5-5s2.239-5 5-5c2.761 0 5 2.239 5 5v0c0 2.761-2.239 5-5 5v0z"></path></svg>`,transcript:`<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24">
|
|
@@ -113,7 +114,7 @@ var vr=Object.defineProperty,Ba=Object.defineProperties,Ra=Object.getOwnProperty
|
|
|
113
114
|
disabled:text-neutral-500 disabled:border-neutral-500`,tertiary:this.inverted?`border-transparent ${this.visuallyDisabled?"text-neutral-600 hover:text-neutral-600 active:text-neutral-600":"text-white hover:text-primary-100 active:text-primary-200"}
|
|
114
115
|
disabled:text-neutral-600`:`border-transparent ${this.visuallyDisabled?"text-neutral-500 hover:text-neutral-500 active:text-neutral-500":"text-primary hover:text-primary-500 active:text-primary-800"}
|
|
115
116
|
disabled:text-neutral-500`,cta:`text-white ${this.visuallyDisabled?"bg-neutral-500 border-neutral-500 hover:bg-neutral-500 active:bg-neutral-500":"bg-accent-500 border-transparent"}
|
|
116
|
-
${this.inverted?"disabled:bg-neutral-600 disabled:border-neutral-600":"disabled:bg-neutral-500 disabled:border-neutral-500"} disabled:text-white`}[this.variant])}" ?disabled="${w(t?void 0:this.disabled)}" type="${w(t?void 0:this.type)}" title="${this.title}" name="${w(t?void 0:this.name)}" value="${w(t?void 0:this.value)}" href="${w(t?this.href:void 0)}" target="${w(t?this.target:void 0)}" download="${w(t?this.download:void 0)}" rel="${w(t&&this.target?"noreferrer noopener":void 0)}" role="${w(t?void 0:"button")}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-labelledby="content" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @invalid="${this.isButton()?this.handleInvalid:null}" @click="${this.handleClick}"><div part="motion-wrapper" class="${c("absolute inset-0 rounded-default -z-10 overflow-hidden pointer-events-none ",(this.disabled||this.visuallyDisabled)&&"hidden")}"><div class="absolute inset-0 w-full h-full transition-all duration-fast translate-y-full group-hover:translate-y-0 group-hover:mt-[-22%] mt-[11%]"><div class="${c("absolute right-0 min-w-full min-h-full aspect-square skew-y-[-11deg] mt-[11%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div><div class="${c("absolute w-full h-full mt-[22%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div></div></div><slot name="icon-left" part="icon-left" class="${c("flex flex-auto items-center justify-end pointer-events-none",r["icon-only"]&&"hidden",this.loading&&"invisible",r["icon-left"]&&{sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size])}"></slot><slot part="label" id="content" class="${c("inline-flex items-center justify-center",r["icon-only"]&&"pointer-events-none",this.loading&&"invisible")}"></slot><slot name="icon-right" part="icon-right" class="${c("flex flex-auto items-center pointer-events-none",this.loading&&"invisible",r["icon-only"]&&"hidden",r["icon-right"]&&{sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size])}"></slot>${this.loading?I`<sd-loader class="${c("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-loader>`:""}</${e}>`}};K.styles=[...f.styles,y`:host{cursor:pointer;display:inline-block;position:relative;width:var(--sd-spacing-auto,auto);z-index:0}::slotted(sd-badge){pointer-events:none;position:absolute;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);--tw-translate-x:50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}::slotted(sd-icon),sd-loader{font-size:calc(var(--tw-varspacing)/2)}`],a([g("a, button")],K.prototype,"button",2),a([ei({selector:"sd-icon"})],K.prototype,"_iconsInDefaultSlot",2),a([E()],K.prototype,"invalid",2),a([l({type:String,reflect:!0})],K.prototype,"title",2),a([l({type:String,reflect:!0})],K.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],K.prototype,"inverted",2),a([l({type:String,reflect:!0})],K.prototype,"size",2),a([l({type:Boolean,reflect:!0})],K.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],K.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],K.prototype,"loading",2),a([l({type:String,reflect:!0})],K.prototype,"type",2),a([l({type:String,reflect:!0})],K.prototype,"name",2),a([l()],K.prototype,"value",2),a([l({type:String,reflect:!0})],K.prototype,"href",2),a([l({type:String,reflect:!0})],K.prototype,"target",2),a([l({reflect:!0})],K.prototype,"download",2),a([l({reflect:!0})],K.prototype,"form",2),a([l({attribute:"formaction"})],K.prototype,"formAction",2),a([l({attribute:"formenctype"})],K.prototype,"formEnctype",2),a([l({attribute:"formmethod"})],K.prototype,"formMethod",2),a([l({attribute:"formnovalidate",type:Boolean})],K.prototype,"formNoValidate",2),a([l({attribute:"formtarget"})],K.prototype,"formTarget",2),a([x("disabled",{waitUntilFirstUpdate:!0})],K.prototype,"handleDisabledChange",1),K=a([v("sd-button")],K);function qe(s=document.activeElement){if(s!=null&&s.shadowRoot){let i=s.shadowRoot.activeElement;if(i)return qe(i)}return s}function Xs(s,i){return{top:Math.round(s.getBoundingClientRect().top-i.getBoundingClientRect().top),left:Math.round(s.getBoundingClientRect().left-i.getBoundingClientRect().left)}}var Br=new Set;function sl(){let s=document.documentElement.clientWidth;return Math.abs(window.innerWidth-s)}function Ke(s){if(Br.add(s),!document.body.classList.contains("sd-scroll-lock")){let i=sl();document.body.classList.add("sd-scroll-lock"),document.body.style.setProperty("--sd-scroll-lock-size",`${i}px`)}}function je(s){Br.delete(s),Br.size===0&&(document.body.classList.remove("sd-scroll-lock"),document.body.style.removeProperty("--sd-scrollbar-width"))}function Kt(s,i,t="vertical",e="smooth"){let r=Xs(s,i),o=r.top+i.scrollTop,n=r.left+i.scrollLeft,d=i.scrollLeft,h=i.scrollLeft+i.offsetWidth,p=i.scrollTop,m=i.scrollTop+i.offsetHeight;(t==="horizontal"||t==="both")&&(n<d?i.scrollTo({left:n,behavior:e}):n+s.clientWidth>h&&i.scrollTo({left:n-i.offsetWidth+s.clientWidth,behavior:e})),(t==="vertical"||t==="both")&&(o<p?i.scrollTo({top:o,behavior:e}):o+s.clientHeight>m&&i.scrollTo({top:o-i.offsetHeight+s.clientHeight,behavior:e}))}function ai(s){return s.charAt(0).toUpperCase()+s.slice(1)}function Rr(s){return s.replace(/-./g,i=>i[1].toUpperCase())}function Ys(s){let i=s.tagName.toLowerCase();return s.getAttribute("tabindex")==="-1"||s.hasAttribute("disabled")||s.hasAttribute("aria-disabled")&&s.getAttribute("aria-disabled")!=="false"||i==="input"&&s.getAttribute("type")==="radio"&&!s.hasAttribute("checked")||s.offsetParent===null&&!(s.getRootNode()instanceof ShadowRoot)||window.getComputedStyle(s).visibility==="hidden"?!1:(i==="audio"||i==="video")&&s.hasAttribute("controls")||s.hasAttribute("tabindex")||s.hasAttribute("contenteditable")&&s.getAttribute("contenteditable")!=="false"?!0:["button","input","select","textarea","a","audio","video","summary"].includes(i)}function er(s){var o,n;let i=[];function t(d){d instanceof HTMLElement&&(i.push(d),d.shadowRoot!==null&&d.shadowRoot.mode==="open"&&t(d.shadowRoot)),[...d.children].forEach(h=>t(h))}t(s);let e=(o=i.find(d=>Ys(d)))!=null?o:null,r=(n=i.reverse().find(d=>Ys(d)))!=null?n:null;return{start:e,end:r}}var $i=[],Xe=class{constructor(i){this.tabDirection="forward";this.element=i,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){$i.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){$i=$i.filter(i=>i!==this.element),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return $i[$i.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){let{start:i,end:t}=er(this.element),e=this.tabDirection==="forward"?i:t;typeof(e==null?void 0:e.focus)=="function"&&e.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(i){i.key==="Tab"&&i.shiftKey&&(this.tabDirection="backward",requestAnimationFrame(()=>this.checkFocus()))}handleKeyUp(){this.tabDirection="forward"}};var ht=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"footer");this.localize=new L(this);this.modal=new Xe(this);this.open=!1;this.label="";this.placement="end";this.contained=!1;this.noHeader=!1;this.handleDocumentKeyDown=t=>{this.open&&t.key==="Escape"&&(t.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.drawer.hidden=!this.open,this.open&&(this.addOpenListeners(),this.contained||(this.modal.activate(),Ke(this)))}disconnectedCallback(){super.disconnectedCallback(),je(this)}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){let r=F(this,"drawer.denyClose",{dir:this.localize.dir()});B(this.panel,r.keyframes,r.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){var e;let t=(e=this.closeButton.shadowRoot)==null?void 0:e.querySelector('[part="base"]');if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=qe(),this.contained||(this.modal.activate(),Ke(this));let r=this.querySelector("[autofocus]");r&&r.removeAttribute("autofocus"),await Promise.all([R(this.drawer),R(this.overlay)]),this.drawer.hidden=!1,this.drawer.removeAttribute("inert");let o=F(this,`drawer.show${ai(this.placement)}`,{dir:this.localize.dir()}),n=F(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([B(this.panel,o.keyframes,o.options),B(this.overlay,n.keyframes,n.options)]),t==null||t.setAttribute("aria-controls","drawer"),t==null||t.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(r?r.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),r?r.setAttribute("autofocus",""):this.closeButton.focus()}),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),je(this)),await Promise.all([R(this.drawer),R(this.overlay)]);let r=F(this,`drawer.hide${ai(this.placement)}`,{dir:this.localize.dir()}),o=F(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([B(this.overlay,o.keyframes,o.options).then(()=>{this.overlay.hidden=!0}),B(this.panel,r.keyframes,r.options).then(()=>{this.panel.hidden=!0})]),this.drawer.hidden=!0,this.drawer.setAttribute("inert",""),this.overlay.hidden=!1,this.panel.hidden=!1;let n=this.originalTrigger;typeof(n==null?void 0:n.focus)=="function"&&setTimeout(()=>n.focus()),t==null||t.setAttribute("aria-expanded","false"),this.emit("sd-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&(this.modal.activate(),Ke(this)),this.open&&this.contained&&(this.modal.deactivate(),je(this))}async show(){if(!this.open)return this.open=!0,q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,q(this,"sd-after-hide")}render(){return u`<section id="drawer" part="base" class="${c("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}" aria-label="${this.label}"><div part="overlay" class="${c("block top-0 left-0 right-0 bottom-0 bg-neutral-800/75 pointer-events-auto",this.contained?"absolute":"fixed")}" @click="${()=>this.requestClose("overlay")}"></div><div part="panel" class="${c("absolute flex flex-col gap-4 z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",{end:"top-0 end-0 bottom-auto start-auto w-[--width] h-full",start:"top-0 end-auto bottom-auto start-0 w-[--width] h-full"}[this.placement])}" role="dialog" aria-modal="true" aria-label="${this.label}" tabindex="0">${this.noHeader?u`<sd-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}" class="absolute top-2 end-2 z-10"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-icon></sd-button>`:u`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:64px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ms-4 absolute top-2 end-2"><sd-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-icon></sd-button></div></header>`}<div part="body" class="flex-auto block px-4 focus-visible:focus-outline !-outline-offset-2" tabindex="0"><slot></slot></div><footer part="footer" class="${c(this.hasSlotController.test("footer")?"text-left p-4":"hidden")}"><slot name="footer"></slot></footer></div></section>`}};ht.styles=[...f.styles,y`:host{--width:25rem;display:contents}:host([contained]){z-index:auto}:host(:not([contained])){z-index:var(--sd-z-index-drawer,700)}[part=body]{-webkit-overflow-scrolling:touch;overflow-y:scroll;scrollbar-width:none}[part=body]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}`],a([g("[part=base]")],ht.prototype,"drawer",2),a([g("[part=panel]")],ht.prototype,"panel",2),a([g("[part=overlay]")],ht.prototype,"overlay",2),a([g("[part=close-button]")],ht.prototype,"closeButton",2),a([l({type:Boolean,reflect:!0})],ht.prototype,"open",2),a([l({type:String,attribute:"label",reflect:!0})],ht.prototype,"label",2),a([l({type:String,reflect:!0})],ht.prototype,"placement",2),a([l({type:Boolean,reflect:!0})],ht.prototype,"contained",2),a([l({attribute:"no-header",type:Boolean,reflect:!0})],ht.prototype,"noHeader",2),a([x("open",{waitUntilFirstUpdate:!0})],ht.prototype,"handleOpenChange",1),a([x("contained",{waitUntilFirstUpdate:!0})],ht.prototype,"handleNoModalChange",1),ht=a([v("sd-drawer")],ht);_("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});_("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});_("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});var ze=class{constructor(i){this.fixedEnd=!0;this.fixedStart=!0;this.gradient=!1;this.outline=!1;this.map=(i,t,e,r,o)=>(i-t)*(o-r)/(e-t)+r;this.damp=(i,t,e)=>2*(1-t/i)*(t/i)*e;this.canvas=i.canvas,this.frequency=i.frequency,this.phase=i.phase,this.amplitude=i.amplitude,this.color=i.color,this.shift=i.shift,this.lineWidth=2,this.damping=i.damping,this.context=this.canvas.getContext("2d"),this.paused=!0,this.playbackSpeed=1,this.origin={x:0,y:this.canvas.height}}drawPoint(i,t,e){if(!this.context)return;let r=this.lineWidth/2;if(this.context.beginPath(),this.outline&&(this.context.fillStyle=e,this.context.lineWidth=2,this.context.arc(i,t,r,0,2*Math.PI),this.context.fill()),this.gradient){let o=this.context.createLinearGradient(0,0,0,this.canvas.height);o.addColorStop(.1,e),o.addColorStop(1,"transparent"),this.context.fillStyle=o}else this.context.fillStyle=e;this.context.fillRect(i-r,t-r,r,this.canvas.height-t+r)}buildSine(i,t,e,r,o){for(let n=this.origin.x,d=this.origin.x+i;n<d;n+=1){let h=r*Math.sin(o*(n+t));this.fixedStart&&this.fixedEnd?this.drawPoint(n,this.origin.y+this.damp(d,n,this.damping)*h,e):this.fixedStart?this.drawPoint(n,this.origin.y+this.map(n,this.origin.x,d,0,this.damping)*h,e):this.fixedEnd?this.drawPoint(n,this.origin.y+(this.damping-this.map(n,this.origin.x,d,0,this.damping))*h,e):this.drawPoint(n,this.origin.y+h,e)}}redraw(){this.phase+=this.shift*(this.paused?1:2*this.playbackSpeed),this.buildSine(this.canvas.width,this.phase,this.color,this.amplitude,this.frequency)}setPlay(){this.paused=!1}setPause(){this.paused=!0}setPlaybackSpeed(i){this.playbackSpeed=i}};var it=class extends f{constructor(){super();this.localize=new L(this);this.hasSlotController=new A(this,"transcript");this.reversedLayout=!1;this.hideTimestamps=!1;this.animated=!1;this.inverted=!1;this.speed=1;this.currentTime=this.formatTime(0);this.duration="";this.isPlaying=!1;this.isMuted=!1;this.isTranscriptOpen=!1;this.progress=0;this.updateCurrentTime=this.updateCurrentTime.bind(this),this.handleAudioEnd=this.handleAudioEnd.bind(this),this.handleAudioProgress=this.handleAudioProgress.bind(this),this.handleAudioProgressKeydown=this.handleAudioProgressKeydown.bind(this),this.handleTranscriptDrawerToggle=this.handleTranscriptDrawerToggle.bind(this)}firstUpdated(){this.audioElement&&(this.audioElement.addEventListener("timeupdate",this.updateCurrentTime),this.audioElement.addEventListener("ended",this.handleAudioEnd),this.audioElement.setAttribute("controlsList","nodownload"),document.addEventListener("sd-after-hide",this.handleTranscriptDrawerToggle),this.audioElement.playbackRate=this.speed,this.progressSlider.tooltipFormatter=t=>this.localize.term("seconds",Number(t).toFixed(0)),this.animated&&this.initAnimation())}updated(t){if(t.has("animated")){let e=t.get("animated");!e&&this.animated?this.initAnimation():e&&!this.animated&&this.clear()}}get audioElement(){let t=this.shadowRoot.querySelector("slot");return(t==null?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}updateCurrentTime(){if(!this.audioElement)return;let t=this.audioElement.currentTime;this.currentTime=this.formatTime(t),this.progress=t,this.progressSlider&&(this.progressSlider.value=this.progress.toString())}updateAudioDuration(){if(this.audioElement){if(isNaN(this.audioElement.duration)){setTimeout(()=>{this.updateAudioDuration()},100);return}this.duration=this.formatTime(this.audioElement.duration),this.progressSlider.max=this.audioElement.duration}}playAudio(){this.audioElement&&(this.isPlaying=!0,this.audioElement.play(),this.emit("sd-playback-start"),this.animated&&this.draw())}pauseAudio(){this.audioElement&&(this.isPlaying=!1,this.audioElement.pause(),this.emit("sd-playback-pause"),this.animated&&this.stopAnimation())}handleAudioEnd(){this.emit("sd-playback-end"),this.isPlaying=!1,this.progress=0,this.progressSlider.value="0",this.currentTime=this.formatTime(0),this.animated&&this.stopAnimation()}toggleMute(){this.audioElement&&(this.isMuted=!this.isMuted,this.isMuted?(this.emit("sd-playback-mute"),this.audioElement.muted=!0):(this.emit("sd-playback-unmute"),this.audioElement.muted=!1))}toggleMuteKeydown(t){t.key==="Enter"&&(t.preventDefault(),this.toggleMute())}togglePlaybackSpeed(){this.audioElement&&(this.emit("sd-playback-speed"),this.speed=this.speed===1.5?1:this.speed+.25,this.audioElement.playbackRate=this.speed)}togglePlaybackSpeedKeydown(t){t.key==="Enter"&&(t.preventDefault(),this.togglePlaybackSpeed())}formatTime(t){let e=Math.floor(t/60).toString().padStart(2,"0"),r=Math.floor(t%60).toString().padStart(2,"0");return`${e}:${r}`}handleAudioProgress(){if(!this.audioElement)return;let t=Number(this.progressSlider.value);this.audioElement.currentTime=t,this.progress=t,this.currentTime=this.formatTime(t)}handleAudioProgressKeydown(t){t.key==="ArrowRight"&&(this.progressSlider.value=(Number(this.progressSlider.value)+1).toString(),this.handleAudioProgress()),t.key==="ArrowLeft"&&(this.progressSlider.value=(Number(this.progressSlider.value)-1).toString(),this.handleAudioProgress())}handleTranscriptDrawerToggle(){this.isTranscriptOpen=!this.isTranscriptOpen}handleThumbGrab(){var t;(t=this.audioElement)==null||t.pause()}handleThumbRelease(){var t;this.isPlaying&&((t=this.audioElement)==null||t.play())}showTranscript(){this.emit("sd-transcript-click"),this.drawer.open=!0,this.handleTranscriptDrawerToggle()}showTranscriptKeydown(t){(t.key==="Enter"||t.key===" ")&&this.showTranscript()}rgbToHex(t){let e=t.match(/\d+/g);if(e&&e.length===3){let r=parseInt(e[0]),o=parseInt(e[1]),n=parseInt(e[2]),d=p=>p.toString(16).padStart(2,"0");return`#${d(r)}${d(o)}${d(n)}`.toUpperCase()}return null}initAnimation(){this.context=this.canvas.getContext("2d");let t=this.audioPlayerContainer.querySelector(".playback-speed"),r=window.getComputedStyle(t).color,o;this.inverted?o="#FFFFFF33":o=this.rgbToHex(r)+"33",this.waveList=[new ze({canvas:this.canvas,color:o,phase:240,shift:1.5,amplitude:230,frequency:.012,damping:1}),new ze({canvas:this.canvas,color:o,phase:180,shift:2.5,amplitude:250,frequency:.005,damping:1}),new ze({canvas:this.canvas,color:o,phase:180,shift:-2.5,amplitude:250,frequency:.005,damping:1}),new ze({canvas:this.canvas,color:o,phase:180,shift:-1,amplitude:200,frequency:.018,damping:1}),new ze({canvas:this.canvas,color:o,phase:180,shift:1.5,amplitude:150,frequency:.01,damping:1})],this.animated&&this.drawStillWaves()}drawStillWaves(){this.waveList.forEach(t=>{t.redraw()})}stopAnimation(){this.isPlaying=!1}clear(){!this.context||!this.canvas||this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}async draw(){!this.isPlaying||!this.animated||(this.clear(),this.waveList.forEach(t=>{t.redraw()}),await new Promise(t=>{setTimeout(t,1e3/30)}),await this.draw())}render(){let t=u`<div class="${c("controls grid grid-cols-3 justify-items-center items-center",this.reversedLayout?"mt-2":"mb-2",!this.animated&&"relative",this.animated&&!this.reversedLayout&&"absolute -top-4 left-0 w-full")}" part="audio-controls"><button class="${c("playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.localize.term("playbackSpeed")} (${this.speed}x)" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-button ?inverted="${!!this.inverted}" part="play-button" size="lg" @click="${this.isPlaying?this.pauseAudio:this.playAudio}" aria-label="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" title="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" class="mb-4">${this.isPlaying?u`<slot name="pause-icon"><sd-icon class="text-xl" name="pause" library="_internal"></sd-icon></slot>`:u`<slot name="play-icon"><sd-icon class="text-xl" name="start" library="_internal"></sd-icon></slot>`}</sd-button><div class="flex items-center gap-6 justify-self-end">${this.hasSlotController.test("transcript")?u`<button class="${c("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.isTranscriptOpen?this.localize.term("transcriptIsOpen"):this.localize.term("openTranscript")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" part="transcript"><sd-icon class="w-6 h-6" name="transcript" library="_internal"></sd-icon></button>`:null} <button class="${c("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" part="volume" aria-label="${this.isMuted?this.localize.term("unmute"):this.localize.term("mute")}" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-icon class="w-6 h-6" name="${this.isMuted?"mute":"volume"}" library="_internal"></sd-icon></button></div></div>`,e=u`<div class="${c("w-full flex justify-between",this.reversedLayout?"mb-0.5":"mt-0.5",this.animated&&this.reversedLayout&&"absolute bottom-0 left-0 !mb-4")}" part="timestamps"><div class="${c("current-time text-sm",this.inverted?"text-primary-400":"text-black")}">${this.currentTime}</div><div class="${c("current-time text-sm",this.inverted?"text-primary-400":"text-black")}">${this.duration}</div></div>`;return u`<div class="${c("w-full flex relative",this.reversedLayout?"flex-col-reverse":"flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated||this.animated&&this.reversedLayout?t:null}<div class="relative">${this.animated&&!this.reversedLayout?u`${t}`:null} ${this.animated?u`<canvas class="w-full h-16 -mb-2"></canvas>`:null} ${!this.hideTimestamps&&this.animated&&this.reversedLayout?e:null}<sd-range part="progress-slider" no-tooltip min="0" max="100" step="0.001" label="${this.localize.term("seekBar")}" @mousedown="${this.handleThumbGrab}" @touchstart="${this.handleThumbGrab}" @mouseup="${this.handleThumbRelease}" @touchend="${this.handleThumbRelease}" @sd-input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}"></sd-range></div>${this.hasSlotController.test("transcript")?u`<sd-drawer><slot name="transcript"></slot></sd-drawer>`:null} ${!this.hideTimestamps&&(!this.animated||!this.reversedLayout)?e:null}</div>`}};it.styles=[...f.styles,y`sd-button::part(base){align-items:center;border-radius:var(--sd-border-radius-full,9999px);display:flex;height:var(--sd-spacing-12,3rem);justify-content:center;width:var(--sd-spacing-12,3rem)}sd-button::part(motion-wrapper){border-radius:var(--sd-border-radius-full,9999px)}sd-button::part(label){align-items:center;display:flex;flex-grow:0}sd-range::part(form-control-label){display:none}:host([inverted]) sd-range::part(thumb){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));outline-color:rgb(var(--sd-color-white,255 255 255)/1)}:host([animated]) sd-range::part(track){background-color:transparent}:host([inverted]:not([animated])) sd-range::part(track){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-400,153 171 208)/var(--tw-bg-opacity,1))}:host([inverted]:not([animated])) sd-range::part(active-track){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1))}`],a([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],it.prototype,"reversedLayout",2),a([l({type:Boolean,reflect:!0,attribute:"hide-timestamps"})],it.prototype,"hideTimestamps",2),a([l({type:Boolean,reflect:!0})],it.prototype,"animated",2),a([l({type:Boolean,reflect:!0})],it.prototype,"inverted",2),a([l({type:Number,reflect:!0})],it.prototype,"speed",2),a([E()],it.prototype,"currentTime",2),a([E()],it.prototype,"duration",2),a([E()],it.prototype,"isPlaying",2),a([E()],it.prototype,"isMuted",2),a([E()],it.prototype,"isTranscriptOpen",2),a([E()],it.prototype,"progress",2),a([g('[part="progress-slider"]')],it.prototype,"progressSlider",2),a([g('[part="audio-player"]')],it.prototype,"audioPlayerContainer",2),a([g("sd-drawer")],it.prototype,"drawer",2),a([g("canvas")],it.prototype,"canvas",2),it=a([v("sd-audio")],it);var ee=class extends f{constructor(){super(...arguments);this.size="lg";this.variant="blue";this.inverted=!1}render(){return u`<span part="base" aria-labelledby="content" class="${c("inline-flex items-center justify-center gap-x-[1px] text-center font-bold whitespace-nowrap border rounded-full select-none cursor-[inherit]",{blue:this.inverted?"text-primary bg-primary-100 border-primary":"text-white bg-primary-500 border-white",green:this.inverted?"text-white bg-success border-primary":"text-white bg-success border-white",red:this.inverted?"text-white bg-error border-primary":"text-white bg-error border-white"}[this.variant])}"><span id="content" part="content" class="${c(this.size==="sm"&&"sr-only")}"><slot></slot></span></span>`}};ee.styles=[...f.styles,y`:host{align-items:center;display:inline-flex;justify-content:center}:host([size=md]){font-size:.625rem;height:var(--sd-spacing-4,1rem);min-width:var(--sd-spacing-4,1rem)}:host([size=lg]){font-size:.75rem;height:var(--sd-spacing-5,1.25rem);min-width:var(--sd-spacing-5,1.25rem)}:host([size=sm])::part(base){height:var(--sd-spacing-2,.5rem);min-width:var(--sd-spacing-2,.5rem)}:host([size=md])::part(base){padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}:host([size=lg])::part(base){padding-left:.313rem;padding-right:.313rem}`],a([l({type:String,reflect:!0})],ee.prototype,"size",2),a([l({type:String,reflect:!0})],ee.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],ee.prototype,"inverted",2),ee=a([v("sd-badge")],ee);var jt=class extends f{constructor(){super(...arguments);this.variant="primary";this.shapes=["top","middle","bottom"];this.componentBreakpoint=0}getSvg(t,e){return{0:this.smallSvg(e),414:this.mediumSvg(e),640:this.largeSvg(e)}[t]}largeSvg(t){return t==="top"?u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 121"><path d="M610.777 1.393.001 120.146 0 123h700.001V74.79c0-4.797-.462-9.585-1.381-14.294-7.909-40.537-47.237-66.998-87.843-59.103Z"/></svg>`:u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 123"><path d="M89.224 121.607 700 2.854 700.001 0h-700L0 48.21c0 4.797.463 9.584 1.381 14.294 7.909 40.537 47.237 66.998 87.843 59.103Z"/></svg>`}mediumSvg(t){return t==="top"?u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 119"><path d="M597.75 1.6 0 118.046V121h700V85.872c0-5.509-.53-11.006-1.583-16.413-9.063-46.543-54.133-76.924-100.667-67.86Z"/></svg>`:u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 121"><path d="M102.25 119.4 700 2.954V0H0v35.128c0 5.509.53 11.006 1.583 16.413 9.063 46.543 54.134 76.924 100.667 67.859Z"/></svg>`}smallSvg(t){return t==="top"?u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 113"><path d="M566.951 2.08 0 112.466v2.934h700v-3.672c0-7.166-.689-14.314-2.059-21.348-11.789-60.557-70.436-100.09-130.99-88.3Z"/></svg>`:u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 116"><path d="M133.049 113.32 700 2.934V0H0v3.672c0 7.165.69 14.314 2.059 21.348 11.79 60.557 70.436 100.09 130.99 88.3Z"/></svg>`}setBreakpoint(){switch(!0){case this.containerElem.clientWidth<=414:this.componentBreakpoint=0;break;case this.containerElem.clientWidth<640:this.componentBreakpoint=414;break;default:this.componentBreakpoint=640}}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.setBreakpoint()),this.updateComplete.then(()=>{this.setBreakpoint(),this.resizeObserver.observe(this.containerElem)})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.containerElem)}renderTopBrandshape(){return u`<div class="relative" part="shape-top">${this.getSvg(this.componentBreakpoint,"top")} ${this.renderWhitespaceFix("top")}</div>`}renderMiddleBrandshape(){return u`<div class="${c({0:"px-6 py-4",414:"px-10 py-8",640:"px-10 py-8"}[this.componentBreakpoint],"w-full block relative")}"><div part="shape-middle" class="${c({"neutral-100":"bg-neutral-100",primary:"bg-primary",white:"bg-white","border-white":"bg-transparent","border-primary":"bg-transparent",image:"bg-transparent"}[this.variant],"w-full block absolute h-full top-0 left-0 z-0")}"></div><div class="${c("z-10 relative",this.variant==="image"&&"invisible opacity-0")}" part="content"><slot>${this.variant==="image"?"":u`<div class="h-8"></div>`}</slot></div></div>`}renderBottomBrandshape(){return u`<div class="relative" part="shape-bottom">${this.getSvg(this.componentBreakpoint,"bottom")}${this.renderWhitespaceFix("bottom")}</div>`}renderWhitespaceFix(t){return u`<div class="${c({"neutral-100":"bg-neutral-100",primary:"bg-primary",white:"bg-white","border-white":"bg-transparent","border-primary":"bg-transparent",image:"bg-transparent"}[this.variant],{top:"bottom-0",bottom:"top-0"}[t],"block absolute left-0 w-full h-[1px]")}"></div>`}renderStylizedVariant(){return u`<div part="stylized-container" class="w-full overflow-hidden"><slot class="${c(this.variant!=="image"&&"hidden")}" name="image"></slot></div>`}renderShapes(){return u`${this.shapes.includes("top")?this.renderTopBrandshape():""} ${this.shapes.includes("middle")?this.renderMiddleBrandshape():""} ${this.shapes.includes("bottom")?this.renderBottomBrandshape():""}`}render(){let t=this.variant.startsWith("border-")||this.variant==="image";return u`<div class="${c({"neutral-100":"fill-neutral-100",primary:"fill-primary",white:"fill-white","border-white":"fill-transparent","border-primary":"fill-transparent",image:"fill-transparent"}[this.variant],"relative")}" part="base">${t?this.renderStylizedVariant():""} ${this.renderShapes()}</div>`}};jt.styles=[...f.styles,y`:host{container-type:inline-size;display:block;--angle:11deg;--radius:60px;--tan:tan(var(--angle));--adjacent:100cqw;--opposite:calc(var(--tan)*var(--adjacent));--curve:calc((var(--opposite) - (var(--radius)/3))*0.5)}@supports not (transform:skewY(11deg)){:host{--tan:0.1943803091}}@media (min-width:415px){:host{--radius:72px}}@media (min-width:640px){:host{--radius:84px}}:host([variant=image]) [part=stylized-container],:host([variant^=border-]) [part=stylized-container]:before{border-radius:0 var(--radius);height:calc(100% - var(--curve)*2);left:var(--sd-spacing-0,0);margin-top:calc(var(--curve));position:absolute;top:var(--sd-spacing-0,0);transform:skewY(calc(var(--angle)*-1))}slot[name=image]::slotted(img),slot[name=image]::slotted(video){height:calc(100% + var(--curve)*2)!important;-o-object-fit:cover;object-fit:cover;position:absolute!important;transform:translateY(calc(var(--curve)*-1)) skewY(var(--angle));width:100%}@supports not (height:100cqw){:host([variant=image]) [part=stylized-container],:host([variant^=border-]) [part=stylized-container]:before{height:100%;margin-top:0;transform:unset}slot[name=image]::slotted(img),slot[name=image]::slotted(video){height:100%!important;transform:unset}}:host([variant=border-primary]){--internal-border-color:rgb(var(--sd-color-primary,0 53 142))}:host([variant=border-white]){--internal-border-color:var(--sd-color-white,#fff)}:host([variant^=border-]) [part=stylized-container]:before{border-color:var(--internal-border-color,#000);border-style:solid;border-width:2px;content:"";right:var(--sd-spacing-0,0)}`],a([g("[part=base]")],jt.prototype,"containerElem",2),a([l({type:String,reflect:!0})],jt.prototype,"variant",2),a([l({type:Array})],jt.prototype,"shapes",2),a([E()],jt.prototype,"componentBreakpoint",2),jt=a([v("sd-brandshape")],jt);var Tt=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.label="";this.itemPositionsCached=!1;this.isTruncated=!1}get items(){return this.querySelectorAll("sd-breadcrumb-item")}cacheItemPositions(){this.items.forEach(t=>{let{width:e}=t.getBoundingClientRect();t.dataset.size=`${e}`}),this.itemPositionsCached=!0}handleTruncation(){var o;if(document.documentElement.clientWidth<=1024)return;let{width:t}=this.base.getBoundingClientRect(),{width:e}=this.truncated.getBoundingClientRect();this.itemPositionsCached||this.cacheItemPositions(),this.dropdown.innerHTML="",this.isTruncated=!1;let r=0;for(let[n,d]of Array.from(this.items).reverse().entries()){let h=parseFloat(`${(o=d.dataset.size)!=null?o:d.getBoundingClientRect().width}`);if(d.hidden=!1,this.isTruncated){let p=d.cloneNode(!0);this.dropdown.prepend(p),d.hidden=!0;continue}if(n===0||n===1){r+=h;continue}if(this.isTruncated=r+h+e>t,this.isTruncated){let p=d.cloneNode(!0);this.dropdown.prepend(p),d.hidden=!0}else r+=h}}handleMobileChevron(){var e,r,o;let t=document.createElement("sd-icon");t.setAttribute("slot","icon-left"),t.setAttribute("library","_internal"),t.setAttribute("name","chevron-left"),t.setAttribute("class","text-base me-1 lg:hidden"),(o=(r=(e=Array.from(this.items).at(-2))==null?void 0:e.shadowRoot)==null?void 0:r.querySelector("sd-link"))==null||o.appendChild(t)}handleSlotChange(){this.handleMobileChevron()}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.handleTruncation()),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this)}render(){return u`<nav part="base" class="flex items-center pb-1" aria-label="${this.label}"><sd-dropdown part="truncated" class="${c(!this.isTruncated&&"absolute opacity-0 pointer-events-none")}"><button slot="trigger" tabindex="${this.isTruncated?"0":"-1"}" aria-label="${this.localize.term("truncatedBreadcrumbs")}" aria-expanded="false" aria-haspopup="true" class="flex sd-interactive">[...]</button><ol part="truncated-dropdown" class="flex flex-col gap-4 px-2 py-3 min-w-40"></ol></sd-dropdown><ol part="list" class="flex items-center"><slot @slotchange="${this.handleSlotChange}"></slot></ol></nav>`}};Tt.styles=[...f.styles,y`:host{display:block;position:relative}::slotted(sd-breadcrumb-item:not(:last-of-type)):after,sd-dropdown:after{border-radius:var(--sd-border-radius-full,9999px);content:var(--tw-content);display:none;height:var(--sd-spacing-1,.25rem);margin-left:var(--sd-spacing-2,.5rem);margin-right:var(--sd-spacing-2,.5rem);width:var(--sd-spacing-1,.25rem);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-bg-opacity,1))}@media (min-width:1024px){::slotted(sd-breadcrumb-item:not(:last-of-type)):after,sd-dropdown:after{content:var(--tw-content);display:inline-block}}::slotted(sd-breadcrumb-item:nth-last-child(2)){display:flex}@media (min-width:1024px){::slotted(sd-breadcrumb-item:nth-last-child(2)):after{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-accent,45 157 0)/var(--tw-bg-opacity,1))}}::slotted(sd-breadcrumb-item),sd-dropdown{align-items:center;display:none}@media (min-width:1024px){::slotted(sd-breadcrumb-item),sd-dropdown{display:flex}}`],a([g('[part="base"]')],Tt.prototype,"base",2),a([g('[part="truncated"]')],Tt.prototype,"truncated",2),a([g('[part="truncated-dropdown"]')],Tt.prototype,"dropdown",2),a([g("slot")],Tt.prototype,"defaultSlot",2),a([l({type:String,reflect:!0})],Tt.prototype,"label",2),a([E()],Tt.prototype,"itemPositionsCached",2),a([E()],Tt.prototype,"isTruncated",2),Tt=a([v("sd-breadcrumb")],Tt);var Ft=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.href="";this.current=!1}handleCurrentChange(){var t,e;!this.base||!this.current||(e=(t=this.base.shadowRoot)==null?void 0:t.querySelector("a"))==null||e.setAttribute("aria-current","page")}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","listitem"),super.connectedCallback()}firstUpdated(){requestAnimationFrame(()=>this.handleCurrentChange())}render(){return u`<sd-link part="base" href="${w(this.current?void 0:this.href)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-link>`}};Ft.styles=[...f.styles,y`:host{align-items:center;display:inline-flex}sd-link::part(base){align-items:center}sd-link::part(icon-left){display:inline-flex;margin-right:var(--sd-spacing-0,0)}sd-link sd-icon{margin:var(--sd-spacing-0,0)}:host([current]) sd-link::part(base){--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-700,104 104 104)/var(--tw-text-opacity,1))}:host([current]) sd-link::part(label){text-decoration-line:none}`],a([g('[part="base"]')],Ft.prototype,"base",2),a([l({type:String,reflect:!0})],Ft.prototype,"href",2),a([l({type:String,reflect:!0})],Ft.prototype,"target",2),a([l({type:Boolean,reflect:!0})],Ft.prototype,"current",2),a([x("current")],Ft.prototype,"handleCurrentChange",1),Ft=a([v("sd-breadcrumb-item")],Ft);var ir=class{constructor(i,t){this.timerId=0;this.activeInteractions=0;this.paused=!1;this.stopped=!0;this.pause=()=>{this.activeInteractions++||(this.paused=!0,this.host.requestUpdate())};this.resume=()=>{--this.activeInteractions||(this.paused=!1,this.host.requestUpdate())};i.addController(this),this.host=i,this.tickCallback=t}hostConnected(){this.host.addEventListener("mouseenter",this.pause),this.host.addEventListener("mouseleave",this.resume),this.host.addEventListener("focusin",this.pause),this.host.addEventListener("focusout",this.resume),this.host.addEventListener("touchstart",this.pause,{passive:!0}),this.host.addEventListener("touchend",this.resume)}hostDisconnected(){this.stop(),this.host.removeEventListener("mouseenter",this.pause),this.host.removeEventListener("mouseleave",this.resume),this.host.removeEventListener("focusin",this.pause),this.host.removeEventListener("focusout",this.resume),this.host.removeEventListener("touchstart",this.pause),this.host.removeEventListener("touchend",this.resume)}start(i){this.stop(),this.stopped=!1,this.timerId=window.setInterval(()=>{this.paused||this.tickCallback()},i)}stop(){clearInterval(this.timerId),this.stopped=!0,this.host.requestUpdate()}};function Ws(s,i,t){let e=r=>Object.is(r,-0)?0:r;return s<i?e(i):s>t?e(t):e(s)}var rr=class{constructor(i){this.heightCalculated=!1;this.isEnabled=!1;this.isCalculating=!1;this.fadeClasses={base:["absolute","top-0","left-0","w-full","h-full","visible","transition-opacity","duration-x-slow","ease-in-out"],active:["opacity-100","z-[1]"],inactive:["opacity-0","z-0"]};this.handleResize=()=>{this.isEnabled&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.isEnabled&&(this.heightCalculated=!1,this.calculateHeight())},250))};this.carousel=i}enable(){this.isEnabled||(this.isEnabled=!0,this.calculateHeight(),window.addEventListener("resize",this.handleResize))}disable(){this.isEnabled&&(this.isEnabled=!1,this.removeFadeStyles(),this.carousel.style.removeProperty("--carousel-height"),this.carousel.scrollContainer&&this.carousel.scrollContainer.style.removeProperty("height"),this.heightCalculated=!1,this.isCalculating=!1,window.removeEventListener("resize",this.handleResize),this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0))}updateActiveSlide(i){if(!this.isEnabled)return;this.carousel.getSlides().forEach((e,r)=>{r===i?this.show(e):this.hide(e)})}show(i){if(!this.isEnabled)return;let t=i.classList;t.remove(...this.getAllFadeClasses()),t.add(...this.fadeClasses.base,...this.fadeClasses.active),i.removeAttribute("inert"),i.setAttribute("aria-hidden","false")}hide(i){if(!this.isEnabled)return;let t=i.classList;t.remove(...this.getAllFadeClasses()),t.add(...this.fadeClasses.base,...this.fadeClasses.inactive),i.toggleAttribute("inert",!0),i.setAttribute("aria-hidden","true")}removeFadeStyles(){this.carousel.getSlides().forEach(t=>{t.classList.remove(...this.getAllFadeClasses()),t.removeAttribute("inert"),t.removeAttribute("aria-hidden")})}getAllFadeClasses(){return[...this.fadeClasses.base,...this.fadeClasses.active,...this.fadeClasses.inactive]}calculateHeight(){if(this.heightCalculated||!this.isEnabled||this.isCalculating)return;let i=this.carousel.getSlides(),t=this.carousel.scrollContainer;if(i.length===0||!t)return;this.isCalculating=!0,t.style.removeProperty("height"),this.carousel.style.removeProperty("--carousel-height");let e=i.map(r=>{let o=r,n={position:o.style.position,opacity:o.style.opacity,zIndex:o.style.zIndex,transform:o.style.transform,classes:o.className};return o.classList.remove(...this.getAllFadeClasses()),o.classList.add("relative","opacity-1","z-auto","transform-none"),n});requestAnimationFrame(()=>{if(!this.isEnabled){this.isCalculating=!1;return}let r=i.map(n=>n.getBoundingClientRect().height),o=Math.max(...r);i.forEach((n,d)=>{let h=n,p=e[d];h.className=p.classes,["position","opacity","zIndex","transform"].forEach(m=>{let b=p[m];b?h.style.setProperty(m,b):h.style.removeProperty(m)})}),o>0&&(this.carousel.style.setProperty("--carousel-height",`${o}px`),t.style.height=`${o}px`,this.heightCalculated=!0,this.updateActiveSlide(this.carousel.activeSlide)),this.isCalculating=!1})}recalculateHeight(){this.isEnabled&&(this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0),this.heightCalculated=!1,this.calculateHeight())}};function*Zs(s,i){if(s!==void 0){let t=0;for(let e of s)yield i(e,t++)}}function*Qs(s,i,t=1){let e=i===void 0?0:s;i!=null||(i=s);for(let r=e;t>0?r<i:i<r;r+=t)yield r}var Js=Symbol(),oi=s=>(i,t,e)=>{let r=e.value;e.value=function(...o){clearTimeout(this[Js]),this[Js]=window.setTimeout(()=>{r.apply(this,o)},s)}};var Ti=class{constructor(i){this.pointers=new Set;this.dragging=!1;this.scrolling=!1;this.mouseDragging=!1;this.handleScroll=()=>{this.scrolling||(this.scrolling=!0,this.host.requestUpdate()),this.handleScrollEnd()};this.handlePointerDown=i=>{if(i.pointerType==="touch")return;this.pointers.add(i.pointerId),this.mouseDragging&&!this.dragging&&i.button===0&&(i.preventDefault(),this.host.scrollContainer.addEventListener("pointermove",this.handlePointerMove))};this.handlePointerMove=i=>{let t=this.host.scrollContainer,e=!!i.movementX||!!i.movementY;!this.dragging&&e?(t.setPointerCapture(i.pointerId),this.handleDragStart()):t.hasPointerCapture(i.pointerId)&&this.handleDrag(i)};this.handlePointerUp=i=>{this.pointers.delete(i.pointerId),this.host.scrollContainer.releasePointerCapture(i.pointerId),this.pointers.size===0&&this.handleDragEnd()};this.handleTouchEnd=i=>{for(let t of i.changedTouches)this.pointers.delete(t.identifier)};this.handleTouchStart=i=>{for(let t of i.touches)this.pointers.add(t.identifier)};this.host=i,i.addController(this)}async hostConnected(){let i=this.host;await i.updateComplete;let t=i.scrollContainer;t.addEventListener("scroll",this.handleScroll,{passive:!0}),t.addEventListener("pointerdown",this.handlePointerDown),t.addEventListener("pointerup",this.handlePointerUp),t.addEventListener("pointercancel",this.handlePointerUp),t.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),t.addEventListener("touchend",this.handleTouchEnd)}hostDisconnected(){let t=this.host.scrollContainer;t.removeEventListener("scroll",this.handleScroll),t.removeEventListener("pointerdown",this.handlePointerDown),t.removeEventListener("pointerup",this.handlePointerUp),t.removeEventListener("pointercancel",this.handlePointerUp),t.removeEventListener("touchstart",this.handleTouchStart),t.removeEventListener("touchend",this.handleTouchEnd)}handleScrollEnd(){this.pointers.size?this.handleScrollEnd():(this.scrolling=!1,this.host.scrollContainer.dispatchEvent(new CustomEvent("scrollend",{bubbles:!1,cancelable:!1})),this.host.requestUpdate())}handleDragStart(){let i=this.host;this.dragging=!0,i.scrollContainer.style.setProperty("scroll-snap-type","unset"),i.requestUpdate()}handleDrag(i){this.host.scrollContainer.scrollBy({left:-i.movementX,top:-i.movementY})}async handleDragEnd(){let i=this.host,t=i.scrollContainer;t.removeEventListener("pointermove",this.handlePointerMove),this.dragging=!1;let e=t.scrollLeft,r=t.scrollTop;t.style.removeProperty("scroll-snap-type");let o=t.scrollLeft,n=t.scrollTop;t.style.setProperty("scroll-snap-type","unset"),t.scrollTo({left:e,top:r,behavior:"auto"}),t.scrollTo({left:o,top:n,behavior:xi()?"auto":"smooth"}),this.scrolling&&await q(t,"scrollend"),t.style.removeProperty("scroll-snap-type"),i.requestUpdate()}};a([oi(100)],Ti.prototype,"handleScrollEnd",1);var ue=class extends f{static isCarouselItem(i){return i instanceof Element&&i.getAttribute("aria-roledescription")==="slide"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group")}render(){return u`<slot></slot>`}};ue.styles=[...f.styles,y`:host{align-items:center;aspect-ratio:var(--aspect-ratio);display:flex;flex-direction:column;height:100%;justify-content:center;scroll-snap-align:start;scroll-snap-stop:always;width:100%}::slotted(img){height:100%;-o-object-fit:cover;object-fit:cover;width:100%}`],ue=a([v("sd-carousel-item")],ue);var j=class extends f{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.fade=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.autoplayController=new ir(this,()=>this.next());this.scrollController=new Ti(this);this.slides=this.getElementsByTagName("sd-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new L(this);this.userInteracted=!1;this.fadeController=new rr(this);this.handleUserInteraction=()=>{this.userInteracted=!0};this.handleSlotChange=t=>{t.some(r=>[...r.addedNodes,...r.removedNodes].some(o=>ue.isCarouselItem(o)&&!o.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()};this.unblockAutoplay=(t,e)=>{t.detail&&e.blur()}}connectedCallback(){super.connectedCallback(),["click","keydown"].forEach(e=>this.addEventListener(e,this.handleUserInteraction));let t=new IntersectionObserver(e=>{e.forEach(r=>{this.intersectionObserverEntries.set(r.target,r);let o=r.target;o.toggleAttribute("inert",!r.isIntersecting),o.classList.toggle("--in-view",r.isIntersecting),o.setAttribute("aria-hidden",r.isIntersecting?"false":"true")})},{root:this,threshold:.6});this.intersectionObserver=t,t.takeRecords().forEach(e=>{this.intersectionObserverEntries.set(e.target,e)})}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect(),["click","keydown"].forEach(t=>this.removeEventListener(t,this.handleUserInteraction)),this.fade&&this.fadeController.disable()}async firstUpdated(){this.initializeSlides(),this.mutationObserver=new MutationObserver(this.handleSlotChange),this.mutationObserver.observe(this,{childList:!0,subtree:!1}),this.fade&&(await this.updateComplete,this.fadeController.enable())}getPageCount(t,e,r){return Math.ceil((t-e)/r)+1>0?Math.ceil((t-e)/r)+1:1}getCurrentPage(t,e,r,o){return Math.ceil((t-r)/o)-Math.ceil((t-r-e)/o)+1}getSlides({excludeClones:t=!0}={}){return[...this.slides].filter(e=>!t||!e.hasAttribute("data-clone"))}handleKeyDown(t){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let e=t.target,r=this.localize.dir()==="rtl",o=e.closest('[part~="pagination-item"]')!==null,n=t.key==="ArrowDown"||!r&&t.key==="ArrowRight"||r&&t.key==="ArrowLeft",d=t.key==="ArrowUp"||!r&&t.key==="ArrowLeft"||r&&t.key==="ArrowRight";t.preventDefault(),d&&this.previous(),n&&this.next(),t.key==="Home"&&this.goToSlide(0),t.key==="End"&&this.goToSlide(this.getSlides().length-1),o&&this.updateComplete.then(()=>{var p;let h=(p=this.shadowRoot)==null?void 0:p.querySelector('[part~="pagination-item--active"]');h&&h.focus()})}}handleScrollEnd(){if(this.fade)return;let t=this.getSlides(),r=[...this.intersectionObserverEntries.values()].find(o=>o.isIntersecting);if(this.loop&&(r!=null&&r.target.hasAttribute("data-clone"))){let o=Number(r.target.getAttribute("data-clone"));this.goToSlide(o,"auto");return}r&&(this.activeSlide=t.indexOf(r.target))}handleFocus(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","polite")}handleBlur(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","off")}pause(){this.pausedAutoplay=!0}resume(){this.pausedAutoplay=!1}handlePausedAutoplay(){var t,e;this.pausedAutoplay?(this.autoplayController.stop(),(t=this.autoplayControls)==null||t.setAttribute("aria-pressed","false")):this.autoplay&&(this.autoplayController.start(3e3),(e=this.autoplayControls)==null||e.setAttribute("aria-pressed","true"))}handleFadeChange(){this.fade?this.fadeController.enable():this.fadeController.disable()}initializeSlides(){let t=this.getSlides(),e=this.intersectionObserver;if(this.intersectionObserverEntries.clear(),this.getSlides({excludeClones:!1}).forEach((r,o)=>{e.unobserve(r),r.classList.remove("--in-view"),r.classList.remove("--is-active"),r.setAttribute("aria-label",this.localize.term("slideNum",o+1,t.length)),r.hasAttribute("data-clone")&&r.remove()}),this.loop&&!this.fade){let r=this.slidesPerPage,o=t.slice(-r),n=t.slice(0,r);o.reverse().forEach((d,h)=>{let p=d.cloneNode(!0);p.setAttribute("data-clone",String(t.length-h-1)),this.prepend(p)}),n.forEach((d,h)=>{let p=d.cloneNode(!0);p.setAttribute("data-clone",String(h)),this.append(p)})}this.getSlides({excludeClones:!1}).forEach(r=>{e.observe(r)}),this.fade&&this.updateComplete.then(()=>{this.fadeController.enable()}),this.fade||this.goToSlide(this.activeSlide,"auto")}handleSlideChange(){let t=this.getSlides();t.forEach((o,n)=>{o.classList.toggle("--is-active",n===this.activeSlide)}),this.fade&&this.fadeController.updateActiveSlide(this.activeSlide);let e=this.getCurrentPage(t.length,this.activeSlide,this.slidesPerPage,this.slidesPerMove);this.currentPage!==e&&(this.currentPage=e),this.hasUpdated&&this.emit("sd-slide-change",{detail:{index:this.activeSlide,slide:t[this.activeSlide]}});let r=this.getPageCount(t.length,this.slidesPerPage,this.slidesPerMove);this.currentPage>r&&requestAnimationFrame(()=>{this.nextTillFirst()})}handleSlidesPerMoveChange(){if(this.fade)return;let t=this.getSlides({excludeClones:!1}),e=this.slidesPerMove;t.forEach((r,o)=>{Math.abs(o-e)%e===0?r.style.removeProperty("scroll-snap-align"):r.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&!this.pausedAutoplay&&this.autoplayController.start(3e3)}previous(t="smooth"){if(this.fade){let o=this.loop?(this.activeSlide-1+this.getSlides().length)%this.getSlides().length:Math.max(0,this.activeSlide-1);this.goToSlide(o);return}let e=this.activeSlide||this.activeSlide-this.slidesPerMove,r=!1;for(;!r&&e>0;)e-=1,r=Math.abs(e-this.slidesPerMove)%this.slidesPerMove===0;this.currentPage-1===0&&this.loop?this.goToSlide(this.activeSlide-this.slidesPerPage,t):this.goToSlide(e,t)}next(t="smooth"){if(this.fade){let e=this.loop?(this.activeSlide+1)%this.getSlides().length:Math.min(this.getSlides().length-1,this.activeSlide+1);this.goToSlide(e);return}this.currentPage+1<=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove)?this.goToSlide(this.activeSlide+this.slidesPerMove,t):this.loop&&this.nextTillFirst(t)}nextTillFirst(t="smooth"){if(this.fade){this.goToSlide(0);return}for(;this.activeSlide!==0;)this.goToSlide(this.activeSlide+1,t);this.currentPage=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove)}goToSlide(t,e="smooth"){let{slidesPerPage:r,loop:o,scrollContainer:n,fade:d}=this,h=this.getSlides(),p=this.getSlides({excludeClones:!1}),m=(t+h.length)%h.length;if(this.activeSlide=m,d)return;let b=Ws(t+(o?r:0),0,p.length+1),C=p[b],k=n.getBoundingClientRect(),$=C.getBoundingClientRect();if(n.scrollTo({left:$.left-k.left+n.scrollLeft,top:$.top-k.top+n.scrollTop,behavior:xi()?"auto":e}),this.userInteracted&&!this.loop){let z=this.activeSlide===h.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,S=this.activeSlide===0;z?this.previousButton.focus({preventScroll:!0}):S&&this.nextButton.focus({preventScroll:!0})}}render(){let{scrollController:t,slidesPerMove:e}=this,r=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),o=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),n=this.loop||o>1,d=this.loop||o<r,h=this.localize.dir()==="ltr";return u`<div part="base" class="${c("carousel h-full w-full")}"><div id="scroll-container" part="scroll-container" class="${c("carousel__slides mb-6 max-h-full w-full items-center justify-items-center",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.fade?"relative overflow-hidden":"grid overflow-auto overscroll-x-contain grid-flow-col auto-rows-[100%] snap-x snap-mandatory overflow-y-hidden")}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${t.scrolling?"true":"false"}" aria-label="${this.localize.term("carouselContainer",Array.from(this.slides).filter(p=>!p.hasAttribute("data-clone")).length)}" aria-live="${this.autoplay?"off":"polite"}" tabindex="0" @keydown="${this.handleKeyDown}" @scrollend="${this.handleScrollEnd}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"><slot></slot></div><div part="controls" class="${c("w-full flex items-center justify-center relative")}"><div part="navigation" class="${c("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!n}" class="${c("!mr-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!n&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${n?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${n?p=>{this.previous(),this.unblockAutoplay(p,this.previousButton)}:null}"><slot name="previous-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-down":"chevron-up"}"></sd-icon></slot></button> ${this.variant==="dot"?u`<div part="pagination-dot" role="tablist" class="${c("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${Zs(Qs(r),p=>{let m=p+1===o;return u`<button part="pagination-item ${m?"pagination-item--active":""}" class="${c("carousel__pagination-item","block cursor-pointer bg-none border-0 rounded-full",m?"bg-accent":"",this.inverted?"focus-within:focus-outline-inverted":"focus-within:focus-outline")}" role="tab" tabindex="0" aria-selected="${m?"true":"false"}" aria-label="${this.localize.term("goToSlide",p+1,r)}" @click="${b=>{this.goToSlide(p*e),this.unblockAutoplay(b,this.paginationItems[p])}}" @keydown="${this.handleKeyDown}"><span class="${c("h-4 w-4 block border hover:border-primary-500 rounded-full transition-colors duration-slow hover:duration-fast ease-in-out",this.inverted?"border-white hover:border-primary-500":"border-primary",m&&"bg-accent border-none",m?this.inverted?"hover:bg-accent-300":"hover:bg-accent-550":"")}"></span></button>`})}</div>`:u`<span part="pagination-number" class="carousel__pagination number flex gap-0.5 cursor-default select-none" aria-controls="scroll-container"><span part="pagination-item" class="${c("w-5 text-center border-b-2 border-accent",this.inverted?"text-white":"text-black")}">${o}</span> <span part="pagination-divider" class="${c("scale-y-[1.5]","text-center",this.inverted?"text-white":"text-black")}">/</span> <span part="pagination-item" class="${c("w-5 text-center",this.inverted?"text-white":"text-black")}">${r}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!d}" class="${c("!ml-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!d&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${d?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${d?p=>{this.next(),this.unblockAutoplay(p,this.nextButton)}:null}"><slot name="next-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-up":"chevron-down"}"></sd-icon></slot></button></div><button class="${c("ml-6 !rounded-sm","!absolute !right-0 sd-interactive",this.inverted?"sd-interactive--inverted":"sd-interactive--reset",!this.autoplay&&"!hidden")}" part="autoplay-controls" aria-label="${this.localize.term("autoplay")}" aria-pressed="true" @click="${p=>{this.pausedAutoplay=!this.pausedAutoplay,p.detail&&this.autoplayControls.blur()}}"><slot name="autoplay-start" class="${c(this.pausedAutoplay?"":"hidden")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="start"></sd-icon></slot><slot name="autoplay-pause" class="${c(this.pausedAutoplay?"hidden":"")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="pause"></sd-icon></slot></button></div></div>`}};j.styles=[...f.styles,y`:host{--slide-gap:var(--sl-spacing-medium,1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:". slides ." ". pagination ."}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1)*var(--slide-gap))/var(--slides-per-page));-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);grid-auto-columns:var(--slide-size);padding-inline:var(--scroll-hint);scroll-padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}:host([fade]){--carousel-height:auto}:host([fade]) .carousel__slides{display:block;height:var(--carousel-height);overflow:hidden;position:relative}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-button::part(label){align-items:center;display:flex;flex:1 1 auto;pointer-events:none}`],a([g('[part~="autoplay-controls"]')],j.prototype,"autoplayControls",2),a([g('[part~="navigation-button--previous"]')],j.prototype,"previousButton",2),a([g('[part~="navigation-button--next"]')],j.prototype,"nextButton",2),a([Yi('[part~="pagination-item"]')],j.prototype,"paginationItems",2),a([l({type:String,reflect:!0})],j.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],j.prototype,"inverted",2),a([l({type:Boolean,reflect:!0})],j.prototype,"loop",2),a([l({type:Boolean,reflect:!0})],j.prototype,"autoplay",2),a([l({type:Boolean,reflect:!0})],j.prototype,"fade",2),a([l({type:Number,attribute:"slides-per-page",reflect:!0})],j.prototype,"slidesPerPage",2),a([l({type:Number,attribute:"slides-per-move",reflect:!0})],j.prototype,"slidesPerMove",2),a([g("slot:not([name])")],j.prototype,"defaultSlot",2),a([g(".carousel__slides")],j.prototype,"scrollContainer",2),a([g(".carousel__pagination")],j.prototype,"paginationContainer",2),a([E()],j.prototype,"activeSlide",2),a([E()],j.prototype,"currentPage",2),a([E()],j.prototype,"pausedAutoplay",2),a([x("pausedAutoplay")],j.prototype,"handlePausedAutoplay",1),a([x("fade",{waitUntilFirstUpdate:!0})],j.prototype,"handleFadeChange",1),a([x("loop",{waitUntilFirstUpdate:!0}),x("slidesPerPage",{waitUntilFirstUpdate:!0})],j.prototype,"initializeSlides",1),a([x("activeSlide")],j.prototype,"handleSlideChange",1),a([x("slidesPerMove")],j.prototype,"handleSlidesPerMoveChange",1),a([x("autoplay")],j.prototype,"handleAutoplayChange",1),j=a([v("sd-carousel")],j);var Lt=(s="value")=>(i,t)=>{let e=i.constructor,r=e.prototype.attributeChangedCallback;e.prototype.attributeChangedCallback=function(o,n,d){var m;let h=e.getPropertyOptions(s),p=typeof h.attribute=="string"?h.attribute:s;if(o===p){let b=h.converter||Ee,k=(typeof b=="function"?b:(m=b==null?void 0:b.fromAttribute)!=null?m:Ee.fromAttribute)(d,h.type);this[s]!==k&&(this[t]=k)}r.call(this,o,n,d)}};var{I:Pb}=Cs;var sr=s=>s.strings===void 0;var al={},Gs=(s,i=al)=>s._$AH=i;var me=qt(class extends Te{constructor(s){if(super(s),s.type!==_t.PROPERTY&&s.type!==_t.ATTRIBUTE&&s.type!==_t.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!sr(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[i]){if(i===gt||i===N)return i;let t=s.element,e=s.name;if(s.type===_t.PROPERTY){if(i===t[e])return gt}else if(s.type===_t.BOOLEAN_ATTRIBUTE){if(!!i===t.hasAttribute(e))return gt}else if(s.type===_t.ATTRIBUTE&&t.getAttribute(e)===i+"")return gt;return Gs(s),i}});var tt=class extends f{constructor(){super(...arguments);this.formControlController=new ot(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e});this.title="";this.name="";this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1;this.indeterminate=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}this.checked=!this.checked,this.indeterminate=!1,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false"),this.formControlController.setValidity(t)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.visuallyDisabled?"visuallyDisabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return u`<label part="base" class="${c("sd-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${w(this.value)}" .indeterminate="${me(this.indeterminate)}" .checked="${me(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.indeterminate?"mixed":this.checked}" aria-describedby="invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"} ${this.indeterminate?" control--indeterminate":""}" class="${c("relative flex flex-shrink-0 items-center justify-center border rounded-sm h-4 w-4","transition-colors ease-in-out duration-medium group-hover:duration-fast","peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-primary",{sm:"mt-[2px]",md:"mt-[3px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400",invalid:"border-error group-hover:bg-neutral-200",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"><div class="${c("absolute h-3 transition-[width] right-0.25 duration-medium",this.checked||this.indeterminate?"w-0":"w-3")}"><div class="${c("w-full h-full transition-colors duration-medium ease-in-out group-hover:duration-fast",{disabledIndeterminate:"bg-neutral-500",disabledChecked:" bg-neutral-500",disabled:"",visuallyDisabled:"",invalidIndeterminate:" bg-error group-hover:bg-error-400",invalid:"group-hover:bg-neutral-200",filled:"bg-accent group-hover:bg-accent-550",default:"hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"></div></div>${this.checked?u`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="_internal" name="status-check"></sd-icon>`:""} ${!this.checked&&this.indeterminate?u`<sd-icon part="indeterminate-icon" class="text-white w-3 h-3" library="_internal" name="status-minus"></sd-icon>`:""} </span><span part="label" id="label" class="${c("select-none inline-block ml-2",this.disabled||this.visuallyDisabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};tt.styles=[...f.styles,y`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline-width:0}:host([required]) #label:after{content:" *"}`],a([g('input[type="checkbox"]')],tt.prototype,"input",2),a([g("#invalid-message")],tt.prototype,"invalidMessage",2),a([l({type:String,reflect:!0})],tt.prototype,"title",2),a([l({type:String,reflect:!0})],tt.prototype,"name",2),a([l()],tt.prototype,"value",2),a([l({type:String,reflect:!0})],tt.prototype,"size",2),a([l({type:Boolean,reflect:!0})],tt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],tt.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],tt.prototype,"checked",2),a([l({type:Boolean,reflect:!0})],tt.prototype,"indeterminate",2),a([Lt("checked")],tt.prototype,"defaultChecked",2),a([l({type:String,reflect:!0})],tt.prototype,"form",2),a([l({type:Boolean,reflect:!0})],tt.prototype,"required",2),a([E()],tt.prototype,"showInvalidStyle",2),a([x(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],tt.prototype,"handleDisabledChange",1),a([x(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],tt.prototype,"handleStateChange",1),tt=a([v("sd-checkbox")],tt);var Dt=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"label","help-text");this.size="lg";this.orientation="vertical";this.label="";this.helpText=""}getAllCheckboxes(){return[...this.querySelectorAll("sd-checkbox")]}async syncCheckboxElements(){let t=this.getAllCheckboxes();await Promise.all(t.map(async e=>{await e.updateComplete,e.size=this.size}))}syncCheckboxes(){customElements.get("sd-checkbox")?this.syncCheckboxElements():customElements.whenDefined("sd-checkbox").then(()=>this.syncCheckboxes())}handleSizeChange(){this.syncCheckboxes()}handleInvalid(){this.syncCheckboxes()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:t,r=this.hasSlotController.test("help-text"),o=this.helpText?!0:r,n=u`<slot @slotchange="${this.syncCheckboxes}"></slot>`,d=this.hasSlotController.test("tooltip");return u`<fieldset part="form-control" class="${c("border-0 p-0 m-0",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="group" aria-labelledby="label">${e||d?u`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${c("p-0 font-bold leading-normal text-black",e?"flex":"hidden")}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${d?u`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c({vertical:"flex flex-col",horizontal:"flex flex-row"}[this.orientation])}">${n}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-2",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot>`}};Dt.styles=[...f.styles,y`:host{display:block}:host([orientation=vertical]) ::slotted(sd-checkbox){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-checkbox:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}`],a([l({type:String,reflect:!0})],Dt.prototype,"size",2),a([l({type:String,reflect:!0})],Dt.prototype,"orientation",2),a([l({type:String,reflect:!0})],Dt.prototype,"label",2),a([l({type:String,attribute:"help-text",reflect:!0})],Dt.prototype,"helpText",2),a([x("size",{waitUntilFirstUpdate:!0})],Dt.prototype,"handleSizeChange",1),a([x("invalid",{waitUntilFirstUpdate:!0})],Dt.prototype,"handleInvalid",1),Dt=a([v("sd-checkbox-group")],Dt);var ie=Math.min,Et=Math.max,zi=Math.round,Ai=Math.floor,Xt=s=>({x:s,y:s}),ol={left:"right",right:"left",bottom:"top",top:"bottom"},nl={start:"end",end:"start"};function or(s,i,t){return Et(s,ie(i,t))}function Ye(s,i){return typeof s=="function"?s(i):s}function fe(s){return s.split("-")[0]}function We(s){return s.split("-")[1]}function Ur(s){return s==="x"?"y":"x"}function nr(s){return s==="y"?"height":"width"}var ll=new Set(["top","bottom"]);function re(s){return ll.has(fe(s))?"y":"x"}function lr(s){return Ur(re(s))}function ia(s,i,t){t===void 0&&(t=!1);let e=We(s),r=lr(s),o=nr(r),n=r==="x"?e===(t?"end":"start")?"right":"left":e==="start"?"bottom":"top";return i.reference[o]>i.floating[o]&&(n=Li(n)),[n,Li(n)]}function ra(s){let i=Li(s);return[ar(s),i,ar(i)]}function ar(s){return s.replace(/start|end/g,i=>nl[i])}var ta=["left","right"],ea=["right","left"],dl=["top","bottom"],cl=["bottom","top"];function hl(s,i,t){switch(s){case"top":case"bottom":return t?i?ea:ta:i?ta:ea;case"left":case"right":return i?dl:cl;default:return[]}}function sa(s,i,t,e){let r=We(s),o=hl(fe(s),t==="start",e);return r&&(o=o.map(n=>n+"-"+r),i&&(o=o.concat(o.map(ar)))),o}function Li(s){return s.replace(/left|right|bottom|top/g,i=>ol[i])}function pl(s){return P({top:0,right:0,bottom:0,left:0},s)}function Nr(s){return typeof s!="number"?pl(s):{top:s,right:s,bottom:s,left:s}}function Ze(s){let{x:i,y:t,width:e,height:r}=s;return{width:e,height:r,top:t,left:i,right:i+e,bottom:t+r,x:i,y:t}}function aa(s,i,t){let{reference:e,floating:r}=s,o=re(i),n=lr(i),d=nr(n),h=fe(i),p=o==="y",m=e.x+e.width/2-r.width/2,b=e.y+e.height/2-r.height/2,C=e[d]/2-r[d]/2,k;switch(h){case"top":k={x:m,y:e.y-r.height};break;case"bottom":k={x:m,y:e.y+e.height};break;case"right":k={x:e.x+e.width,y:b};break;case"left":k={x:e.x-r.width,y:b};break;default:k={x:e.x,y:e.y}}switch(We(i)){case"start":k[n]-=C*(t&&p?-1:1);break;case"end":k[n]+=C*(t&&p?-1:1);break}return k}var oa=async(s,i,t)=>{let{placement:e="bottom",strategy:r="absolute",middleware:o=[],platform:n}=t,d=o.filter(Boolean),h=await(n.isRTL==null?void 0:n.isRTL(i)),p=await n.getElementRects({reference:s,floating:i,strategy:r}),{x:m,y:b}=aa(p,e,h),C=e,k={},$=0;for(let z=0;z<d.length;z++){let{name:S,fn:D}=d[z],{x:V,y:U,data:W,reset:Y}=await D({x:m,y:b,initialPlacement:e,placement:C,strategy:r,middlewareData:k,rects:p,platform:n,elements:{reference:s,floating:i}});m=V!=null?V:m,b=U!=null?U:b,k=dt(P({},k),{[S]:P(P({},k[S]),W)}),Y&&$<=50&&($++,typeof Y=="object"&&(Y.placement&&(C=Y.placement),Y.rects&&(p=Y.rects===!0?await n.getElementRects({reference:s,floating:i,strategy:r}):Y.rects),{x:m,y:b}=aa(p,C,h)),z=-1)}return{x:m,y:b,placement:C,strategy:r,middlewareData:k}};async function dr(s,i){var t;i===void 0&&(i={});let{x:e,y:r,platform:o,rects:n,elements:d,strategy:h}=s,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:b="floating",altBoundary:C=!1,padding:k=0}=Ye(i,s),$=Nr(k),S=d[C?b==="floating"?"reference":"floating":b],D=Ze(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(S)))==null||t?S:S.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(d.floating)),boundary:p,rootBoundary:m,strategy:h})),V=b==="floating"?{x:e,y:r,width:n.floating.width,height:n.floating.height}:n.reference,U=await(o.getOffsetParent==null?void 0:o.getOffsetParent(d.floating)),W=await(o.isElement==null?void 0:o.isElement(U))?await(o.getScale==null?void 0:o.getScale(U))||{x:1,y:1}:{x:1,y:1},Y=Ze(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:V,offsetParent:U,strategy:h}):V);return{top:(D.top-Y.top+$.top)/W.y,bottom:(Y.bottom-D.bottom+$.bottom)/W.y,left:(D.left-Y.left+$.left)/W.x,right:(Y.right-D.right+$.right)/W.x}}var na=s=>({name:"arrow",options:s,async fn(i){let{x:t,y:e,placement:r,rects:o,platform:n,elements:d,middlewareData:h}=i,{element:p,padding:m=0}=Ye(s,i)||{};if(p==null)return{};let b=Nr(m),C={x:t,y:e},k=lr(r),$=nr(k),z=await n.getDimensions(p),S=k==="y",D=S?"top":"left",V=S?"bottom":"right",U=S?"clientHeight":"clientWidth",W=o.reference[$]+o.reference[k]-C[k]-o.floating[$],Y=C[k]-o.reference[k],Rt=await(n.getOffsetParent==null?void 0:n.getOffsetParent(p)),bt=Rt?Rt[U]:0;(!bt||!await(n.isElement==null?void 0:n.isElement(Rt)))&&(bt=d.floating[U]||o.floating[$]);let ne=W/2-Y/2,Jt=bt/2-z[$]/2-1,Pt=ie(b[D],Jt),we=ie(b[V],Jt),Gt=Pt,xe=bt-z[$]-we,St=bt/2-z[$]/2+ne,Ut=or(Gt,St,xe),De=!h.arrow&&We(r)!=null&&St!==Ut&&o.reference[$]/2-(St<Gt?Pt:we)-z[$]/2<0,le=De?St<Gt?St-Gt:St-xe:0;return{[k]:C[k]+le,data:P({[k]:Ut,centerOffset:St-Ut-le},De&&{alignmentOffset:le}),reset:De}}});var la=function(s){return s===void 0&&(s={}),{name:"flip",options:s,async fn(i){var t,e;let{placement:r,middlewareData:o,rects:n,initialPlacement:d,platform:h,elements:p}=i,St=Ye(s,i),{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:C,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:$="none",flipAlignment:z=!0}=St,S=Hi(St,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((t=o.arrow)!=null&&t.alignmentOffset)return{};let D=fe(r),V=re(d),U=fe(d)===d,W=await(h.isRTL==null?void 0:h.isRTL(p.floating)),Y=C||(U||!z?[Li(d)]:ra(d)),Rt=$!=="none";!C&&Rt&&Y.push(...sa(d,z,$,W));let bt=[d,...Y],ne=await dr(i,S),Jt=[],Pt=((e=o.flip)==null?void 0:e.overflows)||[];if(m&&Jt.push(ne[D]),b){let Ut=ia(r,n,W);Jt.push(ne[Ut[0]],ne[Ut[1]])}if(Pt=[...Pt,{placement:r,overflows:Jt}],!Jt.every(Ut=>Ut<=0)){var we,Gt;let Ut=(((we=o.flip)==null?void 0:we.index)||0)+1,De=bt[Ut];if(De&&(!(b==="alignment"?V!==re(De):!1)||Pt.every(Nt=>re(Nt.placement)===V?Nt.overflows[0]>0:!0)))return{data:{index:Ut,overflows:Pt},reset:{placement:De}};let le=(Gt=Pt.filter(He=>He.overflows[0]<=0).sort((He,Nt)=>He.overflows[1]-Nt.overflows[1])[0])==null?void 0:Gt.placement;if(!le)switch(k){case"bestFit":{var xe;let He=(xe=Pt.filter(Nt=>{if(Rt){let ke=re(Nt.placement);return ke===V||ke==="y"}return!0}).map(Nt=>[Nt.placement,Nt.overflows.filter(ke=>ke>0).reduce((ke,Va)=>ke+Va,0)]).sort((Nt,ke)=>Nt[1]-ke[1])[0])==null?void 0:xe[0];He&&(le=He);break}case"initialPlacement":le=d;break}if(r!==le)return{reset:{placement:le}}}return{}}}};var ul=new Set(["left","top"]);async function ml(s,i){let{placement:t,platform:e,elements:r}=s,o=await(e.isRTL==null?void 0:e.isRTL(r.floating)),n=fe(t),d=We(t),h=re(t)==="y",p=ul.has(n)?-1:1,m=o&&h?-1:1,b=Ye(i,s),{mainAxis:C,crossAxis:k,alignmentAxis:$}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return d&&typeof $=="number"&&(k=d==="end"?$*-1:$),h?{x:k*m,y:C*p}:{x:C*p,y:k*m}}var da=function(s){return s===void 0&&(s=0),{name:"offset",options:s,async fn(i){var t,e;let{x:r,y:o,placement:n,middlewareData:d}=i,h=await ml(i,s);return n===((t=d.offset)==null?void 0:t.placement)&&(e=d.arrow)!=null&&e.alignmentOffset?{}:{x:r+h.x,y:o+h.y,data:dt(P({},h),{placement:n})}}}},ca=function(s){return s===void 0&&(s={}),{name:"shift",options:s,async fn(i){let{x:t,y:e,placement:r}=i,S=Ye(s,i),{mainAxis:o=!0,crossAxis:n=!1,limiter:d={fn:D=>{let{x:V,y:U}=D;return{x:V,y:U}}}}=S,h=Hi(S,["mainAxis","crossAxis","limiter"]),p={x:t,y:e},m=await dr(i,h),b=re(fe(r)),C=Ur(b),k=p[C],$=p[b];if(o){let D=C==="y"?"top":"left",V=C==="y"?"bottom":"right",U=k+m[D],W=k-m[V];k=or(U,k,W)}if(n){let D=b==="y"?"top":"left",V=b==="y"?"bottom":"right",U=$+m[D],W=$-m[V];$=or(U,$,W)}let z=d.fn(dt(P({},i),{[C]:k,[b]:$}));return dt(P({},z),{data:{x:z.x-t,y:z.y-e,enabled:{[C]:o,[b]:n}}})}}};var ha=function(s){return s===void 0&&(s={}),{name:"size",options:s,async fn(i){var t,e;let{placement:r,rects:o,platform:n,elements:d}=i,Pt=Ye(s,i),{apply:h=()=>{}}=Pt,p=Hi(Pt,["apply"]),m=await dr(i,p),b=fe(r),C=We(r),k=re(r)==="y",{width:$,height:z}=o.floating,S,D;b==="top"||b==="bottom"?(S=b,D=C===(await(n.isRTL==null?void 0:n.isRTL(d.floating))?"start":"end")?"left":"right"):(D=b,S=C==="end"?"top":"bottom");let V=z-m.top-m.bottom,U=$-m.left-m.right,W=ie(z-m[S],V),Y=ie($-m[D],U),Rt=!i.middlewareData.shift,bt=W,ne=Y;if((t=i.middlewareData.shift)!=null&&t.enabled.x&&(ne=U),(e=i.middlewareData.shift)!=null&&e.enabled.y&&(bt=V),Rt&&!C){let we=Et(m.left,0),Gt=Et(m.right,0),xe=Et(m.top,0),St=Et(m.bottom,0);k?ne=$-2*(we!==0||Gt!==0?we+Gt:Et(m.left,m.right)):bt=z-2*(xe!==0||St!==0?xe+St:Et(m.top,m.bottom))}await h(dt(P({},i),{availableWidth:ne,availableHeight:bt}));let Jt=await n.getDimensions(d.floating);return $!==Jt.width||z!==Jt.height?{reset:{rects:!0}}:{}}}};function cr(){return typeof window!="undefined"}function Qe(s){return ua(s)?(s.nodeName||"").toLowerCase():"#document"}function zt(s){var i;return(s==null||(i=s.ownerDocument)==null?void 0:i.defaultView)||window}function Yt(s){var i;return(i=(ua(s)?s.ownerDocument:s.document)||window.document)==null?void 0:i.documentElement}function ua(s){return cr()?s instanceof Node||s instanceof zt(s).Node:!1}function Vt(s){return cr()?s instanceof Element||s instanceof zt(s).Element:!1}function Wt(s){return cr()?s instanceof HTMLElement||s instanceof zt(s).HTMLElement:!1}function pa(s){return!cr()||typeof ShadowRoot=="undefined"?!1:s instanceof ShadowRoot||s instanceof zt(s).ShadowRoot}var fl=new Set(["inline","contents"]);function li(s){let{overflow:i,overflowX:t,overflowY:e,display:r}=Bt(s);return/auto|scroll|overlay|hidden|clip/.test(i+e+t)&&!fl.has(r)}var bl=new Set(["table","td","th"]);function ma(s){return bl.has(Qe(s))}var gl=[":popover-open",":modal"];function Mi(s){return gl.some(i=>{try{return s.matches(i)}catch(t){return!1}})}var vl=["transform","translate","scale","rotate","perspective"],yl=["transform","translate","scale","rotate","perspective","filter"],wl=["paint","layout","strict","content"];function hr(s){let i=pr(),t=Vt(s)?Bt(s):s;return vl.some(e=>t[e]?t[e]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!i&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!i&&(t.filter?t.filter!=="none":!1)||yl.some(e=>(t.willChange||"").includes(e))||wl.some(e=>(t.contain||"").includes(e))}function fa(s){let i=be(s);for(;Wt(i)&&!Je(i);){if(hr(i))return i;if(Mi(i))return null;i=be(i)}return null}function pr(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var xl=new Set(["html","body","#document"]);function Je(s){return xl.has(Qe(s))}function Bt(s){return zt(s).getComputedStyle(s)}function Oi(s){return Vt(s)?{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}:{scrollLeft:s.scrollX,scrollTop:s.scrollY}}function be(s){if(Qe(s)==="html")return s;let i=s.assignedSlot||s.parentNode||pa(s)&&s.host||Yt(s);return pa(i)?i.host:i}function ba(s){let i=be(s);return Je(i)?s.ownerDocument?s.ownerDocument.body:s.body:Wt(i)&&li(i)?i:ba(i)}function ni(s,i,t){var e;i===void 0&&(i=[]),t===void 0&&(t=!0);let r=ba(s),o=r===((e=s.ownerDocument)==null?void 0:e.body),n=zt(r);if(o){let d=ur(n);return i.concat(n,n.visualViewport||[],li(r)?r:[],d&&t?ni(d):[])}return i.concat(r,ni(r,[],t))}function ur(s){return s.parent&&Object.getPrototypeOf(s.parent)?s.frameElement:null}function ya(s){let i=Bt(s),t=parseFloat(i.width)||0,e=parseFloat(i.height)||0,r=Wt(s),o=r?s.offsetWidth:t,n=r?s.offsetHeight:e,d=zi(t)!==o||zi(e)!==n;return d&&(t=o,e=n),{width:t,height:e,$:d}}function Kr(s){return Vt(s)?s:s.contextElement}function di(s){let i=Kr(s);if(!Wt(i))return Xt(1);let t=i.getBoundingClientRect(),{width:e,height:r,$:o}=ya(i),n=(o?zi(t.width):t.width)/e,d=(o?zi(t.height):t.height)/r;return(!n||!Number.isFinite(n))&&(n=1),(!d||!Number.isFinite(d))&&(d=1),{x:n,y:d}}var kl=Xt(0);function wa(s){let i=zt(s);return!pr()||!i.visualViewport?kl:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function Cl(s,i,t){return i===void 0&&(i=!1),!t||i&&t!==zt(s)?!1:i}function Ge(s,i,t,e){i===void 0&&(i=!1),t===void 0&&(t=!1);let r=s.getBoundingClientRect(),o=Kr(s),n=Xt(1);i&&(e?Vt(e)&&(n=di(e)):n=di(s));let d=Cl(o,t,e)?wa(o):Xt(0),h=(r.left+d.x)/n.x,p=(r.top+d.y)/n.y,m=r.width/n.x,b=r.height/n.y;if(o){let C=zt(o),k=e&&Vt(e)?zt(e):e,$=C,z=ur($);for(;z&&e&&k!==$;){let S=di(z),D=z.getBoundingClientRect(),V=Bt(z),U=D.left+(z.clientLeft+parseFloat(V.paddingLeft))*S.x,W=D.top+(z.clientTop+parseFloat(V.paddingTop))*S.y;h*=S.x,p*=S.y,m*=S.x,b*=S.y,h+=U,p+=W,$=zt(z),z=ur($)}}return Ze({width:m,height:b,x:h,y:p})}function jr(s,i){let t=Oi(s).scrollLeft;return i?i.left+t:Ge(Yt(s)).left+t}function xa(s,i,t){t===void 0&&(t=!1);let e=s.getBoundingClientRect(),r=e.left+i.scrollLeft-(t?0:jr(s,e)),o=e.top+i.scrollTop;return{x:r,y:o}}function El(s){let{elements:i,rect:t,offsetParent:e,strategy:r}=s,o=r==="fixed",n=Yt(e),d=i?Mi(i.floating):!1;if(e===n||d&&o)return t;let h={scrollLeft:0,scrollTop:0},p=Xt(1),m=Xt(0),b=Wt(e);if((b||!b&&!o)&&((Qe(e)!=="body"||li(n))&&(h=Oi(e)),Wt(e))){let k=Ge(e);p=di(e),m.x=k.x+e.clientLeft,m.y=k.y+e.clientTop}let C=n&&!b&&!o?xa(n,h,!0):Xt(0);return{width:t.width*p.x,height:t.height*p.y,x:t.x*p.x-h.scrollLeft*p.x+m.x+C.x,y:t.y*p.y-h.scrollTop*p.y+m.y+C.y}}function $l(s){return Array.from(s.getClientRects())}function Tl(s){let i=Yt(s),t=Oi(s),e=s.ownerDocument.body,r=Et(i.scrollWidth,i.clientWidth,e.scrollWidth,e.clientWidth),o=Et(i.scrollHeight,i.clientHeight,e.scrollHeight,e.clientHeight),n=-t.scrollLeft+jr(s),d=-t.scrollTop;return Bt(e).direction==="rtl"&&(n+=Et(i.clientWidth,e.clientWidth)-r),{width:r,height:o,x:n,y:d}}function Ll(s,i){let t=zt(s),e=Yt(s),r=t.visualViewport,o=e.clientWidth,n=e.clientHeight,d=0,h=0;if(r){o=r.width,n=r.height;let p=pr();(!p||p&&i==="fixed")&&(d=r.offsetLeft,h=r.offsetTop)}return{width:o,height:n,x:d,y:h}}var zl=new Set(["absolute","fixed"]);function Al(s,i){let t=Ge(s,!0,i==="fixed"),e=t.top+s.clientTop,r=t.left+s.clientLeft,o=Wt(s)?di(s):Xt(1),n=s.clientWidth*o.x,d=s.clientHeight*o.y,h=r*o.x,p=e*o.y;return{width:n,height:d,x:h,y:p}}function ga(s,i,t){let e;if(i==="viewport")e=Ll(s,t);else if(i==="document")e=Tl(Yt(s));else if(Vt(i))e=Al(i,t);else{let r=wa(s);e={x:i.x-r.x,y:i.y-r.y,width:i.width,height:i.height}}return Ze(e)}function ka(s,i){let t=be(s);return t===i||!Vt(t)||Je(t)?!1:Bt(t).position==="fixed"||ka(t,i)}function Ml(s,i){let t=i.get(s);if(t)return t;let e=ni(s,[],!1).filter(d=>Vt(d)&&Qe(d)!=="body"),r=null,o=Bt(s).position==="fixed",n=o?be(s):s;for(;Vt(n)&&!Je(n);){let d=Bt(n),h=hr(n);!h&&d.position==="fixed"&&(r=null),(o?!h&&!r:!h&&d.position==="static"&&!!r&&zl.has(r.position)||li(n)&&!h&&ka(s,n))?e=e.filter(m=>m!==n):r=d,n=be(n)}return i.set(s,e),e}function Ol(s){let{element:i,boundary:t,rootBoundary:e,strategy:r}=s,n=[...t==="clippingAncestors"?Mi(i)?[]:Ml(i,this._c):[].concat(t),e],d=n[0],h=n.reduce((p,m)=>{let b=ga(i,m,r);return p.top=Et(b.top,p.top),p.right=ie(b.right,p.right),p.bottom=ie(b.bottom,p.bottom),p.left=Et(b.left,p.left),p},ga(i,d,r));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function Sl(s){let{width:i,height:t}=ya(s);return{width:i,height:t}}function _l(s,i,t){let e=Wt(i),r=Yt(i),o=t==="fixed",n=Ge(s,!0,o,i),d={scrollLeft:0,scrollTop:0},h=Xt(0);function p(){h.x=jr(r)}if(e||!e&&!o)if((Qe(i)!=="body"||li(r))&&(d=Oi(i)),e){let k=Ge(i,!0,o,i);h.x=k.x+i.clientLeft,h.y=k.y+i.clientTop}else r&&p();o&&!e&&r&&p();let m=r&&!e&&!o?xa(r,d):Xt(0),b=n.left+d.scrollLeft-h.x-m.x,C=n.top+d.scrollTop-h.y-m.y;return{x:b,y:C,width:n.width,height:n.height}}function qr(s){return Bt(s).position==="static"}function va(s,i){if(!Wt(s)||Bt(s).position==="fixed")return null;if(i)return i(s);let t=s.offsetParent;return Yt(s)===t&&(t=t.ownerDocument.body),t}function Ca(s,i){let t=zt(s);if(Mi(s))return t;if(!Wt(s)){let r=be(s);for(;r&&!Je(r);){if(Vt(r)&&!qr(r))return r;r=be(r)}return t}let e=va(s,i);for(;e&&ma(e)&&qr(e);)e=va(e,i);return e&&Je(e)&&qr(e)&&!hr(e)?t:e||fa(s)||t}var Dl=async function(s){let i=this.getOffsetParent||Ca,t=this.getDimensions,e=await t(s.floating);return{reference:_l(s.reference,await i(s.floating),s.strategy),floating:{x:0,y:0,width:e.width,height:e.height}}};function Hl(s){return Bt(s).direction==="rtl"}var Il={convertOffsetParentRelativeRectToViewportRelativeRect:El,getDocumentElement:Yt,getClippingRect:Ol,getOffsetParent:Ca,getElementRects:Dl,getClientRects:$l,getDimensions:Sl,getScale:di,isElement:Vt,isRTL:Hl};function Ea(s,i){return s.x===i.x&&s.y===i.y&&s.width===i.width&&s.height===i.height}function Pl(s,i){let t=null,e,r=Yt(s);function o(){var d;clearTimeout(e),(d=t)==null||d.disconnect(),t=null}function n(d,h){d===void 0&&(d=!1),h===void 0&&(h=1),o();let p=s.getBoundingClientRect(),{left:m,top:b,width:C,height:k}=p;if(d||i(),!C||!k)return;let $=Ai(b),z=Ai(r.clientWidth-(m+C)),S=Ai(r.clientHeight-(b+k)),D=Ai(m),U={rootMargin:-$+"px "+-z+"px "+-S+"px "+-D+"px",threshold:Et(0,ie(1,h))||1},W=!0;function Y(Rt){let bt=Rt[0].intersectionRatio;if(bt!==h){if(!W)return n();bt?n(!1,bt):e=setTimeout(()=>{n(!1,1e-7)},1e3)}bt===1&&!Ea(p,s.getBoundingClientRect())&&n(),W=!1}try{t=new IntersectionObserver(Y,dt(P({},U),{root:r.ownerDocument}))}catch(Rt){t=new IntersectionObserver(Y,U)}t.observe(s)}return n(!0),o}function $a(s,i,t,e){e===void 0&&(e={});let{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:n=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:h=!1}=e,p=Kr(s),m=r||o?[...p?ni(p):[],...ni(i)]:[];m.forEach(D=>{r&&D.addEventListener("scroll",t,{passive:!0}),o&&D.addEventListener("resize",t)});let b=p&&d?Pl(p,t):null,C=-1,k=null;n&&(k=new ResizeObserver(D=>{let[V]=D;V&&V.target===p&&k&&(k.unobserve(i),cancelAnimationFrame(C),C=requestAnimationFrame(()=>{var U;(U=k)==null||U.observe(i)})),t()}),p&&!h&&k.observe(p),k.observe(i));let $,z=h?Ge(s):null;h&&S();function S(){let D=Ge(s);z&&!Ea(z,D)&&t(),z=D,$=requestAnimationFrame(S)}return t(),()=>{var D;m.forEach(V=>{r&&V.removeEventListener("scroll",t),o&&V.removeEventListener("resize",t)}),b==null||b(),(D=k)==null||D.disconnect(),k=null,h&&cancelAnimationFrame($)}}var Ta=da;var La=ca,za=la,Xr=ha;var Aa=na;var Ma=(s,i,t)=>{let e=new Map,r=P({platform:Il},t),o=dt(P({},r.platform),{_c:e});return oa(s,i,dt(P({},r),{platform:o}))};var X=class extends f{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="absolute";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver(e=>this.handleCurrentPlacementChange(e));let t={attributes:!0};this.mutationObserver.observe(this,t)}handleCurrentPlacementChange(t){return t.forEach(e=>{if(e.attributeName==="data-current-placement"){let r=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:r})}})}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=$a(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl)return;let t=[Ta({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Xr({apply:({rects:e})=>{let r=this.sync==="width"||this.sync==="both",o=this.sync==="height"||this.sync==="both";this.popup.style.width=r?`${e.reference.width}px`:"",this.popup.style.height=o?`${e.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(za({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(La({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Xr({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:e,availableHeight:r})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${r}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${e}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(Aa({element:this.arrowEl,padding:this.arrowPadding})),Ma(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy}).then(({x:e,y:r,middlewareData:o,placement:n})=>{let d=getComputedStyle(this).direction==="rtl",h={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]];if(this.setAttribute("data-current-placement",n),Object.assign(this.popup.style,{left:`${e}px`,top:`${r}px`}),this.arrow){let p=o.arrow.x,m=o.arrow.y,b="",C="",k="",$="";if(this.arrowPlacement==="start"){let z=typeof p=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";b=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",C=d?z:"",$=d?"":z}else if(this.arrowPlacement==="end"){let z=typeof p=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";C=d?"":z,$=d?z:"",k=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?($=typeof p=="number"?"calc(50% - var(--arrow-size-diagonal))":"",b=typeof m=="number"?"calc(50% - var(--arrow-size-diagonal))":""):($=typeof p=="number"?`${p}px`:"",b=typeof m=="number"?`${m}px`:"");Object.assign(this.arrowEl.style,{top:b,right:C,bottom:k,left:$,[h]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sd-reposition")}render(){return u`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${c("isolate",this.strategy!=="fixed"?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?u`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};X.styles=[...f.styles,y`:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size)*0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-height:var(--auto-size-available-height,none);max-width:var(--auto-size-available-width,none)}[part=arrow]{background:var(--arrow-color);height:calc(var(--arrow-size-diagonal)*2);width:calc(var(--arrow-size-diagonal)*2)}`],a([g('[part="popup"]')],X.prototype,"popup",2),a([g('[part="arrow"]')],X.prototype,"arrowEl",2),a([l({reflect:!0})],X.prototype,"anchor",2),a([l({type:Boolean,reflect:!0})],X.prototype,"active",2),a([l({type:String,reflect:!0})],X.prototype,"placement",2),a([l({type:String,reflect:!0})],X.prototype,"strategy",2),a([l({type:Number,reflect:!0})],X.prototype,"distance",2),a([l({type:Number,reflect:!0})],X.prototype,"skidding",2),a([l({type:Boolean,reflect:!0})],X.prototype,"arrow",2),a([l({type:String,attribute:"arrow-placement",reflect:!0})],X.prototype,"arrowPlacement",2),a([l({attribute:"arrow-padding",type:Number,reflect:!0})],X.prototype,"arrowPadding",2),a([l({type:Boolean,reflect:!0})],X.prototype,"flip",2),a([l({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map(e=>e.trim()).filter(e=>e!==""),toAttribute:t=>t.join(" ")}})],X.prototype,"flipFallbackPlacements",2),a([l({type:String,attribute:"flip-fallback-strategy"})],X.prototype,"flipFallbackStrategy",2),a([l({type:Object})],X.prototype,"flipBoundary",2),a([l({attribute:"flip-padding",type:Number})],X.prototype,"flipPadding",2),a([l({type:Boolean})],X.prototype,"shift",2),a([l({type:Object})],X.prototype,"shiftBoundary",2),a([l({attribute:"shift-padding",type:Number})],X.prototype,"shiftPadding",2),a([l({type:String,attribute:"auto-size"})],X.prototype,"autoSize",2),a([l()],X.prototype,"sync",2),a([l({type:Object})],X.prototype,"autoSizeBoundary",2),a([l({attribute:"auto-size-padding",type:Number})],X.prototype,"autoSizePadding",2),X=a([v("sd-popup")],X);var yt=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.size="lg";this.selected=!1;this.toggleable=!1;this.removable=!1;this.disabled=!1;this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleRemove(){this.emit("sd-remove")}isLink(){return!!this.href}click(){this.tag.click()}focus(t){this.tag.focus(t)}blur(){this.tag.blur()}async hide(){this.emit("sd-hide"),this.style.opacity="0",await new Promise(t=>setTimeout(t,this.token("sd-duration-fast",150))),this.hidden=!0,this.emit("sd-after-hide")}render(){let t=this.isLink(),e=t?Z`a`:this.removable?Z`div`:Z`button`;return I`<${e} part="base" type="${w(t?void 0:"button")}" href="${w(t?this.href:void 0)}" rel="${w(t&&this.target?"noreferrer noopener":void 0)}" target="${w(t?this.target:void 0)}" download="${w(t?this.download:void 0)}" ?disabled="${w(t?void 0:this.disabled)}" aria-labelledby="content" aria-disabled="${this.disabled?"true":"false"}" aria-pressed="${w(this.toggleable?this.selected:void 0)}" tabindex="${this.disabled||this.removable?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${c("inline-flex border box-border rounded-full items-center leading-none whitespace-nowrap transition-colors duration-fast ease-in-out focus-visible:focus-outline",{lg:"h-8 text-base gap-2",sm:"h-6 text-sm gap-1"}[this.size],{lg:this.removable?"pl-4 pr-3 py-2":"px-4 py-2",sm:this.removable?"pl-3 pr-2 py-2":"px-3 py-[5px]"}[this.size],this.selected?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500 disabled:bg-neutral-500 disabled:border-neutral-500":c("border-primary text-primary disabled:border-neutral-500 disabled:text-neutral-500",this.removable?"has-[button:hover]:border-primary-500 has-[button:hover]:bg-neutral-100 has-[button:hover]:text-primary-500":"hover:border-primary-500 hover:bg-neutral-100 hover:text-primary-500"),this.disabled&&!t&&"cursor-not-allowed")}"><slot id="content" part="content"></slot>${this.removable&&!t?I`<button class="sd-interactive flex items-center" type="button" @click="${this.handleRemove}"><slot part="removable-indicator" name="removable-indicator"><sd-icon library="_internal" name="close" label="${this.localize.term("remove")}"></sd-icon></slot></button>`:""}</${e}>`}};yt.styles=[...f.styles,y`:host{display:inline-block;transition-duration:.15s;transition-duration:var(--sd-duration-fast,.15s);transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}:host([size=lg])::part(removable-indicator){font-size:var(--sd-font-size-base,1rem)}:host([size=sm])::part(removable-indicator){font-size:.75rem}`],a([g("a, button, div")],yt.prototype,"tag",2),a([l({type:String,reflect:!0})],yt.prototype,"size",2),a([l({type:Boolean,reflect:!0})],yt.prototype,"selected",2),a([l({type:Boolean,reflect:!0})],yt.prototype,"toggleable",2),a([l({type:Boolean,reflect:!0})],yt.prototype,"removable",2),a([l({type:Boolean,reflect:!0})],yt.prototype,"disabled",2),a([l({type:String,reflect:!0})],yt.prototype,"href",2),a([l({type:String,reflect:!0})],yt.prototype,"target",2),a([l({reflect:!0})],yt.prototype,"download",2),yt=a([v("sd-tag")],yt);var Oa=s=>s;var Yr=s=>Array.from(s.assignedElements({flatten:!0})),Fl=s=>s.tagName.toLocaleLowerCase()==="sd-option"?s:Array.from(s.querySelectorAll(":scope > sd-option")),Vl=s=>s.tagName.toLocaleLowerCase()==="sd-optgroup",Sa=s=>s.map(Fl),_a=s=>s.filter(Vl),mr=s=>s.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();var T=class extends f{constructor(){super(...arguments);this.formControlController=new ot(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new A(this,"help-text","label");this.localize=new L(this);this.hasFocus=!1;this.displayInputValue="";this.selectedTextLabel="";this.selectedOptions=[];this.filteredOptions=[];this.allOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.deletedTagLabel="";this.name="";this.value="";this.defaultValue="";this.size="lg";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.clearable=!1;this.open=!1;this.hoist=!1;this.label="";this.placement="bottom";this.helpText="";this.form="";this.required=!1;this.type="text";this.currentPlacement=this.placement;this.getOption=Oa;this.multiple=!1;this.useTags=!0;this.maxOptionsVisible=3;this.styleOnValid=!1;this.filter=(t,e)=>{let r=mr(t.value),o=mr(t.getTextLabel()),n=mr(e);return r.includes(n)||o.includes(n)};this.getTag=t=>u`<sd-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
|
117
|
+
${this.inverted?"disabled:bg-neutral-600 disabled:border-neutral-600":"disabled:bg-neutral-500 disabled:border-neutral-500"} disabled:text-white`}[this.variant])}" ?disabled="${w(t?void 0:this.disabled)}" type="${w(t?void 0:this.type)}" title="${this.title}" name="${w(t?void 0:this.name)}" value="${w(t?void 0:this.value)}" href="${w(t?this.href:void 0)}" target="${w(t?this.target:void 0)}" download="${w(t?this.download:void 0)}" rel="${w(t&&this.target?"noreferrer noopener":void 0)}" role="${w(t?void 0:"button")}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-labelledby="content" tabindex="${this.disabled?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @invalid="${this.isButton()?this.handleInvalid:null}" @click="${this.handleClick}"><div part="motion-wrapper" class="${c("absolute inset-0 rounded-default -z-10 overflow-hidden pointer-events-none ",(this.disabled||this.visuallyDisabled)&&"hidden")}"><div class="absolute inset-0 w-full h-full transition-all duration-fast translate-y-full group-hover:translate-y-0 group-hover:mt-[-22%] mt-[11%]"><div class="${c("absolute right-0 min-w-full min-h-full aspect-square skew-y-[-11deg] mt-[11%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div><div class="${c("absolute w-full h-full mt-[22%]",{primary:this.inverted?"bg-primary-100 group-active:bg-primary-200":"bg-primary-500 group-active:bg-primary-800",secondary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",tertiary:this.inverted?"bg-primary-500 group-active:bg-primary-800":"bg-primary-100 group-active:bg-primary-200",cta:"bg-accent-550 group-active:bg-accent-700"}[this.variant])}"></div></div></div><slot name="icon-left" part="icon-left" class="${c("flex flex-auto items-center justify-end pointer-events-none",r["icon-only"]&&"hidden",this.loading&&"invisible",r["icon-left"]&&{sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size])}"></slot><slot part="label" id="content" class="${c("inline-flex items-center justify-center",r["icon-only"]&&"pointer-events-none",this.loading&&"invisible")}"></slot><slot name="icon-right" part="icon-right" class="${c("flex flex-auto items-center pointer-events-none",this.loading&&"invisible",r["icon-only"]&&"hidden",r["icon-right"]&&{sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size])}"></slot>${this.loading?I`<sd-loader class="${c("absolute top-1/2 left-1/2 transform -translate-x-1/2 -translate-y-1/2")}"></sd-loader>`:""}</${e}>`}};K.styles=[...f.styles,y`:host{cursor:pointer;display:inline-block;position:relative;width:var(--sd-spacing-auto,auto);z-index:0}::slotted(sd-badge){pointer-events:none;position:absolute;right:var(--sd-spacing-0,0);top:var(--sd-spacing-0,0);--tw-translate-x:50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}::slotted(sd-icon),sd-loader{font-size:calc(var(--tw-varspacing)/2)}`],a([g("a, button")],K.prototype,"button",2),a([ei({selector:"sd-icon"})],K.prototype,"_iconsInDefaultSlot",2),a([E()],K.prototype,"invalid",2),a([l({type:String,reflect:!0})],K.prototype,"title",2),a([l({type:String,reflect:!0})],K.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],K.prototype,"inverted",2),a([l({type:String,reflect:!0})],K.prototype,"size",2),a([l({type:Boolean,reflect:!0})],K.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],K.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],K.prototype,"loading",2),a([l({type:String,reflect:!0})],K.prototype,"type",2),a([l({type:String,reflect:!0})],K.prototype,"name",2),a([l()],K.prototype,"value",2),a([l({type:String,reflect:!0})],K.prototype,"href",2),a([l({type:String,reflect:!0})],K.prototype,"target",2),a([l({reflect:!0})],K.prototype,"download",2),a([l({reflect:!0})],K.prototype,"form",2),a([l({attribute:"formaction"})],K.prototype,"formAction",2),a([l({attribute:"formenctype"})],K.prototype,"formEnctype",2),a([l({attribute:"formmethod"})],K.prototype,"formMethod",2),a([l({attribute:"formnovalidate",type:Boolean})],K.prototype,"formNoValidate",2),a([l({attribute:"formtarget"})],K.prototype,"formTarget",2),a([x("disabled",{waitUntilFirstUpdate:!0})],K.prototype,"handleDisabledChange",1),K=a([v("sd-button")],K);function qe(s=document.activeElement){if(s!=null&&s.shadowRoot){let i=s.shadowRoot.activeElement;if(i)return qe(i)}return s}function Xs(s,i){return{top:Math.round(s.getBoundingClientRect().top-i.getBoundingClientRect().top),left:Math.round(s.getBoundingClientRect().left-i.getBoundingClientRect().left)}}var Br=new Set;function sl(){let s=document.documentElement.clientWidth;return Math.abs(window.innerWidth-s)}function Ke(s){if(Br.add(s),!document.body.classList.contains("sd-scroll-lock")){let i=sl();document.body.classList.add("sd-scroll-lock"),document.body.style.setProperty("--sd-scroll-lock-size",`${i}px`)}}function je(s){Br.delete(s),Br.size===0&&(document.body.classList.remove("sd-scroll-lock"),document.body.style.removeProperty("--sd-scrollbar-width"))}function Kt(s,i,t="vertical",e="smooth"){let r=Xs(s,i),o=r.top+i.scrollTop,n=r.left+i.scrollLeft,d=i.scrollLeft,h=i.scrollLeft+i.offsetWidth,p=i.scrollTop,m=i.scrollTop+i.offsetHeight;(t==="horizontal"||t==="both")&&(n<d?i.scrollTo({left:n,behavior:e}):n+s.clientWidth>h&&i.scrollTo({left:n-i.offsetWidth+s.clientWidth,behavior:e})),(t==="vertical"||t==="both")&&(o<p?i.scrollTo({top:o,behavior:e}):o+s.clientHeight>m&&i.scrollTo({top:o-i.offsetHeight+s.clientHeight,behavior:e}))}function ai(s){return s.charAt(0).toUpperCase()+s.slice(1)}function Rr(s){return s.replace(/-./g,i=>i[1].toUpperCase())}function Ys(s){let i=s.tagName.toLowerCase();return s.getAttribute("tabindex")==="-1"||s.hasAttribute("disabled")||s.hasAttribute("aria-disabled")&&s.getAttribute("aria-disabled")!=="false"||i==="input"&&s.getAttribute("type")==="radio"&&!s.hasAttribute("checked")||s.offsetParent===null&&!(s.getRootNode()instanceof ShadowRoot)||window.getComputedStyle(s).visibility==="hidden"?!1:(i==="audio"||i==="video")&&s.hasAttribute("controls")||s.hasAttribute("tabindex")||s.hasAttribute("contenteditable")&&s.getAttribute("contenteditable")!=="false"?!0:["button","input","select","textarea","a","audio","video","summary"].includes(i)}function er(s){var o,n;let i=[];function t(d){d instanceof HTMLElement&&(i.push(d),d.shadowRoot!==null&&d.shadowRoot.mode==="open"&&t(d.shadowRoot)),[...d.children].forEach(h=>t(h))}t(s);let e=(o=i.find(d=>Ys(d)))!=null?o:null,r=(n=i.reverse().find(d=>Ys(d)))!=null?n:null;return{start:e,end:r}}var $i=[],Xe=class{constructor(i){this.tabDirection="forward";this.element=i,this.handleFocusIn=this.handleFocusIn.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleKeyUp=this.handleKeyUp.bind(this)}activate(){$i.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){$i=$i.filter(i=>i!==this.element),document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return $i[$i.length-1]===this.element}checkFocus(){if(this.isActive()&&!this.element.matches(":focus-within")){let{start:i,end:t}=er(this.element),e=this.tabDirection==="forward"?i:t;typeof(e==null?void 0:e.focus)=="function"&&e.focus({preventScroll:!0})}}handleFocusIn(){this.checkFocus()}handleKeyDown(i){i.key==="Tab"&&i.shiftKey&&(this.tabDirection="backward",requestAnimationFrame(()=>this.checkFocus()))}handleKeyUp(){this.tabDirection="forward"}};var ht=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"footer");this.localize=new L(this);this.modal=new Xe(this);this.open=!1;this.label="";this.placement="end";this.contained=!1;this.noHeader=!1;this.handleDocumentKeyDown=t=>{this.open&&t.key==="Escape"&&(t.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.drawer.hidden=!this.open,this.open&&(this.addOpenListeners(),this.contained||(this.modal.activate(),Ke(this)))}disconnectedCallback(){super.disconnectedCallback(),je(this)}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){let r=F(this,"drawer.denyClose",{dir:this.localize.dir()});B(this.panel,r.keyframes,r.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){var e;let t=(e=this.closeButton.shadowRoot)==null?void 0:e.querySelector('[part="base"]');if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=qe(),this.contained||(this.modal.activate(),Ke(this));let r=this.querySelector("[autofocus]");r&&r.removeAttribute("autofocus"),await Promise.all([R(this.drawer),R(this.overlay)]),this.drawer.hidden=!1,this.drawer.removeAttribute("inert");let o=F(this,`drawer.show${ai(this.placement)}`,{dir:this.localize.dir()}),n=F(this,"drawer.overlay.show",{dir:this.localize.dir()});await Promise.all([B(this.panel,o.keyframes,o.options),B(this.overlay,n.keyframes,n.options)]),t==null||t.setAttribute("aria-controls","drawer"),t==null||t.setAttribute("aria-expanded","true"),requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(r?r.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),r?r.setAttribute("autofocus",""):this.closeButton.focus()}),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.contained||(this.modal.deactivate(),je(this)),await Promise.all([R(this.drawer),R(this.overlay)]);let r=F(this,`drawer.hide${ai(this.placement)}`,{dir:this.localize.dir()}),o=F(this,"drawer.overlay.hide",{dir:this.localize.dir()});await Promise.all([B(this.overlay,o.keyframes,o.options).then(()=>{this.overlay.hidden=!0}),B(this.panel,r.keyframes,r.options).then(()=>{this.panel.hidden=!0})]),this.drawer.hidden=!0,this.drawer.setAttribute("inert",""),this.overlay.hidden=!1,this.panel.hidden=!1;let n=this.originalTrigger;typeof(n==null?void 0:n.focus)=="function"&&setTimeout(()=>n.focus()),t==null||t.setAttribute("aria-expanded","false"),this.emit("sd-after-hide")}}handleNoModalChange(){this.open&&!this.contained&&(this.modal.activate(),Ke(this)),this.open&&this.contained&&(this.modal.deactivate(),je(this))}async show(){if(!this.open)return this.open=!0,q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,q(this,"sd-after-hide")}render(){return u`<section id="drawer" part="base" class="${c("top-0 start-0 w-full h-full pointer-events-none overflow-hidden",this.contained?"absolute":"fixed")}" aria-label="${this.label}"><div part="overlay" class="${c("block top-0 left-0 right-0 bottom-0 bg-neutral-800/75 pointer-events-auto",this.contained?"absolute":"fixed")}" @click="${()=>this.requestClose("overlay")}"></div><div part="panel" class="${c("absolute flex flex-col gap-4 z-10 max-w-full max-h-full bg-white shadow-lg overflow-auto pointer-events-auto focus:outline-none",{end:"top-0 end-0 bottom-auto start-auto w-[--width] h-full",start:"top-0 end-auto bottom-auto start-0 w-[--width] h-full"}[this.placement])}" role="dialog" aria-modal="true" aria-label="${this.label}" tabindex="0">${this.noHeader?u`<sd-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}" class="absolute top-2 end-2 z-10"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-icon></sd-button>`:u`<header part="header" class="flex justify-between py-2 px-4 items-center flex-shrink-0" style="min-height:64px"><div part="title"><slot name="header" part="title" class="flex-auto text-xl m-0" id="title"></slot></div><div class="shrink-0 flex flex-wrap justify-end gap-1 ms-4 absolute top-2 end-2"><sd-button variant="tertiary" size="lg" part="close-button" @click="${()=>this.requestClose("close-button")}"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal"></sd-icon></sd-button></div></header>`}<div part="body" class="flex-auto block px-4 focus-visible:focus-outline !-outline-offset-2" tabindex="0"><slot></slot></div><footer part="footer" class="${c(this.hasSlotController.test("footer")?"text-left p-4":"hidden")}"><slot name="footer"></slot></footer></div></section>`}};ht.styles=[...f.styles,y`:host{--width:25rem;display:contents}:host([contained]){z-index:auto}:host(:not([contained])){z-index:var(--sd-z-index-drawer,700)}[part=body]{-webkit-overflow-scrolling:touch;overflow-y:scroll;scrollbar-width:none}[part=body]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}`],a([g("[part=base]")],ht.prototype,"drawer",2),a([g("[part=panel]")],ht.prototype,"panel",2),a([g("[part=overlay]")],ht.prototype,"overlay",2),a([g("[part=close-button]")],ht.prototype,"closeButton",2),a([l({type:Boolean,reflect:!0})],ht.prototype,"open",2),a([l({type:String,attribute:"label",reflect:!0})],ht.prototype,"label",2),a([l({type:String,reflect:!0})],ht.prototype,"placement",2),a([l({type:Boolean,reflect:!0})],ht.prototype,"contained",2),a([l({attribute:"no-header",type:Boolean,reflect:!0})],ht.prototype,"noHeader",2),a([x("open",{waitUntilFirstUpdate:!0})],ht.prototype,"handleOpenChange",1),a([x("contained",{waitUntilFirstUpdate:!0})],ht.prototype,"handleNoModalChange",1),ht=a([v("sd-drawer")],ht);_("drawer.showStart",{keyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("drawer.hideStart",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});_("drawer.showEnd",{keyframes:[{opacity:0,translate:"100%"},{opacity:1,translate:"0"}],rtlKeyframes:[{opacity:0,translate:"-100%"},{opacity:1,translate:"0"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("drawer.hideEnd",{keyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"100%"}],rtlKeyframes:[{opacity:1,translate:"0"},{opacity:0,translate:"-100%"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});_("drawer.denyClose",{keyframes:[{scale:1},{scale:1.01},{scale:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("drawer.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("drawer.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});var ze=class{constructor(i){this.fixedEnd=!0;this.fixedStart=!0;this.gradient=!1;this.outline=!1;this.map=(i,t,e,r,o)=>(i-t)*(o-r)/(e-t)+r;this.damp=(i,t,e)=>2*(1-t/i)*(t/i)*e;this.canvas=i.canvas,this.frequency=i.frequency,this.phase=i.phase,this.amplitude=i.amplitude,this.color=i.color,this.shift=i.shift,this.lineWidth=2,this.damping=i.damping,this.context=this.canvas.getContext("2d"),this.paused=!0,this.playbackSpeed=1,this.origin={x:0,y:this.canvas.height}}drawPoint(i,t,e){if(!this.context)return;let r=this.lineWidth/2;if(this.context.beginPath(),this.outline&&(this.context.fillStyle=e,this.context.lineWidth=2,this.context.arc(i,t,r,0,2*Math.PI),this.context.fill()),this.gradient){let o=this.context.createLinearGradient(0,0,0,this.canvas.height);o.addColorStop(.1,e),o.addColorStop(1,"transparent"),this.context.fillStyle=o}else this.context.fillStyle=e;this.context.fillRect(i-r,t-r,r,this.canvas.height-t+r)}buildSine(i,t,e,r,o){for(let n=this.origin.x,d=this.origin.x+i;n<d;n+=1){let h=r*Math.sin(o*(n+t));this.fixedStart&&this.fixedEnd?this.drawPoint(n,this.origin.y+this.damp(d,n,this.damping)*h,e):this.fixedStart?this.drawPoint(n,this.origin.y+this.map(n,this.origin.x,d,0,this.damping)*h,e):this.fixedEnd?this.drawPoint(n,this.origin.y+(this.damping-this.map(n,this.origin.x,d,0,this.damping))*h,e):this.drawPoint(n,this.origin.y+h,e)}}redraw(){this.phase+=this.shift*(this.paused?1:2*this.playbackSpeed),this.buildSine(this.canvas.width,this.phase,this.color,this.amplitude,this.frequency)}setPlay(){this.paused=!1}setPause(){this.paused=!0}setPlaybackSpeed(i){this.playbackSpeed=i}};var it=class extends f{constructor(){super();this.localize=new L(this);this.hasSlotController=new A(this,"transcript");this.reversedLayout=!1;this.hideTimestamps=!1;this.animated=!1;this.inverted=!1;this.speed=1;this.currentTime=this.formatTime(0);this.duration="";this.isPlaying=!1;this.isMuted=!1;this.isTranscriptOpen=!1;this.progress=0;this.updateCurrentTime=this.updateCurrentTime.bind(this),this.handleAudioEnd=this.handleAudioEnd.bind(this),this.handleAudioProgress=this.handleAudioProgress.bind(this),this.handleAudioProgressKeydown=this.handleAudioProgressKeydown.bind(this),this.handleTranscriptDrawerToggle=this.handleTranscriptDrawerToggle.bind(this)}firstUpdated(){this.audioElement&&(this.audioElement.addEventListener("timeupdate",this.updateCurrentTime),this.audioElement.addEventListener("ended",this.handleAudioEnd),this.audioElement.setAttribute("controlsList","nodownload"),document.addEventListener("sd-after-hide",this.handleTranscriptDrawerToggle),this.audioElement.playbackRate=this.speed,this.progressSlider.tooltipFormatter=t=>this.localize.term("seconds",Number(t).toFixed(0)),this.animated&&this.initAnimation())}updated(t){if(t.has("animated")){let e=t.get("animated");!e&&this.animated?this.initAnimation():e&&!this.animated&&this.clear()}}get audioElement(){let t=this.shadowRoot.querySelector("slot");return(t==null?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}updateCurrentTime(){if(!this.audioElement)return;let t=this.audioElement.currentTime;this.currentTime=this.formatTime(t),this.progress=t,this.progressSlider&&(this.progressSlider.value=this.progress.toString())}updateAudioDuration(){if(this.audioElement){if(isNaN(this.audioElement.duration)){setTimeout(()=>{this.updateAudioDuration()},100);return}this.duration=this.formatTime(this.audioElement.duration),this.progressSlider.max=this.audioElement.duration}}playAudio(){this.audioElement&&(this.isPlaying=!0,this.audioElement.play(),this.emit("sd-playback-start"),this.animated&&this.draw())}pauseAudio(){this.audioElement&&(this.isPlaying=!1,this.audioElement.pause(),this.emit("sd-playback-pause"),this.animated&&this.stopAnimation())}handleAudioEnd(){this.emit("sd-playback-end"),this.isPlaying=!1,this.progress=0,this.progressSlider.value="0",this.currentTime=this.formatTime(0),this.animated&&this.stopAnimation()}toggleMute(){this.audioElement&&(this.isMuted=!this.isMuted,this.isMuted?(this.emit("sd-playback-mute"),this.audioElement.muted=!0):(this.emit("sd-playback-unmute"),this.audioElement.muted=!1))}toggleMuteKeydown(t){t.key==="Enter"&&(t.preventDefault(),this.toggleMute())}togglePlaybackSpeed(){this.audioElement&&(this.emit("sd-playback-speed"),this.speed=this.speed===1.5?1:this.speed+.25,this.audioElement.playbackRate=this.speed)}togglePlaybackSpeedKeydown(t){t.key==="Enter"&&(t.preventDefault(),this.togglePlaybackSpeed())}formatTime(t){let e=Math.floor(t/60).toString().padStart(2,"0"),r=Math.floor(t%60).toString().padStart(2,"0");return`${e}:${r}`}handleAudioProgress(){if(!this.audioElement)return;let t=Number(this.progressSlider.value);this.audioElement.currentTime=t,this.progress=t,this.currentTime=this.formatTime(t)}handleAudioProgressKeydown(t){t.key==="ArrowRight"&&(this.progressSlider.value=(Number(this.progressSlider.value)+1).toString(),this.handleAudioProgress()),t.key==="ArrowLeft"&&(this.progressSlider.value=(Number(this.progressSlider.value)-1).toString(),this.handleAudioProgress())}handleTranscriptDrawerToggle(){this.isTranscriptOpen=!this.isTranscriptOpen}handleThumbGrab(){var t;(t=this.audioElement)==null||t.pause()}handleThumbRelease(){var t;this.isPlaying&&((t=this.audioElement)==null||t.play())}showTranscript(){this.emit("sd-transcript-click"),this.drawer.open=!0,this.handleTranscriptDrawerToggle()}showTranscriptKeydown(t){(t.key==="Enter"||t.key===" ")&&this.showTranscript()}rgbToHex(t){let e=t.match(/\d+/g);if(e&&e.length===3){let r=parseInt(e[0]),o=parseInt(e[1]),n=parseInt(e[2]),d=p=>p.toString(16).padStart(2,"0");return`#${d(r)}${d(o)}${d(n)}`.toUpperCase()}return null}initAnimation(){this.context=this.canvas.getContext("2d");let t=this.audioPlayerContainer.querySelector(".playback-speed"),r=window.getComputedStyle(t).color,o;this.inverted?o="#FFFFFF33":o=this.rgbToHex(r)+"33",this.waveList=[new ze({canvas:this.canvas,color:o,phase:240,shift:1.5,amplitude:230,frequency:.012,damping:1}),new ze({canvas:this.canvas,color:o,phase:180,shift:2.5,amplitude:250,frequency:.005,damping:1}),new ze({canvas:this.canvas,color:o,phase:180,shift:-2.5,amplitude:250,frequency:.005,damping:1}),new ze({canvas:this.canvas,color:o,phase:180,shift:-1,amplitude:200,frequency:.018,damping:1}),new ze({canvas:this.canvas,color:o,phase:180,shift:1.5,amplitude:150,frequency:.01,damping:1})],this.animated&&this.drawStillWaves()}drawStillWaves(){this.waveList.forEach(t=>{t.redraw()})}stopAnimation(){this.isPlaying=!1}clear(){!this.context||!this.canvas||this.context.clearRect(0,0,this.canvas.width,this.canvas.height)}async draw(){!this.isPlaying||!this.animated||(this.clear(),this.waveList.forEach(t=>{t.redraw()}),await new Promise(t=>{setTimeout(t,1e3/30)}),await this.draw())}render(){let t=u`<div class="${c("controls grid grid-cols-3 justify-items-center items-center",this.reversedLayout?"mt-2":"mb-2",!this.animated&&"relative",this.animated&&!this.reversedLayout&&"absolute -top-4 left-0 w-full")}" part="audio-controls"><button class="${c("playback-speed justify-self-start text-base font-bold hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.localize.term("playbackSpeed")} (${this.speed}x)" @click="${this.togglePlaybackSpeed}" @keydown="${this.togglePlaybackSpeedKeydown}" part="playback-speed">${this.speed}x</button><sd-button ?inverted="${!!this.inverted}" part="play-button" size="lg" @click="${this.isPlaying?this.pauseAudio:this.playAudio}" aria-label="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" title="${this.isPlaying?this.localize.term("pauseAudio"):this.localize.term("playAudio")}" class="mb-4">${this.isPlaying?u`<slot name="pause-icon"><sd-icon class="text-xl" name="pause" library="_internal"></sd-icon></slot>`:u`<slot name="play-icon"><sd-icon class="text-xl" name="start" library="_internal"></sd-icon></slot>`}</sd-button><div class="flex items-center gap-6 justify-self-end">${this.hasSlotController.test("transcript")?u`<button class="${c("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" aria-label="${this.isTranscriptOpen?this.localize.term("transcriptIsOpen"):this.localize.term("openTranscript")}" @click="${this.showTranscript}" @keydown="${this.showTranscriptKeydown}" part="transcript"><sd-icon class="w-6 h-6" name="transcript" library="_internal"></sd-icon></button>`:null} <button class="${c("w-6 h-6 hover:cursor-pointer sd-interactive",this.inverted&&"sd-interactive--inverted")}" part="volume" aria-label="${this.isMuted?this.localize.term("unmute"):this.localize.term("mute")}" @click="${this.toggleMute}" @keydown="${this.toggleMuteKeydown}"><sd-icon class="w-6 h-6" name="${this.isMuted?"mute":"volume"}" library="_internal"></sd-icon></button></div></div>`,e=u`<div class="${c("w-full flex justify-between",this.reversedLayout?"mb-0.5":"mt-0.5",this.animated&&this.reversedLayout&&"absolute bottom-0 left-0 !mb-4")}" part="timestamps"><div class="${c("current-time text-sm",this.inverted?"text-primary-400":"text-black")}">${this.currentTime}</div><div class="${c("current-time text-sm",this.inverted?"text-primary-400":"text-black")}">${this.duration}</div></div>`;return u`<div class="${c("w-full flex relative",this.reversedLayout?"flex-col-reverse":"flex-col")}" aria-label="${this.localize.term("audioPlayer")}" part="audio-player"><slot @slotchange="${this.updateAudioDuration}"></slot>${!this.animated||this.animated&&this.reversedLayout?t:null}<div class="relative">${this.animated&&!this.reversedLayout?u`${t}`:null} ${this.animated?u`<canvas class="w-full h-16 -mb-2"></canvas>`:null} ${!this.hideTimestamps&&this.animated&&this.reversedLayout?e:null}<sd-range part="progress-slider" no-tooltip min="0" max="100" step="0.001" label="${this.localize.term("seekBar")}" @mousedown="${this.handleThumbGrab}" @touchstart="${this.handleThumbGrab}" @mouseup="${this.handleThumbRelease}" @touchend="${this.handleThumbRelease}" @sd-input="${this.handleAudioProgress}" @keydown="${this.handleAudioProgressKeydown}"></sd-range></div>${this.hasSlotController.test("transcript")?u`<sd-drawer><slot name="transcript"></slot></sd-drawer>`:null} ${!this.hideTimestamps&&(!this.animated||!this.reversedLayout)?e:null}</div>`}};it.styles=[...f.styles,y`sd-button::part(base){align-items:center;border-radius:var(--sd-border-radius-full,9999px);display:flex;height:var(--sd-spacing-12,3rem);justify-content:center;width:var(--sd-spacing-12,3rem)}sd-button::part(motion-wrapper){border-radius:var(--sd-border-radius-full,9999px)}sd-button::part(label){align-items:center;display:flex;flex-grow:0}sd-range::part(form-control-label){display:none}:host([inverted]) sd-range::part(thumb){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));outline-color:rgb(var(--sd-color-white,255 255 255)/1)}:host([animated]) sd-range::part(track){background-color:transparent}:host([inverted]:not([animated])) sd-range::part(track){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-400,153 171 208)/var(--tw-bg-opacity,1))}:host([inverted]:not([animated])) sd-range::part(active-track){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1))}`],a([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],it.prototype,"reversedLayout",2),a([l({type:Boolean,reflect:!0,attribute:"hide-timestamps"})],it.prototype,"hideTimestamps",2),a([l({type:Boolean,reflect:!0})],it.prototype,"animated",2),a([l({type:Boolean,reflect:!0})],it.prototype,"inverted",2),a([l({type:Number,reflect:!0})],it.prototype,"speed",2),a([E()],it.prototype,"currentTime",2),a([E()],it.prototype,"duration",2),a([E()],it.prototype,"isPlaying",2),a([E()],it.prototype,"isMuted",2),a([E()],it.prototype,"isTranscriptOpen",2),a([E()],it.prototype,"progress",2),a([g('[part="progress-slider"]')],it.prototype,"progressSlider",2),a([g('[part="audio-player"]')],it.prototype,"audioPlayerContainer",2),a([g("sd-drawer")],it.prototype,"drawer",2),a([g("canvas")],it.prototype,"canvas",2),it=a([v("sd-audio")],it);var ee=class extends f{constructor(){super(...arguments);this.size="lg";this.variant="blue";this.inverted=!1}render(){return u`<span part="base" aria-labelledby="content" class="${c("inline-flex items-center justify-center gap-x-[1px] text-center font-bold whitespace-nowrap border rounded-full select-none cursor-[inherit]",{blue:this.inverted?"text-primary bg-primary-100 border-primary":"text-white bg-primary-500 border-white",green:this.inverted?"text-white bg-success border-primary":"text-white bg-success border-white",red:this.inverted?"text-white bg-error border-primary":"text-white bg-error border-white"}[this.variant])}"><span id="content" part="content" class="${c(this.size==="sm"&&"sr-only")}"><slot></slot></span></span>`}};ee.styles=[...f.styles,y`:host{align-items:center;display:inline-flex;justify-content:center}:host([size=md]){font-size:.625rem;height:var(--sd-spacing-4,1rem);min-width:var(--sd-spacing-4,1rem)}:host([size=lg]){font-size:.75rem;height:var(--sd-spacing-5,1.25rem);min-width:var(--sd-spacing-5,1.25rem)}:host([size=sm])::part(base){height:var(--sd-spacing-2,.5rem);min-width:var(--sd-spacing-2,.5rem)}:host([size=md])::part(base){padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}:host([size=lg])::part(base){padding-left:.313rem;padding-right:.313rem}`],a([l({type:String,reflect:!0})],ee.prototype,"size",2),a([l({type:String,reflect:!0})],ee.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],ee.prototype,"inverted",2),ee=a([v("sd-badge")],ee);var jt=class extends f{constructor(){super(...arguments);this.variant="primary";this.shapes=["top","middle","bottom"];this.componentBreakpoint=0}getSvg(t,e){return{0:this.smallSvg(e),414:this.mediumSvg(e),640:this.largeSvg(e)}[t]}largeSvg(t){return t==="top"?u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 121"><path d="M610.777 1.393.001 120.146 0 123h700.001V74.79c0-4.797-.462-9.585-1.381-14.294-7.909-40.537-47.237-66.998-87.843-59.103Z"/></svg>`:u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 123"><path d="M89.224 121.607 700 2.854 700.001 0h-700L0 48.21c0 4.797.463 9.584 1.381 14.294 7.909 40.537 47.237 66.998 87.843 59.103Z"/></svg>`}mediumSvg(t){return t==="top"?u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 119"><path d="M597.75 1.6 0 118.046V121h700V85.872c0-5.509-.53-11.006-1.583-16.413-9.063-46.543-54.133-76.924-100.667-67.86Z"/></svg>`:u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 121"><path d="M102.25 119.4 700 2.954V0H0v35.128c0 5.509.53 11.006 1.583 16.413 9.063 46.543 54.134 76.924 100.667 67.859Z"/></svg>`}smallSvg(t){return t==="top"?u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 113"><path d="M566.951 2.08 0 112.466v2.934h700v-3.672c0-7.166-.689-14.314-2.059-21.348-11.789-60.557-70.436-100.09-130.99-88.3Z"/></svg>`:u`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 700 116"><path d="M133.049 113.32 700 2.934V0H0v3.672c0 7.165.69 14.314 2.059 21.348 11.79 60.557 70.436 100.09 130.99 88.3Z"/></svg>`}setBreakpoint(){switch(!0){case this.containerElem.clientWidth<=414:this.componentBreakpoint=0;break;case this.containerElem.clientWidth<640:this.componentBreakpoint=414;break;default:this.componentBreakpoint=640}}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.setBreakpoint()),this.updateComplete.then(()=>{this.setBreakpoint(),this.resizeObserver.observe(this.containerElem)})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.containerElem)}renderTopBrandshape(){return u`<div class="relative" part="shape-top">${this.getSvg(this.componentBreakpoint,"top")} ${this.renderWhitespaceFix("top")}</div>`}renderMiddleBrandshape(){return u`<div class="${c({0:"px-6 py-4",414:"px-10 py-8",640:"px-10 py-8"}[this.componentBreakpoint],"w-full block relative")}"><div part="shape-middle" class="${c({"neutral-100":"bg-neutral-100",primary:"bg-primary",white:"bg-white","border-white":"bg-transparent","border-primary":"bg-transparent",image:"bg-transparent"}[this.variant],"w-full block absolute h-full top-0 left-0 z-0")}"></div><div class="${c("z-10 relative",this.variant==="image"&&"invisible opacity-0")}" part="content"><slot>${this.variant==="image"?"":u`<div class="h-8"></div>`}</slot></div></div>`}renderBottomBrandshape(){return u`<div class="relative" part="shape-bottom">${this.getSvg(this.componentBreakpoint,"bottom")}${this.renderWhitespaceFix("bottom")}</div>`}renderWhitespaceFix(t){return u`<div class="${c({"neutral-100":"bg-neutral-100",primary:"bg-primary",white:"bg-white","border-white":"bg-transparent","border-primary":"bg-transparent",image:"bg-transparent"}[this.variant],{top:"bottom-0",bottom:"top-0"}[t],"block absolute left-0 w-full h-[1px]")}"></div>`}renderStylizedVariant(){return u`<div part="stylized-container" class="w-full overflow-hidden"><slot class="${c(this.variant!=="image"&&"hidden")}" name="image"></slot></div>`}renderShapes(){return u`${this.shapes.includes("top")?this.renderTopBrandshape():""} ${this.shapes.includes("middle")?this.renderMiddleBrandshape():""} ${this.shapes.includes("bottom")?this.renderBottomBrandshape():""}`}render(){let t=this.variant.startsWith("border-")||this.variant==="image";return u`<div class="${c({"neutral-100":"fill-neutral-100",primary:"fill-primary",white:"fill-white","border-white":"fill-transparent","border-primary":"fill-transparent",image:"fill-transparent"}[this.variant],"relative")}" part="base">${t?this.renderStylizedVariant():""} ${this.renderShapes()}</div>`}};jt.styles=[...f.styles,y`:host{container-type:inline-size;display:block;--angle:11deg;--radius:60px;--tan:tan(var(--angle));--adjacent:100cqw;--opposite:calc(var(--tan)*var(--adjacent));--curve:calc((var(--opposite) - (var(--radius)/3))*0.5)}@supports not (transform:skewY(11deg)){:host{--tan:0.1943803091}}@media (min-width:415px){:host{--radius:72px}}@media (min-width:640px){:host{--radius:84px}}:host([variant=image]) [part=stylized-container],:host([variant^=border-]) [part=stylized-container]:before{border-radius:0 var(--radius);height:calc(100% - var(--curve)*2);left:var(--sd-spacing-0,0);margin-top:calc(var(--curve));position:absolute;top:var(--sd-spacing-0,0);transform:skewY(calc(var(--angle)*-1))}slot[name=image]::slotted(img),slot[name=image]::slotted(video){height:calc(100% + var(--curve)*2)!important;-o-object-fit:cover;object-fit:cover;position:absolute!important;transform:translateY(calc(var(--curve)*-1)) skewY(var(--angle));width:100%}@supports not (height:100cqw){:host([variant=image]) [part=stylized-container],:host([variant^=border-]) [part=stylized-container]:before{height:100%;margin-top:0;transform:unset}slot[name=image]::slotted(img),slot[name=image]::slotted(video){height:100%!important;transform:unset}}:host([variant=border-primary]){--internal-border-color:rgb(var(--sd-color-primary,0 53 142))}:host([variant=border-white]){--internal-border-color:var(--sd-color-white,#fff)}:host([variant^=border-]) [part=stylized-container]:before{border-color:var(--internal-border-color,#000);border-style:solid;border-width:2px;content:"";right:var(--sd-spacing-0,0)}`],a([g("[part=base]")],jt.prototype,"containerElem",2),a([l({type:String,reflect:!0})],jt.prototype,"variant",2),a([l({type:Array})],jt.prototype,"shapes",2),a([E()],jt.prototype,"componentBreakpoint",2),jt=a([v("sd-brandshape")],jt);var Tt=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.label="";this.itemPositionsCached=!1;this.isTruncated=!1}get items(){return this.querySelectorAll("sd-breadcrumb-item")}cacheItemPositions(){this.items.forEach(t=>{let{width:e}=t.getBoundingClientRect();t.dataset.size=`${e}`}),this.itemPositionsCached=!0}handleTruncation(){var o;if(document.documentElement.clientWidth<=1024)return;let{width:t}=this.base.getBoundingClientRect(),{width:e}=this.truncated.getBoundingClientRect();this.itemPositionsCached||this.cacheItemPositions(),this.dropdown.innerHTML="",this.isTruncated=!1;let r=0;for(let[n,d]of Array.from(this.items).reverse().entries()){let h=parseFloat(`${(o=d.dataset.size)!=null?o:d.getBoundingClientRect().width}`);if(d.hidden=!1,this.isTruncated){let p=d.cloneNode(!0);this.dropdown.prepend(p),d.hidden=!0;continue}if(n===0||n===1){r+=h;continue}if(this.isTruncated=r+h+e>t,this.isTruncated){let p=d.cloneNode(!0);this.dropdown.prepend(p),d.hidden=!0}else r+=h}}handleMobileChevron(){var e,r,o;let t=document.createElement("sd-icon");t.setAttribute("slot","icon-left"),t.setAttribute("library","_internal"),t.setAttribute("name","chevron-left"),t.setAttribute("class","text-base me-1 lg:hidden"),(o=(r=(e=Array.from(this.items).at(-2))==null?void 0:e.shadowRoot)==null?void 0:r.querySelector("sd-link"))==null||o.appendChild(t)}handleSlotChange(){this.handleMobileChevron()}connectedCallback(){super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>this.handleTruncation()),this.resizeObserver.observe(this)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this)}render(){return u`<nav part="base" class="flex items-center pb-1" aria-label="${this.label}"><sd-dropdown part="truncated" class="${c(!this.isTruncated&&"absolute opacity-0 pointer-events-none")}"><button slot="trigger" tabindex="${this.isTruncated?"0":"-1"}" aria-label="${this.localize.term("truncatedBreadcrumbs")}" aria-expanded="false" aria-haspopup="true" class="flex sd-interactive">[...]</button><ol part="truncated-dropdown" class="flex flex-col gap-4 px-2 py-3 min-w-40"></ol></sd-dropdown><ol part="list" class="flex items-center"><slot @slotchange="${this.handleSlotChange}"></slot></ol></nav>`}};Tt.styles=[...f.styles,y`:host{display:block;position:relative}::slotted(sd-breadcrumb-item:not(:last-of-type)):after,sd-dropdown:after{border-radius:var(--sd-border-radius-full,9999px);content:var(--tw-content);display:none;height:var(--sd-spacing-1,.25rem);margin-left:var(--sd-spacing-2,.5rem);margin-right:var(--sd-spacing-2,.5rem);width:var(--sd-spacing-1,.25rem);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-bg-opacity,1))}@media (min-width:1024px){::slotted(sd-breadcrumb-item:not(:last-of-type)):after,sd-dropdown:after{content:var(--tw-content);display:inline-block}}::slotted(sd-breadcrumb-item:nth-last-child(2)){display:flex}@media (min-width:1024px){::slotted(sd-breadcrumb-item:nth-last-child(2)):after{content:var(--tw-content);--tw-bg-opacity:1;background-color:rgb(var(--sd-color-accent,45 157 0)/var(--tw-bg-opacity,1))}}::slotted(sd-breadcrumb-item),sd-dropdown{align-items:center;display:none}@media (min-width:1024px){::slotted(sd-breadcrumb-item),sd-dropdown{display:flex}}`],a([g('[part="base"]')],Tt.prototype,"base",2),a([g('[part="truncated"]')],Tt.prototype,"truncated",2),a([g('[part="truncated-dropdown"]')],Tt.prototype,"dropdown",2),a([g("slot")],Tt.prototype,"defaultSlot",2),a([l({type:String,reflect:!0})],Tt.prototype,"label",2),a([E()],Tt.prototype,"itemPositionsCached",2),a([E()],Tt.prototype,"isTruncated",2),Tt=a([v("sd-breadcrumb")],Tt);var Ft=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.href="";this.current=!1}handleCurrentChange(){var t,e;!this.base||!this.current||(e=(t=this.base.shadowRoot)==null?void 0:t.querySelector("a"))==null||e.setAttribute("aria-current","page")}connectedCallback(){this.hasAttribute("role")||this.setAttribute("role","listitem"),super.connectedCallback()}firstUpdated(){requestAnimationFrame(()=>this.handleCurrentChange())}render(){return u`<sd-link part="base" href="${w(this.current?void 0:this.href)}" target="${this.target}" standalone class="text-nowrap"><slot></slot></sd-link>`}};Ft.styles=[...f.styles,y`:host{align-items:center;display:inline-flex}sd-link::part(base){align-items:center}sd-link::part(icon-left){display:inline-flex;margin-right:var(--sd-spacing-0,0)}sd-link sd-icon{margin:var(--sd-spacing-0,0)}:host([current]) sd-link::part(base){--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-700,104 104 104)/var(--tw-text-opacity,1))}:host([current]) sd-link::part(label){text-decoration-line:none}`],a([g('[part="base"]')],Ft.prototype,"base",2),a([l({type:String,reflect:!0})],Ft.prototype,"href",2),a([l({type:String,reflect:!0})],Ft.prototype,"target",2),a([l({type:Boolean,reflect:!0})],Ft.prototype,"current",2),a([x("current")],Ft.prototype,"handleCurrentChange",1),Ft=a([v("sd-breadcrumb-item")],Ft);var ir=class{constructor(i,t){this.timerId=0;this.activeInteractions=0;this.paused=!1;this.stopped=!0;this.pause=()=>{this.activeInteractions++||(this.paused=!0,this.host.requestUpdate())};this.resume=()=>{--this.activeInteractions||(this.paused=!1,this.host.requestUpdate())};i.addController(this),this.host=i,this.tickCallback=t}hostConnected(){this.host.addEventListener("mouseenter",this.pause),this.host.addEventListener("mouseleave",this.resume),this.host.addEventListener("focusin",this.pause),this.host.addEventListener("focusout",this.resume),this.host.addEventListener("touchstart",this.pause,{passive:!0}),this.host.addEventListener("touchend",this.resume)}hostDisconnected(){this.stop(),this.host.removeEventListener("mouseenter",this.pause),this.host.removeEventListener("mouseleave",this.resume),this.host.removeEventListener("focusin",this.pause),this.host.removeEventListener("focusout",this.resume),this.host.removeEventListener("touchstart",this.pause),this.host.removeEventListener("touchend",this.resume)}start(i){this.stop(),this.stopped=!1,this.timerId=window.setInterval(()=>{this.paused||this.tickCallback()},i)}stop(){clearInterval(this.timerId),this.stopped=!0,this.host.requestUpdate()}};function Ws(s,i,t){let e=r=>Object.is(r,-0)?0:r;return s<i?e(i):s>t?e(t):e(s)}var rr=class{constructor(i){this.heightCalculated=!1;this.isEnabled=!1;this.isCalculating=!1;this.fadeClasses={base:["absolute","top-0","left-0","w-full","h-full","visible","transition-opacity","duration-x-slow","ease-in-out"],active:["opacity-100","z-[1]"],inactive:["opacity-0","z-0"]};this.handleResize=()=>{this.isEnabled&&(this.resizeTimeout&&clearTimeout(this.resizeTimeout),this.resizeTimeout=setTimeout(()=>{this.isEnabled&&(this.heightCalculated=!1,this.calculateHeight())},250))};this.carousel=i}enable(){this.isEnabled||(this.isEnabled=!0,this.calculateHeight(),window.addEventListener("resize",this.handleResize))}disable(){this.isEnabled&&(this.isEnabled=!1,this.removeFadeStyles(),this.carousel.style.removeProperty("--carousel-height"),this.carousel.scrollContainer&&this.carousel.scrollContainer.style.removeProperty("height"),this.heightCalculated=!1,this.isCalculating=!1,window.removeEventListener("resize",this.handleResize),this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0))}updateActiveSlide(i){if(!this.isEnabled)return;this.carousel.getSlides().forEach((e,r)=>{r===i?this.show(e):this.hide(e)})}show(i){if(!this.isEnabled)return;let t=i.classList;t.remove(...this.getAllFadeClasses()),t.add(...this.fadeClasses.base,...this.fadeClasses.active),i.removeAttribute("inert"),i.setAttribute("aria-hidden","false")}hide(i){if(!this.isEnabled)return;let t=i.classList;t.remove(...this.getAllFadeClasses()),t.add(...this.fadeClasses.base,...this.fadeClasses.inactive),i.toggleAttribute("inert",!0),i.setAttribute("aria-hidden","true")}removeFadeStyles(){this.carousel.getSlides().forEach(t=>{t.classList.remove(...this.getAllFadeClasses()),t.removeAttribute("inert"),t.removeAttribute("aria-hidden")})}getAllFadeClasses(){return[...this.fadeClasses.base,...this.fadeClasses.active,...this.fadeClasses.inactive]}calculateHeight(){if(this.heightCalculated||!this.isEnabled||this.isCalculating)return;let i=this.carousel.getSlides(),t=this.carousel.scrollContainer;if(i.length===0||!t)return;this.isCalculating=!0,t.style.removeProperty("height"),this.carousel.style.removeProperty("--carousel-height");let e=i.map(r=>{let o=r,n={position:o.style.position,opacity:o.style.opacity,zIndex:o.style.zIndex,transform:o.style.transform,classes:o.className};return o.classList.remove(...this.getAllFadeClasses()),o.classList.add("relative","opacity-1","z-auto","transform-none"),n});requestAnimationFrame(()=>{if(!this.isEnabled){this.isCalculating=!1;return}let r=i.map(n=>n.getBoundingClientRect().height),o=Math.max(...r);i.forEach((n,d)=>{let h=n,p=e[d];h.className=p.classes,["position","opacity","zIndex","transform"].forEach(m=>{let b=p[m];b?h.style.setProperty(m,b):h.style.removeProperty(m)})}),o>0&&(this.carousel.style.setProperty("--carousel-height",`${o}px`),t.style.height=`${o}px`,this.heightCalculated=!0,this.updateActiveSlide(this.carousel.activeSlide)),this.isCalculating=!1})}recalculateHeight(){this.isEnabled&&(this.resizeTimeout&&(clearTimeout(this.resizeTimeout),this.resizeTimeout=void 0),this.heightCalculated=!1,this.calculateHeight())}};function*Zs(s,i){if(s!==void 0){let t=0;for(let e of s)yield i(e,t++)}}function*Qs(s,i,t=1){let e=i===void 0?0:s;i!=null||(i=s);for(let r=e;t>0?r<i:i<r;r+=t)yield r}var Js=Symbol(),oi=s=>(i,t,e)=>{let r=e.value;e.value=function(...o){clearTimeout(this[Js]),this[Js]=window.setTimeout(()=>{r.apply(this,o)},s)}};var Ti=class{constructor(i){this.pointers=new Set;this.dragging=!1;this.scrolling=!1;this.mouseDragging=!1;this.handleScroll=()=>{this.scrolling||(this.scrolling=!0,this.host.requestUpdate()),this.handleScrollEnd()};this.handlePointerDown=i=>{if(i.pointerType==="touch")return;this.pointers.add(i.pointerId),this.mouseDragging&&!this.dragging&&i.button===0&&(i.preventDefault(),this.host.scrollContainer.addEventListener("pointermove",this.handlePointerMove))};this.handlePointerMove=i=>{let t=this.host.scrollContainer,e=!!i.movementX||!!i.movementY;!this.dragging&&e?(t.setPointerCapture(i.pointerId),this.handleDragStart()):t.hasPointerCapture(i.pointerId)&&this.handleDrag(i)};this.handlePointerUp=i=>{this.pointers.delete(i.pointerId),this.host.scrollContainer.releasePointerCapture(i.pointerId),this.pointers.size===0&&this.handleDragEnd()};this.handleTouchEnd=i=>{for(let t of i.changedTouches)this.pointers.delete(t.identifier)};this.handleTouchStart=i=>{for(let t of i.touches)this.pointers.add(t.identifier)};this.host=i,i.addController(this)}async hostConnected(){let i=this.host;await i.updateComplete;let t=i.scrollContainer;t.addEventListener("scroll",this.handleScroll,{passive:!0}),t.addEventListener("pointerdown",this.handlePointerDown),t.addEventListener("pointerup",this.handlePointerUp),t.addEventListener("pointercancel",this.handlePointerUp),t.addEventListener("touchstart",this.handleTouchStart,{passive:!0}),t.addEventListener("touchend",this.handleTouchEnd)}hostDisconnected(){let t=this.host.scrollContainer;t.removeEventListener("scroll",this.handleScroll),t.removeEventListener("pointerdown",this.handlePointerDown),t.removeEventListener("pointerup",this.handlePointerUp),t.removeEventListener("pointercancel",this.handlePointerUp),t.removeEventListener("touchstart",this.handleTouchStart),t.removeEventListener("touchend",this.handleTouchEnd)}handleScrollEnd(){this.pointers.size?this.handleScrollEnd():(this.scrolling=!1,this.host.scrollContainer.dispatchEvent(new CustomEvent("scrollend",{bubbles:!1,cancelable:!1})),this.host.requestUpdate())}handleDragStart(){let i=this.host;this.dragging=!0,i.scrollContainer.style.setProperty("scroll-snap-type","unset"),i.requestUpdate()}handleDrag(i){this.host.scrollContainer.scrollBy({left:-i.movementX,top:-i.movementY})}async handleDragEnd(){let i=this.host,t=i.scrollContainer;t.removeEventListener("pointermove",this.handlePointerMove),this.dragging=!1;let e=t.scrollLeft,r=t.scrollTop;t.style.removeProperty("scroll-snap-type");let o=t.scrollLeft,n=t.scrollTop;t.style.setProperty("scroll-snap-type","unset"),t.scrollTo({left:e,top:r,behavior:"auto"}),t.scrollTo({left:o,top:n,behavior:xi()?"auto":"smooth"}),this.scrolling&&await q(t,"scrollend"),t.style.removeProperty("scroll-snap-type"),i.requestUpdate()}};a([oi(100)],Ti.prototype,"handleScrollEnd",1);var ue=class extends f{static isCarouselItem(i){return i instanceof Element&&i.getAttribute("aria-roledescription")==="slide"}connectedCallback(){super.connectedCallback(),this.setAttribute("role","group")}render(){return u`<slot></slot>`}};ue.styles=[...f.styles,y`:host{align-items:center;aspect-ratio:var(--aspect-ratio);display:flex;flex-direction:column;height:100%;justify-content:center;scroll-snap-align:start;scroll-snap-stop:always;width:100%}::slotted(img){height:100%;-o-object-fit:cover;object-fit:cover;width:100%}`],ue=a([v("sd-carousel-item")],ue);var j=class extends f{constructor(){super(...arguments);this.variant="number";this.inverted=!1;this.loop=!1;this.autoplay=!1;this.fade=!1;this.slidesPerPage=1;this.slidesPerMove=1;this.activeSlide=0;this.currentPage=1;this.pausedAutoplay=!1;this.autoplayController=new ir(this,()=>this.next());this.scrollController=new Ti(this);this.slides=this.getElementsByTagName("sd-carousel-item");this.intersectionObserverEntries=new Map;this.localize=new L(this);this.userInteracted=!1;this.fadeController=new rr(this);this.handleUserInteraction=()=>{this.userInteracted=!0};this.handleSlotChange=t=>{t.some(r=>[...r.addedNodes,...r.removedNodes].some(o=>ue.isCarouselItem(o)&&!o.hasAttribute("data-clone")))&&this.initializeSlides(),this.requestUpdate()};this.unblockAutoplay=(t,e)=>{t.detail&&e.blur()}}connectedCallback(){super.connectedCallback(),["click","keydown"].forEach(e=>this.addEventListener(e,this.handleUserInteraction));let t=new IntersectionObserver(e=>{e.forEach(r=>{this.intersectionObserverEntries.set(r.target,r);let o=r.target;o.toggleAttribute("inert",!r.isIntersecting),o.classList.toggle("--in-view",r.isIntersecting),o.setAttribute("aria-hidden",r.isIntersecting?"false":"true")})},{root:this,threshold:.6});this.intersectionObserver=t,t.takeRecords().forEach(e=>{this.intersectionObserverEntries.set(e.target,e)})}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver.disconnect(),this.mutationObserver.disconnect(),["click","keydown"].forEach(t=>this.removeEventListener(t,this.handleUserInteraction)),this.fade&&this.fadeController.disable()}async firstUpdated(){if((()=>{let e=this.getSlides({excludeClones:!1});return e.length>0&&e[0].getBoundingClientRect().width>0})())this.initializeSlides();else{let e=new IntersectionObserver(r=>{r.forEach(o=>{o.isIntersecting&&o.target.getBoundingClientRect().width>0&&(this.initializeSlides(),e.disconnect())})});e.observe(this)}this.mutationObserver=new MutationObserver(this.handleSlotChange),this.mutationObserver.observe(this,{childList:!0,subtree:!1}),this.fade&&(await this.updateComplete,this.fadeController.enable())}getPageCount(t,e,r){return Math.ceil((t-e)/r)+1>0?Math.ceil((t-e)/r)+1:1}getCurrentPage(t,e,r,o){return Math.ceil((t-r)/o)-Math.ceil((t-r-e)/o)+1}getSlides({excludeClones:t=!0}={}){return[...this.slides].filter(e=>!t||!e.hasAttribute("data-clone"))}handleKeyDown(t){if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let e=t.target,r=this.localize.dir()==="rtl",o=e.closest('[part~="pagination-item"]')!==null,n=t.key==="ArrowDown"||!r&&t.key==="ArrowRight"||r&&t.key==="ArrowLeft",d=t.key==="ArrowUp"||!r&&t.key==="ArrowLeft"||r&&t.key==="ArrowRight";t.preventDefault(),d&&this.previous(),n&&this.next(),t.key==="Home"&&this.goToSlide(0),t.key==="End"&&this.goToSlide(this.getSlides().length-1),o&&this.updateComplete.then(()=>{var p;let h=(p=this.shadowRoot)==null?void 0:p.querySelector('[part~="pagination-item--active"]');h&&h.focus()})}}handleScrollEnd(){if(this.fade)return;let t=this.getSlides(),r=[...this.intersectionObserverEntries.values()].find(o=>o.isIntersecting);if(this.loop&&(r!=null&&r.target.hasAttribute("data-clone"))){let o=Number(r.target.getAttribute("data-clone"));this.goToSlide(o,"auto");return}r&&(this.activeSlide=t.indexOf(r.target))}handleFocus(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","polite")}handleBlur(){this.autoplay&&this.scrollContainer.setAttribute("aria-live","off")}pause(){this.pausedAutoplay=!0}resume(){this.pausedAutoplay=!1}handlePausedAutoplay(){var t,e;this.pausedAutoplay?(this.autoplayController.stop(),(t=this.autoplayControls)==null||t.setAttribute("aria-pressed","false")):this.autoplay&&(this.autoplayController.start(3e3),(e=this.autoplayControls)==null||e.setAttribute("aria-pressed","true"))}handleFadeChange(){this.fade?this.fadeController.enable():this.fadeController.disable()}initializeSlides(){let t=this.getSlides(),e=this.intersectionObserver;if(this.intersectionObserverEntries.clear(),this.getSlides({excludeClones:!1}).forEach((r,o)=>{e.unobserve(r),r.classList.remove("--in-view"),r.classList.remove("--is-active"),r.setAttribute("aria-label",this.localize.term("slideNum",o+1,t.length)),r.hasAttribute("data-clone")&&r.remove()}),this.loop&&!this.fade){let r=this.slidesPerPage,o=t.slice(-r),n=t.slice(0,r);o.reverse().forEach((d,h)=>{let p=d.cloneNode(!0);p.setAttribute("data-clone",String(t.length-h-1)),this.prepend(p)}),n.forEach((d,h)=>{let p=d.cloneNode(!0);p.setAttribute("data-clone",String(h)),this.append(p)})}this.getSlides({excludeClones:!1}).forEach(r=>{e.observe(r)}),this.fade&&this.updateComplete.then(()=>{this.fadeController.enable()}),this.fade||this.goToSlide(this.activeSlide,"auto")}handleSlideChange(){let t=this.getSlides();t.forEach((o,n)=>{o.classList.toggle("--is-active",n===this.activeSlide)}),this.fade&&this.fadeController.updateActiveSlide(this.activeSlide);let e=this.getCurrentPage(t.length,this.activeSlide,this.slidesPerPage,this.slidesPerMove);this.currentPage!==e&&(this.currentPage=e),this.hasUpdated&&this.emit("sd-slide-change",{detail:{index:this.activeSlide,slide:t[this.activeSlide]}});let r=this.getPageCount(t.length,this.slidesPerPage,this.slidesPerMove);this.currentPage>r&&requestAnimationFrame(()=>{this.nextTillFirst()})}handleSlidesPerMoveChange(){if(this.fade)return;let t=this.getSlides({excludeClones:!1}),e=this.slidesPerMove;t.forEach((r,o)=>{Math.abs(o-e)%e===0?r.style.removeProperty("scroll-snap-align"):r.style.setProperty("scroll-snap-align","none")})}handleAutoplayChange(){this.autoplayController.stop(),this.autoplay&&!this.pausedAutoplay&&this.autoplayController.start(3e3)}previous(t="smooth"){if(this.fade){let o=this.loop?(this.activeSlide-1+this.getSlides().length)%this.getSlides().length:Math.max(0,this.activeSlide-1);this.goToSlide(o);return}let e=this.activeSlide||this.activeSlide-this.slidesPerMove,r=!1;for(;!r&&e>0;)e-=1,r=Math.abs(e-this.slidesPerMove)%this.slidesPerMove===0;this.currentPage-1===0&&this.loop?this.goToSlide(this.activeSlide-this.slidesPerPage,t):this.goToSlide(e,t)}next(t="smooth"){if(this.fade){let e=this.loop?(this.activeSlide+1)%this.getSlides().length:Math.min(this.getSlides().length-1,this.activeSlide+1);this.goToSlide(e);return}this.currentPage+1<=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove)?this.goToSlide(this.activeSlide+this.slidesPerMove,t):this.loop&&this.nextTillFirst(t)}nextTillFirst(t="smooth"){if(this.fade){this.goToSlide(0);return}for(;this.activeSlide!==0;)this.goToSlide(this.activeSlide+1,t);this.currentPage=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove)}goToSlide(t,e="smooth"){let{slidesPerPage:r,loop:o,scrollContainer:n,fade:d}=this,h=this.getSlides(),p=this.getSlides({excludeClones:!1}),m=(t+h.length)%h.length;if(this.activeSlide=m,d)return;let b=Ws(t+(o?r:0),0,p.length+1),C=p[b],k=n.getBoundingClientRect(),$=C.getBoundingClientRect();if(n.scrollTo({left:$.left-k.left+n.scrollLeft,top:$.top-k.top+n.scrollTop,behavior:xi()?"auto":e}),this.userInteracted&&!this.loop){let z=this.activeSlide===h.length-1||this.activeSlide===this.slides.length-this.slidesPerPage,S=this.activeSlide===0;z?this.previousButton.focus({preventScroll:!0}):S&&this.nextButton.focus({preventScroll:!0})}}render(){let{scrollController:t,slidesPerMove:e}=this,r=this.getPageCount(this.getSlides().length,this.slidesPerPage,this.slidesPerMove),o=this.getCurrentPage(this.getSlides().length,this.activeSlide,this.slidesPerPage,this.slidesPerMove),n=this.loop||o>1,d=this.loop||o<r,h=this.localize.dir()==="ltr";return u`<div part="base" class="${c("carousel h-full w-full")}"><div id="scroll-container" part="scroll-container" class="${c("carousel__slides mb-6 max-h-full w-full items-center justify-items-center",this.inverted?"focus-visible:focus-outline-inverted":"focus-visible:focus-outline",this.fade?"relative overflow-hidden":"grid overflow-auto overscroll-x-contain grid-flow-col auto-rows-[100%] snap-x snap-mandatory overflow-y-hidden")}" style="--slides-per-page:${this.slidesPerPage}" aria-busy="${t.scrolling?"true":"false"}" aria-label="${this.localize.term("carouselContainer",Array.from(this.slides).filter(p=>!p.hasAttribute("data-clone")).length)}" aria-live="${this.autoplay?"off":"polite"}" tabindex="0" @keydown="${this.handleKeyDown}" @scrollend="${this.handleScrollEnd}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"><slot></slot></div><div part="controls" class="${c("w-full flex items-center justify-center relative")}"><div part="navigation" class="${c("carousel__navigation flex items-center justify-center")}"><button part="navigation-button navigation-button--previous" id="carousel__navigation-button--previous" ?disabled="${!n}" class="${c("!mr-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!n&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("previousSlide")}" aria-controls="scroll-container" aria-disabled="${n?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${n?p=>{this.previous(),this.unblockAutoplay(p,this.previousButton)}:null}"><slot name="previous-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-down":"chevron-up"}"></sd-icon></slot></button> ${this.variant==="dot"?u`<div part="pagination-dot" role="tablist" class="${c("carousel__pagination dot flex wrap items-center gap-2")}" aria-controls="scroll-container">${Zs(Qs(r),p=>{let m=p+1===o;return u`<button part="pagination-item ${m?"pagination-item--active":""}" class="${c("carousel__pagination-item","block cursor-pointer bg-none border-0 rounded-full",m?"bg-accent":"",this.inverted?"focus-within:focus-outline-inverted":"focus-within:focus-outline")}" role="tab" tabindex="0" aria-selected="${m?"true":"false"}" aria-label="${this.localize.term("goToSlide",p+1,r)}" @click="${b=>{this.goToSlide(p*e),this.unblockAutoplay(b,this.paginationItems[p])}}" @keydown="${this.handleKeyDown}"><span class="${c("h-4 w-4 block border hover:border-primary-500 rounded-full transition-colors duration-slow hover:duration-fast ease-in-out",this.inverted?"border-white hover:border-primary-500":"border-primary",m&&"bg-accent border-none",m?this.inverted?"hover:bg-accent-300":"hover:bg-accent-550":"")}"></span></button>`})}</div>`:u`<span part="pagination-number" class="carousel__pagination number flex gap-0.5 cursor-default select-none" aria-controls="scroll-container"><span part="pagination-item" class="${c("w-5 text-center border-b-2 border-accent",this.inverted?"text-white":"text-black")}">${o}</span> <span part="pagination-divider" class="${c("scale-y-[1.5]","text-center",this.inverted?"text-white":"text-black")}">/</span> <span part="pagination-item" class="${c("w-5 text-center",this.inverted?"text-white":"text-black")}">${r}</span></span>`} <button part="navigation-button navigation-button--next" id="carousel__navigation-button--next" ?disabled="${!d}" class="${c("!ml-6 !rounded-sm sd-interactive transition-colors duration-fast ease-in-out",!d&&"sd-interactive--disabled",this.inverted?"sd-interactive--inverted":"sd-interactive--reset")}" aria-label="${this.localize.term("nextSlide")}" aria-controls="scroll-container" aria-disabled="${d?"false":"true"}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" @click="${d?p=>{this.next(),this.unblockAutoplay(p,this.nextButton)}:null}"><slot name="next-icon"><sd-icon class="${c("h-6 w-6 rotate-90 grid place-items-center")}" library="_internal" name="${h?"chevron-up":"chevron-down"}"></sd-icon></slot></button></div><button class="${c("ml-6 !rounded-sm","!absolute !right-0 sd-interactive",this.inverted?"sd-interactive--inverted":"sd-interactive--reset",!this.autoplay&&"!hidden")}" part="autoplay-controls" aria-label="${this.localize.term("autoplay")}" aria-pressed="true" @click="${p=>{this.pausedAutoplay=!this.pausedAutoplay,p.detail&&this.autoplayControls.blur()}}"><slot name="autoplay-start" class="${c(this.pausedAutoplay?"":"hidden")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="start"></sd-icon></slot><slot name="autoplay-pause" class="${c(this.pausedAutoplay?"hidden":"")}"><sd-icon class="h-6 w-6 grid place-items-center" library="_internal" name="pause"></sd-icon></slot></button></div></div>`}};j.styles=[...f.styles,y`:host{--slide-gap:var(--sl-spacing-medium,1rem);--scroll-hint:0px;display:flex}.carousel{grid-template-areas:". slides ." ". pagination ."}.carousel__pagination{grid-area:pagination}.carousel__slides{grid-area:slides;scrollbar-width:none;--slide-size:calc((100% - (var(--slides-per-page) - 1)*var(--slide-gap))/var(--slides-per-page));-moz-column-gap:var(--slide-gap);column-gap:var(--slide-gap);grid-auto-columns:var(--slide-size);padding-inline:var(--scroll-hint);scroll-padding-inline:var(--scroll-hint)}.carousel__slides::-webkit-scrollbar{display:none}:host([fade]){--carousel-height:auto}:host([fade]) .carousel__slides{display:block;height:var(--carousel-height);overflow:hidden;position:relative}@media (prefers-reduced-motion){:where(.carousel__slides){scroll-behavior:auto}}.carousel__navigation{grid-area:navigation}sd-button::part(label){align-items:center;display:flex;flex:1 1 auto;pointer-events:none}`],a([g('[part~="autoplay-controls"]')],j.prototype,"autoplayControls",2),a([g('[part~="navigation-button--previous"]')],j.prototype,"previousButton",2),a([g('[part~="navigation-button--next"]')],j.prototype,"nextButton",2),a([Yi('[part~="pagination-item"]')],j.prototype,"paginationItems",2),a([l({type:String,reflect:!0})],j.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],j.prototype,"inverted",2),a([l({type:Boolean,reflect:!0})],j.prototype,"loop",2),a([l({type:Boolean,reflect:!0})],j.prototype,"autoplay",2),a([l({type:Boolean,reflect:!0})],j.prototype,"fade",2),a([l({type:Number,attribute:"slides-per-page",reflect:!0})],j.prototype,"slidesPerPage",2),a([l({type:Number,attribute:"slides-per-move",reflect:!0})],j.prototype,"slidesPerMove",2),a([g("slot:not([name])")],j.prototype,"defaultSlot",2),a([g(".carousel__slides")],j.prototype,"scrollContainer",2),a([g(".carousel__pagination")],j.prototype,"paginationContainer",2),a([E()],j.prototype,"activeSlide",2),a([E()],j.prototype,"currentPage",2),a([E()],j.prototype,"pausedAutoplay",2),a([x("pausedAutoplay")],j.prototype,"handlePausedAutoplay",1),a([x("fade",{waitUntilFirstUpdate:!0})],j.prototype,"handleFadeChange",1),a([x("loop",{waitUntilFirstUpdate:!0}),x("slidesPerPage",{waitUntilFirstUpdate:!0})],j.prototype,"initializeSlides",1),a([x("activeSlide")],j.prototype,"handleSlideChange",1),a([x("slidesPerMove")],j.prototype,"handleSlidesPerMoveChange",1),a([x("autoplay")],j.prototype,"handleAutoplayChange",1),j=a([v("sd-carousel")],j);var Lt=(s="value")=>(i,t)=>{let e=i.constructor,r=e.prototype.attributeChangedCallback;e.prototype.attributeChangedCallback=function(o,n,d){var m;let h=e.getPropertyOptions(s),p=typeof h.attribute=="string"?h.attribute:s;if(o===p){let b=h.converter||Ee,k=(typeof b=="function"?b:(m=b==null?void 0:b.fromAttribute)!=null?m:Ee.fromAttribute)(d,h.type);this[s]!==k&&(this[t]=k)}r.call(this,o,n,d)}};var{I:Pb}=Cs;var sr=s=>s.strings===void 0;var al={},Gs=(s,i=al)=>s._$AH=i;var me=qt(class extends Te{constructor(s){if(super(s),s.type!==_t.PROPERTY&&s.type!==_t.ATTRIBUTE&&s.type!==_t.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!sr(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[i]){if(i===gt||i===N)return i;let t=s.element,e=s.name;if(s.type===_t.PROPERTY){if(i===t[e])return gt}else if(s.type===_t.BOOLEAN_ATTRIBUTE){if(!!i===t.hasAttribute(e))return gt}else if(s.type===_t.ATTRIBUTE&&t.getAttribute(e)===i+"")return gt;return Gs(s),i}});var tt=class extends f{constructor(){super(...arguments);this.formControlController=new ot(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e});this.title="";this.name="";this.size="lg";this.disabled=!1;this.visuallyDisabled=!1;this.checked=!1;this.indeterminate=!1;this.defaultChecked=!1;this.form="";this.required=!1;this.showInvalidStyle=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}this.checked=!this.checked,this.indeterminate=!1,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false"),this.formControlController.setValidity(t)}handleStateChange(){this.input.checked=this.checked,this.input.indeterminate=this.indeterminate,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t=this.disabled&&this.indeterminate?"disabledIndeterminate":this.disabled&&this.checked?"disabledChecked":this.disabled?"disabled":this.visuallyDisabled?"visuallyDisabled":this.showInvalidStyle&&this.indeterminate?"invalidIndeterminate":this.showInvalidStyle?"invalid":this.checked||this.indeterminate?"filled":"default";return u`<label part="base" class="${c("sd-checkbox group flex items-start text-base leading-normal text-black cursor-pointer",(this.disabled||this.visuallyDisabled)&&"hover:cursor-not-allowed",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}"><input class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" title="${this.title}" name="${this.name}" value="${w(this.value)}" .indeterminate="${me(this.indeterminate)}" .checked="${me(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.indeterminate?"mixed":this.checked}" aria-describedby="invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"} ${this.indeterminate?" control--indeterminate":""}" class="${c("relative flex flex-shrink-0 items-center justify-center border rounded-sm h-4 w-4","transition-colors ease-in-out duration-medium group-hover:duration-fast","peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2 peer-focus-visible:outline-primary",{sm:"mt-[2px]",md:"mt-[3px]",lg:"mt-[3px]"}[this.size],{disabledIndeterminate:"border-neutral-500 bg-neutral-500",disabledChecked:"border-neutral-500 bg-neutral-500",disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",invalidIndeterminate:"border-error bg-error group-hover:bg-error-400",invalid:"border-error group-hover:bg-neutral-200",filled:"border-accent hover:border-accent-550 group-hover:border-accent-550 bg-accent group-hover:bg-accent-550",default:"border-neutral-800 hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"><div class="${c("absolute h-3 transition-[width] right-0.25 duration-medium",this.checked||this.indeterminate?"w-0":"w-3")}"><div class="${c("w-full h-full transition-colors duration-medium ease-in-out group-hover:duration-fast",{disabledIndeterminate:"bg-neutral-500",disabledChecked:" bg-neutral-500",disabled:"",visuallyDisabled:"",invalidIndeterminate:" bg-error group-hover:bg-error-400",invalid:"group-hover:bg-neutral-200",filled:"bg-accent group-hover:bg-accent-550",default:"hover:bg-neutral-200 group-hover:bg-neutral-200 bg-white"}[t])}"></div></div>${this.checked?u`<sd-icon part="checked-icon" class="text-white w-3 h-3" library="_internal" name="status-check"></sd-icon>`:""} ${!this.checked&&this.indeterminate?u`<sd-icon part="indeterminate-icon" class="text-white w-3 h-3" library="_internal" name="status-minus"></sd-icon>`:""} </span><span part="label" id="label" class="${c("select-none inline-block ml-2",this.disabled||this.visuallyDisabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.formControlController.renderInvalidMessage()}`}};tt.styles=[...f.styles,y`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline-width:0}:host([required]) #label:after{content:" *"}`],a([g('input[type="checkbox"]')],tt.prototype,"input",2),a([g("#invalid-message")],tt.prototype,"invalidMessage",2),a([l({type:String,reflect:!0})],tt.prototype,"title",2),a([l({type:String,reflect:!0})],tt.prototype,"name",2),a([l()],tt.prototype,"value",2),a([l({type:String,reflect:!0})],tt.prototype,"size",2),a([l({type:Boolean,reflect:!0})],tt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],tt.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],tt.prototype,"checked",2),a([l({type:Boolean,reflect:!0})],tt.prototype,"indeterminate",2),a([Lt("checked")],tt.prototype,"defaultChecked",2),a([l({type:String,reflect:!0})],tt.prototype,"form",2),a([l({type:Boolean,reflect:!0})],tt.prototype,"required",2),a([E()],tt.prototype,"showInvalidStyle",2),a([x(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],tt.prototype,"handleDisabledChange",1),a([x(["checked","indeterminate"],{waitUntilFirstUpdate:!0})],tt.prototype,"handleStateChange",1),tt=a([v("sd-checkbox")],tt);var Dt=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"label","help-text");this.size="lg";this.orientation="vertical";this.label="";this.helpText=""}getAllCheckboxes(){return[...this.querySelectorAll("sd-checkbox")]}async syncCheckboxElements(){let t=this.getAllCheckboxes();await Promise.all(t.map(async e=>{await e.updateComplete,e.size=this.size}))}syncCheckboxes(){customElements.get("sd-checkbox")?this.syncCheckboxElements():customElements.whenDefined("sd-checkbox").then(()=>this.syncCheckboxes())}handleSizeChange(){this.syncCheckboxes()}handleInvalid(){this.syncCheckboxes()}render(){let t=this.hasSlotController.test("label"),e=this.label?!0:t,r=this.hasSlotController.test("help-text"),o=this.helpText?!0:r,n=u`<slot @slotchange="${this.syncCheckboxes}"></slot>`,d=this.hasSlotController.test("tooltip");return u`<fieldset part="form-control" class="${c("border-0 p-0 m-0",{sm:"text-sm",md:"text-base",lg:"text-base"}[this.size])}" role="group" aria-labelledby="label">${e||d?u`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${c("p-0 font-bold leading-normal text-black",e?"flex":"hidden")}" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${d?u`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c({vertical:"flex flex-col",horizontal:"flex flex-row"}[this.orientation])}">${n}</div></fieldset><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-2",o?"block":"hidden")}" aria-hidden="${!o}">${this.helpText}</slot>`}};Dt.styles=[...f.styles,y`:host{display:block}:host([orientation=vertical]) ::slotted(sd-checkbox){display:flex;margin-bottom:var(--sd-spacing-2,.5rem)}:host([orientation=vertical]) ::slotted(sd-checkbox:last-of-type){margin-bottom:var(--sd-spacing-0,0)}:host([orientation=horizontal]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-6,1.5rem)}:host([orientation=horizontal]) ::slotted(sd-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox){margin-right:var(--sd-spacing-4,1rem)}:host([orientation=horizontal]):host([size=sm]) ::slotted(sd-checkbox:last-of-type){margin-right:var(--sd-spacing-0,0)}`],a([l({type:String,reflect:!0})],Dt.prototype,"size",2),a([l({type:String,reflect:!0})],Dt.prototype,"orientation",2),a([l({type:String,reflect:!0})],Dt.prototype,"label",2),a([l({type:String,attribute:"help-text",reflect:!0})],Dt.prototype,"helpText",2),a([x("size",{waitUntilFirstUpdate:!0})],Dt.prototype,"handleSizeChange",1),a([x("invalid",{waitUntilFirstUpdate:!0})],Dt.prototype,"handleInvalid",1),Dt=a([v("sd-checkbox-group")],Dt);var ie=Math.min,Et=Math.max,zi=Math.round,Ai=Math.floor,Xt=s=>({x:s,y:s}),ol={left:"right",right:"left",bottom:"top",top:"bottom"},nl={start:"end",end:"start"};function or(s,i,t){return Et(s,ie(i,t))}function Ye(s,i){return typeof s=="function"?s(i):s}function fe(s){return s.split("-")[0]}function We(s){return s.split("-")[1]}function Ur(s){return s==="x"?"y":"x"}function nr(s){return s==="y"?"height":"width"}var ll=new Set(["top","bottom"]);function re(s){return ll.has(fe(s))?"y":"x"}function lr(s){return Ur(re(s))}function ia(s,i,t){t===void 0&&(t=!1);let e=We(s),r=lr(s),o=nr(r),n=r==="x"?e===(t?"end":"start")?"right":"left":e==="start"?"bottom":"top";return i.reference[o]>i.floating[o]&&(n=Li(n)),[n,Li(n)]}function ra(s){let i=Li(s);return[ar(s),i,ar(i)]}function ar(s){return s.replace(/start|end/g,i=>nl[i])}var ta=["left","right"],ea=["right","left"],dl=["top","bottom"],cl=["bottom","top"];function hl(s,i,t){switch(s){case"top":case"bottom":return t?i?ea:ta:i?ta:ea;case"left":case"right":return i?dl:cl;default:return[]}}function sa(s,i,t,e){let r=We(s),o=hl(fe(s),t==="start",e);return r&&(o=o.map(n=>n+"-"+r),i&&(o=o.concat(o.map(ar)))),o}function Li(s){return s.replace(/left|right|bottom|top/g,i=>ol[i])}function pl(s){return P({top:0,right:0,bottom:0,left:0},s)}function Nr(s){return typeof s!="number"?pl(s):{top:s,right:s,bottom:s,left:s}}function Ze(s){let{x:i,y:t,width:e,height:r}=s;return{width:e,height:r,top:t,left:i,right:i+e,bottom:t+r,x:i,y:t}}function aa(s,i,t){let{reference:e,floating:r}=s,o=re(i),n=lr(i),d=nr(n),h=fe(i),p=o==="y",m=e.x+e.width/2-r.width/2,b=e.y+e.height/2-r.height/2,C=e[d]/2-r[d]/2,k;switch(h){case"top":k={x:m,y:e.y-r.height};break;case"bottom":k={x:m,y:e.y+e.height};break;case"right":k={x:e.x+e.width,y:b};break;case"left":k={x:e.x-r.width,y:b};break;default:k={x:e.x,y:e.y}}switch(We(i)){case"start":k[n]-=C*(t&&p?-1:1);break;case"end":k[n]+=C*(t&&p?-1:1);break}return k}var oa=async(s,i,t)=>{let{placement:e="bottom",strategy:r="absolute",middleware:o=[],platform:n}=t,d=o.filter(Boolean),h=await(n.isRTL==null?void 0:n.isRTL(i)),p=await n.getElementRects({reference:s,floating:i,strategy:r}),{x:m,y:b}=aa(p,e,h),C=e,k={},$=0;for(let z=0;z<d.length;z++){let{name:S,fn:D}=d[z],{x:V,y:U,data:W,reset:Y}=await D({x:m,y:b,initialPlacement:e,placement:C,strategy:r,middlewareData:k,rects:p,platform:n,elements:{reference:s,floating:i}});m=V!=null?V:m,b=U!=null?U:b,k=dt(P({},k),{[S]:P(P({},k[S]),W)}),Y&&$<=50&&($++,typeof Y=="object"&&(Y.placement&&(C=Y.placement),Y.rects&&(p=Y.rects===!0?await n.getElementRects({reference:s,floating:i,strategy:r}):Y.rects),{x:m,y:b}=aa(p,C,h)),z=-1)}return{x:m,y:b,placement:C,strategy:r,middlewareData:k}};async function dr(s,i){var t;i===void 0&&(i={});let{x:e,y:r,platform:o,rects:n,elements:d,strategy:h}=s,{boundary:p="clippingAncestors",rootBoundary:m="viewport",elementContext:b="floating",altBoundary:C=!1,padding:k=0}=Ye(i,s),$=Nr(k),S=d[C?b==="floating"?"reference":"floating":b],D=Ze(await o.getClippingRect({element:(t=await(o.isElement==null?void 0:o.isElement(S)))==null||t?S:S.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(d.floating)),boundary:p,rootBoundary:m,strategy:h})),V=b==="floating"?{x:e,y:r,width:n.floating.width,height:n.floating.height}:n.reference,U=await(o.getOffsetParent==null?void 0:o.getOffsetParent(d.floating)),W=await(o.isElement==null?void 0:o.isElement(U))?await(o.getScale==null?void 0:o.getScale(U))||{x:1,y:1}:{x:1,y:1},Y=Ze(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:d,rect:V,offsetParent:U,strategy:h}):V);return{top:(D.top-Y.top+$.top)/W.y,bottom:(Y.bottom-D.bottom+$.bottom)/W.y,left:(D.left-Y.left+$.left)/W.x,right:(Y.right-D.right+$.right)/W.x}}var na=s=>({name:"arrow",options:s,async fn(i){let{x:t,y:e,placement:r,rects:o,platform:n,elements:d,middlewareData:h}=i,{element:p,padding:m=0}=Ye(s,i)||{};if(p==null)return{};let b=Nr(m),C={x:t,y:e},k=lr(r),$=nr(k),z=await n.getDimensions(p),S=k==="y",D=S?"top":"left",V=S?"bottom":"right",U=S?"clientHeight":"clientWidth",W=o.reference[$]+o.reference[k]-C[k]-o.floating[$],Y=C[k]-o.reference[k],Rt=await(n.getOffsetParent==null?void 0:n.getOffsetParent(p)),bt=Rt?Rt[U]:0;(!bt||!await(n.isElement==null?void 0:n.isElement(Rt)))&&(bt=d.floating[U]||o.floating[$]);let ne=W/2-Y/2,Jt=bt/2-z[$]/2-1,Pt=ie(b[D],Jt),we=ie(b[V],Jt),Gt=Pt,xe=bt-z[$]-we,St=bt/2-z[$]/2+ne,Ut=or(Gt,St,xe),De=!h.arrow&&We(r)!=null&&St!==Ut&&o.reference[$]/2-(St<Gt?Pt:we)-z[$]/2<0,le=De?St<Gt?St-Gt:St-xe:0;return{[k]:C[k]+le,data:P({[k]:Ut,centerOffset:St-Ut-le},De&&{alignmentOffset:le}),reset:De}}});var la=function(s){return s===void 0&&(s={}),{name:"flip",options:s,async fn(i){var t,e;let{placement:r,middlewareData:o,rects:n,initialPlacement:d,platform:h,elements:p}=i,St=Ye(s,i),{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:C,fallbackStrategy:k="bestFit",fallbackAxisSideDirection:$="none",flipAlignment:z=!0}=St,S=Hi(St,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((t=o.arrow)!=null&&t.alignmentOffset)return{};let D=fe(r),V=re(d),U=fe(d)===d,W=await(h.isRTL==null?void 0:h.isRTL(p.floating)),Y=C||(U||!z?[Li(d)]:ra(d)),Rt=$!=="none";!C&&Rt&&Y.push(...sa(d,z,$,W));let bt=[d,...Y],ne=await dr(i,S),Jt=[],Pt=((e=o.flip)==null?void 0:e.overflows)||[];if(m&&Jt.push(ne[D]),b){let Ut=ia(r,n,W);Jt.push(ne[Ut[0]],ne[Ut[1]])}if(Pt=[...Pt,{placement:r,overflows:Jt}],!Jt.every(Ut=>Ut<=0)){var we,Gt;let Ut=(((we=o.flip)==null?void 0:we.index)||0)+1,De=bt[Ut];if(De&&(!(b==="alignment"?V!==re(De):!1)||Pt.every(Nt=>re(Nt.placement)===V?Nt.overflows[0]>0:!0)))return{data:{index:Ut,overflows:Pt},reset:{placement:De}};let le=(Gt=Pt.filter(He=>He.overflows[0]<=0).sort((He,Nt)=>He.overflows[1]-Nt.overflows[1])[0])==null?void 0:Gt.placement;if(!le)switch(k){case"bestFit":{var xe;let He=(xe=Pt.filter(Nt=>{if(Rt){let ke=re(Nt.placement);return ke===V||ke==="y"}return!0}).map(Nt=>[Nt.placement,Nt.overflows.filter(ke=>ke>0).reduce((ke,Va)=>ke+Va,0)]).sort((Nt,ke)=>Nt[1]-ke[1])[0])==null?void 0:xe[0];He&&(le=He);break}case"initialPlacement":le=d;break}if(r!==le)return{reset:{placement:le}}}return{}}}};var ul=new Set(["left","top"]);async function ml(s,i){let{placement:t,platform:e,elements:r}=s,o=await(e.isRTL==null?void 0:e.isRTL(r.floating)),n=fe(t),d=We(t),h=re(t)==="y",p=ul.has(n)?-1:1,m=o&&h?-1:1,b=Ye(i,s),{mainAxis:C,crossAxis:k,alignmentAxis:$}=typeof b=="number"?{mainAxis:b,crossAxis:0,alignmentAxis:null}:{mainAxis:b.mainAxis||0,crossAxis:b.crossAxis||0,alignmentAxis:b.alignmentAxis};return d&&typeof $=="number"&&(k=d==="end"?$*-1:$),h?{x:k*m,y:C*p}:{x:C*p,y:k*m}}var da=function(s){return s===void 0&&(s=0),{name:"offset",options:s,async fn(i){var t,e;let{x:r,y:o,placement:n,middlewareData:d}=i,h=await ml(i,s);return n===((t=d.offset)==null?void 0:t.placement)&&(e=d.arrow)!=null&&e.alignmentOffset?{}:{x:r+h.x,y:o+h.y,data:dt(P({},h),{placement:n})}}}},ca=function(s){return s===void 0&&(s={}),{name:"shift",options:s,async fn(i){let{x:t,y:e,placement:r}=i,S=Ye(s,i),{mainAxis:o=!0,crossAxis:n=!1,limiter:d={fn:D=>{let{x:V,y:U}=D;return{x:V,y:U}}}}=S,h=Hi(S,["mainAxis","crossAxis","limiter"]),p={x:t,y:e},m=await dr(i,h),b=re(fe(r)),C=Ur(b),k=p[C],$=p[b];if(o){let D=C==="y"?"top":"left",V=C==="y"?"bottom":"right",U=k+m[D],W=k-m[V];k=or(U,k,W)}if(n){let D=b==="y"?"top":"left",V=b==="y"?"bottom":"right",U=$+m[D],W=$-m[V];$=or(U,$,W)}let z=d.fn(dt(P({},i),{[C]:k,[b]:$}));return dt(P({},z),{data:{x:z.x-t,y:z.y-e,enabled:{[C]:o,[b]:n}}})}}};var ha=function(s){return s===void 0&&(s={}),{name:"size",options:s,async fn(i){var t,e;let{placement:r,rects:o,platform:n,elements:d}=i,Pt=Ye(s,i),{apply:h=()=>{}}=Pt,p=Hi(Pt,["apply"]),m=await dr(i,p),b=fe(r),C=We(r),k=re(r)==="y",{width:$,height:z}=o.floating,S,D;b==="top"||b==="bottom"?(S=b,D=C===(await(n.isRTL==null?void 0:n.isRTL(d.floating))?"start":"end")?"left":"right"):(D=b,S=C==="end"?"top":"bottom");let V=z-m.top-m.bottom,U=$-m.left-m.right,W=ie(z-m[S],V),Y=ie($-m[D],U),Rt=!i.middlewareData.shift,bt=W,ne=Y;if((t=i.middlewareData.shift)!=null&&t.enabled.x&&(ne=U),(e=i.middlewareData.shift)!=null&&e.enabled.y&&(bt=V),Rt&&!C){let we=Et(m.left,0),Gt=Et(m.right,0),xe=Et(m.top,0),St=Et(m.bottom,0);k?ne=$-2*(we!==0||Gt!==0?we+Gt:Et(m.left,m.right)):bt=z-2*(xe!==0||St!==0?xe+St:Et(m.top,m.bottom))}await h(dt(P({},i),{availableWidth:ne,availableHeight:bt}));let Jt=await n.getDimensions(d.floating);return $!==Jt.width||z!==Jt.height?{reset:{rects:!0}}:{}}}};function cr(){return typeof window!="undefined"}function Qe(s){return ua(s)?(s.nodeName||"").toLowerCase():"#document"}function zt(s){var i;return(s==null||(i=s.ownerDocument)==null?void 0:i.defaultView)||window}function Yt(s){var i;return(i=(ua(s)?s.ownerDocument:s.document)||window.document)==null?void 0:i.documentElement}function ua(s){return cr()?s instanceof Node||s instanceof zt(s).Node:!1}function Vt(s){return cr()?s instanceof Element||s instanceof zt(s).Element:!1}function Wt(s){return cr()?s instanceof HTMLElement||s instanceof zt(s).HTMLElement:!1}function pa(s){return!cr()||typeof ShadowRoot=="undefined"?!1:s instanceof ShadowRoot||s instanceof zt(s).ShadowRoot}var fl=new Set(["inline","contents"]);function li(s){let{overflow:i,overflowX:t,overflowY:e,display:r}=Bt(s);return/auto|scroll|overlay|hidden|clip/.test(i+e+t)&&!fl.has(r)}var bl=new Set(["table","td","th"]);function ma(s){return bl.has(Qe(s))}var gl=[":popover-open",":modal"];function Mi(s){return gl.some(i=>{try{return s.matches(i)}catch(t){return!1}})}var vl=["transform","translate","scale","rotate","perspective"],yl=["transform","translate","scale","rotate","perspective","filter"],wl=["paint","layout","strict","content"];function hr(s){let i=pr(),t=Vt(s)?Bt(s):s;return vl.some(e=>t[e]?t[e]!=="none":!1)||(t.containerType?t.containerType!=="normal":!1)||!i&&(t.backdropFilter?t.backdropFilter!=="none":!1)||!i&&(t.filter?t.filter!=="none":!1)||yl.some(e=>(t.willChange||"").includes(e))||wl.some(e=>(t.contain||"").includes(e))}function fa(s){let i=be(s);for(;Wt(i)&&!Je(i);){if(hr(i))return i;if(Mi(i))return null;i=be(i)}return null}function pr(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var xl=new Set(["html","body","#document"]);function Je(s){return xl.has(Qe(s))}function Bt(s){return zt(s).getComputedStyle(s)}function Oi(s){return Vt(s)?{scrollLeft:s.scrollLeft,scrollTop:s.scrollTop}:{scrollLeft:s.scrollX,scrollTop:s.scrollY}}function be(s){if(Qe(s)==="html")return s;let i=s.assignedSlot||s.parentNode||pa(s)&&s.host||Yt(s);return pa(i)?i.host:i}function ba(s){let i=be(s);return Je(i)?s.ownerDocument?s.ownerDocument.body:s.body:Wt(i)&&li(i)?i:ba(i)}function ni(s,i,t){var e;i===void 0&&(i=[]),t===void 0&&(t=!0);let r=ba(s),o=r===((e=s.ownerDocument)==null?void 0:e.body),n=zt(r);if(o){let d=ur(n);return i.concat(n,n.visualViewport||[],li(r)?r:[],d&&t?ni(d):[])}return i.concat(r,ni(r,[],t))}function ur(s){return s.parent&&Object.getPrototypeOf(s.parent)?s.frameElement:null}function ya(s){let i=Bt(s),t=parseFloat(i.width)||0,e=parseFloat(i.height)||0,r=Wt(s),o=r?s.offsetWidth:t,n=r?s.offsetHeight:e,d=zi(t)!==o||zi(e)!==n;return d&&(t=o,e=n),{width:t,height:e,$:d}}function Kr(s){return Vt(s)?s:s.contextElement}function di(s){let i=Kr(s);if(!Wt(i))return Xt(1);let t=i.getBoundingClientRect(),{width:e,height:r,$:o}=ya(i),n=(o?zi(t.width):t.width)/e,d=(o?zi(t.height):t.height)/r;return(!n||!Number.isFinite(n))&&(n=1),(!d||!Number.isFinite(d))&&(d=1),{x:n,y:d}}var kl=Xt(0);function wa(s){let i=zt(s);return!pr()||!i.visualViewport?kl:{x:i.visualViewport.offsetLeft,y:i.visualViewport.offsetTop}}function Cl(s,i,t){return i===void 0&&(i=!1),!t||i&&t!==zt(s)?!1:i}function Ge(s,i,t,e){i===void 0&&(i=!1),t===void 0&&(t=!1);let r=s.getBoundingClientRect(),o=Kr(s),n=Xt(1);i&&(e?Vt(e)&&(n=di(e)):n=di(s));let d=Cl(o,t,e)?wa(o):Xt(0),h=(r.left+d.x)/n.x,p=(r.top+d.y)/n.y,m=r.width/n.x,b=r.height/n.y;if(o){let C=zt(o),k=e&&Vt(e)?zt(e):e,$=C,z=ur($);for(;z&&e&&k!==$;){let S=di(z),D=z.getBoundingClientRect(),V=Bt(z),U=D.left+(z.clientLeft+parseFloat(V.paddingLeft))*S.x,W=D.top+(z.clientTop+parseFloat(V.paddingTop))*S.y;h*=S.x,p*=S.y,m*=S.x,b*=S.y,h+=U,p+=W,$=zt(z),z=ur($)}}return Ze({width:m,height:b,x:h,y:p})}function jr(s,i){let t=Oi(s).scrollLeft;return i?i.left+t:Ge(Yt(s)).left+t}function xa(s,i,t){t===void 0&&(t=!1);let e=s.getBoundingClientRect(),r=e.left+i.scrollLeft-(t?0:jr(s,e)),o=e.top+i.scrollTop;return{x:r,y:o}}function El(s){let{elements:i,rect:t,offsetParent:e,strategy:r}=s,o=r==="fixed",n=Yt(e),d=i?Mi(i.floating):!1;if(e===n||d&&o)return t;let h={scrollLeft:0,scrollTop:0},p=Xt(1),m=Xt(0),b=Wt(e);if((b||!b&&!o)&&((Qe(e)!=="body"||li(n))&&(h=Oi(e)),Wt(e))){let k=Ge(e);p=di(e),m.x=k.x+e.clientLeft,m.y=k.y+e.clientTop}let C=n&&!b&&!o?xa(n,h,!0):Xt(0);return{width:t.width*p.x,height:t.height*p.y,x:t.x*p.x-h.scrollLeft*p.x+m.x+C.x,y:t.y*p.y-h.scrollTop*p.y+m.y+C.y}}function $l(s){return Array.from(s.getClientRects())}function Tl(s){let i=Yt(s),t=Oi(s),e=s.ownerDocument.body,r=Et(i.scrollWidth,i.clientWidth,e.scrollWidth,e.clientWidth),o=Et(i.scrollHeight,i.clientHeight,e.scrollHeight,e.clientHeight),n=-t.scrollLeft+jr(s),d=-t.scrollTop;return Bt(e).direction==="rtl"&&(n+=Et(i.clientWidth,e.clientWidth)-r),{width:r,height:o,x:n,y:d}}function Ll(s,i){let t=zt(s),e=Yt(s),r=t.visualViewport,o=e.clientWidth,n=e.clientHeight,d=0,h=0;if(r){o=r.width,n=r.height;let p=pr();(!p||p&&i==="fixed")&&(d=r.offsetLeft,h=r.offsetTop)}return{width:o,height:n,x:d,y:h}}var zl=new Set(["absolute","fixed"]);function Al(s,i){let t=Ge(s,!0,i==="fixed"),e=t.top+s.clientTop,r=t.left+s.clientLeft,o=Wt(s)?di(s):Xt(1),n=s.clientWidth*o.x,d=s.clientHeight*o.y,h=r*o.x,p=e*o.y;return{width:n,height:d,x:h,y:p}}function ga(s,i,t){let e;if(i==="viewport")e=Ll(s,t);else if(i==="document")e=Tl(Yt(s));else if(Vt(i))e=Al(i,t);else{let r=wa(s);e={x:i.x-r.x,y:i.y-r.y,width:i.width,height:i.height}}return Ze(e)}function ka(s,i){let t=be(s);return t===i||!Vt(t)||Je(t)?!1:Bt(t).position==="fixed"||ka(t,i)}function Ml(s,i){let t=i.get(s);if(t)return t;let e=ni(s,[],!1).filter(d=>Vt(d)&&Qe(d)!=="body"),r=null,o=Bt(s).position==="fixed",n=o?be(s):s;for(;Vt(n)&&!Je(n);){let d=Bt(n),h=hr(n);!h&&d.position==="fixed"&&(r=null),(o?!h&&!r:!h&&d.position==="static"&&!!r&&zl.has(r.position)||li(n)&&!h&&ka(s,n))?e=e.filter(m=>m!==n):r=d,n=be(n)}return i.set(s,e),e}function Ol(s){let{element:i,boundary:t,rootBoundary:e,strategy:r}=s,n=[...t==="clippingAncestors"?Mi(i)?[]:Ml(i,this._c):[].concat(t),e],d=n[0],h=n.reduce((p,m)=>{let b=ga(i,m,r);return p.top=Et(b.top,p.top),p.right=ie(b.right,p.right),p.bottom=ie(b.bottom,p.bottom),p.left=Et(b.left,p.left),p},ga(i,d,r));return{width:h.right-h.left,height:h.bottom-h.top,x:h.left,y:h.top}}function Sl(s){let{width:i,height:t}=ya(s);return{width:i,height:t}}function _l(s,i,t){let e=Wt(i),r=Yt(i),o=t==="fixed",n=Ge(s,!0,o,i),d={scrollLeft:0,scrollTop:0},h=Xt(0);function p(){h.x=jr(r)}if(e||!e&&!o)if((Qe(i)!=="body"||li(r))&&(d=Oi(i)),e){let k=Ge(i,!0,o,i);h.x=k.x+i.clientLeft,h.y=k.y+i.clientTop}else r&&p();o&&!e&&r&&p();let m=r&&!e&&!o?xa(r,d):Xt(0),b=n.left+d.scrollLeft-h.x-m.x,C=n.top+d.scrollTop-h.y-m.y;return{x:b,y:C,width:n.width,height:n.height}}function qr(s){return Bt(s).position==="static"}function va(s,i){if(!Wt(s)||Bt(s).position==="fixed")return null;if(i)return i(s);let t=s.offsetParent;return Yt(s)===t&&(t=t.ownerDocument.body),t}function Ca(s,i){let t=zt(s);if(Mi(s))return t;if(!Wt(s)){let r=be(s);for(;r&&!Je(r);){if(Vt(r)&&!qr(r))return r;r=be(r)}return t}let e=va(s,i);for(;e&&ma(e)&&qr(e);)e=va(e,i);return e&&Je(e)&&qr(e)&&!hr(e)?t:e||fa(s)||t}var Dl=async function(s){let i=this.getOffsetParent||Ca,t=this.getDimensions,e=await t(s.floating);return{reference:_l(s.reference,await i(s.floating),s.strategy),floating:{x:0,y:0,width:e.width,height:e.height}}};function Hl(s){return Bt(s).direction==="rtl"}var Il={convertOffsetParentRelativeRectToViewportRelativeRect:El,getDocumentElement:Yt,getClippingRect:Ol,getOffsetParent:Ca,getElementRects:Dl,getClientRects:$l,getDimensions:Sl,getScale:di,isElement:Vt,isRTL:Hl};function Ea(s,i){return s.x===i.x&&s.y===i.y&&s.width===i.width&&s.height===i.height}function Pl(s,i){let t=null,e,r=Yt(s);function o(){var d;clearTimeout(e),(d=t)==null||d.disconnect(),t=null}function n(d,h){d===void 0&&(d=!1),h===void 0&&(h=1),o();let p=s.getBoundingClientRect(),{left:m,top:b,width:C,height:k}=p;if(d||i(),!C||!k)return;let $=Ai(b),z=Ai(r.clientWidth-(m+C)),S=Ai(r.clientHeight-(b+k)),D=Ai(m),U={rootMargin:-$+"px "+-z+"px "+-S+"px "+-D+"px",threshold:Et(0,ie(1,h))||1},W=!0;function Y(Rt){let bt=Rt[0].intersectionRatio;if(bt!==h){if(!W)return n();bt?n(!1,bt):e=setTimeout(()=>{n(!1,1e-7)},1e3)}bt===1&&!Ea(p,s.getBoundingClientRect())&&n(),W=!1}try{t=new IntersectionObserver(Y,dt(P({},U),{root:r.ownerDocument}))}catch(Rt){t=new IntersectionObserver(Y,U)}t.observe(s)}return n(!0),o}function $a(s,i,t,e){e===void 0&&(e={});let{ancestorScroll:r=!0,ancestorResize:o=!0,elementResize:n=typeof ResizeObserver=="function",layoutShift:d=typeof IntersectionObserver=="function",animationFrame:h=!1}=e,p=Kr(s),m=r||o?[...p?ni(p):[],...ni(i)]:[];m.forEach(D=>{r&&D.addEventListener("scroll",t,{passive:!0}),o&&D.addEventListener("resize",t)});let b=p&&d?Pl(p,t):null,C=-1,k=null;n&&(k=new ResizeObserver(D=>{let[V]=D;V&&V.target===p&&k&&(k.unobserve(i),cancelAnimationFrame(C),C=requestAnimationFrame(()=>{var U;(U=k)==null||U.observe(i)})),t()}),p&&!h&&k.observe(p),k.observe(i));let $,z=h?Ge(s):null;h&&S();function S(){let D=Ge(s);z&&!Ea(z,D)&&t(),z=D,$=requestAnimationFrame(S)}return t(),()=>{var D;m.forEach(V=>{r&&V.removeEventListener("scroll",t),o&&V.removeEventListener("resize",t)}),b==null||b(),(D=k)==null||D.disconnect(),k=null,h&&cancelAnimationFrame($)}}var Ta=da;var La=ca,za=la,Xr=ha;var Aa=na;var Ma=(s,i,t)=>{let e=new Map,r=P({platform:Il},t),o=dt(P({},r.platform),{_c:e});return oa(s,i,dt(P({},r),{platform:o}))};var X=class extends f{constructor(){super(...arguments);this.active=!1;this.placement="top";this.strategy="absolute";this.distance=0;this.skidding=0;this.arrow=!1;this.arrowPlacement="anchor";this.arrowPadding=10;this.flip=!1;this.flipFallbackPlacements="";this.flipFallbackStrategy="best-fit";this.flipPadding=0;this.shift=!1;this.shiftPadding=0;this.autoSizePadding=0}async connectedCallback(){super.connectedCallback(),await this.updateComplete,this.start(),this.setupMutationObserver()}disconnectedCallback(){this.stop(),this.mutationObserver&&this.mutationObserver.disconnect()}async updated(t){super.updated(t),t.has("active")&&(this.active?this.start():this.stop()),t.has("anchor")&&this.handleAnchorChange(),this.active&&(await this.updateComplete,this.reposition())}setupMutationObserver(){this.mutationObserver=new MutationObserver(e=>this.handleCurrentPlacementChange(e));let t={attributes:!0};this.mutationObserver.observe(this,t)}handleCurrentPlacementChange(t){return t.forEach(e=>{if(e.attributeName==="data-current-placement"){let r=this.getAttribute("data-current-placement");this.emit("sd-current-placement",{detail:r})}})}async handleAnchorChange(){if(await this.stop(),this.anchor&&typeof this.anchor=="string"){let t=this.getRootNode();this.anchorEl=t.getElementById(this.anchor)}else this.anchor instanceof HTMLElement?this.anchorEl=this.anchor:this.anchorEl=this.querySelector('[slot="anchor"]');if(this.anchorEl instanceof HTMLSlotElement&&(this.anchorEl=this.anchorEl.assignedElements({flatten:!0})[0]),!this.anchorEl)throw new Error("Invalid anchor element: no anchor could be found using the anchor slot or the anchor attribute.");this.start()}start(){this.anchorEl&&(this.cleanup=$a(this.anchorEl,this.popup,()=>{this.reposition()}))}async stop(){return new Promise(t=>{this.cleanup?(this.cleanup(),this.cleanup=void 0,this.removeAttribute("data-current-placement"),this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height"),requestAnimationFrame(()=>t())):t()})}reposition(){if(!this.active||!this.anchorEl)return;let t=[Ta({mainAxis:this.distance,crossAxis:this.skidding})];this.sync?t.push(Xr({apply:({rects:e})=>{let r=this.sync==="width"||this.sync==="both",o=this.sync==="height"||this.sync==="both";this.popup.style.width=r?`${e.reference.width}px`:"",this.popup.style.height=o?`${e.reference.height}px`:""}})):(this.popup.style.width="",this.popup.style.height=""),this.flip&&t.push(za({boundary:this.flipBoundary,fallbackPlacements:this.flipFallbackPlacements,fallbackStrategy:this.flipFallbackStrategy==="best-fit"?"bestFit":"initialPlacement",padding:this.flipPadding})),this.shift&&t.push(La({boundary:this.shiftBoundary,padding:this.shiftPadding})),this.autoSize?t.push(Xr({boundary:this.autoSizeBoundary,padding:this.autoSizePadding,apply:({availableWidth:e,availableHeight:r})=>{this.autoSize==="vertical"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-height",`${r}px`):this.style.removeProperty("--auto-size-available-height"),this.autoSize==="horizontal"||this.autoSize==="both"?this.style.setProperty("--auto-size-available-width",`${e}px`):this.style.removeProperty("--auto-size-available-width")}})):(this.style.removeProperty("--auto-size-available-width"),this.style.removeProperty("--auto-size-available-height")),this.arrow&&t.push(Aa({element:this.arrowEl,padding:this.arrowPadding})),Ma(this.anchorEl,this.popup,{placement:this.placement,middleware:t,strategy:this.strategy}).then(({x:e,y:r,middlewareData:o,placement:n})=>{let d=getComputedStyle(this).direction==="rtl",h={top:"bottom",right:"left",bottom:"top",left:"right"}[n.split("-")[0]];if(this.setAttribute("data-current-placement",n),Object.assign(this.popup.style,{left:`${e}px`,top:`${r}px`}),this.arrow){let p=o.arrow.x,m=o.arrow.y,b="",C="",k="",$="";if(this.arrowPlacement==="start"){let z=typeof p=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";b=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"",C=d?z:"",$=d?"":z}else if(this.arrowPlacement==="end"){let z=typeof p=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:"";C=d?"":z,$=d?z:"",k=typeof m=="number"?`calc(${this.arrowPadding}px - var(--arrow-padding-offset))`:""}else this.arrowPlacement==="center"?($=typeof p=="number"?"calc(50% - var(--arrow-size-diagonal))":"",b=typeof m=="number"?"calc(50% - var(--arrow-size-diagonal))":""):($=typeof p=="number"?`${p}px`:"",b=typeof m=="number"?`${m}px`:"");Object.assign(this.arrowEl.style,{top:b,right:C,bottom:k,left:$,[h]:"calc(var(--arrow-size-diagonal) * -1)"})}}),this.emit("sd-reposition")}render(){return u`<slot name="anchor" @slotchange="${this.handleAnchorChange}"></slot><div part="popup" class="${c("isolate",this.strategy!=="fixed"?"absolute":"fixed",!this.active&&"hidden")}"><slot></slot>${this.arrow?u`<div part="arrow" class="absolute rotate-45 -z-10" role="presentation"></div>`:""}</div>`}};X.styles=[...f.styles,y`:host{--arrow-color:var(--sd-color-neutral-1000);--arrow-size:6px;--arrow-size-diagonal:calc(var(--arrow-size)*0.7071);--arrow-padding-offset:calc(var(--arrow-size-diagonal) - var(--arrow-size));display:contents}[part=popup]{max-height:var(--auto-size-available-height,none);max-width:var(--auto-size-available-width,none)}[part=arrow]{background:var(--arrow-color);height:calc(var(--arrow-size-diagonal)*2);width:calc(var(--arrow-size-diagonal)*2)}`],a([g('[part="popup"]')],X.prototype,"popup",2),a([g('[part="arrow"]')],X.prototype,"arrowEl",2),a([l({reflect:!0})],X.prototype,"anchor",2),a([l({type:Boolean,reflect:!0})],X.prototype,"active",2),a([l({type:String,reflect:!0})],X.prototype,"placement",2),a([l({type:String,reflect:!0})],X.prototype,"strategy",2),a([l({type:Number,reflect:!0})],X.prototype,"distance",2),a([l({type:Number,reflect:!0})],X.prototype,"skidding",2),a([l({type:Boolean,reflect:!0})],X.prototype,"arrow",2),a([l({type:String,attribute:"arrow-placement",reflect:!0})],X.prototype,"arrowPlacement",2),a([l({attribute:"arrow-padding",type:Number,reflect:!0})],X.prototype,"arrowPadding",2),a([l({type:Boolean,reflect:!0})],X.prototype,"flip",2),a([l({attribute:"flip-fallback-placements",converter:{fromAttribute:t=>t.split(" ").map(e=>e.trim()).filter(e=>e!==""),toAttribute:t=>t.join(" ")}})],X.prototype,"flipFallbackPlacements",2),a([l({type:String,attribute:"flip-fallback-strategy"})],X.prototype,"flipFallbackStrategy",2),a([l({type:Object})],X.prototype,"flipBoundary",2),a([l({attribute:"flip-padding",type:Number})],X.prototype,"flipPadding",2),a([l({type:Boolean})],X.prototype,"shift",2),a([l({type:Object})],X.prototype,"shiftBoundary",2),a([l({attribute:"shift-padding",type:Number})],X.prototype,"shiftPadding",2),a([l({type:String,attribute:"auto-size"})],X.prototype,"autoSize",2),a([l()],X.prototype,"sync",2),a([l({type:Object})],X.prototype,"autoSizeBoundary",2),a([l({attribute:"auto-size-padding",type:Number})],X.prototype,"autoSizePadding",2),X=a([v("sd-popup")],X);var yt=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.size="lg";this.selected=!1;this.toggleable=!1;this.removable=!1;this.disabled=!1;this.href=""}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleRemove(){this.emit("sd-remove")}isLink(){return!!this.href}click(){this.tag.click()}focus(t){this.tag.focus(t)}blur(){this.tag.blur()}async hide(){this.emit("sd-hide"),this.style.opacity="0",await new Promise(t=>setTimeout(t,this.token("sd-duration-fast",150))),this.hidden=!0,this.emit("sd-after-hide")}render(){let t=this.isLink(),e=t?Z`a`:this.removable?Z`div`:Z`button`;return I`<${e} part="base" type="${w(t?void 0:"button")}" href="${w(t?this.href:void 0)}" rel="${w(t&&this.target?"noreferrer noopener":void 0)}" target="${w(t?this.target:void 0)}" download="${w(t?this.download:void 0)}" ?disabled="${w(t?void 0:this.disabled)}" aria-labelledby="content" aria-disabled="${this.disabled?"true":"false"}" aria-pressed="${w(this.toggleable?this.selected:void 0)}" tabindex="${this.disabled||this.removable?"-1":"0"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" class="${c("inline-flex border box-border rounded-full items-center leading-none whitespace-nowrap transition-colors duration-fast ease-in-out focus-visible:focus-outline",{lg:"h-8 text-base gap-2",sm:"h-6 text-sm gap-1"}[this.size],{lg:this.removable?"pl-4 pr-3 py-2":"px-4 py-2",sm:this.removable?"pl-3 pr-2 py-2":"px-3 py-[5px]"}[this.size],this.selected?"bg-primary border-primary text-white hover:bg-primary-500 hover:border-primary-500 disabled:bg-neutral-500 disabled:border-neutral-500":c("border-primary text-primary disabled:border-neutral-500 disabled:text-neutral-500",this.removable?"has-[button:hover]:border-primary-500 has-[button:hover]:bg-neutral-100 has-[button:hover]:text-primary-500":"hover:border-primary-500 hover:bg-neutral-100 hover:text-primary-500"),this.disabled&&!t&&"cursor-not-allowed")}"><slot id="content" part="content"></slot>${this.removable&&!t?I`<button class="sd-interactive flex items-center" type="button" @click="${this.handleRemove}"><slot part="removable-indicator" name="removable-indicator"><sd-icon library="_internal" name="close" label="${this.localize.term("remove")}"></sd-icon></slot></button>`:""}</${e}>`}};yt.styles=[...f.styles,y`:host{display:inline-block;transition-duration:.15s;transition-duration:var(--sd-duration-fast,.15s);transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}:host([size=lg])::part(removable-indicator){font-size:var(--sd-font-size-base,1rem)}:host([size=sm])::part(removable-indicator){font-size:.75rem}`],a([g("a, button, div")],yt.prototype,"tag",2),a([l({type:String,reflect:!0})],yt.prototype,"size",2),a([l({type:Boolean,reflect:!0})],yt.prototype,"selected",2),a([l({type:Boolean,reflect:!0})],yt.prototype,"toggleable",2),a([l({type:Boolean,reflect:!0})],yt.prototype,"removable",2),a([l({type:Boolean,reflect:!0})],yt.prototype,"disabled",2),a([l({type:String,reflect:!0})],yt.prototype,"href",2),a([l({type:String,reflect:!0})],yt.prototype,"target",2),a([l({reflect:!0})],yt.prototype,"download",2),yt=a([v("sd-tag")],yt);var Oa=s=>s;var Yr=s=>Array.from(s.assignedElements({flatten:!0})),Fl=s=>s.tagName.toLocaleLowerCase()==="sd-option"?s:Array.from(s.querySelectorAll(":scope > sd-option")),Vl=s=>s.tagName.toLocaleLowerCase()==="sd-optgroup",Sa=s=>s.map(Fl),_a=s=>s.filter(Vl),mr=s=>s.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase();var T=class extends f{constructor(){super(...arguments);this.formControlController=new ot(this,{assumeInteractionOn:["sd-blur","sd-input"]});this.hasSlotController=new A(this,"help-text","label");this.localize=new L(this);this.hasFocus=!1;this.displayInputValue="";this.selectedTextLabel="";this.selectedOptions=[];this.filteredOptions=[];this.allOptions=[];this.showValidStyle=!1;this.showInvalidStyle=!1;this.deletedTagLabel="";this.name="";this.value="";this.defaultValue="";this.size="lg";this.placeholder="";this.maxOptionsTagLabel="";this.disabled=!1;this.visuallyDisabled=!1;this.clearable=!1;this.open=!1;this.hoist=!1;this.label="";this.placement="bottom";this.helpText="";this.form="";this.required=!1;this.type="text";this.currentPlacement=this.placement;this.getOption=Oa;this.multiple=!1;this.useTags=!0;this.maxOptionsVisible=3;this.styleOnValid=!1;this.filter=(t,e)=>{let r=mr(t.value),o=mr(t.getTextLabel()),n=mr(e);return r.includes(n)||o.includes(n)};this.getTag=t=>u`<sd-tag ?disabled="${this.disabled}" part="tag" exportparts="
|
|
117
118
|
base:tag__base,
|
|
118
119
|
content:tag__content,
|
|
119
120
|
removable-indicator:tag__removable-indicator,
|
|
@@ -123,9 +124,9 @@ var vr=Object.defineProperty,Ba=Object.defineProperties,Ra=Object.getOwnProperty
|
|
|
123
124
|
removable-indicator:tag__removable-indicator,
|
|
124
125
|
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagMaxOptionsKeyDown(t)}" @sd-remove="${t=>this.handleTagRemove(t)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-tag>`]}addOpenListeners(){document.addEventListener("focusin",this.handleDocumentFocusIn),document.addEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().addEventListener("focusin",this.handleDocumentFocusIn)}removeOpenListeners(){document.removeEventListener("focusin",this.handleDocumentFocusIn),document.removeEventListener("mousedown",this.handleDocumentMouseDown),this.getRootNode()!==document&&this.getRootNode().removeEventListener("focusin",this.handleDocumentFocusIn)}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleTagKeyDown(t,e){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),e),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleTagMaxOptionsKeyDown(t){(t.key==="Backspace"||t.key==="Enter"||t.key===" ")&&this.multiple&&(t.preventDefault(),t.stopPropagation(),this.handleTagRemove(new CustomEvent("sd-remove"),this.selectedOptions[this.selectedOptions.length-1]),this.updateComplete.then(()=>this.displayInput.focus({preventScroll:!0})))}handleLabelClick(){this.visuallyDisabled||this.displayInput.focus()}handleTagRemove(t,e){t.stopPropagation(),e||this.clearCombobox(),e&&!this.disabled&&(this.toggleOptionSelection(e,!1),this.setOrderedSelectedOptions(e),this.deletedTagLabel="",this.deletedTagLabel=this.localize.term("removed",e.textContent),this.updateComplete.then(()=>{this.selectionChanged(),this.emit("sd-input"),this.emit("sd-change")}))}handleComboboxMouseDown(t){if(this.visuallyDisabled){t.preventDefault(),t.stopPropagation();return}let r=t.composedPath().some(n=>n instanceof HTMLSlotElement&&n.name==="removable-indicator");if(this.disabled||r)return;(this.open?this.hide():this.show()).then(()=>{setTimeout(()=>this.displayInput.focus({preventScroll:!0}))})}handleComboboxKeyDown(t){t.key!=="Tab"&&this.handleDocumentKeyDown(t)}handleClearClick(t){t.stopPropagation(),this.clearCombobox()}handleNoResultsClick(t){t.preventDefault(),this.hide()}clearCombobox(){this.value!==""&&(this.value="",this.displayInputValue="",this.selectedTextLabel="",this.lastOption=void 0,this.selectedOptions=[],this.getSlottedOptions().forEach(t=>{t.selected=!1}),this.displayInput.focus({preventScroll:!0}),this.updateComplete.then(()=>{this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change")}))}preventLoosingFocus(t){t.stopPropagation(),t.preventDefault()}handleOptionClick(t){let r=t.target.closest("sd-option"),o=this.value;r&&!r.disabled&&(this.multiple?(this.toggleOptionSelection(r),this.lastOption=r,this.setOrderedSelectedOptions(r),this.updateComplete.then(()=>{this.selectionChanged()})):(this.setOrderedSelectedOptions(r),this.setSelectedOptions(r)),this.updateComplete.then(()=>{this.displayInput.focus({preventScroll:!0}),this.value!==o&&(this.emit("sd-input"),this.emit("sd-change"))}),this.multiple||(this.hide(),this.displayInput.focus({preventScroll:!0})))}selectNextOption(t){let e=this.getAllFilteredOptions();if(e.length===0)return;let r=this.getCurrentOption(),o=e.indexOf(r),n=Math.max(0,o);if(t){let d=o+1;n=d>e.length-1?0:d}else{let d=o-1;n=d<0?e.length-1:d}this.setCurrentOption(e[n],new KeyboardEvent("keydown")),Kt(this.getCurrentOption(),this.listbox,"vertical","auto")}getAllFilteredOptions(){return[...this.filteredWrapper.querySelectorAll("sd-option")]}getCurrentOption(){return this.getAllFilteredOptions().find(t=>t.current)}setCurrentOption(t,e){let r=this.getAllFilteredOptions();this.displayInput.removeAttribute("aria-activedescendant"),r.forEach(o=>{o.current=!1,o.setAttribute("aria-selected","false"),o.isKeyboardFocus=!1}),t&&(t.current=!0,t.setAttribute("aria-selected","true"),this.displayInput.setAttribute("aria-activedescendant",t.id)),t&&(e==null?void 0:e.type)==="keydown"&&(t.isKeyboardFocus=!0)}toggleOptionSelection(t,e){let o=this.getSlottedOptions().find(n=>n.value&&t.value?n.value===t.value:n.getTextLabel()===t.getTextLabel());o&&(o.selected=e!=null?e:!o.selected)}findOptionByValue(t,e){if(e)return Array.isArray(e)?t.find(r=>e.includes(r.value)):t.find(r=>r.value===e)}selectedOptionsAndValueSynced(){var t;return!this.value&&this.selectedOptions.length===0?!0:Array.isArray(this.value)?this.value.length===this.selectedOptions.length:this.value===((t=this.selectedOptions[0])==null?void 0:t.value)}isOptionSelected(t){return t.value?this.value.includes(t.value):this.value.includes(t.getTextLabel())}syncSelectedOptionsAndValue(){return this.selectedOptionsAndValueSynced()?void 0:(this.getSlottedOptions().forEach(e=>{e.selected=!1}),this.selectedOptions=this.getSlottedOptions().filter(e=>this.isOptionSelected(e)),this.selectedOptions.forEach(e=>{e&&(e.selected=!0)}),Promise.resolve())}compareOptions(t,e){return t.value&&e.value?t.value===e.value:t.getTextLabel()===e.getTextLabel()}setSelectedOptions(t){this.getSlottedOptions().forEach(r=>{r.selected=this.compareOptions(r,t)}),this.selectionChanged()}setOrderedSelectedOptions(t){let e=this.getSlottedOptions().find(r=>this.compareOptions(r,t));this.multiple?this.selectedOptions.length>0&&e&&this.selectedOptions.find(r=>this.compareOptions(r,e))?this.selectedOptions=this.selectedOptions.filter(r=>!this.compareOptions(r,e)):this.selectedOptions=[...this.selectedOptions,e]:this.selectedOptions=[e]}selectionChanged(){var e,r,o;let t=this.selectedOptions.some(n=>n?this.isOptionSelected(n):!1);this.multiple?(!t&&this.selectedOptions.length>0?this.value=[...this.value,...this.selectedOptions.map(n=>n.value||n.getTextLabel())]:this.value=this.selectedOptions.map(n=>(n==null?void 0:n.value)||(n==null?void 0:n.getTextLabel())||""),this.displayInputValue=""):(this.value=((e=this.selectedOptions[0])==null?void 0:e.value)||((r=this.selectedOptions[0])==null?void 0:r.getTextLabel())||"",this.selectedTextLabel=((o=this.selectedOptions[0])==null?void 0:o.getTextLabel())||"",this.displayInputValue=""),this.updateComplete.then(()=>{this.formControlController.updateValidity()})}createComboboxOptionsFromQuery(t){let e=[];this.filteredOptions=this.getSlottedOptions().filter(r=>this.filter(r,t)||t==="").map(r=>{var b,C,k;let o=r.cloneNode(!0);if(o.current=o.value===((b=this.lastOption)==null?void 0:b.value),o.selected=r.selected,o.checkbox=r.checkbox,o.size=r.size,!(((C=r.parentElement)==null?void 0:C.tagName.toLowerCase())==="sd-optgroup"))return o;let d=r.parentElement,h=(k=d.querySelector('[slot="label"]'))==null?void 0:k.cloneNode(!0),p=e.find($=>$.id===d.id);if(p){p==null||p.appendChild(o),h&&(p==null||p.appendChild(h));return}let m=d.cloneNode();return m.appendChild(o),h&&m.appendChild(h),e.push(m),m}).filter(Boolean)}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleFilterChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}handleUseTagsChange(){let t=this.getAllFilteredOptions();customElements.get("sd-option")&&t.forEach(e=>{e.checkbox=this.multiple})}applySizeToOptions(){this.getSlottedOptions().forEach(t=>{t.size=this.size})}handleDisabledChange(){this.formControlController.setValidity(this.disabled),(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}handleValueChange(){this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInput.value):this.createComboboxOptionsFromQuery("")}handleDisplayInputValueChange(){this.createComboboxOptionsFromQuery(this.displayInputValue)}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.emit("sd-show"),this.addOpenListeners(),await R(this),this.listbox.hidden=!1,this.popup.active=!0;let{keyframes:r,options:o}=F(this,"combobox.show",{dir:this.localize.dir()});await B(this.popup.popup,r,o),this.emit("sd-after-show"),this.filteredOptions.length===0&&this.emit("sd-error");return}this.setCurrentOption(null),this.displayInput.removeAttribute("aria-activedescendant"),this.emit("sd-hide"),this.removeOpenListeners(),await R(this);let{keyframes:t,options:e}=F(this,"combobox.hide",{dir:this.localize.dir()});await B(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,Promise.race([q(this,"sd-after-show"),q(this,"sd-error")])}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.displayInputValue="",this.open=!1,q(this,"sd-after-hide")}checkValidity(){return this.valueInput.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.displayInput.focus(t)}blur(){this.displayInput.blur()}async handleInput(){let t=this.displayInput.value;this.displayInputValue=t,await this.updateComplete,this.open=this.filteredWrapper.children.length>0,this.formControlController.updateValidity(),this.emit("sd-input")}handleChange(){(!this.selectedOptions||!this.multiple)&&(this.selectedTextLabel=this.displayInput.value,this.updateComplete.then(()=>{this.formControlController.updateValidity()}),this.emit("sd-change"))}getSlottedOptions(){return Sa(Yr(this.defaultSlot)).flat()}getSlottedOptGroups(){return _a(Yr(this.defaultSlot))}async handleDefaultSlotChange(){if(!customElements.get("sd-option")){customElements.whenDefined("sd-option").then(()=>this.handleDefaultSlotChange());return}let t=this.getSlottedOptions(),e=this.getSlottedOptGroups();this.applySizeToOptions();let r=this.findOptionByValue(t,this.value);this.selectedTextLabel=(r==null?void 0:r.getTextLabel())||"",t.forEach((o,n)=>{this.multiple&&(o.checkbox=!0),o.id=o.id||`sd-combobox-option-${n}`}),e.forEach((o,n)=>{o.id=o.id||`sd-combobox-optgroup-${n}`}),await this.syncSelectedOptionsAndValue(),this.multiple?this.createComboboxOptionsFromQuery(this.displayInputValue):this.createComboboxOptionsFromQuery("")}render(){let t={left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right")},e=this.hasSlotController.test("label"),r=this.hasSlotController.test("help-text"),o=this.label?!0:!!e,n=this.helpText?!0:!!r,d=this.clearable&&!this.disabled&&!this.visuallyDisabled,h=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",p=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",m=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",b={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],C={sm:"mr-1",md:"mr-2",lg:"mr-2"}[this.size],k={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return u`<div part="form-control" class="${c("relative text-left",p,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><label id="label" part="form-control-label" class="${o&&"inline-block mb-2"}" aria-hidden="${!o}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label> <span aria-live="polite" class="sr-only">${this.deletedTagLabel}</span><div part="form-control-input" class="relative w-full bg-white text-black"><div part="border" class="${c("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[h],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${c("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip shift sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
125
126
|
popup:popup__content,
|
|
126
|
-
"><div part="combobox" class="${c("relative w-full px-4 flex flex-row items-center rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200",this.open&&"shadow transition-shadow duration-medium ease-in-out",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}">${t.left?u`<slot part="left" name="left" class="${c("inline-flex",C,m,k)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?u`<div part="tags" class="${c("flex items-center gap-1",C)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${c("appearance-none outline-none bg-transparent flex-auto min-w-0",p,this.selectedTextLabel&&!this.multiple?"placeholder-black":"placeholder-neutral-700")}" type="text" placeholder="${this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||this.localize.term("comboboxDefaultPlaceholder")}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map($=>$==null?void 0:$.getTextLabel()).join(", ")}</div><input class="${c("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",p)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${d?u`<button part="clear-button" class="${c("flex justify-center",b,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${c("text-neutral-700",k)}" name="closing-round" library="_internal"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?u`<sd-icon part="invalid-icon" class="${c(b,k,"text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?u`<sd-icon part="valid-icon" class="${c("flex-shrink-0 text-success",b,k)}" library="_internal" name="status-check"></sd-icon>`:""}<slot name="right" part="right" class="${c("inline-flex ml-2 leading-[0]",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",k)}">${this.type!=="search"?u`<sd-icon class="${c("transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-icon>`:""}</slot>${this.type==="search"?u`<button class="${c("flex items-center sd-interactive",b)}" type="button"><sd-icon class="${c(m,k)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-icon></button>`:u`<button class="sd-interactive combobox-button absolute top-2" @keydown="${this.handleComboboxMouseDown}" type="button"><span class="sr-only">${this.localize.term("open")}</span></button>`}</div><div id="listbox" role="${w(this.multiple?void 0:"listbox")}" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${c("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow transition-shadow duration-medium ease-in-out",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox">${this.filteredOptions.length===0?u`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>`:this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-popup></div><div part="form-control-help-text" id="help-text" class="text-sm text-neutral-700 mt-1" aria-hidden="${!n}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};T.styles=[...f.styles,y`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([visually-disabled]) input{caret-color:transparent}:host([size=sm]) .combobox-button{height:var(--sd-spacing-4,1rem);right:var(--sd-spacing-4,1rem);width:var(--sd-spacing-4,1rem)}:host([size=md]) .combobox-button{height:var(--sd-spacing-6,1.5rem);right:.85rem;width:var(--sd-spacing-6,1.5rem)}:host([size=lg]) .combobox-button{height:var(--sd-spacing-8,2rem);right:var(--sd-spacing-3,.75rem);width:var(--sd-spacing-8,2rem)}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}[part=filtered-listbox] sd-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;color:inherit;font-weight:700}`],a([g("sd-popup")],T.prototype,"popup",2),a([g('[part="combobox"]')],T.prototype,"combobox",2),a([g('[part="display-input"]')],T.prototype,"displayInput",2),a([g(".value-input")],T.prototype,"valueInput",2),a([g('[part="listbox"]')],T.prototype,"listbox",2),a([g('[part="tags"]')],T.prototype,"tagWrapper",2),a([g('[part="filtered-listbox"]')],T.prototype,"filteredWrapper",2),a([g("slot:not([name])")],T.prototype,"defaultSlot",2),a([g("#invalid-message")],T.prototype,"invalidMessage",2),a([E()],T.prototype,"hasFocus",2),a([E()],T.prototype,"displayInputValue",2),a([E()],T.prototype,"selectedTextLabel",2),a([E()],T.prototype,"selectedOptions",2),a([E()],T.prototype,"filteredOptions",2),a([E()],T.prototype,"allOptions",2),a([E()],T.prototype,"lastOption",2),a([E()],T.prototype,"showValidStyle",2),a([E()],T.prototype,"showInvalidStyle",2),a([E()],T.prototype,"deletedTagLabel",2),a([l({reflect:!0})],T.prototype,"name",2),a([l({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],T.prototype,"value",2),a([Lt()],T.prototype,"defaultValue",2),a([l({type:String,reflect:!0})],T.prototype,"size",2),a([l({type:String,reflect:!0})],T.prototype,"placeholder",2),a([l({type:String,attribute:"max-options-tag-label",reflect:!0})],T.prototype,"maxOptionsTagLabel",2),a([l({type:Boolean,reflect:!0})],T.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],T.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],T.prototype,"clearable",2),a([l({type:Boolean,reflect:!0})],T.prototype,"open",2),a([l({type:Boolean,reflect:!0})],T.prototype,"hoist",2),a([l({type:String,reflect:!0})],T.prototype,"label",2),a([l({type:String,reflect:!0})],T.prototype,"placement",2),a([l({type:String,attribute:"help-text",reflect:!0})],T.prototype,"helpText",2),a([l({type:String,reflect:!0})],T.prototype,"form",2),a([l({type:Boolean,reflect:!0})],T.prototype,"required",2),a([l({type:String,reflect:!0})],T.prototype,"type",2),a([E()],T.prototype,"currentPlacement",2),a([l()],T.prototype,"getOption",2),a([l({type:Boolean,reflect:!0})],T.prototype,"multiple",2),a([l({type:Boolean,reflect:!0})],T.prototype,"useTags",2),a([l({type:Number,reflect:!0,attribute:"max-options-visible"})],T.prototype,"maxOptionsVisible",2),a([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],T.prototype,"styleOnValid",2),a([l()],T.prototype,"filter",2),a([l()],T.prototype,"getTag",2),a([x("filter",{waitUntilFirstUpdate:!0})],T.prototype,"handleFilterChange",1),a([x("useTags",{waitUntilFirstUpdate:!0})],T.prototype,"handleUseTagsChange",1),a([x("size",{waitUntilFirstUpdate:!0})],T.prototype,"applySizeToOptions",1),a([x(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],T.prototype,"handleDisabledChange",1),a([x("value",{waitUntilFirstUpdate:!0})],T.prototype,"handleValueChange",1),a([x("displayInputValue",{waitUntilFirstUpdate:!0})],T.prototype,"handleDisplayInputValueChange",1),a([x("open",{waitUntilFirstUpdate:!0})],T.prototype,"handleOpenChange",1),T=a([v("sd-combobox")],T);_("combobox.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("combobox.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var At=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"footer");this.localize=new L(this);this.open=!1;this.headline="";this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new Xe(this)}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),Ke(this))}disconnectedCallback(){super.disconnectedCallback(),je(this)}get prefersReducedMotion(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){let r=F(this,"dialog.denyClose",{dir:this.localize.dir()});B(this.panel,r.keyframes,r.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.requestClose("keyboard"))}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=qe(),this.modal.activate(),Ke(this);let t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([R(this.dialog),R(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")});let e=this.prefersReducedMotion?F(this,"dialog.showReducedMotion",{dir:this.localize.dir()}):F(this,"dialog.show",{dir:this.localize.dir()}),r=F(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([B(this.panel,e.keyframes,e.options),B(this.overlay,r.keyframes,r.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([R(this.dialog),R(this.overlay)]);let t=this.prefersReducedMotion?F(this,"dialog.hideReducedMotion",{dir:this.localize.dir()}):F(this,"dialog.hide",{dir:this.localize.dir()}),e=F(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([B(this.overlay,e.keyframes,e.options).then(()=>{this.overlay.hidden=!0}),B(this.panel,t.keyframes,t.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,je(this);let r=this.originalTrigger;typeof(r==null?void 0:r.focus)=="function"&&r.isConnected&&setTimeout(()=>{try{r.focus({preventScroll:!0})}catch(o){r.focus()}this.originalTrigger=null}),this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,q(this,"sd-after-hide")}render(){return u`<div part="base" class="${c("flex items-center justify-center fixed inset-0 z-dialog",this.hasSlotController.test("footer")&&"dialog--has-footer")}"><div part="overlay" class="fixed inset-0 bg-primary-800 opacity-90" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${c("flex flex-col z-20 bg-white py-4 sm:py-8 relative gap-6 focus-visible:focus-outline-inverted overflow-y-auto",this.open&&"flex opacity-100")}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${w(this.headline?this.headline:void 0)}" aria-labelledby="${w(this.headline?void 0:"title")}" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length>0?u`<span class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</span>`:u`<slot name="headline"></slot>`}</h2>${this.noCloseButton?"":u`<sd-button part="close-button" variant="tertiary" exportparts="base:close-button__base" class="${c("absolute top-2 right-2")}" name="x-lg" @click="${()=>this.requestClose("close-button")}" type="button"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal" color="currentColor"></sd-icon></sd-button>`}</header><main part="body" class="flex flex-auto overflow-auto w-full px-6 sm:px-10"><slot></slot></main><footer part="footer" class="flex flex-grow-0 flex-shrink-0 basis-auto ml-auto gap-4 px-6 sm:px-10"><slot name="footer"></slot></footer></div></div>`}};At.styles=[...f.styles,y`:host{--width:662px}[part=panel]{max-height:80vh;width:var(--width)}[part=body]{-webkit-overflow-scrolling:touch}@media (max-width:414px){:host{--width:335px}[part=body]{min-height:50px}[part=footer]{width:100%}}`],a([g('[part="base"]')],At.prototype,"dialog",2),a([g('[part="panel"]')],At.prototype,"panel",2),a([g('[part="overlay"]')],At.prototype,"overlay",2),a([l({type:Boolean,reflect:!0})],At.prototype,"open",2),a([l({type:String,reflect:!0})],At.prototype,"headline",2),a([l({attribute:"no-close-button",type:Boolean,reflect:!0})],At.prototype,"noCloseButton",2),a([x("open",{waitUntilFirstUpdate:!0})],At.prototype,"handleOpenChange",1),At=a([v("sd-dialog")],At);_("dialog.show",{keyframes:[{opacity:0,transform:"translate(-50%, 100%)"},{opacity:1,transform:"translate(0, 0)"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("dialog.showReducedMotion",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out",reducedMotion:"allow"}});_("dialog.hide",{keyframes:[{opacity:1,transform:"translate(0, 0)"},{opacity:0,transform:"translate(50%, -100%)"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});_("dialog.hideReducedMotion",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out",reducedMotion:"allow"}});_("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}});_("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out",reducedMotion:"allow"}});_("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out",reducedMotion:"allow"}});var ge=class extends f{constructor(){super(...arguments);this.orientation="horizontal";this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return u`<hr part="main" aria-orientation="${this.orientation}" class="${c(this.inverted?"border-primary-400":"border-neutral-400",this.orientation==="horizontal"?"border-t w-full":" border-l h-full")}">`}};ge.styles=[...f.styles,y`:host{margin:var(--sd-spacing-0,0)}:host(sd-divider[orientation=horizontal]){display:block}:host(sd-divider[orientation=vertical]){display:inline-block}`],a([l({type:String,reflect:!0})],ge.prototype,"orientation",2),a([l({type:Boolean,reflect:!0})],ge.prototype,"inverted",2),ge=a([v("sd-divider")],ge);function Da(s,i){let t=s;for(;t;){if(t.matches(i))return t;if(t.parentElement)t=t.parentElement;else if(t.parentNode instanceof ShadowRoot)t=t.parentNode.host;else break}return null}var rt=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.open=!1;this.rounded=!1;this.placement="bottom-start";this.disabled=!1;this.stayOpenOnSelect=!1;this.distance=0;this.skidding=0;this.noAutoSize=!1;this.noFlip=!1;this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleMenuItemActivate=this.handleMenuItemActivate.bind(this),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this)}firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide()}getAccessibleTrigger(){let e=this.trigger.assignedElements({flatten:!0}).find(o=>er(o).start),r=null;if(e)switch(e.tagName.toLowerCase()){case"sd-button":case"sd-icon-button":r=e.button;break;case"sd-navigation-item":r=e.button;break;default:r=e}return r}updateAccessibleTrigger(){let t=this.getAccessibleTrigger();t&&(t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-expanded",this.open?"true":"false"))}focusOnTrigger(){let t=this.getAccessibleTrigger();typeof(t==null?void 0:t.focus)=="function"&&t.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find(t=>t.tagName.toLowerCase()==="sd-menu")}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide(),this.focusOnTrigger())}handleDocumentKeyDown(t){var e;if(t.key==="Tab"){if(this.open&&((e=document.activeElement)==null?void 0:e.tagName.toLowerCase())==="sd-menu-item"){t.preventDefault(),this.hide(),this.focusOnTrigger();return}setTimeout(()=>{let r=qe();(!r||!this.containingElement||Da(r,this.containingElement.tagName.toLowerCase())!==this.containingElement)&&this.hide()})}}handleDocumentMouseDown(t){let e=t.composedPath();this.containingElement&&!e.includes(this.containingElement)&&this.hide()}handleMenuItemActivate(t){let e=t.target;Kt(e,this.panel)}handlePanelSelect(t){let e=t.target;!this.stayOpenOnSelect&&e.tagName.toLowerCase()==="sd-menu"&&(this.hide(),this.focusOnTrigger())}handleTriggerClick(){this.open?this.hide():this.show()}handleTriggerKeyDown(t){if(t.key==="Escape"&&this.open){t.stopPropagation(),this.focusOnTrigger(),this.hide();return}if([" ","Enter"].includes(t.key)){t.preventDefault(),this.handleTriggerClick();return}let e=this.getMenu();if(e){let r=e.defaultSlot.assignedElements({flatten:!0}),o=r.find(d=>!d.disabled)||r[0],n=r[r.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||this.show(),r.length>0&&requestAnimationFrame(()=>{(t.key==="ArrowDown"||t.key==="Home")&&(e.setCurrentItem(o),o.focus()),(t.key==="ArrowUp"||t.key==="End")&&(e.setCurrentItem(n),n.focus())}))}}handleTriggerKeyUp(t){t.key===" "&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}async show(){if(!this.open)return this.open=!0,q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,q(this,"sd-after-hide")}reposition(){this.popup.reposition()}addOpenListeners(){this.panel.addEventListener("sd-activate",this.handleMenuItemActivate),this.panel.addEventListener("sd-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("sd-activate",this.handleMenuItemActivate),this.panel.removeEventListener("sd-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}async handleOpenChange(){if(this.disabled){this.open=!1;return}if(this.updateAccessibleTrigger(),this.open){this.emit("sd-show"),this.addOpenListeners(),await R(this),this.panel.hidden=!1,this.popup.active=!0;let{keyframes:t,options:e}=F(this,"dropdown.show",{dir:this.localize.dir()});await B(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await R(this);let{keyframes:t,options:e}=F(this,"dropdown.hide",{dir:this.localize.dir()});await B(this.popup.popup,t,e),this.panel.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}render(){return u`<sd-popup part="base" id="dropdown" exportparts="
|
|
127
|
+
"><div part="combobox" class="${c("relative w-full px-4 flex flex-row items-center rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200",this.open&&"shadow transition-shadow duration-medium ease-in-out",{sm:"py-1 min-h-[32px]",md:"py-1 min-h-[40px]",lg:"py-2 min-h-[48px]"}[this.size])}" slot="anchor" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}">${t.left?u`<slot part="left" name="left" class="${c("inline-flex",C,m,k)}"></slot>`:""} ${this.multiple&&this.useTags&&this.tags.length>0?u`<div part="tags" class="${c("flex items-center gap-1",C)}">${this.tags}</div>`:null} <input id="display-input" name="${this.name}" form="${this.form}" part="display-input" class="${c("appearance-none outline-none bg-transparent flex-auto min-w-0",p,this.selectedTextLabel&&!this.multiple?"placeholder-black":"placeholder-neutral-700")}" type="text" placeholder="${this.selectedTextLabel&&!this.multiple?this.selectedTextLabel:this.placeholder||this.localize.term("comboboxDefaultPlaceholder")}" .disabled="${this.disabled}" .value="${this.displayInputValue}" autocomplete="off" spellcheck="false" autocapitalize="off" aria-controls="listbox" aria-expanded="${this.open}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" role="combobox" tabindex="0" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-autocomplete="list" aria-owns="listbox" @input="${this.handleInput}" @change="${this.handleChange}"><div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map($=>$==null?void 0:$.getTextLabel()).join(", ")}</div><input class="${c("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",p)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${d?u`<button part="clear-button" class="${c("flex justify-center",b,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.preventLoosingFocus}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${c("text-neutral-700",k)}" name="closing-round" library="_internal"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?u`<sd-icon part="invalid-icon" class="${c(b,k,"text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?u`<sd-icon part="valid-icon" class="${c("flex-shrink-0 text-success",b,k)}" library="_internal" name="confirm-circle"></sd-icon>`:""}<slot name="right" part="right" class="${c("inline-flex ml-2 leading-[0]",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",k)}">${this.type!=="search"?u`<sd-icon class="${c("transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0")}" name="chevron-down" part="chevron" library="_internal" color="currentColor" label="${this.localize.term("open")}"></sd-icon>`:""}</slot>${this.type==="search"?u`<button class="${c("flex items-center sd-interactive",b)}" type="button"><sd-icon class="${c(m,k)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-icon></button>`:u`<button class="sd-interactive combobox-button absolute top-2" @keydown="${this.handleComboboxMouseDown}" type="button"><span class="sr-only">${this.localize.term("open")}</span></button>`}</div><div id="listbox" role="${w(this.multiple?void 0:"listbox")}" aria-expanded="${this.open}" aria-multiselectable="${this.multiple}" aria-labelledby="label" part="listbox" class="${c("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow transition-shadow duration-medium ease-in-out",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mousedown="${this.preventLoosingFocus}" @mouseup="${this.handleOptionClick}"><div part="filtered-listbox">${this.filteredOptions.length===0?u`<span id="noResults" class="px-4 flex items-center w-full transition-all text-left text-base relative text-black py-3" aria-hidden="true" @click="${this.handleNoResultsClick}">${this.localize.term("noResults")}</span>`:this.options}</div><slot id="defaultOptionsSlot" class="hidden" @slotchange="${this.handleDefaultSlotChange}"></slot></div></sd-popup></div><div part="form-control-help-text" id="help-text" class="text-sm text-neutral-700 mt-1" aria-hidden="${!n}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};T.styles=[...f.styles,y`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([visually-disabled]) input{caret-color:transparent}:host([size=sm]) .combobox-button{height:var(--sd-spacing-4,1rem);right:var(--sd-spacing-4,1rem);width:var(--sd-spacing-4,1rem)}:host([size=md]) .combobox-button{height:var(--sd-spacing-6,1.5rem);right:.85rem;width:var(--sd-spacing-6,1.5rem)}:host([size=lg]) .combobox-button{height:var(--sd-spacing-8,2rem);right:var(--sd-spacing-3,.75rem);width:var(--sd-spacing-8,2rem)}[part=listbox]{max-height:var(--auto-size-available-height,auto)}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}[part=filtered-listbox] sd-optgroup:first-of-type{--display-divider:none}mark{background-color:transparent;color:inherit;font-weight:700}`],a([g("sd-popup")],T.prototype,"popup",2),a([g('[part="combobox"]')],T.prototype,"combobox",2),a([g('[part="display-input"]')],T.prototype,"displayInput",2),a([g(".value-input")],T.prototype,"valueInput",2),a([g('[part="listbox"]')],T.prototype,"listbox",2),a([g('[part="tags"]')],T.prototype,"tagWrapper",2),a([g('[part="filtered-listbox"]')],T.prototype,"filteredWrapper",2),a([g("slot:not([name])")],T.prototype,"defaultSlot",2),a([g("#invalid-message")],T.prototype,"invalidMessage",2),a([E()],T.prototype,"hasFocus",2),a([E()],T.prototype,"displayInputValue",2),a([E()],T.prototype,"selectedTextLabel",2),a([E()],T.prototype,"selectedOptions",2),a([E()],T.prototype,"filteredOptions",2),a([E()],T.prototype,"allOptions",2),a([E()],T.prototype,"lastOption",2),a([E()],T.prototype,"showValidStyle",2),a([E()],T.prototype,"showInvalidStyle",2),a([E()],T.prototype,"deletedTagLabel",2),a([l({reflect:!0})],T.prototype,"name",2),a([l({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],T.prototype,"value",2),a([Lt()],T.prototype,"defaultValue",2),a([l({type:String,reflect:!0})],T.prototype,"size",2),a([l({type:String,reflect:!0})],T.prototype,"placeholder",2),a([l({type:String,attribute:"max-options-tag-label",reflect:!0})],T.prototype,"maxOptionsTagLabel",2),a([l({type:Boolean,reflect:!0})],T.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],T.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],T.prototype,"clearable",2),a([l({type:Boolean,reflect:!0})],T.prototype,"open",2),a([l({type:Boolean,reflect:!0})],T.prototype,"hoist",2),a([l({type:String,reflect:!0})],T.prototype,"label",2),a([l({type:String,reflect:!0})],T.prototype,"placement",2),a([l({type:String,attribute:"help-text",reflect:!0})],T.prototype,"helpText",2),a([l({type:String,reflect:!0})],T.prototype,"form",2),a([l({type:Boolean,reflect:!0})],T.prototype,"required",2),a([l({type:String,reflect:!0})],T.prototype,"type",2),a([E()],T.prototype,"currentPlacement",2),a([l()],T.prototype,"getOption",2),a([l({type:Boolean,reflect:!0})],T.prototype,"multiple",2),a([l({type:Boolean,reflect:!0})],T.prototype,"useTags",2),a([l({type:Number,reflect:!0,attribute:"max-options-visible"})],T.prototype,"maxOptionsVisible",2),a([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],T.prototype,"styleOnValid",2),a([l()],T.prototype,"filter",2),a([l()],T.prototype,"getTag",2),a([x("filter",{waitUntilFirstUpdate:!0})],T.prototype,"handleFilterChange",1),a([x("useTags",{waitUntilFirstUpdate:!0})],T.prototype,"handleUseTagsChange",1),a([x("size",{waitUntilFirstUpdate:!0})],T.prototype,"applySizeToOptions",1),a([x(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],T.prototype,"handleDisabledChange",1),a([x("value",{waitUntilFirstUpdate:!0})],T.prototype,"handleValueChange",1),a([x("displayInputValue",{waitUntilFirstUpdate:!0})],T.prototype,"handleDisplayInputValueChange",1),a([x("open",{waitUntilFirstUpdate:!0})],T.prototype,"handleOpenChange",1),T=a([v("sd-combobox")],T);_("combobox.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("combobox.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var At=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"footer");this.localize=new L(this);this.open=!1;this.headline="";this.noCloseButton=!1}connectedCallback(){super.connectedCallback(),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.modal=new Xe(this)}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),Ke(this))}disconnectedCallback(){super.disconnectedCallback(),je(this)}get prefersReducedMotion(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}requestClose(t){if(this.emit("sd-request-close",{cancelable:!0,detail:{source:t}}).defaultPrevented){let r=F(this,"dialog.denyClose",{dir:this.localize.dir()});B(this.panel,r.keyframes,r.options);return}this.hide()}addOpenListeners(){document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){document.removeEventListener("keydown",this.handleDocumentKeyDown)}handleDocumentKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.requestClose("keyboard"))}async handleOpenChange(){if(this.open){this.emit("sd-show"),this.addOpenListeners(),this.originalTrigger=qe(),this.modal.activate(),Ke(this);let t=this.querySelector("[autofocus]");t&&t.removeAttribute("autofocus"),await Promise.all([R(this.dialog),R(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame(()=>{this.emit("sd-initial-focus",{cancelable:!0}).defaultPrevented||(t?t.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),t&&t.setAttribute("autofocus","")});let e=this.prefersReducedMotion?F(this,"dialog.showReducedMotion",{dir:this.localize.dir()}):F(this,"dialog.show",{dir:this.localize.dir()}),r=F(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([B(this.panel,e.keyframes,e.options),B(this.overlay,r.keyframes,r.options)]),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([R(this.dialog),R(this.overlay)]);let t=this.prefersReducedMotion?F(this,"dialog.hideReducedMotion",{dir:this.localize.dir()}):F(this,"dialog.hide",{dir:this.localize.dir()}),e=F(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([B(this.overlay,e.keyframes,e.options).then(()=>{this.overlay.hidden=!0}),B(this.panel,t.keyframes,t.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,je(this);let r=this.originalTrigger;typeof(r==null?void 0:r.focus)=="function"&&r.isConnected&&setTimeout(()=>{try{r.focus({preventScroll:!0})}catch(o){r.focus()}this.originalTrigger=null}),this.emit("sd-after-hide")}}async show(){if(!this.open)return this.open=!0,q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,q(this,"sd-after-hide")}render(){return u`<div part="base" class="${c("flex items-center justify-center fixed inset-0 z-dialog",this.hasSlotController.test("footer")&&"dialog--has-footer")}"><div part="overlay" class="fixed inset-0 bg-primary-800 opacity-90" @click="${()=>this.requestClose("overlay")}" tabindex="-1"></div><div part="panel" class="${c("flex flex-col z-20 bg-white py-4 sm:py-8 relative gap-6 focus-visible:focus-outline-inverted overflow-y-auto",this.open&&"flex opacity-100")}" role="dialog" aria-modal="true" aria-hidden="${this.open?"false":"true"}" aria-label="${w(this.headline?this.headline:void 0)}" aria-labelledby="${w(this.headline?void 0:"title")}" tabindex="0"><header part="header" class="flex flex-grow-0 flex-shrink-0 basis-auto px-6 sm:px-10"><h2 part="title" class="flex-auto m-0" id="title">${this.headline.length>0?u`<span class="sd-headline sd-headline--size-3xl leading-tight">${this.headline}</span>`:u`<slot name="headline"></slot>`}</h2>${this.noCloseButton?"":u`<sd-button part="close-button" variant="tertiary" exportparts="base:close-button__base" class="${c("absolute top-2 right-2")}" name="x-lg" @click="${()=>this.requestClose("close-button")}" type="button"><sd-icon label="${this.localize.term("close")}" name="close" library="_internal" color="currentColor"></sd-icon></sd-button>`}</header><main part="body" class="flex flex-auto overflow-auto w-full px-6 sm:px-10"><slot></slot></main><footer part="footer" class="flex flex-grow-0 flex-shrink-0 basis-auto ml-auto gap-4 px-6 sm:px-10"><slot name="footer"></slot></footer></div></div>`}};At.styles=[...f.styles,y`:host{--width:662px}[part=panel]{max-height:80vh;width:var(--width)}[part=body]{-webkit-overflow-scrolling:touch}@media (max-width:414px){:host{--width:335px}[part=body]{min-height:50px}[part=footer]{width:100%}}`],a([g('[part="base"]')],At.prototype,"dialog",2),a([g('[part="panel"]')],At.prototype,"panel",2),a([g('[part="overlay"]')],At.prototype,"overlay",2),a([l({type:Boolean,reflect:!0})],At.prototype,"open",2),a([l({type:String,reflect:!0})],At.prototype,"headline",2),a([l({attribute:"no-close-button",type:Boolean,reflect:!0})],At.prototype,"noCloseButton",2),a([x("open",{waitUntilFirstUpdate:!0})],At.prototype,"handleOpenChange",1),At=a([v("sd-dialog")],At);_("dialog.show",{keyframes:[{opacity:0,transform:"translate(-50%, 100%)"},{opacity:1,transform:"translate(0, 0)"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("dialog.showReducedMotion",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out",reducedMotion:"allow"}});_("dialog.hide",{keyframes:[{opacity:1,transform:"translate(0, 0)"},{opacity:0,transform:"translate(50%, -100%)"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});_("dialog.hideReducedMotion",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out",reducedMotion:"allow"}});_("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}});_("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out",reducedMotion:"allow"}});_("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out",reducedMotion:"allow"}});var ge=class extends f{constructor(){super(...arguments);this.orientation="horizontal";this.inverted=!1}connectedCallback(){super.connectedCallback(),this.setAttribute("role","separator")}render(){return u`<hr part="main" aria-orientation="${this.orientation}" class="${c(this.inverted?"border-primary-400":"border-neutral-400",this.orientation==="horizontal"?"border-t w-full":" border-l h-full")}">`}};ge.styles=[...f.styles,y`:host{margin:var(--sd-spacing-0,0)}:host(sd-divider[orientation=horizontal]){display:block}:host(sd-divider[orientation=vertical]){display:inline-block}`],a([l({type:String,reflect:!0})],ge.prototype,"orientation",2),a([l({type:Boolean,reflect:!0})],ge.prototype,"inverted",2),ge=a([v("sd-divider")],ge);function Da(s,i){let t=s;for(;t;){if(t.matches(i))return t;if(t.parentElement)t=t.parentElement;else if(t.parentNode instanceof ShadowRoot)t=t.parentNode.host;else break}return null}var rt=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.open=!1;this.rounded=!1;this.placement="bottom-start";this.disabled=!1;this.stayOpenOnSelect=!1;this.distance=0;this.skidding=0;this.noAutoSize=!1;this.noFlip=!1;this.hoist=!1}connectedCallback(){super.connectedCallback(),this.handleMenuItemActivate=this.handleMenuItemActivate.bind(this),this.handlePanelSelect=this.handlePanelSelect.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleDocumentKeyDown=this.handleDocumentKeyDown.bind(this),this.handleDocumentMouseDown=this.handleDocumentMouseDown.bind(this),this.containingElement||(this.containingElement=this)}firstUpdated(){this.panel.hidden=!this.open,this.open&&(this.addOpenListeners(),this.popup.active=!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeOpenListeners(),this.hide()}getAccessibleTrigger(){let e=this.trigger.assignedElements({flatten:!0}).find(o=>er(o).start),r=null;if(e)switch(e.tagName.toLowerCase()){case"sd-button":case"sd-icon-button":r=e.button;break;case"sd-navigation-item":r=e.button;break;default:r=e}return r}updateAccessibleTrigger(){let t=this.getAccessibleTrigger();t&&(t.setAttribute("aria-haspopup","true"),t.setAttribute("aria-expanded",this.open?"true":"false"))}focusOnTrigger(){let t=this.getAccessibleTrigger();typeof(t==null?void 0:t.focus)=="function"&&t.focus()}getMenu(){return this.panel.assignedElements({flatten:!0}).find(t=>t.tagName.toLowerCase()==="sd-menu")}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide(),this.focusOnTrigger())}handleDocumentKeyDown(t){var e;if(t.key==="Tab"){if(this.open&&((e=document.activeElement)==null?void 0:e.tagName.toLowerCase())==="sd-menu-item"){t.preventDefault(),this.hide(),this.focusOnTrigger();return}setTimeout(()=>{let r=qe();(!r||!this.containingElement||Da(r,this.containingElement.tagName.toLowerCase())!==this.containingElement)&&this.hide()})}}handleDocumentMouseDown(t){let e=t.composedPath();this.containingElement&&!e.includes(this.containingElement)&&this.hide()}handleMenuItemActivate(t){let e=t.target;Kt(e,this.panel)}handlePanelSelect(t){let e=t.target;!this.stayOpenOnSelect&&e.tagName.toLowerCase()==="sd-menu"&&(this.hide(),this.focusOnTrigger())}handleTriggerClick(){this.open?this.hide():this.show()}handleTriggerKeyDown(t){if(t.key==="Escape"&&this.open){t.stopPropagation(),this.focusOnTrigger(),this.hide();return}if([" ","Enter"].includes(t.key)){t.preventDefault(),this.handleTriggerClick();return}let e=this.getMenu();if(e){let r=e.defaultSlot.assignedElements({flatten:!0}),o=r.find(d=>!d.disabled)||r[0],n=r[r.length-1];["ArrowDown","ArrowUp","Home","End"].includes(t.key)&&(t.preventDefault(),this.open||this.show(),r.length>0&&requestAnimationFrame(()=>{(t.key==="ArrowDown"||t.key==="Home")&&(e.setCurrentItem(o),o.focus()),(t.key==="ArrowUp"||t.key==="End")&&(e.setCurrentItem(n),n.focus())}))}}handleTriggerKeyUp(t){t.key===" "&&t.preventDefault()}handleTriggerSlotChange(){this.updateAccessibleTrigger()}async show(){if(!this.open)return this.open=!0,q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,q(this,"sd-after-hide")}reposition(){this.popup.reposition()}addOpenListeners(){this.panel.addEventListener("sd-activate",this.handleMenuItemActivate),this.panel.addEventListener("sd-select",this.handlePanelSelect),this.panel.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keydown",this.handleDocumentKeyDown),document.addEventListener("mousedown",this.handleDocumentMouseDown)}removeOpenListeners(){this.panel&&(this.panel.removeEventListener("sd-activate",this.handleMenuItemActivate),this.panel.removeEventListener("sd-select",this.handlePanelSelect),this.panel.removeEventListener("keydown",this.handleKeyDown)),document.removeEventListener("keydown",this.handleDocumentKeyDown),document.removeEventListener("mousedown",this.handleDocumentMouseDown)}async handleOpenChange(){if(this.disabled){this.open=!1;return}if(this.updateAccessibleTrigger(),this.open){this.emit("sd-show"),this.addOpenListeners(),await R(this),this.panel.hidden=!1,this.popup.active=!0;let{keyframes:t,options:e}=F(this,"dropdown.show",{dir:this.localize.dir()});await B(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await R(this);let{keyframes:t,options:e}=F(this,"dropdown.hide",{dir:this.localize.dir()});await B(this.popup.popup,t,e),this.panel.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}render(){return u`<sd-popup part="base" id="dropdown" exportparts="
|
|
127
128
|
popup:base__popup,
|
|
128
|
-
" placement="${this.placement}" distance="${this.rounded&&this.distance<1?1:this.distance}" skidding="${this.skidding}" strategy="${this.hoist?"fixed":"absolute"}" ?flip="${!this.noFlip}" shift auto-size="vertical" auto-size-padding="10"><slot name="trigger" slot="anchor" part="trigger" class="block" @click="${this.handleTriggerClick}" @keydown="${this.handleTriggerKeyDown}" @keyup="${this.handleTriggerKeyUp}" @slotchange="${this.handleTriggerSlotChange}"></slot><slot part="panel" class="${c("shadow bg-white block",this.open?"pointer-events-auto":"pointer-events-none",this.rounded&&"rounded-md")}" aria-hidden="${this.open?"false":"true"}" aria-labelledby="dropdown"></slot></sd-popup>`}};rt.styles=[...f.styles,y`:host{display:inline-block}#dropdown::part(popup){z-index:var(--sd-z-index-dropdown,900)}#dropdown[data-current-placement^=top]::part(popup){transform-origin:bottom}#dropdown[data-current-placement^=bottom]::part(popup){transform-origin:top}#dropdown[data-current-placement^=left]::part(popup){transform-origin:right}#dropdown[data-current-placement^=right]::part(popup){transform-origin:left}:host(:not([no-auto-size])) ::slotted(:not([slot=trigger])){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important;overflow:auto}`],a([g("#dropdown")],rt.prototype,"popup",2),a([g("[part=trigger]")],rt.prototype,"trigger",2),a([g("[part=panel]")],rt.prototype,"panel",2),a([l({type:Boolean,reflect:!0})],rt.prototype,"open",2),a([l({type:Boolean,reflect:!0})],rt.prototype,"rounded",2),a([l({type:String,reflect:!0})],rt.prototype,"placement",2),a([l({type:Boolean,reflect:!0})],rt.prototype,"disabled",2),a([l({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],rt.prototype,"stayOpenOnSelect",2),a([l({type:Object})],rt.prototype,"containingElement",2),a([l({type:Number,reflect:!0})],rt.prototype,"distance",2),a([l({type:Number,reflect:!0})],rt.prototype,"skidding",2),a([l({type:Boolean,reflect:!0,attribute:"no-auto-size"})],rt.prototype,"noAutoSize",2),a([l({type:Boolean,reflect:!0,attribute:"no-flip"})],rt.prototype,"noFlip",2),a([l({type:Boolean,reflect:!0})],rt.prototype,"hoist",2),a([x("open",{waitUntilFirstUpdate:!0})],rt.prototype,"handleOpenChange",1),rt=a([v("sd-dropdown")],rt);_("dropdown.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("dropdown.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var Ht=class extends f{constructor(){super(...arguments);this.open=!1;this.inverted=!1;this.localize=new L(this)}updateMaxHeight(){var e;let t=(e=this.contentPreview)==null?void 0:e.scrollHeight.toString();this.style.setProperty("--max-height-pixel",`${t}px`),this.style.setProperty("--max-height",t)}onToggleClick(){this.updateMaxHeight(),this.open=!this.open}async onOpenChange(){if(this.body.classList.add("transitioning"),this.open){this.emit("sd-show"),await R(this.body);let{keyframes:t,options:e}=F(this,"expandable.show",{dir:this.localize.dir()});await B(this.body,he(t,this.body.scrollHeight),e),this.body.style.height="auto",this.updateComplete.then(()=>{this.emit("sd-after-show")})}else{this.emit("sd-hide"),await R(this.body);let{keyframes:t,options:e}=F(this,"expandable.hide",{dir:this.localize.dir()});await B(this.body,he(t,this.body.scrollHeight),e),this.body.style.height="auto",this.updateComplete.then(()=>{this.emit("sd-after-hide")})}this.details.setAttribute("open",this.open.toString()),this.body.classList.remove("transitioning")}async show(){if(!this.open)return this.onToggleClick(),q(this,"sd-after-show")}async hide(){if(this.open)return this.onToggleClick(),q(this,"sd-after-hide")}render(){return u`<div part="base" class="flex flex-col-reverse gap-4"><button part="toggle" class="${c("sd-interactive sd-interactive--reset",this.inverted&&"sd-interactive--inverted",this.inverted?"!focus-visible:focus-outline-inverted":"!focus-visible:focus-outline")}" @click="${this.onToggleClick}" aria-expanded="${this.open}"><div class="${c("h-full justify-center w-full text-base flex items-center toggle")}"><span part="toggle-icon" class="${c("flex items-center mr-2 transition-transform duration-medium ease-in-out",this.open&&"rotate-180")}"><slot name="expand-icon" class="${c(this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="text-xl"></sd-icon></slot><slot name="collapse-icon" class="${c(!this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="text-xl"></sd-icon></slot></span><slot name="toggle-closed" class="${c(this.open&&"hidden")}">${this.localize.term("showMore")}</slot><slot name="toggle-open" class="${c(!this.open&&"hidden")}">${this.localize.term("showLess")}</slot></div></button><details part="details" ?inert="${w(!this.open)}"><summary part="summary" aria-hidden="true" class="cursor-pointer overflow-hidden list-none"><slot name="clone"></slot></summary><div part="content" class="content content-preview overflow-hidden relative"><slot></slot></div></details></div>`}firstUpdated(){this.cloneContentToLightDOM(),this.details.setAttribute("open",this.open.toString())}cloneContentToLightDOM(){let t=document.createElement("div");t.setAttribute("slot","clone"),Array.from(this.childNodes).forEach(r=>{let o=r.cloneNode(!0);t.appendChild(o)}),this.appendChild(t)}};Ht.styles=[...f.styles,y`:host{--component-expandable-max-block-size:90px;--gradient-height:24px;--gradient:var(--gradient-color-start,hsla(0,0%,100%,0)) 0%,var(--gradient-color-end,#fff) 80%,var(--gradient-color-end,#fff) 100%;display:inline-block;position:relative;width:100%}.toggle::-moz-focus-inner{border-style:none;padding:var(--sd-spacing-0,0)}details>summary::-webkit-details-marker,details[open] summary{display:none}summary{max-block-size:var(--component-expandable-max-block-size)}:host([open]) summary{max-block-size:var(--max-height-pixel,1000vh)}.content{max-block-size:var(--component-expandable-max-block-size)}:host([open]) .content,:host:has(.transitioning) .content{max-block-size:var(--max-height-pixel,1000vh)}.content:after{background:linear-gradient(180deg,var(--gradient));bottom:var(--sd-spacing-0,0);content:" ";display:block;height:var(--gradient-height);left:var(--sd-spacing-0,0);opacity:var(--sd-opacity-0,0);position:absolute;transition-duration:.15s;transition-duration:var(--sd-duration-medium,.3s);transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);width:100%}:host([inverted]){--color-primary-rgb:0,53,142;--gradient-color-start:rgba(var(--color-primary-rgb),0);--gradient-color-end:rgba(var(--color-primary-rgb),1)}:host([inverted]) .content:after{background:var(--gradient-vertical-transparent-primary,linear-gradient(180deg,var(--gradient)))}:host(:not([open])) .content:after{opacity:var(--sd-opacity-100,1)}`],a([g(".content-preview")],Ht.prototype,"contentPreview",2),a([g("details")],Ht.prototype,"details",2),a([g('[part="content"]')],Ht.prototype,"body",2),a([l({type:Boolean,reflect:!0})],Ht.prototype,"open",2),a([l({type:Boolean,reflect:!0})],Ht.prototype,"inverted",2),a([x("open",{waitUntilFirstUpdate:!0})],Ht.prototype,"onOpenChange",1),Ht=a([v("sd-expandable")],Ht);_("expandable.show",{keyframes:[{height:"var(--component-expandable-max-block-size, 90px)"},{height:"auto"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("expandable.hide",{keyframes:[{height:"auto"},{height:"var(--component-expandable-max-block-size, 90px)"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var Mt=class extends f{constructor(){super(...arguments);this.flipDirection="horizontal";this.placement="top";this.frontVariant="primary";this.backVariant="primary";this.activeSide="front"}connectedCallback(){super.connectedCallback()}flipFront(){this.activeSide="back",this.front.classList.add("clicked--front"),this.back.classList.add("clicked--back"),this.emit("sd-flip-front"),setTimeout(()=>{this.back.focus()})}flipBack(){this.activeSide="front",this.front.classList.remove("clicked--front"),this.back.classList.remove("clicked--back"),this.emit("sd-flip-back"),setTimeout(()=>{this.front.focus()})}handleFrontKeydown(t){t.code==="Enter"&&this.front===t.target&&this.flipFront()}handleBackKeydown(t){t.code==="Enter"&&this.back===t.target&&this.flipBack()}render(){return u`<div part="base" class="${c("flip-card relative h-full w-full")}"><div part="front" tabindex="0" aria-hidden="${this.activeSide==="back"}" inert="${w(this.activeSide==="back"||void 0)}" class="${c("flip-card__side flip-card__side--front overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.frontVariant==="primary"&&"bg-primary",this.frontVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-front" class="${c("absolute h-full w-full -z-20",(this.frontVariant==="primary"||this.frontVariant==="primary-100")&&"hidden")}"><slot name="media-front"></slot></div><div part="front-slot-container" class="${c("flex",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.frontVariant],{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/75 to-primary-800/60":"bg-gradient-to-b from-primary-800/75 to-primary-800/60"}[this.frontVariant])}"><slot name="front"></slot></div><div part="front-secondary-gradient" class="${c("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-white/0 mb-auto":"bg-gradient-to-t from-white/60 to-white/0 mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-primary-800/0 mt-auto":"bg-gradient-to-b from-primary-800/60 to-primary-800/0 mb-auto"}[this.frontVariant])}"></div><sd-button part="front-button" size="md" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.frontVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.frontVariant]}" class="${c("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipFront}" @keydown="${this.handleFrontKeydown}"><sd-icon library="_internal" name="reload" label="Flip to Back"></sd-icon></sd-button></div><div part="back" tabindex="0" aria-hidden="${this.activeSide==="front"}" inert="${w(this.activeSide==="front"||void 0)}" class="${c("flip-card__side flip-card__side--back overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.backVariant==="primary"&&"bg-primary",this.backVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-back" class="${c("absolute h-full w-full -z-20",(this.backVariant==="primary"||this.backVariant==="primary-100")&&"hidden")}"><slot name="media-back"></slot></div><div part="back-slot-container" class="${c("flex",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.backVariant],{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/75 to-primary-800/60":"bg-gradient-to-b from-primary-800/75 to-primary-800/60"}[this.backVariant])}"><slot name="back"></slot></div><div part="back-secondary-gradient" class="${c("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-white/0 mb-auto":"bg-gradient-to-t from-white/60 to-white/0 mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-primary-800/0 mt-auto":"bg-gradient-to-b from-primary-800/60 to-primary-800/0 mb-auto"}[this.backVariant])}"></div><sd-button size="md" part="back-button" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.backVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.backVariant]}" class="${c("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipBack}" @keydown="${this.handleBackKeydown}"><sd-icon library="_internal" name="reload" label="Flip to Front"></sd-icon></sd-button></div></div>`}};Mt.styles=[...f.styles,y`:host{aspect-ratio:3/4;display:block;--name:"";--height:480px;height:var(--height)}.flip-card{perspective:100rem}.flip-card__side{backface-visibility:hidden}.flip-card__side--back{transform:rotateY(180deg)}.clicked--front{transform:rotateY(-180deg)}.clicked--back{transform:rotateY(0)}.flip-card__side--back.vertical{transform:rotateX(180deg)}.clicked--front.vertical{transform:rotateX(-180deg)}.clicked--back.vertical{transform:rotateX(0)}.flip-card__gradient{flex:.4 1 0}`],a([g('[part="front"]')],Mt.prototype,"front",2),a([g('[part="back"]')],Mt.prototype,"back",2),a([l({reflect:!0,attribute:"flip-direction"})],Mt.prototype,"flipDirection",2),a([l({reflect:!0})],Mt.prototype,"placement",2),a([l({type:String,reflect:!0,attribute:"front-variant"})],Mt.prototype,"frontVariant",2),a([l({type:String,reflect:!0,attribute:"back-variant"})],Mt.prototype,"backVariant",2),a([E()],Mt.prototype,"activeSide",2),Mt=a([v("sd-flipcard")],Mt);var se=class extends f{constructor(){super(...arguments);this.fixed=!1}connectedCallback(){super.connectedCallback(),this.updateCalculatedHeight=this.updateCalculatedHeight.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this),window.addEventListener("resize",this.updateCalculatedHeight)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.updateCalculatedHeight)}firstUpdated(){this.updateCalculatedHeight(),this.addResizeObserver()}updated(t){super.updated(t),t.has("fixed")&&this.updateCalculatedHeight()}addResizeObserver(){this.resizeObserver=new ResizeObserver(this.updateCalculatedHeight),this.header&&this.resizeObserver.observe(this.header)}updateCalculatedHeight(){let t=parseFloat(getComputedStyle(document.documentElement).fontSize),e=window.innerHeight/t;this.header&&this.fixed&&e>=32?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.header.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return u`<header class="w-full bg-white relative" role="banner"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`}};se.styles=[...f.styles,y`:host{display:block;position:relative;z-index:var(--sd-z-index-header,600)}@media (min-height:32rem){:host([fixed]){padding-bottom:var(--sd-header-calculated-height)!important}:host([fixed]) header{left:var(--sd-spacing-0,0);position:fixed;top:var(--sd-spacing-0,0);width:100%}:host([fixed]) header:after{height:var(--sd-spacing-2,.5rem);left:var(--sd-spacing-0,0);position:absolute;right:var(--sd-spacing-0,0);top:100%;--tw-content:"";background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%));content:var(--tw-content)}}[part=main]{max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px);width:var(--sd-header-inner-width)}`],a([l({reflect:!0,type:Boolean})],se.prototype,"fixed",2),a([g("header")],se.prototype,"header",2),a([oi(100)],se.prototype,"updateCalculatedHeight",1),se=a([v("sd-header")],se);var Zt=class extends f{constructor(){super(...arguments);this.mode="cors";this.allowScripts=!1}executeScript(t){let e=document.createElement("script");[...t.attributes].forEach(r=>e.setAttribute(r.name,r.value)),e.textContent=t.textContent,t.parentNode.replaceChild(e,t)}async handleSrcChange(){try{let t=this.src,e=await Wi(t,this.mode);if(t!==this.src)return;if(!e.ok){this.emit("sd-error",{detail:{status:e.status}});return}this.innerHTML=e.html,this.allowScripts&&[...this.querySelectorAll("script")].forEach(r=>this.executeScript(r)),this.emit("sd-load")}catch(t){this.emit("sd-error",{detail:{status:-1}})}}render(){return u`<slot></slot>`}};Zt.styles=[...f.styles,y`:host{display:block}`],a([l({reflect:!0})],Zt.prototype,"src",2),a([l({type:String,reflect:!0})],Zt.prototype,"mode",2),a([l({attribute:"allow-scripts",type:Boolean,reflect:!0})],Zt.prototype,"allowScripts",2),a([x("src")],Zt.prototype,"handleSrcChange",1),Zt=a([v("sd-include")],Zt);var Si=(s,i)=>{var e;let t=s._$AN;if(t===void 0)return!1;for(let r of t)(e=r._$AO)==null||e.call(r,i,!1),Si(r,i);return!0},fr=s=>{let i,t;do{if((i=s._$AM)===void 0)break;t=i._$AN,t.delete(s),s=i}while((t==null?void 0:t.size)===0)},Ha=s=>{for(let i;i=s._$AM;s=i){let t=i._$AN;if(t===void 0)i._$AN=t=new Set;else if(t.has(s))break;t.add(s),Ul(i)}};function Bl(s){this._$AN!==void 0?(fr(this),this._$AM=s,Ha(this)):this._$AM=s}function Rl(s,i=!1,t=0){let e=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(i)if(Array.isArray(e))for(let o=t;o<e.length;o++)Si(e[o],!1),fr(e[o]);else e!=null&&(Si(e,!1),fr(e));else Si(this,s)}var Ul=s=>{var i,t;s.type==_t.CHILD&&((i=s._$AP)!=null||(s._$AP=Rl),(t=s._$AQ)!=null||(s._$AQ=Bl))},ci=class extends Te{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,e){super._$AT(i,t,e),Ha(this),this.isConnected=i._$AU}_$AO(i,t=!0){var e,r;i!==this.isConnected&&(this.isConnected=i,i?(e=this.reconnected)==null||e.call(this):(r=this.disconnected)==null||r.call(this)),t&&(Si(this,i),fr(this))}setValue(i){if(sr(this._$Ct))this._$Ct._$AI(i,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=i,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var Wr=class extends ci{constructor(t){super(t);this.handlePointerDown=t=>{t.button!==0||this.host.disabled||this.spinOnLongPressCallback(t)};this.handlePointerUp=t=>{t==null||t.preventDefault(),t==null||t.stopPropagation(),this.timeout&&this.callbacks.start(),this.stopSpinningAndCleanUp(),this.callbacks.end(),document.removeEventListener("pointerup",this.handlePointerUp)};if(t.type!==_t.ELEMENT||!(t.element instanceof HTMLButtonElement))throw new Error("The `longPress` directive must be used on an HTMLButtonElement.")}render(t){return N}update(t,[e]){return this.callbacks===void 0&&this.host===void 0&&(this.host=t.element,this.callbacks=P({},e),this.host.addEventListener("pointerdown",this.handlePointerDown)),gt}disconnected(){this.stopSpinningAndCleanUp(),this.host.removeEventListener("pointerdown",this.handlePointerDown),document.removeEventListener("pointerup",this.handlePointerUp)}spinOnLongPressCallback(t){var e;t.preventDefault(),t.stopPropagation(),this.timeout=setTimeout(()=>{this.timeout=void 0,this.interval=setInterval(()=>{this.callbacks.start()},50)},500),document.addEventListener("pointerup",this.handlePointerUp),(e=this.observer)==null||e.disconnect(),this.observer=new MutationObserver(r=>{r.forEach(o=>{o.attributeName==="disabled"&&this.stopSpinningAndCleanUp()})}),this.observer.observe(this.host,{attributes:!0})}stopSpinningAndCleanUp(){var t;clearInterval(this.interval),clearTimeout(this.timeout),(t=this.observer)==null||t.disconnect()}},Zr=qt(Wr);var Ia,Nl=(Ia=navigator.userAgentData)==null?void 0:Ia.brands.some(s=>s.brand.includes("Chromium")),ql=Nl?!1:navigator.userAgent.includes("Firefox"),M=class extends f{constructor(){super(...arguments);this.formControlController=new ot(this);this.hasSlotController=new A(this,"help-text","label","left","right","message","placeholder");this.localize=new L(this);this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.type="text";this.size="lg";this.value="";this.defaultValue="";this.placeholder="";this.label="";this.helpText="";this.clearable=!1;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.passwordToggle=!1;this.passwordVisible=!1;this.spinButtons=!1;this.form="";this.name="";this.title="";this.required=!1;this.styleOnValid=!1;this.spellcheck=!0}get valueAsDate(){var t,e;return(e=(t=this.input)==null?void 0:t.valueAsDate)!=null?e:null}set valueAsDate(t){let e=document.createElement("input");e.type="date",e.valueAsDate=t,this.value=e.value}get valueAsNumber(){var t,e;return(e=(t=this.input)==null?void 0:t.valueAsNumber)!=null?e:parseFloat(this.value)}set valueAsNumber(t){let e=document.createElement("input");e.type="number",e.valueAsNumber=t,this.value=e.value}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.input.value,this.emit("sd-change")}handleClearClick(t){this.value="",this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change"),this.input.focus(),t.stopPropagation()}handleSearchClick(t){this.emit("sd-search"),t.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.input.value=this.value;return}this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleKeyDown(t){let e=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;t.key==="Enter"&&!e&&setTimeout(()=>{!t.defaultPrevented&&!t.isComposing&&this.formControlController.submit()})}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}isDecrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.min===void 0||this.min===null)return!1;let t=typeof this.min=="string"?parseFloat(this.min):this.min;return this.valueAsNumber<=t}isIncrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.max===void 0||this.max===null)return!1;let t=typeof this.max=="string"?parseFloat(this.max):this.max;return this.valueAsNumber>=t}handleStep(){this.handleInput(),this.input.focus()}handleStepUp(){this.stepUp(),this.handleStep()}handleStepDown(){this.stepDown(),this.handleStep()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(t){this.input.focus(t)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(t,e,r="none"){this.input.setSelectionRange(t,e,r)}setRangeText(t,e,r,o){this.input.setRangeText(t,e,r,o),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){var t;return(t=this.input)==null?void 0:t.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),description:this.hasSlotController.test("description"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,r=this.helpText?!0:!!t.helpText,o=this.clearable&&!this.readonly&&(typeof this.value=="number"||this.value.length>0),n=!!t.tooltip,d=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",h=this.size==="sm"?"text-sm":"text-base",p={disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[d],m=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",b={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],C={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return u`<div part="form-control" class="${c((this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e||n?u`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${c(e?"inline-block":"hidden",h)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?u`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${c("absolute w-full h-full pointer-events-none border rounded-default transition-[border] ease-in-out duration-medium hover:duration-fast",p)}"></div><div part="base" class="${c("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast",this.size==="lg"?"py-2":"py-1",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",d==="disabled"||d==="visuallyDisabled"?"text-neutral-500":"text-black")}">${t.left?u`<slot name="left" part="left" class="${c("inline-flex",this.size==="sm"?"mr-1":"mr-2",m,C)}"></slot>`:""} <input part="input" id="input" class="${c("min-w-0 flex-grow focus:outline-none bg-transparent",this.visuallyDisabled||this.disabled?"placeholder-neutral-500 cursor-not-allowed":"placeholder-neutral-700",this.size==="sm"?"h-6":"h-8",h)}" type="${this.type==="password"&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${w(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${w(this.placeholder)}" minlength="${w(this.minlength)}" maxlength="${w(this.maxlength)}" min="${w(this.min)}" max="${w(this.max)}" step="${w(this.step)}" .value="${me(this.value)}" autocapitalize="${w(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${w(this.autocomplete)}" autocorrect="${w(this.type==="password"?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${w(this.pattern)}" enterkeyhint="${w(this.enterkeyhint)}" inputmode="${w(this.inputmode)}" aria-describedby="help-text invalid-message" aria-disabled="${this.visuallyDisabled||this.disabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${o?u`<button part="clear-button" class="${c("flex justify-center",b)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${c("text-neutral-700",C)}" library="_internal" name="closing-round"></sd-icon></slot></button>`:""} ${this.passwordToggle&&this.type==="password"?u`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="${c("flex items-center sd-interactive",b)}" type="button" @click="${this.handlePasswordToggle}">${this.passwordVisible?u`<slot name="show-password-icon"><sd-icon class="${c(m,C)}" library="_internal" name="eye"></sd-icon></slot>`:u`<slot name="hide-password-icon"><sd-icon class="${c(m,C)}" library="_internal" name="eye-crossed-out"></sd-icon></slot>`}</button>`:""} ${(this.type==="date"||this.type==="datetime-local")&&!ql?u`<sd-icon class="${c(m,b,C)}" library="_internal" name="calendar"></sd-icon>`:""} ${this.type==="time"?u`<sd-icon class="${c(m,b,C)}" library="_internal" name="clock"></sd-icon>`:""} ${this.type==="search"?u`<button class="${c("flex items-center sd-interactive",b)}" type="button" @click="${this.handleSearchClick}"><sd-icon class="${c(m,C)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-icon></button>`:""} ${this.showInvalidStyle?u`<sd-icon part="invalid-icon" class="${c("text-error",b,C)}" library="_internal" name="risk"></sd-icon>`:""} ${this.showValidStyle&&this.styleOnValid?u`<sd-icon class="${c("text-success flex-shrink-0",b,C)}" library="_internal" name="status-check" part="valid-icon"></sd-icon>`:""} ${t.right?u`<slot name="right" part="right" class="${c("inline-flex",m,b,C)}"></slot>`:""} ${this.type==="number"&&this.spinButtons?u`<div part="stepper" class="flex items-center"><button part="decrement-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isDecrementDisabled()}" aria-hidden="true" ${Zr({start:()=>this.handleStepDown(),end:()=>this.handleChange()})} tabindex="-1"><slot name="decrement-number-stepper"><sd-icon name="system/minus-circle" label="Decrease value" class="${c(m,b,C)}"></sd-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${Zr({start:()=>this.handleStepUp(),end:()=>this.handleChange()})} tabindex="-1"><slot name="increment-number-stepper"><sd-icon name="system/plus-circle" label="Decrease value" class="${c(m,b,C)}"></sd-icon></slot></button></div>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-1",r?"block":"hidden")}" aria-hidden="${!r}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};M.styles=[...f.styles,y`:host{box-sizing:border-box;display:inline-block;position:relative;text-align:left;width:100%}:host([vertical]){display:block}:host([required]) #label:after{content:" *"}:host([visually-disabled]) input{caret-color:transparent}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}`],a([g("#input")],M.prototype,"input",2),a([g("#invalid-message")],M.prototype,"invalidMessage",2),a([E()],M.prototype,"hasFocus",2),a([E()],M.prototype,"showValidStyle",2),a([E()],M.prototype,"showInvalidStyle",2),a([l({type:String,reflect:!0})],M.prototype,"type",2),a([l({type:String,reflect:!0})],M.prototype,"size",2),a([l({type:String,reflect:!0})],M.prototype,"inputmode",2),a([l()],M.prototype,"value",2),a([Lt()],M.prototype,"defaultValue",2),a([l({type:String,reflect:!0})],M.prototype,"placeholder",2),a([l({type:String,reflect:!0})],M.prototype,"label",2),a([l({type:String,attribute:"help-text",reflect:!0})],M.prototype,"helpText",2),a([l({type:Boolean,reflect:!0})],M.prototype,"clearable",2),a([l({type:Boolean,reflect:!0})],M.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],M.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],M.prototype,"readonly",2),a([l({attribute:"password-toggle",type:Boolean,reflect:!0})],M.prototype,"passwordToggle",2),a([l({attribute:"password-visible",type:Boolean,reflect:!0})],M.prototype,"passwordVisible",2),a([l({attribute:"spin-buttons",type:Boolean,reflect:!0})],M.prototype,"spinButtons",2),a([l({type:Number,reflect:!0})],M.prototype,"minlength",2),a([l({type:Number,reflect:!0})],M.prototype,"maxlength",2),a([l({reflect:!0})],M.prototype,"min",2),a([l({reflect:!0})],M.prototype,"max",2),a([l({type:String,reflect:!0})],M.prototype,"form",2),a([l({type:String,reflect:!0})],M.prototype,"name",2),a([l({type:String,reflect:!0})],M.prototype,"title",2),a([l({type:Boolean,reflect:!0})],M.prototype,"required",2),a([l()],M.prototype,"pattern",2),a([l({reflect:!0})],M.prototype,"step",2),a([l({type:String,reflect:!0})],M.prototype,"autocapitalize",2),a([l({type:String,reflect:!0})],M.prototype,"autocorrect",2),a([l({reflect:!0})],M.prototype,"autocomplete",2),a([l({type:Boolean,reflect:!0})],M.prototype,"autofocus",2),a([l({type:String,reflect:!0})],M.prototype,"enterkeyhint",2),a([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],M.prototype,"styleOnValid",2),a([l({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],M.prototype,"spellcheck",2),a([x("disabled",{waitUntilFirstUpdate:!0})],M.prototype,"handleDisabledChange",1),a([x("step",{waitUntilFirstUpdate:!0})],M.prototype,"handleStepChange",1),a([x("value",{waitUntilFirstUpdate:!0})],M.prototype,"handleValueChange",1),M=a([v("sd-input")],M);var $t=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"[default]","icon-left","icon-right");this.standalone=!1;this.size="inherit";this.inverted=!1;this.href="";this.visuallyDisabled=!1}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleClick(t){this.visuallyDisabled&&(t.preventDefault(),t.stopPropagation())}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){let t={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return u`<a part="base" class="${c("inline",this.href&&!this.visuallyDisabled?"cursor-pointer":"",this.visuallyDisabled?"cursor-not-allowed focus-visible:focus-outline":"",{sm:"text-sm",lg:"text-base",inherit:""}[this.size],{disabled:this.inverted?"text-neutral-600":"text-neutral-500",enabled:this.inverted?"text-white hover:text-primary-200 active:text-primary-400 focus-visible:focus-outline-inverted":" text-primary hover:text-primary-500 active:text-primary-800 focus-visible:focus-outline",visuallyDisabled:this.inverted?"text-neutral-600":"text-neutral-500"}[this.href&&!this.visuallyDisabled?"enabled":this.visuallyDisabled?"visuallyDisabled":"disabled"],this.standalone&&"flex items-start")}" href="${w(this.href||void 0)}" target="${w(this.target||void 0)}" download="${w(this.download)}" rel="${w(this.target?"noreferrer noopener":void 0)}" aria-disabled="${!this.href||this.visuallyDisabled?"true":"false"}" tabindex="${this.href?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon-left" part="icon-left" class="${c("inline",t["icon-left"]&&(this.standalone?{sm:"mr-1",lg:"mr-2",inherit:"mr-[0.5em]"}[this.size]:"mr-[0.25em]"))}"></slot><span part="label" class="inline underline underline-offset-2"><slot></slot></span><slot name="icon-right" part="icon-right" class="${c("inline",t["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};$t.styles=[...f.styles,y`::slotted(sd-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-icon){font-size:var(--sd-font-size-base,1rem)}:host([size=lg][standalone]) ::slotted(sd-icon){font-size:var(--sd-font-size-xl,1.5rem)}`],a([g("a")],$t.prototype,"button",2),a([l({type:Boolean,reflect:!0})],$t.prototype,"standalone",2),a([l({type:String,reflect:!0})],$t.prototype,"size",2),a([l({type:Boolean,reflect:!0})],$t.prototype,"inverted",2),a([l({type:String,reflect:!0})],$t.prototype,"href",2),a([l({type:Boolean,attribute:"visually-disabled",reflect:!0})],$t.prototype,"visuallyDisabled",2),a([l({type:String,reflect:!0})],$t.prototype,"target",2),a([l({reflect:!0})],$t.prototype,"download",2),$t=a([v("sd-link")],$t);var Ot=class extends f{constructor(){super(...arguments);this.variant="main";this.state="default";this.animated=!1;this.notInteractive=!1;this.href="";this.label="";this.marker={cluster:`
|
|
129
|
+
" placement="${this.placement}" distance="${this.rounded&&this.distance<1?1:this.distance}" skidding="${this.skidding}" strategy="${this.hoist?"fixed":"absolute"}" ?flip="${!this.noFlip}" shift auto-size="vertical" auto-size-padding="10"><slot name="trigger" slot="anchor" part="trigger" class="block" @click="${this.handleTriggerClick}" @keydown="${this.handleTriggerKeyDown}" @keyup="${this.handleTriggerKeyUp}" @slotchange="${this.handleTriggerSlotChange}"></slot><slot part="panel" class="${c("shadow bg-white block",this.open?"pointer-events-auto":"pointer-events-none",this.rounded&&"rounded-md")}" aria-hidden="${this.open?"false":"true"}" aria-labelledby="dropdown"></slot></sd-popup>`}};rt.styles=[...f.styles,y`:host{display:inline-block}#dropdown::part(popup){z-index:var(--sd-z-index-dropdown,900)}#dropdown[data-current-placement^=top]::part(popup){transform-origin:bottom}#dropdown[data-current-placement^=bottom]::part(popup){transform-origin:top}#dropdown[data-current-placement^=left]::part(popup){transform-origin:right}#dropdown[data-current-placement^=right]::part(popup){transform-origin:left}:host(:not([no-auto-size])) ::slotted(:not([slot=trigger])){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important;overflow:auto}`],a([g("#dropdown")],rt.prototype,"popup",2),a([g("[part=trigger]")],rt.prototype,"trigger",2),a([g("[part=panel]")],rt.prototype,"panel",2),a([l({type:Boolean,reflect:!0})],rt.prototype,"open",2),a([l({type:Boolean,reflect:!0})],rt.prototype,"rounded",2),a([l({type:String,reflect:!0})],rt.prototype,"placement",2),a([l({type:Boolean,reflect:!0})],rt.prototype,"disabled",2),a([l({attribute:"stay-open-on-select",type:Boolean,reflect:!0})],rt.prototype,"stayOpenOnSelect",2),a([l({type:Object})],rt.prototype,"containingElement",2),a([l({type:Number,reflect:!0})],rt.prototype,"distance",2),a([l({type:Number,reflect:!0})],rt.prototype,"skidding",2),a([l({type:Boolean,reflect:!0,attribute:"no-auto-size"})],rt.prototype,"noAutoSize",2),a([l({type:Boolean,reflect:!0,attribute:"no-flip"})],rt.prototype,"noFlip",2),a([l({type:Boolean,reflect:!0})],rt.prototype,"hoist",2),a([x("open",{waitUntilFirstUpdate:!0})],rt.prototype,"handleOpenChange",1),rt=a([v("sd-dropdown")],rt);_("dropdown.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("dropdown.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var Ht=class extends f{constructor(){super(...arguments);this.open=!1;this.inverted=!1;this.localize=new L(this)}updateMaxHeight(){var e;let t=(e=this.contentPreview)==null?void 0:e.scrollHeight.toString();this.style.setProperty("--max-height-pixel",`${t}px`),this.style.setProperty("--max-height",t)}onToggleClick(){this.updateMaxHeight(),this.open=!this.open}async onOpenChange(){if(this.body.classList.add("transitioning"),this.open){this.emit("sd-show"),await R(this.body);let{keyframes:t,options:e}=F(this,"expandable.show",{dir:this.localize.dir()});await B(this.body,he(t,this.body.scrollHeight),e),this.body.style.height="auto",this.updateComplete.then(()=>{this.emit("sd-after-show")})}else{this.emit("sd-hide"),await R(this.body);let{keyframes:t,options:e}=F(this,"expandable.hide",{dir:this.localize.dir()});await B(this.body,he(t,this.body.scrollHeight),e),this.body.style.height="auto",this.updateComplete.then(()=>{this.emit("sd-after-hide")})}this.details.setAttribute("open",this.open.toString()),this.body.classList.remove("transitioning")}async show(){if(!this.open)return this.onToggleClick(),q(this,"sd-after-show")}async hide(){if(this.open)return this.onToggleClick(),q(this,"sd-after-hide")}render(){return u`<div part="base" class="flex flex-col-reverse gap-4"><button part="toggle" class="${c("sd-interactive sd-interactive--reset",this.inverted&&"sd-interactive--inverted",this.inverted?"!focus-visible:focus-outline-inverted":"!focus-visible:focus-outline")}" @click="${this.onToggleClick}" aria-expanded="${this.open}"><div class="${c("h-full justify-center w-full text-base flex items-center toggle")}"><span part="toggle-icon" class="${c("flex items-center mr-2 transition-transform duration-medium ease-in-out",this.open&&"rotate-180")}"><slot name="expand-icon" class="${c(this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="text-xl"></sd-icon></slot><slot name="collapse-icon" class="${c(!this.open&&"hidden")}"><sd-icon library="_internal" name="chevron-down" class="text-xl"></sd-icon></slot></span><slot name="toggle-closed" class="${c(this.open&&"hidden")}">${this.localize.term("showMore")}</slot><slot name="toggle-open" class="${c(!this.open&&"hidden")}">${this.localize.term("showLess")}</slot></div></button><details part="details" ?inert="${w(!this.open)}"><summary part="summary" aria-hidden="true" class="cursor-pointer overflow-hidden list-none"><slot name="clone"></slot></summary><div part="content" class="content content-preview overflow-hidden relative"><slot></slot></div></details></div>`}firstUpdated(){this.cloneContentToLightDOM(),this.details.setAttribute("open",this.open.toString())}cloneContentToLightDOM(){let t=document.createElement("div");t.setAttribute("slot","clone"),Array.from(this.childNodes).forEach(r=>{let o=r.cloneNode(!0);t.appendChild(o)}),this.appendChild(t)}};Ht.styles=[...f.styles,y`:host{--component-expandable-max-block-size:90px;--gradient-height:24px;--gradient:var(--gradient-color-start,hsla(0,0%,100%,0)) 0%,var(--gradient-color-end,#fff) 80%,var(--gradient-color-end,#fff) 100%;display:inline-block;position:relative;width:100%}.toggle::-moz-focus-inner{border-style:none;padding:var(--sd-spacing-0,0)}details>summary::-webkit-details-marker,details[open] summary{display:none}summary{max-block-size:var(--component-expandable-max-block-size)}:host([open]) summary{max-block-size:var(--max-height-pixel,1000vh)}.content{max-block-size:var(--component-expandable-max-block-size)}:host([open]) .content,:host:has(.transitioning) .content{max-block-size:var(--max-height-pixel,1000vh)}.content:after{background:linear-gradient(180deg,var(--gradient));bottom:var(--sd-spacing-0,0);content:" ";display:block;height:var(--gradient-height);left:var(--sd-spacing-0,0);opacity:var(--sd-opacity-0,0);position:absolute;transition-duration:.15s;transition-duration:var(--sd-duration-medium,.3s);transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);width:100%}:host([inverted]){--color-primary-rgb:0,53,142;--gradient-color-start:rgba(var(--color-primary-rgb),0);--gradient-color-end:rgba(var(--color-primary-rgb),1)}:host([inverted]) .content:after{background:var(--gradient-vertical-transparent-primary,linear-gradient(180deg,var(--gradient)))}:host(:not([open])) .content:after{opacity:var(--sd-opacity-100,1)}`],a([g(".content-preview")],Ht.prototype,"contentPreview",2),a([g("details")],Ht.prototype,"details",2),a([g('[part="content"]')],Ht.prototype,"body",2),a([l({type:Boolean,reflect:!0})],Ht.prototype,"open",2),a([l({type:Boolean,reflect:!0})],Ht.prototype,"inverted",2),a([x("open",{waitUntilFirstUpdate:!0})],Ht.prototype,"onOpenChange",1),Ht=a([v("sd-expandable")],Ht);_("expandable.show",{keyframes:[{height:"var(--component-expandable-max-block-size, 90px)"},{height:"auto"}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("expandable.hide",{keyframes:[{height:"auto"},{height:"var(--component-expandable-max-block-size, 90px)"}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var Mt=class extends f{constructor(){super(...arguments);this.flipDirection="horizontal";this.placement="top";this.frontVariant="primary";this.backVariant="primary";this.activeSide="front"}connectedCallback(){super.connectedCallback()}flipFront(){this.activeSide="back",this.front.classList.add("clicked--front"),this.back.classList.add("clicked--back"),this.emit("sd-flip-front"),setTimeout(()=>{this.back.focus()})}flipBack(){this.activeSide="front",this.front.classList.remove("clicked--front"),this.back.classList.remove("clicked--back"),this.emit("sd-flip-back"),setTimeout(()=>{this.front.focus()})}handleFrontKeydown(t){t.code==="Enter"&&this.front===t.target&&this.flipFront()}handleBackKeydown(t){t.code==="Enter"&&this.back===t.target&&this.flipBack()}render(){return u`<div part="base" class="${c("flip-card relative h-full w-full")}"><div part="front" tabindex="0" aria-hidden="${this.activeSide==="back"}" inert="${w(this.activeSide==="back"||void 0)}" class="${c("flip-card__side flip-card__side--front overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.frontVariant==="primary"&&"bg-primary",this.frontVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-front" class="${c("absolute h-full w-full -z-20",(this.frontVariant==="primary"||this.frontVariant==="primary-100")&&"hidden")}"><slot name="media-front"></slot></div><div part="front-slot-container" class="${c("flex",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.frontVariant],{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/75 to-primary-800/60":"bg-gradient-to-b from-primary-800/75 to-primary-800/60"}[this.frontVariant])}"><slot name="front"></slot></div><div part="front-secondary-gradient" class="${c("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-white/0 mb-auto":"bg-gradient-to-t from-white/60 to-white/0 mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-primary-800/0 mt-auto":"bg-gradient-to-b from-primary-800/60 to-primary-800/0 mb-auto"}[this.frontVariant])}"></div><sd-button part="front-button" size="md" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.frontVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.frontVariant]}" class="${c("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipFront}" @keydown="${this.handleFrontKeydown}"><sd-icon library="_internal" name="reload" label="Flip to Back"></sd-icon></sd-button></div><div part="back" tabindex="0" aria-hidden="${this.activeSide==="front"}" inert="${w(this.activeSide==="front"||void 0)}" class="${c("flip-card__side flip-card__side--back overflow-hidden transition-transform duration-1000 ease-in-out","flex focus-visible:focus-outline","absolute top-0 left-0 w-full h-full justify-end text-left",this.backVariant==="primary"&&"bg-primary",this.backVariant==="primary-100"&&"bg-primary-100",this.placement==="top"?"flex-col":"flex-col-reverse",this.flipDirection==="vertical"&&"vertical")}"><div part="media-back" class="${c("absolute h-full w-full -z-20",(this.backVariant==="primary"||this.backVariant==="primary-100")&&"hidden")}"><slot name="media-back"></slot></div><div part="back-slot-container" class="${c("flex",{primary:"text-white","primary-100":"text-black","gradient-light":"text-black","gradient-dark":"text-white"}[this.backVariant],{primary:"","primary-100":"","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/75 to-white/60":"bg-gradient-to-t from-white/75 to-white/60","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/75 to-primary-800/60":"bg-gradient-to-b from-primary-800/75 to-primary-800/60"}[this.backVariant])}"><slot name="back"></slot></div><div part="back-secondary-gradient" class="${c("flip-card__gradient",{primary:"mb-auto","primary-100":"mb-auto","gradient-light":this.placement==="top"?"bg-gradient-to-b from-white/60 to-white/0 mb-auto":"bg-gradient-to-t from-white/60 to-white/0 mt-auto","gradient-dark":this.placement==="bottom"?"bg-gradient-to-t from-primary-800/60 to-primary-800/0 mt-auto":"bg-gradient-to-b from-primary-800/60 to-primary-800/0 mb-auto"}[this.backVariant])}"></div><sd-button size="md" part="back-button" variant="${{primary:"tertiary","primary-100":"tertiary","gradient-light":"primary","gradient-dark":"primary"}[this.backVariant]}" ?inverted="${{primary:!0,"primary-100":!1,"gradient-light":!0,"gradient-dark":!0}[this.backVariant]}" class="${c("absolute right-0 p-2 flex-shrink-0",this.placement==="top"?"bottom-0":"top-0")}" @click="${this.flipBack}" @keydown="${this.handleBackKeydown}"><sd-icon library="_internal" name="reload" label="Flip to Front"></sd-icon></sd-button></div></div>`}};Mt.styles=[...f.styles,y`:host{aspect-ratio:3/4;display:block;--name:"";--height:480px;height:var(--height)}.flip-card{perspective:100rem}.flip-card__side{backface-visibility:hidden}.flip-card__side--back{transform:rotateY(180deg)}.clicked--front{transform:rotateY(-180deg)}.clicked--back{transform:rotateY(0)}.flip-card__side--back.vertical{transform:rotateX(180deg)}.clicked--front.vertical{transform:rotateX(-180deg)}.clicked--back.vertical{transform:rotateX(0)}.flip-card__gradient{flex:.4 1 0}`],a([g('[part="front"]')],Mt.prototype,"front",2),a([g('[part="back"]')],Mt.prototype,"back",2),a([l({reflect:!0,attribute:"flip-direction"})],Mt.prototype,"flipDirection",2),a([l({reflect:!0})],Mt.prototype,"placement",2),a([l({type:String,reflect:!0,attribute:"front-variant"})],Mt.prototype,"frontVariant",2),a([l({type:String,reflect:!0,attribute:"back-variant"})],Mt.prototype,"backVariant",2),a([E()],Mt.prototype,"activeSide",2),Mt=a([v("sd-flipcard")],Mt);var se=class extends f{constructor(){super(...arguments);this.fixed=!1}connectedCallback(){super.connectedCallback(),this.updateCalculatedHeight=this.updateCalculatedHeight.bind(this),this.addResizeObserver=this.addResizeObserver.bind(this),window.addEventListener("resize",this.updateCalculatedHeight)}disconnectedCallback(){super.disconnectedCallback(),window.removeEventListener("resize",this.updateCalculatedHeight)}firstUpdated(){this.updateCalculatedHeight(),this.addResizeObserver()}updated(t){super.updated(t),t.has("fixed")&&this.updateCalculatedHeight()}addResizeObserver(){this.resizeObserver=new ResizeObserver(this.updateCalculatedHeight),this.header&&this.resizeObserver.observe(this.header)}updateCalculatedHeight(){let t=parseFloat(getComputedStyle(document.documentElement).fontSize),e=window.innerHeight/t;this.header&&this.fixed&&e>=32?document.documentElement.style.setProperty("--sd-header-calculated-height",`${this.header.clientHeight}px`):document.documentElement.style.removeProperty("--sd-header-calculated-height")}render(){return u`<header class="w-full bg-white relative" role="banner"><div part="main" class="relative mx-auto my-0 box-border"><slot></slot></div></header>`}};se.styles=[...f.styles,y`:host{display:block;position:relative;z-index:var(--sd-z-index-header,600)}@media (min-height:32rem){:host([fixed]){padding-bottom:var(--sd-header-calculated-height)!important}:host([fixed]) header{left:var(--sd-spacing-0,0);position:fixed;top:var(--sd-spacing-0,0);width:100%}:host([fixed]) header:after{height:var(--sd-spacing-2,.5rem);left:var(--sd-spacing-0,0);position:absolute;right:var(--sd-spacing-0,0);top:100%;--tw-content:"";background:var(--gradient-vertical-black-40-transparent,linear-gradient(0deg,#18181800 50%,#18181866 100%));content:var(--tw-content)}}[part=main]{max-width:var(--sd-header-inner-max-width);padding:var(--sd-header-padding,12px 16px);width:var(--sd-header-inner-width)}`],a([l({reflect:!0,type:Boolean})],se.prototype,"fixed",2),a([g("header")],se.prototype,"header",2),a([oi(100)],se.prototype,"updateCalculatedHeight",1),se=a([v("sd-header")],se);var Zt=class extends f{constructor(){super(...arguments);this.mode="cors";this.allowScripts=!1}executeScript(t){let e=document.createElement("script");[...t.attributes].forEach(r=>e.setAttribute(r.name,r.value)),e.textContent=t.textContent,t.parentNode.replaceChild(e,t)}async handleSrcChange(){try{let t=this.src,e=await Wi(t,this.mode);if(t!==this.src)return;if(!e.ok){this.emit("sd-error",{detail:{status:e.status}});return}this.innerHTML=e.html,this.allowScripts&&[...this.querySelectorAll("script")].forEach(r=>this.executeScript(r)),this.emit("sd-load")}catch(t){this.emit("sd-error",{detail:{status:-1}})}}render(){return u`<slot></slot>`}};Zt.styles=[...f.styles,y`:host{display:block}`],a([l({reflect:!0})],Zt.prototype,"src",2),a([l({type:String,reflect:!0})],Zt.prototype,"mode",2),a([l({attribute:"allow-scripts",type:Boolean,reflect:!0})],Zt.prototype,"allowScripts",2),a([x("src")],Zt.prototype,"handleSrcChange",1),Zt=a([v("sd-include")],Zt);var Si=(s,i)=>{var e;let t=s._$AN;if(t===void 0)return!1;for(let r of t)(e=r._$AO)==null||e.call(r,i,!1),Si(r,i);return!0},fr=s=>{let i,t;do{if((i=s._$AM)===void 0)break;t=i._$AN,t.delete(s),s=i}while((t==null?void 0:t.size)===0)},Ha=s=>{for(let i;i=s._$AM;s=i){let t=i._$AN;if(t===void 0)i._$AN=t=new Set;else if(t.has(s))break;t.add(s),Ul(i)}};function Bl(s){this._$AN!==void 0?(fr(this),this._$AM=s,Ha(this)):this._$AM=s}function Rl(s,i=!1,t=0){let e=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(i)if(Array.isArray(e))for(let o=t;o<e.length;o++)Si(e[o],!1),fr(e[o]);else e!=null&&(Si(e,!1),fr(e));else Si(this,s)}var Ul=s=>{var i,t;s.type==_t.CHILD&&((i=s._$AP)!=null||(s._$AP=Rl),(t=s._$AQ)!=null||(s._$AQ=Bl))},ci=class extends Te{constructor(){super(...arguments),this._$AN=void 0}_$AT(i,t,e){super._$AT(i,t,e),Ha(this),this.isConnected=i._$AU}_$AO(i,t=!0){var e,r;i!==this.isConnected&&(this.isConnected=i,i?(e=this.reconnected)==null||e.call(this):(r=this.disconnected)==null||r.call(this)),t&&(Si(this,i),fr(this))}setValue(i){if(sr(this._$Ct))this._$Ct._$AI(i,this);else{let t=[...this._$Ct._$AH];t[this._$Ci]=i,this._$Ct._$AI(t,this,0)}}disconnected(){}reconnected(){}};var Wr=class extends ci{constructor(t){super(t);this.handlePointerDown=t=>{t.button!==0||this.host.disabled||this.spinOnLongPressCallback(t)};this.handlePointerUp=t=>{t==null||t.preventDefault(),t==null||t.stopPropagation(),this.timeout&&this.callbacks.start(),this.stopSpinningAndCleanUp(),this.callbacks.end(),document.removeEventListener("pointerup",this.handlePointerUp)};if(t.type!==_t.ELEMENT||!(t.element instanceof HTMLButtonElement))throw new Error("The `longPress` directive must be used on an HTMLButtonElement.")}render(t){return N}update(t,[e]){return this.callbacks===void 0&&this.host===void 0&&(this.host=t.element,this.callbacks=P({},e),this.host.addEventListener("pointerdown",this.handlePointerDown)),gt}disconnected(){this.stopSpinningAndCleanUp(),this.host.removeEventListener("pointerdown",this.handlePointerDown),document.removeEventListener("pointerup",this.handlePointerUp)}spinOnLongPressCallback(t){var e;t.preventDefault(),t.stopPropagation(),this.timeout=setTimeout(()=>{this.timeout=void 0,this.interval=setInterval(()=>{this.callbacks.start()},50)},500),document.addEventListener("pointerup",this.handlePointerUp),(e=this.observer)==null||e.disconnect(),this.observer=new MutationObserver(r=>{r.forEach(o=>{o.attributeName==="disabled"&&this.stopSpinningAndCleanUp()})}),this.observer.observe(this.host,{attributes:!0})}stopSpinningAndCleanUp(){var t;clearInterval(this.interval),clearTimeout(this.timeout),(t=this.observer)==null||t.disconnect()}},Zr=qt(Wr);var Ia,Nl=(Ia=navigator.userAgentData)==null?void 0:Ia.brands.some(s=>s.brand.includes("Chromium")),ql=Nl?!1:navigator.userAgent.includes("Firefox"),M=class extends f{constructor(){super(...arguments);this.formControlController=new ot(this);this.hasSlotController=new A(this,"help-text","label","left","right","message","placeholder");this.localize=new L(this);this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.type="text";this.size="lg";this.value="";this.defaultValue="";this.placeholder="";this.label="";this.helpText="";this.clearable=!1;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.passwordToggle=!1;this.passwordVisible=!1;this.spinButtons=!1;this.form="";this.name="";this.title="";this.required=!1;this.styleOnValid=!1;this.spellcheck=!0}get valueAsDate(){var t,e;return(e=(t=this.input)==null?void 0:t.valueAsDate)!=null?e:null}set valueAsDate(t){let e=document.createElement("input");e.type="date",e.valueAsDate=t,this.value=e.value}get valueAsNumber(){var t,e;return(e=(t=this.input)==null?void 0:t.valueAsNumber)!=null?e:parseFloat(this.value)}set valueAsNumber(t){let e=document.createElement("input");e.type="number",e.valueAsNumber=t,this.value=e.value}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.input.value,this.emit("sd-change")}handleClearClick(t){this.value="",this.emit("sd-clear"),this.emit("sd-input"),this.emit("sd-change"),this.input.focus(),t.stopPropagation()}handleSearchClick(t){this.emit("sd-search"),t.stopPropagation()}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.input.value=this.value;return}this.value=this.input.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleKeyDown(t){let e=t.metaKey||t.ctrlKey||t.shiftKey||t.altKey;t.key==="Enter"&&!e&&setTimeout(()=>{!t.defaultPrevented&&!t.isComposing&&this.formControlController.submit()})}handlePasswordToggle(){this.passwordVisible=!this.passwordVisible}isDecrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.min===void 0||this.min===null)return!1;let t=typeof this.min=="string"?parseFloat(this.min):this.min;return this.valueAsNumber<=t}isIncrementDisabled(){if(this.disabled||this.readonly)return!0;if(this.max===void 0||this.max===null)return!1;let t=typeof this.max=="string"?parseFloat(this.max):this.max;return this.valueAsNumber>=t}handleStep(){this.handleInput(),this.input.focus()}handleStepUp(){this.stepUp(),this.handleStep()}handleStepDown(){this.stepDown(),this.handleStep()}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleStepChange(){this.input.step=String(this.step),this.formControlController.updateValidity()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity()}focus(t){this.input.focus(t)}blur(){this.input.blur()}select(){this.input.select()}setSelectionRange(t,e,r="none"){this.input.setSelectionRange(t,e,r)}setRangeText(t,e,r,o){this.input.setRangeText(t,e,r,o),this.value!==this.input.value&&(this.value=this.input.value)}showPicker(){"showPicker"in HTMLInputElement.prototype&&this.input.showPicker()}stepUp(){this.input.stepUp(),this.value!==this.input.value&&(this.value=this.input.value)}stepDown(){this.input.stepDown(),this.value!==this.input.value&&(this.value=this.input.value)}checkValidity(){var t;return(t=this.input)==null?void 0:t.checkValidity()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),description:this.hasSlotController.test("description"),left:this.hasSlotController.test("left"),right:this.hasSlotController.test("right"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,r=this.helpText?!0:!!t.helpText,o=this.clearable&&!this.readonly&&(typeof this.value=="number"||this.value.length>0),n=!!t.tooltip,d=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",h=this.size==="sm"?"text-sm":"text-base",p={disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[d],m=this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",b={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],C={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return u`<div part="form-control" class="${c((this.disabled||this.visuallyDisabled)&&"cursor-not-allowed")}">${e||n?u`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${c(e?"inline-block":"hidden",h)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?u`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c("relative w-full",this.disabled&&"pointer-events-none",this.visuallyDisabled&&"cursor-not-allowed")}"><div part="border" class="${c("absolute w-full h-full pointer-events-none border rounded-default transition-[border] ease-in-out duration-medium hover:duration-fast",p)}"></div><div part="base" class="${c("px-4 flex flex-row items-center rounded-default transition-colors ease-in-out duration-medium hover:duration-fast",this.size==="lg"?"py-2":"py-1",!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",d==="disabled"||d==="visuallyDisabled"?"text-neutral-500":"text-black")}">${t.left?u`<slot name="left" part="left" class="${c("inline-flex",this.size==="sm"?"mr-1":"mr-2",m,C)}"></slot>`:""} <input part="input" id="input" class="${c("min-w-0 flex-grow focus:outline-none bg-transparent",this.visuallyDisabled||this.disabled?"placeholder-neutral-500 cursor-not-allowed":"placeholder-neutral-700",this.size==="sm"?"h-6":"h-8",h)}" type="${this.type==="password"&&this.passwordVisible?"text":this.type}" title="${this.title}" name="${w(this.name)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" placeholder="${w(this.placeholder)}" minlength="${w(this.minlength)}" maxlength="${w(this.maxlength)}" min="${w(this.min)}" max="${w(this.max)}" step="${w(this.step)}" .value="${me(this.value)}" autocapitalize="${w(this.type==="password"?"off":this.autocapitalize)}" autocomplete="${w(this.autocomplete)}" autocorrect="${w(this.type==="password"?"off":this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${this.spellcheck}" pattern="${w(this.pattern)}" enterkeyhint="${w(this.enterkeyhint)}" inputmode="${w(this.inputmode)}" aria-describedby="help-text invalid-message" aria-disabled="${this.visuallyDisabled||this.disabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @keydown="${this.handleKeyDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"> ${o?u`<button part="clear-button" class="${c("flex justify-center",b)}" type="button" aria-label="${this.localize.term("clearEntry")}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${c("text-neutral-700",C)}" library="_internal" name="closing-round"></sd-icon></slot></button>`:""} ${this.passwordToggle&&this.type==="password"?u`<button aria-label="${this.localize.term(this.passwordVisible?"hidePassword":"showPassword")}" part="password-toggle-button" class="${c("flex items-center sd-interactive",b)}" type="button" @click="${this.handlePasswordToggle}">${this.passwordVisible?u`<slot name="show-password-icon"><sd-icon class="${c(m,C)}" library="_internal" name="eye"></sd-icon></slot>`:u`<slot name="hide-password-icon"><sd-icon class="${c(m,C)}" library="_internal" name="eye-crossed-out"></sd-icon></slot>`}</button>`:""} ${(this.type==="date"||this.type==="datetime-local")&&!ql?u`<sd-icon class="${c(m,b,C)}" library="_internal" name="calendar"></sd-icon>`:""} ${this.type==="time"?u`<sd-icon class="${c(m,b,C)}" library="_internal" name="clock"></sd-icon>`:""} ${this.type==="search"?u`<button class="${c("flex items-center sd-interactive",b)}" type="button" @click="${this.handleSearchClick}"><sd-icon class="${c(m,C)}" library="_internal" name="magnifying-glass" label="${this.localize.term("search")}"></sd-icon></button>`:""} ${this.showInvalidStyle?u`<sd-icon part="invalid-icon" class="${c("text-error",b,C)}" library="_internal" name="risk"></sd-icon>`:""} ${this.showValidStyle&&this.styleOnValid?u`<sd-icon class="${c("text-success flex-shrink-0",b,C)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-icon>`:""} ${t.right?u`<slot name="right" part="right" class="${c("inline-flex",m,b,C)}"></slot>`:""} ${this.type==="number"&&this.spinButtons?u`<div part="stepper" class="flex items-center"><button part="decrement-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isDecrementDisabled()}" aria-hidden="true" ${Zr({start:()=>this.handleStepDown(),end:()=>this.handleChange()})} tabindex="-1"><slot name="decrement-number-stepper"><sd-icon name="system/minus-circle" label="Decrease value" class="${c(m,b,C)}"></sd-icon></slot></button> <button part="increment-number-stepper" class="stepper-button flex" type="button" ?disabled="${this.isIncrementDisabled()}" aria-hidden="true" ${Zr({start:()=>this.handleStepUp(),end:()=>this.handleChange()})} tabindex="-1"><slot name="increment-number-stepper"><sd-icon name="system/plus-circle" label="Decrease value" class="${c(m,b,C)}"></sd-icon></slot></button></div>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-1",r?"block":"hidden")}" aria-hidden="${!r}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};M.styles=[...f.styles,y`:host{box-sizing:border-box;display:inline-block;position:relative;text-align:left;width:100%}:host([vertical]){display:block}:host([required]) #label:after{content:" *"}:host([visually-disabled]) input{caret-color:transparent}details summary::-webkit-details-marker{display:none}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}input[type=time]::-webkit-calendar-picker-indicator{background:0 0}details summary::-webkit-details-marker,input[type=date]::-webkit-calendar-picker-indicator,input[type=datetime-local]::-webkit-calendar-picker-indicator,input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration,input[type=search]::-webkit-search-results-button,input[type=search]::-webkit-search-results-decoration{display:none}.stepper-button[disabled] sd-icon{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}`],a([g("#input")],M.prototype,"input",2),a([g("#invalid-message")],M.prototype,"invalidMessage",2),a([E()],M.prototype,"hasFocus",2),a([E()],M.prototype,"showValidStyle",2),a([E()],M.prototype,"showInvalidStyle",2),a([l({type:String,reflect:!0})],M.prototype,"type",2),a([l({type:String,reflect:!0})],M.prototype,"size",2),a([l({type:String,reflect:!0})],M.prototype,"inputmode",2),a([l()],M.prototype,"value",2),a([Lt()],M.prototype,"defaultValue",2),a([l({type:String,reflect:!0})],M.prototype,"placeholder",2),a([l({type:String,reflect:!0})],M.prototype,"label",2),a([l({type:String,attribute:"help-text",reflect:!0})],M.prototype,"helpText",2),a([l({type:Boolean,reflect:!0})],M.prototype,"clearable",2),a([l({type:Boolean,reflect:!0})],M.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],M.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],M.prototype,"readonly",2),a([l({attribute:"password-toggle",type:Boolean,reflect:!0})],M.prototype,"passwordToggle",2),a([l({attribute:"password-visible",type:Boolean,reflect:!0})],M.prototype,"passwordVisible",2),a([l({attribute:"spin-buttons",type:Boolean,reflect:!0})],M.prototype,"spinButtons",2),a([l({type:Number,reflect:!0})],M.prototype,"minlength",2),a([l({type:Number,reflect:!0})],M.prototype,"maxlength",2),a([l({reflect:!0})],M.prototype,"min",2),a([l({reflect:!0})],M.prototype,"max",2),a([l({type:String,reflect:!0})],M.prototype,"form",2),a([l({type:String,reflect:!0})],M.prototype,"name",2),a([l({type:String,reflect:!0})],M.prototype,"title",2),a([l({type:Boolean,reflect:!0})],M.prototype,"required",2),a([l()],M.prototype,"pattern",2),a([l({reflect:!0})],M.prototype,"step",2),a([l({type:String,reflect:!0})],M.prototype,"autocapitalize",2),a([l({type:String,reflect:!0})],M.prototype,"autocorrect",2),a([l({reflect:!0})],M.prototype,"autocomplete",2),a([l({type:Boolean,reflect:!0})],M.prototype,"autofocus",2),a([l({type:String,reflect:!0})],M.prototype,"enterkeyhint",2),a([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],M.prototype,"styleOnValid",2),a([l({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],M.prototype,"spellcheck",2),a([x("disabled",{waitUntilFirstUpdate:!0})],M.prototype,"handleDisabledChange",1),a([x("step",{waitUntilFirstUpdate:!0})],M.prototype,"handleStepChange",1),a([x("value",{waitUntilFirstUpdate:!0})],M.prototype,"handleValueChange",1),M=a([v("sd-input")],M);var $t=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"[default]","icon-left","icon-right");this.standalone=!1;this.size="inherit";this.inverted=!1;this.href="";this.visuallyDisabled=!1}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleClick(t){this.visuallyDisabled&&(t.preventDefault(),t.stopPropagation())}focus(t){this.button.focus(t)}blur(){this.button.blur()}render(){let t={label:this.hasSlotController.test("[default]"),"icon-left":this.hasSlotController.test("icon-left"),"icon-right":this.hasSlotController.test("icon-right")};return u`<a part="base" class="${c("inline",this.href&&!this.visuallyDisabled?"cursor-pointer":"",this.visuallyDisabled?"cursor-not-allowed focus-visible:focus-outline":"",{sm:"text-sm",lg:"text-base",inherit:""}[this.size],{disabled:this.inverted?"text-neutral-600":"text-neutral-500",enabled:this.inverted?"text-white hover:text-primary-200 active:text-primary-400 focus-visible:focus-outline-inverted":" text-primary hover:text-primary-500 active:text-primary-800 focus-visible:focus-outline",visuallyDisabled:this.inverted?"text-neutral-600":"text-neutral-500"}[this.href&&!this.visuallyDisabled?"enabled":this.visuallyDisabled?"visuallyDisabled":"disabled"],this.standalone&&"flex items-start")}" href="${w(this.href||void 0)}" target="${w(this.target||void 0)}" download="${w(this.download)}" rel="${w(this.target?"noreferrer noopener":void 0)}" aria-disabled="${!this.href||this.visuallyDisabled?"true":"false"}" tabindex="${this.href?"0":"-1"}" @blur="${this.handleBlur}" @focus="${this.handleFocus}" @click="${this.handleClick}"><slot name="icon-left" part="icon-left" class="${c("inline",t["icon-left"]&&(this.standalone?{sm:"mr-1",lg:"mr-2",inherit:"mr-[0.5em]"}[this.size]:"mr-[0.25em]"))}"></slot><span part="label" class="inline underline underline-offset-2"><slot></slot></span><slot name="icon-right" part="icon-right" class="${c("inline",t["icon-right"]&&(this.standalone?{sm:"ml-1",lg:"ml-2",inherit:"ml-[0.5em]"}[this.size]:"ml-[0.25em]"))}"></slot></a>`}};$t.styles=[...f.styles,y`::slotted(sd-icon){font-size:1.25em;margin-bottom:-.25em}:host([size=sm][standalone]) ::slotted(sd-icon){font-size:var(--sd-font-size-base,1rem)}:host([size=lg][standalone]) ::slotted(sd-icon){font-size:var(--sd-font-size-xl,1.5rem)}`],a([g("a")],$t.prototype,"button",2),a([l({type:Boolean,reflect:!0})],$t.prototype,"standalone",2),a([l({type:String,reflect:!0})],$t.prototype,"size",2),a([l({type:Boolean,reflect:!0})],$t.prototype,"inverted",2),a([l({type:String,reflect:!0})],$t.prototype,"href",2),a([l({type:Boolean,attribute:"visually-disabled",reflect:!0})],$t.prototype,"visuallyDisabled",2),a([l({type:String,reflect:!0})],$t.prototype,"target",2),a([l({reflect:!0})],$t.prototype,"download",2),$t=a([v("sd-link")],$t);var Ot=class extends f{constructor(){super(...arguments);this.variant="main";this.state="default";this.animated=!1;this.notInteractive=!1;this.href="";this.label="";this.marker={cluster:`
|
|
129
130
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50">
|
|
130
131
|
<circle cx="25" cy="25" opacity="1" r="20" />
|
|
131
132
|
</svg>`,main:`
|
|
@@ -144,9 +145,9 @@ var vr=Object.defineProperty,Ba=Object.defineProperties,Ra=Object.getOwnProperty
|
|
|
144
145
|
removable-indicator:tag__removable-indicator,
|
|
145
146
|
" size="${this.size==="sm"?"sm":"lg"}" removable @keydown="${t=>this.handleTagMaxOptionsKeyDown(t)}" @sd-remove="${t=>this.handleTagRemove(t)}">${this.selectedOptions.length} ${this.localize.term("tagsSelected")}</sd-tag>`]}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleCurrentPlacement(t){let e=t.detail;e&&(this.currentPlacement=e)}handleUseTagsChange(){let t=this.getAllOptions();customElements.get("sd-option")&&t.forEach(e=>{e.checkbox=this.multiple})}handleDisabledChange(){(this.disabled||this.visuallyDisabled)&&(this.open=!1,this.handleOpenChange())}async handleOpenChange(){if(this.open&&(!this.disabled||!this.visuallyDisabled)){this.multiple||this.setCurrentOption(this.selectedOptions[0]||this.getFirstOption()),this.emit("sd-show"),this.addOpenListeners(),await R(this),this.listbox.hidden=!1,this.popup.active=!0,requestAnimationFrame(()=>{this.setCurrentOption(this.currentOption)});let{keyframes:t,options:e}=F(this,"select.show",{dir:this.localize.dir()});await B(this.popup.popup,t,e),this.currentOption&&Kt(this.currentOption,this.listbox,"vertical","auto"),this.emit("sd-after-show")}else{this.emit("sd-hide"),this.removeOpenListeners(),await R(this);let{keyframes:t,options:e}=F(this,"select.hide",{dir:this.localize.dir()});await B(this.popup.popup,t,e),this.listbox.hidden=!0,this.popup.active=!1,this.emit("sd-after-hide")}}applySizeToOptions(){this._optionsInDefaultSlot.forEach(t=>{t.size=this.size})}handleValueChange(){if(this.selectedOptions.length===(Array.isArray(this.value)?this.value.length:1))return;let t=this.getAllOptions(),e=Array.isArray(this.value)?this.value:[this.value];this.setSelectedOptions(t.filter(r=>e.includes(r.value)))}async show(){if(this.open||this.disabled||this.visuallyDisabled){this.open=!1;return}return this.open=!0,q(this,"sd-after-show")}async hide(){if(!this.open||this.disabled){this.open=!1;return}return this.open=!1,q(this,"sd-after-hide")}checkValidity(){var t;return(t=this.valueInput)==null?void 0:t.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.valueInput.reportValidity()}setCustomValidity(t){this.valueInput.setCustomValidity(t),this.formControlController.updateValidity()}focus(t){this.combobox.focus(t)}blur(){this.combobox.blur()}render(){let t={default:this.hasSlotController.test("[default]"),label:this.hasSlotController.test("label"),clearIcon:this.hasSlotController.test("clear-icon"),expandIcon:this.hasSlotController.test("expand-icon"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,r=this.helpText?!0:!!t.helpText,o=this.clearable&&!this.disabled,n=!!t.tooltip,d=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus||this.open?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",h=this.disabled||this.visuallyDisabled?"cursor-not-allowed":"cursor-pointer",p={sm:"ml-1",md:"ml-2",lg:"ml-2"}[this.size],m={sm:"text-base",md:"text-lg",lg:"text-xl"}[this.size];return u`<div part="form-control" class="${c("relative text-left",h,this.size==="sm"?"text-sm":"text-base",this.open&&"z-50")}"><span class="sr-only" aria-live="polite">${this.deletedTagLabel}</span> ${e||n?u`<div class="flex items-center gap-1 mb-2"><label id="label" part="form-control-label" class="${e&&"inline-block"}" aria-hidden="${e?"false":"true"}" @click="${this.handleLabelClick}"><slot name="label">${this.label}</slot></label> ${t.tooltip?u`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c("relative w-full bg-white",d==="disabled"?"text-neutral-500":"text-black")}"><div part="border" class="${c("absolute top-0 w-full h-full pointer-events-none border rounded-default z-10 transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[d],this.open&&(this.currentPlacement==="bottom"?"rounded-bl-none rounded-br-none":"rounded-tl-none rounded-tr-none"))}"></div><sd-popup @sd-current-placement="${this.handleCurrentPlacement}" class="${c("inline-flex relative w-full",this.currentPlacement==="bottom"?"origin-top":"origin-bottom")}" placement="${this.placement}" strategy="${this.hoist?"fixed":"absolute"}" flip sync="width" auto-size="vertical" auto-size-padding="10" exportparts="
|
|
146
147
|
popup:popup__content,
|
|
147
|
-
"><div class="${c("relative w-full h-full grid grid-cols-1 rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200")}" slot="anchor"><div class="${c("input-container flex items-center w-full h-full px-4",{sm:"py-1",md:"py-1",lg:"py-2"}[this.size])}"><input name="${this.name}" form="${this.form}" part="display-input" class="${c("top-0 left-0 appearance-none outline-none flex-grow bg-transparent w-full placeholder-neutral-700",h,this.multiple&&this.useTags&&this.value.length>0?"hidden":"")}" type="text" .disabled="${this.disabled}" placeholder="${this.placeholder||this.localize.term("selectDefaultPlaceholder")}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="help-text invalid-message" role="combobox" tabindex="-1"> ${this.multiple&&this.useTags?u`<div part="tags" class="flex-grow flex flex-wrap items-center gap-1">${this.tags}</div>`:""}<div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(b=>b==null?void 0:b.getTextLabel()).join(", ")}</div><input class="${c("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",h)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${o?u`<button part="clear-button" class="${c("select__clear flex justify-center",p,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${c("text-neutral-700 z-10",m)}" library="_internal" name="closing-round"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?u`<sd-icon part="invalid-icon" class="${c(p,m,"text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?u`<sd-icon part="valid-icon" class="${c("flex-shrink-0 text-success",p,m)}" library="_internal" name="status-check"></sd-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${c("inline-flex ml-2 items-center transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",m)}"><sd-icon name="chevron-down" part="chevron" library="_internal" color="currentColor"></sd-icon></slot></div><button part="combobox" class="${c("relative w-full px-4 flex flex-row items-center rounded-default focus-visible:outline-none",h,this.open&&"shadow transition-shadow duration-medium ease-in-out",{sm:"min-h-[32px]",md:"min-h-[40px]",lg:"min-h-[48px]"}[this.size])}" type="button" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-labelledby="label"></button></div><div id="listbox" role="listbox" aria-expanded="${this.open?"true":"false"}" aria-multiselectable="${this.multiple?"true":"false"}" aria-labelledby="label" part="listbox" class="${c("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow transition-shadow duration-medium ease-in-out",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-popup></div><div class="text-sm text-neutral-700 mt-1" part="form-control-help-text" id="help-text" aria-hidden="${r?"false":"true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};O.styles=[...f.styles,y`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}[part=listbox]{max-height:var(--auto-size-available-height,auto)}.input-container,[part=combobox]{grid-column:1/1;grid-row:1/1}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}`],a([ei({selector:"sd-option"})],O.prototype,"_optionsInDefaultSlot",2),a([g("sd-popup")],O.prototype,"popup",2),a([g('[part="combobox"]')],O.prototype,"combobox",2),a([g('[part="display-input"]')],O.prototype,"displayInput",2),a([g(".value-input")],O.prototype,"valueInput",2),a([g('[part="listbox"]')],O.prototype,"listbox",2),a([g("#invalid-message")],O.prototype,"invalidMessage",2),a([E()],O.prototype,"deletedTagLabel",2),a([E()],O.prototype,"hasFocus",2),a([E()],O.prototype,"currentOption",2),a([E()],O.prototype,"selectedOptions",2),a([E()],O.prototype,"showValidStyle",2),a([E()],O.prototype,"showInvalidStyle",2),a([Lt()],O.prototype,"defaultValue",2),a([l({type:Boolean,reflect:!0})],O.prototype,"open",2),a([l({type:String,reflect:!0})],O.prototype,"size",2),a([l({type:String,reflect:!0})],O.prototype,"placement",2),a([l({type:String,reflect:!0})],O.prototype,"label",2),a([l({type:String,reflect:!0})],O.prototype,"placeholder",2),a([l({type:String,attribute:"max-options-tag-label",reflect:!0})],O.prototype,"maxOptionsTagLabel",2),a([l({type:Boolean,reflect:!0})],O.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],O.prototype,"visuallyDisabled",2),a([l({type:String,attribute:"help-text",reflect:!0})],O.prototype,"helpText",2),a([E()],O.prototype,"currentPlacement",2),a([l({type:Boolean,reflect:!0})],O.prototype,"clearable",2),a([l({type:Boolean,reflect:!0})],O.prototype,"multiple",2),a([l({type:Boolean,reflect:!0})],O.prototype,"useTags",2),a([l({attribute:"max-options-visible",type:Number,reflect:!0})],O.prototype,"maxOptionsVisible",2),a([l({reflect:!0})],O.prototype,"form",2),a([l({reflect:!0})],O.prototype,"name",2),a([l({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],O.prototype,"value",2),a([l({type:Boolean,reflect:!0})],O.prototype,"required",2),a([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],O.prototype,"styleOnValid",2),a([l({type:Boolean,reflect:!0})],O.prototype,"hoist",2),a([l()],O.prototype,"getTag",2),a([x("useTags",{waitUntilFirstUpdate:!0})],O.prototype,"handleUseTagsChange",1),a([x(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],O.prototype,"handleDisabledChange",1),a([x("open",{waitUntilFirstUpdate:!0})],O.prototype,"handleOpenChange",1),a([x("size",{waitUntilFirstUpdate:!0})],O.prototype,"applySizeToOptions",1),a([x("value",{waitUntilFirstUpdate:!0})],O.prototype,"handleValueChange",1),O=a([v("sd-select")],O);_("select.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("select.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var _e=class extends f{constructor(){super(...arguments);this.color="currentColor";this.localize=new L(this)}render(){return u`<svg role="progressbar" viewBox="0 0 24 24" class="${c("animate-spin",{primary:"text-primary",white:"text-white",currentColor:""}[this.color])}" aria-label="${this.localize.term("loading")}"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" class="opacity-20" fill="currentColor"/><mask id="mask0_5273_25391" style="mask-type:alpha" maskUnits="userSpaceOnUse"><path d="M24 12C24 5.37258 18.6274 0 12 0V12H24Z" fill="currentColor"/></mask><g mask="url(#mask0_5273_25391)"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" fill="currentColor"/></g></svg>`}};_e.styles=[...f.styles,y`:host{display:inline-block;height:1em;width:1em}`],a([l({type:String,reflect:!0})],_e.prototype,"color",2),_e=a([v("sd-spinner")],_e);var et=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"label","[default]");this.size="lg";this.orientation="horizontal";this.horizontalInline=!1;this.waiting=!1;this.disabled=!1;this.current=!1;this.noTail=!1;this.notInteractive=!1;this.label="";this.description="";this.index=1;this.href=""}connectedCallback(){super.connectedCallback()}isLink(){return!!this.href}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleCurrentChange(){this.current&&(this.disabled=!1,this.waiting=!1)}handleDisabledChange(){this.disabled&&(this.current=!1,this.waiting=!1)}handleWaitingChange(){this.waiting&&(this.current=!1,this.disabled=!1)}handleInteractivityChange(){this.notInteractive&&(this.current=!1,this.disabled=!1,this.waiting=!1)}render(){let t=this.isLink(),e=this.notInteractive||this.waiting?Z`div`:t?Z`a`:Z`button`,r=this.hasSlotController.test("label"),o=this.label?!0:r,n=this.hasSlotController.test("[default]"),d=this.description?!0:n,h=this.horizontalInline&&this.orientation==="horizontal",p=c("flex shrink-0 gap-2",this.noTail&&!h&&"w-max",this.orientation==="horizontal"?"flex-row":"flex-col items-stretch",h&&"items-start",this.orientation==="horizontal"&&!this.horizontalInline?this.size==="lg"?"translateLg":"translateSm":this.size==="lg"?"mt-1":"mt-3"),m=c("border rounded-full aspect-square circle flex items-center justify-center shrink-0 font-bold select-none",this.disabled?"focus-visible:outline-none cursor-not-allowed":!this.notInteractive&&!this.waiting?"focus-visible:focus-outline hover:cursor-pointer":"",this.notInteractive?this.size==="lg"?"not-interactive-lg":"w-12":this.size==="lg"?"w-12":"w-8",this.disabled&&"border-neutral-500 text-neutral-500",this.waiting&&"border-neutral-400 text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting&&"border-primary hover:bg-primary-100 hover:border-primary-500",this.notInteractive&&"border-neutral-400",this.current&&"bg-accent border-none text-white");return I`<div role="listitem" part="base" class="${c("flex pt-1",this.orientation==="horizontal"?"flex-col w-full":"flex-row gap-4 items-stretch h-full w-full overflow-hidden",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting&&"group")}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"><div part="circle-and-tail-container" class="${p}"><${e} part="circle" href="${w(t?this.href:void 0)}" aria-disabled="${w(this.disabled||this.waiting||void 0)}" aria-current="${this.current?"step":void 0}" aria-labelledby="${w(this.notInteractive||this.waiting||!o?void 0:"label")}" aria-describedby="${w(this.notInteractive||this.waiting||!d?void 0:"description")}" class="${m}"><slot name="circle-content" class="${c("text-lg",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting&&"text-primary hover:text-primary-500 hover:fill-primary-500",this.notInteractive&&"text-primary")}">${!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?I`<sd-icon name="status-check" library="_internal" class="${c(this.size==="sm"&&"text-sm")}"></sd-icon>`:I`${this.index}`}</slot></${e}>${h?I`<div class="${c(!this.noTail&&"flex-1","flex flex-col gap-1")}"><div class="${c("flex w-full",o&&"gap-2",this.size==="sm"&&!d?"mt-1":"mt-3")}">${o&&I`<div part="label" id="label" class="${c("font-bold sd-paragraph whitespace-nowrap",this.disabled&&"text-neutral-500",this.waiting&&"text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?"text-primary":"text-black")}"><slot name="label">${this.label}</slot></div>`} ${this.noTail?"":I`<div part="tail" class="${c("border-t flex-1 mr-2 mt-3",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?"border-primary":"border-neutral-500")}"></div>`}</div>${d?I`<div part="description" id="description" class="${c("sd-paragraph sd-paragraph--size-sm break-words",d?"flex-1":"w-0 h-0 overflow-hidden",d&&!this.noTail&&"pr-4",(this.disabled||this.waiting)&&"!text-neutral-700")}">${this.description||I`<slot></slot>`}</div>`:""}</div>`:this.noTail?"":I`<div part="tail" class="${c(this.orientation==="horizontal"?"border-t w-full my-auto mr-2":"border-l flex-grow flex-shrink-0 basis-auto h-full w-[1px] mx-auto",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?"border-primary":"border-neutral-400")}"></div>`}</div>${h?"":I`<div part="text-container" class="${c("mt-4 break-words flex flex-col gap-2",this.orientation==="horizontal"?"text-center w-40":"text-left",this.disabled&&"text-neutral-500",this.waiting&&"text-neutral-700",this.notInteractive?"ml-2":"mr-4")}"><div part="label" id="label" class="${c("!font-bold sd-paragraph",this.disabled&&"text-neutral-500",this.waiting&&"text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?"text-primary":"text-black")}"><slot name="label">${this.label}</slot></div><div part="description" id="description" class="${c("sd-paragraph sd-paragraph--size-sm",(this.disabled||this.waiting)&&"text-neutral-700")}">${this.description||I`<slot></slot>`}</div></div>`}</div>`}};et.styles=[...f.styles,y`:host{flex:1 1 0%}:host([no-tail]){flex-grow:0}:host([horizontal-inline]):has([part=description]){flex:1 1 0%;min-width:var(--sd-spacing-0,0)}.translateLg{transform:translateX(3.438rem)}.translateSm{transform:translateX(4rem)}.not-interactive-lg{width:4.5rem}`],a([l({type:String,reflect:!0})],et.prototype,"size",2),a([l({type:String,reflect:!0})],et.prototype,"orientation",2),a([l({type:Boolean,reflect:!0,attribute:"horizontal-inline"})],et.prototype,"horizontalInline",2),a([l({type:Boolean,reflect:!0})],et.prototype,"waiting",2),a([l({type:Boolean,reflect:!0})],et.prototype,"disabled",2),a([l({type:Boolean,reflect:!0})],et.prototype,"current",2),a([l({reflect:!0,type:Boolean,attribute:"no-tail"})],et.prototype,"noTail",2),a([l({type:Boolean,reflect:!0,attribute:"not-interactive"})],et.prototype,"notInteractive",2),a([l({type:String,reflect:!0})],et.prototype,"label",2),a([l({type:String,reflect:!0})],et.prototype,"description",2),a([l({type:Number,reflect:!0,attribute:"index"})],et.prototype,"index",2),a([l({type:String,reflect:!0})],et.prototype,"href",2),a([x("current")],et.prototype,"handleCurrentChange",1),a([x("disabled")],et.prototype,"handleDisabledChange",1),a([x("waiting")],et.prototype,"handleWaitingChange",1),a([x("notInteractive")],et.prototype,"handleInteractivityChange",1),et=a([v("sd-step")],et);var xt=class extends f{constructor(){super(...arguments);this.steps=[];this.size="lg";this.orientation="horizontal";this.activeStep=0;this.notInteractive=!1;this.label=""}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.steps=this.getAllSteps(),this.steps[this.steps.length-1].noTail=!0;let t;this.steps.forEach((e,r)=>{e.index=r+1,e.size=this.size,e.orientation=this.orientation,this.notInteractive?(e.current=!1,e.disabled=!1,e.notInteractive=!0):e.current&&(t=r)}),this.setActiveStep(t||this.activeStep)})}updateSize(){this.steps.forEach(t=>{t.size=this.size})}updateOrientation(){this.steps.forEach(t=>{t.orientation=this.orientation})}getAllSteps(){return[...this.body.assignedElements()].filter(t=>t.tagName.toLowerCase()==="sd-step")}setActiveStep(t){t>=0&&t<this.steps.length&&!this.notInteractive&&(this.activeStep=t,this.steps.forEach((e,r)=>{r===t?e.current=!0:r>t?e.waiting=!0:e.current=!1}))}handleInteractivityChange(){this.notInteractive&&this.steps.forEach(t=>{t.current=!1,t.disabled=!1,t.notInteractive=!0})}render(){return u`<div role="${this.notInteractive?"group":"navigation"}" class="h-full" aria-label="${this.label}"><div role="list" part="base" class="${c("flex",this.orientation==="vertical"&&"flex-col h-full")}"><slot part="body"></slot></div></div>`}};xt.styles=[...f.styles,y`:host{width:-moz-max-content;width:max-content}`],a([g("[part=body]")],xt.prototype,"body",2),a([l({type:String,reflect:!0})],xt.prototype,"size",2),a([l({type:String,reflect:!0})],xt.prototype,"orientation",2),a([l({type:Number,reflect:!0,attribute:"active-step"})],xt.prototype,"activeStep",2),a([l({type:Boolean,reflect:!0,attribute:"not-interactive"})],xt.prototype,"notInteractive",2),a([l({type:String,reflect:!0})],xt.prototype,"label",2),a([x("size",{waitUntilFirstUpdate:!0})],xt.prototype,"updateSize",1),a([x("orientation",{waitUntilFirstUpdate:!0})],xt.prototype,"updateOrientation",1),a([x("notInteractive")],xt.prototype,"handleInteractivityChange",1),xt=a([v("sd-step-group")],xt);var nt=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"tooltip");this.formControlController=new ot(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e});this.showInvalidStyle=!1;this.title="";this.name="";this.disabled=!1;this.checked=!1;this.defaultChecked=!1;this.form="";this.required=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(){this.checked=!this.checked,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.formControlController.setValidity(this.disabled)}handleStateChange(){this.input.checked=this.checked,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){return u`<div class="flex flex-row items-center gap-2"><label part="base" class="${c("group flex items-center text-base leading-normal text-black cursor-pointer",this.disabled&&"hover:cursor-not-allowed")}"><input id="input" class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" role="switch" title="${this.title}" name="${this.name}" value="${w(this.value)}" .checked="${me(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.checked?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="invalid-message" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"}" class="${c(`relative flex flex-initial items-center justify-center border rounded-full h-4 w-8 transition-colors ease duration-100
|
|
148
|
+
"><div class="${c("relative w-full h-full grid grid-cols-1 rounded-default transition-colors hover:duration-fast ease-in-out",this.visuallyDisabled||this.disabled?"hover:bg-transparent":"hover:bg-neutral-200")}" slot="anchor"><div class="${c("input-container flex items-center w-full h-full px-4",{sm:"py-1",md:"py-1",lg:"py-2"}[this.size])}"><input name="${this.name}" form="${this.form}" part="display-input" class="${c("top-0 left-0 appearance-none outline-none flex-grow bg-transparent flex-1 placeholder-neutral-700",h,this.multiple&&this.useTags&&this.value.length>0?"hidden":"")}" type="text" .disabled="${this.disabled}" placeholder="${this.placeholder||this.localize.term("selectDefaultPlaceholder")}" .value="${this.displayLabel}" autocomplete="off" spellcheck="false" autocapitalize="off" readonly="readonly" aria-controls="listbox" aria-expanded="${this.open?"true":"false"}" aria-haspopup="listbox" aria-labelledby="label" aria-disabled="${this.disabled||this.visuallyDisabled?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="help-text invalid-message" role="combobox" tabindex="-1"> ${this.multiple&&this.useTags?u`<div part="tags" class="flex-grow flex flex-wrap items-center gap-1">${this.tags}</div>`:""}<div aria-live="polite" id="control-value" class="absolute top-0 left-0 opacity-0 -z-10">${this.selectedOptions.map(b=>b==null?void 0:b.getTextLabel()).join(", ")}</div><input class="${c("value-input absolute top-0 left-0 w-full h-full opacity-0 -z-10",h)}" type="text" ?disabled="${this.disabled}" ?required="${this.required}" .value="${Array.isArray(this.value)?this.value.join(", "):this.value}" tabindex="-1" aria-controls="control-value" aria-hidden="true" @focus="${()=>this.focus()}" @invalid="${this.handleInvalid}"> ${o?u`<button part="clear-button" class="${c("select__clear flex justify-center",p,this.value.length>0?"visible":"invisible")}" type="button" aria-label="${this.localize.term("clearEntry")}" @mousedown="${this.handleClearMouseDown}" @click="${this.handleClearClick}" tabindex="-1"><slot name="clear-icon"><sd-icon class="${c("text-neutral-700 z-10",m)}" library="_internal" name="closing-round"></sd-icon></slot></button>`:""} ${this.showInvalidStyle?u`<sd-icon part="invalid-icon" class="${c(p,m,"text-error")}" library="_internal" name="risk"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?u`<sd-icon part="valid-icon" class="${c("flex-shrink-0 text-success",p,m)}" library="_internal" name="confirm-circle"></sd-icon>`:""}<slot name="expand-icon" part="expand-icon" class="${c("inline-flex ml-2 items-center transition-transform duration-medium ease-in-out",this.open?"rotate-180":"rotate-0",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary",m)}"><sd-icon name="chevron-down" part="chevron" library="_internal" color="currentColor"></sd-icon></slot></div><button part="combobox" class="${c("relative w-full px-4 flex flex-row items-center rounded-default focus-visible:outline-none",h,this.open&&"shadow transition-shadow duration-medium ease-in-out",{sm:"min-h-[32px]",md:"min-h-[40px]",lg:"min-h-[48px]"}[this.size])}" type="button" @keydown="${this.handleComboboxKeyDown}" @mousedown="${this.handleComboboxMouseDown}" @focus="${this.handleFocus}" @blur="${this.handleBlur}" aria-labelledby="label"></button></div><div id="listbox" role="listbox" aria-expanded="${this.open?"true":"false"}" aria-multiselectable="${this.multiple?"true":"false"}" aria-labelledby="label" part="listbox" class="${c("bg-white px-2 py-3 relative border-primary overflow-y-auto",this.open&&"shadow transition-shadow duration-medium ease-in-out",this.currentPlacement==="bottom"?"border-r-2 border-b-2 border-l-2 rounded-br-default rounded-bl-default":"border-r-2 border-t-2 border-l-2 rounded-tr-default rounded-tl-default")}" tabindex="-1" @mouseup="${this.handleOptionClick}" @slotchange="${this.handleDefaultSlotChange}"><slot></slot></div></sd-popup></div><div class="text-sm text-neutral-700 mt-1" part="form-control-help-text" id="help-text" aria-hidden="${r?"false":"true"}"><slot name="help-text">${this.helpText}</slot></div></div>${this.formControlController.renderInvalidMessage()}`}};O.styles=[...f.styles,y`:host{display:block;position:relative;width:100%}:host([required]) #label:after{content:" *"}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}[part=listbox]{max-height:var(--auto-size-available-height,auto)}.input-container,[part=combobox]{grid-column:1/1;grid-row:1/1}sd-popup::part(popup){z-index:var(--sd-z-index-dropdown,900)}sd-tag::part(base){border-radius:var(--sd-border-radius-default,.25rem);padding-left:var(--sd-spacing-1,.25rem);padding-right:var(--sd-spacing-1,.25rem)}sd-tag::part(content){display:inline-block;max-width:var(--tag-max-width,15ch);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}sd-tag[size=lg]::part(base){padding-left:var(--sd-spacing-2,.5rem);padding-right:var(--sd-spacing-2,.5rem)}sd-tag[disabled=false]::part(base):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--tw-bg-opacity,1))}`],a([ei({selector:"sd-option"})],O.prototype,"_optionsInDefaultSlot",2),a([g("sd-popup")],O.prototype,"popup",2),a([g('[part="combobox"]')],O.prototype,"combobox",2),a([g('[part="display-input"]')],O.prototype,"displayInput",2),a([g(".value-input")],O.prototype,"valueInput",2),a([g('[part="listbox"]')],O.prototype,"listbox",2),a([g("#invalid-message")],O.prototype,"invalidMessage",2),a([E()],O.prototype,"deletedTagLabel",2),a([E()],O.prototype,"hasFocus",2),a([E()],O.prototype,"currentOption",2),a([E()],O.prototype,"selectedOptions",2),a([E()],O.prototype,"showValidStyle",2),a([E()],O.prototype,"showInvalidStyle",2),a([Lt()],O.prototype,"defaultValue",2),a([l({type:Boolean,reflect:!0})],O.prototype,"open",2),a([l({type:String,reflect:!0})],O.prototype,"size",2),a([l({type:String,reflect:!0})],O.prototype,"placement",2),a([l({type:String,reflect:!0})],O.prototype,"label",2),a([l({type:String,reflect:!0})],O.prototype,"placeholder",2),a([l({type:String,attribute:"max-options-tag-label",reflect:!0})],O.prototype,"maxOptionsTagLabel",2),a([l({type:Boolean,reflect:!0})],O.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],O.prototype,"visuallyDisabled",2),a([l({type:String,attribute:"help-text",reflect:!0})],O.prototype,"helpText",2),a([E()],O.prototype,"currentPlacement",2),a([l({type:Boolean,reflect:!0})],O.prototype,"clearable",2),a([l({type:Boolean,reflect:!0})],O.prototype,"multiple",2),a([l({type:Boolean,reflect:!0})],O.prototype,"useTags",2),a([l({attribute:"max-options-visible",type:Number,reflect:!0})],O.prototype,"maxOptionsVisible",2),a([l({reflect:!0})],O.prototype,"form",2),a([l({reflect:!0})],O.prototype,"name",2),a([l({converter:{fromAttribute:t=>t.split(" "),toAttribute:t=>t.join(" ")}})],O.prototype,"value",2),a([l({type:Boolean,reflect:!0})],O.prototype,"required",2),a([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],O.prototype,"styleOnValid",2),a([l({type:Boolean,reflect:!0})],O.prototype,"hoist",2),a([l()],O.prototype,"getTag",2),a([x("useTags",{waitUntilFirstUpdate:!0})],O.prototype,"handleUseTagsChange",1),a([x(["disabled","visually-disabled"],{waitUntilFirstUpdate:!0})],O.prototype,"handleDisabledChange",1),a([x("open",{waitUntilFirstUpdate:!0})],O.prototype,"handleOpenChange",1),a([x("size",{waitUntilFirstUpdate:!0})],O.prototype,"applySizeToOptions",1),a([x("value",{waitUntilFirstUpdate:!0})],O.prototype,"handleValueChange",1),O=a([v("sd-select")],O);_("select.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-medium, 300)",easing:"ease-in-out"}});_("select.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var _e=class extends f{constructor(){super(...arguments);this.color="currentColor";this.localize=new L(this)}render(){return u`<svg role="progressbar" viewBox="0 0 24 24" class="${c("animate-spin",{primary:"text-primary",white:"text-white",currentColor:""}[this.color])}" aria-label="${this.localize.term("loading")}"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" class="opacity-20" fill="currentColor"/><mask id="mask0_5273_25391" style="mask-type:alpha" maskUnits="userSpaceOnUse"><path d="M24 12C24 5.37258 18.6274 0 12 0V12H24Z" fill="currentColor"/></mask><g mask="url(#mask0_5273_25391)"><path fill-rule="evenodd" clip-rule="evenodd" d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22ZM24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12Z" fill="currentColor"/></g></svg>`}};_e.styles=[...f.styles,y`:host{display:inline-block;height:1em;width:1em}`],a([l({type:String,reflect:!0})],_e.prototype,"color",2),_e=a([v("sd-spinner")],_e);var et=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"label","[default]");this.size="lg";this.orientation="horizontal";this.horizontalInline=!1;this.waiting=!1;this.disabled=!1;this.current=!1;this.noTail=!1;this.notInteractive=!1;this.label="";this.description="";this.index=1;this.href=""}connectedCallback(){super.connectedCallback()}isLink(){return!!this.href}handleBlur(){this.emit("sd-blur")}handleFocus(){this.emit("sd-focus")}handleCurrentChange(){this.current&&(this.disabled=!1,this.waiting=!1)}handleDisabledChange(){this.disabled&&(this.current=!1,this.waiting=!1)}handleWaitingChange(){this.waiting&&(this.current=!1,this.disabled=!1)}handleInteractivityChange(){this.notInteractive&&(this.current=!1,this.disabled=!1,this.waiting=!1)}render(){let t=this.isLink(),e=this.notInteractive||this.waiting?Z`div`:t?Z`a`:Z`button`,r=this.hasSlotController.test("label"),o=this.label?!0:r,n=this.hasSlotController.test("[default]"),d=this.description?!0:n,h=this.horizontalInline&&this.orientation==="horizontal",p=c("flex shrink-0 gap-2",this.noTail&&!h&&"w-max",this.orientation==="horizontal"?"flex-row":"flex-col items-stretch",h&&"items-start",this.orientation==="horizontal"&&!this.horizontalInline?this.size==="lg"?"translateLg":"translateSm":this.size==="lg"?"mt-1":"mt-3"),m=c("border rounded-full aspect-square circle flex items-center justify-center shrink-0 font-bold select-none",this.disabled?"focus-visible:outline-none cursor-not-allowed":!this.notInteractive&&!this.waiting?"focus-visible:focus-outline hover:cursor-pointer":"",this.notInteractive?this.size==="lg"?"not-interactive-lg":"w-12":this.size==="lg"?"w-12":"w-8",this.disabled&&"border-neutral-500 text-neutral-500",this.waiting&&"border-neutral-400 text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting&&"border-primary hover:bg-primary-100 hover:border-primary-500",this.notInteractive&&"border-neutral-400",this.current&&"bg-accent border-none text-white");return I`<div role="listitem" part="base" class="${c("flex pt-1",this.orientation==="horizontal"?"flex-col w-full":"flex-row gap-4 items-stretch h-full w-full overflow-hidden",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting&&"group")}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"><div part="circle-and-tail-container" class="${p}"><${e} part="circle" href="${w(t?this.href:void 0)}" aria-disabled="${w(this.disabled||this.waiting||void 0)}" aria-current="${this.current?"step":void 0}" aria-labelledby="${w(this.notInteractive||this.waiting||!o?void 0:"label")}" aria-describedby="${w(this.notInteractive||this.waiting||!d?void 0:"description")}" class="${m}"><slot name="circle-content" class="${c("text-lg",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting&&"text-primary hover:text-primary-500 hover:fill-primary-500",this.notInteractive&&"text-primary")}">${!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?I`<sd-icon name="status-check" library="_internal" class="${c(this.size==="sm"&&"text-sm")}"></sd-icon>`:I`${this.index}`}</slot></${e}>${h?I`<div class="${c(!this.noTail&&"flex-1","flex flex-col gap-1")}"><div class="${c("flex w-full",o&&"gap-2",this.size==="sm"&&!d?"mt-1":"mt-3")}">${o&&I`<div part="label" id="label" class="${c("font-bold sd-paragraph whitespace-nowrap",this.disabled&&"text-neutral-500",this.waiting&&"text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?"text-primary":"text-black")}"><slot name="label">${this.label}</slot></div>`} ${this.noTail?"":I`<div part="tail" class="${c("border-t flex-1 mr-2 mt-3",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?"border-primary":"border-neutral-500")}"></div>`}</div>${d?I`<div part="description" id="description" class="${c("sd-paragraph sd-paragraph--size-sm break-words",d?"flex-1":"w-0 h-0 overflow-hidden",d&&!this.noTail&&"pr-4",(this.disabled||this.waiting)&&"!text-neutral-700")}">${this.description||I`<slot></slot>`}</div>`:""}</div>`:this.noTail?"":I`<div part="tail" class="${c(this.orientation==="horizontal"?"border-t w-full my-auto mr-2":"border-l flex-grow flex-shrink-0 basis-auto h-full w-[1px] mx-auto",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?"border-primary":"border-neutral-400")}"></div>`}</div>${h?"":I`<div part="text-container" class="${c("mt-4 break-words flex flex-col gap-2",this.orientation==="horizontal"?"text-center w-40":"text-left",this.disabled&&"text-neutral-500",this.waiting&&"text-neutral-700",this.notInteractive?"ml-2":"mr-4")}"><div part="label" id="label" class="${c("!font-bold sd-paragraph",this.disabled&&"text-neutral-500",this.waiting&&"text-neutral-700",!this.disabled&&!this.current&&!this.notInteractive&&!this.waiting?"text-primary":"text-black")}"><slot name="label">${this.label}</slot></div><div part="description" id="description" class="${c("sd-paragraph sd-paragraph--size-sm",(this.disabled||this.waiting)&&"text-neutral-700")}">${this.description||I`<slot></slot>`}</div></div>`}</div>`}};et.styles=[...f.styles,y`:host{flex:1 1 0%}:host([no-tail]){flex-grow:0}:host([horizontal-inline]):has([part=description]){flex:1 1 0%;min-width:var(--sd-spacing-0,0)}.translateLg{transform:translateX(3.438rem)}.translateSm{transform:translateX(4rem)}.not-interactive-lg{width:4.5rem}`],a([l({type:String,reflect:!0})],et.prototype,"size",2),a([l({type:String,reflect:!0})],et.prototype,"orientation",2),a([l({type:Boolean,reflect:!0,attribute:"horizontal-inline"})],et.prototype,"horizontalInline",2),a([l({type:Boolean,reflect:!0})],et.prototype,"waiting",2),a([l({type:Boolean,reflect:!0})],et.prototype,"disabled",2),a([l({type:Boolean,reflect:!0})],et.prototype,"current",2),a([l({reflect:!0,type:Boolean,attribute:"no-tail"})],et.prototype,"noTail",2),a([l({type:Boolean,reflect:!0,attribute:"not-interactive"})],et.prototype,"notInteractive",2),a([l({type:String,reflect:!0})],et.prototype,"label",2),a([l({type:String,reflect:!0})],et.prototype,"description",2),a([l({type:Number,reflect:!0,attribute:"index"})],et.prototype,"index",2),a([l({type:String,reflect:!0})],et.prototype,"href",2),a([x("current")],et.prototype,"handleCurrentChange",1),a([x("disabled")],et.prototype,"handleDisabledChange",1),a([x("waiting")],et.prototype,"handleWaitingChange",1),a([x("notInteractive")],et.prototype,"handleInteractivityChange",1),et=a([v("sd-step")],et);var xt=class extends f{constructor(){super(...arguments);this.steps=[];this.size="lg";this.orientation="horizontal";this.activeStep=0;this.notInteractive=!1;this.label=""}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.steps=this.getAllSteps(),this.steps[this.steps.length-1].noTail=!0;let t;this.steps.forEach((e,r)=>{e.index=r+1,e.size=this.size,e.orientation=this.orientation,this.notInteractive?(e.current=!1,e.disabled=!1,e.notInteractive=!0):e.current&&(t=r)}),this.setActiveStep(t||this.activeStep)})}updateSize(){this.steps.forEach(t=>{t.size=this.size})}updateOrientation(){this.steps.forEach(t=>{t.orientation=this.orientation})}getAllSteps(){return[...this.body.assignedElements()].filter(t=>t.tagName.toLowerCase()==="sd-step")}setActiveStep(t){t>=0&&t<this.steps.length&&!this.notInteractive&&(this.activeStep=t,this.steps.forEach((e,r)=>{r===t?e.current=!0:r>t?e.waiting=!0:e.current=!1}))}handleInteractivityChange(){this.notInteractive&&this.steps.forEach(t=>{t.current=!1,t.disabled=!1,t.notInteractive=!0})}render(){return u`<div role="${this.notInteractive?"group":"navigation"}" class="h-full" aria-label="${this.label}"><div role="list" part="base" class="${c("flex",this.orientation==="vertical"&&"flex-col h-full")}"><slot part="body"></slot></div></div>`}};xt.styles=[...f.styles,y`:host{width:-moz-max-content;width:max-content}`],a([g("[part=body]")],xt.prototype,"body",2),a([l({type:String,reflect:!0})],xt.prototype,"size",2),a([l({type:String,reflect:!0})],xt.prototype,"orientation",2),a([l({type:Number,reflect:!0,attribute:"active-step"})],xt.prototype,"activeStep",2),a([l({type:Boolean,reflect:!0,attribute:"not-interactive"})],xt.prototype,"notInteractive",2),a([l({type:String,reflect:!0})],xt.prototype,"label",2),a([x("size",{waitUntilFirstUpdate:!0})],xt.prototype,"updateSize",1),a([x("orientation",{waitUntilFirstUpdate:!0})],xt.prototype,"updateOrientation",1),a([x("notInteractive")],xt.prototype,"handleInteractivityChange",1),xt=a([v("sd-step-group")],xt);var nt=class extends f{constructor(){super(...arguments);this.hasSlotController=new A(this,"tooltip");this.formControlController=new ot(this,{value:t=>t.checked?t.value||"on":void 0,defaultValue:t=>t.defaultChecked,setValue:(t,e)=>t.checked=e});this.showInvalidStyle=!1;this.title="";this.name="";this.disabled=!1;this.checked=!1;this.defaultChecked=!1;this.form="";this.required=!1}get validity(){return this.input.validity}firstUpdated(){this.formControlController.updateValidity()}handleClick(){this.checked=!this.checked,this.emit("sd-change")}handleBlur(){this.emit("sd-blur")}handleInput(){this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}handleFocus(){this.emit("sd-focus")}handleDisabledChange(){this.setAttribute("aria-disabled",this.disabled?"true":"false"),this.formControlController.setValidity(this.disabled)}handleStateChange(){this.input.checked=this.checked,this.formControlController.updateValidity()}click(){this.input.click()}focus(t){this.input.focus(t)}blur(){this.input.blur()}checkValidity(){return this.input.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.input.reportValidity()}setCustomValidity(t){this.input.setCustomValidity(t),this.formControlController.updateValidity()}render(){return u`<div class="flex flex-row items-center gap-2"><label part="base" class="${c("group flex items-center text-base leading-normal text-black cursor-pointer",this.disabled&&"hover:cursor-not-allowed")}"><input id="input" class="peer absolute opacity-0 p-0 m-0 pointer-events-none" type="checkbox" role="switch" title="${this.title}" name="${this.name}" value="${w(this.value)}" .checked="${me(this.checked)}" .disabled="${this.disabled}" .required="${this.required}" aria-checked="${this.checked?"true":"false"}" aria-invalid="${this.showInvalidStyle}" aria-describedby="invalid-message" @click="${this.handleClick}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @blur="${this.handleBlur}" @focus="${this.handleFocus}"> <span id="control" part="control ${this.checked?" control--checked":"control--unchecked"}" class="${c(`relative flex flex-initial items-center justify-center border rounded-full h-4 w-8 transition-colors ease duration-100
|
|
148
149
|
peer-focus-visible:outline peer-focus-visible:outline-2 peer-focus-visible:outline-offset-2
|
|
149
|
-
peer-focus-visible:outline-primary transition-colors ease-in-out duration-medium hover:duration-fast`,this.disabled&&this.checked?"border-neutral-500 bg-neutral-500":this.disabled?"border-neutral-500":this.showInvalidStyle?this.checked?"border-error bg-error hover:bg-error-400 hover:border-error-400 group-hover:bg-error-400":"border-error bg-white hover:border-error-400 hover:bg-white group-hover:border-error-400 group-hover:bg-white":this.checked?"border-accent hover:bg-accent-550 bg-accent hover:border-accent-550 group-hover:bg-accent-550":"border-neutral-800 bg-white hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span id="thumb" part="thumb" class="${c("w-2.5 h-2.5 rounded-full transition[transform,colors] ease-in-out duration-medium",this.disabled&&this.checked?"bg-white translate-x-2":this.disabled?"-translate-x-2 bg-neutral-500":this.showInvalidStyle?this.checked?"bg-white translate-x-2":"bg-error -translate-x-2 hover:bg-error-400 hover:border-error-400 group-hover:border-error-400 group-hover:bg-error-400":this.checked?"bg-white translate-x-2":"bg-neutral-800 -translate-x-2")}"></span> </span><span part="label" id="label" class="${c("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.hasSlotController.test("tooltip")?u`<slot name="tooltip"></slot>`:null}</div>${this.formControlController.renderInvalidMessage()}`}};nt.styles=[...f.styles,y`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host([required]) #label:after{content:" *"}`],a([g("input")],nt.prototype,"input",2),a([g("#invalid-message")],nt.prototype,"invalidMessage",2),a([E()],nt.prototype,"showInvalidStyle",2),a([l({type:String,reflect:!0})],nt.prototype,"title",2),a([l({type:String,reflect:!0})],nt.prototype,"name",2),a([l()],nt.prototype,"value",2),a([l({type:Boolean,reflect:!0})],nt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0})],nt.prototype,"checked",2),a([Lt("checked")],nt.prototype,"defaultChecked",2),a([l({reflect:!0})],nt.prototype,"form",2),a([l({type:Boolean,reflect:!0})],nt.prototype,"required",2),a([x("disabled",{waitUntilFirstUpdate:!0})],nt.prototype,"handleDisabledChange",1),a([x(["checked"],{waitUntilFirstUpdate:!0})],nt.prototype,"handleStateChange",1),nt=a([v("sd-switch")],nt);var jl=0,kt=class extends f{constructor(){super(...arguments);this.attrId=++jl;this.componentId=`sd-tab-${this.attrId}`;this.hasSlotController=new A(this,"left");this.localize=new L(this);this.variant="default";this.active=!1;this.disabled=!1;this.visuallyDisabled=!1;this.panel=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false")}focus(t){this.tab.focus(t)}blur(){this.tab.blur()}render(){this.id=this.id.length>0?this.id:this.componentId;let t={left:this.hasSlotController.test("left")};return u`<div part="base" class="${c("inline-flex justify-center min-w-max items-center h-12 px-3 leading-none select-none cursor-pointer group relative","focus-visible:focus-outline outline-2 !-outline-offset-2 transition-all duration-fast ease-in-out",this.variant==="container"&&"tab-container-border bg-white rounded-[4px_4px_0_0]",this.variant==="container"&&this.active&&"tab--active-container-border bg-white",this.disabled||this.visuallyDisabled?"!cursor-not-allowed":"hover:bg-neutral-200",this.active&&"z-20")}" tabindex="${!this.active||this.disabled?"-1":"0"}"><div class="${c("flex h-full items-center justify-center whitespace-nowrap",this.disabled||this.visuallyDisabled&&"opacity-50 ")}"><slot name="left" class="${c(t.left&&"block pr-2",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary")}"></slot><slot class="${c(this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary")}"></slot>${this.variant==="container"?u`<div part="active-tab-indicator" class="${c("absolute bottom-0 h-1 bg-accent w-3/4 bottom-0 group-hover:w-full")}"></div>`:""}<div part="hover-bottom-border" class="${c(!this.active&&!this.disabled&&"absolute bottom-0 left-0 w-full h-0.25 border-b border-transparent group-hover:border-b-neutral-400 transition-[border] duration-fast ease-in-out")}"></div></div></div>`}};kt.styles=[...f.styles,y`:host{box-sizing:border-box;display:inline-block}:host(:hover)::part(hover-bottom-border){--tw-border-opacity:1;border-bottom-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-border-opacity,1))}.tab-container-border:after{border-color:transparent;border-width:1px;--tw-content:""}.tab--active-container-border:after,.tab-container-border:after{content:var(--tw-content);height:100%;position:absolute;width:100%}.tab--active-container-border:after{border-width:1px;--tw-border-opacity:1;border-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-border-opacity,1));transition-duration:.15s;transition-duration:var(--sd-duration-medium,.3s);transition-property:border;transition-timing-function:cubic-bezier(.4,0,.2,1);--tw-content:"";border-bottom:none;border-radius:4px 4px 0 0}[part=active-tab-indicator]{--tw-scale-x:0;--tw-scale-y:0;opacity:var(--sd-opacity-0,0);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-duration:var(--sd-duration-fast,.15s);transition:width var(--sd-duration-fast) ease-in-out,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([active]) [part=active-tab-indicator]{--tw-scale-x:1;--tw-scale-y:1;opacity:var(--sd-opacity-100,1);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition:width var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out}`],a([g("[part=base]")],kt.prototype,"tab",2),a([g("[part=active-tab-indicator]")],kt.prototype,"currentIndicator",2),a([l({type:String,reflect:!0})],kt.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],kt.prototype,"active",2),a([l({type:Boolean,reflect:!0})],kt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],kt.prototype,"visuallyDisabled",2),a([l({type:String,reflect:!0})],kt.prototype,"panel",2),a([x("active")],kt.prototype,"handleActiveChange",1),a([x(["disabled","visually-disabled"])],kt.prototype,"handleDisabledChange",1),kt=a([v("sd-tab")],kt);var ft=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.tabs=[];this.panels=[];this.hasScrollControls=!1;this.variant="default";this.canScroll={left:!1,right:!1};this.activation="auto"}connectedCallback(){let t=Promise.all([customElements.whenDefined("sd-tab"),customElements.whenDefined("sd-tab-panel")]);super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>{this.updateScrollControls(),this.repositionIndicator()}),this.mutationObserver=new MutationObserver(e=>{e.some(r=>!["aria-labelledby","aria-controls"].includes(r.attributeName))&&setTimeout(()=>this.setAriaLabels()),e.some(r=>r.attributeName==="disabled")&&this.syncTabsAndPanels()}),this.updateComplete.then(()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,childList:!0,subtree:!0}),this.resizeObserver.observe(this.nav),this.handleScroll(),this.nav.addEventListener("scroll",()=>this.handleScroll()),t.then(()=>{new IntersectionObserver((r,o)=>{var n;r[0].intersectionRatio>0&&(this.setAriaLabels(),this.setActiveTab((n=this.activeTab)!=null?n:this.tabs[0],{emitEvents:!1}),o.unobserve(r[0].target))}).observe(this.tabGroup)})})}disconnectedCallback(){var t;this.mutationObserver.disconnect(),this.nav&&((t=this.resizeObserver)==null||t.unobserve(this.nav))}getAllTabs(t={includeDisabled:!0}){let e=this.shadowRoot.querySelector('slot[name="nav"]');return Array.from(e.assignedElements()).map(r=>r.tagName.toLocaleLowerCase()==="sd-tab"?r:r.querySelector("sd-tab")).filter(r=>r&&t.includeDisabled?r.tagName.toLowerCase()==="sd-tab":r.tagName.toLowerCase()==="sd-tab"&&!r.disabled)}getAllPanels(){return[...this.body.assignedElements()].filter(t=>t.tagName.toLowerCase()==="sd-tab-panel")}getActiveTab(){return this.tabs.find(t=>t.matches(":focus"))}handleClick(t){let r=t.target.closest("sd-tab");(r==null?void 0:r.closest("sd-tab-group"))===this&&r!==null&&this.setActiveTab(r,{scrollBehavior:"smooth"})}handleKeyDown(t){let r=t.target.closest("sd-tab");if((r==null?void 0:r.closest("sd-tab-group"))===this){if(["Enter"," "].includes(t.key)&&r!==null&&(this.setActiveTab(r,{scrollBehavior:"smooth"}),t.preventDefault()),["Tab"].includes(t.key)){let n=this.tabs.indexOf(this.getActiveTab()),d=this.tabs[n+1];r!==null&&d&&Kt(d,this.nav,"horizontal")}if(["Shift","Tab"].includes(t.key)){let n=this.tabs.indexOf(this.getActiveTab()),d=this.tabs[n-1];r!==null&&d&&Kt(d,this.nav,"horizontal")}if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let n=this.tabs.find(h=>h.matches(":focus")),d=this.localize.dir()==="rtl";if((n==null?void 0:n.tagName.toLowerCase())==="sd-tab"){let h=this.tabs.indexOf(n);t.key==="Home"?h=0:t.key==="End"?h=this.tabs.length-1:t.key===(d?"ArrowRight":"ArrowLeft")||t.key==="ArrowUp"?h--:(t.key===(d?"ArrowLeft":"ArrowRight")||t.key==="ArrowDown")&&h++,h<0&&(h=this.tabs.length-1),h>this.tabs.length-1&&(h=0),this.tabs[h].focus({preventScroll:!0}),this.activation==="auto"&&this.setActiveTab(this.tabs[h],{scrollBehavior:"smooth"}),Kt(this.tabs[h],this.nav,"horizontal"),t.preventDefault()}}}}handleScroll(){this.canScroll={left:this.nav.scrollLeft>0,right:this.nav.scrollLeft+this.nav.clientWidth<this.nav.scrollWidth-1}}handleScrollToStart(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft+this.nav.clientWidth:this.nav.scrollLeft-this.nav.clientWidth,behavior:"smooth"})}handleScrollToEnd(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft-this.nav.clientWidth:this.nav.scrollLeft+this.nav.clientWidth,behavior:"smooth"})}setActiveTab(t,e){if(e=P({emitEvents:!0,scrollBehavior:"auto"},e),t!==this.activeTab&&!t.disabled&&!t.visuallyDisabled){let r=this.activeTab;this.activeTab=t,this.tabs.map(o=>o.active=o===this.activeTab),this.panels.map(o=>{var n;return o.active=o.name===((n=this.activeTab)==null?void 0:n.panel)}),this.repositionIndicator(),Kt(this.activeTab,this.nav,"horizontal",e.scrollBehavior),e.emitEvents&&(r&&this.emit("sd-tab-hide",{detail:{name:r.panel}}),this.emit("sd-tab-show",{detail:{name:this.activeTab.panel}}))}}setAriaLabels(){this.tabs.forEach(t=>{let e=this.panels.find(r=>r.name===t.panel);e&&t.setAttribute("aria-controls",e.getAttribute("id"))})}syncTabsAndPanels(){this.tabs=this.getAllTabs({includeDisabled:!1}),this.panels=this.getAllPanels(),this.repositionIndicator(),this.panels.forEach(t=>{t.tabIndex=0}),this.updateComplete.then(()=>this.updateScrollControls()),this.tabs.length!==0&&this.tabs[0].variant==="container"&&(this.variant="container")}updateScrollControls(){this.hasScrollControls=this.nav.scrollWidth>this.nav.clientWidth}async repositionIndicator(){await this.updateComplete;let t=this.activeTab,e=this.indicator,r=this.tabsContainer;if(!t||!e||!r||t.variant==="container")return;let o=t.getBoundingClientRect(),n=r.getBoundingClientRect(),d=getComputedStyle(r).justifyContent==="center",h=n.left+n.width/2,p=o.left+o.width/2,m=t.offsetWidth,b=d?p-h:o.left-n.left;e.style.width=`${m}px`,e.style.transform=`translateX(${b}px)`}show(t){let e=this.tabs.find(r=>r.panel===t);e&&this.setActiveTab(e,{scrollBehavior:"smooth"})}render(){var e;let t=this.localize.dir()==="rtl";return u`<div part="base" class="${c("flex flex-col rounded-none")}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}"><div part="nav" class="${c(this.hasScrollControls&&"relative py-0 px-12")}">${this.hasScrollControls?u`<button part="scroll-button--start" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" disabled="${w(!this.canScroll.left||void 0)}" class="${c("sd-interactive flex items-center justify-center absolute top-0 bottom-0 left-0 !outline-offset-0 border-b border-neutral-400 z-10",this.localize.dir()==="rtl"&&"left-auto right-0")}" @click="${this.handleScrollToStart}"><sd-icon library="_internal" name="${t?"chevron-up":"chevron-down"}" label="previous" class="${c("h-6 w-12 rotate-90 grid place-items-center")}"></sd-icon></button>`:""}<div part="scroll-container" class="flex overflow-x-auto focus-visible:focus-outline !outline-offset-0"><div part="tabs" class="${c("flex flex-auto relative flex-row")}" role="tablist">${((e=this.activeTab)==null?void 0:e.variant)!=="container"?u`<div part="active-tab-indicator" id="indicator" class="absolute h-1 bg-accent bottom-0 transition-[transform,width] duration-medium ease-in-out z-30"></div>`:""}<div part="separation" class="border-neutral-400 absolute w-full h-0.25 bottom-0 border-b z-10"></div><slot name="nav" @slotchange="${this.syncTabsAndPanels}"></slot></div></div>${this.hasScrollControls?u`<button part="scroll-button--end" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" disabled="${w(!this.canScroll.right||void 0)}" class="${c("sd-interactive flex items-center justify-center absolute top-0 bottom-0 right-0 !outline-offset-0 border-b border-neutral-400 z-10",this.localize.dir()==="rtl"&&"right-auto left-0")}" @click="${this.handleScrollToEnd}"><sd-icon library="_internal" name="${t?"chevron-down":"chevron-up"}" label="next" class="${c("h-6 w-12 rotate-90 grid place-items-center")}"></sd-icon></button>`:""}</div><slot part="body" class="${c("block auto py-8 px-6",this.variant==="container"&&"border border-neutral-400 border-t-0")}" @slotchange="${this.syncTabsAndPanels}"></slot></div>`}};ft.styles=[...f.styles,y`:host{box-sizing:border-box;display:block}[part=scroll-container]{scrollbar-width:none}[part=scroll-container]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}::slotted(sd-tab-panel){--padding:1rem 0}::slotted(sd-tab-panel:focus-visible){outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}`],a([g("[part=base]")],ft.prototype,"tabGroup",2),a([g("[part=body]")],ft.prototype,"body",2),a([g("[part=scroll-container]")],ft.prototype,"nav",2),a([g("[part=active-tab-indicator]")],ft.prototype,"indicator",2),a([g('[part="tabs"]')],ft.prototype,"tabsContainer",2),a([E()],ft.prototype,"hasScrollControls",2),a([E()],ft.prototype,"variant",2),a([E()],ft.prototype,"canScroll",2),a([l({type:String,reflect:!0})],ft.prototype,"activation",2),a([oi(20)],ft.prototype,"handleScroll",1),ft=a([v("sd-tab-group")],ft);var Xl=0,ae=class extends f{constructor(){super(...arguments);this.attrId=++Xl;this.componentId=`sd-tab-panel-${this.attrId}`;this.name="";this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true")}render(){return u`<slot part="base" class="${c("block",this.active&&"tab-panel--active")}"></slot>`}};ae.styles=[...f.styles,y`:host{--padding:0;display:none}:host([active]){display:block}::part(base){padding:var(--padding)}`],a([l({type:String,reflect:!0})],ae.prototype,"name",2),a([l({type:Boolean,reflect:!0})],ae.prototype,"active",2),a([x("active")],ae.prototype,"handleActiveChange",1),ae=a([v("sd-tab-panel")],ae);var It=class extends f{constructor(){super(...arguments);this.variant="white";this.breakpoint=448;this.inset=!1;this.reversedLayout=!1;this.hasSlotController=new A(this,"[default]","media","meta","headline")}connectedCallback(){super.connectedCallback(),this.breakpoint===0?this._orientation="horizontal":this.breakpoint===9999?this._orientation="vertical":window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>this.updateOrientation()),this.resizeObserver.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver&&this.resizeObserver.disconnect()}updated(t){super.updated(t),t.has("breakpoint")&&this.updateOrientation()}updateOrientation(){this._orientation=this.offsetWidth>=this.breakpoint?"horizontal":"vertical"}render(){let t=this.variant==="white border-neutral-400"||this.inset,e={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline")};return u`<div class="${c("flex",{white:"bg-white","white border-neutral-400":"bg-white border border-neutral-400","neutral-100":"bg-neutral-100",primary:"bg-primary text-white","primary-100":"bg-primary-100"}[this.variant],this._orientation==="vertical"&&"flex-col",this._orientation==="horizontal"&&"flex-row gap-8",this._orientation==="horizontal"&&t&&"py-8 px-10")}" part="base"><div style="${this._orientation==="horizontal"?`width: var(--distribution-content, 100%); ${t?"width: var(--distribution-content, calc(100% - 2rem));":""}`:""}" class="${c("flex flex-col text-left order-2",this._orientation==="horizontal"&&"flex flex-col",this._orientation==="vertical"&&t&&"m-4")}" part="content"><div class="flex flex-col-reverse"><div part="headline" class="${c("text-lg font-bold m-0",this.variant==="primary"?"text-white":"text-black")}"><slot name="headline">Always insert one semantically correct heading element here (e. g. <h2>)</slot></div><div part="meta" class="${c("gap-2 mb-4",!e["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div part="main" class="${c(!e["teaser-has-default"]&&"hidden")}" role="group" aria-labelledby="headline"><slot></slot></div></div><div part="media" id="media" style="${this._orientation==="horizontal"?"width: var(--distribution-media, 100%);":""}" class="${c("order-1",!t&&this._orientation==="vertical"&&"mb-4",!e["teaser-has-media"]&&"hidden",this.variant==="white border-neutral-400"&&this._orientation==="vertical"&&"mx-[-1px] mt-[-1px]",this._orientation!=="vertical"&&this.reversedLayout&&"order-2")}"><slot name="media"></slot></div></div>`}};It.styles=[...f.styles,y`:host{display:block}::slotted(*){margin:var(--sd-spacing-0,0)}::slotted([slot=headline]){font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700;margin:var(--sd-spacing-0,0)!important}`],a([l({type:String,reflect:!0})],It.prototype,"variant",2),a([l({reflect:!0,type:Number})],It.prototype,"breakpoint",2),a([l({type:Boolean,reflect:!0})],It.prototype,"inset",2),a([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],It.prototype,"reversedLayout",2),a([g('[part="base"]')],It.prototype,"teaser",2),a([E()],It.prototype,"_orientation",2),It=a([v("sd-teaser")],It);var ye=class extends f{constructor(){super(...arguments);this.variant="white";this.hasSlotController=new A(this,"[default]","media","meta","headline","expandable")}render(){let t={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline"),"teaser-has-expandable":this.hasSlotController.test("expandable")};return u`<div class="relative flex flex-col group" part="base"><div class="absolute flex flex-col justify-end h-full w-full pb-4"><div class="${c("flex-1",this.variant==="gradient-light"&&"bg-gradient-to-t from-white/[.8] to-60%",this.variant==="gradient-dark"&&"bg-gradient-to-t from-primary-800/[.6] to-60%")}"></div><div class="${c({white:"bg-white/[.8] group-hover:bg-white/90","neutral-100":"bg-neutral-100/[.8] group-hover:bg-neutral-100/90",primary:"bg-primary/[.8] text-white group-hover:bg-primary/90","primary-100":"bg-primary-100/[.8] group-hover:bg-primary-100/90","gradient-light":"bg-gradient-to-t from-white/90 to-white/[.8]","gradient-dark":"bg-gradient-to-t from-primary-800/75 to-primary-800/[.6] text-white"}[this.variant])}"><div class="flex-col text-left p-4" part="content"><div class="flex flex-col"><div part="headline" class="text-lg font-bold m-0 order-2"><slot name="headline">Always insert one semantically correct heading element here (e. g. <h2>)</slot></div><div part="meta" class="${c("gap-2 mb-4 order-1",!t["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div class="${c("hidden",t["teaser-has-expandable"]&&"h-[0px] invisible opacity-0 md:[transition:_height_0.2s_linear,opacity_0.1s_linear_0.1s] md:block md:group-hover:h-auto md:group-hover:my-4 md:group-hover:opacity-[100%] md:group-hover:visible")}" part="expandable" aria-hidden="true"><slot name="expandable"></slot></div><div part="main" class="${c(!t["teaser-has-default"]&&"hidden")}"><slot></slot></div></div></div></div><div class="${c("mb-4 -z-10",!t["teaser-has-media"]&&"hidden")}" part="media"><slot name="media"></slot></div></div>`}};ye.styles=[...f.styles,y`:host{display:block}::slotted(*){margin:var(--sd-spacing-0,0)}::slotted([slot=headline]){font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700;margin:var(--sd-spacing-0,0)!important}:host([variant=white]) .background:focus-within{background-color:rgb(var(--sd-color-white,255 255 255)/var(--sd-opacity-90,.9))}:host([variant=neutral-100]) .background:focus-within{background-color:rgb(var(--sd-color-neutral-100,246 246 246)/var(--sd-opacity-90,.9))}:host([variant=primary]) .background:focus-within{background-color:rgb(var(--sd-color-primary,0 53 142)/var(--sd-opacity-90,.9))}:host([variant=primary-100]) .background:focus-within{background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--sd-opacity-90,.9))}`],a([l({type:String,reflect:!0})],ye.prototype,"variant",2),a([g('[part="base"]')],ye.prototype,"teaserMedia",2),ye=a([v("sd-teaser-media")],ye);var H=class extends f{constructor(){super(...arguments);this.formControlController=new ot(this);this.hasSlotController=new A(this,"help-text","label");this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.title="";this.name="";this.value="";this.size="lg";this.label="";this.helpText="";this.placeholder="";this.rows=4;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.form="";this.required=!1;this.styleOnValid=!1;this.spellcheck=!0;this.defaultValue=""}get validity(){return this.textarea.validity}get validationMessage(){return this.textarea.validationMessage}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.setTextareaHeight()})}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.textarea.value,this.setTextareaHeight(),this.emit("sd-change")}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.textarea.value=this.value;return}this.value=this.textarea.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}setTextareaHeight(){this.textarea.style.height=void 0}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}focus(t){this.textarea.focus(t)}blur(){this.textarea.blur()}select(){this.textarea.select()}scrollPosition(t){if(t){typeof t.top=="number"&&(this.textarea.scrollTop=t.top),typeof t.left=="number"&&(this.textarea.scrollLeft=t.left);return}return{top:this.textarea.scrollTop,left:this.textarea.scrollTop}}setSelectionRange(t,e,r="none"){this.textarea.setSelectionRange(t,e,r)}setRangeText(t,e,r,o){this.textarea.setRangeText(t,e,r,o),this.value!==this.textarea.value&&(this.value=this.textarea.value),this.value!==this.textarea.value&&(this.value=this.textarea.value,this.setTextareaHeight())}checkValidity(){var t;return(t=this.textarea)==null?void 0:t.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.textarea.reportValidity()}setCustomValidity(t){this.textarea.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,r=this.helpText?!0:!!t.helpText,o=!!t.tooltip,n=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",d=this.size==="sm"?"text-sm":"text-base",h={sm:"text-base top-1",md:"text-lg top-2",lg:"text-xl top-2"}[this.size];return u`<div part="form-control" class="flex flex-col h-full text-left">${e||o?u`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${c(e?"inline-block":"hidden",d)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?u`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c("relative h-full w-full",this.disabled&&"cursor-not-allowed")}"><div part="border" class="${c("absolute w-full h-full pointer-events-none border rounded-default transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[n])}"></div><div part="base" class="${c("textarea h-full flex items-top rounded-default group transition-colors duration-medium hover:duration-fast ease-in-out",{sm:"textarea-sm",md:"textarea-md",lg:"textarea-lg"}[this.size],!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",n==="disabled"||n==="visuallyDisabled"?"text-neutral-500":"text-black")}"><textarea part="textarea" id="input" class="${c("ps-4 flex-grow focus:outline-none bg-transparent placeholder-neutral-700 resize-none group-has-[sd-icon]:pe-8",{sm:"py-1",md:"py-1",lg:"py-2"}[this.size],this.disabled&&"cursor-not-allowed",d)}" title="${this.title}" name="${w(this.name)}" .value="${me(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" ?visually-disabled="${this.visuallyDisabled}" placeholder="${w(this.placeholder)}" minlength="${w(this.minlength)}" maxlength="${w(this.maxlength)}" rows="${w(this.rows)}" autocapitalize="${w(this.autocapitalize)}" autocorrect="${w(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${w(this.spellcheck)}" enterkeyhint="${w(this.enterkeyhint)}" inputmode="${w(this.inputmode)}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle?u`<sd-icon class="${c("text-error absolute right-4 pointer-events-none",h)}" library="_internal" name="risk" part="invalid-icon"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?u`<sd-icon class="${c("text-success absolute right-4 pointer-events-none",h)}" library="_internal" name="status-check" part="valid-icon"></sd-icon>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-1",r?"block":"hidden")}" aria-hidden="${r?"false":"true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};H.styles=[...f.styles,y`:host{display:block;height:100%}:host textarea{scrollbar-gutter:stable}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([required]) #label:after{content:" *"}:host([visually-disabled]) textarea{caret-color:transparent}.no-scrollbar::-webkit-scrollbar{display:none}`],a([g("#input")],H.prototype,"textarea",2),a([g("#invalid-message")],H.prototype,"invalidMessage",2),a([E()],H.prototype,"hasFocus",2),a([E()],H.prototype,"showValidStyle",2),a([E()],H.prototype,"showInvalidStyle",2),a([l({type:String,reflect:!0})],H.prototype,"title",2),a([l({type:String,reflect:!0})],H.prototype,"name",2),a([l()],H.prototype,"value",2),a([l({type:String,reflect:!0})],H.prototype,"size",2),a([l({type:String,reflect:!0})],H.prototype,"label",2),a([l({type:String,attribute:"help-text",reflect:!0})],H.prototype,"helpText",2),a([l({type:String,reflect:!0})],H.prototype,"placeholder",2),a([l({type:Number,reflect:!0})],H.prototype,"rows",2),a([l({type:Boolean,reflect:!0})],H.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],H.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],H.prototype,"readonly",2),a([l({type:String,reflect:!0})],H.prototype,"form",2),a([l({type:Boolean,reflect:!0})],H.prototype,"required",2),a([l({type:Number,reflect:!0})],H.prototype,"minlength",2),a([l({type:Number,reflect:!0})],H.prototype,"maxlength",2),a([l({type:String,reflect:!0})],H.prototype,"autocapitalize",2),a([l({type:String,reflect:!0})],H.prototype,"autocorrect",2),a([l({reflect:!0})],H.prototype,"autocomplete",2),a([l({type:Boolean,reflect:!0})],H.prototype,"autofocus",2),a([l({type:String,reflect:!0})],H.prototype,"enterkeyhint",2),a([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],H.prototype,"styleOnValid",2),a([l({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],H.prototype,"spellcheck",2),a([l({type:String,reflect:!0})],H.prototype,"inputmode",2),a([Lt()],H.prototype,"defaultValue",2),a([x("disabled",{waitUntilFirstUpdate:!0})],H.prototype,"handleDisabledChange",1),a([x("rows",{waitUntilFirstUpdate:!0})],H.prototype,"handleRowsChange",1),a([x("value",{waitUntilFirstUpdate:!0})],H.prototype,"handleValueChange",1),H=a([v("sd-textarea")],H);var lt=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.hasSlotController=new A(this,"[default]","content");this.size="lg";this.content="";this.placement="top";this.disabled=!1;this.open=!1;this.trigger="click focus";this.hoist=!1;this.handleMouseInteraction=()=>{this.interactionType="mouse"};this.handleKeyboardInteraction=()=>{this.interactionType="keyboard"}}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),document.addEventListener("mousedown",this.handleMouseInteraction),document.addEventListener("keydown",this.handleKeyboardInteraction),this.updateComplete.then(()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)})}firstUpdated(){this.body.hidden=!this.open,this.formatDefaultSlot(this.defaultSlot),this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("mousedown",this.handleMouseInteraction),document.removeEventListener("keydown",this.handleKeyboardInteraction)}get hasCustomTrigger(){return this.hasSlotController.test("[default]")}formatDefaultSlot(t){if(!t)return;t.assignedNodes({flatten:!0}).forEach(r=>{var o,n;r.nodeType===Node.TEXT_NODE&&!((o=r==null?void 0:r.textContent)!=null&&o.trim())&&((n=r==null?void 0:r.parentNode)==null||n.removeChild(r))})}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){this.hasTrigger("click")&&(this.open?this.hide():this.show())}handleFocus(){this.hasTrigger("focus")&&this.interactionType==="keyboard"&&this.show()}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){let t=ii(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),t)}}handleMouseOut(){if(this.hasTrigger("hover")){let t=ii(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),t)}}hasTrigger(t){return this.trigger.split(" ").includes(t)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await R(this.body),this.body.hidden=!1,this.popup.active=!0;let{keyframes:t,options:e}=F(this,"tooltip.show",{dir:this.localize.dir()});await B(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),await R(this.body);let{keyframes:t,options:e}=F(this,"tooltip.hide",{dir:this.localize.dir()});await B(this.popup.popup,t,e),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,this.trigger==="click"||this.trigger==="click focus"?this.focus():this.blur(),q(this,"sd-after-hide")}render(){let t=this.placement.endsWith("-start"),e=this.placement.endsWith("-end");return u`<sd-popup part="base" exportparts="
|
|
150
|
+
peer-focus-visible:outline-primary transition-colors ease-in-out duration-medium hover:duration-fast`,this.disabled&&this.checked?"border-neutral-500 bg-neutral-500":this.disabled?"border-neutral-500":this.showInvalidStyle?this.checked?"border-error bg-error hover:bg-error-400 hover:border-error-400 group-hover:bg-error-400":"border-error bg-white hover:border-error-400 hover:bg-white group-hover:border-error-400 group-hover:bg-white":this.checked?"border-accent hover:bg-accent-550 bg-accent hover:border-accent-550 group-hover:bg-accent-550":"border-neutral-800 bg-white hover:bg-neutral-200 group-hover:bg-neutral-200")}"><span id="thumb" part="thumb" class="${c("w-2.5 h-2.5 rounded-full transition[transform,colors] ease-in-out duration-medium",this.disabled&&this.checked?"bg-white translate-x-2":this.disabled?"-translate-x-2 bg-neutral-500":this.showInvalidStyle?this.checked?"bg-white translate-x-2":"bg-error -translate-x-2 hover:bg-error-400 hover:border-error-400 group-hover:border-error-400 group-hover:bg-error-400":this.checked?"bg-white translate-x-2":"bg-neutral-800 -translate-x-2")}"></span> </span><span part="label" id="label" class="${c("select-none inline-block ml-2",this.disabled?"text-neutral-500":this.showInvalidStyle?"text-error":"text-black")}"><slot></slot></span></label> ${this.hasSlotController.test("tooltip")?u`<slot name="tooltip"></slot>`:null}</div>${this.formControlController.renderInvalidMessage()}`}};nt.styles=[...f.styles,y`:host{display:block;width:-moz-max-content;width:max-content}:host(:focus-visible){outline:2px solid transparent;outline-offset:2px}:host([required]) #label:after{content:" *"}`],a([g("input")],nt.prototype,"input",2),a([g("#invalid-message")],nt.prototype,"invalidMessage",2),a([E()],nt.prototype,"showInvalidStyle",2),a([l({type:String,reflect:!0})],nt.prototype,"title",2),a([l({type:String,reflect:!0})],nt.prototype,"name",2),a([l()],nt.prototype,"value",2),a([l({type:Boolean,reflect:!0})],nt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0})],nt.prototype,"checked",2),a([Lt("checked")],nt.prototype,"defaultChecked",2),a([l({reflect:!0})],nt.prototype,"form",2),a([l({type:Boolean,reflect:!0})],nt.prototype,"required",2),a([x("disabled",{waitUntilFirstUpdate:!0})],nt.prototype,"handleDisabledChange",1),a([x(["checked"],{waitUntilFirstUpdate:!0})],nt.prototype,"handleStateChange",1),nt=a([v("sd-switch")],nt);var jl=0,kt=class extends f{constructor(){super(...arguments);this.attrId=++jl;this.componentId=`sd-tab-${this.attrId}`;this.hasSlotController=new A(this,"left");this.localize=new L(this);this.variant="default";this.active=!1;this.disabled=!1;this.visuallyDisabled=!1;this.panel=""}connectedCallback(){super.connectedCallback(),this.setAttribute("role","tab")}handleActiveChange(){this.setAttribute("aria-selected",this.active?"true":"false")}handleDisabledChange(){let t=this.disabled||this.visuallyDisabled;this.setAttribute("aria-disabled",t?"true":"false")}focus(t){this.tab.focus(t)}blur(){this.tab.blur()}render(){this.id=this.id.length>0?this.id:this.componentId;let t={left:this.hasSlotController.test("left")};return u`<div part="base" class="${c("inline-flex justify-center min-w-max items-center h-12 px-3 leading-none select-none cursor-pointer group relative","focus-visible:focus-outline outline-2 !-outline-offset-2 transition-all duration-fast ease-in-out",this.variant==="container"&&"tab-container-border bg-white rounded-[4px_4px_0_0]",this.variant==="container"&&this.active&&"tab--active-container-border bg-white",this.disabled||this.visuallyDisabled?"!cursor-not-allowed":"hover:bg-neutral-200",this.active&&"z-20")}" tabindex="${!this.active||this.disabled?"-1":"0"}"><div class="${c("flex h-full items-center justify-center whitespace-nowrap",this.disabled||this.visuallyDisabled&&"opacity-50 ")}"><slot name="left" class="${c(t.left&&"block pr-2",this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary")}"></slot><slot class="${c(this.disabled||this.visuallyDisabled?"text-neutral-500":"text-primary")}"></slot>${this.variant==="container"?u`<div part="active-tab-indicator" class="${c("absolute bottom-0 h-1 bg-accent w-3/4 bottom-0 group-hover:w-full")}"></div>`:""}<div part="hover-bottom-border" class="${c(!this.active&&!this.disabled&&"absolute bottom-0 left-0 w-full h-0.25 border-b border-transparent group-hover:border-b-neutral-400 transition-[border] duration-fast ease-in-out")}"></div></div></div>`}};kt.styles=[...f.styles,y`:host{box-sizing:border-box;display:inline-block}:host(:hover)::part(hover-bottom-border){--tw-border-opacity:1;border-bottom-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-border-opacity,1))}.tab-container-border:after{border-color:transparent;border-width:1px;--tw-content:""}.tab--active-container-border:after,.tab-container-border:after{content:var(--tw-content);height:100%;position:absolute;width:100%}.tab--active-container-border:after{border-width:1px;--tw-border-opacity:1;border-color:rgb(var(--sd-color-neutral-400,195 195 195)/var(--tw-border-opacity,1));transition-duration:.15s;transition-duration:var(--sd-duration-medium,.3s);transition-property:border;transition-timing-function:cubic-bezier(.4,0,.2,1);--tw-content:"";border-bottom:none;border-radius:4px 4px 0 0}[part=active-tab-indicator]{--tw-scale-x:0;--tw-scale-y:0;opacity:var(--sd-opacity-0,0);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-duration:var(--sd-duration-fast,.15s);transition:width var(--sd-duration-fast) ease-in-out,opacity var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out var(--sd-duration-fast)}:host([active]) [part=active-tab-indicator]{--tw-scale-x:1;--tw-scale-y:1;opacity:var(--sd-opacity-100,1);transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition:width var(--sd-duration-fast) ease-in-out,transform var(--sd-duration-fast) ease-in-out}`],a([g("[part=base]")],kt.prototype,"tab",2),a([g("[part=active-tab-indicator]")],kt.prototype,"currentIndicator",2),a([l({type:String,reflect:!0})],kt.prototype,"variant",2),a([l({type:Boolean,reflect:!0})],kt.prototype,"active",2),a([l({type:Boolean,reflect:!0})],kt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],kt.prototype,"visuallyDisabled",2),a([l({type:String,reflect:!0})],kt.prototype,"panel",2),a([x("active")],kt.prototype,"handleActiveChange",1),a([x(["disabled","visually-disabled"])],kt.prototype,"handleDisabledChange",1),kt=a([v("sd-tab")],kt);var ft=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.tabs=[];this.panels=[];this.hasScrollControls=!1;this.variant="default";this.canScroll={left:!1,right:!1};this.activation="auto"}connectedCallback(){let t=Promise.all([customElements.whenDefined("sd-tab"),customElements.whenDefined("sd-tab-panel")]);super.connectedCallback(),this.resizeObserver=new ResizeObserver(()=>{this.updateScrollControls(),this.repositionIndicator()}),this.mutationObserver=new MutationObserver(e=>{e.some(r=>!["aria-labelledby","aria-controls"].includes(r.attributeName))&&setTimeout(()=>this.setAriaLabels()),e.some(r=>r.attributeName==="disabled")&&this.syncTabsAndPanels()}),this.updateComplete.then(()=>{this.syncTabsAndPanels(),this.mutationObserver.observe(this,{attributes:!0,childList:!0,subtree:!0}),this.resizeObserver.observe(this.nav),this.handleScroll(),this.nav.addEventListener("scroll",()=>this.handleScroll()),t.then(()=>{new IntersectionObserver((r,o)=>{var n;r[0].intersectionRatio>0&&(this.setAriaLabels(),this.setActiveTab((n=this.activeTab)!=null?n:this.tabs[0],{emitEvents:!1}),o.unobserve(r[0].target))}).observe(this.tabGroup)})})}disconnectedCallback(){var t;this.mutationObserver.disconnect(),this.nav&&((t=this.resizeObserver)==null||t.unobserve(this.nav))}getAllTabs(t={includeDisabled:!0}){let e=this.shadowRoot.querySelector('slot[name="nav"]');return Array.from(e.assignedElements()).map(r=>r.tagName.toLocaleLowerCase()==="sd-tab"?r:r.querySelector("sd-tab")).filter(r=>r&&t.includeDisabled?r.tagName.toLowerCase()==="sd-tab":r.tagName.toLowerCase()==="sd-tab"&&!r.disabled)}getAllPanels(){return[...this.body.assignedElements()].filter(t=>t.tagName.toLowerCase()==="sd-tab-panel")}getActiveTab(){return this.tabs.find(t=>t.matches(":focus"))}handleClick(t){let r=t.target.closest("sd-tab");(r==null?void 0:r.closest("sd-tab-group"))===this&&r!==null&&this.setActiveTab(r,{scrollBehavior:"smooth"})}handleKeyDown(t){let r=t.target.closest("sd-tab");if((r==null?void 0:r.closest("sd-tab-group"))===this){if(["Enter"," "].includes(t.key)&&r!==null&&(this.setActiveTab(r,{scrollBehavior:"smooth"}),t.preventDefault()),["Tab"].includes(t.key)){let n=this.tabs.indexOf(this.getActiveTab()),d=this.tabs[n+1];r!==null&&d&&Kt(d,this.nav,"horizontal")}if(["Shift","Tab"].includes(t.key)){let n=this.tabs.indexOf(this.getActiveTab()),d=this.tabs[n-1];r!==null&&d&&Kt(d,this.nav,"horizontal")}if(["ArrowLeft","ArrowRight","ArrowUp","ArrowDown","Home","End"].includes(t.key)){let n=this.tabs.find(h=>h.matches(":focus")),d=this.localize.dir()==="rtl";if((n==null?void 0:n.tagName.toLowerCase())==="sd-tab"){let h=this.tabs.indexOf(n);t.key==="Home"?h=0:t.key==="End"?h=this.tabs.length-1:t.key===(d?"ArrowRight":"ArrowLeft")||t.key==="ArrowUp"?h--:(t.key===(d?"ArrowLeft":"ArrowRight")||t.key==="ArrowDown")&&h++,h<0&&(h=this.tabs.length-1),h>this.tabs.length-1&&(h=0),this.tabs[h].focus({preventScroll:!0}),this.activation==="auto"&&this.setActiveTab(this.tabs[h],{scrollBehavior:"smooth"}),Kt(this.tabs[h],this.nav,"horizontal"),t.preventDefault()}}}}handleScroll(){this.canScroll={left:this.nav.scrollLeft>0,right:this.nav.scrollLeft+this.nav.clientWidth<this.nav.scrollWidth-1}}handleScrollToStart(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft+this.nav.clientWidth:this.nav.scrollLeft-this.nav.clientWidth,behavior:"smooth"})}handleScrollToEnd(){this.nav.scroll({left:this.localize.dir()==="rtl"?this.nav.scrollLeft-this.nav.clientWidth:this.nav.scrollLeft+this.nav.clientWidth,behavior:"smooth"})}setActiveTab(t,e){if(e=P({emitEvents:!0,scrollBehavior:"auto"},e),t!==this.activeTab&&!t.disabled&&!t.visuallyDisabled){let r=this.activeTab;this.activeTab=t,this.tabs.map(o=>o.active=o===this.activeTab),this.panels.map(o=>{var n;return o.active=o.name===((n=this.activeTab)==null?void 0:n.panel)}),this.repositionIndicator(),Kt(this.activeTab,this.nav,"horizontal",e.scrollBehavior),e.emitEvents&&(r&&this.emit("sd-tab-hide",{detail:{name:r.panel}}),this.emit("sd-tab-show",{detail:{name:this.activeTab.panel}}))}}setAriaLabels(){this.tabs.forEach(t=>{let e=this.panels.find(r=>r.name===t.panel);e&&t.setAttribute("aria-controls",e.getAttribute("id"))})}syncTabsAndPanels(){this.tabs=this.getAllTabs({includeDisabled:!1}),this.panels=this.getAllPanels(),this.repositionIndicator(),this.panels.forEach(t=>{t.tabIndex=0}),this.updateComplete.then(()=>this.updateScrollControls()),this.tabs.length!==0&&this.tabs[0].variant==="container"&&(this.variant="container")}updateScrollControls(){this.hasScrollControls=this.nav.scrollWidth>this.nav.clientWidth}async repositionIndicator(){await this.updateComplete;let t=this.activeTab,e=this.indicator,r=this.tabsContainer;if(!t||!e||!r||t.variant==="container")return;let o=t.getBoundingClientRect(),n=r.getBoundingClientRect(),d=getComputedStyle(r).justifyContent==="center",h=n.left+n.width/2,p=o.left+o.width/2,m=t.offsetWidth,b=d?p-h:o.left-n.left;e.style.width=`${m}px`,e.style.transform=`translateX(${b}px)`}show(t){let e=this.tabs.find(r=>r.panel===t);e&&this.setActiveTab(e,{scrollBehavior:"smooth"})}render(){var e;let t=this.localize.dir()==="rtl";return u`<div part="base" class="${c("flex flex-col rounded-none")}" @click="${this.handleClick}" @keydown="${this.handleKeyDown}"><div part="nav" class="${c(this.hasScrollControls&&"relative py-0 px-12")}">${this.hasScrollControls?u`<button part="scroll-button--start" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" disabled="${w(!this.canScroll.left||void 0)}" class="${c("sd-interactive flex items-center justify-center absolute top-0 bottom-0 left-0 !outline-offset-0 border-b border-neutral-400 z-10",this.localize.dir()==="rtl"&&"left-auto right-0")}" @click="${this.handleScrollToStart}"><sd-icon library="_internal" name="${t?"chevron-up":"chevron-down"}" label="previous" class="${c("h-6 w-12 rotate-90 grid place-items-center")}"></sd-icon></button>`:""}<div part="scroll-container" class="flex overflow-x-auto focus-visible:focus-outline !outline-offset-0"><div part="tabs" class="${c("flex flex-auto relative flex-row")}" role="tablist">${((e=this.activeTab)==null?void 0:e.variant)!=="container"?u`<div part="active-tab-indicator" id="indicator" class="absolute h-1 bg-accent bottom-0 transition-[transform,width] duration-medium ease-in-out z-30"></div>`:""}<div part="separation" class="border-neutral-400 absolute w-full h-0.25 bottom-0 border-b z-10"></div><slot name="nav" @slotchange="${this.syncTabsAndPanels}"></slot></div></div>${this.hasScrollControls?u`<button part="scroll-button--end" exportparts="base:scroll-button__base" tabindex="-1" aria-hidden="true" disabled="${w(!this.canScroll.right||void 0)}" class="${c("sd-interactive flex items-center justify-center absolute top-0 bottom-0 right-0 !outline-offset-0 border-b border-neutral-400 z-10",this.localize.dir()==="rtl"&&"right-auto left-0")}" @click="${this.handleScrollToEnd}"><sd-icon library="_internal" name="${t?"chevron-down":"chevron-up"}" label="next" class="${c("h-6 w-12 rotate-90 grid place-items-center")}"></sd-icon></button>`:""}</div><slot part="body" class="${c("block auto py-8 px-6",this.variant==="container"&&"border border-neutral-400 border-t-0")}" @slotchange="${this.syncTabsAndPanels}"></slot></div>`}};ft.styles=[...f.styles,y`:host{box-sizing:border-box;display:block}[part=scroll-container]{scrollbar-width:none}[part=scroll-container]::-webkit-scrollbar{height:var(--sd-spacing-0,0);width:var(--sd-spacing-0,0)}::slotted(sd-tab-panel){--padding:1rem 0}::slotted(sd-tab-panel:focus-visible){outline-color:rgb(var(--sd-color-primary,0 53 142)/1);outline-offset:2px;outline-style:solid;outline-width:2px}`],a([g("[part=base]")],ft.prototype,"tabGroup",2),a([g("[part=body]")],ft.prototype,"body",2),a([g("[part=scroll-container]")],ft.prototype,"nav",2),a([g("[part=active-tab-indicator]")],ft.prototype,"indicator",2),a([g('[part="tabs"]')],ft.prototype,"tabsContainer",2),a([E()],ft.prototype,"hasScrollControls",2),a([E()],ft.prototype,"variant",2),a([E()],ft.prototype,"canScroll",2),a([l({type:String,reflect:!0})],ft.prototype,"activation",2),a([oi(20)],ft.prototype,"handleScroll",1),ft=a([v("sd-tab-group")],ft);var Xl=0,ae=class extends f{constructor(){super(...arguments);this.attrId=++Xl;this.componentId=`sd-tab-panel-${this.attrId}`;this.name="";this.active=!1}connectedCallback(){super.connectedCallback(),this.id=this.id.length>0?this.id:this.componentId,this.setAttribute("role","tabpanel")}handleActiveChange(){this.setAttribute("aria-hidden",this.active?"false":"true")}render(){return u`<slot part="base" class="${c("block",this.active&&"tab-panel--active")}"></slot>`}};ae.styles=[...f.styles,y`:host{--padding:0;display:none}:host([active]){display:block}::part(base){padding:var(--padding)}`],a([l({type:String,reflect:!0})],ae.prototype,"name",2),a([l({type:Boolean,reflect:!0})],ae.prototype,"active",2),a([x("active")],ae.prototype,"handleActiveChange",1),ae=a([v("sd-tab-panel")],ae);var It=class extends f{constructor(){super(...arguments);this.variant="white";this.breakpoint=448;this.inset=!1;this.reversedLayout=!1;this.hasSlotController=new A(this,"[default]","media","meta","headline")}connectedCallback(){super.connectedCallback(),this.breakpoint===0?this._orientation="horizontal":this.breakpoint===9999?this._orientation="vertical":window.ResizeObserver&&(this.resizeObserver=new ResizeObserver(()=>this.updateOrientation()),this.resizeObserver.observe(this))}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver&&this.resizeObserver.disconnect()}updated(t){super.updated(t),t.has("breakpoint")&&this.updateOrientation()}updateOrientation(){this._orientation=this.offsetWidth>=this.breakpoint?"horizontal":"vertical"}render(){let t=this.variant==="white border-neutral-400"||this.inset,e={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline")};return u`<div class="${c("flex",{white:"bg-white","white border-neutral-400":"bg-white border border-neutral-400","neutral-100":"bg-neutral-100",primary:"bg-primary text-white","primary-100":"bg-primary-100"}[this.variant],this._orientation==="vertical"&&"flex-col",this._orientation==="horizontal"&&"flex-row gap-8",this._orientation==="horizontal"&&t&&"py-8 px-10")}" part="base"><div style="${this._orientation==="horizontal"?`width: var(--distribution-content, 100%); ${t?"width: var(--distribution-content, calc(100% - 2rem));":""}`:""}" class="${c("flex flex-col text-left order-2",this._orientation==="horizontal"&&"flex flex-col",this._orientation==="vertical"&&t&&"m-4")}" part="content"><div class="flex flex-col-reverse"><div part="headline" class="${c("text-lg font-bold m-0",this.variant==="primary"?"text-white":"text-black")}"><slot name="headline">Always insert one semantically correct heading element here (e. g. <h2>)</slot></div><div part="meta" class="${c("gap-2 mb-4",!e["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div part="main" class="${c(!e["teaser-has-default"]&&"hidden")}" role="group" aria-labelledby="headline"><slot></slot></div></div><div part="media" id="media" style="${this._orientation==="horizontal"?"width: var(--distribution-media, 100%);":""}" class="${c("order-1",!t&&this._orientation==="vertical"&&"mb-4",!e["teaser-has-media"]&&"hidden",this.variant==="white border-neutral-400"&&this._orientation==="vertical"&&"mx-[-1px] mt-[-1px]",this._orientation!=="vertical"&&this.reversedLayout&&"order-2")}"><slot name="media"></slot></div></div>`}};It.styles=[...f.styles,y`:host{display:block}::slotted(*){margin:var(--sd-spacing-0,0)}::slotted([slot=headline]){font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700;margin:var(--sd-spacing-0,0)!important}`],a([l({type:String,reflect:!0})],It.prototype,"variant",2),a([l({reflect:!0,type:Number})],It.prototype,"breakpoint",2),a([l({type:Boolean,reflect:!0})],It.prototype,"inset",2),a([l({type:Boolean,reflect:!0,attribute:"reversed-layout"})],It.prototype,"reversedLayout",2),a([g('[part="base"]')],It.prototype,"teaser",2),a([E()],It.prototype,"_orientation",2),It=a([v("sd-teaser")],It);var ye=class extends f{constructor(){super(...arguments);this.variant="white";this.hasSlotController=new A(this,"[default]","media","meta","headline","expandable")}render(){let t={"teaser-has-default":this.hasSlotController.test("[default]"),"teaser-has-media":this.hasSlotController.test("media"),"teaser-has-meta":this.hasSlotController.test("meta"),"teaser-has-headline":this.hasSlotController.test("headline"),"teaser-has-expandable":this.hasSlotController.test("expandable")};return u`<div class="relative flex flex-col group" part="base"><div class="absolute flex flex-col justify-end h-full w-full pb-4"><div class="${c("flex-1",this.variant==="gradient-light"&&"bg-gradient-to-t from-white/[.8] to-60%",this.variant==="gradient-dark"&&"bg-gradient-to-t from-primary-800/[.6] to-60%")}"></div><div class="${c({white:"bg-white/[.8] group-hover:bg-white/90","neutral-100":"bg-neutral-100/[.8] group-hover:bg-neutral-100/90",primary:"bg-primary/[.8] text-white group-hover:bg-primary/90","primary-100":"bg-primary-100/[.8] group-hover:bg-primary-100/90","gradient-light":"bg-gradient-to-t from-white/90 to-white/[.8]","gradient-dark":"bg-gradient-to-t from-primary-800/75 to-primary-800/[.6] text-white"}[this.variant])}"><div class="flex-col text-left p-4" part="content"><div class="flex flex-col"><div part="headline" class="text-lg font-bold m-0 order-2"><slot name="headline">Always insert one semantically correct heading element here (e. g. <h2>)</slot></div><div part="meta" class="${c("gap-2 mb-4 order-1",!t["teaser-has-meta"]&&"hidden")}"><slot name="meta"></slot></div></div><div class="${c("hidden",t["teaser-has-expandable"]&&"h-[0px] invisible opacity-0 md:[transition:_height_0.2s_linear,opacity_0.1s_linear_0.1s] md:block md:group-hover:h-auto md:group-hover:my-4 md:group-hover:opacity-[100%] md:group-hover:visible")}" part="expandable" aria-hidden="true"><slot name="expandable"></slot></div><div part="main" class="${c(!t["teaser-has-default"]&&"hidden")}"><slot></slot></div></div></div></div><div class="${c("mb-4 -z-10",!t["teaser-has-media"]&&"hidden")}" part="media"><slot name="media"></slot></div></div>`}};ye.styles=[...f.styles,y`:host{display:block}::slotted(*){margin:var(--sd-spacing-0,0)}::slotted([slot=headline]){font-size:var(--sd-font-size-lg,1.25rem)!important;font-weight:700;margin:var(--sd-spacing-0,0)!important}:host([variant=white]) .background:focus-within{background-color:rgb(var(--sd-color-white,255 255 255)/var(--sd-opacity-90,.9))}:host([variant=neutral-100]) .background:focus-within{background-color:rgb(var(--sd-color-neutral-100,246 246 246)/var(--sd-opacity-90,.9))}:host([variant=primary]) .background:focus-within{background-color:rgb(var(--sd-color-primary,0 53 142)/var(--sd-opacity-90,.9))}:host([variant=primary-100]) .background:focus-within{background-color:rgb(var(--sd-color-primary-100,236 240 249)/var(--sd-opacity-90,.9))}`],a([l({type:String,reflect:!0})],ye.prototype,"variant",2),a([g('[part="base"]')],ye.prototype,"teaserMedia",2),ye=a([v("sd-teaser-media")],ye);var H=class extends f{constructor(){super(...arguments);this.formControlController=new ot(this);this.hasSlotController=new A(this,"help-text","label");this.hasFocus=!1;this.showValidStyle=!1;this.showInvalidStyle=!1;this.title="";this.name="";this.value="";this.size="lg";this.label="";this.helpText="";this.placeholder="";this.rows=4;this.disabled=!1;this.visuallyDisabled=!1;this.readonly=!1;this.form="";this.required=!1;this.styleOnValid=!1;this.spellcheck=!0;this.defaultValue=""}get validity(){return this.textarea.validity}get validationMessage(){return this.textarea.validationMessage}connectedCallback(){super.connectedCallback(),this.updateComplete.then(()=>{this.setTextareaHeight()})}firstUpdated(){this.formControlController.updateValidity()}disconnectedCallback(){super.disconnectedCallback()}handleBlur(){this.hasFocus=!1,this.emit("sd-blur")}handleChange(){this.value=this.textarea.value,this.setTextareaHeight(),this.emit("sd-change")}handleFocus(){this.hasFocus=!0,this.emit("sd-focus")}handleInput(){if(this.visuallyDisabled){this.textarea.value=this.value;return}this.value=this.textarea.value,this.formControlController.updateValidity(),this.emit("sd-input")}handleInvalid(t){this.formControlController.setValidity(!1),this.formControlController.emitInvalidEvent(t),this.invalidMessage.textContent=t.target.validationMessage}setTextareaHeight(){this.textarea.style.height=void 0}handleDisabledChange(){this.formControlController.setValidity(this.disabled)}handleRowsChange(){this.setTextareaHeight()}async handleValueChange(){await this.updateComplete,this.formControlController.updateValidity(),this.setTextareaHeight()}focus(t){this.textarea.focus(t)}blur(){this.textarea.blur()}select(){this.textarea.select()}scrollPosition(t){if(t){typeof t.top=="number"&&(this.textarea.scrollTop=t.top),typeof t.left=="number"&&(this.textarea.scrollLeft=t.left);return}return{top:this.textarea.scrollTop,left:this.textarea.scrollTop}}setSelectionRange(t,e,r="none"){this.textarea.setSelectionRange(t,e,r)}setRangeText(t,e,r,o){this.textarea.setRangeText(t,e,r,o),this.value!==this.textarea.value&&(this.value=this.textarea.value),this.value!==this.textarea.value&&(this.value=this.textarea.value,this.setTextareaHeight())}checkValidity(){var t;return(t=this.textarea)==null?void 0:t.checkValidity()}getForm(){return this.formControlController.getForm()}reportValidity(){return this.formControlController.fakeUserInteraction(),this.textarea.reportValidity()}setCustomValidity(t){this.textarea.setCustomValidity(t),this.formControlController.updateValidity()}render(){let t={label:this.hasSlotController.test("label"),helpText:this.hasSlotController.test("help-text"),tooltip:this.hasSlotController.test("tooltip")},e=this.label?!0:!!t.label,r=this.helpText?!0:!!t.helpText,o=!!t.tooltip,n=this.disabled?"disabled":this.visuallyDisabled&&!this.hasFocus?"visuallyDisabled":this.readonly?"readonly":this.hasFocus&&this.showInvalidStyle?"activeInvalid":this.hasFocus&&this.styleOnValid&&this.showValidStyle?"activeValid":this.hasFocus?"active":this.showInvalidStyle?"invalid":this.styleOnValid&&this.showValidStyle?"valid":"default",d=this.size==="sm"?"text-sm":"text-base",h={sm:"text-base top-1",md:"text-lg top-2",lg:"text-xl top-2"}[this.size];return u`<div part="form-control" class="flex flex-col h-full text-left">${e||o?u`<div class="flex items-center gap-1 mb-2"><label part="form-control-label" id="label" class="${c(e?"inline-block":"hidden",d)}" for="input" aria-hidden="${e?"false":"true"}"><slot name="label">${this.label}</slot></label> ${t.tooltip?u`<slot name="tooltip"></slot>`:""}</div>`:null}<div part="form-control-input" class="${c("relative h-full w-full",this.disabled&&"cursor-not-allowed")}"><div part="border" class="${c("absolute w-full h-full pointer-events-none border rounded-default transition-[border] duration-medium ease-in-out",{disabled:"border-neutral-500",visuallyDisabled:"border-neutral-500",readonly:"border-neutral-800",activeInvalid:"border-error border-2",activeValid:"border-success border-2",active:"border-primary border-2",invalid:"border-error",valid:"border-success",default:"border-neutral-800"}[n])}"></div><div part="base" class="${c("textarea h-full flex items-top rounded-default group transition-colors duration-medium hover:duration-fast ease-in-out",{sm:"textarea-sm",md:"textarea-md",lg:"textarea-lg"}[this.size],!this.disabled&&!this.readonly&&!this.visuallyDisabled?"hover:bg-neutral-200":"",this.readonly?"bg-neutral-100":"bg-white",n==="disabled"||n==="visuallyDisabled"?"text-neutral-500":"text-black")}"><textarea part="textarea" id="input" class="${c("ps-4 flex-grow focus:outline-none bg-transparent placeholder-neutral-700 resize-none group-has-[sd-icon]:pe-8",{sm:"py-1",md:"py-1",lg:"py-2"}[this.size],this.disabled&&"cursor-not-allowed",d)}" title="${this.title}" name="${w(this.name)}" .value="${me(this.value)}" ?disabled="${this.disabled}" ?readonly="${this.readonly}" ?required="${this.required}" ?visually-disabled="${this.visuallyDisabled}" placeholder="${w(this.placeholder)}" minlength="${w(this.minlength)}" maxlength="${w(this.maxlength)}" rows="${w(this.rows)}" autocapitalize="${w(this.autocapitalize)}" autocorrect="${w(this.autocorrect)}" ?autofocus="${this.autofocus}" spellcheck="${w(this.spellcheck)}" enterkeyhint="${w(this.enterkeyhint)}" inputmode="${w(this.inputmode)}" aria-describedby="help-text invalid-message" aria-invalid="${this.showInvalidStyle}" aria-disabled="${this.disabled||this.visuallyDisabled}" @change="${this.handleChange}" @input="${this.handleInput}" @invalid="${this.handleInvalid}" @focus="${this.handleFocus}" @blur="${this.handleBlur}"></textarea> ${this.showInvalidStyle?u`<sd-icon class="${c("text-error absolute right-4 pointer-events-none",h)}" library="_internal" name="risk" part="invalid-icon"></sd-icon>`:""} ${this.styleOnValid&&this.showValidStyle?u`<sd-icon class="${c("text-success absolute right-4 pointer-events-none",h)}" library="_internal" name="confirm-circle" part="valid-icon"></sd-icon>`:""}</div></div><slot name="help-text" part="form-control-help-text" id="help-text" class="${c("text-sm text-neutral-700 mt-1",r?"block":"hidden")}" aria-hidden="${r?"false":"true"}">${this.helpText}</slot></div>${this.formControlController.renderInvalidMessage()}`}};H.styles=[...f.styles,y`:host{display:block;height:100%}:host textarea{scrollbar-gutter:stable}:host([disabled]) ::-moz-placeholder,:host([visually-disabled]) ::-moz-placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([disabled]) ::placeholder,:host([visually-disabled]) ::placeholder{--tw-text-opacity:1;color:rgb(var(--sd-color-neutral-500,174 174 174)/var(--tw-text-opacity,1))}:host([required]) #label:after{content:" *"}:host([visually-disabled]) textarea{caret-color:transparent}.no-scrollbar::-webkit-scrollbar{display:none}`],a([g("#input")],H.prototype,"textarea",2),a([g("#invalid-message")],H.prototype,"invalidMessage",2),a([E()],H.prototype,"hasFocus",2),a([E()],H.prototype,"showValidStyle",2),a([E()],H.prototype,"showInvalidStyle",2),a([l({type:String,reflect:!0})],H.prototype,"title",2),a([l({type:String,reflect:!0})],H.prototype,"name",2),a([l()],H.prototype,"value",2),a([l({type:String,reflect:!0})],H.prototype,"size",2),a([l({type:String,reflect:!0})],H.prototype,"label",2),a([l({type:String,attribute:"help-text",reflect:!0})],H.prototype,"helpText",2),a([l({type:String,reflect:!0})],H.prototype,"placeholder",2),a([l({type:Number,reflect:!0})],H.prototype,"rows",2),a([l({type:Boolean,reflect:!0})],H.prototype,"disabled",2),a([l({type:Boolean,reflect:!0,attribute:"visually-disabled"})],H.prototype,"visuallyDisabled",2),a([l({type:Boolean,reflect:!0})],H.prototype,"readonly",2),a([l({type:String,reflect:!0})],H.prototype,"form",2),a([l({type:Boolean,reflect:!0})],H.prototype,"required",2),a([l({type:Number,reflect:!0})],H.prototype,"minlength",2),a([l({type:Number,reflect:!0})],H.prototype,"maxlength",2),a([l({type:String,reflect:!0})],H.prototype,"autocapitalize",2),a([l({type:String,reflect:!0})],H.prototype,"autocorrect",2),a([l({reflect:!0})],H.prototype,"autocomplete",2),a([l({type:Boolean,reflect:!0})],H.prototype,"autofocus",2),a([l({type:String,reflect:!0})],H.prototype,"enterkeyhint",2),a([l({type:Boolean,reflect:!0,attribute:"style-on-valid"})],H.prototype,"styleOnValid",2),a([l({type:Boolean,converter:{fromAttribute:t=>!(!t||t==="false"),toAttribute:t=>t?"true":"false"}})],H.prototype,"spellcheck",2),a([l({type:String,reflect:!0})],H.prototype,"inputmode",2),a([Lt()],H.prototype,"defaultValue",2),a([x("disabled",{waitUntilFirstUpdate:!0})],H.prototype,"handleDisabledChange",1),a([x("rows",{waitUntilFirstUpdate:!0})],H.prototype,"handleRowsChange",1),a([x("value",{waitUntilFirstUpdate:!0})],H.prototype,"handleValueChange",1),H=a([v("sd-textarea")],H);var lt=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.hasSlotController=new A(this,"[default]","content");this.size="lg";this.content="";this.placement="top";this.disabled=!1;this.open=!1;this.trigger="click focus";this.hoist=!1;this.handleMouseInteraction=()=>{this.interactionType="mouse"};this.handleKeyboardInteraction=()=>{this.interactionType="keyboard"}}connectedCallback(){super.connectedCallback(),this.handleBlur=this.handleBlur.bind(this),this.handleClick=this.handleClick.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseOver=this.handleMouseOver.bind(this),this.handleMouseOut=this.handleMouseOut.bind(this),document.addEventListener("mousedown",this.handleMouseInteraction),document.addEventListener("keydown",this.handleKeyboardInteraction),this.updateComplete.then(()=>{this.addEventListener("blur",this.handleBlur,!0),this.addEventListener("focus",this.handleFocus,!0),this.addEventListener("click",this.handleClick),this.addEventListener("keydown",this.handleKeyDown),this.addEventListener("mouseover",this.handleMouseOver),this.addEventListener("mouseout",this.handleMouseOut)})}firstUpdated(){this.body.hidden=!this.open,this.formatDefaultSlot(this.defaultSlot),this.open&&(this.popup.active=!0,this.popup.reposition())}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("blur",this.handleBlur,!0),this.removeEventListener("focus",this.handleFocus,!0),this.removeEventListener("click",this.handleClick),this.removeEventListener("keydown",this.handleKeyDown),this.removeEventListener("mouseover",this.handleMouseOver),this.removeEventListener("mouseout",this.handleMouseOut),document.removeEventListener("mousedown",this.handleMouseInteraction),document.removeEventListener("keydown",this.handleKeyboardInteraction)}get hasCustomTrigger(){return this.hasSlotController.test("[default]")}formatDefaultSlot(t){if(!t)return;t.assignedNodes({flatten:!0}).forEach(r=>{var o,n;r.nodeType===Node.TEXT_NODE&&!((o=r==null?void 0:r.textContent)!=null&&o.trim())&&((n=r==null?void 0:r.parentNode)==null||n.removeChild(r))})}handleBlur(){this.hasTrigger("focus")&&this.hide()}handleClick(){this.hasTrigger("click")&&(this.open?this.hide():this.show())}handleFocus(){this.hasTrigger("focus")&&this.interactionType==="keyboard"&&this.show()}handleKeyDown(t){this.open&&t.key==="Escape"&&(t.stopPropagation(),this.hide())}handleMouseOver(){if(this.hasTrigger("hover")){let t=ii(getComputedStyle(this).getPropertyValue("--show-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.show(),t)}}handleMouseOut(){if(this.hasTrigger("hover")){let t=ii(getComputedStyle(this).getPropertyValue("--hide-delay"));clearTimeout(this.hoverTimeout),this.hoverTimeout=window.setTimeout(()=>this.hide(),t)}}hasTrigger(t){return this.trigger.split(" ").includes(t)}async handleOpenChange(){if(this.open){if(this.disabled)return;this.emit("sd-show"),await R(this.body),this.body.hidden=!1,this.popup.active=!0;let{keyframes:t,options:e}=F(this,"tooltip.show",{dir:this.localize.dir()});await B(this.popup.popup,t,e),this.emit("sd-after-show")}else{this.emit("sd-hide"),await R(this.body);let{keyframes:t,options:e}=F(this,"tooltip.hide",{dir:this.localize.dir()});await B(this.popup.popup,t,e),this.popup.active=!1,this.body.hidden=!0,this.emit("sd-after-hide")}}async handleOptionsChange(){this.hasUpdated&&(await this.updateComplete,this.popup.reposition())}handleDisabledChange(){this.disabled&&this.open&&this.hide()}async show(){if(!this.open)return this.open=!0,q(this,"sd-after-show")}async hide(){if(this.open)return this.open=!1,this.trigger==="click"||this.trigger==="click focus"?this.focus():this.blur(),q(this,"sd-after-hide")}render(){let t=this.placement.endsWith("-start"),e=this.placement.endsWith("-end");return u`<sd-popup part="base" exportparts="
|
|
150
151
|
popup:base__popup,
|
|
151
152
|
arrow:base__arrow
|
|
152
153
|
" class="${c(this.open&&"tooltip--open")}" placement="${this.placement}" distance="10" skidding="${{start:2,end:-2,default:0}[t?"start":e?"end":"default"]*(this.size==="sm"?-1:1)}" strategy="${this.hoist?"fixed":"absolute"}" flip shift arrow auto-size="vertical" arrow-padding="0">${this.hasCustomTrigger?u`<slot slot="anchor"></slot>`:u`<button slot="anchor" aria-describedby="tooltip" class="${c("flex sd-interactive rounded-full",this.size==="lg"?"text-xl":"text-base")}" ?disabled="${this.disabled}" aria-expanded="${this.open}" aria-controls="tooltip"><sd-icon library="_internal" name="info-circle" label="Tooltip" class="${c(this.disabled&&"sd-interactive--disabled")}"></sd-icon></button>`}<slot name="content" part="body" id="tooltip" class="bg-primary text-white py-3 px-4 block rounded-none text-sm text-left" role="tooltip" aria-label="${this.content}" aria-live="${this.open?"polite":"off"}">${this.content}</slot></sd-popup>`}};lt.styles=[...f.styles,y`:host{--hide-delay:0ms;--show-delay:150ms;display:contents}sd-popup{--arrow-color:rgb(var(--sd-color-primary,0 53 142)/1);--arrow-size:10px}sd-popup::part(popup){pointer-events:none;z-index:10;--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-popup::part(arrow){--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-popup[placement^=top]::part(popup){transform-origin:bottom}sd-popup[placement^=bottom]::part(popup){transform-origin:top}#tooltip{max-width:var(--max-width)}::slotted([slot=content]){max-height:var(--auto-size-available-height)!important;max-width:var(--auto-size-available-width)!important;overflow:auto}`],a([g("slot:not([name])")],lt.prototype,"defaultSlot",2),a([g("#tooltip")],lt.prototype,"body",2),a([g("sd-popup")],lt.prototype,"popup",2),a([l({type:String,reflect:!0})],lt.prototype,"size",2),a([l({type:String,reflect:!0})],lt.prototype,"content",2),a([l({type:String,reflect:!0})],lt.prototype,"placement",2),a([l({type:Boolean,reflect:!0})],lt.prototype,"disabled",2),a([l({type:Boolean,reflect:!0})],lt.prototype,"open",2),a([l({type:String,reflect:!0})],lt.prototype,"trigger",2),a([l({type:Boolean,reflect:!0})],lt.prototype,"hoist",2),a([x("open",{waitUntilFirstUpdate:!0})],lt.prototype,"handleOpenChange",1),a([x(["content","hoist","placement"])],lt.prototype,"handleOptionsChange",1),a([x("disabled")],lt.prototype,"handleDisabledChange",1),lt=a([v("sd-tooltip")],lt);_("tooltip.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});_("tooltip.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:"var(--sd-duration-fast, 150)",easing:"ease-in-out"}});var oe=class extends f{constructor(){super(...arguments);this.localize=new L(this);this.playing=!1;this.isBelowBreakpoint=!1;this.hasSlotController=new A(this,"[default]","play-icon","poster")}get poster(){let t=this.shadowRoot.querySelector("slot[name=poster]");return(t==null?void 0:t.assignedElements().length)>0?t.assignedElements()[0]:null}get video(){return this.querySelector("video")}async hidePoster(){this.poster instanceof HTMLImageElement&&(this.poster.style.opacity="0",await new Promise(t=>setTimeout(t,this.token("sd-duration-medium",300))),this.poster.style.display="none")}setVideoInert(t){var e,r;t?(e=this.video)==null||e.setAttribute("inert",""):(r=this.video)==null||r.removeAttribute("inert")}play(){var t;this.emit("sd-play"),this.playing=!0,(t=this.video)==null||t.play(),this.hidePoster(),this.setVideoInert(!1)}handleKeydown(t){t instanceof KeyboardEvent&&(t.key==="Enter"||t.key===" ")&&(this.play(),setTimeout(()=>{var e;(e=this.video)==null||e.focus()}))}handleButtonResize(){this.hostEl.clientWidth<=414&&!this.isBelowBreakpoint&&(this.isBelowBreakpoint=!0),this.hostEl.clientWidth>414&&this.isBelowBreakpoint&&(this.isBelowBreakpoint=!1)}connectedCallback(){super.connectedCallback(),this.setVideoInert(!0),this.resizeObserver=new ResizeObserver(()=>this.handleButtonResize()),this.updateComplete.then(()=>{this.resizeObserver.observe(this.hostEl)})}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver.unobserve(this.hostEl)}render(){return u`<div part="base" class="cursor-pointer"><button part="play-button" aria-label="${this.localize.term("playVideo")}" tabindex="0" @click="${this.play}" @keydown="${this.handleKeydown}" class="${c(this.playing&&"pointer-events-none","group w-full h-full absolute top-0 left-0 z-30 text-primary hover:text-primary-500 sd-interactive sd-interactive--reset focus-visible:focus-outline")}"><div part="play-button-bg" class="${c(this.playing?"opacity-0":"opacity-100",this.isBelowBreakpoint?"w-[48px] h-[48px]":"w-[96px] h-[96px]","absolute left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 p-4 bg-white bg-opacity-75 rounded-full play-pause-transition outline-2 outline-offset-2 group-focus-visible:outline")}"><slot name="play-icon" part="play-icon" class="${c(this.isBelowBreakpoint?"text-[2rem]":"text-[4rem]")}"><sd-icon id="default-play-icon" library="_internal" name="start"></sd-icon></slot></div></button> ${this.hasSlotController.test("poster")?u`<div part="poster-wrapper" class="absolute left-0 top-0 w-full z-10 overflow-hidden"><slot name="poster" role="presentation"></slot></div>`:null}<slot></slot></div>`}};oe.styles=[...f.styles,y`:host{display:inline-block;overflow:hidden;position:relative}.play-pause-transition,::slotted([slot=poster]){--tw-scale-x:1;--tw-scale-y:1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));transition-duration:.15s;transition-duration:var(--sd-duration-medium,.3s);transition-property:opacity,transform;transition-timing-function:cubic-bezier(.4,0,.2,1)}#default-play-icon,::slotted([slot=play-icon]){left:50%;position:absolute;top:50%;--tw-translate-x:-50%!important;--tw-translate-y:-50%!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}:has([part=play-button]:hover) ::slotted([slot=poster]){--tw-scale-x:1.1!important;--tw-scale-y:1.1!important;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))!important}`],a([g("[part=base]")],oe.prototype,"hostEl",2),a([l({type:Boolean,reflect:!0})],oe.prototype,"playing",2),a([l({type:Boolean})],oe.prototype,"isBelowBreakpoint",2),oe=a([v("sd-video")],oe);function $C(s,{setValueOnSelection:i,scrollSelectionIntoView:t}={setValueOnSelection:!0,scrollSelectionIntoView:!0}){let e=s?typeof s=="string"?document.querySelector(s):s:document.querySelector("#autoComplete"),r=e.shadowRoot.querySelector("input"),o=n=>n[0];return r.addEventListener("init",()=>{var m,b;let n=(m=e.shadowRoot)==null?void 0:m.querySelector("ul");n==null||n.setAttribute("part","listbox");let d=document.createElement("sd-popup");d.appendChild(n),(b=e.shadowRoot)==null||b.appendChild(d),d==null||d.setAttribute("exportparts","popup__content"),d&&(d.active=!1,d.autoSize="vertical",d.autoSizePadding=16,d.placement="bottom-start",d.anchor=e,d.sync="width");let h=o`sd-popup::part(popup){border-bottom-left-radius:var(--sd-border-radius-default,.25rem);border-bottom-right-radius:var(--sd-border-radius-default,.25rem);border-width:0 2px 2px;overflow-y:scroll;z-index:var(--sd-z-index-dropdown,900);--tw-border-opacity:1;border-color:rgb(var(--sd-color-primary,0 53 142)/var(--tw-border-opacity,1));--tw-bg-opacity:1;background-color:rgb(var(--sd-color-white,255 255 255)/var(--tw-bg-opacity,1));padding:var(--sd-spacing-3,.75rem) var(--sd-spacing-2,.5rem);--tw-shadow:var(--sd-shadow,0px 1px 3px 0px rgba(81,81,81,.75));--tw-shadow-colored:0px 1px 3px 0px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}sd-popup li{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}sd-popup li:hover:not([disabled]){--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-100,246 246 246)/var(--tw-bg-opacity,1))}sd-popup li{list-style-type:""}sd-popup li mark{background-color:transparent;font-weight:700}sd-popup li:not(:has(sd-option)){cursor:pointer;font-size:var(--sd-font-size-base,1rem);padding:var(--sd-spacing-3,.75rem) var(--sd-spacing-4,1rem);--tw-text-opacity:1;color:rgb(var(--sd-color-black,24 24 24)/var(--tw-text-opacity,1))}sd-popup li:not(:has(sd-option)):hover{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-200,233 233 233)/var(--tw-bg-opacity,1))}sd-popup li[aria-selected=true]{--tw-bg-opacity:1;background-color:rgb(var(--sd-color-neutral-200,233 233 233)/var(--tw-bg-opacity,1))}`,p=new CSSStyleSheet;p.replaceSync(h),e.shadowRoot.adoptedStyleSheets=[...e.shadowRoot.adoptedStyleSheets,p]}),i&&r.addEventListener("selection",n=>{var d;e.value=(d=n==null?void 0:n.detail)==null?void 0:d.selection.value}),r.addEventListener("open",()=>{var n,d,h,p,m,b;(d=(n=e.shadowRoot)==null?void 0:n.querySelector("sd-popup"))==null||d.setAttribute("active","true"),(p=(h=e.shadowRoot)==null?void 0:h.querySelector('[part="border"]'))==null||p.classList.add("rounded-b-none"),(b=(m=e.shadowRoot)==null?void 0:m.querySelector('[part="form-control"]'))==null||b.classList.add("z-50")}),r.addEventListener("close",()=>{var n,d,h,p,m,b;(d=(n=e.shadowRoot)==null?void 0:n.querySelector("sd-popup"))==null||d.removeAttribute("active"),(p=(h=e.shadowRoot)==null?void 0:h.querySelector('[part="border"]'))==null||p.classList.remove("rounded-b-none"),(b=(m=e.shadowRoot)==null?void 0:m.querySelector('[part="form-control"]'))==null||b.classList.remove("z-50")}),t&&r.addEventListener("navigate",()=>{let n=e.shadowRoot.querySelector('[aria-selected="true"]');n==null||n.scrollIntoView({block:"nearest"})}),{config:{selector:()=>r,resultsList:{tag:"ul"},wrapper:!1}}}export{L as LocalizeController,vt as SdAccordion,pe as SdAccordionGroup,G as SdAnimation,it as SdAudio,ee as SdBadge,jt as SdBrandshape,Tt as SdBreadcrumb,Ft as SdBreadcrumbItem,K as SdButton,j as SdCarousel,ue as SdCarouselItem,tt as SdCheckbox,Dt as SdCheckboxGroup,T as SdCombobox,At as SdDialog,ge as SdDivider,ht as SdDrawer,rt as SdDropdown,Ht as SdExpandable,Mt as SdFlipcard,se as SdHeader,Ct as SdIcon,Zt as SdInclude,M as SdInput,$t as SdLink,Le as SdLoader,Ot as SdMapMarker,Ae as SdMenu,mt as SdMenuItem,st as SdNavigationItem,pt as SdNotification,Qt as SdOptgroup,ct as SdOption,X as SdPopup,Me as SdQuickfact,ut as SdRadio,wt as SdRadioButton,Q as SdRadioGroup,J as SdRange,Se as SdRangeTick,at as SdScrollable,O as SdSelect,_e as SdSpinner,et as SdStep,xt as SdStepGroup,nt as SdSwitch,kt as SdTab,ft as SdTabGroup,ae as SdTabPanel,yt as SdTag,It as SdTeaser,ye as SdTeaserMedia,H as SdTextarea,lt as SdTooltip,oe as SdVideo,ro as registerIconLibrary,$C as setupAutocomplete,Ds as unregisterIconLibrary};
|