@esri/calcite-components 5.0.0-next.26 → 5.0.0-next.28
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/dist/cdn/{JHMUWWQC.js → 26QSFR7F.js} +2 -2
- package/dist/cdn/{XUXUXKVY.js → 2EIDZAWM.js} +2 -2
- package/dist/cdn/{AQU252UZ.js → 2H7VF4HP.js} +2 -2
- package/dist/cdn/{YX3LSUMD.js → 2J6IGAJW.js} +2 -2
- package/dist/cdn/{MIOMU44N.js → 2Y7LGAAQ.js} +2 -2
- package/dist/cdn/{BC6T7LXX.js → 3JFO4MUC.js} +2 -2
- package/dist/cdn/{FAT3Y2BN.js → 3NUNHJUT.js} +1 -1
- package/dist/cdn/{MW5EJLCT.js → 3PRYRSPU.js} +2 -2
- package/dist/cdn/{SVGBKLP3.js → 3RYPPDCF.js} +2 -2
- package/dist/cdn/{X5M5H7V5.js → 3V4Y4R3R.js} +2 -2
- package/dist/cdn/{EYU5DTMI.js → 3WMX2H3N.js} +1 -1
- package/dist/cdn/{S3LMUVIR.js → 4DX6AFI7.js} +2 -2
- package/dist/cdn/{HTSVYMIU.js → 4HYFSWQK.js} +1 -1
- package/dist/cdn/{NFJBMBKC.js → 4RO44BNC.js} +2 -2
- package/dist/cdn/{TU3YLD2E.js → 4ZEIXRNV.js} +2 -2
- package/dist/cdn/{OIC2PJSR.js → 4ZTJWZEL.js} +2 -2
- package/dist/cdn/{2XHAGMKL.js → 55MNV4SX.js} +2 -2
- package/dist/cdn/{UJORWXAT.js → 55ZUNINC.js} +2 -2
- package/dist/cdn/{MUXHUU6U.js → 5DSNOPU4.js} +1 -1
- package/dist/cdn/{FW2WJAMV.js → 5JVOYY5Q.js} +2 -2
- package/dist/cdn/{BYDTCRJO.js → 5TYE2OST.js} +2 -2
- package/dist/cdn/{SLBOIPUI.js → 5UCLHM7V.js} +2 -2
- package/dist/cdn/{B4QK4RBC.js → 6BMVHGKU.js} +2 -2
- package/dist/cdn/{UK5M4QCY.js → 6MBPE7MP.js} +2 -2
- package/dist/cdn/{MAHGPUV2.js → 6N6F7HUE.js} +2 -2
- package/dist/cdn/{OEZPBK7R.js → 6ZGA5MOX.js} +2 -2
- package/dist/cdn/{6L2CD66G.js → 6ZMZXXUS.js} +2 -2
- package/dist/cdn/{7JL3ZCM4.js → 7NEVPJQK.js} +2 -2
- package/dist/cdn/{6AV5OUAI.js → 7SVTDM3O.js} +1 -1
- package/dist/cdn/{FMKQR3NY.js → 7VF5LHA7.js} +2 -2
- package/dist/cdn/{KQUCKRP3.js → 7VTI2NCJ.js} +2 -2
- package/dist/cdn/{QOYXWNLB.js → A2AZZATN.js} +2 -2
- package/dist/cdn/{QIWQPYMD.js → AEE6OVYK.js} +2 -2
- package/dist/cdn/{TB54TF7D.js → ASQJLRWH.js} +2 -2
- package/dist/cdn/{YSWB2MUY.js → AZL3A475.js} +1 -1
- package/dist/cdn/{TJQWEEWG.js → BW4MDK5S.js} +2 -2
- package/dist/cdn/{2U3HRPBE.js → BXMZ7UKN.js} +2 -2
- package/dist/cdn/{HXVXKTPF.js → C3I4G4TE.js} +2 -2
- package/dist/cdn/{7DAYYO7G.js → C4X7YP5A.js} +2 -2
- package/dist/cdn/{5U7ADNIZ.js → CBV3TPAG.js} +2 -2
- package/dist/cdn/{E2CJ3WMN.js → CPBV7Y2T.js} +2 -2
- package/dist/cdn/{5DDVN7VT.js → CU3NAWYI.js} +2 -2
- package/dist/cdn/{6SRTCZUL.js → D7CVTX7H.js} +2 -2
- package/dist/cdn/{WL4H37YF.js → DAGZ3SWT.js} +2 -2
- package/dist/cdn/DBNHA57P.js +4 -0
- package/dist/cdn/{WIKB25QH.js → DCL3I2DT.js} +1 -1
- package/dist/cdn/{WHUJJZKU.js → DCOOWEHP.js} +2 -2
- package/dist/cdn/{YL6AVWLZ.js → DWKM734D.js} +2 -2
- package/dist/cdn/{W7GKGD7L.js → EAM77PTJ.js} +2 -2
- package/dist/cdn/{RSG7A2EY.js → EBJF2Z5D.js} +2 -2
- package/dist/cdn/{E4EYXCOT.js → EJBQRGLZ.js} +1 -1
- package/dist/cdn/{LLHJY7FO.js → EMU2AT4J.js} +2 -2
- package/dist/cdn/{KNWKHZDP.js → ESYCDUKF.js} +1 -1
- package/dist/cdn/{IIG6KL5B.js → F4IDAPEQ.js} +2 -2
- package/dist/cdn/{QZKEE2GW.js → FBLHNFXG.js} +2 -2
- package/dist/cdn/{P4SFTOL2.js → FIY2DX6P.js} +2 -2
- package/dist/cdn/{SBRSHLCL.js → FJHKFLZA.js} +2 -2
- package/dist/cdn/{TOJWPJZO.js → FST7R3GB.js} +2 -2
- package/dist/cdn/{EVY5PGRH.js → G2NYSDPG.js} +2 -2
- package/dist/cdn/{YOAHZBK4.js → G3JDC5B3.js} +2 -2
- package/dist/cdn/{UE6N72DC.js → G55KDLFK.js} +2 -2
- package/dist/cdn/G6JHTOAV.js +4 -0
- package/dist/cdn/{B5UWHKTV.js → G6WKLXCA.js} +2 -2
- package/dist/cdn/{SZYDF2UZ.js → GGDDKWJF.js} +1 -1
- package/dist/cdn/{D7OBAVZT.js → H27TXWXX.js} +2 -2
- package/dist/cdn/{47DFYWT7.js → H2E2EHFM.js} +1 -1
- package/dist/cdn/{4FZKOFIT.js → H4CGEEPI.js} +2 -2
- package/dist/cdn/{UTDL752M.js → H4TALTI2.js} +2 -2
- package/dist/cdn/{WVPOSWB7.js → H6MITS4O.js} +2 -2
- package/dist/cdn/{7A5GUUXX.js → HFYC6UTK.js} +2 -2
- package/dist/cdn/{DXQFA7YZ.js → HLOPOVBH.js} +1 -1
- package/dist/cdn/{FE7MC2RS.js → HXAV5GMB.js} +2 -2
- package/dist/cdn/{4VRO7HIK.js → HZOORBJ3.js} +2 -2
- package/dist/cdn/{K424XZFZ.js → IBPV7BT4.js} +2 -2
- package/dist/cdn/{SUF3BEFB.js → IC5U3US4.js} +2 -2
- package/dist/cdn/{E5D5DLBW.js → IDILHLJF.js} +2 -2
- package/dist/cdn/{7BPYHEOW.js → IKZF6TKF.js} +2 -2
- package/dist/cdn/{FRO3DRWQ.js → ISQHYPZ4.js} +2 -2
- package/dist/cdn/{RBBDKUN4.js → J7KS3TRU.js} +2 -2
- package/dist/cdn/{ET5LOAXJ.js → JMKIESON.js} +2 -2
- package/dist/cdn/{DT3IOU7S.js → JNHQTFV5.js} +2 -2
- package/dist/cdn/{IMNNSECB.js → JSBPVJXR.js} +2 -2
- package/dist/cdn/{XTCTFLEI.js → JZSRHSJY.js} +2 -2
- package/dist/cdn/{RC6OSJIM.js → K2PWBMJT.js} +2 -2
- package/dist/cdn/{5N76V6DK.js → K3BDA6T2.js} +2 -2
- package/dist/cdn/{3RCYATIP.js → KHQANRU5.js} +1 -1
- package/dist/cdn/{E5QC5ISI.js → KKR37WY4.js} +2 -2
- package/dist/cdn/{6N2MAGTM.js → KLNZB56I.js} +2 -2
- package/dist/cdn/{MD5WJSZN.js → KNAMOTPE.js} +1 -1
- package/dist/cdn/{NZM73CDI.js → KOUATFD2.js} +2 -2
- package/dist/cdn/{BOOYLMNS.js → KQIT3G2O.js} +2 -2
- package/dist/cdn/{3YNQI3NO.js → KR6644B5.js} +2 -2
- package/dist/cdn/{AHIQKX5F.js → KUCB7AAR.js} +2 -2
- package/dist/cdn/{DTSRU6CW.js → KXPGI7RX.js} +2 -2
- package/dist/cdn/{BS6FO7VM.js → L2YNL67H.js} +2 -2
- package/dist/cdn/{BY6FQDGD.js → LHU3B37P.js} +2 -2
- package/dist/cdn/{2CFMML7J.js → LI5Z7CE2.js} +2 -2
- package/dist/cdn/{5XAHBWEI.js → LUNNRUAX.js} +1 -1
- package/dist/cdn/{HMQK4NHX.js → MF7X7UFW.js} +2 -2
- package/dist/cdn/{CWNLGPSB.js → MMXI2D6G.js} +1 -1
- package/dist/cdn/{SOCINMJ3.js → MOK6KL7H.js} +2 -2
- package/dist/cdn/{PLDBKZJU.js → MVCPUUT7.js} +2 -2
- package/dist/cdn/{QPLV643W.js → MXHQJDVJ.js} +2 -2
- package/dist/cdn/{2FZFM5NL.js → MYAPFTJH.js} +2 -2
- package/dist/cdn/{DJVTADL7.js → N5HK5HEI.js} +2 -2
- package/dist/cdn/{UFXOUOBW.js → NHVMWL3A.js} +2 -2
- package/dist/cdn/{IILDTQRG.js → NL2O53BU.js} +2 -2
- package/dist/cdn/{432I5L6K.js → NNZ43CPZ.js} +2 -2
- package/dist/cdn/{7UWIO6G4.js → NUDIM2KL.js} +2 -2
- package/dist/cdn/{6FPWFMQD.js → NZSUCBWV.js} +2 -2
- package/dist/cdn/{TQDSVXLJ.js → OEJG46EH.js} +2 -2
- package/dist/cdn/{D5UX7ECF.js → OF4NOCZU.js} +2 -2
- package/dist/cdn/{YRXGH5DY.js → OU7I6WEY.js} +2 -2
- package/dist/cdn/{ZKY4KTD2.js → OVQX33E2.js} +1 -1
- package/dist/cdn/{NBGXBSR4.js → P3FHGL5F.js} +2 -2
- package/dist/cdn/{JALLQ642.js → PHIYXNE2.js} +2 -2
- package/dist/cdn/{H7FAIOG4.js → PZFUJGU2.js} +2 -2
- package/dist/cdn/{VMISRU6U.js → QERW4UQO.js} +2 -2
- package/dist/cdn/{KQHZTEQA.js → QJJ7H6I6.js} +2 -2
- package/dist/cdn/{VRI45OLI.js → QMZABX7P.js} +1 -1
- package/dist/cdn/{HWAZHT5V.js → QOM7U4UZ.js} +2 -2
- package/dist/cdn/{SRXKNFWZ.js → QX4LMLHF.js} +2 -2
- package/dist/cdn/{SMB2EQKM.js → QYGH3IIO.js} +2 -2
- package/dist/cdn/{ARB4Q3GY.js → R4RP6VRQ.js} +2 -2
- package/dist/cdn/{LKLTEHWQ.js → RFMQHFRV.js} +2 -2
- package/dist/cdn/ROYB4S4X.js +4 -0
- package/dist/cdn/{6F7MIVOD.js → RU6R2G5Y.js} +2 -2
- package/dist/cdn/{UGKRXWQA.js → S2VACO7E.js} +2 -2
- package/dist/cdn/{EPA5EBO4.js → SN26BSQX.js} +2 -2
- package/dist/cdn/{MYTCFLOM.js → SOZ5RY73.js} +2 -2
- package/dist/cdn/{HBGTAWK3.js → SV3XQU5A.js} +1 -1
- package/dist/cdn/SV6DIEEI.js +4 -0
- package/dist/cdn/{WUWREGJO.js → SWLBZTLD.js} +1 -1
- package/dist/cdn/{IEHTF4JJ.js → TQU7Q3EV.js} +2 -2
- package/dist/cdn/{BJWZNEE6.js → TSO7S7PW.js} +1 -1
- package/dist/cdn/{ZOG53OH5.js → TTJX2KFC.js} +2 -2
- package/dist/cdn/{3ILU5HMO.js → U2E34VFR.js} +2 -2
- package/dist/cdn/{RLKDPOH2.js → U7YS2SMS.js} +1 -1
- package/dist/cdn/{PJPCM6TA.js → UD3HTL7I.js} +2 -2
- package/dist/cdn/{ONWB4LLN.js → UNLRDVUQ.js} +2 -2
- package/dist/cdn/{ZFALE3R5.js → UQLN223W.js} +2 -2
- package/dist/cdn/{VR7J7K4K.js → USFXGR5W.js} +2 -2
- package/dist/cdn/{LJHB3MJX.js → USLAZ674.js} +2 -2
- package/dist/cdn/{PUM2TUJT.js → UW45WQTS.js} +2 -2
- package/dist/cdn/{4A5BQ3P6.js → UWOTAU32.js} +2 -2
- package/dist/cdn/{5O4F6PZJ.js → VAX5Y6UB.js} +2 -2
- package/dist/cdn/{IZG6SCFX.js → VBTWHDTJ.js} +1 -1
- package/dist/cdn/{TVHBJX3S.js → VCMJECUB.js} +2 -2
- package/dist/cdn/{62ZCKEBN.js → VGQB4AHH.js} +2 -2
- package/dist/cdn/{77223OGR.js → VPOPLMYG.js} +2 -2
- package/dist/cdn/W5MUU35Y.js +4 -0
- package/dist/cdn/{QKW5HNIF.js → W672JU5G.js} +1 -1
- package/dist/cdn/{PGQ556IU.js → WCYK7MUQ.js} +2 -2
- package/dist/cdn/{VMAECY3E.js → WRLB6XFZ.js} +2 -2
- package/dist/cdn/{XHNHEAWO.js → WUPPIKDG.js} +1 -1
- package/dist/cdn/{L2HPOBTI.js → WUWLWWQ6.js} +2 -2
- package/dist/cdn/{3LX4UEMG.js → WYB5UKU7.js} +2 -2
- package/dist/cdn/{MI2ILVKK.js → X2P4SGUR.js} +2 -2
- package/dist/cdn/{USQILMSK.js → XGQOOBLT.js} +2 -2
- package/dist/cdn/{TGB6THII.js → XSN6FWMH.js} +2 -2
- package/dist/cdn/{HY7V66E2.js → Y7JKWXU3.js} +2 -2
- package/dist/cdn/{HKSOVKSS.js → YA3Q555R.js} +2 -2
- package/dist/cdn/YB2JZFAL.js +4 -0
- package/dist/cdn/{UR6UPX4T.js → YBDW7FW6.js} +2 -2
- package/dist/cdn/{PIS5J4L6.js → YMYZDMBM.js} +2 -2
- package/dist/cdn/{WYWH3B2F.js → YROQ3D7Z.js} +2 -2
- package/dist/cdn/{CHVB7IKL.js → YXCASTIP.js} +2 -2
- package/dist/cdn/{ZMB25IZB.js → ZA3IWUHI.js} +2 -2
- package/dist/cdn/{3S24RP6Q.js → ZGMLXO4B.js} +2 -2
- package/dist/cdn/{52WSL3OS.js → ZHK6KUIW.js} +2 -2
- package/dist/cdn/{3T7FBLY4.js → ZOAOP2LU.js} +2 -2
- package/dist/cdn/{IOMZGRK4.js → ZWT36WSD.js} +2 -2
- package/dist/cdn/index.js +2 -2
- package/dist/chunks/ExpandToggle.js +1 -1
- package/dist/chunks/FloatingArrow.js +1 -1
- package/dist/chunks/Heading.js +1 -1
- package/dist/chunks/InternalLabel.js +1 -1
- package/dist/chunks/Validation.js +1 -1
- package/dist/chunks/array.js +1 -1
- package/dist/chunks/component.js +1 -1
- package/dist/chunks/core.js +1 -1
- package/dist/chunks/date.js +1 -1
- package/dist/chunks/dom.js +1 -1
- package/dist/chunks/dynamicClasses.js +1 -1
- package/dist/chunks/filter.js +1 -1
- package/dist/chunks/floating-ui.js +1 -1
- package/dist/chunks/form.js +1 -1
- package/dist/chunks/global.js +1 -1
- package/dist/chunks/guid.js +1 -1
- package/dist/chunks/header.js +1 -1
- package/dist/chunks/input.js +1 -1
- package/dist/chunks/interact.min.js +1 -1
- package/dist/chunks/key.js +1 -1
- package/dist/chunks/label.js +1 -1
- package/dist/chunks/locale.js +1 -1
- package/dist/chunks/logger.js +1 -1
- package/dist/chunks/math.js +1 -1
- package/dist/chunks/observers.js +1 -1
- package/dist/chunks/openCloseComponent.js +1 -1
- package/dist/chunks/resources.js +1 -1
- package/dist/chunks/resources2.js +1 -1
- package/dist/chunks/resources3.js +1 -1
- package/dist/chunks/resources4.js +1 -1
- package/dist/chunks/resources5.js +1 -1
- package/dist/chunks/resources6.js +1 -1
- package/dist/chunks/resources7.js +1 -1
- package/dist/chunks/resources8.js +1 -1
- package/dist/chunks/responsive.js +1 -1
- package/dist/chunks/runtime.js +5 -5
- package/dist/chunks/sortable.js +1 -1
- package/dist/chunks/sortableComponent.js +1 -1
- package/dist/chunks/text.js +1 -1
- package/dist/chunks/useCancelable.js +1 -1
- package/dist/chunks/useFocusTrap.js +1 -1
- package/dist/chunks/useInteractive.js +1 -1
- package/dist/chunks/usePreventDocumentScroll.js +1 -1
- package/dist/chunks/useSetFocus.js +1 -1
- package/dist/chunks/useT9n.js +1 -1
- package/dist/chunks/useTime.js +1 -1
- package/dist/chunks/utils.js +1 -1
- package/dist/chunks/utils2.js +1 -1
- package/dist/chunks/utils3.js +1 -1
- package/dist/chunks/utils4.js +1 -1
- package/dist/components/calcite-accordion/customElement.js +1 -1
- package/dist/components/calcite-accordion-item/customElement.js +1 -1
- package/dist/components/calcite-action/customElement.js +2 -2
- package/dist/components/calcite-action-bar/customElement.js +1 -1
- package/dist/components/calcite-action-group/customElement.js +1 -1
- package/dist/components/calcite-action-menu/customElement.js +1 -1
- package/dist/components/calcite-action-pad/customElement.js +1 -1
- package/dist/components/calcite-alert/customElement.js +1 -1
- package/dist/components/calcite-autocomplete/customElement.js +1 -1
- package/dist/components/calcite-autocomplete-item/customElement.js +1 -1
- package/dist/components/calcite-autocomplete-item-group/customElement.js +1 -1
- package/dist/components/calcite-avatar/customElement.js +1 -1
- package/dist/components/calcite-block/customElement.js +1 -1
- package/dist/components/calcite-block-group/customElement.js +1 -1
- package/dist/components/calcite-block-section/customElement.js +1 -1
- package/dist/components/calcite-button/customElement.js +1 -1
- package/dist/components/calcite-card/customElement.js +1 -1
- package/dist/components/calcite-card-group/customElement.js +1 -1
- package/dist/components/calcite-carousel/customElement.js +1 -1
- package/dist/components/calcite-carousel-item/customElement.js +1 -1
- package/dist/components/calcite-checkbox/customElement.js +1 -1
- package/dist/components/calcite-chip/customElement.js +1 -1
- package/dist/components/calcite-chip-group/customElement.js +1 -1
- package/dist/components/calcite-color-picker/customElement.js +1 -1
- package/dist/components/calcite-color-picker-hex-input/customElement.js +1 -1
- package/dist/components/calcite-color-picker-swatch/customElement.js +1 -1
- package/dist/components/calcite-combobox/customElement.d.ts +6 -0
- package/dist/components/calcite-combobox/customElement.js +38 -28
- package/dist/components/calcite-combobox-item/customElement.d.ts +3 -2
- package/dist/components/calcite-combobox-item/customElement.js +11 -4
- package/dist/components/calcite-combobox-item-group/customElement.js +1 -1
- package/dist/components/calcite-date-picker/customElement.js +1 -1
- package/dist/components/calcite-date-picker-day/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month/customElement.js +1 -1
- package/dist/components/calcite-date-picker-month-header/customElement.js +1 -1
- package/dist/components/calcite-dialog/customElement.js +1 -1
- package/dist/components/calcite-dropdown/customElement.js +1 -1
- package/dist/components/calcite-dropdown-group/customElement.js +1 -1
- package/dist/components/calcite-dropdown-item/customElement.js +1 -1
- package/dist/components/calcite-fab/customElement.js +1 -1
- package/dist/components/calcite-filter/customElement.js +1 -1
- package/dist/components/calcite-flow/customElement.js +1 -1
- package/dist/components/calcite-flow-item/customElement.js +1 -1
- package/dist/components/calcite-graph/customElement.js +1 -1
- package/dist/components/calcite-handle/customElement.js +1 -1
- package/dist/components/calcite-icon/customElement.js +1 -1
- package/dist/components/calcite-inline-editable/customElement.js +1 -1
- package/dist/components/calcite-input/customElement.js +1 -1
- package/dist/components/calcite-input-date-picker/customElement.js +1 -1
- package/dist/components/calcite-input-message/customElement.js +1 -1
- package/dist/components/calcite-input-number/customElement.js +1 -1
- package/dist/components/calcite-input-text/customElement.js +1 -1
- package/dist/components/calcite-input-time-picker/customElement.js +1 -1
- package/dist/components/calcite-input-time-zone/customElement.js +1 -1
- package/dist/components/calcite-label/customElement.js +1 -1
- package/dist/components/calcite-link/customElement.js +1 -1
- package/dist/components/calcite-list/customElement.js +1 -1
- package/dist/components/calcite-list-item/customElement.js +1 -1
- package/dist/components/calcite-list-item-group/customElement.js +1 -1
- package/dist/components/calcite-loader/customElement.js +1 -1
- package/dist/components/calcite-menu/customElement.js +1 -1
- package/dist/components/calcite-menu-item/customElement.js +1 -1
- package/dist/components/calcite-meter/customElement.js +1 -1
- package/dist/components/calcite-navigation/customElement.js +1 -1
- package/dist/components/calcite-navigation-logo/customElement.js +1 -1
- package/dist/components/calcite-navigation-user/customElement.js +1 -1
- package/dist/components/calcite-notice/customElement.js +1 -1
- package/dist/components/calcite-option/customElement.js +1 -1
- package/dist/components/calcite-option-group/customElement.js +1 -1
- package/dist/components/calcite-pagination/customElement.js +1 -1
- package/dist/components/calcite-panel/customElement.js +2 -2
- package/dist/components/calcite-panel/resources.d.ts +0 -1
- package/dist/components/calcite-popover/customElement.js +1 -1
- package/dist/components/calcite-progress/customElement.js +1 -1
- package/dist/components/calcite-radio-button/customElement.js +1 -1
- package/dist/components/calcite-radio-button-group/customElement.js +1 -1
- package/dist/components/calcite-rating/customElement.js +1 -1
- package/dist/components/calcite-scrim/customElement.js +1 -1
- package/dist/components/calcite-segmented-control/customElement.js +1 -1
- package/dist/components/calcite-segmented-control-item/customElement.js +1 -1
- package/dist/components/calcite-select/customElement.js +1 -1
- package/dist/components/calcite-sheet/customElement.js +1 -1
- package/dist/components/calcite-shell/customElement.js +1 -1
- package/dist/components/calcite-shell-panel/customElement.d.ts +5 -0
- package/dist/components/calcite-shell-panel/customElement.js +74 -43
- package/dist/components/calcite-slider/customElement.js +1 -1
- package/dist/components/calcite-sort-handle/customElement.js +1 -1
- package/dist/components/calcite-sortable-list/customElement.js +1 -1
- package/dist/components/calcite-split-button/customElement.js +1 -1
- package/dist/components/calcite-stack/customElement.js +1 -1
- package/dist/components/calcite-stepper/customElement.js +1 -1
- package/dist/components/calcite-stepper-item/customElement.js +1 -1
- package/dist/components/calcite-swatch/customElement.js +1 -1
- package/dist/components/calcite-swatch-group/customElement.js +1 -1
- package/dist/components/calcite-switch/customElement.js +1 -1
- package/dist/components/calcite-tab/customElement.js +1 -1
- package/dist/components/calcite-tab-nav/customElement.js +1 -1
- package/dist/components/calcite-tab-title/customElement.js +4 -4
- package/dist/components/calcite-tab-title/index.d.ts +1 -0
- package/dist/components/calcite-tab-title/index.js +1 -0
- package/dist/components/calcite-tab-title/resources.d.ts +1 -0
- package/dist/components/calcite-table/customElement.js +1 -1
- package/dist/components/calcite-table-cell/customElement.js +1 -1
- package/dist/components/calcite-table-header/customElement.js +1 -1
- package/dist/components/calcite-table-row/customElement.js +1 -1
- package/dist/components/calcite-tabs/customElement.js +1 -1
- package/dist/components/calcite-text-area/customElement.js +1 -1
- package/dist/components/calcite-tile/customElement.js +1 -1
- package/dist/components/calcite-tile-group/customElement.js +1 -1
- package/dist/components/calcite-time-picker/customElement.js +1 -1
- package/dist/components/calcite-tooltip/customElement.js +1 -1
- package/dist/components/calcite-tree/customElement.js +1 -1
- package/dist/components/calcite-tree-item/customElement.js +1 -1
- package/dist/components/interfaces.d.ts +1 -0
- package/dist/controllers/useSizeOverride.d.ts +44 -0
- package/dist/docs/api.json +224 -4
- package/dist/docs/docs.json +141 -3
- package/dist/docs/vscode.html-custom-data.json +71 -2
- package/dist/docs/web-types.json +39 -4
- package/dist/index.js +1 -1
- package/dist/loader.js +3 -3
- package/dist/types/lumina.d.ts +1 -1
- package/dist/types/preact.d.ts +1 -1
- package/dist/types/preact10.d.ts +1 -1
- package/dist/types/react.d.ts +1 -1
- package/dist/types/stencil.d.ts +1 -1
- package/package.json +6 -6
- package/dist/cdn/EC6EAHTF.js +0 -4
- package/dist/cdn/GA2OVDMV.js +0 -4
- package/dist/cdn/HN42KFKY.js +0 -4
- package/dist/cdn/M7GQJBGE.js +0 -4
- package/dist/cdn/N4XJYQRH.js +0 -4
- package/dist/cdn/UQIFZG6A.js +0 -4
- package/dist/cdn/YNSRHIEC.js +0 -4
- package/dist/chunks/XButton.js +0 -21
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{c as a}from"./
|
|
3
|
+
v5.0.0-next.28 */
|
|
4
|
+
import{c as a}from"./SWLBZTLD.js";import{b as l}from"./NUDIM2KL.js";import{g as s,l as u}from"./CU3NAWYI.js";var L=()=>l((e,n)=>{let t;function r(){t?.abort()}return n.onLoad(()=>{e.listen("focus",()=>{t=new AbortController,e.el.addEventListener("focusout",r,{signal:t.signal})})}),n.onDisconnected(()=>{e.el.removeEventListener("focusout",r)}),async(c,d)=>{if(e.disabled)return;let o=b(c());if(!o)return;let{target:f,includeContainer:v,strategy:C}=o,i=s(e.el),g=i.activeElement;if(await a(e),!(g!==i.activeElement||t&&!t?.signal.aborted))return e.el.removeEventListener("focus",r),u(f,v,C,e.el,d)}});function m(e){return"target"in e&&("includeContainer"in e||"strategy"in e)}function b(e){if(e)return m(e)?e:{target:e}}export{L as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
3
|
+
v5.0.0-next.28 */
|
|
4
4
|
var t=(r,o,e)=>(e.configurable=!0,e.enumerable=!0,Reflect.decorate&&typeof o!="object"&&Object.defineProperty(r,o,e),e);function f(r){return(o,e)=>{let{slot:n,selector:s}=r??{},u="slot"+(n?`[name=${n}]`:":not([name])");return t(o,e,{get(){let i=this.renderRoot?.querySelector(u),c=i?.assignedElements(r)??[];return s===void 0?c:c.filter((l=>l.matches(s)))}})}}export{f as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as c,b as r,f as d}from"./
|
|
3
|
+
v5.0.0-next.28 */
|
|
4
|
+
import{a as c,b as r,f as d}from"./VAX5Y6UB.js";import"./CU3NAWYI.js";import"./4HYFSWQK.js";import{D as n,E as o,P as s,g as a,h as l,o as i}from"./4DX6AFI7.js";var b={container:"container"},h=a`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex}:host([alignment=start]){text-align:start}:host([alignment=end]){text-align:end}:host([alignment=center]){text-align:center}:host([scale=s]) .container{gap:.25rem;font-size:var(--calcite-font-size--2);line-height:1rem;margin-block-end:var(--calcite-label-margin-bottom, .5rem)}:host([scale=m]) .container{gap:.5rem;font-size:var(--calcite-font-size--1);line-height:1rem;margin-block-end:var(--calcite-label-margin-bottom, .75rem)}:host([scale=l]) .container{gap:.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem;margin-block-end:var(--calcite-label-margin-bottom, 1rem)}:host .container{margin-inline:0px;margin-block-start:0px;inline-size:100%;line-height:1.375;color:var(--calcite-color-text-1);color:var(--calcite-label-text-color, var(--calcite-color-text-1))}:host([layout=block]) .container,:host([layout=default]) .container{display:flex;flex-direction:column}:host([layout=inline]) .container,:host([layout=inline-space-between]) .container{display:flex;flex-direction:row;align-items:center;gap:.5rem}:host([layout=inline][scale=l]) .container{gap:.75rem}:host([layout=inline-space-between]) .container{justify-content:space-between}:host([disabled])>.container{opacity:var(--calcite-opacity-disabled)}:host([disabled]) ::slotted(*[disabled]),:host([disabled]) ::slotted(*[disabled] *){--tw-bg-opacity: 1}:host([disabled]) ::slotted(calcite-input-message:not([active])){--tw-bg-opacity: 0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,t=class extends n{constructor(){super(),this.alignment="start",this.layout="default",this.scale="m",this.calciteInternalLabelClick=i({bubbles:!1,cancelable:!1}),this.listen("click",this.labelClickHandler)}static{this.properties={alignment:[3,{},{reflect:!0}],for:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=h}connectedCallback(){super.connectedCallback(),document.dispatchEvent(new CustomEvent(c))}willUpdate(e){e.has("for")&&d(this.el)}disconnectedCallback(){super.disconnectedCallback(),document.dispatchEvent(new CustomEvent(r))}labelClickHandler(e){window.getSelection()?.type!=="Range"&&this.calciteInternalLabelClick.emit({sourceEvent:e})}render(){return l`<div class=${o(b.container)}><slot></slot></div>`}};s("calcite-label",t);export{t as Label};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{e as u}from"./
|
|
3
|
+
v5.0.0-next.28 */
|
|
4
|
+
import{e as u}from"./MMXI2D6G.js";import{a as d}from"./3NUNHJUT.js";import{D as c,P as h,h as r,o}from"./4DX6AFI7.js";var b=[" ",`
|
|
5
5
|
`," ","\r"],m=/[^\S\u00A0]+/g,a=class extends c{constructor(){super(...arguments),this.mutationObserver=d("mutation",()=>{this.ensureTextContentDependentProps(),this.calciteInternalOptionChange.emit()}),this.disabled=!1,this.calciteInternalOptionChange=o({cancelable:!1})}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],label:1,selected:[7,{},{reflect:!0,type:Boolean}],value:1}}connectedCallback(){super.connectedCallback(),this.ensureTextContentDependentProps(),this.mutationObserver?.observe(this.el,{attributeFilter:["label","value"],characterData:!0,childList:!0,subtree:!0})}willUpdate(e){e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handlePropChange(this.disabled,e.get("disabled"),"disabled"),e.has("label")&&this.handlePropChange(this.label,e.get("label"),"label"),e.has("selected")&&this.handlePropChange(this.selected,e.get("selected"),"selected"),e.has("value")&&this.handlePropChange(this.value,e.get("value"),"value")}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect()}handlePropChange(e,s,t){(t==="label"||t==="value")&&this.ensureTextContentDependentProps(),this.calciteInternalOptionChange.emit()}ensureTextContentDependentProps(){let{el:e,internallySetLabel:s,internallySetValue:t,label:p,value:i}=this,l=u(e.textContent,b).replaceAll(m," "),n=p;(!n||n===s)&&(this.label=l,this.internallySetLabel=l),(i==null||i===t)&&(this.value=l,this.internallySetValue=l)}render(){return r`<slot>${this.label}</slot>`}};h("calcite-option",a);export{a as Option};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as Dt}from"./CWNLGPSB.js";import{e as Lt}from"./5DDVN7VT.js";import{K as Tt}from"./S3LMUVIR.js";var vt=["top","right","bottom","left"],Ft=["start","end"],bt=vt.reduce((t,e)=>t.concat(e,e+"-"+Ft[0],e+"-"+Ft[1]),[]),j=Math.min,V=Math.max,rt=Math.round,ct=Math.floor,M=t=>({x:t,y:t}),Oe={left:"right",right:"left",bottom:"top",top:"bottom"},Re={start:"end",end:"start"};function ut(t,e,n){return V(t,j(e,n))}function X(t,e){return typeof t=="function"?t(e):t}function W(t){return t.split("-")[0]}function k(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function dt(t){return t==="y"?"height":"width"}var Se=new Set(["top","bottom"]);function _(t){return Se.has(W(t))?"y":"x"}function mt(t){return At(_(t))}function Ot(t,e,n){n===void 0&&(n=!1);let o=k(t),i=mt(t),r=dt(i),s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=st(s)),[s,st(s)]}function Nt(t){let e=st(t);return[it(t),e,it(e)]}function it(t){return t.replace(/start|end/g,e=>Re[e])}var Mt=["left","right"],kt=["right","left"],Pe=["top","bottom"],Ce=["bottom","top"];function Ee(t,e,n){switch(t){case"top":case"bottom":return n?e?kt:Mt:e?Mt:kt;case"left":case"right":return e?Pe:Ce;default:return[]}}function Bt(t,e,n,o){let i=k(t),r=Ee(W(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(it)))),r}function st(t){return t.replace(/left|right|bottom|top/g,e=>Oe[e])}function Te(t){return{top:0,right:0,bottom:0,left:0,...t}}function Rt(t){return typeof t!="number"?Te(t):{top:t,right:t,bottom:t,left:t}}function K(t){let{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Wt(t,e,n){let{reference:o,floating:i}=t,r=_(e),s=mt(e),c=dt(s),l=W(e),a=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2,f;switch(l){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(k(e)){case"start":f[s]-=m*(n&&a?-1:1);break;case"end":f[s]+=m*(n&&a?-1:1);break}return f}var Vt=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=r.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e)),a=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Wt(a,o,l),m=o,f={},g=0;for(let h=0;h<c.length;h++){let{name:p,fn:w}=c[h],{x,y,data:b,reset:v}=await w({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:f,rects:a,platform:s,elements:{reference:t,floating:e}});d=x??d,u=y??u,f={...f,[p]:{...f[p],...b}},v&&g<=50&&(g++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(a=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:d,y:u}=Wt(a,m,l)),h=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:f}};async function Z(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=X(e,t),g=Rt(f),p=c[m?u==="floating"?"reference":"floating":u],w=K(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(p)))==null||n?p:p.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:d,strategy:l})),x=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),b=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},v=K(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:l}):x);return{top:(w.top-v.top+g.top)/b.y,bottom:(v.bottom-w.bottom+g.bottom)/b.y,left:(w.left-v.left+g.left)/b.x,right:(v.right-w.right+g.right)/b.x}}var _t=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:d=0}=X(t,e)||{};if(a==null)return{};let u=Rt(d),m={x:n,y:o},f=mt(i),g=dt(f),h=await s.getDimensions(a),p=f==="y",w=p?"top":"left",x=p?"bottom":"right",y=p?"clientHeight":"clientWidth",b=r.reference[g]+r.reference[f]-m[f]-r.floating[g],v=m[f]-r.reference[f],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a)),O=R?R[y]:0;(!O||!await(s.isElement==null?void 0:s.isElement(R)))&&(O=c.floating[y]||r.floating[g]);let I=b/2-v/2,C=O/2-h[g]/2-1,A=j(u[w],C),L=j(u[x],C),$=A,Y=O-h[g]-L,S=O/2-h[g]/2+I,q=ut($,S,Y),H=!l.arrow&&k(i)!=null&&S!==q&&r.reference[g]/2-(S<$?A:L)-h[g]/2<0,D=H?S<$?S-$:S-Y:0;return{[f]:m[f]+D,data:{[f]:q,centerOffset:S-q-D,...H&&{alignmentOffset:D}},reset:H}}});function Le(t,e,n){return(t?[...n.filter(i=>k(i)===t),...n.filter(i=>k(i)!==t)]:n.filter(i=>W(i)===i)).filter(i=>t?k(i)===t||(e?it(i)!==i:!1):!0)}var zt=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;let{rects:r,middlewareData:s,placement:c,platform:l,elements:a}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=bt,autoAlignment:f=!0,...g}=X(t,e),h=u!==void 0||m===bt?Le(u||null,f,m):m,p=await Z(e,g),w=((n=s.autoPlacement)==null?void 0:n.index)||0,x=h[w];if(x==null)return{};let y=Ot(x,r,await(l.isRTL==null?void 0:l.isRTL(a.floating)));if(c!==x)return{reset:{placement:h[0]}};let b=[p[W(x)],p[y[0]],p[y[1]]],v=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:x,overflows:b}],R=h[w+1];if(R)return{data:{index:w+1,overflows:v},reset:{placement:R}};let O=v.map(A=>{let L=k(A.placement);return[A.placement,L&&d?A.overflows.slice(0,2).reduce(($,Y)=>$+Y,0):A.overflows[0],A.overflows]}).sort((A,L)=>A[1]-L[1]),C=((i=O.filter(A=>A[2].slice(0,k(A[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||O[0][0];return C!==c?{data:{index:w+1,overflows:v},reset:{placement:C}}:{}}}},It=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...p}=X(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};let w=W(i),x=_(c),y=W(c)===c,b=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=m||(y||!h?[st(c)]:Nt(c)),R=g!=="none";!m&&R&&v.push(...Bt(c,h,g,b));let O=[c,...v],I=await Z(e,p),C=[],A=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&C.push(I[w]),u){let S=Ot(i,s,b);C.push(I[S[0]],I[S[1]])}if(A=[...A,{placement:i,overflows:C}],!C.every(S=>S<=0)){var L,$;let S=(((L=r.flip)==null?void 0:L.index)||0)+1,q=O[S];if(q&&(!(u==="alignment"?x!==_(q):!1)||A.every(F=>_(F.placement)===x?F.overflows[0]>0:!0)))return{data:{index:S,overflows:A},reset:{placement:q}};let H=($=A.filter(D=>D.overflows[0]<=0).sort((D,F)=>D.overflows[1]-F.overflows[1])[0])==null?void 0:$.placement;if(!H)switch(f){case"bestFit":{var Y;let D=(Y=A.filter(F=>{if(R){let U=_(F.placement);return U===x||U==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(U=>U>0).reduce((U,Ae)=>U+Ae,0)]).sort((F,U)=>F[1]-U[1])[0])==null?void 0:Y[0];D&&(H=D);break}case"initialPlacement":H=c;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function $t(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ht(t){return vt.some(e=>t[e]>=0)}var Ut=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n}=e,{strategy:o="referenceHidden",...i}=X(t,e);switch(o){case"referenceHidden":{let r=await Z(e,{...i,elementContext:"reference"}),s=$t(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Ht(s)}}}case"escaped":{let r=await Z(e,{...i,altBoundary:!0}),s=$t(r,n.floating);return{data:{escapedOffsets:s,escaped:Ht(s)}}}default:return{}}}}};var De=new Set(["left","top"]);async function Fe(t,e){let{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=W(n),c=k(n),l=_(n)==="y",a=De.has(s)?-1:1,d=r&&l?-1:1,u=X(e,t),{mainAxis:m,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(f=c==="end"?g*-1:g),l?{x:f*d,y:m*a}:{x:m*a,y:f*d}}var jt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:r,placement:s,middlewareData:c}=e,l=await Fe(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},Xt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:p=>{let{x:w,y:x}=p;return{x:w,y:x}}},...l}=X(t,e),a={x:n,y:o},d=await Z(e,l),u=_(W(i)),m=At(u),f=a[m],g=a[u];if(r){let p=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=f+d[p],y=f-d[w];f=ut(x,f,y)}if(s){let p=u==="y"?"top":"left",w=u==="y"?"bottom":"right",x=g+d[p],y=g-d[w];g=ut(x,g,y)}let h=c.fn({...e,[m]:f,[u]:g});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[m]:r,[u]:s}}}}}};function gt(){return typeof window<"u"}function G(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function P(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function N(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return gt()?t instanceof Node||t instanceof P(t).Node:!1}function E(t){return gt()?t instanceof Element||t instanceof P(t).Element:!1}function B(t){return gt()?t instanceof HTMLElement||t instanceof P(t).HTMLElement:!1}function Yt(t){return!gt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof P(t).ShadowRoot}var Me=new Set(["inline","contents"]);function et(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=T(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Me.has(i)}var ke=new Set(["table","td","th"]);function Kt(t){return ke.has(G(t))}var Ne=[":popover-open",":modal"];function lt(t){return Ne.some(e=>{try{return t.matches(e)}catch{return!1}})}var Be=["transform","translate","scale","rotate","perspective"],We=["transform","translate","scale","rotate","perspective","filter"],$e=["paint","layout","strict","content"];function nt(t){let e=ht(),n=E(t)?T(t):t;return Be.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||We.some(o=>(n.willChange||"").includes(o))||$e.some(o=>(n.contain||"").includes(o))}function Gt(t){let e=z(t);for(;B(e)&&!J(e);){if(nt(e))return e;if(lt(e))return null;e=z(e)}return null}function ht(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var He=new Set(["html","body","#document"]);function J(t){return He.has(G(t))}function T(t){return P(t).getComputedStyle(t)}function at(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function z(t){if(G(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Yt(t)&&t.host||N(t);return Yt(e)?e.host:e}function Jt(t){let e=z(t);return J(e)?t.ownerDocument?t.ownerDocument.body:t.body:B(e)&&et(e)?e:Jt(e)}function tt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Jt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=P(i);if(r){let c=pt(s);return e.concat(s,s.visualViewport||[],et(i)?i:[],c&&n?tt(c):[])}return e.concat(i,tt(i,[],n))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){let e=T(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=B(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=rt(n)!==r||rt(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function Pt(t){return E(t)?t:t.contextElement}function ot(t){let e=Pt(t);if(!B(e))return M(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:r}=ee(e),s=(r?rt(n.width):n.width)/o,c=(r?rt(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var Ve=M(0);function ne(t){let e=P(t);return!ht()||!e.visualViewport?Ve:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function _e(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==P(t)?!1:e}function Q(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),r=Pt(t),s=M(1);e&&(o?E(o)&&(s=ot(o)):s=ot(t));let c=_e(r,n,o)?ne(r):M(0),l=(i.left+c.x)/s.x,a=(i.top+c.y)/s.y,d=i.width/s.x,u=i.height/s.y;if(r){let m=P(r),f=o&&E(o)?P(o):o,g=m,h=pt(g);for(;h&&o&&f!==g;){let p=ot(h),w=h.getBoundingClientRect(),x=T(h),y=w.left+(h.clientLeft+parseFloat(x.paddingLeft))*p.x,b=w.top+(h.clientTop+parseFloat(x.paddingTop))*p.y;l*=p.x,a*=p.y,d*=p.x,u*=p.y,l+=y,a+=b,g=P(h),h=pt(g)}}return K({width:d,height:u,x:l,y:a})}function wt(t,e){let n=at(t).scrollLeft;return e?e.left+n:Q(N(t)).left+n}function oe(t,e){let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-wt(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function ze(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,r=i==="fixed",s=N(o),c=e?lt(e.floating):!1;if(o===s||c&&r)return n;let l={scrollLeft:0,scrollTop:0},a=M(1),d=M(0),u=B(o);if((u||!u&&!r)&&((G(o)!=="body"||et(s))&&(l=at(o)),B(o))){let f=Q(o);a=ot(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}let m=s&&!u&&!r?oe(s,l):M(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+d.x+m.x,y:n.y*a.y-l.scrollTop*a.y+d.y+m.y}}function Ie(t){return Array.from(t.getClientRects())}function Ue(t){let e=N(t),n=at(t),o=t.ownerDocument.body,i=V(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=V(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-n.scrollLeft+wt(t),c=-n.scrollTop;return T(o).direction==="rtl"&&(s+=V(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}var Qt=25;function je(t,e){let n=P(t),o=N(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,c=0,l=0;if(i){r=i.width,s=i.height;let d=ht();(!d||d&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}let a=wt(o);if(a<=0){let d=o.ownerDocument,u=d.body,m=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(o.clientWidth-u.clientWidth-f);g<=Qt&&(r-=g)}else a<=Qt&&(r+=a);return{width:r,height:s,x:c,y:l}}var Xe=new Set(["absolute","fixed"]);function Ye(t,e){let n=Q(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=B(t)?ot(t):M(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=i*r.x,a=o*r.y;return{width:s,height:c,x:l,y:a}}function Zt(t,e,n){let o;if(e==="viewport")o=je(t,n);else if(e==="document")o=Ue(N(t));else if(E(e))o=Ye(e,n);else{let i=ne(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return K(o)}function ie(t,e){let n=z(t);return n===e||!E(n)||J(n)?!1:T(n).position==="fixed"||ie(n,e)}function qe(t,e){let n=e.get(t);if(n)return n;let o=tt(t,[],!1).filter(c=>E(c)&&G(c)!=="body"),i=null,r=T(t).position==="fixed",s=r?z(t):t;for(;E(s)&&!J(s);){let c=T(s),l=nt(s);!l&&c.position==="fixed"&&(i=null),(r?!l&&!i:!l&&c.position==="static"&&!!i&&Xe.has(i.position)||et(s)&&!l&&ie(t,s))?o=o.filter(d=>d!==s):i=c,s=z(s)}return e.set(t,o),o}function Ke(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,s=[...n==="clippingAncestors"?lt(e)?[]:qe(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,d)=>{let u=Zt(e,d,i);return a.top=V(u.top,a.top),a.right=j(u.right,a.right),a.bottom=j(u.bottom,a.bottom),a.left=V(u.left,a.left),a},Zt(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ge(t){let{width:e,height:n}=ee(t);return{width:e,height:n}}function Je(t,e,n){let o=B(e),i=N(e),r=n==="fixed",s=Q(t,!0,r,e),c={scrollLeft:0,scrollTop:0},l=M(0);function a(){l.x=wt(i)}if(o||!o&&!r)if((G(e)!=="body"||et(i))&&(c=at(e)),o){let f=Q(e,!0,r,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else i&&a();r&&!o&&i&&a();let d=i&&!o&&!r?oe(i,c):M(0),u=s.left+c.scrollLeft-l.x-d.x,m=s.top+c.scrollTop-l.y-d.y;return{x:u,y:m,width:s.width,height:s.height}}function St(t){return T(t).position==="static"}function te(t,e){if(!B(t)||T(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return N(t)===n&&(n=n.ownerDocument.body),n}function se(t,e){let n=P(t);if(lt(t))return n;if(!B(t)){let i=z(t);for(;i&&!J(i);){if(E(i)&&!St(i))return i;i=z(i)}return n}let o=te(t,e);for(;o&&Kt(o)&&St(o);)o=te(o,e);return o&&J(o)&&St(o)&&!nt(o)?n:o||Gt(t)||n}var Qe=async function(t){let e=this.getOffsetParent||se,n=this.getDimensions,o=await n(t.floating);return{reference:Je(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ze(t){return T(t).direction==="rtl"}var xt={convertOffsetParentRelativeRectToViewportRelativeRect:ze,getDocumentElement:N,getClippingRect:Ke,getOffsetParent:se,getElementRects:Qe,getClientRects:Ie,getDimensions:Ge,getScale:ot,isElement:E,isRTL:Ze};function re(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function tn(t,e){let n=null,o,i=N(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();let a=t.getBoundingClientRect(),{left:d,top:u,width:m,height:f}=a;if(c||e(),!m||!f)return;let g=ct(u),h=ct(i.clientWidth-(d+m)),p=ct(i.clientHeight-(u+f)),w=ct(d),y={rootMargin:-g+"px "+-h+"px "+-p+"px "+-w+"px",threshold:V(0,j(1,l))||1},b=!0;function v(R){let O=R[0].intersectionRatio;if(O!==l){if(!b)return s();O?s(!1,O):o=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!re(a,t.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(v,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(v,y)}n.observe(t)}return s(!0),r}function ce(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Pt(t),d=i||r?[...a?tt(a):[],...tt(e)]:[];d.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});let u=a&&c?tn(a,n):null,m=-1,f=null;s&&(f=new ResizeObserver(w=>{let[x]=w;x&&x.target===a&&f&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),a&&!l&&f.observe(a),f.observe(e));let g,h=l?Q(t):null;l&&p();function p(){let w=Q(t);h&&!re(h,w)&&n(),h=w,g=requestAnimationFrame(p)}return n(),()=>{var w;d.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(g)}}var le=jt,ae=zt,fe=Xt,Ct=It;var ue=Ut,de=_t;var me=(t,e,n)=>{let o=new Map,i={platform:xt,...n},r={...i.platform,_c:o};return Vt(t,e,{...i,platform:r})};function ge(t){return en(t)}function Et(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function en(t){for(let e=t;e;e=Et(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Et(t);e;e=Et(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||nt(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=xt.getOffsetParent;xt.getOffsetParent=n=>e(n,ge)}})();function he(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var ye=(async(t,{referenceEl:e,floatingEl:n,overlayPositioning:o="absolute",placement:i,flipDisabled:r,flipPlacements:s,offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})=>{if(!e||!n)return;let u=Lt(n)==="rtl",{x:m,y:f,placement:g,strategy:h,middlewareData:p}=await me(e,n,{strategy:o,placement:i==="auto"||i==="auto-start"||i==="auto-end"?void 0:pe(i,u),middleware:on({placement:i,flipDisabled:r,flipPlacements:s?.map(b=>pe(b,u)),offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})});if(a&&p.arrow){let{x:b,y:v}=p.arrow,R=g.split("-")[0],O=b!=null?"left":"top",I=cn[R],C={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(a.style,{...C,[O]:`${O=="left"?b:v}px`,[R]:"100%",transform:I})}let x=p.hide?.referenceHidden?"hidden":null,y=x?"none":null;n.setAttribute(nn,g),Object.assign(n.style,{pointerEvents:y,position:h,transform:`translate(${he(m)}px,${he(f)}px)`,visibility:x})}),nn="data-placement",ve=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end","leading","trailing","leading-start","leading-end","trailing-start","trailing-end"],Ln="bottom-start",Dn="bottom-end",Fn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function on({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:r,type:s}){let c=[fe(),ue()];return s==="menu"&&c.push(Ct({fallbackPlacements:n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})),c.push(le({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),t==="auto"||t==="auto-start"||t==="auto-end"?c.push(ae({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null})):e||c.push(Ct(n?{fallbackPlacements:n}:{})),r&&c.push(de({element:r})),c}function sn(t){return ve.includes(t)}function Mn(t,e){let n=t.filter(sn);return n.length!==t.length&&console.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ve.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function pe(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function kn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",position:e.overlayPositioning??"absolute"}),!ft.get(t))return be(t);await(n?rn(t):ye)(t,e)}function rn(t){let e=yt.get(t);return e||(e=Dt(ye,Tt.reposition,{edges:["leading","trailing"]}),yt.set(t,e),e)}var cn={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,yt=new WeakMap;async function be(t){let{referenceEl:e,floatingEl:n}=t;if(!n.isConnected)return;let o=ce;ft.set(t,{state:"pending"});let i,r=o(e,n,()=>{let s=t.reposition();i||(i=s)});return ft.set(t,{state:"active",cleanUp:r}),i}function ln(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",pointerEvents:"",position:"",transform:"",visibility:""})}async function Nn(t){let{floatingEl:e,referenceEl:n}=t;if(ln(t),!(!e||!n)&&(an(t),!!t.open))return be(t)}function an(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),yt.get(t)?.cancel(),yt.delete(t)}var we=4,Bn=Math.ceil(Math.hypot(we,we));export{Ln as a,Dn as b,Fn as c,Mn as d,kn as e,ln as f,Nn as g,an as h,Bn as i};
|
|
3
|
+
v5.0.0-next.28 */
|
|
4
|
+
import{a as Dt}from"./MMXI2D6G.js";import{e as Lt}from"./CU3NAWYI.js";import{K as Tt}from"./4DX6AFI7.js";var vt=["top","right","bottom","left"],Ft=["start","end"],bt=vt.reduce((t,e)=>t.concat(e,e+"-"+Ft[0],e+"-"+Ft[1]),[]),j=Math.min,V=Math.max,rt=Math.round,ct=Math.floor,M=t=>({x:t,y:t}),Oe={left:"right",right:"left",bottom:"top",top:"bottom"},Re={start:"end",end:"start"};function ut(t,e,n){return V(t,j(e,n))}function X(t,e){return typeof t=="function"?t(e):t}function W(t){return t.split("-")[0]}function k(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function dt(t){return t==="y"?"height":"width"}var Se=new Set(["top","bottom"]);function _(t){return Se.has(W(t))?"y":"x"}function mt(t){return At(_(t))}function Ot(t,e,n){n===void 0&&(n=!1);let o=k(t),i=mt(t),r=dt(i),s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=st(s)),[s,st(s)]}function Nt(t){let e=st(t);return[it(t),e,it(e)]}function it(t){return t.replace(/start|end/g,e=>Re[e])}var Mt=["left","right"],kt=["right","left"],Pe=["top","bottom"],Ce=["bottom","top"];function Ee(t,e,n){switch(t){case"top":case"bottom":return n?e?kt:Mt:e?Mt:kt;case"left":case"right":return e?Pe:Ce;default:return[]}}function Bt(t,e,n,o){let i=k(t),r=Ee(W(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(it)))),r}function st(t){return t.replace(/left|right|bottom|top/g,e=>Oe[e])}function Te(t){return{top:0,right:0,bottom:0,left:0,...t}}function Rt(t){return typeof t!="number"?Te(t):{top:t,right:t,bottom:t,left:t}}function K(t){let{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Wt(t,e,n){let{reference:o,floating:i}=t,r=_(e),s=mt(e),c=dt(s),l=W(e),a=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2,f;switch(l){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(k(e)){case"start":f[s]-=m*(n&&a?-1:1);break;case"end":f[s]+=m*(n&&a?-1:1);break}return f}var Vt=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=r.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e)),a=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Wt(a,o,l),m=o,f={},g=0;for(let h=0;h<c.length;h++){let{name:p,fn:w}=c[h],{x,y,data:b,reset:v}=await w({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:f,rects:a,platform:s,elements:{reference:t,floating:e}});d=x??d,u=y??u,f={...f,[p]:{...f[p],...b}},v&&g<=50&&(g++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(a=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:d,y:u}=Wt(a,m,l)),h=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:f}};async function Z(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=X(e,t),g=Rt(f),p=c[m?u==="floating"?"reference":"floating":u],w=K(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(p)))==null||n?p:p.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:d,strategy:l})),x=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),b=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},v=K(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:l}):x);return{top:(w.top-v.top+g.top)/b.y,bottom:(v.bottom-w.bottom+g.bottom)/b.y,left:(w.left-v.left+g.left)/b.x,right:(v.right-w.right+g.right)/b.x}}var _t=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:d=0}=X(t,e)||{};if(a==null)return{};let u=Rt(d),m={x:n,y:o},f=mt(i),g=dt(f),h=await s.getDimensions(a),p=f==="y",w=p?"top":"left",x=p?"bottom":"right",y=p?"clientHeight":"clientWidth",b=r.reference[g]+r.reference[f]-m[f]-r.floating[g],v=m[f]-r.reference[f],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a)),O=R?R[y]:0;(!O||!await(s.isElement==null?void 0:s.isElement(R)))&&(O=c.floating[y]||r.floating[g]);let I=b/2-v/2,C=O/2-h[g]/2-1,A=j(u[w],C),L=j(u[x],C),$=A,Y=O-h[g]-L,S=O/2-h[g]/2+I,q=ut($,S,Y),H=!l.arrow&&k(i)!=null&&S!==q&&r.reference[g]/2-(S<$?A:L)-h[g]/2<0,D=H?S<$?S-$:S-Y:0;return{[f]:m[f]+D,data:{[f]:q,centerOffset:S-q-D,...H&&{alignmentOffset:D}},reset:H}}});function Le(t,e,n){return(t?[...n.filter(i=>k(i)===t),...n.filter(i=>k(i)!==t)]:n.filter(i=>W(i)===i)).filter(i=>t?k(i)===t||(e?it(i)!==i:!1):!0)}var zt=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;let{rects:r,middlewareData:s,placement:c,platform:l,elements:a}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=bt,autoAlignment:f=!0,...g}=X(t,e),h=u!==void 0||m===bt?Le(u||null,f,m):m,p=await Z(e,g),w=((n=s.autoPlacement)==null?void 0:n.index)||0,x=h[w];if(x==null)return{};let y=Ot(x,r,await(l.isRTL==null?void 0:l.isRTL(a.floating)));if(c!==x)return{reset:{placement:h[0]}};let b=[p[W(x)],p[y[0]],p[y[1]]],v=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:x,overflows:b}],R=h[w+1];if(R)return{data:{index:w+1,overflows:v},reset:{placement:R}};let O=v.map(A=>{let L=k(A.placement);return[A.placement,L&&d?A.overflows.slice(0,2).reduce(($,Y)=>$+Y,0):A.overflows[0],A.overflows]}).sort((A,L)=>A[1]-L[1]),C=((i=O.filter(A=>A[2].slice(0,k(A[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||O[0][0];return C!==c?{data:{index:w+1,overflows:v},reset:{placement:C}}:{}}}},It=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...p}=X(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};let w=W(i),x=_(c),y=W(c)===c,b=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=m||(y||!h?[st(c)]:Nt(c)),R=g!=="none";!m&&R&&v.push(...Bt(c,h,g,b));let O=[c,...v],I=await Z(e,p),C=[],A=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&C.push(I[w]),u){let S=Ot(i,s,b);C.push(I[S[0]],I[S[1]])}if(A=[...A,{placement:i,overflows:C}],!C.every(S=>S<=0)){var L,$;let S=(((L=r.flip)==null?void 0:L.index)||0)+1,q=O[S];if(q&&(!(u==="alignment"?x!==_(q):!1)||A.every(F=>_(F.placement)===x?F.overflows[0]>0:!0)))return{data:{index:S,overflows:A},reset:{placement:q}};let H=($=A.filter(D=>D.overflows[0]<=0).sort((D,F)=>D.overflows[1]-F.overflows[1])[0])==null?void 0:$.placement;if(!H)switch(f){case"bestFit":{var Y;let D=(Y=A.filter(F=>{if(R){let U=_(F.placement);return U===x||U==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(U=>U>0).reduce((U,Ae)=>U+Ae,0)]).sort((F,U)=>F[1]-U[1])[0])==null?void 0:Y[0];D&&(H=D);break}case"initialPlacement":H=c;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function $t(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ht(t){return vt.some(e=>t[e]>=0)}var Ut=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n}=e,{strategy:o="referenceHidden",...i}=X(t,e);switch(o){case"referenceHidden":{let r=await Z(e,{...i,elementContext:"reference"}),s=$t(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Ht(s)}}}case"escaped":{let r=await Z(e,{...i,altBoundary:!0}),s=$t(r,n.floating);return{data:{escapedOffsets:s,escaped:Ht(s)}}}default:return{}}}}};var De=new Set(["left","top"]);async function Fe(t,e){let{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=W(n),c=k(n),l=_(n)==="y",a=De.has(s)?-1:1,d=r&&l?-1:1,u=X(e,t),{mainAxis:m,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(f=c==="end"?g*-1:g),l?{x:f*d,y:m*a}:{x:m*a,y:f*d}}var jt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:r,placement:s,middlewareData:c}=e,l=await Fe(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},Xt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:p=>{let{x:w,y:x}=p;return{x:w,y:x}}},...l}=X(t,e),a={x:n,y:o},d=await Z(e,l),u=_(W(i)),m=At(u),f=a[m],g=a[u];if(r){let p=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=f+d[p],y=f-d[w];f=ut(x,f,y)}if(s){let p=u==="y"?"top":"left",w=u==="y"?"bottom":"right",x=g+d[p],y=g-d[w];g=ut(x,g,y)}let h=c.fn({...e,[m]:f,[u]:g});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[m]:r,[u]:s}}}}}};function gt(){return typeof window<"u"}function G(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function P(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function N(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return gt()?t instanceof Node||t instanceof P(t).Node:!1}function E(t){return gt()?t instanceof Element||t instanceof P(t).Element:!1}function B(t){return gt()?t instanceof HTMLElement||t instanceof P(t).HTMLElement:!1}function Yt(t){return!gt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof P(t).ShadowRoot}var Me=new Set(["inline","contents"]);function et(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=T(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Me.has(i)}var ke=new Set(["table","td","th"]);function Kt(t){return ke.has(G(t))}var Ne=[":popover-open",":modal"];function lt(t){return Ne.some(e=>{try{return t.matches(e)}catch{return!1}})}var Be=["transform","translate","scale","rotate","perspective"],We=["transform","translate","scale","rotate","perspective","filter"],$e=["paint","layout","strict","content"];function nt(t){let e=ht(),n=E(t)?T(t):t;return Be.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||We.some(o=>(n.willChange||"").includes(o))||$e.some(o=>(n.contain||"").includes(o))}function Gt(t){let e=z(t);for(;B(e)&&!J(e);){if(nt(e))return e;if(lt(e))return null;e=z(e)}return null}function ht(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var He=new Set(["html","body","#document"]);function J(t){return He.has(G(t))}function T(t){return P(t).getComputedStyle(t)}function at(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function z(t){if(G(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Yt(t)&&t.host||N(t);return Yt(e)?e.host:e}function Jt(t){let e=z(t);return J(e)?t.ownerDocument?t.ownerDocument.body:t.body:B(e)&&et(e)?e:Jt(e)}function tt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Jt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=P(i);if(r){let c=pt(s);return e.concat(s,s.visualViewport||[],et(i)?i:[],c&&n?tt(c):[])}return e.concat(i,tt(i,[],n))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){let e=T(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=B(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=rt(n)!==r||rt(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function Pt(t){return E(t)?t:t.contextElement}function ot(t){let e=Pt(t);if(!B(e))return M(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:r}=ee(e),s=(r?rt(n.width):n.width)/o,c=(r?rt(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var Ve=M(0);function ne(t){let e=P(t);return!ht()||!e.visualViewport?Ve:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function _e(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==P(t)?!1:e}function Q(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),r=Pt(t),s=M(1);e&&(o?E(o)&&(s=ot(o)):s=ot(t));let c=_e(r,n,o)?ne(r):M(0),l=(i.left+c.x)/s.x,a=(i.top+c.y)/s.y,d=i.width/s.x,u=i.height/s.y;if(r){let m=P(r),f=o&&E(o)?P(o):o,g=m,h=pt(g);for(;h&&o&&f!==g;){let p=ot(h),w=h.getBoundingClientRect(),x=T(h),y=w.left+(h.clientLeft+parseFloat(x.paddingLeft))*p.x,b=w.top+(h.clientTop+parseFloat(x.paddingTop))*p.y;l*=p.x,a*=p.y,d*=p.x,u*=p.y,l+=y,a+=b,g=P(h),h=pt(g)}}return K({width:d,height:u,x:l,y:a})}function wt(t,e){let n=at(t).scrollLeft;return e?e.left+n:Q(N(t)).left+n}function oe(t,e){let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-wt(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function ze(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,r=i==="fixed",s=N(o),c=e?lt(e.floating):!1;if(o===s||c&&r)return n;let l={scrollLeft:0,scrollTop:0},a=M(1),d=M(0),u=B(o);if((u||!u&&!r)&&((G(o)!=="body"||et(s))&&(l=at(o)),B(o))){let f=Q(o);a=ot(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}let m=s&&!u&&!r?oe(s,l):M(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+d.x+m.x,y:n.y*a.y-l.scrollTop*a.y+d.y+m.y}}function Ie(t){return Array.from(t.getClientRects())}function Ue(t){let e=N(t),n=at(t),o=t.ownerDocument.body,i=V(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=V(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-n.scrollLeft+wt(t),c=-n.scrollTop;return T(o).direction==="rtl"&&(s+=V(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}var Qt=25;function je(t,e){let n=P(t),o=N(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,c=0,l=0;if(i){r=i.width,s=i.height;let d=ht();(!d||d&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}let a=wt(o);if(a<=0){let d=o.ownerDocument,u=d.body,m=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(o.clientWidth-u.clientWidth-f);g<=Qt&&(r-=g)}else a<=Qt&&(r+=a);return{width:r,height:s,x:c,y:l}}var Xe=new Set(["absolute","fixed"]);function Ye(t,e){let n=Q(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=B(t)?ot(t):M(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=i*r.x,a=o*r.y;return{width:s,height:c,x:l,y:a}}function Zt(t,e,n){let o;if(e==="viewport")o=je(t,n);else if(e==="document")o=Ue(N(t));else if(E(e))o=Ye(e,n);else{let i=ne(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return K(o)}function ie(t,e){let n=z(t);return n===e||!E(n)||J(n)?!1:T(n).position==="fixed"||ie(n,e)}function qe(t,e){let n=e.get(t);if(n)return n;let o=tt(t,[],!1).filter(c=>E(c)&&G(c)!=="body"),i=null,r=T(t).position==="fixed",s=r?z(t):t;for(;E(s)&&!J(s);){let c=T(s),l=nt(s);!l&&c.position==="fixed"&&(i=null),(r?!l&&!i:!l&&c.position==="static"&&!!i&&Xe.has(i.position)||et(s)&&!l&&ie(t,s))?o=o.filter(d=>d!==s):i=c,s=z(s)}return e.set(t,o),o}function Ke(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,s=[...n==="clippingAncestors"?lt(e)?[]:qe(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,d)=>{let u=Zt(e,d,i);return a.top=V(u.top,a.top),a.right=j(u.right,a.right),a.bottom=j(u.bottom,a.bottom),a.left=V(u.left,a.left),a},Zt(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ge(t){let{width:e,height:n}=ee(t);return{width:e,height:n}}function Je(t,e,n){let o=B(e),i=N(e),r=n==="fixed",s=Q(t,!0,r,e),c={scrollLeft:0,scrollTop:0},l=M(0);function a(){l.x=wt(i)}if(o||!o&&!r)if((G(e)!=="body"||et(i))&&(c=at(e)),o){let f=Q(e,!0,r,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else i&&a();r&&!o&&i&&a();let d=i&&!o&&!r?oe(i,c):M(0),u=s.left+c.scrollLeft-l.x-d.x,m=s.top+c.scrollTop-l.y-d.y;return{x:u,y:m,width:s.width,height:s.height}}function St(t){return T(t).position==="static"}function te(t,e){if(!B(t)||T(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return N(t)===n&&(n=n.ownerDocument.body),n}function se(t,e){let n=P(t);if(lt(t))return n;if(!B(t)){let i=z(t);for(;i&&!J(i);){if(E(i)&&!St(i))return i;i=z(i)}return n}let o=te(t,e);for(;o&&Kt(o)&&St(o);)o=te(o,e);return o&&J(o)&&St(o)&&!nt(o)?n:o||Gt(t)||n}var Qe=async function(t){let e=this.getOffsetParent||se,n=this.getDimensions,o=await n(t.floating);return{reference:Je(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ze(t){return T(t).direction==="rtl"}var xt={convertOffsetParentRelativeRectToViewportRelativeRect:ze,getDocumentElement:N,getClippingRect:Ke,getOffsetParent:se,getElementRects:Qe,getClientRects:Ie,getDimensions:Ge,getScale:ot,isElement:E,isRTL:Ze};function re(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function tn(t,e){let n=null,o,i=N(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();let a=t.getBoundingClientRect(),{left:d,top:u,width:m,height:f}=a;if(c||e(),!m||!f)return;let g=ct(u),h=ct(i.clientWidth-(d+m)),p=ct(i.clientHeight-(u+f)),w=ct(d),y={rootMargin:-g+"px "+-h+"px "+-p+"px "+-w+"px",threshold:V(0,j(1,l))||1},b=!0;function v(R){let O=R[0].intersectionRatio;if(O!==l){if(!b)return s();O?s(!1,O):o=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!re(a,t.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(v,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(v,y)}n.observe(t)}return s(!0),r}function ce(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Pt(t),d=i||r?[...a?tt(a):[],...tt(e)]:[];d.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});let u=a&&c?tn(a,n):null,m=-1,f=null;s&&(f=new ResizeObserver(w=>{let[x]=w;x&&x.target===a&&f&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),a&&!l&&f.observe(a),f.observe(e));let g,h=l?Q(t):null;l&&p();function p(){let w=Q(t);h&&!re(h,w)&&n(),h=w,g=requestAnimationFrame(p)}return n(),()=>{var w;d.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(g)}}var le=jt,ae=zt,fe=Xt,Ct=It;var ue=Ut,de=_t;var me=(t,e,n)=>{let o=new Map,i={platform:xt,...n},r={...i.platform,_c:o};return Vt(t,e,{...i,platform:r})};function ge(t){return en(t)}function Et(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function en(t){for(let e=t;e;e=Et(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Et(t);e;e=Et(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||nt(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=xt.getOffsetParent;xt.getOffsetParent=n=>e(n,ge)}})();function he(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var ye=(async(t,{referenceEl:e,floatingEl:n,overlayPositioning:o="absolute",placement:i,flipDisabled:r,flipPlacements:s,offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})=>{if(!e||!n)return;let u=Lt(n)==="rtl",{x:m,y:f,placement:g,strategy:h,middlewareData:p}=await me(e,n,{strategy:o,placement:i==="auto"||i==="auto-start"||i==="auto-end"?void 0:pe(i,u),middleware:on({placement:i,flipDisabled:r,flipPlacements:s?.map(b=>pe(b,u)),offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})});if(a&&p.arrow){let{x:b,y:v}=p.arrow,R=g.split("-")[0],O=b!=null?"left":"top",I=cn[R],C={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(a.style,{...C,[O]:`${O=="left"?b:v}px`,[R]:"100%",transform:I})}let x=p.hide?.referenceHidden?"hidden":null,y=x?"none":null;n.setAttribute(nn,g),Object.assign(n.style,{pointerEvents:y,position:h,transform:`translate(${he(m)}px,${he(f)}px)`,visibility:x})}),nn="data-placement",ve=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end","leading","trailing","leading-start","leading-end","trailing-start","trailing-end"],Ln="bottom-start",Dn="bottom-end",Fn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function on({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:r,type:s}){let c=[fe(),ue()];return s==="menu"&&c.push(Ct({fallbackPlacements:n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})),c.push(le({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),t==="auto"||t==="auto-start"||t==="auto-end"?c.push(ae({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null})):e||c.push(Ct(n?{fallbackPlacements:n}:{})),r&&c.push(de({element:r})),c}function sn(t){return ve.includes(t)}function Mn(t,e){let n=t.filter(sn);return n.length!==t.length&&console.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ve.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function pe(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function kn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",position:e.overlayPositioning??"absolute"}),!ft.get(t))return be(t);await(n?rn(t):ye)(t,e)}function rn(t){let e=yt.get(t);return e||(e=Dt(ye,Tt.reposition,{edges:["leading","trailing"]}),yt.set(t,e),e)}var cn={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,yt=new WeakMap;async function be(t){let{referenceEl:e,floatingEl:n}=t;if(!n.isConnected)return;let o=ce;ft.set(t,{state:"pending"});let i,r=o(e,n,()=>{let s=t.reposition();i||(i=s)});return ft.set(t,{state:"active",cleanUp:r}),i}function ln(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",pointerEvents:"",position:"",transform:"",visibility:""})}async function Nn(t){let{floatingEl:e,referenceEl:n}=t;if(ln(t),!(!e||!n)&&(an(t),!!t.open))return be(t)}function an(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),yt.get(t)?.cancel(),yt.delete(t)}var we=4,Bn=Math.ceil(Math.hypot(we,we));export{Ln as a,Dn as b,Fn as c,Mn as d,kn as e,ln as f,Nn as g,an as h,Bn as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{a as L}from"./UR6UPX4T.js";import{b as y}from"./WIKB25QH.js";import{e as d}from"./TU3YLD2E.js";import"./WVPOSWB7.js";import"./XHNHEAWO.js";import{a as F}from"./6F7MIVOD.js";import{a as U}from"./LLHJY7FO.js";import{a as C,c as E}from"./WUWREGJO.js";import"./7UWIO6G4.js";import{e as R}from"./5DDVN7VT.js";import"./HTSVYMIU.js";import{B as s,C as l,D,E as i,P as H,g as S,h as n,o as x}from"./S3LMUVIR.js";var e={button:"button",buttonBottomLeft:"button--bottom-left",buttonBottomRight:"button--bottom-right",buttonFractionalSecondDown:"button--fractionalSecond-down",buttonFractionalSecondUp:"button--fractionalSecond-up",buttonHourDown:"button--hour-down",buttonHourUp:"button--hour-up",buttonMeridiemDown:"button--meridiem-down",buttonMeridiemUp:"button--meridiem-up",buttonMinuteDown:"button--minute-down",buttonMinuteUp:"button--minute-up",buttonSecondDown:"button--second-down",buttonSecondUp:"button--second-up",buttonTopLeft:"button--top-left",buttonTopRight:"button--top-right",column:"column",decimalSeparator:"decimal-separator",delimiter:"delimiter",fractionalSecond:"fractionalSecond",hour:"hour",hourSuffix:"hour-suffix",input:"input",inputFocus:"inputFocus",meridiem:"meridiem",minute:"minute",minuteSuffix:"minute-suffix",second:"second",secondSuffix:"second-suffix",showMeridiem:"show-meridiem",showSecond:"show-second",scale:b=>`scale-${b}`,timePicker:"time-picker",meridiemStart:"meridiem--start"},a={chevronUp:"chevron-up",chevronDown:"chevron-down"},Y=S`:host{display:inline-block}.time-picker{display:flex;-webkit-user-select:none;user-select:none;align-items:center;border-width:1px;border-style:solid;font-weight:var(--calcite-font-weight-medium);border-color:var(--calcite-time-picker-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round));color:var(--calcite-time-picker-color, var(--calcite-color-text-1));background-color:var(--calcite-time-picker-background-color, var(--calcite-color-foreground-1));overflow:hidden}.time-picker .column{display:flex;flex-direction:column}.time-picker .meridiem--start{order:-1}.time-picker .button{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;background-color:var(--calcite-time-picker-background-color, var(--calcite-color-foreground-1))}.time-picker .button:hover,.time-picker .button:focus{outline:2px solid transparent;outline-offset:2px;z-index:var(--calcite-z-index-header);outline-offset:0;background-color:var(--calcite-time-picker-button-background-color-hover, var(--calcite-color-foreground-2))}.time-picker .button:active{background-color:var(--calcite-time-picker-button-background-color-press, var(--calcite-color-foreground-3))}.time-picker .button.top-left{border-start-start-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button.bottom-left{border-end-start-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button.top-right{border-start-end-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button.bottom-right{border-end-end-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button calcite-icon{color:var(--calcite-time-picker-icon-color, var(--calcite-color-text-3))}.time-picker .input{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-time-picker-background-color, var(--calcite-color-foreground-1))}.time-picker .input:hover{box-shadow:inset 0 0 0 2px var(--calcite-time-picker-input-border-color-hover, var(--calcite-color-foreground-2));z-index:var(--calcite-z-index-header)}.time-picker .input:focus,.time-picker .input:hover:focus{outline:2px solid transparent;outline-offset:2px;outline-offset:0}.time-picker .input.inputFocus,.time-picker .input:hover.inputFocus{box-shadow:inset 0 0 0 2px var(--calcite-time-picker-input-border-color-press, var(--calcite-color-brand));z-index:var(--calcite-z-index-header)}.time-picker.scale-s{font-size:var(--calcite-font-size--1)}.time-picker.scale-s .button,.time-picker.scale-s .input{padding-inline:var(--calcite-spacing-sm);padding-block:var(--calcite-spacing-xxs)}.time-picker.scale-s:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-spacing-md)}.time-picker.scale-m{font-size:var(--calcite-font-size-0)}.time-picker.scale-m .button,.time-picker.scale-m .input{padding-inline:var(--calcite-spacing-md);padding-block:var(--calcite-spacing-sm)}.time-picker.scale-m:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-spacing-xl)}.time-picker.scale-l{font-size:var(--calcite-font-size-1)}.time-picker.scale-l .button,.time-picker.scale-l .input{padding-inline:var(--calcite-spacing-lg);padding-block:var(--calcite-spacing-md)}.time-picker.scale-l:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-spacing-xxl)}:host([hidden]){display:none}[hidden]{display:none}`,f=class extends D{constructor(){super(),this.fractionalSecondRef=s(),this.hourRef=s(),this.meridiemRef=s(),this.minuteRef=s(),this.pointerActivated=!1,this.secondRef=s(),this.messages=F(),this.focusSetter=U()(this),this.time=L(this),this.hourFormat="user",this.scale="m",this.step=60,this.value=null,this.calciteTimePickerChange=x({cancelable:!1}),this.listen("blur",this.blurHandler),this.listen("calciteTimeChange",this.timeChangeHandler),this.listen("keydown",this.keyDownHandler),this.listen("pointerdown",this.pointerDownHandler)}static{this.properties={activeEl:[16,{},{state:!0}],showFractionalSecond:[16,{},{state:!0}],showSecond:[16,{},{state:!0}],time:[0,{},{attribute:!1}],hourFormat:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numberingSystem:1,scale:[3,{},{reflect:!0}],step:[11,{},{reflect:!0,type:Number}],value:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=Y}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback(),this.toggleSecond()}willUpdate(t){t.has("step")&&(this.hasUpdated||this.step!==60)&&this.toggleSecond(),t.has("value")&&(this.hasUpdated||this.value!==null)&&this.time.setValue(this.value)}blurHandler(){this.activeEl=void 0,this.pointerActivated=!1}keyDownHandler(t){this.pointerActivated=!1;let{defaultPrevented:o,key:r}=t;if(o)return;let{hourFormat:u}=this.time;switch(this.activeEl){case this.hourRef.value:r==="ArrowRight"&&(this.focusPart("minute"),t.preventDefault());break;case this.minuteRef.value:switch(r){case"ArrowLeft":this.focusPart("hour"),t.preventDefault();break;case"ArrowRight":this.step!==60?(this.focusPart("second"),t.preventDefault()):u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.secondRef.value:switch(r){case"ArrowLeft":this.focusPart("minute"),t.preventDefault();break;case"ArrowRight":this.showFractionalSecond?this.focusPart("fractionalSecond"):u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.fractionalSecondRef.value:switch(r){case"ArrowLeft":this.focusPart("second"),t.preventDefault();break;case"ArrowRight":u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.meridiemRef.value:switch(r){case"ArrowLeft":this.showFractionalSecond?this.focusPart("fractionalSecond"):this.step!==60?(this.focusPart("second"),t.preventDefault()):(this.focusPart("minute"),t.preventDefault());break}break}}pointerDownHandler(){this.pointerActivated=!0}async focusPart(t){await E(this),(t==="hour"?this.hourRef:t==="minute"?this.minuteRef:t==="second"?this.secondRef:t==="fractionalSecond"?this.fractionalSecondRef:this.meridiemRef).value?.focus()}focusHandler(t){this.pointerActivated||(this.activeEl=t.currentTarget)}fractionalSecondDownClickHandler(){this.activeEl=this.fractionalSecondRef.value,this.activeEl.focus(),this.time.nudgeFractionalSecond("down")}fractionalSecondUpClickHandler(){this.activeEl=this.fractionalSecondRef.value,this.activeEl.focus(),this.time.nudgeFractionalSecond("up")}hourDownClickHandler(){this.activeEl=this.hourRef.value,this.activeEl.focus(),this.time.decrementHour()}hourUpClickHandler(){this.activeEl=this.hourRef.value,this.activeEl.focus(),this.time.incrementHour()}inputClickHandler(t){this.activeEl=t.target}meridiemUpClickHandler(){this.activeEl=this.meridiemRef.value,this.activeEl.focus(),this.time.toggleMeridiem("up")}meridiemDownClickHandler(){this.activeEl=this.meridiemRef.value,this.activeEl.focus(),this.time.toggleMeridiem("down")}minuteDownClickHandler(){this.activeEl=this.minuteRef.value,this.activeEl.focus(),this.time.decrementMinute()}minuteUpClickHandler(){this.activeEl=this.minuteRef.value,this.activeEl.focus(),this.time.incrementMinute()}secondDownClickHandler(){this.activeEl=this.secondRef.value,this.activeEl.focus(),this.time.decrementSecond()}secondUpClickHandler(){this.activeEl=this.secondRef.value,this.activeEl.focus(),this.time.incrementSecond()}timeChangeHandler(t){t.stopPropagation();let o=t.detail;o!==this.value&&(this.value=o),this.calciteTimePickerChange.emit()}toggleSecond(){this.showSecond=this.step<60,this.stepPrecision=y(this.step),this.showFractionalSecond=this.stepPrecision>0}render(){let{activeEl:t,messages:o,scale:r}=this,{_lang:u}=o,{fractionalSecond:v,handleFractionalSecondKeyDownEvent:P,handleHourKeyDownEvent:M,handleMeridiemKeyDownEvent:z,handleMinuteKeyDownEvent:T,handleSecondKeyDownEvent:A,hour:h,hourFormat:V,localizedDecimalSeparator:N,localizedFractionalSecond:k,localizedHour:I,localizedHourSuffix:K,localizedMeridiem:B,localizedMinute:O,localizedMinuteSuffix:j,localizedSecond:_,localizedSecondSuffix:$,meridiem:w,meridiemOrder:q,minute:m,second:p}=this.time,G=d(h),c=C(r),J=d(m),Q=d(p),W=d(v),X=u!=="bg"&&$,g=V==="12";return n`<div class=${i({[e.timePicker]:!0,[e.showMeridiem]:g,[e.showSecond]:this.showSecond,[e.scale(r)]:!0})} dir=ltr><div class=${i(e.column)} role=group><span .ariaLabel=${o.hourUp} class=${i({[e.button]:!0,[e.buttonHourUp]:!0,[e.buttonTopLeft]:!0})} @click=${this.hourUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.hour} aria-valuemax=23 aria-valuemin=1 .ariaValueNow=${G&&parseInt(h)||"0"} .ariaValueText=${h} class=${i({[e.input]:!0,[e.hour]:!0,[e.inputFocus]:t&&t===this.hourRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${M} role=spinbutton tabindex=0 ${l(this.hourRef)}>${I||"--"}</span><span .ariaLabel=${o.hourDown} class=${i({[e.button]:!0,[e.buttonHourDown]:!0,[e.buttonBottomLeft]:!0})} @click=${this.hourDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div><span class=${i({[e.delimiter]:!0,[e.hourSuffix]:!0})}>${K}</span><div class=${i(e.column)} role=group><span .ariaLabel=${o.minuteUp} class=${i({[e.button]:!0,[e.buttonMinuteUp]:!0})} @click=${this.minuteUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.minute} aria-valuemax=12 aria-valuemin=1 .ariaValueNow=${J&&parseInt(m)||"0"} .ariaValueText=${m} class=${i({[e.input]:!0,[e.minute]:!0,[e.inputFocus]:t&&t===this.minuteRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${T} role=spinbutton tabindex=0 ${l(this.minuteRef)}>${O||"--"}</span><span .ariaLabel=${o.minuteDown} class=${i({[e.button]:!0,[e.buttonMinuteDown]:!0})} @click=${this.minuteDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>${this.showSecond&&n`<span class=${i({[e.delimiter]:!0,[e.minuteSuffix]:!0})}>${j}</span>`||""}${this.showSecond&&n`<div class=${i(e.column)} role=group><span .ariaLabel=${o.secondUp} class=${i({[e.button]:!0,[e.buttonSecondUp]:!0})} @click=${this.secondUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.second} aria-valuemax=59 aria-valuemin=0 .ariaValueNow=${Q&&parseInt(p)||"0"} .ariaValueText=${p} class=${i({[e.input]:!0,[e.second]:!0,[e.inputFocus]:t&&t===this.secondRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${A} role=spinbutton tabindex=0 ${l(this.secondRef)}>${_||"--"}</span><span .ariaLabel=${o.secondDown} class=${i({[e.button]:!0,[e.buttonSecondDown]:!0})} @click=${this.secondDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>`||""}${this.showFractionalSecond&&n`<span class=${i({[e.delimiter]:!0,[e.decimalSeparator]:!0})}>${N}</span>`||""}${this.showFractionalSecond&&n`<div class=${i(e.column)} role=group><span .ariaLabel=${o.fractionalSecondUp} class=${i({[e.button]:!0,[e.buttonFractionalSecondUp]:!0})} @click=${this.fractionalSecondUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.fractionalSecond} aria-valuemax=999 aria-valuemin=1 .ariaValueNow=${W&&parseInt(v)||"0"} .ariaValueText=${k} class=${i({[e.input]:!0,[e.fractionalSecond]:!0,[e.inputFocus]:t&&t===this.fractionalSecondRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${P} role=spinbutton tabindex=0 ${l(this.fractionalSecondRef)}>${k||"".padStart(this.stepPrecision,"-")}</span><span .ariaLabel=${o.fractionalSecondDown} class=${i({[e.button]:!0,[e.buttonFractionalSecondDown]:!0})} @click=${this.fractionalSecondDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>`||""}${X&&n`<span class=${i({[e.delimiter]:!0,[e.secondSuffix]:!0})}>${$.trim()}</span>`||""}${g&&n`<div class=${i({[e.column]:!0,[e.meridiemStart]:q===0||R(this.el)==="rtl"})} role=group><span .ariaLabel=${o.meridiemUp} class=${i({[e.button]:!0,[e.buttonMeridiemUp]:!0,[e.buttonTopRight]:!0})} @click=${this.meridiemUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.meridiem} aria-valuemax=2 aria-valuemin=1 .ariaValueNow=${w==="PM"&&"2"||"1"} .ariaValueText=${w} class=${i({[e.input]:!0,[e.meridiem]:!0,[e.inputFocus]:t&&t===this.meridiemRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${z} role=spinbutton tabindex=0 ${l(this.meridiemRef)}>${B||"--"}</span><span .ariaLabel=${o.meridiemDown} class=${i({[e.button]:!0,[e.buttonMeridiemDown]:!0,[e.buttonBottomRight]:!0})} @click=${this.meridiemDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>`||""}</div>`}};H("calcite-time-picker",f);export{f as TimePicker};
|
|
3
|
+
v5.0.0-next.28 */
|
|
4
|
+
import{a as L}from"./YBDW7FW6.js";import{b as y}from"./DCL3I2DT.js";import{e as d}from"./4ZEIXRNV.js";import"./H6MITS4O.js";import"./WUPPIKDG.js";import{a as F}from"./RU6R2G5Y.js";import{a as U}from"./EMU2AT4J.js";import{a as C,c as E}from"./SWLBZTLD.js";import"./NUDIM2KL.js";import{e as R}from"./CU3NAWYI.js";import"./4HYFSWQK.js";import{B as s,C as l,D,E as i,P as H,g as S,h as n,o as x}from"./4DX6AFI7.js";var e={button:"button",buttonBottomLeft:"button--bottom-left",buttonBottomRight:"button--bottom-right",buttonFractionalSecondDown:"button--fractionalSecond-down",buttonFractionalSecondUp:"button--fractionalSecond-up",buttonHourDown:"button--hour-down",buttonHourUp:"button--hour-up",buttonMeridiemDown:"button--meridiem-down",buttonMeridiemUp:"button--meridiem-up",buttonMinuteDown:"button--minute-down",buttonMinuteUp:"button--minute-up",buttonSecondDown:"button--second-down",buttonSecondUp:"button--second-up",buttonTopLeft:"button--top-left",buttonTopRight:"button--top-right",column:"column",decimalSeparator:"decimal-separator",delimiter:"delimiter",fractionalSecond:"fractionalSecond",hour:"hour",hourSuffix:"hour-suffix",input:"input",inputFocus:"inputFocus",meridiem:"meridiem",minute:"minute",minuteSuffix:"minute-suffix",second:"second",secondSuffix:"second-suffix",showMeridiem:"show-meridiem",showSecond:"show-second",scale:b=>`scale-${b}`,timePicker:"time-picker",meridiemStart:"meridiem--start"},a={chevronUp:"chevron-up",chevronDown:"chevron-down"},Y=S`:host{display:inline-block}.time-picker{display:flex;-webkit-user-select:none;user-select:none;align-items:center;border-width:1px;border-style:solid;font-weight:var(--calcite-font-weight-medium);border-color:var(--calcite-time-picker-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round));color:var(--calcite-time-picker-color, var(--calcite-color-text-1));background-color:var(--calcite-time-picker-background-color, var(--calcite-color-foreground-1));overflow:hidden}.time-picker .column{display:flex;flex-direction:column}.time-picker .meridiem--start{order:-1}.time-picker .button{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;background-color:var(--calcite-time-picker-background-color, var(--calcite-color-foreground-1))}.time-picker .button:hover,.time-picker .button:focus{outline:2px solid transparent;outline-offset:2px;z-index:var(--calcite-z-index-header);outline-offset:0;background-color:var(--calcite-time-picker-button-background-color-hover, var(--calcite-color-foreground-2))}.time-picker .button:active{background-color:var(--calcite-time-picker-button-background-color-press, var(--calcite-color-foreground-3))}.time-picker .button.top-left{border-start-start-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button.bottom-left{border-end-start-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button.top-right{border-start-end-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button.bottom-right{border-end-end-radius:var(--calcite-time-picker-corner-radius, var(--calcite-border-radius-round))}.time-picker .button calcite-icon{color:var(--calcite-time-picker-icon-color, var(--calcite-color-text-3))}.time-picker .input{display:inline-flex;cursor:pointer;align-items:center;justify-content:center;font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-time-picker-background-color, var(--calcite-color-foreground-1))}.time-picker .input:hover{box-shadow:inset 0 0 0 2px var(--calcite-time-picker-input-border-color-hover, var(--calcite-color-foreground-2));z-index:var(--calcite-z-index-header)}.time-picker .input:focus,.time-picker .input:hover:focus{outline:2px solid transparent;outline-offset:2px;outline-offset:0}.time-picker .input.inputFocus,.time-picker .input:hover.inputFocus{box-shadow:inset 0 0 0 2px var(--calcite-time-picker-input-border-color-press, var(--calcite-color-brand));z-index:var(--calcite-z-index-header)}.time-picker.scale-s{font-size:var(--calcite-font-size--1)}.time-picker.scale-s .button,.time-picker.scale-s .input{padding-inline:var(--calcite-spacing-sm);padding-block:var(--calcite-spacing-xxs)}.time-picker.scale-s:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-spacing-md)}.time-picker.scale-m{font-size:var(--calcite-font-size-0)}.time-picker.scale-m .button,.time-picker.scale-m .input{padding-inline:var(--calcite-spacing-md);padding-block:var(--calcite-spacing-sm)}.time-picker.scale-m:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-spacing-xl)}.time-picker.scale-l{font-size:var(--calcite-font-size-1)}.time-picker.scale-l .button,.time-picker.scale-l .input{padding-inline:var(--calcite-spacing-lg);padding-block:var(--calcite-spacing-md)}.time-picker.scale-l:not(.show-meridiem) .delimiter:last-child{padding-inline-end:var(--calcite-spacing-xxl)}:host([hidden]){display:none}[hidden]{display:none}`,f=class extends D{constructor(){super(),this.fractionalSecondRef=s(),this.hourRef=s(),this.meridiemRef=s(),this.minuteRef=s(),this.pointerActivated=!1,this.secondRef=s(),this.messages=F(),this.focusSetter=U()(this),this.time=L(this),this.hourFormat="user",this.scale="m",this.step=60,this.value=null,this.calciteTimePickerChange=x({cancelable:!1}),this.listen("blur",this.blurHandler),this.listen("calciteTimeChange",this.timeChangeHandler),this.listen("keydown",this.keyDownHandler),this.listen("pointerdown",this.pointerDownHandler)}static{this.properties={activeEl:[16,{},{state:!0}],showFractionalSecond:[16,{},{state:!0}],showSecond:[16,{},{state:!0}],time:[0,{},{attribute:!1}],hourFormat:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],numberingSystem:1,scale:[3,{},{reflect:!0}],step:[11,{},{reflect:!0,type:Number}],value:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=Y}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback(),this.toggleSecond()}willUpdate(t){t.has("step")&&(this.hasUpdated||this.step!==60)&&this.toggleSecond(),t.has("value")&&(this.hasUpdated||this.value!==null)&&this.time.setValue(this.value)}blurHandler(){this.activeEl=void 0,this.pointerActivated=!1}keyDownHandler(t){this.pointerActivated=!1;let{defaultPrevented:o,key:r}=t;if(o)return;let{hourFormat:u}=this.time;switch(this.activeEl){case this.hourRef.value:r==="ArrowRight"&&(this.focusPart("minute"),t.preventDefault());break;case this.minuteRef.value:switch(r){case"ArrowLeft":this.focusPart("hour"),t.preventDefault();break;case"ArrowRight":this.step!==60?(this.focusPart("second"),t.preventDefault()):u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.secondRef.value:switch(r){case"ArrowLeft":this.focusPart("minute"),t.preventDefault();break;case"ArrowRight":this.showFractionalSecond?this.focusPart("fractionalSecond"):u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.fractionalSecondRef.value:switch(r){case"ArrowLeft":this.focusPart("second"),t.preventDefault();break;case"ArrowRight":u==="12"&&(this.focusPart("meridiem"),t.preventDefault());break}break;case this.meridiemRef.value:switch(r){case"ArrowLeft":this.showFractionalSecond?this.focusPart("fractionalSecond"):this.step!==60?(this.focusPart("second"),t.preventDefault()):(this.focusPart("minute"),t.preventDefault());break}break}}pointerDownHandler(){this.pointerActivated=!0}async focusPart(t){await E(this),(t==="hour"?this.hourRef:t==="minute"?this.minuteRef:t==="second"?this.secondRef:t==="fractionalSecond"?this.fractionalSecondRef:this.meridiemRef).value?.focus()}focusHandler(t){this.pointerActivated||(this.activeEl=t.currentTarget)}fractionalSecondDownClickHandler(){this.activeEl=this.fractionalSecondRef.value,this.activeEl.focus(),this.time.nudgeFractionalSecond("down")}fractionalSecondUpClickHandler(){this.activeEl=this.fractionalSecondRef.value,this.activeEl.focus(),this.time.nudgeFractionalSecond("up")}hourDownClickHandler(){this.activeEl=this.hourRef.value,this.activeEl.focus(),this.time.decrementHour()}hourUpClickHandler(){this.activeEl=this.hourRef.value,this.activeEl.focus(),this.time.incrementHour()}inputClickHandler(t){this.activeEl=t.target}meridiemUpClickHandler(){this.activeEl=this.meridiemRef.value,this.activeEl.focus(),this.time.toggleMeridiem("up")}meridiemDownClickHandler(){this.activeEl=this.meridiemRef.value,this.activeEl.focus(),this.time.toggleMeridiem("down")}minuteDownClickHandler(){this.activeEl=this.minuteRef.value,this.activeEl.focus(),this.time.decrementMinute()}minuteUpClickHandler(){this.activeEl=this.minuteRef.value,this.activeEl.focus(),this.time.incrementMinute()}secondDownClickHandler(){this.activeEl=this.secondRef.value,this.activeEl.focus(),this.time.decrementSecond()}secondUpClickHandler(){this.activeEl=this.secondRef.value,this.activeEl.focus(),this.time.incrementSecond()}timeChangeHandler(t){t.stopPropagation();let o=t.detail;o!==this.value&&(this.value=o),this.calciteTimePickerChange.emit()}toggleSecond(){this.showSecond=this.step<60,this.stepPrecision=y(this.step),this.showFractionalSecond=this.stepPrecision>0}render(){let{activeEl:t,messages:o,scale:r}=this,{_lang:u}=o,{fractionalSecond:v,handleFractionalSecondKeyDownEvent:P,handleHourKeyDownEvent:M,handleMeridiemKeyDownEvent:z,handleMinuteKeyDownEvent:T,handleSecondKeyDownEvent:A,hour:h,hourFormat:V,localizedDecimalSeparator:N,localizedFractionalSecond:k,localizedHour:I,localizedHourSuffix:K,localizedMeridiem:B,localizedMinute:O,localizedMinuteSuffix:j,localizedSecond:_,localizedSecondSuffix:$,meridiem:w,meridiemOrder:q,minute:m,second:p}=this.time,G=d(h),c=C(r),J=d(m),Q=d(p),W=d(v),X=u!=="bg"&&$,g=V==="12";return n`<div class=${i({[e.timePicker]:!0,[e.showMeridiem]:g,[e.showSecond]:this.showSecond,[e.scale(r)]:!0})} dir=ltr><div class=${i(e.column)} role=group><span .ariaLabel=${o.hourUp} class=${i({[e.button]:!0,[e.buttonHourUp]:!0,[e.buttonTopLeft]:!0})} @click=${this.hourUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.hour} aria-valuemax=23 aria-valuemin=1 .ariaValueNow=${G&&parseInt(h)||"0"} .ariaValueText=${h} class=${i({[e.input]:!0,[e.hour]:!0,[e.inputFocus]:t&&t===this.hourRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${M} role=spinbutton tabindex=0 ${l(this.hourRef)}>${I||"--"}</span><span .ariaLabel=${o.hourDown} class=${i({[e.button]:!0,[e.buttonHourDown]:!0,[e.buttonBottomLeft]:!0})} @click=${this.hourDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div><span class=${i({[e.delimiter]:!0,[e.hourSuffix]:!0})}>${K}</span><div class=${i(e.column)} role=group><span .ariaLabel=${o.minuteUp} class=${i({[e.button]:!0,[e.buttonMinuteUp]:!0})} @click=${this.minuteUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.minute} aria-valuemax=12 aria-valuemin=1 .ariaValueNow=${J&&parseInt(m)||"0"} .ariaValueText=${m} class=${i({[e.input]:!0,[e.minute]:!0,[e.inputFocus]:t&&t===this.minuteRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${T} role=spinbutton tabindex=0 ${l(this.minuteRef)}>${O||"--"}</span><span .ariaLabel=${o.minuteDown} class=${i({[e.button]:!0,[e.buttonMinuteDown]:!0})} @click=${this.minuteDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>${this.showSecond&&n`<span class=${i({[e.delimiter]:!0,[e.minuteSuffix]:!0})}>${j}</span>`||""}${this.showSecond&&n`<div class=${i(e.column)} role=group><span .ariaLabel=${o.secondUp} class=${i({[e.button]:!0,[e.buttonSecondUp]:!0})} @click=${this.secondUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.second} aria-valuemax=59 aria-valuemin=0 .ariaValueNow=${Q&&parseInt(p)||"0"} .ariaValueText=${p} class=${i({[e.input]:!0,[e.second]:!0,[e.inputFocus]:t&&t===this.secondRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${A} role=spinbutton tabindex=0 ${l(this.secondRef)}>${_||"--"}</span><span .ariaLabel=${o.secondDown} class=${i({[e.button]:!0,[e.buttonSecondDown]:!0})} @click=${this.secondDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>`||""}${this.showFractionalSecond&&n`<span class=${i({[e.delimiter]:!0,[e.decimalSeparator]:!0})}>${N}</span>`||""}${this.showFractionalSecond&&n`<div class=${i(e.column)} role=group><span .ariaLabel=${o.fractionalSecondUp} class=${i({[e.button]:!0,[e.buttonFractionalSecondUp]:!0})} @click=${this.fractionalSecondUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.fractionalSecond} aria-valuemax=999 aria-valuemin=1 .ariaValueNow=${W&&parseInt(v)||"0"} .ariaValueText=${k} class=${i({[e.input]:!0,[e.fractionalSecond]:!0,[e.inputFocus]:t&&t===this.fractionalSecondRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${P} role=spinbutton tabindex=0 ${l(this.fractionalSecondRef)}>${k||"".padStart(this.stepPrecision,"-")}</span><span .ariaLabel=${o.fractionalSecondDown} class=${i({[e.button]:!0,[e.buttonFractionalSecondDown]:!0})} @click=${this.fractionalSecondDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>`||""}${X&&n`<span class=${i({[e.delimiter]:!0,[e.secondSuffix]:!0})}>${$.trim()}</span>`||""}${g&&n`<div class=${i({[e.column]:!0,[e.meridiemStart]:q===0||R(this.el)==="rtl"})} role=group><span .ariaLabel=${o.meridiemUp} class=${i({[e.button]:!0,[e.buttonMeridiemUp]:!0,[e.buttonTopRight]:!0})} @click=${this.meridiemUpClickHandler} role=button><calcite-icon .icon=${a.chevronUp} .scale=${c}></calcite-icon></span><span .ariaLabel=${o.meridiem} aria-valuemax=2 aria-valuemin=1 .ariaValueNow=${w==="PM"&&"2"||"1"} .ariaValueText=${w} class=${i({[e.input]:!0,[e.meridiem]:!0,[e.inputFocus]:t&&t===this.meridiemRef.value})} @click=${this.inputClickHandler} @focus=${this.focusHandler} @keydown=${z} role=spinbutton tabindex=0 ${l(this.meridiemRef)}>${B||"--"}</span><span .ariaLabel=${o.meridiemDown} class=${i({[e.button]:!0,[e.buttonMeridiemDown]:!0,[e.buttonBottomRight]:!0})} @click=${this.meridiemDownClickHandler} role=button><calcite-icon .icon=${a.chevronDown} .scale=${c}></calcite-icon></span></div>`||""}</div>`}};H("calcite-time-picker",f);export{f as TimePicker};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{
|
|
3
|
+
v5.0.0-next.28 */
|
|
4
|
+
import{b as o}from"./NUDIM2KL.js";import{E as r,h as i}from"./4DX6AFI7.js";var l={container:"interaction-container"},d=({children:e,disabled:t})=>i`<div class=${r(l.container)} .inert=${t}>${e}</div>`,k=o((e,t)=>(t.onUpdated(()=>f(e)),d));function u(){let{disabled:e}=this;e||HTMLElement.prototype.click.call(this)}function a(e){e.target.disabled&&e.preventDefault()}var c=["mousedown","mouseup","click"];function s(e){e.target.disabled&&(e.stopImmediatePropagation(),e.preventDefault())}var n={capture:!0};function f(e){if(e.disabled){e.el.setAttribute("aria-disabled","true"),e.el.contains(document.activeElement)&&document.activeElement.blur(),v(e);return}m(e),e.el.removeAttribute("aria-disabled")}function v(e){e.el.click=u,b(e.el)}function b(e){e.addEventListener("pointerdown",a,n),c.forEach(t=>e.addEventListener(t,s,n))}function m(e){delete e.el.click,E(e.el)}function E(e){e.removeEventListener("pointerdown",a,n),c.forEach(t=>e.removeEventListener(t,s,n))}export{k as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{b as p,d as f}from"./
|
|
3
|
+
v5.0.0-next.28 */
|
|
4
|
+
import{b as p,d as f}from"./MMXI2D6G.js";function e(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(e).join(",");let o=String(r);return o==="0"&&Object.is(Number(r),-0)?"-0":o}function m(r){return f(e(r))}function x(r,o=p){if(r==null)return r;for(let t in r)if(o(r[t],t,r)===!1)break;return r}export{x as a,m as b};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{B as a}from"./
|
|
3
|
+
v5.0.0-next.28 */
|
|
4
|
+
import{B as a}from"./CU3NAWYI.js";function r(i){return i[i.openProp||"open"]}async function f(i){await i.updateComplete,r(i)?i.onBeforeOpen():i.onBeforeClose(),await i.updateComplete;let e=s(i)?i.transitionRef.value:i.transitionEl;e&&await a(e,i.transitionProp),r(i)?i.onOpen():i.onClose()}function s(i){return!!i.transitionRef}export{f as a};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{e as B,f as G,g as T}from"./E4EYXCOT.js";var O={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(let t in O)Object.freeze(O[t]);var M=Object.freeze(O);var W=Object.create(null);for(let t in M)Object.hasOwn(M,t)&&(W[M[t]]=t);var _={to:{},get:{}};_.get=function(t){let e=t.slice(0,3).toLowerCase(),n,r;switch(e){case"hsl":{n=_.get.hsl(t),r="hsl";break}case"hwb":{n=_.get.hwb(t),r="hwb";break}default:{n=_.get.rgb(t),r="rgb";break}}return n?{model:r,value:n}:null};_.get.rgb=function(t){if(!t)return null;let e=/^#([a-f\d]{3,4})$/i,n=/^#([a-f\d]{6})([a-f\d]{2})?$/i,r=/^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i,o=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i,s=/^(\w+)$/,a=[0,0,0,1],l,i,h;if(l=t.match(n)){for(h=l[2],l=l[1],i=0;i<3;i++){let p=i*2;a[i]=Number.parseInt(l.slice(p,p+2),16)}h&&(a[3]=Number.parseInt(h,16)/255)}else if(l=t.match(e)){for(l=l[1],h=l[3],i=0;i<3;i++)a[i]=Number.parseInt(l[i]+l[i],16);h&&(a[3]=Number.parseInt(h+h,16)/255)}else if(l=t.match(r)){for(i=0;i<3;i++)a[i]=Number.parseFloat(l[i+1]);l[4]&&(a[3]=l[5]?Number.parseFloat(l[4])*.01:Number.parseFloat(l[4]))}else if(l=t.match(o)){for(i=0;i<3;i++)a[i]=Math.round(Number.parseFloat(l[i+1])*2.55);l[4]&&(a[3]=l[5]?Number.parseFloat(l[4])*.01:Number.parseFloat(l[4]))}else return(l=t.toLowerCase().match(s))?l[1]==="transparent"?[0,0,0,0]:Object.hasOwn(M,l[1])?(a=M[l[1]].slice(),a[3]=1,a):null:null;for(i=0;i<3;i++)a[i]=v(a[i],0,255);return a[3]=v(a[3],0,1),a};_.get.hsl=function(t){if(!t)return null;let e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,n=t.match(e);if(n){let r=Number.parseFloat(n[4]),o=(Number.parseFloat(n[1])%360+360)%360,s=v(Number.parseFloat(n[2]),0,100),a=v(Number.parseFloat(n[3]),0,100),l=v(Number.isNaN(r)?1:r,0,1);return[o,s,a,l]}return null};_.get.hwb=function(t){if(!t)return null;let e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,n=t.match(e);if(n){let r=Number.parseFloat(n[4]),o=(Number.parseFloat(n[1])%360+360)%360,s=v(Number.parseFloat(n[2]),0,100),a=v(Number.parseFloat(n[3]),0,100),l=v(Number.isNaN(r)?1:r,0,1);return[o,s,a,l]}return null};_.to.hex=function(...t){return"#"+N(t[0])+N(t[1])+N(t[2])+(t[3]<1?N(Math.round(t[3]*255)):"")};_.to.rgb=function(...t){return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};_.to.rgb.percent=function(...t){let e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"};_.to.hsl=function(...t){return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};_.to.hwb=function(...t){let e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};_.to.keyword=function(...t){return W[t.slice(0,3)]};function v(t,e,n){return Math.min(Math.max(e,t),n)}function N(t){let e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}var S=_;var z={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(let t in z)Object.freeze(z[t]);var x=Object.freeze(z);var P={};for(let t of Object.keys(x))P[x[t]]=t;var c={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},k=c,w=(6/29)**3;function A(t){let e=t>.0031308?1.055*t**.4166666666666667-.055:t*12.92;return Math.min(Math.max(0,e),1)}function F(t){return t>.04045?((t+.055)/1.055)**2.4:t/12.92}for(let t of Object.keys(c)){if(!("channels"in c[t]))throw new Error("missing channels property: "+t);if(!("labels"in c[t]))throw new Error("missing channel labels property: "+t);if(c[t].labels.length!==c[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:n}=c[t];delete c[t].channels,delete c[t].labels,Object.defineProperty(c[t],"channels",{value:e}),Object.defineProperty(c[t],"labels",{value:n})}c.rgb.hsl=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,o=Math.min(e,n,r),s=Math.max(e,n,r),a=s-o,l,i;switch(s){case o:{l=0;break}case e:{l=(n-r)/a;break}case n:{l=2+(r-e)/a;break}case r:{l=4+(e-n)/a;break}}l=Math.min(l*60,360),l<0&&(l+=360);let h=(o+s)/2;return s===o?i=0:h<=.5?i=a/(s+o):i=a/(2-s-o),[l,i*100,h*100]};c.rgb.hsv=function(t){let e,n,r,o,s,a=t[0]/255,l=t[1]/255,i=t[2]/255,h=Math.max(a,l,i),p=h-Math.min(a,l,i),y=function(Q){return(h-Q)/6/p+1/2};if(p===0)o=0,s=0;else{switch(s=p/h,e=y(a),n=y(l),r=y(i),h){case a:{o=r-n;break}case l:{o=1/3+e-r;break}case i:{o=2/3+n-e;break}}o<0?o+=1:o>1&&(o-=1)}return[o*360,s*100,h*100]};c.rgb.hwb=function(t){let e=t[0],n=t[1],r=t[2],o=c.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(n,r));return r=1-1/255*Math.max(e,Math.max(n,r)),[o,s*100,r*100]};c.rgb.oklab=function(t){let e=F(t[0]/255),n=F(t[1]/255),r=F(t[2]/255),o=Math.cbrt(.4122214708*e+.5363325363*n+.0514459929*r),s=Math.cbrt(.2119034982*e+.6806995451*n+.1073969566*r),a=Math.cbrt(.0883024619*e+.2817188376*n+.6299787005*r),l=.2104542553*o+.793617785*s-.0040720468*a,i=1.9779984951*o-2.428592205*s+.4505937099*a,h=.0259040371*o+.7827717662*s-.808675766*a;return[l*100,i*100,h*100]};c.rgb.cmyk=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,o=Math.min(1-e,1-n,1-r),s=(1-e-o)/(1-o)||0,a=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[s*100,a*100,l*100,o*100]};function V(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}c.rgb.keyword=function(t){let e=P[t];if(e)return e;let n=Number.POSITIVE_INFINITY,r;for(let o of Object.keys(x)){let s=x[o],a=V(t,s);a<n&&(n=a,r=o)}return r};c.keyword.rgb=function(t){return[...x[t]]};c.rgb.xyz=function(t){let e=F(t[0]/255),n=F(t[1]/255),r=F(t[2]/255),o=e*.4124564+n*.3575761+r*.1804375,s=e*.2126729+n*.7151522+r*.072175,a=e*.0193339+n*.119192+r*.9503041;return[o*100,s*100,a*100]};c.rgb.lab=function(t){let e=c.rgb.xyz(t),n=e[0],r=e[1],o=e[2];n/=95.047,r/=100,o/=108.883,n=n>w?n**(1/3):7.787*n+16/116,r=r>w?r**(1/3):7.787*r+16/116,o=o>w?o**(1/3):7.787*o+16/116;let s=116*r-16,a=500*(n-r),l=200*(r-o);return[s,a,l]};c.hsl.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,o,s;if(n===0)return s=r*255,[s,s,s];let a=r<.5?r*(1+n):r+n-r*n,l=2*r-a,i=[0,0,0];for(let h=0;h<3;h++)o=e+1/3*-(h-1),o<0&&o++,o>1&&o--,6*o<1?s=l+(a-l)*6*o:2*o<1?s=a:3*o<2?s=l+(a-l)*(2/3-o)*6:s=l,i[h]=s*255;return i};c.hsl.hsv=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,o=n,s=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=s<=1?s:2-s;let a=(r+n)/2,l=r===0?2*o/(s+o):2*n/(r+n);return[e,l*100,a*100]};c.hsv.rgb=function(t){let e=t[0]/60,n=t[1]/100,r=t[2]/100,o=Math.floor(e)%6,s=e-Math.floor(e),a=255*r*(1-n),l=255*r*(1-n*s),i=255*r*(1-n*(1-s));switch(r*=255,o){case 0:return[r,i,a];case 1:return[l,r,a];case 2:return[a,r,i];case 3:return[a,l,r];case 4:return[i,a,r];case 5:return[r,a,l]}};c.hsv.hsl=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,o=Math.max(r,.01),s,a;a=(2-n)*r;let l=(2-n)*o;return s=n*o,s/=l<=1?l:2-l,s=s||0,a/=2,[e,s*100,a*100]};c.hwb.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,o=n+r,s;o>1&&(n/=o,r/=o);let a=Math.floor(6*e),l=1-r;s=6*e-a,(a&1)!==0&&(s=1-s);let i=n+s*(l-n),h,p,y;switch(a){default:case 6:case 0:{h=l,p=i,y=n;break}case 1:{h=i,p=l,y=n;break}case 2:{h=n,p=l,y=i;break}case 3:{h=n,p=i,y=l;break}case 4:{h=i,p=n,y=l;break}case 5:{h=l,p=n,y=i;break}}return[h*255,p*255,y*255]};c.cmyk.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o=t[3]/100,s=1-Math.min(1,e*(1-o)+o),a=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[s*255,a*255,l*255]};c.xyz.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o,s,a;return o=e*3.2404542+n*-1.5371385+r*-.4985314,s=e*-.969266+n*1.8760108+r*.041556,a=e*.0556434+n*-.2040259+r*1.0572252,o=A(o),s=A(s),a=A(a),[o*255,s*255,a*255]};c.xyz.lab=function(t){let e=t[0],n=t[1],r=t[2];e/=95.047,n/=100,r/=108.883,e=e>w?e**(1/3):7.787*e+16/116,n=n>w?n**(1/3):7.787*n+16/116,r=r>w?r**(1/3):7.787*r+16/116;let o=116*n-16,s=500*(e-n),a=200*(n-r);return[o,s,a]};c.xyz.oklab=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o=Math.cbrt(.8189330101*e+.3618667424*n-.1288597137*r),s=Math.cbrt(.0329845436*e+.9293118715*n+.0361456387*r),a=Math.cbrt(.0482003018*e+.2643662691*n+.633851707*r),l=.2104542553*o+.793617785*s-.0040720468*a,i=1.9779984951*o-2.428592205*s+.4505937099*a,h=.0259040371*o+.7827717662*s-.808675766*a;return[l*100,i*100,h*100]};c.oklab.oklch=function(t){return c.lab.lch(t)};c.oklab.xyz=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o=(.999999998*e+.396337792*n+.215803758*r)**3,s=(1.000000008*e-.105561342*n-.063854175*r)**3,a=(1.000000055*e-.089484182*n-1.291485538*r)**3,l=1.227013851*o-.55779998*s+.281256149*a,i=-.040580178*o+1.11225687*s-.071676679*a,h=-.076381285*o-.421481978*s+1.58616322*a;return[l*100,i*100,h*100]};c.oklab.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o=(e+.3963377774*n+.2158037573*r)**3,s=(e-.1055613458*n-.0638541728*r)**3,a=(e-.0894841775*n-1.291485548*r)**3,l=A(4.0767416621*o-3.3077115913*s+.2309699292*a),i=A(-1.2684380046*o+2.6097574011*s-.3413193965*a),h=A(-.0041960863*o-.7034186147*s+1.707614701*a);return[l*255,i*255,h*255]};c.oklch.oklab=function(t){return c.lch.lab(t)};c.lab.xyz=function(t){let e=t[0],n=t[1],r=t[2],o,s,a;s=(e+16)/116,o=n/500+s,a=s-r/200;let l=s**3,i=o**3,h=a**3;return s=l>w?l:(s-16/116)/7.787,o=i>w?i:(o-16/116)/7.787,a=h>w?h:(a-16/116)/7.787,o*=95.047,s*=100,a*=108.883,[o,s,a]};c.lab.lch=function(t){let e=t[0],n=t[1],r=t[2],o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);let a=Math.sqrt(n*n+r*r);return[e,a,o]};c.lch.lab=function(t){let e=t[0],n=t[1],o=t[2]/360*2*Math.PI,s=n*Math.cos(o),a=n*Math.sin(o);return[e,s,a]};c.rgb.ansi16=function(t,e=null){let[n,r,o]=t,s=e===null?c.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let a=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return s===2&&(a+=60),a};c.hsv.ansi16=function(t){return c.rgb.ansi16(c.hsv.rgb(t),t[2])};c.rgb.ansi256=function(t){let e=t[0],n=t[1],r=t[2];return e>>4===n>>4&&n>>4===r>>4?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};c.ansi16.rgb=function(t){t=t[0];let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let n=(Math.trunc(t>50)+1)*.5,r=(e&1)*n*255,o=(e>>1&1)*n*255,s=(e>>2&1)*n*255;return[r,o,s]};c.ansi256.rgb=function(t){if(t=t[0],t>=232){let s=(t-232)*10+8;return[s,s,s]}t-=16;let e,n=Math.floor(t/36)/5*255,r=Math.floor((e=t%36)/6)/5*255,o=e%6/5*255;return[n,r,o]};c.rgb.hex=function(t){let n=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".slice(n.length)+n};c.hex.rgb=function(t){let e=t.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!e)return[0,0,0];let n=e[0];e[0].length===3&&(n=[...n].map(l=>l+l).join(""));let r=Number.parseInt(n,16),o=r>>16&255,s=r>>8&255,a=r&255;return[o,s,a]};c.rgb.hcg=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,o=Math.max(Math.max(e,n),r),s=Math.min(Math.min(e,n),r),a=o-s,l,i=a<1?s/(1-a):0;return a<=0?l=0:o===e?l=(n-r)/a%6:o===n?l=2+(r-e)/a:l=4+(e-n)/a,l/=6,l%=1,[l*360,a*100,i*100]};c.hsl.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=n<.5?2*e*n:2*e*(1-n),o=0;return r<1&&(o=(n-.5*r)/(1-r)),[t[0],r*100,o*100]};c.hsv.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=e*n,o=0;return r<1&&(o=(n-r)/(1-r)),[t[0],r*100,o*100]};c.hcg.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100;if(n===0)return[r*255,r*255,r*255];let o=[0,0,0],s=e%1*6,a=s%1,l=1-a,i=0;switch(Math.floor(s)){case 0:{o[0]=1,o[1]=a,o[2]=0;break}case 1:{o[0]=l,o[1]=1,o[2]=0;break}case 2:{o[0]=0,o[1]=1,o[2]=a;break}case 3:{o[0]=0,o[1]=l,o[2]=1;break}case 4:{o[0]=a,o[1]=0,o[2]=1;break}default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};c.hcg.hsv=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e),o=0;return r>0&&(o=e/r),[t[0],o*100,r*100]};c.hcg.hsl=function(t){let e=t[1]/100,r=t[2]/100*(1-e)+.5*e,o=0;return r>0&&r<.5?o=e/(2*r):r>=.5&&r<1&&(o=e/(2*(1-r))),[t[0],o*100,r*100]};c.hcg.hwb=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e);return[t[0],(r-e)*100,(1-r)*100]};c.hwb.hcg=function(t){let e=t[1]/100,r=1-t[2]/100,o=r-e,s=0;return o<1&&(s=(r-o)/(1-o)),[t[0],o*100,s*100]};c.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};c.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};c.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};c.gray.hsl=function(t){return[0,0,t[0]]};c.gray.hsv=c.gray.hsl;c.gray.hwb=function(t){return[0,100,t[0]]};c.gray.cmyk=function(t){return[0,0,0,t[0]]};c.gray.lab=function(t){return[t[0],0,0]};c.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,r=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".slice(r.length)+r};c.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};function tt(){let t={},e=Object.keys(k);for(let{length:n}=e,r=0;r<n;r++)t[e[r]]={distance:-1,parent:null};return t}function et(t){let e=tt(),n=[t];for(e[t].distance=0;n.length>0;){let r=n.pop(),o=Object.keys(k[r]);for(let{length:s}=o,a=0;a<s;a++){let l=o[a],i=e[l];i.distance===-1&&(i.distance=e[r].distance+1,i.parent=r,n.unshift(l))}}return e}function nt(t,e){return function(n){return e(t(n))}}function rt(t,e){let n=[e[t].parent,t],r=k[e[t].parent][t],o=e[t].parent;for(;e[o].parent;)n.unshift(e[o].parent),r=nt(k[e[o].parent][o],r),o=e[o].parent;return r.conversion=n,r}function ot(t){let e=et(t),n={},r=Object.keys(e);for(let{length:o}=r,s=0;s<o;s++){let a=r[s];e[a].parent!==null&&(n[a]=rt(a,e))}return n}var j=ot;var C={},st=Object.keys(k);function at(t){let e=function(...n){let r=n[0];return r==null?r:(r.length>1&&(n=r),t(n))};return"conversion"in t&&(e.conversion=t.conversion),e}function lt(t){let e=function(...n){let r=n[0];if(r==null)return r;r.length>1&&(n=r);let o=t(n);if(typeof o=="object")for(let{length:s}=o,a=0;a<s;a++)o[a]=Math.round(o[a]);return o};return"conversion"in t&&(e.conversion=t.conversion),e}for(let t of st){C[t]={},Object.defineProperty(C[t],"channels",{value:k[t].channels}),Object.defineProperty(C[t],"labels",{value:k[t].labels});let e=j(t),n=Object.keys(e);for(let r of n){let o=e[r];C[t][r]=lt(o),C[t][r].raw=at(o)}}var m=C;var X=["keyword","gray","hex"],L={};for(let t of Object.keys(m))L[[...m[t].labels].sort().join("")]=t;var R={};function g(t,e){if(!(this instanceof g))return new g(t,e);if(e&&e in X&&(e=null),e&&!(e in m))throw new Error("Unknown model: "+e);let n,r;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof g)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){let o=S.get(t);if(o===null)throw new Error("Unable to parse color from string: "+t);this.model=o.model,r=m[this.model].channels,this.color=o.value.slice(0,r),this.valpha=typeof o.value[r]=="number"?o.value[r]:1}else if(t.length>0){this.model=e||"rgb",r=m[this.model].channels;let o=Array.prototype.slice.call(t,0,r);this.color=E(o,r),this.valpha=typeof t[r]=="number"?t[r]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;let o=Object.keys(t);"alpha"in t&&(o.splice(o.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);let s=o.sort().join("");if(!(s in L))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=L[s];let{labels:a}=m[this.model],l=[];for(n=0;n<a.length;n++)l.push(t[a[n]]);this.color=E(l)}if(R[this.model])for(r=m[this.model].channels,n=0;n<r;n++){let o=R[this.model][n];o&&(this.color[n]=o(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}g.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in S.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);let n=e.valpha===1?e.color:[...e.color,this.valpha];return S.to[e.model](...n)},percentString(t){let e=this.rgb().round(typeof t=="number"?t:1),n=e.valpha===1?e.color:[...e.color,this.valpha];return S.to.rgb.percent(...n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let t={},{channels:e}=m[this.model],{labels:n}=m[this.model];for(let r=0;r<e;r++)t[n[r]]=this.color[r];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){let t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){let t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new g([...this.color.map(ct(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new g([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:u("rgb",0,b(255)),green:u("rgb",1,b(255)),blue:u("rgb",2,b(255)),hue:u(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:u("hsl",1,b(100)),lightness:u("hsl",2,b(100)),saturationv:u("hsv",1,b(100)),value:u("hsv",2,b(100)),chroma:u("hcg",1,b(100)),gray:u("hcg",2,b(100)),white:u("hwb",1,b(100)),wblack:u("hwb",2,b(100)),cyan:u("cmyk",0,b(100)),magenta:u("cmyk",1,b(100)),yellow:u("cmyk",2,b(100)),black:u("cmyk",3,b(100)),x:u("xyz",0,b(95.047)),y:u("xyz",1,b(100)),z:u("xyz",2,b(108.833)),l:u("lab",0,b(100)),a:u("lab",1),b:u("lab",2),keyword(t){return t!==void 0?new g(t):m[this.model].keyword(this.color)},hex(t){return t!==void 0?new g(t):S.to.hex(...this.rgb().round().color)},hexa(t){if(t!==void 0)return new g(t);let e=this.rgb().round().color,n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),S.to.hex(...e)+n},rgbNumber(){let t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){let t=this.rgb().color,e=[];for(let[n,r]of t.entries()){let o=r/255;e[n]=o<=.04045?o/12.92:((o+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){let e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level(t){let e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){let t=this.rgb().color;return(t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){let e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){let e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){let e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){let e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){let e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){let e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){let t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return g.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){let e=this.hsl(),n=e.color[0];return n=(n+t)%360,n=n<0?360+n:n,e.color[0]=n,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);let n=t.rgb(),r=this.rgb(),o=e===void 0?.5:e,s=2*o-1,a=n.alpha()-r.alpha(),l=((s*a===-1?s:(s+a)/(1+s*a))+1)/2,i=1-l;return g.rgb(l*n.red()+i*r.red(),l*n.green()+i*r.green(),l*n.blue()+i*r.blue(),n.alpha()*o+r.alpha()*(1-o))}};for(let t of Object.keys(m)){if(X.includes(t))continue;let{channels:e}=m[t];g.prototype[t]=function(...n){return this.model===t?new g(this):n.length>0?new g(n,t):new g([...ht(m[this.model][t].raw(this.color)),this.valpha],t)},g[t]=function(...n){let r=n[0];return typeof r=="number"&&(r=E(n,e)),new g(r,t)}}function it(t,e){return Number(t.toFixed(e))}function ct(t){return function(e){return it(e,t)}}function u(t,e,n){t=Array.isArray(t)?t:[t];for(let r of t)(R[r]||=[])[e]=n;return t=t[0],function(r){let o;return r!==void 0?(n&&(r=n(r)),o=this[t](),o.color[e]=r,o):(o=this[t]().color[e],n&&(o=n(o)),o)}}function b(t){return function(e){return Math.max(0,Math.min(t,e))}}function ht(t){return Array.isArray(t)?t:[t]}function E(t,e){for(let n=0;n<e;n++)typeof t[n]!="number"&&(t[n]=0);return t}var $=g;var $t={channel:"channel",channels:"channels",colorField:"color-field",colorFieldScope:"scope--color-field",colorMode:"color-mode",colorModeContainer:"color-mode-container",container:"container",control:"control",controlAndScope:"control-and-scope",controlSection:"control-section",deleteColor:"delete-color",header:"header",hexAndChannelsGroup:"hex-and-channels-group",hexOptions:"color-hex-options",hueScope:"scope--hue",hueSlider:"hue-slider",opacityScope:"scope--opacity",opacitySlider:"opacity-slider",preview:"preview",previewAndSliders:"preview-and-sliders",saveColor:"save-color",savedColor:"saved-color",savedColorsButtons:"saved-colors-buttons",savedColorsSection:"saved-colors-section",scope:"scope",section:"section",slider:"slider",sliders:"sliders",splitSection:"section--split",swatchGroup:"swatch-group"},qt=$("#007AC2"),Bt="calcite-color-",Gt={r:255,g:255,b:255},ut={h:360,s:100,v:100},Tt=ut.h-1,Wt={min:0,max:100},ft={s:{gap:parseInt(B),slider:{height:12},thumb:{radius:7},preview:{size:20},minWidth:200},m:{gap:parseInt(G),slider:{height:12},thumb:{radius:7},preview:{size:24},minWidth:240},l:{gap:parseInt(T),slider:{height:12},thumb:{radius:7},preview:{size:32},minWidth:304}},Pt=1,jt={minus:"minus",plus:"plus"},Xt=/^[0-9A-F]$/i,dt=/^#[0-9A-F]{3}$/i,bt=/^#[0-9A-F]{6}$/i,gt=/^#[0-9A-F]{4}$/i,pt=/^#[0-9A-F]{8}$/i;function Dt(t,e=!1,n){return e&&!t?null:$(t!=null&&typeof t=="object"&&yt(n)?mt(t):t)}var Ut=t=>Number((t*100).toFixed()),Kt=t=>Number((t/100).toFixed(2));function K(t,e=!1){return q(t,e)||_t(t,e)}function Y(t,e,n){return t?t.length===e&&n.test(t):!1}function q(t,e=!1){return Y(t,e?5:4,e?gt:dt)}function _t(t,e=!1){return Y(t,e?9:7,e?pt:bt)}function Yt(t,e=!1,n=!1){if(t=t.toLowerCase(),t.startsWith("#")||(t=`#${t}`),q(t,e))return D(U(t,e));if(e&&n&&K(t,!1)){let r=q(t,!1);return D(U(`${t}${r?"f":"ff"}`,!0))}return t}function Jt(t,e=!1){return e?t.hexa():t.hex()}function D(t){let{r:e,g:n,b:r}=t,o=I(e),s=I(n),a=I(r),l="a"in t?I(t.a*255):"";return`#${o}${s}${a}${l}`.toLowerCase()}function I(t){return t.toString(16).padStart(2,"0")}function Zt(t){let e={...t,a:t.alpha??1};return delete e.alpha,e}function mt(t){let e={...t,alpha:t.a??1};return delete e.a,e}function U(t,e=!1){if(!K(t,e))return null;t=t.replace("#","");let n,r,o,s;if(t.length===3||t.length===4){let[l,i,h,p]=t.split("");n=parseInt(`${l}${l}`,16),r=parseInt(`${i}${i}`,16),o=parseInt(`${h}${h}`,16),s=parseInt(`${p}${p}`,16)/255}else n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),o=parseInt(t.slice(4,6),16),s=parseInt(t.slice(6,8),16)/255;return isNaN(s)?{r:n,g:r,b:o}:{r:n,g:r,b:o,a:s}}var J=t=>t,f=J({HEX:"hex",HEXA:"hexa",RGB_CSS:"rgb-css",RGBA_CSS:"rgba-css",HSL_CSS:"hsl-css",HSLA_CSS:"hsla-css"}),d=J({RGB:"rgb",RGBA:"rgba",HSL:"hsl",HSLA:"hsla",HSV:"hsv",HSVA:"hsva"});function Qt(t){if(typeof t=="string"){if(t.startsWith("#")){let{length:e}=t;if(e===4||e===7)return f.HEX;if(e===5||e===9)return f.HEXA}if(t.startsWith("rgba("))return f.RGBA_CSS;if(t.startsWith("rgb("))return f.RGB_CSS;if(t.startsWith("hsl("))return f.HSL_CSS;if(t.startsWith("hsla("))return f.HSLA_CSS}if(typeof t=="object"){if(H(t,"r","g","b"))return H(t,"a")?d.RGBA:d.RGB;if(H(t,"h","s","l"))return H(t,"a")?d.HSLA:d.HSL;if(H(t,"h","s","v"))return H(t,"a")?d.HSVA:d.HSV}return null}function H(t,...e){return e.every(n=>n&&t&&`${n}`in t)}function Vt(t,e){return t?.rgb().array().toString()===e?.rgb().array().toString()}function yt(t){return t===f.HEXA||t===f.RGBA_CSS||t===f.HSLA_CSS||t===d.RGBA||t===d.HSLA||t===d.HSVA}function te(t){return t===f.HEX?f.HEXA:t===f.RGB_CSS?f.RGBA_CSS:t===f.HSL_CSS?f.HSLA_CSS:t===d.RGB?d.RGBA:t===d.HSL?d.HSLA:t===d.HSV?d.HSVA:t}function ee(t){return t===f.HEXA?f.HEX:t===f.RGBA_CSS?f.RGB_CSS:t===f.HSLA_CSS?f.HSL_CSS:t===d.RGBA?d.RGB:t===d.HSLA?d.HSL:t===d.HSVA?d.HSV:t}var wt=1,Z=wt*2;function ne(t,e,n){let r=n?ft.l.preview.size:e.preview.size,o=t-Z,s=e.gap*3;return Math.max(o-s-r,0)}function re(t){let n=t-Z;return{width:Math.max(n,0),height:Math.max(Math.floor(n/1.8),0)}}export{$ as a,$t as b,qt as c,Bt as d,Gt as e,ut as f,Tt as g,Wt as h,ft as i,Pt as j,jt as k,Xt as l,Dt as m,Ut as n,Kt as o,K as p,q,_t as r,Yt as s,Jt as t,D as u,Zt as v,U as w,f as x,Qt as y,Vt as z,yt as A,te as B,ee as C,ne as D,re as E};
|
|
3
|
+
v5.0.0-next.28 */
|
|
4
|
+
import{e as B,f as G,g as T}from"./EJBQRGLZ.js";var O={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(let t in O)Object.freeze(O[t]);var M=Object.freeze(O);var W=Object.create(null);for(let t in M)Object.hasOwn(M,t)&&(W[M[t]]=t);var _={to:{},get:{}};_.get=function(t){let e=t.slice(0,3).toLowerCase(),n,r;switch(e){case"hsl":{n=_.get.hsl(t),r="hsl";break}case"hwb":{n=_.get.hwb(t),r="hwb";break}default:{n=_.get.rgb(t),r="rgb";break}}return n?{model:r,value:n}:null};_.get.rgb=function(t){if(!t)return null;let e=/^#([a-f\d]{3,4})$/i,n=/^#([a-f\d]{6})([a-f\d]{2})?$/i,r=/^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i,o=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i,s=/^(\w+)$/,a=[0,0,0,1],l,i,h;if(l=t.match(n)){for(h=l[2],l=l[1],i=0;i<3;i++){let p=i*2;a[i]=Number.parseInt(l.slice(p,p+2),16)}h&&(a[3]=Number.parseInt(h,16)/255)}else if(l=t.match(e)){for(l=l[1],h=l[3],i=0;i<3;i++)a[i]=Number.parseInt(l[i]+l[i],16);h&&(a[3]=Number.parseInt(h+h,16)/255)}else if(l=t.match(r)){for(i=0;i<3;i++)a[i]=Number.parseFloat(l[i+1]);l[4]&&(a[3]=l[5]?Number.parseFloat(l[4])*.01:Number.parseFloat(l[4]))}else if(l=t.match(o)){for(i=0;i<3;i++)a[i]=Math.round(Number.parseFloat(l[i+1])*2.55);l[4]&&(a[3]=l[5]?Number.parseFloat(l[4])*.01:Number.parseFloat(l[4]))}else return(l=t.toLowerCase().match(s))?l[1]==="transparent"?[0,0,0,0]:Object.hasOwn(M,l[1])?(a=M[l[1]].slice(),a[3]=1,a):null:null;for(i=0;i<3;i++)a[i]=v(a[i],0,255);return a[3]=v(a[3],0,1),a};_.get.hsl=function(t){if(!t)return null;let e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,n=t.match(e);if(n){let r=Number.parseFloat(n[4]),o=(Number.parseFloat(n[1])%360+360)%360,s=v(Number.parseFloat(n[2]),0,100),a=v(Number.parseFloat(n[3]),0,100),l=v(Number.isNaN(r)?1:r,0,1);return[o,s,a,l]}return null};_.get.hwb=function(t){if(!t)return null;let e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,n=t.match(e);if(n){let r=Number.parseFloat(n[4]),o=(Number.parseFloat(n[1])%360+360)%360,s=v(Number.parseFloat(n[2]),0,100),a=v(Number.parseFloat(n[3]),0,100),l=v(Number.isNaN(r)?1:r,0,1);return[o,s,a,l]}return null};_.to.hex=function(...t){return"#"+N(t[0])+N(t[1])+N(t[2])+(t[3]<1?N(Math.round(t[3]*255)):"")};_.to.rgb=function(...t){return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};_.to.rgb.percent=function(...t){let e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"};_.to.hsl=function(...t){return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};_.to.hwb=function(...t){let e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};_.to.keyword=function(...t){return W[t.slice(0,3)]};function v(t,e,n){return Math.min(Math.max(e,t),n)}function N(t){let e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}var S=_;var z={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(let t in z)Object.freeze(z[t]);var x=Object.freeze(z);var P={};for(let t of Object.keys(x))P[x[t]]=t;var c={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},k=c,w=(6/29)**3;function A(t){let e=t>.0031308?1.055*t**.4166666666666667-.055:t*12.92;return Math.min(Math.max(0,e),1)}function F(t){return t>.04045?((t+.055)/1.055)**2.4:t/12.92}for(let t of Object.keys(c)){if(!("channels"in c[t]))throw new Error("missing channels property: "+t);if(!("labels"in c[t]))throw new Error("missing channel labels property: "+t);if(c[t].labels.length!==c[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:n}=c[t];delete c[t].channels,delete c[t].labels,Object.defineProperty(c[t],"channels",{value:e}),Object.defineProperty(c[t],"labels",{value:n})}c.rgb.hsl=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,o=Math.min(e,n,r),s=Math.max(e,n,r),a=s-o,l,i;switch(s){case o:{l=0;break}case e:{l=(n-r)/a;break}case n:{l=2+(r-e)/a;break}case r:{l=4+(e-n)/a;break}}l=Math.min(l*60,360),l<0&&(l+=360);let h=(o+s)/2;return s===o?i=0:h<=.5?i=a/(s+o):i=a/(2-s-o),[l,i*100,h*100]};c.rgb.hsv=function(t){let e,n,r,o,s,a=t[0]/255,l=t[1]/255,i=t[2]/255,h=Math.max(a,l,i),p=h-Math.min(a,l,i),y=function(Q){return(h-Q)/6/p+1/2};if(p===0)o=0,s=0;else{switch(s=p/h,e=y(a),n=y(l),r=y(i),h){case a:{o=r-n;break}case l:{o=1/3+e-r;break}case i:{o=2/3+n-e;break}}o<0?o+=1:o>1&&(o-=1)}return[o*360,s*100,h*100]};c.rgb.hwb=function(t){let e=t[0],n=t[1],r=t[2],o=c.rgb.hsl(t)[0],s=1/255*Math.min(e,Math.min(n,r));return r=1-1/255*Math.max(e,Math.max(n,r)),[o,s*100,r*100]};c.rgb.oklab=function(t){let e=F(t[0]/255),n=F(t[1]/255),r=F(t[2]/255),o=Math.cbrt(.4122214708*e+.5363325363*n+.0514459929*r),s=Math.cbrt(.2119034982*e+.6806995451*n+.1073969566*r),a=Math.cbrt(.0883024619*e+.2817188376*n+.6299787005*r),l=.2104542553*o+.793617785*s-.0040720468*a,i=1.9779984951*o-2.428592205*s+.4505937099*a,h=.0259040371*o+.7827717662*s-.808675766*a;return[l*100,i*100,h*100]};c.rgb.cmyk=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,o=Math.min(1-e,1-n,1-r),s=(1-e-o)/(1-o)||0,a=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[s*100,a*100,l*100,o*100]};function V(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}c.rgb.keyword=function(t){let e=P[t];if(e)return e;let n=Number.POSITIVE_INFINITY,r;for(let o of Object.keys(x)){let s=x[o],a=V(t,s);a<n&&(n=a,r=o)}return r};c.keyword.rgb=function(t){return[...x[t]]};c.rgb.xyz=function(t){let e=F(t[0]/255),n=F(t[1]/255),r=F(t[2]/255),o=e*.4124564+n*.3575761+r*.1804375,s=e*.2126729+n*.7151522+r*.072175,a=e*.0193339+n*.119192+r*.9503041;return[o*100,s*100,a*100]};c.rgb.lab=function(t){let e=c.rgb.xyz(t),n=e[0],r=e[1],o=e[2];n/=95.047,r/=100,o/=108.883,n=n>w?n**(1/3):7.787*n+16/116,r=r>w?r**(1/3):7.787*r+16/116,o=o>w?o**(1/3):7.787*o+16/116;let s=116*r-16,a=500*(n-r),l=200*(r-o);return[s,a,l]};c.hsl.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,o,s;if(n===0)return s=r*255,[s,s,s];let a=r<.5?r*(1+n):r+n-r*n,l=2*r-a,i=[0,0,0];for(let h=0;h<3;h++)o=e+1/3*-(h-1),o<0&&o++,o>1&&o--,6*o<1?s=l+(a-l)*6*o:2*o<1?s=a:3*o<2?s=l+(a-l)*(2/3-o)*6:s=l,i[h]=s*255;return i};c.hsl.hsv=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,o=n,s=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=s<=1?s:2-s;let a=(r+n)/2,l=r===0?2*o/(s+o):2*n/(r+n);return[e,l*100,a*100]};c.hsv.rgb=function(t){let e=t[0]/60,n=t[1]/100,r=t[2]/100,o=Math.floor(e)%6,s=e-Math.floor(e),a=255*r*(1-n),l=255*r*(1-n*s),i=255*r*(1-n*(1-s));switch(r*=255,o){case 0:return[r,i,a];case 1:return[l,r,a];case 2:return[a,r,i];case 3:return[a,l,r];case 4:return[i,a,r];case 5:return[r,a,l]}};c.hsv.hsl=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,o=Math.max(r,.01),s,a;a=(2-n)*r;let l=(2-n)*o;return s=n*o,s/=l<=1?l:2-l,s=s||0,a/=2,[e,s*100,a*100]};c.hwb.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,o=n+r,s;o>1&&(n/=o,r/=o);let a=Math.floor(6*e),l=1-r;s=6*e-a,(a&1)!==0&&(s=1-s);let i=n+s*(l-n),h,p,y;switch(a){default:case 6:case 0:{h=l,p=i,y=n;break}case 1:{h=i,p=l,y=n;break}case 2:{h=n,p=l,y=i;break}case 3:{h=n,p=i,y=l;break}case 4:{h=i,p=n,y=l;break}case 5:{h=l,p=n,y=i;break}}return[h*255,p*255,y*255]};c.cmyk.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o=t[3]/100,s=1-Math.min(1,e*(1-o)+o),a=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[s*255,a*255,l*255]};c.xyz.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o,s,a;return o=e*3.2404542+n*-1.5371385+r*-.4985314,s=e*-.969266+n*1.8760108+r*.041556,a=e*.0556434+n*-.2040259+r*1.0572252,o=A(o),s=A(s),a=A(a),[o*255,s*255,a*255]};c.xyz.lab=function(t){let e=t[0],n=t[1],r=t[2];e/=95.047,n/=100,r/=108.883,e=e>w?e**(1/3):7.787*e+16/116,n=n>w?n**(1/3):7.787*n+16/116,r=r>w?r**(1/3):7.787*r+16/116;let o=116*n-16,s=500*(e-n),a=200*(n-r);return[o,s,a]};c.xyz.oklab=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o=Math.cbrt(.8189330101*e+.3618667424*n-.1288597137*r),s=Math.cbrt(.0329845436*e+.9293118715*n+.0361456387*r),a=Math.cbrt(.0482003018*e+.2643662691*n+.633851707*r),l=.2104542553*o+.793617785*s-.0040720468*a,i=1.9779984951*o-2.428592205*s+.4505937099*a,h=.0259040371*o+.7827717662*s-.808675766*a;return[l*100,i*100,h*100]};c.oklab.oklch=function(t){return c.lab.lch(t)};c.oklab.xyz=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o=(.999999998*e+.396337792*n+.215803758*r)**3,s=(1.000000008*e-.105561342*n-.063854175*r)**3,a=(1.000000055*e-.089484182*n-1.291485538*r)**3,l=1.227013851*o-.55779998*s+.281256149*a,i=-.040580178*o+1.11225687*s-.071676679*a,h=-.076381285*o-.421481978*s+1.58616322*a;return[l*100,i*100,h*100]};c.oklab.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o=(e+.3963377774*n+.2158037573*r)**3,s=(e-.1055613458*n-.0638541728*r)**3,a=(e-.0894841775*n-1.291485548*r)**3,l=A(4.0767416621*o-3.3077115913*s+.2309699292*a),i=A(-1.2684380046*o+2.6097574011*s-.3413193965*a),h=A(-.0041960863*o-.7034186147*s+1.707614701*a);return[l*255,i*255,h*255]};c.oklch.oklab=function(t){return c.lch.lab(t)};c.lab.xyz=function(t){let e=t[0],n=t[1],r=t[2],o,s,a;s=(e+16)/116,o=n/500+s,a=s-r/200;let l=s**3,i=o**3,h=a**3;return s=l>w?l:(s-16/116)/7.787,o=i>w?i:(o-16/116)/7.787,a=h>w?h:(a-16/116)/7.787,o*=95.047,s*=100,a*=108.883,[o,s,a]};c.lab.lch=function(t){let e=t[0],n=t[1],r=t[2],o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);let a=Math.sqrt(n*n+r*r);return[e,a,o]};c.lch.lab=function(t){let e=t[0],n=t[1],o=t[2]/360*2*Math.PI,s=n*Math.cos(o),a=n*Math.sin(o);return[e,s,a]};c.rgb.ansi16=function(t,e=null){let[n,r,o]=t,s=e===null?c.rgb.hsv(t)[2]:e;if(s=Math.round(s/50),s===0)return 30;let a=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return s===2&&(a+=60),a};c.hsv.ansi16=function(t){return c.rgb.ansi16(c.hsv.rgb(t),t[2])};c.rgb.ansi256=function(t){let e=t[0],n=t[1],r=t[2];return e>>4===n>>4&&n>>4===r>>4?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};c.ansi16.rgb=function(t){t=t[0];let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let n=(Math.trunc(t>50)+1)*.5,r=(e&1)*n*255,o=(e>>1&1)*n*255,s=(e>>2&1)*n*255;return[r,o,s]};c.ansi256.rgb=function(t){if(t=t[0],t>=232){let s=(t-232)*10+8;return[s,s,s]}t-=16;let e,n=Math.floor(t/36)/5*255,r=Math.floor((e=t%36)/6)/5*255,o=e%6/5*255;return[n,r,o]};c.rgb.hex=function(t){let n=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".slice(n.length)+n};c.hex.rgb=function(t){let e=t.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!e)return[0,0,0];let n=e[0];e[0].length===3&&(n=[...n].map(l=>l+l).join(""));let r=Number.parseInt(n,16),o=r>>16&255,s=r>>8&255,a=r&255;return[o,s,a]};c.rgb.hcg=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,o=Math.max(Math.max(e,n),r),s=Math.min(Math.min(e,n),r),a=o-s,l,i=a<1?s/(1-a):0;return a<=0?l=0:o===e?l=(n-r)/a%6:o===n?l=2+(r-e)/a:l=4+(e-n)/a,l/=6,l%=1,[l*360,a*100,i*100]};c.hsl.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=n<.5?2*e*n:2*e*(1-n),o=0;return r<1&&(o=(n-.5*r)/(1-r)),[t[0],r*100,o*100]};c.hsv.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=e*n,o=0;return r<1&&(o=(n-r)/(1-r)),[t[0],r*100,o*100]};c.hcg.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100;if(n===0)return[r*255,r*255,r*255];let o=[0,0,0],s=e%1*6,a=s%1,l=1-a,i=0;switch(Math.floor(s)){case 0:{o[0]=1,o[1]=a,o[2]=0;break}case 1:{o[0]=l,o[1]=1,o[2]=0;break}case 2:{o[0]=0,o[1]=1,o[2]=a;break}case 3:{o[0]=0,o[1]=l,o[2]=1;break}case 4:{o[0]=a,o[1]=0,o[2]=1;break}default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};c.hcg.hsv=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e),o=0;return r>0&&(o=e/r),[t[0],o*100,r*100]};c.hcg.hsl=function(t){let e=t[1]/100,r=t[2]/100*(1-e)+.5*e,o=0;return r>0&&r<.5?o=e/(2*r):r>=.5&&r<1&&(o=e/(2*(1-r))),[t[0],o*100,r*100]};c.hcg.hwb=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e);return[t[0],(r-e)*100,(1-r)*100]};c.hwb.hcg=function(t){let e=t[1]/100,r=1-t[2]/100,o=r-e,s=0;return o<1&&(s=(r-o)/(1-o)),[t[0],o*100,s*100]};c.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};c.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};c.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};c.gray.hsl=function(t){return[0,0,t[0]]};c.gray.hsv=c.gray.hsl;c.gray.hwb=function(t){return[0,100,t[0]]};c.gray.cmyk=function(t){return[0,0,0,t[0]]};c.gray.lab=function(t){return[t[0],0,0]};c.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,r=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".slice(r.length)+r};c.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};function tt(){let t={},e=Object.keys(k);for(let{length:n}=e,r=0;r<n;r++)t[e[r]]={distance:-1,parent:null};return t}function et(t){let e=tt(),n=[t];for(e[t].distance=0;n.length>0;){let r=n.pop(),o=Object.keys(k[r]);for(let{length:s}=o,a=0;a<s;a++){let l=o[a],i=e[l];i.distance===-1&&(i.distance=e[r].distance+1,i.parent=r,n.unshift(l))}}return e}function nt(t,e){return function(n){return e(t(n))}}function rt(t,e){let n=[e[t].parent,t],r=k[e[t].parent][t],o=e[t].parent;for(;e[o].parent;)n.unshift(e[o].parent),r=nt(k[e[o].parent][o],r),o=e[o].parent;return r.conversion=n,r}function ot(t){let e=et(t),n={},r=Object.keys(e);for(let{length:o}=r,s=0;s<o;s++){let a=r[s];e[a].parent!==null&&(n[a]=rt(a,e))}return n}var j=ot;var C={},st=Object.keys(k);function at(t){let e=function(...n){let r=n[0];return r==null?r:(r.length>1&&(n=r),t(n))};return"conversion"in t&&(e.conversion=t.conversion),e}function lt(t){let e=function(...n){let r=n[0];if(r==null)return r;r.length>1&&(n=r);let o=t(n);if(typeof o=="object")for(let{length:s}=o,a=0;a<s;a++)o[a]=Math.round(o[a]);return o};return"conversion"in t&&(e.conversion=t.conversion),e}for(let t of st){C[t]={},Object.defineProperty(C[t],"channels",{value:k[t].channels}),Object.defineProperty(C[t],"labels",{value:k[t].labels});let e=j(t),n=Object.keys(e);for(let r of n){let o=e[r];C[t][r]=lt(o),C[t][r].raw=at(o)}}var m=C;var X=["keyword","gray","hex"],L={};for(let t of Object.keys(m))L[[...m[t].labels].sort().join("")]=t;var R={};function g(t,e){if(!(this instanceof g))return new g(t,e);if(e&&e in X&&(e=null),e&&!(e in m))throw new Error("Unknown model: "+e);let n,r;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof g)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){let o=S.get(t);if(o===null)throw new Error("Unable to parse color from string: "+t);this.model=o.model,r=m[this.model].channels,this.color=o.value.slice(0,r),this.valpha=typeof o.value[r]=="number"?o.value[r]:1}else if(t.length>0){this.model=e||"rgb",r=m[this.model].channels;let o=Array.prototype.slice.call(t,0,r);this.color=E(o,r),this.valpha=typeof t[r]=="number"?t[r]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;let o=Object.keys(t);"alpha"in t&&(o.splice(o.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);let s=o.sort().join("");if(!(s in L))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=L[s];let{labels:a}=m[this.model],l=[];for(n=0;n<a.length;n++)l.push(t[a[n]]);this.color=E(l)}if(R[this.model])for(r=m[this.model].channels,n=0;n<r;n++){let o=R[this.model][n];o&&(this.color[n]=o(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}g.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in S.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);let n=e.valpha===1?e.color:[...e.color,this.valpha];return S.to[e.model](...n)},percentString(t){let e=this.rgb().round(typeof t=="number"?t:1),n=e.valpha===1?e.color:[...e.color,this.valpha];return S.to.rgb.percent(...n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let t={},{channels:e}=m[this.model],{labels:n}=m[this.model];for(let r=0;r<e;r++)t[n[r]]=this.color[r];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){let t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){let t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new g([...this.color.map(ct(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new g([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:u("rgb",0,b(255)),green:u("rgb",1,b(255)),blue:u("rgb",2,b(255)),hue:u(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:u("hsl",1,b(100)),lightness:u("hsl",2,b(100)),saturationv:u("hsv",1,b(100)),value:u("hsv",2,b(100)),chroma:u("hcg",1,b(100)),gray:u("hcg",2,b(100)),white:u("hwb",1,b(100)),wblack:u("hwb",2,b(100)),cyan:u("cmyk",0,b(100)),magenta:u("cmyk",1,b(100)),yellow:u("cmyk",2,b(100)),black:u("cmyk",3,b(100)),x:u("xyz",0,b(95.047)),y:u("xyz",1,b(100)),z:u("xyz",2,b(108.833)),l:u("lab",0,b(100)),a:u("lab",1),b:u("lab",2),keyword(t){return t!==void 0?new g(t):m[this.model].keyword(this.color)},hex(t){return t!==void 0?new g(t):S.to.hex(...this.rgb().round().color)},hexa(t){if(t!==void 0)return new g(t);let e=this.rgb().round().color,n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),S.to.hex(...e)+n},rgbNumber(){let t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){let t=this.rgb().color,e=[];for(let[n,r]of t.entries()){let o=r/255;e[n]=o<=.04045?o/12.92:((o+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){let e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level(t){let e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){let t=this.rgb().color;return(t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){let e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){let e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){let e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){let e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){let e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){let e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){let t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return g.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){let e=this.hsl(),n=e.color[0];return n=(n+t)%360,n=n<0?360+n:n,e.color[0]=n,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);let n=t.rgb(),r=this.rgb(),o=e===void 0?.5:e,s=2*o-1,a=n.alpha()-r.alpha(),l=((s*a===-1?s:(s+a)/(1+s*a))+1)/2,i=1-l;return g.rgb(l*n.red()+i*r.red(),l*n.green()+i*r.green(),l*n.blue()+i*r.blue(),n.alpha()*o+r.alpha()*(1-o))}};for(let t of Object.keys(m)){if(X.includes(t))continue;let{channels:e}=m[t];g.prototype[t]=function(...n){return this.model===t?new g(this):n.length>0?new g(n,t):new g([...ht(m[this.model][t].raw(this.color)),this.valpha],t)},g[t]=function(...n){let r=n[0];return typeof r=="number"&&(r=E(n,e)),new g(r,t)}}function it(t,e){return Number(t.toFixed(e))}function ct(t){return function(e){return it(e,t)}}function u(t,e,n){t=Array.isArray(t)?t:[t];for(let r of t)(R[r]||=[])[e]=n;return t=t[0],function(r){let o;return r!==void 0?(n&&(r=n(r)),o=this[t](),o.color[e]=r,o):(o=this[t]().color[e],n&&(o=n(o)),o)}}function b(t){return function(e){return Math.max(0,Math.min(t,e))}}function ht(t){return Array.isArray(t)?t:[t]}function E(t,e){for(let n=0;n<e;n++)typeof t[n]!="number"&&(t[n]=0);return t}var $=g;var $t={channel:"channel",channels:"channels",colorField:"color-field",colorFieldScope:"scope--color-field",colorMode:"color-mode",colorModeContainer:"color-mode-container",container:"container",control:"control",controlAndScope:"control-and-scope",controlSection:"control-section",deleteColor:"delete-color",header:"header",hexAndChannelsGroup:"hex-and-channels-group",hexOptions:"color-hex-options",hueScope:"scope--hue",hueSlider:"hue-slider",opacityScope:"scope--opacity",opacitySlider:"opacity-slider",preview:"preview",previewAndSliders:"preview-and-sliders",saveColor:"save-color",savedColor:"saved-color",savedColorsButtons:"saved-colors-buttons",savedColorsSection:"saved-colors-section",scope:"scope",section:"section",slider:"slider",sliders:"sliders",splitSection:"section--split",swatchGroup:"swatch-group"},qt=$("#007AC2"),Bt="calcite-color-",Gt={r:255,g:255,b:255},ut={h:360,s:100,v:100},Tt=ut.h-1,Wt={min:0,max:100},ft={s:{gap:parseInt(B),slider:{height:12},thumb:{radius:7},preview:{size:20},minWidth:200},m:{gap:parseInt(G),slider:{height:12},thumb:{radius:7},preview:{size:24},minWidth:240},l:{gap:parseInt(T),slider:{height:12},thumb:{radius:7},preview:{size:32},minWidth:304}},Pt=1,jt={minus:"minus",plus:"plus"},Xt=/^[0-9A-F]$/i,dt=/^#[0-9A-F]{3}$/i,bt=/^#[0-9A-F]{6}$/i,gt=/^#[0-9A-F]{4}$/i,pt=/^#[0-9A-F]{8}$/i;function Dt(t,e=!1,n){return e&&!t?null:$(t!=null&&typeof t=="object"&&yt(n)?mt(t):t)}var Ut=t=>Number((t*100).toFixed()),Kt=t=>Number((t/100).toFixed(2));function K(t,e=!1){return q(t,e)||_t(t,e)}function Y(t,e,n){return t?t.length===e&&n.test(t):!1}function q(t,e=!1){return Y(t,e?5:4,e?gt:dt)}function _t(t,e=!1){return Y(t,e?9:7,e?pt:bt)}function Yt(t,e=!1,n=!1){if(t=t.toLowerCase(),t.startsWith("#")||(t=`#${t}`),q(t,e))return D(U(t,e));if(e&&n&&K(t,!1)){let r=q(t,!1);return D(U(`${t}${r?"f":"ff"}`,!0))}return t}function Jt(t,e=!1){return e?t.hexa():t.hex()}function D(t){let{r:e,g:n,b:r}=t,o=I(e),s=I(n),a=I(r),l="a"in t?I(t.a*255):"";return`#${o}${s}${a}${l}`.toLowerCase()}function I(t){return t.toString(16).padStart(2,"0")}function Zt(t){let e={...t,a:t.alpha??1};return delete e.alpha,e}function mt(t){let e={...t,alpha:t.a??1};return delete e.a,e}function U(t,e=!1){if(!K(t,e))return null;t=t.replace("#","");let n,r,o,s;if(t.length===3||t.length===4){let[l,i,h,p]=t.split("");n=parseInt(`${l}${l}`,16),r=parseInt(`${i}${i}`,16),o=parseInt(`${h}${h}`,16),s=parseInt(`${p}${p}`,16)/255}else n=parseInt(t.slice(0,2),16),r=parseInt(t.slice(2,4),16),o=parseInt(t.slice(4,6),16),s=parseInt(t.slice(6,8),16)/255;return isNaN(s)?{r:n,g:r,b:o}:{r:n,g:r,b:o,a:s}}var J=t=>t,f=J({HEX:"hex",HEXA:"hexa",RGB_CSS:"rgb-css",RGBA_CSS:"rgba-css",HSL_CSS:"hsl-css",HSLA_CSS:"hsla-css"}),d=J({RGB:"rgb",RGBA:"rgba",HSL:"hsl",HSLA:"hsla",HSV:"hsv",HSVA:"hsva"});function Qt(t){if(typeof t=="string"){if(t.startsWith("#")){let{length:e}=t;if(e===4||e===7)return f.HEX;if(e===5||e===9)return f.HEXA}if(t.startsWith("rgba("))return f.RGBA_CSS;if(t.startsWith("rgb("))return f.RGB_CSS;if(t.startsWith("hsl("))return f.HSL_CSS;if(t.startsWith("hsla("))return f.HSLA_CSS}if(typeof t=="object"){if(H(t,"r","g","b"))return H(t,"a")?d.RGBA:d.RGB;if(H(t,"h","s","l"))return H(t,"a")?d.HSLA:d.HSL;if(H(t,"h","s","v"))return H(t,"a")?d.HSVA:d.HSV}return null}function H(t,...e){return e.every(n=>n&&t&&`${n}`in t)}function Vt(t,e){return t?.rgb().array().toString()===e?.rgb().array().toString()}function yt(t){return t===f.HEXA||t===f.RGBA_CSS||t===f.HSLA_CSS||t===d.RGBA||t===d.HSLA||t===d.HSVA}function te(t){return t===f.HEX?f.HEXA:t===f.RGB_CSS?f.RGBA_CSS:t===f.HSL_CSS?f.HSLA_CSS:t===d.RGB?d.RGBA:t===d.HSL?d.HSLA:t===d.HSV?d.HSVA:t}function ee(t){return t===f.HEXA?f.HEX:t===f.RGBA_CSS?f.RGB_CSS:t===f.HSLA_CSS?f.HSL_CSS:t===d.RGBA?d.RGB:t===d.HSLA?d.HSL:t===d.HSVA?d.HSV:t}var wt=1,Z=wt*2;function ne(t,e,n){let r=n?ft.l.preview.size:e.preview.size,o=t-Z,s=e.gap*3;return Math.max(o-s-r,0)}function re(t){let n=t-Z;return{width:Math.max(n,0),height:Math.max(Math.floor(n/1.8),0)}}export{$ as a,$t as b,qt as c,Bt as d,Gt as e,ut as f,Tt as g,Wt as h,ft as i,Pt as j,jt as k,Xt as l,Dt as m,Ut as n,Kt as o,K as p,q,_t as r,Yt as s,Jt as t,D as u,Zt as v,U as w,f as x,Qt as y,Vt as z,yt as A,te as B,ee as C,ne as D,re as E};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
|
+
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
+
v5.0.0-next.28 */
|
|
4
|
+
import{a as t,b as S,c as v,d as c}from"./W672JU5G.js";import{a as L}from"./UQLN223W.js";import{b as R}from"./FIY2DX6P.js";import{a as M}from"./IC5U3US4.js";import"./UWOTAU32.js";import{a as I}from"./FST7R3GB.js";import{a as u}from"./ZHK6KUIW.js";import"./MMXI2D6G.js";import{a as F,b as B}from"./3NUNHJUT.js";import{a as N}from"./RU6R2G5Y.js";import{c as O}from"./HLOPOVBH.js";import{a as T}from"./EMU2AT4J.js";import{a as P}from"./SWLBZTLD.js";import"./NUDIM2KL.js";import{t as s,u as x}from"./CU3NAWYI.js";import"./4HYFSWQK.js";import{B as z,C,D as E,E as o,P as w,g as A,h as n,l as $,o as g}from"./4DX6AFI7.js";var _=A`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;overflow:hidden;border-radius:var(--calcite-panel-corner-radius, var(--calcite-corner-radius-sharp))}slot[name=alerts]::slotted(calcite-alert){block-size:0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-panel-default-space: var(--calcite-spacing-sm);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-sm-plus)}:host([scale=s]) .header-content .heading{font-size:var(--calcite-font-size--1)}:host([scale=s]) .header-content .description{font-size:var(--calcite-font-size--2)}:host([scale=s]) .header-content .icon{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-panel-default-space: var(--calcite-spacing-md);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-md-plus)}:host([scale=m]) .header-content .heading{font-size:var(--calcite-font-size-0)}:host([scale=m]) .header-content .description{font-size:var(--calcite-font-size--1)}:host([scale=m]) .header-content .icon{margin-inline-end:var(--calcite-spacing-md)}:host(:is([scale=s],[scale=m])){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xs);--calcite-internal-panel-default-space: var(--calcite-spacing-lg);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-xl)}:host([scale=l]) .header-content .heading{font-size:var(--calcite-font-size-1)}:host([scale=l]) .header-content .description{font-size:var(--calcite-font-size-0)}:host([scale=l]) .header-content .icon{margin-inline-end:var(--calcite-spacing-lg)}.content-top,.content-bottom{display:flex;align-items:flex-start;align-self:stretch;padding:var(--calcite-internal-panel-default-space);border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));background-color:var(--calcite-panel-background-color, var(--calcite-color-foreground-1))}.container{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;overflow:hidden;background-color:var(--calcite-color-background);padding:0;color:var(--calcite-color-text-2);transition:max-block-size var(--calcite-animation-timing),inline-size var(--calcite-animation-timing);box-sizing:border-box;font-size:var(--calcite-font-size--1)}.container *{box-sizing:border-box}.header{z-index:var(--calcite-z-index-header);display:flex;flex-direction:column;background-color:var(--calcite-panel-header-background-color, var(--calcite-color-foreground-1));border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-panel-header-border-block-end, var(--calcite-color-border-3)))}.header-container{display:flex;inline-size:100%;flex-direction:row;align-items:stretch;justify-content:flex-start;flex:0 0 auto}.header-container--border-end{border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3))}.action-bar-container{inline-size:100%}.action-bar-container ::slotted(calcite-action-bar){inline-size:100%}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:.75rem;padding-block:.875rem;margin-inline-end:auto;justify-content:center}.header-content .heading-text-content{flex:1 1 auto;overflow:hidden}.header-content .heading,.header-content .description{display:block;flex:none;overflow-wrap:break-word;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.header-content .heading{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-panel-heading-text-color, var(--calcite-color-text-1))}.header-content .heading:only-child{margin-block-end:0px}.header-content .description{color:var(--calcite-panel-description-text-color, var(--calcite-color-text-2))}#close,#collapse,calcite-action-menu{--calcite-action-background-color: var(--calcite-panel-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-panel-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-panel-header-action-background-color-press);--calcite-action-text-color: var(--calcite-panel-header-action-text-color);--calcite-action-text-color-press: var(--calcite-panel-header-action-text-color-press)}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;margin:auto;gap:var(--calcite-internal-panel-action-spacing)}.header-actions--start{margin-inline-start:var(--calcite-internal-panel-action-spacing)}.header-actions--end{margin-inline-end:var(--calcite-internal-panel-action-spacing)}.content-wrapper{position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;overflow:auto;color:var(--calcite-color-text-2);outline-color:transparent;padding:var(--calcite-panel-space, var(--calcite-panel-content-space, 0));background:var(--calcite-panel-background-color, var(--calcite-color-background))}.content-wrapper:focus-visible{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.header-content{flex:1 1 auto;justify-content:center;padding-block:var(--calcite-internal-panel-header-vertical-padding);padding-inline:var(--calcite-internal-panel-default-space)}.header-content.header--slotted-content{padding:var(--calcite-panel-header-content-space, var(--calcite-internal-panel-header-vertical-padding) var(--calcite-internal-panel-default-space))}.header-content.header--non-slotted-content{align-items:center;flex-direction:row}.footer{margin-block-start:auto;display:flex;flex-direction:row;align-content:space-between;align-items:center;justify-content:center;font-size:var(--calcite-font-size--2);line-height:1.375;border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-footer-space, var(--calcite-panel-footer-padding, var(--calcite-internal-panel-default-space)));background-color:var(--calcite-panel-footer-background-color, var(--calcite-color-foreground-1))}.footer-content{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:center}.footer-start{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-start;margin-inline-end:auto;gap:var(--calcite-internal-panel-default-space)}.footer-end{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-end;margin-inline-start:auto;gap:var(--calcite-internal-panel-default-space)}.fab-container{position:sticky;inset-block-end:0px;z-index:var(--calcite-z-index-sticky);margin-block:0px;margin-inline:auto;display:block;padding:.5rem;inset-inline:0;inline-size:fit-content}calcite-icon{--calcite-icon-color: var(--calcite-panel-icon-color, var(--calcite-color-text-1))}:host([hidden]){display:none}[hidden]{display:none}`,y=class extends E{constructor(){super(),this.containerRef=z(),this.resizeObserver=F("resize",()=>this.resizeHandler()),this.messages=N(),this._closed=!1,this.focusSetter=T()(this),this.interactiveContainer=I(this),this.hasActionBar=!1,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasEndActions=!1,this.hasFab=!1,this.hasFooterContent=!1,this.hasFooterEndContent=!1,this.hasFooterStartContent=!1,this.hasHeaderContent=!1,this.hasMenuItems=!1,this.hasStartActions=!1,this.showHeaderContent=!1,this.closable=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.menuOpen=!1,this.menuPlacement=R,this.overlayPositioning="absolute",this.scale="m",this.calcitePanelClose=g({cancelable:!0}),this.calcitePanelCollapse=g({cancelable:!1}),this.calcitePanelExpand=g({cancelable:!1}),this.calcitePanelScroll=g({cancelable:!1}),this.calcitePanelToggle=g({cancelable:!1}),this.listen("keydown",this.panelKeyDownHandler),this.listen("calcitePanelClose",this.panelCloseHandler)}static{this.properties={hasActionBar:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],hasEndActions:[16,{},{state:!0}],hasFab:[16,{},{state:!0}],hasFooterContent:[16,{},{state:!0}],hasFooterEndContent:[16,{},{state:!0}],hasFooterStartContent:[16,{},{state:!0}],hasHeaderContent:[16,{},{state:!0}],hasMenuItems:[16,{},{state:!0}],hasStartActions:[16,{},{state:!0}],showHeaderContent:[16,{},{state:!0}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],icon:[3,{type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=[L,_]}get closed(){return this._closed}set closed(e){let a=this._closed;e!==a&&this.setClosedState(e)}async scrollContentTo(e){this.panelScrollEl?.scrollTo(e)}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}willUpdate(e){e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calcitePanelCollapse.emit():this.calcitePanelExpand.emit())}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}async setClosedState(e){if(this.beforeClose&&e)try{await this.beforeClose?.()}catch{return}this._closed=e}resizeHandler(){let{panelScrollEl:e}=this;if(!e||typeof e.scrollHeight!="number"||typeof e.offsetHeight!="number")return;e.scrollHeight>e.offsetHeight?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}closeClickHandler(){this.emitCloseEvent()}emitCloseEvent(){this.calcitePanelClose.emit()}panelKeyDownHandler(e){this.closable&&e.key==="Escape"&&!e.defaultPrevented&&(e.preventDefault(),this.emitCloseEvent())}panelCloseHandler(e){e.defaultPrevented||e.target!==this.el||(this.closed=!0)}collapse(){this.collapsed=!this.collapsed,this.calcitePanelToggle.emit()}panelScrollHandler(){this.calcitePanelScroll.emit()}handleHeaderActionsStartSlotChange(e){this.hasStartActions=s(e)}handleHeaderActionsEndSlotChange(e){this.hasEndActions=s(e)}handleHeaderMenuActionsSlotChange(e){this.hasMenuItems=s(e)}handleActionBarSlotChange(e){let a=x(e).filter(l=>l?.matches("calcite-action-bar"));a.forEach(l=>l.layout="horizontal"),this.hasActionBar=!!a.length}handleHeaderContentSlotChange(e){this.hasHeaderContent=s(e)}handleFabSlotChange(e){this.hasFab=s(e)}handleFooterEndSlotChange(e){this.hasFooterEndContent=s(e)}handleFooterStartSlotChange(e){this.hasFooterStartContent=s(e)}handleFooterSlotChange(e){this.hasFooterContent=s(e)}contentBottomSlotChangeHandler(e){this.hasContentBottom=s(e)}contentTopSlotChangeHandler(e){this.hasContentTop=s(e)}setPanelScrollEl(e){B(this.resizeObserver,this.panelScrollEl,e),this.panelScrollEl=e}handleAlertsSlotChange(e){x(e)?.map(a=>{a.nodeName==="CALCITE-ALERT"&&(a.embedded=!0)})}renderHeaderContent(){let{heading:e,headingLevel:a,description:l,hasHeaderContent:i,icon:d,scale:m}=this,h=d?n`<calcite-icon class=${o(t.icon)} .flipRtl=${this.iconFlipRtl} .icon=${d} .scale=${P(m)}></calcite-icon>`:null,r=e?M({class:t.heading,level:a,children:e}):null,p=l?n`<span class=${o(t.description)}>${l}</span>`:null;return!i&&(r||p)?u("header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerNonSlottedContent]:!0})}>${h}<div class=${o(t.headingTextContent)}>${r}${p}</div></div>`):null}renderActionBar(){return n`<div class=${o(t.actionBarContainer)} .hidden=${!this.hasActionBar}><slot name=${c.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`}renderHeaderSlottedContent(){return u("slotted-header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerSlottedContent]:!0})} .hidden=${!this.hasHeaderContent}><slot name=${c.headerContent} @slotchange=${this.handleHeaderContentSlotChange}></slot></div>`)}renderHeaderStartActions(){let{hasStartActions:e}=this;return u("header-actions-start",n`<div class=${o({[t.headerActionsStart]:!0,[t.headerActions]:!0})} .hidden=${!e}><slot name=${c.headerActionsStart} @slotchange=${this.handleHeaderActionsStartSlotChange}></slot></div>`)}renderHeaderActionsEnd(){let{hasEndActions:e,messages:a,closable:l,collapsed:i,collapseDirection:d,collapsible:m,hasMenuItems:h}=this,{collapse:r,expand:p,close:f}=a,b=[v.expand,v.collapse];d==="up"&&b.reverse();let H=m?n`<calcite-action .aria=${{expanded:!i}} .icon=${i?b[0]:b[1]} id=${S.collapse} .label=${r} @click=${this.collapse} .scale=${this.scale} .text=${r} title=${(i?p:r)??$}></calcite-action>`:null,k=l?n`<calcite-action .ariaLabel=${f} .icon=${v.close} id=${S.close} @click=${this.closeClickHandler} .scale=${this.scale} .text=${f} title=${f??$}></calcite-action>`:null,j=n`<slot name=${c.headerActionsEnd} @slotchange=${this.handleHeaderActionsEndSlotChange}></slot>`,D=e||H||k||h;return u("header-actions-end",n`<div class=${o({[t.headerActionsEnd]:!0,[t.headerActions]:!0})} .hidden=${!D}>${j}${this.renderMenu()}${H}${k}</div>`)}renderMenu(){let{hasMenuItems:e,messages:a,menuOpen:l,menuFlipPlacements:i,menuPlacement:d}=this;return u("menu",n`<calcite-action-menu .flipPlacements=${i??["top","bottom"]} .hidden=${!e} .label=${a.options} .open=${l} .overlayPositioning=${this.overlayPositioning} .placement=${d}><calcite-action class=${o(t.menuAction)} .icon=${v.menu} .scale=${this.scale} slot=${O.trigger} .text=${a.options}></calcite-action><slot name=${c.headerMenuActions} @slotchange=${this.handleHeaderMenuActionsSlotChange}></slot></calcite-action-menu>`)}renderHeaderNode(){let{hasHeaderContent:e,hasStartActions:a,hasEndActions:l,closable:i,collapsible:d,hasMenuItems:m,hasActionBar:h,hasContentTop:r}=this,p=this.renderHeaderContent(),f=e||!!p||a||l||d||i||m||h||r;return this.showHeaderContent=f,n`<header class=${o(t.header)} .hidden=${!(f||h||r)}><div class=${o({[t.headerContainer]:!0,[t.headerContainerBorderEnd]:h})} .hidden=${!f}>${this.renderHeaderStartActions()}${this.renderHeaderSlottedContent()}${p}${this.renderHeaderActionsEnd()}</div>${this.renderActionBar()}${this.renderContentTop()}</header>`}renderFooterNode(){let{hasFooterEndContent:e,hasFooterStartContent:a,hasFooterContent:l}=this,i=a||e||l;return n`<footer class=${o(t.footer)} .hidden=${!i}><div class=${o(t.footerContent)} .hidden=${!l}><slot name=${c.footer} @slotchange=${this.handleFooterSlotChange}></slot></div><div class=${o(t.footerStart)} .hidden=${l||!a}><slot name=${c.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot></div><div class=${o(t.footerEnd)} .hidden=${l||!e}><slot name=${c.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></div></footer>`}renderContent(){return n`<div class=${o(t.contentWrapper)} .hidden=${this.collapsible&&this.collapsed} @scroll=${this.panelScrollHandler} ${C(this.setPanelScrollEl)}><slot></slot>${this.renderFab()}</div>`}renderContentBottom(){return n`<div class=${o(t.contentBottom)} .hidden=${!this.hasContentBottom}><slot name=${c.contentBottom} @slotchange=${this.contentBottomSlotChangeHandler}></slot></div>`}renderContentTop(){return n`<div class=${o(t.contentTop)} .hidden=${!this.hasContentTop}><slot name=${c.contentTop} @slotchange=${this.contentTopSlotChangeHandler}></slot></div>`}renderFab(){return n`<div class=${o(t.fabContainer)} .hidden=${!this.hasFab}><slot name=${c.fab} @slotchange=${this.handleFabSlotChange}></slot></div>`}render(){let{disabled:e,loading:a,closed:l}=this,i=n`<article .ariaBusy=${a} class=${o(t.container)} .hidden=${l} ${C(this.containerRef)}>${this.renderHeaderNode()}${this.renderContent()}${this.renderContentBottom()}${this.renderFooterNode()}${u("alerts",n`<slot name=${c.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</article>`;return this.interactiveContainer({disabled:e,children:n`${a?n`<calcite-scrim .loading=${a}></calcite-scrim>`:null}${i}`})}};w("calcite-panel",y);export{y as Panel};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
|
|
2
2
|
See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
|
|
3
|
-
v5.0.0-next.
|
|
4
|
-
import{
|
|
3
|
+
v5.0.0-next.28 */
|
|
4
|
+
import{b as oe}from"./NUDIM2KL.js";import{a as ne,l as ie}from"./CU3NAWYI.js";import{N as re}from"./4DX6AFI7.js";var se=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],B=se.join(","),ce=typeof Element>"u",D=ce?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,K=!ce&&Element.prototype.getRootNode?function(a){var e;return a==null||(e=a.getRootNode)===null||e===void 0?void 0:e.call(a)}:function(a){return a?.ownerDocument},j=function a(e,t){var r;t===void 0&&(t=!0);var u=e==null||(r=e.getAttribute)===null||r===void 0?void 0:r.call(e,"inert"),s=u===""||u==="true",n=s||t&&e&&a(e.parentNode);return n},Se=function(e){var t,r=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return r===""||r==="true"},le=function(e,t,r){if(j(e))return[];var u=Array.prototype.slice.apply(e.querySelectorAll(B));return t&&D.call(e,B)&&u.unshift(e),u=u.filter(r),u},fe=function a(e,t,r){for(var u=[],s=Array.from(e);s.length;){var n=s.shift();if(!j(n,!1))if(n.tagName==="SLOT"){var d=n.assignedElements(),l=d.length?d:n.children,y=a(l,!0,r);r.flatten?u.push.apply(u,y):u.push({scopeParent:n,candidates:y})}else{var T=D.call(n,B);T&&r.filter(n)&&(t||!e.includes(n))&&u.push(n);var w=n.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(n),S=!j(w,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(n));if(w&&S){var C=a(w===!0?n.children:w.children,!0,r);r.flatten?u.push.apply(u,C):u.push({scopeParent:n,candidates:C})}else s.unshift.apply(s,n.children)}}return u},de=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},E=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Se(e))&&!de(e)?0:e.tabIndex},ke=function(e,t){var r=E(e);return r<0&&t&&!de(e)?0:r},De=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},ve=function(e){return e.tagName==="INPUT"},Re=function(e){return ve(e)&&e.type==="hidden"},Ce=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(r){return r.tagName==="SUMMARY"});return t},Oe=function(e,t){for(var r=0;r<e.length;r++)if(e[r].checked&&e[r].form===t)return e[r]},Ae=function(e){if(!e.name)return!0;var t=e.form||K(e),r=function(d){return t.querySelectorAll('input[type="radio"][name="'+d+'"]')},u;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")u=r(window.CSS.escape(e.name));else try{u=r(e.name)}catch(n){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",n.message),!1}var s=Oe(u,e.form);return!s||s===e},Ie=function(e){return ve(e)&&e.type==="radio"},Pe=function(e){return Ie(e)&&!Ae(e)},xe=function(e){var t,r=e&&K(e),u=(t=r)===null||t===void 0?void 0:t.host,s=!1;if(r&&r!==e){var n,d,l;for(s=!!((n=u)!==null&&n!==void 0&&(d=n.ownerDocument)!==null&&d!==void 0&&d.contains(u)||e!=null&&(l=e.ownerDocument)!==null&&l!==void 0&&l.contains(e));!s&&u;){var y,T,w;r=K(u),u=(y=r)===null||y===void 0?void 0:y.host,s=!!((T=u)!==null&&T!==void 0&&(w=T.ownerDocument)!==null&&w!==void 0&&w.contains(u))}}return s},ue=function(e){var t=e.getBoundingClientRect(),r=t.width,u=t.height;return r===0&&u===0},Le=function(e,t){var r=t.displayCheck,u=t.getShadowRoot;if(getComputedStyle(e).visibility==="hidden")return!0;var s=D.call(e,"details>summary:first-of-type"),n=s?e.parentElement:e;if(D.call(n,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="legacy-full"){if(typeof u=="function"){for(var d=e;e;){var l=e.parentElement,y=K(e);if(l&&!l.shadowRoot&&u(l)===!0)return ue(e);e.assignedSlot?e=e.assignedSlot:!l&&y!==e.ownerDocument?e=y.host:e=l}e=d}if(xe(e))return!e.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return ue(e);return!1},Be=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var r=0;r<t.children.length;r++){var u=t.children.item(r);if(u.tagName==="LEGEND")return D.call(t,"fieldset[disabled] *")?!0:!u.contains(e)}return!0}t=t.parentElement}return!1},M=function(e,t){return!(t.disabled||j(t)||Re(t)||Le(t,e)||Ce(t)||Be(t))},$=function(e,t){return!(Pe(t)||E(t)<0||!M(e,t))},Ke=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},je=function a(e){var t=[],r=[];return e.forEach(function(u,s){var n=!!u.scopeParent,d=n?u.scopeParent:u,l=ke(d,n),y=n?a(u.candidates):d;l===0?n?t.push.apply(t,y):t.push(d):r.push({documentOrder:s,tabIndex:l,item:u,isScope:n,content:y})}),r.sort(De).reduce(function(u,s){return s.isScope?u.push.apply(u,s.content):u.push(s.content),u},[]).concat(t)},be=function(e,t){t=t||{};var r;return t.getShadowRoot?r=fe([e],t.includeContainer,{filter:$.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ke}):r=le(e,t.includeContainer,$.bind(null,t)),je(r)},he=function(e,t){t=t||{};var r;return t.getShadowRoot?r=fe([e],t.includeContainer,{filter:M.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):r=le(e,t.includeContainer,M.bind(null,t)),r},R=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return D.call(e,B)===!1?!1:$(t,e)},Me=se.concat("iframe").join(","),G=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return D.call(e,Me)===!1?!1:M(t,e)};function Y(a,e){(e==null||e>a.length)&&(e=a.length);for(var t=0,r=Array(e);t<e;t++)r[t]=a[t];return r}function Ge(a){if(Array.isArray(a))return Y(a)}function _e(a,e,t){return(e=$e(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function qe(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function Ve(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
5
5
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function pe(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(a);e&&(r=r.filter(function(u){return Object.getOwnPropertyDescriptor(a,u).enumerable})),t.push.apply(t,r)}return t}function ye(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?pe(Object(t),!0).forEach(function(r){_e(a,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):pe(Object(t)).forEach(function(r){Object.defineProperty(a,r,Object.getOwnPropertyDescriptor(t,r))})}return a}function Ue(a){return Ge(a)||qe(a)||Ye(a)||Ve()}function We(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var r=t.call(a,e);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function $e(a){var e=We(a,"string");return typeof e=="symbol"?e:e+""}function Ye(a,e){if(a){if(typeof a=="string")return Y(a,e);var t={}.toString.call(a).slice(8,-1);return t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set"?Array.from(a):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Y(a,e):void 0}}var ge={activateTrap:function(e,t){if(e.length>0){var r=e[e.length-1];r!==t&&r._setPausedState(!0)}var u=e.indexOf(t);u===-1||e.splice(u,1),e.push(t)},deactivateTrap:function(e,t){var r=e.indexOf(t);r!==-1&&e.splice(r,1),e.length>0&&!e[e.length-1]._isManuallyPaused()&&e[e.length-1]._setPausedState(!1)}},Ze=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},ze=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},x=function(e){return e?.key==="Tab"||e?.keyCode===9},Xe=function(e){return x(e)&&!e.shiftKey},He=function(e){return x(e)&&e.shiftKey},me=function(e){return setTimeout(e,0)},P=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),u=1;u<t;u++)r[u-1]=arguments[u];return typeof e=="function"?e.apply(void 0,r):e},_=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},Je=[],we=function(e,t){var r=t?.document||document,u=t?.trapStack||Je,s=ye({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,isKeyForward:Xe,isKeyBackward:He},t),n={containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},d,l=function(i,o,c){return i&&i[o]!==void 0?i[o]:s[c||o]},y=function(i,o){var c=typeof o?.composedPath=="function"?o.composedPath():void 0;return n.containerGroups.findIndex(function(v){var b=v.container,p=v.tabbableNodes;return b.contains(i)||c?.includes(b)||p.find(function(f){return f===i})})},T=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=o.hasFallback,v=c===void 0?!1:c,b=o.params,p=b===void 0?[]:b,f=s[i];if(typeof f=="function"&&(f=f.apply(void 0,Ue(p))),f===!0&&(f=void 0),!f){if(f===void 0||f===!1)return f;throw new Error("`".concat(i,"` was specified but was not a node, or did not return a node"))}var g=f;if(typeof f=="string"){try{g=r.querySelector(f)}catch(m){throw new Error("`".concat(i,'` appears to be an invalid selector; error="').concat(m.message,'"'))}if(!g&&!v)throw new Error("`".concat(i,"` as selector refers to no known node"))}return g},w=function(){var i=T("initialFocus",{hasFallback:!0});if(i===!1)return!1;if(i===void 0||i&&!G(i,s.tabbableOptions))if(y(r.activeElement)>=0)i=r.activeElement;else{var o=n.tabbableGroups[0],c=o&&o.firstTabbableNode;i=c||T("fallbackFocus")}else i===null&&(i=T("fallbackFocus"));if(!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i},S=function(){if(n.containerGroups=n.containers.map(function(i){var o=be(i,s.tabbableOptions),c=he(i,s.tabbableOptions),v=o.length>0?o[0]:void 0,b=o.length>0?o[o.length-1]:void 0,p=c.find(function(m){return R(m)}),f=c.slice().reverse().find(function(m){return R(m)}),g=!!o.find(function(m){return E(m)>0});return{container:i,tabbableNodes:o,focusableNodes:c,posTabIndexesFound:g,firstTabbableNode:v,lastTabbableNode:b,firstDomTabbableNode:p,lastDomTabbableNode:f,nextTabbableNode:function(k){var A=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,N=o.indexOf(k);return N<0?A?c.slice(c.indexOf(k)+1).find(function(I){return R(I)}):c.slice(0,c.indexOf(k)).reverse().find(function(I){return R(I)}):o[N+(A?1:-1)]}}}),n.tabbableGroups=n.containerGroups.filter(function(i){return i.tabbableNodes.length>0}),n.tabbableGroups.length<=0&&!T("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(n.containerGroups.find(function(i){return i.posTabIndexesFound})&&n.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},C=function(i){var o=i.activeElement;if(o)return o.shadowRoot&&o.shadowRoot.activeElement!==null?C(o.shadowRoot):o},F=function(i){if(i!==!1&&i!==C(document)){if(!i||!i.focus){F(w());return}i.focus({preventScroll:!!s.preventScroll}),n.mostRecentlyFocusedNode=i,Ze(i)&&i.select()}},Z=function(i){var o=T("setReturnFocus",{params:[i]});return o||(o===!1?!1:i)},z=function(i){var o=i.target,c=i.event,v=i.isBackward,b=v===void 0?!1:v;o=o||_(c),S();var p=null;if(n.tabbableGroups.length>0){var f=y(o,c),g=f>=0?n.containerGroups[f]:void 0;if(f<0)b?p=n.tabbableGroups[n.tabbableGroups.length-1].lastTabbableNode:p=n.tabbableGroups[0].firstTabbableNode;else if(b){var m=n.tabbableGroups.findIndex(function(U){var W=U.firstTabbableNode;return o===W});if(m<0&&(g.container===o||G(o,s.tabbableOptions)&&!R(o,s.tabbableOptions)&&!g.nextTabbableNode(o,!1))&&(m=f),m>=0){var k=m===0?n.tabbableGroups.length-1:m-1,A=n.tabbableGroups[k];p=E(o)>=0?A.lastTabbableNode:A.lastDomTabbableNode}else x(c)||(p=g.nextTabbableNode(o,!1))}else{var N=n.tabbableGroups.findIndex(function(U){var W=U.lastTabbableNode;return o===W});if(N<0&&(g.container===o||G(o,s.tabbableOptions)&&!R(o,s.tabbableOptions)&&!g.nextTabbableNode(o))&&(N=f),N>=0){var I=N===n.tabbableGroups.length-1?0:N+1,ae=n.tabbableGroups[I];p=E(o)>=0?ae.firstTabbableNode:ae.firstDomTabbableNode}else x(c)||(p=g.nextTabbableNode(o))}}else p=T("fallbackFocus");return p},L=function(i){var o=_(i);if(!(y(o,i)>=0)){if(P(s.clickOutsideDeactivates,i)){d.deactivate({returnFocus:s.returnFocusOnDeactivate});return}P(s.allowOutsideClick,i)||i.preventDefault()}},X=function(i){var o=_(i),c=y(o,i)>=0;if(c||o instanceof Document)c&&(n.mostRecentlyFocusedNode=o);else{i.stopImmediatePropagation();var v,b=!0;if(n.mostRecentlyFocusedNode)if(E(n.mostRecentlyFocusedNode)>0){var p=y(n.mostRecentlyFocusedNode),f=n.containerGroups[p].tabbableNodes;if(f.length>0){var g=f.findIndex(function(m){return m===n.mostRecentlyFocusedNode});g>=0&&(s.isKeyForward(n.recentNavEvent)?g+1<f.length&&(v=f[g+1],b=!1):g-1>=0&&(v=f[g-1],b=!1))}}else n.containerGroups.some(function(m){return m.tabbableNodes.some(function(k){return E(k)>0})})||(b=!1);else b=!1;b&&(v=z({target:n.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(n.recentNavEvent)})),F(v||n.mostRecentlyFocusedNode||w())}n.recentNavEvent=void 0},Ne=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n.recentNavEvent=i;var c=z({event:i,isBackward:o});c&&(x(i)&&i.preventDefault(),F(c))},H=function(i){(s.isKeyForward(i)||s.isKeyBackward(i))&&Ne(i,s.isKeyBackward(i))},J=function(i){ze(i)&&P(s.escapeDeactivates,i)!==!1&&(i.preventDefault(),d.deactivate())},Q=function(i){var o=_(i);y(o,i)>=0||P(s.clickOutsideDeactivates,i)||P(s.allowOutsideClick,i)||(i.preventDefault(),i.stopImmediatePropagation())},ee=function(){if(n.active)return ge.activateTrap(u,d),n.delayInitialFocusTimer=s.delayInitialFocus?me(function(){F(w())}):F(w()),r.addEventListener("focusin",X,!0),r.addEventListener("mousedown",L,{capture:!0,passive:!1}),r.addEventListener("touchstart",L,{capture:!0,passive:!1}),r.addEventListener("click",Q,{capture:!0,passive:!1}),r.addEventListener("keydown",H,{capture:!0,passive:!1}),r.addEventListener("keydown",J),d},te=function(){if(n.active)return r.removeEventListener("focusin",X,!0),r.removeEventListener("mousedown",L,!0),r.removeEventListener("touchstart",L,!0),r.removeEventListener("click",Q,!0),r.removeEventListener("keydown",H,!0),r.removeEventListener("keydown",J),d},Ee=function(i){var o=i.some(function(c){var v=Array.from(c.removedNodes);return v.some(function(b){return b===n.mostRecentlyFocusedNode})});o&&F(w())},V=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(Ee):void 0,O=function(){V&&(V.disconnect(),n.active&&!n.paused&&n.containers.map(function(i){V.observe(i,{subtree:!0,childList:!0})}))};return d={get active(){return n.active},get paused(){return n.paused},activate:function(i){if(n.active)return this;var o=l(i,"onActivate"),c=l(i,"onPostActivate"),v=l(i,"checkCanFocusTrap");v||S(),n.active=!0,n.paused=!1,n.nodeFocusedBeforeActivation=C(r),o?.();var b=function(){v&&S(),ee(),O(),c?.()};return v?(v(n.containers.concat()).then(b,b),this):(b(),this)},deactivate:function(i){if(!n.active)return this;var o=ye({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},i);clearTimeout(n.delayInitialFocusTimer),n.delayInitialFocusTimer=void 0,te(),n.active=!1,n.paused=!1,O(),ge.deactivateTrap(u,d);var c=l(o,"onDeactivate"),v=l(o,"onPostDeactivate"),b=l(o,"checkCanReturnFocus"),p=l(o,"returnFocus","returnFocusOnDeactivate");c?.();var f=function(){me(function(){p&&F(Z(n.nodeFocusedBeforeActivation)),v?.()})};return p&&b?(b(Z(n.nodeFocusedBeforeActivation)).then(f,f),this):(f(),this)},pause:function(i){return n.active?(n.manuallyPaused=!0,this._setPausedState(!0,i)):this},unpause:function(i){return n.active?(n.manuallyPaused=!1,u[u.length-1]!==this?this:this._setPausedState(!1,i)):this},updateContainerElements:function(i){var o=[].concat(i).filter(Boolean);return n.containers=o.map(function(c){return typeof c=="string"?r.querySelector(c):c}),n.active&&S(),O(),this}},Object.defineProperties(d,{_isManuallyPaused:{value:function(){return n.manuallyPaused}},_setPausedState:{value:function(i,o){if(n.paused===i)return this;if(n.paused=i,i){var c=l(o,"onPause"),v=l(o,"onPostPause");c?.(),te(),O(),v?.()}else{var b=l(o,"onUnpause"),p=l(o,"onPostUnpause");b?.(),S(),ee(),O(),p?.()}return this}}}),d.updateContainerElements(e),d};function Te(a,{focusTrapOptions:e},t){return!e?.extraContainers&&!t?a:[a,...Fe(e?.extraContainers),...Fe(t)]}function Fe(a=[]){return Array.isArray(a)?a:[a]}var q=new WeakSet;function Qe(a,e){let t=e&&e!==document.body&&e!==document.documentElement;return!q.has(a)&&t&&ie(e),!1}function et(a,e){let t=e?.fallbackFocus||a,r=e?.clickOutsideDeactivates??!0;return{fallbackFocus:t,...e,document:a.ownerDocument,tabbableOptions:ne,trapStack:re().focusTrapStack,clickOutsideDeactivates:u=>(q.has(a)||q.add(a),typeof r=="function"?r(u):r),onPostDeactivate:()=>{q.delete(a)},setReturnFocus:u=>{let s=typeof e?.setReturnFocus=="function"?e.setReturnFocus(u):e?.setReturnFocus;return s===void 0?Qe(a,u):s}}}var st=a=>oe((e,t)=>{let r,u,s,n=a.focusTrapOptions;t.onConnected(()=>{e[a.triggerProp]&&r&&d.activate()}),t.onUpdate(l=>{e.hasUpdated&&l.has("focusTrapDisabled")&&(e.focusTrapDisabled?d.deactivate():d.activate())}),t.onDisconnected(()=>d.deactivate());let d={get _instance(){},activate:()=>{let l=u||e.el;l.isConnected&&(r||(s||=Te(l,e),r=we(s,et(l,{...n,...e.focusTrapOptions}))),(typeof e.focusTrapDisabledOverride=="function"?!e.focusTrapDisabledOverride():!e.focusTrapDisabled)&&r.activate())},deactivate:()=>r?.deactivate(),overrideFocusTrapEl:l=>{if(r)throw new Error("Focus trap already created");u=l},setExtraContainers:l=>{let y=u||e.el;s=Te(y,e,l)},updateContainerElements:()=>r?.updateContainerElements(s)};return d});export{st as a};
|