@esri/calcite-components 5.0.0-next.4 → 5.0.0-next.6

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.
Files changed (189) hide show
  1. package/dist/calcite/{CSQVLDPF.js → 2IIGKMQ6.js} +2 -2
  2. package/dist/calcite/{POOH5QBE.js → 2XFESLAQ.js} +2 -2
  3. package/dist/calcite/{MM5GOLON.js → 3COSYM4H.js} +2 -2
  4. package/dist/calcite/{ALQH5DCZ.js → 3ISWQGU4.js} +2 -2
  5. package/dist/calcite/{VV3MILRZ.js → 3M2X4DMO.js} +2 -2
  6. package/dist/calcite/{XHCNKCYX.js → 3W422TPV.js} +2 -2
  7. package/dist/calcite/{6G3IVAVE.js → 43KOILAW.js} +2 -2
  8. package/dist/calcite/{XRJOD24G.js → 44XNJNTA.js} +1 -1
  9. package/dist/calcite/{ETHM6IZM.js → 4FSJL2OC.js} +2 -2
  10. package/dist/calcite/{2VXNPHIO.js → 4M5YCJ4Q.js} +2 -2
  11. package/dist/calcite/{WGQ2SERU.js → 4YTONN4P.js} +2 -2
  12. package/dist/calcite/{RPLPMP3J.js → 53JXVKUS.js} +2 -2
  13. package/dist/calcite/{S6HTKBNB.js → 56HP62NE.js} +1 -1
  14. package/dist/calcite/{FX45OPBE.js → 57TYRZR3.js} +2 -2
  15. package/dist/calcite/{V6JTY5IT.js → 5BQ76NQW.js} +2 -2
  16. package/dist/calcite/{AAV5EWQK.js → 5HV6X5DX.js} +2 -2
  17. package/dist/calcite/{Y6BDELTJ.js → 5T7WLABP.js} +2 -2
  18. package/dist/calcite/{QRBJKU6C.js → 62XLJEVX.js} +2 -2
  19. package/dist/calcite/{BK2W2RW3.js → 65HZ2HOS.js} +2 -2
  20. package/dist/calcite/{YUOVY5RN.js → 6EEMG3AJ.js} +2 -2
  21. package/dist/calcite/{VVCB7N7V.js → 6EKZQPKT.js} +2 -2
  22. package/dist/calcite/{Y7L5PL4A.js → 6FCYAKPP.js} +2 -2
  23. package/dist/calcite/{GTU5X7O7.js → 6GKHPG2T.js} +2 -2
  24. package/dist/calcite/{KSITDI7Y.js → 6OLYWF6Z.js} +2 -2
  25. package/dist/calcite/{D5SFHDV6.js → 6PMY6MUE.js} +2 -2
  26. package/dist/calcite/{SHXU5GEM.js → 6YVXONLB.js} +2 -2
  27. package/dist/calcite/{NPXLX7L5.js → 76DFVIQ3.js} +2 -2
  28. package/dist/calcite/{N7QD2WXH.js → 7AG2R6XN.js} +2 -2
  29. package/dist/calcite/{Z6CRZOOK.js → 7DQ4G2FS.js} +2 -2
  30. package/dist/calcite/{WNEJDZTS.js → 7EIPWPP6.js} +1 -1
  31. package/dist/calcite/{EWNCXKJC.js → 7GYHOBTA.js} +2 -2
  32. package/dist/calcite/{H42LHYUA.js → 7XEO6UJ3.js} +2 -2
  33. package/dist/calcite/{INNX6VTE.js → A6DNGYP7.js} +2 -2
  34. package/dist/calcite/{XYU7WBO7.js → A6ZYDDPX.js} +2 -2
  35. package/dist/calcite/{C3BIK3DY.js → A7OBU3ZB.js} +1 -1
  36. package/dist/calcite/{PWWVHZBN.js → AANSYYFF.js} +3 -3
  37. package/dist/calcite/{QDXVT7UF.js → ABFHGJOG.js} +2 -2
  38. package/dist/calcite/{63S6JWID.js → ABRDCSJF.js} +1 -1
  39. package/dist/calcite/{AICLNUQ5.js → AHOADFZ7.js} +2 -2
  40. package/dist/calcite/{JIKG4DHH.js → AIANT2RL.js} +2 -2
  41. package/dist/calcite/{NI3OLQU4.js → B36ZLEKI.js} +2 -2
  42. package/dist/calcite/{TDROT2JJ.js → B53J7Q5J.js} +2 -2
  43. package/dist/calcite/{R4PTX2BD.js → BKNGM5YO.js} +2 -2
  44. package/dist/calcite/{JRPSHIET.js → BMB7PJZB.js} +2 -2
  45. package/dist/calcite/{IXK4BTNI.js → BOFKO4PD.js} +2 -2
  46. package/dist/calcite/{FNH5JSBK.js → BTK24FM2.js} +2 -2
  47. package/dist/calcite/{PNBL2IVW.js → CFWXX2ZT.js} +2 -2
  48. package/dist/calcite/{NS7XIDPL.js → CYUZWU4F.js} +2 -2
  49. package/dist/calcite/{J2NLU7RP.js → CZF6KYOX.js} +1 -1
  50. package/dist/calcite/{QYCVH2VH.js → DATE73WS.js} +2 -2
  51. package/dist/calcite/{AILXQSIJ.js → DEJFI4YA.js} +2 -2
  52. package/dist/calcite/{H3EPIYLG.js → DN6V2M24.js} +1 -1
  53. package/dist/calcite/{YASA2V4I.js → DUM3R2CL.js} +2 -2
  54. package/dist/calcite/{RSHJ2ULC.js → E5NO42AW.js} +1 -1
  55. package/dist/calcite/{JBMFTM4R.js → EFDQMGZP.js} +2 -2
  56. package/dist/calcite/{TU2PNKWS.js → EHZXDIG5.js} +2 -2
  57. package/dist/calcite/{WSETKDK2.js → EOWCTVN7.js} +2 -2
  58. package/dist/calcite/{MDLPBZOZ.js → FHRBYILV.js} +2 -2
  59. package/dist/calcite/{32YCYEKN.js → FMB23RBB.js} +1 -1
  60. package/dist/calcite/{HZVCGOQL.js → FQKP2XIR.js} +2 -2
  61. package/dist/calcite/{M6OBWXQN.js → FSNEMWMV.js} +2 -2
  62. package/dist/calcite/{WLLFG3M7.js → FWMD4ANX.js} +2 -2
  63. package/dist/calcite/{EKOGELYT.js → GLUJXIHJ.js} +2 -2
  64. package/dist/calcite/{ZUMJB5U3.js → GS2BRYGH.js} +2 -2
  65. package/dist/calcite/{QSTLY3DQ.js → GSSIFYMO.js} +2 -2
  66. package/dist/calcite/{6OSIXZYU.js → GWC7UZVN.js} +2 -2
  67. package/dist/calcite/{BQI7TWVC.js → GWYUQTSG.js} +2 -2
  68. package/dist/calcite/{3PSVZRKA.js → H2NP25UI.js} +1 -1
  69. package/dist/calcite/{VZVYZPXQ.js → H3GTITDX.js} +2 -2
  70. package/dist/calcite/{GV755OVW.js → HBSTMWBE.js} +2 -2
  71. package/dist/calcite/{BG5JIUF3.js → HM4RW4PL.js} +2 -2
  72. package/dist/calcite/{G73EBLG4.js → HURJRVCG.js} +2 -2
  73. package/dist/calcite/{2CJWVM4R.js → HZJQA7EQ.js} +2 -2
  74. package/dist/calcite/{QWN5XHMG.js → IAOITTID.js} +2 -2
  75. package/dist/calcite/{A5CVK7TL.js → ID4WJFNU.js} +2 -2
  76. package/dist/calcite/{35DVUKKJ.js → IFQNEPTP.js} +2 -2
  77. package/dist/calcite/{VLOLYD36.js → IJDY7EKO.js} +2 -2
  78. package/dist/calcite/{QW2OFS26.js → IODUDIBK.js} +2 -2
  79. package/dist/calcite/{6CJF3ZME.js → JD35MQMV.js} +2 -2
  80. package/dist/calcite/{HPWHHEM4.js → JD5Y5FIJ.js} +2 -2
  81. package/dist/calcite/{M5QNDD4X.js → JJP2FEER.js} +1 -1
  82. package/dist/calcite/{JCGVWBAA.js → JNCHO6X5.js} +2 -2
  83. package/dist/calcite/{JJNFTIBI.js → JSS6WCPJ.js} +2 -2
  84. package/dist/calcite/{FKYJEFNP.js → JTAYXV5Y.js} +1 -1
  85. package/dist/calcite/{6TAH2TAT.js → JVYKUU2B.js} +2 -2
  86. package/dist/calcite/{5FUKNERA.js → K2RWUB5W.js} +2 -2
  87. package/dist/calcite/{HIB3Q63Z.js → KDHLLH5G.js} +1 -1
  88. package/dist/calcite/{TCB3D44T.js → KLLDUBU7.js} +2 -2
  89. package/dist/calcite/{AK4EMEY2.js → KR5QX3PG.js} +2 -2
  90. package/dist/calcite/{2GMLRXCX.js → L63HBU2O.js} +2 -2
  91. package/dist/calcite/{ETUOSTGW.js → LDFECFWX.js} +2 -2
  92. package/dist/calcite/{RBJEATU3.js → LFSTWFMB.js} +2 -2
  93. package/dist/calcite/{6PIHPAZF.js → LFYXGVGK.js} +2 -2
  94. package/dist/calcite/{ZCWFURSE.js → LNKZ4ULL.js} +2 -2
  95. package/dist/calcite/{2C6PV6LO.js → LX3J3Q7Q.js} +1 -1
  96. package/dist/calcite/{Q2KBZ6FQ.js → LX7GBILP.js} +2 -2
  97. package/dist/calcite/{XQGQJEI2.js → MEWZXHJ6.js} +2 -2
  98. package/dist/calcite/{EQC2JW3I.js → MPYXWS5E.js} +1 -1
  99. package/dist/calcite/{QK7SZUAI.js → MTRDCPVY.js} +2 -2
  100. package/dist/calcite/{CDLGLCFD.js → MYWUD5PR.js} +2 -2
  101. package/dist/calcite/{2J5IS422.js → N3QXJKKO.js} +2 -2
  102. package/dist/calcite/{WJA2X3C2.js → NHRWRXH2.js} +2 -2
  103. package/dist/calcite/{SQ25UCSA.js → NKMBE4R4.js} +2 -2
  104. package/dist/calcite/{R534LDNQ.js → NKYR42W6.js} +2 -2
  105. package/dist/calcite/{OTRRBSYY.js → NOOPM2CL.js} +1 -1
  106. package/dist/calcite/{WDKPAPPB.js → NQF73COG.js} +2 -2
  107. package/dist/calcite/{KCVWP63F.js → NSIT4HJE.js} +2 -2
  108. package/dist/calcite/{J2ACTXE5.js → O72KETNZ.js} +2 -2
  109. package/dist/calcite/{U3G47NPB.js → OBY2JHHI.js} +2 -2
  110. package/dist/calcite/{CYVISXIT.js → OD7IPBKO.js} +2 -2
  111. package/dist/calcite/{E3C36U7C.js → OFHMIOCW.js} +2 -2
  112. package/dist/calcite/{2DX2SAQ7.js → OFO7DXMT.js} +1 -1
  113. package/dist/calcite/{TS65SISB.js → OXZ2Y5YM.js} +1 -1
  114. package/dist/calcite/{TPG23UCD.js → OYVYZ6ZO.js} +2 -2
  115. package/dist/calcite/{C77NX62C.js → P6BUUDOL.js} +2 -2
  116. package/dist/calcite/{7SVIAOHO.js → PBO64SRK.js} +1 -1
  117. package/dist/calcite/{TLLHA7VC.js → PCGNN5RO.js} +2 -2
  118. package/dist/calcite/{SOFELOS3.js → PMWGEAYN.js} +2 -2
  119. package/dist/calcite/{JAM3DZYC.js → POOA337X.js} +1 -1
  120. package/dist/calcite/{TXZPVAH4.js → PPV5DY5L.js} +2 -2
  121. package/dist/calcite/{544AASIY.js → PQDB6CTL.js} +2 -2
  122. package/dist/calcite/{PQACJ4N6.js → PRLHDLWI.js} +2 -2
  123. package/dist/calcite/{M7H4RC23.js → Q4IQBOWU.js} +2 -2
  124. package/dist/calcite/{K6FTZ2ZF.js → QCGVJHJ6.js} +2 -2
  125. package/dist/calcite/{SLUOB5WF.js → QYN6LQ5J.js} +2 -2
  126. package/dist/calcite/{HOUDAAST.js → REY2OA4D.js} +2 -2
  127. package/dist/calcite/{7TJP2ISL.js → RLF4GWLJ.js} +2 -2
  128. package/dist/calcite/{JDPMMX2J.js → RW5EELAZ.js} +2 -2
  129. package/dist/calcite/{X7GVFGBQ.js → SHFV6LYT.js} +2 -2
  130. package/dist/calcite/{HKNQLLG7.js → SL3VKZG5.js} +2 -2
  131. package/dist/calcite/{LAAEPNIM.js → SLWHNU7X.js} +2 -2
  132. package/dist/calcite/{AE4AQEU5.js → SSLEHUOY.js} +2 -2
  133. package/dist/calcite/{HKVRX5SD.js → SXK4ATVN.js} +2 -2
  134. package/dist/calcite/{CAHGZMOM.js → SXMKRRD6.js} +2 -2
  135. package/dist/calcite/{JJOW6LLC.js → SXOKB2BX.js} +2 -2
  136. package/dist/calcite/{B3KV4G2W.js → SZXBPZ7S.js} +2 -2
  137. package/dist/calcite/{U3RNUZF6.js → T3QJCLEX.js} +2 -2
  138. package/dist/calcite/{26KO5WLB.js → TBM5T67T.js} +2 -2
  139. package/dist/calcite/{VBGPBKJL.js → TOSB6ECB.js} +2 -2
  140. package/dist/calcite/{WYHGKROL.js → TTLR3A5P.js} +2 -2
  141. package/dist/calcite/{4VQGRHEV.js → TUAQEJC4.js} +2 -2
  142. package/dist/calcite/{QNVFFZ3F.js → TWGPU2HX.js} +2 -2
  143. package/dist/calcite/{2JFH2WAM.js → TYPQP3Q3.js} +2 -2
  144. package/dist/calcite/{EDVRYPYX.js → U74QHS5H.js} +2 -2
  145. package/dist/calcite/{W2KQ3FF5.js → UCG3QU7A.js} +2 -2
  146. package/dist/calcite/{SBO2DPVJ.js → UKQ6KSXO.js} +2 -2
  147. package/dist/calcite/{HBVWYA2B.js → ULXDFGLX.js} +2 -2
  148. package/dist/calcite/{PRB44CR7.js → UQ4HIO7J.js} +2 -2
  149. package/dist/calcite/{YGYOIYMF.js → UROEAN4Q.js} +2 -2
  150. package/dist/calcite/{T3UNO6JW.js → VCXMHEPN.js} +2 -2
  151. package/dist/calcite/{XGLTZ4HO.js → VMEYQQVI.js} +2 -2
  152. package/dist/calcite/{AS2E2XYE.js → VS3YLYMZ.js} +1 -1
  153. package/dist/calcite/{PLRKNZ2Y.js → VUYRIPVA.js} +2 -2
  154. package/dist/calcite/{P2J4VCQF.js → VYLJCYTD.js} +2 -2
  155. package/dist/calcite/{C7C75GTM.js → WBXWOFF6.js} +2 -2
  156. package/dist/calcite/{RFA6VADW.js → WC4TGTDM.js} +2 -2
  157. package/dist/calcite/WXESTAXY.js +4 -0
  158. package/dist/calcite/{XM6I5JZM.js → WYLLIW2W.js} +2 -2
  159. package/dist/calcite/{MHGTLCFX.js → X46HC2YH.js} +2 -2
  160. package/dist/calcite/{SU2JQIB4.js → XIXFKVFZ.js} +1 -1
  161. package/dist/calcite/{U5ZHIRE4.js → XJ4SR7WO.js} +1 -1
  162. package/dist/calcite/{INNXW35W.js → XQAX6FNF.js} +2 -2
  163. package/dist/calcite/{GU5MLWDX.js → XTDUXEIX.js} +2 -2
  164. package/dist/calcite/{R2KPGC7W.js → XTYQVPDC.js} +2 -2
  165. package/dist/calcite/{AKR5JHPW.js → YG5VYPTQ.js} +2 -2
  166. package/dist/calcite/{YA3YNL2F.js → YQQN42G5.js} +2 -2
  167. package/dist/calcite/{MPZ73UTT.js → ZAD5LV3P.js} +2 -2
  168. package/dist/calcite/{DNVDDGB7.js → ZEMRH6DW.js} +2 -2
  169. package/dist/calcite/{A2TCAPW4.js → ZJD56MA6.js} +2 -2
  170. package/dist/calcite/{RUMWLVIQ.js → ZOBQ5UTK.js} +2 -2
  171. package/dist/calcite/{X2PZLQSO.js → ZOINAXKM.js} +2 -2
  172. package/dist/calcite/{GCPYRD7U.js → ZPU3MCWK.js} +2 -2
  173. package/dist/calcite/calcite.esm.js +2 -2
  174. package/dist/chunks/runtime.js +4 -4
  175. package/dist/chunks/useFocusTrap.js +2 -1
  176. package/dist/components/calcite-stepper/customElement.d.ts +0 -6
  177. package/dist/components/calcite-stepper/customElement.js +0 -2
  178. package/dist/docs/api.json +1 -10
  179. package/dist/docs/docs.json +1 -16
  180. package/dist/docs/vscode.html-custom-data.json +1 -1
  181. package/dist/docs/web-types.json +2 -12
  182. package/dist/index.d.ts +0 -1
  183. package/dist/types/lumina.d.ts +0 -1
  184. package/dist/types/preact.d.ts +0 -1
  185. package/dist/types/preact10.d.ts +0 -1
  186. package/dist/types/react.d.ts +0 -1
  187. package/dist/types/stencil.d.ts +0 -1
  188. package/package.json +2 -2
  189. package/dist/calcite/NFBDMCMY.js +0 -4
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.4 */
4
- import{a as Dt}from"./EQC2JW3I.js";import{e as Lt}from"./Z6CRZOOK.js";import{K as Tt}from"./CSQVLDPF.js";var vt=["top","right","bottom","left"],Ft=["start","end"],bt=vt.reduce((t,e)=>t.concat(e,e+"-"+Ft[0],e+"-"+Ft[1]),[]),j=Math.min,V=Math.max,rt=Math.round,ct=Math.floor,M=t=>({x:t,y:t}),Oe={left:"right",right:"left",bottom:"top",top:"bottom"},Re={start:"end",end:"start"};function ut(t,e,n){return V(t,j(e,n))}function X(t,e){return typeof t=="function"?t(e):t}function W(t){return t.split("-")[0]}function k(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function dt(t){return t==="y"?"height":"width"}var Se=new Set(["top","bottom"]);function _(t){return Se.has(W(t))?"y":"x"}function mt(t){return At(_(t))}function Ot(t,e,n){n===void 0&&(n=!1);let o=k(t),i=mt(t),r=dt(i),s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=st(s)),[s,st(s)]}function Nt(t){let e=st(t);return[it(t),e,it(e)]}function it(t){return t.replace(/start|end/g,e=>Re[e])}var Mt=["left","right"],kt=["right","left"],Pe=["top","bottom"],Ce=["bottom","top"];function Ee(t,e,n){switch(t){case"top":case"bottom":return n?e?kt:Mt:e?Mt:kt;case"left":case"right":return e?Pe:Ce;default:return[]}}function Bt(t,e,n,o){let i=k(t),r=Ee(W(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(it)))),r}function st(t){return t.replace(/left|right|bottom|top/g,e=>Oe[e])}function Te(t){return{top:0,right:0,bottom:0,left:0,...t}}function Rt(t){return typeof t!="number"?Te(t):{top:t,right:t,bottom:t,left:t}}function K(t){let{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Wt(t,e,n){let{reference:o,floating:i}=t,r=_(e),s=mt(e),c=dt(s),l=W(e),a=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2,f;switch(l){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(k(e)){case"start":f[s]-=m*(n&&a?-1:1);break;case"end":f[s]+=m*(n&&a?-1:1);break}return f}var Vt=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=r.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e)),a=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Wt(a,o,l),m=o,f={},g=0;for(let h=0;h<c.length;h++){let{name:p,fn:w}=c[h],{x,y,data:b,reset:v}=await w({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:f,rects:a,platform:s,elements:{reference:t,floating:e}});d=x??d,u=y??u,f={...f,[p]:{...f[p],...b}},v&&g<=50&&(g++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(a=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:d,y:u}=Wt(a,m,l)),h=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:f}};async function Z(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=X(e,t),g=Rt(f),p=c[m?u==="floating"?"reference":"floating":u],w=K(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(p)))==null||n?p:p.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:d,strategy:l})),x=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),b=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},v=K(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:l}):x);return{top:(w.top-v.top+g.top)/b.y,bottom:(v.bottom-w.bottom+g.bottom)/b.y,left:(w.left-v.left+g.left)/b.x,right:(v.right-w.right+g.right)/b.x}}var _t=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:d=0}=X(t,e)||{};if(a==null)return{};let u=Rt(d),m={x:n,y:o},f=mt(i),g=dt(f),h=await s.getDimensions(a),p=f==="y",w=p?"top":"left",x=p?"bottom":"right",y=p?"clientHeight":"clientWidth",b=r.reference[g]+r.reference[f]-m[f]-r.floating[g],v=m[f]-r.reference[f],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a)),O=R?R[y]:0;(!O||!await(s.isElement==null?void 0:s.isElement(R)))&&(O=c.floating[y]||r.floating[g]);let I=b/2-v/2,C=O/2-h[g]/2-1,A=j(u[w],C),L=j(u[x],C),$=A,Y=O-h[g]-L,S=O/2-h[g]/2+I,q=ut($,S,Y),H=!l.arrow&&k(i)!=null&&S!==q&&r.reference[g]/2-(S<$?A:L)-h[g]/2<0,D=H?S<$?S-$:S-Y:0;return{[f]:m[f]+D,data:{[f]:q,centerOffset:S-q-D,...H&&{alignmentOffset:D}},reset:H}}});function Le(t,e,n){return(t?[...n.filter(i=>k(i)===t),...n.filter(i=>k(i)!==t)]:n.filter(i=>W(i)===i)).filter(i=>t?k(i)===t||(e?it(i)!==i:!1):!0)}var zt=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;let{rects:r,middlewareData:s,placement:c,platform:l,elements:a}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=bt,autoAlignment:f=!0,...g}=X(t,e),h=u!==void 0||m===bt?Le(u||null,f,m):m,p=await Z(e,g),w=((n=s.autoPlacement)==null?void 0:n.index)||0,x=h[w];if(x==null)return{};let y=Ot(x,r,await(l.isRTL==null?void 0:l.isRTL(a.floating)));if(c!==x)return{reset:{placement:h[0]}};let b=[p[W(x)],p[y[0]],p[y[1]]],v=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:x,overflows:b}],R=h[w+1];if(R)return{data:{index:w+1,overflows:v},reset:{placement:R}};let O=v.map(A=>{let L=k(A.placement);return[A.placement,L&&d?A.overflows.slice(0,2).reduce(($,Y)=>$+Y,0):A.overflows[0],A.overflows]}).sort((A,L)=>A[1]-L[1]),C=((i=O.filter(A=>A[2].slice(0,k(A[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||O[0][0];return C!==c?{data:{index:w+1,overflows:v},reset:{placement:C}}:{}}}},It=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...p}=X(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};let w=W(i),x=_(c),y=W(c)===c,b=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=m||(y||!h?[st(c)]:Nt(c)),R=g!=="none";!m&&R&&v.push(...Bt(c,h,g,b));let O=[c,...v],I=await Z(e,p),C=[],A=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&C.push(I[w]),u){let S=Ot(i,s,b);C.push(I[S[0]],I[S[1]])}if(A=[...A,{placement:i,overflows:C}],!C.every(S=>S<=0)){var L,$;let S=(((L=r.flip)==null?void 0:L.index)||0)+1,q=O[S];if(q&&(!(u==="alignment"?x!==_(q):!1)||A.every(F=>_(F.placement)===x?F.overflows[0]>0:!0)))return{data:{index:S,overflows:A},reset:{placement:q}};let H=($=A.filter(D=>D.overflows[0]<=0).sort((D,F)=>D.overflows[1]-F.overflows[1])[0])==null?void 0:$.placement;if(!H)switch(f){case"bestFit":{var Y;let D=(Y=A.filter(F=>{if(R){let U=_(F.placement);return U===x||U==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(U=>U>0).reduce((U,Ae)=>U+Ae,0)]).sort((F,U)=>F[1]-U[1])[0])==null?void 0:Y[0];D&&(H=D);break}case"initialPlacement":H=c;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function $t(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ht(t){return vt.some(e=>t[e]>=0)}var Ut=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n}=e,{strategy:o="referenceHidden",...i}=X(t,e);switch(o){case"referenceHidden":{let r=await Z(e,{...i,elementContext:"reference"}),s=$t(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Ht(s)}}}case"escaped":{let r=await Z(e,{...i,altBoundary:!0}),s=$t(r,n.floating);return{data:{escapedOffsets:s,escaped:Ht(s)}}}default:return{}}}}};var De=new Set(["left","top"]);async function Fe(t,e){let{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=W(n),c=k(n),l=_(n)==="y",a=De.has(s)?-1:1,d=r&&l?-1:1,u=X(e,t),{mainAxis:m,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(f=c==="end"?g*-1:g),l?{x:f*d,y:m*a}:{x:m*a,y:f*d}}var jt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:r,placement:s,middlewareData:c}=e,l=await Fe(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},Xt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:p=>{let{x:w,y:x}=p;return{x:w,y:x}}},...l}=X(t,e),a={x:n,y:o},d=await Z(e,l),u=_(W(i)),m=At(u),f=a[m],g=a[u];if(r){let p=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=f+d[p],y=f-d[w];f=ut(x,f,y)}if(s){let p=u==="y"?"top":"left",w=u==="y"?"bottom":"right",x=g+d[p],y=g-d[w];g=ut(x,g,y)}let h=c.fn({...e,[m]:f,[u]:g});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[m]:r,[u]:s}}}}}};function gt(){return typeof window<"u"}function G(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function P(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function N(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return gt()?t instanceof Node||t instanceof P(t).Node:!1}function E(t){return gt()?t instanceof Element||t instanceof P(t).Element:!1}function B(t){return gt()?t instanceof HTMLElement||t instanceof P(t).HTMLElement:!1}function Yt(t){return!gt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof P(t).ShadowRoot}var Me=new Set(["inline","contents"]);function et(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=T(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Me.has(i)}var ke=new Set(["table","td","th"]);function Kt(t){return ke.has(G(t))}var Ne=[":popover-open",":modal"];function lt(t){return Ne.some(e=>{try{return t.matches(e)}catch{return!1}})}var Be=["transform","translate","scale","rotate","perspective"],We=["transform","translate","scale","rotate","perspective","filter"],$e=["paint","layout","strict","content"];function nt(t){let e=ht(),n=E(t)?T(t):t;return Be.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||We.some(o=>(n.willChange||"").includes(o))||$e.some(o=>(n.contain||"").includes(o))}function Gt(t){let e=z(t);for(;B(e)&&!J(e);){if(nt(e))return e;if(lt(e))return null;e=z(e)}return null}function ht(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var He=new Set(["html","body","#document"]);function J(t){return He.has(G(t))}function T(t){return P(t).getComputedStyle(t)}function at(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function z(t){if(G(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Yt(t)&&t.host||N(t);return Yt(e)?e.host:e}function Jt(t){let e=z(t);return J(e)?t.ownerDocument?t.ownerDocument.body:t.body:B(e)&&et(e)?e:Jt(e)}function tt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Jt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=P(i);if(r){let c=pt(s);return e.concat(s,s.visualViewport||[],et(i)?i:[],c&&n?tt(c):[])}return e.concat(i,tt(i,[],n))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){let e=T(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=B(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=rt(n)!==r||rt(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function Pt(t){return E(t)?t:t.contextElement}function ot(t){let e=Pt(t);if(!B(e))return M(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:r}=ee(e),s=(r?rt(n.width):n.width)/o,c=(r?rt(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var Ve=M(0);function ne(t){let e=P(t);return!ht()||!e.visualViewport?Ve:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function _e(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==P(t)?!1:e}function Q(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),r=Pt(t),s=M(1);e&&(o?E(o)&&(s=ot(o)):s=ot(t));let c=_e(r,n,o)?ne(r):M(0),l=(i.left+c.x)/s.x,a=(i.top+c.y)/s.y,d=i.width/s.x,u=i.height/s.y;if(r){let m=P(r),f=o&&E(o)?P(o):o,g=m,h=pt(g);for(;h&&o&&f!==g;){let p=ot(h),w=h.getBoundingClientRect(),x=T(h),y=w.left+(h.clientLeft+parseFloat(x.paddingLeft))*p.x,b=w.top+(h.clientTop+parseFloat(x.paddingTop))*p.y;l*=p.x,a*=p.y,d*=p.x,u*=p.y,l+=y,a+=b,g=P(h),h=pt(g)}}return K({width:d,height:u,x:l,y:a})}function wt(t,e){let n=at(t).scrollLeft;return e?e.left+n:Q(N(t)).left+n}function oe(t,e){let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-wt(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function ze(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,r=i==="fixed",s=N(o),c=e?lt(e.floating):!1;if(o===s||c&&r)return n;let l={scrollLeft:0,scrollTop:0},a=M(1),d=M(0),u=B(o);if((u||!u&&!r)&&((G(o)!=="body"||et(s))&&(l=at(o)),B(o))){let f=Q(o);a=ot(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}let m=s&&!u&&!r?oe(s,l):M(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+d.x+m.x,y:n.y*a.y-l.scrollTop*a.y+d.y+m.y}}function Ie(t){return Array.from(t.getClientRects())}function Ue(t){let e=N(t),n=at(t),o=t.ownerDocument.body,i=V(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=V(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-n.scrollLeft+wt(t),c=-n.scrollTop;return T(o).direction==="rtl"&&(s+=V(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}var Qt=25;function je(t,e){let n=P(t),o=N(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,c=0,l=0;if(i){r=i.width,s=i.height;let d=ht();(!d||d&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}let a=wt(o);if(a<=0){let d=o.ownerDocument,u=d.body,m=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(o.clientWidth-u.clientWidth-f);g<=Qt&&(r-=g)}else a<=Qt&&(r+=a);return{width:r,height:s,x:c,y:l}}var Xe=new Set(["absolute","fixed"]);function Ye(t,e){let n=Q(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=B(t)?ot(t):M(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=i*r.x,a=o*r.y;return{width:s,height:c,x:l,y:a}}function Zt(t,e,n){let o;if(e==="viewport")o=je(t,n);else if(e==="document")o=Ue(N(t));else if(E(e))o=Ye(e,n);else{let i=ne(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return K(o)}function ie(t,e){let n=z(t);return n===e||!E(n)||J(n)?!1:T(n).position==="fixed"||ie(n,e)}function qe(t,e){let n=e.get(t);if(n)return n;let o=tt(t,[],!1).filter(c=>E(c)&&G(c)!=="body"),i=null,r=T(t).position==="fixed",s=r?z(t):t;for(;E(s)&&!J(s);){let c=T(s),l=nt(s);!l&&c.position==="fixed"&&(i=null),(r?!l&&!i:!l&&c.position==="static"&&!!i&&Xe.has(i.position)||et(s)&&!l&&ie(t,s))?o=o.filter(d=>d!==s):i=c,s=z(s)}return e.set(t,o),o}function Ke(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,s=[...n==="clippingAncestors"?lt(e)?[]:qe(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,d)=>{let u=Zt(e,d,i);return a.top=V(u.top,a.top),a.right=j(u.right,a.right),a.bottom=j(u.bottom,a.bottom),a.left=V(u.left,a.left),a},Zt(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ge(t){let{width:e,height:n}=ee(t);return{width:e,height:n}}function Je(t,e,n){let o=B(e),i=N(e),r=n==="fixed",s=Q(t,!0,r,e),c={scrollLeft:0,scrollTop:0},l=M(0);function a(){l.x=wt(i)}if(o||!o&&!r)if((G(e)!=="body"||et(i))&&(c=at(e)),o){let f=Q(e,!0,r,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else i&&a();r&&!o&&i&&a();let d=i&&!o&&!r?oe(i,c):M(0),u=s.left+c.scrollLeft-l.x-d.x,m=s.top+c.scrollTop-l.y-d.y;return{x:u,y:m,width:s.width,height:s.height}}function St(t){return T(t).position==="static"}function te(t,e){if(!B(t)||T(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return N(t)===n&&(n=n.ownerDocument.body),n}function se(t,e){let n=P(t);if(lt(t))return n;if(!B(t)){let i=z(t);for(;i&&!J(i);){if(E(i)&&!St(i))return i;i=z(i)}return n}let o=te(t,e);for(;o&&Kt(o)&&St(o);)o=te(o,e);return o&&J(o)&&St(o)&&!nt(o)?n:o||Gt(t)||n}var Qe=async function(t){let e=this.getOffsetParent||se,n=this.getDimensions,o=await n(t.floating);return{reference:Je(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ze(t){return T(t).direction==="rtl"}var xt={convertOffsetParentRelativeRectToViewportRelativeRect:ze,getDocumentElement:N,getClippingRect:Ke,getOffsetParent:se,getElementRects:Qe,getClientRects:Ie,getDimensions:Ge,getScale:ot,isElement:E,isRTL:Ze};function re(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function tn(t,e){let n=null,o,i=N(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();let a=t.getBoundingClientRect(),{left:d,top:u,width:m,height:f}=a;if(c||e(),!m||!f)return;let g=ct(u),h=ct(i.clientWidth-(d+m)),p=ct(i.clientHeight-(u+f)),w=ct(d),y={rootMargin:-g+"px "+-h+"px "+-p+"px "+-w+"px",threshold:V(0,j(1,l))||1},b=!0;function v(R){let O=R[0].intersectionRatio;if(O!==l){if(!b)return s();O?s(!1,O):o=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!re(a,t.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(v,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(v,y)}n.observe(t)}return s(!0),r}function ce(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Pt(t),d=i||r?[...a?tt(a):[],...tt(e)]:[];d.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});let u=a&&c?tn(a,n):null,m=-1,f=null;s&&(f=new ResizeObserver(w=>{let[x]=w;x&&x.target===a&&f&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),a&&!l&&f.observe(a),f.observe(e));let g,h=l?Q(t):null;l&&p();function p(){let w=Q(t);h&&!re(h,w)&&n(),h=w,g=requestAnimationFrame(p)}return n(),()=>{var w;d.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(g)}}var le=jt,ae=zt,fe=Xt,Ct=It;var ue=Ut,de=_t;var me=(t,e,n)=>{let o=new Map,i={platform:xt,...n},r={...i.platform,_c:o};return Vt(t,e,{...i,platform:r})};function ge(t){return en(t)}function Et(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function en(t){for(let e=t;e;e=Et(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Et(t);e;e=Et(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||nt(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=xt.getOffsetParent;xt.getOffsetParent=n=>e(n,ge)}})();function he(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var ye=(async(t,{referenceEl:e,floatingEl:n,overlayPositioning:o="absolute",placement:i,flipDisabled:r,flipPlacements:s,offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})=>{if(!e||!n)return;let u=Lt(n)==="rtl",{x:m,y:f,placement:g,strategy:h,middlewareData:p}=await me(e,n,{strategy:o,placement:i==="auto"||i==="auto-start"||i==="auto-end"?void 0:pe(i,u),middleware:on({placement:i,flipDisabled:r,flipPlacements:s?.map(b=>pe(b,u)),offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})});if(a&&p.arrow){let{x:b,y:v}=p.arrow,R=g.split("-")[0],O=b!=null?"left":"top",I=cn[R],C={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(a.style,{...C,[O]:`${O=="left"?b:v}px`,[R]:"100%",transform:I})}let x=p.hide?.referenceHidden?"hidden":null,y=x?"none":null;n.setAttribute(nn,g),Object.assign(n.style,{pointerEvents:y,position:h,transform:`translate(${he(m)}px,${he(f)}px)`,visibility:x})}),nn="data-placement",ve=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end","leading","trailing","leading-start","leading-end","trailing-start","trailing-end"],Ln="bottom-start",Dn="bottom-end",Fn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function on({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:r,type:s}){let c=[fe(),ue()];return s==="menu"&&c.push(Ct({fallbackPlacements:n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})),c.push(le({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),t==="auto"||t==="auto-start"||t==="auto-end"?c.push(ae({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null})):e||c.push(Ct(n?{fallbackPlacements:n}:{})),r&&c.push(de({element:r})),c}function sn(t){return ve.includes(t)}function Mn(t,e){let n=t.filter(sn);return n.length!==t.length&&console.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ve.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function pe(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function kn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",position:e.overlayPositioning??"absolute"}),!ft.get(t))return be(t);await(n?rn(t):ye)(t,e)}function rn(t){let e=yt.get(t);return e||(e=Dt(ye,Tt.reposition,{edges:["leading","trailing"]}),yt.set(t,e),e)}var cn={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,yt=new WeakMap;async function be(t){let{referenceEl:e,floatingEl:n}=t;if(!n.isConnected)return;let o=ce;ft.set(t,{state:"pending"});let i,r=o(e,n,()=>{let s=t.reposition();i||(i=s)});return ft.set(t,{state:"active",cleanUp:r}),i}function ln(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",pointerEvents:"",position:"",transform:"",visibility:""})}async function Nn(t){let{floatingEl:e,referenceEl:n}=t;if(ln(t),!(!e||!n)&&(an(t),!!t.open))return be(t)}function an(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),yt.get(t)?.cancel(),yt.delete(t)}var we=4,Bn=Math.ceil(Math.hypot(we,we));export{Ln as a,Dn as b,Fn as c,Mn as d,kn as e,ln as f,Nn as g,an as h,Bn as i};
3
+ v5.0.0-next.6 */
4
+ import{a as Dt}from"./MPYXWS5E.js";import{e as Lt}from"./7DQ4G2FS.js";import{K as Tt}from"./2IIGKMQ6.js";var vt=["top","right","bottom","left"],Ft=["start","end"],bt=vt.reduce((t,e)=>t.concat(e,e+"-"+Ft[0],e+"-"+Ft[1]),[]),j=Math.min,V=Math.max,rt=Math.round,ct=Math.floor,M=t=>({x:t,y:t}),Oe={left:"right",right:"left",bottom:"top",top:"bottom"},Re={start:"end",end:"start"};function ut(t,e,n){return V(t,j(e,n))}function X(t,e){return typeof t=="function"?t(e):t}function W(t){return t.split("-")[0]}function k(t){return t.split("-")[1]}function At(t){return t==="x"?"y":"x"}function dt(t){return t==="y"?"height":"width"}var Se=new Set(["top","bottom"]);function _(t){return Se.has(W(t))?"y":"x"}function mt(t){return At(_(t))}function Ot(t,e,n){n===void 0&&(n=!1);let o=k(t),i=mt(t),r=dt(i),s=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[r]>e.floating[r]&&(s=st(s)),[s,st(s)]}function Nt(t){let e=st(t);return[it(t),e,it(e)]}function it(t){return t.replace(/start|end/g,e=>Re[e])}var Mt=["left","right"],kt=["right","left"],Pe=["top","bottom"],Ce=["bottom","top"];function Ee(t,e,n){switch(t){case"top":case"bottom":return n?e?kt:Mt:e?Mt:kt;case"left":case"right":return e?Pe:Ce;default:return[]}}function Bt(t,e,n,o){let i=k(t),r=Ee(W(t),n==="start",o);return i&&(r=r.map(s=>s+"-"+i),e&&(r=r.concat(r.map(it)))),r}function st(t){return t.replace(/left|right|bottom|top/g,e=>Oe[e])}function Te(t){return{top:0,right:0,bottom:0,left:0,...t}}function Rt(t){return typeof t!="number"?Te(t):{top:t,right:t,bottom:t,left:t}}function K(t){let{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Wt(t,e,n){let{reference:o,floating:i}=t,r=_(e),s=mt(e),c=dt(s),l=W(e),a=r==="y",d=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2,f;switch(l){case"top":f={x:d,y:o.y-i.height};break;case"bottom":f={x:d,y:o.y+o.height};break;case"right":f={x:o.x+o.width,y:u};break;case"left":f={x:o.x-i.width,y:u};break;default:f={x:o.x,y:o.y}}switch(k(e)){case"start":f[s]-=m*(n&&a?-1:1);break;case"end":f[s]+=m*(n&&a?-1:1);break}return f}var Vt=async(t,e,n)=>{let{placement:o="bottom",strategy:i="absolute",middleware:r=[],platform:s}=n,c=r.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(e)),a=await s.getElementRects({reference:t,floating:e,strategy:i}),{x:d,y:u}=Wt(a,o,l),m=o,f={},g=0;for(let h=0;h<c.length;h++){let{name:p,fn:w}=c[h],{x,y,data:b,reset:v}=await w({x:d,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:f,rects:a,platform:s,elements:{reference:t,floating:e}});d=x??d,u=y??u,f={...f,[p]:{...f[p],...b}},v&&g<=50&&(g++,typeof v=="object"&&(v.placement&&(m=v.placement),v.rects&&(a=v.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:i}):v.rects),{x:d,y:u}=Wt(a,m,l)),h=-1)}return{x:d,y:u,placement:m,strategy:i,middlewareData:f}};async function Z(t,e){var n;e===void 0&&(e={});let{x:o,y:i,platform:r,rects:s,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:d="viewport",elementContext:u="floating",altBoundary:m=!1,padding:f=0}=X(e,t),g=Rt(f),p=c[m?u==="floating"?"reference":"floating":u],w=K(await r.getClippingRect({element:(n=await(r.isElement==null?void 0:r.isElement(p)))==null||n?p:p.contextElement||await(r.getDocumentElement==null?void 0:r.getDocumentElement(c.floating)),boundary:a,rootBoundary:d,strategy:l})),x=u==="floating"?{x:o,y:i,width:s.floating.width,height:s.floating.height}:s.reference,y=await(r.getOffsetParent==null?void 0:r.getOffsetParent(c.floating)),b=await(r.isElement==null?void 0:r.isElement(y))?await(r.getScale==null?void 0:r.getScale(y))||{x:1,y:1}:{x:1,y:1},v=K(r.convertOffsetParentRelativeRectToViewportRelativeRect?await r.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:x,offsetParent:y,strategy:l}):x);return{top:(w.top-v.top+g.top)/b.y,bottom:(v.bottom-w.bottom+g.bottom)/b.y,left:(w.left-v.left+g.left)/b.x,right:(v.right-w.right+g.right)/b.x}}var _t=t=>({name:"arrow",options:t,async fn(e){let{x:n,y:o,placement:i,rects:r,platform:s,elements:c,middlewareData:l}=e,{element:a,padding:d=0}=X(t,e)||{};if(a==null)return{};let u=Rt(d),m={x:n,y:o},f=mt(i),g=dt(f),h=await s.getDimensions(a),p=f==="y",w=p?"top":"left",x=p?"bottom":"right",y=p?"clientHeight":"clientWidth",b=r.reference[g]+r.reference[f]-m[f]-r.floating[g],v=m[f]-r.reference[f],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a)),O=R?R[y]:0;(!O||!await(s.isElement==null?void 0:s.isElement(R)))&&(O=c.floating[y]||r.floating[g]);let I=b/2-v/2,C=O/2-h[g]/2-1,A=j(u[w],C),L=j(u[x],C),$=A,Y=O-h[g]-L,S=O/2-h[g]/2+I,q=ut($,S,Y),H=!l.arrow&&k(i)!=null&&S!==q&&r.reference[g]/2-(S<$?A:L)-h[g]/2<0,D=H?S<$?S-$:S-Y:0;return{[f]:m[f]+D,data:{[f]:q,centerOffset:S-q-D,...H&&{alignmentOffset:D}},reset:H}}});function Le(t,e,n){return(t?[...n.filter(i=>k(i)===t),...n.filter(i=>k(i)!==t)]:n.filter(i=>W(i)===i)).filter(i=>t?k(i)===t||(e?it(i)!==i:!1):!0)}var zt=function(t){return t===void 0&&(t={}),{name:"autoPlacement",options:t,async fn(e){var n,o,i;let{rects:r,middlewareData:s,placement:c,platform:l,elements:a}=e,{crossAxis:d=!1,alignment:u,allowedPlacements:m=bt,autoAlignment:f=!0,...g}=X(t,e),h=u!==void 0||m===bt?Le(u||null,f,m):m,p=await Z(e,g),w=((n=s.autoPlacement)==null?void 0:n.index)||0,x=h[w];if(x==null)return{};let y=Ot(x,r,await(l.isRTL==null?void 0:l.isRTL(a.floating)));if(c!==x)return{reset:{placement:h[0]}};let b=[p[W(x)],p[y[0]],p[y[1]]],v=[...((o=s.autoPlacement)==null?void 0:o.overflows)||[],{placement:x,overflows:b}],R=h[w+1];if(R)return{data:{index:w+1,overflows:v},reset:{placement:R}};let O=v.map(A=>{let L=k(A.placement);return[A.placement,L&&d?A.overflows.slice(0,2).reduce(($,Y)=>$+Y,0):A.overflows[0],A.overflows]}).sort((A,L)=>A[1]-L[1]),C=((i=O.filter(A=>A[2].slice(0,k(A[0])?2:3).every(L=>L<=0))[0])==null?void 0:i[0])||O[0][0];return C!==c?{data:{index:w+1,overflows:v},reset:{placement:C}}:{}}}},It=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;let{placement:i,middlewareData:r,rects:s,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:d=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:f="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:h=!0,...p}=X(t,e);if((n=r.arrow)!=null&&n.alignmentOffset)return{};let w=W(i),x=_(c),y=W(c)===c,b=await(l.isRTL==null?void 0:l.isRTL(a.floating)),v=m||(y||!h?[st(c)]:Nt(c)),R=g!=="none";!m&&R&&v.push(...Bt(c,h,g,b));let O=[c,...v],I=await Z(e,p),C=[],A=((o=r.flip)==null?void 0:o.overflows)||[];if(d&&C.push(I[w]),u){let S=Ot(i,s,b);C.push(I[S[0]],I[S[1]])}if(A=[...A,{placement:i,overflows:C}],!C.every(S=>S<=0)){var L,$;let S=(((L=r.flip)==null?void 0:L.index)||0)+1,q=O[S];if(q&&(!(u==="alignment"?x!==_(q):!1)||A.every(F=>_(F.placement)===x?F.overflows[0]>0:!0)))return{data:{index:S,overflows:A},reset:{placement:q}};let H=($=A.filter(D=>D.overflows[0]<=0).sort((D,F)=>D.overflows[1]-F.overflows[1])[0])==null?void 0:$.placement;if(!H)switch(f){case"bestFit":{var Y;let D=(Y=A.filter(F=>{if(R){let U=_(F.placement);return U===x||U==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(U=>U>0).reduce((U,Ae)=>U+Ae,0)]).sort((F,U)=>F[1]-U[1])[0])==null?void 0:Y[0];D&&(H=D);break}case"initialPlacement":H=c;break}if(i!==H)return{reset:{placement:H}}}return{}}}};function $t(t,e){return{top:t.top-e.height,right:t.right-e.width,bottom:t.bottom-e.height,left:t.left-e.width}}function Ht(t){return vt.some(e=>t[e]>=0)}var Ut=function(t){return t===void 0&&(t={}),{name:"hide",options:t,async fn(e){let{rects:n}=e,{strategy:o="referenceHidden",...i}=X(t,e);switch(o){case"referenceHidden":{let r=await Z(e,{...i,elementContext:"reference"}),s=$t(r,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Ht(s)}}}case"escaped":{let r=await Z(e,{...i,altBoundary:!0}),s=$t(r,n.floating);return{data:{escapedOffsets:s,escaped:Ht(s)}}}default:return{}}}}};var De=new Set(["left","top"]);async function Fe(t,e){let{placement:n,platform:o,elements:i}=t,r=await(o.isRTL==null?void 0:o.isRTL(i.floating)),s=W(n),c=k(n),l=_(n)==="y",a=De.has(s)?-1:1,d=r&&l?-1:1,u=X(e,t),{mainAxis:m,crossAxis:f,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:u.mainAxis||0,crossAxis:u.crossAxis||0,alignmentAxis:u.alignmentAxis};return c&&typeof g=="number"&&(f=c==="end"?g*-1:g),l?{x:f*d,y:m*a}:{x:m*a,y:f*d}}var jt=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;let{x:i,y:r,placement:s,middlewareData:c}=e,l=await Fe(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:r+l.y,data:{...l,placement:s}}}}},Xt=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){let{x:n,y:o,placement:i}=e,{mainAxis:r=!0,crossAxis:s=!1,limiter:c={fn:p=>{let{x:w,y:x}=p;return{x:w,y:x}}},...l}=X(t,e),a={x:n,y:o},d=await Z(e,l),u=_(W(i)),m=At(u),f=a[m],g=a[u];if(r){let p=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=f+d[p],y=f-d[w];f=ut(x,f,y)}if(s){let p=u==="y"?"top":"left",w=u==="y"?"bottom":"right",x=g+d[p],y=g-d[w];g=ut(x,g,y)}let h=c.fn({...e,[m]:f,[u]:g});return{...h,data:{x:h.x-n,y:h.y-o,enabled:{[m]:r,[u]:s}}}}}};function gt(){return typeof window<"u"}function G(t){return qt(t)?(t.nodeName||"").toLowerCase():"#document"}function P(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function N(t){var e;return(e=(qt(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function qt(t){return gt()?t instanceof Node||t instanceof P(t).Node:!1}function E(t){return gt()?t instanceof Element||t instanceof P(t).Element:!1}function B(t){return gt()?t instanceof HTMLElement||t instanceof P(t).HTMLElement:!1}function Yt(t){return!gt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof P(t).ShadowRoot}var Me=new Set(["inline","contents"]);function et(t){let{overflow:e,overflowX:n,overflowY:o,display:i}=T(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!Me.has(i)}var ke=new Set(["table","td","th"]);function Kt(t){return ke.has(G(t))}var Ne=[":popover-open",":modal"];function lt(t){return Ne.some(e=>{try{return t.matches(e)}catch{return!1}})}var Be=["transform","translate","scale","rotate","perspective"],We=["transform","translate","scale","rotate","perspective","filter"],$e=["paint","layout","strict","content"];function nt(t){let e=ht(),n=E(t)?T(t):t;return Be.some(o=>n[o]?n[o]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||We.some(o=>(n.willChange||"").includes(o))||$e.some(o=>(n.contain||"").includes(o))}function Gt(t){let e=z(t);for(;B(e)&&!J(e);){if(nt(e))return e;if(lt(e))return null;e=z(e)}return null}function ht(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}var He=new Set(["html","body","#document"]);function J(t){return He.has(G(t))}function T(t){return P(t).getComputedStyle(t)}function at(t){return E(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function z(t){if(G(t)==="html")return t;let e=t.assignedSlot||t.parentNode||Yt(t)&&t.host||N(t);return Yt(e)?e.host:e}function Jt(t){let e=z(t);return J(e)?t.ownerDocument?t.ownerDocument.body:t.body:B(e)&&et(e)?e:Jt(e)}function tt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);let i=Jt(t),r=i===((o=t.ownerDocument)==null?void 0:o.body),s=P(i);if(r){let c=pt(s);return e.concat(s,s.visualViewport||[],et(i)?i:[],c&&n?tt(c):[])}return e.concat(i,tt(i,[],n))}function pt(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}function ee(t){let e=T(t),n=parseFloat(e.width)||0,o=parseFloat(e.height)||0,i=B(t),r=i?t.offsetWidth:n,s=i?t.offsetHeight:o,c=rt(n)!==r||rt(o)!==s;return c&&(n=r,o=s),{width:n,height:o,$:c}}function Pt(t){return E(t)?t:t.contextElement}function ot(t){let e=Pt(t);if(!B(e))return M(1);let n=e.getBoundingClientRect(),{width:o,height:i,$:r}=ee(e),s=(r?rt(n.width):n.width)/o,c=(r?rt(n.height):n.height)/i;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}var Ve=M(0);function ne(t){let e=P(t);return!ht()||!e.visualViewport?Ve:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function _e(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==P(t)?!1:e}function Q(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);let i=t.getBoundingClientRect(),r=Pt(t),s=M(1);e&&(o?E(o)&&(s=ot(o)):s=ot(t));let c=_e(r,n,o)?ne(r):M(0),l=(i.left+c.x)/s.x,a=(i.top+c.y)/s.y,d=i.width/s.x,u=i.height/s.y;if(r){let m=P(r),f=o&&E(o)?P(o):o,g=m,h=pt(g);for(;h&&o&&f!==g;){let p=ot(h),w=h.getBoundingClientRect(),x=T(h),y=w.left+(h.clientLeft+parseFloat(x.paddingLeft))*p.x,b=w.top+(h.clientTop+parseFloat(x.paddingTop))*p.y;l*=p.x,a*=p.y,d*=p.x,u*=p.y,l+=y,a+=b,g=P(h),h=pt(g)}}return K({width:d,height:u,x:l,y:a})}function wt(t,e){let n=at(t).scrollLeft;return e?e.left+n:Q(N(t)).left+n}function oe(t,e){let n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-wt(t,n),i=n.top+e.scrollTop;return{x:o,y:i}}function ze(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t,r=i==="fixed",s=N(o),c=e?lt(e.floating):!1;if(o===s||c&&r)return n;let l={scrollLeft:0,scrollTop:0},a=M(1),d=M(0),u=B(o);if((u||!u&&!r)&&((G(o)!=="body"||et(s))&&(l=at(o)),B(o))){let f=Q(o);a=ot(o),d.x=f.x+o.clientLeft,d.y=f.y+o.clientTop}let m=s&&!u&&!r?oe(s,l):M(0);return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+d.x+m.x,y:n.y*a.y-l.scrollTop*a.y+d.y+m.y}}function Ie(t){return Array.from(t.getClientRects())}function Ue(t){let e=N(t),n=at(t),o=t.ownerDocument.body,i=V(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),r=V(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight),s=-n.scrollLeft+wt(t),c=-n.scrollTop;return T(o).direction==="rtl"&&(s+=V(e.clientWidth,o.clientWidth)-i),{width:i,height:r,x:s,y:c}}var Qt=25;function je(t,e){let n=P(t),o=N(t),i=n.visualViewport,r=o.clientWidth,s=o.clientHeight,c=0,l=0;if(i){r=i.width,s=i.height;let d=ht();(!d||d&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}let a=wt(o);if(a<=0){let d=o.ownerDocument,u=d.body,m=getComputedStyle(u),f=d.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,g=Math.abs(o.clientWidth-u.clientWidth-f);g<=Qt&&(r-=g)}else a<=Qt&&(r+=a);return{width:r,height:s,x:c,y:l}}var Xe=new Set(["absolute","fixed"]);function Ye(t,e){let n=Q(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,r=B(t)?ot(t):M(1),s=t.clientWidth*r.x,c=t.clientHeight*r.y,l=i*r.x,a=o*r.y;return{width:s,height:c,x:l,y:a}}function Zt(t,e,n){let o;if(e==="viewport")o=je(t,n);else if(e==="document")o=Ue(N(t));else if(E(e))o=Ye(e,n);else{let i=ne(t);o={x:e.x-i.x,y:e.y-i.y,width:e.width,height:e.height}}return K(o)}function ie(t,e){let n=z(t);return n===e||!E(n)||J(n)?!1:T(n).position==="fixed"||ie(n,e)}function qe(t,e){let n=e.get(t);if(n)return n;let o=tt(t,[],!1).filter(c=>E(c)&&G(c)!=="body"),i=null,r=T(t).position==="fixed",s=r?z(t):t;for(;E(s)&&!J(s);){let c=T(s),l=nt(s);!l&&c.position==="fixed"&&(i=null),(r?!l&&!i:!l&&c.position==="static"&&!!i&&Xe.has(i.position)||et(s)&&!l&&ie(t,s))?o=o.filter(d=>d!==s):i=c,s=z(s)}return e.set(t,o),o}function Ke(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t,s=[...n==="clippingAncestors"?lt(e)?[]:qe(e,this._c):[].concat(n),o],c=s[0],l=s.reduce((a,d)=>{let u=Zt(e,d,i);return a.top=V(u.top,a.top),a.right=j(u.right,a.right),a.bottom=j(u.bottom,a.bottom),a.left=V(u.left,a.left),a},Zt(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Ge(t){let{width:e,height:n}=ee(t);return{width:e,height:n}}function Je(t,e,n){let o=B(e),i=N(e),r=n==="fixed",s=Q(t,!0,r,e),c={scrollLeft:0,scrollTop:0},l=M(0);function a(){l.x=wt(i)}if(o||!o&&!r)if((G(e)!=="body"||et(i))&&(c=at(e)),o){let f=Q(e,!0,r,e);l.x=f.x+e.clientLeft,l.y=f.y+e.clientTop}else i&&a();r&&!o&&i&&a();let d=i&&!o&&!r?oe(i,c):M(0),u=s.left+c.scrollLeft-l.x-d.x,m=s.top+c.scrollTop-l.y-d.y;return{x:u,y:m,width:s.width,height:s.height}}function St(t){return T(t).position==="static"}function te(t,e){if(!B(t)||T(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return N(t)===n&&(n=n.ownerDocument.body),n}function se(t,e){let n=P(t);if(lt(t))return n;if(!B(t)){let i=z(t);for(;i&&!J(i);){if(E(i)&&!St(i))return i;i=z(i)}return n}let o=te(t,e);for(;o&&Kt(o)&&St(o);)o=te(o,e);return o&&J(o)&&St(o)&&!nt(o)?n:o||Gt(t)||n}var Qe=async function(t){let e=this.getOffsetParent||se,n=this.getDimensions,o=await n(t.floating);return{reference:Je(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function Ze(t){return T(t).direction==="rtl"}var xt={convertOffsetParentRelativeRectToViewportRelativeRect:ze,getDocumentElement:N,getClippingRect:Ke,getOffsetParent:se,getElementRects:Qe,getClientRects:Ie,getDimensions:Ge,getScale:ot,isElement:E,isRTL:Ze};function re(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function tn(t,e){let n=null,o,i=N(t);function r(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function s(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),r();let a=t.getBoundingClientRect(),{left:d,top:u,width:m,height:f}=a;if(c||e(),!m||!f)return;let g=ct(u),h=ct(i.clientWidth-(d+m)),p=ct(i.clientHeight-(u+f)),w=ct(d),y={rootMargin:-g+"px "+-h+"px "+-p+"px "+-w+"px",threshold:V(0,j(1,l))||1},b=!0;function v(R){let O=R[0].intersectionRatio;if(O!==l){if(!b)return s();O?s(!1,O):o=setTimeout(()=>{s(!1,1e-7)},1e3)}O===1&&!re(a,t.getBoundingClientRect())&&s(),b=!1}try{n=new IntersectionObserver(v,{...y,root:i.ownerDocument})}catch{n=new IntersectionObserver(v,y)}n.observe(t)}return s(!0),r}function ce(t,e,n,o){o===void 0&&(o={});let{ancestorScroll:i=!0,ancestorResize:r=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Pt(t),d=i||r?[...a?tt(a):[],...tt(e)]:[];d.forEach(w=>{i&&w.addEventListener("scroll",n,{passive:!0}),r&&w.addEventListener("resize",n)});let u=a&&c?tn(a,n):null,m=-1,f=null;s&&(f=new ResizeObserver(w=>{let[x]=w;x&&x.target===a&&f&&(f.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var y;(y=f)==null||y.observe(e)})),n()}),a&&!l&&f.observe(a),f.observe(e));let g,h=l?Q(t):null;l&&p();function p(){let w=Q(t);h&&!re(h,w)&&n(),h=w,g=requestAnimationFrame(p)}return n(),()=>{var w;d.forEach(x=>{i&&x.removeEventListener("scroll",n),r&&x.removeEventListener("resize",n)}),u?.(),(w=f)==null||w.disconnect(),f=null,l&&cancelAnimationFrame(g)}}var le=jt,ae=zt,fe=Xt,Ct=It;var ue=Ut,de=_t;var me=(t,e,n)=>{let o=new Map,i={platform:xt,...n},r={...i.platform,_c:o};return Vt(t,e,{...i,platform:r})};function ge(t){return en(t)}function Et(t){return t.assignedSlot?t.assignedSlot:t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}function en(t){for(let e=t;e;e=Et(e))if(e instanceof Element&&getComputedStyle(e).display==="none")return null;for(let e=Et(t);e;e=Et(e)){if(!(e instanceof Element))continue;let n=getComputedStyle(e);if(n.display!=="contents"&&(n.position!=="static"||nt(n)||e.tagName==="BODY"))return e}return null}(function(){if(!!1){let e=xt.getOffsetParent;xt.getOffsetParent=n=>e(n,ge)}})();function he(t){let e=window.devicePixelRatio||1;return Math.round(t*e)/e}var ye=(async(t,{referenceEl:e,floatingEl:n,overlayPositioning:o="absolute",placement:i,flipDisabled:r,flipPlacements:s,offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})=>{if(!e||!n)return;let u=Lt(n)==="rtl",{x:m,y:f,placement:g,strategy:h,middlewareData:p}=await me(e,n,{strategy:o,placement:i==="auto"||i==="auto-start"||i==="auto-end"?void 0:pe(i,u),middleware:on({placement:i,flipDisabled:r,flipPlacements:s?.map(b=>pe(b,u)),offsetDistance:c,offsetSkidding:l,arrowEl:a,type:d})});if(a&&p.arrow){let{x:b,y:v}=p.arrow,R=g.split("-")[0],O=b!=null?"left":"top",I=cn[R],C={left:"",top:"",bottom:"",right:""};"floatingLayout"in t&&(t.floatingLayout=R==="left"||R==="right"?"horizontal":"vertical"),Object.assign(a.style,{...C,[O]:`${O=="left"?b:v}px`,[R]:"100%",transform:I})}let x=p.hide?.referenceHidden?"hidden":null,y=x?"none":null;n.setAttribute(nn,g),Object.assign(n.style,{pointerEvents:y,position:h,transform:`translate(${he(m)}px,${he(f)}px)`,visibility:x})}),nn="data-placement",ve=["top","bottom","right","left","top-start","top-end","bottom-start","bottom-end","right-start","right-end","left-start","left-end","leading","trailing","leading-start","leading-end","trailing-start","trailing-end"],Ln="bottom-start",Dn="bottom-end",Fn={animation:"calcite-floating-ui-anim",animationActive:"calcite-floating-ui-anim--active"};function on({placement:t,flipDisabled:e,flipPlacements:n,offsetDistance:o,offsetSkidding:i,arrowEl:r,type:s}){let c=[fe(),ue()];return s==="menu"&&c.push(Ct({fallbackPlacements:n||["top-start","top","top-end","bottom-start","bottom","bottom-end"]})),c.push(le({mainAxis:typeof o=="number"?o:0,crossAxis:typeof i=="number"?i:0})),t==="auto"||t==="auto-start"||t==="auto-end"?c.push(ae({alignment:t==="auto-start"?"start":t==="auto-end"?"end":null})):e||c.push(Ct(n?{fallbackPlacements:n}:{})),r&&c.push(de({element:r})),c}function sn(t){return ve.includes(t)}function Mn(t,e){let n=t.filter(sn);return n.length!==t.length&&console.warn(`${e.tagName}: Invalid value found in: flipPlacements. Try any of these: ${ve.map(o=>`"${o}"`).join(", ").trim()}`,{el:e}),n}function pe(t,e=!1){let n=["left","right"];return e&&n.reverse(),t.replace(/leading/gi,n[0]).replace(/trailing/gi,n[1])}async function kn(t,e,n=!1){if(!t.open||!e.floatingEl||!e.referenceEl)return;if(Object.assign(e.floatingEl.style,{display:"block",position:e.overlayPositioning??"absolute"}),!ft.get(t))return be(t);await(n?rn(t):ye)(t,e)}function rn(t){let e=yt.get(t);return e||(e=Dt(ye,Tt.reposition,{edges:["leading","trailing"]}),yt.set(t,e),e)}var cn={top:"",left:"rotate(-90deg)",bottom:"rotate(180deg)",right:"rotate(90deg)"},ft=new WeakMap,yt=new WeakMap;async function be(t){let{referenceEl:e,floatingEl:n}=t;if(!n.isConnected)return;let o=ce;ft.set(t,{state:"pending"});let i,r=o(e,n,()=>{let s=t.reposition();i||(i=s)});return ft.set(t,{state:"active",cleanUp:r}),i}function ln(t){let{floatingEl:e}=t;e&&Object.assign(e.style,{display:"",pointerEvents:"",position:"",transform:"",visibility:""})}async function Nn(t){let{floatingEl:e,referenceEl:n}=t;if(ln(t),!(!e||!n)&&(an(t),!!t.open))return be(t)}function an(t){let e=ft.get(t);e?.state==="active"&&e.cleanUp(),ft.delete(t),yt.get(t)?.cancel(),yt.delete(t)}var we=4,Bn=Math.ceil(Math.hypot(we,we));export{Ln as a,Dn as b,Fn as c,Mn as d,kn as e,ln as f,Nn as g,an as h,Bn as i};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.4 */
4
- import{d as xe}from"./M5QNDD4X.js";import{a as Ce,b as ye}from"./HZVCGOQL.js";import{a as Ie}from"./YASA2V4I.js";import{b as V,c as Se,d as P,f as y,g as w}from"./TU2PNKWS.js";import{a as F,b as O,d as n,e as p,f as z}from"./C3BIK3DY.js";import{a as ge}from"./6TAH2TAT.js";import{b as M}from"./QDXVT7UF.js";import{a as be}from"./SHXU5GEM.js";import{c as ue,d as me,e as fe}from"./J2ACTXE5.js";import{b as ve}from"./YUOVY5RN.js";import{a as ce,c as R,d as re,e as he,f as de,g as $,h as pe}from"./VLOLYD36.js";import{a as oe}from"./6PIHPAZF.js";import{a as ee,c as te,e as ie,f as se,h as le}from"./U3G47NPB.js";import{a as Y,b as Z}from"./PRB44CR7.js";import{a as v}from"./H42LHYUA.js";import{a as ne}from"./MPZ73UTT.js";import{a as ae}from"./EQC2JW3I.js";import{a as E,b as D}from"./J2NLU7RP.js";import{a as Q}from"./PNBL2IVW.js";import{a as K}from"./HKVRX5SD.js";import"./D5SFHDV6.js";import{a as H,c as T}from"./TLLHA7VC.js";import"./VZVYZPXQ.js";import{f as S,i as X,l as J}from"./Z6CRZOOK.js";import{a as j}from"./XRJOD24G.js";import{A as W,B as C,C as f,D as U,E as r,I as G,K as N,P as _,g as q,h as d,l as u,o as g}from"./CSQVLDPF.js";var ke=q`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-internal-combobox-spacing-unit-l: .5rem;--calcite-internal-combobox-spacing-unit-s: .25rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) ;--calcite-internal-close-size: 1rem}:host([scale=s]) .x-button{margin-inline:.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-internal-combobox-spacing-unit-l: .75rem;--calcite-internal-combobox-spacing-unit-s: .5rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .375rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) ;--calcite-internal-close-size: 1.5rem}:host([scale=m]) .x-button{margin-inline-end:.75rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-internal-combobox-spacing-unit-l: 1rem;--calcite-internal-combobox-spacing-unit-s: .75rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .625rem;--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(.625rem - 1px) ;--calcite-internal-close-size: 2rem}:host([scale=l]) .x-button{margin-inline-end:1rem}.x-button{align-self:center}.wrapper{display:flex;border-width:1px;border-style:solid;outline-color:transparent;padding-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);background-color:var(--calcite-combobox-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));border-color:var(--calcite-combobox-input-border-color, var(--calcite-color-border-input))}.wrapper:hover .icon{color:var(--calcite-combobox-icon-color-hover, var(--calcite-color-text-1))}:host(:focus-within) .wrapper,.wrapper--active{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;gap:var(--calcite-internal-combobox-spacing-unit-s);margin-inline-end:var(--calcite-internal-combobox-spacing-unit-s)}.grid-input.selection-display--fit,.grid-input.selection-display--single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-internal-combobox-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;width:0px;min-width:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.placeholder-icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-width:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}@media(forced-colors:active){.wrapper,.floating-ui-container{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.list-container{max-height:45vh;overflow-y:auto;inline-size:var(--calcite-dropdown-width, 100%);background-color:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1))}.list{margin:0;display:block;padding:0}.list--hide{height:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);max-inline-size:100%}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.select-all{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-1));border-block-end-color:var(--calcite-combobox-divider-color, var(--calcite-combobox-item-border-color, var(--calcite-color-border-3)));border-block-end-style:solid;border-block-end-width:var(--calcite-border-width-sm);inset-block-start:0;position:sticky;z-index:var(--calcite-z-index-sticky)}.no-matches{padding-block:var(--calcite-internal-combobox-no-matches-spacing-unit-s);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));background:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1));cursor:pointer}.no-matches-placeholder{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3));cursor:default}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.x-button{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;border-style:none;cursor:pointer;outline-color:transparent;align-items:center;margin:0;background-color:var(--calcite-close-background-color, var(--calcite-color-foreground-2));-webkit-appearance:none;display:flex;align-content:center;justify-content:center;color:var(--calcite-close-icon-color, var(--calcite-color-text-3));block-size:var(--calcite-internal-close-size, 1.5rem);inline-size:var(--calcite-internal-close-size, 1.5rem);min-block-size:var(--calcite-internal-close-size, 1.5rem);min-inline-size:var(--calcite-internal-close-size, 1.5rem);padding:0}.x-button:hover,.x-button:focus{background-color:var(--calcite-close-background-color-hover, var(--calcite-color-foreground-3))}.x-button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.x-button:active{background-color:var(--calcite-close-background-color-press, var(--calcite-color-transparent-press))}.x-button calcite-icon{color:inherit}.x-button--round{border-radius:9999px}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,B=class extends U{constructor(){super(),this.closeButtonRef=C(),this.selectAllComboboxItemRef=C(),this.allSelectedIndicatorChipRef=C(),this.cancelable=ne()(this),this.filterItems=(()=>{let e=(t,i)=>t&&i.some(({el:s})=>t===s);return ae((t,i=!1,s=!0)=>{let l=Ie([...this.data,...this.groupData],t,this.effectiveFilterProps),a=this.getItemsAndGroups(),o=t==="";a.forEach(c=>{if(o){c.itemHidden=!1;return}let h=!e(c,l);c.itemHidden=h;let[m,k]=c.ancestors;(e(m,l)||e(k,l))&&(c.itemHidden=!1),h||c.ancestors.forEach(b=>b.itemHidden=!1)}),this.noMatchesFound=this.filteredItems.length===0&&!!this.filterText,this.filterTextMatchPattern=this.filterText&&new RegExp(`(${M(this.filterText)})`,"i"),this.keyboardNavItems.forEach(c=>{c.filterTextMatchPattern=this.filterTextMatchPattern}),i&&(this.open=this.filterText.trim().length>0),s&&this.calciteComboboxFilterChange.emit()},N.filter)})(),this._filterText="",this.getSelectedItems=()=>{if(!this.isMulti()){let e=this.items.find(({selected:t})=>t);return e?[e]:[]}return this.items.filter(e=>e.selected&&(this.selectionMode!=="ancestors"||!P(e))).sort((e,t)=>{let i=this.selectedItems.indexOf(e),s=this.selectedItems.indexOf(t);return i>-1&&s>-1?i-s:s-i})},this.groupItems=[],this.guid=j(),this.ignoreSelectedEventsFlag=!1,this.inputHeight=0,this.internalValueChangeFlag=!1,this.mutationObserver=E("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.transitionProp="opacity",this.placement=ce,this.resizeObserver=E("resize",()=>{this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}),this.selectedIndicatorChipRef=C(),this._selectedItems=[],this.textInputRef=C(),this._value=null,this.messages=Q(),this.focusSetter=K()(this),this.customChipAddHandler=()=>{this.addCustomChip(this.filterText,!0)},this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.items=[],this.clearDisabled=!1,this.disabled=!1,this.maxItems=0,this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.readOnly=!1,this.required=!1,this.scale="m",this.selectAllEnabled=!1,this.selectionDisplay="all",this.selectionMode="multiple",this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.calciteComboboxBeforeClose=g({cancelable:!1}),this.calciteComboboxBeforeOpen=g({cancelable:!1}),this.calciteComboboxChange=g({cancelable:!1}),this.calciteComboboxChipClose=g({cancelable:!1}),this.calciteComboboxClose=g({cancelable:!1}),this.calciteComboboxFilterChange=g({cancelable:!1}),this.calciteComboboxOpen=g({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteComboboxItemChange",this.calciteComboboxItemChangeHandler),this.listen("calciteInternalComboboxItemChange",this.calciteInternalComboboxItemChangeHandler),this.listen("click",this.comboboxFocusHandler)}static{this.properties={activeChipIndex:[16,{},{state:!0}],activeDescendant:[16,{},{state:!0}],activeItemIndex:[16,{},{state:!0}],compactSelectionDisplay:[16,{},{state:!0}],selectedHiddenChipsCount:[16,{},{state:!0}],selectedVisibleChipsCount:[16,{},{state:!0}],items:[16,{},{state:!0}],noMatchesFound:[16,{},{state:!0}],allowCustomValues:[7,{},{reflect:!0,type:Boolean}],clearDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],filterText:[3,{},{reflect:!0}],filterProps:[0,{},{attribute:!1}],filteredItems:[32,{},{attribute:!1,readOnly:!0}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],label:1,labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placeholder:1,placeholderIcon:[3,{type:String},{reflect:!0}],placeholderIconFlipRtl:[7,{},{reflect:!0,type:Boolean}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectAllEnabled:[7,{},{reflect:!0,type:Boolean}],selectedItems:[0,{},{attribute:!1}],selectionDisplay:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:G,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1}}static{this.styles=ke}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(e=>e!=="el"):["description","label","metadata","shortHeading","textLabel"]}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:i,open:s}=this,l=i[0],a=l?.icon,o=y(t);return!s&&l?!!a&&o:!!e&&(!l||o)}get allSelected(){return this.selectedItems.length===this.items.length}get indeterminate(){return this.selectedItems.length>0&&!this.allSelected}get keyboardNavItems(){let{selectAllComboboxItemRef:e}=this,t=this.filteredItems.filter(i=>!i.disabled);return e.value?[e.value,...t]:t}get filterText(){return this._filterText}set filterText(e){let t=this._filterText;e!==t&&(this._filterText=e,this.filterTextChange(e))}get filteredItems(){return this.items.filter(e=>!T(e))}get selectedItems(){return this._selectedItems}set selectedItems(e){let t=this._selectedItems;e!==t&&(this._selectedItems=e,this.selectedItemsHandler())}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueHandler(e))}async reposition(e=!1){let{floatingEl:t,referenceEl:i,placement:s,overlayPositioning:l,filteredFlipPlacements:a}=this;return he(this,{floatingEl:t,referenceEl:i,overlayPositioning:l,placement:s,flipPlacements:a,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>(this.activeChipIndex=-1,this.activeItemIndex=-1,this.textInputRef.value),e)}connectedCallback(){super.connectedCallback(),ue(this),te(this),this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),$(this),this.cancelable.add(this.filterItems)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("maxItems")&&(this.hasUpdated||this.maxItems!==0)&&this.setMaxScrollerHeight(),e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")&&this.reposition(!0),(e.has("selectionMode")||e.has("scale"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler()}updated(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),Y(this),this.refreshSelectionDisplay()}async load(){this.handleSelectionModeWarning()}loaded(){se(this,this.getValue()),$(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),me(this),ie(this),pe(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open?this.floatingEl.showPopover():this.floatingEl.hidePopover())}emitComboboxChange(){this.calciteComboboxChange.emit()}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){oe(this),!this.disabled&&(this.setMaxScrollerHeight(),this.handlePopover())}handleDisabledChange(e){e||(this.open=!1)}valueHandler(e){this.internalValueChangeFlag||(this.getItems().forEach(t=>{t.selected=Array.isArray(e)?e.includes(t.value):e===t.value}),this.updateItems())}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1}async documentClickHandler(e){this.disabled||e.composedPath().includes(this.el)||(await this.componentOnReady(),!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1)),this.allowCustomValues&&this.filterText.trim().length&&this.addCustomChip(this.filterText),this.open=!1)}handleSelectAll(e){e&&this.toggleSelectAll(),this.allSelected&&this.selectedItems.forEach(t=>{let i=this.referenceEl.querySelector(`#${p.chip(t.guid)}`);i&&this.hideChip(i)})}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,i=e.composedPath().includes(this.selectAllComboboxItemRef.value);this.selectAllEnabled&&this.handleSelectAll(i);let s=this.keyboardNavItems.indexOf(i?this.selectAllComboboxItemRef.value:t);this.updateActiveItemIndex(s),this.toggleSelection(t,t.selected),this.selectedItems=this.getSelectedItems()}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.hasUpdated&&this.updateItems()}clearValue(){this.ignoreSelectedEventsFlag=!0,this.items.forEach(e=>e.selected=!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=[],this.emitComboboxChange(),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}clearInputValue(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?re(t,e):null}getValue(){let e=this.selectedItems.map(t=>t.value?.toString());return e.length?e.length>1?e:e[0]:""}comboboxInViewport(){let e=this.el.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.right<=(window.innerWidth||document.documentElement.clientWidth)&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)}toggleSelectAll(){let e=!this.allSelected;this.items.forEach(t=>t.selected=e),this.selectedItems=e?this.items:[],this.emitComboboxChange()}keyDownHandler(e){if(this.readOnly)return;let{key:t}=e;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):this.open?(this.open=!1,e.preventDefault()):!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1));break;case"ArrowLeft":(this.activeChipIndex!==-1||this.textInputRef.value.selectionStart===0)&&(this.previousChip(),e.preventDefault());break;case"ArrowRight":this.activeChipIndex!==-1&&(this.nextChip(),e.preventDefault());break;case"ArrowUp":this.keyboardNavItems.length&&(e.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView()),this.scrollToActiveOrSelectedItem();break;case"ArrowDown":this.keyboardNavItems.length&&(e.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":!this.textInputRef.value.value&&!e.defaultPrevented&&(this.open||(this.open=!0,this.shiftActiveItemIndex(1)),e.preventDefault());break;case"Home":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":!this.clearDisabled&&!this.open&&this.clearValue(),this.open=!1,e.preventDefault();break;case"Enter":this.open&&this.activeItemIndex>-1?(this.keyboardNavItems[this.activeItemIndex].toggleSelection(),e.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(),e.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):e.defaultPrevented||ee(this)&&e.preventDefault();break;case"Delete":case"Backspace":{if(this.selectionDisplay==="single"||this.selectionDisplay==="fit"&&this.selectedHiddenChipsCount>0)return;this.activeChipIndex>-1?(e.preventDefault(),this.removeActiveChip()):!this.filterText&&this.isMulti()&&(e.preventDefault(),this.removeLastChip());break}}}onBeforeOpen(){this.scrollToActiveOrSelectedItem(),this.calciteComboboxBeforeOpen.emit()}onOpen(){this.scrollToActiveOrSelectedItem(!0),this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),de(this)}async setMaxScrollerHeight(){let{listContainerEl:e,open:t,referenceEl:i}=this;if(!e||!t)return;await this.reposition(!0);let s=this.getMaxScrollerHeight();e.style.maxBlockSize=s>0?`${s}px`:"",e.style.inlineSize=`${i.clientWidth}px`,await this.reposition(!0)}calciteChipCloseHandler(e){this.open=!1;let t=this.items.find(i=>i===e);t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()}clickHandler(e){if(this.readOnly)return;let t=e.composedPath();if(t.some(i=>i.tagName==="CALCITE-CHIP")){this.open=!1,e.preventDefault();return}if(t.some(i=>i.classList?.contains(Ce.button))){this.clearValue(),e.preventDefault();return}this.open=!this.open,this.ensureRecentSelectedItemIsActive()}ensureRecentSelectedItemIsActive(){let{selectedItems:e}=this,t=e.length===0?0:this.items.indexOf(e[e.length-1]);this.updateActiveItemIndex(t)}hideChip(e){e.classList.add(n.chipInvisible)}showChip(e){e.classList.remove(n.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:i}){e.forEach(s=>{if(!s.selected)this.hideChip(s);else{let l=S(s);if(l&&l<t){t-=l+i,this.showChip(s);return}}this.hideChip(s)})}async refreshSelectionDisplay(){if(this.componentOnReady(),y(this.selectionMode)||!this.textInputRef.value||!this.chipContainerEl)return;let{allSelectedIndicatorChipRef:e,chipContainerEl:t,selectionDisplay:i,placeholder:s,selectedIndicatorChipRef:l,textInputRef:a}=this,o=parseInt(getComputedStyle(t).gap.replace("px","")),c=S(t),{fontSize:h,fontFamily:m}=getComputedStyle(a.value),b=(X(s,`${h} ${m}`)||parseInt(xe))+o,A=S(e.value),L=S(l.value),$e=Math.max(A,L);if(this.setCompactSelectionDisplay({chipContainerElGap:o,chipContainerElWidth:c,inputWidth:b,largestSelectedIndicatorChipWidth:$e}),this.allSelected&&this.selectAllEnabled&&this.selectedItems.forEach(I=>{let x=this.referenceEl.querySelector(`#${p.chip(I.guid)}`);x&&this.hideChip(x)}),this.indeterminate&&this.selectedItems.forEach(I=>{let x=this.referenceEl.querySelector(`#${p.chip(I.guid)}`);x&&this.showChip(x)}),i==="fit"){let I=Array.from(this.el.shadowRoot.querySelectorAll("calcite-chip")).filter(we=>we.closable),x=Math.round(c-((this.selectedHiddenChipsCount>0?L:0)+o+b+o));this.refreshChipDisplay({availableHorizontalChipElSpace:x,chipContainerElGap:o,chipEls:I}),this.setVisibleAndHiddenChips(I)}}setFloatingEl(e){this.floatingEl=e,$(this),this.handlePopover()}setCompactSelectionDisplay({chipContainerElGap:e,chipContainerElWidth:t,inputWidth:i,largestSelectedIndicatorChipWidth:s}){let l=Math.round(s+e+i);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<l)&&(this.maxCompactBreakpoint=l),this.compactSelectionDisplay=t<this.maxCompactBreakpoint}setContainerEl(e){D(this.resizeObserver,this.listContainerEl,e),this.listContainerEl=e,this.transitionEl=e}setChipContainerEl(e){D(this.resizeObserver,this.chipContainerEl,e),this.chipContainerEl=e}setReferenceEl(e){this.referenceEl=e,$(this)}setVisibleAndHiddenChips(e){let t=0;e.forEach(s=>{s.selected&&!s.classList.contains(n.chipInvisible)&&t++}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let i=this.getSelectedItems().length-t;i!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=i)}getMaxScrollerHeight(){let t=[...this.groupItems,...this.getItems(!0)].filter(a=>!T(a)),{maxItems:i}=this,s=0,l=0;return t.length>=i&&t.forEach(a=>{if(s<i){let o=this.calculateScrollerHeight(a);l+=o,s+=1}}),l}calculateScrollerHeight(e){if(!e)return 0;let t=e.getBoundingClientRect().height,i=`:scope > ${F}, :scope > ${O}`,s=Array.from(e.querySelectorAll(i)).reduce((l,a)=>l+a.getBoundingClientRect().height,0);return t-s}inputHandler(e){let t=e.target.value;this.filterText=t}getItemsAndGroups(){return[...this.groupItems,...this.items]}toggleSelection(e,t){!e||this.selectionMode==="single-persist"&&e.selected&&e.value===this.value&&!t||(this.isMulti()?this.handleMultiSelection(e,t):this.handleSingleSelection(e,t))}handleMultiSelection(e,t){e.selected=t,this.updateAncestors(e),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")}handleSingleSelection(e,t){this.ignoreSelectedEventsFlag=!0,this.items.forEach(i=>i.selected=i===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInputRef.value&&(this.textInputRef.value.value=w(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=V(e),i=Se(e);e.selected?t.forEach(s=>{s.selected=!0}):(i.forEach(s=>s.selected=!1),[...t].forEach(s=>{P(s)||(s.selected=!1)}))}updateItems(){this.items=this.getItems(),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.groupData=this.getGroupData(),this.updateItemProps(),this.selectedItems=this.getSelectedItems()}updateItemProps(){this.getItems(!0).forEach(e=>{e.selectionMode=this.selectionMode,e.scale=this.scale}),this.groupItems.forEach((e,t)=>(e.scale=this.scale,e.position=t)),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach((e,t,i)=>{t===0&&(e.afterEmptyGroup=!1);let s=i[t+1];s&&(s.afterEmptyGroup=e.children.length===0)})}getData(){return this.items.map(e=>({description:e.description,filterDisabled:e.filterDisabled,label:e.heading,metadata:e.metadata,shortHeading:e.shortHeading,textLabel:e.textLabel,el:e}))}getGroupData(){return this.groupItems.map(e=>({label:e.label,el:e}))}resetText(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}getItems(e=!1){return Array.from(this.el.querySelectorAll(F)).filter(i=>e||!i.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(O))}addCustomChip(e,t){let i=this.items.find(s=>(s.heading||s.textLabel)===e);if(i)this.toggleSelection(i,!0);else{let s=document.createElement("calcite-combobox-item");s.value=e,s.heading=e,this.el.prepend(s),this.updateItems(),this.toggleSelection(s,!0),this.open=!0,t&&this.setFocus()}}removeActiveChip(){this.toggleSelection(this.selectedItems[this.activeChipIndex],!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex+1;t>e?(this.activeChipIndex=-1,J(this.textInputRef.value)):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl.querySelector(`#${p.chip(e)}`):null)?.setFocus()}scrollToActiveOrSelectedItem(e=!1){let t=e&&this.selectedItems?.length?this.selectedItems[0]:this.keyboardNavItems[this.activeItemIndex],i=this.listContainerEl;if(!t||!i)return;t.scrollIntoView({block:"nearest"});let l=this.selectAllComboboxItemRef.value?.offsetHeight||0,a=t.getBoundingClientRect(),o=i.getBoundingClientRect();a.top<o.top+l&&(i.scrollTop-=o.top+l-a.top)}shiftActiveItemIndex(e){let{length:t}=this.keyboardNavItems,i=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(i),this.scrollToActiveOrSelectedItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t=null;this.keyboardNavItems.forEach((i,s)=>{s===e?(i.active=!0,t=`${p.item(i.guid)}`):i.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return!y(this.selectionMode)}comboboxFocusHandler(){this.disabled||this.textInputRef.value.focus()}createScreenReaderItem({ariaLabel:e,ariaSelected:t,id:i,textContent:s}){return d`<li aria-label=${e??u} aria-selected=${t??u} id=${i??u} role=option tabindex=-1>${s}</li>`}handleSelectionModeWarning(){this.selectionMode==="single-persist"&&this.clearDisabled&&console.warn('clearDisabled is ignored when selection-mode is set to "single-persist"')}getDescriptionMessage(){let e=Array.isArray(this.value)?this.value.join(", "):this.value;return this.readOnly?this.messages.nonEditable?.replace("{value}",`${e}`):e}renderChips(){let{activeChipIndex:e,readOnly:t,scale:i,selectionMode:s,messages:l}=this;return this.selectAllEnabled&&this.allSelected?null:this.selectedItems.map((a,o)=>{let c={[n.chip]:!0},h=[...V(a)].reverse(),m=w(a),k=[...h,a].map(A=>w(A)),b=s!=="ancestors"?m:k.join(" / ");return v(m,d`<calcite-chip .appearance=${t?"outline":"solid"} class=${r(c)} .closable=${!t} data-test-id=${`chip-${o}`} .icon=${a.icon} .iconFlipRtl=${a.iconFlipRtl} id=${(a.guid?`${p.chip(a.guid)}`:null)??u} .label=${b} .messageOverrides=${{dismissLabel:l.removeTag}} @focusin=${()=>this.activeChipIndex=o} @calciteChipClose=${()=>this.calciteChipCloseHandler(a)} .scale=${i} .selected=${a.selected} .tabIndex=${e===o?0:-1} title=${b??u} .value=${a.value}>${b}</calcite-chip>`)})}renderAllSelectedIndicatorChip(){let{allSelectedIndicatorChipRef:e,compactSelectionDisplay:t,scale:i,selectedVisibleChipsCount:s}=this,l=t?this.messages.all:this.messages.allSelected;return d`<calcite-chip class=${r({[n.chip]:!0,[n.chipInvisible]:!(this.allSelected&&!s),[n.allSelected]:!0})} data-test-id=all-selected-indicator-chip .label=${l} .scale=${i} title=${l??u} value ${f(e)}>${l}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,getSelectedItems:i,scale:s,selectedHiddenChipsCount:l,selectedVisibleChipsCount:a,selectedIndicatorChipRef:o}=this,c,h;if(e)c=!0;else if(t==="single"){let m=i().length;this.allSelected?c=!0:m>0?c=!1:c=!0,h=`${m} ${this.messages.selected}`}else t==="fit"&&(c=!!(this.allSelected&&a===0||l===0),h=a>0?`+${l}`:`${l} ${this.messages.selected}`);return d`<calcite-chip class=${r({[n.chip]:!0,[n.chipInvisible]:c})} .label=${h} .scale=${s} title=${h??u} value ${f(o)}>${h}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,getSelectedItems:i,scale:s,selectedHiddenChipsCount:l}=this,a,o;if(e){let c=i().length;this.allSelected?a=!0:t==="fit"?(a=!(l>0),o=`${l||0}`):t==="single"&&(a=!(c>0),o=`${c}`)}else a=!0;return d`<calcite-chip class=${r({[n.chip]:!0,[n.chipInvisible]:a})} .label=${o} .scale=${s} title=${o??u} value>${o}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:i,selectionMode:s,selectedItems:l,open:a}=this,o=y(s),c=l[0],h=!a&&o&&!!c&&!this.filterText;return d`<span class=${r({[n.inputWrap]:!0,[n.inputWrapSingle]:o})}>${h&&v("label",d`<span class=${r({[n.label]:!0,[n.labelIcon]:!!c?.icon})}>${w(c)}</span>`)||""}${v("input",d`<input aria-activedescendant=${this.activeDescendant??u} aria-controls=${`${p.listbox(e)}`} aria-errormessage=${p.validationMessage} aria-owns=${`${p.listbox(e)}`} aria-autocomplete=list .ariaDescription=${this.getDescriptionMessage()} .ariaExpanded=${a} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${fe(this)} class=${r({[n.input]:!0,[n.inputSingle]:!0,[n.inputHidden]:h,[n.inputIcon]:this.showingInlineIcon&&!!this.placeholderIcon})} data-test-id=input .disabled=${t} .id=${`${p.input(e)}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${i??u} .readOnly=${this.readOnly} .required=${this.required} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${W(this.filterText??"")} ${f(this.textInputRef)}>`)}</span>`}renderListBoxOptions(){let e=this.keyboardNavItems.map(t=>this.createScreenReaderItem({ariaLabel:t.label,ariaSelected:t.selected,id:`${p.item(t.guid)}`,textContent:t.heading||t.textLabel}));if(this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"){let t=this.createScreenReaderItem({ariaLabel:this.messages.selectAll,ariaSelected:this.allSelected,textContent:this.messages.selectAll});t&&e.unshift(t)}return e}renderFloatingUIContainer(){let{messages:e,setFloatingEl:t,setContainerEl:i,open:s,scale:l}=this,a={[n.listContainer]:!0,[R.animation]:!0,[R.animationActive]:s},o=(this.filterText&&e.add?.replace("{text}",`${this.filterText}`))??"";return d`<div aria-hidden=true class=${r(n.floatingUIContainer)} popover=manual ${f(t)}><div class=${r(a)} ${f(i)}><ul class=${r({[n.list]:!0,[n.listHide]:!s})}>${this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"&&d`<calcite-combobox-item class=${r(n.selectAll)} .id=${`${this.guid}-select-all-enabled-interactive`} .indeterminate=${this.indeterminate} .label=${e.selectAll} .scale=${l} .selected=${this.allSelected} tabindex=-1 text-label=${e.selectAll??u} value=select-all ${f(this.selectAllComboboxItemRef)}></calcite-combobox-item>`||""}<slot></slot>${this.noMatchesFound&&(this.allowCustomValues?d`<li aria-label=${o??u} class=${r(n.noMatches)} @click=${this.customChipAddHandler} role=option tabindex=0>${ve({text:o,pattern:new RegExp(`(${M(this.filterText)})`,"i")})}</li>`:d`<li class=${r({[n.noMatchesPlaceholder]:!0,[n.noMatches]:!0})}>${e.noMatches}</li>`)||""}</ul></div></div>`}renderSelectedOrPlaceholderIcon(){let{open:e,placeholderIcon:t,placeholderIconFlipRtl:i,selectedItems:s}=this,l=s[0],a=l?.icon,o=t&&(e||!l);return this.showingInlineIcon&&v("selected-placeholder-icon",d`<span class=${r(n.iconStart)}><calcite-icon class=${r({[n.selectedIcon]:!o,[n.placeholderIcon]:o})} .flipRtl=${o?i:l.iconFlipRtl} .icon=${o?t:a} .scale=${H(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return v("chevron",d`<span class=${r(n.iconEnd)}><calcite-icon class=${r(n.icon)} .icon=${e?z.chevronUp:z.chevronDown} .scale=${H(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:i,open:s,readOnly:l}=this,a=y(this.selectionMode),o=e==="all",c=e==="single",h=!a&&e==="fit",m=!this.clearDisabled&&this.selectionMode!=="single-persist"&&!!this.value?.length;return Z({disabled:this.disabled,children:d`${this.labelText&&be({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-live=polite class=${r({[n.wrapper]:!0,[n.wrapperSingle]:a||!this.selectedItems.length,[n.wrapperActive]:s})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${f(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${v("grid",d`<div class=${r({[n.gridInput]:!0,[n.selectionDisplayFit]:h,[n.selectionDisplaySingle]:c})} ${f(this.setChipContainerEl)}>${!a&&!c&&this.renderChips()||""}${!a&&!c&&this.selectAllEnabled&&this.renderAllSelectedIndicatorChip()||""}${!a&&!o&&[this.renderSelectedIndicatorChip(),this.renderSelectedIndicatorChipCompact(),this.renderAllSelectedIndicatorChip()]||""}<label class=${r(n.screenReadersOnly)} .htmlFor=${`${p.input(t)}`} .id=${`${p.label(t)}`}>${i}</label>${this.renderInput()}</div>`)}${!l&&m?v("close-button",ye({disabled:this.disabled,label:this.messages.clear,ref:this.closeButtonRef,scale:this.scale})):null}${!l&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${p.label(t)}`} aria-multiselectable=true class=${r(n.screenReadersOnly)} .id=${`${p.listbox(t)}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${le({component:this})}${this.validationMessage&&this.status==="invalid"?ge({icon:this.validationIcon,id:p.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};_("calcite-combobox",B);export{B as Combobox};
3
+ v5.0.0-next.6 */
4
+ import{d as xe}from"./JJP2FEER.js";import{a as Ce,b as ye}from"./FQKP2XIR.js";import{a as Ie}from"./DUM3R2CL.js";import{b as V,c as Se,d as P,f as y,g as w}from"./EHZXDIG5.js";import{a as F,b as O,d as n,e as p,f as z}from"./A7OBU3ZB.js";import{a as ge}from"./JVYKUU2B.js";import{b as M}from"./ABFHGJOG.js";import{a as be}from"./6YVXONLB.js";import{c as ue,d as me,e as fe}from"./O72KETNZ.js";import{b as ve}from"./6EEMG3AJ.js";import{a as ce,c as R,d as re,e as he,f as de,g as $,h as pe}from"./IJDY7EKO.js";import{a as oe}from"./LFYXGVGK.js";import{a as ee,c as te,e as ie,f as se,h as le}from"./OBY2JHHI.js";import{a as Y,b as Z}from"./UQ4HIO7J.js";import{a as v}from"./7XEO6UJ3.js";import{a as ne}from"./ZAD5LV3P.js";import{a as ae}from"./MPYXWS5E.js";import{a as E,b as D}from"./CZF6KYOX.js";import{a as Q}from"./CFWXX2ZT.js";import{a as K}from"./SXK4ATVN.js";import"./6PMY6MUE.js";import{a as H,c as T}from"./PCGNN5RO.js";import"./H3GTITDX.js";import{f as S,i as X,l as J}from"./7DQ4G2FS.js";import{a as j}from"./44XNJNTA.js";import{A as W,B as C,C as f,D as U,E as r,I as G,K as N,P as _,g as q,h as d,l as u,o as g}from"./2IIGKMQ6.js";var ke=q`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}:host([scale=s]){font-size:var(--calcite-font-size--2);--calcite-internal-combobox-spacing-unit-l: .5rem;--calcite-internal-combobox-spacing-unit-s: .25rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) ;--calcite-internal-close-size: 1rem}:host([scale=s]) .x-button{margin-inline:.5rem}:host([scale=m]){font-size:var(--calcite-font-size--1);--calcite-internal-combobox-spacing-unit-l: .75rem;--calcite-internal-combobox-spacing-unit-s: .5rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .375rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) ;--calcite-internal-close-size: 1.5rem}:host([scale=m]) .x-button{margin-inline-end:.75rem}:host([scale=l]){font-size:var(--calcite-font-size-0);--calcite-internal-combobox-spacing-unit-l: 1rem;--calcite-internal-combobox-spacing-unit-s: .75rem;--calcite-internal-combobox-no-matches-spacing-unit-s: .625rem;--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(.625rem - 1px) ;--calcite-internal-close-size: 2rem}:host([scale=l]) .x-button{margin-inline-end:1rem}.x-button{align-self:center}.wrapper{display:flex;border-width:1px;border-style:solid;outline-color:transparent;padding-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);background-color:var(--calcite-combobox-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));border-color:var(--calcite-combobox-input-border-color, var(--calcite-color-border-input))}.wrapper:hover .icon{color:var(--calcite-combobox-icon-color-hover, var(--calcite-color-text-1))}:host(:focus-within) .wrapper,.wrapper--active{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;gap:var(--calcite-internal-combobox-spacing-unit-s);margin-inline-end:var(--calcite-internal-combobox-spacing-unit-s)}.grid-input.selection-display--fit,.grid-input.selection-display--single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-internal-combobox-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;width:0px;min-width:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.placeholder-icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-width:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}@media(forced-colors:active){.wrapper,.floating-ui-container{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.list-container{max-height:45vh;overflow-y:auto;inline-size:var(--calcite-dropdown-width, 100%);background-color:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1))}.list{margin:0;display:block;padding:0}.list--hide{height:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);max-inline-size:100%}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.select-all{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-1));border-block-end-color:var(--calcite-combobox-divider-color, var(--calcite-combobox-item-border-color, var(--calcite-color-border-3)));border-block-end-style:solid;border-block-end-width:var(--calcite-border-width-sm);inset-block-start:0;position:sticky;z-index:var(--calcite-z-index-sticky)}.no-matches{padding-block:var(--calcite-internal-combobox-no-matches-spacing-unit-s);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));background:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1));cursor:pointer}.no-matches-placeholder{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3));cursor:default}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.x-button{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;border-style:none;cursor:pointer;outline-color:transparent;align-items:center;margin:0;background-color:var(--calcite-close-background-color, var(--calcite-color-foreground-2));-webkit-appearance:none;display:flex;align-content:center;justify-content:center;color:var(--calcite-close-icon-color, var(--calcite-color-text-3));block-size:var(--calcite-internal-close-size, 1.5rem);inline-size:var(--calcite-internal-close-size, 1.5rem);min-block-size:var(--calcite-internal-close-size, 1.5rem);min-inline-size:var(--calcite-internal-close-size, 1.5rem);padding:0}.x-button:hover,.x-button:focus{background-color:var(--calcite-close-background-color-hover, var(--calcite-color-foreground-3))}.x-button:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.x-button:active{background-color:var(--calcite-close-background-color-press, var(--calcite-color-transparent-press))}.x-button calcite-icon{color:inherit}.x-button--round{border-radius:9999px}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}::slotted(input[slot=hidden-form-input]){margin:0!important;opacity:0!important;outline:none!important;padding:0!important;position:absolute!important;inset:0!important;transform:none!important;-webkit-appearance:none!important;z-index:-1!important}:host([hidden]){display:none}[hidden]{display:none}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,B=class extends U{constructor(){super(),this.closeButtonRef=C(),this.selectAllComboboxItemRef=C(),this.allSelectedIndicatorChipRef=C(),this.cancelable=ne()(this),this.filterItems=(()=>{let e=(t,i)=>t&&i.some(({el:s})=>t===s);return ae((t,i=!1,s=!0)=>{let l=Ie([...this.data,...this.groupData],t,this.effectiveFilterProps),a=this.getItemsAndGroups(),o=t==="";a.forEach(c=>{if(o){c.itemHidden=!1;return}let h=!e(c,l);c.itemHidden=h;let[m,k]=c.ancestors;(e(m,l)||e(k,l))&&(c.itemHidden=!1),h||c.ancestors.forEach(b=>b.itemHidden=!1)}),this.noMatchesFound=this.filteredItems.length===0&&!!this.filterText,this.filterTextMatchPattern=this.filterText&&new RegExp(`(${M(this.filterText)})`,"i"),this.keyboardNavItems.forEach(c=>{c.filterTextMatchPattern=this.filterTextMatchPattern}),i&&(this.open=this.filterText.trim().length>0),s&&this.calciteComboboxFilterChange.emit()},N.filter)})(),this._filterText="",this.getSelectedItems=()=>{if(!this.isMulti()){let e=this.items.find(({selected:t})=>t);return e?[e]:[]}return this.items.filter(e=>e.selected&&(this.selectionMode!=="ancestors"||!P(e))).sort((e,t)=>{let i=this.selectedItems.indexOf(e),s=this.selectedItems.indexOf(t);return i>-1&&s>-1?i-s:s-i})},this.groupItems=[],this.guid=j(),this.ignoreSelectedEventsFlag=!1,this.inputHeight=0,this.internalValueChangeFlag=!1,this.mutationObserver=E("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.transitionProp="opacity",this.placement=ce,this.resizeObserver=E("resize",()=>{this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}),this.selectedIndicatorChipRef=C(),this._selectedItems=[],this.textInputRef=C(),this._value=null,this.messages=Q(),this.focusSetter=K()(this),this.customChipAddHandler=()=>{this.addCustomChip(this.filterText,!0)},this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.items=[],this.clearDisabled=!1,this.disabled=!1,this.maxItems=0,this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.readOnly=!1,this.required=!1,this.scale="m",this.selectAllEnabled=!1,this.selectionDisplay="all",this.selectionMode="multiple",this.status="idle",this.validity={valid:!1,badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valueMissing:!1},this.calciteComboboxBeforeClose=g({cancelable:!1}),this.calciteComboboxBeforeOpen=g({cancelable:!1}),this.calciteComboboxChange=g({cancelable:!1}),this.calciteComboboxChipClose=g({cancelable:!1}),this.calciteComboboxClose=g({cancelable:!1}),this.calciteComboboxFilterChange=g({cancelable:!1}),this.calciteComboboxOpen=g({cancelable:!1}),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteComboboxItemChange",this.calciteComboboxItemChangeHandler),this.listen("calciteInternalComboboxItemChange",this.calciteInternalComboboxItemChangeHandler),this.listen("click",this.comboboxFocusHandler)}static{this.properties={activeChipIndex:[16,{},{state:!0}],activeDescendant:[16,{},{state:!0}],activeItemIndex:[16,{},{state:!0}],compactSelectionDisplay:[16,{},{state:!0}],selectedHiddenChipsCount:[16,{},{state:!0}],selectedVisibleChipsCount:[16,{},{state:!0}],items:[16,{},{state:!0}],noMatchesFound:[16,{},{state:!0}],allowCustomValues:[7,{},{reflect:!0,type:Boolean}],clearDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],filterText:[3,{},{reflect:!0}],filterProps:[0,{},{attribute:!1}],filteredItems:[32,{},{attribute:!1,readOnly:!0}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],label:1,labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placeholder:1,placeholderIcon:[3,{type:String},{reflect:!0}],placeholderIconFlipRtl:[7,{},{reflect:!0,type:Boolean}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectAllEnabled:[7,{},{reflect:!0,type:Boolean}],selectedItems:[0,{},{attribute:!1}],selectionDisplay:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],validationIcon:[3,{converter:G,type:String},{reflect:!0}],validationMessage:1,validity:[0,{},{attribute:!1}],value:1}}static{this.styles=ke}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(e=>e!=="el"):["description","label","metadata","shortHeading","textLabel"]}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:i,open:s}=this,l=i[0],a=l?.icon,o=y(t);return!s&&l?!!a&&o:!!e&&(!l||o)}get allSelected(){return this.selectedItems.length===this.items.length}get indeterminate(){return this.selectedItems.length>0&&!this.allSelected}get keyboardNavItems(){let{selectAllComboboxItemRef:e}=this,t=this.filteredItems.filter(i=>!i.disabled);return e.value?[e.value,...t]:t}get filterText(){return this._filterText}set filterText(e){let t=this._filterText;e!==t&&(this._filterText=e,this.filterTextChange(e))}get filteredItems(){return this.items.filter(e=>!T(e))}get selectedItems(){return this._selectedItems}set selectedItems(e){let t=this._selectedItems;e!==t&&(this._selectedItems=e,this.selectedItemsHandler())}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueHandler(e))}async reposition(e=!1){let{floatingEl:t,referenceEl:i,placement:s,overlayPositioning:l,filteredFlipPlacements:a}=this;return he(this,{floatingEl:t,referenceEl:i,overlayPositioning:l,placement:s,flipPlacements:a,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>(this.activeChipIndex=-1,this.activeItemIndex=-1,this.textInputRef.value),e)}connectedCallback(){super.connectedCallback(),ue(this),te(this),this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),$(this),this.cancelable.add(this.filterItems)}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("maxItems")&&(this.hasUpdated||this.maxItems!==0)&&this.setMaxScrollerHeight(),e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")&&this.reposition(!0),(e.has("selectionMode")||e.has("scale"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler()}updated(){this.el.offsetHeight!==this.inputHeight&&(this.reposition(!0),this.inputHeight=this.el.offsetHeight),Y(this),this.refreshSelectionDisplay()}async load(){this.handleSelectionModeWarning()}loaded(){se(this,this.getValue()),$(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),me(this),ie(this),pe(this)}async handlePopover(){await this.componentOnReady(),this.floatingEl&&(this.open?this.floatingEl.showPopover():this.floatingEl.hidePopover())}emitComboboxChange(){this.calciteComboboxChange.emit()}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){oe(this),!this.disabled&&(this.setMaxScrollerHeight(),this.handlePopover())}handleDisabledChange(e){e||(this.open=!1)}valueHandler(e){this.internalValueChangeFlag||(this.getItems().forEach(t=>{t.selected=Array.isArray(e)?e.includes(t.value):e===t.value}),this.updateItems())}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1}async documentClickHandler(e){this.disabled||e.composedPath().includes(this.el)||(await this.componentOnReady(),!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1)),this.allowCustomValues&&this.filterText.trim().length&&this.addCustomChip(this.filterText),this.open=!1)}handleSelectAll(e){e&&this.toggleSelectAll(),this.allSelected&&this.selectedItems.forEach(t=>{let i=this.referenceEl.querySelector(`#${p.chip(t.guid)}`);i&&this.hideChip(i)})}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,i=e.composedPath().includes(this.selectAllComboboxItemRef.value);this.selectAllEnabled&&this.handleSelectAll(i);let s=this.keyboardNavItems.indexOf(i?this.selectAllComboboxItemRef.value:t);this.updateActiveItemIndex(s),this.toggleSelection(t,t.selected),this.selectedItems=this.getSelectedItems()}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.hasUpdated&&this.updateItems()}clearValue(){this.ignoreSelectedEventsFlag=!0,this.items.forEach(e=>e.selected=!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=[],this.emitComboboxChange(),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}clearInputValue(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?re(t,e):null}getValue(){let e=this.selectedItems.map(t=>t.value?.toString());return e.length?e.length>1?e:e[0]:""}comboboxInViewport(){let e=this.el.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.right<=(window.innerWidth||document.documentElement.clientWidth)&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)}toggleSelectAll(){let e=!this.allSelected;this.items.forEach(t=>t.selected=e),this.selectedItems=e?this.items:[],this.emitComboboxChange()}keyDownHandler(e){if(this.readOnly)return;let{key:t}=e;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):this.open?(this.open=!1,e.preventDefault()):!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1));break;case"ArrowLeft":(this.activeChipIndex!==-1||this.textInputRef.value.selectionStart===0)&&(this.previousChip(),e.preventDefault());break;case"ArrowRight":this.activeChipIndex!==-1&&(this.nextChip(),e.preventDefault());break;case"ArrowUp":this.keyboardNavItems.length&&(e.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView()),this.scrollToActiveOrSelectedItem();break;case"ArrowDown":this.keyboardNavItems.length&&(e.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":!this.textInputRef.value.value&&!e.defaultPrevented&&(this.open||(this.open=!0,this.shiftActiveItemIndex(1)),e.preventDefault());break;case"Home":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":!this.clearDisabled&&!this.open&&this.clearValue(),this.open=!1,e.preventDefault();break;case"Enter":this.open&&this.activeItemIndex>-1?(this.keyboardNavItems[this.activeItemIndex].toggleSelection(),e.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(),e.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):e.defaultPrevented||ee(this)&&e.preventDefault();break;case"Delete":case"Backspace":{if(this.selectionDisplay==="single"||this.selectionDisplay==="fit"&&this.selectedHiddenChipsCount>0)return;this.activeChipIndex>-1?(e.preventDefault(),this.removeActiveChip()):!this.filterText&&this.isMulti()&&(e.preventDefault(),this.removeLastChip());break}}}onBeforeOpen(){this.scrollToActiveOrSelectedItem(),this.calciteComboboxBeforeOpen.emit()}onOpen(){this.scrollToActiveOrSelectedItem(!0),this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),de(this)}async setMaxScrollerHeight(){let{listContainerEl:e,open:t,referenceEl:i}=this;if(!e||!t)return;await this.reposition(!0);let s=this.getMaxScrollerHeight();e.style.maxBlockSize=s>0?`${s}px`:"",e.style.inlineSize=`${i.clientWidth}px`,await this.reposition(!0)}calciteChipCloseHandler(e){this.open=!1;let t=this.items.find(i=>i===e);t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()}clickHandler(e){if(this.readOnly)return;let t=e.composedPath();if(t.some(i=>i.tagName==="CALCITE-CHIP")){this.open=!1,e.preventDefault();return}if(t.some(i=>i.classList?.contains(Ce.button))){this.clearValue(),e.preventDefault();return}this.open=!this.open,this.ensureRecentSelectedItemIsActive()}ensureRecentSelectedItemIsActive(){let{selectedItems:e}=this,t=e.length===0?0:this.items.indexOf(e[e.length-1]);this.updateActiveItemIndex(t)}hideChip(e){e.classList.add(n.chipInvisible)}showChip(e){e.classList.remove(n.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:i}){e.forEach(s=>{if(!s.selected)this.hideChip(s);else{let l=S(s);if(l&&l<t){t-=l+i,this.showChip(s);return}}this.hideChip(s)})}async refreshSelectionDisplay(){if(this.componentOnReady(),y(this.selectionMode)||!this.textInputRef.value||!this.chipContainerEl)return;let{allSelectedIndicatorChipRef:e,chipContainerEl:t,selectionDisplay:i,placeholder:s,selectedIndicatorChipRef:l,textInputRef:a}=this,o=parseInt(getComputedStyle(t).gap.replace("px","")),c=S(t),{fontSize:h,fontFamily:m}=getComputedStyle(a.value),b=(X(s,`${h} ${m}`)||parseInt(xe))+o,A=S(e.value),L=S(l.value),$e=Math.max(A,L);if(this.setCompactSelectionDisplay({chipContainerElGap:o,chipContainerElWidth:c,inputWidth:b,largestSelectedIndicatorChipWidth:$e}),this.allSelected&&this.selectAllEnabled&&this.selectedItems.forEach(I=>{let x=this.referenceEl.querySelector(`#${p.chip(I.guid)}`);x&&this.hideChip(x)}),this.indeterminate&&this.selectedItems.forEach(I=>{let x=this.referenceEl.querySelector(`#${p.chip(I.guid)}`);x&&this.showChip(x)}),i==="fit"){let I=Array.from(this.el.shadowRoot.querySelectorAll("calcite-chip")).filter(we=>we.closable),x=Math.round(c-((this.selectedHiddenChipsCount>0?L:0)+o+b+o));this.refreshChipDisplay({availableHorizontalChipElSpace:x,chipContainerElGap:o,chipEls:I}),this.setVisibleAndHiddenChips(I)}}setFloatingEl(e){this.floatingEl=e,$(this),this.handlePopover()}setCompactSelectionDisplay({chipContainerElGap:e,chipContainerElWidth:t,inputWidth:i,largestSelectedIndicatorChipWidth:s}){let l=Math.round(s+e+i);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<l)&&(this.maxCompactBreakpoint=l),this.compactSelectionDisplay=t<this.maxCompactBreakpoint}setContainerEl(e){D(this.resizeObserver,this.listContainerEl,e),this.listContainerEl=e,this.transitionEl=e}setChipContainerEl(e){D(this.resizeObserver,this.chipContainerEl,e),this.chipContainerEl=e}setReferenceEl(e){this.referenceEl=e,$(this)}setVisibleAndHiddenChips(e){let t=0;e.forEach(s=>{s.selected&&!s.classList.contains(n.chipInvisible)&&t++}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let i=this.getSelectedItems().length-t;i!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=i)}getMaxScrollerHeight(){let t=[...this.groupItems,...this.getItems(!0)].filter(a=>!T(a)),{maxItems:i}=this,s=0,l=0;return t.length>=i&&t.forEach(a=>{if(s<i){let o=this.calculateScrollerHeight(a);l+=o,s+=1}}),l}calculateScrollerHeight(e){if(!e)return 0;let t=e.getBoundingClientRect().height,i=`:scope > ${F}, :scope > ${O}`,s=Array.from(e.querySelectorAll(i)).reduce((l,a)=>l+a.getBoundingClientRect().height,0);return t-s}inputHandler(e){let t=e.target.value;this.filterText=t}getItemsAndGroups(){return[...this.groupItems,...this.items]}toggleSelection(e,t){!e||this.selectionMode==="single-persist"&&e.selected&&e.value===this.value&&!t||(this.isMulti()?this.handleMultiSelection(e,t):this.handleSingleSelection(e,t))}handleMultiSelection(e,t){e.selected=t,this.updateAncestors(e),this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")}handleSingleSelection(e,t){this.ignoreSelectedEventsFlag=!0,this.items.forEach(i=>i.selected=i===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.selectedItems=this.getSelectedItems(),this.emitComboboxChange(),this.textInputRef.value&&(this.textInputRef.value.value=w(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=V(e),i=Se(e);e.selected?t.forEach(s=>{s.selected=!0}):(i.forEach(s=>s.selected=!1),[...t].forEach(s=>{P(s)||(s.selected=!1)}))}updateItems(){this.items=this.getItems(),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.groupData=this.getGroupData(),this.updateItemProps(),this.selectedItems=this.getSelectedItems()}updateItemProps(){this.getItems(!0).forEach(e=>{e.selectionMode=this.selectionMode,e.scale=this.scale}),this.groupItems.forEach((e,t)=>(e.scale=this.scale,e.position=t)),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach((e,t,i)=>{t===0&&(e.afterEmptyGroup=!1);let s=i[t+1];s&&(s.afterEmptyGroup=e.children.length===0)})}getData(){return this.items.map(e=>({description:e.description,filterDisabled:e.filterDisabled,label:e.heading,metadata:e.metadata,shortHeading:e.shortHeading,textLabel:e.textLabel,el:e}))}getGroupData(){return this.groupItems.map(e=>({label:e.label,el:e}))}resetText(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}getItems(e=!1){return Array.from(this.el.querySelectorAll(F)).filter(i=>e||!i.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(O))}addCustomChip(e,t){let i=this.items.find(s=>(s.heading||s.textLabel)===e);if(i)this.toggleSelection(i,!0);else{let s=document.createElement("calcite-combobox-item");s.value=e,s.heading=e,this.el.prepend(s),this.updateItems(),this.toggleSelection(s,!0),this.open=!0,t&&this.setFocus()}}removeActiveChip(){this.toggleSelection(this.selectedItems[this.activeChipIndex],!1),this.setFocus()}removeLastChip(){this.toggleSelection(this.selectedItems[this.selectedItems.length-1],!1),this.setFocus()}previousChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex+1;t>e?(this.activeChipIndex=-1,J(this.textInputRef.value)):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl.querySelector(`#${p.chip(e)}`):null)?.setFocus()}scrollToActiveOrSelectedItem(e=!1){let t=e&&this.selectedItems?.length?this.selectedItems[0]:this.keyboardNavItems[this.activeItemIndex],i=this.listContainerEl;if(!t||!i)return;t.scrollIntoView({block:"nearest"});let l=this.selectAllComboboxItemRef.value?.offsetHeight||0,a=t.getBoundingClientRect(),o=i.getBoundingClientRect();a.top<o.top+l&&(i.scrollTop-=o.top+l-a.top)}shiftActiveItemIndex(e){let{length:t}=this.keyboardNavItems,i=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(i),this.scrollToActiveOrSelectedItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t=null;this.keyboardNavItems.forEach((i,s)=>{s===e?(i.active=!0,t=`${p.item(i.guid)}`):i.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return!y(this.selectionMode)}comboboxFocusHandler(){this.disabled||this.textInputRef.value.focus()}createScreenReaderItem({ariaLabel:e,ariaSelected:t,id:i,textContent:s}){return d`<li aria-label=${e??u} aria-selected=${t??u} id=${i??u} role=option tabindex=-1>${s}</li>`}handleSelectionModeWarning(){this.selectionMode==="single-persist"&&this.clearDisabled&&console.warn('clearDisabled is ignored when selection-mode is set to "single-persist"')}getDescriptionMessage(){let e=Array.isArray(this.value)?this.value.join(", "):this.value;return this.readOnly?this.messages.nonEditable?.replace("{value}",`${e}`):e}renderChips(){let{activeChipIndex:e,readOnly:t,scale:i,selectionMode:s,messages:l}=this;return this.selectAllEnabled&&this.allSelected?null:this.selectedItems.map((a,o)=>{let c={[n.chip]:!0},h=[...V(a)].reverse(),m=w(a),k=[...h,a].map(A=>w(A)),b=s!=="ancestors"?m:k.join(" / ");return v(m,d`<calcite-chip .appearance=${t?"outline":"solid"} class=${r(c)} .closable=${!t} data-test-id=${`chip-${o}`} .icon=${a.icon} .iconFlipRtl=${a.iconFlipRtl} id=${(a.guid?`${p.chip(a.guid)}`:null)??u} .label=${b} .messageOverrides=${{dismissLabel:l.removeTag}} @focusin=${()=>this.activeChipIndex=o} @calciteChipClose=${()=>this.calciteChipCloseHandler(a)} .scale=${i} .selected=${a.selected} .tabIndex=${e===o?0:-1} title=${b??u} .value=${a.value}>${b}</calcite-chip>`)})}renderAllSelectedIndicatorChip(){let{allSelectedIndicatorChipRef:e,compactSelectionDisplay:t,scale:i,selectedVisibleChipsCount:s}=this,l=t?this.messages.all:this.messages.allSelected;return d`<calcite-chip class=${r({[n.chip]:!0,[n.chipInvisible]:!(this.allSelected&&!s),[n.allSelected]:!0})} data-test-id=all-selected-indicator-chip .label=${l} .scale=${i} title=${l??u} value ${f(e)}>${l}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,getSelectedItems:i,scale:s,selectedHiddenChipsCount:l,selectedVisibleChipsCount:a,selectedIndicatorChipRef:o}=this,c,h;if(e)c=!0;else if(t==="single"){let m=i().length;this.allSelected?c=!0:m>0?c=!1:c=!0,h=`${m} ${this.messages.selected}`}else t==="fit"&&(c=!!(this.allSelected&&a===0||l===0),h=a>0?`+${l}`:`${l} ${this.messages.selected}`);return d`<calcite-chip class=${r({[n.chip]:!0,[n.chipInvisible]:c})} .label=${h} .scale=${s} title=${h??u} value ${f(o)}>${h}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,getSelectedItems:i,scale:s,selectedHiddenChipsCount:l}=this,a,o;if(e){let c=i().length;this.allSelected?a=!0:t==="fit"?(a=!(l>0),o=`${l||0}`):t==="single"&&(a=!(c>0),o=`${c}`)}else a=!0;return d`<calcite-chip class=${r({[n.chip]:!0,[n.chipInvisible]:a})} .label=${o} .scale=${s} title=${o??u} value>${o}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:i,selectionMode:s,selectedItems:l,open:a}=this,o=y(s),c=l[0],h=!a&&o&&!!c&&!this.filterText;return d`<span class=${r({[n.inputWrap]:!0,[n.inputWrapSingle]:o})}>${h&&v("label",d`<span class=${r({[n.label]:!0,[n.labelIcon]:!!c?.icon})}>${w(c)}</span>`)||""}${v("input",d`<input aria-activedescendant=${this.activeDescendant??u} aria-controls=${`${p.listbox(e)}`} aria-errormessage=${p.validationMessage} aria-owns=${`${p.listbox(e)}`} aria-autocomplete=list .ariaDescription=${this.getDescriptionMessage()} .ariaExpanded=${a} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${fe(this)} class=${r({[n.input]:!0,[n.inputSingle]:!0,[n.inputHidden]:h,[n.inputIcon]:this.showingInlineIcon&&!!this.placeholderIcon})} data-test-id=input .disabled=${t} .id=${`${p.input(e)}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${i??u} .readOnly=${this.readOnly} .required=${this.required} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${W(this.filterText??"")} ${f(this.textInputRef)}>`)}</span>`}renderListBoxOptions(){let e=this.keyboardNavItems.map(t=>this.createScreenReaderItem({ariaLabel:t.label,ariaSelected:t.selected,id:`${p.item(t.guid)}`,textContent:t.heading||t.textLabel}));if(this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"){let t=this.createScreenReaderItem({ariaLabel:this.messages.selectAll,ariaSelected:this.allSelected,textContent:this.messages.selectAll});t&&e.unshift(t)}return e}renderFloatingUIContainer(){let{messages:e,setFloatingEl:t,setContainerEl:i,open:s,scale:l}=this,a={[n.listContainer]:!0,[R.animation]:!0,[R.animationActive]:s},o=(this.filterText&&e.add?.replace("{text}",`${this.filterText}`))??"";return d`<div aria-hidden=true class=${r(n.floatingUIContainer)} popover=manual ${f(t)}><div class=${r(a)} ${f(i)}><ul class=${r({[n.list]:!0,[n.listHide]:!s})}>${this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"&&d`<calcite-combobox-item class=${r(n.selectAll)} .id=${`${this.guid}-select-all-enabled-interactive`} .indeterminate=${this.indeterminate} .label=${e.selectAll} .scale=${l} .selected=${this.allSelected} tabindex=-1 text-label=${e.selectAll??u} value=select-all ${f(this.selectAllComboboxItemRef)}></calcite-combobox-item>`||""}<slot></slot>${this.noMatchesFound&&(this.allowCustomValues?d`<li aria-label=${o??u} class=${r(n.noMatches)} @click=${this.customChipAddHandler} role=option tabindex=0>${ve({text:o,pattern:new RegExp(`(${M(this.filterText)})`,"i")})}</li>`:d`<li class=${r({[n.noMatchesPlaceholder]:!0,[n.noMatches]:!0})}>${e.noMatches}</li>`)||""}</ul></div></div>`}renderSelectedOrPlaceholderIcon(){let{open:e,placeholderIcon:t,placeholderIconFlipRtl:i,selectedItems:s}=this,l=s[0],a=l?.icon,o=t&&(e||!l);return this.showingInlineIcon&&v("selected-placeholder-icon",d`<span class=${r(n.iconStart)}><calcite-icon class=${r({[n.selectedIcon]:!o,[n.placeholderIcon]:o})} .flipRtl=${o?i:l.iconFlipRtl} .icon=${o?t:a} .scale=${H(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return v("chevron",d`<span class=${r(n.iconEnd)}><calcite-icon class=${r(n.icon)} .icon=${e?z.chevronUp:z.chevronDown} .scale=${H(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:i,open:s,readOnly:l}=this,a=y(this.selectionMode),o=e==="all",c=e==="single",h=!a&&e==="fit",m=!this.clearDisabled&&this.selectionMode!=="single-persist"&&!!this.value?.length;return Z({disabled:this.disabled,children:d`${this.labelText&&be({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-live=polite class=${r({[n.wrapper]:!0,[n.wrapperSingle]:a||!this.selectedItems.length,[n.wrapperActive]:s})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${f(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${v("grid",d`<div class=${r({[n.gridInput]:!0,[n.selectionDisplayFit]:h,[n.selectionDisplaySingle]:c})} ${f(this.setChipContainerEl)}>${!a&&!c&&this.renderChips()||""}${!a&&!c&&this.selectAllEnabled&&this.renderAllSelectedIndicatorChip()||""}${!a&&!o&&[this.renderSelectedIndicatorChip(),this.renderSelectedIndicatorChipCompact(),this.renderAllSelectedIndicatorChip()]||""}<label class=${r(n.screenReadersOnly)} .htmlFor=${`${p.input(t)}`} .id=${`${p.label(t)}`}>${i}</label>${this.renderInput()}</div>`)}${!l&&m?v("close-button",ye({disabled:this.disabled,label:this.messages.clear,ref:this.closeButtonRef,scale:this.scale})):null}${!l&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${p.label(t)}`} aria-multiselectable=true class=${r(n.screenReadersOnly)} .id=${`${p.listbox(t)}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${le({component:this})}${this.validationMessage&&this.status==="invalid"?ge({icon:this.validationIcon,id:p.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};_("calcite-combobox",B);export{B as Combobox};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.4 */
4
- import{a as b}from"./PNBL2IVW.js";import"./D5SFHDV6.js";import{a as x}from"./XRJOD24G.js";import{D as u,E as l,F as z,H as k,P as y,g as h,h as r,i as p,l as f}from"./CSQVLDPF.js";var a={percentage:"percentage",progressRing:"ring--progress",ring:"ring",rings:"rings",text:"text",trackRing:"ring--track"},w=h`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{position:relative;margin-inline:auto;display:flex;align-items:center;justify-content:center;opacity:1;flex-direction:column;min-block-size:var(--calcite-loader-size);font-size:var(--calcite-loader-font-size);stroke-width:var(--calcite-internal-stroke-width);fill:none;transform:scale(1);padding-block:var(--calcite-loader-spacing, 4rem)}:host([scale=s]){--calcite-internal-stroke-width: 3;--calcite-internal-text-offset: var(--calcite-spacing-xxs);--calcite-internal-loader-font-size: var(--calcite-font-size--3);--calcite-internal-loader-size: 2rem;--calcite-internal-loader-size-inline: .75rem;--calcite-internal-loader-value-line-height: .625rem}:host([scale=m]){--calcite-internal-stroke-width: 6;--calcite-internal-text-offset: var(--calcite-spacing-sm);--calcite-internal-loader-font-size: var(--calcite-font-size-0);--calcite-internal-loader-size: 4rem;--calcite-internal-loader-size-inline: 1rem;--calcite-internal-loader-value-line-height: 1.375rem}:host([scale=l]){--calcite-internal-stroke-width: 8;--calcite-internal-text-offset: var(--calcite-spacing-md);--calcite-internal-loader-font-size: var(--calcite-font-size-2);--calcite-internal-loader-size: 6rem;--calcite-internal-loader-size-inline: 1.5rem;--calcite-internal-loader-value-line-height: 1.71875rem}.text{display:block;text-align:center;font-size:var(--calcite-font-size--2);line-height:1rem;margin-block-start:var(--calcite-loader-text-spacing, var(--calcite-internal-text-offset));font-weight:var(--calcite-loader-text-weight, var(--calcite-font-weight-normal));color:var(--calcite-loader-text-color, var(--calcite-color-text-1))}.percentage{display:block;text-align:center;font-size:var(--calcite-loader-font-size);inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));line-height:var(--calcite-internal-loader-value-line-height);align-self:center;color:var(--calcite-loader-text-color, var(--calcite-color-text-1))}.rings{position:relative;display:flex;overflow:visible;opacity:1;inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size))}.ring{position:absolute;inset-block-start:0px;transform-origin:center;overflow:visible;inset-inline-start:0;inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size))}.ring--track{stroke:var(--calcite-loader-track-color, var(--calcite-color-transparent-press))}.ring--progress{stroke:var(--calcite-loader-progress-color, var(--calcite-color-brand));transform:rotate(-90deg);transition:all var(--calcite-internal-animation-timing-fast) linear}:host([type=indeterminate]) .ring--progress{animation:loader-clockwise calc(var(--calcite-internal-animation-timing-slow) / var(--calcite-internal-duration-factor) * 2 / var(--calcite-internal-duration-factor)) linear infinite}:host([inline]){--calcite-internal-stroke-width: 2;position:relative;margin:0;stroke:currentColor;stroke-width:2;padding-block:0px;block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));min-block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));inline-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));vertical-align:calc(var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline))) * -1 * .2)}:host([inline]) .rings{inset-block-start:0px;margin:0;inset-inline-start:0;inline-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)))}:host([inline]) .ring{inline-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)))}:host([inline]) .ring--progress{stroke:var(--calcite-loader-progress-color-inline, currentColor)}:host([complete]){opacity:0;transform:scale(.75);transform-origin:center;transition:opacity var(--calcite-internal-animation-timing-medium) linear 1s,transform var(--calcite-internal-animation-timing-medium) linear 1s}:host([complete]) .rings{opacity:0;transform:scale(.75);transform-origin:center;transition:opacity calc(.18s * var(--calcite-internal-duration-factor)) linear .8s,transform calc(.18s * var(--calcite-internal-duration-factor)) linear .8s}:host([complete]) .percentage{color:var(--calcite-color-brand);transform:scale(1.05);transform-origin:center;transition:color var(--calcite-internal-animation-timing-medium) linear,transform var(--calcite-internal-animation-timing-medium) linear}@keyframes loader-clockwise{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends u{constructor(){super(...arguments),this.messages=b({name:null}),this.complete=!1,this.inline=!1,this.scale="m",this.text="",this.type="indeterminate",this.value=0}static{this.properties={complete:[7,{},{reflect:!0,type:Boolean}],inline:[7,{},{reflect:!0,type:Boolean}],label:1,scale:[3,{},{reflect:!0}],text:1,type:[3,{},{reflect:!0}],value:[9,{},{type:Number}]}}static{this.styles=w}connectedCallback(){super.connectedCallback(),this.updateFormatter()}load(){requestAnimationFrame(()=>this.valueChangeHandler())}willUpdate(e){e.has("value")&&(this.hasUpdated||this.value!==0)&&this.valueChangeHandler(),(e.has("type")&&(this.hasUpdated||this.type!=="indeterminate")||e.has("messages"))&&this.updateFormatter()}valueChangeHandler(){this.complete=this.type.startsWith("determinate")&&this.value===100}formatValue(){return this.type!=="determinate-value"?`${this.value}`:this.formatter.format(this.value/100)}getSize(e){return{s:32,m:64,l:96}[e]}getInlineSize(e){return{s:12,m:16,l:24}[e]}updateFormatter(){this.type!=="determinate-value"||this.formatter?.resolvedOptions().locale===this.messages._lang||(this.formatter=new Intl.NumberFormat(this.messages._lang,{style:"percent"}))}render(){let{el:e,inline:n,label:c,text:s,type:i,value:m}=this,o=e.id||x(),t=i!=="indeterminate",d=Math.floor(m);return this.el.ariaLabel=c,this.el.ariaValueMax=t?"100":void 0,this.el.ariaValueMin=t?"0":void 0,this.el.ariaValueNow=t?d.toString():void 0,k(this.el,"id",o),this.el.role="progressbar",r`<div class=${l(a.rings)}>${this.renderRing("track")}${this.renderRing("progress")}${!n&&t&&r`<div class=${l(a.percentage)}>${this.formatValue()}</div>`||""}</div>${!n&&s&&r`<div class=${l(a.text)}>${s}</div>`||""}`}renderRing(e){let{inline:n,scale:c,value:s}=this,i=n?this.getInlineSize(c):this.getSize(c),o=i*.45,t;if(e==="progress"){let d=2*o*Math.PI,g=(this.type.startsWith("determinate")?s:24)/100*d,$=d-g;t={"stroke-dasharray":`${g} ${$}`}}return r`<svg aria-hidden=true class=${l({[a.ring]:!0,[a.trackRing]:e==="track",[a.progressRing]:e==="progress"})} style=${z(t)} viewBox=${`0 0 ${i} ${i}`}>${p`<circle cx=${i/2} cy=${i/2} r=${o??f} />`}</svg>`}};y("calcite-loader",v);export{v as Loader};
3
+ v5.0.0-next.6 */
4
+ import{a as b}from"./CFWXX2ZT.js";import"./6PMY6MUE.js";import{a as x}from"./44XNJNTA.js";import{D as u,E as l,F as z,H as k,P as y,g as h,h as r,i as p,l as f}from"./2IIGKMQ6.js";var a={percentage:"percentage",progressRing:"ring--progress",ring:"ring",rings:"rings",text:"text",trackRing:"ring--track"},w=h`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{position:relative;margin-inline:auto;display:flex;align-items:center;justify-content:center;opacity:1;flex-direction:column;min-block-size:var(--calcite-loader-size);font-size:var(--calcite-loader-font-size);stroke-width:var(--calcite-internal-stroke-width);fill:none;transform:scale(1);padding-block:var(--calcite-loader-spacing, 4rem)}:host([scale=s]){--calcite-internal-stroke-width: 3;--calcite-internal-text-offset: var(--calcite-spacing-xxs);--calcite-internal-loader-font-size: var(--calcite-font-size--3);--calcite-internal-loader-size: 2rem;--calcite-internal-loader-size-inline: .75rem;--calcite-internal-loader-value-line-height: .625rem}:host([scale=m]){--calcite-internal-stroke-width: 6;--calcite-internal-text-offset: var(--calcite-spacing-sm);--calcite-internal-loader-font-size: var(--calcite-font-size-0);--calcite-internal-loader-size: 4rem;--calcite-internal-loader-size-inline: 1rem;--calcite-internal-loader-value-line-height: 1.375rem}:host([scale=l]){--calcite-internal-stroke-width: 8;--calcite-internal-text-offset: var(--calcite-spacing-md);--calcite-internal-loader-font-size: var(--calcite-font-size-2);--calcite-internal-loader-size: 6rem;--calcite-internal-loader-size-inline: 1.5rem;--calcite-internal-loader-value-line-height: 1.71875rem}.text{display:block;text-align:center;font-size:var(--calcite-font-size--2);line-height:1rem;margin-block-start:var(--calcite-loader-text-spacing, var(--calcite-internal-text-offset));font-weight:var(--calcite-loader-text-weight, var(--calcite-font-weight-normal));color:var(--calcite-loader-text-color, var(--calcite-color-text-1))}.percentage{display:block;text-align:center;font-size:var(--calcite-loader-font-size);inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));line-height:var(--calcite-internal-loader-value-line-height);align-self:center;color:var(--calcite-loader-text-color, var(--calcite-color-text-1))}.rings{position:relative;display:flex;overflow:visible;opacity:1;inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size))}.ring{position:absolute;inset-block-start:0px;transform-origin:center;overflow:visible;inset-inline-start:0;inline-size:var(--calcite-loader-size, var(--calcite-internal-loader-size));block-size:var(--calcite-loader-size, var(--calcite-internal-loader-size))}.ring--track{stroke:var(--calcite-loader-track-color, var(--calcite-color-transparent-press))}.ring--progress{stroke:var(--calcite-loader-progress-color, var(--calcite-color-brand));transform:rotate(-90deg);transition:all var(--calcite-internal-animation-timing-fast) linear}:host([type=indeterminate]) .ring--progress{animation:loader-clockwise calc(var(--calcite-internal-animation-timing-slow) / var(--calcite-internal-duration-factor) * 2 / var(--calcite-internal-duration-factor)) linear infinite}:host([inline]){--calcite-internal-stroke-width: 2;position:relative;margin:0;stroke:currentColor;stroke-width:2;padding-block:0px;block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));min-block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));inline-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));vertical-align:calc(var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline))) * -1 * .2)}:host([inline]) .rings{inset-block-start:0px;margin:0;inset-inline-start:0;inline-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)))}:host([inline]) .ring{inline-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)));block-size:var(--calcite-loader-size, var(--calcite-loader-size-inline, var(--calcite-internal-loader-size-inline)))}:host([inline]) .ring--progress{stroke:var(--calcite-loader-progress-color-inline, currentColor)}:host([complete]){opacity:0;transform:scale(.75);transform-origin:center;transition:opacity var(--calcite-internal-animation-timing-medium) linear 1s,transform var(--calcite-internal-animation-timing-medium) linear 1s}:host([complete]) .rings{opacity:0;transform:scale(.75);transform-origin:center;transition:opacity calc(.18s * var(--calcite-internal-duration-factor)) linear .8s,transform calc(.18s * var(--calcite-internal-duration-factor)) linear .8s}:host([complete]) .percentage{color:var(--calcite-color-brand);transform:scale(1.05);transform-origin:center;transition:color var(--calcite-internal-animation-timing-medium) linear,transform var(--calcite-internal-animation-timing-medium) linear}@keyframes loader-clockwise{0%{transform:rotate(0)}to{transform:rotate(360deg)}}:host([hidden]){display:none}[hidden]{display:none}`,v=class extends u{constructor(){super(...arguments),this.messages=b({name:null}),this.complete=!1,this.inline=!1,this.scale="m",this.text="",this.type="indeterminate",this.value=0}static{this.properties={complete:[7,{},{reflect:!0,type:Boolean}],inline:[7,{},{reflect:!0,type:Boolean}],label:1,scale:[3,{},{reflect:!0}],text:1,type:[3,{},{reflect:!0}],value:[9,{},{type:Number}]}}static{this.styles=w}connectedCallback(){super.connectedCallback(),this.updateFormatter()}load(){requestAnimationFrame(()=>this.valueChangeHandler())}willUpdate(e){e.has("value")&&(this.hasUpdated||this.value!==0)&&this.valueChangeHandler(),(e.has("type")&&(this.hasUpdated||this.type!=="indeterminate")||e.has("messages"))&&this.updateFormatter()}valueChangeHandler(){this.complete=this.type.startsWith("determinate")&&this.value===100}formatValue(){return this.type!=="determinate-value"?`${this.value}`:this.formatter.format(this.value/100)}getSize(e){return{s:32,m:64,l:96}[e]}getInlineSize(e){return{s:12,m:16,l:24}[e]}updateFormatter(){this.type!=="determinate-value"||this.formatter?.resolvedOptions().locale===this.messages._lang||(this.formatter=new Intl.NumberFormat(this.messages._lang,{style:"percent"}))}render(){let{el:e,inline:n,label:c,text:s,type:i,value:m}=this,o=e.id||x(),t=i!=="indeterminate",d=Math.floor(m);return this.el.ariaLabel=c,this.el.ariaValueMax=t?"100":void 0,this.el.ariaValueMin=t?"0":void 0,this.el.ariaValueNow=t?d.toString():void 0,k(this.el,"id",o),this.el.role="progressbar",r`<div class=${l(a.rings)}>${this.renderRing("track")}${this.renderRing("progress")}${!n&&t&&r`<div class=${l(a.percentage)}>${this.formatValue()}</div>`||""}</div>${!n&&s&&r`<div class=${l(a.text)}>${s}</div>`||""}`}renderRing(e){let{inline:n,scale:c,value:s}=this,i=n?this.getInlineSize(c):this.getSize(c),o=i*.45,t;if(e==="progress"){let d=2*o*Math.PI,g=(this.type.startsWith("determinate")?s:24)/100*d,$=d-g;t={"stroke-dasharray":`${g} ${$}`}}return r`<svg aria-hidden=true class=${l({[a.ring]:!0,[a.trackRing]:e==="track",[a.progressRing]:e==="progress"})} style=${z(t)} viewBox=${`0 0 ${i} ${i}`}>${p`<circle cx=${i/2} cy=${i/2} r=${o??f} />`}</svg>`}};y("calcite-loader",v);export{v as Loader};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.4 */
4
- import{a as d}from"./RSHJ2ULC.js";import{a as k}from"./6PIHPAZF.js";import{a as v}from"./PNBL2IVW.js";import{a as b}from"./HKVRX5SD.js";import"./D5SFHDV6.js";import{a as r}from"./TLLHA7VC.js";import"./VZVYZPXQ.js";import{o as l,t as u}from"./Z6CRZOOK.js";import"./XRJOD24G.js";import{B as a,C as s,D as g,E as e,I as p,P as f,g as m,h as n,o}from"./CSQVLDPF.js";var c={title:"title",message:"message",link:"link",actionsEnd:"actions-end"},i={actionsEnd:"actions-end",close:"notice-close",container:"container",content:"notice-content",icon:"notice-icon"},x=m`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([scale=s]){--calcite-notice-spacing-token-small: .5rem;--calcite-notice-spacing-token-large: .75rem}:host([scale=s]) .container slot[name=title]::slotted(*),:host([scale=s]) .container *::slotted([slot=title]){margin-block:.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=s]) .container slot[name=message]::slotted(*),:host([scale=s]) .container *::slotted([slot=message]){margin-block:.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) ::slotted(calcite-link){margin-block:.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) .notice-close{padding:.5rem}:host([scale=m]){--calcite-notice-spacing-token-small: .75rem;--calcite-notice-spacing-token-large: 1rem}:host([scale=m]) .container slot[name=title]::slotted(*),:host([scale=m]) .container *::slotted([slot=title]){margin-block:.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=m]) .container slot[name=message]::slotted(*),:host([scale=m]) .container *::slotted([slot=message]){margin-block:.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) ::slotted(calcite-link){margin-block:.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=l]){--calcite-notice-spacing-token-small: 1rem;--calcite-notice-spacing-token-large: 1.25rem}:host([scale=l]) .container slot[name=title]::slotted(*),:host([scale=l]) .container *::slotted([slot=title]){margin-block:.125rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host([scale=l]) .container slot[name=message]::slotted(*),:host([scale=l]) .container *::slotted([slot=message]){margin-block:.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) ::slotted(calcite-link){margin-block:.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([width=auto]){--calcite-notice-width: auto}:host([width=half]){--calcite-notice-width: 50%}:host([width=full]){--calcite-notice-width: 100%}:host{margin-inline:auto;display:none;max-inline-size:100%;align-items:center;inline-size:var(--calcite-notice-width)}.container{pointer-events:none;margin-block:0px;box-sizing:border-box;display:flex;inline-size:100%;opacity:0;overflow:hidden;max-block-size:0;transition-property:opacity,max-block-size;transition-duration:var(--calcite-animation-timing);text-align:start;border-inline-start:var(--calcite-border-width-md) solid;box-shadow:0 0 0 0 transparent;background-color:var(--calcite-notice-background-color, var(--calcite-color-foreground-1))}.notice-close{outline-color:transparent}.notice-close:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host{display:flex}:host([open]) .container{pointer-events:auto;max-block-size:100%;align-items:center;opacity:1;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);overflow:visible}.container slot[name=title]::slotted(*),.container *::slotted([slot=title]){margin:0;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-notice-title-text-color, var(--calcite-color-text-1))}.container slot[name=message]::slotted(*),.container *::slotted([slot=message]){margin:0;display:inline;font-weight:var(--calcite-font-weight-normal);margin-inline-end:var(--calcite-notice-spacing-token-small);color:var(--calcite-notice-content-text-color, var(--calcite-color-text-2))}.notice-content{box-sizing:border-box;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;padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;display:flex;min-inline-size:0px;flex-direction:column;overflow-wrap:break-word;flex:1 1 0;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:0 var(--calcite-notice-spacing-token-small)}.notice-content:first-of-type:not(:only-child){padding-inline-start:var(--calcite-notice-spacing-token-large)}.notice-content:only-of-type{padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large)}.notice-icon{display:flex;align-items:center;box-sizing:border-box;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;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto}.notice-close{display:flex;cursor:pointer;align-items:center;align-self:stretch;border-style:none;background-color:transparent;outline:2px solid transparent;outline-offset:2px;box-sizing:border-box;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;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;-webkit-appearance:none;color:var(--calcite-notice-close-icon-color, var(--calcite-color-text-3))}.notice-close:hover,.notice-close:focus{background-color:var(--calcite-notice-close-background-color-focus, var(--calcite-color-foreground-2));color:var(--calcite-notice-close-icon-color-hover, var(--calcite-color-text-1))}.notice-close:active{background-color:var(--calcite-notice-close-background-color-press, var(--calcite-color-foreground-3))}.actions-end{display:flex;align-self:stretch}:host([kind=brand]) .container{border-color:var(--calcite-color-brand)}:host([kind=brand]) .container .notice-icon{color:var(--calcite-color-brand)}:host([kind=info]) .container{border-color:var(--calcite-color-status-info)}:host([kind=info]) .container .notice-icon{color:var(--calcite-color-status-info)}:host([kind=danger]) .container{border-color:var(--calcite-color-status-danger)}:host([kind=danger]) .container .notice-icon{color:var(--calcite-color-status-danger)}:host([kind=success]) .container{border-color:var(--calcite-color-status-success)}:host([kind=success]) .container .notice-icon{color:var(--calcite-color-status-success)}:host([kind=warning]) .container{border-color:var(--calcite-color-status-warning)}:host([kind=warning]) .container .notice-icon{color:var(--calcite-color-status-warning)}:host([hidden]){display:none}[hidden]{display:none}`,h=class extends g{constructor(){super(...arguments),this.closeButtonRef=a(),this.transitionProp="opacity",this.transitionRef=a(),this.messages=v(),this.focusSetter=b()(this),this.hasActionEnd=!1,this.closable=!1,this.iconFlipRtl=!1,this.kind="brand",this.open=!1,this.scale="m",this.width="auto",this.calciteNoticeBeforeClose=o({cancelable:!1}),this.calciteNoticeBeforeOpen=o({cancelable:!1}),this.calciteNoticeClose=o({cancelable:!1}),this.calciteNoticeOpen=o({cancelable:!1})}static{this.properties={hasActionEnd:[16,{},{state:!0}],closable:[7,{},{reflect:!0,type:Boolean}],icon:[3,{converter:p,type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],kind:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=x}async setFocus(t){return this.focusSetter(()=>this.el.querySelector("calcite-link")||this.closeButtonRef.value,t)}async load(){this.requestedIcon=l(d,this.icon,this.kind)}willUpdate(t){t.has("open")&&(this.hasUpdated||this.open!==!1)&&k(this),(t.has("icon")||t.has("kind")&&(this.hasUpdated||this.kind!=="brand"))&&(this.requestedIcon=l(d,this.icon,this.kind))}onBeforeClose(){this.calciteNoticeBeforeClose.emit()}onBeforeOpen(){this.calciteNoticeBeforeOpen.emit()}onClose(){this.calciteNoticeClose.emit()}onOpen(){this.calciteNoticeOpen.emit()}close(){this.open=!1}handleActionsEndSlotChange(t){this.hasActionEnd=u(t)}render(){let t=n`<button .ariaLabel=${this.messages.close} class=${e(i.close)} @click=${this.close} ${s(this.closeButtonRef)}><calcite-icon icon=x .scale=${r(this.scale)}></calcite-icon></button>`;return n`<div class=${e(i.container)} ${s(this.transitionRef)}>${this.requestedIcon?n`<div class=${e(i.icon)}><calcite-icon .flipRtl=${this.iconFlipRtl} .icon=${this.requestedIcon} .scale=${r(this.scale)}></calcite-icon></div>`:null}<div class=${e(i.content)}><slot name=${c.title}></slot><slot name=${c.message}></slot><slot name=${c.link}></slot></div><div class=${e(i.actionsEnd)} .hidden=${!this.hasActionEnd}><slot name=${c.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot></div>${this.closable?t:null}</div>`}};f("calcite-notice",h);export{h as Notice};
3
+ v5.0.0-next.6 */
4
+ import{a as d}from"./E5NO42AW.js";import{a as k}from"./LFYXGVGK.js";import{a as v}from"./CFWXX2ZT.js";import{a as b}from"./SXK4ATVN.js";import"./6PMY6MUE.js";import{a as r}from"./PCGNN5RO.js";import"./H3GTITDX.js";import{o as l,t as u}from"./7DQ4G2FS.js";import"./44XNJNTA.js";import{B as a,C as s,D as g,E as e,I as p,P as f,g as m,h as n,o}from"./2IIGKMQ6.js";var c={title:"title",message:"message",link:"link",actionsEnd:"actions-end"},i={actionsEnd:"actions-end",close:"notice-close",container:"container",content:"notice-content",icon:"notice-icon"},x=m`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host([scale=s]){--calcite-notice-spacing-token-small: .5rem;--calcite-notice-spacing-token-large: .75rem}:host([scale=s]) .container slot[name=title]::slotted(*),:host([scale=s]) .container *::slotted([slot=title]){margin-block:.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=s]) .container slot[name=message]::slotted(*),:host([scale=s]) .container *::slotted([slot=message]){margin-block:.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) ::slotted(calcite-link){margin-block:.125rem;font-size:var(--calcite-font-size--2);line-height:1.375}:host([scale=s]) .notice-close{padding:.5rem}:host([scale=m]){--calcite-notice-spacing-token-small: .75rem;--calcite-notice-spacing-token-large: 1rem}:host([scale=m]) .container slot[name=title]::slotted(*),:host([scale=m]) .container *::slotted([slot=title]){margin-block:.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=m]) .container slot[name=message]::slotted(*),:host([scale=m]) .container *::slotted([slot=message]){margin-block:.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=m]) ::slotted(calcite-link){margin-block:.125rem;font-size:var(--calcite-font-size--1);line-height:1.375}:host([scale=l]){--calcite-notice-spacing-token-small: 1rem;--calcite-notice-spacing-token-large: 1.25rem}:host([scale=l]) .container slot[name=title]::slotted(*),:host([scale=l]) .container *::slotted([slot=title]){margin-block:.125rem;font-size:var(--calcite-font-size-1);line-height:1.375}:host([scale=l]) .container slot[name=message]::slotted(*),:host([scale=l]) .container *::slotted([slot=message]){margin-block:.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([scale=l]) ::slotted(calcite-link){margin-block:.125rem;font-size:var(--calcite-font-size-0);line-height:1.375}:host([width=auto]){--calcite-notice-width: auto}:host([width=half]){--calcite-notice-width: 50%}:host([width=full]){--calcite-notice-width: 100%}:host{margin-inline:auto;display:none;max-inline-size:100%;align-items:center;inline-size:var(--calcite-notice-width)}.container{pointer-events:none;margin-block:0px;box-sizing:border-box;display:flex;inline-size:100%;opacity:0;overflow:hidden;max-block-size:0;transition-property:opacity,max-block-size;transition-duration:var(--calcite-animation-timing);text-align:start;border-inline-start:var(--calcite-border-width-md) solid;box-shadow:0 0 0 0 transparent;background-color:var(--calcite-notice-background-color, var(--calcite-color-foreground-1))}.notice-close{outline-color:transparent}.notice-close:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host{display:flex}:host([open]) .container{pointer-events:auto;max-block-size:100%;align-items:center;opacity:1;--tw-shadow: 0 4px 8px -1px rgba(0, 0, 0, .08), 0 2px 4px -1px rgba(0, 0, 0, .04);--tw-shadow-colored: 0 4px 8px -1px var(--tw-shadow-color), 0 2px 4px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);overflow:visible}.container slot[name=title]::slotted(*),.container *::slotted([slot=title]){margin:0;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-notice-title-text-color, var(--calcite-color-text-1))}.container slot[name=message]::slotted(*),.container *::slotted([slot=message]){margin:0;display:inline;font-weight:var(--calcite-font-weight-normal);margin-inline-end:var(--calcite-notice-spacing-token-small);color:var(--calcite-notice-content-text-color, var(--calcite-color-text-2))}.notice-content{box-sizing:border-box;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;padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;display:flex;min-inline-size:0px;flex-direction:column;overflow-wrap:break-word;flex:1 1 0;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:0 var(--calcite-notice-spacing-token-small)}.notice-content:first-of-type:not(:only-child){padding-inline-start:var(--calcite-notice-spacing-token-large)}.notice-content:only-of-type{padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large)}.notice-icon{display:flex;align-items:center;box-sizing:border-box;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;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto}.notice-close{display:flex;cursor:pointer;align-items:center;align-self:stretch;border-style:none;background-color:transparent;outline:2px solid transparent;outline-offset:2px;box-sizing:border-box;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;padding-block:var(--calcite-notice-spacing-token-small);padding-inline:var(--calcite-notice-spacing-token-large);flex:0 0 auto;-webkit-appearance:none;color:var(--calcite-notice-close-icon-color, var(--calcite-color-text-3))}.notice-close:hover,.notice-close:focus{background-color:var(--calcite-notice-close-background-color-focus, var(--calcite-color-foreground-2));color:var(--calcite-notice-close-icon-color-hover, var(--calcite-color-text-1))}.notice-close:active{background-color:var(--calcite-notice-close-background-color-press, var(--calcite-color-foreground-3))}.actions-end{display:flex;align-self:stretch}:host([kind=brand]) .container{border-color:var(--calcite-color-brand)}:host([kind=brand]) .container .notice-icon{color:var(--calcite-color-brand)}:host([kind=info]) .container{border-color:var(--calcite-color-status-info)}:host([kind=info]) .container .notice-icon{color:var(--calcite-color-status-info)}:host([kind=danger]) .container{border-color:var(--calcite-color-status-danger)}:host([kind=danger]) .container .notice-icon{color:var(--calcite-color-status-danger)}:host([kind=success]) .container{border-color:var(--calcite-color-status-success)}:host([kind=success]) .container .notice-icon{color:var(--calcite-color-status-success)}:host([kind=warning]) .container{border-color:var(--calcite-color-status-warning)}:host([kind=warning]) .container .notice-icon{color:var(--calcite-color-status-warning)}:host([hidden]){display:none}[hidden]{display:none}`,h=class extends g{constructor(){super(...arguments),this.closeButtonRef=a(),this.transitionProp="opacity",this.transitionRef=a(),this.messages=v(),this.focusSetter=b()(this),this.hasActionEnd=!1,this.closable=!1,this.iconFlipRtl=!1,this.kind="brand",this.open=!1,this.scale="m",this.width="auto",this.calciteNoticeBeforeClose=o({cancelable:!1}),this.calciteNoticeBeforeOpen=o({cancelable:!1}),this.calciteNoticeClose=o({cancelable:!1}),this.calciteNoticeOpen=o({cancelable:!1})}static{this.properties={hasActionEnd:[16,{},{state:!0}],closable:[7,{},{reflect:!0,type:Boolean}],icon:[3,{converter:p,type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],kind:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],open:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],width:[3,{},{reflect:!0}]}}static{this.styles=x}async setFocus(t){return this.focusSetter(()=>this.el.querySelector("calcite-link")||this.closeButtonRef.value,t)}async load(){this.requestedIcon=l(d,this.icon,this.kind)}willUpdate(t){t.has("open")&&(this.hasUpdated||this.open!==!1)&&k(this),(t.has("icon")||t.has("kind")&&(this.hasUpdated||this.kind!=="brand"))&&(this.requestedIcon=l(d,this.icon,this.kind))}onBeforeClose(){this.calciteNoticeBeforeClose.emit()}onBeforeOpen(){this.calciteNoticeBeforeOpen.emit()}onClose(){this.calciteNoticeClose.emit()}onOpen(){this.calciteNoticeOpen.emit()}close(){this.open=!1}handleActionsEndSlotChange(t){this.hasActionEnd=u(t)}render(){let t=n`<button .ariaLabel=${this.messages.close} class=${e(i.close)} @click=${this.close} ${s(this.closeButtonRef)}><calcite-icon icon=x .scale=${r(this.scale)}></calcite-icon></button>`;return n`<div class=${e(i.container)} ${s(this.transitionRef)}>${this.requestedIcon?n`<div class=${e(i.icon)}><calcite-icon .flipRtl=${this.iconFlipRtl} .icon=${this.requestedIcon} .scale=${r(this.scale)}></calcite-icon></div>`:null}<div class=${e(i.content)}><slot name=${c.title}></slot><slot name=${c.message}></slot><slot name=${c.link}></slot></div><div class=${e(i.actionsEnd)} .hidden=${!this.hasActionEnd}><slot name=${c.actionsEnd} @slotchange=${this.handleActionsEndSlotChange}></slot></div>${this.closable?t:null}</div>`}};f("calcite-notice",h);export{h as Notice};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.4 */
3
+ v5.0.0-next.6 */
4
4
  var c="24px",a="32px",e="44px",t="48px";export{c as a,a as b,e as c,t as d};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.4 */
4
- import{a as P,b as R}from"./PRB44CR7.js";import{a as f}from"./H42LHYUA.js";import{a as d}from"./TLLHA7VC.js";import"./VZVYZPXQ.js";import{e as w,n as T,q as u,t as A,u as z}from"./Z6CRZOOK.js";import"./XRJOD24G.js";import{B as S,C as I,D as E,E as i,H as $,J as s,P as M,g as C,h as l,l as y,o as r}from"./CSQVLDPF.js";var n={actionsEnd:"actions-end",bulletPointIcon:"bullet-point",checkbox:"checkbox",checkboxContainer:"checkbox-container",checkboxLabel:"checkbox-label",checkmarkIcon:"checkmark",chevron:"chevron",childrenContainer:"children-container",iconStart:"icon-start",itemExpanded:"item--expanded",nodeAndActionsContainer:"node-actions-container",nodeContainer:"node-container"},q={actionsEnd:"actions-end",children:"children"},c={blank:"blank",bulletPoint:"bullet-point",checkmark:"check",checkSquareF:"check-square-f",chevronRight:"chevron-right",minusSquareF:"minus-square-f",square:"square"},U=C`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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([scale=s]){--calcite-internal-tree-item-spacing-unit: .25rem;--calcite-internal-tree-item-padding-block: .25rem;--calcite-internal-tree-item-children-container-padding: 1.25rem;--calcite-internal-tree-item-line-left-position: .75rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){--calcite-internal-tree-item-spacing-unit: .5rem;--calcite-internal-tree-item-padding-block: .5rem;--calcite-internal-tree-item-children-container-padding: 1.5rem;--calcite-internal-tree-item-line-left-position: 1rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){--calcite-internal-tree-item-spacing-unit: .75rem;--calcite-internal-tree-item-padding-block: .625rem;--calcite-internal-tree-item-children-container-padding: 2.25rem;--calcite-internal-tree-item-line-left-position: 1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host{display:block;max-inline-size:100%;cursor:pointer}:host .children-container ::slotted(*){padding-inline-start:var(--calcite-internal-tree-item-children-container-padding)}.node-actions-container{display:flex}.node-actions-container .node-container,.node-actions-container .checkbox-container{gap:var(--calcite-internal-tree-item-spacing-unit)}.node-actions-container .node-container{padding-inline:var(--calcite-internal-tree-item-spacing-unit);padding-block:var(--calcite-internal-tree-item-padding-block)}.node-actions-container{color:var(--calcite-tree-text-color, var(--calcite-color-text-3))}:host([calcite-hydrated-hidden]){visibility:hidden!important;pointer-events:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([lines]) .children-container:after{position:absolute;inset-block-start:0px;z-index:var(--calcite-z-index);inline-size:1px;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);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;block-size:100%;inset-inline-start:var(--calcite-internal-tree-item-line-left-position);content:"";background-color:var(--calcite-color-border-2)}:host(:not([lines])) .node-container:after{display:none}::slotted(*){min-inline-size:0px;max-inline-size:100%;overflow-wrap:break-word;color:inherit;text-decoration:none!important}::slotted(*):hover{text-decoration:none!important}::slotted(a){inline-size:100%;text-decoration-line:none}:host{outline:2px solid transparent;outline-offset:2px}:host .node-container{outline-color:transparent}:host:focus .node-container,:host:active .node-container{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:focus:not([disabled])) .node-container{outline:2px solid transparent;outline-offset:2px;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:focus:not([disabled])) .checkbox{outline:2px solid transparent;outline-offset:2px}.actions-end{display:flex;flex-direction:row;align-items:center;align-self:stretch}.checkbox-container{display:flex;align-items:center}.checkbox{line-height:0;color:var(--calcite-tree-selected-icon-color, var(--calcite-color-border-input))}.checkbox-label{pointer-events:none;display:flex;align-items:center}.children-container{position:relative;block-size:0px;transform-origin:top;overflow:hidden;opacity:0;transform:scaleY(0);transition:var(--calcite-animation-timing) cubic-bezier(.215,.44,.42,.88),opacity var(--calcite-animation-timing) cubic-bezier(.215,.44,.42,.88),all var(--calcite-animation-timing) ease-in-out}.item--expanded>.children-container{overflow:visible;opacity:1;transform:none;block-size:auto}.node-container{position:relative;display:flex;min-inline-size:0px;flex-grow:1;align-items:center}.node-container .checkmark,.node-container .bullet-point{opacity:0;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-color-border-1)}.node-container:hover .checkmark,.node-container:hover .bullet-point,:host([selected]) .node-container:hover .checkmark,:host([selected]) .node-container:hover .bullet-point,:host(:focus:not([disabled])) .node-container .checkmark,:host(:focus:not([disabled])) .node-container .bullet-point{opacity:1}:host([selected]) .node-container,:host([selected]) .node-container:hover{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-tree-text-color-selected, var(--calcite-color-text-1))}:host([selected]) .node-container .bullet-point,:host([selected]) .node-container .checkmark,:host([selected]) .node-container:hover .bullet-point,:host([selected]) .node-container:hover .checkmark{opacity:1;color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([has-children]) .node-container .bullet-point,:host([has-children]) .node-container .checkmark{display:none}.chevron{position:relative;align-self:center;color:var(--calcite-color-text-3);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;flex:0 0 auto;transform:rotate(0)}.calcite--rtl .chevron{transform:rotate(180deg)}.item--expanded .node-container>.chevron{transform:rotate(90deg)}:host([selected]) .checkmark,:host([selected]) .bullet-point{color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([selected]) .checkbox{color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([has-children][indeterminate]) .checkbox{color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([hidden]){display:none}[hidden]{display:none}`,b=class extends E{constructor(){super(),this.actionSlotWrapperRef=S(),this.userChangedValue=!1,this.hasEndActions=!1,this.updateAfterInitialRender=!1,this.depth=-1,this.disabled=!1,this.expanded=!1,this.indeterminate=!1,this.parentExpanded=!1,this.selected=!1,this.calciteInternalTreeItemSelect=r({cancelable:!1}),this.calciteTreeItemCollapse=r({cancelable:!1}),this.calciteTreeItemExpand=r({cancelable:!1}),this.calciteTreeItemSelect=r({cancelable:!1}),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={hasEndActions:[16,{},{state:!0}],updateAfterInitialRender:[16,{},{state:!0}],depth:[11,{},{reflect:!0,type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],hasChildren:[39,{},{reflect:!0,readOnly:!0,type:Boolean}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],indeterminate:[7,{},{reflect:!0,type:Boolean}],label:1,lines:[7,{},{reflect:!0,type:Boolean}],parentExpanded:[5,{},{type:Boolean}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=U}get hasChildren(){return!!this.childTree}connectedCallback(){super.connectedCallback(),this.parentTreeItem=this.el.parentElement?.closest("calcite-tree-item")}load(){requestAnimationFrame(()=>this.updateAfterInitialRender=!0)}willUpdate(e){this.preWillUpdate(),e.has("expanded")&&((this.hasUpdated||this.expanded!==!1)&&this.updateChildTree(),this.hasUpdated&&(this.expanded?this.calciteTreeItemExpand.emit():this.calciteTreeItemCollapse.emit())),e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.handleSelectedChange(this.selected),e.has("selectionMode")&&this.getSelectionMode()}updated(){P(this)}loaded(){this.updateAncestorTree()}handleSelectedChange(e){this.selectionMode==="ancestors"&&!this.userChangedValue&&(e&&(this.indeterminate=!1),this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:!0,updateItem:!1})),this.userChangedValue&&(this.calciteTreeItemSelect.emit(),this.userChangedValue=!1)}getSelectionMode(){this.isSelectionMultiLike=this.selectionMode==="multiple"||this.selectionMode==="multichildren"}onClick(e){if(this.disabled||this.isActionEndEvent(e))return;let[t]=T(this.el,"a");if(t&&e.composedPath()[0].tagName.toLowerCase()!=="a"){let o=t.target===""?"_self":t.target;window.open(t.href,o)}this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.selectionMode==="ancestors"||this.isSelectionMultiLike,updateItem:!0}),this.userChangedValue=!0}iconClickHandler(e){e.stopPropagation(),this.expanded=!this.expanded}childrenClickHandler(e){e.stopPropagation()}keyDownHandler(e){if(!(this.isActionEndEvent(e)||e.defaultPrevented))switch(e.key){case" ":this.userChangedValue=!0,this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.isSelectionMultiLike,updateItem:!0}),e.preventDefault();break;case"Enter":{let t=Array.from(this.el.children).find(o=>o.matches("a"));this.userChangedValue=!0,t?(t.click(),this.selected=!0):this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.isSelectionMultiLike,updateItem:!0}),e.preventDefault()}}}updateChildTree(){let{childTree:e}=this;e&&(e.parentExpanded=this.expanded)}handleChildrenSlotChange(e){let t=z(e).filter(o=>o.matches("calcite-tree"))[0];this.childTree=t,this.requestUpdate("hasChildren"),this.updateChildTree()}isActionEndEvent(e){return e.composedPath().includes(this.actionSlotWrapperRef.value)}updateAncestorTree(){let e=this.parentTreeItem;if(!(this.selectionMode!=="ancestors"||!e)){if(this.selected){let t=this.el.parentElement,o=Array.from(t?.children),h=o.filter(a=>a.selected);o.length===h.length?(e.selected=!0,e.indeterminate=!1):h.length>0&&(e.indeterminate=!0),Array.from(this.el.querySelectorAll("calcite-tree-item:not([disabled])")).forEach(a=>{a.selected=!0,a.indeterminate=!1})}else if(this.indeterminate){let t=this.parentTreeItem;t.indeterminate=!0}}}actionsEndSlotChangeHandler(e){this.hasEndActions=A(e)}preWillUpdate(){this.depth=0;let e=this.el.closest("calcite-tree");if(!e)return;this.selectionMode=e.selectionMode,this.scale=e.scale||"m",this.lines=e.lines;let t;for(;e&&(t=e.parentElement?.closest("calcite-tree"),t!==e);)e=t,this.depth=this.depth+1}render(){let e=w(this.el)==="rtl",t=this.selectionMode==="single"||this.selectionMode==="children"||this.selectionMode==="single-persist",o=this.selectionMode==="multiple"||this.selectionMode==="multichildren",h=this.selectionMode==="none"&&!this.hasChildren,k=this.hasChildren&&this.indeterminate,a=this.hasChildren||this.selectionMode==="ancestors"?l`<calcite-icon class=${i({[n.chevron]:!0,[s.rtl]:e})} data-test-id=icon .icon=${this.hasChildren?c.chevronRight:c.blank} @click=${this.iconClickHandler} .scale=${d(this.scale)}></calcite-icon>`:null,v=f("default-slot",l`<slot></slot>`),m=this.selectionMode==="ancestors"?l`<div class=${i(n.checkboxContainer)}><calcite-icon class=${i(n.checkbox)} .icon=${this.selected?c.checkSquareF:k?c.minusSquareF:c.square} .scale=${d(this.scale)}></calcite-icon></div>`:null,p=t?c.bulletPoint:o?c.checkmark:h?c.blank:null,L=p?l`<calcite-icon class=${i({[n.bulletPointIcon]:p===c.bulletPoint,[n.checkmarkIcon]:p===c.checkmark,[s.rtl]:e})} .icon=${p} .scale=${d(this.scale)}></calcite-icon>`:null,g=!(this.parentExpanded||this.depth===1),x=this.updateAfterInitialRender&&this.expanded,{hasEndActions:B}=this,H=f("actionsEndSlot",l`<slot name=${q.actionsEnd} @slotchange=${this.actionsEndSlotChangeHandler}></slot>`),F=l`<calcite-icon class=${i(n.iconStart)} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${d(this.scale)}></calcite-icon>`;return this.el.ariaChecked=this.selectionMode==="multiple"||this.selectionMode==="multichildren"||this.selectionMode==="ancestors"?u(this.selected):void 0,this.el.ariaExpanded=this.hasChildren?u(x):void 0,this.el.inert=g,this.el.ariaLive="polite",this.el.ariaSelected=this.selectionMode==="single"||this.selectionMode==="children"||this.selectionMode==="single-persist"?u(this.selected):void 0,this.el.toggleAttribute("calcite-hydrated-hidden",g),this.el.role="treeitem",$(this.el,"tabIndex",this.disabled?-1:0),R({disabled:this.disabled,children:l`<div class=${i({[n.itemExpanded]:x})}><div class=${i(n.nodeAndActionsContainer)}><div class=${i({[n.nodeContainer]:!0,[s.rtl]:e})} data-selection-mode=${this.selectionMode??y}>${a}${L}${m||null}${this.iconStart?F:null}${m?l`<label class=${i(n.checkboxLabel)}>${v}</label>`:v}</div><div class=${i(n.actionsEnd)} .hidden=${!B} ${I(this.actionSlotWrapperRef)}>${H}</div></div><div class=${i({[n.childrenContainer]:!0,[s.rtl]:e})} data-test-id=calcite-tree-children @click=${this.childrenClickHandler} .role=${this.hasChildren?"group":void 0}><slot name=${q.children} @slotchange=${this.handleChildrenSlotChange}></slot></div></div>`})}};M("calcite-tree-item",b);export{b as TreeItem};
3
+ v5.0.0-next.6 */
4
+ import{a as P,b as R}from"./UQ4HIO7J.js";import{a as f}from"./7XEO6UJ3.js";import{a as d}from"./PCGNN5RO.js";import"./H3GTITDX.js";import{e as w,n as T,q as u,t as A,u as z}from"./7DQ4G2FS.js";import"./44XNJNTA.js";import{B as S,C as I,D as E,E as i,H as $,J as s,P as M,g as C,h as l,l as y,o as r}from"./2IIGKMQ6.js";var n={actionsEnd:"actions-end",bulletPointIcon:"bullet-point",checkbox:"checkbox",checkboxContainer:"checkbox-container",checkboxLabel:"checkbox-label",checkmarkIcon:"checkmark",chevron:"chevron",childrenContainer:"children-container",iconStart:"icon-start",itemExpanded:"item--expanded",nodeAndActionsContainer:"node-actions-container",nodeContainer:"node-container"},q={actionsEnd:"actions-end",children:"children"},c={blank:"blank",bulletPoint:"bullet-point",checkmark:"check",checkSquareF:"check-square-f",chevronRight:"chevron-right",minusSquareF:"minus-square-f",square:"square"},U=C`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}: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([scale=s]){--calcite-internal-tree-item-spacing-unit: .25rem;--calcite-internal-tree-item-padding-block: .25rem;--calcite-internal-tree-item-children-container-padding: 1.25rem;--calcite-internal-tree-item-line-left-position: .75rem;font-size:var(--calcite-font-size--2);line-height:1rem}:host([scale=m]){--calcite-internal-tree-item-spacing-unit: .5rem;--calcite-internal-tree-item-padding-block: .5rem;--calcite-internal-tree-item-children-container-padding: 1.5rem;--calcite-internal-tree-item-line-left-position: 1rem;font-size:var(--calcite-font-size--1);line-height:1rem}:host([scale=l]){--calcite-internal-tree-item-spacing-unit: .75rem;--calcite-internal-tree-item-padding-block: .625rem;--calcite-internal-tree-item-children-container-padding: 2.25rem;--calcite-internal-tree-item-line-left-position: 1.5rem;font-size:var(--calcite-font-size-0);line-height:1.25rem}:host{display:block;max-inline-size:100%;cursor:pointer}:host .children-container ::slotted(*){padding-inline-start:var(--calcite-internal-tree-item-children-container-padding)}.node-actions-container{display:flex}.node-actions-container .node-container,.node-actions-container .checkbox-container{gap:var(--calcite-internal-tree-item-spacing-unit)}.node-actions-container .node-container{padding-inline:var(--calcite-internal-tree-item-spacing-unit);padding-block:var(--calcite-internal-tree-item-padding-block)}.node-actions-container{color:var(--calcite-tree-text-color, var(--calcite-color-text-3))}:host([calcite-hydrated-hidden]){visibility:hidden!important;pointer-events:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([lines]) .children-container:after{position:absolute;inset-block-start:0px;z-index:var(--calcite-z-index);inline-size:1px;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);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;block-size:100%;inset-inline-start:var(--calcite-internal-tree-item-line-left-position);content:"";background-color:var(--calcite-color-border-2)}:host(:not([lines])) .node-container:after{display:none}::slotted(*){min-inline-size:0px;max-inline-size:100%;overflow-wrap:break-word;color:inherit;text-decoration:none!important}::slotted(*):hover{text-decoration:none!important}::slotted(a){inline-size:100%;text-decoration-line:none}:host{outline:2px solid transparent;outline-offset:2px}:host .node-container{outline-color:transparent}:host:focus .node-container,:host:active .node-container{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:focus:not([disabled])) .node-container{outline:2px solid transparent;outline-offset:2px;outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline:var(--calcite-border-width-md) solid var(--calcite-internal-color-focus);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:focus:not([disabled])) .checkbox{outline:2px solid transparent;outline-offset:2px}.actions-end{display:flex;flex-direction:row;align-items:center;align-self:stretch}.checkbox-container{display:flex;align-items:center}.checkbox{line-height:0;color:var(--calcite-tree-selected-icon-color, var(--calcite-color-border-input))}.checkbox-label{pointer-events:none;display:flex;align-items:center}.children-container{position:relative;block-size:0px;transform-origin:top;overflow:hidden;opacity:0;transform:scaleY(0);transition:var(--calcite-animation-timing) cubic-bezier(.215,.44,.42,.88),opacity var(--calcite-animation-timing) cubic-bezier(.215,.44,.42,.88),all var(--calcite-animation-timing) ease-in-out}.item--expanded>.children-container{overflow:visible;opacity:1;transform:none;block-size:auto}.node-container{position:relative;display:flex;min-inline-size:0px;flex-grow:1;align-items:center}.node-container .checkmark,.node-container .bullet-point{opacity:0;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-color-border-1)}.node-container:hover .checkmark,.node-container:hover .bullet-point,:host([selected]) .node-container:hover .checkmark,:host([selected]) .node-container:hover .bullet-point,:host(:focus:not([disabled])) .node-container .checkmark,:host(:focus:not([disabled])) .node-container .bullet-point{opacity:1}:host([selected]) .node-container,:host([selected]) .node-container:hover{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-tree-text-color-selected, var(--calcite-color-text-1))}:host([selected]) .node-container .bullet-point,:host([selected]) .node-container .checkmark,:host([selected]) .node-container:hover .bullet-point,:host([selected]) .node-container:hover .checkmark{opacity:1;color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([has-children]) .node-container .bullet-point,:host([has-children]) .node-container .checkmark{display:none}.chevron{position:relative;align-self:center;color:var(--calcite-color-text-3);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;flex:0 0 auto;transform:rotate(0)}.calcite--rtl .chevron{transform:rotate(180deg)}.item--expanded .node-container>.chevron{transform:rotate(90deg)}:host([selected]) .checkmark,:host([selected]) .bullet-point{color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([selected]) .checkbox{color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([has-children][indeterminate]) .checkbox{color:var(--calcite-tree-selected-icon-color, var(--calcite-color-brand))}:host([hidden]){display:none}[hidden]{display:none}`,b=class extends E{constructor(){super(),this.actionSlotWrapperRef=S(),this.userChangedValue=!1,this.hasEndActions=!1,this.updateAfterInitialRender=!1,this.depth=-1,this.disabled=!1,this.expanded=!1,this.indeterminate=!1,this.parentExpanded=!1,this.selected=!1,this.calciteInternalTreeItemSelect=r({cancelable:!1}),this.calciteTreeItemCollapse=r({cancelable:!1}),this.calciteTreeItemExpand=r({cancelable:!1}),this.calciteTreeItemSelect=r({cancelable:!1}),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={hasEndActions:[16,{},{state:!0}],updateAfterInitialRender:[16,{},{state:!0}],depth:[11,{},{reflect:!0,type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],expanded:[7,{},{reflect:!0,type:Boolean}],hasChildren:[39,{},{reflect:!0,readOnly:!0,type:Boolean}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],indeterminate:[7,{},{reflect:!0,type:Boolean}],label:1,lines:[7,{},{reflect:!0,type:Boolean}],parentExpanded:[5,{},{type:Boolean}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=U}get hasChildren(){return!!this.childTree}connectedCallback(){super.connectedCallback(),this.parentTreeItem=this.el.parentElement?.closest("calcite-tree-item")}load(){requestAnimationFrame(()=>this.updateAfterInitialRender=!0)}willUpdate(e){this.preWillUpdate(),e.has("expanded")&&((this.hasUpdated||this.expanded!==!1)&&this.updateChildTree(),this.hasUpdated&&(this.expanded?this.calciteTreeItemExpand.emit():this.calciteTreeItemCollapse.emit())),e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.handleSelectedChange(this.selected),e.has("selectionMode")&&this.getSelectionMode()}updated(){P(this)}loaded(){this.updateAncestorTree()}handleSelectedChange(e){this.selectionMode==="ancestors"&&!this.userChangedValue&&(e&&(this.indeterminate=!1),this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:!0,updateItem:!1})),this.userChangedValue&&(this.calciteTreeItemSelect.emit(),this.userChangedValue=!1)}getSelectionMode(){this.isSelectionMultiLike=this.selectionMode==="multiple"||this.selectionMode==="multichildren"}onClick(e){if(this.disabled||this.isActionEndEvent(e))return;let[t]=T(this.el,"a");if(t&&e.composedPath()[0].tagName.toLowerCase()!=="a"){let o=t.target===""?"_self":t.target;window.open(t.href,o)}this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.selectionMode==="ancestors"||this.isSelectionMultiLike,updateItem:!0}),this.userChangedValue=!0}iconClickHandler(e){e.stopPropagation(),this.expanded=!this.expanded}childrenClickHandler(e){e.stopPropagation()}keyDownHandler(e){if(!(this.isActionEndEvent(e)||e.defaultPrevented))switch(e.key){case" ":this.userChangedValue=!0,this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.isSelectionMultiLike,updateItem:!0}),e.preventDefault();break;case"Enter":{let t=Array.from(this.el.children).find(o=>o.matches("a"));this.userChangedValue=!0,t?(t.click(),this.selected=!0):this.calciteInternalTreeItemSelect.emit({modifyCurrentSelection:this.isSelectionMultiLike,updateItem:!0}),e.preventDefault()}}}updateChildTree(){let{childTree:e}=this;e&&(e.parentExpanded=this.expanded)}handleChildrenSlotChange(e){let t=z(e).filter(o=>o.matches("calcite-tree"))[0];this.childTree=t,this.requestUpdate("hasChildren"),this.updateChildTree()}isActionEndEvent(e){return e.composedPath().includes(this.actionSlotWrapperRef.value)}updateAncestorTree(){let e=this.parentTreeItem;if(!(this.selectionMode!=="ancestors"||!e)){if(this.selected){let t=this.el.parentElement,o=Array.from(t?.children),h=o.filter(a=>a.selected);o.length===h.length?(e.selected=!0,e.indeterminate=!1):h.length>0&&(e.indeterminate=!0),Array.from(this.el.querySelectorAll("calcite-tree-item:not([disabled])")).forEach(a=>{a.selected=!0,a.indeterminate=!1})}else if(this.indeterminate){let t=this.parentTreeItem;t.indeterminate=!0}}}actionsEndSlotChangeHandler(e){this.hasEndActions=A(e)}preWillUpdate(){this.depth=0;let e=this.el.closest("calcite-tree");if(!e)return;this.selectionMode=e.selectionMode,this.scale=e.scale||"m",this.lines=e.lines;let t;for(;e&&(t=e.parentElement?.closest("calcite-tree"),t!==e);)e=t,this.depth=this.depth+1}render(){let e=w(this.el)==="rtl",t=this.selectionMode==="single"||this.selectionMode==="children"||this.selectionMode==="single-persist",o=this.selectionMode==="multiple"||this.selectionMode==="multichildren",h=this.selectionMode==="none"&&!this.hasChildren,k=this.hasChildren&&this.indeterminate,a=this.hasChildren||this.selectionMode==="ancestors"?l`<calcite-icon class=${i({[n.chevron]:!0,[s.rtl]:e})} data-test-id=icon .icon=${this.hasChildren?c.chevronRight:c.blank} @click=${this.iconClickHandler} .scale=${d(this.scale)}></calcite-icon>`:null,v=f("default-slot",l`<slot></slot>`),m=this.selectionMode==="ancestors"?l`<div class=${i(n.checkboxContainer)}><calcite-icon class=${i(n.checkbox)} .icon=${this.selected?c.checkSquareF:k?c.minusSquareF:c.square} .scale=${d(this.scale)}></calcite-icon></div>`:null,p=t?c.bulletPoint:o?c.checkmark:h?c.blank:null,L=p?l`<calcite-icon class=${i({[n.bulletPointIcon]:p===c.bulletPoint,[n.checkmarkIcon]:p===c.checkmark,[s.rtl]:e})} .icon=${p} .scale=${d(this.scale)}></calcite-icon>`:null,g=!(this.parentExpanded||this.depth===1),x=this.updateAfterInitialRender&&this.expanded,{hasEndActions:B}=this,H=f("actionsEndSlot",l`<slot name=${q.actionsEnd} @slotchange=${this.actionsEndSlotChangeHandler}></slot>`),F=l`<calcite-icon class=${i(n.iconStart)} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${d(this.scale)}></calcite-icon>`;return this.el.ariaChecked=this.selectionMode==="multiple"||this.selectionMode==="multichildren"||this.selectionMode==="ancestors"?u(this.selected):void 0,this.el.ariaExpanded=this.hasChildren?u(x):void 0,this.el.inert=g,this.el.ariaLive="polite",this.el.ariaSelected=this.selectionMode==="single"||this.selectionMode==="children"||this.selectionMode==="single-persist"?u(this.selected):void 0,this.el.toggleAttribute("calcite-hydrated-hidden",g),this.el.role="treeitem",$(this.el,"tabIndex",this.disabled?-1:0),R({disabled:this.disabled,children:l`<div class=${i({[n.itemExpanded]:x})}><div class=${i(n.nodeAndActionsContainer)}><div class=${i({[n.nodeContainer]:!0,[s.rtl]:e})} data-selection-mode=${this.selectionMode??y}>${a}${L}${m||null}${this.iconStart?F:null}${m?l`<label class=${i(n.checkboxLabel)}>${v}</label>`:v}</div><div class=${i(n.actionsEnd)} .hidden=${!B} ${I(this.actionSlotWrapperRef)}>${H}</div></div><div class=${i({[n.childrenContainer]:!0,[s.rtl]:e})} data-test-id=calcite-tree-children @click=${this.childrenClickHandler} .role=${this.hasChildren?"group":void 0}><slot name=${q.children} @slotchange=${this.handleChildrenSlotChange}></slot></div></div>`})}};M("calcite-tree-item",b);export{b as TreeItem};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.4 */
4
- import{a as p}from"./J2NLU7RP.js";import{a as w}from"./HKVRX5SD.js";import"./D5SFHDV6.js";import"./TLLHA7VC.js";import"./VZVYZPXQ.js";import{A as g}from"./Z6CRZOOK.js";import"./XRJOD24G.js";import{B as d,C as m,D as f,E as h,P as u,g as c,h as l}from"./CSQVLDPF.js";var r={frame:"frame",frameAdvancing:"frame--advancing",frameRetreating:"frame--retreating"},b=c`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{position:relative;display:flex;inline-size:100%;flex:1 1 auto;align-items:stretch;overflow:hidden;background-color:transparent}:host .frame{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;padding:0;animation-name:none;animation-duration:var(--calcite-animation-timing);background-color:var(--calcite-flow-background-color)}:host ::slotted(*){display:none;block-size:100%}:host ::slotted(*[selected]){display:flex}:host .frame--advancing{animation-name:calcite-frame-advance}:host .frame--retreating{animation-name:calcite-frame-retreat}@keyframes calcite-frame-advance{0%{--tw-bg-opacity: .5;transform:translate3d(50px,0,0)}to{--tw-bg-opacity: 1;transform:translateZ(0)}}@keyframes calcite-frame-retreat{0%{--tw-bg-opacity: .5;transform:translate3d(-50px,0,0)}to{--tw-bg-opacity: 1;transform:translateZ(0)}}:host([hidden]){display:none}[hidden]{display:none}`,n=class extends f{constructor(){super(),this.frameRef=d(),this.itemMutationObserver=p("mutation",()=>this.updateItemsAndProps()),this.items=[],this.selectedIndex=-1,this.focusSetter=w()(this),this.flowDirection="standby",this.listen("calciteInternalFlowItemChange",this.handleCalciteInternalFlowItemChange),this.listen("calciteFlowItemBack",this.handleItemBackClick)}static{this.properties={flowDirection:[16,{},{state:!0}],customItemSelectors:1}}static{this.styles=b}async back(){let{items:e,selectedIndex:i}=this,t=e[i],a=e[i-1];if(!t||!a)return;let s=t.beforeBack?t.beforeBack:()=>Promise.resolve();try{await s.call(t)}catch{return}return t.selected=!1,a.selected=!0,a}async setFocus(e){return this.focusSetter(()=>this.items[this.selectedIndex],e)}connectedCallback(){super.connectedCallback(),this.itemMutationObserver?.observe(this.el,{childList:!0,subtree:!0})}willUpdate(e){e.has("flowDirection")&&(this.hasUpdated||this.flowDirection!=="standby")&&this.handleFlowDirectionChange(this.flowDirection)}loaded(){this.updateItemsAndProps()}disconnectedCallback(){super.disconnectedCallback(),this.itemMutationObserver?.disconnect()}async handleFlowDirectionChange(e){e==="standby"||!this.frameRef.value||(await g(this.frameRef.value,e==="retreating"?"calcite-frame-retreat":"calcite-frame-advance"),this.resetFlowDirection())}handleCalciteInternalFlowItemChange(e){e.stopPropagation(),this.updateFlowProps()}async handleItemBackClick(e){if(!e.defaultPrevented)return await this.back(),this.setFocus()}resetFlowDirection(){this.flowDirection="standby"}getFlowDirection(e,i){let t=e>0;return!(e>-1&&i>0)&&!t?"standby":i<e?"retreating":"advancing"}updateItemsAndProps(){let{customItemSelectors:e,el:i}=this,t=Array.from(i.querySelectorAll(`calcite-flow-item${e?`,${e}`:""}`)).filter(a=>a.closest("calcite-flow")===i);this.items=t,this.ensureSelectedFlowItemExists(),this.updateFlowProps()}updateFlowProps(){let{selectedIndex:e,items:i}=this,t=this.findSelectedFlowItemIndex(i);i.forEach((a,s)=>{let o=s===t;o||(a.menuOpen=!1),a.showBackButton=o&&t>0}),t!==-1&&(e!==t&&(this.flowDirection=this.getFlowDirection(e,t)),this.selectedIndex=t)}findSelectedFlowItemIndex(e){let i=e.slice(0).reverse().find(t=>!!t.selected);return e.indexOf(i)}ensureSelectedFlowItemExists(){let{items:e}=this;if(this.findSelectedFlowItemIndex(e)!==-1)return;let t=e[e.length-1];t&&(t.selected=!0)}render(){let{flowDirection:e}=this,i={[r.frame]:!0,[r.frameAdvancing]:e==="advancing",[r.frameRetreating]:e==="retreating"};return l`<div class=${h(i)} ${m(this.frameRef)}><slot></slot></div>`}};u("calcite-flow",n);export{n as Flow};
3
+ v5.0.0-next.6 */
4
+ import{a as p}from"./CZF6KYOX.js";import{a as w}from"./SXK4ATVN.js";import"./6PMY6MUE.js";import"./PCGNN5RO.js";import"./H3GTITDX.js";import{A as g}from"./7DQ4G2FS.js";import"./44XNJNTA.js";import{B as d,C as m,D as f,E as h,P as u,g as c,h as l}from"./2IIGKMQ6.js";var r={frame:"frame",frameAdvancing:"frame--advancing",frameRetreating:"frame--retreating"},b=c`:host{--calcite-internal-color-focus: var( --calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)) )}:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host{position:relative;display:flex;inline-size:100%;flex:1 1 auto;align-items:stretch;overflow:hidden;background-color:transparent}:host .frame{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;padding:0;animation-name:none;animation-duration:var(--calcite-animation-timing);background-color:var(--calcite-flow-background-color)}:host ::slotted(*){display:none;block-size:100%}:host ::slotted(*[selected]){display:flex}:host .frame--advancing{animation-name:calcite-frame-advance}:host .frame--retreating{animation-name:calcite-frame-retreat}@keyframes calcite-frame-advance{0%{--tw-bg-opacity: .5;transform:translate3d(50px,0,0)}to{--tw-bg-opacity: 1;transform:translateZ(0)}}@keyframes calcite-frame-retreat{0%{--tw-bg-opacity: .5;transform:translate3d(-50px,0,0)}to{--tw-bg-opacity: 1;transform:translateZ(0)}}:host([hidden]){display:none}[hidden]{display:none}`,n=class extends f{constructor(){super(),this.frameRef=d(),this.itemMutationObserver=p("mutation",()=>this.updateItemsAndProps()),this.items=[],this.selectedIndex=-1,this.focusSetter=w()(this),this.flowDirection="standby",this.listen("calciteInternalFlowItemChange",this.handleCalciteInternalFlowItemChange),this.listen("calciteFlowItemBack",this.handleItemBackClick)}static{this.properties={flowDirection:[16,{},{state:!0}],customItemSelectors:1}}static{this.styles=b}async back(){let{items:e,selectedIndex:i}=this,t=e[i],a=e[i-1];if(!t||!a)return;let s=t.beforeBack?t.beforeBack:()=>Promise.resolve();try{await s.call(t)}catch{return}return t.selected=!1,a.selected=!0,a}async setFocus(e){return this.focusSetter(()=>this.items[this.selectedIndex],e)}connectedCallback(){super.connectedCallback(),this.itemMutationObserver?.observe(this.el,{childList:!0,subtree:!0})}willUpdate(e){e.has("flowDirection")&&(this.hasUpdated||this.flowDirection!=="standby")&&this.handleFlowDirectionChange(this.flowDirection)}loaded(){this.updateItemsAndProps()}disconnectedCallback(){super.disconnectedCallback(),this.itemMutationObserver?.disconnect()}async handleFlowDirectionChange(e){e==="standby"||!this.frameRef.value||(await g(this.frameRef.value,e==="retreating"?"calcite-frame-retreat":"calcite-frame-advance"),this.resetFlowDirection())}handleCalciteInternalFlowItemChange(e){e.stopPropagation(),this.updateFlowProps()}async handleItemBackClick(e){if(!e.defaultPrevented)return await this.back(),this.setFocus()}resetFlowDirection(){this.flowDirection="standby"}getFlowDirection(e,i){let t=e>0;return!(e>-1&&i>0)&&!t?"standby":i<e?"retreating":"advancing"}updateItemsAndProps(){let{customItemSelectors:e,el:i}=this,t=Array.from(i.querySelectorAll(`calcite-flow-item${e?`,${e}`:""}`)).filter(a=>a.closest("calcite-flow")===i);this.items=t,this.ensureSelectedFlowItemExists(),this.updateFlowProps()}updateFlowProps(){let{selectedIndex:e,items:i}=this,t=this.findSelectedFlowItemIndex(i);i.forEach((a,s)=>{let o=s===t;o||(a.menuOpen=!1),a.showBackButton=o&&t>0}),t!==-1&&(e!==t&&(this.flowDirection=this.getFlowDirection(e,t)),this.selectedIndex=t)}findSelectedFlowItemIndex(e){let i=e.slice(0).reverse().find(t=>!!t.selected);return e.indexOf(i)}ensureSelectedFlowItemExists(){let{items:e}=this;if(this.findSelectedFlowItemIndex(e)!==-1)return;let t=e[e.length-1];t&&(t.selected=!0)}render(){let{flowDirection:e}=this,i={[r.frame]:!0,[r.frameAdvancing]:e==="advancing",[r.frameRetreating]:e==="retreating"};return l`<div class=${h(i)} ${m(this.frameRef)}><slot></slot></div>`}};u("calcite-flow",n);export{n as Flow};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.4 */
3
+ v5.0.0-next.6 */
4
4
  var n={menuActions:"menu-actions",menuTooltip:"menu-tooltip"},o={menu:"ellipsis"},t={container:"container"};export{n as a,o as b,t as c};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright ESRI, All Rights Reserved, unless otherwise specified.
2
2
  See https://github.com/Esri/calcite-design-system/blob/dev/LICENSE.md for details.
3
- v5.0.0-next.4 */
4
- import{C as n,E as o,h as a,l as t}from"./CSQVLDPF.js";var m={validationContainer:"validation-container"},d=()=>{},$=({scale:e,status:s,id:r,icon:l,message:c,ref:i})=>a`<div class=${o(m.validationContainer)} ${n(i||d)}><calcite-input-message aria-live=polite .icon=${l} id=${r??t} .scale=${e} .status=${s}>${c}</calcite-input-message></div>`;export{$ as a};
3
+ v5.0.0-next.6 */
4
+ import{C as n,E as o,h as a,l as t}from"./2IIGKMQ6.js";var m={validationContainer:"validation-container"},d=()=>{},$=({scale:e,status:s,id:r,icon:l,message:c,ref:i})=>a`<div class=${o(m.validationContainer)} ${n(i||d)}><calcite-input-message aria-live=polite .icon=${l} id=${r??t} .scale=${e} .status=${s}>${c}</calcite-input-message></div>`;export{$ as a};