@esri/calcite-components 5.2.0-next.47 → 5.2.0-next.48
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/{JHXFOQ55.js → 2DDL5ZJU.js} +1 -1
- package/dist/cdn/{XUKIT3XX.js → 2DV4RLQJ.js} +1 -1
- package/dist/cdn/{HEMIFVMO.js → 2P7FOK6C.js} +1 -1
- package/dist/cdn/{JTRSS22D.js → 3BQ3HAXI.js} +1 -1
- package/dist/cdn/{4I6YLQ5T.js → 3BQ4YMT4.js} +1 -1
- package/dist/cdn/{LWUFE56Q.js → 3F3WUEAG.js} +1 -1
- package/dist/cdn/{RCPHDYCA.js → 3KOO2DDK.js} +1 -1
- package/dist/cdn/{NFBYAZ4D.js → 44OKUTSA.js} +1 -1
- package/dist/cdn/{PSIIHRNQ.js → 47MVW4LV.js} +1 -1
- package/dist/cdn/{DORK25O3.js → 4DFAWLAW.js} +1 -1
- package/dist/cdn/{5HQG5LCY.js → 4LBCNU6M.js} +1 -1
- package/dist/cdn/{XAZ3DIPN.js → 4N7S7EU5.js} +1 -1
- package/dist/cdn/{22QGYTSK.js → 5BZU7EOG.js} +1 -1
- package/dist/cdn/{PCQKZ6LD.js → 5G2ZWZWD.js} +1 -1
- package/dist/cdn/{EESAB24R.js → 5P7AWUXT.js} +1 -1
- package/dist/cdn/{MG2INSQO.js → 5UGWKIGL.js} +1 -1
- package/dist/cdn/{Z24KWPV2.js → 6FOFBPU6.js} +1 -1
- package/dist/cdn/{VHFUDJNR.js → 6J5S2QTS.js} +1 -1
- package/dist/cdn/{XQSLIZ4M.js → 6PW2F624.js} +1 -1
- package/dist/cdn/{EKXRU3BE.js → 6SSCE6VG.js} +1 -1
- package/dist/cdn/{FDBPY66R.js → 6TYZNJAZ.js} +1 -1
- package/dist/cdn/{VBJCPFA7.js → 7HQG6ZNG.js} +1 -1
- package/dist/cdn/{SRR2IFDL.js → 7L6UB76A.js} +1 -1
- package/dist/cdn/{HIXG2AI5.js → 7MLO7KFY.js} +1 -1
- package/dist/cdn/{VBXVPJNE.js → 7NJOPO4V.js} +1 -1
- package/dist/cdn/{S34MQ6VQ.js → 7QGXXOW6.js} +1 -1
- package/dist/cdn/{3CMVFIS2.js → A2ZMTC5A.js} +1 -1
- package/dist/cdn/{FJGCAABI.js → AEY5D423.js} +1 -1
- package/dist/cdn/{JFXGXP6U.js → AJVDOKOS.js} +1 -1
- package/dist/cdn/{7WACAT5I.js → AK4OV5ZX.js} +1 -1
- package/dist/cdn/{OL24EK32.js → AR53XDTT.js} +1 -1
- package/dist/cdn/{2PHC3HLJ.js → B7T4NSPW.js} +1 -1
- package/dist/cdn/{KO5WAXWL.js → BLTUUHVY.js} +1 -1
- package/dist/cdn/{H7K4CKP4.js → C4RL4P2Y.js} +1 -1
- package/dist/cdn/{D7LWZIHJ.js → DI4UWEHF.js} +1 -1
- package/dist/cdn/{OJBEKVQ2.js → DVM4QCQZ.js} +1 -1
- package/dist/cdn/{75F5AR24.js → EDCAVNTA.js} +1 -1
- package/dist/cdn/{PL3ZKTMC.js → FC6CPYDV.js} +1 -1
- package/dist/cdn/{UOHGOCIQ.js → FGF5VH2I.js} +1 -1
- package/dist/cdn/{DBNFE2QP.js → FJ4XLOED.js} +1 -1
- package/dist/cdn/{NGGWMC3U.js → FZEKRBOP.js} +1 -1
- package/dist/cdn/{YAWTM2FH.js → GFHMUTGI.js} +1 -1
- package/dist/cdn/{3MQJJIFK.js → GG3D7A3G.js} +1 -1
- package/dist/cdn/{DIJXW6GE.js → GHEMJED4.js} +1 -1
- package/dist/cdn/{T6YM6IUN.js → GSR6IG6C.js} +1 -1
- package/dist/cdn/{ABMXKKXK.js → HCW2DLKX.js} +1 -1
- package/dist/cdn/{XMIBXHIE.js → HF36MM7H.js} +1 -1
- package/dist/cdn/{YKK5IHXU.js → HF6KCX2S.js} +1 -1
- package/dist/cdn/{AOVAWY55.js → HLW5WNZ3.js} +1 -1
- package/dist/cdn/{DPRZJXSZ.js → HOA52VPD.js} +1 -1
- package/dist/cdn/{VZSAELFC.js → HXGBOWML.js} +1 -1
- package/dist/cdn/{KTIBYZLT.js → I5SIYICS.js} +1 -1
- package/dist/cdn/{6PAPRX77.js → ICWFQRX7.js} +1 -1
- package/dist/cdn/{WDV5WB6R.js → IQMJVANU.js} +1 -1
- package/dist/cdn/{ACYOXBFI.js → ITCXMBHT.js} +1 -1
- package/dist/cdn/{7TADGA4A.js → JGQ5AYYB.js} +1 -1
- package/dist/cdn/{NSF2LRG3.js → JHWTJY5X.js} +1 -1
- package/dist/cdn/{BNGK5GN6.js → JWLOAQPA.js} +1 -1
- package/dist/cdn/{AJUGPB4Y.js → KC3XI2FK.js} +1 -1
- package/dist/cdn/{3KU4W2T2.js → KDPTMS5S.js} +1 -1
- package/dist/cdn/{R55MDXLV.js → KGRJJLLC.js} +1 -1
- package/dist/cdn/{MQWBJ5XR.js → KIHFIRBW.js} +1 -1
- package/dist/cdn/{QMBJ6VIU.js → KMVCCQJ4.js} +1 -1
- package/dist/cdn/{WVRCYZIT.js → KRDOZILE.js} +1 -1
- package/dist/cdn/{GXT6RGBZ.js → LFLWJJZA.js} +1 -1
- package/dist/cdn/{TODNDEPM.js → LIR56SYG.js} +1 -1
- package/dist/cdn/{LNTR2OTN.js → LQ5YQ3M6.js} +1 -1
- package/dist/cdn/{YRZLI3A6.js → M7AE6Z3D.js} +1 -1
- package/dist/cdn/{QAYYUZNF.js → MDPBLZUD.js} +1 -1
- package/dist/cdn/{X3X4DZL6.js → MUBHW6J6.js} +1 -1
- package/dist/cdn/{NXIPZE3X.js → MWUIRFOB.js} +1 -1
- package/dist/cdn/{TOUDSV6H.js → MXNHKAW7.js} +1 -1
- package/dist/cdn/{B6L4XCKN.js → N33ZK33V.js} +1 -1
- package/dist/cdn/{DPP3XXXY.js → N5YINROO.js} +1 -1
- package/dist/cdn/{TQTRZ73K.js → NGT4EOOR.js} +1 -1
- package/dist/cdn/{SRJ3TSU7.js → NOKKLIRH.js} +1 -1
- package/dist/cdn/{72UHMOP3.js → NPKWQ5Z7.js} +1 -1
- package/dist/cdn/{Q7D4OC2U.js → NPUXGYKK.js} +1 -1
- package/dist/cdn/{OYDU5X6R.js → O45XHTTO.js} +1 -1
- package/dist/cdn/{EOPW2MZD.js → OC7DXYC4.js} +1 -1
- package/dist/cdn/{ZLUC5VO4.js → OEVQ4BJL.js} +1 -1
- package/dist/cdn/{UPMBUO77.js → PLEBDG2W.js} +1 -1
- package/dist/cdn/{AUP6ZCCO.js → PS7KIIQT.js} +1 -1
- package/dist/cdn/{OERUFKHY.js → PVDIUICY.js} +1 -1
- package/dist/cdn/{ON5UVBBW.js → Q4AGP7G7.js} +1 -1
- package/dist/cdn/{I5ABAQVQ.js → Q5PNSK7V.js} +1 -1
- package/dist/cdn/{KQHFOQTQ.js → Q6FRNER7.js} +1 -1
- package/dist/cdn/{POSFWR2R.js → Q6PBNCVQ.js} +1 -1
- package/dist/cdn/{B533HUZM.js → QFA63OKQ.js} +1 -1
- package/dist/cdn/{SGAGH6SD.js → QN2MEVMG.js} +1 -1
- package/dist/cdn/{VGB5L46P.js → QXN2S4SY.js} +1 -1
- package/dist/cdn/{KKKKQLWF.js → RCVRSV36.js} +1 -1
- package/dist/cdn/{CW3RGY32.js → RI7I3SWQ.js} +1 -1
- package/dist/cdn/{256YTYV2.js → RK4ZGFSR.js} +1 -1
- package/dist/cdn/{G7IICTHG.js → RPDQJVDQ.js} +1 -1
- package/dist/cdn/{THYIEUYX.js → RQR7GQWW.js} +1 -1
- package/dist/cdn/{XE7VTTHG.js → RSKCDA4Y.js} +1 -1
- package/dist/cdn/{7T2N2EGO.js → S57EC43R.js} +1 -1
- package/dist/cdn/{XO2MQTXC.js → S725NF4U.js} +1 -1
- package/dist/cdn/{YJ24H5R5.js → SC3LIZQM.js} +1 -1
- package/dist/cdn/{FLZPZGJZ.js → SF65Z6OH.js} +1 -1
- package/dist/cdn/{IO4SS6NR.js → SHTAGRNT.js} +1 -1
- package/dist/cdn/{ON3UPNNB.js → T7Z5PBKB.js} +1 -1
- package/dist/cdn/{3PMQSMCN.js → TH3X452N.js} +1 -1
- package/dist/cdn/{XSFP2DH6.js → TMYO7Y3U.js} +1 -1
- package/dist/cdn/{WGJ2RUQU.js → TVEVCDVP.js} +1 -1
- package/dist/cdn/{7JB37CFF.js → U3TOQLI2.js} +1 -1
- package/dist/cdn/{6UJRS4KL.js → U3UYFDML.js} +1 -1
- package/dist/cdn/{6OYLBGRR.js → UTFSNW2T.js} +1 -1
- package/dist/cdn/{MUCO3RQG.js → UW2PXASN.js} +1 -1
- package/dist/cdn/{UJEHJV2J.js → UXFE5UZ5.js} +1 -1
- package/dist/cdn/{HFOQJZQN.js → V5GD27VR.js} +1 -1
- package/dist/cdn/{VZZJ6KJZ.js → VCPS3WH5.js} +1 -1
- package/dist/cdn/{ICA5H4CC.js → VKPMCKEL.js} +1 -1
- package/dist/cdn/VPOTBTWV.js +2 -0
- package/dist/cdn/{NDA6UAUY.js → VQ3J3K33.js} +1 -1
- package/dist/cdn/{FWUANUNT.js → W55LURB4.js} +1 -1
- package/dist/cdn/{YIWK7LQT.js → WAU3AWKK.js} +1 -1
- package/dist/cdn/{WLVY3TT2.js → WC3V6FME.js} +1 -1
- package/dist/cdn/{PT5MDPKU.js → WDQ5MHS5.js} +1 -1
- package/dist/cdn/{G7IZVLT6.js → WLLIUR2C.js} +1 -1
- package/dist/cdn/{UIBLQRT2.js → WSAXQB4Y.js} +1 -1
- package/dist/cdn/{SY7FPLMP.js → WTVHRK7W.js} +1 -1
- package/dist/cdn/{3J7JDHER.js → X2MXGHMH.js} +1 -1
- package/dist/cdn/{RCUA6CZK.js → XHAKRXPX.js} +1 -1
- package/dist/cdn/{KZLTHP5B.js → XJ4LMSFS.js} +1 -1
- package/dist/cdn/{L5Y2ZYVX.js → XOF56N7N.js} +1 -1
- package/dist/cdn/{5USZI3LP.js → XOVAEQIH.js} +1 -1
- package/dist/cdn/{36BONKIH.js → XY2TYQGP.js} +1 -1
- package/dist/cdn/{T4MMAZBQ.js → Y5OVRT7Q.js} +1 -1
- package/dist/cdn/{RPVB3EN2.js → YFVUBEV5.js} +1 -1
- package/dist/cdn/{7GN6YCTB.js → YQL35R2M.js} +1 -1
- package/dist/cdn/{FP66Y4W4.js → YQVDFZGC.js} +1 -1
- package/dist/cdn/{E56W5Q6H.js → Z224SVDF.js} +1 -1
- package/dist/cdn/{MUFDOMJY.js → ZGANSKJL.js} +1 -1
- package/dist/cdn/{SHBGE7GX.js → ZJRAOPHW.js} +1 -1
- package/dist/cdn/{JJUU5GVJ.js → ZKILL7WF.js} +1 -1
- package/dist/cdn/{CZRIWBN7.js → ZO2DXLVH.js} +1 -1
- package/dist/cdn/{G4FZ7MFW.js → ZS7GWOKU.js} +1 -1
- package/dist/cdn/{RQ7CK7B7.js → ZT72XEHI.js} +1 -1
- package/dist/cdn/{AJR2B3EK.js → ZZVCHQUJ.js} +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/runtime.js +3 -3
- package/dist/components/calcite-dropdown/customElement.js +3 -0
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +2 -2
- package/dist/cdn/GD4EJAGV.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as I}from"./7T2N2EGO.js";import{a as g}from"./QAYYUZNF.js";import{b as C}from"./GZZYSINJ.js";import{a as T}from"./T6CCMW7H.js";import{a as d,b as m}from"./VI7SBYXT.js";import{a as y}from"./T4MMAZBQ.js";import{a as b}from"./ZWPNZ5XW.js";import{e as k}from"./R55MDXLV.js";import{g as x}from"./EKXRU3BE.js";import{C as p,D as r,E as f,F as c,I as l,R as v,g as u,h as n,p as e}from"./TODNDEPM.js";var i={close:"close",container:"container",containerBottom:"container--bottom",content:"content",contentHasText:"content--has-text",iconEnd:"icon-end",iconPresent:"icon-present",iconStart:"icon-start",titleIcon:"calcite-tab-title--icon",scale:s=>`scale-${s}`,selectedIndicator:"selected-indicator"},$="calcite-tab-title",F={host:s=>`${$}-${s}`},A=u`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;outline:2px solid transparent;outline-offset:2px;margin-inline-start:0px}:host([layout=inline]){flex:0 1 auto}:host([layout=center]){flex:1 1 auto}.content{position:relative;margin-block-end:.125rem;box-sizing:border-box;display:flex;block-size:100%;align-items:center;justify-content:center}.scale-s{--calcite-internal-tab-title-close-padding: var(--calcite-spacing-none);--calcite-internal-tab-title-close-margin-start: var(--calcite-spacing-xxs)}.scale-s .content{padding-block:.25rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}.scale-m{--calcite-internal-tab-title-close-padding: var(--calcite-spacing-xxs);--calcite-internal-tab-title-close-margin-start: var(--calcite-spacing-xxs)}.scale-m .content{padding-block:.5rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}.scale-l{--calcite-internal-tab-title-close-padding: var(--calcite-spacing-xxs);--calcite-internal-tab-title-close-margin-start: var(--calcite-spacing-xs)}.scale-l .content{padding-block:var(--calcite-space-sm-plus);font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([closable]) .content{border-block-end-color:transparent}:host([layout=inline]) .content,:host([layout=center]) .content{padding-inline:.25rem}:host([layout=center]) .scale-s,:host([layout=center]) .scale-m,:host([layout=center]) .scale-l{margin-block:0px;justify-content:center;text-align:center}:host([layout=center]) .scale-s .content,:host([layout=center]) .scale-m .content,:host([layout=center]) .scale-l .content{flex:1 1 auto;flex-grow:1}.container{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;align-content:center;justify-content:space-between;padding-inline:0px;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;color:var(--calcite-tab-text-color, var(--calcite-color-text-3));background-color:var(--calcite-tab-background-color, transparent)}.selected-indicator{position:absolute;display:block;block-size:.125rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;inline-size:100%}:host([bordered][selected]) .container:after{position:absolute;display:block;block-size:.125rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;inset-block-end:-1px;inset-inline-start:0;inset-inline-end:0;inline-size:100%;content:""}:host([bordered][selected]) .container.container--bottom:after{inset-block-start:-1px}:host([bordered][selected]:focus) .container:after{background:transparent}.container--bottom .selected-indicator{inset-block-end:unset;inset-block-start:0}:host([bordered]:not([selected]):hover:not(:focus)) .selected-indicator{background-color:var(--calcite-color-foreground-2)}:host([bordered]:not([selected]):hover:not(:focus)) .container:not(.container--bottom) .selected-indicator{box-shadow:inset 0 1px var(--calcite-color-border-1)}:host([bordered]:not([selected]):hover:not(:focus)) .container.container--bottom .selected-indicator{box-shadow:inset 0 -1px var(--calcite-color-border-1)}:host([selected]:focus) .selected-indicator{block-size:4px}.calcite-tab-title--icon{position:relative;margin:0;display:inline-flex;align-self:center}.calcite-tab-title--icon svg{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out}.container{color:var(--calcite-tab-text-color, var(--calcite-color-text-3))}.container .icon-start{color:var(--calcite-tab-icon-color-start, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.container .icon-end{color:var(--calcite-tab-icon-color-end, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.container:hover,.container:active,:host([selected]) .container{color:var(--calcite-tab-text-color-press, var(--calcite-color-text-1))}.container:hover .icon-start,.container:active .icon-start,:host([selected]) .container .icon-start{color:var(--calcite-tab-icon-color-start-press, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.container:hover .icon-end,.container:active .icon-end,:host([selected]) .container .icon-end{color:var(--calcite-tab-icon-color-end-press, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.content--has-text{padding:.25rem}.content--has-text .calcite-tab-title--icon.icon-start{margin-inline-end:var(--calcite-spacing-sm)}.content--has-text .calcite-tab-title--icon.icon-end{margin-inline-start:var(--calcite-spacing-sm)}:host([bordered]) .container{border-color:transparent;border-inline-width:var(--calcite-spacing-px);border-inline-style:solid}:host([bordered]) .container.container--bottom{border-block-start-style:solid;border-block-start-width:1px}:host([bordered]) .container.container--bottom .selected-indicator{inset-block-start:unset;inset-block-end:0}:host([bordered]) .container:not(.container--bottom){border-block-end-style:solid;border-block-end-width:1px}:host([bordered]) .container .selected-indicator{inset-block-start:0;inset-block-end:unset;inset-inline-start:-1px;inset-inline-end:0;inline-size:calc(100% + var(--calcite-spacing-base))}:host([bordered]) .container:host(:not([selected])) .container{box-shadow:0 2px 0 0 transparent}:host([bordered]) .container:host(:not([selected])):host(:hover) .container:not(.container--bottom){border-block-end-color:var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) .selected-indicator{box-shadow:inset 0 var(--calcite-internal-tab-shadow-length) var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) :not(.container--bottom){--calcite-internal-tab-shadow-length: 1px}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) .container--bottom{--calcite-internal-tab-shadow-length: -1px}:host([bordered]) .container:hover{background-color:var(--calcite-tab-background-color-hover, var(--calcite-color-foreground-2));border-block-end-color:var(--calcite-color-border-1)}:host(:hover) .selected-indicator{background-color:var(--calcite-color-border-3)}:host([selected]) .selected-indicator,:host([selected]:hover) .selected-indicator,:host(:focus) .selected-indicator,:host(:active) .selected-indicator{background-color:var(--calcite-tab-accent-color-press, var(--calcite-color-brand))}:host([closed]){display:none}:host([selected][bordered]) .container{border-inline-color:var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([selected][bordered]) .container:after{background-color:var(--calcite-tab-background-color, var(--calcite-color-foreground-1))}:host([selected][bordered]) .container:hover,:host([selected][bordered]) .container:active{background:transparent}:host(:focus) .container{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(:focus) .container:focus-within{outline-color:transparent}:host([icon-start][icon-end]) .calcite-tab-title--icon:first-child{margin-inline-end:var(--calcite-spacing-sm)}:host([layout=inline][bordered]) .scale-m .content,:host([layout=center][bordered]) .scale-m .content{padding-inline:.75rem}:host([layout=inline][bordered]) .scale-s .content,:host([layout=center][bordered]) .scale-s .content{padding-inline:.5rem}:host([layout=inline][bordered]) .scale-l .content,:host([layout=center][bordered]) .scale-l .content{padding-inline:1rem}:host([layout=inline][closable]) .scale-s .content,:host([layout=inline][closable]) .scale-m .content,:host([layout=inline][closable]) .scale-l .content{padding-inline-end:0}.close{--calcite-internal-action-spacing: var(--calcite-internal-tab-title-close-padding);--calcite-internal-action-min-height: unset;--calcite-action-text-color: var(--calcite-tab-close-icon-color);--calcite-action-text-color-press: var(--calcite-tab-close-icon-color-press);--calcite-action-background-color: var(--calcite-tab-close-icon-background-color);--calcite-action-background-color-press: var(--calcite-tab-close-icon-background-color-press);--calcite-action-background-color-hover: var(--calcite-tab-close-icon-background-color-hover);margin:auto;margin-inline:var(--calcite-spacing-sm) var(--calcite-internal-tab-title-close-margin-start)}@media(forced-colors:active){:host{outline-width:0;outline-offset:0}:host(:focus) .container{outline-color:highlight}:host([bordered][selected]) .container{border-block-end-style:none}:host([bordered][selected]) .container--bottom{border-block-start-style:none}.selected-indicator{background-color:highlight}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) .container{pointer-events:none;opacity:.5}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,h=class extends f{constructor(){super(),this.closeButtonRef=p(),this.direction=k(),this.guid=F.host(T()),this.mutationObserver=d("mutation",()=>this.updateHasText()),this.parentTabsEl=null,this.resizeObserver=d("resize",()=>{this.calciteInternalTabIconChanged.emit()}),this.messages=y(),this.interactiveContainer=I(this),this.controls=null,this.hasText=!1,this.bordered=!1,this.closable=!1,this.closed=!1,this.disabled=!1,this.position="top",this.scale="m",this.selected=!1,this.calciteInternalTabIconChanged=e({cancelable:!1}),this.calciteInternalTabTitleRegister=e({cancelable:!1}),this.calciteInternalTabTitleCloseChange=e({cancelable:!1}),this.calciteInternalTabsActivate=e({cancelable:!1}),this.calciteInternalTabsClose=e({cancelable:!1}),this.calciteInternalTabsFocusFirst=e({cancelable:!1}),this.calciteInternalTabsFocusLast=e({cancelable:!1}),this.calciteInternalTabsFocusNext=e({cancelable:!1}),this.calciteInternalTabsFocusPrevious=e({cancelable:!1}),this.calciteTabsActivate=e({cancelable:!1}),this.calciteTabsClose=e({cancelable:!1}),this.listenOn(document.body,"calciteInternalTabChange",this.internalTabChangeHandler),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={controls:[16,{},{state:!0}],hasText:[16,{},{state:!0}],bordered:[7,{},{reflect:!0,type:Boolean}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],iconEnd:[3,{},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],position:1,scale:1,selected:[7,{},{reflect:!0,type:Boolean}],tab:[3,{},{reflect:!0}]}}static{this.styles=A}async activateTab(t=!0){if(this.disabled||this.closed)return;let o={tab:this.tab,userTriggered:t};this.calciteInternalTabsActivate.emit(o),t&&requestAnimationFrame(()=>this.calciteTabsActivate.emit())}async getTabIdentifier(){return this.tab?this.tab:this.getTabIndex()}async getTabIndex(){return Array.prototype.indexOf.call(x(this.el.parentElement.children).filter(t=>t.matches("calcite-tab-title")),this.el)}_updateAriaInfo(t=[],o=[]){this.controls=t[o.indexOf(this.el.id)]||null}connectedCallback(){super.connectedCallback(),this.setupTextContentObserver(),this.parentTabsEl=this.el.closest("calcite-tabs")}async load(){this.updateHasText(),this.tab&&this.selected&&this.activateTab(!1)}willUpdate(t){t.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.selectedHandler(),t.has("closed")&&this.hasUpdated&&this.calciteInternalTabTitleCloseChange.emit(),this.parentTabsEl&&(this.layout=this.parentTabsEl.layout,this.bordered=this.parentTabsEl.bordered)}async loaded(){this.calciteInternalTabTitleRegister.emit(await this.getTabIdentifier())}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),document.body?.dispatchEvent(new CustomEvent("calciteTabTitleUnregister",{detail:this.el})),this.resizeObserver?.disconnect()}selectedHandler(){this.selected&&this.activateTab(!1)}internalTabChangeHandler(t){t.composedPath().find(a=>a.tagName==="CALCITE-TABS")===this.parentTabsEl&&(this.tab?this.selected=this.tab===t.detail.tab:this.getTabIndex().then(a=>{this.selected=a===t.detail.tab}),t.stopPropagation())}onClick(){this.activateTab()}keyDownHandler(t){switch(t.key){case" ":case"Enter":t.composedPath().includes(this.closeButtonRef.value)||(this.activateTab(),t.preventDefault());break;case"ArrowRight":t.preventDefault(),this.direction==="ltr"?this.calciteInternalTabsFocusNext.emit():this.calciteInternalTabsFocusPrevious.emit();break;case"ArrowLeft":t.preventDefault(),this.direction==="ltr"?this.calciteInternalTabsFocusPrevious.emit():this.calciteInternalTabsFocusNext.emit();break;case"Home":t.preventDefault(),this.calciteInternalTabsFocusFirst.emit();break;case"End":t.preventDefault(),this.calciteInternalTabsFocusLast.emit();break}}closeClickHandler(){this.closeTabTitleAndNotify()}updateHasText(){this.hasText=this.el.textContent.trim().length>0}setContainerRef(t){m(this.resizeObserver,this.containerEl,t),this.containerEl=t}setupTextContentObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}closeTabTitleAndNotify(){this.closed=!0,this.calciteInternalTabsClose.emit({tab:this.tab}),requestAnimationFrame(()=>this.calciteTabsClose.emit())}render(){let{el:t,closed:o}=this,a=t.id||this.guid,z=n`<calcite-icon class=${c({[i.titleIcon]:!0,[i.iconStart]:!0})} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${b(this.scale)}></calcite-icon>`,w=n`<calcite-icon class=${c({[i.titleIcon]:!0,[i.iconEnd]:!0})} .flipRtl=${this.iconFlipRtl==="end"||this.iconFlipRtl==="both"} .icon=${this.iconEnd} .scale=${b(this.scale)}></calcite-icon>`;return l(this.el,"aria-controls",this.controls),this.el.ariaSelected=C(this.selected),l(this.el,"id",a),this.el.role="tab",l(this.el,"tabIndex",this.selected&&!this.disabled?0:-1),this.interactiveContainer({disabled:this.disabled,children:n`<div class=${c({[i.container]:!0,[i.containerBottom]:this.position==="bottom",[i.iconPresent]:!!this.iconStart||!!this.iconEnd,[i.scale(this.scale)]:!0})} .hidden=${o} ${r(this.setContainerRef)}><div class=${c({[i.content]:!0,[i.contentHasText]:this.hasText})}>${this.iconStart?z:null}<slot></slot>${this.iconEnd?w:null}</div>${this.renderCloseButton()}<div class=${c(i.selectedIndicator)}></div></div>`})}renderCloseButton(){let{closable:t,messages:o}=this;return t?g("close-button",n`<calcite-action class=${c(i.close)} icon=x @click=${this.closeClickHandler} .scale=${this.scale} .text=${o.close} ${r(this.closeButtonRef)}></calcite-action>`):null}};v("calcite-tab-title",h);export{h as TabTitle};
|
|
2
|
+
import{a as I}from"./S57EC43R.js";import{a as g}from"./MDPBLZUD.js";import{b as C}from"./GZZYSINJ.js";import{a as T}from"./T6CCMW7H.js";import{a as d,b as m}from"./VI7SBYXT.js";import{a as y}from"./Y5OVRT7Q.js";import{a as b}from"./ZWPNZ5XW.js";import{e as k}from"./KGRJJLLC.js";import{g as x}from"./6SSCE6VG.js";import{C as p,D as r,E as f,F as c,I as l,R as v,g as u,h as n,p as e}from"./LIR56SYG.js";var i={close:"close",container:"container",containerBottom:"container--bottom",content:"content",contentHasText:"content--has-text",iconEnd:"icon-end",iconPresent:"icon-present",iconStart:"icon-start",titleIcon:"calcite-tab-title--icon",scale:s=>`scale-${s}`,selectedIndicator:"selected-indicator"},$="calcite-tab-title",F={host:s=>`${$}-${s}`},A=u`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;outline:2px solid transparent;outline-offset:2px;margin-inline-start:0px}:host([layout=inline]){flex:0 1 auto}:host([layout=center]){flex:1 1 auto}.content{position:relative;margin-block-end:.125rem;box-sizing:border-box;display:flex;block-size:100%;align-items:center;justify-content:center}.scale-s{--calcite-internal-tab-title-close-padding: var(--calcite-spacing-none);--calcite-internal-tab-title-close-margin-start: var(--calcite-spacing-xxs)}.scale-s .content{padding-block:.25rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}.scale-m{--calcite-internal-tab-title-close-padding: var(--calcite-spacing-xxs);--calcite-internal-tab-title-close-margin-start: var(--calcite-spacing-xxs)}.scale-m .content{padding-block:.5rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}.scale-l{--calcite-internal-tab-title-close-padding: var(--calcite-spacing-xxs);--calcite-internal-tab-title-close-margin-start: var(--calcite-spacing-xs)}.scale-l .content{padding-block:var(--calcite-space-sm-plus);font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([closable]) .content{border-block-end-color:transparent}:host([layout=inline]) .content,:host([layout=center]) .content{padding-inline:.25rem}:host([layout=center]) .scale-s,:host([layout=center]) .scale-m,:host([layout=center]) .scale-l{margin-block:0px;justify-content:center;text-align:center}:host([layout=center]) .scale-s .content,:host([layout=center]) .scale-m .content,:host([layout=center]) .scale-l .content{flex:1 1 auto;flex-grow:1}.container{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;align-content:center;justify-content:space-between;padding-inline:0px;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;color:var(--calcite-tab-text-color, var(--calcite-color-text-3));background-color:var(--calcite-tab-background-color, transparent)}.selected-indicator{position:absolute;display:block;block-size:.125rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;inline-size:100%}:host([bordered][selected]) .container:after{position:absolute;display:block;block-size:.125rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;inset-block-end:-1px;inset-inline-start:0;inset-inline-end:0;inline-size:100%;content:""}:host([bordered][selected]) .container.container--bottom:after{inset-block-start:-1px}:host([bordered][selected]:focus) .container:after{background:transparent}.container--bottom .selected-indicator{inset-block-end:unset;inset-block-start:0}:host([bordered]:not([selected]):hover:not(:focus)) .selected-indicator{background-color:var(--calcite-color-foreground-2)}:host([bordered]:not([selected]):hover:not(:focus)) .container:not(.container--bottom) .selected-indicator{box-shadow:inset 0 1px var(--calcite-color-border-1)}:host([bordered]:not([selected]):hover:not(:focus)) .container.container--bottom .selected-indicator{box-shadow:inset 0 -1px var(--calcite-color-border-1)}:host([selected]:focus) .selected-indicator{block-size:4px}.calcite-tab-title--icon{position:relative;margin:0;display:inline-flex;align-self:center}.calcite-tab-title--icon svg{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out}.container{color:var(--calcite-tab-text-color, var(--calcite-color-text-3))}.container .icon-start{color:var(--calcite-tab-icon-color-start, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.container .icon-end{color:var(--calcite-tab-icon-color-end, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.container:hover,.container:active,:host([selected]) .container{color:var(--calcite-tab-text-color-press, var(--calcite-color-text-1))}.container:hover .icon-start,.container:active .icon-start,:host([selected]) .container .icon-start{color:var(--calcite-tab-icon-color-start-press, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.container:hover .icon-end,.container:active .icon-end,:host([selected]) .container .icon-end{color:var(--calcite-tab-icon-color-end-press, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.content--has-text{padding:.25rem}.content--has-text .calcite-tab-title--icon.icon-start{margin-inline-end:var(--calcite-spacing-sm)}.content--has-text .calcite-tab-title--icon.icon-end{margin-inline-start:var(--calcite-spacing-sm)}:host([bordered]) .container{border-color:transparent;border-inline-width:var(--calcite-spacing-px);border-inline-style:solid}:host([bordered]) .container.container--bottom{border-block-start-style:solid;border-block-start-width:1px}:host([bordered]) .container.container--bottom .selected-indicator{inset-block-start:unset;inset-block-end:0}:host([bordered]) .container:not(.container--bottom){border-block-end-style:solid;border-block-end-width:1px}:host([bordered]) .container .selected-indicator{inset-block-start:0;inset-block-end:unset;inset-inline-start:-1px;inset-inline-end:0;inline-size:calc(100% + var(--calcite-spacing-base))}:host([bordered]) .container:host(:not([selected])) .container{box-shadow:0 2px 0 0 transparent}:host([bordered]) .container:host(:not([selected])):host(:hover) .container:not(.container--bottom){border-block-end-color:var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) .selected-indicator{box-shadow:inset 0 var(--calcite-internal-tab-shadow-length) var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) :not(.container--bottom){--calcite-internal-tab-shadow-length: 1px}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) .container--bottom{--calcite-internal-tab-shadow-length: -1px}:host([bordered]) .container:hover{background-color:var(--calcite-tab-background-color-hover, var(--calcite-color-foreground-2));border-block-end-color:var(--calcite-color-border-1)}:host(:hover) .selected-indicator{background-color:var(--calcite-color-border-3)}:host([selected]) .selected-indicator,:host([selected]:hover) .selected-indicator,:host(:focus) .selected-indicator,:host(:active) .selected-indicator{background-color:var(--calcite-tab-accent-color-press, var(--calcite-color-brand))}:host([closed]){display:none}:host([selected][bordered]) .container{border-inline-color:var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([selected][bordered]) .container:after{background-color:var(--calcite-tab-background-color, var(--calcite-color-foreground-1))}:host([selected][bordered]) .container:hover,:host([selected][bordered]) .container:active{background:transparent}:host(:focus) .container{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(:focus) .container:focus-within{outline-color:transparent}:host([icon-start][icon-end]) .calcite-tab-title--icon:first-child{margin-inline-end:var(--calcite-spacing-sm)}:host([layout=inline][bordered]) .scale-m .content,:host([layout=center][bordered]) .scale-m .content{padding-inline:.75rem}:host([layout=inline][bordered]) .scale-s .content,:host([layout=center][bordered]) .scale-s .content{padding-inline:.5rem}:host([layout=inline][bordered]) .scale-l .content,:host([layout=center][bordered]) .scale-l .content{padding-inline:1rem}:host([layout=inline][closable]) .scale-s .content,:host([layout=inline][closable]) .scale-m .content,:host([layout=inline][closable]) .scale-l .content{padding-inline-end:0}.close{--calcite-internal-action-spacing: var(--calcite-internal-tab-title-close-padding);--calcite-internal-action-min-height: unset;--calcite-action-text-color: var(--calcite-tab-close-icon-color);--calcite-action-text-color-press: var(--calcite-tab-close-icon-color-press);--calcite-action-background-color: var(--calcite-tab-close-icon-background-color);--calcite-action-background-color-press: var(--calcite-tab-close-icon-background-color-press);--calcite-action-background-color-hover: var(--calcite-tab-close-icon-background-color-hover);margin:auto;margin-inline:var(--calcite-spacing-sm) var(--calcite-internal-tab-title-close-margin-start)}@media(forced-colors:active){:host{outline-width:0;outline-offset:0}:host(:focus) .container{outline-color:highlight}:host([bordered][selected]) .container{border-block-end-style:none}:host([bordered][selected]) .container--bottom{border-block-start-style:none}.selected-indicator{background-color:highlight}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) .container{pointer-events:none;opacity:.5}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,h=class extends f{constructor(){super(),this.closeButtonRef=p(),this.direction=k(),this.guid=F.host(T()),this.mutationObserver=d("mutation",()=>this.updateHasText()),this.parentTabsEl=null,this.resizeObserver=d("resize",()=>{this.calciteInternalTabIconChanged.emit()}),this.messages=y(),this.interactiveContainer=I(this),this.controls=null,this.hasText=!1,this.bordered=!1,this.closable=!1,this.closed=!1,this.disabled=!1,this.position="top",this.scale="m",this.selected=!1,this.calciteInternalTabIconChanged=e({cancelable:!1}),this.calciteInternalTabTitleRegister=e({cancelable:!1}),this.calciteInternalTabTitleCloseChange=e({cancelable:!1}),this.calciteInternalTabsActivate=e({cancelable:!1}),this.calciteInternalTabsClose=e({cancelable:!1}),this.calciteInternalTabsFocusFirst=e({cancelable:!1}),this.calciteInternalTabsFocusLast=e({cancelable:!1}),this.calciteInternalTabsFocusNext=e({cancelable:!1}),this.calciteInternalTabsFocusPrevious=e({cancelable:!1}),this.calciteTabsActivate=e({cancelable:!1}),this.calciteTabsClose=e({cancelable:!1}),this.listenOn(document.body,"calciteInternalTabChange",this.internalTabChangeHandler),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={controls:[16,{},{state:!0}],hasText:[16,{},{state:!0}],bordered:[7,{},{reflect:!0,type:Boolean}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],iconEnd:[3,{},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],position:1,scale:1,selected:[7,{},{reflect:!0,type:Boolean}],tab:[3,{},{reflect:!0}]}}static{this.styles=A}async activateTab(t=!0){if(this.disabled||this.closed)return;let o={tab:this.tab,userTriggered:t};this.calciteInternalTabsActivate.emit(o),t&&requestAnimationFrame(()=>this.calciteTabsActivate.emit())}async getTabIdentifier(){return this.tab?this.tab:this.getTabIndex()}async getTabIndex(){return Array.prototype.indexOf.call(x(this.el.parentElement.children).filter(t=>t.matches("calcite-tab-title")),this.el)}_updateAriaInfo(t=[],o=[]){this.controls=t[o.indexOf(this.el.id)]||null}connectedCallback(){super.connectedCallback(),this.setupTextContentObserver(),this.parentTabsEl=this.el.closest("calcite-tabs")}async load(){this.updateHasText(),this.tab&&this.selected&&this.activateTab(!1)}willUpdate(t){t.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.selectedHandler(),t.has("closed")&&this.hasUpdated&&this.calciteInternalTabTitleCloseChange.emit(),this.parentTabsEl&&(this.layout=this.parentTabsEl.layout,this.bordered=this.parentTabsEl.bordered)}async loaded(){this.calciteInternalTabTitleRegister.emit(await this.getTabIdentifier())}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),document.body?.dispatchEvent(new CustomEvent("calciteTabTitleUnregister",{detail:this.el})),this.resizeObserver?.disconnect()}selectedHandler(){this.selected&&this.activateTab(!1)}internalTabChangeHandler(t){t.composedPath().find(a=>a.tagName==="CALCITE-TABS")===this.parentTabsEl&&(this.tab?this.selected=this.tab===t.detail.tab:this.getTabIndex().then(a=>{this.selected=a===t.detail.tab}),t.stopPropagation())}onClick(){this.activateTab()}keyDownHandler(t){switch(t.key){case" ":case"Enter":t.composedPath().includes(this.closeButtonRef.value)||(this.activateTab(),t.preventDefault());break;case"ArrowRight":t.preventDefault(),this.direction==="ltr"?this.calciteInternalTabsFocusNext.emit():this.calciteInternalTabsFocusPrevious.emit();break;case"ArrowLeft":t.preventDefault(),this.direction==="ltr"?this.calciteInternalTabsFocusPrevious.emit():this.calciteInternalTabsFocusNext.emit();break;case"Home":t.preventDefault(),this.calciteInternalTabsFocusFirst.emit();break;case"End":t.preventDefault(),this.calciteInternalTabsFocusLast.emit();break}}closeClickHandler(){this.closeTabTitleAndNotify()}updateHasText(){this.hasText=this.el.textContent.trim().length>0}setContainerRef(t){m(this.resizeObserver,this.containerEl,t),this.containerEl=t}setupTextContentObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}closeTabTitleAndNotify(){this.closed=!0,this.calciteInternalTabsClose.emit({tab:this.tab}),requestAnimationFrame(()=>this.calciteTabsClose.emit())}render(){let{el:t,closed:o}=this,a=t.id||this.guid,z=n`<calcite-icon class=${c({[i.titleIcon]:!0,[i.iconStart]:!0})} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${b(this.scale)}></calcite-icon>`,w=n`<calcite-icon class=${c({[i.titleIcon]:!0,[i.iconEnd]:!0})} .flipRtl=${this.iconFlipRtl==="end"||this.iconFlipRtl==="both"} .icon=${this.iconEnd} .scale=${b(this.scale)}></calcite-icon>`;return l(this.el,"aria-controls",this.controls),this.el.ariaSelected=C(this.selected),l(this.el,"id",a),this.el.role="tab",l(this.el,"tabIndex",this.selected&&!this.disabled?0:-1),this.interactiveContainer({disabled:this.disabled,children:n`<div class=${c({[i.container]:!0,[i.containerBottom]:this.position==="bottom",[i.iconPresent]:!!this.iconStart||!!this.iconEnd,[i.scale(this.scale)]:!0})} .hidden=${o} ${r(this.setContainerRef)}><div class=${c({[i.content]:!0,[i.contentHasText]:this.hasText})}>${this.iconStart?z:null}<slot></slot>${this.iconEnd?w:null}</div>${this.renderCloseButton()}<div class=${c(i.selectedIndicator)}></div></div>`})}renderCloseButton(){let{closable:t,messages:o}=this;return t?g("close-button",n`<calcite-action class=${c(i.close)} icon=x @click=${this.closeClickHandler} .scale=${this.scale} .text=${o.close} ${r(this.closeButtonRef)}></calcite-action>`):null}};v("calcite-tab-title",h);export{h as TabTitle};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as t,b as y}from"./Q24FQVQ4.js";import{a as I}from"./
|
|
2
|
+
import{a as t,b as y}from"./Q24FQVQ4.js";import{a as I}from"./S57EC43R.js";import{b as $}from"./GZZYSINJ.js";import{a as k}from"./RQR7GQWW.js";import{a as s}from"./ZWPNZ5XW.js";import"./KGRJJLLC.js";import"./6SSCE6VG.js";import{C as v,D as g,E as b,F as o,H as l,I as w,R as x,g as f,h as i,p as r}from"./LIR56SYG.js";var q=f`: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:flex;flex-grow:1;align-items:center;outline:2px solid transparent;outline-offset:2px}.container{position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;text-decoration-line:none;color:var(--calcite-dropdown-item-text-color, var(--calcite-color-text-1));text-align:start}.container a{outline:none;position:relative;display:flex;flex-grow:1;cursor:pointer;align-items:center;text-decoration-line:none;color:var(--calcite-dropdown-item-text-color, var(--calcite-color-text-1))}.content{flex:1 1 auto}.icon{position:relative;opacity:0;transition-timing-function:cubic-bezier(.4,0,.2,1);transform:scale(.9)}.icon--start,.icon--end{--calcite-icon-color: var(--calcite-dropdown-item-text-color, var(--calcite-color-text-3))}:host([scale=s]) .container{padding-block:.25rem;padding-inline:.5rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}:host([scale=s]) .icon,:host([scale=s]) .icon--start{padding-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .icon--end{padding-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .container{padding-block:.5rem;padding-inline:.75rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}:host([scale=m]) .icon,:host([scale=m]) .icon--start{padding-inline-end:var(--calcite-spacing-md)}:host([scale=m]) .icon--end{padding-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .container{padding-block:var(--calcite-space-sm-plus);padding-inline:1rem;font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([scale=l]) .icon,:host([scale=l]) .icon--start{padding-inline-end:var(--calcite-spacing-lg)}:host([scale=l]) .icon--end{padding-inline-start:var(--calcite-spacing-lg)}:host(:focus) .container,:host([active-descendant]) .container{text-decoration-line:none;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(:hover:not([disabled])) .container{background-color:var(--calcite-dropdown-item-background-color-hover, var(--calcite-color-foreground-2))}:host(:active:not([disabled])) .container{background-color:var(--calcite-dropdown-item-background-color-press, var(--calcite-color-foreground-3))}:host(:hover:not([disabled])) .container,:host(:active:not([disabled])) .container{text-decoration-line:none;color:var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host(:hover:not([disabled])) .icon--start,:host(:hover:not([disabled])) .icon--end,:host(:active:not([disabled])) .icon--start,:host(:active:not([disabled])) .icon--end{--calcite-icon-color: var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host(:hover:not([disabled])) .link,:host(:active:not([disabled])) .link{color:var(--calcite-dropdown-item-text-color-press, var(--calcite-color-text-1))}:host([selected]) .container:not(.container--none-selection),:host([selected]) .link{font-weight:var(--calcite-font-weight-medium);--calcite-internal-dropdown-item-text-color: var( --calcite-dropdown-item-text-color-press, var(--calcite-color-text-1) );color:var(--calcite-internal-dropdown-item-text-color)}:host([selected]) .container:not(.container--none-selection) .icon,:host([selected]) .link .icon{--calcite-icon-color: var(--calcite-dropdown-item-icon-color-press, var(--calcite-color-brand))}:host([selected]) .container:not(.container--none-selection) .icon--start,:host([selected]) .container:not(.container--none-selection) .icon--end,:host([selected]) .link .icon--start,:host([selected]) .link .icon--end{--calcite-icon-color: var(--calcite-internal-dropdown-item-text-color)}:host(:hover:not([disabled])) .icon{--calcite-icon-color: var(--calcite-dropdown-item-icon-color-hover)}:host([selected]) .icon{opacity:1}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,d=class extends b{constructor(){super(),this.childLinkRef=v(),this.focusSetter=k()(this),this.interactiveContainer=I(this),this.disabled=!1,this.activeDescendant=!1,this.scale="m",this.selected=!1,this.selectionMode="single",this.calciteDropdownItemSelect=r({cancelable:!1}),this.calciteInternalDropdownItemSelect=r({cancelable:!1}),this.listen("click",this.onClick),this.listenOn(document.body,"calciteInternalDropdownItemChange",this.updateActiveItemOnChange)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],activeDescendant:[7,{},{reflect:!0,type:Boolean}],href:[3,{},{reflect:!0}],iconEnd:[3,{},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{},{reflect:!0}],label:1,rel:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:1,target:[3,{},{reflect:!0}]}}static{this.styles=q}async setFocus(e){return this.focusSetter(()=>this.el,e)}async activateItem(){if(!this.disabled){if(this.href){this.childLinkRef.value?.click();return}this.emitRequestedItem()}}connectedCallback(){super.connectedCallback(),this.initialize()}load(){this.initialize()}onClick(){this.emitRequestedItem()}updateActiveItemOnChange(e){this.parentDropdownGroupEl&&e.composedPath().includes(this.parentDropdownGroupEl)&&(this.requestedDropdownGroup=e.detail.requestedDropdownGroup,this.requestedDropdownItem=e.detail.requestedDropdownItem,this.determineActiveItem()),e.stopPropagation()}initialize(){this.parentDropdownGroupEl=this.el.closest("calcite-dropdown-group")??void 0,this.selectionMode==="none"&&(this.selected=!1)}determineActiveItem(){switch(this.selectionMode){case"multiple":this.el===this.requestedDropdownItem&&(this.selected=!this.selected);break;case"single":this.el===this.requestedDropdownItem?this.selected=!0:this.requestedDropdownGroup===this.parentDropdownGroupEl&&(this.selected=!1);break;case"none":this.selected=!1;break}}emitRequestedItem(){this.calciteDropdownItemSelect.emit(),this.calciteInternalDropdownItemSelect.emit({requestedDropdownItem:this.el,requestedDropdownGroup:this.parentDropdownGroupEl})}render(){let{href:e,selectionMode:c,label:h,iconFlipRtl:n}=this,p=i`<calcite-icon class=${o(t.iconStart)} .flipRtl=${n==="start"||n==="both"} .icon=${this.iconStart} .scale=${s(this.scale)}></calcite-icon>`,a=i`<span class=${o(t.itemContent)}><slot></slot></span>`,m=i`<calcite-icon class=${o(t.iconEnd)} .flipRtl=${n==="end"||n==="both"} .icon=${this.iconEnd} .scale=${s(this.scale)}></calcite-icon>`,u=this.iconStart&&this.iconEnd?[p,a,m]:this.iconStart?[p,a]:this.iconEnd?[a,m]:a,D=e?i`<a .ariaLabel=${h} class=${o(t.link)} href=${e??l} rel=${this.rel??l} tabindex=-1 target=${this.target??l} ${g(this.childLinkRef)}>${u}</a>`:u,E=e?null:c==="single"?"menuitemradio":c==="multiple"?"menuitemcheckbox":"menuitem",C=c!=="none"?$(this.selected):null,{disabled:S}=this;return this.el.ariaChecked=C,this.el.ariaLabel=e?"":h??null,this.el.role=E,w(this.el,"tabIndex",-1),this.interactiveContainer({disabled:S,children:i`<div class=${o({[t.container]:!0,[t.containerNone]:c==="none"})}>${c!=="none"?i`<calcite-icon class=${o(t.icon)} .icon=${y.check} .scale=${s(this.scale)}></calcite-icon>`:null}${D}</div>`})}};x("calcite-dropdown-item",d);export{d as DropdownItem};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as Dt}from"./5EBGPCB7.js";import{L as Lt,O as Tt}from"./TODNDEPM.js";var yt=["top","right","bottom","left"],Ft=["start","end"],vt=yt.reduce((t,e)=>t.concat(e,e+"-"+Ft[0],e+"-"+Ft[1]),[]),U=Math.min,B=Math.max,st=Math.round,rt=Math.floor,$=t=>({x:t,y:t}),Oe={left:"right",right:"left",bottom:"top",top:"bottom"};function bt(t,e,n){return B(t,U(e,n))}function I(t,e){return typeof t=="function"?t(e):t}function _(t){return t.split("-")[0]}function F(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function ut(t){return t==="y"?"height":"width"}function H(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function dt(t){return At(H(t))}function Ot(t,e,n){n===void 0&&(n=!1);let o=F(t),i=dt(t),s=ut(i),r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=it(r)),[r,it(r)]}function $t(t){let e=it(t);return[ot(t),e,ot(e)]}function ot(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var Mt=["left","right"],Nt=["right","left"],Re=["top","bottom"],Pe=["bottom","top"];function Ce(t,e,n){switch(t){case"top":case"bottom":return n?e?Nt:Mt:e?Mt:Nt;case"left":case"right":return e?Re:Pe;default:return[]}}function kt(t,e,n,o){let i=F(t),s=Ce(_(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(ot)))),s}function it(t){let e=_(t);return Oe[e]+t.slice(e.length)}function Se(t){var e,n,o,i;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(i=t.left)!=null?i:0}}function Rt(t){return typeof t!="number"?Se(t):{top:t,right:t,bottom:t,left:t}}function q(t){let{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Wt(t,e,n){let{reference:o,floating:i}=t,s=H(e),r=dt(e),c=ut(r),a=_(e),l=s==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2,f;switch(a){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}let g=F(e);return g&&(f[r]+=m*(g==="end"?1:-1)*(n&&l?-1:1)),f}async function Ht(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:s,rects:r,elements:c,strategy:a}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=I(e,t),g=Rt(f),w=c[m?u==="floating"?"reference":"floating":u],h=q(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:l,rootBoundary:d,strategy:a})),x=u==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),b=await(s.isElement==null?void 0:s.isElement(y))&&await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1},O=q(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:a}):x);return{top:(h.top-O.top+g.top)/b.y,bottom:(O.bottom-h.bottom+g.bottom)/b.y,left:(h.left-O.left+g.left)/b.x,right:(O.right-h.right+g.right)/b.x}}var Ee=50,Vt=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:{...r,detectOverflow:Ht},a=await(r.isRTL==null?void 0:r.isRTL(e)),l=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Wt(l,o,a),m=o,f=0,g={};for(let p=0;p<s.length;p++){let w=s[p];if(!w)continue;let{name:h,fn:x}=w,{x:y,y:b,data:O,reset:A}=await x({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:g,rects:l,platform:c,elements:{reference:t,floating:e}});d=y??d,u=b??u,g[h]={...g[h],...O},A&&f<Ee&&(f++,typeof A=="object"&&(A.placement&&(m=A.placement),A.rects&&(l=A.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):A.rects),{x:d,y:u}=Wt(l,m,a)),p=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:g}},zt=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:o,placement:i,rects:s,platform:r,elements:c,middlewareData:a}=e,{element:l,padding:d=0}=I(t,e)||{};if(l==null)return{};let u=Rt(d),m={x:n,y:o},f=dt(i),g=ut(f),p=await r.getDimensions(l),w=f==="y",h=w?"top":"left",x=w?"bottom":"right",y=w?"clientHeight":"clientWidth",b=s.reference[g]+s.reference[f]-m[f]-s.floating[g],O=m[f]-s.reference[f],A=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l)),R=A?A[y]:0;(!R||!await(r.isElement==null?void 0:r.isElement(A)))&&(R=c.floating[y]||s.floating[g]);let S=b/2-O/2,P=R/2-p[g]/2-1,v=U(u[h],P),L=U(u[x],P),X=R-p[g]-L,E=R/2-p[g]/2+S,T=bt(v,E,X),Y=!a.arrow&&F(i)!=null&&E!==T&&s.reference[g]/2-(E<v?v:L)-p[g]/2<0,W=Y?E<v?E-v:E-X:0;return{[f]:m[f]+W,data:{[f]:T,centerOffset:E-T-W,...Y&&{alignmentOffset:W}},reset:Y}}});function Le(t,e,n){return(t?[...n.filter(i=>F(i)===t),...n.filter(i=>F(i)!==t)]:n.filter(i=>_(i)===i)).filter(i=>t?F(i)===t||(e?ot(i)!==i:!1):!0)}var Ut=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;let{rects:s,middlewareData:r,placement:c,platform:a,elements:l}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=vt,autoAlignment:f=!0,...g}=I(t,e),p=u!==void 0||m===vt?Le(u||null,f,m):m,w=((n=r.autoPlacement)==null?void 0:n.index)||0,h=p[w];if(h==null)return{};if(c!==h)return{reset:{placement:p[0]}};let x=await a.detectOverflow(e,g),y=Ot(h,s,await(a.isRTL==null?void 0:a.isRTL(l.floating))),b=[x[_(h)],x[y[0]],x[y[1]]],O=[...((o=r.autoPlacement)==null?void 0:o.overflows)||[],{placement:h,overflows:b}],A=p[w+1];if(A)return{data:{index:w+1,overflows:O},reset:{placement:A}};let R=O.map(v=>{let L=F(v.placement);return[v.placement,L&&d?v.overflows.slice(0,2).reduce((X,E)=>X+E,0):v.overflows[0],v.overflows]}).sort((v,L)=>v[1]-L[1]),P=((i=R.filter(v=>v[2].slice(0,F(v[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||R[0][0];return P!==c?{data:{index:w+1,overflows:O},reset:{placement:P}}:{}}}},It=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:a,elements:l}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...w}=I(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let h=_(i),x=H(c),y=_(c)===c,b=await(a.isRTL==null?void 0:a.isRTL(l.floating)),O=m||(y||!p?[it(c)]:$t(c)),A=g!=="none";!m&&A&&O.push(...kt(c,p,g,b));let R=[c,...O],S=await a.detectOverflow(e,w),P=[],v=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&P.push(S[h]),u){let T=Ot(i,r,b);P.push(S[T[0]],S[T[1]])}if(v=[...v,{placement:i,overflows:P}],!P.every(T=>T<=0)){var L,X;let T=(((L=s.flip)==null?void 0:L.index)||0)+1,Y=R[T];if(Y&&(!(u==="alignment"?x!==H(Y):!1)||v.every(D=>H(D.placement)===x?D.overflows[0]>0:!0)))return{data:{index:T,overflows:v},reset:{placement:Y}};let W=(X=v.filter(K=>K.overflows[0]<=0).sort((K,D)=>K.overflows[1]-D.overflows[1])[0])==null?void 0:X.placement;if(!W)switch(f){case"bestFit":{var E;let K=(E=v.filter(D=>{if(A){let z=H(D.placement);return z===x||z==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(z=>z>0).reduce((z,Ae)=>z+Ae,0)]).sort((D,z)=>D[1]-z[1])[0])==null?void 0:E[0];K&&(W=K);break}case"initialPlacement":W=c;break}if(i!==W)return{reset:{placement:W}}}return{}}}};function Bt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function _t(t){return yt.some(e=>t[e]>=0)}var jt=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n,platform:o}=e,{strategy:i="referenceHidden",...s}=I(t,e);switch(i){case"referenceHidden":{let r=await o.detectOverflow(e,{...s,elementContext:"reference"}),c=Bt(r,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:_t(c)}}}case"escaped":{let r=await o.detectOverflow(e,{...s,altBoundary:!0}),c=Bt(r,n.floating);return{data:{escapedOffsets:c,escaped:_t(c)}}}default:return{}}}}};var Te=new Set(["left","top"]);async function De(t,e){let{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=_(n),c=F(n),a=H(n)==="y",l=Te.has(r)?-1:1,d=s&&a?-1:1,u=I(e,t),{mainAxis:m,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(f=c==="end"?g*-1:g),a?{x:f*d,y:m*l}:{x:m*l,y:f*d}}var Xt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:s,placement:r,middlewareData:c}=e,a=await De(e,t);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+a.x,y:s+a.y,data:{...a,placement:r}}}}},Yt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i,platform:s}=e,{mainAxis:r=!0,crossAxis:c=!1,limiter:a={fn:x=>{let{x:y,y:b}=x;return{x:y,y:b}}},...l}=I(t,e),d={x:n,y:o},u=await s.detectOverflow(e,l),m=H(i),f=At(m),g=d[f],p=d[m],w=(x,y)=>bt(y+u[x==="y"?"top":"left"],y,y-u[x==="y"?"bottom":"right"]);r&&(g=w(f,g)),c&&(p=w(m,p));let h=a.fn({...e,[f]:g,[m]:p});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[f]:r,[m]:c}}}}}};function mt(){return typeof window<"u"}function J(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function C(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function k(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return mt()?t instanceof Node||t instanceof C(t).Node:!1}function M(t){return mt()?t instanceof Element||t instanceof C(t).Element:!1}function V(t){return mt()?t instanceof HTMLElement||t instanceof C(t).HTMLElement:!1}function Kt(t){return!mt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof C(t).ShadowRoot}function ct(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=N(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&i!=="inline"&&i!=="contents"}function Gt(t){return/^(table|td|th)$/.test(J(t))}function lt(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Fe=/transform|translate|scale|rotate|perspective|filter/,Me=/paint|layout|strict|content/,G=t=>!!t&&t!=="none",Pt;function tt(t){let e=M(t)?N(t):t;return G(e.transform)||G(e.translate)||G(e.scale)||G(e.rotate)||G(e.perspective)||!gt()&&(G(e.backdropFilter)||G(e.filter))||Fe.test(e.willChange||"")||Me.test(e.contain||"")}function Jt(t){let e=j(t);for(;V(e)&&!et(e);){if(tt(e))return e;if(lt(e))return null;e=j(e)}return null}function gt(){return Pt==null&&(Pt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Pt}function et(t){return/^(html|body|#document)$/.test(J(t))}function N(t){return C(t).getComputedStyle(t)}function at(t){return M(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function j(t){if(J(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Kt(t)&&t.host||k(t);return Kt(e)?e.host:e}function Qt(t){let e=j(t);return et(e)?(t.ownerDocument||t).body:V(e)&&ct(e)?e:Qt(e)}function Z(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Qt(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),r=C(i);if(s){let c=ht(r);return e.concat(r,r.visualViewport||[],ct(i)?i:[],c&&n?Z(c):[])}else return e.concat(i,Z(i,[],n))}function ht(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){let e=N(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=V(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,c=st(n)!==s||st(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function St(t){return M(t)?t:t.contextElement}function nt(t){let e=St(t);if(!V(e))return $(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:s}=ee(e),r=(s?st(n.width):n.width)/o,c=(s?st(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}var Ne=$(0);function ne(t){let e=C(t);return!gt()||!e.visualViewport?Ne:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function $e(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===C(t)}function Q(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),s=St(t),r=$(1);e&&(o?M(o)&&(r=nt(o)):r=nt(t));let c=$e(s,n,o)?ne(s):$(0),a=(i.left+c.x)/r.x,l=(i.top+c.y)/r.y,d=i.width/r.x,u=i.height/r.y;if(s&&o){let m=C(s),f=M(o)?C(o):o,g=m,p=ht(g);for(;p&&f!==g;){let w=nt(p),h=p.getBoundingClientRect(),x=N(p),y=h.left+(p.clientLeft+parseFloat(x.paddingLeft))*w.x,b=h.top+(p.clientTop+parseFloat(x.paddingTop))*w.y;a*=w.x,l*=w.y,d*=w.x,u*=w.y,a+=y,l+=b,g=C(p),p=ht(g)}}return q({width:d,height:u,x:a,y:l})}function pt(t,e){let n=at(t).scrollLeft;return e?e.left+n:Q(k(t)).left+n}function oe(t,e){let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-pt(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function ke(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,s=i==="fixed",r=k(o),c=e?lt(e.floating):!1;if(o===r||c&&s)return n;let a={scrollLeft:0,scrollTop:0},l=$(1),d=$(0),u=V(o);if((u||!s)&&((J(o)!=="body"||ct(r))&&(a=at(o)),u)){let f=Q(o);l=nt(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}let m=r&&!u&&!s?oe(r,a):$(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+d.x+m.x,y:n.y*l.y-a.scrollTop*l.y+d.y+m.y}}function We(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Be(t){let e=at(t),n=t.ownerDocument.body,o=B(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=B(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-e.scrollLeft+pt(t),r=-e.scrollTop;return N(n).direction==="rtl"&&(s+=B(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:r}}var _e=25;function He(t,e,n){n===void 0&&(n="viewport");let o=n==="layoutViewport",i=C(t),s=k(t),r=i.visualViewport,c=s.clientWidth,a=s.clientHeight,l=0,d=0;if(r){let m=!gt()||e==="fixed";o?m||(l=-r.offsetLeft,d=-r.offsetTop):(c=r.width,a=r.height,m&&(l=r.offsetLeft,d=r.offsetTop))}if(pt(s)<=0){let m=s.ownerDocument,f=m.body,g=getComputedStyle(f),p=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,w=Math.abs(s.clientWidth-f.clientWidth-p),h=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;h<=_e&&(c-=h)}return{width:c,height:a,x:l,y:d}}function Ve(t,e){let n=Q(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=nt(t),r=t.clientWidth*s.x,c=t.clientHeight*s.y,a=i*s.x,l=o*s.y;return{width:r,height:c,x:a,y:l}}function Zt(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=He(t,n,e);else if(e==="document")o=Be(k(t));else if(M(e))o=Ve(e,n);else{let i=ne(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return q(o)}function ze(t,e){let n=e.get(t);if(n)return n;let o=Z(t,[],!1).filter(c=>M(c)&&J(c)!=="body"),i=null,s=N(t).position==="fixed",r=s?j(t):t;for(;M(r)&&!et(r);){let c=N(r),a=tt(r),l=i?i.position:s?"fixed":"";!a&&(l==="fixed"||l==="absolute"&&c.position==="static")?o=o.filter(u=>u!==r):i=c,r=j(r)}return e.set(t,o),o}function Ue(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,r=[...n==="clippingAncestors"?lt(e)?[]:ze(e,this._c):[].concat(n),o],c=Zt(e,r[0],i),a=c.top,l=c.right,d=c.bottom,u=c.left;for(let m=1;m<r.length;m++){let f=Zt(e,r[m],i);a=B(f.top,a),l=U(f.right,l),d=U(f.bottom,d),u=B(f.left,u)}return{width:l-u,height:d-a,x:u,y:a}}function Ie(t){let{width:e,height:n}=ee(t);return{width:e,height:n}}function je(t,e,n){let o=V(e),i=k(e),s=n==="fixed",r=Q(t,!0,s,e),c={scrollLeft:0,scrollTop:0},a=$(0);if((o||!s)&&((J(e)!=="body"||ct(i))&&(c=at(e)),o)){let m=Q(e,!0,s,e);a.x=m.x+e.clientLeft,a.y=m.y+e.clientTop}!o&&i&&(a.x=pt(i));let l=i&&!o&&!s?oe(i,c):$(0),d=r.left+c.scrollLeft-a.x-l.x,u=r.top+c.scrollTop-a.y-l.y;return{x:d,y:u,width:r.width,height:r.height}}function Ct(t){return N(t).position==="static"}function te(t,e){if(!V(t)||N(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return k(t)===n&&(n=n.ownerDocument.body),n}function ie(t,e){let n=C(t);if(lt(t))return n;if(!V(t)){let i=j(t);for(;i&&!et(i);){if(M(i)&&!Ct(i))return i;i=j(i)}return n}let o=te(t,e);for(;o&&Gt(o)&&Ct(o);)o=te(o,e);return o&&et(o)&&Ct(o)&&!tt(o)?n:o||Jt(t)||n}var Xe=async function(t){let e=this.getOffsetParent||ie,n=this.getDimensions,o=await n(t.floating);return{reference:je(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ye(t){return N(t).direction==="rtl"}var wt={convertOffsetParentRelativeRectToViewportRelativeRect:ke,getDocumentElement:k,getClippingRect:Ue,getOffsetParent:ie,getElementRects:Xe,getClientRects:We,getDimensions:Ie,getScale:nt,isElement:M,isRTL:Ye};function se(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ke(t,e,n){let o=null,i,s=k(t);function r(){var d;clearTimeout(i),(d=o)==null||d.disconnect(),o=null}function c(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),r();let m=t.getBoundingClientRect(),{left:f,top:g,width:p,height:w}=m;if(d||e(),!p||!w)return;let h=rt(g),x=rt(s.clientWidth-(f+p)),y=rt(s.clientHeight-(g+w)),b=rt(f),A={rootMargin:-h+"px "+-x+"px "+-y+"px "+-b+"px",threshold:B(0,U(1,u))||1},R=!0;function S(P){let v=P[0].intersectionRatio;if(!se(m,t.getBoundingClientRect()))return c();if(v!==u){if(!R)return c();v?c(!1,v):i=setTimeout(()=>{c(!1,1e-7)},1e3)}R=!1}try{o=new IntersectionObserver(S,{...A,root:s.ownerDocument})}catch{o=new IntersectionObserver(S,A)}o.observe(t)}let a=C(t),l=()=>c(n);return a.addEventListener("resize",l),c(!0),()=>{a.removeEventListener("resize",l),r()}}function re(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,l=St(t),d=i||s?[...l?Z(l):[],...e?Z(e):[]]:[];d.forEach(h=>{i&&h.addEventListener("scroll",n),s&&h.addEventListener("resize",n)});let u=l&&c?Ke(l,n,s):null,m=-1,f=null;r&&(f=new ResizeObserver(h=>{let[x]=h;x&&x.target===l&&f&&e&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),l&&!a&&f.observe(l),e&&f.observe(e));let g,p=a?Q(t):null;a&&w();function w(){let h=Q(t);p&&!se(p,h)&&n(),p=h,g=requestAnimationFrame(w)}return n(),()=>{var h;d.forEach(x=>{i&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),u?.(),(h=f)==null||h.disconnect(),f=null,a&&cancelAnimationFrame(g)}}var ce=Xt,le=Ut,ae=Yt,fe=It;var ue=jt,de=zt;var me=(t,e,n)=>{let o=new Map,i=n??{},s={...wt,...i.platform,_c:o};return Vt(t,e,{...i,platform:s})};function ge(t){return qe(t)}function Et(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function qe(t){for(let e=t;e;e=Et(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Et(t);e;e=Et(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||tt(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=wt.getOffsetParent;wt.getOffsetParent=n=>e(n,ge)}})();function he(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var ye=(async(t,{arrowEl:e,direction:n,flipDisabled:o,flipPlacements:i,floatingEl:s,offsetDistance:r,offsetSkidding:c,overlayPositioning:a="absolute",placement:l,referenceEl:d,type:u})=>{if(!d||!s)return;let m=n==="rtl",{x:f,y:g,placement:p,strategy:w,middlewareData:h}=await me(d,s,{strategy:a,placement:l==="auto"||l==="auto-start"||l==="auto-end"?void 0:pe(l,m),middleware:Je({placement:l,flipDisabled:o,flipPlacements:i?.map(O=>pe(O,m)),offsetDistance:r,offsetSkidding:c,arrowEl:e,type:u})});if(e&&h.arrow){let{x:O,y:A}=h.arrow,R=p.split("-")[0],S=O!=null?"left":"top",P=tn[R],v={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(e.style,{...v,[S]:`${S=="left"?O:A}px`,[R]:"100%",transform:P})}let y=h.hide?.referenceHidden?"hidden":null,b=y?"none":null;s.setAttribute(Ge,p),Object.assign(s.style,{pointerEvents:b,position:w,transform:`translate(${he(f)}px,${he(g)}px)`,visibility:y})}),Ge="data-placement",ve=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end","leading","trailing","leading-start","leading-end","trailing-start","trailing-end"],On="bottom-start",Rn="bottom-end",Pn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function Je({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:s,type:r}){let c="layoutViewport",a=t==="auto"||t==="auto-start"||t==="auto-end",l=[ae({rootBoundary:c})];if(l.push(ce({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),a&&l.push(le({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null,rootBoundary:c})),!e&&(!a||r==="menu")){let u=r==="menu"?n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]:n;l.push(fe(u?{fallbackPlacements:u,rootBoundary:c}:{rootBoundary:c}))}return s&&l.push(de({element:s})),l.push(ue({rootBoundary:c})),l}function Qe(t){return ve.includes(t)}function Cn(t,e){let n=t.filter(Qe);return n.length!==t.length&&Tt.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ve.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function pe(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function Sn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",inset:"unset",left:"0",position:e.overlayPositioning??"absolute",top:"0"}),!ft.get(t))return be(t);await(n?Ze(t):ye)(t,e)}function Ze(t){let e=xt.get(t);return e||(e=Dt(ye,Lt.reposition,{edges:["leading","trailing"]}),xt.set(t,e),e)}var tn={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,xt=new WeakMap;async function be(t){let{referenceEl:e,floatingEl:n}=t;if(!n?.isConnected)return;let o=re;ft.set(t,{state:"pending"});let i,s=o(e,n,()=>{let r=t.reposition();i||(i=r)});return ft.set(t,{state:"active",cleanUp:s}),i}function en(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",left:"",pointerEvents:"",position:"",top:"",transform:"",visibility:""})}async function En(t){let{floatingEl:e,referenceEl:n}=t;if(en(t),nn(t),!(!e||!n||!t.open))return be(t)}function nn(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),xt.get(t)?.cancel(),xt.delete(t)}var we=4,Ln=Math.ceil(Math.hypot(we,we));export{On as a,Rn as b,Pn as c,Cn as d,Sn as e,en as f,En as g,nn as h,Ln as i};
|
|
2
|
+
import{a as Dt}from"./5EBGPCB7.js";import{L as Lt,O as Tt}from"./LIR56SYG.js";var yt=["top","right","bottom","left"],Ft=["start","end"],vt=yt.reduce((t,e)=>t.concat(e,e+"-"+Ft[0],e+"-"+Ft[1]),[]),U=Math.min,B=Math.max,st=Math.round,rt=Math.floor,$=t=>({x:t,y:t}),Oe={left:"right",right:"left",bottom:"top",top:"bottom"};function bt(t,e,n){return B(t,U(e,n))}function I(t,e){return typeof t=="function"?t(e):t}function _(t){return t.split("-")[0]}function F(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function ut(t){return t==="y"?"height":"width"}function H(t){let e=t[0];return e==="t"||e==="b"?"y":"x"}function dt(t){return At(H(t))}function Ot(t,e,n){n===void 0&&(n=!1);let o=F(t),i=dt(t),s=ut(i),r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=it(r)),[r,it(r)]}function $t(t){let e=it(t);return[ot(t),e,ot(e)]}function ot(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}var Mt=["left","right"],Nt=["right","left"],Re=["top","bottom"],Pe=["bottom","top"];function Ce(t,e,n){switch(t){case"top":case"bottom":return n?e?Nt:Mt:e?Mt:Nt;case"left":case"right":return e?Re:Pe;default:return[]}}function kt(t,e,n,o){let i=F(t),s=Ce(_(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(ot)))),s}function it(t){let e=_(t);return Oe[e]+t.slice(e.length)}function Se(t){var e,n,o,i;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(i=t.left)!=null?i:0}}function Rt(t){return typeof t!="number"?Se(t):{top:t,right:t,bottom:t,left:t}}function q(t){let{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Wt(t,e,n){let{reference:o,floating:i}=t,s=H(e),r=dt(e),c=ut(r),a=_(e),l=s==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2,f;switch(a){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}let g=F(e);return g&&(f[r]+=m*(g==="end"?1:-1)*(n&&l?-1:1)),f}async function Ht(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:s,rects:r,elements:c,strategy:a}=t,{boundary:l="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=I(e,t),g=Rt(f),w=c[m?u==="floating"?"reference":"floating":u],h=q(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(w)))==null||n?w:w.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:l,rootBoundary:d,strategy:a})),x=u==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,y=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),b=await(s.isElement==null?void 0:s.isElement(y))&&await(s.getScale==null?void 0:s.getScale(y))||{x:1,y:1},O=q(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:a}):x);return{top:(h.top-O.top+g.top)/b.y,bottom:(O.bottom-h.bottom+g.bottom)/b.y,left:(h.left-O.left+g.left)/b.x,right:(O.right-h.right+g.right)/b.x}}var Ee=50,Vt=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=r.detectOverflow?r:{...r,detectOverflow:Ht},a=await(r.isRTL==null?void 0:r.isRTL(e)),l=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Wt(l,o,a),m=o,f=0,g={};for(let p=0;p<s.length;p++){let w=s[p];if(!w)continue;let{name:h,fn:x}=w,{x:y,y:b,data:O,reset:A}=await x({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:g,rects:l,platform:c,elements:{reference:t,floating:e}});d=y??d,u=b??u,g[h]={...g[h],...O},A&&f<Ee&&(f++,typeof A=="object"&&(A.placement&&(m=A.placement),A.rects&&(l=A.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):A.rects),{x:d,y:u}=Wt(l,m,a)),p=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:g}},zt=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:o,placement:i,rects:s,platform:r,elements:c,middlewareData:a}=e,{element:l,padding:d=0}=I(t,e)||{};if(l==null)return{};let u=Rt(d),m={x:n,y:o},f=dt(i),g=ut(f),p=await r.getDimensions(l),w=f==="y",h=w?"top":"left",x=w?"bottom":"right",y=w?"clientHeight":"clientWidth",b=s.reference[g]+s.reference[f]-m[f]-s.floating[g],O=m[f]-s.reference[f],A=await(r.getOffsetParent==null?void 0:r.getOffsetParent(l)),R=A?A[y]:0;(!R||!await(r.isElement==null?void 0:r.isElement(A)))&&(R=c.floating[y]||s.floating[g]);let S=b/2-O/2,P=R/2-p[g]/2-1,v=U(u[h],P),L=U(u[x],P),X=R-p[g]-L,E=R/2-p[g]/2+S,T=bt(v,E,X),Y=!a.arrow&&F(i)!=null&&E!==T&&s.reference[g]/2-(E<v?v:L)-p[g]/2<0,W=Y?E<v?E-v:E-X:0;return{[f]:m[f]+W,data:{[f]:T,centerOffset:E-T-W,...Y&&{alignmentOffset:W}},reset:Y}}});function Le(t,e,n){return(t?[...n.filter(i=>F(i)===t),...n.filter(i=>F(i)!==t)]:n.filter(i=>_(i)===i)).filter(i=>t?F(i)===t||(e?ot(i)!==i:!1):!0)}var Ut=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;let{rects:s,middlewareData:r,placement:c,platform:a,elements:l}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=vt,autoAlignment:f=!0,...g}=I(t,e),p=u!==void 0||m===vt?Le(u||null,f,m):m,w=((n=r.autoPlacement)==null?void 0:n.index)||0,h=p[w];if(h==null)return{};if(c!==h)return{reset:{placement:p[0]}};let x=await a.detectOverflow(e,g),y=Ot(h,s,await(a.isRTL==null?void 0:a.isRTL(l.floating))),b=[x[_(h)],x[y[0]],x[y[1]]],O=[...((o=r.autoPlacement)==null?void 0:o.overflows)||[],{placement:h,overflows:b}],A=p[w+1];if(A)return{data:{index:w+1,overflows:O},reset:{placement:A}};let R=O.map(v=>{let L=F(v.placement);return[v.placement,L&&d?v.overflows.slice(0,2).reduce((X,E)=>X+E,0):v.overflows[0],v.overflows]}).sort((v,L)=>v[1]-L[1]),P=((i=R.filter(v=>v[2].slice(0,F(v[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||R[0][0];return P!==c?{data:{index:w+1,overflows:O},reset:{placement:P}}:{}}}},It=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:a,elements:l}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:p=!0,...w}=I(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};let h=_(i),x=H(c),y=_(c)===c,b=await(a.isRTL==null?void 0:a.isRTL(l.floating)),O=m||(y||!p?[it(c)]:$t(c)),A=g!=="none";!m&&A&&O.push(...kt(c,p,g,b));let R=[c,...O],S=await a.detectOverflow(e,w),P=[],v=((o=s.flip)==null?void 0:o.overflows)||[];if(d&&P.push(S[h]),u){let T=Ot(i,r,b);P.push(S[T[0]],S[T[1]])}if(v=[...v,{placement:i,overflows:P}],!P.every(T=>T<=0)){var L,X;let T=(((L=s.flip)==null?void 0:L.index)||0)+1,Y=R[T];if(Y&&(!(u==="alignment"?x!==H(Y):!1)||v.every(D=>H(D.placement)===x?D.overflows[0]>0:!0)))return{data:{index:T,overflows:v},reset:{placement:Y}};let W=(X=v.filter(K=>K.overflows[0]<=0).sort((K,D)=>K.overflows[1]-D.overflows[1])[0])==null?void 0:X.placement;if(!W)switch(f){case"bestFit":{var E;let K=(E=v.filter(D=>{if(A){let z=H(D.placement);return z===x||z==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(z=>z>0).reduce((z,Ae)=>z+Ae,0)]).sort((D,z)=>D[1]-z[1])[0])==null?void 0:E[0];K&&(W=K);break}case"initialPlacement":W=c;break}if(i!==W)return{reset:{placement:W}}}return{}}}};function Bt(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function _t(t){return yt.some(e=>t[e]>=0)}var jt=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n,platform:o}=e,{strategy:i="referenceHidden",...s}=I(t,e);switch(i){case"referenceHidden":{let r=await o.detectOverflow(e,{...s,elementContext:"reference"}),c=Bt(r,n.reference);return{data:{referenceHiddenOffsets:c,referenceHidden:_t(c)}}}case"escaped":{let r=await o.detectOverflow(e,{...s,altBoundary:!0}),c=Bt(r,n.floating);return{data:{escapedOffsets:c,escaped:_t(c)}}}default:return{}}}}};var Te=new Set(["left","top"]);async function De(t,e){let{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=_(n),c=F(n),a=H(n)==="y",l=Te.has(r)?-1:1,d=s&&a?-1:1,u=I(e,t),{mainAxis:m,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(f=c==="end"?g*-1:g),a?{x:f*d,y:m*l}:{x:m*l,y:f*d}}var Xt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:s,placement:r,middlewareData:c}=e,a=await De(e,t);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+a.x,y:s+a.y,data:{...a,placement:r}}}}},Yt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i,platform:s}=e,{mainAxis:r=!0,crossAxis:c=!1,limiter:a={fn:x=>{let{x:y,y:b}=x;return{x:y,y:b}}},...l}=I(t,e),d={x:n,y:o},u=await s.detectOverflow(e,l),m=H(i),f=At(m),g=d[f],p=d[m],w=(x,y)=>bt(y+u[x==="y"?"top":"left"],y,y-u[x==="y"?"bottom":"right"]);r&&(g=w(f,g)),c&&(p=w(m,p));let h=a.fn({...e,[f]:g,[m]:p});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[f]:r,[m]:c}}}}}};function mt(){return typeof window<"u"}function J(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function C(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function k(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return mt()?t instanceof Node||t instanceof C(t).Node:!1}function M(t){return mt()?t instanceof Element||t instanceof C(t).Element:!1}function V(t){return mt()?t instanceof HTMLElement||t instanceof C(t).HTMLElement:!1}function Kt(t){return!mt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof C(t).ShadowRoot}function ct(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=N(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&i!=="inline"&&i!=="contents"}function Gt(t){return/^(table|td|th)$/.test(J(t))}function lt(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}var Fe=/transform|translate|scale|rotate|perspective|filter/,Me=/paint|layout|strict|content/,G=t=>!!t&&t!=="none",Pt;function tt(t){let e=M(t)?N(t):t;return G(e.transform)||G(e.translate)||G(e.scale)||G(e.rotate)||G(e.perspective)||!gt()&&(G(e.backdropFilter)||G(e.filter))||Fe.test(e.willChange||"")||Me.test(e.contain||"")}function Jt(t){let e=j(t);for(;V(e)&&!et(e);){if(tt(e))return e;if(lt(e))return null;e=j(e)}return null}function gt(){return Pt==null&&(Pt=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Pt}function et(t){return/^(html|body|#document)$/.test(J(t))}function N(t){return C(t).getComputedStyle(t)}function at(t){return M(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function j(t){if(J(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Kt(t)&&t.host||k(t);return Kt(e)?e.host:e}function Qt(t){let e=j(t);return et(e)?(t.ownerDocument||t).body:V(e)&&ct(e)?e:Qt(e)}function Z(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Qt(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),r=C(i);if(s){let c=ht(r);return e.concat(r,r.visualViewport||[],ct(i)?i:[],c&&n?Z(c):[])}else return e.concat(i,Z(i,[],n))}function ht(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){let e=N(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=V(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,c=st(n)!==s||st(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function St(t){return M(t)?t:t.contextElement}function nt(t){let e=St(t);if(!V(e))return $(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:s}=ee(e),r=(s?st(n.width):n.width)/o,c=(s?st(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}var Ne=$(0);function ne(t){let e=C(t);return!gt()||!e.visualViewport?Ne:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function $e(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===C(t)}function Q(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),s=St(t),r=$(1);e&&(o?M(o)&&(r=nt(o)):r=nt(t));let c=$e(s,n,o)?ne(s):$(0),a=(i.left+c.x)/r.x,l=(i.top+c.y)/r.y,d=i.width/r.x,u=i.height/r.y;if(s&&o){let m=C(s),f=M(o)?C(o):o,g=m,p=ht(g);for(;p&&f!==g;){let w=nt(p),h=p.getBoundingClientRect(),x=N(p),y=h.left+(p.clientLeft+parseFloat(x.paddingLeft))*w.x,b=h.top+(p.clientTop+parseFloat(x.paddingTop))*w.y;a*=w.x,l*=w.y,d*=w.x,u*=w.y,a+=y,l+=b,g=C(p),p=ht(g)}}return q({width:d,height:u,x:a,y:l})}function pt(t,e){let n=at(t).scrollLeft;return e?e.left+n:Q(k(t)).left+n}function oe(t,e){let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-pt(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function ke(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,s=i==="fixed",r=k(o),c=e?lt(e.floating):!1;if(o===r||c&&s)return n;let a={scrollLeft:0,scrollTop:0},l=$(1),d=$(0),u=V(o);if((u||!s)&&((J(o)!=="body"||ct(r))&&(a=at(o)),u)){let f=Q(o);l=nt(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}let m=r&&!u&&!s?oe(r,a):$(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-a.scrollLeft*l.x+d.x+m.x,y:n.y*l.y-a.scrollTop*l.y+d.y+m.y}}function We(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function Be(t){let e=at(t),n=t.ownerDocument.body,o=B(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=B(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight),s=-e.scrollLeft+pt(t),r=-e.scrollTop;return N(n).direction==="rtl"&&(s+=B(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:s,y:r}}var _e=25;function He(t,e,n){n===void 0&&(n="viewport");let o=n==="layoutViewport",i=C(t),s=k(t),r=i.visualViewport,c=s.clientWidth,a=s.clientHeight,l=0,d=0;if(r){let m=!gt()||e==="fixed";o?m||(l=-r.offsetLeft,d=-r.offsetTop):(c=r.width,a=r.height,m&&(l=r.offsetLeft,d=r.offsetTop))}if(pt(s)<=0){let m=s.ownerDocument,f=m.body,g=getComputedStyle(f),p=m.compatMode==="CSS1Compat"&&parseFloat(g.marginLeft)+parseFloat(g.marginRight)||0,w=Math.abs(s.clientWidth-f.clientWidth-p),h=getComputedStyle(s).scrollbarGutter==="stable both-edges"?w/2:w;h<=_e&&(c-=h)}return{width:c,height:a,x:l,y:d}}function Ve(t,e){let n=Q(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=nt(t),r=t.clientWidth*s.x,c=t.clientHeight*s.y,a=i*s.x,l=o*s.y;return{width:r,height:c,x:a,y:l}}function Zt(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=He(t,n,e);else if(e==="document")o=Be(k(t));else if(M(e))o=Ve(e,n);else{let i=ne(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return q(o)}function ze(t,e){let n=e.get(t);if(n)return n;let o=Z(t,[],!1).filter(c=>M(c)&&J(c)!=="body"),i=null,s=N(t).position==="fixed",r=s?j(t):t;for(;M(r)&&!et(r);){let c=N(r),a=tt(r),l=i?i.position:s?"fixed":"";!a&&(l==="fixed"||l==="absolute"&&c.position==="static")?o=o.filter(u=>u!==r):i=c,r=j(r)}return e.set(t,o),o}function Ue(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,r=[...n==="clippingAncestors"?lt(e)?[]:ze(e,this._c):[].concat(n),o],c=Zt(e,r[0],i),a=c.top,l=c.right,d=c.bottom,u=c.left;for(let m=1;m<r.length;m++){let f=Zt(e,r[m],i);a=B(f.top,a),l=U(f.right,l),d=U(f.bottom,d),u=B(f.left,u)}return{width:l-u,height:d-a,x:u,y:a}}function Ie(t){let{width:e,height:n}=ee(t);return{width:e,height:n}}function je(t,e,n){let o=V(e),i=k(e),s=n==="fixed",r=Q(t,!0,s,e),c={scrollLeft:0,scrollTop:0},a=$(0);if((o||!s)&&((J(e)!=="body"||ct(i))&&(c=at(e)),o)){let m=Q(e,!0,s,e);a.x=m.x+e.clientLeft,a.y=m.y+e.clientTop}!o&&i&&(a.x=pt(i));let l=i&&!o&&!s?oe(i,c):$(0),d=r.left+c.scrollLeft-a.x-l.x,u=r.top+c.scrollTop-a.y-l.y;return{x:d,y:u,width:r.width,height:r.height}}function Ct(t){return N(t).position==="static"}function te(t,e){if(!V(t)||N(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return k(t)===n&&(n=n.ownerDocument.body),n}function ie(t,e){let n=C(t);if(lt(t))return n;if(!V(t)){let i=j(t);for(;i&&!et(i);){if(M(i)&&!Ct(i))return i;i=j(i)}return n}let o=te(t,e);for(;o&&Gt(o)&&Ct(o);)o=te(o,e);return o&&et(o)&&Ct(o)&&!tt(o)?n:o||Jt(t)||n}var Xe=async function(t){let e=this.getOffsetParent||ie,n=this.getDimensions,o=await n(t.floating);return{reference:je(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ye(t){return N(t).direction==="rtl"}var wt={convertOffsetParentRelativeRectToViewportRelativeRect:ke,getDocumentElement:k,getClippingRect:Ue,getOffsetParent:ie,getElementRects:Xe,getClientRects:We,getDimensions:Ie,getScale:nt,isElement:M,isRTL:Ye};function se(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Ke(t,e,n){let o=null,i,s=k(t);function r(){var d;clearTimeout(i),(d=o)==null||d.disconnect(),o=null}function c(d,u){d===void 0&&(d=!1),u===void 0&&(u=1),r();let m=t.getBoundingClientRect(),{left:f,top:g,width:p,height:w}=m;if(d||e(),!p||!w)return;let h=rt(g),x=rt(s.clientWidth-(f+p)),y=rt(s.clientHeight-(g+w)),b=rt(f),A={rootMargin:-h+"px "+-x+"px "+-y+"px "+-b+"px",threshold:B(0,U(1,u))||1},R=!0;function S(P){let v=P[0].intersectionRatio;if(!se(m,t.getBoundingClientRect()))return c();if(v!==u){if(!R)return c();v?c(!1,v):i=setTimeout(()=>{c(!1,1e-7)},1e3)}R=!1}try{o=new IntersectionObserver(S,{...A,root:s.ownerDocument})}catch{o=new IntersectionObserver(S,A)}o.observe(t)}let a=C(t),l=()=>c(n);return a.addEventListener("resize",l),c(!0),()=>{a.removeEventListener("resize",l),r()}}function re(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:a=!1}=o,l=St(t),d=i||s?[...l?Z(l):[],...e?Z(e):[]]:[];d.forEach(h=>{i&&h.addEventListener("scroll",n),s&&h.addEventListener("resize",n)});let u=l&&c?Ke(l,n,s):null,m=-1,f=null;r&&(f=new ResizeObserver(h=>{let[x]=h;x&&x.target===l&&f&&e&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),l&&!a&&f.observe(l),e&&f.observe(e));let g,p=a?Q(t):null;a&&w();function w(){let h=Q(t);p&&!se(p,h)&&n(),p=h,g=requestAnimationFrame(w)}return n(),()=>{var h;d.forEach(x=>{i&&x.removeEventListener("scroll",n),s&&x.removeEventListener("resize",n)}),u?.(),(h=f)==null||h.disconnect(),f=null,a&&cancelAnimationFrame(g)}}var ce=Xt,le=Ut,ae=Yt,fe=It;var ue=jt,de=zt;var me=(t,e,n)=>{let o=new Map,i=n??{},s={...wt,...i.platform,_c:o};return Vt(t,e,{...i,platform:s})};function ge(t){return qe(t)}function Et(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function qe(t){for(let e=t;e;e=Et(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Et(t);e;e=Et(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||tt(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=wt.getOffsetParent;wt.getOffsetParent=n=>e(n,ge)}})();function he(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var ye=(async(t,{arrowEl:e,direction:n,flipDisabled:o,flipPlacements:i,floatingEl:s,offsetDistance:r,offsetSkidding:c,overlayPositioning:a="absolute",placement:l,referenceEl:d,type:u})=>{if(!d||!s)return;let m=n==="rtl",{x:f,y:g,placement:p,strategy:w,middlewareData:h}=await me(d,s,{strategy:a,placement:l==="auto"||l==="auto-start"||l==="auto-end"?void 0:pe(l,m),middleware:Je({placement:l,flipDisabled:o,flipPlacements:i?.map(O=>pe(O,m)),offsetDistance:r,offsetSkidding:c,arrowEl:e,type:u})});if(e&&h.arrow){let{x:O,y:A}=h.arrow,R=p.split("-")[0],S=O!=null?"left":"top",P=tn[R],v={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(e.style,{...v,[S]:`${S=="left"?O:A}px`,[R]:"100%",transform:P})}let y=h.hide?.referenceHidden?"hidden":null,b=y?"none":null;s.setAttribute(Ge,p),Object.assign(s.style,{pointerEvents:b,position:w,transform:`translate(${he(f)}px,${he(g)}px)`,visibility:y})}),Ge="data-placement",ve=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end","leading","trailing","leading-start","leading-end","trailing-start","trailing-end"],On="bottom-start",Rn="bottom-end",Pn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function Je({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:s,type:r}){let c="layoutViewport",a=t==="auto"||t==="auto-start"||t==="auto-end",l=[ae({rootBoundary:c})];if(l.push(ce({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),a&&l.push(le({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null,rootBoundary:c})),!e&&(!a||r==="menu")){let u=r==="menu"?n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]:n;l.push(fe(u?{fallbackPlacements:u,rootBoundary:c}:{rootBoundary:c}))}return s&&l.push(de({element:s})),l.push(ue({rootBoundary:c})),l}function Qe(t){return ve.includes(t)}function Cn(t,e){let n=t.filter(Qe);return n.length!==t.length&&Tt.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ve.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function pe(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function Sn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",inset:"unset",left:"0",position:e.overlayPositioning??"absolute",top:"0"}),!ft.get(t))return be(t);await(n?Ze(t):ye)(t,e)}function Ze(t){let e=xt.get(t);return e||(e=Dt(ye,Lt.reposition,{edges:["leading","trailing"]}),xt.set(t,e),e)}var tn={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,xt=new WeakMap;async function be(t){let{referenceEl:e,floatingEl:n}=t;if(!n?.isConnected)return;let o=re;ft.set(t,{state:"pending"});let i,s=o(e,n,()=>{let r=t.reposition();i||(i=r)});return ft.set(t,{state:"active",cleanUp:s}),i}function en(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",left:"",pointerEvents:"",position:"",top:"",transform:"",visibility:""})}async function En(t){let{floatingEl:e,referenceEl:n}=t;if(en(t),nn(t),!(!e||!n||!t.open))return be(t)}function nn(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),xt.get(t)?.cancel(),xt.delete(t)}var we=4,Ln=Math.ceil(Math.hypot(we,we));export{On as a,Rn as b,Pn as c,Cn as d,Sn as e,en as f,En as g,nn as h,Ln as i};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as S,e as z,f as I}from"./
|
|
2
|
+
import{a as S,e as z,f as I}from"./HCW2DLKX.js";import"./QBJZUEM2.js";import{b as n}from"./KRDOZILE.js";import{a as y}from"./S57EC43R.js";import{a}from"./MDPBLZUD.js";import{a as w}from"./T6CCMW7H.js";import{a as h}from"./ZWPNZ5XW.js";import"./KGRJJLLC.js";import{u as k}from"./6SSCE6VG.js";import{E as x,F as i,G as C,R as $,g as f,h as c,l as v,p as d}from"./LIR56SYG.js";var t={active:"label--active",centerContent:"center-content",container:"container",iconCustom:"icon--custom",description:"description",icon:"icon",label:"label",containerHighlightSelected:"container--highlight-selected",scale:b=>`scale--${b}`,shortText:"short-text",single:"label--single",textContainer:"text-container",heading:"heading"},o={checked:"check-square-f",circle:"circle",indeterminate:"minus-square-f",selectedSingle:"circle-inset-large",unchecked:"square"},H={contentEnd:"content-end",contentStart:"content-start"},E="--calcite-combobox-item-spacing-indent-multiplier",L=f`: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([hidden]){display:none}[hidden]{display:none}.scale--s{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);--calcite-internal-combobox-item-spacing-unit-s: .25rem;--calcite-internal-combobox-item-spacing-unit-l: .5rem;--calcite-combobox-item-selector-icon-size: 1rem;--calcite-internal-combobox-item-description-font-size: var(--calcite-font-size-xs)}.scale--m{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);--calcite-internal-combobox-item-spacing-unit-s: .375rem;--calcite-internal-combobox-item-spacing-unit-l: .75rem;--calcite-combobox-item-selector-icon-size: 1rem;--calcite-internal-combobox-item-description-font-size: var(--calcite-font-size-sm)}.scale--l{font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);--calcite-internal-combobox-item-spacing-unit-s: var(--calcite-space-sm-plus);--calcite-internal-combobox-item-spacing-unit-l: 1rem;--calcite-combobox-item-selector-icon-size: 1.5rem;--calcite-internal-combobox-item-description-font-size: var(--calcite-font-size)}.container{--calcite-combobox-item-indent-value: calc( var(--calcite-internal-combobox-item-spacing-unit-l) * var(--calcite-combobox-item-spacing-indent-multiplier) )}:host(:focus){--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host,ul{margin:0;display:flex;flex-direction:column;padding:0}:host(:focus),ul:focus{outline:2px solid transparent;outline-offset:2px}.label{position:relative;box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:100%;cursor:pointer;align-items:center;text-decoration-line:none;transition-timing-function:cubic-bezier(.4,0,.2,1);outline-color:transparent;overflow-wrap:break-word;word-break:break-word;justify-content:space-around;gap:var(--calcite-internal-combobox-item-spacing-unit-l);padding-block:var(--calcite-internal-combobox-item-spacing-unit-s);padding-inline-end:var(--calcite-internal-combobox-item-spacing-unit-l);padding-inline-start:var(--calcite-combobox-item-indent-value);color:var(--calcite-combobox-text-color, var(--calcite-color-text-3));transition-duration:var(--calcite-animation-timing)}:host([disabled]) .label{cursor:default}.label--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))))}.label:hover{background-color:var(--calcite-combobox-item-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-combobox-text-color-hover, var(--calcite-color-text-1))}.label:active{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-3))}:host([selected]) .label,.label:active{color:var(--calcite-combobox-text-color-hover, var(--calcite-color-text-1))}:host([selected]) .label .description,:host([selected]) .label .short-text,.label:active .description,.label:active .short-text{color:var(--calcite-combobox-description-text-color-press, var(--calcite-color-text-2))}.icon{display:inline-flex;transition-timing-function:cubic-bezier(.4,0,.2,1);color:var(--calcite-color-border-input)}:host([selected]) .icon,:host([indeterminate]) .icon{color:var(--calcite-combobox-selected-icon-color, var(--calcite-color-brand))}.icon--custom{margin-block-start:-1px}.center-content{display:flex;flex-direction:column;flex-grow:1;padding-block:0}.description{font-size:var(--calcite-internal-combobox-item-description-font-size)}.short-text{white-space:nowrap}.heading{color:var(--calcite-combobox-heading-text-color, var(--calcite-color-text-1))}.description,.short-text{color:var(--calcite-combobox-description-text-color, var(--calcite-color-text-3))}:host([selected]) .heading{font-weight:var(--calcite-font-weight-medium)}.heading,.description,.short-text{line-height:var(--calcite-font-line-height-relative-snug)}.container--highlight-selected{background-color:var(--calcite-color-surface-highlight)}:host([item-hidden]){display:none}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}`,m=class extends x{constructor(){super(...arguments),this._selected=!1,this.interactiveContainer=y(this),this.hasContent=!1,this.active=!1,this.disabled=!1,this.filterDisabled=!1,this.guid=w(),this.iconFlipRtl=!1,this.scale="m",this.selectionMode="multiple",this.selectionAppearance="icon",this.itemHidden=!1,this.indeterminate=!1,this.calciteComboboxItemChange=d({cancelable:!1}),this.calciteInternalComboboxItemChange=d({cancelable:!1})}static{this.properties={hasContent:[16,{},{state:!0}],active:[7,{},{reflect:!0,type:Boolean}],ancestors:[0,{},{attribute:!1}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],filterDisabled:[7,{},{reflect:!0,type:Boolean}],filterTextMatchPattern:[3,{},{reflect:!0}],guid:[3,{},{reflect:!0}],heading:1,icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],label:1,metadata:[0,{},{attribute:!1}],scale:1,selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}],shortHeading:1,value:[3,{},{reflect:!0}],itemHidden:[7,{},{reflect:!0,type:Boolean}],indeterminate:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=L}get selected(){return this._selected}set selected(e){let l=this._selected;e!==l&&(this._selected=e,this.emitItemChange())}get value(){return this._value??this.heading}set value(e){this._value=e??this.heading}toggleSelection(){let e=this.selectionMode==="single-persist";this.disabled||e&&this.selected||(this.selected=!this.selected,this.calciteComboboxItemChange.emit())}connectedCallback(){super.connectedCallback(),this.ancestors=S(this.el)}willUpdate(e){this.hasUpdated&&(e.has("disabled")||e.has("heading")||e.has("label"))&&this.emitItemChange()}emitItemChange(){this.calciteInternalComboboxItemChange.emit()}handleDefaultSlotChange(e){this.hasContent=k(e)}itemClickHandler(){this.toggleSelection()}renderIcon(e){return this.icon?a("icon",c`<calcite-icon class=${i({[t.iconCustom]:!!this.icon})} .flipRtl=${this.iconFlipRtl} .icon=${this.icon||e} .scale=${h(this.scale)}></calcite-icon>`):null}renderSelectIndicator(e){return this.selectionAppearance==="highlight"?null:a("indicator",c`<calcite-icon class=${i({[t.icon]:!0})} .flipRtl=${this.iconFlipRtl} .icon=${e} .scale=${h(this.scale)}></calcite-icon>`)}renderChildren(){return a("default-slot-container",c`<ul .hidden=${!this.hasContent}><slot @slotchange=${this.handleDefaultSlotChange}></slot></ul>`)}render(){let{disabled:e,heading:l,label:M,value:u,filterTextMatchPattern:s,description:g,shortHeading:p}=this,r=I(this.selectionMode),B=e||r?void 0:o.checked,T=r?this.selected?o.selectedSingle:o.circle:this.indeterminate?o.indeterminate:this.selected?o.checked:o.unchecked,R=M||u||l,_=l||u,A={[t.label]:!0,[t.active]:this.active,[t.single]:r,[t.containerHighlightSelected]:this.selected&&this.selectionAppearance==="highlight"},D=z(this.el);return this.el.ariaHidden="true",this.el.ariaLabel=R,this.interactiveContainer({disabled:e,children:c`<div class=${i({[t.container]:!0,[t.scale(this.scale)]:!0})} style=${C({[E]:`${D}`})}><li class=${i(A)} id=${this.guid??v} @click=${this.itemClickHandler}>${this.renderSelectIndicator(T)}<slot name=${H.contentStart}></slot>${this.renderIcon(B)}<div class=${i(t.centerContent)}><div class=${i(t.heading)}>${n({text:_,pattern:s})}</div>${g?c`<div class=${i(t.description)}>${n({text:g,pattern:s})}</div>`:null}</div>${p?c`<div class=${i(t.shortText)}>${n({text:p,pattern:s})}</div>`:null}<slot name=${H.contentEnd}></slot></li>${this.renderChildren()}</div>`})}};$("calcite-combobox-item",m);export{m as ComboboxItem};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as B}from"./
|
|
2
|
+
import{a as B}from"./XY2TYQGP.js";import{a as D,b as O}from"./YQVDFZGC.js";import{a as w}from"./ZKILL7WF.js";import{c as d,e as E,f as z,g as C,h as L,i as f}from"./3KOO2DDK.js";import{a as x}from"./JGQ5AYYB.js";import{a as y}from"./MDPBLZUD.js";import"./5EBGPCB7.js";import"./GZZYSINJ.js";import"./YP3AYJH3.js";import{e as k}from"./KGRJJLLC.js";import"./6SSCE6VG.js";import{C as g,D as p,E as v,F as o,R as b,g as m,h as u,p as t}from"./LIR56SYG.js";var F={positionContainer:"position-container",container:"container"},S=m`:host{display:contents;--calcite-internal-tooltip-padding-block: var(--calcite-spacing-sm);--calcite-internal-tooltip-padding-inline: var(--calcite-spacing-md)}:host([top-layer-disabled]){--calcite-floating-ui-z-index: var(--calcite-z-index-tooltip)}.position-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{.position-container{opacity:0;inset-block-start:0;left:0}}.position-container{max-inline-size:var(--calcite-tooltip-max-size-x, 20rem);max-block-size:20rem}.position-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.position-container:popover-open{display:block}.position-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}.position-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.position-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.position-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.position-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.position-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.calcite-floating-ui-arrow{pointer-events:none;position:absolute;z-index:calc(var(--calcite-z-index) * -1);fill:var(--calcite-color-foreground-1)}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-color-border-3)}:host([scale=s]){--calcite-internal-tooltip-padding-block: var(--calcite-spacing-xxs);--calcite-internal-tooltip-padding-inline: var(--calcite-spacing-sm)}:host([scale=s]) .container{font-size:var(--calcite-font-size-relative-xs);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) .container{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}.container{position:relative;overflow:hidden;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);font-weight:var(--calcite-font-weight-medium);word-wrap:break-word;word-break:break-word;padding-block:var(--calcite-internal-tooltip-padding-block);padding-inline:var(--calcite-internal-tooltip-padding-inline);border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round));color:var(--calcite-tooltip-text-color, var(--calcite-color-text-1));text-align:start}.position-container .calcite-floating-ui-anim{border-width:1px;border-style:solid;box-shadow:var(--calcite-shadow-md);background-color:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-tooltip-border-color, var(--calcite-color-border-3));border-radius:var(--calcite-tooltip-corner-radius, var(--calcite-corner-radius-round))}.calcite-floating-ui-arrow{fill:var(--calcite-tooltip-background-color, var(--calcite-color-foreground-1))}.calcite-floating-ui-arrow__stroke{stroke:var(--calcite-tooltip-border-color, var(--calcite-color-border-3))}:host([hidden]){display:none}[hidden]{display:none}`,T=O({hover:!0}),h=class extends v{constructor(){super(...arguments),this.direction=k(),this.referenceElementType="hover",this.referenceElementController=D({manager:T})(this),this.transitionProp="opacity",this.transitionRef=g(),this.topLayer=w({disabledOverride:()=>this.open&&!this.referenceEl,target:()=>this.floatingEl})(this),this.floatingLayout="vertical",this.closeOnClick=!1,this.offsetDistance=f,this.offsetSkidding=0,this.open=!1,this.overlayPositioning="absolute",this.placement="auto",this.pointerDisabled=!1,this.scale="m",this.topLayerDisabled=!1,this.calciteTooltipBeforeClose=t({cancelable:!1}),this.calciteTooltipBeforeOpen=t({cancelable:!1}),this.calciteTooltipClose=t({cancelable:!1}),this.calciteTooltipOpen=t({cancelable:!1})}static{this.properties={floatingLayout:[16,{},{state:!0}],referenceEl:[16,{},{state:!0}],closeOnClick:[7,{},{reflect:!0,type:Boolean}],label:1,offsetDistance:[11,{},{type:Number,reflect:!0}],offsetSkidding:[11,{},{reflect:!0,type:Number}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],pointerDisabled:[7,{},{reflect:!0,type:Boolean}],referenceElement:1,scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=S}async reposition(e=!1){let{referenceEl:a,placement:n,overlayPositioning:r,offsetDistance:l,offsetSkidding:i,arrowEl:s,floatingEl:c}=this;return E(this,{direction:this.direction,floatingEl:c,referenceEl:a,overlayPositioning:r,placement:n,offsetDistance:l,offsetSkidding:i,arrowEl:s,type:"tooltip"},e)}willUpdate(e){(e.has("offsetDistance")&&(this.hasUpdated||this.offsetDistance!==f)||e.has("offsetSkidding")&&(this.hasUpdated||this.offsetSkidding!==0)||e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!=="auto"))&&this.reposition(!0),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("referenceElement")&&!this.referenceElement&&this.open&&this.topLayer.hide()}updated(e){e.has("referenceEl")&&C(this)}disconnectedCallback(){super.disconnectedCallback(),L(this)}openHandler(){x(this),this.reposition(!0)}onBeforeOpen(){this.calciteTooltipBeforeOpen.emit(),this.topLayer.show()}onOpen(){this.calciteTooltipOpen.emit()}onBeforeClose(){this.calciteTooltipBeforeClose.emit()}onClose(){this.calciteTooltipClose.emit(),z(this),this.topLayer.hide()}setFloatingEl(e){this.floatingEl=e}setArrowEl(e){this.arrowEl=e,this.reposition(!0)}render(){let{referenceEl:e,label:a,open:n,pointerDisabled:r,floatingLayout:l}=this,i=e&&n,s=!i,c=r?null:y("floating-arrow",B({floatingLayout:l,ref:this.setArrowEl}));return this.el.inert=s,this.el.ariaLabel=a??null,this.el.ariaLive="polite",this.el.role="tooltip",u`<div class=${o(F.positionContainer)} popover=manual ${p(this.setFloatingEl)}><div class=${o({[d.animation]:!0,[d.animationActive]:i})} ${p(this.transitionRef)}>${c}<div class=${o(F.container)}><slot></slot></div></div></div>`}};b("calcite-tooltip",h);export{h as Tooltip};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{b as l}from"./
|
|
2
|
+
import{b as l}from"./KGRJJLLC.js";var d=s=>l(e=>{function i(r){let{form:t}=e.elementInternals;if(!(r.defaultPrevented||e.disabled||s?.disabled?.()||!t||e.type==="button")){if(e.type==="submit"){t.requestSubmit();return}t.reset()}}e.listen("luminaFormAssociatedCallback",({detail:[r]})=>{r?e.el.addEventListener("click",i):e.el.removeEventListener("click",i)})});export{d as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{b as I}from"./GZZYSINJ.js";import{a as C}from"./VI7SBYXT.js";import{e as z}from"./
|
|
2
|
+
import{b as I}from"./GZZYSINJ.js";import{a as C}from"./VI7SBYXT.js";import{e as z}from"./KGRJJLLC.js";import{E as b,F as v,O as g,R as x,S as y,g as u,h as m,i as p,l as h}from"./LIR56SYG.js";var $={flipRtl:"flip-rtl",svg:"svg"},D={},d={},k={s:16,m:24,l:32};function w({icon:e,scale:t}){let i=k[t],s=U(e),n=s.charAt(s.length-1)==="F";return`${n?s.substring(0,s.length-1):s}${i}${n?"F":""}`}async function O(e){let t=w(e),i=N(t);if(i)return i;d[t]||(d[t]=fetch(y(`./assets/icon/${t}.json`)).then(n=>n.json()).catch(()=>(g.error(`${e.icon} (${e.scale}) icon failed to load`),"")));let s=await d[t];return D[t]=s,s}function A(e){return N(w(e))}function N(e){return D[e]}function U(e){let t=!isNaN(Number(e.charAt(0))),i=e.split("-");if(i.length>0){let n=/[a-z]/i;e=i.map((o,a)=>o.replace(n,function(l,r){return a===0&&r===0?l:l.toUpperCase()})).join("")}return t?`i${e}`:e}var B=u`:host{display:inline-flex;color:var(--calcite-icon-color, var(--calcite-ui-icon-color, currentColor))}:host([scale=s]){inline-size:16px;block-size:16px;min-inline-size:16px;min-block-size:16px}:host([scale=m]){inline-size:24px;block-size:24px;min-inline-size:24px;min-block-size:24px}:host([scale=l]){inline-size:32px;block-size:32px;min-inline-size:32px;min-block-size:32px}.flip-rtl{transform:scaleX(-1)}.svg{display:block}:host([hidden]){display:none}[hidden]{display:none}`,f=class extends b{constructor(){super(...arguments),this.direction=z(),this.visible=!1,this.flipRtl=!1,this.preload=!1,this.scale="m"}static{this.properties={pathData:[16,{},{state:!0}],visible:[16,{},{state:!0}],flipRtl:[7,{},{reflect:!0,type:Boolean}],icon:[3,{},{reflect:!0}],preload:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],textLabel:1}}static{this.styles=B}connectedCallback(){if(super.connectedCallback(),this.preload){this.visible=!0,this.loadIconPathData();return}this.visible||this.waitUntilVisible(()=>{this.visible=!0,this.loadIconPathData()})}willUpdate(t){(t.has("icon")&&(this.hasUpdated||this.icon!==void 0)||t.has("scale")&&(this.hasUpdated||this.scale!=="m"))&&this.loadIconPathData()}disconnectedCallback(){super.disconnectedCallback(),this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0}async loadIconPathData(){let{icon:t,scale:i,visible:s}=this;if(!t||!s)return;let n={icon:t,scale:i},o=A(n)||await O(n);t===this.icon&&(this.pathData=o)}waitUntilVisible(t){if(this.intersectionObserver=C("intersection",i=>{i.forEach(s=>{s.isIntersecting&&(this.intersectionObserver?.disconnect(),this.intersectionObserver=void 0,t())})},{rootMargin:"50px"}),!this.intersectionObserver){t();return}this.intersectionObserver.observe(this.el)}render(){let{flipRtl:t,pathData:i,scale:s,textLabel:n}=this,o=this.direction,a=k[s],c=!!n,l=Array.isArray(i)?i:[i??""];return this.el.ariaHidden=I(!c),this.el.ariaLabel=c?n:null,this.el.role=c?"img":null,m`<svg aria-hidden=true class=${v({[$.flipRtl]:o==="rtl"&&t,[$.svg]:!0})} fill=currentColor height=100% viewBox=${`0 0 ${a} ${a}`} width=100% xmlns=http://www.w3.org/2000/svg>${l.map(r=>typeof r=="string"?p`<path d=${r??h} />`:p`<path d=${r.d??h} opacity=${("opacity"in r?r.opacity:1)??h} />`)}</svg>`}};x("calcite-icon",f);export{f as Icon};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as n}from"./
|
|
2
|
+
import{a as n}from"./ZO2DXLVH.js";import{a as o}from"./RQR7GQWW.js";import"./ZWPNZ5XW.js";import"./KGRJJLLC.js";import"./6SSCE6VG.js";import{E as r,R as c,g as s,h as a,p as i}from"./LIR56SYG.js";var u=s`:host{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,e=class extends r{constructor(){super(...arguments),this._active=!1,this.focusSetter=o()(this),this.focusTrapController=n({focusTrapOptions:{onActivate:()=>{this.setActive(!0)},onDeactivate:()=>{this.setActive(!1)}}})(this),this.focusTrapDisabled=!1,this.calciteFocusTrapActiveChange=i({cancelable:!1})}static{this.properties={focusTrapDisabled:[7,{},{reflect:!0,type:Boolean}],active:[32,{},{attribute:!1,readOnly:!0}],focusTrapDisabledOverride:[0,{},{attribute:!1}],focusTrapOptions:[0,{},{attribute:!1}]}}static{this.styles=u}get active(){return this._active}async activate(){this.focusTrapController.activate()}async deactivate(){this.focusTrapController.deactivate()}async setFocus(t){return this.focusSetter(()=>this.el,t)}async updateFocusTrapElements(t){this.focusTrapController.setExtraContainers(t),this.focusTrapController.updateContainerElements()}setActive(t){let l=this._active;this._active=t,this.requestUpdate("active",l),this.calciteFocusTrapActiveChange.emit()}render(){return a`<slot></slot>`}};c("calcite-focus-trap",e);export{e as FocusTrap};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{g as j}from"./QBJZUEM2.js";import{n as G}from"./MBM7UIXE.js";import{a as $}from"./DPP3XXXY.js";import{c as A}from"./HFOQJZQN.js";import{a as W}from"./UOHGOCIQ.js";import{a as q}from"./7T2N2EGO.js";import{a as E}from"./QAYYUZNF.js";import"./YP3AYJH3.js";import{a as k}from"./T4MMAZBQ.js";import{a as N}from"./THYIEUYX.js";import"./ZWPNZ5XW.js";import"./R55MDXLV.js";import"./EKXRU3BE.js";import{C as z,D as P,E as U,F as M,J as _,R as V,g as R,h as v,l as y,p}from"./TODNDEPM.js";var X={offset:"offset"},Y={labelContent:"label-content"},ee=60;function O(t){return t.replace(":15",".25").replace(":30",".5").replace(":45",".75").replace("\u2212","-")}function te(t,e){let o=L(t,"en-US",e).replace("GMT","");return o===""?0:Number(O(o))*ee}function oe(){return new Date().getTimezoneOffset()*-1}function se(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}async function ie(t){if(t==="offset")return o=>o;let{normalize:e}=await import("./RKLI4NN7.js");return e}async function ae(t,e,o,s,a){if(o==="name"){let{groupByName:n}=await import("./EOXVENGN.js");return(await n()).map(({label:l})=>({label:l,value:l,metadata:{filterValue:l}})).filter(l=>!!l).sort()}let i=a==="user"?t:a==="utc"?"fr":"en-GB",c=s.getTime();if(o==="region"){let[{groupByRegion:n},{getCountry:m,global:l}]=await Promise.all([import("./IYVJIUWV.js"),import("./Z6Q6E2KL.js")]);return(await n()).map(({label:u,tzs:f})=>(f.sort((h,d)=>{let I=T(h,e),x=T(d,e),b="Etc/GMT";if(h.startsWith(b)&&d.startsWith(b)){let g=h.substring(b.length),F=d.substring(b.length),Q=g===""?0:parseInt(g,10);return(F===""?0:parseInt(F,10))-Q}return I.localeCompare(x)}),{label:S(e,u),items:f.map(h=>{let d=O(L(h,i,c)),I=T(h,e),x=u===l?`${T(l,e)} Etc`:K(h),b=m(h),g=S(e,b);return{label:I,value:h,metadata:{country:g===I?void 0:g,filterValue:x,offset:d}}})})).sort((u,f)=>u.label===l?-1:f.label===l?1:u.label.localeCompare(f.label))}let[{groupByOffset:Z},{DateEngine:C}]=await Promise.all([import("./SJNBO2YA.js"),import("./TAT7KHVI.js")]),D=await Z({dateEngine:new C,groupDateRange:1,startDate:new Date(c).toISOString()}),J=new Intl.ListFormat(t,{style:"long",type:"conjunction"}),w=["Factory","Etc/UTC"];return D.forEach(n=>{let m=[],l=0;n.tzs.forEach((r,u)=>{w.includes(r)&&l++,m[u]=l}),n.tzs=n.tzs.filter(r=>!w.includes(r)),n.labelTzIdx=n.labelTzIdx.map(r=>r-m[r]).filter(r=>r>=0&&r<n.tzs.length)}),D.map(({labelTzIdx:n,tzs:m})=>{let l=m[0],r=O(L(l,i,c)),u=te(l,c),f=n.map(d=>T(m[d],e));return{label:re(e,r,J.format(f)),value:u,metadata:{filterValue:m.map(d=>K(d))}}}).filter(n=>!!n).sort((n,m)=>n.value-m.value)}function T(t,e){return e[t]||le(t)}function ne(t,e,o){return o.timeZoneRegionLabel.replace("{city}",t).replace("{country}",S(o,e))}function S(t,e){return t[e]||e}function le(t){return t.split("/").pop()??""}function K(t){return t.replace(/_/g," ")}function re(t,e,o){return t.timeZoneLabel.replace("{offset}",e).replace("{cities}",o)}function L(t,e,o=Date.now()){return t==="Factory"&&(t="Etc/GMT"),G(e,{timeZone:t,timeZoneName:"shortOffset"}).formatToParts(o).find(({type:i})=>i==="timeZoneName").value}function ce(t){return t[0].items!==void 0}function me(t){return ce(t)?t.flatMap(e=>e.items):t}function H(t,e,o){return o===void 0||t===void 0?void 0:me(t).find(s=>s[e]==o)}var ue=R`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;--calcite-combobox-corner-radius: var(--calcite-input-time-zone-corner-radius, var(--calcite-corner-radius))}.offset{white-space:nowrap}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,B=class extends U{constructor(){super(...arguments),this.comboboxRef=z(),this.formSupport=A({inputType:"text"})(this),this.messages=k({blocking:!0}),this.focusSetter=N()(this),this.interactiveContainer=q(this),this.labelable=W(this),this.#e=null,this.clearable=!1,this.disabled=!1,this.maxItems=0,this.mode="offset",this.offsetStyle="user",this.open=!1,this.overlayPositioning="absolute",this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.topLayerDisabled=!1,this.calciteInputTimeZoneBeforeClose=p({cancelable:!1}),this.calciteInputTimeZoneBeforeOpen=p({cancelable:!1}),this.calciteInputTimeZoneChange=p({cancelable:!1}),this.calciteInputTimeZoneClose=p({cancelable:!1}),this.calciteInputTimeZoneOpen=p({cancelable:!1})}static{this.properties={selectedTimeZoneItem:[16,{},{state:!0}],timeZoneItems:[16,{},{state:!0}],clearable:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],mode:[3,{},{reflect:!0}],name:[3,{},{reflect:!0}],offsetStyle:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placeholder:1,readOnly:[7,{},{reflect:!0,type:Boolean}],referenceDate:1,required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],validationIcon:[3,{converter:_},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=ue}#e;get value(){return this._value}set value(e){this.#e="internal",this._value=e}async setFocus(e){return this.focusSetter(()=>this.comboboxRef.value,e)}async load(){this.normalizer=await ie(this.mode),await this.updateTimeZoneItems();let e=this.value,o=this.normalizeValue(e);this.value=o||(e===""?o:void 0),this.updateTimeZoneSelection();let s=this.selectedTimeZoneItem?`${this.selectedTimeZoneItem.value}`:"";this.value=s}willUpdate(e){e.has("value")&&this.hasUpdated&&this.handleValueChange(this.value,e.get("value")),(e.has("messages")||e.has("mode")&&(this.hasUpdated||this.mode!=="offset")||e.has("referenceDate"))&&this.handleTimeZoneItemPropsChange(),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openChanged()}loaded(){this.openChanged()}async handleTimeZoneItemPropsChange(){!this.timeZoneItems||!this.hasUpdated||(await this.updateTimeZoneItems(),this.updateTimeZoneSelection())}openChanged(){this.comboboxRef.value&&(this.comboboxRef.value.open=this.open)}async handleValueChange(e,o){let s=this.#e==="user";if(this.#e=null,s)return;let a=this.normalizeValue(e);if(!a){if(this.clearable){this._value=a,this.selectedTimeZoneItem=void 0;return}this._value=o,this.selectedTimeZoneItem=this.findTimeZoneItem(o);return}let i=this.findTimeZoneItem(a);if(!i){this._value=o;return}this._value=a,this.selectedTimeZoneItem=i}onLabelClick(){this.setFocus()}overrideSelectedLabelForRegion(e){this.mode!=="region"||!this.selectedTimeZoneItem||this.comboboxRef.value&&(this.comboboxRef.value.selectedItems[0].heading=this.getItemLabel(this.selectedTimeZoneItem,e))}onComboboxBeforeClose(e){e.stopPropagation(),this.overrideSelectedLabelForRegion(!1),this.calciteInputTimeZoneBeforeClose.emit()}onComboboxBeforeOpen(e){e.stopPropagation(),this.overrideSelectedLabelForRegion(!0),this.calciteInputTimeZoneBeforeOpen.emit()}onComboboxChange(e){e.stopPropagation();let s=e.target.selectedItems[0],a=this._value;if(!s){this._value="",this.requestUpdate("value",a),this.selectedTimeZoneItem=void 0,this.calciteInputTimeZoneChange.emit();return}let i=this.findTimeZoneItemByLabel(s.getAttribute("data-label")??void 0),c=i?.value===void 0?void 0:`${i?.value}`;this.value===c&&i?.label===this.selectedTimeZoneItem?.label||(this._value=c,this.requestUpdate("value",a),this.selectedTimeZoneItem=i,this.#e="user",this.calciteInputTimeZoneChange.emit())}onComboboxClose(e){e.stopPropagation(),this.open=!1,this.calciteInputTimeZoneClose.emit()}onComboboxOpen(e){this.open=!0,e.stopPropagation(),this.calciteInputTimeZoneOpen.emit()}findTimeZoneItem(e){return H(this.timeZoneItems,"value",e)}findTimeZoneItemByLabel(e){return H(this.timeZoneItems,"label",e)}async updateTimeZoneItems(){this.timeZoneItems=await this.createTimeZoneItems()}updateTimeZoneSelection(){if(this.value===""&&this.clearable){this.selectedTimeZoneItem=void 0;return}let e=this.mode==="offset"?oe():se(),o=this.value===""||!this.value?e:this.value;this.selectedTimeZoneItem=this.findTimeZoneItem(o)||this.findTimeZoneItem(e)}async createTimeZoneItems(){return!this.messages._lang||!this.messages?[]:ae(this.messages._lang,this.messages,this.mode,this.referenceDate instanceof Date?this.referenceDate:new Date(this.referenceDate??Date.now()),this.offsetStyle)}normalizeValue(e){return e=e===void 0?"":e,e&&this.normalizer(e)}getItemLabel(e,o=this.open){let s=this.selectedTimeZoneItem===e,{label:a,metadata:i}=e;return!i.country||o||!s?a:ne(a,i.country,this.messages)}render(){return this.interactiveContainer({disabled:this.disabled,children:v`<calcite-combobox .clearDisabled=${!this.clearable} .disabled=${this.disabled} .label=${this.messages.chooseTimeZone} .labelText=${this.labelText} lang=${this.messages._lang??y} .maxItems=${this.maxItems} @calciteComboboxBeforeClose=${this.onComboboxBeforeClose} @calciteComboboxBeforeOpen=${this.onComboboxBeforeOpen} @calciteComboboxChange=${this.onComboboxChange} @calciteComboboxClose=${this.onComboboxClose} @calciteComboboxOpen=${this.onComboboxOpen} .overlayPositioning=${this.overlayPositioning} .placeholder=${this.placeholder||this.messages[`${this.mode}Placeholder`]} placeholder-icon=search .readOnly=${this.readOnly} .required=${this.required} .scale=${this.scale} .selectionMode=${this.clearable?"single":"single-persist"} .status=${this.status} .topLayerDisabled=${this.topLayerDisabled} .validationIcon=${this.validationIcon} .validationMessage=${this.validationMessage} ${P(this.comboboxRef)}>${this.renderItems()}<slot name=${Y.labelContent} slot=${j.labelContent}></slot></calcite-combobox>`})}renderItems(){return this.mode==="region"?this.renderRegionItems():$(this.timeZoneItems,({label:e})=>e,e=>{let o=this.selectedTimeZoneItem===e,{label:s,metadata:a,value:i}=e;return v`<calcite-combobox-item data-label=${s??y} .heading=${s} .metadata=${a} .selected=${o} .value=${i}></calcite-combobox-item>`})}renderRegionItems(){return this.timeZoneItems.flatMap(({label:e,items:o})=>E(e,v`<calcite-combobox-item-group .label=${e}>${$(o,({label:s})=>s,s=>{let a=this.selectedTimeZoneItem===s,{label:i,metadata:c,value:Z}=s,C=this.getItemLabel(s);return v`<calcite-combobox-item data-label=${i??y} .description=${c.country} .heading=${C} .metadata=${c} .selected=${a} .value=${Z}><span class=${M(X.offset)} slot=content-end>${c.offset}</span></calcite-combobox-item>`})}</calcite-combobox-item-group>`))}};V("calcite-input-time-zone",B);export{B as InputTimeZone};
|
|
2
|
+
import{g as j}from"./QBJZUEM2.js";import{n as G}from"./MBM7UIXE.js";import{a as $}from"./N5YINROO.js";import{c as A}from"./V5GD27VR.js";import{a as W}from"./FGF5VH2I.js";import{a as q}from"./S57EC43R.js";import{a as E}from"./MDPBLZUD.js";import"./YP3AYJH3.js";import{a as k}from"./Y5OVRT7Q.js";import{a as N}from"./RQR7GQWW.js";import"./ZWPNZ5XW.js";import"./KGRJJLLC.js";import"./6SSCE6VG.js";import{C as z,D as P,E as U,F as M,J as _,R as V,g as R,h as v,l as y,p}from"./LIR56SYG.js";var X={offset:"offset"},Y={labelContent:"label-content"},ee=60;function O(t){return t.replace(":15",".25").replace(":30",".5").replace(":45",".75").replace("\u2212","-")}function te(t,e){let o=L(t,"en-US",e).replace("GMT","");return o===""?0:Number(O(o))*ee}function oe(){return new Date().getTimezoneOffset()*-1}function se(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}async function ie(t){if(t==="offset")return o=>o;let{normalize:e}=await import("./RKLI4NN7.js");return e}async function ae(t,e,o,s,a){if(o==="name"){let{groupByName:n}=await import("./EOXVENGN.js");return(await n()).map(({label:l})=>({label:l,value:l,metadata:{filterValue:l}})).filter(l=>!!l).sort()}let i=a==="user"?t:a==="utc"?"fr":"en-GB",c=s.getTime();if(o==="region"){let[{groupByRegion:n},{getCountry:m,global:l}]=await Promise.all([import("./IYVJIUWV.js"),import("./Z6Q6E2KL.js")]);return(await n()).map(({label:u,tzs:f})=>(f.sort((h,d)=>{let I=T(h,e),x=T(d,e),b="Etc/GMT";if(h.startsWith(b)&&d.startsWith(b)){let g=h.substring(b.length),F=d.substring(b.length),Q=g===""?0:parseInt(g,10);return(F===""?0:parseInt(F,10))-Q}return I.localeCompare(x)}),{label:S(e,u),items:f.map(h=>{let d=O(L(h,i,c)),I=T(h,e),x=u===l?`${T(l,e)} Etc`:K(h),b=m(h),g=S(e,b);return{label:I,value:h,metadata:{country:g===I?void 0:g,filterValue:x,offset:d}}})})).sort((u,f)=>u.label===l?-1:f.label===l?1:u.label.localeCompare(f.label))}let[{groupByOffset:Z},{DateEngine:C}]=await Promise.all([import("./SJNBO2YA.js"),import("./TAT7KHVI.js")]),D=await Z({dateEngine:new C,groupDateRange:1,startDate:new Date(c).toISOString()}),J=new Intl.ListFormat(t,{style:"long",type:"conjunction"}),w=["Factory","Etc/UTC"];return D.forEach(n=>{let m=[],l=0;n.tzs.forEach((r,u)=>{w.includes(r)&&l++,m[u]=l}),n.tzs=n.tzs.filter(r=>!w.includes(r)),n.labelTzIdx=n.labelTzIdx.map(r=>r-m[r]).filter(r=>r>=0&&r<n.tzs.length)}),D.map(({labelTzIdx:n,tzs:m})=>{let l=m[0],r=O(L(l,i,c)),u=te(l,c),f=n.map(d=>T(m[d],e));return{label:re(e,r,J.format(f)),value:u,metadata:{filterValue:m.map(d=>K(d))}}}).filter(n=>!!n).sort((n,m)=>n.value-m.value)}function T(t,e){return e[t]||le(t)}function ne(t,e,o){return o.timeZoneRegionLabel.replace("{city}",t).replace("{country}",S(o,e))}function S(t,e){return t[e]||e}function le(t){return t.split("/").pop()??""}function K(t){return t.replace(/_/g," ")}function re(t,e,o){return t.timeZoneLabel.replace("{offset}",e).replace("{cities}",o)}function L(t,e,o=Date.now()){return t==="Factory"&&(t="Etc/GMT"),G(e,{timeZone:t,timeZoneName:"shortOffset"}).formatToParts(o).find(({type:i})=>i==="timeZoneName").value}function ce(t){return t[0].items!==void 0}function me(t){return ce(t)?t.flatMap(e=>e.items):t}function H(t,e,o){return o===void 0||t===void 0?void 0:me(t).find(s=>s[e]==o)}var ue=R`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;--calcite-combobox-corner-radius: var(--calcite-input-time-zone-corner-radius, var(--calcite-corner-radius))}.offset{white-space:nowrap}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,B=class extends U{constructor(){super(...arguments),this.comboboxRef=z(),this.formSupport=A({inputType:"text"})(this),this.messages=k({blocking:!0}),this.focusSetter=N()(this),this.interactiveContainer=q(this),this.labelable=W(this),this.#e=null,this.clearable=!1,this.disabled=!1,this.maxItems=0,this.mode="offset",this.offsetStyle="user",this.open=!1,this.overlayPositioning="absolute",this.readOnly=!1,this.required=!1,this.scale="m",this.status="idle",this.topLayerDisabled=!1,this.calciteInputTimeZoneBeforeClose=p({cancelable:!1}),this.calciteInputTimeZoneBeforeOpen=p({cancelable:!1}),this.calciteInputTimeZoneChange=p({cancelable:!1}),this.calciteInputTimeZoneClose=p({cancelable:!1}),this.calciteInputTimeZoneOpen=p({cancelable:!1})}static{this.properties={selectedTimeZoneItem:[16,{},{state:!0}],timeZoneItems:[16,{},{state:!0}],clearable:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],mode:[3,{},{reflect:!0}],name:[3,{},{reflect:!0}],offsetStyle:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placeholder:1,readOnly:[7,{},{reflect:!0,type:Boolean}],referenceDate:1,required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],validationIcon:[3,{converter:_},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=ue}#e;get value(){return this._value}set value(e){this.#e="internal",this._value=e}async setFocus(e){return this.focusSetter(()=>this.comboboxRef.value,e)}async load(){this.normalizer=await ie(this.mode),await this.updateTimeZoneItems();let e=this.value,o=this.normalizeValue(e);this.value=o||(e===""?o:void 0),this.updateTimeZoneSelection();let s=this.selectedTimeZoneItem?`${this.selectedTimeZoneItem.value}`:"";this.value=s}willUpdate(e){e.has("value")&&this.hasUpdated&&this.handleValueChange(this.value,e.get("value")),(e.has("messages")||e.has("mode")&&(this.hasUpdated||this.mode!=="offset")||e.has("referenceDate"))&&this.handleTimeZoneItemPropsChange(),e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openChanged()}loaded(){this.openChanged()}async handleTimeZoneItemPropsChange(){!this.timeZoneItems||!this.hasUpdated||(await this.updateTimeZoneItems(),this.updateTimeZoneSelection())}openChanged(){this.comboboxRef.value&&(this.comboboxRef.value.open=this.open)}async handleValueChange(e,o){let s=this.#e==="user";if(this.#e=null,s)return;let a=this.normalizeValue(e);if(!a){if(this.clearable){this._value=a,this.selectedTimeZoneItem=void 0;return}this._value=o,this.selectedTimeZoneItem=this.findTimeZoneItem(o);return}let i=this.findTimeZoneItem(a);if(!i){this._value=o;return}this._value=a,this.selectedTimeZoneItem=i}onLabelClick(){this.setFocus()}overrideSelectedLabelForRegion(e){this.mode!=="region"||!this.selectedTimeZoneItem||this.comboboxRef.value&&(this.comboboxRef.value.selectedItems[0].heading=this.getItemLabel(this.selectedTimeZoneItem,e))}onComboboxBeforeClose(e){e.stopPropagation(),this.overrideSelectedLabelForRegion(!1),this.calciteInputTimeZoneBeforeClose.emit()}onComboboxBeforeOpen(e){e.stopPropagation(),this.overrideSelectedLabelForRegion(!0),this.calciteInputTimeZoneBeforeOpen.emit()}onComboboxChange(e){e.stopPropagation();let s=e.target.selectedItems[0],a=this._value;if(!s){this._value="",this.requestUpdate("value",a),this.selectedTimeZoneItem=void 0,this.calciteInputTimeZoneChange.emit();return}let i=this.findTimeZoneItemByLabel(s.getAttribute("data-label")??void 0),c=i?.value===void 0?void 0:`${i?.value}`;this.value===c&&i?.label===this.selectedTimeZoneItem?.label||(this._value=c,this.requestUpdate("value",a),this.selectedTimeZoneItem=i,this.#e="user",this.calciteInputTimeZoneChange.emit())}onComboboxClose(e){e.stopPropagation(),this.open=!1,this.calciteInputTimeZoneClose.emit()}onComboboxOpen(e){this.open=!0,e.stopPropagation(),this.calciteInputTimeZoneOpen.emit()}findTimeZoneItem(e){return H(this.timeZoneItems,"value",e)}findTimeZoneItemByLabel(e){return H(this.timeZoneItems,"label",e)}async updateTimeZoneItems(){this.timeZoneItems=await this.createTimeZoneItems()}updateTimeZoneSelection(){if(this.value===""&&this.clearable){this.selectedTimeZoneItem=void 0;return}let e=this.mode==="offset"?oe():se(),o=this.value===""||!this.value?e:this.value;this.selectedTimeZoneItem=this.findTimeZoneItem(o)||this.findTimeZoneItem(e)}async createTimeZoneItems(){return!this.messages._lang||!this.messages?[]:ae(this.messages._lang,this.messages,this.mode,this.referenceDate instanceof Date?this.referenceDate:new Date(this.referenceDate??Date.now()),this.offsetStyle)}normalizeValue(e){return e=e===void 0?"":e,e&&this.normalizer(e)}getItemLabel(e,o=this.open){let s=this.selectedTimeZoneItem===e,{label:a,metadata:i}=e;return!i.country||o||!s?a:ne(a,i.country,this.messages)}render(){return this.interactiveContainer({disabled:this.disabled,children:v`<calcite-combobox .clearDisabled=${!this.clearable} .disabled=${this.disabled} .label=${this.messages.chooseTimeZone} .labelText=${this.labelText} lang=${this.messages._lang??y} .maxItems=${this.maxItems} @calciteComboboxBeforeClose=${this.onComboboxBeforeClose} @calciteComboboxBeforeOpen=${this.onComboboxBeforeOpen} @calciteComboboxChange=${this.onComboboxChange} @calciteComboboxClose=${this.onComboboxClose} @calciteComboboxOpen=${this.onComboboxOpen} .overlayPositioning=${this.overlayPositioning} .placeholder=${this.placeholder||this.messages[`${this.mode}Placeholder`]} placeholder-icon=search .readOnly=${this.readOnly} .required=${this.required} .scale=${this.scale} .selectionMode=${this.clearable?"single":"single-persist"} .status=${this.status} .topLayerDisabled=${this.topLayerDisabled} .validationIcon=${this.validationIcon} .validationMessage=${this.validationMessage} ${P(this.comboboxRef)}>${this.renderItems()}<slot name=${Y.labelContent} slot=${j.labelContent}></slot></calcite-combobox>`})}renderItems(){return this.mode==="region"?this.renderRegionItems():$(this.timeZoneItems,({label:e})=>e,e=>{let o=this.selectedTimeZoneItem===e,{label:s,metadata:a,value:i}=e;return v`<calcite-combobox-item data-label=${s??y} .heading=${s} .metadata=${a} .selected=${o} .value=${i}></calcite-combobox-item>`})}renderRegionItems(){return this.timeZoneItems.flatMap(({label:e,items:o})=>E(e,v`<calcite-combobox-item-group .label=${e}>${$(o,({label:s})=>s,s=>{let a=this.selectedTimeZoneItem===s,{label:i,metadata:c,value:Z}=s,C=this.getItemLabel(s);return v`<calcite-combobox-item data-label=${i??y} .description=${c.country} .heading=${C} .metadata=${c} .selected=${a} .value=${Z}><span class=${M(X.offset)} slot=content-end>${c.offset}</span></calcite-combobox-item>`})}</calcite-combobox-item-group>`))}};V("calcite-input-time-zone",B);export{B as InputTimeZone};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{E as l,F as a,H as o,R as r,g as n,h as t}from"./
|
|
2
|
+
import{E as l,F as a,H as o,R as r,g as n,h as t}from"./LIR56SYG.js";var i={container:"container",containerNoSpacing:"container--no-spacing",firstTitle:"first-title",heading:"heading",scale:c=>`scale--${c}`,separator:"separator"},g=n`.scale--s{font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var(--calcite-spacing-sm);--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var(--calcite-spacing-xxs)}.scale--s .first-title{padding-block-start:var(--calcite-spacing-sm)}.scale--s .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}.scale--m{font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var(--calcite-spacing-md);--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var(--calcite-spacing-xs)}.scale--m .first-title{padding-block-start:var(--calcite-spacing-md)}.scale--m .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}.scale--l{font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md);--calcite-internal-autocomplete-item-group-horizontal-spacing-unit: var(--calcite-spacing-lg);--calcite-internal-autocomplete-item-group-vertical-spacing-unit: var(--calcite-spacing-sm-plus)}.scale--l .first-title{padding-block-start:var(--calcite-spacing-xl)}.scale--l .separator{margin-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);margin-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}:host{margin:0;display:flex;flex-direction:column}.container{display:flex;flex-direction:column;background-color:var(--calcite-autocomplete-background-color, var(--calcite-color-foreground-1))}.container--no-spacing{padding-block-start:0}.separator{block-size:var(--calcite-spacing-px);background-color:var(--calcite-autocomplete-border-color, var(--calcite-color-border-3))}.heading{box-sizing:border-box;inline-size:100%;min-inline-size:0px;max-inline-size:100%;font-weight:var(--calcite-font-weight-bold);word-wrap:break-word;word-break:break-word;color:var(--calcite-autocomplete-text-color, var(--calcite-color-text-1));padding-block:var(--calcite-internal-autocomplete-item-group-vertical-spacing-unit);padding-inline:var(--calcite-internal-autocomplete-item-group-horizontal-spacing-unit)}:host([hidden]){display:none}[hidden]{display:none}`,e=class extends l{constructor(){super(...arguments),this.disableSpacing=!1,this.position=0,this.scale="m"}static{this.properties={disableSpacing:[5,{},{type:Boolean}],heading:1,label:1,position:[9,{},{type:Number}],scale:1}}static{this.styles=g}render(){let{scale:s}=this,p=this.position>0?t`<div class=${a(i.separator)} role=separator></div>`:null;return t`<div aria-label=${this.label??this.heading??o} class=${a({[i.container]:!0,[i.containerNoSpacing]:this.disableSpacing,[i.scale(s)]:!0})} role=group>${p}<div class=${a({[i.heading]:!0,[i.firstTitle]:this.position===0})}>${this.heading}</div><slot></slot></div>`}};r("calcite-autocomplete-item-group",e);export{e as AutocompleteItemGroup};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as g,b as h,e as O,f as W,k as x,l as b,n as y,o as F,q as p}from"./RYA2FB6F.js";import{m as d}from"./MBM7UIXE.js";import{i as I,j as P,k as A}from"./27YYIR6K.js";import{a as u}from"./YP3AYJH3.js";import{l as S,n as R}from"./EKXRU3BE.js";import{B as z,C as m,D as v,E as Y,F as r,R as w,g as D,h as l,l as $,p as C}from"./TODNDEPM.js";var E=D`:host{display:block}.header{display:flex;block-size:100%;align-items:center;justify-content:space-between}.chevron-container{display:flex;align-items:center}:host([scale=s]){block-size:24px;margin:var(--calcite-spacing-xs);margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .chevron-container,:host([scale=s]) .chevron{min-inline-size:24px;block-size:24px}:host([scale=m]){block-size:32px;margin:var(--calcite-spacing-sm);margin-inline-start:var(--calcite-spacing-sm-plus)}:host([scale=m]) .chevron-container,:host([scale=m]) .chevron{min-inline-size:32px;block-size:32px;--calcite-internal-action-padding-block: var(--calcite-spacing-xxs)}:host([scale=l]){block-size:44px;margin:var(--calcite-spacing-xs);margin-inline-start:var(--calcite-spacing-sm)}:host([scale=l]) .chevron-container,:host([scale=l]) .chevron{min-inline-size:44px;block-size:44px;--calcite-internal-action-padding-block: var(--calcite-spacing-sm-plus)}.chevron{box-sizing:content-box;display:flex;block-size:100%;inline-size:100%;flex-grow:0;cursor:pointer;align-items:center;justify-content:center;border-style:none;outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;--calcite-internal-action-padding-block: 0;--calcite-action-background-color: var(--calcite-date-picker-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-date-picker-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-date-picker-header-action-background-color-press);--calcite-action-text-color: var(--calcite-date-picker-header-action-text-color);--calcite-action-text-color-press: var(--calcite-date-picker-header-action-text-color-press)}.chevron:focus{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))))}.chevron[aria-disabled=true]{pointer-events:none}.month-year-container{display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;align-items:center;justify-content:flex-start;text-align:center;line-height:1;gap:var(--calcite-spacing-xxs)}.month-year-container.range-calendar{justify-content:center}.year-container{position:relative;display:flex;block-size:100%}.suffix{display:flex;align-items:center}.year,.suffix{margin-inline:var(--calcite-spacing-xxs);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-date-picker-year-text-color, var(--calcite-color-text-1));font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-fixed-lg)}.year{position:relative;display:inline-block;border-style:none;background-color:transparent;text-align:center;font-family:inherit;outline-color:transparent;inline-size:44px}.year:hover{transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:outline-color;outline:2px solid var(--calcite-color-border-2);outline-offset:-2px}.year:focus{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))))}.month-select{--calcite-select-internal-border-width: 0;--calcite-select-internal-icon-border-inline-end-width: 0;--calcite-internal-select-spacing-inline: var(--calcite-spacing-xxs);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size-md));--calcite-select-text-color: var(--calcite-date-picker-month-select-text-color, var(--calcite-color-text-1));--calcite-select-icon-color: var(--calcite-date-picker-month-select-icon-color);--calcite-select-icon-color-hover: var(--calcite-date-picker-month-select-icon-color-hover);--calcite-internal-select-spacing-block: var(--calcite-spacing-xxs);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-xxs);--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-lg);--calcite-internal-select-font-weight: var(--calcite-font-weight-medium)}:host([scale=s]) .month-year-container .month-select{--calcite-internal-select-spacing-inline: var(--calcite-spacing-base);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size));--calcite-internal-select-spacing-block: var(--calcite-spacing-base);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-base);--calcite-internal-select-block-size: 24px;--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-base)}:host([scale=s]) .month-year-container .year{inline-size:40px}:host([scale=s]) .month-year-container .year,:host([scale=s]) .month-year-container .suffix{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-fixed-base)}:host([scale=l]) .month-year-container .month-select{--calcite-internal-select-spacing-inline: var(--calcite-spacing-sm);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size-lg));--calcite-internal-select-spacing-block: var(--calcite-spacing-sm);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-sm);--calcite-internal-select-block-size: 44px;--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-xl)}:host([scale=l]) .month-year-container .year{inline-size:48px}:host([scale=l]) .month-year-container .year,:host([scale=l]) .month-year-container .suffix{font-size:var(--calcite-font-size-lg);line-height:var(--calcite-font-line-height-fixed-xl)}:host([hidden]){display:none}[hidden]{display:none}`,s={header:"header",chevron:"chevron",chevronContainer:"chevron-container",monthYearContainer:"month-year-container",monthPicker:"month-select",rangeCalendar:"range-calendar",suffix:"suffix",yearContainer:"year-container",year:"year"},N={chevronLeft:"chevron-left",chevronRight:"chevron-right"},K=16,k=class extends Y{constructor(){super(...arguments),this.monthPickerRef=m(),this.nextMonthActionRef=m(),this.prevMonthActionRef=m(),this.yearInputRef=m(),this.calciteInternalDatePickerMonthHeaderSelectChange=C({cancelable:!1})}static{this.properties={nextMonthDate:[16,{},{state:!0}],prevMonthDate:[16,{},{state:!0}],activeDate:[0,{},{attribute:!1}],headingLevel:[9,{},{type:Number}],localeData:[0,{},{attribute:!1}],max:[0,{},{attribute:!1}],messages:[0,{},{attribute:!1}],min:[0,{},{attribute:!1}],monthStyle:1,position:1,scale:[3,{},{reflect:!0}],selectedDate:[0,{},{attribute:!1}]}}static{this.styles=E}connectedCallback(){super.connectedCallback(),this.setNextPrevMonthDates()}load(){this.parentDatePickerEl=R(this.el,"calcite-date-picker")??void 0}willUpdate(e){this.hasUpdated&&(e.has("activeDate")||e.has("localeData"))&&this.setYearSelectMenuWidth(),this.hasUpdated&&e.has("scale")&&this.setYearSelectWidthOffset(),(e.has("min")||e.has("max")||e.has("activeDate"))&&this.setNextPrevMonthDates()}loaded(){this.setYearSelectWidthOffset()}setNextPrevMonthDates(){this.activeDate&&(this.nextMonthDate=h(y(this.activeDate),this.min,this.max),this.prevMonthDate=h(x(this.activeDate),this.min,this.max))}onYearKey(e){let t=this.parseCalendarYear(e.target.value);switch(e.key){case"ArrowDown":e.preventDefault(),this.setYear({localizedYear:t,offset:-1});break;case"ArrowUp":e.preventDefault(),this.setYear({localizedYear:t,offset:1});break}}formatCalendarYear(e){return d.localize(`${W(e,this.localeData)}`)}parseCalendarYear(e){return d.localize(`${O(Number(d.delocalize(e)),this.localeData)}`)}onYearChange(e){this.setYear({localizedYear:this.parseCalendarYear(e.target.value)})}onYearInput(e){this.setYear({localizedYear:this.parseCalendarYear(e.target.value),commit:!1})}prevMonthClick(e){this.prevMonthDate&&this.handleArrowClick(e,this.prevMonthDate)}prevMonthKeydown(e){u(e.key)&&this.prevMonthClick(e)}nextMonthClick(e){this.nextMonthDate&&this.handleArrowClick(e,this.nextMonthDate)}nextMonthKeydown(e){u(e.key)&&this.nextMonthClick(e)}async handleArrowClick(e,t){e.preventDefault(),await this.handlePenultimateValidMonth(e),this.calciteInternalDatePickerMonthHeaderSelectChange.emit(t)}handleMonthChange(e){let t=e.target,{abbreviated:a,wide:n}=this.localeData.months,i=(this.monthStyle==="wide"?n:a).indexOf(t.value),o=b(this.activeDate,i);g(o,this.min,this.max)||(o=h(o,this.min,this.max)),this.calciteInternalDatePickerMonthHeaderSelectChange.emit(o),this.setYearSelectMenuWidth()}getInRangeDate({localizedYear:e,offset:t=0}){let{min:a,max:n,activeDate:c}=this,i=Number(d.delocalize(e)),o=i.toString().length,f=isNaN(i)?!1:i+t,L=f&&(!a||a.getFullYear()<=f)&&(!n||n.getFullYear()>=f);if(f&&L&&o===e.length){let M=new Date(c);return M.setFullYear(f),h(M,a,n)}}setYear({localizedYear:e,commit:t=!0,offset:a=0}){let{yearInputRef:n,activeDate:c}=this,i=this.getInRangeDate({localizedYear:e,offset:a});i&&this.calciteInternalDatePickerMonthHeaderSelectChange.emit(i),t&&n.value&&(n.value.value=this.formatCalendarYear((i||c).getFullYear()))}setYearSelectWidthOffset(){this.yearSelectWidthOffset=K+3*parseInt(this.getYearSelectPadding(),10),this.setYearSelectMenuWidth()}setYearSelectMenuWidth(){let e=this.monthPickerRef.value;e&&requestAnimationFrame(()=>{let t=getComputedStyle(e),a=`${t.fontStyle} ${t.fontVariant} ${t.fontWeight} ${t.fontSize}/${t.lineHeight} ${t.fontFamily}`,c=this.localeData.months[this.monthStyle][this.activeDate.getMonth()],i=Math.ceil(S(c,a));e.style.width=`${i+this.yearSelectWidthOffset}px`})}isMonthInRange(e){let t=b(this.activeDate,e);return!this.min&&!this.max||g(t,this.min,this.max)?!0:!!(this.max&&p(t,this.max)||this.min&&p(t,this.min))}async handlePenultimateValidMonth(e){let n=e.target.getAttribute("data-direction")==="left",c=!1;if(n&&this.min){let i=h(x(this.activeDate),this.min,this.max);c=i?p(i,this.min):!1}else if(this.max){let i=h(y(this.activeDate),this.min,this.max);c=i?p(i,this.max):!1}if(c)if(this.position)this.yearInputRef.value?.focus();else{let o=(n?this.nextMonthActionRef:this.prevMonthActionRef).value;if(!o)return;o.disabled=!1,await o.setFocus()}}getPx(e){let t=Number(e.replace(/[rem|px]/g,"")),a=16;return e.includes("rem")?`${t*a}px`:`${t}px`}getYearSelectPadding(){let e;switch(this.scale){case"l":e=A;break;case"s":e=I;break;default:e=P;break}return this.getPx(e)}render(){return l`<div class=${r(s.header)}>${this.renderContent()}</div>`}renderContent(){let{localeData:e,activeDate:t}=this;if(!t||!e)return null;if(this.parentDatePickerEl){let{numberingSystem:c,lang:i}=this.parentDatePickerEl;d.numberFormatOptions={useGrouping:!1,...c&&{numberingSystem:c},...i&&{locale:i}}}let a=F(e.unitOrder),n=a.indexOf("y")<a.indexOf("m");return l`${this.position&&l`<div class=${r({[s.chevronContainer]:!0})}>${this.position==="start"&&this.renderChevron("left")||""}</div>`||""}<div class=${r({[s.monthYearContainer]:!0,[s.rangeCalendar]:!!this.position})}>${this.renderMonthYearContainer(n)}</div>${!this.position&&l`<div class=${r({[s.chevronContainer]:!0})}>${this.renderChevron("left")}</div>`||""}<div class=${r({[s.chevronContainer]:!0})}>${this.position!=="start"&&this.renderChevron("right")||""}</div>`}renderMonthYearContainer(e){return e?[this.renderYearInput(),this.renderMonthPicker()]:[this.renderMonthPicker(),this.renderYearInput()]}renderMonthPicker(){let e=this.activeDate.getMonth(),t=this.localeData.months[this.monthStyle];return l`<calcite-select class=${r(s.monthPicker)} .label=${this.messages.monthMenu} @calciteSelectChange=${this.handleMonthChange} width=auto ${v(this.monthPickerRef)}>${t.map((a,n)=>l`<calcite-option .disabled=${!this.isMonthInRange(n)} .selected=${n===e} .value=${a}>${a}</calcite-option>`)}</calcite-select>`}renderYearInput(){let e=this.localeData.year?.suffix,t=this.formatCalendarYear(this.activeDate.getFullYear());return l`<span class=${r(s.yearContainer)}><input .ariaLabel=${this.messages.year} class=${r({[s.year]:!0})} inputmode=numeric maxlength=4 minlength=1 @change=${this.onYearChange} @input=${this.onYearInput} @keydown=${this.onYearKey} pattern=\\d* type=text .value=${z(t??"")} ${v(this.yearInputRef)}>${e&&l`<span class=${r(s.suffix)}>${e}</span>`||""}</span>`}renderChevron(e){let t=e==="right",a=p(t?this.nextMonthDate:this.prevMonthDate,this.activeDate)||!g(this.activeDate,this.min,this.max);return l`<calcite-action alignment=center .ariaDisabled=${a} .ariaLabel=${t?this.messages.nextMonth:this.messages.prevMonth} class=${r(s.chevron)} compact data-direction=${e??$} .disabled=${a} .icon=${t?N.chevronRight:N.chevronLeft} icon-flip-rtl @click=${t?this.nextMonthClick:this.prevMonthClick} @keydown=${t?this.nextMonthKeydown:this.prevMonthKeydown} role=button .scale=${this.scale} .text=${t?this.messages.nextMonth:this.messages.prevMonth} ${v(t?this.nextMonthActionRef:this.prevMonthActionRef)}></calcite-action>`}};w("calcite-date-picker-month-header",k);export{k as DatePickerMonthHeader};
|
|
2
|
+
import{a as g,b as h,e as O,f as W,k as x,l as b,n as y,o as F,q as p}from"./RYA2FB6F.js";import{m as d}from"./MBM7UIXE.js";import{i as I,j as P,k as A}from"./27YYIR6K.js";import{a as u}from"./YP3AYJH3.js";import{l as S,n as R}from"./6SSCE6VG.js";import{B as z,C as m,D as v,E as Y,F as r,R as w,g as D,h as l,l as $,p as C}from"./LIR56SYG.js";var E=D`:host{display:block}.header{display:flex;block-size:100%;align-items:center;justify-content:space-between}.chevron-container{display:flex;align-items:center}:host([scale=s]){block-size:24px;margin:var(--calcite-spacing-xs);margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .chevron-container,:host([scale=s]) .chevron{min-inline-size:24px;block-size:24px}:host([scale=m]){block-size:32px;margin:var(--calcite-spacing-sm);margin-inline-start:var(--calcite-spacing-sm-plus)}:host([scale=m]) .chevron-container,:host([scale=m]) .chevron{min-inline-size:32px;block-size:32px;--calcite-internal-action-padding-block: var(--calcite-spacing-xxs)}:host([scale=l]){block-size:44px;margin:var(--calcite-spacing-xs);margin-inline-start:var(--calcite-spacing-sm)}:host([scale=l]) .chevron-container,:host([scale=l]) .chevron{min-inline-size:44px;block-size:44px;--calcite-internal-action-padding-block: var(--calcite-spacing-sm-plus)}.chevron{box-sizing:content-box;display:flex;block-size:100%;inline-size:100%;flex-grow:0;cursor:pointer;align-items:center;justify-content:center;border-style:none;outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;--calcite-internal-action-padding-block: 0;--calcite-action-background-color: var(--calcite-date-picker-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-date-picker-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-date-picker-header-action-background-color-press);--calcite-action-text-color: var(--calcite-date-picker-header-action-text-color);--calcite-action-text-color-press: var(--calcite-date-picker-header-action-text-color-press)}.chevron:focus{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))))}.chevron[aria-disabled=true]{pointer-events:none}.month-year-container{display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;align-items:center;justify-content:flex-start;text-align:center;line-height:1;gap:var(--calcite-spacing-xxs)}.month-year-container.range-calendar{justify-content:center}.year-container{position:relative;display:flex;block-size:100%}.suffix{display:flex;align-items:center}.year,.suffix{margin-inline:var(--calcite-spacing-xxs);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-date-picker-year-text-color, var(--calcite-color-text-1));font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-fixed-lg)}.year{position:relative;display:inline-block;border-style:none;background-color:transparent;text-align:center;font-family:inherit;outline-color:transparent;inline-size:44px}.year:hover{transition-timing-function:cubic-bezier(.4,0,.2,1);transition-property:outline-color;outline:2px solid var(--calcite-color-border-2);outline-offset:-2px}.year:focus{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))))}.month-select{--calcite-select-internal-border-width: 0;--calcite-select-internal-icon-border-inline-end-width: 0;--calcite-internal-select-spacing-inline: var(--calcite-spacing-xxs);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size-md));--calcite-select-text-color: var(--calcite-date-picker-month-select-text-color, var(--calcite-color-text-1));--calcite-select-icon-color: var(--calcite-date-picker-month-select-icon-color);--calcite-select-icon-color-hover: var(--calcite-date-picker-month-select-icon-color-hover);--calcite-internal-select-spacing-block: var(--calcite-spacing-xxs);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-xxs);--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-lg);--calcite-internal-select-font-weight: var(--calcite-font-weight-medium)}:host([scale=s]) .month-year-container .month-select{--calcite-internal-select-spacing-inline: var(--calcite-spacing-base);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size));--calcite-internal-select-spacing-block: var(--calcite-spacing-base);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-base);--calcite-internal-select-block-size: 24px;--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-base)}:host([scale=s]) .month-year-container .year{inline-size:40px}:host([scale=s]) .month-year-container .year,:host([scale=s]) .month-year-container .suffix{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-fixed-base)}:host([scale=l]) .month-year-container .month-select{--calcite-internal-select-spacing-inline: var(--calcite-spacing-sm);--calcite-select-font-size: var(--calcite-date-picker-month-select-font-size, var(--calcite-font-size-lg));--calcite-internal-select-spacing-block: var(--calcite-spacing-sm);--calcite-internal-select-icon-container-padding-inline: var(--calcite-spacing-sm);--calcite-internal-select-block-size: 44px;--calcite-internal-select-line-height: var(--calcite-font-line-height-fixed-xl)}:host([scale=l]) .month-year-container .year{inline-size:48px}:host([scale=l]) .month-year-container .year,:host([scale=l]) .month-year-container .suffix{font-size:var(--calcite-font-size-lg);line-height:var(--calcite-font-line-height-fixed-xl)}:host([hidden]){display:none}[hidden]{display:none}`,s={header:"header",chevron:"chevron",chevronContainer:"chevron-container",monthYearContainer:"month-year-container",monthPicker:"month-select",rangeCalendar:"range-calendar",suffix:"suffix",yearContainer:"year-container",year:"year"},N={chevronLeft:"chevron-left",chevronRight:"chevron-right"},K=16,k=class extends Y{constructor(){super(...arguments),this.monthPickerRef=m(),this.nextMonthActionRef=m(),this.prevMonthActionRef=m(),this.yearInputRef=m(),this.calciteInternalDatePickerMonthHeaderSelectChange=C({cancelable:!1})}static{this.properties={nextMonthDate:[16,{},{state:!0}],prevMonthDate:[16,{},{state:!0}],activeDate:[0,{},{attribute:!1}],headingLevel:[9,{},{type:Number}],localeData:[0,{},{attribute:!1}],max:[0,{},{attribute:!1}],messages:[0,{},{attribute:!1}],min:[0,{},{attribute:!1}],monthStyle:1,position:1,scale:[3,{},{reflect:!0}],selectedDate:[0,{},{attribute:!1}]}}static{this.styles=E}connectedCallback(){super.connectedCallback(),this.setNextPrevMonthDates()}load(){this.parentDatePickerEl=R(this.el,"calcite-date-picker")??void 0}willUpdate(e){this.hasUpdated&&(e.has("activeDate")||e.has("localeData"))&&this.setYearSelectMenuWidth(),this.hasUpdated&&e.has("scale")&&this.setYearSelectWidthOffset(),(e.has("min")||e.has("max")||e.has("activeDate"))&&this.setNextPrevMonthDates()}loaded(){this.setYearSelectWidthOffset()}setNextPrevMonthDates(){this.activeDate&&(this.nextMonthDate=h(y(this.activeDate),this.min,this.max),this.prevMonthDate=h(x(this.activeDate),this.min,this.max))}onYearKey(e){let t=this.parseCalendarYear(e.target.value);switch(e.key){case"ArrowDown":e.preventDefault(),this.setYear({localizedYear:t,offset:-1});break;case"ArrowUp":e.preventDefault(),this.setYear({localizedYear:t,offset:1});break}}formatCalendarYear(e){return d.localize(`${W(e,this.localeData)}`)}parseCalendarYear(e){return d.localize(`${O(Number(d.delocalize(e)),this.localeData)}`)}onYearChange(e){this.setYear({localizedYear:this.parseCalendarYear(e.target.value)})}onYearInput(e){this.setYear({localizedYear:this.parseCalendarYear(e.target.value),commit:!1})}prevMonthClick(e){this.prevMonthDate&&this.handleArrowClick(e,this.prevMonthDate)}prevMonthKeydown(e){u(e.key)&&this.prevMonthClick(e)}nextMonthClick(e){this.nextMonthDate&&this.handleArrowClick(e,this.nextMonthDate)}nextMonthKeydown(e){u(e.key)&&this.nextMonthClick(e)}async handleArrowClick(e,t){e.preventDefault(),await this.handlePenultimateValidMonth(e),this.calciteInternalDatePickerMonthHeaderSelectChange.emit(t)}handleMonthChange(e){let t=e.target,{abbreviated:a,wide:n}=this.localeData.months,i=(this.monthStyle==="wide"?n:a).indexOf(t.value),o=b(this.activeDate,i);g(o,this.min,this.max)||(o=h(o,this.min,this.max)),this.calciteInternalDatePickerMonthHeaderSelectChange.emit(o),this.setYearSelectMenuWidth()}getInRangeDate({localizedYear:e,offset:t=0}){let{min:a,max:n,activeDate:c}=this,i=Number(d.delocalize(e)),o=i.toString().length,f=isNaN(i)?!1:i+t,L=f&&(!a||a.getFullYear()<=f)&&(!n||n.getFullYear()>=f);if(f&&L&&o===e.length){let M=new Date(c);return M.setFullYear(f),h(M,a,n)}}setYear({localizedYear:e,commit:t=!0,offset:a=0}){let{yearInputRef:n,activeDate:c}=this,i=this.getInRangeDate({localizedYear:e,offset:a});i&&this.calciteInternalDatePickerMonthHeaderSelectChange.emit(i),t&&n.value&&(n.value.value=this.formatCalendarYear((i||c).getFullYear()))}setYearSelectWidthOffset(){this.yearSelectWidthOffset=K+3*parseInt(this.getYearSelectPadding(),10),this.setYearSelectMenuWidth()}setYearSelectMenuWidth(){let e=this.monthPickerRef.value;e&&requestAnimationFrame(()=>{let t=getComputedStyle(e),a=`${t.fontStyle} ${t.fontVariant} ${t.fontWeight} ${t.fontSize}/${t.lineHeight} ${t.fontFamily}`,c=this.localeData.months[this.monthStyle][this.activeDate.getMonth()],i=Math.ceil(S(c,a));e.style.width=`${i+this.yearSelectWidthOffset}px`})}isMonthInRange(e){let t=b(this.activeDate,e);return!this.min&&!this.max||g(t,this.min,this.max)?!0:!!(this.max&&p(t,this.max)||this.min&&p(t,this.min))}async handlePenultimateValidMonth(e){let n=e.target.getAttribute("data-direction")==="left",c=!1;if(n&&this.min){let i=h(x(this.activeDate),this.min,this.max);c=i?p(i,this.min):!1}else if(this.max){let i=h(y(this.activeDate),this.min,this.max);c=i?p(i,this.max):!1}if(c)if(this.position)this.yearInputRef.value?.focus();else{let o=(n?this.nextMonthActionRef:this.prevMonthActionRef).value;if(!o)return;o.disabled=!1,await o.setFocus()}}getPx(e){let t=Number(e.replace(/[rem|px]/g,"")),a=16;return e.includes("rem")?`${t*a}px`:`${t}px`}getYearSelectPadding(){let e;switch(this.scale){case"l":e=A;break;case"s":e=I;break;default:e=P;break}return this.getPx(e)}render(){return l`<div class=${r(s.header)}>${this.renderContent()}</div>`}renderContent(){let{localeData:e,activeDate:t}=this;if(!t||!e)return null;if(this.parentDatePickerEl){let{numberingSystem:c,lang:i}=this.parentDatePickerEl;d.numberFormatOptions={useGrouping:!1,...c&&{numberingSystem:c},...i&&{locale:i}}}let a=F(e.unitOrder),n=a.indexOf("y")<a.indexOf("m");return l`${this.position&&l`<div class=${r({[s.chevronContainer]:!0})}>${this.position==="start"&&this.renderChevron("left")||""}</div>`||""}<div class=${r({[s.monthYearContainer]:!0,[s.rangeCalendar]:!!this.position})}>${this.renderMonthYearContainer(n)}</div>${!this.position&&l`<div class=${r({[s.chevronContainer]:!0})}>${this.renderChevron("left")}</div>`||""}<div class=${r({[s.chevronContainer]:!0})}>${this.position!=="start"&&this.renderChevron("right")||""}</div>`}renderMonthYearContainer(e){return e?[this.renderYearInput(),this.renderMonthPicker()]:[this.renderMonthPicker(),this.renderYearInput()]}renderMonthPicker(){let e=this.activeDate.getMonth(),t=this.localeData.months[this.monthStyle];return l`<calcite-select class=${r(s.monthPicker)} .label=${this.messages.monthMenu} @calciteSelectChange=${this.handleMonthChange} width=auto ${v(this.monthPickerRef)}>${t.map((a,n)=>l`<calcite-option .disabled=${!this.isMonthInRange(n)} .selected=${n===e} .value=${a}>${a}</calcite-option>`)}</calcite-select>`}renderYearInput(){let e=this.localeData.year?.suffix,t=this.formatCalendarYear(this.activeDate.getFullYear());return l`<span class=${r(s.yearContainer)}><input .ariaLabel=${this.messages.year} class=${r({[s.year]:!0})} inputmode=numeric maxlength=4 minlength=1 @change=${this.onYearChange} @input=${this.onYearInput} @keydown=${this.onYearKey} pattern=\\d* type=text .value=${z(t??"")} ${v(this.yearInputRef)}>${e&&l`<span class=${r(s.suffix)}>${e}</span>`||""}</span>`}renderChevron(e){let t=e==="right",a=p(t?this.nextMonthDate:this.prevMonthDate,this.activeDate)||!g(this.activeDate,this.min,this.max);return l`<calcite-action alignment=center .ariaDisabled=${a} .ariaLabel=${t?this.messages.nextMonth:this.messages.prevMonth} class=${r(s.chevron)} compact data-direction=${e??$} .disabled=${a} .icon=${t?N.chevronRight:N.chevronLeft} icon-flip-rtl @click=${t?this.nextMonthClick:this.prevMonthClick} @keydown=${t?this.nextMonthKeydown:this.prevMonthKeydown} role=button .scale=${this.scale} .text=${t?this.messages.nextMonth:this.messages.prevMonth} ${v(t?this.nextMonthActionRef:this.prevMonthActionRef)}></calcite-action>`}};w("calcite-date-picker-month-header",k);export{k as DatePickerMonthHeader};
|