@esri/calcite-components 5.2.0-next.41 → 5.2.0-next.43
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/{7MVTHLFR.js → 274BEJIS.js} +1 -1
- package/dist/cdn/{G623ZHZE.js → 2EG3LAYV.js} +1 -1
- package/dist/cdn/{PY62WXQS.js → 2F6E3NJI.js} +1 -1
- package/dist/cdn/{TLHSIAO4.js → 2HUIIAVL.js} +1 -1
- package/dist/cdn/{BPBVS5FR.js → 2PMX6BFP.js} +1 -1
- package/dist/cdn/{QC4U5OAE.js → 37CYUX2V.js} +1 -1
- package/dist/cdn/{A5P5KMRQ.js → 3PPZFWCS.js} +1 -1
- package/dist/cdn/{I57Y33ZS.js → 3RWE2RSS.js} +1 -1
- package/dist/cdn/{QOMCEKSV.js → 3RX6CF4N.js} +1 -1
- package/dist/cdn/{KA4IJFDT.js → 3TRJRDU4.js} +1 -1
- package/dist/cdn/{2XKW633K.js → 45NMKWQC.js} +1 -1
- package/dist/cdn/{SRYPHTKQ.js → 46XARU6M.js} +1 -1
- package/dist/cdn/{52WDKMXM.js → 475BZ366.js} +1 -1
- package/dist/cdn/{VUE25WNJ.js → 5CXM23LK.js} +1 -1
- package/dist/cdn/{EW4M5XKO.js → 5KH32RDH.js} +1 -1
- package/dist/cdn/{3QIP5RJL.js → 5WDLVAUM.js} +1 -1
- package/dist/cdn/{7S6P5V6S.js → 62NGNYOK.js} +1 -1
- package/dist/cdn/{W7CYC7WW.js → 6FGZQBMF.js} +1 -1
- package/dist/cdn/{ABKSY7OM.js → 6LSEMSJX.js} +1 -1
- package/dist/cdn/{HJZUIGO4.js → 6PHIG6CO.js} +1 -1
- package/dist/cdn/{ZCRQBBYM.js → 7FERW3TY.js} +1 -1
- package/dist/cdn/{HGGBTM7L.js → 7Q3H2T4H.js} +1 -1
- package/dist/cdn/{UTINKSJR.js → 7RGHSQPQ.js} +1 -1
- package/dist/cdn/{KYUAIBOB.js → 7Z7AHGW5.js} +1 -1
- package/dist/cdn/{3K5AKLMO.js → A2HW5JVM.js} +1 -1
- package/dist/cdn/{RJJYWGEP.js → AEH7Z2TR.js} +1 -1
- package/dist/cdn/{X7UGVQXT.js → AF6QXW5E.js} +1 -1
- package/dist/cdn/{DHOIJMY5.js → AIS54FW4.js} +1 -1
- package/dist/cdn/{C2TBMNFU.js → AJXDVYDU.js} +1 -1
- package/dist/cdn/{T65AD6QS.js → ATPQHAUI.js} +1 -1
- package/dist/cdn/{3EYZC3SN.js → B3275U2V.js} +1 -1
- package/dist/cdn/{FBE47ZLF.js → B4QUQO6H.js} +1 -1
- package/dist/cdn/{X2XSGTDU.js → B6VIRHA6.js} +1 -1
- package/dist/cdn/{IGFFZYPH.js → BCXCQNIL.js} +1 -1
- package/dist/cdn/{UNTLYDHV.js → BMEF3YF2.js} +1 -1
- package/dist/cdn/{B5G2TRW5.js → BO3FWZWI.js} +1 -1
- package/dist/cdn/{6QDLNWSN.js → BTAEK2S7.js} +1 -1
- package/dist/cdn/{5UBPIAPT.js → CF5BZ273.js} +1 -1
- package/dist/cdn/{O2LRIMJK.js → CS6N4PPH.js} +1 -1
- package/dist/cdn/{SWDVMB5L.js → CSF7YD25.js} +1 -1
- package/dist/cdn/{EADU3BA3.js → CVCXBYXP.js} +1 -1
- package/dist/cdn/{TVAMUDTN.js → CVD5YMP6.js} +1 -1
- package/dist/cdn/{WRACZVBJ.js → CVF6MWUG.js} +1 -1
- package/dist/cdn/{N6UJD7P6.js → D3EUXPRA.js} +1 -1
- package/dist/cdn/{O4TOAPWP.js → DCBXNR23.js} +1 -1
- package/dist/cdn/{T26MBNVN.js → DTWYJKVV.js} +1 -1
- package/dist/cdn/{RXFVNPOV.js → E2NHXTFV.js} +1 -1
- package/dist/cdn/{7G4BVJYG.js → EL7LAPFQ.js} +1 -1
- package/dist/cdn/{U5XQPYHT.js → EPS45NW6.js} +1 -1
- package/dist/cdn/{WYTNRIBT.js → EU7SWUQC.js} +1 -1
- package/dist/cdn/{EO6FPSS5.js → FI5YS4LV.js} +1 -1
- package/dist/cdn/{YGN4ZJUD.js → FILVXZS6.js} +1 -1
- package/dist/cdn/{ZBCLYVBD.js → FM4LCLIP.js} +1 -1
- package/dist/cdn/{HU3HMBGZ.js → GMZ7SK5K.js} +1 -1
- package/dist/cdn/{JC3N5Z6M.js → H6RH3NN2.js} +1 -1
- package/dist/cdn/{P372COYS.js → HPADHWGC.js} +1 -1
- package/dist/cdn/{F2LG7C6F.js → HT732XS6.js} +1 -1
- package/dist/cdn/{PCGI6KRU.js → IJCNFBQT.js} +1 -1
- package/dist/cdn/{26B43NOX.js → IRLPUEFY.js} +1 -1
- package/dist/cdn/{N5ATPSCJ.js → IYG6LCIQ.js} +1 -1
- package/dist/cdn/{5JQVADCK.js → JJSYA45N.js} +1 -1
- package/dist/cdn/{EFJUQMWG.js → JK4B23GA.js} +1 -1
- package/dist/cdn/{BAF6PWDR.js → JOPCDMBA.js} +1 -1
- package/dist/cdn/{C27XN3F4.js → JSNRZYAV.js} +1 -1
- package/dist/cdn/{LSZHFGPR.js → JSXCBKXG.js} +1 -1
- package/dist/cdn/{PUZVGDIL.js → K2MKJWOS.js} +1 -1
- package/dist/cdn/{LGUNNSM6.js → KKQA4XKO.js} +1 -1
- package/dist/cdn/{VDLVYMTH.js → KKR2U4P3.js} +1 -1
- package/dist/cdn/{B4AGOFO6.js → KPMYA56P.js} +1 -1
- package/dist/cdn/{JVHDUGSB.js → LGAC7WS3.js} +1 -1
- package/dist/cdn/{IL5NN4VO.js → LJK2BEEY.js} +1 -1
- package/dist/cdn/{EGWNP7O2.js → LJOIG7EI.js} +1 -1
- package/dist/cdn/{BUI23KLA.js → LJPKY3PW.js} +1 -1
- package/dist/cdn/{CBVNWHGO.js → MRL4OJLL.js} +1 -1
- package/dist/cdn/{SUXTCC5Z.js → NCAJX3CQ.js} +1 -1
- package/dist/cdn/{6GGOV5WL.js → NDCSWGRG.js} +1 -1
- package/dist/cdn/{5HJ4I2AM.js → O3ZZLZEU.js} +1 -1
- package/dist/cdn/{YNS3MRN3.js → O6D4FEZB.js} +1 -1
- package/dist/cdn/{AONRB2VZ.js → OGBP6QSK.js} +1 -1
- package/dist/cdn/{KKWYQZA5.js → OJTGWUYQ.js} +1 -1
- package/dist/cdn/{2HWISWWB.js → OKYPPTCJ.js} +1 -1
- package/dist/cdn/{GT3AY5PV.js → OOCWC4JS.js} +1 -1
- package/dist/cdn/{FTHTE3TW.js → OPEE74RM.js} +1 -1
- package/dist/cdn/{RRYCWXOT.js → ORSU7F4T.js} +1 -1
- package/dist/cdn/{H3ZUT3EF.js → OVHCNAJH.js} +1 -1
- package/dist/cdn/{VMK262QR.js → OYXFWPBL.js} +1 -1
- package/dist/cdn/{UCOCOHHJ.js → P7XWG3RI.js} +1 -1
- package/dist/cdn/{6L6SKSGQ.js → PSTULLLB.js} +1 -1
- package/dist/cdn/{ZMIIVA7V.js → PTGIJEBE.js} +1 -1
- package/dist/cdn/{QLUZMGER.js → PTLUQ55A.js} +1 -1
- package/dist/cdn/{43AVSQSH.js → QBZYIDFV.js} +1 -1
- package/dist/cdn/{BIYJJMGW.js → QYFTRYN3.js} +1 -1
- package/dist/cdn/{27J6EX4H.js → R2RE27VU.js} +1 -1
- package/dist/cdn/{INASGIR3.js → R3VXLTMF.js} +1 -1
- package/dist/cdn/{GHYT4TSF.js → R6PI3CVS.js} +1 -1
- package/dist/cdn/{TC6JRYNG.js → R6Q7WQ7W.js} +1 -1
- package/dist/cdn/{QQZKAT7E.js → RIYKI7QR.js} +1 -1
- package/dist/cdn/{KN7F7ZFZ.js → RNBSMLG3.js} +1 -1
- package/dist/cdn/{YXZKUPH5.js → RP6GPL33.js} +1 -1
- package/dist/cdn/{Z2HUDOFZ.js → RS5V6OSQ.js} +1 -1
- package/dist/cdn/{PFKDROYY.js → RSBRRBOB.js} +1 -1
- package/dist/cdn/{L7IP5TS4.js → SA3PHFJO.js} +1 -1
- package/dist/cdn/{JRJJXW7S.js → SIZFXB6P.js} +1 -1
- package/dist/cdn/{TDZLKYDM.js → SLWX5LQS.js} +1 -1
- package/dist/cdn/{HF6UZYPE.js → SN5RZUG2.js} +1 -1
- package/dist/cdn/{3LWW3IUS.js → SQGLA5UP.js} +1 -1
- package/dist/cdn/{J7QTL4RP.js → STDD6WZH.js} +1 -1
- package/dist/cdn/{SBC7DUHY.js → SUSUB34X.js} +1 -1
- package/dist/cdn/{KKNHAEV2.js → SWNMXKUC.js} +1 -1
- package/dist/cdn/{5CK2R5LF.js → T3KSHHHH.js} +1 -1
- package/dist/cdn/{G2HGLNUQ.js → TBL37KNL.js} +1 -1
- package/dist/cdn/{NFRHR32K.js → TFGW2TGA.js} +1 -1
- package/dist/cdn/{GTCDEISR.js → TLHV3OYD.js} +1 -1
- package/dist/cdn/{RY3SGNGT.js → UAEG3SIE.js} +1 -1
- package/dist/cdn/{Z7VWFRQ5.js → UEAWKPCZ.js} +1 -1
- package/dist/cdn/{QCWTDKIP.js → UOJP55CJ.js} +1 -1
- package/dist/cdn/{ODGVHVD7.js → US2AB5NN.js} +1 -1
- package/dist/cdn/{ZFGPGIPS.js → UXUQUTZN.js} +1 -1
- package/dist/cdn/{O3ACYO4B.js → V2KLRAY6.js} +1 -1
- package/dist/cdn/{D765H6FK.js → V7YBNTNJ.js} +1 -1
- package/dist/cdn/{OYFXBIHT.js → VXHHYLSF.js} +1 -1
- package/dist/cdn/{FPPGZJAI.js → W6KVOH5B.js} +1 -1
- package/dist/cdn/{BYZVOO2P.js → WJLDDCGS.js} +1 -1
- package/dist/cdn/{AKWBXPKT.js → WO6BWGIF.js} +1 -1
- package/dist/cdn/{7JSWJOTT.js → WZ3Q7RKG.js} +1 -1
- package/dist/cdn/{VPHPEJGT.js → WZ4PLTBN.js} +1 -1
- package/dist/cdn/{4UXHPA73.js → X5MIJMJG.js} +1 -1
- package/dist/cdn/{NDEQD737.js → X7RGNR4I.js} +1 -1
- package/dist/cdn/{ALYYYYSE.js → XBNYGMBX.js} +1 -1
- package/dist/cdn/{YXIGQJJX.js → XCD7BH5J.js} +1 -1
- package/dist/cdn/{L56TURMR.js → XID6S6AM.js} +1 -1
- package/dist/cdn/{TWDA3PKI.js → XR4L2MBE.js} +1 -1
- package/dist/cdn/{QYZN6QCM.js → XRREH25Y.js} +1 -1
- package/dist/cdn/{6MN5ABWR.js → XV5HA3YU.js} +1 -1
- package/dist/cdn/{QOI7A4CX.js → Y36H2ESY.js} +1 -1
- package/dist/cdn/{62QHJEOL.js → YD6ZJTZS.js} +1 -1
- package/dist/cdn/{3JH2OFHX.js → YFDBO44S.js} +1 -1
- package/dist/cdn/{GJ3DAY34.js → Z4OKMDCI.js} +1 -1
- package/dist/cdn/{KOOYHM3J.js → Z5JZ5BC6.js} +1 -1
- package/dist/cdn/{M3Q4VNWA.js → Z77BS4BV.js} +1 -1
- package/dist/cdn/{ONCMVKQN.js → ZHHWOCDV.js} +1 -1
- package/dist/cdn/{C5WSTUYQ.js → ZOMAKGW5.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/runtime.js +4 -4
- package/dist/components/calcite-action/customElement.js +1 -1
- package/dist/components/calcite-icon/interfaces.d.ts +11 -5
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/vscode.html-custom-data.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +3 -3
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{d as R}from"./U32ZDPXB.js";import{a as Ae}from"./P372COYS.js";import{a as ke}from"./VOCKM3G2.js";import{b as j,c as De,d as T,f as D,g as F,h as Q,i as Ee}from"./LSZHFGPR.js";import{a as M,b as H,d as o,e as p,f as _}from"./QBJZUEM2.js";import{d as G}from"./KRZT7UVD.js";import{a as ye}from"./BIYJJMGW.js";import{b as U}from"./PM5LDKID.js";import{a as Ce}from"./YNS3MRN3.js";import{c as Se}from"./26B43NOX.js";import{a as xe}from"./DKJI4BME.js";import{a as $e}from"./HF6UZYPE.js";import{a as fe}from"./TLHSIAO4.js";import{b as we}from"./C5WSTUYQ.js";import{a as q,c as N,d as be,e as ge,f as ve,g as E,h as Ie}from"./7S6P5V6S.js";import{a as me}from"./D765H6FK.js";import{a as de}from"./O4TOAPWP.js";import{a as w}from"./QC4U5OAE.js";import{a as ue}from"./UCOCOHHJ.js";import{a as pe}from"./5EBGPCB7.js";import{a as he}from"./T6CCMW7H.js";import{a as V,b as z}from"./VI7SBYXT.js";import{a as re}from"./GTCDEISR.js";import{a as ce}from"./B4AGOFO6.js";import{a as L,b as W}from"./ZWPNZ5XW.js";import{e as ne}from"./ZCRQBBYM.js";import{i as y,l as B,p as oe}from"./YXZKUPH5.js";import{B as te,C as $,D as x,E as ie,F as d,J as se,L as le,Q as ae,g as ee,h as m,l as g,p as C}from"./FTHTE3TW.js";var Pe=ee`: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;display:block}:host([scale=s]){font-size:var(--calcite-font-size-relative-sm);--calcite-internal-combobox-spacing-unit-l: .5rem;--calcite-internal-combobox-spacing-unit-s: .25rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-2xs);--calcite-internal-combobox-no-matches-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) ;--calcite-internal-close-size: 1rem}:host([scale=m]){font-size:var(--calcite-font-size-relative-base);--calcite-internal-combobox-spacing-unit-l: .75rem;--calcite-internal-combobox-spacing-unit-s: .5rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm);--calcite-internal-combobox-no-matches-spacing-unit-s: .375rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) ;--calcite-internal-close-size: 1.5rem}:host([scale=l]){font-size:var(--calcite-font-size-relative-md);--calcite-internal-combobox-spacing-unit-l: 1rem;--calcite-internal-combobox-spacing-unit-s: .75rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm-plus);--calcite-internal-combobox-no-matches-spacing-unit-s: var(--calcite-space-sm-plus);--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(var(--calcite-space-sm-plus) - 1px);--calcite-internal-close-size: 2rem}.wrapper{display:flex;border-width:1px;border-style:solid;outline-color:transparent;padding-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);border-radius:var(--calcite-combobox-corner-radius, var(--calcite-corner-radius));background-color:var(--calcite-combobox-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));border-color:var(--calcite-combobox-input-border-color, var(--calcite-color-border-input))}.wrapper:hover .icon{color:var(--calcite-combobox-icon-color-hover, var(--calcite-color-text-1))}:host(:focus-within) .wrapper,.wrapper--active{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))))}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;gap:var(--calcite-internal-combobox-spacing-unit-s);margin-inline-end:var(--calcite-internal-combobox-spacing-unit-s)}.grid-input.selection-display--fit,.grid-input.selection-display--single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-internal-combobox-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;width:0px;min-width:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.placeholder-icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-width:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.floating-ui-container .calcite-floating-ui-anim{box-shadow:var(--calcite-shadow-md)}@media(forced-colors:active){.wrapper,.floating-ui-container{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.list-container{max-height:45vh;overflow-y:auto;inline-size:var(--calcite-dropdown-width, 100%);background-color:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1))}.list{margin:0;display:block;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.list--hide{height:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);max-inline-size:100%}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.select-all{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-1));border-block-end-color:var(--calcite-combobox-divider-color, var(--calcite-combobox-item-border-color, var(--calcite-color-border-3)));border-block-end-style:solid;border-block-end-width:var(--calcite-border-width-sm);inset-block-start:0;position:sticky;z-index:var(--calcite-z-index-sticky)}.no-matches{padding-block:var(--calcite-internal-combobox-no-matches-spacing-unit-s);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));background:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1));cursor:pointer}.no-matches-placeholder{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3));cursor:default}.disabled{opacity:.5}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.clear-button--container{display:flex;cursor:pointer;align-items:center}.clear-button--container:hover calcite-action{--calcite-action-background-color: var(--calcite-clear-button-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color: var(--calcite-clear-button-icon-color-hover, var(--calcite-color-text-1))}.clear-button--container:active calcite-action{--calcite-action-background-color: var(--calcite-clear-button-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color: var(--calcite-clear-button-icon-color-press, var(--calcite-color-text-1))}.clear-button--container calcite-action{--calcite-internal-action-height: 100%;--calcite-internal-action-padding-inline: var(--calcite-spacing-none);--calcite-internal-action-padding-block: var(--calcite-spacing-none);--calcite-action-background-color: var(--calcite-clear-button-background-color, var(--calcite-color-foreground-2));--calcite-action-text-color: var(--calcite-clear-button-icon-color)}.clear-button--container calcite-action:hover{--calcite-action-background-color-hover: var(--calcite-clear-button-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-hover)}.clear-button--container calcite-action:active{--calcite-action-background-color-press: var(--calcite-clear-button-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-press)}:host([scale=s]) .clear-button--container{padding:var(--calcite-space-2xs)}:host([scale=m]) .clear-button--container{padding:var(--calcite-space-2xs);padding-inline-end:var(--calcite-space-sm)}:host([scale=l]) .clear-button--container{padding-inline-end:var(--calcite-space-sm-plus)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}:host([hidden]){display:none}[hidden]{display:none}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,J=class extends ie{constructor(){super(),this.direction=ne(),this.formSupport=Se({inputType:"text"})(this),this.selectAllComboboxItemRef=$(),this.allSelectedIndicatorChipRef=$(),this.data=[],this.cancelable=ue()(this),this.filterItems=(()=>{let e=(t,i)=>t&&i.some(({el:s})=>t===s);return pe((t,i=!1,s=!0)=>{let l=ke([...this.data,...this.groupData],t,this.effectiveFilterProps),a=this.getItemsAndGroups(),n=t==="";a.forEach(c=>{if(n){c.itemHidden=!1;return}let r=!e(c,l);c.itemHidden=r;let[v,h]=c.ancestors;(e(v,l)||e(h,l))&&(c.itemHidden=!1),r||c.ancestors.forEach(f=>f.itemHidden=!1)}),this.noMatchesFound=this.filteredItems.length===0&&!!this.filterText,this.filterTextMatchPattern=this.filterText?new RegExp(`(${U(this.filterText)})`,"i"):void 0,this.keyboardNavItems.forEach(c=>{c.filterTextMatchPattern=this.filterTextMatchPattern}),i&&(this.open=this.filterText.trim().length>0),s&&this.calciteComboboxFilterChange.emit()},le.filter)})(),this._filterText="",this.getSelectedItems=()=>{if(!this.isMulti()){let e=this.allItems.find(({selected:t})=>t);return e?[e]:[]}return this.allItems.filter(e=>e.selected&&(this.selectionMode!=="ancestors"||!T(e)))},this.groupData=[],this.groupItems=[],this.guid=he(),this.ignoreSelectedEventsFlag=!1,this.internalValueChangeFlag=!1,this.previousAllSelected=!1,this.refreshingSelectionDisplay=!1,this.labelable=$e(this),this.mutationObserver=V("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.transitionProp="opacity",this.resizeObserver=(()=>{let e=!1;return V("resize",()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1,this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}))})})(),this.selectedIndicatorChipRef=$(),this.selectedChipCountRef=$(),this.clearButtonRef=$(),this._selectedItems=[],this.textInputRef=$(),this._value="",this.messages=re({blocking:!0}),this.focusSetter=ce()(this),this.customChipAddHandler=()=>{this.addCustomChip(this.filterText,!0)},this.interactiveContainer=de(this),this.topLayer=fe({target:()=>this.floatingEl})(this),this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.deferFitChipCountRender=!1,this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.fitUsingCompactCountLabel=!1,this.allItems=[],this.items=[],this.noMatchesFound=!1,this.clearDisabled=!1,this.disabled=!1,this.maxItems=0,this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.placement=q,this.readOnly=!1,this.required=!1,this.scale="m",this.selectAllEnabled=!1,this.selectionDisplay="all",this.selectionAppearance="icon",this.selectionMode="multiple",this.status="idle",this.topLayerDisabled=!1,this.calciteComboboxBeforeClose=C({cancelable:!1}),this.calciteComboboxBeforeOpen=C({cancelable:!1}),this.calciteComboboxChange=C({cancelable:!1}),this.calciteComboboxChipClose=C({cancelable:!1}),this.calciteComboboxClose=C({cancelable:!1}),this.calciteComboboxFilterChange=C({cancelable:!1}),this.calciteComboboxOpen=C({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteComboboxItemChange",this.calciteComboboxItemChangeHandler),this.listen("calciteInternalComboboxItemChange",this.calciteInternalComboboxItemChangeHandler),this.listen("click",this.comboboxFocusHandler)}static{this.properties={activeChipIndex:[16,{},{state:!0}],activeDescendant:[16,{},{state:!0}],activeItemIndex:[16,{},{state:!0}],compactSelectionDisplay:[16,{},{state:!0}],deferFitChipCountRender:[16,{},{state:!0}],selectedHiddenChipsCount:[16,{},{state:!0}],selectedVisibleChipsCount:[16,{},{state:!0}],fitUsingCompactCountLabel:[16,{},{state:!0}],allItems:[16,{},{state:!0}],items:[16,{},{state:!0}],noMatchesFound:[16,{},{state:!0}],allowCustomValues:[7,{},{reflect:!0,type:Boolean}],clearDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],filterText:[3,{},{reflect:!0}],filterProps:[0,{},{attribute:!1}],filteredItems:[32,{},{attribute:!1,readOnly:!0}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],label:1,labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placeholder:1,placeholderIcon:[3,{},{reflect:!0}],placeholderIconFlipRtl:[7,{},{reflect:!0,type:Boolean}],placement:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectAllEnabled:[7,{},{reflect:!0,type:Boolean}],selectedItems:[0,{},{attribute:!1}],selectionDisplay:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],validationIcon:[3,{converter:se},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.styles=Pe}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(e=>e!=="el"):["description","label","metadata","shortHeading"]}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:i,open:s}=this,l=i[0],a=l?.icon,n=D(t);return!s&&l?!!a&&n:!!e&&(!l||n)}get allSelected(){let e=this.allItems.filter(t=>!t.disabled);return e.length>0&&e.every(t=>t.selected)}get hasDisabledSelected(){return this.allItems.some(e=>e.disabled&&e.selected)}get indeterminate(){let e=this.selectedItems.length>0||this.hasDisabledSelected;return this.selectAllEnabled?!this.allSelected&&e:this.selectedItems.length>0&&!this.allSelected}get keyboardNavItems(){let{selectAllComboboxItemRef:e}=this,t=this.filteredItems.filter(i=>!i.disabled);return e.value?[e.value,...t]:t}get filterText(){return this._filterText}set filterText(e){let t=this._filterText;e!==t&&(this._filterText=e,this.filterTextChange(e))}get filteredItems(){return this.items.filter(e=>!W(e))}get selectedItems(){return this._selectedItems}set selectedItems(e){let t=this._selectedItems;e!==t&&(this._selectedItems=e,this.selectedItemsHandler())}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueHandler(e))}async reposition(e=!1){let{floatingEl:t,referenceEl:i,placement:s,overlayPositioning:l,filteredFlipPlacements:a}=this;return ge(this,{direction:this.direction,floatingEl:t,referenceEl:i,overlayPositioning:l,placement:s,flipPlacements:a,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>(this.activeChipIndex=-1,this.activeItemIndex=-1,this.textInputRef.value),e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),E(this),this.cancelable.add(this.filterItems)}async load(){this.handleSelectionModeWarning()}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("maxItems")&&(this.hasUpdated||this.maxItems!==0)&&this.setMaxScrollerHeight(),(e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!==q))&&this.reposition(!0),(e.has("selectionMode")||e.has("scale")||e.has("selectionAppearance"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler()}loaded(){E(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),Ie(this)}emitComboboxChange(){this.calciteComboboxChange.emit()}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){this.disabled||me(this)}handleDisabledChange(e){e||(this.open=!1)}valueHandler(e){this.internalValueChangeFlag||(this.items.forEach(t=>{t.selected=Array.isArray(e)?e.includes(t.value):e===t.value}),this.updateItems())}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){let e=this.previousAllSelected,t=this.allSelected;if(this.previousAllSelected=t,this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.selectionDisplay==="fit"&&this.isMulti()){let i=e&&!t;e&&!t&&(this.selectedHiddenChipsCount=0,this.selectedItems.forEach(s=>{let l=this.referenceEl?.querySelector(`#${p.chip(s.guid)}`);l&&this.showChip(l)})),this.updateComplete.then(async()=>{i&&await this.updateComplete,await this.refreshSelectionDisplay(),this.fitFollowUpRefreshPromise&&await this.fitFollowUpRefreshPromise,this.deferFitChipCountRender=!1})}}async documentClickHandler(e){this.disabled||e.composedPath().includes(this.el)||(await this.componentOnReady(),!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1)),this.allowCustomValues&&this.filterText.trim().length&&this.addCustomChip(this.filterText),this.open=!1)}handleSelectAll(e){e&&(this.toggleSelectAll(),this.selectionDisplay!=="fit"&&this.allSelected&&this.selectedItems.forEach(t=>{let i=this.referenceEl.querySelector(`#${p.chip(t.guid)}`);i&&this.hideChip(i)}))}updateSelectedItems(){this.selectedItems=this.getOrderedSelectedItems(this.getSelectedItems())}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,i=e.composedPath().includes(this.selectAllComboboxItemRef.value);this.selectAllEnabled&&this.handleSelectAll(i);let s=this.keyboardNavItems.indexOf(i?this.selectAllComboboxItemRef.value:t);this.updateActiveItemIndex(s),this.toggleSelection(t,t.selected)}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.hasUpdated&&this.updateItems()}clearValue(){let e=this.items.filter(t=>t.selected&&!t.disabled);e.length&&(this.ignoreSelectedEventsFlag=!0,e.forEach(t=>t.selected=!1),this.ignoreSelectedEventsFlag=!1,this.updateSelectedItems(),this.emitComboboxChange()),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}clearInputValue(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?be(t,e):void 0}getValue(){let e=this.getOrderedSelectedValues(this.selectedItems.map(t=>t.value?.toString()));return e.length?e.length>1?e:e[0]:""}getOrderedSelectedValues(e){if(!this.isMulti())return e;let t=Array.isArray(this.value)?this.value:this.value?[this.value]:[];return Ee(e,t)}getOrderedSelectedItems(e){return this.isMulti()?Q(e,this.selectedItems):e}comboboxInViewport(){let e=this.el.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.right<=(window.innerWidth||document.documentElement.clientWidth)&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)}toggleSelectAll(){let e=!this.allSelected;this.allItems.forEach(t=>{t.disabled||(t.selected=e)}),this.updateSelectedItems(),this.emitComboboxChange()}hasHiddenSelectedFitChips(){if(this.selectionDisplay!=="fit"||!this.isMulti())return!1;let e=this.selectedChipCountRef.value;return!!e&&!e.classList.contains(o.chipInvisible)}keyDownHandler(e){if(this.readOnly)return;let{key:t}=e;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):this.open?(this.open=!1,e.preventDefault()):!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1));break;case"ArrowLeft":(this.activeChipIndex!==-1||this.textInputRef.value?.selectionStart===0)&&(this.previousChip(),e.preventDefault());break;case"ArrowRight":this.activeChipIndex!==-1&&(this.nextChip(),e.preventDefault());break;case"ArrowUp":this.keyboardNavItems.length&&(e.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView()),this.scrollToActiveOrSelectedItem();break;case"ArrowDown":this.keyboardNavItems.length&&(e.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":!this.textInputRef.value?.value&&!e.defaultPrevented&&(!this.open&&this.keyboardNavItems.length&&(this.open=!0,this.ensureRecentSelectedItemIsActive()),e.preventDefault());break;case"Home":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":if(this.open){this.open=!1,e.preventDefault();break}this.clearDisabled||(this.textInputRef.value.value.length>0?(this.resetText(),e.preventDefault()):this.selectedItems.length>0&&this.selectionMode!=="single-persist"&&(this.clearValue(),e.preventDefault()));break;case"Enter":this.open&&this.activeItemIndex>-1?(this.keyboardNavItems[this.activeItemIndex].toggleSelection(),e.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(e.target),e.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):!e.defaultPrevented&&this.formSupport.active&&(e.preventDefault(),this.formSupport.requestSubmit());break;case"Delete":case"Backspace":{let s=this.hasHiddenSelectedFitChips()&&this.activeChipIndex===-1;if(this.selectionDisplay==="single"||s)return;let a=e.composedPath().find(n=>G(n));this.activeChipIndex>-1&&a?(e.preventDefault(),this.removeActiveChip(a)):!this.filterText&&this.isMulti()&&(e.preventDefault(),this.removeLastChip());break}}}onBeforeOpen(){this.topLayer.show(),this.reposition(),this.calciteComboboxBeforeOpen.emit(),setTimeout(()=>this.scrollToActiveOrSelectedItem(this.activeItemIndex<0),0)}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),ve(this),this.topLayer.hide()}async setMaxScrollerHeight(){let{listContainerEl:e,open:t,referenceEl:i}=this;if(!e||!t||!i)return;let s=this.getMaxScrollerHeight();e.style.maxBlockSize=s>0?`${s}px`:"",e.style.inlineSize=`${i.clientWidth}px`}calciteChipCloseHandler(e){this.open=!1;let t=this.items.find(i=>i===e);t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()}clickHandler(e){if(this.readOnly)return;let t=e.composedPath();if(t.some(s=>G(s))){this.open=!1,e.preventDefault();return}let i=this.clearButtonRef.value;if(i&&t.includes(i)){this.clearValue(),e.preventDefault();return}this.open=!this.open,this.ensureRecentSelectedItemIsActive()}ensureRecentSelectedItemIsActive(){let{activeItemIndex:e,selectedItems:t,keyboardNavItems:i}=this;if(e>-1&&i[e]){this.updateActiveItemIndex(e);return}let s=t[t.length-1],l=s?i.indexOf(s):i.length?0:-1;this.updateActiveItemIndex(l>-1?l:i.length?0:-1)}hideChip(e){e.classList.add(o.chipInvisible)}showChip(e){e.classList.remove(o.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:i,hideSelectedChips:s}){let l=e.filter(h=>h.selected),a=l.filter(h=>!h.disabled),n=l.filter(h=>h.disabled),c=h=>{let f=y(h),u=h.getBoundingClientRect().width;return Number.isFinite(f)&&f>0?f:u};if(l.forEach(h=>c(h)),e.forEach(h=>{this.hideChip(h)}),s)return;let r=h=>{let f=0;return h.forEach(u=>{let b=c(u);b&&b<=t&&(t-=b+i,this.showChip(u),f++)}),f};r(a)<=1&&r(n)}async refreshSelectionDisplay(e=!0){if(this.refreshingSelectionDisplay)return;if(this.refreshingSelectionDisplay=!0,await this.componentOnReady(),D(this.selectionMode)){this.refreshingSelectionDisplay=!1;return}let{allSelectedIndicatorChipRef:t,chipContainerEl:i,selectionDisplay:s,placeholder:l,selectedIndicatorChipRef:a,textInputRef:n}=this;if(!n.value||!i){this.refreshingSelectionDisplay=!1;return}let c=parseInt(getComputedStyle(i).gap,10),r=y(i),{fontSize:v,fontFamily:h,minInlineSize:f}=getComputedStyle(n.value),u=.55,b=parseFloat(f)||parseInt(R,10),I=B(l,`${v} ${h}`),k=I>0?I:Math.max(b,Math.round((l?.length||0)*(parseFloat(v)||parseInt(R,10))*u)),O=Math.max(b,k),P=(s==="fit"?O:k)+c,Re=y(t.value),K=y(a.value),Fe=Math.max(Re,K);if(this.setCompactSelectionDisplay({chipContainerElGap:c,chipContainerElWidth:r,inputWidth:P,largestSelectedIndicatorChipWidth:Fe}),s!=="fit"&&this.allSelected&&this.selectAllEnabled&&this.selectedItems.forEach(A=>{let S=this.referenceEl?.querySelector(`#${p.chip(A.guid)}`);S&&this.hideChip(S)}),this.indeterminate&&this.selectedItems.forEach(A=>{let S=this.referenceEl?.querySelector(`#${p.chip(A.guid)}`);S&&this.showChip(S)}),s==="fit"){let A=Array.from(this.renderRoot.querySelectorAll("calcite-chip")).filter(Y=>{let Z=Y.value,Oe=Z!=null&&`${Z}`!="";return Y.disabled||Oe}),{hiddenChipIndicatorWidth:S,hideSelectedChips:X,reservedPlaceholderInputWidth:Me}=this.getFitCompactDisplayState({chipContainerElGap:c,chipContainerElWidth:r,inputMinWidth:b,placeholderWidth:k,selectedIndicatorChipElWidth:K});this.fitUsingCompactCountLabel=X;let He=Math.round(r-(S+c+Me+c));this.refreshChipDisplay({availableHorizontalChipElSpace:He,chipContainerElGap:c,chipEls:A,hideSelectedChips:X});let Te=this.selectedHiddenChipsCount;this.syncChipVisibilityCounts(A),Te!==this.selectedHiddenChipsCount&&e&&(this.fitFollowUpRefreshPromise=this.updateComplete.then(()=>this.refreshSelectionDisplay(!1)).then(()=>{this.fitFollowUpRefreshPromise=void 0}))}this.refreshingSelectionDisplay=!1}setFloatingEl(e){this.floatingEl=e,E(this)}shouldUseFitCompactDisplay({chipContainerElGap:e,chipContainerElWidth:t,hiddenChipIndicatorWidth:i,inputMinWidth:s,placeholderWidth:l,reservedPlaceholderInputWidth:a}){let n=Math.round(t-(i+e+a+e));return l>s*2&&n<=0}getFitCompactDisplayState({chipContainerElGap:e,chipContainerElWidth:t,inputMinWidth:i,placeholderWidth:s,selectedIndicatorChipElWidth:l}){let a=y(this.selectedChipCountRef.value),n=this.deferFitChipCountRender||this.selectedHiddenChipsCount<=0?0:a||l,c=Math.max(i,s),r=this.shouldUseFitCompactDisplay({chipContainerElGap:e,chipContainerElWidth:t,hiddenChipIndicatorWidth:n,inputMinWidth:i,placeholderWidth:s,reservedPlaceholderInputWidth:c});return{hiddenChipIndicatorWidth:n,hideSelectedChips:r,reservedPlaceholderInputWidth:c}}setCompactSelectionDisplay({chipContainerElGap:e,chipContainerElWidth:t,inputWidth:i,largestSelectedIndicatorChipWidth:s}){let l=Math.round(s+e+i);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<l)&&(this.maxCompactBreakpoint=l),this.compactSelectionDisplay=t<this.maxCompactBreakpoint}setContainerEl(e){z(this.resizeObserver,this.listContainerEl,e),this.listContainerEl=e,this.transitionEl=e}setChipContainerEl(e){z(this.resizeObserver,this.chipContainerEl,e),this.chipContainerEl=e}setReferenceEl(e){this.referenceEl=e,E(this)}syncChipVisibilityCounts(e){let t=0,i=0;e.forEach(l=>{l.selected&&(i++,l.classList.contains(o.chipInvisible)||t++)}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let s=Math.max(0,i-t);s!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=s)}getMaxScrollerHeight(){let t=this.getItemsAndGroups(!0).filter(a=>!W(a)),{maxItems:i}=this,s=0,l=0;return t.length>=i&&t.forEach(a=>{if(s<i){let n=this.calculateScrollerHeight(a);l+=n,s+=1}}),l}calculateScrollerHeight(e){if(!e)return 0;let t=e.getBoundingClientRect().height,i=`:scope > ${M}, :scope > ${H}`,s=Array.from(e.querySelectorAll(i)).reduce((l,a)=>l+a.getBoundingClientRect().height,0);return t-s}inputHandler(e){let t=e.target.value;this.filterText=t}getItemsAndGroups(e=!1){return e?Array.from(this.el.querySelectorAll(`${M}, ${H}`)):[...this.groupItems,...this.items]}toggleSelection(e,t){!e||this.selectionMode==="single-persist"&&e.selected&&e.value===this.value&&!t||(this.selectionDisplay==="fit"&&this.isMulti()&&(this.deferFitChipCountRender=!0),this.isMulti()?this.handleMultiSelection(e,t):this.handleSingleSelection(e,t))}handleMultiSelection(e,t){e.selected=t,this.updateAncestors(e),this.updateSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")}handleSingleSelection(e,t){this.ignoreSelectedEventsFlag=!0,this.items.forEach(i=>i.selected=i===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.updateSelectedItems(),this.emitComboboxChange(),this.textInputRef.value&&(this.textInputRef.value.value=F(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=j(e),i=De(e);e.selected?t.forEach(s=>{s.disabled||(s.selected=!0)}):([...i].forEach(s=>{s.disabled||(s.selected=!1)}),[...t].forEach(s=>{T(s)||(s.selected=!1)}))}updateItems(){this.allItems=this.getItems(!0),this.items=this.allItems.filter(e=>!e.disabled),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.groupData=this.getGroupData(),this.updateItemProps(),this.updateSelectedItems(),this.previousAllSelected=this.allSelected}updateItemProps(){this.allItems.forEach(e=>{e.selectionMode=this.selectionMode,e.selectionAppearance=this.selectionAppearance,e.scale=this.scale}),this.groupItems.forEach((e,t)=>(e.scale=this.scale,e.position=t)),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach((e,t,i)=>{t===0&&(e.afterEmptyGroup=!1);let s=i[t+1];s&&(s.afterEmptyGroup=e.children.length===0)})}getData(){return this.items.map(e=>({description:e.description,filterDisabled:e.filterDisabled,label:e.heading,metadata:e.metadata,shortHeading:e.shortHeading,el:e}))}getGroupData(){return this.groupItems.map(e=>({label:e.label,el:e}))}resetText(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}getItems(e=!1){return Array.from(this.el.querySelectorAll(M)).filter(i=>e||!i.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(H))}addCustomChip(e,t){let i=this.items.find(s=>s.heading===e);if(i)this.toggleSelection(i,!0);else{let s=document.createElement("calcite-combobox-item");s.value=e,s.heading=e,this.el.prepend(s),this.updateItems(),this.toggleSelection(s,!0),this.open=!0,t&&this.setFocus()}}removeActiveChip(e){let t=this.selectedItems[this.activeChipIndex];t&&!t.disabled&&`${p.chip(t.guid)}`===e.id&&this.toggleSelection(t,!1),this.setFocus()}removeLastChip(){let e=this.selectedItems.findLast(t=>!t.disabled);e&&(this.toggleSelection(e,!1),this.setFocus())}previousChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex+1;t>e?(this.activeChipIndex=-1,oe(this.textInputRef.value)):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl?.querySelector(`#${p.chip(e)}`):void 0)?.setFocus()}scrollToActiveOrSelectedItem(e=!1){let t=e&&this.selectedItems?.length?this.selectedItems[0]:this.keyboardNavItems[this.activeItemIndex],i=this.listContainerEl;if(!t||!i)return;t.scrollIntoView({block:"nearest"});let l=this.selectAllComboboxItemRef.value?.offsetHeight||0,a=t.getBoundingClientRect(),n=i.getBoundingClientRect();a.top<n.top+l&&(i.scrollTop-=n.top+l-a.top)}shiftActiveItemIndex(e){let{length:t}=this.keyboardNavItems,i=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(i),this.scrollToActiveOrSelectedItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t="";this.keyboardNavItems.forEach((i,s)=>{s===e?(i.active=!0,t=`${p.item(i.guid)}`):i.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return!D(this.selectionMode)}comboboxFocusHandler(){this.disabled||(this.activeChipIndex=-1,this.textInputRef.value?.focus(),this.open&&this.selectionDisplay==="fit"&&this.isMulti()&&this.refreshSelectionDisplay())}createScreenReaderItem({ariaLabel:e,ariaSelected:t,id:i,textContent:s}){return m`<li aria-label=${e??g} aria-selected=${t??g} id=${i??g} role=option tabindex=-1>${s}</li>`}handleSelectionModeWarning(){this.selectionMode==="single-persist"&&this.clearDisabled&&console.warn('clearDisabled is ignored when selection-mode is set to "single-persist"')}getDescriptionMessage(){let e=Array.isArray(this.value)?this.value.join(", "):this.value;return this.readOnly?this.messages.nonEditable.replace("{value}",`${e}`):e}getChipLabel(e,t){return t?[...[...j(e)].reverse(),e].map(s=>F(s)).join(" / "):F(e)}renderChip({activeChipIndex:e,disabled:t,index:i,item:s,messages:l,readOnly:a,scale:n,isAncestors:c}){let r=this.getChipLabel(s,c);return w(s.guid||s.value||r,m`<calcite-chip .appearance=${a?"outline":"solid"} class=${d({[o.chip]:!0,[o.disabled]:t})} .closable=${!t&&!a} data-testid=${`${t?"disabled-chip":"chip"}-${i}`} .disabled=${t} .icon=${s.icon} .iconFlipRtl=${s.iconFlipRtl} id=${(!t&&s.guid?`${p.chip(s.guid)}`:void 0)??g} .label=${r} .messageOverrides=${t?void 0:{dismissLabel:l.removeTag.replace("{value}",`${r}`)}} @calciteChipClose=${t?void 0:()=>this.calciteChipCloseHandler(s)} @focusin=${t?void 0:()=>this.activeChipIndex=i} .scale=${n} .selected=${s.selected} .tabIndex=${!t&&e===i?0:-1} title=${r??g} .value=${s.value}>${r}</calcite-chip>`)}renderChipCount(e,t){let i=this.fitUsingCompactCountLabel?`${e}`:this.messages.disabledSelectedCount.replace("{count}",`${e}`)??`+${e}`;return m`<calcite-chip appearance=solid class=${d({[o.chip]:!0})} data-testid=selected-chip-count id=selected-chip-count .label=${i} .scale=${t} tabindex=-1 title=${i??g} ${x(this.selectedChipCountRef)}>${i}</calcite-chip>`}renderChips(){let{activeChipIndex:e,readOnly:t,scale:i,selectionDisplay:s,selectionMode:l,messages:a}=this,n=[],c=l==="ancestors",r=this.selectAllEnabled&&this.allSelected,v=s==="all";if(r)return null;let h=0,f=0;if(v){let u=this.allItems.filter(I=>I.selected&&(!c||!T(I)));Q(u,this.selectedItems).forEach(I=>{if(I.disabled){n.push(this.renderChip({activeChipIndex:e,disabled:!0,index:f++,item:I,messages:a,readOnly:t,scale:i,isAncestors:c}));return}n.push(this.renderChip({activeChipIndex:e,disabled:!1,index:h++,item:I,messages:a,readOnly:t,scale:i,isAncestors:c}))})}else r||this.selectedItems.forEach(u=>{n.push(this.renderChip({activeChipIndex:e,disabled:u.disabled,index:h++,item:u,messages:a,readOnly:t,scale:i,isAncestors:c}))});if(s==="fit"){let u=this.selectedHiddenChipsCount,b=this.selectedVisibleChipsCount===0?this.selectedItems.length:u;u>0&&!this.deferFitChipCountRender&&n.push(this.renderChipCount(b,i))}return n.length?n:null}renderAllSelectedIndicatorChip(){let{allSelectedIndicatorChipRef:e,compactSelectionDisplay:t,scale:i,selectedVisibleChipsCount:s}=this,l=!1;if(this.selectionDisplay==="fit"&&this.textInputRef.value&&this.chipContainerEl){let r=parseInt(getComputedStyle(this.chipContainerEl).gap,10),v=y(this.chipContainerEl),{fontSize:h,fontFamily:f,minInlineSize:u}=getComputedStyle(this.textInputRef.value),b=.55,I=parseFloat(u)||parseInt(R,10),k=B(this.placeholder,`${h} ${f}`),O=k>0?k:Math.max(I,Math.round((this.placeholder?.length||0)*(parseFloat(h)||parseInt(R,10))*b)),P=y(this.selectedIndicatorChipRef.value);l=this.getFitCompactDisplayState({chipContainerElGap:r,chipContainerElWidth:v,inputMinWidth:I,placeholderWidth:O,selectedIndicatorChipElWidth:P}).hideSelectedChips}let n=t||l?this.messages.all:this.messages.allSelected,c=this.allSelected&&(this.selectionDisplay==="single"||!s||this.selectionDisplay==="all");return m`<calcite-chip class=${d({[o.chip]:!0,[o.chipInvisible]:!c,[o.allSelected]:!0})} data-testid=all-selected-indicator-chip .label=${n} .scale=${i} title=${n??g} value ${x(e)}>${n}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:i,selectedIndicatorChipRef:s}=this,l=!1,a,n=this.getSelectedItems().length;return e?l=!0:t==="single"&&(this.allSelected?l=!0:n>0?l=!1:l=!0,a=`${n} ${this.messages.selected}`),m`<calcite-chip class=${d({[o.chip]:!0,[o.chipInvisible]:l})} .label=${a} .scale=${i} title=${a??g} value ${x(s)}>${a}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:i}=this,s=!1,l,a=this.getSelectedItems().length;return e?this.allSelected?s=!0:t==="single"&&(s=!(a>0),l=`${a}`):s=!0,m`<calcite-chip class=${d({[o.chip]:!0,[o.chipInvisible]:s})} .label=${l} .scale=${i} title=${l??g} value>${l}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:i,selectionMode:s,selectedItems:l,open:a}=this,n=D(s),c=l[0],r=!a&&n&&!!c&&!this.filterText;return m`<span class=${d({[o.inputWrap]:!0,[o.inputWrapSingle]:n})}>${r&&w("label",m`<span class=${d({[o.label]:!0,[o.labelIcon]:!!c?.icon})}>${F(c)}</span>`)||""}${w("input",m`<input aria-activedescendant=${this.activeDescendant??g} aria-controls=${`${p.listbox(e)}`} aria-errormessage=${p.validationMessage} aria-owns=${`${p.listbox(e)}`} aria-autocomplete=list .ariaDescription=${this.getDescriptionMessage()} .ariaExpanded=${a} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${xe(this)} class=${d({[o.input]:!0,[o.inputSingle]:!0,[o.inputHidden]:r,[o.inputIcon]:this.showingInlineIcon&&!!this.placeholderIcon})} data-testid=input .disabled=${t} .id=${`${p.input(e)}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${i??g} .readOnly=${this.readOnly} .required=${this.required} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${te(this.filterText??"")} ${x(this.textInputRef)}>`)}</span>`}renderListBoxOptions(){let e=this.keyboardNavItems.map(t=>this.createScreenReaderItem({ariaLabel:t.label,ariaSelected:t.selected,id:`${p.item(t.guid)}`,textContent:t.heading}));if(this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"){let t=this.createScreenReaderItem({ariaLabel:this.messages.selectAll,ariaSelected:this.allSelected,textContent:this.messages.selectAll});t&&e.unshift(t)}return e}renderFloatingUIContainer(){let{messages:e,setFloatingEl:t,setContainerEl:i,open:s,scale:l}=this,a={[o.listContainer]:!0,[N.animation]:!0,[N.animationActive]:s},n=(this.filterText&&e.add.replace("{text}",`${this.filterText}`))??"";return m`<div aria-hidden=true class=${d(o.floatingUIContainer)} popover=manual ${x(t)}><div class=${d(a)} ${x(i)}><ul class=${d({[o.list]:!0,[o.listHide]:!s})}>${this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"&&m`<calcite-combobox-item class=${d(o.selectAll)} data-testid=select-all-item .heading=${e.selectAll} .id=${`${this.guid}-select-all-enabled-interactive`} .indeterminate=${this.indeterminate} .label=${e.selectAll} .scale=${l} .selected=${this.allSelected} tabindex=-1 value=select-all ${x(this.selectAllComboboxItemRef)}></calcite-combobox-item>`||""}<slot></slot>${this.noMatchesFound&&(this.allowCustomValues?m`<li aria-label=${n??g} class=${d(o.noMatches)} @click=${this.customChipAddHandler} role=option tabindex=0>${we({text:n,pattern:new RegExp(`(${U(this.filterText)})`,"i")})}</li>`:m`<li class=${d({[o.noMatchesPlaceholder]:!0,[o.noMatches]:!0})}>${e.noMatches}</li>`)||""}</ul></div></div>`}renderSelectedOrPlaceholderIcon(){let{open:e,placeholderIcon:t,placeholderIconFlipRtl:i,selectedItems:s}=this,l=s[0],a=l?.icon,n=t&&(e||!l);return this.showingInlineIcon&&w("selected-placeholder-icon",m`<span class=${d(o.iconStart)}><calcite-icon class=${d({[o.selectedIcon]:!n,[o.placeholderIcon]:n})} .flipRtl=${n?i:l.iconFlipRtl} .icon=${n?t:a} .scale=${L(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return w("chevron",m`<span class=${d(o.iconEnd)}><calcite-icon class=${d(o.icon)} .icon=${e?_.chevronUp:_.chevronDown} .scale=${L(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:i,open:s,readOnly:l}=this,a=D(this.selectionMode),n=e==="all",c=e==="single",r=!a&&e==="fit",v=!a&&!n,h=v&&!r,f=this.items.some(b=>b.selected&&!b.disabled),u=!this.clearDisabled&&this.selectionMode!=="single-persist"&&!!this.value?.length&&f;return this.interactiveContainer({disabled:this.disabled,children:m`${this.labelText&&Ce({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-live=polite class=${d({[o.wrapper]:!0,[o.wrapperSingle]:a||!this.selectedItems.length,[o.wrapperActive]:s})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${x(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${w("grid",m`<div class=${d({[o.gridInput]:!0,[o.selectionDisplayFit]:r,[o.selectionDisplaySingle]:c})} ${x(this.setChipContainerEl)}>${!a&&!c&&this.renderChips()||""}${!a&&!c&&this.selectAllEnabled&&n&&this.renderAllSelectedIndicatorChip()||""}${h&&this.renderSelectedIndicatorChip()||""}${h&&this.renderSelectedIndicatorChipCompact()||""}${v&&this.renderAllSelectedIndicatorChip()||""}<label class=${d(o.screenReadersOnly)} .htmlFor=${`${p.input(t)}`} .id=${`${p.label(t)}`}>${i}</label>${this.renderInput()}</div>`)}${!l&&u?Ae({ariaLabel:this.messages.clear,disabled:this.disabled,ref:this.clearButtonRef,scale:this.scale,title:this.messages.clear}):null}${!l&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${p.label(t)}`} aria-multiselectable=true class=${d(o.screenReadersOnly)} .id=${`${p.listbox(t)}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${this.validationMessage&&this.status==="invalid"?ye({icon:this.validationIcon,id:p.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};ae("calcite-combobox",J);export{J as Combobox};
|
|
2
|
+
import{d as R}from"./U32ZDPXB.js";import{a as Ae}from"./HPADHWGC.js";import{a as ke}from"./VOCKM3G2.js";import{b as j,c as De,d as T,f as D,g as F,h as Q,i as Ee}from"./JSXCBKXG.js";import{a as M,b as H,d as o,e as p,f as _}from"./QBJZUEM2.js";import{d as G}from"./KRZT7UVD.js";import{a as ye}from"./QYFTRYN3.js";import{b as U}from"./PM5LDKID.js";import{a as Ce}from"./O6D4FEZB.js";import{c as Se}from"./IRLPUEFY.js";import{a as xe}from"./DKJI4BME.js";import{a as $e}from"./SN5RZUG2.js";import{a as fe}from"./2HUIIAVL.js";import{b as we}from"./ZOMAKGW5.js";import{a as q,c as N,d as be,e as ge,f as ve,g as E,h as Ie}from"./62NGNYOK.js";import{a as me}from"./V7YBNTNJ.js";import{a as de}from"./DCBXNR23.js";import{a as w}from"./37CYUX2V.js";import{a as ue}from"./P7XWG3RI.js";import{a as pe}from"./5EBGPCB7.js";import{a as he}from"./T6CCMW7H.js";import{a as V,b as z}from"./VI7SBYXT.js";import{a as re}from"./TLHV3OYD.js";import{a as ce}from"./KPMYA56P.js";import{a as L,b as W}from"./ZWPNZ5XW.js";import{e as ne}from"./7FERW3TY.js";import{i as y,l as B,p as oe}from"./RP6GPL33.js";import{B as te,C as $,D as x,E as ie,F as d,J as se,L as le,Q as ae,g as ee,h as m,l as g,p as C}from"./OPEE74RM.js";var Pe=ee`: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;display:block}:host([scale=s]){font-size:var(--calcite-font-size-relative-sm);--calcite-internal-combobox-spacing-unit-l: .5rem;--calcite-internal-combobox-spacing-unit-s: .25rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-2xs);--calcite-internal-combobox-no-matches-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) ;--calcite-internal-close-size: 1rem}:host([scale=m]){font-size:var(--calcite-font-size-relative-base);--calcite-internal-combobox-spacing-unit-l: .75rem;--calcite-internal-combobox-spacing-unit-s: .5rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm);--calcite-internal-combobox-no-matches-spacing-unit-s: .375rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) ;--calcite-internal-close-size: 1.5rem}:host([scale=l]){font-size:var(--calcite-font-size-relative-md);--calcite-internal-combobox-spacing-unit-l: 1rem;--calcite-internal-combobox-spacing-unit-s: .75rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm-plus);--calcite-internal-combobox-no-matches-spacing-unit-s: var(--calcite-space-sm-plus);--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(var(--calcite-space-sm-plus) - 1px);--calcite-internal-close-size: 2rem}.wrapper{display:flex;border-width:1px;border-style:solid;outline-color:transparent;padding-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);border-radius:var(--calcite-combobox-corner-radius, var(--calcite-corner-radius));background-color:var(--calcite-combobox-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));border-color:var(--calcite-combobox-input-border-color, var(--calcite-color-border-input))}.wrapper:hover .icon{color:var(--calcite-combobox-icon-color-hover, var(--calcite-color-text-1))}:host(:focus-within) .wrapper,.wrapper--active{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))))}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;gap:var(--calcite-internal-combobox-spacing-unit-s);margin-inline-end:var(--calcite-internal-combobox-spacing-unit-s)}.grid-input.selection-display--fit,.grid-input.selection-display--single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-internal-combobox-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;width:0px;min-width:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.placeholder-icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-width:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.floating-ui-container .calcite-floating-ui-anim{box-shadow:var(--calcite-shadow-md)}@media(forced-colors:active){.wrapper,.floating-ui-container{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.list-container{max-height:45vh;overflow-y:auto;inline-size:var(--calcite-dropdown-width, 100%);background-color:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1))}.list{margin:0;display:block;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.list--hide{height:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);max-inline-size:100%}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.select-all{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-1));border-block-end-color:var(--calcite-combobox-divider-color, var(--calcite-combobox-item-border-color, var(--calcite-color-border-3)));border-block-end-style:solid;border-block-end-width:var(--calcite-border-width-sm);inset-block-start:0;position:sticky;z-index:var(--calcite-z-index-sticky)}.no-matches{padding-block:var(--calcite-internal-combobox-no-matches-spacing-unit-s);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));background:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1));cursor:pointer}.no-matches-placeholder{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3));cursor:default}.disabled{opacity:.5}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.clear-button--container{display:flex;cursor:pointer;align-items:center}.clear-button--container:hover calcite-action{--calcite-action-background-color: var(--calcite-clear-button-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color: var(--calcite-clear-button-icon-color-hover, var(--calcite-color-text-1))}.clear-button--container:active calcite-action{--calcite-action-background-color: var(--calcite-clear-button-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color: var(--calcite-clear-button-icon-color-press, var(--calcite-color-text-1))}.clear-button--container calcite-action{--calcite-internal-action-height: 100%;--calcite-internal-action-padding-inline: var(--calcite-spacing-none);--calcite-internal-action-padding-block: var(--calcite-spacing-none);--calcite-action-background-color: var(--calcite-clear-button-background-color, var(--calcite-color-foreground-2));--calcite-action-text-color: var(--calcite-clear-button-icon-color)}.clear-button--container calcite-action:hover{--calcite-action-background-color-hover: var(--calcite-clear-button-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-hover)}.clear-button--container calcite-action:active{--calcite-action-background-color-press: var(--calcite-clear-button-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-press)}:host([scale=s]) .clear-button--container{padding:var(--calcite-space-2xs)}:host([scale=m]) .clear-button--container{padding:var(--calcite-space-2xs);padding-inline-end:var(--calcite-space-sm)}:host([scale=l]) .clear-button--container{padding-inline-end:var(--calcite-space-sm-plus)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}:host([hidden]){display:none}[hidden]{display:none}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,J=class extends ie{constructor(){super(),this.direction=ne(),this.formSupport=Se({inputType:"text"})(this),this.selectAllComboboxItemRef=$(),this.allSelectedIndicatorChipRef=$(),this.data=[],this.cancelable=ue()(this),this.filterItems=(()=>{let e=(t,i)=>t&&i.some(({el:s})=>t===s);return pe((t,i=!1,s=!0)=>{let l=ke([...this.data,...this.groupData],t,this.effectiveFilterProps),a=this.getItemsAndGroups(),n=t==="";a.forEach(c=>{if(n){c.itemHidden=!1;return}let r=!e(c,l);c.itemHidden=r;let[v,h]=c.ancestors;(e(v,l)||e(h,l))&&(c.itemHidden=!1),r||c.ancestors.forEach(f=>f.itemHidden=!1)}),this.noMatchesFound=this.filteredItems.length===0&&!!this.filterText,this.filterTextMatchPattern=this.filterText?new RegExp(`(${U(this.filterText)})`,"i"):void 0,this.keyboardNavItems.forEach(c=>{c.filterTextMatchPattern=this.filterTextMatchPattern}),i&&(this.open=this.filterText.trim().length>0),s&&this.calciteComboboxFilterChange.emit()},le.filter)})(),this._filterText="",this.getSelectedItems=()=>{if(!this.isMulti()){let e=this.allItems.find(({selected:t})=>t);return e?[e]:[]}return this.allItems.filter(e=>e.selected&&(this.selectionMode!=="ancestors"||!T(e)))},this.groupData=[],this.groupItems=[],this.guid=he(),this.ignoreSelectedEventsFlag=!1,this.internalValueChangeFlag=!1,this.previousAllSelected=!1,this.refreshingSelectionDisplay=!1,this.labelable=$e(this),this.mutationObserver=V("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.transitionProp="opacity",this.resizeObserver=(()=>{let e=!1;return V("resize",()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1,this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}))})})(),this.selectedIndicatorChipRef=$(),this.selectedChipCountRef=$(),this.clearButtonRef=$(),this._selectedItems=[],this.textInputRef=$(),this._value="",this.messages=re({blocking:!0}),this.focusSetter=ce()(this),this.customChipAddHandler=()=>{this.addCustomChip(this.filterText,!0)},this.interactiveContainer=de(this),this.topLayer=fe({target:()=>this.floatingEl})(this),this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.deferFitChipCountRender=!1,this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.fitUsingCompactCountLabel=!1,this.allItems=[],this.items=[],this.noMatchesFound=!1,this.clearDisabled=!1,this.disabled=!1,this.maxItems=0,this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.placement=q,this.readOnly=!1,this.required=!1,this.scale="m",this.selectAllEnabled=!1,this.selectionDisplay="all",this.selectionAppearance="icon",this.selectionMode="multiple",this.status="idle",this.topLayerDisabled=!1,this.calciteComboboxBeforeClose=C({cancelable:!1}),this.calciteComboboxBeforeOpen=C({cancelable:!1}),this.calciteComboboxChange=C({cancelable:!1}),this.calciteComboboxChipClose=C({cancelable:!1}),this.calciteComboboxClose=C({cancelable:!1}),this.calciteComboboxFilterChange=C({cancelable:!1}),this.calciteComboboxOpen=C({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteComboboxItemChange",this.calciteComboboxItemChangeHandler),this.listen("calciteInternalComboboxItemChange",this.calciteInternalComboboxItemChangeHandler),this.listen("click",this.comboboxFocusHandler)}static{this.properties={activeChipIndex:[16,{},{state:!0}],activeDescendant:[16,{},{state:!0}],activeItemIndex:[16,{},{state:!0}],compactSelectionDisplay:[16,{},{state:!0}],deferFitChipCountRender:[16,{},{state:!0}],selectedHiddenChipsCount:[16,{},{state:!0}],selectedVisibleChipsCount:[16,{},{state:!0}],fitUsingCompactCountLabel:[16,{},{state:!0}],allItems:[16,{},{state:!0}],items:[16,{},{state:!0}],noMatchesFound:[16,{},{state:!0}],allowCustomValues:[7,{},{reflect:!0,type:Boolean}],clearDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],filterText:[3,{},{reflect:!0}],filterProps:[0,{},{attribute:!1}],filteredItems:[32,{},{attribute:!1,readOnly:!0}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],label:1,labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placeholder:1,placeholderIcon:[3,{},{reflect:!0}],placeholderIconFlipRtl:[7,{},{reflect:!0,type:Boolean}],placement:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectAllEnabled:[7,{},{reflect:!0,type:Boolean}],selectedItems:[0,{},{attribute:!1}],selectionDisplay:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],validationIcon:[3,{converter:se},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.styles=Pe}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(e=>e!=="el"):["description","label","metadata","shortHeading"]}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:i,open:s}=this,l=i[0],a=l?.icon,n=D(t);return!s&&l?!!a&&n:!!e&&(!l||n)}get allSelected(){let e=this.allItems.filter(t=>!t.disabled);return e.length>0&&e.every(t=>t.selected)}get hasDisabledSelected(){return this.allItems.some(e=>e.disabled&&e.selected)}get indeterminate(){let e=this.selectedItems.length>0||this.hasDisabledSelected;return this.selectAllEnabled?!this.allSelected&&e:this.selectedItems.length>0&&!this.allSelected}get keyboardNavItems(){let{selectAllComboboxItemRef:e}=this,t=this.filteredItems.filter(i=>!i.disabled);return e.value?[e.value,...t]:t}get filterText(){return this._filterText}set filterText(e){let t=this._filterText;e!==t&&(this._filterText=e,this.filterTextChange(e))}get filteredItems(){return this.items.filter(e=>!W(e))}get selectedItems(){return this._selectedItems}set selectedItems(e){let t=this._selectedItems;e!==t&&(this._selectedItems=e,this.selectedItemsHandler())}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueHandler(e))}async reposition(e=!1){let{floatingEl:t,referenceEl:i,placement:s,overlayPositioning:l,filteredFlipPlacements:a}=this;return ge(this,{direction:this.direction,floatingEl:t,referenceEl:i,overlayPositioning:l,placement:s,flipPlacements:a,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>(this.activeChipIndex=-1,this.activeItemIndex=-1,this.textInputRef.value),e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),E(this),this.cancelable.add(this.filterItems)}async load(){this.handleSelectionModeWarning()}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("maxItems")&&(this.hasUpdated||this.maxItems!==0)&&this.setMaxScrollerHeight(),(e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!==q))&&this.reposition(!0),(e.has("selectionMode")||e.has("scale")||e.has("selectionAppearance"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler()}loaded(){E(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),Ie(this)}emitComboboxChange(){this.calciteComboboxChange.emit()}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){this.disabled||me(this)}handleDisabledChange(e){e||(this.open=!1)}valueHandler(e){this.internalValueChangeFlag||(this.items.forEach(t=>{t.selected=Array.isArray(e)?e.includes(t.value):e===t.value}),this.updateItems())}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){let e=this.previousAllSelected,t=this.allSelected;if(this.previousAllSelected=t,this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.selectionDisplay==="fit"&&this.isMulti()){let i=e&&!t;e&&!t&&(this.selectedHiddenChipsCount=0,this.selectedItems.forEach(s=>{let l=this.referenceEl?.querySelector(`#${p.chip(s.guid)}`);l&&this.showChip(l)})),this.updateComplete.then(async()=>{i&&await this.updateComplete,await this.refreshSelectionDisplay(),this.fitFollowUpRefreshPromise&&await this.fitFollowUpRefreshPromise,this.deferFitChipCountRender=!1})}}async documentClickHandler(e){this.disabled||e.composedPath().includes(this.el)||(await this.componentOnReady(),!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1)),this.allowCustomValues&&this.filterText.trim().length&&this.addCustomChip(this.filterText),this.open=!1)}handleSelectAll(e){e&&(this.toggleSelectAll(),this.selectionDisplay!=="fit"&&this.allSelected&&this.selectedItems.forEach(t=>{let i=this.referenceEl.querySelector(`#${p.chip(t.guid)}`);i&&this.hideChip(i)}))}updateSelectedItems(){this.selectedItems=this.getOrderedSelectedItems(this.getSelectedItems())}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,i=e.composedPath().includes(this.selectAllComboboxItemRef.value);this.selectAllEnabled&&this.handleSelectAll(i);let s=this.keyboardNavItems.indexOf(i?this.selectAllComboboxItemRef.value:t);this.updateActiveItemIndex(s),this.toggleSelection(t,t.selected)}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.hasUpdated&&this.updateItems()}clearValue(){let e=this.items.filter(t=>t.selected&&!t.disabled);e.length&&(this.ignoreSelectedEventsFlag=!0,e.forEach(t=>t.selected=!1),this.ignoreSelectedEventsFlag=!1,this.updateSelectedItems(),this.emitComboboxChange()),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}clearInputValue(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?be(t,e):void 0}getValue(){let e=this.getOrderedSelectedValues(this.selectedItems.map(t=>t.value?.toString()));return e.length?e.length>1?e:e[0]:""}getOrderedSelectedValues(e){if(!this.isMulti())return e;let t=Array.isArray(this.value)?this.value:this.value?[this.value]:[];return Ee(e,t)}getOrderedSelectedItems(e){return this.isMulti()?Q(e,this.selectedItems):e}comboboxInViewport(){let e=this.el.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.right<=(window.innerWidth||document.documentElement.clientWidth)&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)}toggleSelectAll(){let e=!this.allSelected;this.allItems.forEach(t=>{t.disabled||(t.selected=e)}),this.updateSelectedItems(),this.emitComboboxChange()}hasHiddenSelectedFitChips(){if(this.selectionDisplay!=="fit"||!this.isMulti())return!1;let e=this.selectedChipCountRef.value;return!!e&&!e.classList.contains(o.chipInvisible)}keyDownHandler(e){if(this.readOnly)return;let{key:t}=e;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):this.open?(this.open=!1,e.preventDefault()):!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1));break;case"ArrowLeft":(this.activeChipIndex!==-1||this.textInputRef.value?.selectionStart===0)&&(this.previousChip(),e.preventDefault());break;case"ArrowRight":this.activeChipIndex!==-1&&(this.nextChip(),e.preventDefault());break;case"ArrowUp":this.keyboardNavItems.length&&(e.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView()),this.scrollToActiveOrSelectedItem();break;case"ArrowDown":this.keyboardNavItems.length&&(e.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":!this.textInputRef.value?.value&&!e.defaultPrevented&&(!this.open&&this.keyboardNavItems.length&&(this.open=!0,this.ensureRecentSelectedItemIsActive()),e.preventDefault());break;case"Home":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":if(this.open){this.open=!1,e.preventDefault();break}this.clearDisabled||(this.textInputRef.value.value.length>0?(this.resetText(),e.preventDefault()):this.selectedItems.length>0&&this.selectionMode!=="single-persist"&&(this.clearValue(),e.preventDefault()));break;case"Enter":this.open&&this.activeItemIndex>-1?(this.keyboardNavItems[this.activeItemIndex].toggleSelection(),e.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(e.target),e.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):!e.defaultPrevented&&this.formSupport.active&&(e.preventDefault(),this.formSupport.requestSubmit());break;case"Delete":case"Backspace":{let s=this.hasHiddenSelectedFitChips()&&this.activeChipIndex===-1;if(this.selectionDisplay==="single"||s)return;let a=e.composedPath().find(n=>G(n));this.activeChipIndex>-1&&a?(e.preventDefault(),this.removeActiveChip(a)):!this.filterText&&this.isMulti()&&(e.preventDefault(),this.removeLastChip());break}}}onBeforeOpen(){this.topLayer.show(),this.reposition(),this.calciteComboboxBeforeOpen.emit(),setTimeout(()=>this.scrollToActiveOrSelectedItem(this.activeItemIndex<0),0)}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),ve(this),this.topLayer.hide()}async setMaxScrollerHeight(){let{listContainerEl:e,open:t,referenceEl:i}=this;if(!e||!t||!i)return;let s=this.getMaxScrollerHeight();e.style.maxBlockSize=s>0?`${s}px`:"",e.style.inlineSize=`${i.clientWidth}px`}calciteChipCloseHandler(e){this.open=!1;let t=this.items.find(i=>i===e);t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()}clickHandler(e){if(this.readOnly)return;let t=e.composedPath();if(t.some(s=>G(s))){this.open=!1,e.preventDefault();return}let i=this.clearButtonRef.value;if(i&&t.includes(i)){this.clearValue(),e.preventDefault();return}this.open=!this.open,this.ensureRecentSelectedItemIsActive()}ensureRecentSelectedItemIsActive(){let{activeItemIndex:e,selectedItems:t,keyboardNavItems:i}=this;if(e>-1&&i[e]){this.updateActiveItemIndex(e);return}let s=t[t.length-1],l=s?i.indexOf(s):i.length?0:-1;this.updateActiveItemIndex(l>-1?l:i.length?0:-1)}hideChip(e){e.classList.add(o.chipInvisible)}showChip(e){e.classList.remove(o.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:i,hideSelectedChips:s}){let l=e.filter(h=>h.selected),a=l.filter(h=>!h.disabled),n=l.filter(h=>h.disabled),c=h=>{let f=y(h),u=h.getBoundingClientRect().width;return Number.isFinite(f)&&f>0?f:u};if(l.forEach(h=>c(h)),e.forEach(h=>{this.hideChip(h)}),s)return;let r=h=>{let f=0;return h.forEach(u=>{let b=c(u);b&&b<=t&&(t-=b+i,this.showChip(u),f++)}),f};r(a)<=1&&r(n)}async refreshSelectionDisplay(e=!0){if(this.refreshingSelectionDisplay)return;if(this.refreshingSelectionDisplay=!0,await this.componentOnReady(),D(this.selectionMode)){this.refreshingSelectionDisplay=!1;return}let{allSelectedIndicatorChipRef:t,chipContainerEl:i,selectionDisplay:s,placeholder:l,selectedIndicatorChipRef:a,textInputRef:n}=this;if(!n.value||!i){this.refreshingSelectionDisplay=!1;return}let c=parseInt(getComputedStyle(i).gap,10),r=y(i),{fontSize:v,fontFamily:h,minInlineSize:f}=getComputedStyle(n.value),u=.55,b=parseFloat(f)||parseInt(R,10),I=B(l,`${v} ${h}`),k=I>0?I:Math.max(b,Math.round((l?.length||0)*(parseFloat(v)||parseInt(R,10))*u)),O=Math.max(b,k),P=(s==="fit"?O:k)+c,Re=y(t.value),K=y(a.value),Fe=Math.max(Re,K);if(this.setCompactSelectionDisplay({chipContainerElGap:c,chipContainerElWidth:r,inputWidth:P,largestSelectedIndicatorChipWidth:Fe}),s!=="fit"&&this.allSelected&&this.selectAllEnabled&&this.selectedItems.forEach(A=>{let S=this.referenceEl?.querySelector(`#${p.chip(A.guid)}`);S&&this.hideChip(S)}),this.indeterminate&&this.selectedItems.forEach(A=>{let S=this.referenceEl?.querySelector(`#${p.chip(A.guid)}`);S&&this.showChip(S)}),s==="fit"){let A=Array.from(this.renderRoot.querySelectorAll("calcite-chip")).filter(Y=>{let Z=Y.value,Oe=Z!=null&&`${Z}`!="";return Y.disabled||Oe}),{hiddenChipIndicatorWidth:S,hideSelectedChips:X,reservedPlaceholderInputWidth:Me}=this.getFitCompactDisplayState({chipContainerElGap:c,chipContainerElWidth:r,inputMinWidth:b,placeholderWidth:k,selectedIndicatorChipElWidth:K});this.fitUsingCompactCountLabel=X;let He=Math.round(r-(S+c+Me+c));this.refreshChipDisplay({availableHorizontalChipElSpace:He,chipContainerElGap:c,chipEls:A,hideSelectedChips:X});let Te=this.selectedHiddenChipsCount;this.syncChipVisibilityCounts(A),Te!==this.selectedHiddenChipsCount&&e&&(this.fitFollowUpRefreshPromise=this.updateComplete.then(()=>this.refreshSelectionDisplay(!1)).then(()=>{this.fitFollowUpRefreshPromise=void 0}))}this.refreshingSelectionDisplay=!1}setFloatingEl(e){this.floatingEl=e,E(this)}shouldUseFitCompactDisplay({chipContainerElGap:e,chipContainerElWidth:t,hiddenChipIndicatorWidth:i,inputMinWidth:s,placeholderWidth:l,reservedPlaceholderInputWidth:a}){let n=Math.round(t-(i+e+a+e));return l>s*2&&n<=0}getFitCompactDisplayState({chipContainerElGap:e,chipContainerElWidth:t,inputMinWidth:i,placeholderWidth:s,selectedIndicatorChipElWidth:l}){let a=y(this.selectedChipCountRef.value),n=this.deferFitChipCountRender||this.selectedHiddenChipsCount<=0?0:a||l,c=Math.max(i,s),r=this.shouldUseFitCompactDisplay({chipContainerElGap:e,chipContainerElWidth:t,hiddenChipIndicatorWidth:n,inputMinWidth:i,placeholderWidth:s,reservedPlaceholderInputWidth:c});return{hiddenChipIndicatorWidth:n,hideSelectedChips:r,reservedPlaceholderInputWidth:c}}setCompactSelectionDisplay({chipContainerElGap:e,chipContainerElWidth:t,inputWidth:i,largestSelectedIndicatorChipWidth:s}){let l=Math.round(s+e+i);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<l)&&(this.maxCompactBreakpoint=l),this.compactSelectionDisplay=t<this.maxCompactBreakpoint}setContainerEl(e){z(this.resizeObserver,this.listContainerEl,e),this.listContainerEl=e,this.transitionEl=e}setChipContainerEl(e){z(this.resizeObserver,this.chipContainerEl,e),this.chipContainerEl=e}setReferenceEl(e){this.referenceEl=e,E(this)}syncChipVisibilityCounts(e){let t=0,i=0;e.forEach(l=>{l.selected&&(i++,l.classList.contains(o.chipInvisible)||t++)}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let s=Math.max(0,i-t);s!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=s)}getMaxScrollerHeight(){let t=this.getItemsAndGroups(!0).filter(a=>!W(a)),{maxItems:i}=this,s=0,l=0;return t.length>=i&&t.forEach(a=>{if(s<i){let n=this.calculateScrollerHeight(a);l+=n,s+=1}}),l}calculateScrollerHeight(e){if(!e)return 0;let t=e.getBoundingClientRect().height,i=`:scope > ${M}, :scope > ${H}`,s=Array.from(e.querySelectorAll(i)).reduce((l,a)=>l+a.getBoundingClientRect().height,0);return t-s}inputHandler(e){let t=e.target.value;this.filterText=t}getItemsAndGroups(e=!1){return e?Array.from(this.el.querySelectorAll(`${M}, ${H}`)):[...this.groupItems,...this.items]}toggleSelection(e,t){!e||this.selectionMode==="single-persist"&&e.selected&&e.value===this.value&&!t||(this.selectionDisplay==="fit"&&this.isMulti()&&(this.deferFitChipCountRender=!0),this.isMulti()?this.handleMultiSelection(e,t):this.handleSingleSelection(e,t))}handleMultiSelection(e,t){e.selected=t,this.updateAncestors(e),this.updateSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")}handleSingleSelection(e,t){this.ignoreSelectedEventsFlag=!0,this.items.forEach(i=>i.selected=i===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.updateSelectedItems(),this.emitComboboxChange(),this.textInputRef.value&&(this.textInputRef.value.value=F(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=j(e),i=De(e);e.selected?t.forEach(s=>{s.disabled||(s.selected=!0)}):([...i].forEach(s=>{s.disabled||(s.selected=!1)}),[...t].forEach(s=>{T(s)||(s.selected=!1)}))}updateItems(){this.allItems=this.getItems(!0),this.items=this.allItems.filter(e=>!e.disabled),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.groupData=this.getGroupData(),this.updateItemProps(),this.updateSelectedItems(),this.previousAllSelected=this.allSelected}updateItemProps(){this.allItems.forEach(e=>{e.selectionMode=this.selectionMode,e.selectionAppearance=this.selectionAppearance,e.scale=this.scale}),this.groupItems.forEach((e,t)=>(e.scale=this.scale,e.position=t)),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach((e,t,i)=>{t===0&&(e.afterEmptyGroup=!1);let s=i[t+1];s&&(s.afterEmptyGroup=e.children.length===0)})}getData(){return this.items.map(e=>({description:e.description,filterDisabled:e.filterDisabled,label:e.heading,metadata:e.metadata,shortHeading:e.shortHeading,el:e}))}getGroupData(){return this.groupItems.map(e=>({label:e.label,el:e}))}resetText(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}getItems(e=!1){return Array.from(this.el.querySelectorAll(M)).filter(i=>e||!i.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(H))}addCustomChip(e,t){let i=this.items.find(s=>s.heading===e);if(i)this.toggleSelection(i,!0);else{let s=document.createElement("calcite-combobox-item");s.value=e,s.heading=e,this.el.prepend(s),this.updateItems(),this.toggleSelection(s,!0),this.open=!0,t&&this.setFocus()}}removeActiveChip(e){let t=this.selectedItems[this.activeChipIndex];t&&!t.disabled&&`${p.chip(t.guid)}`===e.id&&this.toggleSelection(t,!1),this.setFocus()}removeLastChip(){let e=this.selectedItems.findLast(t=>!t.disabled);e&&(this.toggleSelection(e,!1),this.setFocus())}previousChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex+1;t>e?(this.activeChipIndex=-1,oe(this.textInputRef.value)):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl?.querySelector(`#${p.chip(e)}`):void 0)?.setFocus()}scrollToActiveOrSelectedItem(e=!1){let t=e&&this.selectedItems?.length?this.selectedItems[0]:this.keyboardNavItems[this.activeItemIndex],i=this.listContainerEl;if(!t||!i)return;t.scrollIntoView({block:"nearest"});let l=this.selectAllComboboxItemRef.value?.offsetHeight||0,a=t.getBoundingClientRect(),n=i.getBoundingClientRect();a.top<n.top+l&&(i.scrollTop-=n.top+l-a.top)}shiftActiveItemIndex(e){let{length:t}=this.keyboardNavItems,i=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(i),this.scrollToActiveOrSelectedItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t="";this.keyboardNavItems.forEach((i,s)=>{s===e?(i.active=!0,t=`${p.item(i.guid)}`):i.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return!D(this.selectionMode)}comboboxFocusHandler(){this.disabled||(this.activeChipIndex=-1,this.textInputRef.value?.focus(),this.open&&this.selectionDisplay==="fit"&&this.isMulti()&&this.refreshSelectionDisplay())}createScreenReaderItem({ariaLabel:e,ariaSelected:t,id:i,textContent:s}){return m`<li aria-label=${e??g} aria-selected=${t??g} id=${i??g} role=option tabindex=-1>${s}</li>`}handleSelectionModeWarning(){this.selectionMode==="single-persist"&&this.clearDisabled&&console.warn('clearDisabled is ignored when selection-mode is set to "single-persist"')}getDescriptionMessage(){let e=Array.isArray(this.value)?this.value.join(", "):this.value;return this.readOnly?this.messages.nonEditable.replace("{value}",`${e}`):e}getChipLabel(e,t){return t?[...[...j(e)].reverse(),e].map(s=>F(s)).join(" / "):F(e)}renderChip({activeChipIndex:e,disabled:t,index:i,item:s,messages:l,readOnly:a,scale:n,isAncestors:c}){let r=this.getChipLabel(s,c);return w(s.guid||s.value||r,m`<calcite-chip .appearance=${a?"outline":"solid"} class=${d({[o.chip]:!0,[o.disabled]:t})} .closable=${!t&&!a} data-testid=${`${t?"disabled-chip":"chip"}-${i}`} .disabled=${t} .icon=${s.icon} .iconFlipRtl=${s.iconFlipRtl} id=${(!t&&s.guid?`${p.chip(s.guid)}`:void 0)??g} .label=${r} .messageOverrides=${t?void 0:{dismissLabel:l.removeTag.replace("{value}",`${r}`)}} @calciteChipClose=${t?void 0:()=>this.calciteChipCloseHandler(s)} @focusin=${t?void 0:()=>this.activeChipIndex=i} .scale=${n} .selected=${s.selected} .tabIndex=${!t&&e===i?0:-1} title=${r??g} .value=${s.value}>${r}</calcite-chip>`)}renderChipCount(e,t){let i=this.fitUsingCompactCountLabel?`${e}`:this.messages.disabledSelectedCount.replace("{count}",`${e}`)??`+${e}`;return m`<calcite-chip appearance=solid class=${d({[o.chip]:!0})} data-testid=selected-chip-count id=selected-chip-count .label=${i} .scale=${t} tabindex=-1 title=${i??g} ${x(this.selectedChipCountRef)}>${i}</calcite-chip>`}renderChips(){let{activeChipIndex:e,readOnly:t,scale:i,selectionDisplay:s,selectionMode:l,messages:a}=this,n=[],c=l==="ancestors",r=this.selectAllEnabled&&this.allSelected,v=s==="all";if(r)return null;let h=0,f=0;if(v){let u=this.allItems.filter(I=>I.selected&&(!c||!T(I)));Q(u,this.selectedItems).forEach(I=>{if(I.disabled){n.push(this.renderChip({activeChipIndex:e,disabled:!0,index:f++,item:I,messages:a,readOnly:t,scale:i,isAncestors:c}));return}n.push(this.renderChip({activeChipIndex:e,disabled:!1,index:h++,item:I,messages:a,readOnly:t,scale:i,isAncestors:c}))})}else r||this.selectedItems.forEach(u=>{n.push(this.renderChip({activeChipIndex:e,disabled:u.disabled,index:h++,item:u,messages:a,readOnly:t,scale:i,isAncestors:c}))});if(s==="fit"){let u=this.selectedHiddenChipsCount,b=this.selectedVisibleChipsCount===0?this.selectedItems.length:u;u>0&&!this.deferFitChipCountRender&&n.push(this.renderChipCount(b,i))}return n.length?n:null}renderAllSelectedIndicatorChip(){let{allSelectedIndicatorChipRef:e,compactSelectionDisplay:t,scale:i,selectedVisibleChipsCount:s}=this,l=!1;if(this.selectionDisplay==="fit"&&this.textInputRef.value&&this.chipContainerEl){let r=parseInt(getComputedStyle(this.chipContainerEl).gap,10),v=y(this.chipContainerEl),{fontSize:h,fontFamily:f,minInlineSize:u}=getComputedStyle(this.textInputRef.value),b=.55,I=parseFloat(u)||parseInt(R,10),k=B(this.placeholder,`${h} ${f}`),O=k>0?k:Math.max(I,Math.round((this.placeholder?.length||0)*(parseFloat(h)||parseInt(R,10))*b)),P=y(this.selectedIndicatorChipRef.value);l=this.getFitCompactDisplayState({chipContainerElGap:r,chipContainerElWidth:v,inputMinWidth:I,placeholderWidth:O,selectedIndicatorChipElWidth:P}).hideSelectedChips}let n=t||l?this.messages.all:this.messages.allSelected,c=this.allSelected&&(this.selectionDisplay==="single"||!s||this.selectionDisplay==="all");return m`<calcite-chip class=${d({[o.chip]:!0,[o.chipInvisible]:!c,[o.allSelected]:!0})} data-testid=all-selected-indicator-chip .label=${n} .scale=${i} title=${n??g} value ${x(e)}>${n}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:i,selectedIndicatorChipRef:s}=this,l=!1,a,n=this.getSelectedItems().length;return e?l=!0:t==="single"&&(this.allSelected?l=!0:n>0?l=!1:l=!0,a=`${n} ${this.messages.selected}`),m`<calcite-chip class=${d({[o.chip]:!0,[o.chipInvisible]:l})} .label=${a} .scale=${i} title=${a??g} value ${x(s)}>${a}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:i}=this,s=!1,l,a=this.getSelectedItems().length;return e?this.allSelected?s=!0:t==="single"&&(s=!(a>0),l=`${a}`):s=!0,m`<calcite-chip class=${d({[o.chip]:!0,[o.chipInvisible]:s})} .label=${l} .scale=${i} title=${l??g} value>${l}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:i,selectionMode:s,selectedItems:l,open:a}=this,n=D(s),c=l[0],r=!a&&n&&!!c&&!this.filterText;return m`<span class=${d({[o.inputWrap]:!0,[o.inputWrapSingle]:n})}>${r&&w("label",m`<span class=${d({[o.label]:!0,[o.labelIcon]:!!c?.icon})}>${F(c)}</span>`)||""}${w("input",m`<input aria-activedescendant=${this.activeDescendant??g} aria-controls=${`${p.listbox(e)}`} aria-errormessage=${p.validationMessage} aria-owns=${`${p.listbox(e)}`} aria-autocomplete=list .ariaDescription=${this.getDescriptionMessage()} .ariaExpanded=${a} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${xe(this)} class=${d({[o.input]:!0,[o.inputSingle]:!0,[o.inputHidden]:r,[o.inputIcon]:this.showingInlineIcon&&!!this.placeholderIcon})} data-testid=input .disabled=${t} .id=${`${p.input(e)}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${i??g} .readOnly=${this.readOnly} .required=${this.required} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${te(this.filterText??"")} ${x(this.textInputRef)}>`)}</span>`}renderListBoxOptions(){let e=this.keyboardNavItems.map(t=>this.createScreenReaderItem({ariaLabel:t.label,ariaSelected:t.selected,id:`${p.item(t.guid)}`,textContent:t.heading}));if(this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"){let t=this.createScreenReaderItem({ariaLabel:this.messages.selectAll,ariaSelected:this.allSelected,textContent:this.messages.selectAll});t&&e.unshift(t)}return e}renderFloatingUIContainer(){let{messages:e,setFloatingEl:t,setContainerEl:i,open:s,scale:l}=this,a={[o.listContainer]:!0,[N.animation]:!0,[N.animationActive]:s},n=(this.filterText&&e.add.replace("{text}",`${this.filterText}`))??"";return m`<div aria-hidden=true class=${d(o.floatingUIContainer)} popover=manual ${x(t)}><div class=${d(a)} ${x(i)}><ul class=${d({[o.list]:!0,[o.listHide]:!s})}>${this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"&&m`<calcite-combobox-item class=${d(o.selectAll)} data-testid=select-all-item .heading=${e.selectAll} .id=${`${this.guid}-select-all-enabled-interactive`} .indeterminate=${this.indeterminate} .label=${e.selectAll} .scale=${l} .selected=${this.allSelected} tabindex=-1 value=select-all ${x(this.selectAllComboboxItemRef)}></calcite-combobox-item>`||""}<slot></slot>${this.noMatchesFound&&(this.allowCustomValues?m`<li aria-label=${n??g} class=${d(o.noMatches)} @click=${this.customChipAddHandler} role=option tabindex=0>${we({text:n,pattern:new RegExp(`(${U(this.filterText)})`,"i")})}</li>`:m`<li class=${d({[o.noMatchesPlaceholder]:!0,[o.noMatches]:!0})}>${e.noMatches}</li>`)||""}</ul></div></div>`}renderSelectedOrPlaceholderIcon(){let{open:e,placeholderIcon:t,placeholderIconFlipRtl:i,selectedItems:s}=this,l=s[0],a=l?.icon,n=t&&(e||!l);return this.showingInlineIcon&&w("selected-placeholder-icon",m`<span class=${d(o.iconStart)}><calcite-icon class=${d({[o.selectedIcon]:!n,[o.placeholderIcon]:n})} .flipRtl=${n?i:l.iconFlipRtl} .icon=${n?t:a} .scale=${L(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return w("chevron",m`<span class=${d(o.iconEnd)}><calcite-icon class=${d(o.icon)} .icon=${e?_.chevronUp:_.chevronDown} .scale=${L(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:i,open:s,readOnly:l}=this,a=D(this.selectionMode),n=e==="all",c=e==="single",r=!a&&e==="fit",v=!a&&!n,h=v&&!r,f=this.items.some(b=>b.selected&&!b.disabled),u=!this.clearDisabled&&this.selectionMode!=="single-persist"&&!!this.value?.length&&f;return this.interactiveContainer({disabled:this.disabled,children:m`${this.labelText&&Ce({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-live=polite class=${d({[o.wrapper]:!0,[o.wrapperSingle]:a||!this.selectedItems.length,[o.wrapperActive]:s})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${x(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${w("grid",m`<div class=${d({[o.gridInput]:!0,[o.selectionDisplayFit]:r,[o.selectionDisplaySingle]:c})} ${x(this.setChipContainerEl)}>${!a&&!c&&this.renderChips()||""}${!a&&!c&&this.selectAllEnabled&&n&&this.renderAllSelectedIndicatorChip()||""}${h&&this.renderSelectedIndicatorChip()||""}${h&&this.renderSelectedIndicatorChipCompact()||""}${v&&this.renderAllSelectedIndicatorChip()||""}<label class=${d(o.screenReadersOnly)} .htmlFor=${`${p.input(t)}`} .id=${`${p.label(t)}`}>${i}</label>${this.renderInput()}</div>`)}${!l&&u?Ae({ariaLabel:this.messages.clear,disabled:this.disabled,ref:this.clearButtonRef,scale:this.scale,title:this.messages.clear}):null}${!l&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${p.label(t)}`} aria-multiselectable=true class=${d(o.screenReadersOnly)} .id=${`${p.listbox(t)}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${this.validationMessage&&this.status==="invalid"?ye({icon:this.validationIcon,id:p.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};ae("calcite-combobox",J);export{J as Combobox};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as ot}from"./UCOCOHHJ.js";import{a as tt}from"./5EBGPCB7.js";import{a as it,c as at}from"./BUI23KLA.js";import{a as F}from"./AKWBXPKT.js";import{a as Q}from"./VI7SBYXT.js";import{a as _}from"./GTCDEISR.js";import{a as S,d as p}from"./5IJ25RMA.js";import{c as et,e as v}from"./DMK27J6W.js";import{c as W}from"./BEE5ZZFY.js";import{a as Z}from"./B4AGOFO6.js";import"./ZWPNZ5XW.js";import{e as J}from"./ZCRQBBYM.js";import{C as G,H as h,y as X,z as Y}from"./YXZKUPH5.js";import{C as f,D as y,E as j,F as E,L as V,Q as K,g as q,h as A,l as N,p as z}from"./FTHTE3TW.js";var ht=({bufferSize:l=0,containerSize:t,itemSizes:e})=>{let i=t-l,a=e.length,r=0;for(let[o,n]of e.entries())if(r=r+n,r>i){a=o;break}else continue;return a},pt=({bufferSize:l=0,containerSize:t,itemSizes:e})=>Math.max(e.length-ht({bufferSize:l,itemSizes:e,containerSize:t}),0),w={container:"container",hasActionGroups:"has-action-groups",lineOverlay:"line-overlay",line:"line",actionGroupEnd:"action-group--end",actionGroupStart:"action-group--start"},P={actionsEnd:"actions-end",actionsStart:"actions-start",expandTooltip:"expand-tooltip"},ut=l=>l.flatMap(t=>p(t)?t.actions:v(t)?t.actions.filter(e=>e.slot===et.trigger):t).filter(t=>!!t),gt=({item:l,containerRect:t,horizontal:e,rtl:i})=>{let a=l.getBoundingClientRect();return e?a.top-t.top:i?t.right-a.right:a.left-t.left},ft=({actionGroups:l,expanded:t,overflowCount:e})=>{let i=e;[...l].reverse().forEach(a=>{let r=0,o=a.actions.filter(n=>n.parentElement===a).reverse();o.forEach(n=>{n.slot===S.menuActions&&(n.removeAttribute("slot"),n.textEnabled=t)}),i>0&&!a.overflowActionsDisabled&&o.some(n=>(o.filter(c=>!c.slot).length>1&&o.length>2&&!n.closest("calcite-action-menu")&&!n.overflowDisabled&&(n.textEnabled=!0,n.setAttribute("slot",S.menuActions),r++,r>1&&i--),i<1)),a.manager.component.requestUpdate()})},vt=q`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([scale=s]){--calcite-internal-action-bar-gap: var(--calcite-action-bar-items-space, var(--calcite-spacing-xxs));--calcite-internal-action-bar-padding: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-bar-gap: var(--calcite-action-bar-items-space, var(--calcite-spacing-sm));--calcite-internal-action-bar-padding: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-bar-gap: var(--calcite-action-bar-items-space, var(--calcite-space-sm-plus));--calcite-internal-action-bar-padding: var(--calcite-spacing-sm-plus)}:host{display:inline-flex;align-self:stretch;background:transparent;--calcite-internal-action-group-dividing-border-margin: calc(var(--calcite-spacing-base) + 1px)}.container{display:inline-flex;flex:1 1 auto;flex-direction:column;background-color:var(--calcite-action-bar-background-color, var(--calcite-color-foreground-1));gap:var(--calcite-internal-action-bar-gap);padding:var(--calcite-internal-action-bar-padding)}@keyframes in{0%{opacity:0}to{opacity:1}}:host([floating]) .container{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;overflow:hidden;border-radius:var(--calcite-action-bar-corner-radius, var(--calcite-corner-radius-round));box-shadow:var(--calcite-action-bar-shadow, var(--calcite-shadow-md))}:host([layout=vertical]){flex-direction:column}:host([layout=vertical]):host([overflow-actions-disabled]) .container{overflow-y:auto}:host([layout=vertical]):host([expanded]) .container{max-inline-size:var(--calcite-action-bar-expanded-max-width, auto)}:host([layout=vertical]) .action-group--end{margin-block-start:auto}:host([layout=vertical]) ::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm);border-image:linear-gradient(to right,transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent var(--calcite-internal-action-group-dividing-border-margin));border-image-slice:1;padding-block-end:var(--calcite-internal-action-bar-padding)}:host([layout=horizontal]){flex-direction:row}:host([layout=horizontal]) .container{flex-direction:row}:host([layout=horizontal]):host([overflow-actions-disabled]) .container{overflow-x:auto}:host([layout=horizontal]) .action-group--end{margin-inline-start:auto}:host([layout=horizontal]) ::slotted(calcite-action-group:not(:last-of-type)){border-image:linear-gradient(transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent var(--calcite-internal-action-group-dividing-border-margin));border-image-slice:1;border-inline-end-width:var(--calcite-border-width-sm);padding-inline-end:var(--calcite-internal-action-bar-padding)}.action-group--end{justify-content:flex-end}.line-overlay{position:absolute;inset:0;pointer-events:none}.line{position:absolute;--calcite-internal-action-bar-divider-inset: calc( var(--calcite-internal-action-group-dividing-border-margin) - var(--calcite-border-width-sm) )}:host([overflow-mode=wrap][layout=horizontal]) .container,:host([overflow-mode=wrap][layout=vertical]) .container{position:relative;flex-wrap:wrap;align-content:flex-start;--calcite-internal-action-bar-line-gap: calc( var(--calcite-internal-action-bar-padding) + var(--calcite-internal-action-bar-gap) )}:host([overflow-mode=wrap][layout=horizontal]) ::slotted(calcite-action-group[slot=actions-start]),:host([overflow-mode=wrap][layout=vertical]) ::slotted(calcite-action-group[slot=actions-start]){padding-inline-end:0;padding-block-end:0;border-inline-end-width:0;border-block-end-width:0}:host([overflow-mode=wrap][layout=horizontal]) .container{row-gap:var(--calcite-internal-action-bar-line-gap)}:host([overflow-mode=wrap][layout=horizontal]) ::slotted(calcite-action-group:not([slot=actions-start])){margin-inline-start:calc(-1 * var(--calcite-border-width-sm));padding-inline:var(--calcite-internal-action-bar-padding) 0;border-inline-start-width:var(--calcite-border-width-sm);border-inline-end-width:0;border-image:linear-gradient(transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent calc(100% - var(--calcite-internal-action-group-dividing-border-margin)));border-image-slice:1}:host([overflow-mode=wrap][layout=horizontal]) .line{inset-inline:var(--calcite-internal-action-bar-padding);block-size:var(--calcite-border-width-sm);inset-block-start:calc(var(--calcite-internal-action-bar-line-offset, 0px) - var(--calcite-internal-action-bar-line-gap) / 2);background:linear-gradient(to right,transparent var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-bar-divider-inset)),transparent calc(100% - var(--calcite-internal-action-bar-divider-inset)))}:host([overflow-mode=wrap][layout=horizontal]) .container.has-action-groups{overflow:hidden;padding-inline-start:0;column-gap:calc(var(--calcite-internal-action-bar-gap) + var(--calcite-border-width-sm))}:host([overflow-mode=wrap][layout=horizontal]) .container.has-action-groups .action-group--start{padding-inline-start:var(--calcite-internal-action-bar-padding)}:host([overflow-mode=wrap][layout=vertical]) .container{block-size:100%;min-block-size:0;column-gap:var(--calcite-internal-action-bar-line-gap)}:host([overflow-mode=wrap][layout=vertical]) ::slotted(calcite-action-group:not([slot=actions-start])){margin-block-start:calc(-1 * var(--calcite-border-width-sm));padding-block:var(--calcite-internal-action-bar-padding) 0;border-block-start-width:var(--calcite-border-width-sm);border-block-end-width:0;border-image:linear-gradient(to right,transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent calc(100% - var(--calcite-internal-action-group-dividing-border-margin)));border-image-slice:1}:host([overflow-mode=wrap][layout=vertical]) .line{inset-block:var(--calcite-internal-action-bar-padding);inline-size:var(--calcite-border-width-sm);inset-inline-start:calc(var(--calcite-internal-action-bar-line-offset, 0px) - var(--calcite-internal-action-bar-line-gap) / 2);background:linear-gradient(to bottom,transparent var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-bar-divider-inset)),transparent calc(100% - var(--calcite-internal-action-bar-divider-inset)))}:host([overflow-mode=wrap][layout=vertical]) .container.has-action-groups{overflow:hidden;padding-block-start:0;row-gap:calc(var(--calcite-internal-action-bar-gap) + var(--calcite-border-width-sm))}:host([overflow-mode=wrap][layout=vertical]) .container.has-action-groups .action-group--start{padding-block-start:var(--calcite-internal-action-bar-padding)}:host([overflow-mode=none][layout=horizontal]) .container{overflow-x:auto}:host([overflow-mode=none][layout=vertical]) .container{overflow-y:auto}:host([hidden]){display:none}[hidden]{display:none}`,H=class extends j{constructor(){super(),this.actions=[],this.containerRef=f(),this.defaultSlotRef=f(),this.actionsStartSlotRef=f(),this.actionsEndSlotRef=f(),this.actionsStartGroupRef=f(),this.actionsEndGroupRef=f(),this.direction=J(),this.defaultSlotItems=[],this.actionGroups=[],this.actionMenus=[],this.actionsStart=[],this.actionsStartGroups=[],this.actionsEnd=[],this.actionsEndGroups=[],this.overflowPassId=0,this.suppressedActionGroupActionsChange=new WeakMap,this.cancelable=ot()(this),this.resize=tt(({width:t,height:e})=>{let{expanded:i,expandToggleDisabled:a,layout:r,expandPosition:o}=this;if(!this.containerRef.value)return;if(this.usesWrap){this.scheduleLineMeasure();return}if(this.overflowMode!=="collapse"||r==="vertical"&&!e||r==="horizontal"&&!t)return;this.updateGroups();let n=this.getItemSizes(),{actionGroups:s,actionsEnd:c,actionsEndGroups:d,actionsStart:C,actionsStartGroups:T,defaultSlotItems:O}=this,b=[...T,...s,...d],D=this.hasActionsEnd||!a&&o==="end"?1:0,M=this.hasActionsStart||!a&&o==="start"?1:0,I=O.length+D+M,u=I,x=getComputedStyle(this.containerRef.value);if(u+=h(r==="horizontal"?x.paddingInlineStart:x.paddingBlockStart)+h(r==="horizontal"?x.paddingInlineEnd:x.paddingBlockEnd),b.length>0){let k=b.length-1;b.forEach((m,R)=>{let g=getComputedStyle(m),$=h(g.gap),B=m.actions.filter(L=>L.slot!==S.menuActions).length,ct=m.actions.some(L=>L.slot===S.menuActions),lt=B+(ct?1:0),dt=Math.max(lt-1,0);u+=$*dt,R!==k&&(u+=h(r==="horizontal"?g.paddingInlineEnd:g.paddingBlockEnd),u+=h(r==="horizontal"?g.borderInlineEndWidth:g.borderBlockEndWidth))})}let U=(k,m,R)=>{if(!m||k.length<1)return;let g=getComputedStyle(m),$=h(g.gap),B=k.length+(R?1:0);u+=$*Math.max(B-1,0)},nt=!a&&o==="start",rt=!a&&o==="end";U(C,this.actionsStartGroupRef.value,nt),U(c,this.actionsEndGroupRef.value,rt),I>1&&(u+=h(x.gap)*(I-1));let st=pt({bufferSize:u,containerSize:r==="horizontal"?t:e,itemSizes:n});this.runOverflowActions({actionGroups:b,expanded:i,overflowCount:st})},V.resize),this.resizeHandler=t=>{if(this.usesWrap){this.scheduleLineMeasure();return}let{width:e,height:i}=t.contentRect;this.resize({width:e,height:i})},this.resizeObserver=Q("resize",t=>this.resizeHandlerEntries(t)),this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionBarToggle.emit()},this.messages=_({blocking:!0}),this.focusSetter=Z()(this),this.setExpandToggleEl=t=>{this.expandToggleEl=t},this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasActionGroups=!1,this.lineOffsets=[],this.floating=!1,this.expandToggleDisabled=!1,this.expanded=!1,this.expandPosition="end",this.layout="vertical",this.overflowMode="collapse",this.overlayPositioning="absolute",this.scale="m",this.selectionAppearance="neutral",this.calciteActionBarCollapse=z({cancelable:!1}),this.calciteActionBarExpand=z({cancelable:!1}),this.calciteActionBarToggle=z({cancelable:!1}),this.listen("calciteActionMenuOpen",this.actionMenuOpenHandler),this.listen("calciteInternalActionGroupActionsChange",this.handleActionGroupActionsChange),this.listen("calciteInternalActionMenuActionsChange",this.handleActionMenuActionsChange),this.listen("keydown",this.handleKeyDown)}static{this.properties={expandTooltip:[16,{},{state:!0}],hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasActionGroups:[16,{},{state:!0}],lineOffsets:[16,{},{state:!0}],actionsEndGroupLabel:1,actionsStartGroupLabel:1,floating:[7,{},{reflect:!0,type:Boolean}],expandToggleDisabled:[7,{},{reflect:!0,type:Boolean}],expandDisabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],expandPosition:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],overflowMode:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overflowActionsDisabled:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],position:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.styles=vt}get expandDisabled(){return this.expandToggleDisabled}set expandDisabled(t){F.deprecated("property",{component:this,name:"expandDisabled",removalVersion:6,suggested:"expandToggleDisabled"}),this.expandToggleDisabled=t}get overflowActionsDisabled(){return this.overflowMode==="none"}set overflowActionsDisabled(t){F.deprecated("property",{component:this,name:"overflowActionsDisabled",removalVersion:7,suggested:'overflowMode="none"'}),this.overflowMode=t?"none":"collapse"}async overflowActions(){if(this.overflowMode!=="collapse"){this.usesWrap&&this.scheduleLineMeasure();return}this.resize({width:this.el.clientWidth,height:this.el.clientHeight})}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback(),this.overflowModeHandler(),this.cancelable.add(this.resize)}willUpdate(t){(t.has("expandDisabled")&&(this.hasUpdated||this.expandDisabled!==!1)||t.has("expandToggleDisabled")&&(this.hasUpdated||this.expandToggleDisabled!==!1)||t.has("expandPosition")&&(this.hasUpdated||this.expandPosition!=="end"))&&this.overflowActions(),t.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&(this.updateGroups(),this.overflowModeHandler(),this.usesWrap||this.updateLines()),t.has("overflowMode")&&(this.hasUpdated||this.overflowMode!=="collapse")&&(!this.usesWrap&&this.lineMeasureFrame!=null&&(cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=void 0),this.usesWrap?this.scheduleLineMeasure():this.updateLines(),this.overflowModeHandler()),t.has("expanded")&&this.hasUpdated&&(this.expandedHandler(),this.expanded?this.calciteActionBarExpand.emit():this.calciteActionBarCollapse.emit()),t.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="neutral")&&this.updateActions()}loaded(){this.syncDefaultSlot(),this.syncActionsStartSlot(),this.syncActionsEndSlot(),this.syncActionsState(),this.overflowActions()}updated(){this.usesWrap&&this.lineMeasureFrame==null&&this.scheduleLineMeasure()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect(),this.lineMeasureFrame!=null&&(cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=void 0)}getItemSizes(){let{layout:t,expandToggleEl:e}=this,i=[...this.actions];e&&i.push(e);let a=t==="horizontal"?"clientWidth":"clientHeight",r=Math.max(...i.map(o=>o[a]||0));return i.map(o=>o[a]||r)}expandedHandler(){this.syncActionsState(!0),this.overflowActions()}overflowModeHandler(){this.overflowMode==="none"?this.resizeObserver?.disconnect():this.resizeObserver?.observe(this.el),this.overflowActions()}actionMenuOpenHandler(t){let e=t.composedPath(),i=e.find(a=>p(a)||v(a));i&&(p(i)&&!i.menuOpen||v(i)&&!i.open||(this.getTrackedActionGroups().forEach(a=>{e.includes(a)||(a.menuOpen=!1)}),this.getTrackedActionMenus().forEach(a=>{e.includes(a)||(a.open=!1)})))}runOverflowActions({actionGroups:t,expanded:e,overflowCount:i}){let a=++this.overflowPassId,r=new Map;t.forEach(o=>{let n=o.actions.filter(s=>s.parentElement===o);r.set(o,n.map(s=>s.slot??"").join("|"))}),ft({actionGroups:t,expanded:e,overflowCount:i}),t.forEach(o=>{let s=o.actions.filter(c=>c.parentElement===o).map(c=>c.slot??"").join("|");r.get(o)!==s&&(this.suppressedActionGroupActionsChange.set(o,a),this.queueSuppressedActionGroupActionsChangeCleanup(o,a))})}queueSuppressedActionGroupActionsChangeCleanup(t,e){queueMicrotask(()=>{this.suppressedActionGroupActionsChange.get(t)===e&&this.suppressedActionGroupActionsChange.delete(t)})}resizeHandlerEntries(t){t.forEach(this.resizeHandler)}getSectionWrapperGroups(){return[this.actionsStartGroupRef.value,this.actionsEndGroupRef.value].filter(t=>!!t)}updateGroups(){let t=[...this.actionGroups,...this.actionsStartGroups,...this.actionsEndGroups,...this.getSectionWrapperGroups()];this.hasActionGroups=this.actionGroups.length>0,t.forEach(e=>{e.layout=this.layout,e.scale=this.scale})}get usesWrap(){return this.overflowMode==="wrap"&&this.layout!=="grid"}scheduleLineMeasure(){this.lineMeasureFrame!=null&&cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=requestAnimationFrame(()=>{this.lineMeasureFrame=void 0,this.updateLines()})}getWrapItems(){let t=[],e=this.actionsStartGroupRef.value;e&&!e.hidden&&t.push(e),this.defaultSlotItems.forEach(a=>{a.hidden||t.push(a)});let i=this.actionsEndGroupRef.value;return i&&!i.hidden&&t.push(i),t}updateLines(){let t=this.containerRef.value;if(!t||!this.usesWrap){this.lineOffsets.length>0&&(this.lineOffsets=[]);return}let e=this.layout==="horizontal",i=this.direction==="rtl",a=t.getBoundingClientRect(),r=this.getWrapItems(),o=[],n=null;r.forEach(c=>{let d=gt({item:c,containerRect:a,horizontal:e,rtl:i});n!==null&&Math.abs(d-n)>1&&o.push(d),n=d}),(o.length!==this.lineOffsets.length||o.some((c,d)=>c!==this.lineOffsets[d]))&&(this.lineOffsets=o)}handleDefaultSlotChange(){this.syncSlotAndActions(()=>this.syncDefaultSlot()),this.usesWrap&&this.scheduleLineMeasure()}handleActionsEndSlotChange(){this.syncSlotAndActions(()=>this.syncActionsEndSlot())}handleActionsStartSlotChange(){this.syncSlotAndActions(()=>this.syncActionsStartSlot())}handleTooltipSlotChange(t){let e=X(t).filter(i=>i?.matches("calcite-tooltip"));this.expandTooltip=e[0]}updateActions(){let t=new Set(this.actions);this.getTrackedActionMenus().forEach(e=>{e.actions.forEach(i=>t.add(i))}),t.forEach(e=>{e.selectionAppearance=this.selectionAppearance})}syncActions(){this.actions=ut([...this.actionsStart,...this.defaultSlotItems,...this.actionsEnd])}syncActionsAndOverflow(){this.syncActionsState(),this.overflowActions()}syncSlotAndActions(t){t(),this.syncActionsAndOverflow()}syncActionsState(t=!1){this.syncActions(),this.updateActions(),t&&it({actions:this.actions,expandables:[...this.getTrackedActionGroups(),...this.getTrackedActionMenus(),...this.getSectionWrapperGroups()],expanded:this.expanded})}getTrackedActionGroups(){return[...this.actionGroups,...this.actionsStartGroups,...this.actionsEndGroups]}getTrackedActionMenus(){return[...this.actionMenus,...this.actionsStart,...this.actionsEnd].filter(t=>v(t))}getAssignedActionBarItems(t){return t?Y(t).filter(e=>W(e)||p(e)||v(e)):[]}syncDefaultSlot(){this.defaultSlotItems=this.getAssignedActionBarItems(this.defaultSlotRef.value),this.actionGroups=this.defaultSlotItems.filter(t=>p(t)),this.actionMenus=this.defaultSlotItems.filter(t=>v(t)),this.updateGroups()}syncActionsStartSlot(){this.actionsStart=this.getAssignedActionBarItems(this.actionsStartSlotRef.value),this.actionsStartGroups=this.actionsStart.filter(t=>p(t)),this.hasActionsStart=this.actionsStart.length>0,this.updateGroups()}syncActionsEndSlot(){this.actionsEnd=this.getAssignedActionBarItems(this.actionsEndSlotRef.value),this.actionsEndGroups=this.actionsEnd.filter(t=>p(t)),this.hasActionsEnd=this.actionsEnd.length>0,this.updateGroups()}handleActionGroupActionsChange(t){let e=t.target;this.getTrackedActionGroups().includes(e)&&(this.suppressedActionGroupActionsChange.has(e)||this.syncActionsAndOverflow())}handleActionMenuActionsChange(t){let e=t.target;this.getTrackedActionMenus().includes(e)&&this.syncActionsAndOverflow()}getNavigableActions(){return this.actions.filter(t=>!t.disabled&&t.slot!==S.menuActions)}handleKeyDown(t){let e=this.getNavigableActions(),i=document.activeElement;if(!(!W(i)||!e.includes(i)))switch(t.key){case"ArrowRight":case"ArrowDown":G(e,i,"next",!0),t.preventDefault();break;case"ArrowLeft":case"ArrowUp":G(e,i,"previous",!0),t.preventDefault();break;case"Home":G(e,i,"first",!0),t.preventDefault();break;case"End":G(e,i,"last",!0),t.preventDefault();break;case"Tab":this.setActionTabIndexes(i);break}}setActionTabIndexes(t){this.actions.forEach(e=>{let i=!e.disabled&&e===t?0:-1;i===0?e.removeAttribute("tabindex"):e.tabIndex=i})}renderExpandTooltipSlot(){return A`<slot name=${P.expandTooltip} @slotchange=${this.handleTooltipSlotChange}></slot>`}renderExpandToggle(){let{el:t,expanded:e,toggleExpand:i,messages:a,position:r,scale:o}=this;return at({collapseLabel:a.collapseLabel,collapseText:a.collapse,direction:this.direction,el:t,expanded:e,expandLabel:a.expandLabel,expandText:a.expand,position:r,ref:this.setExpandToggleEl,scale:o,toggle:i,tooltip:this.expandTooltip})}renderActionsGroup(t){let{expandToggleDisabled:e,scale:i,layout:a,overlayPositioning:r,expandPosition:o}=this,n=t==="start",s=!e&&o===t,c=n?this.hasActionsStart:this.hasActionsEnd,d=n?P.actionsStart:P.actionsEnd,C=n?this.handleActionsStartSlotChange:this.handleActionsEndSlotChange,T=n?this.actionsStartGroupLabel:this.actionsEndGroupLabel,O=!s&&!c,b=n?this.actionsStartGroupRef:this.actionsEndGroupRef,D=n?this.actionsStartSlotRef:this.actionsEndSlotRef,M=s?this.renderExpandToggle():null;return A`<calcite-action-group class=${E({[w.actionGroupStart]:n,[w.actionGroupEnd]:!n})} .hidden=${O} .label=${T} .layout=${a} .overlayPositioning=${r} .scale=${i} ${y(b)}>${n?M:null}<slot name=${d??N} @slotchange=${C} ${y(D)}></slot>${s?this.renderExpandTooltipSlot():null}${n?null:M}</calcite-action-group>`}render(){let t=this.layout==="horizontal"?"horizontal":"vertical";return A`<div .ariaOrientation=${t} class=${E({[w.container]:!0,[w.hasActionGroups]:this.hasActionGroups})} role=toolbar ${y(this.containerRef)}>${this.renderActionsGroup("start")}<slot @slotchange=${this.handleDefaultSlotChange} ${y(this.defaultSlotRef)}></slot>${this.renderActionsGroup("end")}${this.usesWrap?A`<div aria-hidden=true class=${E(w.lineOverlay)}>${this.lineOffsets.map(e=>A`<div class=${E(w.line)} style=${`--calcite-internal-action-bar-line-offset: ${e}px`}></div>`)}</div>`:null}</div>`}};K("calcite-action-bar",H);export{H as ActionBar};
|
|
2
|
+
import{a as ot}from"./P7XWG3RI.js";import{a as tt}from"./5EBGPCB7.js";import{a as it,c as at}from"./LJPKY3PW.js";import{a as F}from"./WO6BWGIF.js";import{a as Q}from"./VI7SBYXT.js";import{a as _}from"./TLHV3OYD.js";import{a as S,d as p}from"./5IJ25RMA.js";import{c as et,e as v}from"./DMK27J6W.js";import{c as W}from"./BEE5ZZFY.js";import{a as Z}from"./KPMYA56P.js";import"./ZWPNZ5XW.js";import{e as J}from"./7FERW3TY.js";import{C as G,H as h,y as X,z as Y}from"./RP6GPL33.js";import{C as f,D as y,E as j,F as E,L as V,Q as K,g as q,h as A,l as N,p as z}from"./OPEE74RM.js";var ht=({bufferSize:l=0,containerSize:t,itemSizes:e})=>{let i=t-l,a=e.length,r=0;for(let[o,n]of e.entries())if(r=r+n,r>i){a=o;break}else continue;return a},pt=({bufferSize:l=0,containerSize:t,itemSizes:e})=>Math.max(e.length-ht({bufferSize:l,itemSizes:e,containerSize:t}),0),w={container:"container",hasActionGroups:"has-action-groups",lineOverlay:"line-overlay",line:"line",actionGroupEnd:"action-group--end",actionGroupStart:"action-group--start"},P={actionsEnd:"actions-end",actionsStart:"actions-start",expandTooltip:"expand-tooltip"},ut=l=>l.flatMap(t=>p(t)?t.actions:v(t)?t.actions.filter(e=>e.slot===et.trigger):t).filter(t=>!!t),gt=({item:l,containerRect:t,horizontal:e,rtl:i})=>{let a=l.getBoundingClientRect();return e?a.top-t.top:i?t.right-a.right:a.left-t.left},ft=({actionGroups:l,expanded:t,overflowCount:e})=>{let i=e;[...l].reverse().forEach(a=>{let r=0,o=a.actions.filter(n=>n.parentElement===a).reverse();o.forEach(n=>{n.slot===S.menuActions&&(n.removeAttribute("slot"),n.textEnabled=t)}),i>0&&!a.overflowActionsDisabled&&o.some(n=>(o.filter(c=>!c.slot).length>1&&o.length>2&&!n.closest("calcite-action-menu")&&!n.overflowDisabled&&(n.textEnabled=!0,n.setAttribute("slot",S.menuActions),r++,r>1&&i--),i<1)),a.manager.component.requestUpdate()})},vt=q`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([scale=s]){--calcite-internal-action-bar-gap: var(--calcite-action-bar-items-space, var(--calcite-spacing-xxs));--calcite-internal-action-bar-padding: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-bar-gap: var(--calcite-action-bar-items-space, var(--calcite-spacing-sm));--calcite-internal-action-bar-padding: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-bar-gap: var(--calcite-action-bar-items-space, var(--calcite-space-sm-plus));--calcite-internal-action-bar-padding: var(--calcite-spacing-sm-plus)}:host{display:inline-flex;align-self:stretch;background:transparent;--calcite-internal-action-group-dividing-border-margin: calc(var(--calcite-spacing-base) + 1px)}.container{display:inline-flex;flex:1 1 auto;flex-direction:column;background-color:var(--calcite-action-bar-background-color, var(--calcite-color-foreground-1));gap:var(--calcite-internal-action-bar-gap);padding:var(--calcite-internal-action-bar-padding)}@keyframes in{0%{opacity:0}to{opacity:1}}:host([floating]) .container{animation:in var(--calcite-internal-animation-timing-slow) ease-in-out;overflow:hidden;border-radius:var(--calcite-action-bar-corner-radius, var(--calcite-corner-radius-round));box-shadow:var(--calcite-action-bar-shadow, var(--calcite-shadow-md))}:host([layout=vertical]){flex-direction:column}:host([layout=vertical]):host([overflow-actions-disabled]) .container{overflow-y:auto}:host([layout=vertical]):host([expanded]) .container{max-inline-size:var(--calcite-action-bar-expanded-max-width, auto)}:host([layout=vertical]) .action-group--end{margin-block-start:auto}:host([layout=vertical]) ::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm);border-image:linear-gradient(to right,transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent var(--calcite-internal-action-group-dividing-border-margin));border-image-slice:1;padding-block-end:var(--calcite-internal-action-bar-padding)}:host([layout=horizontal]){flex-direction:row}:host([layout=horizontal]) .container{flex-direction:row}:host([layout=horizontal]):host([overflow-actions-disabled]) .container{overflow-x:auto}:host([layout=horizontal]) .action-group--end{margin-inline-start:auto}:host([layout=horizontal]) ::slotted(calcite-action-group:not(:last-of-type)){border-image:linear-gradient(transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent var(--calcite-internal-action-group-dividing-border-margin));border-image-slice:1;border-inline-end-width:var(--calcite-border-width-sm);padding-inline-end:var(--calcite-internal-action-bar-padding)}.action-group--end{justify-content:flex-end}.line-overlay{position:absolute;inset:0;pointer-events:none}.line{position:absolute;--calcite-internal-action-bar-divider-inset: calc( var(--calcite-internal-action-group-dividing-border-margin) - var(--calcite-border-width-sm) )}:host([overflow-mode=wrap][layout=horizontal]) .container,:host([overflow-mode=wrap][layout=vertical]) .container{position:relative;flex-wrap:wrap;align-content:flex-start;--calcite-internal-action-bar-line-gap: calc( var(--calcite-internal-action-bar-padding) + var(--calcite-internal-action-bar-gap) )}:host([overflow-mode=wrap][layout=horizontal]) ::slotted(calcite-action-group[slot=actions-start]),:host([overflow-mode=wrap][layout=vertical]) ::slotted(calcite-action-group[slot=actions-start]){padding-inline-end:0;padding-block-end:0;border-inline-end-width:0;border-block-end-width:0}:host([overflow-mode=wrap][layout=horizontal]) .container{row-gap:var(--calcite-internal-action-bar-line-gap)}:host([overflow-mode=wrap][layout=horizontal]) ::slotted(calcite-action-group:not([slot=actions-start])){margin-inline-start:calc(-1 * var(--calcite-border-width-sm));padding-inline:var(--calcite-internal-action-bar-padding) 0;border-inline-start-width:var(--calcite-border-width-sm);border-inline-end-width:0;border-image:linear-gradient(transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent calc(100% - var(--calcite-internal-action-group-dividing-border-margin)));border-image-slice:1}:host([overflow-mode=wrap][layout=horizontal]) .line{inset-inline:var(--calcite-internal-action-bar-padding);block-size:var(--calcite-border-width-sm);inset-block-start:calc(var(--calcite-internal-action-bar-line-offset, 0px) - var(--calcite-internal-action-bar-line-gap) / 2);background:linear-gradient(to right,transparent var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-bar-divider-inset)),transparent calc(100% - var(--calcite-internal-action-bar-divider-inset)))}:host([overflow-mode=wrap][layout=horizontal]) .container.has-action-groups{overflow:hidden;padding-inline-start:0;column-gap:calc(var(--calcite-internal-action-bar-gap) + var(--calcite-border-width-sm))}:host([overflow-mode=wrap][layout=horizontal]) .container.has-action-groups .action-group--start{padding-inline-start:var(--calcite-internal-action-bar-padding)}:host([overflow-mode=wrap][layout=vertical]) .container{block-size:100%;min-block-size:0;column-gap:var(--calcite-internal-action-bar-line-gap)}:host([overflow-mode=wrap][layout=vertical]) ::slotted(calcite-action-group:not([slot=actions-start])){margin-block-start:calc(-1 * var(--calcite-border-width-sm));padding-block:var(--calcite-internal-action-bar-padding) 0;border-block-start-width:var(--calcite-border-width-sm);border-block-end-width:0;border-image:linear-gradient(to right,transparent var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-group-dividing-border-margin),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-group-dividing-border-margin)),transparent calc(100% - var(--calcite-internal-action-group-dividing-border-margin)));border-image-slice:1}:host([overflow-mode=wrap][layout=vertical]) .line{inset-block:var(--calcite-internal-action-bar-padding);inline-size:var(--calcite-border-width-sm);inset-inline-start:calc(var(--calcite-internal-action-bar-line-offset, 0px) - var(--calcite-internal-action-bar-line-gap) / 2);background:linear-gradient(to bottom,transparent var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) var(--calcite-internal-action-bar-divider-inset),var(--calcite-action-group-border-color, var(--calcite-color-border-3)) calc(100% - var(--calcite-internal-action-bar-divider-inset)),transparent calc(100% - var(--calcite-internal-action-bar-divider-inset)))}:host([overflow-mode=wrap][layout=vertical]) .container.has-action-groups{overflow:hidden;padding-block-start:0;row-gap:calc(var(--calcite-internal-action-bar-gap) + var(--calcite-border-width-sm))}:host([overflow-mode=wrap][layout=vertical]) .container.has-action-groups .action-group--start{padding-block-start:var(--calcite-internal-action-bar-padding)}:host([overflow-mode=none][layout=horizontal]) .container{overflow-x:auto}:host([overflow-mode=none][layout=vertical]) .container{overflow-y:auto}:host([hidden]){display:none}[hidden]{display:none}`,H=class extends j{constructor(){super(),this.actions=[],this.containerRef=f(),this.defaultSlotRef=f(),this.actionsStartSlotRef=f(),this.actionsEndSlotRef=f(),this.actionsStartGroupRef=f(),this.actionsEndGroupRef=f(),this.direction=J(),this.defaultSlotItems=[],this.actionGroups=[],this.actionMenus=[],this.actionsStart=[],this.actionsStartGroups=[],this.actionsEnd=[],this.actionsEndGroups=[],this.overflowPassId=0,this.suppressedActionGroupActionsChange=new WeakMap,this.cancelable=ot()(this),this.resize=tt(({width:t,height:e})=>{let{expanded:i,expandToggleDisabled:a,layout:r,expandPosition:o}=this;if(!this.containerRef.value)return;if(this.usesWrap){this.scheduleLineMeasure();return}if(this.overflowMode!=="collapse"||r==="vertical"&&!e||r==="horizontal"&&!t)return;this.updateGroups();let n=this.getItemSizes(),{actionGroups:s,actionsEnd:c,actionsEndGroups:d,actionsStart:C,actionsStartGroups:T,defaultSlotItems:O}=this,b=[...T,...s,...d],D=this.hasActionsEnd||!a&&o==="end"?1:0,M=this.hasActionsStart||!a&&o==="start"?1:0,I=O.length+D+M,u=I,x=getComputedStyle(this.containerRef.value);if(u+=h(r==="horizontal"?x.paddingInlineStart:x.paddingBlockStart)+h(r==="horizontal"?x.paddingInlineEnd:x.paddingBlockEnd),b.length>0){let k=b.length-1;b.forEach((m,R)=>{let g=getComputedStyle(m),$=h(g.gap),B=m.actions.filter(L=>L.slot!==S.menuActions).length,ct=m.actions.some(L=>L.slot===S.menuActions),lt=B+(ct?1:0),dt=Math.max(lt-1,0);u+=$*dt,R!==k&&(u+=h(r==="horizontal"?g.paddingInlineEnd:g.paddingBlockEnd),u+=h(r==="horizontal"?g.borderInlineEndWidth:g.borderBlockEndWidth))})}let U=(k,m,R)=>{if(!m||k.length<1)return;let g=getComputedStyle(m),$=h(g.gap),B=k.length+(R?1:0);u+=$*Math.max(B-1,0)},nt=!a&&o==="start",rt=!a&&o==="end";U(C,this.actionsStartGroupRef.value,nt),U(c,this.actionsEndGroupRef.value,rt),I>1&&(u+=h(x.gap)*(I-1));let st=pt({bufferSize:u,containerSize:r==="horizontal"?t:e,itemSizes:n});this.runOverflowActions({actionGroups:b,expanded:i,overflowCount:st})},V.resize),this.resizeHandler=t=>{if(this.usesWrap){this.scheduleLineMeasure();return}let{width:e,height:i}=t.contentRect;this.resize({width:e,height:i})},this.resizeObserver=Q("resize",t=>this.resizeHandlerEntries(t)),this.toggleExpand=()=>{this.expanded=!this.expanded,this.calciteActionBarToggle.emit()},this.messages=_({blocking:!0}),this.focusSetter=Z()(this),this.setExpandToggleEl=t=>{this.expandToggleEl=t},this.hasActionsEnd=!1,this.hasActionsStart=!1,this.hasActionGroups=!1,this.lineOffsets=[],this.floating=!1,this.expandToggleDisabled=!1,this.expanded=!1,this.expandPosition="end",this.layout="vertical",this.overflowMode="collapse",this.overlayPositioning="absolute",this.scale="m",this.selectionAppearance="neutral",this.calciteActionBarCollapse=z({cancelable:!1}),this.calciteActionBarExpand=z({cancelable:!1}),this.calciteActionBarToggle=z({cancelable:!1}),this.listen("calciteActionMenuOpen",this.actionMenuOpenHandler),this.listen("calciteInternalActionGroupActionsChange",this.handleActionGroupActionsChange),this.listen("calciteInternalActionMenuActionsChange",this.handleActionMenuActionsChange),this.listen("keydown",this.handleKeyDown)}static{this.properties={expandTooltip:[16,{},{state:!0}],hasActionsEnd:[16,{},{state:!0}],hasActionsStart:[16,{},{state:!0}],hasActionGroups:[16,{},{state:!0}],lineOffsets:[16,{},{state:!0}],actionsEndGroupLabel:1,actionsStartGroupLabel:1,floating:[7,{},{reflect:!0,type:Boolean}],expandToggleDisabled:[7,{},{reflect:!0,type:Boolean}],expandDisabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],expandPosition:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],overflowMode:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overflowActionsDisabled:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],position:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}]}}static{this.styles=vt}get expandDisabled(){return this.expandToggleDisabled}set expandDisabled(t){F.deprecated("property",{component:this,name:"expandDisabled",removalVersion:6,suggested:"expandToggleDisabled"}),this.expandToggleDisabled=t}get overflowActionsDisabled(){return this.overflowMode==="none"}set overflowActionsDisabled(t){F.deprecated("property",{component:this,name:"overflowActionsDisabled",removalVersion:7,suggested:'overflowMode="none"'}),this.overflowMode=t?"none":"collapse"}async overflowActions(){if(this.overflowMode!=="collapse"){this.usesWrap&&this.scheduleLineMeasure();return}this.resize({width:this.el.clientWidth,height:this.el.clientHeight})}async setFocus(t){return this.focusSetter(()=>this.el,t)}connectedCallback(){super.connectedCallback(),this.overflowModeHandler(),this.cancelable.add(this.resize)}willUpdate(t){(t.has("expandDisabled")&&(this.hasUpdated||this.expandDisabled!==!1)||t.has("expandToggleDisabled")&&(this.hasUpdated||this.expandToggleDisabled!==!1)||t.has("expandPosition")&&(this.hasUpdated||this.expandPosition!=="end"))&&this.overflowActions(),t.has("layout")&&(this.hasUpdated||this.layout!=="vertical")&&(this.updateGroups(),this.overflowModeHandler(),this.usesWrap||this.updateLines()),t.has("overflowMode")&&(this.hasUpdated||this.overflowMode!=="collapse")&&(!this.usesWrap&&this.lineMeasureFrame!=null&&(cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=void 0),this.usesWrap?this.scheduleLineMeasure():this.updateLines(),this.overflowModeHandler()),t.has("expanded")&&this.hasUpdated&&(this.expandedHandler(),this.expanded?this.calciteActionBarExpand.emit():this.calciteActionBarCollapse.emit()),t.has("selectionAppearance")&&(this.hasUpdated||this.selectionAppearance!=="neutral")&&this.updateActions()}loaded(){this.syncDefaultSlot(),this.syncActionsStartSlot(),this.syncActionsEndSlot(),this.syncActionsState(),this.overflowActions()}updated(){this.usesWrap&&this.lineMeasureFrame==null&&this.scheduleLineMeasure()}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect(),this.lineMeasureFrame!=null&&(cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=void 0)}getItemSizes(){let{layout:t,expandToggleEl:e}=this,i=[...this.actions];e&&i.push(e);let a=t==="horizontal"?"clientWidth":"clientHeight",r=Math.max(...i.map(o=>o[a]||0));return i.map(o=>o[a]||r)}expandedHandler(){this.syncActionsState(!0),this.overflowActions()}overflowModeHandler(){this.overflowMode==="none"?this.resizeObserver?.disconnect():this.resizeObserver?.observe(this.el),this.overflowActions()}actionMenuOpenHandler(t){let e=t.composedPath(),i=e.find(a=>p(a)||v(a));i&&(p(i)&&!i.menuOpen||v(i)&&!i.open||(this.getTrackedActionGroups().forEach(a=>{e.includes(a)||(a.menuOpen=!1)}),this.getTrackedActionMenus().forEach(a=>{e.includes(a)||(a.open=!1)})))}runOverflowActions({actionGroups:t,expanded:e,overflowCount:i}){let a=++this.overflowPassId,r=new Map;t.forEach(o=>{let n=o.actions.filter(s=>s.parentElement===o);r.set(o,n.map(s=>s.slot??"").join("|"))}),ft({actionGroups:t,expanded:e,overflowCount:i}),t.forEach(o=>{let s=o.actions.filter(c=>c.parentElement===o).map(c=>c.slot??"").join("|");r.get(o)!==s&&(this.suppressedActionGroupActionsChange.set(o,a),this.queueSuppressedActionGroupActionsChangeCleanup(o,a))})}queueSuppressedActionGroupActionsChangeCleanup(t,e){queueMicrotask(()=>{this.suppressedActionGroupActionsChange.get(t)===e&&this.suppressedActionGroupActionsChange.delete(t)})}resizeHandlerEntries(t){t.forEach(this.resizeHandler)}getSectionWrapperGroups(){return[this.actionsStartGroupRef.value,this.actionsEndGroupRef.value].filter(t=>!!t)}updateGroups(){let t=[...this.actionGroups,...this.actionsStartGroups,...this.actionsEndGroups,...this.getSectionWrapperGroups()];this.hasActionGroups=this.actionGroups.length>0,t.forEach(e=>{e.layout=this.layout,e.scale=this.scale})}get usesWrap(){return this.overflowMode==="wrap"&&this.layout!=="grid"}scheduleLineMeasure(){this.lineMeasureFrame!=null&&cancelAnimationFrame(this.lineMeasureFrame),this.lineMeasureFrame=requestAnimationFrame(()=>{this.lineMeasureFrame=void 0,this.updateLines()})}getWrapItems(){let t=[],e=this.actionsStartGroupRef.value;e&&!e.hidden&&t.push(e),this.defaultSlotItems.forEach(a=>{a.hidden||t.push(a)});let i=this.actionsEndGroupRef.value;return i&&!i.hidden&&t.push(i),t}updateLines(){let t=this.containerRef.value;if(!t||!this.usesWrap){this.lineOffsets.length>0&&(this.lineOffsets=[]);return}let e=this.layout==="horizontal",i=this.direction==="rtl",a=t.getBoundingClientRect(),r=this.getWrapItems(),o=[],n=null;r.forEach(c=>{let d=gt({item:c,containerRect:a,horizontal:e,rtl:i});n!==null&&Math.abs(d-n)>1&&o.push(d),n=d}),(o.length!==this.lineOffsets.length||o.some((c,d)=>c!==this.lineOffsets[d]))&&(this.lineOffsets=o)}handleDefaultSlotChange(){this.syncSlotAndActions(()=>this.syncDefaultSlot()),this.usesWrap&&this.scheduleLineMeasure()}handleActionsEndSlotChange(){this.syncSlotAndActions(()=>this.syncActionsEndSlot())}handleActionsStartSlotChange(){this.syncSlotAndActions(()=>this.syncActionsStartSlot())}handleTooltipSlotChange(t){let e=X(t).filter(i=>i?.matches("calcite-tooltip"));this.expandTooltip=e[0]}updateActions(){let t=new Set(this.actions);this.getTrackedActionMenus().forEach(e=>{e.actions.forEach(i=>t.add(i))}),t.forEach(e=>{e.selectionAppearance=this.selectionAppearance})}syncActions(){this.actions=ut([...this.actionsStart,...this.defaultSlotItems,...this.actionsEnd])}syncActionsAndOverflow(){this.syncActionsState(),this.overflowActions()}syncSlotAndActions(t){t(),this.syncActionsAndOverflow()}syncActionsState(t=!1){this.syncActions(),this.updateActions(),t&&it({actions:this.actions,expandables:[...this.getTrackedActionGroups(),...this.getTrackedActionMenus(),...this.getSectionWrapperGroups()],expanded:this.expanded})}getTrackedActionGroups(){return[...this.actionGroups,...this.actionsStartGroups,...this.actionsEndGroups]}getTrackedActionMenus(){return[...this.actionMenus,...this.actionsStart,...this.actionsEnd].filter(t=>v(t))}getAssignedActionBarItems(t){return t?Y(t).filter(e=>W(e)||p(e)||v(e)):[]}syncDefaultSlot(){this.defaultSlotItems=this.getAssignedActionBarItems(this.defaultSlotRef.value),this.actionGroups=this.defaultSlotItems.filter(t=>p(t)),this.actionMenus=this.defaultSlotItems.filter(t=>v(t)),this.updateGroups()}syncActionsStartSlot(){this.actionsStart=this.getAssignedActionBarItems(this.actionsStartSlotRef.value),this.actionsStartGroups=this.actionsStart.filter(t=>p(t)),this.hasActionsStart=this.actionsStart.length>0,this.updateGroups()}syncActionsEndSlot(){this.actionsEnd=this.getAssignedActionBarItems(this.actionsEndSlotRef.value),this.actionsEndGroups=this.actionsEnd.filter(t=>p(t)),this.hasActionsEnd=this.actionsEnd.length>0,this.updateGroups()}handleActionGroupActionsChange(t){let e=t.target;this.getTrackedActionGroups().includes(e)&&(this.suppressedActionGroupActionsChange.has(e)||this.syncActionsAndOverflow())}handleActionMenuActionsChange(t){let e=t.target;this.getTrackedActionMenus().includes(e)&&this.syncActionsAndOverflow()}getNavigableActions(){return this.actions.filter(t=>!t.disabled&&t.slot!==S.menuActions)}handleKeyDown(t){let e=this.getNavigableActions(),i=document.activeElement;if(!(!W(i)||!e.includes(i)))switch(t.key){case"ArrowRight":case"ArrowDown":G(e,i,"next",!0),t.preventDefault();break;case"ArrowLeft":case"ArrowUp":G(e,i,"previous",!0),t.preventDefault();break;case"Home":G(e,i,"first",!0),t.preventDefault();break;case"End":G(e,i,"last",!0),t.preventDefault();break;case"Tab":this.setActionTabIndexes(i);break}}setActionTabIndexes(t){this.actions.forEach(e=>{let i=!e.disabled&&e===t?0:-1;i===0?e.removeAttribute("tabindex"):e.tabIndex=i})}renderExpandTooltipSlot(){return A`<slot name=${P.expandTooltip} @slotchange=${this.handleTooltipSlotChange}></slot>`}renderExpandToggle(){let{el:t,expanded:e,toggleExpand:i,messages:a,position:r,scale:o}=this;return at({collapseLabel:a.collapseLabel,collapseText:a.collapse,direction:this.direction,el:t,expanded:e,expandLabel:a.expandLabel,expandText:a.expand,position:r,ref:this.setExpandToggleEl,scale:o,toggle:i,tooltip:this.expandTooltip})}renderActionsGroup(t){let{expandToggleDisabled:e,scale:i,layout:a,overlayPositioning:r,expandPosition:o}=this,n=t==="start",s=!e&&o===t,c=n?this.hasActionsStart:this.hasActionsEnd,d=n?P.actionsStart:P.actionsEnd,C=n?this.handleActionsStartSlotChange:this.handleActionsEndSlotChange,T=n?this.actionsStartGroupLabel:this.actionsEndGroupLabel,O=!s&&!c,b=n?this.actionsStartGroupRef:this.actionsEndGroupRef,D=n?this.actionsStartSlotRef:this.actionsEndSlotRef,M=s?this.renderExpandToggle():null;return A`<calcite-action-group class=${E({[w.actionGroupStart]:n,[w.actionGroupEnd]:!n})} .hidden=${O} .label=${T} .layout=${a} .overlayPositioning=${r} .scale=${i} ${y(b)}>${n?M:null}<slot name=${d??N} @slotchange=${C} ${y(D)}></slot>${s?this.renderExpandTooltipSlot():null}${n?null:M}</calcite-action-group>`}render(){let t=this.layout==="horizontal"?"horizontal":"vertical";return A`<div .ariaOrientation=${t} class=${E({[w.container]:!0,[w.hasActionGroups]:this.hasActionGroups})} role=toolbar ${y(this.containerRef)}>${this.renderActionsGroup("start")}<slot @slotchange=${this.handleDefaultSlotChange} ${y(this.defaultSlotRef)}></slot>${this.renderActionsGroup("end")}${this.usesWrap?A`<div aria-hidden=true class=${E(w.lineOverlay)}>${this.lineOffsets.map(e=>A`<div class=${E(w.line)} style=${`--calcite-internal-action-bar-line-offset: ${e}px`}></div>`)}</div>`:null}</div>`}};K("calcite-action-bar",H);export{H as ActionBar};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
var J=globalThis,Y=J.ShadowRoot&&(J.ShadyCSS===void 0||J.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,gt=Symbol(),kt=new WeakMap,I=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==gt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Y&&t===void 0){let o=e!==void 0&&e.length===1;o&&(t=kt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&kt.set(e,t))}return t}toString(){return this.cssText}},jt=s=>new I(typeof s=="string"?s:s+"",void 0,gt),Te=(s,...t)=>{let e=s.length===1?s[0]:t.reduce((o,n,i)=>o+(r=>{if(r._$cssResult$===!0)return r.cssText;if(typeof r=="number")return r;throw Error("Value passed to 'css' function must be a 'css' function result: "+r+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+s[i+1],s[0]);return new I(e,s,gt)},Ht=(s,t)=>{if(Y)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let o=document.createElement("style"),n=J.litNonce;n!==void 0&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o)}},vt=Y?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(let o of t.cssRules)e+=o.cssText;return jt(e)})(s):s;var{is:Pe,defineProperty:Ne,getOwnPropertyDescriptor:De,getOwnPropertyNames:xe,getOwnPropertySymbols:Le,getPrototypeOf:Ue}=Object,X=globalThis,zt=X.trustedTypes,Re=zt?zt.emptyScript:"",Me=X.reactiveElementPolyfillSupport,k=(s,t)=>s,Z={toAttribute(s,t){switch(t){case Boolean:s=s?Re:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},j=(s,t)=>!Pe(s,t),Vt={attribute:!0,type:String,converter:Z,reflect:!1,useDefault:!1,hasChanged:j};Symbol.metadata??=Symbol("metadata"),X.litPropertyMetadata??=new WeakMap;var _=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Vt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let o=Symbol(),n=this.getPropertyDescriptor(t,o,e);n!==void 0&&Ne(this.prototype,t,n)}}static getPropertyDescriptor(t,e,o){let{get:n,set:i}=De(this.prototype,t)??{get(){return this[e]},set(r){this[e]=r}};return{get:n,set(r){let a=n?.call(this);i?.call(this,r),this.requestUpdate(t,a,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Vt}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;let t=Ue(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){let e=this.properties,o=[...xe(e),...Le(e)];for(let n of o)this.createProperty(n,e[n])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[o,n]of e)this.elementProperties.set(o,n)}this._$Eh=new Map;for(let[e,o]of this.elementProperties){let n=this._$Eu(e,o);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let n of o)e.unshift(vt(n))}else t!==void 0&&e.push(vt(t));return e}static _$Eu(t,e){let o=e.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ht(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){let o=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,o);if(n!==void 0&&o.reflect===!0){let i=(o.converter?.toAttribute!==void 0?o.converter:Z).toAttribute(e,o.type);this._$Em=t,i==null?this.removeAttribute(n):this.setAttribute(n,i),this._$Em=null}}_$AK(t,e){let o=this.constructor,n=o._$Eh.get(t);if(n!==void 0&&this._$Em!==n){let i=o.getPropertyOptions(n),r=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:Z;this._$Em=n;let a=r.fromAttribute(e,i.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(t,e,o,n=!1,i){if(t!==void 0){let r=this.constructor;if(n===!1&&(i=this[t]),o??=r.getPropertyOptions(t),!((o.hasChanged??j)(i,e)||o.useDefault&&o.reflect&&i===this._$Ej?.get(t)&&!this.hasAttribute(r._$Eu(t,o))))return;this.C(t,e,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:n,wrapped:i},r){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??e??this[t]),i!==!0||r!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),n===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,i]of this._$Ep)this[n]=i;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[n,i]of o){let{wrapped:r}=i,a=this[n];r!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,i,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(e)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};_.elementStyles=[],_.shadowRootOptions={mode:"open"},_[k("elementProperties")]=new Map,_[k("finalized")]=new Map,Me?.({ReactiveElement:_}),(X.reactiveElementVersions??=[]).push("2.1.2");var $t=globalThis,Bt=s=>s,tt=$t.trustedTypes,Wt=tt?tt.createPolicy("lit-html",{createHTML:s=>s}):void 0,bt="$lit$",A=`lit$${Math.random().toFixed(9).slice(2)}$`,_t="?"+A,Ie=`<${_t}>`,S=document,z=()=>S.createComment(""),V=s=>s===null||typeof s!="object"&&typeof s!="function",At=Array.isArray,Jt=s=>At(s)||typeof s?.[Symbol.iterator]=="function",Et=`[
|
|
3
3
|
\f\r]`,H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ft=/-->/g,qt=/>/g,w=RegExp(`>|${Et}(?:([^\\s"'>=/]+)(${Et}*=${Et}*(?:[^
|
|
4
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Gt=/'/g,Kt=/"/g,Yt=/^(?:script|style|textarea|title)$/i,Ct=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),As=Ct(1),Cs=Ct(2),ws=Ct(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Qt=new WeakMap,O=S.createTreeWalker(S,129);function Zt(s,t){if(!At(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Wt!==void 0?Wt.createHTML(t):t}var Xt=(s,t)=>{let e=s.length-1,o=[],n,i=t===2?"<svg>":t===3?"<math>":"",r=H;for(let a=0;a<e;a++){let c=s[a],l,u,h=-1,m=0;for(;m<c.length&&(r.lastIndex=m,u=r.exec(c),u!==null);)m=r.lastIndex,r===H?u[1]==="!--"?r=Ft:u[1]!==void 0?r=qt:u[2]!==void 0?(Yt.test(u[2])&&(n=RegExp("</"+u[2],"g")),r=w):u[3]!==void 0&&(r=w):r===w?u[0]===">"?(r=n??H,h=-1):u[1]===void 0?h=-2:(h=r.lastIndex-u[2].length,l=u[1],r=u[3]===void 0?w:u[3]==='"'?Kt:Gt):r===Kt||r===Gt?r=w:r===Ft||r===qt?r=H:(r=w,n=void 0);let v=r===w&&s[a+1].startsWith("/>")?" ":"";i+=r===H?c+Ie:h>=0?(o.push(l),c.slice(0,h)+bt+c.slice(h)+A+v):c+A+(h===-2?a:v)}return[Zt(s,i+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},B=class s{constructor({strings:t,_$litType$:e},o){let n;this.parts=[];let i=0,r=0,a=t.length-1,c=this.parts,[l,u]=Xt(t,e);if(this.el=s.createElement(l,o),O.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=O.nextNode())!==null&&c.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let h of n.getAttributeNames())if(h.endsWith(bt)){let m=u[r++],v=n.getAttribute(h).split(A),C=/([.?@])?(.*)/.exec(m);c.push({type:1,index:i,name:C[2],strings:v,ctor:C[1]==="."?st:C[1]==="?"?ot:C[1]==="@"?nt:P}),n.removeAttribute(h)}else h.startsWith(A)&&(c.push({type:6,index:i}),n.removeAttribute(h));if(Yt.test(n.tagName)){let h=n.textContent.split(A),m=h.length-1;if(m>0){n.textContent=tt?tt.emptyScript:"";for(let v=0;v<m;v++)n.append(h[v],z()),O.nextNode(),c.push({type:2,index:++i});n.append(h[m],z())}}}else if(n.nodeType===8)if(n.data===_t)c.push({type:2,index:i});else{let h=-1;for(;(h=n.data.indexOf(A,h+1))!==-1;)c.push({type:7,index:i}),h+=A.length-1}i++}}static createElement(t,e){let o=S.createElement("template");return o.innerHTML=t,o}};function T(s,t,e=s,o){if(t===f)return t;let n=o!==void 0?e._$Co?.[o]:e._$Cl,i=V(t)?void 0:t._$litDirective$;return n?.constructor!==i&&(n?._$AO?.(!1),i===void 0?n=void 0:(n=new i(s),n._$AT(s,e,o)),o!==void 0?(e._$Co??=[])[o]=n:e._$Cl=n),n!==void 0&&(t=T(s,n._$AS(s,t.values),n,o)),t}var et=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:o}=this._$AD,n=(t?.creationScope??S).importNode(e,!0);O.currentNode=n;let i=O.nextNode(),r=0,a=0,c=o[0];for(;c!==void 0;){if(r===c.index){let l;c.type===2?l=new L(i,i.nextSibling,this,t):c.type===1?l=new c.ctor(i,c.name,c.strings,this,t):c.type===6&&(l=new it(i,this,t)),this._$AV.push(l),c=o[++a]}r!==c?.index&&(i=O.nextNode(),r++)}return O.currentNode=S,n}p(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},L=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,n){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=T(this,t,e),V(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Jt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&V(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:o}=t,n=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=B.createElement(Zt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===n)this._$AH.p(e);else{let i=new et(n,this),r=i.u(this.options);i.p(e),this.T(r),this._$AH=i}}_$AC(t){let e=Qt.get(t.strings);return e===void 0&&Qt.set(t.strings,e=new B(t)),e}k(t){At(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,n=0;for(let i of t)n===e.length?e.push(o=new s(this.O(z()),this.O(z()),this,this.options)):o=e[n],o._$AI(i),n++;n<e.length&&(this._$AR(o&&o._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let o=Bt(t).nextSibling;Bt(t).remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,n,i){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=i,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=d}_$AI(t,e=this,o,n){let i=this.strings,r=!1;if(i===void 0)t=T(this,t,e,0),r=!V(t)||t!==this._$AH&&t!==f,r&&(this._$AH=t);else{let a=t,c,l;for(t=i[0],c=0;c<i.length-1;c++)l=T(this,a[o+c],e,c),l===f&&(l=this._$AH[c]),r||=!V(l)||l!==this._$AH[c],l===d?t=d:t!==d&&(t+=(l??"")+i[c+1]),this._$AH[c]=l}r&&!n&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},st=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},ot=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},nt=class extends P{constructor(t,e,o,n,i){super(t,e,o,n,i),this.type=5}_$AI(t,e=this){if((t=T(this,t,e,0)??d)===f)return;let o=this._$AH,n=t===d&&o!==d||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,i=t!==d&&(o===d||n);n&&this.element.removeEventListener(this.name,this,o),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},it=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){T(this,t)}},te={M:bt,P:A,A:_t,C:1,L:Xt,R:et,D:Jt,V:T,I:L,H:P,N:ot,U:nt,B:st,F:it},ke=$t.litHtmlPolyfillSupport;ke?.(B,L),($t.litHtmlVersions??=[]).push("3.3.2");var wt=(s,t,e)=>{let o=e?.renderBefore??t,n=o._$litPart$;if(n===void 0){let i=e?.renderBefore??null;o._$litPart$=n=new L(t.insertBefore(z(),i),i,void 0,e??{})}return n._$AI(s),n};var Ot=globalThis,E=class extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=wt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};E._$litElement$=!0,E.finalized=!0,Ot.litElementHydrateSupport?.({LitElement:E});var je=Ot.litElementPolyfillSupport;je?.({LitElement:E});(Ot.litElementVersions??=[]).push("4.2.2");var p=(s,t,...e)=>{try{return s?.call(t,...e)}catch(o){console.error(o,s)}},W=async(s,t,...e)=>{try{return await s?.call(t,...e)}catch(o){console.error(o,s)}};var q=Symbol.for("controller"),He=s=>typeof s=="object"&&s!==null&&(q in s||"hostConnected"in s||"hostDisconnected"in s||"hostUpdate"in s||"hostUpdated"in s),js=s=>typeof s?.then=="function";var F,D=s=>{F!==s&&(F=s,queueMicrotask(()=>F===s?F=void 0:0))},G=s=>F,N=[],ee=s=>{if(s===void 0){N=[];return}let t=N.indexOf(s);N=t===-1?[...N,s]:N.slice(0,t+1),queueMicrotask(()=>N=[])},se=()=>N,U,Hs=s=>{U!==s&&(U=s,queueMicrotask(()=>U===s?U=void 0:0))},ze=()=>{let s=U;return U=void 0,s},oe=async(s,t)=>{let e=at(s);if(e===void 0)return s;if(await e.ready,typeof t=="function"){let o=e.watchExports(n=>t(n,o))}return e.exports},ne=async s=>{let t=at(s);return await t.ready,t},at=s=>{let e=G().manager.X(s);if(e!==void 0)return e;if(He(s))return s;let o=ze();if(o!==void 0)return o},rt=!1,zs=s=>{rt=!0;try{return s()}finally{rt=!1}};var b=class{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}};var ie=(s,t)=>{let e=t>Ve?Be:t/We,o=0,n=setInterval(()=>{o+=e,o>=t&&(clearInterval(n),s())},e);return n},Ve=4e3,Be=2e3,We=4;var re=new Set,ae;var ce=s=>typeof s=="string"?s:"el"in s?s.el.localName:"localName"in s?s.localName:s.declaredClass,Ws=(s,t,e,o)=>{let n=ce(t);if(o?.once){let r=`${s}${n}${e}`;if(re.has(r))return;re.add(r)}let i;if(o?.detail){i={};for(let[r,a]of Object.entries(o.detail))if((typeof a=="object"||typeof a=="function")&&a!==null){let c=new WeakRef(a);Object.defineProperty(i,r,{enumerable:!0,get(){return c.deref()}})}else i[r]=a;ae?.log.interceptors?.forEach(r=>r(s,n,e,i)),console[s](`[${n}]: ${e}`,i)}else ae?.log.interceptors?.forEach(r=>r(s,n,e)),console[s](`[${n}]: ${e}`)},le=s=>{let t=`[${ce(s)}] `;return e=>{let o=e instanceof Error&&e.message?e:new Error(String(e));o.message=`${t}${o.message}`,setTimeout(()=>{throw e})}};var Fe=(s,t,e)=>{let o=Object.keys(s),n=o.length;R===void 0&&queueMicrotask(M),R??=new Map;let i=R.get(s);return i===void 0&&(i={callbacks:[],keyCount:n},R.set(s,i)),i.keyCount!==n&&(i.callbacks.forEach(r=>r(o)),i.callbacks=[],i.keyCount=n),i.callbacks.push(r=>{let a=l=>p(t,null,l),c=r[n];c===void 0?a(void 0):s[c]===e?a(c):a(void 0)}),e},R,M=()=>{R?.forEach(({callbacks:s},t)=>{let e=Object.keys(t);s.forEach(o=>o(e))}),R=void 0},qe=(s,t,e)=>{let o=s.manager;return o.V!==d&&o.V!==e&&o.S(void 0,void 0),o.T.length===0&&queueMicrotask(()=>o.S(void 0,void 0)),o.V=e,o.T.push((n,i)=>p(t,void 0,e===i?n:void 0)),e},Ge=(s=[G(),...se()],t,e)=>{let o=Array.isArray(s)?s:[s],n=o.length+1,i=r=>{n-=1,r!==void 0&&(n=Math.min(n,0)),n===0&&t(r)};o.forEach(r=>Fe(r,a=>i(a===void 0?void 0:{key:a,host:r,isReactive:!1}),e));for(let r of o)if("manager"in r&&r.manager.component===r){qe(r,a=>i(a===void 0?void 0:{key:a,host:r,isReactive:!0}),e);break}return e},Ke=(s="",t={},e=G())=>{let o={emit:n=>{s===""&&M();let i=new CustomEvent(s,{detail:n,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(i),i}};return s===""&&Ge(void 0,n=>s=n.key,o),o},Qe=Ke.bind(null,""),pe;pe=q;var St=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#n=[],this.#i=[],this.#c=[],this.#l=[],this.#d=[],this.#r=[],this.#p=!1,this.P=new b,this.connectedCalled=!1,this.loadedCalled=!1,this[pe]=!0,this.#h=[];let e=this,o=t??G(new.target.name);e.#o=o,e.ready=e.P.promise,e.#a=de(e),e.component=o,e.#o.addController(e),e.#o.manager===void 0||(ee(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#n;#i;#c;#l;#d;#r;#p;#o;catchUpLifecycle(){let{manager:t}=this.#o;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#p&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(le(this.#o))}#a;get exports(){return this.#a}set exports(t){let e=this.#a;e!==t&&(this.#a=t,this.#h.forEach(p),this.connectedCalled&&this.O!==!1&&this.#o.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#a=e?de(t):t,this.#h.forEach(p)}#h;watchExports(t){let e=()=>t(this.#a);return this.#h.push(e),()=>{this.#h.splice(this.#h.indexOf(e),1)}}get use(){return D(this.#o),oe}get useRef(){return D(this.#o),ne}get useRefSync(){return D(this.#o),at}controllerRemoved(){this.#o.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#n.push(t)}onUpdate(t){this.#i.push(t)}onUpdated(t){this.#c.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#d.push(t),this.connectedCalled&&this.#o.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#r.forEach(p),t.#r=[]}async triggerLoad(){if(this.#p)return;this.#p=!0;let t=this;t.hostLoad&&await W(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(W)),this.P.resolve(this.#a)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#n.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#i.forEach(he,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#c.forEach(he,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#l.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#d.forEach(this.#u,this)}#u(t){D(this.#o);let e=p(t);(Array.isArray(e)?e:[e]).forEach(n=>{typeof n=="function"?this.#r.push(n):typeof n=="object"&&typeof n.remove=="function"&&this.#r.push(n.remove)})}};function he(s){p(s,void 0,this)}var de=s=>{if(typeof s!="object"&&typeof s!="function"||s===null)return s;let t={get(o,n,i){if(!((n==="exports"||n==="_exports")&&n in o&&o[n]===e)&&(n in o||n in Promise.prototype||typeof n=="symbol"))return typeof o=="function"?o[n]:Reflect.get(o,n,i)}},e=new Proxy(s,t);return e};var ue=St;var y={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},$=s=>(...t)=>({_$litDirective$:s,values:t}),g=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var{I:Je}=te,fe=s=>s;var ct=s=>s.strings===void 0,me=()=>document.createComment(""),eo=(s,t,e)=>{let o=s._$AA.parentNode,n=t===void 0?s._$AB:t._$AA;if(e===void 0){let i=o.insertBefore(me(),n),r=o.insertBefore(me(),n);e=new Je(i,r,s,s.options)}else{let i=e._$AB.nextSibling,r=e._$AM,a=r!==s;if(a){let c;e._$AQ?.(s),e._$AM=s,e._$AP!==void 0&&(c=s._$AU)!==r._$AU&&e._$AP(c)}if(i!==n||a){let c=e._$AA;for(;c!==i;){let l=fe(c).nextSibling;fe(o).insertBefore(c,n),c=l}}}return e},so=(s,t,e=s)=>(s._$AI(t,e),s),Ye={},ye=(s,t=Ye)=>s._$AH=t,oo=s=>s._$AH,no=s=>{s._$AR(),s._$AA.remove()};var Ze=$(class extends g{constructor(s){if(super(s),s.type!==y.PROPERTY&&s.type!==y.ATTRIBUTE&&s.type!==y.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ct(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[t]){if(t===f||t===d)return t;let e=s.element,o=s.name;if(s.type===y.PROPERTY){if(t===e[o])return f}else if(s.type===y.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(o))return f}else if(s.type===y.ATTRIBUTE&&e.getAttribute(o)===t+"")return f;return ye(s),t}});var K=(s,t)=>{let e=s._$AN;if(e===void 0)return!1;for(let o of e)o._$AO?.(t,!1),K(o,t);return!0},lt=s=>{let t,e;do{if((t=s._$AM)===void 0)break;e=t._$AN,e.delete(s),s=t}while(e?.size===0)},ge=s=>{for(let t;t=s._$AM;s=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(s))break;e.add(s),es(t)}};function Xe(s){this._$AN!==void 0?(lt(this),this._$AM=s,ge(this)):this._$AM=s}function ts(s,t=!1,e=0){let o=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(t)if(Array.isArray(o))for(let i=e;i<o.length;i++)K(o[i],!1),lt(o[i]);else o!=null&&(K(o,!1),lt(o));else K(this,s)}var es=s=>{s.type==y.CHILD&&(s._$AP??=ts,s._$AQ??=Xe)},ht=class extends g{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,o){super._$AT(t,e,o),ge(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(K(this,t),lt(this))}setValue(t){if(ct(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var bo=()=>new Pt,Pt=class{},Tt=new WeakMap,Nt=$(class extends ht{render(s){return d}update(s,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=s.options?.host,this.rt(this.ct=s.element)),d}rt(s){if(this.isConnected||(s=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=Tt.get(t);e===void 0&&(e=new WeakMap,Tt.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){return typeof this.G=="function"?Tt.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var dt=s=>s.replace(os,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),os=/[A-Z]+(?![a-z])|[A-Z]/gu;var Uo="randomUUID"in crypto;var xt=s=>{let t=s;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(s),(e.I??e._postLoad).promise}return!1},Lt={};function Ut(){}function Rt(s){for(let t of["Associated","Disabled","Reset","StateRestore"]){let e=`orm${t}Callback`;s.prototype["f"+e]=async function(...o){await this.componentOnReady(),(this.el??this).dispatchEvent(new CustomEvent(`luminaF${e}`,{detail:o}))}}}var ns=(s,t)=>function(o,n){if(!globalThis.customElements)return;let r=(n??o??{}).resourcesUrl;r&&s.setAssetPath(r);for(let[a,[c,l="",u=0]]of Object.entries(t)){if(customElements.get(a))continue;let[h,m,v]=l.split(";"),C=h?h?.split(",").map(is):void 0,yt=C?.map(([x])=>x),Q=class extends Dt{static{this.formAssociated=u===1}static{this.observedAttributes=C?.map(([,x])=>x).filter(x=>x!=="")}static{this.C=yt}static{this.E=m?m?.split(","):void 0}static{this.D=v?.split(",")}static{this.L=a}static{this.K=s}constructor(){!Q.B&&(Q.B=c(),Q.F()),super()}};customElements.define(a,Q)}},pt=Object.defineProperty,is=s=>{let t=s.split(":");return t.length===1?[t[0],dt(t[0])]:t},rs=globalThis.HTMLElement??Ut,Dt=class extends rs{constructor(){super(),this.#e={},this.#s=[],this.I=new b,this.H=new b,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(o=>{Object.hasOwn(t,o)&&(t.#e[o]=t[o],delete t[o])}),e.A?t.#n({a:e.A}):e.B.then(async o=>{await e.K.p,t.#n(await(o.default?.then(n=>typeof n=="function"?{a:n}:n)??o))}).catch(o=>{t.H.reject(o),setTimeout(()=>{throw o})})}static{this.lumina=!0}static F(){for(let t of this.C??[])pt(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])pt(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])pt(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}static{Rt(this)}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,o){this.#t?.attributeChangedCallback(t,e,o),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=xt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#n(t){let e=this.constructor,o=e.L,n=this.#e,i=Object.values(t).find(h=>h.L===o),r=`${o}--lazy`,a=i;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);cs(a),!e.A&&(e.A=i,customElements.define(r,i)),i.N=this;let l=document.createElement(r);i.N=void 0,this.#t=l,this.#e=l,this.#s.forEach(h=>l.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(n).forEach(as,l);let u=this.isConnected;(u||this.G)&&(l.connectedCallback?.(),u||l.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function as([s,t]){this[s]=t}var cs=s=>{let t=s.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(n,i){e.setAttribute.call(this.el,n,i)},t.removeAttribute=function(n){e.removeAttribute.call(this.el,n)},t.hasAttribute=function(n){return e.hasAttribute.call(this.el,n)},pt(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var ut=class extends ue{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=ft in t&&typeof t.destroy=="function",E.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${ft} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),M();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),D(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>{this.#e.destroy()};this.#t=ie(t,ls)}}S(t,e){let o=this.T;this.V=d,this.T=[],o.forEach(n=>n(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},ls=1e3,ft="autoDestroyDisabled";var Ee=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="class"||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(let o in t)t[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(t)}let e=s.element.classList;for(let o of this.st)o in t||(e.remove(o),this.st.delete(o));for(let o in t){let n=!!t[o];n===this.st.has(o)||this.nt?.has(o)||(n?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return f}});var $e="important",hs=" !"+$e,be=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="style"||s.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce((t,e)=>{let o=s[e];return o==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(s,[t]){let{style:e}=s.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let o of this.ft)t[o]==null&&(this.ft.delete(o),o.includes("-")?e.removeProperty(o):e[o]=null);for(let o in t){let n=t[o];if(n!=null){this.ft.add(o);let i=typeof n=="string"&&n.endsWith(hs);o.includes("-")||i?e.setProperty(o,i?n.slice(0,-11):n,i?$e:""):e[o]=n}}return f}});var _e=class s extends E{constructor(){super(),this.M=[],this.manager=new ut(this);let t=this,e=t.constructor,o=e.N,n=e.K.o,i=s.prototype.shouldUpdate;t.#n=o?.H??new b,t.I=o?.I??new b,t.J=o?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=o??t,t.#s=t.enableUpdating,t.enableUpdating=Ut,t.shouldUpdate!==i&&(t.#e=t.shouldUpdate,t.shouldUpdate=i),n&&(t.#t=new Map,e.elementProperties.forEach((r,a)=>t.#t.set(a,n()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),o=this.shadowRootOptions===Lt;return this.K?.commonStyles===void 0||o?e:[this.K.commonStyles,...e]}static createProperty(t,e){let o=typeof e=="number"?e:Array.isArray(e)?e[0]:0,n=Array.isArray(e)?e[1]:void 0,i=n?.hasChanged??j,r={attribute:o&1&&typeof t=="string"?dt(t):!1,reflect:!!(o&2),type:o&4?Boolean:o&8?Number:void 0,state:!!(o&16),readOnly:!!(o&32),noAccessor:!!(o&64),useDefault:!!(o&128),c:!1,...n,hasChanged(a,c){let l=i(a,c);return r.c=l,l}};super.createProperty(t,r)}static getPropertyDescriptor(t,e,o){let n=this.K,i=super.getPropertyDescriptor(t,e,o);return o.d=i,{...i,get(){return n.t?.(this.#t.get(t)),i.get?.call(this)},set(r){let a=this.manager;if(o.readOnly&&!rt&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${r}"`);i.set.call(this,r??void 0),o.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(M(),a?.S(t,r))}}}static{this.lumina=!0}static{Rt(this)}#t;#e;#s;#n;#i;#c;get elementInternals(){return this.#c??=this.el.attachInternals(),this.#c}connectedCallback(){this.hasAttribute("defer-hydration")||this.#l(!0)}#l(t){let e=this.constructor.K.c?.(()=>this.requestUpdate());this.#i=e;let o=!this.manager.connectedCalled;t&&super.connectedCallback(),o?queueMicrotask(()=>this.#r().catch(n=>{this.#n.reject(n),setTimeout(()=>{throw n})})):e&&this.requestUpdate()}#d(t){try{this.#i.clear(),this.constructor.K.r(this.#i,()=>super.update(t))}catch(e){throw this.#i.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#i?.destroy(),this.#i=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,o=e.shadowRootOptions,i=t??(o===Lt?this.el:this.el.attachShadow(o));if(t)return this.manager.connectedCalled||this.#l(!1),E.prototype.createRenderRoot.call(this),t;if(this.isConnected){let r=i.getRootNode();r.adoptedStyleSheets=[...r.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return i}async#r(){let t=this.el.G??xt(this.el);t&&await t;let e=[];for(let n of this.M)"triggerLoad"in n?e.push(n.triggerLoad()):e.push(W(n.hostLoad,n));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(n=>n.has(ft)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await 0;let o=this.J.filter(n=>!n.manager?.loadedCalled);o.length&&await Promise.allSettled(o.map(async n=>await n.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let n of this.M)"triggerLoaded"in n?n.triggerLoaded():p(n.hostLoaded,n);this.loaded?.(),this.#n.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#i?this.#d(t):super.update(t)}listen(t,e,o){let n=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,n,o),()=>this.el.removeEventListener(t,n,o)))}listenOn(t,e,o,n){let i=o?.bind(this)??o;this.manager.onLifecycle(()=>(t.addEventListener(e,i,n),()=>t.removeEventListener(e,i,n)))}async componentOnReady(){return await this.#n.promise,this}addController(t){this.M.push(t),!(q in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var Ae=s=>{let t,e=n=>{t=new URL(n,globalThis.location?.href||void 0).href},o={...s,getAssetPath(n){let i=new URL(n,t);return i.origin!==globalThis.location?.origin?i.href:i.pathname},setAssetPath:e,customElement(n,i){i.K=o,i.L=n,customElements.get(n)||customElements.define(n,i)}};return e(s.defaultAssetPath),o};var kn=s=>typeof s=="object"&&s!=null?Ee(s):s,jn=s=>typeof s=="object"&&s!=null?be(s):s;var Mt=class extends g{#t;#e;constructor(t){super(t);let e=this;this.#e=function(n){return e.#t.call(this,n)}}render(t){return typeof t=="function"?(this.#t=t,Nt(this.#e)):Nt(t)}},Hn=$(Mt);var zn=d;function Vn(s,t,e){e==null?s.removeAttribute(t):s.setAttribute(t,e)}var Bn={toAttribute:s=>s===!0?"":s===!1?null:s};var Oe="calcite-mode-auto",Se="calcite-mode-dark",ds="calcite-mode-light",Gn={autoMode:Oe,darkMode:Se,lightMode:ds,rtl:"calcite--rtl",calciteAnimate:"calcite-animate",calciteAnimateInUp:"calcite-animate__in-up",calciteAnimateInDown:"calcite-animate__in-down",calciteAnimateInRight:"calcite-animate__in-right",calciteAnimateInLeft:"calcite-animate__in-left",screenReaderText:"screen-reader-text"},Kn={filter:250,nextTick:0,resize:150,reposition:100},Qn=10,Jn=25;function Ce(){let{classList:s}=document.body,t=window.matchMedia("(prefers-color-scheme: dark)").matches,e=()=>s.contains(Se)||s.contains(Oe)&&t?"dark":"light",o=r=>document.body.dispatchEvent(new CustomEvent("calciteModeChange",{bubbles:!0,detail:{mode:r}})),n=r=>{i!==r&&o(r),i=r},i=e();o(i),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",r=>n(r.matches?"dark":"light")),new MutationObserver(()=>n(e())).observe(document.body,{attributes:!0,attributeFilter:["class"]})}var It,ps={focusTrapStack:[],logLevel:"info"};function us(){return{...ps,...globalThis.calciteConfig??{}}}function fs(){return It||(It=us()),It}var we="5.2.0-next.41",ms="2026-08-03",ys="dbd67ce4e";function gs(){let s=fs();s&&s.version||(console.info(`Using Calcite Components ${we} [Date: ${ms}, Revision: ${ys}]`),Object.defineProperty(s,"version",{value:we,writable:!1}),globalThis.calciteConfig=s)}document.readyState==="interactive"?Ce():document.addEventListener("DOMContentLoaded",Ce,{once:!0});queueMicrotask(gs);var vs=Ae({defaultAssetPath:"https://cdn.jsdelivr.net/npm/@esri/calcite-components@5.2.0-next.41/dist/cdn/",hydratedAttribute:"calcite-hydrated"}),{customElement:Yn,getAssetPath:Zn,setAssetPath:Xn}=vs;export{js as a,D as b,ee as c,se as d,Hs as e,zs as f,Te as g,As as h,Cs as i,ws as j,f as k,d as l,wt as m,Ws as n,Ge as o,Qe as p,St as q,ue as r,ns as s,y as t,$ as u,g as v,eo as w,so as x,ye as y,oo as z,no as A,Ze as B,bo as C,Nt as D,_e as E,kn as F,jn as G,zn as H,Vn as I,Bn as J,Gn as K,Kn as L,Qn as M,Jn as N,fs as O,vs as P,Yn as Q,Zn as R};
|
|
4
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Gt=/'/g,Kt=/"/g,Yt=/^(?:script|style|textarea|title)$/i,Ct=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),As=Ct(1),Cs=Ct(2),ws=Ct(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Qt=new WeakMap,O=S.createTreeWalker(S,129);function Zt(s,t){if(!At(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Wt!==void 0?Wt.createHTML(t):t}var Xt=(s,t)=>{let e=s.length-1,o=[],n,i=t===2?"<svg>":t===3?"<math>":"",r=H;for(let a=0;a<e;a++){let c=s[a],l,u,h=-1,m=0;for(;m<c.length&&(r.lastIndex=m,u=r.exec(c),u!==null);)m=r.lastIndex,r===H?u[1]==="!--"?r=Ft:u[1]!==void 0?r=qt:u[2]!==void 0?(Yt.test(u[2])&&(n=RegExp("</"+u[2],"g")),r=w):u[3]!==void 0&&(r=w):r===w?u[0]===">"?(r=n??H,h=-1):u[1]===void 0?h=-2:(h=r.lastIndex-u[2].length,l=u[1],r=u[3]===void 0?w:u[3]==='"'?Kt:Gt):r===Kt||r===Gt?r=w:r===Ft||r===qt?r=H:(r=w,n=void 0);let v=r===w&&s[a+1].startsWith("/>")?" ":"";i+=r===H?c+Ie:h>=0?(o.push(l),c.slice(0,h)+bt+c.slice(h)+A+v):c+A+(h===-2?a:v)}return[Zt(s,i+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},B=class s{constructor({strings:t,_$litType$:e},o){let n;this.parts=[];let i=0,r=0,a=t.length-1,c=this.parts,[l,u]=Xt(t,e);if(this.el=s.createElement(l,o),O.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=O.nextNode())!==null&&c.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let h of n.getAttributeNames())if(h.endsWith(bt)){let m=u[r++],v=n.getAttribute(h).split(A),C=/([.?@])?(.*)/.exec(m);c.push({type:1,index:i,name:C[2],strings:v,ctor:C[1]==="."?st:C[1]==="?"?ot:C[1]==="@"?nt:P}),n.removeAttribute(h)}else h.startsWith(A)&&(c.push({type:6,index:i}),n.removeAttribute(h));if(Yt.test(n.tagName)){let h=n.textContent.split(A),m=h.length-1;if(m>0){n.textContent=tt?tt.emptyScript:"";for(let v=0;v<m;v++)n.append(h[v],z()),O.nextNode(),c.push({type:2,index:++i});n.append(h[m],z())}}}else if(n.nodeType===8)if(n.data===_t)c.push({type:2,index:i});else{let h=-1;for(;(h=n.data.indexOf(A,h+1))!==-1;)c.push({type:7,index:i}),h+=A.length-1}i++}}static createElement(t,e){let o=S.createElement("template");return o.innerHTML=t,o}};function T(s,t,e=s,o){if(t===f)return t;let n=o!==void 0?e._$Co?.[o]:e._$Cl,i=V(t)?void 0:t._$litDirective$;return n?.constructor!==i&&(n?._$AO?.(!1),i===void 0?n=void 0:(n=new i(s),n._$AT(s,e,o)),o!==void 0?(e._$Co??=[])[o]=n:e._$Cl=n),n!==void 0&&(t=T(s,n._$AS(s,t.values),n,o)),t}var et=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:o}=this._$AD,n=(t?.creationScope??S).importNode(e,!0);O.currentNode=n;let i=O.nextNode(),r=0,a=0,c=o[0];for(;c!==void 0;){if(r===c.index){let l;c.type===2?l=new L(i,i.nextSibling,this,t):c.type===1?l=new c.ctor(i,c.name,c.strings,this,t):c.type===6&&(l=new it(i,this,t)),this._$AV.push(l),c=o[++a]}r!==c?.index&&(i=O.nextNode(),r++)}return O.currentNode=S,n}p(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},L=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,n){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=T(this,t,e),V(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Jt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&V(this._$AH)?this._$AA.nextSibling.data=t:this.T(S.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:o}=t,n=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=B.createElement(Zt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===n)this._$AH.p(e);else{let i=new et(n,this),r=i.u(this.options);i.p(e),this.T(r),this._$AH=i}}_$AC(t){let e=Qt.get(t.strings);return e===void 0&&Qt.set(t.strings,e=new B(t)),e}k(t){At(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,n=0;for(let i of t)n===e.length?e.push(o=new s(this.O(z()),this.O(z()),this,this.options)):o=e[n],o._$AI(i),n++;n<e.length&&(this._$AR(o&&o._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let o=Bt(t).nextSibling;Bt(t).remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,n,i){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=i,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=d}_$AI(t,e=this,o,n){let i=this.strings,r=!1;if(i===void 0)t=T(this,t,e,0),r=!V(t)||t!==this._$AH&&t!==f,r&&(this._$AH=t);else{let a=t,c,l;for(t=i[0],c=0;c<i.length-1;c++)l=T(this,a[o+c],e,c),l===f&&(l=this._$AH[c]),r||=!V(l)||l!==this._$AH[c],l===d?t=d:t!==d&&(t+=(l??"")+i[c+1]),this._$AH[c]=l}r&&!n&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},st=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},ot=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},nt=class extends P{constructor(t,e,o,n,i){super(t,e,o,n,i),this.type=5}_$AI(t,e=this){if((t=T(this,t,e,0)??d)===f)return;let o=this._$AH,n=t===d&&o!==d||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,i=t!==d&&(o===d||n);n&&this.element.removeEventListener(this.name,this,o),i&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},it=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){T(this,t)}},te={M:bt,P:A,A:_t,C:1,L:Xt,R:et,D:Jt,V:T,I:L,H:P,N:ot,U:nt,B:st,F:it},ke=$t.litHtmlPolyfillSupport;ke?.(B,L),($t.litHtmlVersions??=[]).push("3.3.2");var wt=(s,t,e)=>{let o=e?.renderBefore??t,n=o._$litPart$;if(n===void 0){let i=e?.renderBefore??null;o._$litPart$=n=new L(t.insertBefore(z(),i),i,void 0,e??{})}return n._$AI(s),n};var Ot=globalThis,E=class extends _{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=wt(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};E._$litElement$=!0,E.finalized=!0,Ot.litElementHydrateSupport?.({LitElement:E});var je=Ot.litElementPolyfillSupport;je?.({LitElement:E});(Ot.litElementVersions??=[]).push("4.2.2");var p=(s,t,...e)=>{try{return s?.call(t,...e)}catch(o){console.error(o,s)}},W=async(s,t,...e)=>{try{return await s?.call(t,...e)}catch(o){console.error(o,s)}};var q=Symbol.for("controller"),He=s=>typeof s=="object"&&s!==null&&(q in s||"hostConnected"in s||"hostDisconnected"in s||"hostUpdate"in s||"hostUpdated"in s),js=s=>typeof s?.then=="function";var F,D=s=>{F!==s&&(F=s,queueMicrotask(()=>F===s?F=void 0:0))},G=s=>F,N=[],ee=s=>{if(s===void 0){N=[];return}let t=N.indexOf(s);N=t===-1?[...N,s]:N.slice(0,t+1),queueMicrotask(()=>N=[])},se=()=>N,U,Hs=s=>{U!==s&&(U=s,queueMicrotask(()=>U===s?U=void 0:0))},ze=()=>{let s=U;return U=void 0,s},oe=async(s,t)=>{let e=at(s);if(e===void 0)return s;if(await e.ready,typeof t=="function"){let o=e.watchExports(n=>t(n,o))}return e.exports},ne=async s=>{let t=at(s);return await t.ready,t},at=s=>{let e=G().manager.X(s);if(e!==void 0)return e;if(He(s))return s;let o=ze();if(o!==void 0)return o},rt=!1,zs=s=>{rt=!0;try{return s()}finally{rt=!1}};var b=class{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}};var ie=(s,t)=>{let e=t>Ve?Be:t/We,o=0,n=setInterval(()=>{o+=e,o>=t&&(clearInterval(n),s())},e);return n},Ve=4e3,Be=2e3,We=4;var re=new Set,ae;var ce=s=>typeof s=="string"?s:"el"in s?s.el.localName:"localName"in s?s.localName:s.declaredClass,Ws=(s,t,e,o)=>{let n=ce(t);if(o?.once){let r=`${s}${n}${e}`;if(re.has(r))return;re.add(r)}let i;if(o?.detail){i={};for(let[r,a]of Object.entries(o.detail))if((typeof a=="object"||typeof a=="function")&&a!==null){let c=new WeakRef(a);Object.defineProperty(i,r,{enumerable:!0,get(){return c.deref()}})}else i[r]=a;ae?.log.interceptors?.forEach(r=>r(s,n,e,i)),console[s](`[${n}]: ${e}`,i)}else ae?.log.interceptors?.forEach(r=>r(s,n,e)),console[s](`[${n}]: ${e}`)},le=s=>{let t=`[${ce(s)}] `;return e=>{let o=e instanceof Error&&e.message?e:new Error(String(e));o.message=`${t}${o.message}`,setTimeout(()=>{throw e})}};var Fe=(s,t,e)=>{let o=Object.keys(s),n=o.length;R===void 0&&queueMicrotask(M),R??=new Map;let i=R.get(s);return i===void 0&&(i={callbacks:[],keyCount:n},R.set(s,i)),i.keyCount!==n&&(i.callbacks.forEach(r=>r(o)),i.callbacks=[],i.keyCount=n),i.callbacks.push(r=>{let a=l=>p(t,null,l),c=r[n];c===void 0?a(void 0):s[c]===e?a(c):a(void 0)}),e},R,M=()=>{R?.forEach(({callbacks:s},t)=>{let e=Object.keys(t);s.forEach(o=>o(e))}),R=void 0},qe=(s,t,e)=>{let o=s.manager;return o.V!==d&&o.V!==e&&o.S(void 0,void 0),o.T.length===0&&queueMicrotask(()=>o.S(void 0,void 0)),o.V=e,o.T.push((n,i)=>p(t,void 0,e===i?n:void 0)),e},Ge=(s=[G(),...se()],t,e)=>{let o=Array.isArray(s)?s:[s],n=o.length+1,i=r=>{n-=1,r!==void 0&&(n=Math.min(n,0)),n===0&&t(r)};o.forEach(r=>Fe(r,a=>i(a===void 0?void 0:{key:a,host:r,isReactive:!1}),e));for(let r of o)if("manager"in r&&r.manager.component===r){qe(r,a=>i(a===void 0?void 0:{key:a,host:r,isReactive:!0}),e);break}return e},Ke=(s="",t={},e=G())=>{let o={emit:n=>{s===""&&M();let i=new CustomEvent(s,{detail:n,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(i),i}};return s===""&&Ge(void 0,n=>s=n.key,o),o},Qe=Ke.bind(null,""),pe;pe=q;var St=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#n=[],this.#i=[],this.#c=[],this.#l=[],this.#d=[],this.#r=[],this.#p=!1,this.P=new b,this.connectedCalled=!1,this.loadedCalled=!1,this[pe]=!0,this.#h=[];let e=this,o=t??G(new.target.name);e.#o=o,e.ready=e.P.promise,e.#a=de(e),e.component=o,e.#o.addController(e),e.#o.manager===void 0||(ee(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#n;#i;#c;#l;#d;#r;#p;#o;catchUpLifecycle(){let{manager:t}=this.#o;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#p&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(le(this.#o))}#a;get exports(){return this.#a}set exports(t){let e=this.#a;e!==t&&(this.#a=t,this.#h.forEach(p),this.connectedCalled&&this.O!==!1&&this.#o.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#a=e?de(t):t,this.#h.forEach(p)}#h;watchExports(t){let e=()=>t(this.#a);return this.#h.push(e),()=>{this.#h.splice(this.#h.indexOf(e),1)}}get use(){return D(this.#o),oe}get useRef(){return D(this.#o),ne}get useRefSync(){return D(this.#o),at}controllerRemoved(){this.#o.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#n.push(t)}onUpdate(t){this.#i.push(t)}onUpdated(t){this.#c.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#d.push(t),this.connectedCalled&&this.#o.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#r.forEach(p),t.#r=[]}async triggerLoad(){if(this.#p)return;this.#p=!0;let t=this;t.hostLoad&&await W(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(W)),this.P.resolve(this.#a)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#n.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#i.forEach(he,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#c.forEach(he,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#l.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#d.forEach(this.#u,this)}#u(t){D(this.#o);let e=p(t);(Array.isArray(e)?e:[e]).forEach(n=>{typeof n=="function"?this.#r.push(n):typeof n=="object"&&typeof n.remove=="function"&&this.#r.push(n.remove)})}};function he(s){p(s,void 0,this)}var de=s=>{if(typeof s!="object"&&typeof s!="function"||s===null)return s;let t={get(o,n,i){if(!((n==="exports"||n==="_exports")&&n in o&&o[n]===e)&&(n in o||n in Promise.prototype||typeof n=="symbol"))return typeof o=="function"?o[n]:Reflect.get(o,n,i)}},e=new Proxy(s,t);return e};var ue=St;var y={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},$=s=>(...t)=>({_$litDirective$:s,values:t}),g=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var{I:Je}=te,fe=s=>s;var ct=s=>s.strings===void 0,me=()=>document.createComment(""),eo=(s,t,e)=>{let o=s._$AA.parentNode,n=t===void 0?s._$AB:t._$AA;if(e===void 0){let i=o.insertBefore(me(),n),r=o.insertBefore(me(),n);e=new Je(i,r,s,s.options)}else{let i=e._$AB.nextSibling,r=e._$AM,a=r!==s;if(a){let c;e._$AQ?.(s),e._$AM=s,e._$AP!==void 0&&(c=s._$AU)!==r._$AU&&e._$AP(c)}if(i!==n||a){let c=e._$AA;for(;c!==i;){let l=fe(c).nextSibling;fe(o).insertBefore(c,n),c=l}}}return e},so=(s,t,e=s)=>(s._$AI(t,e),s),Ye={},ye=(s,t=Ye)=>s._$AH=t,oo=s=>s._$AH,no=s=>{s._$AR(),s._$AA.remove()};var Ze=$(class extends g{constructor(s){if(super(s),s.type!==y.PROPERTY&&s.type!==y.ATTRIBUTE&&s.type!==y.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ct(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[t]){if(t===f||t===d)return t;let e=s.element,o=s.name;if(s.type===y.PROPERTY){if(t===e[o])return f}else if(s.type===y.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(o))return f}else if(s.type===y.ATTRIBUTE&&e.getAttribute(o)===t+"")return f;return ye(s),t}});var K=(s,t)=>{let e=s._$AN;if(e===void 0)return!1;for(let o of e)o._$AO?.(t,!1),K(o,t);return!0},lt=s=>{let t,e;do{if((t=s._$AM)===void 0)break;e=t._$AN,e.delete(s),s=t}while(e?.size===0)},ge=s=>{for(let t;t=s._$AM;s=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(s))break;e.add(s),es(t)}};function Xe(s){this._$AN!==void 0?(lt(this),this._$AM=s,ge(this)):this._$AM=s}function ts(s,t=!1,e=0){let o=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(t)if(Array.isArray(o))for(let i=e;i<o.length;i++)K(o[i],!1),lt(o[i]);else o!=null&&(K(o,!1),lt(o));else K(this,s)}var es=s=>{s.type==y.CHILD&&(s._$AP??=ts,s._$AQ??=Xe)},ht=class extends g{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,o){super._$AT(t,e,o),ge(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(K(this,t),lt(this))}setValue(t){if(ct(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var bo=()=>new Pt,Pt=class{},Tt=new WeakMap,Nt=$(class extends ht{render(s){return d}update(s,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=s.options?.host,this.rt(this.ct=s.element)),d}rt(s){if(this.isConnected||(s=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=Tt.get(t);e===void 0&&(e=new WeakMap,Tt.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){return typeof this.G=="function"?Tt.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var dt=s=>s.replace(os,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),os=/[A-Z]+(?![a-z])|[A-Z]/gu;var Uo="randomUUID"in crypto;var xt=s=>{let t=s;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(s),(e.I??e._postLoad).promise}return!1},Lt={};function Ut(){}function Rt(s){for(let t of["Associated","Disabled","Reset","StateRestore"]){let e=`orm${t}Callback`;s.prototype["f"+e]=async function(...o){await this.componentOnReady(),(this.el??this).dispatchEvent(new CustomEvent(`luminaF${e}`,{detail:o}))}}}var ns=(s,t)=>function(o,n){if(!globalThis.customElements)return;let r=(n??o??{}).resourcesUrl;r&&s.setAssetPath(r);for(let[a,[c,l="",u=0]]of Object.entries(t)){if(customElements.get(a))continue;let[h,m,v]=l.split(";"),C=h?h?.split(",").map(is):void 0,yt=C?.map(([x])=>x),Q=class extends Dt{static{this.formAssociated=u===1}static{this.observedAttributes=C?.map(([,x])=>x).filter(x=>x!=="")}static{this.C=yt}static{this.E=m?m?.split(","):void 0}static{this.D=v?.split(",")}static{this.L=a}static{this.K=s}constructor(){!Q.B&&(Q.B=c(),Q.F()),super()}};customElements.define(a,Q)}},pt=Object.defineProperty,is=s=>{let t=s.split(":");return t.length===1?[t[0],dt(t[0])]:t},rs=globalThis.HTMLElement??Ut,Dt=class extends rs{constructor(){super(),this.#e={},this.#s=[],this.I=new b,this.H=new b,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(o=>{Object.hasOwn(t,o)&&(t.#e[o]=t[o],delete t[o])}),e.A?t.#n({a:e.A}):e.B.then(async o=>{await e.K.p,t.#n(await(o.default?.then(n=>typeof n=="function"?{a:n}:n)??o))}).catch(o=>{t.H.reject(o),setTimeout(()=>{throw o})})}static{this.lumina=!0}static F(){for(let t of this.C??[])pt(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])pt(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])pt(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}static{Rt(this)}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,o){this.#t?.attributeChangedCallback(t,e,o),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=xt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#n(t){let e=this.constructor,o=e.L,n=this.#e,i=Object.values(t).find(h=>h.L===o),r=`${o}--lazy`,a=i;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);cs(a),!e.A&&(e.A=i,customElements.define(r,i)),i.N=this;let l=document.createElement(r);i.N=void 0,this.#t=l,this.#e=l,this.#s.forEach(h=>l.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(n).forEach(as,l);let u=this.isConnected;(u||this.G)&&(l.connectedCallback?.(),u||l.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function as([s,t]){this[s]=t}var cs=s=>{let t=s.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(n,i){e.setAttribute.call(this.el,n,i)},t.removeAttribute=function(n){e.removeAttribute.call(this.el,n)},t.hasAttribute=function(n){return e.hasAttribute.call(this.el,n)},pt(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var ut=class extends ue{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=ft in t&&typeof t.destroy=="function",E.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${ft} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),M();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),D(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>{this.#e.destroy()};this.#t=ie(t,ls)}}S(t,e){let o=this.T;this.V=d,this.T=[],o.forEach(n=>n(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},ls=1e3,ft="autoDestroyDisabled";var Ee=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="class"||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(let o in t)t[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(t)}let e=s.element.classList;for(let o of this.st)o in t||(e.remove(o),this.st.delete(o));for(let o in t){let n=!!t[o];n===this.st.has(o)||this.nt?.has(o)||(n?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return f}});var $e="important",hs=" !"+$e,be=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="style"||s.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce((t,e)=>{let o=s[e];return o==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(s,[t]){let{style:e}=s.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let o of this.ft)t[o]==null&&(this.ft.delete(o),o.includes("-")?e.removeProperty(o):e[o]=null);for(let o in t){let n=t[o];if(n!=null){this.ft.add(o);let i=typeof n=="string"&&n.endsWith(hs);o.includes("-")||i?e.setProperty(o,i?n.slice(0,-11):n,i?$e:""):e[o]=n}}return f}});var _e=class s extends E{constructor(){super(),this.M=[],this.manager=new ut(this);let t=this,e=t.constructor,o=e.N,n=e.K.o,i=s.prototype.shouldUpdate;t.#n=o?.H??new b,t.I=o?.I??new b,t.J=o?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=o??t,t.#s=t.enableUpdating,t.enableUpdating=Ut,t.shouldUpdate!==i&&(t.#e=t.shouldUpdate,t.shouldUpdate=i),n&&(t.#t=new Map,e.elementProperties.forEach((r,a)=>t.#t.set(a,n()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),o=this.shadowRootOptions===Lt;return this.K?.commonStyles===void 0||o?e:[this.K.commonStyles,...e]}static createProperty(t,e){let o=typeof e=="number"?e:Array.isArray(e)?e[0]:0,n=Array.isArray(e)?e[1]:void 0,i=n?.hasChanged??j,r={attribute:o&1&&typeof t=="string"?dt(t):!1,reflect:!!(o&2),type:o&4?Boolean:o&8?Number:void 0,state:!!(o&16),readOnly:!!(o&32),noAccessor:!!(o&64),useDefault:!!(o&128),c:!1,...n,hasChanged(a,c){let l=i(a,c);return r.c=l,l}};super.createProperty(t,r)}static getPropertyDescriptor(t,e,o){let n=this.K,i=super.getPropertyDescriptor(t,e,o);return o.d=i,{...i,get(){return n.t?.(this.#t.get(t)),i.get?.call(this)},set(r){let a=this.manager;if(o.readOnly&&!rt&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${r}"`);i.set.call(this,r??void 0),o.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(M(),a?.S(t,r))}}}static{this.lumina=!0}static{Rt(this)}#t;#e;#s;#n;#i;#c;get elementInternals(){return this.#c??=this.el.attachInternals(),this.#c}connectedCallback(){this.hasAttribute("defer-hydration")||this.#l(!0)}#l(t){let e=this.constructor.K.c?.(()=>this.requestUpdate());this.#i=e;let o=!this.manager.connectedCalled;t&&super.connectedCallback(),o?queueMicrotask(()=>this.#r().catch(n=>{this.#n.reject(n),setTimeout(()=>{throw n})})):e&&this.requestUpdate()}#d(t){try{this.#i.clear(),this.constructor.K.r(this.#i,()=>super.update(t))}catch(e){throw this.#i.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#i?.destroy(),this.#i=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,o=e.shadowRootOptions,i=t??(o===Lt?this.el:this.el.attachShadow(o));if(t)return this.manager.connectedCalled||this.#l(!1),E.prototype.createRenderRoot.call(this),t;if(this.isConnected){let r=i.getRootNode();r.adoptedStyleSheets=[...r.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return i}async#r(){let t=this.el.G??xt(this.el);t&&await t;let e=[];for(let n of this.M)"triggerLoad"in n?e.push(n.triggerLoad()):e.push(W(n.hostLoad,n));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(n=>n.has(ft)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await 0;let o=this.J.filter(n=>!n.manager?.loadedCalled);o.length&&await Promise.allSettled(o.map(async n=>await n.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let n of this.M)"triggerLoaded"in n?n.triggerLoaded():p(n.hostLoaded,n);this.loaded?.(),this.#n.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#i?this.#d(t):super.update(t)}listen(t,e,o){let n=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,n,o),()=>this.el.removeEventListener(t,n,o)))}listenOn(t,e,o,n){let i=o?.bind(this)??o;this.manager.onLifecycle(()=>(t.addEventListener(e,i,n),()=>t.removeEventListener(e,i,n)))}async componentOnReady(){return await this.#n.promise,this}addController(t){this.M.push(t),!(q in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var Ae=s=>{let t,e=n=>{t=new URL(n,globalThis.location?.href||void 0).href},o={...s,getAssetPath(n){let i=new URL(n,t);return i.origin!==globalThis.location?.origin?i.href:i.pathname},setAssetPath:e,customElement(n,i){i.K=o,i.L=n,customElements.get(n)||customElements.define(n,i)}};return e(s.defaultAssetPath),o};var kn=s=>typeof s=="object"&&s!=null?Ee(s):s,jn=s=>typeof s=="object"&&s!=null?be(s):s;var Mt=class extends g{#t;#e;constructor(t){super(t);let e=this;this.#e=function(n){return e.#t.call(this,n)}}render(t){return typeof t=="function"?(this.#t=t,Nt(this.#e)):Nt(t)}},Hn=$(Mt);var zn=d;function Vn(s,t,e){e==null?s.removeAttribute(t):s.setAttribute(t,e)}var Bn={toAttribute:s=>s===!0?"":s===!1?null:s};var Oe="calcite-mode-auto",Se="calcite-mode-dark",ds="calcite-mode-light",Gn={autoMode:Oe,darkMode:Se,lightMode:ds,rtl:"calcite--rtl",calciteAnimate:"calcite-animate",calciteAnimateInUp:"calcite-animate__in-up",calciteAnimateInDown:"calcite-animate__in-down",calciteAnimateInRight:"calcite-animate__in-right",calciteAnimateInLeft:"calcite-animate__in-left",screenReaderText:"screen-reader-text"},Kn={filter:250,nextTick:0,resize:150,reposition:100},Qn=10,Jn=25;function Ce(){let{classList:s}=document.body,t=window.matchMedia("(prefers-color-scheme: dark)").matches,e=()=>s.contains(Se)||s.contains(Oe)&&t?"dark":"light",o=r=>document.body.dispatchEvent(new CustomEvent("calciteModeChange",{bubbles:!0,detail:{mode:r}})),n=r=>{i!==r&&o(r),i=r},i=e();o(i),window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",r=>n(r.matches?"dark":"light")),new MutationObserver(()=>n(e())).observe(document.body,{attributes:!0,attributeFilter:["class"]})}var It,ps={focusTrapStack:[],logLevel:"info"};function us(){return{...ps,...globalThis.calciteConfig??{}}}function fs(){return It||(It=us()),It}var we="5.2.0-next.43",ms="2026-08-06",ys="c43df763f";function gs(){let s=fs();s&&s.version||(console.info(`Using Calcite Components ${we} [Date: ${ms}, Revision: ${ys}]`),Object.defineProperty(s,"version",{value:we,writable:!1}),globalThis.calciteConfig=s)}document.readyState==="interactive"?Ce():document.addEventListener("DOMContentLoaded",Ce,{once:!0});queueMicrotask(gs);var vs=Ae({defaultAssetPath:"https://cdn.jsdelivr.net/npm/@esri/calcite-components@5.2.0-next.43/dist/cdn/",hydratedAttribute:"calcite-hydrated"}),{customElement:Yn,getAssetPath:Zn,setAssetPath:Xn}=vs;export{js as a,D as b,ee as c,se as d,Hs as e,zs as f,Te as g,As as h,Cs as i,ws as j,f as k,d as l,wt as m,Ws as n,Ge as o,Qe as p,St as q,ue as r,ns as s,y as t,$ as u,g as v,eo as w,so as x,ye as y,oo as z,no as A,Ze as B,bo as C,Nt as D,_e as E,kn as F,jn as G,zn as H,Vn as I,Bn as J,Gn as K,Kn as L,Qn as M,Jn as N,fs as O,vs as P,Yn as Q,Zn as R};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{b as Z}from"./
|
|
2
|
+
import{b as Z}from"./7FERW3TY.js";import{a as C,b as ee,c as te,d as R,e as _,f as ae,p as re}from"./RP6GPL33.js";import{O as X}from"./OPEE74RM.js";function U(r,e){(e==null||e>r.length)&&(e=r.length);for(var i=0,u=Array(e);i<e;i++)u[i]=r[i];return u}function pe(r){if(Array.isArray(r))return U(r)}function ne(r,e){var i=typeof Symbol<"u"&&r[Symbol.iterator]||r["@@iterator"];if(!i){if(Array.isArray(r)||(i=se(r))||e){i&&(r=i);var u=0,y=function(){};return{s:y,n:function(){return u>=r.length?{done:!0}:{done:!1,value:r[u++]}},e:function(h){throw h},f:y}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
3
3
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,n=!0,b=!1;return{s:function(){i=i.call(r)},n:function(){var h=i.next();return n=h.done,h},e:function(h){b=!0,s=h},f:function(){try{n||i.return==null||i.return()}finally{if(b)throw s}}}}function ye(r,e,i){return(e=Te(e))in r?Object.defineProperty(r,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):r[e]=i,r}function me(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)}function he(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
4
4
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ie(r,e){var i=Object.keys(r);if(Object.getOwnPropertySymbols){var u=Object.getOwnPropertySymbols(r);e&&(u=u.filter(function(y){return Object.getOwnPropertyDescriptor(r,y).enumerable})),i.push.apply(i,u)}return i}function oe(r){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?ie(Object(i),!0).forEach(function(u){ye(r,u,i[u])}):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(i)):ie(Object(i)).forEach(function(u){Object.defineProperty(r,u,Object.getOwnPropertyDescriptor(i,u))})}return r}function ge(r){return pe(r)||me(r)||se(r)||he()}function we(r,e){if(typeof r!="object"||!r)return r;var i=r[Symbol.toPrimitive];if(i!==void 0){var u=i.call(r,e);if(typeof u!="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(r)}function Te(r){var e=we(r,"string");return typeof e=="symbol"?e:e+""}function se(r,e){if(r){if(typeof r=="string")return U(r,e);var i={}.toString.call(r).slice(8,-1);return i==="Object"&&r.constructor&&(i=r.constructor.name),i==="Map"||i==="Set"?Array.from(r):i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?U(r,e):void 0}}var E={getActiveTrap:function(e){return e?.length>0?e[e.length-1]:null},activateTrap:function(e,i){var u=E.getActiveTrap(e);i!==u&&E.pauseTrap(e);var y=e.indexOf(i);y===-1||e.splice(y,1),e.push(i)},deactivateTrap:function(e,i){var u=e.indexOf(i);u!==-1&&e.splice(u,1),E.unpauseTrap(e)},pauseTrap:function(e){var i=E.getActiveTrap(e);i?._setPausedState(!0)},unpauseTrap:function(e){var i=E.getActiveTrap(e);i&&!i._isManuallyPaused()&&i._setPausedState(!1)}},Fe=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},Ne=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},L=function(e){return e?.key==="Tab"||e?.keyCode===9},ke=function(e){return L(e)&&!e.shiftKey},Ee=function(e){return L(e)&&e.shiftKey},ue=function(e){return setTimeout(e,0)},j=function(e){for(var i=arguments.length,u=new Array(i>1?i-1:0),y=1;y<i;y++)u[y-1]=arguments[y];return typeof e=="function"?e.apply(void 0,u):e},x=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},De=[],ce=function(e,i){var u=i?.document||document,y=i?.trapStack||De,s=oe({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,delayReturnFocus:!0,isolateSubtrees:!1,isKeyForward:ke,isKeyBackward:Ee},i),n={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},b,h=function(t,a,o){return t&&t[a]!==void 0?t[a]:s[o||a]},N=function(t,a){var o=typeof a?.composedPath=="function"?a.composedPath():void 0;return n.containerGroups.findIndex(function(f){var l=f.container,p=f.tabbableNodes;return l.contains(t)||o?.includes(l)||p.find(function(c){return c===t})})},D=function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=a.hasFallback,f=o===void 0?!1:o,l=a.params,p=l===void 0?[]:l,c=s[t];if(typeof c=="function"&&(c=c.apply(void 0,ge(p))),c===!0&&(c=void 0),!c){if(c===void 0||c===!1)return c;throw new Error("`".concat(t,"` was specified but was not a node, or did not return a node"))}var v=c;if(typeof c=="string"){try{v=u.querySelector(c)}catch(d){throw new Error("`".concat(t,'` appears to be an invalid selector; error="').concat(d.message,'"'))}if(!v&&!f)throw new Error("`".concat(t,"` as selector refers to no known node"))}return v},A=function(t){var a=t.activeElement;return a?a.shadowRoot&&a.shadowRoot.activeElement!==null?A(a.shadowRoot):a:null},k=function(){var t=D("initialFocus",{hasFallback:!0});if(t===!1)return!1;if(t===void 0||t&&!_(t,s.tabbableOptions)){var a=A(u);if(N(a)>=0)t=a;else{var o=n.tabbableGroups[0],f=o&&o.firstTabbableNode;t=f||D("fallbackFocus")}}else t===null&&(t=D("fallbackFocus"));if(!t)throw new Error("Your focus-trap needs to have at least one focusable element");return t},O=function(){if(n.containerGroups=n.containers.map(function(t){var a=ee(t,s.tabbableOptions),o=te(t,s.tabbableOptions),f=a.length>0?a[0]:void 0,l=a.length>0?a[a.length-1]:void 0,p=o.find(function(d){return R(d)}),c=o.slice().reverse().find(function(d){return R(d)}),v=!!a.find(function(d){return C(d)>0});return{container:t,tabbableNodes:a,focusableNodes:o,posTabIndexesFound:v,firstTabbableNode:f,lastTabbableNode:l,firstDomTabbableNode:p,lastDomTabbableNode:c,nextTabbableNode:function(g){var T=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,F=a.indexOf(g);return F<0?T?o.slice(o.indexOf(g)+1).find(function(S){return R(S)}):o.slice(0,o.indexOf(g)).reverse().find(function(S){return R(S)}):a[F+(T?1:-1)]}}}),n.tabbableGroups=n.containerGroups.filter(function(t){return t.tabbableNodes.length>0}),n.tabbableGroups.length<=0&&!D("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(t){return t.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.")},w=function(t){if(t!==!1&&t!==A(document)){if(!t||!t.focus){w(k());return}t.focus({preventScroll:!!s.preventScroll}),n.mostRecentlyFocusedNode=t,Fe(t)&&t.select()}},K=function(t){var a=D("setReturnFocus",{params:[t]});return a||(a===!1?!1:t)},V=function(t){var a=t.target,o=t.event,f=t.isBackward,l=f===void 0?!1:f;a=a||x(o),O();var p=null;if(n.tabbableGroups.length>0){var c=N(a,o),v=c>=0?n.containerGroups[c]:void 0;if(c<0)l?p=n.tabbableGroups[n.tabbableGroups.length-1].lastTabbableNode:p=n.tabbableGroups[0].firstTabbableNode;else if(l){var d=n.tabbableGroups.findIndex(function(M){var q=M.firstTabbableNode;return a===q});if(d<0&&(v.container===a||_(a,s.tabbableOptions)&&!R(a,s.tabbableOptions)&&!v.nextTabbableNode(a,!1))&&(d=c),d>=0){var g=d===0?n.tabbableGroups.length-1:d-1,T=n.tabbableGroups[g];p=C(a)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else L(o)||(p=v.nextTabbableNode(a,!1))}else{var F=n.tabbableGroups.findIndex(function(M){var q=M.lastTabbableNode;return a===q});if(F<0&&(v.container===a||_(a,s.tabbableOptions)&&!R(a,s.tabbableOptions)&&!v.nextTabbableNode(a))&&(F=c),F>=0){var S=F===n.tabbableGroups.length-1?0:F+1,P=n.tabbableGroups[S];p=C(a)>=0?P.firstTabbableNode:P.firstDomTabbableNode}else L(o)||(p=v.nextTabbableNode(a))}}else p=D("fallbackFocus");return p},B=function(t){var a=x(t);if(!(N(a,t)>=0)){if(j(s.clickOutsideDeactivates,t)){b.deactivate({returnFocus:s.returnFocusOnDeactivate});return}j(s.allowOutsideClick,t)||t.preventDefault()}},W=function(t){var a=x(t),o=N(a,t)>=0;if(o||a instanceof Document)o&&(n.mostRecentlyFocusedNode=a);else{t.stopImmediatePropagation();var f,l=!0;if(n.mostRecentlyFocusedNode)if(C(n.mostRecentlyFocusedNode)>0){var p=N(n.mostRecentlyFocusedNode),c=n.containerGroups[p].tabbableNodes;if(c.length>0){var v=c.findIndex(function(d){return d===n.mostRecentlyFocusedNode});v>=0&&(s.isKeyForward(n.recentNavEvent)?v+1<c.length&&(f=c[v+1],l=!1):v-1>=0&&(f=c[v-1],l=!1))}}else n.containerGroups.some(function(d){return d.tabbableNodes.some(function(g){return C(g)>0})})||(l=!1);else l=!1;l&&(f=V({target:n.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(n.recentNavEvent)})),w(f||n.mostRecentlyFocusedNode||k())}n.recentNavEvent=void 0},de=function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;n.recentNavEvent=t;var o=V({event:t,isBackward:a});o&&(L(t)&&t.preventDefault(),w(o))},Y=function(t){(s.isKeyForward(t)||s.isKeyBackward(t))&&de(t,s.isKeyBackward(t))},$=function(t){Ne(t)&&j(s.escapeDeactivates,t)!==!1&&(t.preventDefault(),b.deactivate())},z=function(t){var a=x(t);N(a,t)>=0||j(s.clickOutsideDeactivates,t)||j(s.allowOutsideClick,t)||(t.preventDefault(),t.stopImmediatePropagation())},J=function(){if(n.active){E.activateTrap(y,b);var t;return s.delayInitialFocus?t=new Promise(function(a){n.delayInitialFocusTimer=ue(function(){w(k()),a()})}):w(k()),u.addEventListener("focusin",W,!0),u.addEventListener("mousedown",B,{capture:!0,passive:!1}),u.addEventListener("touchstart",B,{capture:!0,passive:!1}),u.addEventListener("click",z,{capture:!0,passive:!1}),u.addEventListener("keydown",Y,{capture:!0,passive:!1}),u.addEventListener("keydown",$),t}},ve=function(t){n.active&&!n.paused&&b._setSubtreeIsolation(!1),n.adjacentElements.clear(),n.alreadySilent.clear();var a=new Set,o=new Set,f=ne(t),l;try{for(f.s();!(l=f.n()).done;){var p=l.value;a.add(p);for(var c=typeof ShadowRoot<"u"&&p.getRootNode()instanceof ShadowRoot,v=p;v;){a.add(v);var d=v.parentElement,g=[];d?g=d.children:!d&&c&&(g=v.getRootNode().children,d=v.getRootNode().host,c=typeof ShadowRoot<"u"&&d.getRootNode()instanceof ShadowRoot);var T=ne(g),F;try{for(T.s();!(F=T.n()).done;){var S=F.value;o.add(S)}}catch(P){T.e(P)}finally{T.f()}v=d}}}catch(P){f.e(P)}finally{f.f()}a.forEach(function(P){o.delete(P)}),n.adjacentElements=o},Q=function(){if(n.active)return u.removeEventListener("focusin",W,!0),u.removeEventListener("mousedown",B,!0),u.removeEventListener("touchstart",B,!0),u.removeEventListener("click",z,!0),u.removeEventListener("keydown",Y,!0),u.removeEventListener("keydown",$),b},be=function(t){var a=n.mostRecentlyFocusedNode;if(a){var o=t.some(function(l){var p=Array.from(l.removedNodes);return p.some(function(c){return c===a||typeof c.contains=="function"&&c.contains(a)})});if(o&&n.containers.some(function(l){return l?.isConnected})){O();var f=k();w(f)}}},H=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(be):void 0,I=function(){H&&(H.disconnect(),n.active&&!n.paused&&n.containers.map(function(t){H.observe(t,{subtree:!0,childList:!0})}))};return b={get active(){return n.active},get paused(){return n.paused},activate:function(t){if(n.active)return this;var a=h(t,"onActivate"),o=h(t,"onPostActivate"),f=h(t,"checkCanFocusTrap"),l=E.getActiveTrap(y),p=!1;if(l&&!l.paused){var c;(c=l._setSubtreeIsolation)===null||c===void 0||c.call(l,!1),p=!0}try{f||O(),n.active=!0,n.paused=!1,n.nodeFocusedBeforeActivation=A(u),a?.({trap:b});var v=function(){f&&O();var T=function(){b._setSubtreeIsolation(!0),I(),o?.({trap:b})},F=J();F?F.then(T):T()};if(f)return f(n.containers.concat()).then(v,v),this;v()}catch(g){if(l===E.getActiveTrap(y)&&p){var d;(d=l._setSubtreeIsolation)===null||d===void 0||d.call(l,!0)}throw g}return this},deactivate:function(t){if(!n.active)return this;var a=oe({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},t);clearTimeout(n.delayInitialFocusTimer),n.delayInitialFocusTimer=void 0,n.paused||b._setSubtreeIsolation(!1),n.alreadySilent.clear(),Q(),n.active=!1,n.paused=!1,I(),E.deactivateTrap(y,b);var o=h(a,"onDeactivate"),f=h(a,"onPostDeactivate"),l=h(a,"checkCanReturnFocus"),p=h(a,"delayReturnFocus"),c=h(a,"returnFocus","returnFocusOnDeactivate");o?.({trap:b});var v=function(){c&&w(K(n.nodeFocusedBeforeActivation)),f?.({trap:b})},d=function(){p&&c?ue(v):v()};return c&&l?(l(K(n.nodeFocusedBeforeActivation)).then(d,d),this):(d(),this)},pause:function(t){return n.active?(n.manuallyPaused=!0,this._setPausedState(!0,t)):this},unpause:function(t){return n.active?(n.manuallyPaused=!1,y[y.length-1]!==this?this:this._setPausedState(!1,t)):this},updateContainerElements:function(t){var a=[].concat(t).filter(Boolean);return n.containers=a.map(function(o){return typeof o=="string"?u.querySelector(o):o}),s.isolateSubtrees&&ve(n.containers),n.active&&(O(),n.paused||b._setSubtreeIsolation(!0)),I(),this}},Object.defineProperties(b,{_isManuallyPaused:{value:function(){return n.manuallyPaused}},_setPausedState:{value:function(t,a){if(n.paused===t)return this;if(n.paused=t,t){var o=h(a,"onPause"),f=h(a,"onPostPause");o?.({trap:b}),Q(),b._setSubtreeIsolation(!1),I(),f?.({trap:b})}else{var l=h(a,"onUnpause"),p=h(a,"onPostUnpause");l?.({trap:b});var c=function(){O();var d=function(){b._setSubtreeIsolation(!0),I(),p?.({trap:b})},g=J();g?g.then(d):d()};c()}return this}},_setSubtreeIsolation:{value:function(t){s.isolateSubtrees&&n.adjacentElements.forEach(function(a){var o;t?s.isolateSubtrees==="aria-hidden"?((a.ariaHidden==="true"||((o=a.getAttribute("aria-hidden"))===null||o===void 0?void 0:o.toLowerCase())==="true")&&n.alreadySilent.add(a),a.setAttribute("aria-hidden","true")):((a.inert||a.hasAttribute("inert"))&&n.alreadySilent.add(a),a.setAttribute("inert",!0)):n.alreadySilent.has(a)||(s.isolateSubtrees==="aria-hidden"?a.removeAttribute("aria-hidden"):a.removeAttribute("inert"))})}}}),b.updateContainerElements(e),b};function le(r,{focusTrapOptions:e},i){return!e?.extraContainers&&!i?r:[r,...fe(e?.extraContainers),...fe(i)]}function fe(r=[]){return Array.isArray(r)?r:[r]}var G=new WeakSet;function Ae(r,e){let i=e&&e!==document.body&&e!==document.documentElement;return!G.has(r)&&i&&re(e),!1}function Se(r,e){let i=e?.fallbackFocus||r,u=e?.clickOutsideDeactivates??!0,y;return{fallbackFocus:i,...e,document:r.ownerDocument,tabbableOptions:ae,trapStack:X().focusTrapStack,clickOutsideDeactivates:s=>(G.has(r)||G.add(r),typeof u=="function"?u(s):u),onActivate:s=>{e?.escapeDeactivates&&(y=new AbortController,r.addEventListener("keydown",n=>{if(n.key==="Escape"){let b=e?.escapeDeactivates;(typeof b=="function"?b(n):b??!0)&&s.trap.deactivate()}},{signal:y.signal})),e?.onActivate?.(s)},onDeactivate:s=>{y?.abort(),y=void 0,e?.onDeactivate?.(s)},onPostDeactivate:()=>{G.delete(r)},setReturnFocus:s=>{let n=typeof e?.setReturnFocus=="function"?e.setReturnFocus(s):e?.setReturnFocus;return n===void 0?Ae(r,s):n}}}var Le=(r={})=>Z((e,i)=>{let u,y,s,n=!1,b=r.focusTrapOptions,h=()=>r.triggerProp?!!e[r.triggerProp]:!0,N=()=>r.triggerProp?h():n,D=()=>typeof e.focusTrapDisabledOverride=="function"?!e.focusTrapDisabledOverride():!e.focusTrapDisabled,A=()=>{let w=y||e.el;w.isConnected&&(u||(s||=le(w,e),u=ce(s,Se(w,{...b,...e.focusTrapOptions}))),D()&&u.activate())},k=()=>{u?.deactivate()};return i.onConnected(()=>{u&&N()&&A()}),i.onUpdate(w=>{if(!(!e.hasUpdated||!w.has("focusTrapDisabled"))){if(e.focusTrapDisabled||!h()){k();return}N()&&A()}}),i.onDisconnected(()=>k()),{get _instance(){},activate:()=>{n=!0,A()},deactivate:()=>{n=!1,k()},overrideFocusTrapEl:w=>{if(u)throw new Error("Focus trap already created");y=w},setExtraContainers:w=>{let K=y||e.el;s=le(K,e,w)},updateContainerElements:()=>u?.updateContainerElements(s)}});export{Le as a};
|