@esri/calcite-components 5.2.0-next.1 → 5.2.0-next.2

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 (213) hide show
  1. package/dist/cdn/{AIWMELGE.js → 2AZU4JLL.js} +1 -1
  2. package/dist/cdn/{DE6F4LEP.js → 2C57GVL7.js} +1 -1
  3. package/dist/cdn/{R66RRO3R.js → 2RCOMSJ4.js} +1 -1
  4. package/dist/cdn/{QUKECT32.js → 2U7LTQ5E.js} +1 -1
  5. package/dist/cdn/{3F6G62ML.js → 3FH6QU7Y.js} +1 -1
  6. package/dist/cdn/{GIWBHPUL.js → 3GSXR65T.js} +1 -1
  7. package/dist/cdn/{Y77IPFJ6.js → 43MK3FDM.js} +1 -1
  8. package/dist/cdn/{XKLVTSH7.js → 45HPDOT4.js} +1 -1
  9. package/dist/cdn/{LLBCU6W2.js → 4AM5CFW2.js} +1 -1
  10. package/dist/cdn/{4DBDLDKL.js → 4C4FXK46.js} +1 -1
  11. package/dist/cdn/{ASL35FGE.js → 4CHUXMKI.js} +1 -1
  12. package/dist/cdn/{PK24O5FM.js → 4PN5ZOFS.js} +1 -1
  13. package/dist/cdn/{CYL77NSA.js → 4XBIPWD2.js} +1 -1
  14. package/dist/cdn/{OMEUUIN3.js → 57I2TDEP.js} +1 -1
  15. package/dist/cdn/{UYY6Z6VK.js → 5EY2EEDX.js} +1 -1
  16. package/dist/cdn/{V4N6LLPL.js → 5GA4KYR2.js} +1 -1
  17. package/dist/cdn/{25KULUYL.js → 5ISZFTOQ.js} +1 -1
  18. package/dist/cdn/{D2F4S4IN.js → 6A4WSEWS.js} +1 -1
  19. package/dist/cdn/{SVIZ25MX.js → 6WR7WF5X.js} +1 -1
  20. package/dist/cdn/{NSFNE7JF.js → 6ZDUL7DM.js} +1 -1
  21. package/dist/cdn/{VINHY2BO.js → 7IOEAAJN.js} +1 -1
  22. package/dist/cdn/{MZGWIJTE.js → 7JMYJBWS.js} +1 -1
  23. package/dist/cdn/{JSEZIWE7.js → 7Q57OJ6S.js} +1 -1
  24. package/dist/cdn/{2QRPMWMD.js → A2QVKNTN.js} +1 -1
  25. package/dist/cdn/{H6TQ2ZT5.js → AA7ZRB5K.js} +1 -1
  26. package/dist/cdn/{JYV5JY66.js → AFNW6NWU.js} +1 -1
  27. package/dist/cdn/AI4EP5I7.js +2 -0
  28. package/dist/cdn/{6WRZDS46.js → AO3S4HXU.js} +1 -1
  29. package/dist/cdn/{TKWNZUZC.js → AOWO3CEE.js} +1 -1
  30. package/dist/cdn/{VOYNOWTM.js → ATPHVTBE.js} +1 -1
  31. package/dist/cdn/{L4Z32DDI.js → AV53YUYO.js} +1 -1
  32. package/dist/cdn/{DXKVNK72.js → B34QFBVX.js} +1 -1
  33. package/dist/cdn/{YEOA76XG.js → B5M44JJO.js} +1 -1
  34. package/dist/cdn/{TOW6FGVT.js → BBQFFEZH.js} +1 -1
  35. package/dist/cdn/{54LRKMZS.js → BDJAXYZ6.js} +1 -1
  36. package/dist/cdn/{FGBYK22Q.js → BETERP4W.js} +1 -1
  37. package/dist/cdn/{VNHCZF5S.js → BUNBY5RM.js} +1 -1
  38. package/dist/cdn/{AYIHFCPW.js → C4VPLSW7.js} +1 -1
  39. package/dist/cdn/{CJ6HLMWM.js → C7C55I5S.js} +1 -1
  40. package/dist/cdn/{XKZW6PMR.js → CAWTUKNX.js} +1 -1
  41. package/dist/cdn/{JQOYQOAO.js → CC6MIBOX.js} +1 -1
  42. package/dist/cdn/{SYWS7CRW.js → CFFCEFZK.js} +1 -1
  43. package/dist/cdn/{AWONW44Y.js → CQ6NGNY6.js} +1 -1
  44. package/dist/cdn/{IQC2I5QX.js → CYCLHZ3A.js} +1 -1
  45. package/dist/cdn/D6PPMEQM.js +2 -0
  46. package/dist/cdn/{EAMIHL5M.js → DI3IXSN2.js} +1 -1
  47. package/dist/cdn/{7BAH3USN.js → DJIJFKYH.js} +1 -1
  48. package/dist/cdn/{MOVYXJPM.js → DJL42XA3.js} +1 -1
  49. package/dist/cdn/{O4JLFLGJ.js → E3RE3E2N.js} +1 -1
  50. package/dist/cdn/{YWSUGSZQ.js → EGQ75QVP.js} +1 -1
  51. package/dist/cdn/{2DTD2NAQ.js → EL7GGALP.js} +1 -1
  52. package/dist/cdn/{DYTBN43V.js → ENNOBBY4.js} +1 -1
  53. package/dist/cdn/{TX53ZOIB.js → EXXGZUR3.js} +1 -1
  54. package/dist/cdn/{OM2LRTKI.js → F25HCCSH.js} +1 -1
  55. package/dist/cdn/{N5V52FVE.js → F7AKW6A4.js} +1 -1
  56. package/dist/cdn/{7MVJZ7CE.js → FEMVD7MC.js} +1 -1
  57. package/dist/cdn/{RSDMKNTP.js → FFUBSUZQ.js} +1 -1
  58. package/dist/cdn/{HPG25RGF.js → FLX6RAXY.js} +1 -1
  59. package/dist/cdn/{ESXXYY4U.js → FPVMYG6A.js} +1 -1
  60. package/dist/cdn/FVB2OZEH.js +2 -0
  61. package/dist/cdn/{JFBAD4EH.js → G4ZSDWUZ.js} +1 -1
  62. package/dist/cdn/{DCQW26QE.js → GBGFI7SS.js} +1 -1
  63. package/dist/cdn/{RX7YQTRT.js → GBNEJ7ZF.js} +1 -1
  64. package/dist/cdn/{ZSURDLTS.js → GGCO6DJE.js} +1 -1
  65. package/dist/cdn/GLH6ZAVP.js +2 -0
  66. package/dist/cdn/{RDJ3NPD2.js → GMY4OPXB.js} +1 -1
  67. package/dist/cdn/{WBEFTFTM.js → GNF44UQG.js} +1 -1
  68. package/dist/cdn/{A7VRJEQ7.js → GOBJFJO6.js} +1 -1
  69. package/dist/cdn/{NLG3XARE.js → GUSPFAZS.js} +1 -1
  70. package/dist/cdn/{GEQANJCK.js → H2JTOLL2.js} +1 -1
  71. package/dist/cdn/{GX22FMPB.js → HBRGGPQS.js} +1 -1
  72. package/dist/cdn/{6P2QCONQ.js → HIXRGJPQ.js} +1 -1
  73. package/dist/cdn/HKIP6O5B.js +2 -0
  74. package/dist/cdn/{MM6ZG6HL.js → I2ZCMXRB.js} +1 -1
  75. package/dist/cdn/I5C2XC5I.js +2 -0
  76. package/dist/cdn/IJZH5BV3.js +2 -0
  77. package/dist/cdn/{ES72YVWM.js → IOBH7Q3C.js} +1 -1
  78. package/dist/cdn/{MIR7TMZV.js → IVJANKWM.js} +1 -1
  79. package/dist/cdn/{ACTWXLMU.js → J32XKCXC.js} +1 -1
  80. package/dist/cdn/{YLSRMNDL.js → JL5V6LHI.js} +1 -1
  81. package/dist/cdn/{EYO37APD.js → JQVKQIWK.js} +1 -1
  82. package/dist/cdn/{NSSVAO6G.js → JW2SKWED.js} +1 -1
  83. package/dist/cdn/{WMJFCYAQ.js → JZCXLE2H.js} +1 -1
  84. package/dist/cdn/{PV5JONG7.js → KPR7F2IQ.js} +1 -1
  85. package/dist/cdn/{GHBTJCIE.js → KQ322MPA.js} +1 -1
  86. package/dist/cdn/{IMHBTKOK.js → KQN3IXDE.js} +1 -1
  87. package/dist/cdn/KRZT7UVD.js +2 -0
  88. package/dist/cdn/{DOQVMLYE.js → KVWHPPP5.js} +1 -1
  89. package/dist/cdn/KZUHKTIQ.js +2 -0
  90. package/dist/cdn/{RJJY3IYM.js → LJJZC4QK.js} +1 -1
  91. package/dist/cdn/{TBBD7RAC.js → LRPJV2DQ.js} +1 -1
  92. package/dist/cdn/{YOMDRGFX.js → LVF7G7IY.js} +1 -1
  93. package/dist/cdn/{4XMK7RES.js → LZDIBXYZ.js} +1 -1
  94. package/dist/cdn/{ERXINDJK.js → MIE7SGGW.js} +1 -1
  95. package/dist/cdn/{VWJDFV4M.js → MNBJJORH.js} +1 -1
  96. package/dist/cdn/{ZOVBFLHG.js → MSB35HIA.js} +1 -1
  97. package/dist/cdn/{5B3SU7K7.js → N7DI6G6M.js} +1 -1
  98. package/dist/cdn/{VOLQZMH5.js → NF3TF2WJ.js} +1 -1
  99. package/dist/cdn/{6SJDD32D.js → NFPHYIMY.js} +1 -1
  100. package/dist/cdn/{7T64APC5.js → OGWGMCYY.js} +1 -1
  101. package/dist/cdn/{FEGURFPP.js → OLCC5YK5.js} +1 -1
  102. package/dist/cdn/{DXJL2WZO.js → OQY72DXY.js} +1 -1
  103. package/dist/cdn/{MDH6YMD3.js → OTKKHBLB.js} +1 -1
  104. package/dist/cdn/{XRGFDJYN.js → PKAYPMQL.js} +1 -1
  105. package/dist/cdn/{CWQ3PMYG.js → PO4GQAOO.js} +1 -1
  106. package/dist/cdn/{BXSBN734.js → PYEU7ILW.js} +1 -1
  107. package/dist/cdn/QIW2VXWS.js +2 -0
  108. package/dist/cdn/{2WQCK6Z3.js → QLMCMCFN.js} +1 -1
  109. package/dist/cdn/{QJVQP6SA.js → QNSEEZF5.js} +1 -1
  110. package/dist/cdn/{T2B7YQBZ.js → QVYX2WRU.js} +1 -1
  111. package/dist/cdn/{PVLYFAFT.js → QXIJOBKX.js} +1 -1
  112. package/dist/cdn/QXVZRQDN.js +2 -0
  113. package/dist/cdn/{W6FGHS7T.js → R2DOA2MN.js} +1 -1
  114. package/dist/cdn/{3IC622AE.js → RC3UVUK3.js} +1 -1
  115. package/dist/cdn/{4ETK64XH.js → RE4YAX46.js} +1 -1
  116. package/dist/cdn/RQVOT4ZO.js +2 -0
  117. package/dist/cdn/{XVA6JBXQ.js → RXXRSLAB.js} +1 -1
  118. package/dist/cdn/{TUOZOBAX.js → S5JJMYDX.js} +1 -1
  119. package/dist/cdn/{GQYGI42P.js → SU44IFYE.js} +1 -1
  120. package/dist/cdn/{AHIMAWOG.js → SVEPQ765.js} +1 -1
  121. package/dist/cdn/{T64D27BK.js → SVIANZ3V.js} +1 -1
  122. package/dist/cdn/{ZALKF7AK.js → T5VR3PV2.js} +1 -1
  123. package/dist/cdn/{JNIRX7D3.js → TD2P54UR.js} +1 -1
  124. package/dist/cdn/{XRQ6ALBW.js → TDOPUO3L.js} +1 -1
  125. package/dist/cdn/{IFGOL2KZ.js → TE3IGQZH.js} +1 -1
  126. package/dist/cdn/{UTYK5GN7.js → TEGKHQ5W.js} +1 -1
  127. package/dist/cdn/{DOTGEOAD.js → TJC3KPVJ.js} +1 -1
  128. package/dist/cdn/{6VJGFXTB.js → TWT5XRCW.js} +1 -1
  129. package/dist/cdn/{3274MQBE.js → U5IWCBXE.js} +1 -1
  130. package/dist/cdn/{7BPZSHP5.js → UMHABPZB.js} +1 -1
  131. package/dist/cdn/{UWEY77AH.js → UOQXEKIF.js} +1 -1
  132. package/dist/cdn/UWAER5W3.js +2 -0
  133. package/dist/cdn/{WJ2DBVDY.js → V3ADMKIU.js} +1 -1
  134. package/dist/cdn/{5BXJCRHG.js → W5TTJ4T3.js} +1 -1
  135. package/dist/cdn/{JAMAODSH.js → W6UFYWVG.js} +1 -1
  136. package/dist/cdn/{6I7CG5ZI.js → W7BKEQCB.js} +1 -1
  137. package/dist/cdn/{SG43VAY2.js → W7DJIM2F.js} +1 -1
  138. package/dist/cdn/{RL3BQHH7.js → WYJ5MJ5T.js} +1 -1
  139. package/dist/cdn/{GPZK2XCA.js → X33GQ3A3.js} +1 -1
  140. package/dist/cdn/{HI5BMWLV.js → XD2JOD4K.js} +1 -1
  141. package/dist/cdn/{DOEPGWZO.js → XNAMWMN5.js} +1 -1
  142. package/dist/cdn/{T6WFAXGK.js → XR4GGZRV.js} +1 -1
  143. package/dist/cdn/XZJNPGQT.js +2 -0
  144. package/dist/cdn/Y3U2N2BQ.js +2 -0
  145. package/dist/cdn/{6DUYQARM.js → YAQRXHHQ.js} +1 -1
  146. package/dist/cdn/{6HQ7WHUL.js → YEFCURY4.js} +1 -1
  147. package/dist/cdn/{4MGZ6ADZ.js → YHD7HKDX.js} +1 -1
  148. package/dist/cdn/{V2ZQL3ON.js → YL4XYPPL.js} +1 -1
  149. package/dist/cdn/{7LKWZYMO.js → YYGQFOZ7.js} +1 -1
  150. package/dist/cdn/{EARL5L6Z.js → ZLOMPF4H.js} +1 -1
  151. package/dist/cdn/index.js +1 -1
  152. package/dist/chunks/openCloseComponent.js +1 -1
  153. package/dist/chunks/resources10.js +19 -0
  154. package/dist/chunks/resources11.js +63 -0
  155. package/dist/chunks/resources5.js +40 -51
  156. package/dist/chunks/resources6.js +24 -46
  157. package/dist/chunks/resources7.js +53 -8
  158. package/dist/chunks/resources8.js +50 -10
  159. package/dist/chunks/resources9.js +7 -53
  160. package/dist/chunks/runtime.js +3 -3
  161. package/dist/chunks/utils.js +9 -15
  162. package/dist/chunks/utils2.js +1 -1
  163. package/dist/components/calcite-block/customElement.d.ts +9 -9
  164. package/dist/components/calcite-block/customElement.js +8 -49
  165. package/dist/components/calcite-block-group/customElement.js +3 -5
  166. package/dist/components/calcite-block-section/customElement.d.ts +5 -5
  167. package/dist/components/calcite-block-section/customElement.js +1 -1
  168. package/dist/components/calcite-button/customElement.d.ts +8 -8
  169. package/dist/components/calcite-button/customElement.js +3 -3
  170. package/dist/components/calcite-chip/customElement.js +1 -27
  171. package/dist/components/calcite-color-picker/customElement.d.ts +3 -3
  172. package/dist/components/calcite-color-picker/customElement.js +23 -20
  173. package/dist/components/calcite-color-picker-hex-input/customElement.d.ts +1 -1
  174. package/dist/components/calcite-color-picker-hex-input/customElement.js +4 -4
  175. package/dist/components/calcite-color-picker-swatch/customElement.d.ts +1 -1
  176. package/dist/components/calcite-color-picker-swatch/customElement.js +1 -1
  177. package/dist/components/calcite-combobox/customElement.js +245 -93
  178. package/dist/components/calcite-dialog/customElement.js +1 -1
  179. package/dist/components/calcite-dropdown-group/customElement.js +1 -1
  180. package/dist/components/calcite-dropdown-item/customElement.js +1 -1
  181. package/dist/components/calcite-flow-item/customElement.js +1 -1
  182. package/dist/components/calcite-input/customElement.js +1 -1
  183. package/dist/components/calcite-input-date-picker/customElement.js +5 -10
  184. package/dist/components/calcite-input-number/customElement.js +1 -1
  185. package/dist/components/calcite-input-text/customElement.js +1 -1
  186. package/dist/components/calcite-input-time-zone/customElement.js +1 -1
  187. package/dist/components/calcite-list/customElement.js +1 -1
  188. package/dist/components/calcite-list-item/customElement.js +1 -1
  189. package/dist/components/calcite-list-item-group/customElement.js +1 -1
  190. package/dist/components/calcite-panel/customElement.js +1 -1
  191. package/dist/components/calcite-stack/customElement.js +1 -1
  192. package/dist/docs/api.json +1 -1
  193. package/dist/docs/docs.json +1 -1
  194. package/dist/docs/web-types.json +1 -1
  195. package/package.json +2 -2
  196. package/dist/cdn/6THNFXTV.js +0 -2
  197. package/dist/cdn/7RTTBZVL.js +0 -2
  198. package/dist/cdn/DHXGSMMN.js +0 -2
  199. package/dist/cdn/DV6Z2ZUP.js +0 -2
  200. package/dist/cdn/JLRS6GUS.js +0 -2
  201. package/dist/cdn/JWZRDSEQ.js +0 -2
  202. package/dist/cdn/OWVDY7XZ.js +0 -2
  203. package/dist/cdn/P7VFZYNM.js +0 -2
  204. package/dist/cdn/POCA3O3T.js +0 -2
  205. package/dist/cdn/S2ACIYIJ.js +0 -2
  206. package/dist/cdn/SKBNA7MO.js +0 -2
  207. package/dist/cdn/WBKHM7GQ.js +0 -2
  208. package/dist/cdn/WWXFCBIC.js +0 -2
  209. /package/dist/cdn/{XJY76HZ5.js → 2QCI6TGY.js} +0 -0
  210. /package/dist/cdn/{O2A6CQZA.js → BLWTCPBG.js} +0 -0
  211. /package/dist/cdn/{5OPFL4DZ.js → KWIC32XQ.js} +0 -0
  212. /package/dist/cdn/{SG5FNFQO.js → Q24FQVQ4.js} +0 -0
  213. /package/dist/cdn/{DE7OTXX2.js → QBJZUEM2.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as B,b as F}from"./XMLFJMMC.js";import{i as $}from"./ESXXYY4U.js";import{a as S}from"./JYV5JY66.js";import{a as E}from"./54LRKMZS.js";import{a as k}from"./OMEUUIN3.js";import"./YP3AYJH3.js";import{a as A}from"./RX7YQTRT.js";import{a as T}from"./CYL77NSA.js";import{a as z}from"./ZWPNZ5XW.js";import"./PK24O5FM.js";import"./JFBAD4EH.js";import{o as x,t as w}from"./UYY6Z6VK.js";import"./T6CCMW7H.js";import{E as g,F as v,G as b,H as o,L as y,S as C,g as p,h as a,p as l}from"./VOYNOWTM.js";var c={slow:14e3,medium:1e4,fast:6e3},r={actionsEnd:"actions-end",title:"title",message:"message",link:"link"},i={actionsEnd:"actions-end",close:"close",container:"container",containerActive:"container--active",dismissProgress:"dismiss-progress",icon:"icon",containerEmbedded:"container--embedded",queueCount:"queue-count",queueCountActive:"queue-count--active",textContainer:"text-container",focused:"focused"},L=300,d=class{constructor(){this.registeredElements=[]}registerElement(e){let{registeredElements:t}=this;if(!t.includes(e)){switch(e.queue){case"immediate":t.unshift(e);break;case"next":t.splice(1,0,e);break;case"last":t.push(e);break}this.updateAlerts()}}unregisterElement(e){let{registeredElements:t}=this,s=t.indexOf(e);s!==-1&&t.splice(s,1),e.active=!1,this.updateAlerts()}updateAlerts(){window.clearTimeout(this.queueTimeoutId),this.queueTimeoutId=void 0,this.registeredElements.forEach((e,t)=>{e.openAlertCount=this.registeredElements.length,t===0?this.queueTimeoutId=window.setTimeout(()=>e.active=!0,L):e.active=!1})}},R=p`:host([scale=s]){--calcite-internal-alert-action-spacing: var(--calcite-spacing-xs)}:host([scale=m]){--calcite-internal-alert-action-spacing: var(--calcite-spacing-xs)}:host([scale=l]){--calcite-internal-alert-action-spacing: var(--calcite-spacing-sm)}:host{display:block;inline-size:var(--calcite-alert-width)}.container--embedded,.container[popover]{pointer-events:none;position:fixed;margin-inline:auto;margin-block:0px;box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:min-content;align-items:center;justify-content:center;padding:0;text-align:start;opacity:0;inset:initial;box-shadow:var(--calcite-alert-shadow, var(--calcite-shadow-md));background-color:var(--calcite-alert-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-alert-corner-radius, var(--calcite-border-radius));border-block-start:0 solid transparent;border-inline:1px solid var(--calcite-color-border-3);border-block-end:1px solid var(--calcite-color-border-3);max-inline-size:calc(100% - var(--calcite-alert-offset-size, 2rem) * 2);transition:opacity var(--calcite-internal-animation-timing-slow) ease-in-out,all var(--calcite-animation-timing) ease-in-out;overflow:visible}.container--bottom,.container--top,.container--bottom[popover],.container--top[popover]{inset-inline-end:0;inset-inline-start:0}.container[class*=bottom]{transform:translate3d(0,var(--calcite-alert-offset-size, 2rem),0);inset-block-end:var(--calcite-alert-offset-size, 2rem)}.container[class*=top]{transform:translate3d(0,calc(-1 * var(--calcite-alert-offset-size, 2rem)),0);inset-block-start:var(--calcite-alert-offset-size, 2rem)}.container[class*=start]{inset-inline-start:var(--calcite-alert-offset-size, 2rem);inset-inline-end:auto}.container[class*=end]{inset-inline-end:var(--calcite-alert-offset-size, 2rem);inset-inline-start:auto}.icon{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;margin-block:auto;margin-inline-end:auto}.close{margin-inline-end:var(--calcite-internal-alert-action-spacing)}.queue-count{visibility:hidden;display:flex;min-inline-size:min-content;cursor:default;align-items:center;justify-content:space-around;align-self:stretch;overflow:hidden;text-align:center;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-2);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;border-inline:0 solid transparent;border-start-end-radius:0}.queue-count--active{visibility:visible;opacity:1}.dismiss-progress{position:absolute;display:block;inline-size:100%;overflow:hidden;inset-inline:0;inset-block-start:-2px;block-size:2px;border-radius:var(--calcite-border-radius) var(--calcite-border-radius) 0 0}.dismiss-progress:after{position:absolute;inset-block-start:0px;display:block;block-size:2px;content:"";background-color:var(--calcite-color-transparent-tint);inset-inline-end:0}.actions-end{display:flex;gap:var(--calcite-internal-alert-action-spacing);padding-block:var(--calcite-internal-alert-action-spacing);padding-inline:0 var(--calcite-internal-alert-action-spacing)}.text-container{box-sizing:border-box;display:flex;min-inline-size:0px;flex:1 1 auto;flex-direction:column;overflow-wrap:break-word}.footer{position:relative;display:flex;inline-size:auto;justify-content:flex-end;align-self:stretch;padding-block-start:1px;block-size:inherit}:host([scale=s]) slot[name=title]::slotted(*),:host([scale=s]) *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) slot[name=message]::slotted(*),:host([scale=s]) *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) slot[name=link]::slotted(*),:host([scale=s]) *::slotted([slot=link]){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) .queue-count{margin-inline:.5rem}:host([scale=s]) .container{--calcite-internal-alert-min-height: 3.5rem;inline-size:var(--calcite-alert-width, 40em)}:host([scale=s]) .icon{padding-inline-start:.75rem}:host([scale=s]) .text-container{padding-block:.5rem;padding-inline:.75rem .5rem}:host([scale=m]) slot[name=title]::slotted(*),:host([scale=m]) *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) slot[name=message]::slotted(*),:host([scale=m]) *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) slot[name=link]::slotted(*),:host([scale=m]) *::slotted([slot=link]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) .queue-count{margin-inline:.75rem}:host([scale=m]) .container{--calcite-internal-alert-min-height: 4.1875rem;inline-size:var(--calcite-alert-width, 50em)}:host([scale=m]) .icon{padding-inline-start:1rem}:host([scale=m]) .text-container{padding-block:.75rem;padding-inline:1rem .75rem}:host([scale=l]) slot[name=title]::slotted(*),:host([scale=l]) *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-lg);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) slot[name=message]::slotted(*),:host([scale=l]) *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) slot[name=link]::slotted(*),:host([scale=l]) *::slotted([slot=link]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) .queue-count{margin-inline:1rem}:host([scale=l]) .container{--calcite-internal-alert-min-height: 5.625rem;inline-size:var(--calcite-alert-width, 60em)}:host([scale=l]) .icon{padding-inline-start:1.25rem}:host([scale=l]) .text-container{padding-block:1rem;padding-inline:1.25rem 1rem}:host([open]) .container--active{border-block-start-width:2px;opacity:1;pointer-events:initial}:host([open]) .container--active[class*=bottom]{transform:translate3d(0,calc(-1 * var(--calcite-alert-offset-size, 2rem)),inherit)}:host([open]) .container--active[class*=top]{transform:translate3d(0,var(--calcite-alert-offset-size, 2rem),inherit)}:host([auto-close])>.queue-count{border-inline-end:0 solid transparent}slot[name=title]::slotted(*),*::slotted([slot=title]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}slot[name=message]::slotted(*),*::slotted([slot=message]){margin:0;display:inline;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug);font-weight:var(--calcite-font-weight-normal);margin-inline-end:.5rem;color:var(--calcite-color-text-2)}slot[name=link]::slotted(*),*::slotted([slot=link]){color:var(--calcite-color-text-link)}slot[name=link]::slotted(:not(calcite-link)){display:inline-flex}:host([kind=brand]) .container{border-block-start-color:var(--calcite-color-brand)}:host([kind=brand]) .container .icon{color:var(--calcite-color-brand)}:host([kind=info]) .container{border-block-start-color:var(--calcite-color-status-info)}:host([kind=info]) .container .icon{color:var(--calcite-color-status-info)}:host([kind=danger]) .container{border-block-start-color:var(--calcite-color-status-danger)}:host([kind=danger]) .container .icon{color:var(--calcite-color-status-danger)}:host([kind=success]) .container{border-block-start-color:var(--calcite-color-status-success)}:host([kind=success]) .container .icon{color:var(--calcite-color-status-success)}:host([kind=warning]) .container{border-block-start-color:var(--calcite-color-status-warning)}:host([kind=warning]) .container .icon{color:var(--calcite-color-status-warning)}:host([auto-close-duration=fast]) .dismiss-progress:after{animation:dismissProgress calc(6s * var(--calcite-internal-duration-factor)) ease-out}:host(:hover[auto-close-duration=fast]) .dismiss-progress:after,:host(:focus[auto-close-duration=fast]) .dismiss-progress:after{animation-play-state:paused}:host([auto-close-duration=medium]) .dismiss-progress:after{animation:dismissProgress calc(10s * var(--calcite-internal-duration-factor)) ease-out}:host(:hover[auto-close-duration=medium]) .dismiss-progress:after,:host(:focus[auto-close-duration=medium]) .dismiss-progress:after{animation-play-state:paused}:host([auto-close-duration=slow]) .dismiss-progress:after{animation:dismissProgress calc(14s * var(--calcite-internal-duration-factor)) ease-out}:host(:hover[auto-close-duration=slow]) .dismiss-progress:after,:host(:focus[auto-close-duration=slow]) .dismiss-progress:after{animation-play-state:paused}.container.focused .dismiss-progress:after{animation-play-state:paused}@keyframes dismissProgress{0%{inline-size:0px;opacity:.75}to{inline-size:100%;opacity:1}}:host([top-layer-disabled]) .container,.container--embedded{z-index:var(--calcite-z-index-toast)}.container--embedded{position:absolute}:host([hidden]){display:none}[hidden]{display:none}:host([calcite-hydrated-hidden]){visibility:hidden!important;pointer-events:none}`,n=new d,u=class extends b{constructor(){super(...arguments),this.initialOpenTime=-1,this.isHovered=!1,this.lastMouseOverBegin=-1,this.transitionProp="opacity",this.totalHoverTime=0,this.totalOpenTime=0,this.transitionRef=g(),this.messages=A(),this.focusSetter=T()(this),this.topLayer=S({disabledOverride:()=>this.embedded,target:this.transitionRef})(this),this.hasEndActions=!1,this.isFocused=!1,this.numberStringFormatter=new $,this.active=!1,this.autoClose=!1,this.autoCloseDuration="medium",this.embedded=!1,this.iconFlipRtl=!1,this.kind="brand",this.open=!1,this.openAlertCount=0,this.placement="bottom",this.queue="last",this.scale="m",this.topLayerDisabled=!1,this.calciteAlertBeforeClose=l({cancelable:!1}),this.calciteAlertBeforeOpen=l({cancelable:!1}),this.calciteAlertClose=l({cancelable:!1}),this.calciteAlertOpen=l({cancelable:!1})}static{this.properties={hasEndActions:[16,{},{state:!0}],isFocused:[16,{},{state:!0}],numberStringFormatter:[16,{},{state:!0}],active:[5,{},{type:Boolean}],autoClose:[7,{},{reflect:!0,type:Boolean}],autoCloseDuration:[3,{},{reflect:!0}],embedded:[7,{},{reflect:!0,type:Boolean}],icon:[3,{converter:y,type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],kind:[3,{},{reflect:!0}],label:1,messageOverrides:[0,{},{attribute:!1}],numberingSystem:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],openAlertCount:[9,{},{type:Number}],placement:[3,{},{reflect:!0}],queue:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=R}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),this.open&&n.registerElement(this.el),this.numberStringFormatter.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,signDisplay:"always"}}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("active")&&(this.hasUpdated||this.active!==!1)&&this.handleActiveChange(),e.has("autoCloseDuration")&&(this.hasUpdated||this.autoCloseDuration!=="medium")&&this.updateDuration(),e.has("queue")&&(this.hasUpdated||this.queue!=="last")&&this.handleQueueChange(),e.has("numberingSystem")&&this.numberingSystemChange(),e.has("messages")&&this.effectiveLocaleChange()}disconnectedCallback(){super.disconnectedCallback(),n.unregisterElement(this.el),this.clearAutoCloseTimeout(),this.embedded=!1}handleActiveChange(){E(this),this.clearAutoCloseTimeout(),this.active&&this.autoClose&&!this.autoCloseTimeoutId&&(this.initialOpenTime=Date.now(),this.autoCloseTimeoutId=window.setTimeout(()=>this.closeAlert(),c[this.autoCloseDuration]))}openHandler(){this.open?n.registerElement(this.el):n.unregisterElement(this.el)}updateDuration(){this.autoClose&&this.autoCloseTimeoutId&&(this.clearAutoCloseTimeout(),this.autoCloseTimeoutId=window.setTimeout(()=>this.closeAlert(),c[this.autoCloseDuration]))}handleQueueChange(){this.open&&(n.unregisterElement(this.el),n.registerElement(this.el))}handleKeyBoardFocus(){this.isFocused=!0,this.handleFocus()}handleKeyBoardBlur(){this.isFocused=!1,this.isHovered||this.handleBlur()}effectiveLocaleChange(){this.numberStringFormatter.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,signDisplay:"always"}}numberingSystemChange(){this.numberStringFormatter.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,signDisplay:"always"}}clearAutoCloseTimeout(){window.clearTimeout(this.autoCloseTimeoutId),this.autoCloseTimeoutId=void 0}closeAlert(){this.open=!1,this.clearAutoCloseTimeout()}onBeforeOpen(){this.calciteAlertBeforeOpen.emit(),this.topLayer.show()}onOpen(){this.calciteAlertOpen.emit()}onBeforeClose(){this.calciteAlertBeforeClose.emit()}onClose(){this.calciteAlertClose.emit(),this.topLayer.hide()}actionsEndSlotChangeHandler(e){this.hasEndActions=w(e)}handleMouseOver(){this.isHovered=!0,this.handleFocus()}handleMouseLeave(){this.isHovered=!1,this.isFocused||this.handleBlur()}handleFocus(){this.clearAutoCloseTimeout(),this.totalOpenTime=Date.now()-this.initialOpenTime,this.lastMouseOverBegin=Date.now()}handleBlur(){let e=Date.now()-this.lastMouseOverBegin,t=c[this.autoCloseDuration]-this.totalOpenTime+this.totalHoverTime;this.totalHoverTime=this.totalHoverTime?e+this.totalHoverTime:e,this.autoCloseTimeoutId=window.setTimeout(()=>this.closeAlert(),t)}render(){let{open:e,autoClose:t,label:s,placement:q,active:h,openAlertCount:D}=this,I=t?"alert":"alertdialog",m=!e,f=x(this.kind==="brand"?B:F,this.icon,this.kind),H=D>1;return this.el.inert=m,this.el.ariaLabel=s,this.el.toggleAttribute("calcite-hydrated-hidden",m),this.el.role=I,a`<div class=${o({[i.container]:!0,[i.containerActive]:h,[`${i.container}--${q}`]:!0,[i.containerEmbedded]:this.embedded,[i.focused]:this.isFocused})} @pointerenter=${this.autoClose&&this.autoCloseTimeoutId?this.handleMouseOver:void 0} @pointerleave=${this.autoClose?this.handleMouseLeave:void 0} .popover=${this.embedded?void 0:"manual"} ${v(this.transitionRef)}>${f&&this.renderIcon(f)||""}<div class=${o(i.textContainer)} @focusin=${this.autoClose&&this.autoCloseTimeoutId?this.handleKeyBoardFocus:void 0} @focusout=${this.autoClose?this.handleKeyBoardBlur:void 0}><slot name=${r.title}></slot><slot name=${r.message}></slot><slot name=${r.link}></slot></div>${this.renderActionsEnd()}${H?this.renderQueueCount():void 0}${this.renderCloseButton()}${e&&h&&t?a`<div class=${o(i.dismissProgress)}></div>`:void 0}</div>`}renderCloseButton(){return a`<calcite-action class=${o(i.close)} icon=x .label=${this.messages.close} @click=${this.closeAlert} @focusin=${this.autoClose?this.handleKeyBoardFocus:void 0} @focusout=${this.autoClose?this.handleKeyBoardBlur:void 0} .scale=${this.scale} .text=${this.messages.close}></calcite-action>`}renderQueueCount(){let{openAlertCount:e}=this,t=e>2?e-1:1,s=this.numberStringFormatter.numberFormatter.format(t);return k("queue-count",a`<div class=${o({[i.queueCount]:!0,[i.queueCountActive]:e>1})}><calcite-chip .label=${s} .scale=${this.scale} .value=${s}>${s}</calcite-chip></div>`)}renderActionsEnd(){return a`<div class=${o(i.actionsEnd)}><slot name=${r.actionsEnd} @slotchange=${this.actionsEndSlotChangeHandler}></slot></div>`}renderIcon(e){return a`<div class=${o(i.icon)}><calcite-icon .flipRtl=${this.iconFlipRtl} .icon=${e} .scale=${z(this.scale)}></calcite-icon></div>`}};C("calcite-alert",u);export{u as Alert};
2
+ import{a as B,b as F}from"./XMLFJMMC.js";import{i as $}from"./FPVMYG6A.js";import{a as S}from"./AFNW6NWU.js";import{a as E}from"./BDJAXYZ6.js";import{a as k}from"./57I2TDEP.js";import"./YP3AYJH3.js";import{a as A}from"./GBNEJ7ZF.js";import{a as T}from"./4XBIPWD2.js";import{a as z}from"./ZWPNZ5XW.js";import"./4PN5ZOFS.js";import"./G4ZSDWUZ.js";import{o as x,t as w}from"./5EY2EEDX.js";import"./T6CCMW7H.js";import{E as g,F as v,G as b,H as o,L as y,S as C,g as p,h as a,p as l}from"./ATPHVTBE.js";var c={slow:14e3,medium:1e4,fast:6e3},r={actionsEnd:"actions-end",title:"title",message:"message",link:"link"},i={actionsEnd:"actions-end",close:"close",container:"container",containerActive:"container--active",dismissProgress:"dismiss-progress",icon:"icon",containerEmbedded:"container--embedded",queueCount:"queue-count",queueCountActive:"queue-count--active",textContainer:"text-container",focused:"focused"},L=300,d=class{constructor(){this.registeredElements=[]}registerElement(e){let{registeredElements:t}=this;if(!t.includes(e)){switch(e.queue){case"immediate":t.unshift(e);break;case"next":t.splice(1,0,e);break;case"last":t.push(e);break}this.updateAlerts()}}unregisterElement(e){let{registeredElements:t}=this,s=t.indexOf(e);s!==-1&&t.splice(s,1),e.active=!1,this.updateAlerts()}updateAlerts(){window.clearTimeout(this.queueTimeoutId),this.queueTimeoutId=void 0,this.registeredElements.forEach((e,t)=>{e.openAlertCount=this.registeredElements.length,t===0?this.queueTimeoutId=window.setTimeout(()=>e.active=!0,L):e.active=!1})}},R=p`:host([scale=s]){--calcite-internal-alert-action-spacing: var(--calcite-spacing-xs)}:host([scale=m]){--calcite-internal-alert-action-spacing: var(--calcite-spacing-xs)}:host([scale=l]){--calcite-internal-alert-action-spacing: var(--calcite-spacing-sm)}:host{display:block;inline-size:var(--calcite-alert-width)}.container--embedded,.container[popover]{pointer-events:none;position:fixed;margin-inline:auto;margin-block:0px;box-sizing:border-box;display:flex;inline-size:100%;min-inline-size:min-content;align-items:center;justify-content:center;padding:0;text-align:start;opacity:0;inset:initial;box-shadow:var(--calcite-alert-shadow, var(--calcite-shadow-md));background-color:var(--calcite-alert-background-color, var(--calcite-color-foreground-1));border-radius:var(--calcite-alert-corner-radius, var(--calcite-border-radius));border-block-start:0 solid transparent;border-inline:1px solid var(--calcite-color-border-3);border-block-end:1px solid var(--calcite-color-border-3);max-inline-size:calc(100% - var(--calcite-alert-offset-size, 2rem) * 2);transition:opacity var(--calcite-internal-animation-timing-slow) ease-in-out,all var(--calcite-animation-timing) ease-in-out;overflow:visible}.container--bottom,.container--top,.container--bottom[popover],.container--top[popover]{inset-inline-end:0;inset-inline-start:0}.container[class*=bottom]{transform:translate3d(0,var(--calcite-alert-offset-size, 2rem),0);inset-block-end:var(--calcite-alert-offset-size, 2rem)}.container[class*=top]{transform:translate3d(0,calc(-1 * var(--calcite-alert-offset-size, 2rem)),0);inset-block-start:var(--calcite-alert-offset-size, 2rem)}.container[class*=start]{inset-inline-start:var(--calcite-alert-offset-size, 2rem);inset-inline-end:auto}.container[class*=end]{inset-inline-end:var(--calcite-alert-offset-size, 2rem);inset-inline-start:auto}.icon{display:flex;flex-direction:column;align-items:center;justify-content:center;padding:0;margin-block:auto;margin-inline-end:auto}.close{margin-inline-end:var(--calcite-internal-alert-action-spacing)}.queue-count{visibility:hidden;display:flex;min-inline-size:min-content;cursor:default;align-items:center;justify-content:space-around;align-self:stretch;overflow:hidden;text-align:center;font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-2);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;border-inline:0 solid transparent;border-start-end-radius:0}.queue-count--active{visibility:visible;opacity:1}.dismiss-progress{position:absolute;display:block;inline-size:100%;overflow:hidden;inset-inline:0;inset-block-start:-2px;block-size:2px;border-radius:var(--calcite-border-radius) var(--calcite-border-radius) 0 0}.dismiss-progress:after{position:absolute;inset-block-start:0px;display:block;block-size:2px;content:"";background-color:var(--calcite-color-transparent-tint);inset-inline-end:0}.actions-end{display:flex;gap:var(--calcite-internal-alert-action-spacing);padding-block:var(--calcite-internal-alert-action-spacing);padding-inline:0 var(--calcite-internal-alert-action-spacing)}.text-container{box-sizing:border-box;display:flex;min-inline-size:0px;flex:1 1 auto;flex-direction:column;overflow-wrap:break-word}.footer{position:relative;display:flex;inline-size:auto;justify-content:flex-end;align-self:stretch;padding-block-start:1px;block-size:inherit}:host([scale=s]) slot[name=title]::slotted(*),:host([scale=s]) *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) slot[name=message]::slotted(*),:host([scale=s]) *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) slot[name=link]::slotted(*),:host([scale=s]) *::slotted([slot=link]){font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=s]) .queue-count{margin-inline:.5rem}:host([scale=s]) .container{--calcite-internal-alert-min-height: 3.5rem;inline-size:var(--calcite-alert-width, 40em)}:host([scale=s]) .icon{padding-inline-start:.75rem}:host([scale=s]) .text-container{padding-block:.5rem;padding-inline:.75rem .5rem}:host([scale=m]) slot[name=title]::slotted(*),:host([scale=m]) *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) slot[name=message]::slotted(*),:host([scale=m]) *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) slot[name=link]::slotted(*),:host([scale=m]) *::slotted([slot=link]){font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=m]) .queue-count{margin-inline:.75rem}:host([scale=m]) .container{--calcite-internal-alert-min-height: 4.1875rem;inline-size:var(--calcite-alert-width, 50em)}:host([scale=m]) .icon{padding-inline-start:1rem}:host([scale=m]) .text-container{padding-block:.75rem;padding-inline:1rem .75rem}:host([scale=l]) slot[name=title]::slotted(*),:host([scale=l]) *::slotted([slot=title]){font-size:var(--calcite-font-size-relative-lg);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) slot[name=message]::slotted(*),:host([scale=l]) *::slotted([slot=message]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) slot[name=link]::slotted(*),:host([scale=l]) *::slotted([slot=link]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug)}:host([scale=l]) .queue-count{margin-inline:1rem}:host([scale=l]) .container{--calcite-internal-alert-min-height: 5.625rem;inline-size:var(--calcite-alert-width, 60em)}:host([scale=l]) .icon{padding-inline-start:1.25rem}:host([scale=l]) .text-container{padding-block:1rem;padding-inline:1.25rem 1rem}:host([open]) .container--active{border-block-start-width:2px;opacity:1;pointer-events:initial}:host([open]) .container--active[class*=bottom]{transform:translate3d(0,calc(-1 * var(--calcite-alert-offset-size, 2rem)),inherit)}:host([open]) .container--active[class*=top]{transform:translate3d(0,var(--calcite-alert-offset-size, 2rem),inherit)}:host([auto-close])>.queue-count{border-inline-end:0 solid transparent}slot[name=title]::slotted(*),*::slotted([slot=title]){font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-relative-snug);font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1)}slot[name=message]::slotted(*),*::slotted([slot=message]){margin:0;display:inline;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-relative-snug);font-weight:var(--calcite-font-weight-normal);margin-inline-end:.5rem;color:var(--calcite-color-text-2)}slot[name=link]::slotted(*),*::slotted([slot=link]){color:var(--calcite-color-text-link)}slot[name=link]::slotted(:not(calcite-link)){display:inline-flex}:host([kind=brand]) .container{border-block-start-color:var(--calcite-color-brand)}:host([kind=brand]) .container .icon{color:var(--calcite-color-brand)}:host([kind=info]) .container{border-block-start-color:var(--calcite-color-status-info)}:host([kind=info]) .container .icon{color:var(--calcite-color-status-info)}:host([kind=danger]) .container{border-block-start-color:var(--calcite-color-status-danger)}:host([kind=danger]) .container .icon{color:var(--calcite-color-status-danger)}:host([kind=success]) .container{border-block-start-color:var(--calcite-color-status-success)}:host([kind=success]) .container .icon{color:var(--calcite-color-status-success)}:host([kind=warning]) .container{border-block-start-color:var(--calcite-color-status-warning)}:host([kind=warning]) .container .icon{color:var(--calcite-color-status-warning)}:host([auto-close-duration=fast]) .dismiss-progress:after{animation:dismissProgress calc(6s * var(--calcite-internal-duration-factor)) ease-out}:host(:hover[auto-close-duration=fast]) .dismiss-progress:after,:host(:focus[auto-close-duration=fast]) .dismiss-progress:after{animation-play-state:paused}:host([auto-close-duration=medium]) .dismiss-progress:after{animation:dismissProgress calc(10s * var(--calcite-internal-duration-factor)) ease-out}:host(:hover[auto-close-duration=medium]) .dismiss-progress:after,:host(:focus[auto-close-duration=medium]) .dismiss-progress:after{animation-play-state:paused}:host([auto-close-duration=slow]) .dismiss-progress:after{animation:dismissProgress calc(14s * var(--calcite-internal-duration-factor)) ease-out}:host(:hover[auto-close-duration=slow]) .dismiss-progress:after,:host(:focus[auto-close-duration=slow]) .dismiss-progress:after{animation-play-state:paused}.container.focused .dismiss-progress:after{animation-play-state:paused}@keyframes dismissProgress{0%{inline-size:0px;opacity:.75}to{inline-size:100%;opacity:1}}:host([top-layer-disabled]) .container,.container--embedded{z-index:var(--calcite-z-index-toast)}.container--embedded{position:absolute}:host([hidden]){display:none}[hidden]{display:none}:host([calcite-hydrated-hidden]){visibility:hidden!important;pointer-events:none}`,n=new d,u=class extends b{constructor(){super(...arguments),this.initialOpenTime=-1,this.isHovered=!1,this.lastMouseOverBegin=-1,this.transitionProp="opacity",this.totalHoverTime=0,this.totalOpenTime=0,this.transitionRef=g(),this.messages=A(),this.focusSetter=T()(this),this.topLayer=S({disabledOverride:()=>this.embedded,target:this.transitionRef})(this),this.hasEndActions=!1,this.isFocused=!1,this.numberStringFormatter=new $,this.active=!1,this.autoClose=!1,this.autoCloseDuration="medium",this.embedded=!1,this.iconFlipRtl=!1,this.kind="brand",this.open=!1,this.openAlertCount=0,this.placement="bottom",this.queue="last",this.scale="m",this.topLayerDisabled=!1,this.calciteAlertBeforeClose=l({cancelable:!1}),this.calciteAlertBeforeOpen=l({cancelable:!1}),this.calciteAlertClose=l({cancelable:!1}),this.calciteAlertOpen=l({cancelable:!1})}static{this.properties={hasEndActions:[16,{},{state:!0}],isFocused:[16,{},{state:!0}],numberStringFormatter:[16,{},{state:!0}],active:[5,{},{type:Boolean}],autoClose:[7,{},{reflect:!0,type:Boolean}],autoCloseDuration:[3,{},{reflect:!0}],embedded:[7,{},{reflect:!0,type:Boolean}],icon:[3,{converter:y,type:String},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],kind:[3,{},{reflect:!0}],label:1,messageOverrides:[0,{},{attribute:!1}],numberingSystem:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],openAlertCount:[9,{},{type:Number}],placement:[3,{},{reflect:!0}],queue:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=R}async setFocus(e){return this.focusSetter(()=>this.el,e)}connectedCallback(){super.connectedCallback(),this.open&&n.registerElement(this.el),this.numberStringFormatter.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,signDisplay:"always"}}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("active")&&(this.hasUpdated||this.active!==!1)&&this.handleActiveChange(),e.has("autoCloseDuration")&&(this.hasUpdated||this.autoCloseDuration!=="medium")&&this.updateDuration(),e.has("queue")&&(this.hasUpdated||this.queue!=="last")&&this.handleQueueChange(),e.has("numberingSystem")&&this.numberingSystemChange(),e.has("messages")&&this.effectiveLocaleChange()}disconnectedCallback(){super.disconnectedCallback(),n.unregisterElement(this.el),this.clearAutoCloseTimeout(),this.embedded=!1}handleActiveChange(){E(this),this.clearAutoCloseTimeout(),this.active&&this.autoClose&&!this.autoCloseTimeoutId&&(this.initialOpenTime=Date.now(),this.autoCloseTimeoutId=window.setTimeout(()=>this.closeAlert(),c[this.autoCloseDuration]))}openHandler(){this.open?n.registerElement(this.el):n.unregisterElement(this.el)}updateDuration(){this.autoClose&&this.autoCloseTimeoutId&&(this.clearAutoCloseTimeout(),this.autoCloseTimeoutId=window.setTimeout(()=>this.closeAlert(),c[this.autoCloseDuration]))}handleQueueChange(){this.open&&(n.unregisterElement(this.el),n.registerElement(this.el))}handleKeyBoardFocus(){this.isFocused=!0,this.handleFocus()}handleKeyBoardBlur(){this.isFocused=!1,this.isHovered||this.handleBlur()}effectiveLocaleChange(){this.numberStringFormatter.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,signDisplay:"always"}}numberingSystemChange(){this.numberStringFormatter.numberFormatOptions={locale:this.messages._lang,numberingSystem:this.numberingSystem,signDisplay:"always"}}clearAutoCloseTimeout(){window.clearTimeout(this.autoCloseTimeoutId),this.autoCloseTimeoutId=void 0}closeAlert(){this.open=!1,this.clearAutoCloseTimeout()}onBeforeOpen(){this.calciteAlertBeforeOpen.emit(),this.topLayer.show()}onOpen(){this.calciteAlertOpen.emit()}onBeforeClose(){this.calciteAlertBeforeClose.emit()}onClose(){this.calciteAlertClose.emit(),this.topLayer.hide()}actionsEndSlotChangeHandler(e){this.hasEndActions=w(e)}handleMouseOver(){this.isHovered=!0,this.handleFocus()}handleMouseLeave(){this.isHovered=!1,this.isFocused||this.handleBlur()}handleFocus(){this.clearAutoCloseTimeout(),this.totalOpenTime=Date.now()-this.initialOpenTime,this.lastMouseOverBegin=Date.now()}handleBlur(){let e=Date.now()-this.lastMouseOverBegin,t=c[this.autoCloseDuration]-this.totalOpenTime+this.totalHoverTime;this.totalHoverTime=this.totalHoverTime?e+this.totalHoverTime:e,this.autoCloseTimeoutId=window.setTimeout(()=>this.closeAlert(),t)}render(){let{open:e,autoClose:t,label:s,placement:q,active:h,openAlertCount:D}=this,I=t?"alert":"alertdialog",m=!e,f=x(this.kind==="brand"?B:F,this.icon,this.kind),H=D>1;return this.el.inert=m,this.el.ariaLabel=s,this.el.toggleAttribute("calcite-hydrated-hidden",m),this.el.role=I,a`<div class=${o({[i.container]:!0,[i.containerActive]:h,[`${i.container}--${q}`]:!0,[i.containerEmbedded]:this.embedded,[i.focused]:this.isFocused})} @pointerenter=${this.autoClose&&this.autoCloseTimeoutId?this.handleMouseOver:void 0} @pointerleave=${this.autoClose?this.handleMouseLeave:void 0} .popover=${this.embedded?void 0:"manual"} ${v(this.transitionRef)}>${f&&this.renderIcon(f)||""}<div class=${o(i.textContainer)} @focusin=${this.autoClose&&this.autoCloseTimeoutId?this.handleKeyBoardFocus:void 0} @focusout=${this.autoClose?this.handleKeyBoardBlur:void 0}><slot name=${r.title}></slot><slot name=${r.message}></slot><slot name=${r.link}></slot></div>${this.renderActionsEnd()}${H?this.renderQueueCount():void 0}${this.renderCloseButton()}${e&&h&&t?a`<div class=${o(i.dismissProgress)}></div>`:void 0}</div>`}renderCloseButton(){return a`<calcite-action class=${o(i.close)} icon=x .label=${this.messages.close} @click=${this.closeAlert} @focusin=${this.autoClose?this.handleKeyBoardFocus:void 0} @focusout=${this.autoClose?this.handleKeyBoardBlur:void 0} .scale=${this.scale} .text=${this.messages.close}></calcite-action>`}renderQueueCount(){let{openAlertCount:e}=this,t=e>2?e-1:1,s=this.numberStringFormatter.numberFormatter.format(t);return k("queue-count",a`<div class=${o({[i.queueCount]:!0,[i.queueCountActive]:e>1})}><calcite-chip .label=${s} .scale=${this.scale} .value=${s}>${s}</calcite-chip></div>`)}renderActionsEnd(){return a`<div class=${o(i.actionsEnd)}><slot name=${r.actionsEnd} @slotchange=${this.actionsEndSlotChangeHandler}></slot></div>`}renderIcon(e){return a`<div class=${o(i.icon)}><calcite-icon .flipRtl=${this.iconFlipRtl} .icon=${e} .scale=${z(this.scale)}></calcite-icon></div>`}};C("calcite-alert",u);export{u as Alert};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{c as r}from"./XJY76HZ5.js";import{a as o}from"./QUKECT32.js";import"./PK24O5FM.js";import"./JFBAD4EH.js";import{G as n,H as i,S as s,g as l,h as c,p as t}from"./VOYNOWTM.js";var d={container:"container",heading:"heading"},g=l`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column}:host([filter-hidden]){display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{margin:0;display:flex;flex:1 1 0%;position:sticky;inset-block-start:var(--calcite-internal-filter-enabled-offset, 0);z-index:var(--calcite-z-index-sticky);background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1));color:var(--calcite-list-color, var(--calcite-color-text-1))}.heading{font-weight:var(--calcite-font-weight-bold)}:host([scale=s]) .container{padding-inline:var(--calcite-spacing-sm)}:host([scale=s]) .heading{font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-fixed-base);padding-block:var(--calcite-spacing-sm) var(--calcite-spacing-xxs)}:host([scale=s]:not(:first-child)) .container{padding-block-start:var(--calcite-spacing-sm)}:host([scale=m]) .container{padding-inline:var(--calcite-spacing-md)}:host([scale=m]) .heading{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-fixed-base);padding-block:var(--calcite-spacing-lg) var(--calcite-spacing-sm)}:host([scale=m]:not(:first-child)) .container{padding-block-start:var(--calcite-spacing-md)}:host([scale=l]) .container{padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .heading{font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-fixed-lg);padding-block:var(--calcite-spacing-xl) var(--calcite-spacing-sm-plus, .625rem)}:host([scale=l]:not(:first-child)) .container{padding-block-start:var(--calcite-spacing-md-plus, .875rem)}.heading{padding:0}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends n{constructor(){super(...arguments),this.interactiveContainer=o(this),this.disabled=!1,this.filterHidden=!1,this.scale="m",this.calciteInternalListItemGroupDefaultSlotChange=t({cancelable:!1}),this.calciteInternalListItemGroupChange=t({cancelable:!1})}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],filterHidden:[7,{},{reflect:!0,type:Boolean}],heading:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=g}willUpdate(e){e.has("heading")&&this.calciteInternalListItemGroupChange.emit()}handleDefaultSlotChange(){this.calciteInternalListItemGroupDefaultSlotChange.emit()}render(){let{disabled:e,heading:h}=this;return this.interactiveContainer({disabled:e,children:c`<div class=${i(d.container)} role=row><div .ariaColSpan=${r} class=${i(d.heading)} role=cell>${h}</div></div><slot @slotchange=${this.handleDefaultSlotChange}></slot>`})}};s("calcite-list-item-group",a);export{a as ListItemGroup};
2
+ import{c as r}from"./2QCI6TGY.js";import{a as o}from"./2U7LTQ5E.js";import"./4PN5ZOFS.js";import"./G4ZSDWUZ.js";import{G as n,H as i,S as s,g as l,h as c,p as t}from"./ATPHVTBE.js";var d={container:"container",heading:"heading"},g=l`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:flex;flex-direction:column}:host([filter-hidden]){display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{margin:0;display:flex;flex:1 1 0%;position:sticky;inset-block-start:var(--calcite-internal-filter-enabled-offset, 0);z-index:var(--calcite-z-index-sticky);background-color:var(--calcite-list-background-color, var(--calcite-color-foreground-1));color:var(--calcite-list-color, var(--calcite-color-text-1))}.heading{font-weight:var(--calcite-font-weight-bold)}:host([scale=s]) .container{padding-inline:var(--calcite-spacing-sm)}:host([scale=s]) .heading{font-size:var(--calcite-font-size-sm);line-height:var(--calcite-font-line-height-fixed-base);padding-block:var(--calcite-spacing-sm) var(--calcite-spacing-xxs)}:host([scale=s]:not(:first-child)) .container{padding-block-start:var(--calcite-spacing-sm)}:host([scale=m]) .container{padding-inline:var(--calcite-spacing-md)}:host([scale=m]) .heading{font-size:var(--calcite-font-size);line-height:var(--calcite-font-line-height-fixed-base);padding-block:var(--calcite-spacing-lg) var(--calcite-spacing-sm)}:host([scale=m]:not(:first-child)) .container{padding-block-start:var(--calcite-spacing-md)}:host([scale=l]) .container{padding-inline:var(--calcite-spacing-lg)}:host([scale=l]) .heading{font-size:var(--calcite-font-size-md);line-height:var(--calcite-font-line-height-fixed-lg);padding-block:var(--calcite-spacing-xl) var(--calcite-spacing-sm-plus, .625rem)}:host([scale=l]:not(:first-child)) .container{padding-block-start:var(--calcite-spacing-md-plus, .875rem)}.heading{padding:0}:host([hidden]){display:none}[hidden]{display:none}`,a=class extends n{constructor(){super(...arguments),this.interactiveContainer=o(this),this.disabled=!1,this.filterHidden=!1,this.scale="m",this.calciteInternalListItemGroupDefaultSlotChange=t({cancelable:!1}),this.calciteInternalListItemGroupChange=t({cancelable:!1})}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],filterHidden:[7,{},{reflect:!0,type:Boolean}],heading:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}]}}static{this.styles=g}willUpdate(e){e.has("heading")&&this.calciteInternalListItemGroupChange.emit()}handleDefaultSlotChange(){this.calciteInternalListItemGroupDefaultSlotChange.emit()}render(){let{disabled:e,heading:h}=this;return this.interactiveContainer({disabled:e,children:c`<div class=${i(d.container)} role=row><div .ariaColSpan=${r} class=${i(d.heading)} role=cell>${h}</div></div><slot @slotchange=${this.handleDefaultSlotChange}></slot>`})}};s("calcite-list-item-group",a);export{a as ListItemGroup};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{b as p,f}from"./QVYX2WRU.js";function e(r){if(r==null)return"";if(typeof r=="string")return r;if(Array.isArray(r))return r.map(e).join(",");let o=String(r);return o==="0"&&Object.is(Number(r),-0)?"-0":o}function m(r){return f(e(r))}function x(r,o=p){if(r==null)return r;for(let t in r)if(o(r[t],t,r)===!1)break;return r}export{x as a,m as b};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{b as R}from"./GZZYSINJ.js";import{a as V}from"./YP3AYJH3.js";import{b as q}from"./PK24O5FM.js";import{g as F,i as I,w as U,x as X}from"./UYY6Z6VK.js";var he=o=>{let{manager:a}=o;return q((i,c)=>{let u,f,E=l=>!!(l&&i.referenceElementType),C=l=>{E(l)&&(a.registerElement(i,l),f=l)},v=l=>{E(l)&&(a.unregisterElement(i,l),f===l&&(f=void 0))},p=l=>{let{referenceElement:g,el:w}=l;return(typeof g=="string"?I(w,{id:g}):g)||void 0},m=(l=!0)=>{if(!i.referenceElementType)return;i.referenceEl=p(i);let{el:g,referenceElement:w,referenceEl:H}=i;l&&w&&!H&&console.warn(`${g.tagName}: reference-element id "${w}" was not found.`,{el:g})};c.onConnected(()=>{u=requestAnimationFrame(()=>{i.el.isConnected&&(m(i.manager.loadedCalled),C(i.referenceEl))})}),c.onLoaded(()=>{i.referenceElement&&!i.referenceEl&&m()}),c.onUpdate(l=>{i.hasUpdated&&(l.has("referenceElement")&&m(),l.has("referenceEl")?(v(l.get("referenceEl")),C(i.referenceEl)):l.has("open")&&a.updateElement(i,i.referenceEl))}),c.onDisconnected(()=>{u!=null&&(cancelAnimationFrame(u),u=void 0),v(f)})})};function z(o,a){if(o===a)return!0;if(o.length!==a.length)return!1;let i=new Set(o),c=new Set(a);if(i.size!==c.size)return!1;for(let u of i)if(!c.has(u))return!1;return!0}var ae=5,T=300,ce=T/3,de=T*1.5;function ue({startX:o,startY:a,endX:i,endY:c}){return Math.hypot(i-o,c-a)>ae}var we=o=>{let a=new Map,i=new WeakMap,c=null,u=null,f=null,E=null,C=null,v=null,p=0,m=(e,n)=>{let t=e.find(s=>a.has(s));if(!t)return;let r=a.get(t);return n?r?.filter(s=>s.referenceElementType===n):r},l=(e,n)=>{let t=e.composedPath(),r=m(t,n);r?.forEach(s=>{s&&!s.triggerDisabled&&(s.open=!s.open)}),Array.from(a.values()).flat().filter(s=>!r?.includes(s)&&s.autoClose&&s.open&&!t.includes(s.el)).forEach(s=>s.open=!1)},g=e=>{X(e)||e.defaultPrevented||v&&ue({endY:e.clientY,endX:e.clientX,startY:v.y,startX:v.x})||(v=null,l(e,"click"))},w=()=>{E!=null&&window.clearTimeout(E),E=null},H=()=>{f!=null&&window.clearTimeout(f),f=null},h=()=>{w(),H()},D=(e,n)=>c?.some(t=>t?.open&&n.includes(t.el))||e?.some(t=>t?.open&&n.includes(t.el)),k=(e,n)=>{e?.forEach(t=>t.open=n),c=n?e:null},y=()=>{k(c,!1)},$=e=>{if(e.key==="Escape"&&!e.defaultPrevented){let n=c?.filter(t=>t?.open);if(n?.length){h(),y();let t=e.composedPath();n.some(r=>r.referenceEl instanceof Element&&t.includes(r.referenceEl)||t.includes(r.el))&&e.preventDefault()}}},j=e=>{if(e.defaultPrevented)return;u=null;let n=e.composedPath(),t=m(n,"hover");if(D(t,n)){h();return}if(y(),!t?.length)return;h();let r=t.filter(d=>d.closeOnClick),s=t.filter(d=>!d.closeOnClick);r?.length&&(u=r,k(r,!1)),k(s,!0)},x=e=>{if(e.defaultPrevented||!U(e))return;let{clientX:n,clientY:t}=e;v={x:n,y:t}},G=e=>{e.defaultPrevented||(e.key==="Escape"?W():V(e.key)&&l(e,"click"))},Q=e=>{m(e.composedPath())?.forEach(t=>t.onReferenceElementKeyDown?.(e))},W=()=>{Array.from(a.values()).flat().forEach(e=>e.open=!1)},O=e=>{z(e??[],c??[])||y()},J=e=>{E=window.setTimeout(()=>{E===null||!z(e??[],C??[])||(H(),O(e),k(e,!0))},c?.some(n=>n.open)?ce:T)},S=()=>{f=window.setTimeout(()=>{f!==null&&y()},de)},b=e=>{if(e.defaultPrevented){y();return}let n=e.composedPath(),t=m(n,"hover");if(D(t,n)){h();return}t?.some(r=>u?.includes(r))||(t?.some(r=>C?.includes(r))||w(),C=t,t?.length?J(t):c?.some(r=>r?.open)&&S(),u=null)},A=()=>{y()},M=e=>{e.defaultPrevented||(h(),S())},_=e=>{o.click&&g(e),o.hover&&j(e)},B=e=>{Q(e),o.click&&G(e),o.hover&&$(e)},Z=()=>{(o.click||o.hover)&&(window.addEventListener("click",_),window.addEventListener("keydown",B)),o.click&&window.addEventListener("pointerdown",x),o.hover&&(window.addEventListener("pointermove",b),window.addEventListener("focusin",P),window.addEventListener("blur",A),document.addEventListener("pointerleave",M))},ee=()=>{(o.click||o.hover)&&(window.removeEventListener("click",_),window.removeEventListener("keydown",B)),o.click&&window.removeEventListener("pointerdown",x),o.hover&&(window.removeEventListener("pointermove",b),window.removeEventListener("focusin",P),window.removeEventListener("blur",A),document.removeEventListener("pointerleave",M))},ne=(e,n)=>{h(),k(e,n)},Y=e=>e instanceof Element?F(e):null,P=e=>{if(e.defaultPrevented)return;let n=e.composedPath(),t=m(n,"hover");if(D(t,n)){h();return}t?.some(r=>u?.includes(r))||(u=null,O(t),t?.length&&ne(t,!0))},K=(e,n)=>{if(!(!n||!e.referenceElementType)&&o.click&&"ariaExpanded"in n){let r=(a.get(n)??[])?.some(s=>s.open)??!1;n.ariaExpanded=R(e.open||r)}},te=e=>{e.addEventListener("focusin",P)},re=e=>{e.removeEventListener("focusin",P)},se=e=>{let n=i.get(e),t=(typeof n=="number"?n:0)+1;t===1&&te(e),i.set(e,t)},oe=e=>{let n=i.get(e),t=typeof n=="number"?n:0,r=Math.max(0,t-1);if(t>0&&r===0){re(e),i.delete(e);return}r>0&&i.set(e,r)},ie=(e,n)=>{if(!n||!e.referenceElementType)return;let t=a.get(n)??[];if(t.includes(e))return;if(o.click&&"ariaControlsElements"in n){let s=n.ariaControlsElements??[];if(!s.includes(e.el)){let d=[...s,e.el];n.ariaControlsElements=d}}if(o.hover&&"ariaDescribedByElements"in n){let s=n.ariaDescribedByElements??[];if(!s.includes(e.el)){let d=[...s,e.el];n.ariaDescribedByElements=d}}p++,a.set(n,[...t,e]);let r=o.hover?Y(n):null;r&&se(r),p===1&&Z(),K(e,n)},N=e=>{p--,e&&oe(e)};return{registerElement:ie,unregisterElement:(e,n)=>{if(!n||!e.referenceElementType)return;let t=o.hover?Y(n):null,r=a.get(n)??[],s=r.filter(d=>d!==e);if(s.length>0?(a.set(n,s),s.length!==r.length&&N(t)):a.delete(n)&&N(t),p===0&&(ee(),h()),o.click&&"ariaControlsElements"in n){let d=n.ariaControlsElements?.filter(L=>L!==e.el);n.ariaControlsElements=d?.length>0?d:null}if(o.click&&"ariaExpanded"in n)if((s?.length??0)>0){let L=s?.some(le=>le.open)??!1;n.ariaExpanded=R(L)}else n.ariaExpanded=null;if(o.hover&&"ariaDescribedByElements"in n){let d=n.ariaDescribedByElements?.filter(L=>L!==e.el);n.ariaDescribedByElements=d?.length>0?d:null}},updateElement:K}};export{he as a,we as b};
2
+ import{b as R}from"./GZZYSINJ.js";import{a as V}from"./YP3AYJH3.js";import{b as q}from"./4PN5ZOFS.js";import{g as F,i as I,w as U,x as X}from"./5EY2EEDX.js";var he=o=>{let{manager:a}=o;return q((i,c)=>{let u,f,E=l=>!!(l&&i.referenceElementType),C=l=>{E(l)&&(a.registerElement(i,l),f=l)},v=l=>{E(l)&&(a.unregisterElement(i,l),f===l&&(f=void 0))},p=l=>{let{referenceElement:g,el:w}=l;return(typeof g=="string"?I(w,{id:g}):g)||void 0},m=(l=!0)=>{if(!i.referenceElementType)return;i.referenceEl=p(i);let{el:g,referenceElement:w,referenceEl:H}=i;l&&w&&!H&&console.warn(`${g.tagName}: reference-element id "${w}" was not found.`,{el:g})};c.onConnected(()=>{u=requestAnimationFrame(()=>{i.el.isConnected&&(m(i.manager.loadedCalled),C(i.referenceEl))})}),c.onLoaded(()=>{i.referenceElement&&!i.referenceEl&&m()}),c.onUpdate(l=>{i.hasUpdated&&(l.has("referenceElement")&&m(),l.has("referenceEl")?(v(l.get("referenceEl")),C(i.referenceEl)):l.has("open")&&a.updateElement(i,i.referenceEl))}),c.onDisconnected(()=>{u!=null&&(cancelAnimationFrame(u),u=void 0),v(f)})})};function z(o,a){if(o===a)return!0;if(o.length!==a.length)return!1;let i=new Set(o),c=new Set(a);if(i.size!==c.size)return!1;for(let u of i)if(!c.has(u))return!1;return!0}var ae=5,T=300,ce=T/3,de=T*1.5;function ue({startX:o,startY:a,endX:i,endY:c}){return Math.hypot(i-o,c-a)>ae}var we=o=>{let a=new Map,i=new WeakMap,c=null,u=null,f=null,E=null,C=null,v=null,p=0,m=(e,n)=>{let t=e.find(s=>a.has(s));if(!t)return;let r=a.get(t);return n?r?.filter(s=>s.referenceElementType===n):r},l=(e,n)=>{let t=e.composedPath(),r=m(t,n);r?.forEach(s=>{s&&!s.triggerDisabled&&(s.open=!s.open)}),Array.from(a.values()).flat().filter(s=>!r?.includes(s)&&s.autoClose&&s.open&&!t.includes(s.el)).forEach(s=>s.open=!1)},g=e=>{X(e)||e.defaultPrevented||v&&ue({endY:e.clientY,endX:e.clientX,startY:v.y,startX:v.x})||(v=null,l(e,"click"))},w=()=>{E!=null&&window.clearTimeout(E),E=null},H=()=>{f!=null&&window.clearTimeout(f),f=null},h=()=>{w(),H()},D=(e,n)=>c?.some(t=>t?.open&&n.includes(t.el))||e?.some(t=>t?.open&&n.includes(t.el)),k=(e,n)=>{e?.forEach(t=>t.open=n),c=n?e:null},y=()=>{k(c,!1)},$=e=>{if(e.key==="Escape"&&!e.defaultPrevented){let n=c?.filter(t=>t?.open);if(n?.length){h(),y();let t=e.composedPath();n.some(r=>r.referenceEl instanceof Element&&t.includes(r.referenceEl)||t.includes(r.el))&&e.preventDefault()}}},j=e=>{if(e.defaultPrevented)return;u=null;let n=e.composedPath(),t=m(n,"hover");if(D(t,n)){h();return}if(y(),!t?.length)return;h();let r=t.filter(d=>d.closeOnClick),s=t.filter(d=>!d.closeOnClick);r?.length&&(u=r,k(r,!1)),k(s,!0)},x=e=>{if(e.defaultPrevented||!U(e))return;let{clientX:n,clientY:t}=e;v={x:n,y:t}},G=e=>{e.defaultPrevented||(e.key==="Escape"?W():V(e.key)&&l(e,"click"))},Q=e=>{m(e.composedPath())?.forEach(t=>t.onReferenceElementKeyDown?.(e))},W=()=>{Array.from(a.values()).flat().forEach(e=>e.open=!1)},O=e=>{z(e??[],c??[])||y()},J=e=>{E=window.setTimeout(()=>{E===null||!z(e??[],C??[])||(H(),O(e),k(e,!0))},c?.some(n=>n.open)?ce:T)},S=()=>{f=window.setTimeout(()=>{f!==null&&y()},de)},b=e=>{if(e.defaultPrevented){y();return}let n=e.composedPath(),t=m(n,"hover");if(D(t,n)){h();return}t?.some(r=>u?.includes(r))||(t?.some(r=>C?.includes(r))||w(),C=t,t?.length?J(t):c?.some(r=>r?.open)&&S(),u=null)},A=()=>{y()},M=e=>{e.defaultPrevented||(h(),S())},_=e=>{o.click&&g(e),o.hover&&j(e)},B=e=>{Q(e),o.click&&G(e),o.hover&&$(e)},Z=()=>{(o.click||o.hover)&&(window.addEventListener("click",_),window.addEventListener("keydown",B)),o.click&&window.addEventListener("pointerdown",x),o.hover&&(window.addEventListener("pointermove",b),window.addEventListener("focusin",P),window.addEventListener("blur",A),document.addEventListener("pointerleave",M))},ee=()=>{(o.click||o.hover)&&(window.removeEventListener("click",_),window.removeEventListener("keydown",B)),o.click&&window.removeEventListener("pointerdown",x),o.hover&&(window.removeEventListener("pointermove",b),window.removeEventListener("focusin",P),window.removeEventListener("blur",A),document.removeEventListener("pointerleave",M))},ne=(e,n)=>{h(),k(e,n)},Y=e=>e instanceof Element?F(e):null,P=e=>{if(e.defaultPrevented)return;let n=e.composedPath(),t=m(n,"hover");if(D(t,n)){h();return}t?.some(r=>u?.includes(r))||(u=null,O(t),t?.length&&ne(t,!0))},K=(e,n)=>{if(!(!n||!e.referenceElementType)&&o.click&&"ariaExpanded"in n){let r=(a.get(n)??[])?.some(s=>s.open)??!1;n.ariaExpanded=R(e.open||r)}},te=e=>{e.addEventListener("focusin",P)},re=e=>{e.removeEventListener("focusin",P)},se=e=>{let n=i.get(e),t=(typeof n=="number"?n:0)+1;t===1&&te(e),i.set(e,t)},oe=e=>{let n=i.get(e),t=typeof n=="number"?n:0,r=Math.max(0,t-1);if(t>0&&r===0){re(e),i.delete(e);return}r>0&&i.set(e,r)},ie=(e,n)=>{if(!n||!e.referenceElementType)return;let t=a.get(n)??[];if(t.includes(e))return;if(o.click&&"ariaControlsElements"in n){let s=n.ariaControlsElements??[];if(!s.includes(e.el)){let d=[...s,e.el];n.ariaControlsElements=d}}if(o.hover&&"ariaDescribedByElements"in n){let s=n.ariaDescribedByElements??[];if(!s.includes(e.el)){let d=[...s,e.el];n.ariaDescribedByElements=d}}p++,a.set(n,[...t,e]);let r=o.hover?Y(n):null;r&&se(r),p===1&&Z(),K(e,n)},N=e=>{p--,e&&oe(e)};return{registerElement:ie,unregisterElement:(e,n)=>{if(!n||!e.referenceElementType)return;let t=o.hover?Y(n):null,r=a.get(n)??[],s=r.filter(d=>d!==e);if(s.length>0?(a.set(n,s),s.length!==r.length&&N(t)):a.delete(n)&&N(t),p===0&&(ee(),h()),o.click&&"ariaControlsElements"in n){let d=n.ariaControlsElements?.filter(L=>L!==e.el);n.ariaControlsElements=d?.length>0?d:null}if(o.click&&"ariaExpanded"in n)if((s?.length??0)>0){let L=s?.some(le=>le.open)??!1;n.ariaExpanded=R(L)}else n.ariaExpanded=null;if(o.hover&&"ariaDescribedByElements"in n){let d=n.ariaDescribedByElements?.filter(L=>L!==e.el);n.ariaDescribedByElements=d?.length>0?d:null}},updateElement:K}};export{he as a,we as b};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{e as G,f as T,g as W}from"./7HV3O3DF.js";import{d as O}from"./QVYX2WRU.js";var L={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(let t in L)Object.freeze(L[t]);var M=Object.freeze(L);var P=Object.create(null);for(let t in M)Object.hasOwn(M,t)&&(P[M[t]]=t);var m={to:{},get:{}};m.get=function(t){let e=t.slice(0,3).toLowerCase(),n,r;switch(e){case"hsl":{n=m.get.hsl(t),r="hsl";break}case"hwb":{n=m.get.hwb(t),r="hwb";break}default:{n=m.get.rgb(t),r="rgb";break}}return n?{model:r,value:n}:null};m.get.rgb=function(t){if(!t)return null;let e=/^#([a-f\d]{3,4})$/i,n=/^#([a-f\d]{6})([a-f\d]{2})?$/i,r=/^rgba?\(\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)(?=[\s,])\s*(?:,\s*)?([+-]?(?:\d*\.)?\d+(?:e\d+)?)\s*(?:[\s,|/]\s*([+-]?(?:\d*\.)?\d+(?:e\d+)?)(%?)\s*)?\)$/i,o=/^rgba?\(\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[\s,|/]\s*([+-]?[\d.]+)(%?)\s*)?\)$/i,a=/^(\w+)$/,s=[0,0,0,1],l,i,h;if(l=t.match(n)){for(h=l[2],l=l[1],i=0;i<3;i++){let p=i*2;s[i]=Number.parseInt(l.slice(p,p+2),16)}h&&(s[3]=Number.parseInt(h,16)/255)}else if(l=t.match(e)){for(l=l[1],h=l[3],i=0;i<3;i++)s[i]=Number.parseInt(l[i]+l[i],16);h&&(s[3]=Number.parseInt(h+h,16)/255)}else if(l=t.match(r)){for(i=0;i<3;i++)s[i]=Number.parseFloat(l[i+1]);l[4]&&(s[3]=l[5]?Number.parseFloat(l[4])*.01:Number.parseFloat(l[4]))}else if(l=t.match(o)){for(i=0;i<3;i++)s[i]=Math.round(Number.parseFloat(l[i+1])*2.55);l[4]&&(s[3]=l[5]?Number.parseFloat(l[4])*.01:Number.parseFloat(l[4]))}else return(l=t.toLowerCase().match(a))?l[1]==="transparent"?[0,0,0,0]:Object.hasOwn(M,l[1])?(s=M[l[1]].slice(),s[3]=1,s):null:null;for(i=0;i<3;i++)s[i]=v(s[i],0,255);return s[3]=v(s[3],0,1),s};m.get.hsl=function(t){if(!t)return null;let e=/^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d.]+)%\s*,?\s*([+-]?[\d.]+)%\s*(?:[,|/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,n=t.match(e);if(n){let r=Number.parseFloat(n[4]),o=(Number.parseFloat(n[1])%360+360)%360,a=v(Number.parseFloat(n[2]),0,100),s=v(Number.parseFloat(n[3]),0,100),l=v(Number.isNaN(r)?1:r,0,1);return[o,a,s,l]}return null};m.get.hwb=function(t){if(!t)return null;let e=/^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*[\s,]\s*([+-]?[\d.]+)%\s*[\s,]\s*([+-]?[\d.]+)%\s*(?:[\s,]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:e[+-]?\d+)?)\s*)?\)$/i,n=t.match(e);if(n){let r=Number.parseFloat(n[4]),o=(Number.parseFloat(n[1])%360+360)%360,a=v(Number.parseFloat(n[2]),0,100),s=v(Number.parseFloat(n[3]),0,100),l=v(Number.isNaN(r)?1:r,0,1);return[o,a,s,l]}return null};m.to.hex=function(...t){return"#"+N(t[0])+N(t[1])+N(t[2])+(t[3]<1?N(Math.round(t[3]*255)):"")};m.to.rgb=function(...t){return t.length<4||t[3]===1?"rgb("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+")":"rgba("+Math.round(t[0])+", "+Math.round(t[1])+", "+Math.round(t[2])+", "+t[3]+")"};m.to.rgb.percent=function(...t){let e=Math.round(t[0]/255*100),n=Math.round(t[1]/255*100),r=Math.round(t[2]/255*100);return t.length<4||t[3]===1?"rgb("+e+"%, "+n+"%, "+r+"%)":"rgba("+e+"%, "+n+"%, "+r+"%, "+t[3]+")"};m.to.hsl=function(...t){return t.length<4||t[3]===1?"hsl("+t[0]+", "+t[1]+"%, "+t[2]+"%)":"hsla("+t[0]+", "+t[1]+"%, "+t[2]+"%, "+t[3]+")"};m.to.hwb=function(...t){let e="";return t.length>=4&&t[3]!==1&&(e=", "+t[3]),"hwb("+t[0]+", "+t[1]+"%, "+t[2]+"%"+e+")"};m.to.keyword=function(...t){return P[t.slice(0,3)]};function v(t,e,n){return Math.min(Math.max(e,t),n)}function N(t){let e=Math.round(t).toString(16).toUpperCase();return e.length<2?"0"+e:e}var S=m;var z={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]};for(let t in z)Object.freeze(z[t]);var x=Object.freeze(z);var j={};for(let t of Object.keys(x))j[x[t]]=t;var c={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},oklab:{channels:3,labels:["okl","oka","okb"]},lch:{channels:3,labels:"lch"},oklch:{channels:3,labels:["okl","okc","okh"]},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}},k=c,w=(6/29)**3;function A(t){let e=t>.0031308?1.055*t**.4166666666666667-.055:t*12.92;return Math.min(Math.max(0,e),1)}function F(t){return t>.04045?((t+.055)/1.055)**2.4:t/12.92}for(let t of Object.keys(c)){if(!("channels"in c[t]))throw new Error("missing channels property: "+t);if(!("labels"in c[t]))throw new Error("missing channel labels property: "+t);if(c[t].labels.length!==c[t].channels)throw new Error("channel and label counts mismatch: "+t);let{channels:e,labels:n}=c[t];delete c[t].channels,delete c[t].labels,Object.defineProperty(c[t],"channels",{value:e}),Object.defineProperty(c[t],"labels",{value:n})}c.rgb.hsl=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,o=Math.min(e,n,r),a=Math.max(e,n,r),s=a-o,l,i;switch(a){case o:{l=0;break}case e:{l=(n-r)/s;break}case n:{l=2+(r-e)/s;break}case r:{l=4+(e-n)/s;break}}l=Math.min(l*60,360),l<0&&(l+=360);let h=(o+a)/2;return a===o?i=0:h<=.5?i=s/(a+o):i=s/(2-a-o),[l,i*100,h*100]};c.rgb.hsv=function(t){let e,n,r,o,a,s=t[0]/255,l=t[1]/255,i=t[2]/255,h=Math.max(s,l,i),p=h-Math.min(s,l,i),y=function(Q){return(h-Q)/6/p+1/2};if(p===0)o=0,a=0;else{switch(a=p/h,e=y(s),n=y(l),r=y(i),h){case s:{o=r-n;break}case l:{o=1/3+e-r;break}case i:{o=2/3+n-e;break}}o<0?o+=1:o>1&&(o-=1)}return[o*360,a*100,h*100]};c.rgb.hwb=function(t){let e=t[0],n=t[1],r=t[2],o=c.rgb.hsl(t)[0],a=1/255*Math.min(e,Math.min(n,r));return r=1-1/255*Math.max(e,Math.max(n,r)),[o,a*100,r*100]};c.rgb.oklab=function(t){let e=F(t[0]/255),n=F(t[1]/255),r=F(t[2]/255),o=Math.cbrt(.4122214708*e+.5363325363*n+.0514459929*r),a=Math.cbrt(.2119034982*e+.6806995451*n+.1073969566*r),s=Math.cbrt(.0883024619*e+.2817188376*n+.6299787005*r),l=.2104542553*o+.793617785*a-.0040720468*s,i=1.9779984951*o-2.428592205*a+.4505937099*s,h=.0259040371*o+.7827717662*a-.808675766*s;return[l*100,i*100,h*100]};c.rgb.cmyk=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,o=Math.min(1-e,1-n,1-r),a=(1-e-o)/(1-o)||0,s=(1-n-o)/(1-o)||0,l=(1-r-o)/(1-o)||0;return[a*100,s*100,l*100,o*100]};function V(t,e){return(t[0]-e[0])**2+(t[1]-e[1])**2+(t[2]-e[2])**2}c.rgb.keyword=function(t){let e=j[t];if(e)return e;let n=Number.POSITIVE_INFINITY,r;for(let o of Object.keys(x)){let a=x[o],s=V(t,a);s<n&&(n=s,r=o)}return r};c.keyword.rgb=function(t){return[...x[t]]};c.rgb.xyz=function(t){let e=F(t[0]/255),n=F(t[1]/255),r=F(t[2]/255),o=e*.4124564+n*.3575761+r*.1804375,a=e*.2126729+n*.7151522+r*.072175,s=e*.0193339+n*.119192+r*.9503041;return[o*100,a*100,s*100]};c.rgb.lab=function(t){let e=c.rgb.xyz(t),n=e[0],r=e[1],o=e[2];n/=95.047,r/=100,o/=108.883,n=n>w?n**(1/3):7.787*n+16/116,r=r>w?r**(1/3):7.787*r+16/116,o=o>w?o**(1/3):7.787*o+16/116;let a=116*r-16,s=500*(n-r),l=200*(r-o);return[a,s,l]};c.hsl.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,o,a;if(n===0)return a=r*255,[a,a,a];let s=r<.5?r*(1+n):r+n-r*n,l=2*r-s,i=[0,0,0];for(let h=0;h<3;h++)o=e+1/3*-(h-1),o<0&&o++,o>1&&o--,6*o<1?a=l+(s-l)*6*o:2*o<1?a=s:3*o<2?a=l+(s-l)*(2/3-o)*6:a=l,i[h]=a*255;return i};c.hsl.hsv=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,o=n,a=Math.max(r,.01);r*=2,n*=r<=1?r:2-r,o*=a<=1?a:2-a;let s=(r+n)/2,l=r===0?2*o/(a+o):2*n/(r+n);return[e,l*100,s*100]};c.hsv.rgb=function(t){let e=t[0]/60,n=t[1]/100,r=t[2]/100,o=Math.floor(e)%6,a=e-Math.floor(e),s=255*r*(1-n),l=255*r*(1-n*a),i=255*r*(1-n*(1-a));switch(r*=255,o){case 0:return[r,i,s];case 1:return[l,r,s];case 2:return[s,r,i];case 3:return[s,l,r];case 4:return[i,s,r];case 5:return[r,s,l]}};c.hsv.hsl=function(t){let e=t[0],n=t[1]/100,r=t[2]/100,o=Math.max(r,.01),a,s;s=(2-n)*r;let l=(2-n)*o;return a=n*o,a/=l<=1?l:2-l,a=a||0,s/=2,[e,a*100,s*100]};c.hwb.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100,o=n+r,a;o>1&&(n/=o,r/=o);let s=Math.floor(6*e),l=1-r;a=6*e-s,(s&1)!==0&&(a=1-a);let i=n+a*(l-n),h,p,y;switch(s){default:case 6:case 0:{h=l,p=i,y=n;break}case 1:{h=i,p=l,y=n;break}case 2:{h=n,p=l,y=i;break}case 3:{h=n,p=i,y=l;break}case 4:{h=i,p=n,y=l;break}case 5:{h=l,p=n,y=i;break}}return[h*255,p*255,y*255]};c.cmyk.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o=t[3]/100,a=1-Math.min(1,e*(1-o)+o),s=1-Math.min(1,n*(1-o)+o),l=1-Math.min(1,r*(1-o)+o);return[a*255,s*255,l*255]};c.xyz.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o,a,s;return o=e*3.2404542+n*-1.5371385+r*-.4985314,a=e*-.969266+n*1.8760108+r*.041556,s=e*.0556434+n*-.2040259+r*1.0572252,o=A(o),a=A(a),s=A(s),[o*255,a*255,s*255]};c.xyz.lab=function(t){let e=t[0],n=t[1],r=t[2];e/=95.047,n/=100,r/=108.883,e=e>w?e**(1/3):7.787*e+16/116,n=n>w?n**(1/3):7.787*n+16/116,r=r>w?r**(1/3):7.787*r+16/116;let o=116*n-16,a=500*(e-n),s=200*(n-r);return[o,a,s]};c.xyz.oklab=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o=Math.cbrt(.8189330101*e+.3618667424*n-.1288597137*r),a=Math.cbrt(.0329845436*e+.9293118715*n+.0361456387*r),s=Math.cbrt(.0482003018*e+.2643662691*n+.633851707*r),l=.2104542553*o+.793617785*a-.0040720468*s,i=1.9779984951*o-2.428592205*a+.4505937099*s,h=.0259040371*o+.7827717662*a-.808675766*s;return[l*100,i*100,h*100]};c.oklab.oklch=function(t){return c.lab.lch(t)};c.oklab.xyz=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o=(.999999998*e+.396337792*n+.215803758*r)**3,a=(1.000000008*e-.105561342*n-.063854175*r)**3,s=(1.000000055*e-.089484182*n-1.291485538*r)**3,l=1.227013851*o-.55779998*a+.281256149*s,i=-.040580178*o+1.11225687*a-.071676679*s,h=-.076381285*o-.421481978*a+1.58616322*s;return[l*100,i*100,h*100]};c.oklab.rgb=function(t){let e=t[0]/100,n=t[1]/100,r=t[2]/100,o=(e+.3963377774*n+.2158037573*r)**3,a=(e-.1055613458*n-.0638541728*r)**3,s=(e-.0894841775*n-1.291485548*r)**3,l=A(4.0767416621*o-3.3077115913*a+.2309699292*s),i=A(-1.2684380046*o+2.6097574011*a-.3413193965*s),h=A(-.0041960863*o-.7034186147*a+1.707614701*s);return[l*255,i*255,h*255]};c.oklch.oklab=function(t){return c.lch.lab(t)};c.lab.xyz=function(t){let e=t[0],n=t[1],r=t[2],o,a,s;a=(e+16)/116,o=n/500+a,s=a-r/200;let l=a**3,i=o**3,h=s**3;return a=l>w?l:(a-16/116)/7.787,o=i>w?i:(o-16/116)/7.787,s=h>w?h:(s-16/116)/7.787,o*=95.047,a*=100,s*=108.883,[o,a,s]};c.lab.lch=function(t){let e=t[0],n=t[1],r=t[2],o;o=Math.atan2(r,n)*360/2/Math.PI,o<0&&(o+=360);let s=Math.sqrt(n*n+r*r);return[e,s,o]};c.lch.lab=function(t){let e=t[0],n=t[1],o=t[2]/360*2*Math.PI,a=n*Math.cos(o),s=n*Math.sin(o);return[e,a,s]};c.rgb.ansi16=function(t,e=null){let[n,r,o]=t,a=e===null?c.rgb.hsv(t)[2]:e;if(a=Math.round(a/50),a===0)return 30;let s=30+(Math.round(o/255)<<2|Math.round(r/255)<<1|Math.round(n/255));return a===2&&(s+=60),s};c.hsv.ansi16=function(t){return c.rgb.ansi16(c.hsv.rgb(t),t[2])};c.rgb.ansi256=function(t){let e=t[0],n=t[1],r=t[2];return e>>4===n>>4&&n>>4===r>>4?e<8?16:e>248?231:Math.round((e-8)/247*24)+232:16+36*Math.round(e/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)};c.ansi16.rgb=function(t){t=t[0];let e=t%10;if(e===0||e===7)return t>50&&(e+=3.5),e=e/10.5*255,[e,e,e];let n=(Math.trunc(t>50)+1)*.5,r=(e&1)*n*255,o=(e>>1&1)*n*255,a=(e>>2&1)*n*255;return[r,o,a]};c.ansi256.rgb=function(t){if(t=t[0],t>=232){let a=(t-232)*10+8;return[a,a,a]}t-=16;let e,n=Math.floor(t/36)/5*255,r=Math.floor((e=t%36)/6)/5*255,o=e%6/5*255;return[n,r,o]};c.rgb.hex=function(t){let n=(((Math.round(t[0])&255)<<16)+((Math.round(t[1])&255)<<8)+(Math.round(t[2])&255)).toString(16).toUpperCase();return"000000".slice(n.length)+n};c.hex.rgb=function(t){let e=t.toString(16).match(/[a-f\d]{6}|[a-f\d]{3}/i);if(!e)return[0,0,0];let n=e[0];e[0].length===3&&(n=[...n].map(l=>l+l).join(""));let r=Number.parseInt(n,16),o=r>>16&255,a=r>>8&255,s=r&255;return[o,a,s]};c.rgb.hcg=function(t){let e=t[0]/255,n=t[1]/255,r=t[2]/255,o=Math.max(Math.max(e,n),r),a=Math.min(Math.min(e,n),r),s=o-a,l,i=s<1?a/(1-s):0;return s<=0?l=0:o===e?l=(n-r)/s%6:o===n?l=2+(r-e)/s:l=4+(e-n)/s,l/=6,l%=1,[l*360,s*100,i*100]};c.hsl.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=n<.5?2*e*n:2*e*(1-n),o=0;return r<1&&(o=(n-.5*r)/(1-r)),[t[0],r*100,o*100]};c.hsv.hcg=function(t){let e=t[1]/100,n=t[2]/100,r=e*n,o=0;return r<1&&(o=(n-r)/(1-r)),[t[0],r*100,o*100]};c.hcg.rgb=function(t){let e=t[0]/360,n=t[1]/100,r=t[2]/100;if(n===0)return[r*255,r*255,r*255];let o=[0,0,0],a=e%1*6,s=a%1,l=1-s,i=0;switch(Math.floor(a)){case 0:{o[0]=1,o[1]=s,o[2]=0;break}case 1:{o[0]=l,o[1]=1,o[2]=0;break}case 2:{o[0]=0,o[1]=1,o[2]=s;break}case 3:{o[0]=0,o[1]=l,o[2]=1;break}case 4:{o[0]=s,o[1]=0,o[2]=1;break}default:o[0]=1,o[1]=0,o[2]=l}return i=(1-n)*r,[(n*o[0]+i)*255,(n*o[1]+i)*255,(n*o[2]+i)*255]};c.hcg.hsv=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e),o=0;return r>0&&(o=e/r),[t[0],o*100,r*100]};c.hcg.hsl=function(t){let e=t[1]/100,r=t[2]/100*(1-e)+.5*e,o=0;return r>0&&r<.5?o=e/(2*r):r>=.5&&r<1&&(o=e/(2*(1-r))),[t[0],o*100,r*100]};c.hcg.hwb=function(t){let e=t[1]/100,n=t[2]/100,r=e+n*(1-e);return[t[0],(r-e)*100,(1-r)*100]};c.hwb.hcg=function(t){let e=t[1]/100,r=1-t[2]/100,o=r-e,a=0;return o<1&&(a=(r-o)/(1-o)),[t[0],o*100,a*100]};c.apple.rgb=function(t){return[t[0]/65535*255,t[1]/65535*255,t[2]/65535*255]};c.rgb.apple=function(t){return[t[0]/255*65535,t[1]/255*65535,t[2]/255*65535]};c.gray.rgb=function(t){return[t[0]/100*255,t[0]/100*255,t[0]/100*255]};c.gray.hsl=function(t){return[0,0,t[0]]};c.gray.hsv=c.gray.hsl;c.gray.hwb=function(t){return[0,100,t[0]]};c.gray.cmyk=function(t){return[0,0,0,t[0]]};c.gray.lab=function(t){return[t[0],0,0]};c.gray.hex=function(t){let e=Math.round(t[0]/100*255)&255,r=((e<<16)+(e<<8)+e).toString(16).toUpperCase();return"000000".slice(r.length)+r};c.rgb.gray=function(t){return[(t[0]+t[1]+t[2])/3/255*100]};function tt(){let t={},e=Object.keys(k);for(let{length:n}=e,r=0;r<n;r++)t[e[r]]={distance:-1,parent:null};return t}function et(t){let e=tt(),n=[t];for(e[t].distance=0;n.length>0;){let r=n.pop(),o=Object.keys(k[r]);for(let{length:a}=o,s=0;s<a;s++){let l=o[s],i=e[l];i.distance===-1&&(i.distance=e[r].distance+1,i.parent=r,n.unshift(l))}}return e}function nt(t,e){return function(n){return e(t(n))}}function rt(t,e){let n=[e[t].parent,t],r=k[e[t].parent][t],o=e[t].parent;for(;e[o].parent;)n.unshift(e[o].parent),r=nt(k[e[o].parent][o],r),o=e[o].parent;return r.conversion=n,r}function ot(t){let e=et(t),n={},r=Object.keys(e);for(let{length:o}=r,a=0;a<o;a++){let s=r[a];e[s].parent!==null&&(n[s]=rt(s,e))}return n}var X=ot;var C={},st=Object.keys(k);function at(t){let e=function(...n){let r=n[0];return r==null?r:(r.length>1&&(n=r),t(n))};return"conversion"in t&&(e.conversion=t.conversion),e}function lt(t){let e=function(...n){let r=n[0];if(r==null)return r;r.length>1&&(n=r);let o=t(n);if(typeof o=="object")for(let{length:a}=o,s=0;s<a;s++)o[s]=Math.round(o[s]);return o};return"conversion"in t&&(e.conversion=t.conversion),e}for(let t of st){C[t]={},Object.defineProperty(C[t],"channels",{value:k[t].channels}),Object.defineProperty(C[t],"labels",{value:k[t].labels});let e=X(t),n=Object.keys(e);for(let r of n){let o=e[r];C[t][r]=lt(o),C[t][r].raw=at(o)}}var _=C;var D=["keyword","gray","hex"],R={};for(let t of Object.keys(_))R[[..._[t].labels].sort().join("")]=t;var E={};function g(t,e){if(!(this instanceof g))return new g(t,e);if(e&&e in D&&(e=null),e&&!(e in _))throw new Error("Unknown model: "+e);let n,r;if(t==null)this.model="rgb",this.color=[0,0,0],this.valpha=1;else if(t instanceof g)this.model=t.model,this.color=[...t.color],this.valpha=t.valpha;else if(typeof t=="string"){let o=S.get(t);if(o===null)throw new Error("Unable to parse color from string: "+t);this.model=o.model,r=_[this.model].channels,this.color=o.value.slice(0,r),this.valpha=typeof o.value[r]=="number"?o.value[r]:1}else if(t.length>0){this.model=e||"rgb",r=_[this.model].channels;let o=Array.prototype.slice.call(t,0,r);this.color=$(o,r),this.valpha=typeof t[r]=="number"?t[r]:1}else if(typeof t=="number")this.model="rgb",this.color=[t>>16&255,t>>8&255,t&255],this.valpha=1;else{this.valpha=1;let o=Object.keys(t);"alpha"in t&&(o.splice(o.indexOf("alpha"),1),this.valpha=typeof t.alpha=="number"?t.alpha:0);let a=o.sort().join("");if(!(a in R))throw new Error("Unable to parse color from object: "+JSON.stringify(t));this.model=R[a];let{labels:s}=_[this.model],l=[];for(n=0;n<s.length;n++)l.push(t[s[n]]);this.color=$(l)}if(E[this.model])for(r=_[this.model].channels,n=0;n<r;n++){let o=E[this.model][n];o&&(this.color[n]=o(this.color[n]))}this.valpha=Math.max(0,Math.min(1,this.valpha)),Object.freeze&&Object.freeze(this)}g.prototype={toString(){return this.string()},toJSON(){return this[this.model]()},string(t){let e=this.model in S.to?this:this.rgb();e=e.round(typeof t=="number"?t:1);let n=e.valpha===1?e.color:[...e.color,this.valpha];return S.to[e.model](...n)},percentString(t){let e=this.rgb().round(typeof t=="number"?t:1),n=e.valpha===1?e.color:[...e.color,this.valpha];return S.to.rgb.percent(...n)},array(){return this.valpha===1?[...this.color]:[...this.color,this.valpha]},object(){let t={},{channels:e}=_[this.model],{labels:n}=_[this.model];for(let r=0;r<e;r++)t[n[r]]=this.color[r];return this.valpha!==1&&(t.alpha=this.valpha),t},unitArray(){let t=this.rgb().color;return t[0]/=255,t[1]/=255,t[2]/=255,this.valpha!==1&&t.push(this.valpha),t},unitObject(){let t=this.rgb().object();return t.r/=255,t.g/=255,t.b/=255,this.valpha!==1&&(t.alpha=this.valpha),t},round(t){return t=Math.max(t||0,0),new g([...this.color.map(ct(t)),this.valpha],this.model)},alpha(t){return t!==void 0?new g([...this.color,Math.max(0,Math.min(1,t))],this.model):this.valpha},red:u("rgb",0,b(255)),green:u("rgb",1,b(255)),blue:u("rgb",2,b(255)),hue:u(["hsl","hsv","hsl","hwb","hcg"],0,t=>(t%360+360)%360),saturationl:u("hsl",1,b(100)),lightness:u("hsl",2,b(100)),saturationv:u("hsv",1,b(100)),value:u("hsv",2,b(100)),chroma:u("hcg",1,b(100)),gray:u("hcg",2,b(100)),white:u("hwb",1,b(100)),wblack:u("hwb",2,b(100)),cyan:u("cmyk",0,b(100)),magenta:u("cmyk",1,b(100)),yellow:u("cmyk",2,b(100)),black:u("cmyk",3,b(100)),x:u("xyz",0,b(95.047)),y:u("xyz",1,b(100)),z:u("xyz",2,b(108.833)),l:u("lab",0,b(100)),a:u("lab",1),b:u("lab",2),keyword(t){return t!==void 0?new g(t):_[this.model].keyword(this.color)},hex(t){return t!==void 0?new g(t):S.to.hex(...this.rgb().round().color)},hexa(t){if(t!==void 0)return new g(t);let e=this.rgb().round().color,n=Math.round(this.valpha*255).toString(16).toUpperCase();return n.length===1&&(n="0"+n),S.to.hex(...e)+n},rgbNumber(){let t=this.rgb().color;return(t[0]&255)<<16|(t[1]&255)<<8|t[2]&255},luminosity(){let t=this.rgb().color,e=[];for(let[n,r]of t.entries()){let o=r/255;e[n]=o<=.04045?o/12.92:((o+.055)/1.055)**2.4}return .2126*e[0]+.7152*e[1]+.0722*e[2]},contrast(t){let e=this.luminosity(),n=t.luminosity();return e>n?(e+.05)/(n+.05):(n+.05)/(e+.05)},level(t){let e=this.contrast(t);return e>=7?"AAA":e>=4.5?"AA":""},isDark(){let t=this.rgb().color;return(t[0]*2126+t[1]*7152+t[2]*722)/1e4<128},isLight(){return!this.isDark()},negate(){let t=this.rgb();for(let e=0;e<3;e++)t.color[e]=255-t.color[e];return t},lighten(t){let e=this.hsl();return e.color[2]+=e.color[2]*t,e},darken(t){let e=this.hsl();return e.color[2]-=e.color[2]*t,e},saturate(t){let e=this.hsl();return e.color[1]+=e.color[1]*t,e},desaturate(t){let e=this.hsl();return e.color[1]-=e.color[1]*t,e},whiten(t){let e=this.hwb();return e.color[1]+=e.color[1]*t,e},blacken(t){let e=this.hwb();return e.color[2]+=e.color[2]*t,e},grayscale(){let t=this.rgb().color,e=t[0]*.3+t[1]*.59+t[2]*.11;return g.rgb(e,e,e)},fade(t){return this.alpha(this.valpha-this.valpha*t)},opaquer(t){return this.alpha(this.valpha+this.valpha*t)},rotate(t){let e=this.hsl(),n=e.color[0];return n=(n+t)%360,n=n<0?360+n:n,e.color[0]=n,e},mix(t,e){if(!t||!t.rgb)throw new Error('Argument to "mix" was not a Color instance, but rather an instance of '+typeof t);let n=t.rgb(),r=this.rgb(),o=e===void 0?.5:e,a=2*o-1,s=n.alpha()-r.alpha(),l=((a*s===-1?a:(a+s)/(1+a*s))+1)/2,i=1-l;return g.rgb(l*n.red()+i*r.red(),l*n.green()+i*r.green(),l*n.blue()+i*r.blue(),n.alpha()*o+r.alpha()*(1-o))}};for(let t of Object.keys(_)){if(D.includes(t))continue;let{channels:e}=_[t];g.prototype[t]=function(...n){return this.model===t?new g(this):n.length>0?new g(n,t):new g([...ht(_[this.model][t].raw(this.color)),this.valpha],t)},g[t]=function(...n){let r=n[0];return typeof r=="number"&&(r=$(n,e)),new g(r,t)}}function it(t,e){return Number(t.toFixed(e))}function ct(t){return function(e){return it(e,t)}}function u(t,e,n){t=Array.isArray(t)?t:[t];for(let r of t)(E[r]||=[])[e]=n;return t=t[0],function(r){let o;return r!==void 0?(n&&(r=n(r)),o=this[t](),o.color[e]=r,o):(o=this[t]().color[e],n&&(o=n(o)),o)}}function b(t){return function(e){return Math.max(0,Math.min(t,e))}}function ht(t){return Array.isArray(t)?t:[t]}function $(t,e){for(let n=0;n<e;n++)typeof t[n]!="number"&&(t[n]=0);return t}var q=g;var Bt={channel:"channel",channels:"channels",colorField:"color-field",colorFieldScope:"scope--color-field",colorMode:"color-mode",colorModeContainer:"color-mode-container",container:"container",control:"control",controlAndScope:"control-and-scope",controlSection:"control-section",deleteColor:"delete-color",header:"header",hexAndChannelsGroup:"hex-and-channels-group",hexOptions:"color-hex-options",hueScope:"scope--hue",hueSlider:"hue-slider",opacityScope:"scope--opacity",opacitySlider:"opacity-slider",preview:"preview",previewAndSliders:"preview-and-sliders",saveColor:"save-color",savedColor:"saved-color",savedColorsButtons:"saved-colors-buttons",savedColorsSection:"saved-colors-section",scope:"scope",section:"section",slider:"slider",sliders:"sliders",splitSection:"section--split",swatchGroup:"swatch-group"},Gt=q("#007AC2"),Tt="calcite-color-",Wt={r:255,g:255,b:255},ut={h:360,s:100,v:100},Pt=ut.h-1,jt={min:0,max:100},ft={s:{gap:parseInt(G),slider:{height:12},thumb:{radius:7},preview:{size:20},minWidth:200},m:{gap:parseInt(T),slider:{height:12},thumb:{radius:7},preview:{size:24},minWidth:240},l:{gap:parseInt(W),slider:{height:12},thumb:{radius:7},preview:{size:32},minWidth:304}},Xt=1,Dt={minus:"minus",plus:"plus"},Ut=/^[0-9A-F]$/i,dt=/^#[0-9A-F]{3}$/i,bt=/^#[0-9A-F]{6}$/i,gt=/^#[0-9A-F]{4}$/i,pt=/^#[0-9A-F]{8}$/i;function Kt(t,e=!1,n){if(!(e&&!t))return q(t!=null&&typeof t=="object"&&wt(n)?yt(t):t)}var Yt=t=>Number((t*100).toFixed()),Jt=t=>Number((t/100).toFixed(2));function mt(t,e=!1){return B(t,e)||_t(t,e)}function Y(t,e,n){return t?t.length===e&&n.test(t):!1}function B(t,e=!1){return Y(t,e?5:4,e?gt:dt)}function _t(t,e=!1){return Y(t,e?9:7,e?pt:bt)}function Zt(t,e=!1,n=!1){if(t=t.toLowerCase(),t.startsWith("#")||(t=`#${t}`),B(t,e))return U(K(t));if(e&&n&&mt(t,!1)){let r=B(t,!1);return U(K(`${t}${r?"f":"ff"}`))}return t}function Qt(t,e=!1){return e?t.hexa():t.hex()}function U(t){let{r:e,g:n,b:r}=t,o=I(e),a=I(n),s=I(r),l="a"in t?I(t.a*255):"";return`#${o}${a}${s}${l}`.toLowerCase()}function I(t){return t.toString(16).padStart(2,"0")}function Vt(t){return{...O(t,["alpha"]),a:t.alpha??1}}function yt(t){return{...O(t,["a"]),alpha:t.a??1}}function K(t){t=t.replace("#","");let e,n,r,o;if(t.length===3||t.length===4){let[s,l,i,h]=t.split("");e=parseInt(`${s}${s}`,16),n=parseInt(`${l}${l}`,16),r=parseInt(`${i}${i}`,16),o=parseInt(`${h}${h}`,16)/255}else e=parseInt(t.slice(0,2),16),n=parseInt(t.slice(2,4),16),r=parseInt(t.slice(4,6),16),o=parseInt(t.slice(6,8),16)/255;return isNaN(o)?{r:e,g:n,b:r}:{r:e,g:n,b:r,a:o}}var J=t=>t,f=J({HEX:"hex",HEXA:"hexa",RGB_CSS:"rgb-css",RGBA_CSS:"rgba-css",HSL_CSS:"hsl-css",HSLA_CSS:"hsla-css"}),d=J({RGB:"rgb",RGBA:"rgba",HSL:"hsl",HSLA:"hsla",HSV:"hsv",HSVA:"hsva"});function te(t){if(typeof t=="string"){if(t.startsWith("#")){let{length:e}=t;if(e===4||e===7)return f.HEX;if(e===5||e===9)return f.HEXA}if(t.startsWith("rgba("))return f.RGBA_CSS;if(t.startsWith("rgb("))return f.RGB_CSS;if(t.startsWith("hsl("))return f.HSL_CSS;if(t.startsWith("hsla("))return f.HSLA_CSS}if(typeof t=="object"){if(H(t,"r","g","b"))return H(t,"a")?d.RGBA:d.RGB;if(H(t,"h","s","l"))return H(t,"a")?d.HSLA:d.HSL;if(H(t,"h","s","v"))return H(t,"a")?d.HSVA:d.HSV}}function H(t,...e){return e.every(n=>n&&t&&`${n}`in t)}function ee(t,e){return t?.rgb().array().toString()===e?.rgb().array().toString()}function wt(t){return t===f.HEXA||t===f.RGBA_CSS||t===f.HSLA_CSS||t===d.RGBA||t===d.HSLA||t===d.HSVA}function ne(t){return t===f.HEX?f.HEXA:t===f.RGB_CSS?f.RGBA_CSS:t===f.HSL_CSS?f.HSLA_CSS:t===d.RGB?d.RGBA:t===d.HSL?d.HSLA:t===d.HSV?d.HSVA:t}function re(t){return t===f.HEXA?f.HEX:t===f.RGBA_CSS?f.RGB_CSS:t===f.HSLA_CSS?f.HSL_CSS:t===d.RGBA?d.RGB:t===d.HSLA?d.HSL:t===d.HSVA?d.HSV:t}var kt=1,Z=kt*2;function oe(t,e,n){let r=n?ft.l.preview.size:e.preview.size,o=t-Z,a=e.gap*3;return Math.max(o-a-r,0)}function se(t){let n=t-Z;return{width:Math.max(n,0),height:Math.max(Math.floor(n/1.8),0)}}export{q as a,Bt as b,Gt as c,Tt as d,Wt as e,ut as f,Pt as g,jt as h,ft as i,Xt as j,Dt as k,Ut as l,Kt as m,Yt as n,Jt as o,mt as p,B as q,_t as r,Zt as s,Qt as t,U as u,Vt as v,K as w,f as x,te as y,ee as z,wt as A,ne as B,re as C,oe as D,se as E};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as x,t as m}from"./I5C2XC5I.js";import"./7HV3O3DF.js";import{a as y}from"./57I2TDEP.js";import"./QVYX2WRU.js";import{d as z}from"./5EY2EEDX.js";import"./T6CCMW7H.js";import{G as S,H as h,S as k,g as $,h as f,i as a,l as t}from"./ATPHVTBE.js";var l={swatch:"swatch",noColorSwatch:"swatch--no-color",checker:"checker"},C={borderLight:"rgba(0, 0, 0, 0.3)",borderDark:"rgba(255, 255, 255, 0.15)"},b=4,i={squareSize:b,size:b*2},v={checker:"checker",shape:"shape"},R=$`:host{position:relative;display:inline-flex}:host([scale=s]){block-size:1.25rem;inline-size:1.25rem}:host([scale=m]){block-size:1.5rem;inline-size:1.5rem}:host([scale=l]){block-size:2rem;inline-size:2rem}.swatch{overflow:hidden;block-size:inherit;inline-size:inherit}.swatch rect{transition-property:all;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1)}.swatch--no-color rect{fill:var(--calcite-color-foreground-1)}.swatch--no-color line{stroke:var(--calcite-color-status-danger)}.checker{fill:#cacaca}:host([hidden]){display:none}[hidden]{display:none}`,w=class extends S{constructor(){super(...arguments),this.active=!1,this.scale="m"}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],color:1,scale:[3,{},{reflect:!0}]}}static{this.styles=R}load(){this.handleColorChange(this.color)}willUpdate(e){e.has("color")&&this.handleColorChange(this.color)}handleColorChange(e){this.internalColor=e?x(e):void 0}render(){let e=!this.internalColor,c={[l.swatch]:!0,[l.noColorSwatch]:e};return f`<svg class=${h(c)} xmlns=http://www.w3.org/2000/svg>${this.renderSwatch()}</svg>`}renderSwatch(){let{active:e,el:c,internalColor:s}=this,o=e?"100%":"0",n=z(c)==="light"?C.borderLight:C.borderDark,d=!s,r={height:"100%",rx:o,stroke:n,strokeWidth:"2",width:"100%"};if(d)return a`<clipPath id=${v.shape}><rect height=100% rx=${o??t} width=100% /></clipPath>${this.renderSwatchRect({clipPath:`inset(0 round ${o})`,...r})}<line clip-path=url(#shape) stroke-width=3 x1=100% x2=0 y1=0 y2=100% />`;let p=s.alpha(),q=m(s),g=m(s,p<1);return a`<title>${g}</title><defs><pattern height=${i.size} id=${v.checker} patternUnits=userSpaceOnUse width=${i.size} x=0 y=0><rect class=${h(l.checker)} height=${i.squareSize} width=${i.squareSize} x=0 y=0 /><rect class=${h(l.checker)} height=${i.squareSize} width=${i.squareSize} x=${i.squareSize} y=${i.squareSize} /></pattern></defs>${this.renderSwatchRect({fill:"url(#checker)",rx:r.rx,height:r.height,width:r.width})}${this.renderSwatchRect({clipPath:p<1?"polygon(100% 0, 0 0, 0 100%)":`inset(0 round ${o})`,fill:q,...r})}${p<1?this.renderSwatchRect({clipPath:"polygon(100% 0, 100% 100%, 0 100%)",fill:g,key:"opacity-fill",...r}):null}`}renderSwatchRect({clipPath:e,fill:c,height:s,key:o,rx:u,stroke:n,strokeWidth:d,width:r}){return y(o,a`<rect clip-path=${e??t} fill=${c??t} height=${s??t} rx=${u??t} stroke=${n??t} stroke-width=${d??t} width=${r??t} />`)}};k("calcite-color-picker-swatch",w);export{w as ColorPickerSwatch};
@@ -1,4 +1,4 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{b as oe}from"./PK24O5FM.js";import{a as ue,l as se}from"./UYY6Z6VK.js";import{Q as ie}from"./VOYNOWTM.js";var le=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],M=le.join(","),fe=typeof Element>"u",O=fe?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,_=!fe&&Element.prototype.getRootNode?function(a){var e;return a==null||(e=a.getRootNode)===null||e===void 0?void 0:e.call(a)}:function(a){return a?.ownerDocument},G=function(e,t){var n;t===void 0&&(t=!0);var u=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),s=u===""||u==="true",r=s||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):G(e.parentNode));return r},Re=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},de=function(e,t,n){if(G(e))return[];var u=Array.prototype.slice.apply(e.querySelectorAll(M));return t&&O.call(e,M)&&u.unshift(e),u=u.filter(n),u},V=function(e,t,n){for(var u=[],s=Array.from(e);s.length;){var r=s.shift();if(!G(r,!1))if(r.tagName==="SLOT"){var l=r.assignedElements(),p=l.length?l:r.children,g=V(p,!0,n);n.flatten?u.push.apply(u,g):u.push({scopeParent:r,candidates:g})}else{var S=O.call(r,M);S&&n.filter(r)&&(t||!e.includes(r))&&u.push(r);var F=r.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(r),k=!G(F,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(r));if(F&&k){var A=V(F===!0?r.children:F.children,!0,n);n.flatten?u.push.apply(u,A):u.push({scopeParent:r,candidates:A})}else s.unshift.apply(s,r.children)}}return u},ve=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},C=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Re(e))&&!ve(e)?0:e.tabIndex},Ie=function(e,t){var n=C(e);return n<0&&t&&!ve(e)?0:n},Ce=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},be=function(e){return e.tagName==="INPUT"},Oe=function(e){return be(e)&&e.type==="hidden"},Pe=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},Le=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},xe=function(e){if(!e.name)return!0;var t=e.form||_(e),n=function(l){return t.querySelectorAll('input[type="radio"][name="'+l+'"]')},u;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")u=n(window.CSS.escape(e.name));else try{u=n(e.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var s=Le(u,e.form);return!s||s===e},je=function(e){return be(e)&&e.type==="radio"},Be=function(e){return je(e)&&!xe(e)},Ke=function(e){var t,n=e&&_(e),u=(t=n)===null||t===void 0?void 0:t.host,s=!1;if(n&&n!==e){var r,l,p;for(s=!!((r=u)!==null&&r!==void 0&&(l=r.ownerDocument)!==null&&l!==void 0&&l.contains(u)||e!=null&&(p=e.ownerDocument)!==null&&p!==void 0&&p.contains(e));!s&&u;){var g,S,F;n=_(u),u=(g=n)===null||g===void 0?void 0:g.host,s=!!((S=u)!==null&&S!==void 0&&(F=S.ownerDocument)!==null&&F!==void 0&&F.contains(u))}}return s},ce=function(e){var t=e.getBoundingClientRect(),n=t.width,u=t.height;return n===0&&u===0},Me=function(e,t){var n=t.displayCheck,u=t.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e){var s=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(e).visibility==="hidden")return!0;var r=O.call(e,"details>summary:first-of-type"),l=r?e.parentElement:e;if(O.call(l,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof u=="function"){for(var p=e;e;){var g=e.parentElement,S=_(e);if(g&&!g.shadowRoot&&u(g)===!0)return ce(e);e.assignedSlot?e=e.assignedSlot:!g&&S!==e.ownerDocument?e=S.host:e=g}e=p}if(Ke(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return ce(e);return!1},_e=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n<t.children.length;n++){var u=t.children.item(n);if(u.tagName==="LEGEND")return O.call(t,"fieldset[disabled] *")?!0:!u.contains(e)}return!0}t=t.parentElement}return!1},q=function(e,t){return!(t.disabled||Oe(t)||Me(t,e)||Pe(t)||_e(t))},X=function(e,t){return!(Be(t)||C(t)<0||!q(e,t))},Ge=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},pe=function(e){var t=[],n=[];return e.forEach(function(u,s){var r=!!u.scopeParent,l=r?u.scopeParent:u,p=Ie(l,r),g=r?pe(u.candidates):l;p===0?r?t.push.apply(t,g):t.push(l):n.push({documentOrder:s,tabIndex:p,item:u,isScope:r,content:g})}),n.sort(Ce).reduce(function(u,s){return s.isScope?u.push.apply(u,s.content):u.push(s.content),u},[]).concat(t)},he=function(e,t){t=t||{};var n;return t.getShadowRoot?n=V([e],t.includeContainer,{filter:X.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ge}):n=de(e,t.includeContainer,X.bind(null,t)),pe(n)},ye=function(e,t){t=t||{};var n;return t.getShadowRoot?n=V([e],t.includeContainer,{filter:q.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=de(e,t.includeContainer,q.bind(null,t)),n},P=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return O.call(e,M)===!1?!1:X(t,e)},Ve=le.concat("iframe:not([inert]):not([inert] *)").join(","),U=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return O.call(e,Ve)===!1?!1:q(t,e)};function $(a,e){(e==null||e>a.length)&&(e=a.length);for(var t=0,n=Array(e);t<e;t++)n[t]=a[t];return n}function qe(a){if(Array.isArray(a))return $(a)}function me(a,e){var t=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(!t){if(Array.isArray(a)||(t=Se(a))||e){t&&(a=t);var n=0,u=function(){};return{s:u,n:function(){return n>=a.length?{done:!0}:{done:!1,value:a[n++]}},e:function(p){throw p},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
2
+ import{b as oe}from"./4PN5ZOFS.js";import{a as ue,l as se}from"./5EY2EEDX.js";import{Q as ie}from"./ATPHVTBE.js";var le=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],M=le.join(","),fe=typeof Element>"u",O=fe?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,_=!fe&&Element.prototype.getRootNode?function(a){var e;return a==null||(e=a.getRootNode)===null||e===void 0?void 0:e.call(a)}:function(a){return a?.ownerDocument},G=function(e,t){var n;t===void 0&&(t=!0);var u=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),s=u===""||u==="true",r=s||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):G(e.parentNode));return r},Re=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},de=function(e,t,n){if(G(e))return[];var u=Array.prototype.slice.apply(e.querySelectorAll(M));return t&&O.call(e,M)&&u.unshift(e),u=u.filter(n),u},V=function(e,t,n){for(var u=[],s=Array.from(e);s.length;){var r=s.shift();if(!G(r,!1))if(r.tagName==="SLOT"){var l=r.assignedElements(),p=l.length?l:r.children,g=V(p,!0,n);n.flatten?u.push.apply(u,g):u.push({scopeParent:r,candidates:g})}else{var S=O.call(r,M);S&&n.filter(r)&&(t||!e.includes(r))&&u.push(r);var F=r.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(r),k=!G(F,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(r));if(F&&k){var A=V(F===!0?r.children:F.children,!0,n);n.flatten?u.push.apply(u,A):u.push({scopeParent:r,candidates:A})}else s.unshift.apply(s,r.children)}}return u},ve=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},C=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||Re(e))&&!ve(e)?0:e.tabIndex},Ie=function(e,t){var n=C(e);return n<0&&t&&!ve(e)?0:n},Ce=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},be=function(e){return e.tagName==="INPUT"},Oe=function(e){return be(e)&&e.type==="hidden"},Pe=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},Le=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},xe=function(e){if(!e.name)return!0;var t=e.form||_(e),n=function(l){return t.querySelectorAll('input[type="radio"][name="'+l+'"]')},u;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")u=n(window.CSS.escape(e.name));else try{u=n(e.name)}catch(r){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",r.message),!1}var s=Le(u,e.form);return!s||s===e},je=function(e){return be(e)&&e.type==="radio"},Be=function(e){return je(e)&&!xe(e)},Ke=function(e){var t,n=e&&_(e),u=(t=n)===null||t===void 0?void 0:t.host,s=!1;if(n&&n!==e){var r,l,p;for(s=!!((r=u)!==null&&r!==void 0&&(l=r.ownerDocument)!==null&&l!==void 0&&l.contains(u)||e!=null&&(p=e.ownerDocument)!==null&&p!==void 0&&p.contains(e));!s&&u;){var g,S,F;n=_(u),u=(g=n)===null||g===void 0?void 0:g.host,s=!!((S=u)!==null&&S!==void 0&&(F=S.ownerDocument)!==null&&F!==void 0&&F.contains(u))}}return s},ce=function(e){var t=e.getBoundingClientRect(),n=t.width,u=t.height;return n===0&&u===0},Me=function(e,t){var n=t.displayCheck,u=t.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e){var s=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!s}if(getComputedStyle(e).visibility==="hidden")return!0;var r=O.call(e,"details>summary:first-of-type"),l=r?e.parentElement:e;if(O.call(l,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof u=="function"){for(var p=e;e;){var g=e.parentElement,S=_(e);if(g&&!g.shadowRoot&&u(g)===!0)return ce(e);e.assignedSlot?e=e.assignedSlot:!g&&S!==e.ownerDocument?e=S.host:e=g}e=p}if(Ke(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return ce(e);return!1},_e=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n<t.children.length;n++){var u=t.children.item(n);if(u.tagName==="LEGEND")return O.call(t,"fieldset[disabled] *")?!0:!u.contains(e)}return!0}t=t.parentElement}return!1},q=function(e,t){return!(t.disabled||Oe(t)||Me(t,e)||Pe(t)||_e(t))},X=function(e,t){return!(Be(t)||C(t)<0||!q(e,t))},Ge=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},pe=function(e){var t=[],n=[];return e.forEach(function(u,s){var r=!!u.scopeParent,l=r?u.scopeParent:u,p=Ie(l,r),g=r?pe(u.candidates):l;p===0?r?t.push.apply(t,g):t.push(l):n.push({documentOrder:s,tabIndex:p,item:u,isScope:r,content:g})}),n.sort(Ce).reduce(function(u,s){return s.isScope?u.push.apply(u,s.content):u.push(s.content),u},[]).concat(t)},he=function(e,t){t=t||{};var n;return t.getShadowRoot?n=V([e],t.includeContainer,{filter:X.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:Ge}):n=de(e,t.includeContainer,X.bind(null,t)),pe(n)},ye=function(e,t){t=t||{};var n;return t.getShadowRoot?n=V([e],t.includeContainer,{filter:q.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=de(e,t.includeContainer,q.bind(null,t)),n},P=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return O.call(e,M)===!1?!1:X(t,e)},Ve=le.concat("iframe:not([inert]):not([inert] *)").join(","),U=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return O.call(e,Ve)===!1?!1:q(t,e)};function $(a,e){(e==null||e>a.length)&&(e=a.length);for(var t=0,n=Array(e);t<e;t++)n[t]=a[t];return n}function qe(a){if(Array.isArray(a))return $(a)}function me(a,e){var t=typeof Symbol<"u"&&a[Symbol.iterator]||a["@@iterator"];if(!t){if(Array.isArray(a)||(t=Se(a))||e){t&&(a=t);var n=0,u=function(){};return{s:u,n:function(){return n>=a.length?{done:!0}:{done:!1,value:a[n++]}},e:function(p){throw p},f:u}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
3
3
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,r=!0,l=!1;return{s:function(){t=t.call(a)},n:function(){var p=t.next();return r=p.done,p},e:function(p){l=!0,s=p},f:function(){try{r||t.return==null||t.return()}finally{if(l)throw s}}}}function Ue(a,e,t){return(e=ze(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function We(a){if(typeof Symbol<"u"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function Ye(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
4
4
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ge(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);e&&(n=n.filter(function(u){return Object.getOwnPropertyDescriptor(a,u).enumerable})),t.push.apply(t,n)}return t}function we(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ge(Object(t),!0).forEach(function(n){Ue(a,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):ge(Object(t)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(t,n))})}return a}function He(a){return qe(a)||We(a)||Se(a)||Ye()}function Ze(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var n=t.call(a,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function ze(a){var e=Ze(a,"string");return typeof e=="symbol"?e:e+""}function Se(a,e){if(a){if(typeof a=="string")return $(a,e);var t={}.toString.call(a).slice(8,-1);return t==="Object"&&a.constructor&&(t=a.constructor.name),t==="Map"||t==="Set"?Array.from(a):t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?$(a,e):void 0}}var D={getActiveTrap:function(e){return e?.length>0?e[e.length-1]:null},activateTrap:function(e,t){var n=D.getActiveTrap(e);t!==n&&D.pauseTrap(e);var u=e.indexOf(t);u===-1||e.splice(u,1),e.push(t)},deactivateTrap:function(e,t){var n=e.indexOf(t);n!==-1&&e.splice(n,1),D.unpauseTrap(e)},pauseTrap:function(e){var t=D.getActiveTrap(e);t?._setPausedState(!0)},unpauseTrap:function(e){var t=D.getActiveTrap(e);t&&!t._isManuallyPaused()&&t._setPausedState(!1)}},Xe=function(e){return e.tagName&&e.tagName.toLowerCase()==="input"&&typeof e.select=="function"},$e=function(e){return e?.key==="Escape"||e?.key==="Esc"||e?.keyCode===27},j=function(e){return e?.key==="Tab"||e?.keyCode===9},Je=function(e){return j(e)&&!e.shiftKey},Qe=function(e){return j(e)&&e.shiftKey},Te=function(e){return setTimeout(e,0)},x=function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),u=1;u<t;u++)n[u-1]=arguments[u];return typeof e=="function"?e.apply(void 0,n):e},W=function(e){return e.target.shadowRoot&&typeof e.composedPath=="function"?e.composedPath()[0]:e.target},et=[],Fe=function(e,t){var n=t?.document||document,u=t?.trapStack||et,s=we({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,delayReturnFocus:!0,isolateSubtrees:!1,isKeyForward:Je,isKeyBackward:Qe},t),r={containers:[],containerGroups:[],tabbableGroups:[],adjacentElements:new Set,alreadySilent:new Set,nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,manuallyPaused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0},l,p=function(i,o,c){return i&&i[o]!==void 0?i[o]:s[c||o]},g=function(i,o){var c=typeof o?.composedPath=="function"?o.composedPath():void 0;return r.containerGroups.findIndex(function(v){var d=v.container,y=v.tabbableNodes;return d.contains(i)||c?.includes(d)||y.find(function(f){return f===i})})},S=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=o.hasFallback,v=c===void 0?!1:c,d=o.params,y=d===void 0?[]:d,f=s[i];if(typeof f=="function"&&(f=f.apply(void 0,He(y))),f===!0&&(f=void 0),!f){if(f===void 0||f===!1)return f;throw new Error("`".concat(i,"` was specified but was not a node, or did not return a node"))}var h=f;if(typeof f=="string"){try{h=n.querySelector(f)}catch(b){throw new Error("`".concat(i,'` appears to be an invalid selector; error="').concat(b.message,'"'))}if(!h&&!v)throw new Error("`".concat(i,"` as selector refers to no known node"))}return h},F=function(i){var o=i.activeElement;return o?o.shadowRoot&&o.shadowRoot.activeElement!==null?F(o.shadowRoot):o:null},k=function(){var i=S("initialFocus",{hasFallback:!0});if(i===!1)return!1;if(i===void 0||i&&!U(i,s.tabbableOptions)){var o=F(n);if(g(o)>=0)i=o;else{var c=r.tabbableGroups[0],v=c&&c.firstTabbableNode;i=v||S("fallbackFocus")}}else i===null&&(i=S("fallbackFocus"));if(!i)throw new Error("Your focus-trap needs to have at least one focusable element");return i},A=function(){if(r.containerGroups=r.containers.map(function(i){var o=he(i,s.tabbableOptions),c=ye(i,s.tabbableOptions),v=o.length>0?o[0]:void 0,d=o.length>0?o[o.length-1]:void 0,y=c.find(function(b){return P(b)}),f=c.slice().reverse().find(function(b){return P(b)}),h=!!o.find(function(b){return C(b)>0});return{container:i,tabbableNodes:o,focusableNodes:c,posTabIndexesFound:h,firstTabbableNode:v,lastTabbableNode:d,firstDomTabbableNode:y,lastDomTabbableNode:f,nextTabbableNode:function(w){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,E=o.indexOf(w);return E<0?N?c.slice(c.indexOf(w)+1).find(function(R){return P(R)}):c.slice(0,c.indexOf(w)).reverse().find(function(R){return P(R)}):o[E+(N?1:-1)]}}}),r.tabbableGroups=r.containerGroups.filter(function(i){return i.tabbableNodes.length>0}),r.tabbableGroups.length<=0&&!S("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(r.containerGroups.find(function(i){return i.posTabIndexesFound})&&r.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")},T=function(i){if(i!==!1&&i!==F(document)){if(!i||!i.focus){T(k());return}i.focus({preventScroll:!!s.preventScroll}),r.mostRecentlyFocusedNode=i,Xe(i)&&i.select()}},B=function(i){var o=S("setReturnFocus",{params:[i]});return o||(o===!1?!1:i)},J=function(i){var o=i.target,c=i.event,v=i.isBackward,d=v===void 0?!1:v;o=o||W(c),A();var y=null;if(r.tabbableGroups.length>0){var f=g(o,c),h=f>=0?r.containerGroups[f]:void 0;if(f<0)d?y=r.tabbableGroups[r.tabbableGroups.length-1].lastTabbableNode:y=r.tabbableGroups[0].firstTabbableNode;else if(d){var b=r.tabbableGroups.findIndex(function(Z){var z=Z.firstTabbableNode;return o===z});if(b<0&&(h.container===o||U(o,s.tabbableOptions)&&!P(o,s.tabbableOptions)&&!h.nextTabbableNode(o,!1))&&(b=f),b>=0){var w=b===0?r.tabbableGroups.length-1:b-1,N=r.tabbableGroups[w];y=C(o)>=0?N.lastTabbableNode:N.lastDomTabbableNode}else j(c)||(y=h.nextTabbableNode(o,!1))}else{var E=r.tabbableGroups.findIndex(function(Z){var z=Z.lastTabbableNode;return o===z});if(E<0&&(h.container===o||U(o,s.tabbableOptions)&&!P(o,s.tabbableOptions)&&!h.nextTabbableNode(o))&&(E=f),E>=0){var R=E===r.tabbableGroups.length-1?0:E+1,I=r.tabbableGroups[R];y=C(o)>=0?I.firstTabbableNode:I.firstDomTabbableNode}else j(c)||(y=h.nextTabbableNode(o))}}else y=S("fallbackFocus");return y},K=function(i){var o=W(i);if(!(g(o,i)>=0)){if(x(s.clickOutsideDeactivates,i)){l.deactivate({returnFocus:s.returnFocusOnDeactivate});return}x(s.allowOutsideClick,i)||i.preventDefault()}},Q=function(i){var o=W(i),c=g(o,i)>=0;if(c||o instanceof Document)c&&(r.mostRecentlyFocusedNode=o);else{i.stopImmediatePropagation();var v,d=!0;if(r.mostRecentlyFocusedNode)if(C(r.mostRecentlyFocusedNode)>0){var y=g(r.mostRecentlyFocusedNode),f=r.containerGroups[y].tabbableNodes;if(f.length>0){var h=f.findIndex(function(b){return b===r.mostRecentlyFocusedNode});h>=0&&(s.isKeyForward(r.recentNavEvent)?h+1<f.length&&(v=f[h+1],d=!1):h-1>=0&&(v=f[h-1],d=!1))}}else r.containerGroups.some(function(b){return b.tabbableNodes.some(function(w){return C(w)>0})})||(d=!1);else d=!1;d&&(v=J({target:r.mostRecentlyFocusedNode,isBackward:s.isKeyBackward(r.recentNavEvent)})),T(v||r.mostRecentlyFocusedNode||k())}r.recentNavEvent=void 0},ke=function(i){var o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;r.recentNavEvent=i;var c=J({event:i,isBackward:o});c&&(j(i)&&i.preventDefault(),T(c))},ee=function(i){(s.isKeyForward(i)||s.isKeyBackward(i))&&ke(i,s.isKeyBackward(i))},te=function(i){$e(i)&&x(s.escapeDeactivates,i)!==!1&&(i.preventDefault(),l.deactivate())},ae=function(i){var o=W(i);g(o,i)>=0||x(s.clickOutsideDeactivates,i)||x(s.allowOutsideClick,i)||(i.preventDefault(),i.stopImmediatePropagation())},re=function(){if(r.active){D.activateTrap(u,l);var i;return s.delayInitialFocus?i=new Promise(function(o){r.delayInitialFocusTimer=Te(function(){T(k()),o()})}):T(k()),n.addEventListener("focusin",Q,!0),n.addEventListener("mousedown",K,{capture:!0,passive:!1}),n.addEventListener("touchstart",K,{capture:!0,passive:!1}),n.addEventListener("click",ae,{capture:!0,passive:!1}),n.addEventListener("keydown",ee,{capture:!0,passive:!1}),n.addEventListener("keydown",te),i}},Ae=function(i){r.active&&!r.paused&&l._setSubtreeIsolation(!1),r.adjacentElements.clear(),r.alreadySilent.clear();var o=new Set,c=new Set,v=me(i),d;try{for(v.s();!(d=v.n()).done;){var y=d.value;o.add(y);for(var f=typeof ShadowRoot<"u"&&y.getRootNode()instanceof ShadowRoot,h=y;h;){o.add(h);var b=h.parentElement,w=[];b?w=b.children:!b&&f&&(w=h.getRootNode().children,b=h.getRootNode().host,f=typeof ShadowRoot<"u"&&b.getRootNode()instanceof ShadowRoot);var N=me(w),E;try{for(N.s();!(E=N.n()).done;){var R=E.value;c.add(R)}}catch(I){N.e(I)}finally{N.f()}h=b}}}catch(I){v.e(I)}finally{v.f()}o.forEach(function(I){c.delete(I)}),r.adjacentElements=c},ne=function(){if(r.active)return n.removeEventListener("focusin",Q,!0),n.removeEventListener("mousedown",K,!0),n.removeEventListener("touchstart",K,!0),n.removeEventListener("click",ae,!0),n.removeEventListener("keydown",ee,!0),n.removeEventListener("keydown",te),l},De=function(i){var o=r.mostRecentlyFocusedNode;if(o){var c=i.some(function(d){var y=Array.from(d.removedNodes);return y.some(function(f){return f===o||typeof f.contains=="function"&&f.contains(o)})});if(c&&r.containers.some(function(d){return d?.isConnected})){A();var v=k();T(v)}}},H=typeof window<"u"&&"MutationObserver"in window?new MutationObserver(De):void 0,L=function(){H&&(H.disconnect(),r.active&&!r.paused&&r.containers.map(function(i){H.observe(i,{subtree:!0,childList:!0})}))};return l={get active(){return r.active},get paused(){return r.paused},activate:function(i){if(r.active)return this;var o=p(i,"onActivate"),c=p(i,"onPostActivate"),v=p(i,"checkCanFocusTrap"),d=D.getActiveTrap(u),y=!1;if(d&&!d.paused){var f;(f=d._setSubtreeIsolation)===null||f===void 0||f.call(d,!1),y=!0}try{v||A(),r.active=!0,r.paused=!1,r.nodeFocusedBeforeActivation=F(n),o?.({trap:l});var h=function(){v&&A();var N=function(){l._setSubtreeIsolation(!0),L(),c?.({trap:l})},E=re();E?E.then(N):N()};if(v)return v(r.containers.concat()).then(h,h),this;h()}catch(w){if(d===D.getActiveTrap(u)&&y){var b;(b=d._setSubtreeIsolation)===null||b===void 0||b.call(d,!0)}throw w}return this},deactivate:function(i){if(!r.active)return this;var o=we({onDeactivate:s.onDeactivate,onPostDeactivate:s.onPostDeactivate,checkCanReturnFocus:s.checkCanReturnFocus},i);clearTimeout(r.delayInitialFocusTimer),r.delayInitialFocusTimer=void 0,r.paused||l._setSubtreeIsolation(!1),r.alreadySilent.clear(),ne(),r.active=!1,r.paused=!1,L(),D.deactivateTrap(u,l);var c=p(o,"onDeactivate"),v=p(o,"onPostDeactivate"),d=p(o,"checkCanReturnFocus"),y=p(o,"delayReturnFocus"),f=p(o,"returnFocus","returnFocusOnDeactivate");c?.({trap:l});var h=function(){f&&T(B(r.nodeFocusedBeforeActivation)),v?.({trap:l})},b=function(){y&&f?Te(h):h()};return f&&d?(d(B(r.nodeFocusedBeforeActivation)).then(b,b),this):(b(),this)},pause:function(i){return r.active?(r.manuallyPaused=!0,this._setPausedState(!0,i)):this},unpause:function(i){return r.active?(r.manuallyPaused=!1,u[u.length-1]!==this?this:this._setPausedState(!1,i)):this},updateContainerElements:function(i){var o=[].concat(i).filter(Boolean);return r.containers=o.map(function(c){return typeof c=="string"?n.querySelector(c):c}),s.isolateSubtrees&&Ae(r.containers),r.active&&(A(),r.paused||l._setSubtreeIsolation(!0)),L(),this}},Object.defineProperties(l,{_isManuallyPaused:{value:function(){return r.manuallyPaused}},_setPausedState:{value:function(i,o){if(r.paused===i)return this;if(r.paused=i,i){var c=p(o,"onPause"),v=p(o,"onPostPause");c?.({trap:l}),ne(),l._setSubtreeIsolation(!1),L(),v?.({trap:l})}else{var d=p(o,"onUnpause"),y=p(o,"onPostUnpause");d?.({trap:l});var f=function(){A();var b=function(){l._setSubtreeIsolation(!0),L(),y?.({trap:l})},w=re();w?w.then(b):b()};f()}return this}},_setSubtreeIsolation:{value:function(i){s.isolateSubtrees&&r.adjacentElements.forEach(function(o){var c;i?s.isolateSubtrees==="aria-hidden"?((o.ariaHidden==="true"||((c=o.getAttribute("aria-hidden"))===null||c===void 0?void 0:c.toLowerCase())==="true")&&r.alreadySilent.add(o),o.setAttribute("aria-hidden","true")):((o.inert||o.hasAttribute("inert"))&&r.alreadySilent.add(o),o.setAttribute("inert",!0)):r.alreadySilent.has(o)||(s.isolateSubtrees==="aria-hidden"?o.removeAttribute("aria-hidden"):o.removeAttribute("inert"))})}}}),l.updateContainerElements(e),l};function Ne(a,{focusTrapOptions:e},t){return!e?.extraContainers&&!t?a:[a,...Ee(e?.extraContainers),...Ee(t)]}function Ee(a=[]){return Array.isArray(a)?a:[a]}var Y=new WeakSet;function tt(a,e){let t=e&&e!==document.body&&e!==document.documentElement;return!Y.has(a)&&t&&se(e),!1}function at(a,e){let t=e?.fallbackFocus||a,n=e?.clickOutsideDeactivates??!0,u;return{fallbackFocus:t,...e,document:a.ownerDocument,tabbableOptions:ue,trapStack:ie().focusTrapStack,clickOutsideDeactivates:s=>(Y.has(a)||Y.add(a),typeof n=="function"?n(s):n),onActivate:s=>{e?.escapeDeactivates&&(u=new AbortController,a.addEventListener("keydown",r=>{if(r.key==="Escape"){let l=e?.escapeDeactivates;(typeof l=="function"?l(r):l??!0)&&s.trap.deactivate()}},{signal:u.signal})),e?.onActivate?.(s)},onDeactivate:s=>{u?.abort(),u=void 0,e?.onDeactivate?.(s)},onPostDeactivate:()=>{Y.delete(a)},setReturnFocus:s=>{let r=typeof e?.setReturnFocus=="function"?e.setReturnFocus(s):e?.setReturnFocus;return r===void 0?tt(a,s):r}}}var lt=(a={})=>oe((e,t)=>{let n,u,s,r=!1,l=a.focusTrapOptions,p=()=>a.triggerProp?!!e[a.triggerProp]:!0,g=()=>a.triggerProp?p():r,S=()=>typeof e.focusTrapDisabledOverride=="function"?!e.focusTrapDisabledOverride():!e.focusTrapDisabled,F=()=>{let T=u||e.el;T.isConnected&&(n||(s||=Ne(T,e),n=Fe(s,at(T,{...l,...e.focusTrapOptions}))),S()&&n.activate())},k=()=>{n?.deactivate()};return t.onConnected(()=>{n&&g()&&F()}),t.onUpdate(T=>{if(!(!e.hasUpdated||!T.has("focusTrapDisabled"))){if(e.focusTrapDisabled||!p()){k();return}g()&&F()}}),t.onDisconnected(()=>k()),{get _instance(){},activate:()=>{r=!0,F()},deactivate:()=>{r=!1,k()},overrideFocusTrapEl:T=>{if(n)throw new Error("Focus trap already created");u=T},setExtraContainers:T=>{let B=u||e.el;s=Ne(B,e,T)},updateContainerElements:()=>n?.updateContainerElements(s)}});export{lt as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as I}from"./QUKECT32.js";import{a as g}from"./OMEUUIN3.js";import{b as z}from"./GZZYSINJ.js";import{a as d,b as m}from"./VI7SBYXT.js";import{a as T}from"./RX7YQTRT.js";import{a as b}from"./ZWPNZ5XW.js";import{e as k}from"./PK24O5FM.js";import"./JFBAD4EH.js";import{c as y}from"./UYY6Z6VK.js";import{a as x}from"./T6CCMW7H.js";import{E as p,F as l,G as f,H as c,K as r,S as v,g as u,h as a,p as o}from"./VOYNOWTM.js";var e={close:"close",container:"container",containerBottom:"container--bottom",content:"content",contentHasText:"content--has-text",iconEnd:"icon-end",iconPresent:"icon-present",iconStart:"icon-start",titleIcon:"calcite-tab-title--icon",scale:s=>`scale-${s}`,selectedIndicator:"selected-indicator"},$="calcite-tab-title",F={host:s=>`${$}-${s}`},A=u`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;outline:2px solid transparent;outline-offset:2px;margin-inline-start:0px}:host([layout=inline]){flex:0 1 auto}:host([layout=center]){flex:1 1 auto}.content{position:relative;margin-block-end:.125rem;box-sizing:border-box;display:flex;block-size:100%;align-items:center;justify-content:center}.scale-s{--calcite-internal-tab-title-close-padding: var(--calcite-spacing-none);--calcite-internal-tab-title-close-margin-start: var(--calcite-spacing-xxs)}.scale-s .content{padding-block:.25rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}.scale-m{--calcite-internal-tab-title-close-padding: var(--calcite-spacing-xxs);--calcite-internal-tab-title-close-margin-start: var(--calcite-spacing-xxs)}.scale-m .content{padding-block:.5rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}.scale-l{--calcite-internal-tab-title-close-padding: var(--calcite-spacing-xxs);--calcite-internal-tab-title-close-margin-start: var(--calcite-spacing-xs)}.scale-l .content{padding-block:var(--calcite-space-sm-plus);font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([closable]) .content{border-block-end-color:transparent}:host([layout=inline]) .content,:host([layout=center]) .content{padding-inline:.25rem}:host([layout=center]) .scale-s,:host([layout=center]) .scale-m,:host([layout=center]) .scale-l{margin-block:0px;justify-content:center;text-align:center}:host([layout=center]) .scale-s .content,:host([layout=center]) .scale-m .content,:host([layout=center]) .scale-l .content{flex:1 1 auto;flex-grow:1}.container{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;align-content:center;justify-content:space-between;padding-inline:0px;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;color:var(--calcite-tab-text-color, var(--calcite-color-text-3));background-color:var(--calcite-tab-background-color, transparent)}.selected-indicator{position:absolute;display:block;block-size:.125rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;inline-size:100%}:host([bordered][selected]) .container:after{position:absolute;display:block;block-size:.125rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;inset-block-end:-1px;inset-inline-start:0;inset-inline-end:0;inline-size:100%;content:""}:host([bordered][selected]) .container.container--bottom:after{inset-block-start:-1px}:host([bordered][selected]:focus) .container:after{background:transparent}.container--bottom .selected-indicator{inset-block-end:unset;inset-block-start:0}:host([bordered]:not([selected]):hover:not(:focus)) .selected-indicator{background-color:var(--calcite-color-foreground-2)}:host([bordered]:not([selected]):hover:not(:focus)) .container:not(.container--bottom) .selected-indicator{box-shadow:inset 0 1px var(--calcite-color-border-1)}:host([bordered]:not([selected]):hover:not(:focus)) .container.container--bottom .selected-indicator{box-shadow:inset 0 -1px var(--calcite-color-border-1)}:host([selected]:focus) .selected-indicator{block-size:4px}.calcite-tab-title--icon{position:relative;margin:0;display:inline-flex;align-self:center}.calcite-tab-title--icon svg{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out}.container{color:var(--calcite-tab-text-color, var(--calcite-color-text-3))}.container .icon-start{color:var(--calcite-tab-icon-color-start, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.container .icon-end{color:var(--calcite-tab-icon-color-end, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.container:hover,.container:active,:host([selected]) .container{color:var(--calcite-tab-text-color-press, var(--calcite-color-text-1))}.container:hover .icon-start,.container:active .icon-start,:host([selected]) .container .icon-start{color:var(--calcite-tab-icon-color-start-press, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.container:hover .icon-end,.container:active .icon-end,:host([selected]) .container .icon-end{color:var(--calcite-tab-icon-color-end-press, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.content--has-text{padding:.25rem}.content--has-text .calcite-tab-title--icon.icon-start{margin-inline-end:var(--calcite-spacing-sm)}.content--has-text .calcite-tab-title--icon.icon-end{margin-inline-start:var(--calcite-spacing-sm)}:host([bordered]) .container{border-color:transparent;border-inline-width:var(--calcite-spacing-px);border-inline-style:solid}:host([bordered]) .container.container--bottom{border-block-start-style:solid;border-block-start-width:1px}:host([bordered]) .container.container--bottom .selected-indicator{inset-block-start:unset;inset-block-end:0}:host([bordered]) .container:not(.container--bottom){border-block-end-style:solid;border-block-end-width:1px}:host([bordered]) .container .selected-indicator{inset-block-start:0;inset-block-end:unset;inset-inline-start:-1px;inset-inline-end:0;inline-size:calc(100% + var(--calcite-spacing-base))}:host([bordered]) .container:host(:not([selected])) .container{box-shadow:0 2px 0 0 transparent}:host([bordered]) .container:host(:not([selected])):host(:hover) .container:not(.container--bottom){border-block-end-color:var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) .selected-indicator{box-shadow:inset 0 var(--calcite-internal-tab-shadow-length) var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) :not(.container--bottom){--calcite-internal-tab-shadow-length: 1px}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) .container--bottom{--calcite-internal-tab-shadow-length: -1px}:host([bordered]) .container:hover{background-color:var(--calcite-tab-background-color-hover, var(--calcite-color-foreground-2));border-block-end-color:var(--calcite-color-border-1)}:host(:hover) .selected-indicator{background-color:var(--calcite-color-border-3)}:host([selected]) .selected-indicator,:host([selected]:hover) .selected-indicator,:host(:focus) .selected-indicator,:host(:active) .selected-indicator{background-color:var(--calcite-tab-accent-color-press, var(--calcite-color-brand))}:host([closed]){display:none}:host([selected][bordered]) .container{border-inline-color:var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([selected][bordered]) .container:after{background-color:var(--calcite-tab-background-color, var(--calcite-color-foreground-1))}:host([selected][bordered]) .container:hover,:host([selected][bordered]) .container:active{background:transparent}:host(:focus) .container{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:focus) .container:focus-within{outline-color:transparent}:host([icon-start][icon-end]) .calcite-tab-title--icon:first-child{margin-inline-end:var(--calcite-spacing-sm)}:host([layout=inline][bordered]) .scale-m .content,:host([layout=center][bordered]) .scale-m .content{padding-inline:.75rem}:host([layout=inline][bordered]) .scale-s .content,:host([layout=center][bordered]) .scale-s .content{padding-inline:.5rem}:host([layout=inline][bordered]) .scale-l .content,:host([layout=center][bordered]) .scale-l .content{padding-inline:1rem}:host([layout=inline][closable]) .scale-s .content,:host([layout=inline][closable]) .scale-m .content,:host([layout=inline][closable]) .scale-l .content{padding-inline-end:0}.close{--calcite-internal-action-spacing: var(--calcite-internal-tab-title-close-padding);--calcite-internal-action-min-height: unset;--calcite-action-text-color: var(--calcite-tab-close-icon-color);--calcite-action-text-color-press: var(--calcite-tab-close-icon-color-press);--calcite-action-background-color: var(--calcite-tab-close-icon-background-color);--calcite-action-background-color-press: var(--calcite-tab-close-icon-background-color-press);--calcite-action-background-color-hover: var(--calcite-tab-close-icon-background-color-hover);margin:auto;margin-inline:var(--calcite-spacing-sm) var(--calcite-internal-tab-title-close-margin-start)}@media(forced-colors:active){:host{outline-width:0;outline-offset:0}:host(:focus) .container{outline-color:highlight}:host([bordered][selected]) .container{border-block-end-style:none}:host([bordered][selected]) .container--bottom{border-block-start-style:none}.selected-indicator{background-color:highlight}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) .container{pointer-events:none;opacity:.5}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,h=class extends f{constructor(){super(),this.closeButtonRef=p(),this.direction=k(),this.guid=F.host(x()),this.mutationObserver=d("mutation",()=>this.updateHasText()),this.parentTabsEl=null,this.resizeObserver=d("resize",()=>{this.calciteInternalTabIconChanged.emit()}),this.messages=T(),this.interactiveContainer=I(this),this.controls=null,this.hasText=!1,this.bordered=!1,this.closable=!1,this.closed=!1,this.disabled=!1,this.position="top",this.scale="m",this.selected=!1,this.calciteInternalTabIconChanged=o({cancelable:!1}),this.calciteInternalTabTitleRegister=o({cancelable:!1}),this.calciteInternalTabsActivate=o({cancelable:!1}),this.calciteInternalTabsClose=o({cancelable:!1}),this.calciteInternalTabsFocusFirst=o({cancelable:!1}),this.calciteInternalTabsFocusLast=o({cancelable:!1}),this.calciteInternalTabsFocusNext=o({cancelable:!1}),this.calciteInternalTabsFocusPrevious=o({cancelable:!1}),this.calciteTabsActivate=o({cancelable:!1}),this.calciteTabsClose=o({cancelable:!1}),this.listenOn(document.body,"calciteInternalTabChange",this.internalTabChangeHandler),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={controls:[16,{},{state:!0}],hasText:[16,{},{state:!0}],bordered:[7,{},{reflect:!0,type:Boolean}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],position:1,scale:1,selected:[7,{},{reflect:!0,type:Boolean}],tab:[3,{},{reflect:!0}]}}static{this.styles=A}async activateTab(t=!0){if(this.disabled||this.closed)return;let i={tab:this.tab,userTriggered:t};this.calciteInternalTabsActivate.emit(i),t&&requestAnimationFrame(()=>this.calciteTabsActivate.emit())}async getTabIdentifier(){return this.tab?this.tab:this.getTabIndex()}async getTabIndex(){return Array.prototype.indexOf.call(y(this.el.parentElement.children).filter(t=>t.matches("calcite-tab-title")),this.el)}_updateAriaInfo(t=[],i=[]){this.controls=t[i.indexOf(this.el.id)]||null}connectedCallback(){super.connectedCallback(),this.setupTextContentObserver(),this.parentTabsEl=this.el.closest("calcite-tabs")}async load(){this.updateHasText(),this.tab&&this.selected&&this.activateTab(!1)}willUpdate(t){t.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.selectedHandler(),this.parentTabsEl&&(this.layout=this.parentTabsEl.layout,this.bordered=this.parentTabsEl.bordered)}async loaded(){this.calciteInternalTabTitleRegister.emit(await this.getTabIdentifier())}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),document.body?.dispatchEvent(new CustomEvent("calciteTabTitleUnregister",{detail:this.el})),this.resizeObserver?.disconnect()}selectedHandler(){this.selected&&this.activateTab(!1)}internalTabChangeHandler(t){t.composedPath().find(n=>n.tagName==="CALCITE-TABS")===this.parentTabsEl&&(this.tab?this.selected=this.tab===t.detail.tab:this.getTabIndex().then(n=>{this.selected=n===t.detail.tab}),t.stopPropagation())}onClick(){this.activateTab()}keyDownHandler(t){switch(t.key){case" ":case"Enter":t.composedPath().includes(this.closeButtonRef.value)||(this.activateTab(),t.preventDefault());break;case"ArrowRight":t.preventDefault(),this.direction==="ltr"?this.calciteInternalTabsFocusNext.emit():this.calciteInternalTabsFocusPrevious.emit();break;case"ArrowLeft":t.preventDefault(),this.direction==="ltr"?this.calciteInternalTabsFocusPrevious.emit():this.calciteInternalTabsFocusNext.emit();break;case"Home":t.preventDefault(),this.calciteInternalTabsFocusFirst.emit();break;case"End":t.preventDefault(),this.calciteInternalTabsFocusLast.emit();break}}closeClickHandler(){this.closeTabTitleAndNotify()}updateHasText(){this.hasText=this.el.textContent.trim().length>0}setContainerRef(t){m(this.resizeObserver,this.containerEl,t),this.containerEl=t}setupTextContentObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}closeTabTitleAndNotify(){this.closed=!0,this.calciteInternalTabsClose.emit({tab:this.tab}),requestAnimationFrame(()=>this.calciteTabsClose.emit())}render(){let{el:t,closed:i}=this,n=t.id||this.guid,C=a`<calcite-icon class=${c({[e.titleIcon]:!0,[e.iconStart]:!0})} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${b(this.scale)}></calcite-icon>`,w=a`<calcite-icon class=${c({[e.titleIcon]:!0,[e.iconEnd]:!0})} .flipRtl=${this.iconFlipRtl==="end"||this.iconFlipRtl==="both"} .icon=${this.iconEnd} .scale=${b(this.scale)}></calcite-icon>`;return r(this.el,"aria-controls",this.controls),this.el.ariaSelected=z(this.selected),r(this.el,"id",n),this.el.role="tab",r(this.el,"tabIndex",this.selected&&!this.disabled?0:-1),this.interactiveContainer({disabled:this.disabled,children:a`<div class=${c({[e.container]:!0,[e.containerBottom]:this.position==="bottom",[e.iconPresent]:!!this.iconStart||!!this.iconEnd,[e.scale(this.scale)]:!0})} .hidden=${i} ${l(this.setContainerRef)}><div class=${c({[e.content]:!0,[e.contentHasText]:this.hasText})}>${this.iconStart?C:null}<slot></slot>${this.iconEnd?w:null}</div>${this.renderCloseButton()}<div class=${c(e.selectedIndicator)}></div></div>`})}renderCloseButton(){let{closable:t,messages:i}=this;return t?g("close-button",a`<calcite-action class=${c(e.close)} icon=x @click=${this.closeClickHandler} .scale=${this.scale} .text=${i.close} ${l(this.closeButtonRef)}></calcite-action>`):null}};v("calcite-tab-title",h);export{h as TabTitle};
2
+ import{a as I}from"./2U7LTQ5E.js";import{a as g}from"./57I2TDEP.js";import{b as z}from"./GZZYSINJ.js";import{a as d,b as m}from"./VI7SBYXT.js";import{a as T}from"./GBNEJ7ZF.js";import{a as b}from"./ZWPNZ5XW.js";import{e as k}from"./4PN5ZOFS.js";import"./G4ZSDWUZ.js";import{c as y}from"./5EY2EEDX.js";import{a as x}from"./T6CCMW7H.js";import{E as p,F as l,G as f,H as c,K as r,S as v,g as u,h as a,p as o}from"./ATPHVTBE.js";var e={close:"close",container:"container",containerBottom:"container--bottom",content:"content",contentHasText:"content--has-text",iconEnd:"icon-end",iconPresent:"icon-present",iconStart:"icon-start",titleIcon:"calcite-tab-title--icon",scale:s=>`scale-${s}`,selectedIndicator:"selected-indicator"},$="calcite-tab-title",F={host:s=>`${$}-${s}`},A=u`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block;outline:2px solid transparent;outline-offset:2px;margin-inline-start:0px}:host([layout=inline]){flex:0 1 auto}:host([layout=center]){flex:1 1 auto}.content{position:relative;margin-block-end:.125rem;box-sizing:border-box;display:flex;block-size:100%;align-items:center;justify-content:center}.scale-s{--calcite-internal-tab-title-close-padding: var(--calcite-spacing-none);--calcite-internal-tab-title-close-margin-start: var(--calcite-spacing-xxs)}.scale-s .content{padding-block:.25rem;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm)}.scale-m{--calcite-internal-tab-title-close-padding: var(--calcite-spacing-xxs);--calcite-internal-tab-title-close-margin-start: var(--calcite-spacing-xxs)}.scale-m .content{padding-block:.5rem;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base)}.scale-l{--calcite-internal-tab-title-close-padding: var(--calcite-spacing-xxs);--calcite-internal-tab-title-close-margin-start: var(--calcite-spacing-xs)}.scale-l .content{padding-block:var(--calcite-space-sm-plus);font-size:var(--calcite-font-size-relative-md);line-height:var(--calcite-font-line-height-md)}:host([closable]) .content{border-block-end-color:transparent}:host([layout=inline]) .content,:host([layout=center]) .content{padding-inline:.25rem}:host([layout=center]) .scale-s,:host([layout=center]) .scale-m,:host([layout=center]) .scale-l{margin-block:0px;justify-content:center;text-align:center}:host([layout=center]) .scale-s .content,:host([layout=center]) .scale-m .content,:host([layout=center]) .scale-l .content{flex:1 1 auto;flex-grow:1}.container{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;cursor:pointer;align-content:center;justify-content:space-between;padding-inline:0px;font-size:var(--calcite-font-size-relative-base);line-height:var(--calcite-font-line-height-base);outline-color:transparent;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;color:var(--calcite-tab-text-color, var(--calcite-color-text-3));background-color:var(--calcite-tab-background-color, transparent)}.selected-indicator{position:absolute;display:block;block-size:.125rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;inset-block-end:0;inset-inline-start:0;inset-inline-end:0;inline-size:100%}:host([bordered][selected]) .container:after{position:absolute;display:block;block-size:.125rem;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;inset-block-end:-1px;inset-inline-start:0;inset-inline-end:0;inline-size:100%;content:""}:host([bordered][selected]) .container.container--bottom:after{inset-block-start:-1px}:host([bordered][selected]:focus) .container:after{background:transparent}.container--bottom .selected-indicator{inset-block-end:unset;inset-block-start:0}:host([bordered]:not([selected]):hover:not(:focus)) .selected-indicator{background-color:var(--calcite-color-foreground-2)}:host([bordered]:not([selected]):hover:not(:focus)) .container:not(.container--bottom) .selected-indicator{box-shadow:inset 0 1px var(--calcite-color-border-1)}:host([bordered]:not([selected]):hover:not(:focus)) .container.container--bottom .selected-indicator{box-shadow:inset 0 -1px var(--calcite-color-border-1)}:host([selected]:focus) .selected-indicator{block-size:4px}.calcite-tab-title--icon{position:relative;margin:0;display:inline-flex;align-self:center}.calcite-tab-title--icon svg{transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out}.container{color:var(--calcite-tab-text-color, var(--calcite-color-text-3))}.container .icon-start{color:var(--calcite-tab-icon-color-start, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.container .icon-end{color:var(--calcite-tab-icon-color-end, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.container:hover,.container:active,:host([selected]) .container{color:var(--calcite-tab-text-color-press, var(--calcite-color-text-1))}.container:hover .icon-start,.container:active .icon-start,:host([selected]) .container .icon-start{color:var(--calcite-tab-icon-color-start-press, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.container:hover .icon-end,.container:active .icon-end,:host([selected]) .container .icon-end{color:var(--calcite-tab-icon-color-end-press, var(--calcite-icon-color, var(--calcite-ui-icon-color)))}.content--has-text{padding:.25rem}.content--has-text .calcite-tab-title--icon.icon-start{margin-inline-end:var(--calcite-spacing-sm)}.content--has-text .calcite-tab-title--icon.icon-end{margin-inline-start:var(--calcite-spacing-sm)}:host([bordered]) .container{border-color:transparent;border-inline-width:var(--calcite-spacing-px);border-inline-style:solid}:host([bordered]) .container.container--bottom{border-block-start-style:solid;border-block-start-width:1px}:host([bordered]) .container.container--bottom .selected-indicator{inset-block-start:unset;inset-block-end:0}:host([bordered]) .container:not(.container--bottom){border-block-end-style:solid;border-block-end-width:1px}:host([bordered]) .container .selected-indicator{inset-block-start:0;inset-block-end:unset;inset-inline-start:-1px;inset-inline-end:0;inline-size:calc(100% + var(--calcite-spacing-base))}:host([bordered]) .container:host(:not([selected])) .container{box-shadow:0 2px 0 0 transparent}:host([bordered]) .container:host(:not([selected])):host(:hover) .container:not(.container--bottom){border-block-end-color:var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) .selected-indicator{box-shadow:inset 0 var(--calcite-internal-tab-shadow-length) var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) :not(.container--bottom){--calcite-internal-tab-shadow-length: 1px}:host([bordered]) .container:host(:not([selected])):host(:hover):host(:not(:focus)) .container--bottom{--calcite-internal-tab-shadow-length: -1px}:host([bordered]) .container:hover{background-color:var(--calcite-tab-background-color-hover, var(--calcite-color-foreground-2));border-block-end-color:var(--calcite-color-border-1)}:host(:hover) .selected-indicator{background-color:var(--calcite-color-border-3)}:host([selected]) .selected-indicator,:host([selected]:hover) .selected-indicator,:host(:focus) .selected-indicator,:host(:active) .selected-indicator{background-color:var(--calcite-tab-accent-color-press, var(--calcite-color-brand))}:host([closed]){display:none}:host([selected][bordered]) .container{border-inline-color:var(--calcite-tab-border-color, var(--calcite-color-border-1))}:host([selected][bordered]) .container:after{background-color:var(--calcite-tab-background-color, var(--calcite-color-foreground-1))}:host([selected][bordered]) .container:hover,:host([selected][bordered]) .container:active{background:transparent}:host(:focus) .container{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:focus) .container:focus-within{outline-color:transparent}:host([icon-start][icon-end]) .calcite-tab-title--icon:first-child{margin-inline-end:var(--calcite-spacing-sm)}:host([layout=inline][bordered]) .scale-m .content,:host([layout=center][bordered]) .scale-m .content{padding-inline:.75rem}:host([layout=inline][bordered]) .scale-s .content,:host([layout=center][bordered]) .scale-s .content{padding-inline:.5rem}:host([layout=inline][bordered]) .scale-l .content,:host([layout=center][bordered]) .scale-l .content{padding-inline:1rem}:host([layout=inline][closable]) .scale-s .content,:host([layout=inline][closable]) .scale-m .content,:host([layout=inline][closable]) .scale-l .content{padding-inline-end:0}.close{--calcite-internal-action-spacing: var(--calcite-internal-tab-title-close-padding);--calcite-internal-action-min-height: unset;--calcite-action-text-color: var(--calcite-tab-close-icon-color);--calcite-action-text-color-press: var(--calcite-tab-close-icon-color-press);--calcite-action-background-color: var(--calcite-tab-close-icon-background-color);--calcite-action-background-color-press: var(--calcite-tab-close-icon-background-color-press);--calcite-action-background-color-hover: var(--calcite-tab-close-icon-background-color-hover);margin:auto;margin-inline:var(--calcite-spacing-sm) var(--calcite-internal-tab-title-close-margin-start)}@media(forced-colors:active){:host{outline-width:0;outline-offset:0}:host(:focus) .container{outline-color:highlight}:host([bordered][selected]) .container{border-block-end-style:none}:host([bordered][selected]) .container--bottom{border-block-start-style:none}.selected-indicator{background-color:highlight}}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) .container{pointer-events:none;opacity:.5}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,h=class extends f{constructor(){super(),this.closeButtonRef=p(),this.direction=k(),this.guid=F.host(x()),this.mutationObserver=d("mutation",()=>this.updateHasText()),this.parentTabsEl=null,this.resizeObserver=d("resize",()=>{this.calciteInternalTabIconChanged.emit()}),this.messages=T(),this.interactiveContainer=I(this),this.controls=null,this.hasText=!1,this.bordered=!1,this.closable=!1,this.closed=!1,this.disabled=!1,this.position="top",this.scale="m",this.selected=!1,this.calciteInternalTabIconChanged=o({cancelable:!1}),this.calciteInternalTabTitleRegister=o({cancelable:!1}),this.calciteInternalTabsActivate=o({cancelable:!1}),this.calciteInternalTabsClose=o({cancelable:!1}),this.calciteInternalTabsFocusFirst=o({cancelable:!1}),this.calciteInternalTabsFocusLast=o({cancelable:!1}),this.calciteInternalTabsFocusNext=o({cancelable:!1}),this.calciteInternalTabsFocusPrevious=o({cancelable:!1}),this.calciteTabsActivate=o({cancelable:!1}),this.calciteTabsClose=o({cancelable:!1}),this.listenOn(document.body,"calciteInternalTabChange",this.internalTabChangeHandler),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={controls:[16,{},{state:!0}],hasText:[16,{},{state:!0}],bordered:[7,{},{reflect:!0,type:Boolean}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],iconEnd:[3,{type:String},{reflect:!0}],iconFlipRtl:[3,{},{reflect:!0}],iconStart:[3,{type:String},{reflect:!0}],layout:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],position:1,scale:1,selected:[7,{},{reflect:!0,type:Boolean}],tab:[3,{},{reflect:!0}]}}static{this.styles=A}async activateTab(t=!0){if(this.disabled||this.closed)return;let i={tab:this.tab,userTriggered:t};this.calciteInternalTabsActivate.emit(i),t&&requestAnimationFrame(()=>this.calciteTabsActivate.emit())}async getTabIdentifier(){return this.tab?this.tab:this.getTabIndex()}async getTabIndex(){return Array.prototype.indexOf.call(y(this.el.parentElement.children).filter(t=>t.matches("calcite-tab-title")),this.el)}_updateAriaInfo(t=[],i=[]){this.controls=t[i.indexOf(this.el.id)]||null}connectedCallback(){super.connectedCallback(),this.setupTextContentObserver(),this.parentTabsEl=this.el.closest("calcite-tabs")}async load(){this.updateHasText(),this.tab&&this.selected&&this.activateTab(!1)}willUpdate(t){t.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.selectedHandler(),this.parentTabsEl&&(this.layout=this.parentTabsEl.layout,this.bordered=this.parentTabsEl.bordered)}async loaded(){this.calciteInternalTabTitleRegister.emit(await this.getTabIdentifier())}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),document.body?.dispatchEvent(new CustomEvent("calciteTabTitleUnregister",{detail:this.el})),this.resizeObserver?.disconnect()}selectedHandler(){this.selected&&this.activateTab(!1)}internalTabChangeHandler(t){t.composedPath().find(n=>n.tagName==="CALCITE-TABS")===this.parentTabsEl&&(this.tab?this.selected=this.tab===t.detail.tab:this.getTabIndex().then(n=>{this.selected=n===t.detail.tab}),t.stopPropagation())}onClick(){this.activateTab()}keyDownHandler(t){switch(t.key){case" ":case"Enter":t.composedPath().includes(this.closeButtonRef.value)||(this.activateTab(),t.preventDefault());break;case"ArrowRight":t.preventDefault(),this.direction==="ltr"?this.calciteInternalTabsFocusNext.emit():this.calciteInternalTabsFocusPrevious.emit();break;case"ArrowLeft":t.preventDefault(),this.direction==="ltr"?this.calciteInternalTabsFocusPrevious.emit():this.calciteInternalTabsFocusNext.emit();break;case"Home":t.preventDefault(),this.calciteInternalTabsFocusFirst.emit();break;case"End":t.preventDefault(),this.calciteInternalTabsFocusLast.emit();break}}closeClickHandler(){this.closeTabTitleAndNotify()}updateHasText(){this.hasText=this.el.textContent.trim().length>0}setContainerRef(t){m(this.resizeObserver,this.containerEl,t),this.containerEl=t}setupTextContentObserver(){this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0})}closeTabTitleAndNotify(){this.closed=!0,this.calciteInternalTabsClose.emit({tab:this.tab}),requestAnimationFrame(()=>this.calciteTabsClose.emit())}render(){let{el:t,closed:i}=this,n=t.id||this.guid,C=a`<calcite-icon class=${c({[e.titleIcon]:!0,[e.iconStart]:!0})} .flipRtl=${this.iconFlipRtl==="start"||this.iconFlipRtl==="both"} .icon=${this.iconStart} .scale=${b(this.scale)}></calcite-icon>`,w=a`<calcite-icon class=${c({[e.titleIcon]:!0,[e.iconEnd]:!0})} .flipRtl=${this.iconFlipRtl==="end"||this.iconFlipRtl==="both"} .icon=${this.iconEnd} .scale=${b(this.scale)}></calcite-icon>`;return r(this.el,"aria-controls",this.controls),this.el.ariaSelected=z(this.selected),r(this.el,"id",n),this.el.role="tab",r(this.el,"tabIndex",this.selected&&!this.disabled?0:-1),this.interactiveContainer({disabled:this.disabled,children:a`<div class=${c({[e.container]:!0,[e.containerBottom]:this.position==="bottom",[e.iconPresent]:!!this.iconStart||!!this.iconEnd,[e.scale(this.scale)]:!0})} .hidden=${i} ${l(this.setContainerRef)}><div class=${c({[e.content]:!0,[e.contentHasText]:this.hasText})}>${this.iconStart?C:null}<slot></slot>${this.iconEnd?w:null}</div>${this.renderCloseButton()}<div class=${c(e.selectedIndicator)}></div></div>`})}renderCloseButton(){let{closable:t,messages:i}=this;return t?g("close-button",a`<calcite-action class=${c(e.close)} icon=x @click=${this.closeClickHandler} .scale=${this.scale} .text=${i.close} ${l(this.closeButtonRef)}></calcite-action>`):null}};v("calcite-tab-title",h);export{h as TabTitle};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as p,b as $,c as S}from"./WXZMRXAK.js";import{a as x}from"./RX7YQTRT.js";import{c as m}from"./RYOYQ7JI.js";import{c as M}from"./U2RL2HER.js";import{a as v}from"./CYL77NSA.js";import"./ZWPNZ5XW.js";import"./PK24O5FM.js";import"./JFBAD4EH.js";import{t as b}from"./UYY6Z6VK.js";import"./T6CCMW7H.js";import{G as g,H as A,S as y,g as f,h,p as l}from"./VOYNOWTM.js";var a=(n,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(n,e,t),t);function C(n){return(e,t)=>{let{slot:i,selector:o}=n??{},s="slot"+(i?`[name=${i}]`:":not([name])");return a(e,t,{get(){let r=this.renderRoot?.querySelector(s),c=r?.assignedElements(n)??[];return o===void 0?c:c.filter(d=>d.matches(o))}})}}var E=f`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([scale=s]){--calcite-internal-action-group-gap: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-group-gap: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-group-gap: var(--calcite-spacing-sm-plus)}:host{display:flex;flex-direction:column;padding:0;background-color:transparent;border-color:var(--calcite-action-group-border-color, var(--calcite-color-border-3));border-style:solid;border-width:0;gap:var(--calcite-internal-action-group-gap)}.container{display:flex;flex-grow:1;flex-direction:column;gap:inherit}:host([columns="1"]){--calcite-internal-action-group-columns: 1}:host([columns="2"]){--calcite-internal-action-group-columns: 2}:host([columns="3"]){--calcite-internal-action-group-columns: 3}:host([columns="4"]){--calcite-internal-action-group-columns: 4}:host([columns="5"]){--calcite-internal-action-group-columns: 5}:host([columns="6"]){--calcite-internal-action-group-columns: 6}:host(:first-child){padding-block-start:0px}:host([layout=horizontal]),:host([layout=horizontal]) .container{flex-direction:row}:host([layout=grid]){display:grid}:host([layout=grid]) .container{display:grid;place-content:stretch;background-color:transparent;gap:var(--calcite-action-group-gap, var(--calcite-internal-action-group-gap));grid-template-columns:repeat(var(--calcite-action-group-columns, var(--calcite-internal-action-group-columns, 3)),auto);padding:var(--calcite-action-group-gap, 1px)}:host([layout=horizontal]) ::slotted(calcite-action-group){border-inline-end:var(--calcite-size-px)}:host([hidden]){display:none}[hidden]{display:none}`,k=Object.defineProperty,P=(n,e,t,i)=>{for(var o=void 0,s=n.length-1,r;s>=0;s--)(r=n[s])&&(o=r(e,t,o)||o);return o&&k(e,t,o),o},u=class extends g{constructor(){super(),this.messages=x(),this.focusSetter=v()(this),this.hasMenuActions=!1,this.expanded=!1,this.layout="vertical",this.menuOpen=!1,this.overlayPositioning="absolute",this.overflowActionsDisabled=!1,this.scale="m",this.selectionMode="none",this.topLayerDisabled=!1,this.selectedActions=[],this.calciteActionGroupCollapse=l({cancelable:!1}),this.calciteActionGroupExpand=l({cancelable:!1}),this.calciteActionGroupChange=l({cancelable:!1}),this.listen("click",this.handleActionClick)}static{this.properties={hasMenuActions:[16,{},{state:!0}],columns:[11,{},{type:Number,reflect:!0}],expanded:[7,{},{reflect:!0,type:Boolean}],label:1,layout:[3,{},{reflect:!0}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],overflowActionsDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],selectedActions:[0,{},{attribute:!1}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=E}async setFocus(e){return this.focusSetter(()=>this.el,e)}willUpdate(e){if(this.hasUpdated||e.has("selectionMode")){if(this.selectionMode!=="none"?this.setRoleOnActions():this.selectionMode==="none"&&this.clearActionAriaAttributes(),this.selectionMode==="single"||this.selectionMode==="single-persist"){let t=this.actions?.filter(i=>i.active)??[];t.length>1&&this.actions.forEach(i=>this.updateAction(i,i===t[t.length-1]))}this.updateSelectedActions(this.selectionMode==="none"?[]:this.actions?.filter(t=>t.active)??[])}e.has("expanded")&&((this.hasUpdated||this.expanded!==!1)&&(this.menuOpen=!1),this.hasUpdated&&(this.expanded?this.calciteActionGroupExpand.emit():this.calciteActionGroupCollapse.emit()))}setActiveAction(e,t){if(this.selectionMode==="multiple"){let i=!t.active;this.updateAction(t,i),this.updateSelectedActions(this.actions.filter(o=>o.active)),this.calciteActionGroupChange.emit();return}if(this.selectionMode==="single"){let i=!t.active;this.actions.forEach((o,s)=>this.updateAction(o,s===e&&i)),this.updateSelectedActions(this.actions.filter(o=>o.active)),this.calciteActionGroupChange.emit();return}if(this.selectionMode==="single-persist"){this.actions[e].active||(this.actions.forEach((i,o)=>this.updateAction(i,o===e)),this.updateSelectedActions([t]),this.calciteActionGroupChange.emit());return}}setMenuOpen(e){this.menuOpen=!!e.currentTarget.open}handleMenuActionsSlotChange(e){this.hasMenuActions=b(e)}handleActionClick(e){let t=e.composedPath().find(o=>M(o));if(!t||t.disabled)return;let i=this.actions.indexOf(t);i===-1||this.selectionMode==="none"||this.setActiveAction(i,t)}setRoleOnActions(){this.actions.forEach(e=>{e.aria={...e.aria,role:this.selectionMode==="single"||this.selectionMode==="single-persist"?"radio":"checkbox"},this.setActionAriaChecked(e,e.active)})}setActionAriaChecked(e,t){e.aria={...e.aria,checked:t?"true":"false"}}clearActionAriaAttributes(){this.selectionMode==="none"&&this.actions.forEach(e=>{e.aria&&(e.aria.checked=void 0,e.aria.role=void 0,e.aria={...e.aria})})}updateAction(e,t){e.active=t,this.setActionAriaChecked(e,t)}updateSelectedActions(e){let t=this.selectedActions;t.length===e.length&&t.every((o,s)=>o===e[s])||(this.selectedActions=e)}renderMenu(){let{expanded:e,menuOpen:t,scale:i,layout:o,messages:s,overlayPositioning:r,hasMenuActions:c,menuFlipPlacements:d,menuPlacement:O}=this;return h`<calcite-action-menu .expanded=${e} .flipPlacements=${d??(o==="horizontal"?["top","bottom"]:["left","right"])} .hidden=${!c} .label=${s.more} @calciteActionMenuOpen=${this.setMenuOpen} .open=${t} .overlayPositioning=${r} .placement=${O??(o==="horizontal"?"bottom-start":"leading-start")} .scale=${i} .topLayerDisabled=${this.topLayerDisabled}><calcite-action .aria=${{expanded:e}} .icon=${$.menu} .scale=${i} slot=${m.trigger} .text=${s.more} .textEnabled=${e}></calcite-action><slot name=${p.menuActions} @slotchange=${this.handleMenuActionsSlotChange}></slot><slot name=${p.menuTooltip} slot=${m.tooltip}></slot></calcite-action-menu>`}render(){return h`<div .ariaLabel=${this.label} class=${A(S.container)} .role=${this.selectionMode==="multiple"||this.selectionMode==="none"?"group":"radiogroup"}><slot></slot>${this.renderMenu()}</div>`}};P([C({selector:"calcite-action"})],u.prototype,"actions");y("calcite-action-group",u);export{u as ActionGroup};
2
+ import{a as p,b as $,c as S}from"./WXZMRXAK.js";import{a as x}from"./GBNEJ7ZF.js";import{c as m}from"./RYOYQ7JI.js";import{c as M}from"./U2RL2HER.js";import{a as v}from"./4XBIPWD2.js";import"./ZWPNZ5XW.js";import"./4PN5ZOFS.js";import"./G4ZSDWUZ.js";import{t as b}from"./5EY2EEDX.js";import"./T6CCMW7H.js";import{G as g,H as A,S as y,g as f,h,p as l}from"./ATPHVTBE.js";var a=(n,e,t)=>(t.configurable=!0,t.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(n,e,t),t);function C(n){return(e,t)=>{let{slot:i,selector:o}=n??{},s="slot"+(i?`[name=${i}]`:":not([name])");return a(e,t,{get(){let r=this.renderRoot?.querySelector(s),c=r?.assignedElements(n)??[];return o===void 0?c:c.filter(d=>d.matches(o))}})}}var E=f`:host{box-sizing:border-box;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);font-size:var(--calcite-font-size--1)}:host *{box-sizing:border-box}:host([scale=s]){--calcite-internal-action-group-gap: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-group-gap: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-group-gap: var(--calcite-spacing-sm-plus)}:host{display:flex;flex-direction:column;padding:0;background-color:transparent;border-color:var(--calcite-action-group-border-color, var(--calcite-color-border-3));border-style:solid;border-width:0;gap:var(--calcite-internal-action-group-gap)}.container{display:flex;flex-grow:1;flex-direction:column;gap:inherit}:host([columns="1"]){--calcite-internal-action-group-columns: 1}:host([columns="2"]){--calcite-internal-action-group-columns: 2}:host([columns="3"]){--calcite-internal-action-group-columns: 3}:host([columns="4"]){--calcite-internal-action-group-columns: 4}:host([columns="5"]){--calcite-internal-action-group-columns: 5}:host([columns="6"]){--calcite-internal-action-group-columns: 6}:host(:first-child){padding-block-start:0px}:host([layout=horizontal]),:host([layout=horizontal]) .container{flex-direction:row}:host([layout=grid]){display:grid}:host([layout=grid]) .container{display:grid;place-content:stretch;background-color:transparent;gap:var(--calcite-action-group-gap, var(--calcite-internal-action-group-gap));grid-template-columns:repeat(var(--calcite-action-group-columns, var(--calcite-internal-action-group-columns, 3)),auto);padding:var(--calcite-action-group-gap, 1px)}:host([layout=horizontal]) ::slotted(calcite-action-group){border-inline-end:var(--calcite-size-px)}:host([hidden]){display:none}[hidden]{display:none}`,k=Object.defineProperty,P=(n,e,t,i)=>{for(var o=void 0,s=n.length-1,r;s>=0;s--)(r=n[s])&&(o=r(e,t,o)||o);return o&&k(e,t,o),o},u=class extends g{constructor(){super(),this.messages=x(),this.focusSetter=v()(this),this.hasMenuActions=!1,this.expanded=!1,this.layout="vertical",this.menuOpen=!1,this.overlayPositioning="absolute",this.overflowActionsDisabled=!1,this.scale="m",this.selectionMode="none",this.topLayerDisabled=!1,this.selectedActions=[],this.calciteActionGroupCollapse=l({cancelable:!1}),this.calciteActionGroupExpand=l({cancelable:!1}),this.calciteActionGroupChange=l({cancelable:!1}),this.listen("click",this.handleActionClick)}static{this.properties={hasMenuActions:[16,{},{state:!0}],columns:[11,{},{type:Number,reflect:!0}],expanded:[7,{},{reflect:!0,type:Boolean}],label:1,layout:[3,{},{reflect:!0}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],overflowActionsDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],selectedActions:[0,{},{attribute:!1}]}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=E}async setFocus(e){return this.focusSetter(()=>this.el,e)}willUpdate(e){if(this.hasUpdated||e.has("selectionMode")){if(this.selectionMode!=="none"?this.setRoleOnActions():this.selectionMode==="none"&&this.clearActionAriaAttributes(),this.selectionMode==="single"||this.selectionMode==="single-persist"){let t=this.actions?.filter(i=>i.active)??[];t.length>1&&this.actions.forEach(i=>this.updateAction(i,i===t[t.length-1]))}this.updateSelectedActions(this.selectionMode==="none"?[]:this.actions?.filter(t=>t.active)??[])}e.has("expanded")&&((this.hasUpdated||this.expanded!==!1)&&(this.menuOpen=!1),this.hasUpdated&&(this.expanded?this.calciteActionGroupExpand.emit():this.calciteActionGroupCollapse.emit()))}setActiveAction(e,t){if(this.selectionMode==="multiple"){let i=!t.active;this.updateAction(t,i),this.updateSelectedActions(this.actions.filter(o=>o.active)),this.calciteActionGroupChange.emit();return}if(this.selectionMode==="single"){let i=!t.active;this.actions.forEach((o,s)=>this.updateAction(o,s===e&&i)),this.updateSelectedActions(this.actions.filter(o=>o.active)),this.calciteActionGroupChange.emit();return}if(this.selectionMode==="single-persist"){this.actions[e].active||(this.actions.forEach((i,o)=>this.updateAction(i,o===e)),this.updateSelectedActions([t]),this.calciteActionGroupChange.emit());return}}setMenuOpen(e){this.menuOpen=!!e.currentTarget.open}handleMenuActionsSlotChange(e){this.hasMenuActions=b(e)}handleActionClick(e){let t=e.composedPath().find(o=>M(o));if(!t||t.disabled)return;let i=this.actions.indexOf(t);i===-1||this.selectionMode==="none"||this.setActiveAction(i,t)}setRoleOnActions(){this.actions.forEach(e=>{e.aria={...e.aria,role:this.selectionMode==="single"||this.selectionMode==="single-persist"?"radio":"checkbox"},this.setActionAriaChecked(e,e.active)})}setActionAriaChecked(e,t){e.aria={...e.aria,checked:t?"true":"false"}}clearActionAriaAttributes(){this.selectionMode==="none"&&this.actions.forEach(e=>{e.aria&&(e.aria.checked=void 0,e.aria.role=void 0,e.aria={...e.aria})})}updateAction(e,t){e.active=t,this.setActionAriaChecked(e,t)}updateSelectedActions(e){let t=this.selectedActions;t.length===e.length&&t.every((o,s)=>o===e[s])||(this.selectedActions=e)}renderMenu(){let{expanded:e,menuOpen:t,scale:i,layout:o,messages:s,overlayPositioning:r,hasMenuActions:c,menuFlipPlacements:d,menuPlacement:O}=this;return h`<calcite-action-menu .expanded=${e} .flipPlacements=${d??(o==="horizontal"?["top","bottom"]:["left","right"])} .hidden=${!c} .label=${s.more} @calciteActionMenuOpen=${this.setMenuOpen} .open=${t} .overlayPositioning=${r} .placement=${O??(o==="horizontal"?"bottom-start":"leading-start")} .scale=${i} .topLayerDisabled=${this.topLayerDisabled}><calcite-action .aria=${{expanded:e}} .icon=${$.menu} .scale=${i} slot=${m.trigger} .text=${s.more} .textEnabled=${e}></calcite-action><slot name=${p.menuActions} @slotchange=${this.handleMenuActionsSlotChange}></slot><slot name=${p.menuTooltip} slot=${m.tooltip}></slot></calcite-action-menu>`}render(){return h`<div .ariaLabel=${this.label} class=${A(S.container)} .role=${this.selectionMode==="multiple"||this.selectionMode==="none"?"group":"radiogroup"}><slot></slot>${this.renderMenu()}</div>`}};P([C({selector:"calcite-action"})],u.prototype,"actions");y("calcite-action-group",u);export{u as ActionGroup};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as p}from"./VI7SBYXT.js";import{a as g}from"./CYL77NSA.js";import"./ZWPNZ5XW.js";import"./PK24O5FM.js";import"./JFBAD4EH.js";import{A as w}from"./UYY6Z6VK.js";import"./T6CCMW7H.js";import{E as d,F as m,G as f,H as h,S as u,g as c,h as l}from"./VOYNOWTM.js";var n={frame:"frame",frameAdvancing:"frame--advancing",frameRetreating:"frame--retreating"},b=c`: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}`,r=class extends f{constructor(){super(),this.frameRef=d(),this.itemMutationObserver=p("mutation",()=>this.updateItemsAndProps()),this.items=[],this.selectedIndex=-1,this.focusSetter=g()(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 w(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 i?e.indexOf(i):-1}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={[n.frame]:!0,[n.frameAdvancing]:e==="advancing",[n.frameRetreating]:e==="retreating"};return l`<div class=${h(i)} ${m(this.frameRef)}><slot></slot></div>`}};u("calcite-flow",r);export{r as Flow};
2
+ import{a as p}from"./VI7SBYXT.js";import{a as g}from"./4XBIPWD2.js";import"./ZWPNZ5XW.js";import"./4PN5ZOFS.js";import"./G4ZSDWUZ.js";import{A as w}from"./5EY2EEDX.js";import"./T6CCMW7H.js";import{E as d,F as m,G as f,H as h,S as u,g as c,h as l}from"./ATPHVTBE.js";var n={frame:"frame",frameAdvancing:"frame--advancing",frameRetreating:"frame--retreating"},b=c`: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}`,r=class extends f{constructor(){super(),this.frameRef=d(),this.itemMutationObserver=p("mutation",()=>this.updateItemsAndProps()),this.items=[],this.selectedIndex=-1,this.focusSetter=g()(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 w(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 i?e.indexOf(i):-1}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={[n.frame]:!0,[n.frameAdvancing]:e==="advancing",[n.frameRetreating]:e==="retreating"};return l`<div class=${h(i)} ${m(this.frameRef)}><slot></slot></div>`}};u("calcite-flow",r);export{r as Flow};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as n}from"./ES72YVWM.js";import{a as o}from"./CYL77NSA.js";import"./ZWPNZ5XW.js";import"./PK24O5FM.js";import"./JFBAD4EH.js";import"./UYY6Z6VK.js";import"./T6CCMW7H.js";import{G as r,S as c,g as s,h as a,p as i}from"./VOYNOWTM.js";var u=s`:host{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,e=class extends r{constructor(){super(...arguments),this._active=!1,this.focusSetter=o()(this),this.focusTrapController=n({focusTrapOptions:{onActivate:()=>{this.setActive(!0)},onDeactivate:()=>{this.setActive(!1)}}})(this),this.focusTrapDisabled=!1,this.calciteFocusTrapActiveChange=i({cancelable:!1})}static{this.properties={focusTrapDisabled:[7,{},{reflect:!0,type:Boolean}],active:[32,{},{attribute:!1,readOnly:!0}],focusTrapDisabledOverride:[0,{},{attribute:!1}],focusTrapOptions:[0,{},{attribute:!1}]}}static{this.styles=u}get active(){return this._active}async activate(){this.focusTrapController.activate()}async deactivate(){this.focusTrapController.deactivate()}async setFocus(t){return this.focusSetter(()=>this.el,t)}async updateFocusTrapElements(t){this.focusTrapController.setExtraContainers(t),this.focusTrapController.updateContainerElements()}setActive(t){let l=this._active;this._active=t,this.requestUpdate("active",l),this.calciteFocusTrapActiveChange.emit()}render(){return a`<slot></slot>`}};c("calcite-focus-trap",e);export{e as FocusTrap};
2
+ import{a as n}from"./IOBH7Q3C.js";import{a as o}from"./4XBIPWD2.js";import"./ZWPNZ5XW.js";import"./4PN5ZOFS.js";import"./G4ZSDWUZ.js";import"./5EY2EEDX.js";import"./T6CCMW7H.js";import{G as r,S as c,g as s,h as a,p as i}from"./ATPHVTBE.js";var u=s`:host{display:contents}:host([hidden]){display:none}[hidden]{display:none}`,e=class extends r{constructor(){super(...arguments),this._active=!1,this.focusSetter=o()(this),this.focusTrapController=n({focusTrapOptions:{onActivate:()=>{this.setActive(!0)},onDeactivate:()=>{this.setActive(!1)}}})(this),this.focusTrapDisabled=!1,this.calciteFocusTrapActiveChange=i({cancelable:!1})}static{this.properties={focusTrapDisabled:[7,{},{reflect:!0,type:Boolean}],active:[32,{},{attribute:!1,readOnly:!0}],focusTrapDisabledOverride:[0,{},{attribute:!1}],focusTrapOptions:[0,{},{attribute:!1}]}}static{this.styles=u}get active(){return this._active}async activate(){this.focusTrapController.activate()}async deactivate(){this.focusTrapController.deactivate()}async setFocus(t){return this.focusSetter(()=>this.el,t)}async updateFocusTrapElements(t){this.focusTrapController.setExtraContainers(t),this.focusTrapController.updateContainerElements()}setActive(t){let l=this._active;this._active=t,this.requestUpdate("active",l),this.calciteFocusTrapActiveChange.emit()}render(){return a`<slot></slot>`}};c("calcite-focus-trap",e);export{e as FocusTrap};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as f}from"./QUKECT32.js";import{a as u}from"./CYL77NSA.js";import"./ZWPNZ5XW.js";import"./PK24O5FM.js";import"./JFBAD4EH.js";import{y as i}from"./UYY6Z6VK.js";import"./T6CCMW7H.js";import{E as o,F as n,G as h,H as m,S as p,g as c,h as r,p as d}from"./VOYNOWTM.js";var b=c`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block}.container{display:flex;flex-wrap:wrap;gap:var(--calcite-card-group-space, var(--calcite-card-group-gap, var(--calcite-spacing-md)))}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,S={container:"container"},l=class extends h{constructor(){super(),this.items=[],this.slotRef=o(),this.focusSetter=u()(this),this.interactiveContainer=f(this),this.disabled=!1,this.scale="m",this.selectedItems=[],this.selectionMode="none",this.calciteCardGroupSelect=d({cancelable:!1}),this.listen("calciteInternalCardKeyEvent",this.calciteInternalCardKeyEventListener),this.listen("calciteCardSelect",this.calciteCardSelectListener)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],label:1,scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=b}async setFocus(e){return this.focusSetter(()=>this.items[0],e)}willUpdate(e){e.has("selectionMode")&&this.hasUpdated&&this.updateItemsOnSelectionModeChange(),e.has("scale")&&(this.hasUpdated||this.scale!=="m")&&this.updateItemsScale()}loaded(){this.updateSelectedItems()}calciteInternalCardKeyEventListener(e){if(e.composedPath().includes(this.el)){let s=this.items.filter(t=>!t.disabled);switch(e.detail.key){case"ArrowRight":i(s,e.target,"next",!0,!1);break;case"ArrowLeft":i(s,e.target,"previous",!0,!1);break;case"Home":i(s,e.target,"first",!0,!1);break;case"End":i(s,e.target,"last",!0,!1);break}}}calciteCardSelectListener(e){e.composedPath().includes(this.el)&&!e.target.selectable&&this.setSelectedItems(!0,e.target)}updateItemsOnSelectionModeChange(){this.updateSlottedItems(this.slotRef.value),this.updateSelectedItems()}updateItemsOnSlotChange(e){this.updateSlottedItems(e.target),this.updateSelectedItems(),this.updateItemsScale()}updateSlottedItems(e){this.items=e?.assignedElements({flatten:!0}).filter(s=>s?.matches("calcite-card"))||[]}updateItemsScale(){this.items.forEach(e=>{e.scale=this.scale})}updateSelectedItems(){this.items.forEach(e=>{e.selectionMode=this.selectionMode}),this.setSelectedItems(!1)}setSelectedItems(e,s){s&&this.items.forEach(t=>{let a=s===t;switch(this.selectionMode){case"multiple":a&&(t.selected=!t.selected);break;case"single":t.selected=a?!t.selected:!1;break;case"single-persist":t.selected=!!a;break}}),this.selectedItems=this.items.filter(t=>t.selected),e&&this.selectionMode!=="none"&&!this.disabled&&this.calciteCardGroupSelect.emit()}render(){let e=this.selectionMode==="none"||this.selectionMode==="multiple"?"group":"radiogroup";return this.interactiveContainer({disabled:this.disabled,children:r`<div .ariaLabel=${this.label} class=${m(S.container)} .role=${e}><slot @slotchange=${this.updateItemsOnSlotChange} ${n(this.slotRef)}></slot></div>`})}};p("calcite-card-group",l);export{l as CardGroup};
2
+ import{a as f}from"./2U7LTQ5E.js";import{a as u}from"./4XBIPWD2.js";import"./ZWPNZ5XW.js";import"./4PN5ZOFS.js";import"./G4ZSDWUZ.js";import{y as i}from"./5EY2EEDX.js";import"./T6CCMW7H.js";import{E as o,F as n,G as h,H as m,S as p,g as c,h as r,p as d}from"./ATPHVTBE.js";var b=c`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{display:block}.container{display:flex;flex-wrap:wrap;gap:var(--calcite-card-group-space, var(--calcite-card-group-gap, var(--calcite-spacing-md)))}:host([hidden]){display:none}[hidden]{display:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}`,S={container:"container"},l=class extends h{constructor(){super(),this.items=[],this.slotRef=o(),this.focusSetter=u()(this),this.interactiveContainer=f(this),this.disabled=!1,this.scale="m",this.selectedItems=[],this.selectionMode="none",this.calciteCardGroupSelect=d({cancelable:!1}),this.listen("calciteInternalCardKeyEvent",this.calciteInternalCardKeyEventListener),this.listen("calciteCardSelect",this.calciteCardSelectListener)}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],label:1,scale:[3,{},{reflect:!0}],selectedItems:[0,{},{attribute:!1}],selectionMode:[3,{},{reflect:!0}]}}static{this.styles=b}async setFocus(e){return this.focusSetter(()=>this.items[0],e)}willUpdate(e){e.has("selectionMode")&&this.hasUpdated&&this.updateItemsOnSelectionModeChange(),e.has("scale")&&(this.hasUpdated||this.scale!=="m")&&this.updateItemsScale()}loaded(){this.updateSelectedItems()}calciteInternalCardKeyEventListener(e){if(e.composedPath().includes(this.el)){let s=this.items.filter(t=>!t.disabled);switch(e.detail.key){case"ArrowRight":i(s,e.target,"next",!0,!1);break;case"ArrowLeft":i(s,e.target,"previous",!0,!1);break;case"Home":i(s,e.target,"first",!0,!1);break;case"End":i(s,e.target,"last",!0,!1);break}}}calciteCardSelectListener(e){e.composedPath().includes(this.el)&&!e.target.selectable&&this.setSelectedItems(!0,e.target)}updateItemsOnSelectionModeChange(){this.updateSlottedItems(this.slotRef.value),this.updateSelectedItems()}updateItemsOnSlotChange(e){this.updateSlottedItems(e.target),this.updateSelectedItems(),this.updateItemsScale()}updateSlottedItems(e){this.items=e?.assignedElements({flatten:!0}).filter(s=>s?.matches("calcite-card"))||[]}updateItemsScale(){this.items.forEach(e=>{e.scale=this.scale})}updateSelectedItems(){this.items.forEach(e=>{e.selectionMode=this.selectionMode}),this.setSelectedItems(!1)}setSelectedItems(e,s){s&&this.items.forEach(t=>{let a=s===t;switch(this.selectionMode){case"multiple":a&&(t.selected=!t.selected);break;case"single":t.selected=a?!t.selected:!1;break;case"single-persist":t.selected=!!a;break}}),this.selectedItems=this.items.filter(t=>t.selected),e&&this.selectionMode!=="none"&&!this.disabled&&this.calciteCardGroupSelect.emit()}render(){let e=this.selectionMode==="none"||this.selectionMode==="multiple"?"group":"radiogroup";return this.interactiveContainer({disabled:this.disabled,children:r`<div .ariaLabel=${this.label} class=${m(S.container)} .role=${e}><slot @slotchange=${this.updateItemsOnSlotChange} ${n(this.slotRef)}></slot></div>`})}};p("calcite-card-group",l);export{l as CardGroup};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as i}from"./HI5BMWLV.js";import{c as k}from"./GIWBHPUL.js";import{c as u,d as g,e as v}from"./PV5JONG7.js";import{a as m}from"./QUKECT32.js";import{a as p}from"./YP3AYJH3.js";import{a as b}from"./CYL77NSA.js";import"./ZWPNZ5XW.js";import"./PK24O5FM.js";import"./JFBAD4EH.js";import"./UYY6Z6VK.js";import"./T6CCMW7H.js";import{E as s,F as o,G as d,H as t,S as h,g as c,h as l,p as r}from"./VOYNOWTM.js";var a={container:"container",track:"track",handle:"handle"},f=c`: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]) .container{block-size:.75rem}:host([scale=s]) .track{block-size:.75rem;inline-size:1.5rem}:host([scale=s]) .handle{block-size:.5rem;inline-size:.5rem}:host([scale=m]) .container{block-size:1rem}:host([scale=m]) .track{block-size:1rem;inline-size:2rem}:host([scale=m]) .handle{block-size:.75rem;inline-size:.75rem}:host([scale=l]) .container{block-size:1.5rem}:host([scale=l]) .track{block-size:1.5rem;inline-size:3rem}:host([scale=l]) .handle{block-size:1.25rem;inline-size:1.25rem}:host{position:relative;display:inline-block;inline-size:auto;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle;tap-highlight-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{outline:none;display:flex}.track{pointer-events:none;position:relative;box-sizing:border-box;display:inline-block;vertical-align:top;outline-color:transparent;border-radius:var(--calcite-switch-corner-radius, 9999px);border-color:var(--calcite-switch-border-color);background-color:var(--calcite-switch-background-color, var(--calcite-color-border-input))}.container:focus .track{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.container:hover .track{background-color:var(--calcite-switch-background-color-hover, var(--calcite-color-text-3))}.handle{pointer-events:none;position:absolute;display:block;transition-property:all;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);inset-block-start:var(--calcite-spacing-base);inset-inline:var(--calcite-spacing-base) auto;background-color:var(--calcite-switch-handle-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-switch-handle-border-color);border-radius:var(--calcite-switch-corner-radius, 9999px);box-shadow:var(--calcite-switch-handle-shadow)}:host([checked]) .track{background-color:var(--calcite-switch-background-color, var(--calcite-color-brand))}:host([checked]) .handle{inset-inline:auto var(--calcite-spacing-base)}:host([checked]):host(:hover:not([disabled])) .track{background-color:var(--calcite-switch-background-color-hover, var(--calcite-color-brand-hover))}@media(forced-colors:active){:host([checked]) .track{background-color:canvasText}}.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)}::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}`,n=class extends d{constructor(){super(),this.formSupport=k({inputType:"checkbox"})(this),this.switchRef=s(),this.focusSetter=b()(this),this.interactiveContainer=m(this),this.checked=!1,this.disabled=!1,this.scale="m",this.calciteSwitchChange=r({cancelable:!1}),this.listen("click",this.clickHandler),this.listen("keydown",this.keyDownHandler)}static{this.properties={checked:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],label:1,labelTextEnd:1,labelTextStart:1,name:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],value:1}}static{this.formAssociated=!0}static{this.styles=f}async setFocus(e){return this.focusSetter(()=>this.switchRef.value,e)}connectedCallback(){super.connectedCallback(),u(this)}disconnectedCallback(){super.disconnectedCallback(),g(this)}keyDownHandler(e){!this.disabled&&p(e.key)&&(this.toggle(),e.preventDefault())}onLabelClick(){this.disabled||(this.toggle(),this.setFocus())}toggle(){this.checked=!this.checked,this.calciteSwitchChange.emit()}clickHandler(){this.disabled||this.toggle()}render(){return this.interactiveContainer({disabled:this.disabled,children:l`<div .ariaChecked=${this.checked} .ariaLabel=${v(this)} class=${t(a.container)} role=switch tabindex=0 ${o(this.switchRef)}>${this.labelTextStart&&i({alignmentCenter:!0,bottomSpacingDisabled:!0,labelText:this.labelTextStart,spacingInlineEnd:!0})||""}<div class=${t(a.track)}><div class=${t(a.handle)}></div></div>${this.labelTextEnd&&i({alignmentCenter:!0,bottomSpacingDisabled:!0,labelText:this.labelTextEnd,spacingInlineStart:!0})||""}</div>`})}};h("calcite-switch",n);export{n as Switch};
2
+ import{a as i}from"./XD2JOD4K.js";import{c as k}from"./3GSXR65T.js";import{c as u,d as g,e as v}from"./KPR7F2IQ.js";import{a as m}from"./2U7LTQ5E.js";import{a as p}from"./YP3AYJH3.js";import{a as b}from"./4XBIPWD2.js";import"./ZWPNZ5XW.js";import"./4PN5ZOFS.js";import"./G4ZSDWUZ.js";import"./5EY2EEDX.js";import"./T6CCMW7H.js";import{E as s,F as o,G as d,H as t,S as h,g as c,h as l,p as r}from"./ATPHVTBE.js";var a={container:"container",track:"track",handle:"handle"},f=c`: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]) .container{block-size:.75rem}:host([scale=s]) .track{block-size:.75rem;inline-size:1.5rem}:host([scale=s]) .handle{block-size:.5rem;inline-size:.5rem}:host([scale=m]) .container{block-size:1rem}:host([scale=m]) .track{block-size:1rem;inline-size:2rem}:host([scale=m]) .handle{block-size:.75rem;inline-size:.75rem}:host([scale=l]) .container{block-size:1.5rem}:host([scale=l]) .track{block-size:1.5rem;inline-size:3rem}:host([scale=l]) .handle{block-size:1.25rem;inline-size:1.25rem}:host{position:relative;display:inline-block;inline-size:auto;cursor:pointer;-webkit-user-select:none;user-select:none;vertical-align:middle;tap-highlight-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{outline:none;display:flex}.track{pointer-events:none;position:relative;box-sizing:border-box;display:inline-block;vertical-align:top;outline-color:transparent;border-radius:var(--calcite-switch-corner-radius, 9999px);border-color:var(--calcite-switch-border-color);background-color:var(--calcite-switch-background-color, var(--calcite-color-border-input))}.container:focus .track{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(var(--calcite-spacing-base) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.container:hover .track{background-color:var(--calcite-switch-background-color-hover, var(--calcite-color-text-3))}.handle{pointer-events:none;position:absolute;display:block;transition-property:all;transition-duration:var(--calcite-animation-timing);transition-timing-function:cubic-bezier(.4,0,.2,1);inset-block-start:var(--calcite-spacing-base);inset-inline:var(--calcite-spacing-base) auto;background-color:var(--calcite-switch-handle-background-color, var(--calcite-color-foreground-1));border-color:var(--calcite-switch-handle-border-color);border-radius:var(--calcite-switch-corner-radius, 9999px);box-shadow:var(--calcite-switch-handle-shadow)}:host([checked]) .track{background-color:var(--calcite-switch-background-color, var(--calcite-color-brand))}:host([checked]) .handle{inset-inline:auto var(--calcite-spacing-base)}:host([checked]):host(:hover:not([disabled])) .track{background-color:var(--calcite-switch-background-color-hover, var(--calcite-color-brand-hover))}@media(forced-colors:active){:host([checked]) .track{background-color:canvasText}}.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)}::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}`,n=class extends d{constructor(){super(),this.formSupport=k({inputType:"checkbox"})(this),this.switchRef=s(),this.focusSetter=b()(this),this.interactiveContainer=m(this),this.checked=!1,this.disabled=!1,this.scale="m",this.calciteSwitchChange=r({cancelable:!1}),this.listen("click",this.clickHandler),this.listen("keydown",this.keyDownHandler)}static{this.properties={checked:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],form:[3,{},{reflect:!0}],label:1,labelTextEnd:1,labelTextStart:1,name:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],value:1}}static{this.formAssociated=!0}static{this.styles=f}async setFocus(e){return this.focusSetter(()=>this.switchRef.value,e)}connectedCallback(){super.connectedCallback(),u(this)}disconnectedCallback(){super.disconnectedCallback(),g(this)}keyDownHandler(e){!this.disabled&&p(e.key)&&(this.toggle(),e.preventDefault())}onLabelClick(){this.disabled||(this.toggle(),this.setFocus())}toggle(){this.checked=!this.checked,this.calciteSwitchChange.emit()}clickHandler(){this.disabled||this.toggle()}render(){return this.interactiveContainer({disabled:this.disabled,children:l`<div .ariaChecked=${this.checked} .ariaLabel=${v(this)} class=${t(a.container)} role=switch tabindex=0 ${o(this.switchRef)}>${this.labelTextStart&&i({alignmentCenter:!0,bottomSpacingDisabled:!0,labelText:this.labelTextStart,spacingInlineEnd:!0})||""}<div class=${t(a.track)}><div class=${t(a.handle)}></div></div>${this.labelTextEnd&&i({alignmentCenter:!0,bottomSpacingDisabled:!0,labelText:this.labelTextEnd,spacingInlineStart:!0})||""}</div>`})}};h("calcite-switch",n);export{n as Switch};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{i as L,j as C,z as h}from"./UYY6Z6VK.js";var k="calciteInternalLabelClick",E="calciteInternalLabelConnected",f="calciteInternalLabelDisconnected",v="calcite-label",r=new WeakMap,i=new WeakMap,c=new WeakMap,d=new WeakMap,s=new Set,y=e=>{let{id:t}=e,l=t&&L(e,{selector:`${v}[for="${t}"]`});if(l)return l;let a=C(e,v);return!a||M(a,e)?null:a};function M(e,t){let l,a="custom-element-ancestor-check",o=(n=>{n.stopImmediatePropagation();let u=n.composedPath();l=u.slice(u.indexOf(t),u.indexOf(e))});return e.addEventListener(a,o,{once:!0}),t.dispatchEvent(new CustomEvent(a,{composed:!0,bubbles:!0})),e.removeEventListener(a,o),l.filter(n=>n!==t&&n!==e).filter(n=>n.tagName?.includes("-")).length>0}function m(e){if(!e)return;let t=y(e.el);if(t&&i.has(t)&&t===e.labelEl||!t&&s.has(e))return;let l=O.bind(e);if(t){e.labelEl=t;let a=r.get(t)||[];a.push(e),r.set(t,a.sort(w)),i.has(e.labelEl)||(i.set(e.labelEl,g),e.labelEl.addEventListener(k,g)),s.delete(e),document.removeEventListener(E,c.get(e)),d.set(e,l),document.addEventListener(f,l)}else s.has(e)||(l(),document.removeEventListener(f,d.get(e)))}function T(e){if(!e||(s.delete(e),document.removeEventListener(E,c.get(e)),document.removeEventListener(f,d.get(e)),c.delete(e),d.delete(e),!e.labelEl))return;let t=r.get(e.labelEl);t.length===1&&(e.labelEl.removeEventListener(k,i.get(e.labelEl)),i.delete(e.labelEl)),r.set(e.labelEl,t.filter(l=>l!==e).sort(w)),e.labelEl=void 0}function w(e,t){return h(e.el,t.el)?-1:1}function I(e){return e.label||e.labelEl?.textContent?.trim()||""}function g(e){let t=e.detail.sourceEvent.target,l=r.get(this),a=l.find(n=>n.el===t);if(a&&l.includes(a))return;let b=l[0];b.disabled||b.onLabelClick(e)}function D(){s.has(this)&&m(this)}function O(){s.add(this);let e=c.get(this)||D.bind(this);c.set(this,e),document.addEventListener(E,e)}async function B(e){if(await e.componentOnReady(),r.has(e))return;let l=e.for&&e.ownerDocument?.getElementById(e.for);l&&requestAnimationFrame(()=>{for(let a of s)if(a.el===l){m(a);break}})}export{E as a,f as b,m as c,T as d,I as e,B as f};
2
+ import{i as L,j as C,z as h}from"./5EY2EEDX.js";var k="calciteInternalLabelClick",E="calciteInternalLabelConnected",f="calciteInternalLabelDisconnected",v="calcite-label",r=new WeakMap,i=new WeakMap,c=new WeakMap,d=new WeakMap,s=new Set,y=e=>{let{id:t}=e,l=t&&L(e,{selector:`${v}[for="${t}"]`});if(l)return l;let a=C(e,v);return!a||M(a,e)?null:a};function M(e,t){let l,a="custom-element-ancestor-check",o=(n=>{n.stopImmediatePropagation();let u=n.composedPath();l=u.slice(u.indexOf(t),u.indexOf(e))});return e.addEventListener(a,o,{once:!0}),t.dispatchEvent(new CustomEvent(a,{composed:!0,bubbles:!0})),e.removeEventListener(a,o),l.filter(n=>n!==t&&n!==e).filter(n=>n.tagName?.includes("-")).length>0}function m(e){if(!e)return;let t=y(e.el);if(t&&i.has(t)&&t===e.labelEl||!t&&s.has(e))return;let l=O.bind(e);if(t){e.labelEl=t;let a=r.get(t)||[];a.push(e),r.set(t,a.sort(w)),i.has(e.labelEl)||(i.set(e.labelEl,g),e.labelEl.addEventListener(k,g)),s.delete(e),document.removeEventListener(E,c.get(e)),d.set(e,l),document.addEventListener(f,l)}else s.has(e)||(l(),document.removeEventListener(f,d.get(e)))}function T(e){if(!e||(s.delete(e),document.removeEventListener(E,c.get(e)),document.removeEventListener(f,d.get(e)),c.delete(e),d.delete(e),!e.labelEl))return;let t=r.get(e.labelEl);t.length===1&&(e.labelEl.removeEventListener(k,i.get(e.labelEl)),i.delete(e.labelEl)),r.set(e.labelEl,t.filter(l=>l!==e).sort(w)),e.labelEl=void 0}function w(e,t){return h(e.el,t.el)?-1:1}function I(e){return e.label||e.labelEl?.textContent?.trim()||""}function g(e){let t=e.detail.sourceEvent.target,l=r.get(this),a=l.find(n=>n.el===t);if(a&&l.includes(a))return;let b=l[0];b.disabled||b.onLabelClick(e)}function D(){s.has(this)&&m(this)}function O(){s.add(this);let e=c.get(this)||D.bind(this);c.set(this,e),document.addEventListener(E,e)}async function B(e){if(await e.componentOnReady(),r.has(e))return;let l=e.for&&e.ownerDocument?.getElementById(e.for);l&&requestAnimationFrame(()=>{for(let a of s)if(a.el===l){m(a);break}})}export{E as a,f as b,m as c,T as d,I as e,B as f};