@esri/calcite-components 5.2.0-next.62 → 5.2.0-next.64

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 (162) hide show
  1. package/dist/cdn/{23HDKDAI.js → 26LDKZBW.js} +1 -1
  2. package/dist/cdn/{NQBHV5T4.js → 2C2UU4UB.js} +1 -1
  3. package/dist/cdn/{R33SHK7J.js → 2CC4TXML.js} +1 -1
  4. package/dist/cdn/{YXWA62OE.js → 2M452ZBI.js} +1 -1
  5. package/dist/cdn/{IHJAWQDP.js → 2WEJB4MH.js} +1 -1
  6. package/dist/cdn/{GKYCDJZS.js → 33MW3GHK.js} +1 -1
  7. package/dist/cdn/{FAZOKA4U.js → 3CRWXC6F.js} +1 -1
  8. package/dist/cdn/{KEVSA7QA.js → 3I7XBS7Q.js} +1 -1
  9. package/dist/cdn/{B4L2KEDE.js → 47LROTS7.js} +1 -1
  10. package/dist/cdn/{VQ7D6WC2.js → 4BOB7USQ.js} +1 -1
  11. package/dist/cdn/{VPFXLCEW.js → 4HD27M72.js} +1 -1
  12. package/dist/cdn/{JAZ5R36D.js → 4HJFQWKU.js} +1 -1
  13. package/dist/cdn/{JTUBWTUR.js → 4VSUDBBT.js} +1 -1
  14. package/dist/cdn/{CYZUGX7K.js → 4W6B6AFX.js} +1 -1
  15. package/dist/cdn/{YTJ3Q4D4.js → 4WJ7WPQX.js} +1 -1
  16. package/dist/cdn/{KIZPZLPU.js → 54XSUMEB.js} +1 -1
  17. package/dist/cdn/{NEJF3TJF.js → 556DKBXM.js} +1 -1
  18. package/dist/cdn/{R2DIPZ3B.js → 5B6CG7FD.js} +1 -1
  19. package/dist/cdn/{ESCNQWGH.js → 5HHUBB4Q.js} +1 -1
  20. package/dist/cdn/{I4MV44ZF.js → 5SSKMNLH.js} +1 -1
  21. package/dist/cdn/{7RAF4H2D.js → 5XSKZ6VC.js} +1 -1
  22. package/dist/cdn/{KMQWZS7Y.js → 647LHF5Z.js} +1 -1
  23. package/dist/cdn/{FXR7G326.js → 64HSEOPT.js} +1 -1
  24. package/dist/cdn/{NGDGVFFY.js → 6H5GSM3V.js} +1 -1
  25. package/dist/cdn/{IUCOEPJG.js → 6JCBP7FF.js} +1 -1
  26. package/dist/cdn/{B6L3NEYB.js → 6SROBAPG.js} +1 -1
  27. package/dist/cdn/{Q35TYOU3.js → 7SNQOY3L.js} +1 -1
  28. package/dist/cdn/{3FOHNQKP.js → 7XAHR43Q.js} +1 -1
  29. package/dist/cdn/{PGVVBVAW.js → 7YROIH6H.js} +1 -1
  30. package/dist/cdn/{ERCYS72F.js → A3JJ6LJL.js} +1 -1
  31. package/dist/cdn/{HDNDTUJO.js → AA3B5KJ6.js} +1 -1
  32. package/dist/cdn/{D2EDJHY3.js → AZXCTAW7.js} +1 -1
  33. package/dist/cdn/{XAFFE75K.js → B5NPHY6Y.js} +1 -1
  34. package/dist/cdn/{7YCU2E3N.js → BAGFMVB6.js} +1 -1
  35. package/dist/cdn/{FMMROQB2.js → BC5RPLRF.js} +1 -1
  36. package/dist/cdn/{RYGSERD6.js → BEPGXBNY.js} +1 -1
  37. package/dist/cdn/{G5N5LP7C.js → BLZCPIPZ.js} +1 -1
  38. package/dist/cdn/{7TDIRY4J.js → BVBFEM4G.js} +1 -1
  39. package/dist/cdn/{6HUNEVQT.js → CGRBMHS5.js} +1 -1
  40. package/dist/cdn/{EA3CXBU3.js → CNN27ILB.js} +1 -1
  41. package/dist/cdn/{YEJ4DG6Z.js → CTCDAGYW.js} +1 -1
  42. package/dist/cdn/{ITSKKC7W.js → CVCJOMT3.js} +1 -1
  43. package/dist/cdn/{YMLIZ6H5.js → DCRLJFDF.js} +1 -1
  44. package/dist/cdn/{5Q6R6XLB.js → DLP5DXUP.js} +1 -1
  45. package/dist/cdn/{JLA3DKZP.js → DQSYO2C7.js} +1 -1
  46. package/dist/cdn/{ADAMEB6V.js → DQWR5AWS.js} +1 -1
  47. package/dist/cdn/{YGSLHDTB.js → EEQX4UDG.js} +1 -1
  48. package/dist/cdn/{S34TKZAP.js → EJASPYTX.js} +1 -1
  49. package/dist/cdn/{NY3UKBFO.js → EKCZDVES.js} +1 -1
  50. package/dist/cdn/{LCO22QRK.js → ENQ4ZDR7.js} +1 -1
  51. package/dist/cdn/{UBFONBKW.js → ER7W4MOS.js} +1 -1
  52. package/dist/cdn/{J67LYBL5.js → EW7GKFIW.js} +1 -1
  53. package/dist/cdn/{DQVINPWR.js → F5OMVPSZ.js} +1 -1
  54. package/dist/cdn/{RXDYNL2X.js → FN23WIZK.js} +1 -1
  55. package/dist/cdn/{LBKDLCGS.js → FRYK2CT4.js} +1 -1
  56. package/dist/cdn/{H6YE6FYK.js → FTF7Z7VE.js} +1 -1
  57. package/dist/cdn/{XNB3ISIM.js → FXIGDPY7.js} +1 -1
  58. package/dist/cdn/{QQSO37WF.js → GGGKM4Q2.js} +1 -1
  59. package/dist/cdn/{ZTRUMW6A.js → GO4WE4C2.js} +1 -1
  60. package/dist/cdn/{ZW5SAEBQ.js → GROKEHL5.js} +1 -1
  61. package/dist/cdn/{2HPK3LAE.js → H6QNSDST.js} +1 -1
  62. package/dist/cdn/{4RKMYYAL.js → HA5ZT3L2.js} +1 -1
  63. package/dist/cdn/{TBB42H4B.js → HBA3P5H3.js} +1 -1
  64. package/dist/cdn/{GENGQQ3E.js → HRIURMVI.js} +1 -1
  65. package/dist/cdn/{EPE7MG62.js → HWCLLSHA.js} +1 -1
  66. package/dist/cdn/{AM5HDLAS.js → HWKBYMC2.js} +1 -1
  67. package/dist/cdn/{AGP7DPKN.js → HXHDFR6Q.js} +1 -1
  68. package/dist/cdn/{7CZARVI4.js → I3K7KWH6.js} +1 -1
  69. package/dist/cdn/{HHK6QXU6.js → I5CQQK6H.js} +1 -1
  70. package/dist/cdn/{NA2ZTWW4.js → IDINCKYS.js} +1 -1
  71. package/dist/cdn/{FIUZOVCS.js → IJEFDN22.js} +1 -1
  72. package/dist/cdn/{EDEBMMT6.js → IVP2TAIE.js} +1 -1
  73. package/dist/cdn/{7O43FY6X.js → JEMSIVFH.js} +1 -1
  74. package/dist/cdn/{4LMXYULL.js → JLFMHHHY.js} +1 -1
  75. package/dist/cdn/{AOCA3KFF.js → JLQ4IA7K.js} +1 -1
  76. package/dist/cdn/{7ZPRWQGI.js → JOYJROSC.js} +1 -1
  77. package/dist/cdn/{I77SJ3UN.js → K62UEW5H.js} +1 -1
  78. package/dist/cdn/{QVCA4Q3A.js → K7LFRVI5.js} +1 -1
  79. package/dist/cdn/{5NWMGO4Y.js → KB5L6TKT.js} +1 -1
  80. package/dist/cdn/{Q2PXLJRW.js → KD6L5QRQ.js} +1 -1
  81. package/dist/cdn/{ULEYWK3S.js → KHO4O6ER.js} +1 -1
  82. package/dist/cdn/{OXOUHOL7.js → KJE3TTOE.js} +1 -1
  83. package/dist/cdn/{MGS6XKAR.js → KUEHZOLJ.js} +1 -1
  84. package/dist/cdn/{A7PK5BTB.js → KWAF4QAX.js} +1 -1
  85. package/dist/cdn/{LUVDIV7Z.js → KWIXQSB5.js} +1 -1
  86. package/dist/cdn/{DLPPHVJK.js → KYUWDRN3.js} +1 -1
  87. package/dist/cdn/{O3JX6E6E.js → LCCMPYJM.js} +1 -1
  88. package/dist/cdn/{ESPMMYVP.js → LEDHVLBX.js} +1 -1
  89. package/dist/cdn/{L7AAWH33.js → LWS2YSRC.js} +1 -1
  90. package/dist/cdn/{BBTNIUW2.js → M66UZGUQ.js} +1 -1
  91. package/dist/cdn/{UXNJ2I3X.js → MB26RZ7I.js} +1 -1
  92. package/dist/cdn/MB6DK3GX.js +2 -0
  93. package/dist/cdn/{Z5BXSCXP.js → MKCM6FUL.js} +1 -1
  94. package/dist/cdn/{4FYTCYUK.js → MT7LQ4EQ.js} +1 -1
  95. package/dist/cdn/{6TYHSE52.js → NP7RRVLV.js} +1 -1
  96. package/dist/cdn/{IFOACTFJ.js → OFRNNYLT.js} +1 -1
  97. package/dist/cdn/{TFZI64RP.js → OLZ72KNG.js} +1 -1
  98. package/dist/cdn/{JTM6YJCI.js → OXE2LZT4.js} +1 -1
  99. package/dist/cdn/{2RVXXWXK.js → P4FFYBHO.js} +1 -1
  100. package/dist/cdn/{JFCRLKUS.js → PKGGSZ3G.js} +1 -1
  101. package/dist/cdn/{LBUT6VVH.js → POUXHA4D.js} +1 -1
  102. package/dist/cdn/{TOMLSGNW.js → Q7RCXOBZ.js} +1 -1
  103. package/dist/cdn/{LIP5H2L6.js → QCS4PJIC.js} +1 -1
  104. package/dist/cdn/{GRCGH7S7.js → QR5EGUPC.js} +1 -1
  105. package/dist/cdn/R7AX4WWJ.js +2 -0
  106. package/dist/cdn/{7DZDSRLR.js → RAHM2XGT.js} +1 -1
  107. package/dist/cdn/{5MYS7ZVM.js → RNLU36F2.js} +1 -1
  108. package/dist/cdn/{P34KSKSD.js → RTW4XLSK.js} +1 -1
  109. package/dist/cdn/{3RD6FPOP.js → SI6KDAPK.js} +1 -1
  110. package/dist/cdn/{ZRTZSAU4.js → SORQGGFV.js} +1 -1
  111. package/dist/cdn/{CMWT2U6N.js → SRAITCZZ.js} +1 -1
  112. package/dist/cdn/{KKDSVCDI.js → TFL425CI.js} +1 -1
  113. package/dist/cdn/{SFR52MOU.js → TLA2SYFY.js} +1 -1
  114. package/dist/cdn/{PJC3KHLU.js → TLWMB2NS.js} +1 -1
  115. package/dist/cdn/TR2KHQHK.js +2 -0
  116. package/dist/cdn/{53YUDUCN.js → UDYKPMDH.js} +1 -1
  117. package/dist/cdn/{WQPMPWU5.js → UGSNJ2A2.js} +1 -1
  118. package/dist/cdn/{EW4E6W4H.js → UIER4QDI.js} +1 -1
  119. package/dist/cdn/{5SNGDG25.js → UMACBDSW.js} +1 -1
  120. package/dist/cdn/{R6KFEYUV.js → USZW5TQE.js} +1 -1
  121. package/dist/cdn/{YRGSOW7G.js → VAIEYSCW.js} +1 -1
  122. package/dist/cdn/{JOK7V4MS.js → VBHAXLC7.js} +1 -1
  123. package/dist/cdn/{E75D7ANJ.js → VIBSUUPL.js} +1 -1
  124. package/dist/cdn/{FRWSUYJ5.js → VOS7BTF7.js} +1 -1
  125. package/dist/cdn/{BDR42A3E.js → VQIA5AUS.js} +1 -1
  126. package/dist/cdn/{WK57DRIG.js → VQUU5NZK.js} +1 -1
  127. package/dist/cdn/{VKNMXOGO.js → VREMIKLX.js} +1 -1
  128. package/dist/cdn/{KW7DFY2S.js → WC3GCTZG.js} +1 -1
  129. package/dist/cdn/{XDDOXJF4.js → WFFAJFXJ.js} +1 -1
  130. package/dist/cdn/{XI4PD2C6.js → WGQXFSUO.js} +1 -1
  131. package/dist/cdn/{74KBB6LH.js → WJRSLAMD.js} +1 -1
  132. package/dist/cdn/{UCOHJ6HB.js → WM3KGN2Y.js} +1 -1
  133. package/dist/cdn/{4MJQEGBF.js → WTS2NNYC.js} +1 -1
  134. package/dist/cdn/{6WLVT7DS.js → XKR5TRKJ.js} +1 -1
  135. package/dist/cdn/{QIU2OYJY.js → XKUHLY5O.js} +1 -1
  136. package/dist/cdn/{DSVGFTLX.js → XXZ6GV5C.js} +1 -1
  137. package/dist/cdn/{KQH5DKBU.js → Y5LTEEQG.js} +1 -1
  138. package/dist/cdn/{R3SQDQXX.js → YSILJ3W5.js} +1 -1
  139. package/dist/cdn/YUFNYPLK.js +2 -0
  140. package/dist/cdn/{KWFE4DAU.js → YWDYEPXE.js} +1 -1
  141. package/dist/cdn/{UCKWQ5LE.js → Z5VVOP7Z.js} +1 -1
  142. package/dist/cdn/{VFGWQVRF.js → ZBT3E2EI.js} +1 -1
  143. package/dist/cdn/{PLCNTRPE.js → ZDMVEYJM.js} +1 -1
  144. package/dist/cdn/{WXUBPW4K.js → ZNOYHBTL.js} +1 -1
  145. package/dist/cdn/index.js +1 -1
  146. package/dist/chunks/runtime.js +4 -4
  147. package/dist/components/calcite-chip-group/customElement.js +1 -1
  148. package/dist/components/calcite-date-picker-month-header/customElement.js +1 -0
  149. package/dist/components/calcite-radio-button-group/customElement.js +21 -14
  150. package/dist/components/calcite-swatch-group/customElement.js +1 -1
  151. package/dist/components/calcite-tab-nav/customElement.d.ts +2 -3
  152. package/dist/components/calcite-tab-title/customElement.d.ts +2 -3
  153. package/dist/docs/api.json +1 -1
  154. package/dist/docs/docs.json +1 -1
  155. package/dist/docs/supported-browsers.json +1 -1
  156. package/dist/docs/vscode.html-custom-data.json +1 -1
  157. package/dist/docs/web-types.json +1 -1
  158. package/package.json +2 -2
  159. package/dist/cdn/CNIS3O63.js +0 -2
  160. package/dist/cdn/I4LFSDKZ.js +0 -2
  161. package/dist/cdn/V3HFGYU2.js +0 -2
  162. package/dist/cdn/YCGTLTRR.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as Re}from"./NY3UKBFO.js";import{a as ye}from"./VOCKM3G2.js";import{b as _,c as Ve,d as Y,f as R,g as O,h as Z,i as Oe}from"./YXWA62OE.js";import{a as B,b as G,d as r,e as h,f as q}from"./47B6Y2DM.js";import{d as U}from"./C4WP5EBM.js";import{a as Ie}from"./5SNGDG25.js";import{b as T}from"./PM5LDKID.js";import{a as we}from"./XAFFE75K.js";import{c as Me}from"./TOMLSGNW.js";import{a as ve}from"./DKJI4BME.js";import{a as He}from"./AGP7DPKN.js";import{a as be}from"./YTJ3Q4D4.js";import{b as Le}from"./L7AAWH33.js";import{a as N,c as W,d as me,e as Ce,f as ge,g as V,h as Se}from"./ERCYS72F.js";import{a as fe}from"./NGDGVFFY.js";import{a as he}from"./JFCRLKUS.js";import{a as H}from"./UXNJ2I3X.js";import{a as xe}from"./EPE7MG62.js";import{a as ue}from"./5EBGPCB7.js";import{a as pe}from"./T6CCMW7H.js";import{a as A,b as F}from"./VI7SBYXT.js";import{a as de}from"./JTUBWTUR.js";import"./VUYX7MNO.js";import{a as se}from"./6WLVT7DS.js";import{a as z,b as E}from"./ZWPNZ5XW.js";import{e as re}from"./EDEBMMT6.js";import"./NA2ZTWW4.js";import{i as w,l as P,p as ne}from"./AM5HDLAS.js";import{D as te,E as M,F as S,G as oe,H as p,L as ie,N as ae,Q as ce,T as le,g as ee,h as x,l as m,p as v}from"./4LMXYULL.js";var k="48px";var Ae=ee`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}:host([scale=s]){font-size:var(--calcite-font-size-relative-sm);--calcite-internal-combobox-spacing-unit-l: .5rem;--calcite-internal-combobox-spacing-unit-s: .25rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-2xs);--calcite-internal-combobox-no-matches-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) ;--calcite-internal-close-size: 1rem}:host([scale=m]){font-size:var(--calcite-font-size-relative-base);--calcite-internal-combobox-spacing-unit-l: .75rem;--calcite-internal-combobox-spacing-unit-s: .5rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm);--calcite-internal-combobox-no-matches-spacing-unit-s: .375rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) ;--calcite-internal-close-size: 1.5rem}:host([scale=l]){font-size:var(--calcite-font-size-relative-md);--calcite-internal-combobox-spacing-unit-l: 1rem;--calcite-internal-combobox-spacing-unit-s: .75rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm-plus);--calcite-internal-combobox-no-matches-spacing-unit-s: var(--calcite-space-sm-plus);--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(var(--calcite-space-sm-plus) - 1px);--calcite-internal-close-size: 2rem}.wrapper{display:flex;border-width:1px;border-style:solid;outline-color:transparent;padding-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);border-radius:var(--calcite-combobox-corner-radius, var(--calcite-corner-radius));background-color:var(--calcite-combobox-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));border-color:var(--calcite-combobox-input-border-color, var(--calcite-color-border-input))}.wrapper:hover .icon{color:var(--calcite-combobox-icon-color-hover, var(--calcite-color-text-1))}:host(:focus-within) .wrapper,.wrapper--active{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;gap:var(--calcite-internal-combobox-spacing-unit-s);margin-inline-end:var(--calcite-internal-combobox-spacing-unit-s)}.grid-input.selection-display--fit,.grid-input.selection-display--single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-internal-combobox-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;width:0px;min-width:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.placeholder-icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-width:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.floating-ui-container .calcite-floating-ui-anim{box-shadow:var(--calcite-shadow-md)}@media(forced-colors:active){.wrapper,.floating-ui-container{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.list-container{max-height:45vh;overflow-y:auto;inline-size:var(--calcite-dropdown-width, 100%);background-color:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1))}.list{margin:0;display:block;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.list--hide{height:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);max-inline-size:100%}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.select-all{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-1));border-block-end-color:var(--calcite-combobox-divider-color, var(--calcite-combobox-item-border-color, var(--calcite-color-border-3)));border-block-end-style:solid;border-block-end-width:var(--calcite-border-width-sm);inset-block-start:0;position:sticky;z-index:var(--calcite-z-index-sticky)}.no-matches{padding-block:var(--calcite-internal-combobox-no-matches-spacing-unit-s);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));background:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1));cursor:pointer}.no-matches-placeholder{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3));cursor:default}.disabled{opacity:.5}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.clear-button--container{display:flex;cursor:pointer;align-items:center}.clear-button--container:hover calcite-action{--calcite-action-background-color: var(--calcite-clear-button-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color: var(--calcite-clear-button-icon-color-hover, var(--calcite-color-text-1))}.clear-button--container:active calcite-action{--calcite-action-background-color: var(--calcite-clear-button-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color: var(--calcite-clear-button-icon-color-press, var(--calcite-color-text-1))}.clear-button--container calcite-action{--calcite-internal-action-height: 100%;--calcite-internal-action-padding-inline: var(--calcite-spacing-none);--calcite-internal-action-padding-block: var(--calcite-spacing-none);--calcite-action-background-color: var(--calcite-clear-button-background-color, var(--calcite-color-foreground-2));--calcite-action-text-color: var(--calcite-clear-button-icon-color)}.clear-button--container calcite-action:hover{--calcite-action-background-color-hover: var(--calcite-clear-button-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-hover)}.clear-button--container calcite-action:active{--calcite-action-background-color-press: var(--calcite-clear-button-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-press)}:host([scale=s]) .clear-button--container{padding:var(--calcite-space-2xs)}:host([scale=m]) .clear-button--container{padding:var(--calcite-space-2xs);padding-inline-end:var(--calcite-space-sm)}:host([scale=l]) .clear-button--container{padding-inline-end:var(--calcite-space-sm-plus)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}:host([hidden]){display:none}[hidden]{display:none}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,X=class extends oe{constructor(){super(),this.direction=re(),this.formSupport=Me({inputType:"text"})(this),this.selectAllComboboxItemRef=M(),this.allSelectedIndicatorChipRef=M(),this.data=[],this.cancelable=xe()(this),this.filterItems=(()=>{let e=(t,o)=>t&&o.some(({el:i})=>t===i);return ue((t,o=!1,i=!0)=>{let a=ye([...this.data,...this.groupData],t,this.effectiveFilterProps),c=this.getItemsAndGroups(),l=t==="";c.forEach(n=>{if(l){n.itemHidden=!1;return}let s=!e(n,a);n.itemHidden=s;let[C,d]=n.ancestors;(e(C,a)||e(d,a))&&(n.itemHidden=!1),s||n.ancestors.forEach(f=>f.itemHidden=!1)}),this.noMatchesFound=this.filteredItems.length===0&&!!this.filterText,this.filterTextMatchPattern=this.filterText?new RegExp(`(${T(this.filterText)})`,"i"):void 0,this.keyboardNavItems.forEach(n=>{n.filterTextMatchPattern=this.filterTextMatchPattern}),o&&(this.open=this.filterText.trim().length>0),i&&this.calciteComboboxFilterChange.emit()},ae.filter)})(),this._filterText="",this.getSelectedItems=()=>{if(!this.isMulti()){let e=this.allItems.find(({selected:t})=>t);return e?[e]:[]}return this.allItems.filter(e=>e.selected&&(this.selectionMode!=="ancestors"||!Y(e)))},this.groupData=[],this.groupItems=[],this.guid=pe(),this.ignoreSelectedEventsFlag=!1,this.internalValueChangeFlag=!1,this.previousAllSelected=!1,this.refreshingSelectionDisplay=!1,this.mutationObserver=A("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.transitionProp="opacity",this.resizeObserver=(()=>{let e=!1;return A("resize",()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1,this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}))})})(),this.selectedIndicatorChipRef=M(),this.selectedChipCountRef=M(),this.clearButtonRef=M(),this._selectedItems=[],this.textInputRef=M(),this._value="",this.messages=de({blocking:!0}),this.focusSetter=se()(this),this.customChipAddHandler=()=>{this.addCustomChip(this.filterText,!0)},this.interactiveContainer=he(this),this.topLayer=be({target:()=>this.floatingEl})(this),this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.deferFitChipCountRender=!1,this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.fitUsingCompactCountLabel=!1,this.allItems=[],this.items=[],this.noMatchesFound=!1,this.clearDisabled=!1,this.disabled=!1,this.maxItems=0,this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.placement=N,this.readOnly=!1,this.required=!1,this.scale="m",this.selectAllEnabled=!1,this.selectionDisplay="all",this.selectionAppearance="icon",this.selectionMode="multiple",this.status="idle",this.topLayerDisabled=!1,this.calciteComboboxBeforeClose=v({cancelable:!1}),this.calciteComboboxBeforeOpen=v({cancelable:!1}),this.calciteComboboxChange=v({cancelable:!1}),this.calciteComboboxChipClose=v({cancelable:!1}),this.calciteComboboxClose=v({cancelable:!1}),this.calciteComboboxFilterChange=v({cancelable:!1}),this.calciteComboboxOpen=v({cancelable:!1}),He(this),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteComboboxItemChange",this.calciteComboboxItemChangeHandler),this.listen("calciteInternalComboboxItemChange",this.calciteInternalComboboxItemChangeHandler),this.listen("click",this.comboboxFocusHandler)}static{this.properties={activeChipIndex:[16,{},{state:!0}],activeDescendant:[16,{},{state:!0}],activeItemIndex:[16,{},{state:!0}],compactSelectionDisplay:[16,{},{state:!0}],deferFitChipCountRender:[16,{},{state:!0}],selectedHiddenChipsCount:[16,{},{state:!0}],selectedVisibleChipsCount:[16,{},{state:!0}],fitUsingCompactCountLabel:[16,{},{state:!0}],allItems:[16,{},{state:!0}],items:[16,{},{state:!0}],noMatchesFound:[16,{},{state:!0}],allowCustomValues:[7,{},{reflect:!0,type:Boolean}],clearDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],filterText:[3,{},{reflect:!0}],filterProps:[0,{},{attribute:!1}],filteredItems:[32,{},{attribute:!1,readOnly:!0}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],label:1,labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placeholder:1,placeholderIcon:[3,{},{reflect:!0}],placeholderIconFlipRtl:[7,{},{reflect:!0,type:Boolean}],placement:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectAllEnabled:[7,{},{reflect:!0,type:Boolean}],selectedItems:[0,{},{attribute:!1}],selectionDisplay:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],validationIcon:[3,{converter:ie},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.styles=Ae}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(e=>e!=="el"):["description","label","metadata","shortHeading"]}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:o,open:i}=this,a=o[0],c=a?.icon,l=R(t);return!i&&a?!!c&&l:!!e&&(!a||l)}get allSelected(){let e=this.allItems.filter(t=>!t.disabled);return e.length>0&&e.every(t=>t.selected)}get hasDisabledSelected(){return this.allItems.some(e=>e.disabled&&e.selected)}get indeterminate(){let e=this.selectedItems.length>0||this.hasDisabledSelected;return this.selectAllEnabled?!this.allSelected&&e:this.selectedItems.length>0&&!this.allSelected}get keyboardNavItems(){let{selectAllComboboxItemRef:e}=this,t=this.filteredItems.filter(o=>!o.disabled);return e.value?[e.value,...t]:t}get filterText(){return this._filterText}set filterText(e){let t=this._filterText;e!==t&&(this._filterText=e,this.filterTextChange(e))}get filteredItems(){return this.items.filter(e=>!E(e))}get selectedItems(){return this._selectedItems}set selectedItems(e){let t=this._selectedItems;e!==t&&(this._selectedItems=e,this.selectedItemsHandler())}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueHandler(e))}async reposition(e=!1){let{floatingEl:t,referenceEl:o,placement:i,overlayPositioning:a,filteredFlipPlacements:c}=this;return Ce(this,{direction:this.direction,floatingEl:t,referenceEl:o,overlayPositioning:a,placement:i,flipPlacements:c,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>(this.activeChipIndex=-1,this.activeItemIndex=-1,this.textInputRef.value),e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),V(this),this.cancelable.add(this.filterItems)}async load(){this.handleSelectionModeWarning()}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("maxItems")&&(this.hasUpdated||this.maxItems!==0)&&this.setMaxScrollerHeight(),(e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!==N))&&this.reposition(!0),(e.has("selectionMode")||e.has("scale")||e.has("selectionAppearance"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler()}loaded(){V(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),Se(this)}emitComboboxChange(){this.calciteComboboxChange.emit()}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){this.disabled||fe(this)}handleDisabledChange(e){e||(this.open=!1)}valueHandler(e){this.internalValueChangeFlag||(this.items.forEach(t=>{t.selected=Array.isArray(e)?e.includes(t.value):e===t.value}),this.updateItems())}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){let e=this.previousAllSelected,t=this.allSelected;if(this.previousAllSelected=t,this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.selectionDisplay==="fit"&&this.isMulti()){let o=e&&!t;e&&!t&&(this.selectedHiddenChipsCount=0,this.selectedItems.forEach(i=>{let a=this.referenceEl?.querySelector(`#${h.chip(i.guid)}`);a&&this.showChip(a)})),this.updateComplete.then(async()=>{o&&await this.updateComplete,await this.refreshSelectionDisplay(),this.fitFollowUpRefreshPromise&&await this.fitFollowUpRefreshPromise,this.deferFitChipCountRender=!1})}}async documentClickHandler(e){this.disabled||e.composedPath().includes(this.el)||(await this.componentOnReady(),!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1)),this.allowCustomValues&&this.filterText.trim().length&&this.addCustomChip(this.filterText),this.open=!1)}handleSelectAll(e){e&&(this.toggleSelectAll(),this.selectionDisplay!=="fit"&&this.allSelected&&this.selectedItems.forEach(t=>{let o=this.referenceEl.querySelector(`#${h.chip(t.guid)}`);o&&this.hideChip(o)}))}updateSelectedItems(){this.selectedItems=this.getOrderedSelectedItems(this.getSelectedItems())}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,o=e.composedPath().includes(this.selectAllComboboxItemRef.value);this.selectAllEnabled&&this.handleSelectAll(o);let i=this.keyboardNavItems.indexOf(o?this.selectAllComboboxItemRef.value:t);this.updateActiveItemIndex(i),this.toggleSelection(t,t.selected)}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.hasUpdated&&this.updateItems()}clearValue(){let e=this.items.filter(t=>t.selected&&!t.disabled);e.length&&(this.ignoreSelectedEventsFlag=!0,e.forEach(t=>t.selected=!1),this.ignoreSelectedEventsFlag=!1,this.updateSelectedItems(),this.emitComboboxChange()),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}clearInputValue(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?me(t,e):void 0}getValue(){let e=this.getOrderedSelectedValues(this.selectedItems.map(t=>t.value?.toString()));return e.length?e.length>1?e:e[0]:""}getOrderedSelectedValues(e){if(!this.isMulti())return e;let t=Array.isArray(this.value)?this.value:this.value?[this.value]:[];return Oe(e,t)}getOrderedSelectedItems(e){return this.isMulti()?Z(e,this.selectedItems):e}comboboxInViewport(){let e=this.el.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.right<=(window.innerWidth||document.documentElement.clientWidth)&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)}toggleSelectAll(){let e=!this.allSelected;this.allItems.forEach(t=>{t.disabled||(t.selected=e)}),this.updateSelectedItems(),this.emitComboboxChange()}hasHiddenSelectedFitChips(){if(this.selectionDisplay!=="fit"||!this.isMulti())return!1;let e=this.selectedChipCountRef.value;return!!e&&!e.classList.contains(r.chipInvisible)}keyDownHandler(e){if(this.readOnly)return;let{key:t}=e;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):this.open?(this.open=!1,e.preventDefault()):!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1));break;case"ArrowLeft":(this.activeChipIndex!==-1||this.textInputRef.value?.selectionStart===0)&&(this.previousChip(),e.preventDefault());break;case"ArrowRight":this.activeChipIndex!==-1&&(this.nextChip(),e.preventDefault());break;case"ArrowUp":this.keyboardNavItems.length&&(e.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView()),this.scrollToActiveOrSelectedItem();break;case"ArrowDown":this.keyboardNavItems.length&&(e.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":!this.textInputRef.value?.value&&!e.defaultPrevented&&(!this.open&&this.keyboardNavItems.length&&(this.open=!0,this.ensureRecentSelectedItemIsActive()),e.preventDefault());break;case"Home":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":if(this.open){this.open=!1,e.preventDefault();break}this.clearDisabled||(this.textInputRef.value.value.length>0?(this.resetText(),e.preventDefault()):this.selectedItems.length>0&&this.selectionMode!=="single-persist"&&(this.clearValue(),e.preventDefault()));break;case"Enter":this.open&&this.activeItemIndex>-1?(this.keyboardNavItems[this.activeItemIndex].toggleSelection(),e.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(e.target),e.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):!e.defaultPrevented&&this.formSupport.active&&(e.preventDefault(),this.formSupport.requestSubmit());break;case"Delete":case"Backspace":{let i=this.hasHiddenSelectedFitChips()&&this.activeChipIndex===-1;if(this.selectionDisplay==="single"||i)return;let c=e.composedPath().find(U);this.activeChipIndex>-1&&c?(e.preventDefault(),this.removeActiveChip(c)):!this.filterText&&this.isMulti()&&(e.preventDefault(),this.removeLastChip());break}}}onBeforeOpen(){this.topLayer.show(),this.reposition(),this.calciteComboboxBeforeOpen.emit(),setTimeout(()=>this.scrollToActiveOrSelectedItem(this.activeItemIndex<0),0)}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),ge(this),this.topLayer.hide()}async setMaxScrollerHeight(){let{listContainerEl:e,open:t,referenceEl:o}=this;if(!e||!t||!o)return;let i=this.getMaxScrollerHeight();e.style.maxBlockSize=i>0?`${i}px`:"",e.style.inlineSize=`${o.clientWidth}px`}calciteChipCloseHandler(e){this.open=!1;let t=this.items.find(o=>o===e);t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()}clickHandler(e){if(this.readOnly)return;let t=e.composedPath();if(t.some(i=>U(i))){this.open=!1,e.preventDefault();return}let o=this.clearButtonRef.value;if(o&&t.includes(o)){this.clearValue(),e.preventDefault();return}this.open=!this.open,this.ensureRecentSelectedItemIsActive()}ensureRecentSelectedItemIsActive(){let{activeItemIndex:e,selectedItems:t,keyboardNavItems:o}=this;if(e>-1&&o[e]){this.updateActiveItemIndex(e);return}let i=t[t.length-1],a=i?o.indexOf(i):o.length?0:-1;this.updateActiveItemIndex(a>-1?a:o.length?0:-1)}hideChip(e){e.classList.add(r.chipInvisible)}showChip(e){e.classList.remove(r.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:o,hideSelectedChips:i}){let a=e.filter(d=>d.selected),c=a.filter(d=>!d.disabled),l=a.filter(d=>d.disabled),n=d=>{let f=w(d),u=d.getBoundingClientRect().width;return Number.isFinite(f)&&f>0?f:u};if(a.forEach(d=>n(d)),e.forEach(d=>{this.hideChip(d)}),i)return;let s=d=>{let f=0;return d.forEach(u=>{let b=n(u);b&&b<=t&&(t-=b+o,this.showChip(u),f++)}),f};s(c)<=1&&s(l)}async refreshSelectionDisplay(e=!0){if(this.refreshingSelectionDisplay)return;if(this.refreshingSelectionDisplay=!0,await this.componentOnReady(),R(this.selectionMode)){this.refreshingSelectionDisplay=!1;return}let{allSelectedIndicatorChipRef:t,chipContainerEl:o,selectionDisplay:i,placeholder:a,selectedIndicatorChipRef:c,textInputRef:l}=this;if(!l.value||!o){this.refreshingSelectionDisplay=!1;return}let n=parseInt(getComputedStyle(o).gap,10),s=w(o),{fontSize:C,fontFamily:d,minInlineSize:f}=getComputedStyle(l.value),u=.55,b=parseFloat(f)||parseInt(k,10),g=P(a,`${C} ${d}`),L=g>0?g:Math.max(b,Math.round((a?.length||0)*(parseFloat(C)||parseInt(k,10))*u)),$=Math.max(b,L),D=(i==="fit"?$:L)+n,ke=w(t.value),j=w(c.value),Be=Math.max(ke,j);if(this.setCompactSelectionDisplay({chipContainerElGap:n,chipContainerElWidth:s,inputWidth:D,largestSelectedIndicatorChipWidth:Be}),i!=="fit"&&this.allSelected&&this.selectAllEnabled&&this.selectedItems.forEach(y=>{let I=this.referenceEl?.querySelector(`#${h.chip(y.guid)}`);I&&this.hideChip(I)}),this.indeterminate&&this.selectedItems.forEach(y=>{let I=this.referenceEl?.querySelector(`#${h.chip(y.guid)}`);I&&this.showChip(I)}),i==="fit"){let y=Array.from(this.renderRoot.querySelectorAll("calcite-chip")).filter(J=>{let K=J.value,De=K!=null&&`${K}`!="";return J.disabled||De}),{hiddenChipIndicatorWidth:I,hideSelectedChips:Q,reservedPlaceholderInputWidth:Ge}=this.getFitCompactDisplayState({chipContainerElGap:n,chipContainerElWidth:s,inputMinWidth:b,placeholderWidth:L,selectedIndicatorChipElWidth:j});this.fitUsingCompactCountLabel=Q;let Ye=Math.round(s-(I+n+Ge+n));this.refreshChipDisplay({availableHorizontalChipElSpace:Ye,chipContainerElGap:n,chipEls:y,hideSelectedChips:Q});let $e=this.selectedHiddenChipsCount;this.syncChipVisibilityCounts(y),$e!==this.selectedHiddenChipsCount&&e&&(this.fitFollowUpRefreshPromise=this.updateComplete.then(()=>this.refreshSelectionDisplay(!1)).then(()=>{this.fitFollowUpRefreshPromise=void 0}))}this.refreshingSelectionDisplay=!1}setFloatingEl(e){this.floatingEl=e,V(this)}shouldUseFitCompactDisplay({chipContainerElGap:e,chipContainerElWidth:t,hiddenChipIndicatorWidth:o,inputMinWidth:i,placeholderWidth:a,reservedPlaceholderInputWidth:c}){let l=Math.round(t-(o+e+c+e));return a>i*2&&l<=0}getFitCompactDisplayState({chipContainerElGap:e,chipContainerElWidth:t,inputMinWidth:o,placeholderWidth:i,selectedIndicatorChipElWidth:a}){let c=w(this.selectedChipCountRef.value),l=this.deferFitChipCountRender||this.selectedHiddenChipsCount<=0?0:c||a,n=Math.max(o,i),s=this.shouldUseFitCompactDisplay({chipContainerElGap:e,chipContainerElWidth:t,hiddenChipIndicatorWidth:l,inputMinWidth:o,placeholderWidth:i,reservedPlaceholderInputWidth:n});return{hiddenChipIndicatorWidth:l,hideSelectedChips:s,reservedPlaceholderInputWidth:n}}setCompactSelectionDisplay({chipContainerElGap:e,chipContainerElWidth:t,inputWidth:o,largestSelectedIndicatorChipWidth:i}){let a=Math.round(i+e+o);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<a)&&(this.maxCompactBreakpoint=a),this.compactSelectionDisplay=t<this.maxCompactBreakpoint}setContainerEl(e){F(this.resizeObserver,this.listContainerEl,e),this.listContainerEl=e,this.transitionEl=e}setChipContainerEl(e){F(this.resizeObserver,this.chipContainerEl,e),this.chipContainerEl=e}setReferenceEl(e){this.referenceEl=e,V(this)}syncChipVisibilityCounts(e){let t=0,o=0;e.forEach(a=>{a.selected&&(o++,a.classList.contains(r.chipInvisible)||t++)}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let i=Math.max(0,o-t);i!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=i)}getMaxScrollerHeight(){let t=this.getItemsAndGroups(!0).filter(c=>!E(c)),{maxItems:o}=this,i=0,a=0;return t.length>=o&&t.forEach(c=>{if(i<o){let l=this.calculateScrollerHeight(c);a+=l,i+=1}}),a}calculateScrollerHeight(e){if(!e)return 0;let t=e.getBoundingClientRect().height,o=`:scope > ${B}, :scope > ${G}`,i=Array.from(e.querySelectorAll(o)).reduce((a,c)=>a+c.getBoundingClientRect().height,0);return t-i}inputHandler(e){let t=e.target.value;this.filterText=t}getItemsAndGroups(e=!1){return e?Array.from(this.el.querySelectorAll(`${B}, ${G}`)):[...this.groupItems,...this.items]}toggleSelection(e,t){!e||this.selectionMode==="single-persist"&&e.selected&&e.value===this.value&&!t||(this.selectionDisplay==="fit"&&this.isMulti()&&(this.deferFitChipCountRender=!0),this.isMulti()?this.handleMultiSelection(e,t):this.handleSingleSelection(e,t))}handleMultiSelection(e,t){e.selected=t,this.updateAncestors(e),this.updateSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")}handleSingleSelection(e,t){this.ignoreSelectedEventsFlag=!0,this.items.forEach(o=>o.selected=o===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.updateSelectedItems(),this.emitComboboxChange(),this.textInputRef.value&&(this.textInputRef.value.value=O(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=_(e),o=Ve(e);e.selected?t.forEach(i=>{i.disabled||(i.selected=!0)}):([...o].forEach(i=>{i.disabled||(i.selected=!1)}),[...t].forEach(i=>{Y(i)||(i.selected=!1)}))}updateItems(){this.allItems=this.getItems(!0),this.items=this.allItems.filter(e=>!e.disabled),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.groupData=this.getGroupData(),this.updateItemProps(),this.updateSelectedItems(),this.previousAllSelected=this.allSelected}updateItemProps(){this.allItems.forEach(e=>{e.selectionMode=this.selectionMode,e.selectionAppearance=this.selectionAppearance,e.scale=this.scale}),this.groupItems.forEach((e,t)=>(e.scale=this.scale,e.position=t)),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach((e,t,o)=>{t===0&&(e.afterEmptyGroup=!1);let i=o[t+1];i&&(i.afterEmptyGroup=e.children.length===0)})}getData(){return this.items.map(e=>({description:e.description,filterDisabled:e.filterDisabled,label:e.heading,metadata:e.metadata,shortHeading:e.shortHeading,el:e}))}getGroupData(){return this.groupItems.map(e=>({label:e.label,el:e}))}resetText(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}getItems(e=!1){return Array.from(this.el.querySelectorAll(B)).filter(o=>e||!o.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(G))}addCustomChip(e,t){let o=this.items.find(i=>i.heading===e);if(o)this.toggleSelection(o,!0);else{let i=document.createElement("calcite-combobox-item");i.value=e,i.heading=e,this.el.prepend(i),this.updateItems(),this.toggleSelection(i,!0),this.open=!0,t&&this.setFocus()}}removeActiveChip(e){let t=this.selectedItems[this.activeChipIndex];t&&!t.disabled&&`${h.chip(t.guid)}`===e.id&&this.toggleSelection(t,!1),this.setFocus()}removeLastChip(){let e=this.selectedItems.findLast(t=>!t.disabled);e&&(this.toggleSelection(e,!1),this.setFocus())}previousChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex+1;t>e?(this.activeChipIndex=-1,ne(this.textInputRef.value)):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl?.querySelector(`#${h.chip(e)}`):void 0)?.setFocus()}scrollToActiveOrSelectedItem(e=!1){let t=e&&this.selectedItems?.length?this.selectedItems[0]:this.keyboardNavItems[this.activeItemIndex],o=this.listContainerEl;if(!t||!o)return;t.scrollIntoView({block:"nearest"});let a=this.selectAllComboboxItemRef.value?.offsetHeight||0,c=t.getBoundingClientRect(),l=o.getBoundingClientRect();c.top<l.top+a&&(o.scrollTop-=l.top+a-c.top)}shiftActiveItemIndex(e){let{length:t}=this.keyboardNavItems,o=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(o),this.scrollToActiveOrSelectedItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t="";this.keyboardNavItems.forEach((o,i)=>{i===e?(o.active=!0,t=`${h.item(o.guid)}`):o.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return!R(this.selectionMode)}comboboxFocusHandler(){this.disabled||(this.activeChipIndex=-1,this.textInputRef.value?.focus(),this.open&&this.selectionDisplay==="fit"&&this.isMulti()&&this.refreshSelectionDisplay())}createScreenReaderItem({ariaLabel:e,ariaSelected:t,id:o,textContent:i}){return x`<li aria-label=${e??m} aria-selected=${t??m} id=${o??m} role=option tabindex=-1>${i}</li>`}handleSelectionModeWarning(){this.selectionMode==="single-persist"&&this.clearDisabled&&ce.warn('clearDisabled is ignored when selection-mode is set to "single-persist"')}getDescriptionMessage(){let e=Array.isArray(this.value)?this.value.join(", "):this.value;return this.readOnly?this.messages.nonEditable.replace("{value}",`${e}`):e}getChipLabel(e,t){return t?[...[..._(e)].reverse(),e].map(i=>O(i)).join(" / "):O(e)}renderChip({activeChipIndex:e,disabled:t,index:o,item:i,messages:a,readOnly:c,scale:l,isAncestors:n}){let s=this.getChipLabel(i,n);return H(i.guid||i.value||s,x`<calcite-chip .appearance=${c?"outline":"solid"} class=${p({[r.chip]:!0,[r.disabled]:t})} .closable=${!t&&!c} data-testid=${`${t?"disabled-chip":"chip"}-${o}`} .disabled=${t} .icon=${i.icon} .iconFlipRtl=${i.iconFlipRtl} id=${(!t&&i.guid?`${h.chip(i.guid)}`:void 0)??m} .label=${s} .messageOverrides=${t?void 0:{dismissLabel:a.removeTag.replace("{value}",`${s}`)}} @calciteChipClose=${t?void 0:()=>this.calciteChipCloseHandler(i)} @focusin=${t?void 0:()=>this.activeChipIndex=o} .scale=${l} .selected=${i.selected} .tabIndex=${!t&&e===o?0:-1} title=${s??m} .value=${i.value}>${s}</calcite-chip>`)}renderChipCount(e,t){let o=this.fitUsingCompactCountLabel?`${e}`:this.messages.disabledSelectedCount.replace("{count}",`${e}`)??`+${e}`;return x`<calcite-chip appearance=solid class=${p({[r.chip]:!0})} data-testid=selected-chip-count id=selected-chip-count .label=${o} .scale=${t} tabindex=-1 title=${o??m} ${S(this.selectedChipCountRef)}>${o}</calcite-chip>`}renderChips(){let{activeChipIndex:e,readOnly:t,scale:o,selectionDisplay:i,selectionMode:a,messages:c}=this,l=[],n=a==="ancestors",s=this.selectAllEnabled&&this.allSelected,C=i==="all";if(s)return null;let d=0,f=0;if(C){let u=this.allItems.filter(g=>g.selected&&(!n||!Y(g)));Z(u,this.selectedItems).forEach(g=>{if(g.disabled){l.push(this.renderChip({activeChipIndex:e,disabled:!0,index:f++,item:g,messages:c,readOnly:t,scale:o,isAncestors:n}));return}l.push(this.renderChip({activeChipIndex:e,disabled:!1,index:d++,item:g,messages:c,readOnly:t,scale:o,isAncestors:n}))})}else s||this.selectedItems.forEach(u=>{l.push(this.renderChip({activeChipIndex:e,disabled:u.disabled,index:d++,item:u,messages:c,readOnly:t,scale:o,isAncestors:n}))});if(i==="fit"){let u=this.selectedHiddenChipsCount,b=this.selectedVisibleChipsCount===0?this.selectedItems.length:u;u>0&&!this.deferFitChipCountRender&&l.push(this.renderChipCount(b,o))}return l.length?l:null}renderAllSelectedIndicatorChip(){let{allSelectedIndicatorChipRef:e,compactSelectionDisplay:t,scale:o,selectedVisibleChipsCount:i}=this,a=!1;if(this.selectionDisplay==="fit"&&this.textInputRef.value&&this.chipContainerEl){let s=parseInt(getComputedStyle(this.chipContainerEl).gap,10),C=w(this.chipContainerEl),{fontSize:d,fontFamily:f,minInlineSize:u}=getComputedStyle(this.textInputRef.value),b=.55,g=parseFloat(u)||parseInt(k,10),L=P(this.placeholder,`${d} ${f}`),$=L>0?L:Math.max(g,Math.round((this.placeholder?.length||0)*(parseFloat(d)||parseInt(k,10))*b)),D=w(this.selectedIndicatorChipRef.value);a=this.getFitCompactDisplayState({chipContainerElGap:s,chipContainerElWidth:C,inputMinWidth:g,placeholderWidth:$,selectedIndicatorChipElWidth:D}).hideSelectedChips}let l=t||a?this.messages.all:this.messages.allSelected,n=this.allSelected&&(this.selectionDisplay==="single"||!i||this.selectionDisplay==="all");return x`<calcite-chip class=${p({[r.chip]:!0,[r.chipInvisible]:!n,[r.allSelected]:!0})} data-testid=all-selected-indicator-chip .label=${l} .scale=${o} title=${l??m} value ${S(e)}>${l}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:o,selectedIndicatorChipRef:i}=this,a=!1,c,l=this.getSelectedItems().length;return e?a=!0:t==="single"&&(this.allSelected?a=!0:l>0?a=!1:a=!0,c=`${l} ${this.messages.selected}`),x`<calcite-chip class=${p({[r.chip]:!0,[r.chipInvisible]:a})} .label=${c} .scale=${o} title=${c??m} value ${S(i)}>${c}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:o}=this,i=!1,a,c=this.getSelectedItems().length;return e?this.allSelected?i=!0:t==="single"&&(i=!(c>0),a=`${c}`):i=!0,x`<calcite-chip class=${p({[r.chip]:!0,[r.chipInvisible]:i})} .label=${a} .scale=${o} title=${a??m} value>${a}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:o,selectionMode:i,selectedItems:a,open:c}=this,l=R(i),n=a[0],s=!c&&l&&!!n&&!this.filterText;return x`<span class=${p({[r.inputWrap]:!0,[r.inputWrapSingle]:l})}>${s&&H("label",x`<span class=${p({[r.label]:!0,[r.labelIcon]:!!n?.icon})}>${O(n)}</span>`)||""}${H("input",x`<input aria-activedescendant=${this.activeDescendant??m} aria-controls=${`${h.listbox(e)}`} aria-errormessage=${h.validationMessage} aria-owns=${`${h.listbox(e)}`} aria-autocomplete=list .ariaDescription=${this.getDescriptionMessage()} .ariaExpanded=${c} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${ve(this)} class=${p({[r.input]:!0,[r.inputSingle]:!0,[r.inputHidden]:s,[r.inputIcon]:this.showingInlineIcon&&!!this.placeholderIcon})} data-testid=input .disabled=${t} .id=${`${h.input(e)}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${o??m} .readOnly=${this.readOnly} .required=${this.required} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${te(this.filterText??"")} ${S(this.textInputRef)}>`)}</span>`}renderListBoxOptions(){let e=this.keyboardNavItems.map(t=>this.createScreenReaderItem({ariaLabel:t.label,ariaSelected:t.selected,id:`${h.item(t.guid)}`,textContent:t.heading}));if(this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"){let t=this.createScreenReaderItem({ariaLabel:this.messages.selectAll,ariaSelected:this.allSelected,textContent:this.messages.selectAll});t&&e.unshift(t)}return e}renderFloatingUIContainer(){let{messages:e,setFloatingEl:t,setContainerEl:o,open:i,scale:a}=this,c={[r.listContainer]:!0,[W.animation]:!0,[W.animationActive]:i},l=(this.filterText&&e.add.replace("{text}",`${this.filterText}`))??"";return x`<div aria-hidden=true class=${p(r.floatingUIContainer)} popover=manual ${S(t)}><div class=${p(c)} ${S(o)}><ul class=${p({[r.list]:!0,[r.listHide]:!i})}>${this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"&&x`<calcite-combobox-item class=${p(r.selectAll)} data-testid=select-all-item .heading=${e.selectAll} .id=${`${this.guid}-select-all-enabled-interactive`} .indeterminate=${this.indeterminate} .label=${e.selectAll} .scale=${a} .selected=${this.allSelected} tabindex=-1 value=select-all ${S(this.selectAllComboboxItemRef)}></calcite-combobox-item>`||""}<slot></slot>${this.noMatchesFound&&(this.allowCustomValues?x`<li aria-label=${l??m} class=${p(r.noMatches)} @click=${this.customChipAddHandler} role=option tabindex=0>${Le({text:l,pattern:new RegExp(`(${T(this.filterText)})`,"i")})}</li>`:x`<li class=${p({[r.noMatchesPlaceholder]:!0,[r.noMatches]:!0})}>${e.noMatches}</li>`)||""}</ul></div></div>`}renderSelectedOrPlaceholderIcon(){let{open:e,placeholderIcon:t,placeholderIconFlipRtl:o,selectedItems:i}=this,a=i[0],c=a?.icon,l=t&&(e||!a);return this.showingInlineIcon&&H("selected-placeholder-icon",x`<span class=${p(r.iconStart)}><calcite-icon class=${p({[r.selectedIcon]:!l,[r.placeholderIcon]:l})} .flipRtl=${l?o:a.iconFlipRtl} .icon=${l?t:c} .scale=${z(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return H("chevron",x`<span class=${p(r.iconEnd)}><calcite-icon class=${p(r.icon)} .icon=${e?q.chevronUp:q.chevronDown} .scale=${z(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:o,open:i,readOnly:a}=this,c=R(this.selectionMode),l=e==="all",n=e==="single",s=!c&&e==="fit",C=!c&&!l,d=C&&!s,f=this.items.some(b=>b.selected&&!b.disabled),u=!this.clearDisabled&&this.selectionMode!=="single-persist"&&!!this.value?.length&&f;return this.interactiveContainer({disabled:this.disabled,children:x`${this.labelText&&we({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-live=polite class=${p({[r.wrapper]:!0,[r.wrapperSingle]:c||!this.selectedItems.length,[r.wrapperActive]:i})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${S(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${H("grid",x`<div class=${p({[r.gridInput]:!0,[r.selectionDisplayFit]:s,[r.selectionDisplaySingle]:n})} ${S(this.setChipContainerEl)}>${!c&&!n&&this.renderChips()||""}${!c&&!n&&this.selectAllEnabled&&l&&this.renderAllSelectedIndicatorChip()||""}${d&&this.renderSelectedIndicatorChip()||""}${d&&this.renderSelectedIndicatorChipCompact()||""}${C&&this.renderAllSelectedIndicatorChip()||""}<label class=${p(r.screenReadersOnly)} .htmlFor=${`${h.input(t)}`} .id=${`${h.label(t)}`}>${o}</label>${this.renderInput()}</div>`)}${!a&&u?Re({ariaLabel:this.messages.clear,disabled:this.disabled,ref:this.clearButtonRef,scale:this.scale,title:this.messages.clear}):null}${!a&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${h.label(t)}`} aria-multiselectable=true class=${p(r.screenReadersOnly)} .id=${`${h.listbox(t)}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${this.validationMessage&&this.status==="invalid"?Ie({icon:this.validationIcon,id:h.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};le("calcite-combobox",X);export{X as Combobox};
2
+ import{a as Re}from"./EKCZDVES.js";import{a as ye}from"./VOCKM3G2.js";import{b as _,c as Ve,d as Y,f as R,g as O,h as Z,i as Oe}from"./2M452ZBI.js";import{a as B,b as G,d as r,e as h,f as q}from"./47B6Y2DM.js";import{d as U}from"./C4WP5EBM.js";import{a as Ie}from"./UMACBDSW.js";import{b as T}from"./PM5LDKID.js";import{a as we}from"./B5NPHY6Y.js";import{c as Me}from"./Q7RCXOBZ.js";import{a as ve}from"./DKJI4BME.js";import{a as He}from"./HXHDFR6Q.js";import{a as be}from"./4WJ7WPQX.js";import{b as Le}from"./LWS2YSRC.js";import{a as N,c as W,d as me,e as Ce,f as ge,g as V,h as Se}from"./A3JJ6LJL.js";import{a as fe}from"./6H5GSM3V.js";import{a as he}from"./PKGGSZ3G.js";import{a as H}from"./MB26RZ7I.js";import{a as xe}from"./HWCLLSHA.js";import{a as ue}from"./5EBGPCB7.js";import{a as pe}from"./T6CCMW7H.js";import{a as A,b as F}from"./VI7SBYXT.js";import{a as de}from"./4VSUDBBT.js";import"./VUYX7MNO.js";import{a as se}from"./XKR5TRKJ.js";import{a as z,b as E}from"./ZWPNZ5XW.js";import{e as re}from"./IVP2TAIE.js";import"./IDINCKYS.js";import{i as w,l as P,p as ne}from"./HWKBYMC2.js";import{D as te,E as M,F as S,G as oe,H as p,L as ie,N as ae,Q as ce,T as le,g as ee,h as x,l as m,p as v}from"./JLFMHHHY.js";var k="48px";var Ae=ee`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:block}:host([scale=s]){font-size:var(--calcite-font-size-relative-sm);--calcite-internal-combobox-spacing-unit-l: .5rem;--calcite-internal-combobox-spacing-unit-s: .25rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-2xs);--calcite-internal-combobox-no-matches-spacing-unit-s: .25rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.25rem - 1px) ;--calcite-internal-close-size: 1rem}:host([scale=m]){font-size:var(--calcite-font-size-relative-base);--calcite-internal-combobox-spacing-unit-l: .75rem;--calcite-internal-combobox-spacing-unit-s: .5rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm);--calcite-internal-combobox-no-matches-spacing-unit-s: .375rem;--calcite-combobox-input-height: 1rem;--calcite-internal-combobox-input-margin-block: calc(.5rem - 1px) ;--calcite-internal-close-size: 1.5rem}:host([scale=l]){font-size:var(--calcite-font-size-relative-md);--calcite-internal-combobox-spacing-unit-l: 1rem;--calcite-internal-combobox-spacing-unit-s: .75rem;--calcite-internal-combobox-padding-inline-end: var(--calcite-space-sm-plus);--calcite-internal-combobox-no-matches-spacing-unit-s: var(--calcite-space-sm-plus);--calcite-combobox-input-height: 1.5rem;--calcite-internal-combobox-input-margin-block: calc(var(--calcite-space-sm-plus) - 1px);--calcite-internal-close-size: 2rem}.wrapper{display:flex;border-width:1px;border-style:solid;outline-color:transparent;padding-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);border-radius:var(--calcite-combobox-corner-radius, var(--calcite-corner-radius));background-color:var(--calcite-combobox-input-background-color, var(--calcite-color-foreground-1));color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));border-color:var(--calcite-combobox-input-border-color, var(--calcite-color-border-input))}.wrapper:hover .icon{color:var(--calcite-combobox-icon-color-hover, var(--calcite-color-text-1))}:host(:focus-within) .wrapper,.wrapper--active{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host([read-only]) .wrapper{background-color:var(--calcite-color-background)}:host([read-only]) .label{font-weight:var(--calcite-font-weight-medium)}:host([status=invalid]) .wrapper{border-color:var(--calcite-color-status-danger)}:host([status=invalid]:focus-within) .wrapper{outline:var(--calcite-border-width-md) solid var(--calcite-color-status-danger);outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.wrapper--single{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l) var(--calcite-internal-combobox-padding-inline-end);cursor:pointer;flex-wrap:nowrap}.grid-input{position:relative;display:flex;flex-grow:1;flex-wrap:wrap;align-items:center;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;gap:var(--calcite-internal-combobox-spacing-unit-s);margin-inline-end:var(--calcite-internal-combobox-spacing-unit-s)}.grid-input.selection-display--fit,.grid-input.selection-display--single{flex-wrap:nowrap;overflow:hidden}.input{flex-grow:1;appearance:none;overflow:hidden;text-overflow:ellipsis;border-style:none;background-color:transparent;padding:0;font-family:inherit;color:var(--calcite-color-text-1);font-size:inherit;block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height);inline-size:100%;margin-block-end:var(--calcite-internal-combobox-spacing-unit-s);min-inline-size:4.8125rem}.input:focus{outline:2px solid transparent;outline-offset:2px}.input:placeholder-shown{text-overflow:ellipsis}.input--single{padding:0;margin-block:var(--calcite-internal-combobox-input-margin-block)}.wrapper--active .input-single{cursor:text}.input--hidden{pointer-events:none;width:0px;min-width:0px;opacity:0}.input--icon{padding-block:0;padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.placeholder-icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.input-wrap{display:flex;flex-grow:1;align-items:center}.input-wrap--single{flex:1 1 0%;overflow:hidden}.label{pointer-events:none;max-width:100%;flex:1 1 auto;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:0;font-weight:var(--calcite-font-weight-normal);block-size:var(--calcite-combobox-input-height);line-height:var(--calcite-combobox-input-height)}.label--icon{padding-inline:var(--calcite-internal-combobox-spacing-unit-l)}.icon-end,.icon-start{display:flex;cursor:pointer;align-items:center}.icon-end{flex:none}.icon-end .icon{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3))}.floating-ui-container{inline-size:max-content;display:none;max-inline-size:100vw;max-block-size:100vh;inset-block-start:0;left:0;z-index:var(--calcite-floating-ui-z-index)}@starting-style{.floating-ui-container{opacity:0;inset-block-start:0;left:0}}:host([top-layer-disabled]) .floating-ui-container{--calcite-floating-ui-z-index: var(--calcite-z-index-dropdown)}.floating-ui-container[popover]{padding:0;margin:0;border:none;background-color:transparent;overflow:visible;display:none}.floating-ui-container:popover-open{display:block}.floating-ui-container .calcite-floating-ui-anim{position:relative;transition-duration:var(--calcite-floating-ui-transition);transition-property:inset-block-start,left,opacity,display;transition-behavior:allow-discrete;opacity:0;box-shadow:0 0 16px #00000029;z-index:var(--calcite-z-index);border-radius:.25rem}.floating-ui-container[data-placement^=bottom] .calcite-floating-ui-anim{inset-block-start:-5px}.floating-ui-container[data-placement^=top] .calcite-floating-ui-anim{inset-block-start:5px}.floating-ui-container[data-placement^=left] .calcite-floating-ui-anim{left:5px}.floating-ui-container[data-placement^=right] .calcite-floating-ui-anim{left:-5px}.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:1;inset-block-start:0;left:0}@starting-style{.floating-ui-container[data-placement] .calcite-floating-ui-anim--active{opacity:0}}.floating-ui-container .calcite-floating-ui-anim{box-shadow:var(--calcite-shadow-md)}@media(forced-colors:active){.wrapper,.floating-ui-container{border:1px solid canvasText}}.screen-readers-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.list-container{max-height:45vh;overflow-y:auto;inline-size:var(--calcite-dropdown-width, 100%);background-color:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1))}.list{margin:0;display:block;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.list--hide{height:0px;overflow:hidden}calcite-chip{--calcite-animation-timing: 0}.chip{margin-block:calc(var(--calcite-internal-combobox-spacing-unit-s) / 4);max-inline-size:100%}.chip--invisible{visibility:hidden;position:absolute}.item{display:block}.select-all{background-color:var(--calcite-combobox-item-background-color-active, var(--calcite-color-foreground-1));border-block-end-color:var(--calcite-combobox-divider-color, var(--calcite-combobox-item-border-color, var(--calcite-color-border-3)));border-block-end-style:solid;border-block-end-width:var(--calcite-border-width-sm);inset-block-start:0;position:sticky;z-index:var(--calcite-z-index-sticky)}.no-matches{padding-block:var(--calcite-internal-combobox-no-matches-spacing-unit-s);padding-inline:var(--calcite-internal-combobox-spacing-unit-l);color:var(--calcite-combobox-input-text-color, var(--calcite-color-text-1));background:var(--calcite-combobox-background-color, var(--calcite-color-foreground-1));cursor:pointer}.no-matches-placeholder{color:var(--calcite-combobox-icon-color, var(--calcite-color-text-3));cursor:default}.disabled{opacity:.5}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.clear-button--container{display:flex;cursor:pointer;align-items:center}.clear-button--container:hover calcite-action{--calcite-action-background-color: var(--calcite-clear-button-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color: var(--calcite-clear-button-icon-color-hover, var(--calcite-color-text-1))}.clear-button--container:active calcite-action{--calcite-action-background-color: var(--calcite-clear-button-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color: var(--calcite-clear-button-icon-color-press, var(--calcite-color-text-1))}.clear-button--container calcite-action{--calcite-internal-action-height: 100%;--calcite-internal-action-padding-inline: var(--calcite-spacing-none);--calcite-internal-action-padding-block: var(--calcite-spacing-none);--calcite-action-background-color: var(--calcite-clear-button-background-color, var(--calcite-color-foreground-2));--calcite-action-text-color: var(--calcite-clear-button-icon-color)}.clear-button--container calcite-action:hover{--calcite-action-background-color-hover: var(--calcite-clear-button-background-color-hover, var(--calcite-color-foreground-3));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-hover)}.clear-button--container calcite-action:active{--calcite-action-background-color-press: var(--calcite-clear-button-background-color-press, var(--calcite-color-border-2));--calcite-action-text-color-press: var(--calcite-clear-button-icon-color-press)}:host([scale=s]) .clear-button--container{padding:var(--calcite-space-2xs)}:host([scale=m]) .clear-button--container{padding:var(--calcite-space-2xs);padding-inline-end:var(--calcite-space-sm)}:host([scale=l]) .clear-button--container{padding-inline-end:var(--calcite-space-sm-plus)}.validation-container{display:flex;flex-direction:column;align-items:flex-start;align-self:stretch}:host([scale=m]) .validation-container,:host([scale=l]) .validation-container{padding-block-start:.5rem}:host([scale=s]) .validation-container{padding-block-start:.25rem}:host([hidden]){display:none}[hidden]{display:none}.text-match{background-color:transparent;color:inherit;font-weight:var(--calcite-font-weight-bold)}.internal-label-alignment--center{align-items:center}.internal-label-alignment--end{align-items:end}.internal-label--container{display:flex;justify-content:space-between;color:var(--calcite-color-text-1)}.internal-label-required--indicator{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-status-danger);padding-inline:var(--calcite-spacing-base)}.internal-label-required--indicator:hover{cursor:help}.internal-label--text{line-height:1}:host([scale=s]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-xxs)}:host([scale=s]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=s]) .internal-label--text{font-size:var(--calcite-font-size--2)}:host([scale=m]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-sm)}:host([scale=m]) .internal-label--text{font-size:var(--calcite-font-size--1)}:host([scale=l]) .internal-label-spacing--bottom{margin-block-end:var(--calcite-spacing-sm)}:host([scale=l]) .internal-label-spacing-inline--end{margin-inline-end:var(--calcite-spacing-md)}:host([scale=l]) .internal-label-spacing-inline--start{margin-inline-start:var(--calcite-spacing-md)}:host([scale=l]) .internal-label--text{font-size:var(--calcite-font-size-0)}::placeholder{font-weight:var(--calcite-font-weight-normal);color:var(--calcite-input-placeholder-text-color, var(--calcite-color-text-3))}`,X=class extends oe{constructor(){super(),this.direction=re(),this.formSupport=Me({inputType:"text"})(this),this.selectAllComboboxItemRef=M(),this.allSelectedIndicatorChipRef=M(),this.data=[],this.cancelable=xe()(this),this.filterItems=(()=>{let e=(t,o)=>t&&o.some(({el:i})=>t===i);return ue((t,o=!1,i=!0)=>{let a=ye([...this.data,...this.groupData],t,this.effectiveFilterProps),c=this.getItemsAndGroups(),l=t==="";c.forEach(n=>{if(l){n.itemHidden=!1;return}let s=!e(n,a);n.itemHidden=s;let[C,d]=n.ancestors;(e(C,a)||e(d,a))&&(n.itemHidden=!1),s||n.ancestors.forEach(f=>f.itemHidden=!1)}),this.noMatchesFound=this.filteredItems.length===0&&!!this.filterText,this.filterTextMatchPattern=this.filterText?new RegExp(`(${T(this.filterText)})`,"i"):void 0,this.keyboardNavItems.forEach(n=>{n.filterTextMatchPattern=this.filterTextMatchPattern}),o&&(this.open=this.filterText.trim().length>0),i&&this.calciteComboboxFilterChange.emit()},ae.filter)})(),this._filterText="",this.getSelectedItems=()=>{if(!this.isMulti()){let e=this.allItems.find(({selected:t})=>t);return e?[e]:[]}return this.allItems.filter(e=>e.selected&&(this.selectionMode!=="ancestors"||!Y(e)))},this.groupData=[],this.groupItems=[],this.guid=pe(),this.ignoreSelectedEventsFlag=!1,this.internalValueChangeFlag=!1,this.previousAllSelected=!1,this.refreshingSelectionDisplay=!1,this.mutationObserver=A("mutation",()=>this.updateItems()),this.onLabelClick=()=>{this.setFocus()},this.transitionProp="opacity",this.resizeObserver=(()=>{let e=!1;return A("resize",()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1,this.setMaxScrollerHeight(),this.refreshSelectionDisplay()}))})})(),this.selectedIndicatorChipRef=M(),this.selectedChipCountRef=M(),this.clearButtonRef=M(),this._selectedItems=[],this.textInputRef=M(),this._value="",this.messages=de({blocking:!0}),this.focusSetter=se()(this),this.customChipAddHandler=()=>{this.addCustomChip(this.filterText,!0)},this.interactiveContainer=he(this),this.topLayer=be({target:()=>this.floatingEl})(this),this.activeChipIndex=-1,this.activeDescendant="",this.activeItemIndex=-1,this.compactSelectionDisplay=!1,this.deferFitChipCountRender=!1,this.selectedHiddenChipsCount=0,this.selectedVisibleChipsCount=0,this.fitUsingCompactCountLabel=!1,this.allItems=[],this.items=[],this.noMatchesFound=!1,this.clearDisabled=!1,this.disabled=!1,this.maxItems=0,this.open=!1,this.overlayPositioning="absolute",this.placeholderIconFlipRtl=!1,this.placement=N,this.readOnly=!1,this.required=!1,this.scale="m",this.selectAllEnabled=!1,this.selectionDisplay="all",this.selectionAppearance="icon",this.selectionMode="multiple",this.status="idle",this.topLayerDisabled=!1,this.calciteComboboxBeforeClose=v({cancelable:!1}),this.calciteComboboxBeforeOpen=v({cancelable:!1}),this.calciteComboboxChange=v({cancelable:!1}),this.calciteComboboxChipClose=v({cancelable:!1}),this.calciteComboboxClose=v({cancelable:!1}),this.calciteComboboxFilterChange=v({cancelable:!1}),this.calciteComboboxOpen=v({cancelable:!1}),He(this),this.listenOn(document,"click",this.documentClickHandler),this.listen("calciteComboboxItemChange",this.calciteComboboxItemChangeHandler),this.listen("calciteInternalComboboxItemChange",this.calciteInternalComboboxItemChangeHandler),this.listen("click",this.comboboxFocusHandler)}static{this.properties={activeChipIndex:[16,{},{state:!0}],activeDescendant:[16,{},{state:!0}],activeItemIndex:[16,{},{state:!0}],compactSelectionDisplay:[16,{},{state:!0}],deferFitChipCountRender:[16,{},{state:!0}],selectedHiddenChipsCount:[16,{},{state:!0}],selectedVisibleChipsCount:[16,{},{state:!0}],fitUsingCompactCountLabel:[16,{},{state:!0}],allItems:[16,{},{state:!0}],items:[16,{},{state:!0}],noMatchesFound:[16,{},{state:!0}],allowCustomValues:[7,{},{reflect:!0,type:Boolean}],clearDisabled:[7,{},{reflect:!0,type:Boolean}],disabled:[7,{},{reflect:!0,type:Boolean}],filterText:[3,{},{reflect:!0}],filterProps:[0,{},{attribute:!1}],filteredItems:[32,{},{attribute:!1,readOnly:!0}],flipPlacements:[0,{},{attribute:!1}],form:[3,{},{reflect:!0}],label:1,labelText:1,maxItems:[11,{},{reflect:!0,type:Number}],messageOverrides:[0,{},{attribute:!1}],name:[3,{},{reflect:!0}],open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placeholder:1,placeholderIcon:[3,{},{reflect:!0}],placeholderIconFlipRtl:[7,{},{reflect:!0,type:Boolean}],placement:[3,{},{reflect:!0}],readOnly:[7,{},{reflect:!0,type:Boolean}],required:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selectAllEnabled:[7,{},{reflect:!0,type:Boolean}],selectedItems:[0,{},{attribute:!1}],selectionDisplay:[3,{},{reflect:!0}],selectionAppearance:[3,{},{reflect:!0}],selectionMode:[3,{},{reflect:!0}],status:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],validationIcon:[3,{converter:ie},{reflect:!0}],validationMessage:1,validity:[32,{},{readOnly:!0,attribute:!1}],value:1}}static{this.formAssociated=!0}static{this.styles=Ae}get effectiveFilterProps(){return this.filterProps?this.filterProps.filter(e=>e!=="el"):["description","label","metadata","shortHeading"]}get showingInlineIcon(){let{placeholderIcon:e,selectionMode:t,selectedItems:o,open:i}=this,a=o[0],c=a?.icon,l=R(t);return!i&&a?!!c&&l:!!e&&(!a||l)}get allSelected(){let e=this.allItems.filter(t=>!t.disabled);return e.length>0&&e.every(t=>t.selected)}get hasDisabledSelected(){return this.allItems.some(e=>e.disabled&&e.selected)}get indeterminate(){let e=this.selectedItems.length>0||this.hasDisabledSelected;return this.selectAllEnabled?!this.allSelected&&e:this.selectedItems.length>0&&!this.allSelected}get keyboardNavItems(){let{selectAllComboboxItemRef:e}=this,t=this.filteredItems.filter(o=>!o.disabled);return e.value?[e.value,...t]:t}get filterText(){return this._filterText}set filterText(e){let t=this._filterText;e!==t&&(this._filterText=e,this.filterTextChange(e))}get filteredItems(){return this.items.filter(e=>!E(e))}get selectedItems(){return this._selectedItems}set selectedItems(e){let t=this._selectedItems;e!==t&&(this._selectedItems=e,this.selectedItemsHandler())}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueHandler(e))}async reposition(e=!1){let{floatingEl:t,referenceEl:o,placement:i,overlayPositioning:a,filteredFlipPlacements:c}=this;return Ce(this,{direction:this.direction,floatingEl:t,referenceEl:o,overlayPositioning:a,placement:i,flipPlacements:c,type:"menu"},e)}async setFocus(e){return this.focusSetter(()=>(this.activeChipIndex=-1,this.activeItemIndex=-1,this.textInputRef.value),e)}connectedCallback(){super.connectedCallback(),this.mutationObserver?.observe(this.el,{childList:!0,subtree:!0}),this.setFilteredPlacements(),V(this),this.cancelable.add(this.filterItems)}async load(){this.handleSelectionModeWarning()}willUpdate(e){e.has("open")&&(this.hasUpdated||this.open!==!1)&&this.openHandler(),e.has("disabled")&&(this.hasUpdated||this.disabled!==!1)&&this.handleDisabledChange(this.disabled),e.has("maxItems")&&(this.hasUpdated||this.maxItems!==0)&&this.setMaxScrollerHeight(),(e.has("overlayPositioning")&&(this.hasUpdated||this.overlayPositioning!=="absolute")||e.has("placement")&&(this.hasUpdated||this.placement!==N))&&this.reposition(!0),(e.has("selectionMode")||e.has("scale")||e.has("selectionAppearance"))&&this.updateItems(),e.has("flipPlacements")&&this.flipPlacementsHandler()}loaded(){V(this),this.updateItems(),this.filterItems(this.filterText,!1,!1)}disconnectedCallback(){super.disconnectedCallback(),this.mutationObserver?.disconnect(),this.resizeObserver?.disconnect(),Se(this)}emitComboboxChange(){this.calciteComboboxChange.emit()}filterTextChange(e){this.updateActiveItemIndex(-1),this.filterItems(e,!0)}openHandler(){this.disabled||fe(this)}handleDisabledChange(e){e||(this.open=!1)}valueHandler(e){this.internalValueChangeFlag||(this.items.forEach(t=>{t.selected=Array.isArray(e)?e.includes(t.value):e===t.value}),this.updateItems())}flipPlacementsHandler(){this.setFilteredPlacements(),this.reposition(!0)}selectedItemsHandler(){let e=this.previousAllSelected,t=this.allSelected;if(this.previousAllSelected=t,this.internalValueChangeFlag=!0,this.value=this.getValue(),this.internalValueChangeFlag=!1,this.selectionDisplay==="fit"&&this.isMulti()){let o=e&&!t;e&&!t&&(this.selectedHiddenChipsCount=0,this.selectedItems.forEach(i=>{let a=this.referenceEl?.querySelector(`#${h.chip(i.guid)}`);a&&this.showChip(a)})),this.updateComplete.then(async()=>{o&&await this.updateComplete,await this.refreshSelectionDisplay(),this.fitFollowUpRefreshPromise&&await this.fitFollowUpRefreshPromise,this.deferFitChipCountRender=!1})}}async documentClickHandler(e){this.disabled||e.composedPath().includes(this.el)||(await this.componentOnReady(),!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1)),this.allowCustomValues&&this.filterText.trim().length&&this.addCustomChip(this.filterText),this.open=!1)}handleSelectAll(e){e&&(this.toggleSelectAll(),this.selectionDisplay!=="fit"&&this.allSelected&&this.selectedItems.forEach(t=>{let o=this.referenceEl.querySelector(`#${h.chip(t.guid)}`);o&&this.hideChip(o)}))}updateSelectedItems(){this.selectedItems=this.getOrderedSelectedItems(this.getSelectedItems())}calciteComboboxItemChangeHandler(e){if(this.ignoreSelectedEventsFlag)return;let t=e.target,o=e.composedPath().includes(this.selectAllComboboxItemRef.value);this.selectAllEnabled&&this.handleSelectAll(o);let i=this.keyboardNavItems.indexOf(o?this.selectAllComboboxItemRef.value:t);this.updateActiveItemIndex(i),this.toggleSelection(t,t.selected)}calciteInternalComboboxItemChangeHandler(e){e.stopPropagation(),this.hasUpdated&&this.updateItems()}clearValue(){let e=this.items.filter(t=>t.selected&&!t.disabled);e.length&&(this.ignoreSelectedEventsFlag=!0,e.forEach(t=>t.selected=!1),this.ignoreSelectedEventsFlag=!1,this.updateSelectedItems(),this.emitComboboxChange()),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems(""),this.setFocus()}clearInputValue(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}setFilteredPlacements(){let{el:e,flipPlacements:t}=this;this.filteredFlipPlacements=t?me(t,e):void 0}getValue(){let e=this.getOrderedSelectedValues(this.selectedItems.map(t=>t.value?.toString()));return e.length?e.length>1?e:e[0]:""}getOrderedSelectedValues(e){if(!this.isMulti())return e;let t=Array.isArray(this.value)?this.value:this.value?[this.value]:[];return Oe(e,t)}getOrderedSelectedItems(e){return this.isMulti()?Z(e,this.selectedItems):e}comboboxInViewport(){let e=this.el.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.right<=(window.innerWidth||document.documentElement.clientWidth)&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)}toggleSelectAll(){let e=!this.allSelected;this.allItems.forEach(t=>{t.disabled||(t.selected=e)}),this.updateSelectedItems(),this.emitComboboxChange()}hasHiddenSelectedFitChips(){if(this.selectionDisplay!=="fit"||!this.isMulti())return!1;let e=this.selectedChipCountRef.value;return!!e&&!e.classList.contains(r.chipInvisible)}keyDownHandler(e){if(this.readOnly)return;let{key:t}=e;switch(t){case"Tab":this.activeChipIndex=-1,this.activeItemIndex=-1,this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):this.open?(this.open=!1,e.preventDefault()):!this.allowCustomValues&&this.filterText&&(this.clearInputValue(),this.filterItems(""),this.updateActiveItemIndex(-1));break;case"ArrowLeft":(this.activeChipIndex!==-1||this.textInputRef.value?.selectionStart===0)&&(this.previousChip(),e.preventDefault());break;case"ArrowRight":this.activeChipIndex!==-1&&(this.nextChip(),e.preventDefault());break;case"ArrowUp":this.keyboardNavItems.length&&(e.preventDefault(),this.open&&this.shiftActiveItemIndex(-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView()),this.scrollToActiveOrSelectedItem();break;case"ArrowDown":this.keyboardNavItems.length&&(e.preventDefault(),this.open?this.shiftActiveItemIndex(1):(this.open=!0,this.ensureRecentSelectedItemIsActive()),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView());break;case" ":!this.textInputRef.value?.value&&!e.defaultPrevented&&(!this.open&&this.keyboardNavItems.length&&(this.open=!0,this.ensureRecentSelectedItemIsActive()),e.preventDefault());break;case"Home":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(0),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"End":if(!this.open)return;e.preventDefault(),this.updateActiveItemIndex(this.filteredItems.length-1),this.scrollToActiveOrSelectedItem(),this.comboboxInViewport()||this.el.scrollIntoView();break;case"Escape":if(this.open){this.open=!1,e.preventDefault();break}this.clearDisabled||(this.textInputRef.value.value.length>0?(this.resetText(),e.preventDefault()):this.selectedItems.length>0&&this.selectionMode!=="single-persist"&&(this.clearValue(),e.preventDefault()));break;case"Enter":this.open&&this.activeItemIndex>-1?(this.keyboardNavItems[this.activeItemIndex].toggleSelection(),e.preventDefault()):this.activeChipIndex>-1?(this.removeActiveChip(e.target),e.preventDefault()):this.allowCustomValues&&this.filterText?(this.addCustomChip(this.filterText,!0),e.preventDefault()):!e.defaultPrevented&&this.formSupport.active&&(e.preventDefault(),this.formSupport.requestSubmit());break;case"Delete":case"Backspace":{let i=this.hasHiddenSelectedFitChips()&&this.activeChipIndex===-1;if(this.selectionDisplay==="single"||i)return;let c=e.composedPath().find(U);this.activeChipIndex>-1&&c?(e.preventDefault(),this.removeActiveChip(c)):!this.filterText&&this.isMulti()&&(e.preventDefault(),this.removeLastChip());break}}}onBeforeOpen(){this.topLayer.show(),this.reposition(),this.calciteComboboxBeforeOpen.emit(),setTimeout(()=>this.scrollToActiveOrSelectedItem(this.activeItemIndex<0),0)}onOpen(){this.calciteComboboxOpen.emit()}onBeforeClose(){this.calciteComboboxBeforeClose.emit()}onClose(){this.calciteComboboxClose.emit(),ge(this),this.topLayer.hide()}async setMaxScrollerHeight(){let{listContainerEl:e,open:t,referenceEl:o}=this;if(!e||!t||!o)return;let i=this.getMaxScrollerHeight();e.style.maxBlockSize=i>0?`${i}px`:"",e.style.inlineSize=`${o.clientWidth}px`}calciteChipCloseHandler(e){this.open=!1;let t=this.items.find(o=>o===e);t&&this.toggleSelection(t,!1),this.calciteComboboxChipClose.emit()}clickHandler(e){if(this.readOnly)return;let t=e.composedPath();if(t.some(i=>U(i))){this.open=!1,e.preventDefault();return}let o=this.clearButtonRef.value;if(o&&t.includes(o)){this.clearValue(),e.preventDefault();return}this.open=!this.open,this.ensureRecentSelectedItemIsActive()}ensureRecentSelectedItemIsActive(){let{activeItemIndex:e,selectedItems:t,keyboardNavItems:o}=this;if(e>-1&&o[e]){this.updateActiveItemIndex(e);return}let i=t[t.length-1],a=i?o.indexOf(i):o.length?0:-1;this.updateActiveItemIndex(a>-1?a:o.length?0:-1)}hideChip(e){e.classList.add(r.chipInvisible)}showChip(e){e.classList.remove(r.chipInvisible)}refreshChipDisplay({chipEls:e,availableHorizontalChipElSpace:t,chipContainerElGap:o,hideSelectedChips:i}){let a=e.filter(d=>d.selected),c=a.filter(d=>!d.disabled),l=a.filter(d=>d.disabled),n=d=>{let f=w(d),u=d.getBoundingClientRect().width;return Number.isFinite(f)&&f>0?f:u};if(a.forEach(d=>n(d)),e.forEach(d=>{this.hideChip(d)}),i)return;let s=d=>{let f=0;return d.forEach(u=>{let b=n(u);b&&b<=t&&(t-=b+o,this.showChip(u),f++)}),f};s(c)<=1&&s(l)}async refreshSelectionDisplay(e=!0){if(this.refreshingSelectionDisplay)return;if(this.refreshingSelectionDisplay=!0,await this.componentOnReady(),R(this.selectionMode)){this.refreshingSelectionDisplay=!1;return}let{allSelectedIndicatorChipRef:t,chipContainerEl:o,selectionDisplay:i,placeholder:a,selectedIndicatorChipRef:c,textInputRef:l}=this;if(!l.value||!o){this.refreshingSelectionDisplay=!1;return}let n=parseInt(getComputedStyle(o).gap,10),s=w(o),{fontSize:C,fontFamily:d,minInlineSize:f}=getComputedStyle(l.value),u=.55,b=parseFloat(f)||parseInt(k,10),g=P(a,`${C} ${d}`),L=g>0?g:Math.max(b,Math.round((a?.length||0)*(parseFloat(C)||parseInt(k,10))*u)),$=Math.max(b,L),D=(i==="fit"?$:L)+n,ke=w(t.value),j=w(c.value),Be=Math.max(ke,j);if(this.setCompactSelectionDisplay({chipContainerElGap:n,chipContainerElWidth:s,inputWidth:D,largestSelectedIndicatorChipWidth:Be}),i!=="fit"&&this.allSelected&&this.selectAllEnabled&&this.selectedItems.forEach(y=>{let I=this.referenceEl?.querySelector(`#${h.chip(y.guid)}`);I&&this.hideChip(I)}),this.indeterminate&&this.selectedItems.forEach(y=>{let I=this.referenceEl?.querySelector(`#${h.chip(y.guid)}`);I&&this.showChip(I)}),i==="fit"){let y=Array.from(this.renderRoot.querySelectorAll("calcite-chip")).filter(J=>{let K=J.value,De=K!=null&&`${K}`!="";return J.disabled||De}),{hiddenChipIndicatorWidth:I,hideSelectedChips:Q,reservedPlaceholderInputWidth:Ge}=this.getFitCompactDisplayState({chipContainerElGap:n,chipContainerElWidth:s,inputMinWidth:b,placeholderWidth:L,selectedIndicatorChipElWidth:j});this.fitUsingCompactCountLabel=Q;let Ye=Math.round(s-(I+n+Ge+n));this.refreshChipDisplay({availableHorizontalChipElSpace:Ye,chipContainerElGap:n,chipEls:y,hideSelectedChips:Q});let $e=this.selectedHiddenChipsCount;this.syncChipVisibilityCounts(y),$e!==this.selectedHiddenChipsCount&&e&&(this.fitFollowUpRefreshPromise=this.updateComplete.then(()=>this.refreshSelectionDisplay(!1)).then(()=>{this.fitFollowUpRefreshPromise=void 0}))}this.refreshingSelectionDisplay=!1}setFloatingEl(e){this.floatingEl=e,V(this)}shouldUseFitCompactDisplay({chipContainerElGap:e,chipContainerElWidth:t,hiddenChipIndicatorWidth:o,inputMinWidth:i,placeholderWidth:a,reservedPlaceholderInputWidth:c}){let l=Math.round(t-(o+e+c+e));return a>i*2&&l<=0}getFitCompactDisplayState({chipContainerElGap:e,chipContainerElWidth:t,inputMinWidth:o,placeholderWidth:i,selectedIndicatorChipElWidth:a}){let c=w(this.selectedChipCountRef.value),l=this.deferFitChipCountRender||this.selectedHiddenChipsCount<=0?0:c||a,n=Math.max(o,i),s=this.shouldUseFitCompactDisplay({chipContainerElGap:e,chipContainerElWidth:t,hiddenChipIndicatorWidth:l,inputMinWidth:o,placeholderWidth:i,reservedPlaceholderInputWidth:n});return{hiddenChipIndicatorWidth:l,hideSelectedChips:s,reservedPlaceholderInputWidth:n}}setCompactSelectionDisplay({chipContainerElGap:e,chipContainerElWidth:t,inputWidth:o,largestSelectedIndicatorChipWidth:i}){let a=Math.round(i+e+o);(!this.maxCompactBreakpoint||this.maxCompactBreakpoint<a)&&(this.maxCompactBreakpoint=a),this.compactSelectionDisplay=t<this.maxCompactBreakpoint}setContainerEl(e){F(this.resizeObserver,this.listContainerEl,e),this.listContainerEl=e,this.transitionEl=e}setChipContainerEl(e){F(this.resizeObserver,this.chipContainerEl,e),this.chipContainerEl=e}setReferenceEl(e){this.referenceEl=e,V(this)}syncChipVisibilityCounts(e){let t=0,o=0;e.forEach(a=>{a.selected&&(o++,a.classList.contains(r.chipInvisible)||t++)}),t!==this.selectedVisibleChipsCount&&(this.selectedVisibleChipsCount=t);let i=Math.max(0,o-t);i!==this.selectedHiddenChipsCount&&(this.selectedHiddenChipsCount=i)}getMaxScrollerHeight(){let t=this.getItemsAndGroups(!0).filter(c=>!E(c)),{maxItems:o}=this,i=0,a=0;return t.length>=o&&t.forEach(c=>{if(i<o){let l=this.calculateScrollerHeight(c);a+=l,i+=1}}),a}calculateScrollerHeight(e){if(!e)return 0;let t=e.getBoundingClientRect().height,o=`:scope > ${B}, :scope > ${G}`,i=Array.from(e.querySelectorAll(o)).reduce((a,c)=>a+c.getBoundingClientRect().height,0);return t-i}inputHandler(e){let t=e.target.value;this.filterText=t}getItemsAndGroups(e=!1){return e?Array.from(this.el.querySelectorAll(`${B}, ${G}`)):[...this.groupItems,...this.items]}toggleSelection(e,t){!e||this.selectionMode==="single-persist"&&e.selected&&e.value===this.value&&!t||(this.selectionDisplay==="fit"&&this.isMulti()&&(this.deferFitChipCountRender=!0),this.isMulti()?this.handleMultiSelection(e,t):this.handleSingleSelection(e,t))}handleMultiSelection(e,t){e.selected=t,this.updateAncestors(e),this.updateSelectedItems(),this.emitComboboxChange(),this.resetText(),this.filterItems("")}handleSingleSelection(e,t){this.ignoreSelectedEventsFlag=!0,this.items.forEach(o=>o.selected=o===e?t:!1),this.ignoreSelectedEventsFlag=!1,this.updateSelectedItems(),this.emitComboboxChange(),this.textInputRef.value&&(this.textInputRef.value.value=O(e)),this.open=!1,this.updateActiveItemIndex(-1),this.resetText(),this.filterItems("")}updateAncestors(e){if(this.selectionMode!=="ancestors")return;let t=_(e),o=Ve(e);e.selected?t.forEach(i=>{i.disabled||(i.selected=!0)}):([...o].forEach(i=>{i.disabled||(i.selected=!1)}),[...t].forEach(i=>{Y(i)||(i.selected=!1)}))}updateItems(){this.allItems=this.getItems(!0),this.items=this.allItems.filter(e=>!e.disabled),this.groupItems=this.getGroupItems(),this.data=this.getData(),this.groupData=this.getGroupData(),this.updateItemProps(),this.updateSelectedItems(),this.previousAllSelected=this.allSelected}updateItemProps(){this.allItems.forEach(e=>{e.selectionMode=this.selectionMode,e.selectionAppearance=this.selectionAppearance,e.scale=this.scale}),this.groupItems.forEach((e,t)=>(e.scale=this.scale,e.position=t)),this.allowCustomValues||this.setMaxScrollerHeight(),this.groupItems.forEach((e,t,o)=>{t===0&&(e.afterEmptyGroup=!1);let i=o[t+1];i&&(i.afterEmptyGroup=e.children.length===0)})}getData(){return this.items.map(e=>({description:e.description,filterDisabled:e.filterDisabled,label:e.heading,metadata:e.metadata,shortHeading:e.shortHeading,el:e}))}getGroupData(){return this.groupItems.map(e=>({label:e.label,el:e}))}resetText(){this.textInputRef.value&&(this.textInputRef.value.value=""),this.filterText=""}getItems(e=!1){return Array.from(this.el.querySelectorAll(B)).filter(o=>e||!o.disabled)}getGroupItems(){return Array.from(this.el.querySelectorAll(G))}addCustomChip(e,t){let o=this.items.find(i=>i.heading===e);if(o)this.toggleSelection(o,!0);else{let i=document.createElement("calcite-combobox-item");i.value=e,i.heading=e,this.el.prepend(i),this.updateItems(),this.toggleSelection(i,!0),this.open=!0,t&&this.setFocus()}}removeActiveChip(e){let t=this.selectedItems[this.activeChipIndex];t&&!t.disabled&&`${h.chip(t.guid)}`===e.id&&this.toggleSelection(t,!1),this.setFocus()}removeLastChip(){let e=this.selectedItems.findLast(t=>!t.disabled);e&&(this.toggleSelection(e,!1),this.setFocus())}previousChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex;this.activeChipIndex=t===-1?e:Math.max(t-1,0),this.updateActiveItemIndex(-1),this.focusChip()}nextChip(){let e=this.selectedItems.length-1,t=this.activeChipIndex+1;t>e?(this.activeChipIndex=-1,ne(this.textInputRef.value)):(this.activeChipIndex=t,this.focusChip()),this.updateActiveItemIndex(-1)}focusChip(){let e=this.selectedItems[this.activeChipIndex]?.guid;(e?this.referenceEl?.querySelector(`#${h.chip(e)}`):void 0)?.setFocus()}scrollToActiveOrSelectedItem(e=!1){let t=e&&this.selectedItems?.length?this.selectedItems[0]:this.keyboardNavItems[this.activeItemIndex],o=this.listContainerEl;if(!t||!o)return;t.scrollIntoView({block:"nearest"});let a=this.selectAllComboboxItemRef.value?.offsetHeight||0,c=t.getBoundingClientRect(),l=o.getBoundingClientRect();c.top<l.top+a&&(o.scrollTop-=l.top+a-c.top)}shiftActiveItemIndex(e){let{length:t}=this.keyboardNavItems,o=(this.activeItemIndex+t+e)%t;this.updateActiveItemIndex(o),this.scrollToActiveOrSelectedItem()}updateActiveItemIndex(e){this.activeItemIndex=e;let t="";this.keyboardNavItems.forEach((o,i)=>{i===e?(o.active=!0,t=`${h.item(o.guid)}`):o.active=!1}),this.activeDescendant=t,this.activeItemIndex>-1&&(this.activeChipIndex=-1)}isMulti(){return!R(this.selectionMode)}comboboxFocusHandler(){this.disabled||(this.activeChipIndex=-1,this.textInputRef.value?.focus(),this.open&&this.selectionDisplay==="fit"&&this.isMulti()&&this.refreshSelectionDisplay())}createScreenReaderItem({ariaLabel:e,ariaSelected:t,id:o,textContent:i}){return x`<li aria-label=${e??m} aria-selected=${t??m} id=${o??m} role=option tabindex=-1>${i}</li>`}handleSelectionModeWarning(){this.selectionMode==="single-persist"&&this.clearDisabled&&ce.warn('clearDisabled is ignored when selection-mode is set to "single-persist"')}getDescriptionMessage(){let e=Array.isArray(this.value)?this.value.join(", "):this.value;return this.readOnly?this.messages.nonEditable.replace("{value}",`${e}`):e}getChipLabel(e,t){return t?[...[..._(e)].reverse(),e].map(i=>O(i)).join(" / "):O(e)}renderChip({activeChipIndex:e,disabled:t,index:o,item:i,messages:a,readOnly:c,scale:l,isAncestors:n}){let s=this.getChipLabel(i,n);return H(i.guid||i.value||s,x`<calcite-chip .appearance=${c?"outline":"solid"} class=${p({[r.chip]:!0,[r.disabled]:t})} .closable=${!t&&!c} data-testid=${`${t?"disabled-chip":"chip"}-${o}`} .disabled=${t} .icon=${i.icon} .iconFlipRtl=${i.iconFlipRtl} id=${(!t&&i.guid?`${h.chip(i.guid)}`:void 0)??m} .label=${s} .messageOverrides=${t?void 0:{dismissLabel:a.removeTag.replace("{value}",`${s}`)}} @calciteChipClose=${t?void 0:()=>this.calciteChipCloseHandler(i)} @focusin=${t?void 0:()=>this.activeChipIndex=o} .scale=${l} .selected=${i.selected} .tabIndex=${!t&&e===o?0:-1} title=${s??m} .value=${i.value}>${s}</calcite-chip>`)}renderChipCount(e,t){let o=this.fitUsingCompactCountLabel?`${e}`:this.messages.disabledSelectedCount.replace("{count}",`${e}`)??`+${e}`;return x`<calcite-chip appearance=solid class=${p({[r.chip]:!0})} data-testid=selected-chip-count id=selected-chip-count .label=${o} .scale=${t} tabindex=-1 title=${o??m} ${S(this.selectedChipCountRef)}>${o}</calcite-chip>`}renderChips(){let{activeChipIndex:e,readOnly:t,scale:o,selectionDisplay:i,selectionMode:a,messages:c}=this,l=[],n=a==="ancestors",s=this.selectAllEnabled&&this.allSelected,C=i==="all";if(s)return null;let d=0,f=0;if(C){let u=this.allItems.filter(g=>g.selected&&(!n||!Y(g)));Z(u,this.selectedItems).forEach(g=>{if(g.disabled){l.push(this.renderChip({activeChipIndex:e,disabled:!0,index:f++,item:g,messages:c,readOnly:t,scale:o,isAncestors:n}));return}l.push(this.renderChip({activeChipIndex:e,disabled:!1,index:d++,item:g,messages:c,readOnly:t,scale:o,isAncestors:n}))})}else s||this.selectedItems.forEach(u=>{l.push(this.renderChip({activeChipIndex:e,disabled:u.disabled,index:d++,item:u,messages:c,readOnly:t,scale:o,isAncestors:n}))});if(i==="fit"){let u=this.selectedHiddenChipsCount,b=this.selectedVisibleChipsCount===0?this.selectedItems.length:u;u>0&&!this.deferFitChipCountRender&&l.push(this.renderChipCount(b,o))}return l.length?l:null}renderAllSelectedIndicatorChip(){let{allSelectedIndicatorChipRef:e,compactSelectionDisplay:t,scale:o,selectedVisibleChipsCount:i}=this,a=!1;if(this.selectionDisplay==="fit"&&this.textInputRef.value&&this.chipContainerEl){let s=parseInt(getComputedStyle(this.chipContainerEl).gap,10),C=w(this.chipContainerEl),{fontSize:d,fontFamily:f,minInlineSize:u}=getComputedStyle(this.textInputRef.value),b=.55,g=parseFloat(u)||parseInt(k,10),L=P(this.placeholder,`${d} ${f}`),$=L>0?L:Math.max(g,Math.round((this.placeholder?.length||0)*(parseFloat(d)||parseInt(k,10))*b)),D=w(this.selectedIndicatorChipRef.value);a=this.getFitCompactDisplayState({chipContainerElGap:s,chipContainerElWidth:C,inputMinWidth:g,placeholderWidth:$,selectedIndicatorChipElWidth:D}).hideSelectedChips}let l=t||a?this.messages.all:this.messages.allSelected,n=this.allSelected&&(this.selectionDisplay==="single"||!i||this.selectionDisplay==="all");return x`<calcite-chip class=${p({[r.chip]:!0,[r.chipInvisible]:!n,[r.allSelected]:!0})} data-testid=all-selected-indicator-chip .label=${l} .scale=${o} title=${l??m} value ${S(e)}>${l}</calcite-chip>`}renderSelectedIndicatorChip(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:o,selectedIndicatorChipRef:i}=this,a=!1,c,l=this.getSelectedItems().length;return e?a=!0:t==="single"&&(this.allSelected?a=!0:l>0?a=!1:a=!0,c=`${l} ${this.messages.selected}`),x`<calcite-chip class=${p({[r.chip]:!0,[r.chipInvisible]:a})} .label=${c} .scale=${o} title=${c??m} value ${S(i)}>${c}</calcite-chip>`}renderSelectedIndicatorChipCompact(){let{compactSelectionDisplay:e,selectionDisplay:t,scale:o}=this,i=!1,a,c=this.getSelectedItems().length;return e?this.allSelected?i=!0:t==="single"&&(i=!(c>0),a=`${c}`):i=!0,x`<calcite-chip class=${p({[r.chip]:!0,[r.chipInvisible]:i})} .label=${a} .scale=${o} title=${a??m} value>${a}</calcite-chip>`}renderInput(){let{guid:e,disabled:t,placeholder:o,selectionMode:i,selectedItems:a,open:c}=this,l=R(i),n=a[0],s=!c&&l&&!!n&&!this.filterText;return x`<span class=${p({[r.inputWrap]:!0,[r.inputWrapSingle]:l})}>${s&&H("label",x`<span class=${p({[r.label]:!0,[r.labelIcon]:!!n?.icon})}>${O(n)}</span>`)||""}${H("input",x`<input aria-activedescendant=${this.activeDescendant??m} aria-controls=${`${h.listbox(e)}`} aria-errormessage=${h.validationMessage} aria-owns=${`${h.listbox(e)}`} aria-autocomplete=list .ariaDescription=${this.getDescriptionMessage()} .ariaExpanded=${c} aria-haspopup=listbox .ariaInvalid=${this.status==="invalid"} .ariaLabel=${ve(this)} class=${p({[r.input]:!0,[r.inputSingle]:!0,[r.inputHidden]:s,[r.inputIcon]:this.showingInlineIcon&&!!this.placeholderIcon})} data-testid=input .disabled=${t} .id=${`${h.input(e)}`} @focus=${this.comboboxFocusHandler} @input=${this.inputHandler} placeholder=${o??m} .readOnly=${this.readOnly} .required=${this.required} role=combobox .tabIndex=${this.activeChipIndex===-1?0:-1} type=text .value=${te(this.filterText??"")} ${S(this.textInputRef)}>`)}</span>`}renderListBoxOptions(){let e=this.keyboardNavItems.map(t=>this.createScreenReaderItem({ariaLabel:t.label,ariaSelected:t.selected,id:`${h.item(t.guid)}`,textContent:t.heading}));if(this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"){let t=this.createScreenReaderItem({ariaLabel:this.messages.selectAll,ariaSelected:this.allSelected,textContent:this.messages.selectAll});t&&e.unshift(t)}return e}renderFloatingUIContainer(){let{messages:e,setFloatingEl:t,setContainerEl:o,open:i,scale:a}=this,c={[r.listContainer]:!0,[W.animation]:!0,[W.animationActive]:i},l=(this.filterText&&e.add.replace("{text}",`${this.filterText}`))??"";return x`<div aria-hidden=true class=${p(r.floatingUIContainer)} popover=manual ${S(t)}><div class=${p(c)} ${S(o)}><ul class=${p({[r.list]:!0,[r.listHide]:!i})}>${this.selectAllEnabled&&this.selectionMode!=="single"&&this.selectionMode!=="single-persist"&&x`<calcite-combobox-item class=${p(r.selectAll)} data-testid=select-all-item .heading=${e.selectAll} .id=${`${this.guid}-select-all-enabled-interactive`} .indeterminate=${this.indeterminate} .label=${e.selectAll} .scale=${a} .selected=${this.allSelected} tabindex=-1 value=select-all ${S(this.selectAllComboboxItemRef)}></calcite-combobox-item>`||""}<slot></slot>${this.noMatchesFound&&(this.allowCustomValues?x`<li aria-label=${l??m} class=${p(r.noMatches)} @click=${this.customChipAddHandler} role=option tabindex=0>${Le({text:l,pattern:new RegExp(`(${T(this.filterText)})`,"i")})}</li>`:x`<li class=${p({[r.noMatchesPlaceholder]:!0,[r.noMatches]:!0})}>${e.noMatches}</li>`)||""}</ul></div></div>`}renderSelectedOrPlaceholderIcon(){let{open:e,placeholderIcon:t,placeholderIconFlipRtl:o,selectedItems:i}=this,a=i[0],c=a?.icon,l=t&&(e||!a);return this.showingInlineIcon&&H("selected-placeholder-icon",x`<span class=${p(r.iconStart)}><calcite-icon class=${p({[r.selectedIcon]:!l,[r.placeholderIcon]:l})} .flipRtl=${l?o:a.iconFlipRtl} .icon=${l?t:c} .scale=${z(this.scale)}></calcite-icon></span>`)||""}renderChevronIcon(){let{open:e}=this;return H("chevron",x`<span class=${p(r.iconEnd)}><calcite-icon class=${p(r.icon)} .icon=${e?q.chevronUp:q.chevronDown} .scale=${z(this.scale)}></calcite-icon></span>`)}render(){let{selectionDisplay:e,guid:t,label:o,open:i,readOnly:a}=this,c=R(this.selectionMode),l=e==="all",n=e==="single",s=!c&&e==="fit",C=!c&&!l,d=C&&!s,f=this.items.some(b=>b.selected&&!b.disabled),u=!this.clearDisabled&&this.selectionMode!=="single-persist"&&!!this.value?.length&&f;return this.interactiveContainer({disabled:this.disabled,children:x`${this.labelText&&we({labelText:this.labelText,onClick:this.onLabelClick,required:this.required,tooltipText:this.messages.required})||""}<div aria-live=polite class=${p({[r.wrapper]:!0,[r.wrapperSingle]:c||!this.selectedItems.length,[r.wrapperActive]:i})} @click=${this.clickHandler} @keydown=${this.keyDownHandler} ${S(this.setReferenceEl)}>${this.renderSelectedOrPlaceholderIcon()}${H("grid",x`<div class=${p({[r.gridInput]:!0,[r.selectionDisplayFit]:s,[r.selectionDisplaySingle]:n})} ${S(this.setChipContainerEl)}>${!c&&!n&&this.renderChips()||""}${!c&&!n&&this.selectAllEnabled&&l&&this.renderAllSelectedIndicatorChip()||""}${d&&this.renderSelectedIndicatorChip()||""}${d&&this.renderSelectedIndicatorChipCompact()||""}${C&&this.renderAllSelectedIndicatorChip()||""}<label class=${p(r.screenReadersOnly)} .htmlFor=${`${h.input(t)}`} .id=${`${h.label(t)}`}>${o}</label>${this.renderInput()}</div>`)}${!a&&u?Re({ariaLabel:this.messages.clear,disabled:this.disabled,ref:this.clearButtonRef,scale:this.scale,title:this.messages.clear}):null}${!a&&this.renderChevronIcon()||""}</div><ul aria-labelledby=${`${h.label(t)}`} aria-multiselectable=true class=${p(r.screenReadersOnly)} .id=${`${h.listbox(t)}`} role=listbox tabindex=-1>${this.renderListBoxOptions()}</ul>${this.renderFloatingUIContainer()}${this.validationMessage&&this.status==="invalid"?Ie({icon:this.validationIcon,id:h.validationMessage,message:this.validationMessage,scale:this.scale,status:this.status}):null}`})}};le("calcite-combobox",X);export{X as Combobox};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{b as y}from"./GZZYSINJ.js";import{a as E}from"./YA3S7CBB.js";import{a as w}from"./YP3AYJH3.js";import{a as S}from"./T6CCMW7H.js";import{b as $}from"./JL43QOWW.js";import{d as v}from"./24ZPXFO2.js";import{a as h,b as p,c as A,d as C}from"./XX43OXTK.js";import{c as g}from"./77M5NVCW.js";import"./VUYX7MNO.js";import{a as B}from"./6WLVT7DS.js";import"./ZWPNZ5XW.js";import"./EDEBMMT6.js";import"./NA2ZTWW4.js";import{z as r}from"./AM5HDLAS.js";import{E as m,F as c,G as I,H as f,T as M,g as b,h as u,l as d,p as l}from"./4LMXYULL.js";var R=b`:host([scale=s]){--calcite-internal-action-menu-gap: var(--calcite-action-menu-items-space, var(--calcite-spacing-xxs));--calcite-internal-action-menu-padding: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-menu-gap: var(--calcite-action-menu-items-space, var(--calcite-spacing-sm));--calcite-internal-action-menu-padding: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-menu-gap: var(--calcite-action-menu-items-space, var(--calcite-spacing-sm-plus));--calcite-internal-action-menu-padding: var(--calcite-spacing-sm-plus)}:host{box-sizing:border-box;display:flex;flex-direction:column;font-size:var(--calcite-font-size-relative-lg)}::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm);padding-block-end:var(--calcite-internal-action-menu-padding)}.default-trigger{position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}slot[name=trigger]::slotted(calcite-action),calcite-action::slotted([slot=trigger]){position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}.menu{display:flex;max-block-size:45vh;flex-direction:column;flex-wrap:nowrap;overflow-y:auto;overflow-x:hidden;outline:2px solid transparent;outline-offset:2px;gap:var(--calcite-internal-action-menu-gap);padding:var(--calcite-internal-action-menu-padding)}:host([hidden]){display:none}[hidden]{display:none}`,O=["ArrowUp","ArrowDown","End","Home"],x=class extends I{constructor(){super(),this.guid=S(),this._actions=[],this.navigableActions=[],this.defaultSlotRef=m(),this.triggerSlotRef=m(),this.menuButtonClick=()=>{this.toggleOpen()},this.menuButtonId=p.button(this.guid),this.menuButtonKeyDown=t=>{let{key:e}=t,{activeMenuItemIndex:s,navigableActions:i,open:n}=this;if(i.length){if(w(e)){if(t.preventDefault(),!n){this.toggleOpen();return}let o=i[s];o?o.click():this.toggleOpen(!1)}if(e==="Tab"){this.open=!1;return}if(e==="Escape"){this.toggleOpen(!1),t.preventDefault();return}this.handleActionNavigation(t,e,i)}},this.menuId=p.menu(this.guid),this._open=!1,this.updateAction=(t,e)=>{let{guid:s,activeMenuItemIndex:i}=this,n=p.action(s,e);t.tabIndex=-1,t.setAttribute("role","menuitem"),t.id||(t.id=n),t.activeDescendant=e===i},this.focusSetter=B()(this),this.mouseDownHandler=t=>{t.composedPath().some(g)&&(this.activeMenuItemIndex=this.navigableActions.findIndex(e=>e===t.target))},this.activeMenuItemIndex=-1,this.appearance="solid",this.expanded=!1,this.overlayPositioning="absolute",this.placement="auto",this.topLayerDisabled=!1,this.scale="m",this.calciteActionMenuCollapse=l({cancelable:!1}),this.calciteActionMenuExpand=l({cancelable:!1}),this.calciteActionMenuOpen=l({cancelable:!1}),this.calciteInternalActionMenuActionsChange=l({cancelable:!1}),this.listen("calciteInternalActionGroupActionsChange",this.handleActionGroupActionsChange)}static{this.properties={activeMenuItemIndex:[16,{},{state:!0}],menuButtonEl:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],expanded:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],label:1,open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],actions:[32,{},{attribute:!1,readOnly:!0}]}}static{this.styles=R}get open(){return this._open}set open(t){let e=this._open;t!==e&&(this._open=t,this.openHandler(t))}get actions(){return this._actions}async setFocus(t){return this.focusSetter(()=>this.menuButtonEl,t)}connectedCallback(){super.connectedCallback(),this.connectMenuButtonEl(),this.listen("mousedown",this.mouseDownHandler)}willUpdate(t){t.has("expanded")&&(this.hasUpdated||this.expanded!==!1)&&this.expandedHandler(),t.has("activeMenuItemIndex")&&(this.hasUpdated||this.activeMenuItemIndex!==-1)&&this.updateActions(this.navigableActions),t.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteActionMenuExpand.emit():this.calciteActionMenuCollapse.emit())}disconnectedCallback(){super.disconnectedCallback(),this.disconnectMenuButtonEl()}expandedHandler(){this.open=!1,this.setTooltipReferenceElement()}openHandler(t){this.menuButtonEl&&(this.menuButtonEl.active=t,this.menuButtonEl.aria={expanded:t}),this.popoverEl&&(this.popoverEl.open=t),this.activeMenuItemIndex=this.open?0:-1,this.calciteActionMenuOpen.emit(),this.setTooltipReferenceElement()}connectMenuButtonEl(){let{menuButtonId:t,menuId:e,open:s,label:i}=this,n=this.slottedMenuButtonEl||this.defaultMenuButtonEl;this.menuButtonEl!==n&&(this.disconnectMenuButtonEl(),this.menuButtonEl=n,this.setTooltipReferenceElement(),n&&(n.active=s,n.setAttribute("aria-controls",e),n.setAttribute("aria-expanded",y(s)),n.setAttribute("aria-haspopup","true"),n.id||(n.id=t),n.label||(n.label=i),n.text||(n.text=i),n.addEventListener("click",this.menuButtonClick),n.addEventListener("keydown",this.menuButtonKeyDown)))}disconnectMenuButtonEl(){let{menuButtonEl:t}=this;t&&(t.removeEventListener("click",this.menuButtonClick),t.removeEventListener("keydown",this.menuButtonKeyDown),this.menuButtonEl=void 0)}syncActions(){let t=this.triggerSlotRef.value,e=t?r(t,"calcite-action").filter(a=>!a.classList.contains(h.defaultTrigger)):[],s=new Set(e),i=this.defaultSlotRef.value?r(this.defaultSlotRef.value).flatMap(a=>g(a)?a:v(a)?a.actions:[]):[],n=[],o=new Set;[...e,...i].forEach(a=>{o.has(a)||(o.add(a),n.push(a))}),this._actions=n,this.navigableActions=n.filter(a=>!s.has(a)&&!a.disabled&&!a.hidden),!this.open||!this.navigableActions.length?this.activeMenuItemIndex=-1:(this.activeMenuItemIndex<0||this.activeMenuItemIndex>=this.navigableActions.length)&&(this.activeMenuItemIndex=0),this.updateActions(this.navigableActions)}setMenuButtonEl(){this.slottedMenuButtonEl=this.triggerSlotRef.value?r(this.triggerSlotRef.value,"calcite-action")[0]:void 0,this.connectMenuButtonEl()}syncActionsAndEmitChange(){this.syncActions(),this.calciteInternalActionMenuActionsChange.emit()}handleTriggerSlotChange(){this.setMenuButtonEl(),this.syncActionsAndEmitChange()}setDefaultMenuButtonEl(t){this.defaultMenuButtonEl=t,this.connectMenuButtonEl()}setPopoverEl(t){t&&(this.popoverEl=t,t.open=this.open)}handleCalciteActionClick(t){this.navigableActions.some(e=>t.composedPath().includes(e))&&(this.open=!1,this.setFocus())}updateTooltip(t){let e=t.target.assignedElements({flatten:!0}).filter($);this.tooltipEl=e[0],this.setTooltipReferenceElement()}setTooltipReferenceElement(){let{tooltipEl:t,expanded:e,menuButtonEl:s,open:i}=this;t&&(t.referenceElement=!e&&!i?s:void 0)}updateActions(t){t.forEach(this.updateAction)}async handleDefaultSlotChange(){await this.componentOnReady(),this.syncActionsAndEmitChange()}handleActionGroupActionsChange(t){let e=t.target;(this.defaultSlotRef.value?r(this.defaultSlotRef.value).filter(i=>v(i)):[]).includes(e)&&this.syncActionsAndEmitChange()}isValidKey(t,e){return!!e.find(s=>s===t)}handleActionNavigation(t,e,s){if(!this.isValidKey(e,O))return;if(t.preventDefault(),!this.open){this.toggleOpen(),(e==="Home"||e==="ArrowDown")&&(this.activeMenuItemIndex=0),(e==="End"||e==="ArrowUp")&&(this.activeMenuItemIndex=s.length-1);return}e==="Home"&&(this.activeMenuItemIndex=0),e==="End"&&(this.activeMenuItemIndex=s.length-1);let i=this.activeMenuItemIndex;e==="ArrowUp"&&(this.activeMenuItemIndex=E(Math.max(i-1,-1),s.length)),e==="ArrowDown"&&(this.activeMenuItemIndex=E(i+1,s.length))}toggleOpen(t=!this.open){this.open=t}handlePopoverOpen(t){t.stopPropagation(),this.open=!0,this.setFocus()}handlePopoverClose(t){t.stopPropagation(),this.open=!1}renderMenuButton(){let{appearance:t,label:e,scale:s,expanded:i}=this;return u`<slot name=${A.trigger} @slotchange=${this.handleTriggerSlotChange} ${c(this.triggerSlotRef)}><calcite-action .appearance=${t} .aria=${{expanded:i}} class=${f(h.defaultTrigger)} .icon=${C.menu} .scale=${s} .text=${e} .textEnabled=${i} ${c(this.setDefaultMenuButtonEl)}></calcite-action></slot>`}renderMenuItems(){let{navigableActions:t,activeMenuItemIndex:e,menuId:s,menuButtonEl:i,label:n,placement:o,overlayPositioning:a,flipPlacements:D}=this,P=t[e]?.id||null;return u`<calcite-popover auto-close .flipPlacements=${D} focus-trap-disabled .label=${n} offset-distance=0 @calcitePopoverClose=${this.handlePopoverClose} @calcitePopoverOpen=${this.handlePopoverOpen} .overlayPositioning=${a} .placement=${o} pointer-disabled .referenceElement=${i} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} trigger-disabled ${c(this.setPopoverEl)}><div aria-activedescendant=${P??void 0??d} aria-labelledby=${i?.id??d} class=${f(h.menu)} id=${s??d} @click=${this.handleCalciteActionClick} role=menu tabindex=-1><slot @slotchange=${this.handleDefaultSlotChange} ${c(this.defaultSlotRef)}></slot></div></calcite-popover>`}render(){return u`${this.renderMenuButton()}${this.renderMenuItems()}<slot name=${A.tooltip} @slotchange=${this.updateTooltip}></slot>`}};M("calcite-action-menu",x);export{x as ActionMenu};
2
+ import{b as y}from"./GZZYSINJ.js";import{a as E}from"./YA3S7CBB.js";import{a as w}from"./YP3AYJH3.js";import{a as S}from"./T6CCMW7H.js";import{b as $}from"./JL43QOWW.js";import{d as v}from"./24ZPXFO2.js";import{a as h,b as p,c as A,d as C}from"./XX43OXTK.js";import{c as g}from"./77M5NVCW.js";import"./VUYX7MNO.js";import{a as B}from"./XKR5TRKJ.js";import"./ZWPNZ5XW.js";import"./IVP2TAIE.js";import"./IDINCKYS.js";import{z as r}from"./HWKBYMC2.js";import{E as m,F as c,G as I,H as f,T as M,g as b,h as u,l as d,p as l}from"./JLFMHHHY.js";var R=b`:host([scale=s]){--calcite-internal-action-menu-gap: var(--calcite-action-menu-items-space, var(--calcite-spacing-xxs));--calcite-internal-action-menu-padding: var(--calcite-spacing-xxs)}:host([scale=m]){--calcite-internal-action-menu-gap: var(--calcite-action-menu-items-space, var(--calcite-spacing-sm));--calcite-internal-action-menu-padding: var(--calcite-spacing-sm)}:host([scale=l]){--calcite-internal-action-menu-gap: var(--calcite-action-menu-items-space, var(--calcite-spacing-sm-plus));--calcite-internal-action-menu-padding: var(--calcite-spacing-sm-plus)}:host{box-sizing:border-box;display:flex;flex-direction:column;font-size:var(--calcite-font-size-relative-lg)}::slotted(calcite-action-group:not(:last-of-type)){border-block-end-width:var(--calcite-border-width-sm);padding-block-end:var(--calcite-internal-action-menu-padding)}.default-trigger{position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}slot[name=trigger]::slotted(calcite-action),calcite-action::slotted([slot=trigger]){position:relative;block-size:100%;flex:0 1 auto;align-self:stretch}.menu{display:flex;max-block-size:45vh;flex-direction:column;flex-wrap:nowrap;overflow-y:auto;overflow-x:hidden;outline:2px solid transparent;outline-offset:2px;gap:var(--calcite-internal-action-menu-gap);padding:var(--calcite-internal-action-menu-padding)}:host([hidden]){display:none}[hidden]{display:none}`,O=["ArrowUp","ArrowDown","End","Home"],x=class extends I{constructor(){super(),this.guid=S(),this._actions=[],this.navigableActions=[],this.defaultSlotRef=m(),this.triggerSlotRef=m(),this.menuButtonClick=()=>{this.toggleOpen()},this.menuButtonId=p.button(this.guid),this.menuButtonKeyDown=t=>{let{key:e}=t,{activeMenuItemIndex:s,navigableActions:i,open:n}=this;if(i.length){if(w(e)){if(t.preventDefault(),!n){this.toggleOpen();return}let o=i[s];o?o.click():this.toggleOpen(!1)}if(e==="Tab"){this.open=!1;return}if(e==="Escape"){this.toggleOpen(!1),t.preventDefault();return}this.handleActionNavigation(t,e,i)}},this.menuId=p.menu(this.guid),this._open=!1,this.updateAction=(t,e)=>{let{guid:s,activeMenuItemIndex:i}=this,n=p.action(s,e);t.tabIndex=-1,t.setAttribute("role","menuitem"),t.id||(t.id=n),t.activeDescendant=e===i},this.focusSetter=B()(this),this.mouseDownHandler=t=>{t.composedPath().some(g)&&(this.activeMenuItemIndex=this.navigableActions.findIndex(e=>e===t.target))},this.activeMenuItemIndex=-1,this.appearance="solid",this.expanded=!1,this.overlayPositioning="absolute",this.placement="auto",this.topLayerDisabled=!1,this.scale="m",this.calciteActionMenuCollapse=l({cancelable:!1}),this.calciteActionMenuExpand=l({cancelable:!1}),this.calciteActionMenuOpen=l({cancelable:!1}),this.calciteInternalActionMenuActionsChange=l({cancelable:!1}),this.listen("calciteInternalActionGroupActionsChange",this.handleActionGroupActionsChange)}static{this.properties={activeMenuItemIndex:[16,{},{state:!0}],menuButtonEl:[16,{},{state:!0}],appearance:[3,{},{reflect:!0}],expanded:[7,{},{reflect:!0,type:Boolean}],flipPlacements:[0,{},{attribute:!1}],label:1,open:[7,{},{reflect:!0,type:Boolean}],overlayPositioning:[3,{},{reflect:!0}],placement:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],actions:[32,{},{attribute:!1,readOnly:!0}]}}static{this.styles=R}get open(){return this._open}set open(t){let e=this._open;t!==e&&(this._open=t,this.openHandler(t))}get actions(){return this._actions}async setFocus(t){return this.focusSetter(()=>this.menuButtonEl,t)}connectedCallback(){super.connectedCallback(),this.connectMenuButtonEl(),this.listen("mousedown",this.mouseDownHandler)}willUpdate(t){t.has("expanded")&&(this.hasUpdated||this.expanded!==!1)&&this.expandedHandler(),t.has("activeMenuItemIndex")&&(this.hasUpdated||this.activeMenuItemIndex!==-1)&&this.updateActions(this.navigableActions),t.has("expanded")&&this.hasUpdated&&(this.expanded?this.calciteActionMenuExpand.emit():this.calciteActionMenuCollapse.emit())}disconnectedCallback(){super.disconnectedCallback(),this.disconnectMenuButtonEl()}expandedHandler(){this.open=!1,this.setTooltipReferenceElement()}openHandler(t){this.menuButtonEl&&(this.menuButtonEl.active=t,this.menuButtonEl.aria={expanded:t}),this.popoverEl&&(this.popoverEl.open=t),this.activeMenuItemIndex=this.open?0:-1,this.calciteActionMenuOpen.emit(),this.setTooltipReferenceElement()}connectMenuButtonEl(){let{menuButtonId:t,menuId:e,open:s,label:i}=this,n=this.slottedMenuButtonEl||this.defaultMenuButtonEl;this.menuButtonEl!==n&&(this.disconnectMenuButtonEl(),this.menuButtonEl=n,this.setTooltipReferenceElement(),n&&(n.active=s,n.setAttribute("aria-controls",e),n.setAttribute("aria-expanded",y(s)),n.setAttribute("aria-haspopup","true"),n.id||(n.id=t),n.label||(n.label=i),n.text||(n.text=i),n.addEventListener("click",this.menuButtonClick),n.addEventListener("keydown",this.menuButtonKeyDown)))}disconnectMenuButtonEl(){let{menuButtonEl:t}=this;t&&(t.removeEventListener("click",this.menuButtonClick),t.removeEventListener("keydown",this.menuButtonKeyDown),this.menuButtonEl=void 0)}syncActions(){let t=this.triggerSlotRef.value,e=t?r(t,"calcite-action").filter(a=>!a.classList.contains(h.defaultTrigger)):[],s=new Set(e),i=this.defaultSlotRef.value?r(this.defaultSlotRef.value).flatMap(a=>g(a)?a:v(a)?a.actions:[]):[],n=[],o=new Set;[...e,...i].forEach(a=>{o.has(a)||(o.add(a),n.push(a))}),this._actions=n,this.navigableActions=n.filter(a=>!s.has(a)&&!a.disabled&&!a.hidden),!this.open||!this.navigableActions.length?this.activeMenuItemIndex=-1:(this.activeMenuItemIndex<0||this.activeMenuItemIndex>=this.navigableActions.length)&&(this.activeMenuItemIndex=0),this.updateActions(this.navigableActions)}setMenuButtonEl(){this.slottedMenuButtonEl=this.triggerSlotRef.value?r(this.triggerSlotRef.value,"calcite-action")[0]:void 0,this.connectMenuButtonEl()}syncActionsAndEmitChange(){this.syncActions(),this.calciteInternalActionMenuActionsChange.emit()}handleTriggerSlotChange(){this.setMenuButtonEl(),this.syncActionsAndEmitChange()}setDefaultMenuButtonEl(t){this.defaultMenuButtonEl=t,this.connectMenuButtonEl()}setPopoverEl(t){t&&(this.popoverEl=t,t.open=this.open)}handleCalciteActionClick(t){this.navigableActions.some(e=>t.composedPath().includes(e))&&(this.open=!1,this.setFocus())}updateTooltip(t){let e=t.target.assignedElements({flatten:!0}).filter($);this.tooltipEl=e[0],this.setTooltipReferenceElement()}setTooltipReferenceElement(){let{tooltipEl:t,expanded:e,menuButtonEl:s,open:i}=this;t&&(t.referenceElement=!e&&!i?s:void 0)}updateActions(t){t.forEach(this.updateAction)}async handleDefaultSlotChange(){await this.componentOnReady(),this.syncActionsAndEmitChange()}handleActionGroupActionsChange(t){let e=t.target;(this.defaultSlotRef.value?r(this.defaultSlotRef.value).filter(i=>v(i)):[]).includes(e)&&this.syncActionsAndEmitChange()}isValidKey(t,e){return!!e.find(s=>s===t)}handleActionNavigation(t,e,s){if(!this.isValidKey(e,O))return;if(t.preventDefault(),!this.open){this.toggleOpen(),(e==="Home"||e==="ArrowDown")&&(this.activeMenuItemIndex=0),(e==="End"||e==="ArrowUp")&&(this.activeMenuItemIndex=s.length-1);return}e==="Home"&&(this.activeMenuItemIndex=0),e==="End"&&(this.activeMenuItemIndex=s.length-1);let i=this.activeMenuItemIndex;e==="ArrowUp"&&(this.activeMenuItemIndex=E(Math.max(i-1,-1),s.length)),e==="ArrowDown"&&(this.activeMenuItemIndex=E(i+1,s.length))}toggleOpen(t=!this.open){this.open=t}handlePopoverOpen(t){t.stopPropagation(),this.open=!0,this.setFocus()}handlePopoverClose(t){t.stopPropagation(),this.open=!1}renderMenuButton(){let{appearance:t,label:e,scale:s,expanded:i}=this;return u`<slot name=${A.trigger} @slotchange=${this.handleTriggerSlotChange} ${c(this.triggerSlotRef)}><calcite-action .appearance=${t} .aria=${{expanded:i}} class=${f(h.defaultTrigger)} .icon=${C.menu} .scale=${s} .text=${e} .textEnabled=${i} ${c(this.setDefaultMenuButtonEl)}></calcite-action></slot>`}renderMenuItems(){let{navigableActions:t,activeMenuItemIndex:e,menuId:s,menuButtonEl:i,label:n,placement:o,overlayPositioning:a,flipPlacements:D}=this,P=t[e]?.id||null;return u`<calcite-popover auto-close .flipPlacements=${D} focus-trap-disabled .label=${n} offset-distance=0 @calcitePopoverClose=${this.handlePopoverClose} @calcitePopoverOpen=${this.handlePopoverOpen} .overlayPositioning=${a} .placement=${o} pointer-disabled .referenceElement=${i} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} trigger-disabled ${c(this.setPopoverEl)}><div aria-activedescendant=${P??void 0??d} aria-labelledby=${i?.id??d} class=${f(h.menu)} id=${s??d} @click=${this.handleCalciteActionClick} role=menu tabindex=-1><slot @slotchange=${this.handleDefaultSlotChange} ${c(this.defaultSlotRef)}></slot></div></calcite-popover>`}render(){return u`${this.renderMenuButton()}${this.renderMenuItems()}<slot name=${A.tooltip} @slotchange=${this.updateTooltip}></slot>`}};M("calcite-action-menu",x);export{x as ActionMenu};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{d as t}from"./CZERUG3F.js";import{a as y}from"./JFCRLKUS.js";import{a as v}from"./UXNJ2I3X.js";import{a as k}from"./JTUBWTUR.js";import{e as w}from"./EDEBMMT6.js";import"./NA2ZTWW4.js";import{E as d,F as h,G as m,H as g,T as $,g as u,h as r,l as b,p as a}from"./4LMXYULL.js";var A={backButton:"back-button"},B={backLeft:"chevron-left",backRight:"chevron-right"},o={actionBar:"action-bar",alerts:"alerts",contentTop:"content-top",contentBottom:"content-bottom",headerTop:"header-top",headerActionsStart:"header-actions-start",headerActionsEnd:"header-actions-end",description:"description",heading:"heading",headerMenuActions:"header-menu-actions",headerContent:"header-content",fab:"fab",footer:"footer",footerEnd:"footer-end",footerStart:"footer-start"},D=u`: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([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:none;inline-size:100%;flex:1 1 auto;overflow:hidden}:host([selected]){display:flex}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}calcite-panel{--calcite-panel-background-color: var(--calcite-flow-background-color);--calcite-panel-border-color: var(--calcite-flow-border-color, var(--calcite-flow-item-header-border-block-end));--calcite-panel-corner-radius: var(--calcite-flow-corner-radius);--calcite-panel-description-text-color: var(--calcite-flow-description-text-color);--calcite-panel-footer-background-color: var(--calcite-flow-footer-background-color);--calcite-panel-footer-space: var(--calcite-flow-footer-space, var(--calcite-flow-item-footer-padding));--calcite-panel-header-action-background-color-hover: var(--calcite-flow-header-action-background-color-hover);--calcite-panel-header-action-background-color-press: var(--calcite-flow-header-action-background-color-press);--calcite-panel-header-action-background-color: var(--calcite-flow-header-action-background-color);--calcite-panel-header-action-indicator-color: var(--calcite-flow-header-action-indicator-color);--calcite-panel-header-action-text-color-press: var(--calcite-flow-header-action-text-color-press);--calcite-panel-header-action-text-color: var(--calcite-flow-header-action-text-color);--calcite-panel-header-background-color: var(--calcite-flow-header-background-color);--calcite-panel-header-content-space: var(--calcite-flow-header-content-space);--calcite-panel-header-top-space: var(--calcite-flow-header-top-space);--calcite-panel-heading-text-color: var(--calcite-flow-heading-text-color);--calcite-panel-icon-color: var(--calcite-flow-icon-color);--calcite-panel-space: var(--calcite-flow-space);--calcite-panel-content-top-space: var(--calcite-flow-content-top-space);--calcite-panel-content-bottom-space: var(--calcite-flow-content-bottom-space)}:host([hidden]){display:none}[hidden]{display:none}`,p=class extends m{constructor(){super(...arguments),this.backButtonRef=d(),this.containerRef=d(),this.direction=w(),this.messages=k(),this.interactiveContainer=y(this),this.closable=!1,this.closed=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.focusTrapEnabled=!1,this.menuOpen=!1,this.overlayPositioning="absolute",this.scale="m",this.selected=!1,this.showBackButton=!1,this.topLayerDisabled=!1,this.calciteFlowItemBack=a(),this.calciteFlowItemClose=a({cancelable:!1}),this.calciteFlowItemCollapse=a({cancelable:!1}),this.calciteFlowItemExpand=a({cancelable:!1}),this.calciteFlowItemScroll=a({cancelable:!1}),this.calciteFlowItemToggle=a({cancelable:!1}),this.calciteInternalFlowItemChange=a({cancelable:!1})}static{this.properties={beforeBack:[0,{},{attribute:!1}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],focusTrapEnabled:[7,{},{reflect:!0,type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],showBackButton:[5,{},{type:Boolean}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=D}async scrollContentTo(e){await this.containerRef.value?.scrollContentTo(e)}async setFocus(e){return this.containerRef.value?.setFocus(e)}async updateFocusTrapElements(e){this.containerRef.value?.updateFocusTrapElements(e)}willUpdate(e){e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.calciteInternalFlowItemChange.emit(),e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calciteFlowItemCollapse.emit():this.calciteFlowItemExpand.emit())}handleInternalPanelScroll(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.calciteFlowItemScroll.emit())}handleInternalPanelClose(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.closed=!0,this.calciteFlowItemClose.emit())}handleInternalPanelToggle(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.collapsed=e.target.collapsed,this.calciteFlowItemToggle.emit())}backButtonClick(){this.calciteFlowItemBack.emit()}renderBackButton(){let e=this.direction==="rtl",{showBackButton:c,backButtonClick:s,messages:i}=this,l=i.back,n=e?B.backRight:B.backLeft;return c?v("flow-back-button",r`<calcite-action class=${g(A.backButton)} .icon=${n} @click=${s} .scale=${this.scale} slot=${o.headerActionsStart} .text=${l} title=${l??b} ${h(this.backButtonRef)}></calcite-action>`):null}render(){let{collapsed:e,collapseDirection:c,collapsible:s,closable:i,closed:l,description:n,disabled:f,heading:T,headingLevel:C,loading:I,menuOpen:F,messageOverrides:x,overlayPositioning:S,beforeClose:E,icon:R,iconFlipRtl:P,focusTrapEnabled:O,focusTrapOptions:L}=this;return this.interactiveContainer({disabled:f,children:r`<calcite-panel .beforeClose=${E} .closable=${i} .closed=${l} .collapsed=${e} .collapseDirection=${c} .collapsible=${s} .description=${n} .disabled=${f} .focusTrapEnabled=${O} .focusTrapOptions=${L} .heading=${T} .headingLevel=${C} .icon=${R} .iconFlipRtl=${P} .loading=${I} .menuOpen=${F} .messageOverrides=${x} @calcitePanelClose=${this.handleInternalPanelClose} @calcitePanelScroll=${this.handleInternalPanelScroll} @calcitePanelToggle=${this.handleInternalPanelToggle} .overlayPositioning=${S} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} ${h(this.containerRef)}>${this.renderBackButton()}<slot name=${o.actionBar} slot=${t.actionBar}></slot><slot name=${o.alerts} slot=${t.alerts}></slot><slot name=${o.headerActionsStart} slot=${t.headerActionsStart}></slot><slot name=${o.headerActionsEnd} slot=${t.headerActionsEnd}></slot><slot name=${o.headerTop} slot=${t.headerTop}></slot><slot name=${o.description} slot=${t.description}></slot><slot name=${o.heading} slot=${t.heading}></slot><slot name=${o.headerContent} slot=${t.headerContent}></slot><slot name=${o.headerMenuActions} slot=${t.headerMenuActions}></slot><slot name=${o.fab} slot=${t.fab}></slot><slot name=${o.contentTop} slot=${t.contentTop}></slot><slot name=${o.contentBottom} slot=${t.contentBottom}></slot><slot name=${o.footerStart} slot=${t.footerStart}></slot><slot name=${o.footer} slot=${t.footer}></slot><slot name=${o.footerEnd} slot=${t.footerEnd}></slot><slot></slot></calcite-panel>`})}};$("calcite-flow-item",p);export{p as FlowItem};
2
+ import{d as t}from"./CZERUG3F.js";import{a as y}from"./PKGGSZ3G.js";import{a as v}from"./MB26RZ7I.js";import{a as k}from"./4VSUDBBT.js";import{e as w}from"./IVP2TAIE.js";import"./IDINCKYS.js";import{E as d,F as h,G as m,H as g,T as $,g as u,h as r,l as b,p as a}from"./JLFMHHHY.js";var A={backButton:"back-button"},B={backLeft:"chevron-left",backRight:"chevron-right"},o={actionBar:"action-bar",alerts:"alerts",contentTop:"content-top",contentBottom:"content-bottom",headerTop:"header-top",headerActionsStart:"header-actions-start",headerActionsEnd:"header-actions-end",description:"description",heading:"heading",headerMenuActions:"header-menu-actions",headerContent:"header-content",fab:"fab",footer:"footer",footerEnd:"footer-end",footerStart:"footer-start"},D=u`: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([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:none;inline-size:100%;flex:1 1 auto;overflow:hidden}:host([selected]){display:flex}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}calcite-panel{--calcite-panel-background-color: var(--calcite-flow-background-color);--calcite-panel-border-color: var(--calcite-flow-border-color, var(--calcite-flow-item-header-border-block-end));--calcite-panel-corner-radius: var(--calcite-flow-corner-radius);--calcite-panel-description-text-color: var(--calcite-flow-description-text-color);--calcite-panel-footer-background-color: var(--calcite-flow-footer-background-color);--calcite-panel-footer-space: var(--calcite-flow-footer-space, var(--calcite-flow-item-footer-padding));--calcite-panel-header-action-background-color-hover: var(--calcite-flow-header-action-background-color-hover);--calcite-panel-header-action-background-color-press: var(--calcite-flow-header-action-background-color-press);--calcite-panel-header-action-background-color: var(--calcite-flow-header-action-background-color);--calcite-panel-header-action-indicator-color: var(--calcite-flow-header-action-indicator-color);--calcite-panel-header-action-text-color-press: var(--calcite-flow-header-action-text-color-press);--calcite-panel-header-action-text-color: var(--calcite-flow-header-action-text-color);--calcite-panel-header-background-color: var(--calcite-flow-header-background-color);--calcite-panel-header-content-space: var(--calcite-flow-header-content-space);--calcite-panel-header-top-space: var(--calcite-flow-header-top-space);--calcite-panel-heading-text-color: var(--calcite-flow-heading-text-color);--calcite-panel-icon-color: var(--calcite-flow-icon-color);--calcite-panel-space: var(--calcite-flow-space);--calcite-panel-content-top-space: var(--calcite-flow-content-top-space);--calcite-panel-content-bottom-space: var(--calcite-flow-content-bottom-space)}:host([hidden]){display:none}[hidden]{display:none}`,p=class extends m{constructor(){super(...arguments),this.backButtonRef=d(),this.containerRef=d(),this.direction=w(),this.messages=k(),this.interactiveContainer=y(this),this.closable=!1,this.closed=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.focusTrapEnabled=!1,this.menuOpen=!1,this.overlayPositioning="absolute",this.scale="m",this.selected=!1,this.showBackButton=!1,this.topLayerDisabled=!1,this.calciteFlowItemBack=a(),this.calciteFlowItemClose=a({cancelable:!1}),this.calciteFlowItemCollapse=a({cancelable:!1}),this.calciteFlowItemExpand=a({cancelable:!1}),this.calciteFlowItemScroll=a({cancelable:!1}),this.calciteFlowItemToggle=a({cancelable:!1}),this.calciteInternalFlowItemChange=a({cancelable:!1})}static{this.properties={beforeBack:[0,{},{attribute:!1}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],focusTrapEnabled:[7,{},{reflect:!0,type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],showBackButton:[5,{},{type:Boolean}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=D}async scrollContentTo(e){await this.containerRef.value?.scrollContentTo(e)}async setFocus(e){return this.containerRef.value?.setFocus(e)}async updateFocusTrapElements(e){this.containerRef.value?.updateFocusTrapElements(e)}willUpdate(e){e.has("selected")&&(this.hasUpdated||this.selected!==!1)&&this.calciteInternalFlowItemChange.emit(),e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calciteFlowItemCollapse.emit():this.calciteFlowItemExpand.emit())}handleInternalPanelScroll(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.calciteFlowItemScroll.emit())}handleInternalPanelClose(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.closed=!0,this.calciteFlowItemClose.emit())}handleInternalPanelToggle(e){e.target===this.containerRef.value&&(e.stopPropagation(),this.collapsed=e.target.collapsed,this.calciteFlowItemToggle.emit())}backButtonClick(){this.calciteFlowItemBack.emit()}renderBackButton(){let e=this.direction==="rtl",{showBackButton:c,backButtonClick:s,messages:i}=this,l=i.back,n=e?B.backRight:B.backLeft;return c?v("flow-back-button",r`<calcite-action class=${g(A.backButton)} .icon=${n} @click=${s} .scale=${this.scale} slot=${o.headerActionsStart} .text=${l} title=${l??b} ${h(this.backButtonRef)}></calcite-action>`):null}render(){let{collapsed:e,collapseDirection:c,collapsible:s,closable:i,closed:l,description:n,disabled:f,heading:T,headingLevel:C,loading:I,menuOpen:F,messageOverrides:x,overlayPositioning:S,beforeClose:E,icon:R,iconFlipRtl:P,focusTrapEnabled:O,focusTrapOptions:L}=this;return this.interactiveContainer({disabled:f,children:r`<calcite-panel .beforeClose=${E} .closable=${i} .closed=${l} .collapsed=${e} .collapseDirection=${c} .collapsible=${s} .description=${n} .disabled=${f} .focusTrapEnabled=${O} .focusTrapOptions=${L} .heading=${T} .headingLevel=${C} .icon=${R} .iconFlipRtl=${P} .loading=${I} .menuOpen=${F} .messageOverrides=${x} @calcitePanelClose=${this.handleInternalPanelClose} @calcitePanelScroll=${this.handleInternalPanelScroll} @calcitePanelToggle=${this.handleInternalPanelToggle} .overlayPositioning=${S} .scale=${this.scale} .topLayerDisabled=${this.topLayerDisabled} ${h(this.containerRef)}>${this.renderBackButton()}<slot name=${o.actionBar} slot=${t.actionBar}></slot><slot name=${o.alerts} slot=${t.alerts}></slot><slot name=${o.headerActionsStart} slot=${t.headerActionsStart}></slot><slot name=${o.headerActionsEnd} slot=${t.headerActionsEnd}></slot><slot name=${o.headerTop} slot=${t.headerTop}></slot><slot name=${o.description} slot=${t.description}></slot><slot name=${o.heading} slot=${t.heading}></slot><slot name=${o.headerContent} slot=${t.headerContent}></slot><slot name=${o.headerMenuActions} slot=${t.headerMenuActions}></slot><slot name=${o.fab} slot=${t.fab}></slot><slot name=${o.contentTop} slot=${t.contentTop}></slot><slot name=${o.contentBottom} slot=${t.contentBottom}></slot><slot name=${o.footerStart} slot=${t.footerStart}></slot><slot name=${o.footer} slot=${t.footer}></slot><slot name=${o.footerEnd} slot=${t.footerEnd}></slot><slot></slot></calcite-panel>`})}};$("calcite-flow-item",p);export{p as FlowItem};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{F as r,H as a,h as c,l as t}from"./4LMXYULL.js";var m={container:"clear-button--container"},f=()=>{},x=({ariaLabel:i,ref:e,disabled:n,focusable:l,onClick:s,scale:$,title:o})=>c`<div class=${a(m.container)} .inert=${n} ${r(e||f)}><calcite-action .disabled=${n} icon=x .label=${i??""} @click=${s} .scale=${$} tabindex=${(l?void 0:-1)??t} .text=${o} title=${o??t}></calcite-action></div>`;export{x as a};
2
+ import{F as r,H as a,h as c,l as t}from"./JLFMHHHY.js";var m={container:"clear-button--container"},f=()=>{},x=({ariaLabel:i,ref:e,disabled:n,focusable:l,onClick:s,scale:$,title:o})=>c`<div class=${a(m.container)} .inert=${n} ${r(e||f)}><calcite-action .disabled=${n} icon=x .label=${i??""} @click=${s} .scale=${$} tabindex=${(l?void 0:-1)??t} .text=${o} title=${o??t}></calcite-action></div>`;export{x as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{p as m,w as x}from"./5QN2KNKV.js";import"./27YYIR6K.js";import"./5EBGPCB7.js";import{h as k}from"./AM5HDLAS.js";import{G as g,H as c,I as p,J as h,T as v,g as b,h as o}from"./4LMXYULL.js";var u={thumbnail:"thumbnail",background:"background",initials:"initials",icon:"icon"};function z(a){a=$(a);let e=0;for(let i=0;i<a.length;i++)e=a.charCodeAt(i)+((e<<5)-e);let t="#";for(let i=0;i<3;i++){let r=e>>i*8&255;t+=("00"+r.toString(16)).substr(-2)}return t}function $(a){let e=Math.floor(a.length/2),t=a.split("").reverse().join("");return t.substring(e)+t.slice(0,e)}function y(a){let{r:e,g:t,b:i}=a;e/=255,t/=255,i/=255;let r=Math.max(e,t,i),l=Math.min(e,t,i),s=r-l;if(r===l)return 0;let n=(r+l)/2;switch(r){case e:n=(t-i)/s+(t<i?6:0);break;case t:n=(i-e)/s+2;break;case i:n=(e-t)/s+4;break}return Math.round(n*60)}function C(a){return y(x(a))}var T=b`:host{display:inline-block;overflow:hidden;border-radius:var(--calcite-avatar-corner-radius, 50%);color:var(--calcite-avatar-color, var(--calcite-color-text-2))}:host([scale=s]){block-size:1.5rem;inline-size:1.5rem;font-size:var(--calcite-font-size-relative-xs)}:host([scale=m]){block-size:2rem;inline-size:2rem;font-size:var(--calcite-font-size-relative-sm)}:host([scale=l]){block-size:2.75rem;inline-size:2.75rem;font-size:var(--calcite-font-size-relative-md)}.icon{display:flex}.background{display:flex;block-size:100%;inline-size:100%;align-items:center;justify-content:center;border-radius:var(--calcite-avatar-corner-radius, 50%)}.initials{font-weight:var(--calcite-font-weight-bold);text-transform:uppercase}.thumbnail{block-size:100%;inline-size:100%;border-radius:var(--calcite-avatar-corner-radius, 50%)}:host([hidden]){display:none}[hidden]{display:none}`,d=class extends g{constructor(){super(...arguments),this.thumbnailFailedToLoad=!1,this.scale="m"}static{this.properties={thumbnailFailedToLoad:[16,{},{state:!0}],fullName:[3,{},{reflect:!0}],label:1,scale:[3,{},{reflect:!0}],thumbnail:[3,{},{reflect:!0}],userId:[3,{},{reflect:!0}],username:[3,{},{reflect:!0}]}}static{this.styles=T}determineContent(){if(this.thumbnail&&!this.thumbnailFailedToLoad)return o`<img alt=${(this.label||"")??h} class=${c(u.thumbnail)} @error=${()=>this.thumbnailFailedToLoad=!0} src=${this.thumbnail??h}>`;let e=this.generateInitials(),t=this.generateFillColor();return o`<span .ariaLabel=${this.label||this.fullName} class=${c(u.background)} role=figure style=${p({backgroundColor:t})}>${e?o`<span aria-hidden=true class=${c(u.initials)}>${e}</span>`:o`<calcite-icon class=${c(u.icon)} icon=user .scale=${this.scale}></calcite-icon>`}</span>`}generateFillColor(){let{userId:e,username:t,fullName:i,el:r}=this,l=k(r),s=e&&`#${e.substr(e.length-6)}`,n=t||i||"",f=s&&m(s)?s:z(n);return!e&&!n||!m(f)?"var(--calcite-avatar-background-color, var(--calcite-color-foreground-2))":`var(--calcite-avatar-background-color, hsl(${C(f)}, 60%, ${l==="dark"?20:90}%))`}generateInitials(){let{fullName:e,username:t}=this;return e?e.trim().split(" ").map(i=>i.substring(0,1)).join(""):t?t.substring(0,2):!1}render(){return this.determineContent()}};v("calcite-avatar",d);export{d as Avatar};
2
+ import{p as m,w as x}from"./5QN2KNKV.js";import"./27YYIR6K.js";import"./5EBGPCB7.js";import{h as k}from"./HWKBYMC2.js";import{G as g,H as c,I as p,J as h,T as v,g as b,h as o}from"./JLFMHHHY.js";var u={thumbnail:"thumbnail",background:"background",initials:"initials",icon:"icon"};function z(a){a=$(a);let e=0;for(let i=0;i<a.length;i++)e=a.charCodeAt(i)+((e<<5)-e);let t="#";for(let i=0;i<3;i++){let r=e>>i*8&255;t+=("00"+r.toString(16)).substr(-2)}return t}function $(a){let e=Math.floor(a.length/2),t=a.split("").reverse().join("");return t.substring(e)+t.slice(0,e)}function y(a){let{r:e,g:t,b:i}=a;e/=255,t/=255,i/=255;let r=Math.max(e,t,i),l=Math.min(e,t,i),s=r-l;if(r===l)return 0;let n=(r+l)/2;switch(r){case e:n=(t-i)/s+(t<i?6:0);break;case t:n=(i-e)/s+2;break;case i:n=(e-t)/s+4;break}return Math.round(n*60)}function C(a){return y(x(a))}var T=b`:host{display:inline-block;overflow:hidden;border-radius:var(--calcite-avatar-corner-radius, 50%);color:var(--calcite-avatar-color, var(--calcite-color-text-2))}:host([scale=s]){block-size:1.5rem;inline-size:1.5rem;font-size:var(--calcite-font-size-relative-xs)}:host([scale=m]){block-size:2rem;inline-size:2rem;font-size:var(--calcite-font-size-relative-sm)}:host([scale=l]){block-size:2.75rem;inline-size:2.75rem;font-size:var(--calcite-font-size-relative-md)}.icon{display:flex}.background{display:flex;block-size:100%;inline-size:100%;align-items:center;justify-content:center;border-radius:var(--calcite-avatar-corner-radius, 50%)}.initials{font-weight:var(--calcite-font-weight-bold);text-transform:uppercase}.thumbnail{block-size:100%;inline-size:100%;border-radius:var(--calcite-avatar-corner-radius, 50%)}:host([hidden]){display:none}[hidden]{display:none}`,d=class extends g{constructor(){super(...arguments),this.thumbnailFailedToLoad=!1,this.scale="m"}static{this.properties={thumbnailFailedToLoad:[16,{},{state:!0}],fullName:[3,{},{reflect:!0}],label:1,scale:[3,{},{reflect:!0}],thumbnail:[3,{},{reflect:!0}],userId:[3,{},{reflect:!0}],username:[3,{},{reflect:!0}]}}static{this.styles=T}determineContent(){if(this.thumbnail&&!this.thumbnailFailedToLoad)return o`<img alt=${(this.label||"")??h} class=${c(u.thumbnail)} @error=${()=>this.thumbnailFailedToLoad=!0} src=${this.thumbnail??h}>`;let e=this.generateInitials(),t=this.generateFillColor();return o`<span .ariaLabel=${this.label||this.fullName} class=${c(u.background)} role=figure style=${p({backgroundColor:t})}>${e?o`<span aria-hidden=true class=${c(u.initials)}>${e}</span>`:o`<calcite-icon class=${c(u.icon)} icon=user .scale=${this.scale}></calcite-icon>`}</span>`}generateFillColor(){let{userId:e,username:t,fullName:i,el:r}=this,l=k(r),s=e&&`#${e.substr(e.length-6)}`,n=t||i||"",f=s&&m(s)?s:z(n);return!e&&!n||!m(f)?"var(--calcite-avatar-background-color, var(--calcite-color-foreground-2))":`var(--calcite-avatar-background-color, hsl(${C(f)}, 60%, ${l==="dark"?20:90}%))`}generateInitials(){let{fullName:e,username:t}=this;return e?e.trim().split(" ").map(i=>i.substring(0,1)).join(""):t?t.substring(0,2):!1}render(){return this.determineContent()}};v("calcite-avatar",d);export{d as Avatar};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as i}from"./VOCKM3G2.js";import"./PM5LDKID.js";import{a as v}from"./JFCRLKUS.js";import{a as g}from"./EPE7MG62.js";import{a as m}from"./5EBGPCB7.js";import{a as b}from"./JTUBWTUR.js";import{a as f}from"./6WLVT7DS.js";import"./ZWPNZ5XW.js";import"./EDEBMMT6.js";import"./NA2ZTWW4.js";import"./AM5HDLAS.js";import{E as o,F as n,G as d,H as u,N as h,T as p,g as s,h as c,p as r}from"./4LMXYULL.js";var y={container:"container"},x={search:"search"},k=s`: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([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;inline-size:100%}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{display:flex;inline-size:100%}:host([scale=s]) .container{padding:var(--calcite-filter-content-space, var(--calcite-spacing-sm))}:host([scale=m]) .container{padding:var(--calcite-filter-content-space, var(--calcite-spacing-md))}:host([scale=l]) .container{padding:var(--calcite-filter-content-space, var(--calcite-spacing-lg))}label{position:relative;margin-block:0px;display:flex;inline-size:100%;align-items:center;overflow:hidden}calcite-input{inline-size:100%;--calcite-input-background-color: var(--calcite-filter-input-background-color);--calcite-input-border-color: var(--calcite-filter-input-border-color);--calcite-input-corner-radius: var(--calcite-filter-input-corner-radius);--calcite-input-shadow: var(--calcite-filter-input-shadow);--calcite-input-icon-color: var(--calcite-filter-input-icon-color);--calcite-input-text-color: var(--calcite-filter-input-text-color);--calcite-input-placeholder-text-color: var(--calcite-filter-input-placeholder-text-color);--calcite-input-actions-background-color: var(--calcite-filter-input-actions-background-color);--calcite-input-actions-background-color-hover: var(--calcite-filter-input-actions-background-color-hover);--calcite-input-actions-background-color-press: var(--calcite-filter-input-actions-background-color-press);--calcite-input-actions-icon-color: var(--calcite-filter-input-actions-icon-color);--calcite-input-actions-icon-color-hover: var(--calcite-filter-input-actions-icon-color-hover);--calcite-input-actions-icon-color-press: var(--calcite-filter-input-actions-icon-color-press)}:host([hidden]){display:none}[hidden]{display:none}`,l=class extends d{constructor(){super(...arguments),this.cancelable=g()(this),this.filterDebounced=m((e,t=!1,a)=>this.updateFiltered(i(this.items??[],e,this.filterProps),t,a),h.filter),this.textInputRef=o(),this._value="",this.messages=b(),this.focusSetter=f()(this),this.interactiveContainer=v(this),this.disabled=!1,this.filteredItems=[],this.items=[],this.scale="m",this.calciteFilterChange=r({cancelable:!1})}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],filterProps:[0,{},{attribute:!1}],filteredItems:[0,{},{attribute:!1}],items:[0,{},{attribute:!1}],label:1,messageOverrides:[0,{},{attribute:!1}],placeholder:1,scale:[3,{},{reflect:!0}],value:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=k}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueHandler(e))}async filter(e=this.value){return new Promise(t=>{this.value=e,this.updateFiltered(i(this.items??[],e,this.filterProps),!1,t)})}async setFocus(e){return this.focusSetter(()=>this.textInputRef.value,e)}connectedCallback(){super.connectedCallback(),this.cancelable.add(this.filterDebounced)}async load(){this.updateFiltered(i(this.items??[],this.value,this.filterProps))}willUpdate(e){(e.has("items")&&(this.hasUpdated||this.items?.length>0)||e.has("filterProps"))&&this.filterDebounced(this.value)}valueHandler(e){this.filterDebounced(e)}inputHandler(e){let t=e.target;this.value=t.value,this.filterDebounced(t.value,!0)}keyDownHandler(e){e.defaultPrevented||(e.key==="Escape"&&this.value.length>0&&(this.clear(),e.preventDefault()),e.key==="Enter"&&e.preventDefault())}clear(){this.value="",this.filterDebounced("",!0),this.setFocus()}updateFiltered(e,t=!1,a){this.filteredItems=e,t&&this.calciteFilterChange.emit(),a?.()}render(){let{disabled:e,scale:t}=this;return this.interactiveContainer({disabled:e,children:c`<div class=${u(y.container)}><label><calcite-input clearable .disabled=${e} .icon=${x.search} .label=${this.label??this.messages.label} .messageOverrides=${{clear:this.messages.clear}} @calciteInputInput=${this.inputHandler} @keydown=${this.keyDownHandler} .placeholder=${this.placeholder} .scale=${t} type=text .value=${this.value} ${n(this.textInputRef)}></calcite-input></label></div>`})}};p("calcite-filter",l);export{l as Filter};
2
+ import{a as i}from"./VOCKM3G2.js";import"./PM5LDKID.js";import{a as v}from"./PKGGSZ3G.js";import{a as g}from"./HWCLLSHA.js";import{a as m}from"./5EBGPCB7.js";import{a as b}from"./4VSUDBBT.js";import{a as f}from"./XKR5TRKJ.js";import"./ZWPNZ5XW.js";import"./IVP2TAIE.js";import"./IDINCKYS.js";import"./HWKBYMC2.js";import{E as o,F as n,G as d,H as u,N as h,T as p,g as s,h as c,p as r}from"./JLFMHHHY.js";var y={container:"container"},x={search:"search"},k=s`: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([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;inline-size:100%}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.container{display:flex;inline-size:100%}:host([scale=s]) .container{padding:var(--calcite-filter-content-space, var(--calcite-spacing-sm))}:host([scale=m]) .container{padding:var(--calcite-filter-content-space, var(--calcite-spacing-md))}:host([scale=l]) .container{padding:var(--calcite-filter-content-space, var(--calcite-spacing-lg))}label{position:relative;margin-block:0px;display:flex;inline-size:100%;align-items:center;overflow:hidden}calcite-input{inline-size:100%;--calcite-input-background-color: var(--calcite-filter-input-background-color);--calcite-input-border-color: var(--calcite-filter-input-border-color);--calcite-input-corner-radius: var(--calcite-filter-input-corner-radius);--calcite-input-shadow: var(--calcite-filter-input-shadow);--calcite-input-icon-color: var(--calcite-filter-input-icon-color);--calcite-input-text-color: var(--calcite-filter-input-text-color);--calcite-input-placeholder-text-color: var(--calcite-filter-input-placeholder-text-color);--calcite-input-actions-background-color: var(--calcite-filter-input-actions-background-color);--calcite-input-actions-background-color-hover: var(--calcite-filter-input-actions-background-color-hover);--calcite-input-actions-background-color-press: var(--calcite-filter-input-actions-background-color-press);--calcite-input-actions-icon-color: var(--calcite-filter-input-actions-icon-color);--calcite-input-actions-icon-color-hover: var(--calcite-filter-input-actions-icon-color-hover);--calcite-input-actions-icon-color-press: var(--calcite-filter-input-actions-icon-color-press)}:host([hidden]){display:none}[hidden]{display:none}`,l=class extends d{constructor(){super(...arguments),this.cancelable=g()(this),this.filterDebounced=m((e,t=!1,a)=>this.updateFiltered(i(this.items??[],e,this.filterProps),t,a),h.filter),this.textInputRef=o(),this._value="",this.messages=b(),this.focusSetter=f()(this),this.interactiveContainer=v(this),this.disabled=!1,this.filteredItems=[],this.items=[],this.scale="m",this.calciteFilterChange=r({cancelable:!1})}static{this.properties={disabled:[7,{},{reflect:!0,type:Boolean}],filterProps:[0,{},{attribute:!1}],filteredItems:[0,{},{attribute:!1}],items:[0,{},{attribute:!1}],label:1,messageOverrides:[0,{},{attribute:!1}],placeholder:1,scale:[3,{},{reflect:!0}],value:1}}static{this.shadowRootOptions={mode:"open",delegatesFocus:!0}}static{this.styles=k}get value(){return this._value}set value(e){let t=this._value;e!==t&&(this._value=e,this.valueHandler(e))}async filter(e=this.value){return new Promise(t=>{this.value=e,this.updateFiltered(i(this.items??[],e,this.filterProps),!1,t)})}async setFocus(e){return this.focusSetter(()=>this.textInputRef.value,e)}connectedCallback(){super.connectedCallback(),this.cancelable.add(this.filterDebounced)}async load(){this.updateFiltered(i(this.items??[],this.value,this.filterProps))}willUpdate(e){(e.has("items")&&(this.hasUpdated||this.items?.length>0)||e.has("filterProps"))&&this.filterDebounced(this.value)}valueHandler(e){this.filterDebounced(e)}inputHandler(e){let t=e.target;this.value=t.value,this.filterDebounced(t.value,!0)}keyDownHandler(e){e.defaultPrevented||(e.key==="Escape"&&this.value.length>0&&(this.clear(),e.preventDefault()),e.key==="Enter"&&e.preventDefault())}clear(){this.value="",this.filterDebounced("",!0),this.setFocus()}updateFiltered(e,t=!1,a){this.filteredItems=e,t&&this.calciteFilterChange.emit(),a?.()}render(){let{disabled:e,scale:t}=this;return this.interactiveContainer({disabled:e,children:c`<div class=${u(y.container)}><label><calcite-input clearable .disabled=${e} .icon=${x.search} .label=${this.label??this.messages.label} .messageOverrides=${{clear:this.messages.clear}} @calciteInputInput=${this.inputHandler} @keydown=${this.keyDownHandler} .placeholder=${this.placeholder} .scale=${t} type=text .value=${this.value} ${n(this.textInputRef)}></calcite-input></label></div>`})}};p("calcite-filter",l);export{l as Filter};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as t,b as A,c as x,d as l}from"./CZERUG3F.js";import{a as G}from"./JTM6YJCI.js";import{a as V}from"./R3SQDQXX.js";import{b as U}from"./ERCYS72F.js";import{a as I}from"./QVCA4Q3A.js";import"./XI4PD2C6.js";import{a as j}from"./JFCRLKUS.js";import{a as m}from"./UXNJ2I3X.js";import{c as K}from"./SZUPQ4CX.js";import"./5EBGPCB7.js";import{a as N,b as O}from"./VI7SBYXT.js";import{a as M}from"./JTUBWTUR.js";import{c as _}from"./XX43OXTK.js";import"./VUYX7MNO.js";import{a as L}from"./6WLVT7DS.js";import{a as R}from"./ZWPNZ5XW.js";import"./EDEBMMT6.js";import"./NA2ZTWW4.js";import{v as T,w as k,x as h,y as H}from"./AM5HDLAS.js";import{E as B,F as E,G as D,H as o,T as P,g as F,h as n,l as y,p as $}from"./4LMXYULL.js";var W=F`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;overflow:hidden;border-radius:var(--calcite-panel-corner-radius, var(--calcite-corner-radius-sharp))}slot[name=alerts]::slotted(calcite-alert){block-size:0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-panel-default-space: var(--calcite-spacing-sm);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-sm-plus)}:host([scale=s]) .header-content .heading{font-size:var(--calcite-font-size--1)}:host([scale=s]) .header-content .description{font-size:var(--calcite-font-size--2)}:host([scale=s]) .header-content .icon{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-panel-default-space: var(--calcite-spacing-md);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-md-plus)}:host([scale=m]) .header-content .heading{font-size:var(--calcite-font-size-0)}:host([scale=m]) .header-content .description{font-size:var(--calcite-font-size--1)}:host([scale=m]) .header-content .icon{margin-inline-end:var(--calcite-spacing-md)}:host(:is([scale=s],[scale=m])){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xs);--calcite-internal-panel-default-space: var(--calcite-spacing-lg);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-xl)}:host([scale=l]) .header-content .heading{font-size:var(--calcite-font-size-1)}:host([scale=l]) .header-content .description{font-size:var(--calcite-font-size-0)}:host([scale=l]) .header-content .icon{margin-inline-end:var(--calcite-spacing-lg)}.content-top,.content-bottom{display:flex;align-items:flex-start;align-self:stretch;border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));background-color:var(--calcite-panel-background-color, var(--calcite-color-foreground-1))}.content-top{padding:var(--calcite-panel-content-top-space, var(--calcite-internal-panel-default-space))}.content-bottom{padding:var(--calcite-panel-content-bottom-space, var(--calcite-internal-panel-default-space))}.container{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;overflow:hidden;background-color:var(--calcite-color-background);padding:0;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-color-text-2);transition:max-block-size var(--calcite-animation-timing),inline-size var(--calcite-animation-timing);box-sizing:border-box;font-size:var(--calcite-font-size--1)}.container *{box-sizing:border-box}.header{z-index:var(--calcite-z-index-header);display:flex;flex-direction:column;background-color:var(--calcite-panel-header-background-color, var(--calcite-color-foreground-1));border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-panel-header-border-block-end, var(--calcite-color-border-3)))}.header--no-row{border-block-end:0}.content-top--no-border{border-block-start:0}.header-container{display:flex;inline-size:100%;flex-direction:row;align-items:stretch;justify-content:flex-start;flex:0 0 auto}.header-container--border-end{border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3))}.header-top{inline-size:100%;border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-header-top-space, var(--calcite-internal-panel-default-space))}.action-bar-container{inline-size:100%}.action-bar-container ::slotted(calcite-action-bar){inline-size:100%}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:.75rem;padding-block:.875rem;margin-inline-end:auto;justify-content:center}.header-content .heading-text-content{flex:1 1 auto;overflow:hidden}.header-content .heading,.header-content .description{display:block;flex:none;overflow-wrap:break-word;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.header-content .heading{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-panel-heading-text-color, var(--calcite-color-text-1))}.header-content .heading:only-child{margin-block-end:0px}.header-content .description{color:var(--calcite-panel-description-text-color, var(--calcite-color-text-2))}#close,#collapse,calcite-action-menu{--calcite-action-background-color: var(--calcite-panel-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-panel-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-panel-header-action-background-color-press);--calcite-action-text-color: var(--calcite-panel-header-action-text-color);--calcite-action-text-color-press: var(--calcite-panel-header-action-text-color-press)}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;margin:auto;gap:var(--calcite-internal-panel-action-spacing)}.header-actions--start{margin-inline-start:var(--calcite-internal-panel-action-spacing)}.header-actions--end{margin-inline-end:var(--calcite-internal-panel-action-spacing)}.content-wrapper{position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;overflow:auto;color:var(--calcite-color-text-2);outline-color:transparent;padding:var(--calcite-panel-space, var(--calcite-panel-content-space, 0));background:var(--calcite-panel-background-color, var(--calcite-color-background))}.content-wrapper:focus-visible{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.header-content{flex:1 1 auto;justify-content:center;padding-block:var(--calcite-internal-panel-header-vertical-padding);padding-inline:var(--calcite-internal-panel-default-space)}.header-content.header--slotted-content{padding:var(--calcite-panel-header-content-space, var(--calcite-internal-panel-header-vertical-padding) var(--calcite-internal-panel-default-space))}.header-content.header--non-slotted-content{align-items:center;flex-direction:row}.footer{margin-block-start:auto;display:flex;flex-direction:row;align-content:space-between;align-items:center;justify-content:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-footer-space, var(--calcite-panel-footer-padding, var(--calcite-internal-panel-default-space)));background-color:var(--calcite-panel-footer-background-color, var(--calcite-color-foreground-1))}.footer-content{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:center}.footer-start{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-start;margin-inline-end:auto;gap:var(--calcite-internal-panel-default-space)}.footer-end{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-end;margin-inline-start:auto;gap:var(--calcite-internal-panel-default-space)}.fab-container{position:sticky;inset-block-end:0px;z-index:var(--calcite-z-index-sticky);margin-block:0px;margin-inline:auto;display:block;padding:.5rem;inset-inline:0;inline-size:fit-content}calcite-icon{--calcite-icon-color: var(--calcite-panel-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-1)))}:host([hidden]){display:none}[hidden]{display:none}`,w=class extends D{constructor(){super(),this.containerRef=B(),this.resizeObserver=N("resize",()=>this.resizeHandler()),this.messages=M(),this._closed=!1,this.focusSetter=L()(this),this.focusTrapController=G({focusTrapOptions:{allowOutsideClick:!0,escapeDeactivates:e=>(!e.defaultPrevented&&this.closable&&(this.emitCloseEvent(),e.preventDefault()),!1)}})(this),this.interactiveContainer=j(this),this.hasActionBar=!1,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasEndActions=!1,this.hasFab=!1,this.hasFooterContent=!1,this.hasFooterEndContent=!1,this.hasFooterStartContent=!1,this.hasHeaderContent=!1,this.hasHeaderDescription=!1,this.hasHeaderHeading=!1,this.hasHeaderTop=!1,this.hasMenuItems=!1,this.hasStartActions=!1,this.showHeaderContent=!1,this.closable=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.focusTrapEnabled=!1,this.menuOpen=!1,this.menuPlacement=U,this.overlayPositioning="absolute",this.scale="m",this.topLayerDisabled=!1,this.calcitePanelClose=$({cancelable:!0}),this.calcitePanelCollapse=$({cancelable:!1}),this.calcitePanelExpand=$({cancelable:!1}),this.calcitePanelScroll=$({cancelable:!1}),this.calcitePanelToggle=$({cancelable:!1}),this.listen("keydown",this.panelKeyDownHandler),this.listen("calcitePanelClose",this.panelCloseHandler)}static{this.properties={hasActionBar:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],hasEndActions:[16,{},{state:!0}],hasFab:[16,{},{state:!0}],hasFooterContent:[16,{},{state:!0}],hasFooterEndContent:[16,{},{state:!0}],hasFooterStartContent:[16,{},{state:!0}],hasHeaderContent:[16,{},{state:!0}],hasHeaderDescription:[16,{},{state:!0}],hasHeaderHeading:[16,{},{state:!0}],hasHeaderTop:[16,{},{state:!0}],hasMenuItems:[16,{},{state:!0}],hasStartActions:[16,{},{state:!0}],showHeaderContent:[16,{},{state:!0}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],focusTrapEnabled:[7,{},{reflect:!0,type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=[V,W]}get closed(){return this._closed}set closed(e){let a=this._closed;e!==a&&this.setClosedState(e)}async scrollContentTo(e){this.panelScrollEl?.scrollTo(e)}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}async updateFocusTrapElements(e){this.focusTrapController.setExtraContainers(e),this.focusTrapController.updateContainerElements()}willUpdate(e){e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calcitePanelCollapse.emit():this.calcitePanelExpand.emit())}updated(e){(e.has("focusTrapEnabled")||e.has("closable")||e.has("closed"))&&(!this.closed&&this.closable&&this.focusTrapEnabled?this.focusTrapController.activate():this.focusTrapController.deactivate())}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}focusTrapDisabledOverride(){return!this.focusTrapEnabled||!this.closable||this.closed}async setClosedState(e){if(this.beforeClose&&e)try{await this.beforeClose?.()}catch{return}this._closed=e}resizeHandler(){let{panelScrollEl:e}=this;if(!e||typeof e.scrollHeight!="number"||typeof e.offsetHeight!="number")return;e.scrollHeight>e.offsetHeight?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}closeClickHandler(){this.emitCloseEvent()}emitCloseEvent(){this.calcitePanelClose.emit()}panelKeyDownHandler(e){e.key!=="Escape"||e.defaultPrevented||this.closed||!this.closable||(e.preventDefault(),this.emitCloseEvent())}panelCloseHandler(e){e.defaultPrevented||e.target!==this.el||(this.closed=!0)}collapse(){this.collapsed=!this.collapsed,this.calcitePanelToggle.emit()}panelScrollHandler(){this.calcitePanelScroll.emit()}handleHeaderActionsStartSlotChange(e){this.hasStartActions=h(e)}handleHeaderActionsEndSlotChange(e){this.hasEndActions=h(e)}handleHeaderMenuActionsSlotChange(e){this.hasMenuItems=h(e)}handleActionBarSlotChange(e){let a=H(e).filter(K);a.forEach(i=>i.layout="horizontal"),this.hasActionBar=!!a.length}handleHeaderContentSlotChange(e){this.hasHeaderContent=h(e)}handleHeaderTopSlotChange(e){this.hasHeaderTop=h(e)}handleHeaderDescriptionSlotChange(e){this.hasHeaderDescription=k(e)||H(e).some(T)}handleHeaderHeadingSlotChange(e){this.hasHeaderHeading=k(e)||H(e).some(T)}handleFabSlotChange(e){this.hasFab=h(e)}handleFooterEndSlotChange(e){this.hasFooterEndContent=h(e)}handleFooterStartSlotChange(e){this.hasFooterStartContent=h(e)}handleFooterSlotChange(e){this.hasFooterContent=h(e)}contentBottomSlotChangeHandler(e){this.hasContentBottom=h(e)}contentTopSlotChangeHandler(e){this.hasContentTop=h(e)}setPanelScrollEl(e){O(this.resizeObserver,this.panelScrollEl,e),this.panelScrollEl=e}handleAlertsSlotChange(e){H(e)?.map(a=>{a.nodeName==="CALCITE-ALERT"&&(a.embedded=!0)})}get hasHeaderRow(){return this.hasHeaderContent||!!this.heading||!!this.description||this.hasHeaderHeading||this.hasHeaderDescription||this.hasStartActions||this.hasEndActions||this.collapsible||this.closable||this.hasMenuItems}renderHeaderContent(){let{heading:e,headingLevel:a,description:i,hasHeaderContent:s,hasHeaderDescription:r,hasHeaderHeading:c,icon:u,scale:d}=this,g=!!e||c,p=!!i||r,f=g||p,v=u?n`<calcite-icon class=${o(t.icon)} .flipRtl=${this.iconFlipRtl} .icon=${u} .scale=${R(d)}></calcite-icon>`:null,b=I({class:t.heading,hidden:!g,level:a,children:n`<slot .hidden=${!c} name=${l.heading} @slotchange=${this.handleHeaderHeadingSlotChange}></slot>${c?null:e}`}),C=n`<span class=${o(t.description)} .hidden=${!p}><slot .hidden=${!r} name=${l.description} @slotchange=${this.handleHeaderDescriptionSlotChange}></slot>${r?null:i}</span>`;return m("header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerNonSlottedContent]:!0})} .hidden=${s||!f}>${v}<div class=${o(t.headingTextContent)}>${b}${C}</div></div>`)}renderActionBar(){return n`<div class=${o(t.actionBarContainer)} .hidden=${!this.hasActionBar}><slot name=${l.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`}renderHeaderSlottedContent(){return m("slotted-header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerSlottedContent]:!0})} .hidden=${!this.hasHeaderContent}><slot name=${l.headerContent} @slotchange=${this.handleHeaderContentSlotChange}></slot></div>`)}renderHeaderTop(){return n`<div class=${o(t.headerTop)} .hidden=${!this.hasHeaderTop}><slot name=${l.headerTop} @slotchange=${this.handleHeaderTopSlotChange}></slot></div>`}renderHeaderStartActions(){let{hasStartActions:e}=this;return m("header-actions-start",n`<div class=${o({[t.headerActionsStart]:!0,[t.headerActions]:!0})} .hidden=${!e}><slot name=${l.headerActionsStart} @slotchange=${this.handleHeaderActionsStartSlotChange}></slot></div>`)}renderHeaderActionsEnd(){let{hasEndActions:e,messages:a,closable:i,collapsed:s,collapseDirection:r,collapsible:c,hasMenuItems:u}=this,{collapse:d,expand:g,close:p}=a,f=[x.expand,x.collapse];r==="up"&&f.reverse();let v=c?n`<calcite-action .aria=${{expanded:!s}} .icon=${s?f[0]:f[1]} id=${A.collapse} .label=${d} @click=${this.collapse} .scale=${this.scale} .text=${d} title=${(s?g:d)??y}></calcite-action>`:null,b=i?n`<calcite-action .ariaLabel=${p} .icon=${x.close} id=${A.close} @click=${this.closeClickHandler} .scale=${this.scale} .text=${p} title=${p??y}></calcite-action>`:null,C=n`<slot name=${l.headerActionsEnd} @slotchange=${this.handleHeaderActionsEndSlotChange}></slot>`,z=e||v||b||u;return m("header-actions-end",n`<div class=${o({[t.headerActionsEnd]:!0,[t.headerActions]:!0})} .hidden=${!z}>${C}${this.renderMenu()}${v}${b}</div>`)}renderMenu(){let{hasMenuItems:e,messages:a,menuOpen:i,menuFlipPlacements:s,menuPlacement:r,scale:c}=this;return m("menu",n`<calcite-action-menu .flipPlacements=${s??["top","bottom"]} .hidden=${!e} .label=${a.options} .open=${i} .overlayPositioning=${this.overlayPositioning} .placement=${r} .scale=${c} .topLayerDisabled=${this.topLayerDisabled}><calcite-action class=${o(t.menuAction)} .icon=${x.menu} .scale=${c} slot=${_.trigger} .text=${a.options}></calcite-action><slot name=${l.headerMenuActions} @slotchange=${this.handleHeaderMenuActionsSlotChange}></slot></calcite-action-menu>`)}renderHeaderNode(){let{hasHeaderContent:e,hasHeaderDescription:a,hasHeaderHeading:i,hasHeaderTop:s,hasStartActions:r,hasEndActions:c,closable:u,collapsible:d,hasMenuItems:g,hasActionBar:p,hasContentTop:f,heading:v,description:b}=this,C=this.renderHeaderContent(),S=e||(!!v||!!b||i||a)||s||r||c||d||u||g||p||f;return this.showHeaderContent=S,n`<header class=${o({[t.header]:!0,[t.headerNoRow]:s&&!this.hasHeaderRow&&!p&&!f})} .hidden=${!(S||p||f)}>${this.renderHeaderTop()}<div class=${o({[t.headerContainer]:!0,[t.headerContainerBorderEnd]:p&&this.hasHeaderRow})} .hidden=${!S}>${this.renderHeaderStartActions()}${this.renderHeaderSlottedContent()}${C}${this.renderHeaderActionsEnd()}</div>${this.renderActionBar()}${this.renderContentTop()}</header>`}renderFooterNode(){let{hasFooterEndContent:e,hasFooterStartContent:a,hasFooterContent:i}=this,s=a||e||i;return n`<footer class=${o(t.footer)} .hidden=${!s}><div class=${o(t.footerContent)} .hidden=${!i}><slot name=${l.footer} @slotchange=${this.handleFooterSlotChange}></slot></div><div class=${o(t.footerStart)} .hidden=${i||!a}><slot name=${l.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot></div><div class=${o(t.footerEnd)} .hidden=${i||!e}><slot name=${l.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></div></footer>`}renderContent(){return n`<div class=${o(t.contentWrapper)} .hidden=${this.collapsible&&this.collapsed} @scroll=${this.panelScrollHandler} ${E(this.setPanelScrollEl)}><slot></slot>${this.renderFab()}</div>`}renderContentBottom(){return n`<div class=${o(t.contentBottom)} .hidden=${!this.hasContentBottom}><slot name=${l.contentBottom} @slotchange=${this.contentBottomSlotChangeHandler}></slot></div>`}renderContentTop(){return n`<div class=${o({[t.contentTop]:!0,[t.contentTopNoBorder]:this.hasHeaderTop&&!this.hasHeaderRow&&!this.hasActionBar})} .hidden=${!this.hasContentTop}><slot name=${l.contentTop} @slotchange=${this.contentTopSlotChangeHandler}></slot></div>`}renderFab(){return n`<div class=${o(t.fabContainer)} .hidden=${!this.hasFab}><slot name=${l.fab} @slotchange=${this.handleFabSlotChange}></slot></div>`}render(){let{disabled:e,loading:a,closed:i,heading:s,description:r,focusTrapEnabled:c,closable:u}=this,d=c&&u,g=n`<div .ariaBusy=${a} .ariaDescription=${d&&r?r:void 0} .ariaLabel=${d&&s?s:void 0} .ariaLive=${d?"polite":void 0} class=${o(t.container)} .hidden=${i} .role=${d?"dialog":"article"} ${E(this.containerRef)}>${this.renderHeaderNode()}${this.renderContent()}${this.renderContentBottom()}${this.renderFooterNode()}${m("alerts",n`<slot name=${l.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</div>`;return this.interactiveContainer({disabled:e,children:n`${a?n`<calcite-scrim .loading=${a}></calcite-scrim>`:null}${g}`})}};P("calcite-panel",w);export{w as Panel};
2
+ import{a as t,b as A,c as x,d as l}from"./CZERUG3F.js";import{a as G}from"./OXE2LZT4.js";import{a as V}from"./YSILJ3W5.js";import{b as U}from"./A3JJ6LJL.js";import{a as I}from"./K7LFRVI5.js";import"./WGQXFSUO.js";import{a as j}from"./PKGGSZ3G.js";import{a as m}from"./MB26RZ7I.js";import{c as K}from"./SZUPQ4CX.js";import"./5EBGPCB7.js";import{a as N,b as O}from"./VI7SBYXT.js";import{a as M}from"./4VSUDBBT.js";import{c as _}from"./XX43OXTK.js";import"./VUYX7MNO.js";import{a as L}from"./XKR5TRKJ.js";import{a as R}from"./ZWPNZ5XW.js";import"./IVP2TAIE.js";import"./IDINCKYS.js";import{v as T,w as k,x as h,y as H}from"./HWKBYMC2.js";import{E as B,F as E,G as D,H as o,T as P,g as F,h as n,l as y,p as $}from"./JLFMHHHY.js";var W=F`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;box-sizing:border-box;display:flex;block-size:100%;inline-size:100%;flex:1 1 auto;overflow:hidden;border-radius:var(--calcite-panel-corner-radius, var(--calcite-corner-radius-sharp))}slot[name=alerts]::slotted(calcite-alert){block-size:0}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}:host([scale=s]){--calcite-internal-panel-default-space: var(--calcite-spacing-sm);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-sm-plus)}:host([scale=s]) .header-content .heading{font-size:var(--calcite-font-size--1)}:host([scale=s]) .header-content .description{font-size:var(--calcite-font-size--2)}:host([scale=s]) .header-content .icon{margin-inline-end:var(--calcite-spacing-sm)}:host([scale=m]){--calcite-internal-panel-default-space: var(--calcite-spacing-md);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-md-plus)}:host([scale=m]) .header-content .heading{font-size:var(--calcite-font-size-0)}:host([scale=m]) .header-content .description{font-size:var(--calcite-font-size--1)}:host([scale=m]) .header-content .icon{margin-inline-end:var(--calcite-spacing-md)}:host(:is([scale=s],[scale=m])){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xxs)}:host([scale=l]){--calcite-internal-panel-action-spacing: var(--calcite-spacing-xs);--calcite-internal-panel-default-space: var(--calcite-spacing-lg);--calcite-internal-panel-header-vertical-padding: var(--calcite-spacing-xl)}:host([scale=l]) .header-content .heading{font-size:var(--calcite-font-size-1)}:host([scale=l]) .header-content .description{font-size:var(--calcite-font-size-0)}:host([scale=l]) .header-content .icon{margin-inline-end:var(--calcite-spacing-lg)}.content-top,.content-bottom{display:flex;align-items:flex-start;align-self:stretch;border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));background-color:var(--calcite-panel-background-color, var(--calcite-color-foreground-1))}.content-top{padding:var(--calcite-panel-content-top-space, var(--calcite-internal-panel-default-space))}.content-bottom{padding:var(--calcite-panel-content-bottom-space, var(--calcite-internal-panel-default-space))}.container{position:relative;margin:0;display:flex;inline-size:100%;flex:1 1 auto;flex-direction:column;align-items:stretch;overflow:hidden;background-color:var(--calcite-color-background);padding:0;font-size:var(--calcite-font-size-relative-base);color:var(--calcite-color-text-2);transition:max-block-size var(--calcite-animation-timing),inline-size var(--calcite-animation-timing);box-sizing:border-box;font-size:var(--calcite-font-size--1)}.container *{box-sizing:border-box}.header{z-index:var(--calcite-z-index-header);display:flex;flex-direction:column;background-color:var(--calcite-panel-header-background-color, var(--calcite-color-foreground-1));border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-panel-header-border-block-end, var(--calcite-color-border-3)))}.header--no-row{border-block-end:0}.content-top--no-border{border-block-start:0}.header-container{display:flex;inline-size:100%;flex-direction:row;align-items:stretch;justify-content:flex-start;flex:0 0 auto}.header-container--border-end{border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3))}.header-top{inline-size:100%;border-block-end:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-header-top-space, var(--calcite-internal-panel-default-space))}.action-bar-container{inline-size:100%}.action-bar-container ::slotted(calcite-action-bar){inline-size:100%}.header-content{display:flex;flex-direction:column;overflow:hidden;padding-inline:.75rem;padding-block:.875rem;margin-inline-end:auto;justify-content:center}.header-content .heading-text-content{flex:1 1 auto;overflow:hidden}.header-content .heading,.header-content .description{display:block;flex:none;overflow-wrap:break-word;padding:0;line-height:var(--calcite-font-line-height-relative-snug)}.header-content .heading{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-panel-heading-text-color, var(--calcite-color-text-1))}.header-content .heading:only-child{margin-block-end:0px}.header-content .description{color:var(--calcite-panel-description-text-color, var(--calcite-color-text-2))}#close,#collapse,calcite-action-menu{--calcite-action-background-color: var(--calcite-panel-header-action-background-color);--calcite-action-background-color-hover: var(--calcite-panel-header-action-background-color-hover);--calcite-action-background-color-press: var(--calcite-panel-header-action-background-color-press);--calcite-action-text-color: var(--calcite-panel-header-action-text-color);--calcite-action-text-color-press: var(--calcite-panel-header-action-text-color-press)}.header-actions{display:flex;flex-direction:row;flex-wrap:nowrap;margin:auto;gap:var(--calcite-internal-panel-action-spacing)}.header-actions--start{margin-inline-start:var(--calcite-internal-panel-action-spacing)}.header-actions--end{margin-inline-end:var(--calcite-internal-panel-action-spacing)}.content-wrapper{position:relative;display:flex;block-size:100%;flex:1 1 auto;flex-direction:column;flex-wrap:nowrap;align-items:stretch;overflow:auto;color:var(--calcite-color-text-2);outline-color:transparent;padding:var(--calcite-panel-space, var(--calcite-panel-content-space, 0));background:var(--calcite-panel-background-color, var(--calcite-color-background))}.content-wrapper:focus-visible{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}.header-content{flex:1 1 auto;justify-content:center;padding-block:var(--calcite-internal-panel-header-vertical-padding);padding-inline:var(--calcite-internal-panel-default-space)}.header-content.header--slotted-content{padding:var(--calcite-panel-header-content-space, var(--calcite-internal-panel-header-vertical-padding) var(--calcite-internal-panel-default-space))}.header-content.header--non-slotted-content{align-items:center;flex-direction:row}.footer{margin-block-start:auto;display:flex;flex-direction:row;align-content:space-between;align-items:center;justify-content:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-relative-snug);border-block-start:1px solid var(--calcite-panel-border-color, var(--calcite-color-border-3));padding:var(--calcite-panel-footer-space, var(--calcite-panel-footer-padding, var(--calcite-internal-panel-default-space)));background-color:var(--calcite-panel-footer-background-color, var(--calcite-color-foreground-1))}.footer-content{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:center}.footer-start{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-start;margin-inline-end:auto;gap:var(--calcite-internal-panel-default-space)}.footer-end{display:flex;flex:1 1 0%;flex-direction:row;align-items:center;justify-content:flex-end;margin-inline-start:auto;gap:var(--calcite-internal-panel-default-space)}.fab-container{position:sticky;inset-block-end:0px;z-index:var(--calcite-z-index-sticky);margin-block:0px;margin-inline:auto;display:block;padding:.5rem;inset-inline:0;inline-size:fit-content}calcite-icon{--calcite-icon-color: var(--calcite-panel-icon-color, var(--calcite-ui-icon-color, var(--calcite-color-text-1)))}:host([hidden]){display:none}[hidden]{display:none}`,w=class extends D{constructor(){super(),this.containerRef=B(),this.resizeObserver=N("resize",()=>this.resizeHandler()),this.messages=M(),this._closed=!1,this.focusSetter=L()(this),this.focusTrapController=G({focusTrapOptions:{allowOutsideClick:!0,escapeDeactivates:e=>(!e.defaultPrevented&&this.closable&&(this.emitCloseEvent(),e.preventDefault()),!1)}})(this),this.interactiveContainer=j(this),this.hasActionBar=!1,this.hasContentBottom=!1,this.hasContentTop=!1,this.hasEndActions=!1,this.hasFab=!1,this.hasFooterContent=!1,this.hasFooterEndContent=!1,this.hasFooterStartContent=!1,this.hasHeaderContent=!1,this.hasHeaderDescription=!1,this.hasHeaderHeading=!1,this.hasHeaderTop=!1,this.hasMenuItems=!1,this.hasStartActions=!1,this.showHeaderContent=!1,this.closable=!1,this.collapseDirection="down",this.collapsed=!1,this.collapsible=!1,this.disabled=!1,this.iconFlipRtl=!1,this.loading=!1,this.focusTrapEnabled=!1,this.menuOpen=!1,this.menuPlacement=U,this.overlayPositioning="absolute",this.scale="m",this.topLayerDisabled=!1,this.calcitePanelClose=$({cancelable:!0}),this.calcitePanelCollapse=$({cancelable:!1}),this.calcitePanelExpand=$({cancelable:!1}),this.calcitePanelScroll=$({cancelable:!1}),this.calcitePanelToggle=$({cancelable:!1}),this.listen("keydown",this.panelKeyDownHandler),this.listen("calcitePanelClose",this.panelCloseHandler)}static{this.properties={hasActionBar:[16,{},{state:!0}],hasContentBottom:[16,{},{state:!0}],hasContentTop:[16,{},{state:!0}],hasEndActions:[16,{},{state:!0}],hasFab:[16,{},{state:!0}],hasFooterContent:[16,{},{state:!0}],hasFooterEndContent:[16,{},{state:!0}],hasFooterStartContent:[16,{},{state:!0}],hasHeaderContent:[16,{},{state:!0}],hasHeaderDescription:[16,{},{state:!0}],hasHeaderHeading:[16,{},{state:!0}],hasHeaderTop:[16,{},{state:!0}],hasMenuItems:[16,{},{state:!0}],hasStartActions:[16,{},{state:!0}],showHeaderContent:[16,{},{state:!0}],beforeClose:[0,{},{attribute:!1}],closable:[7,{},{reflect:!0,type:Boolean}],closed:[7,{},{reflect:!0,type:Boolean}],collapseDirection:1,collapsed:[7,{},{reflect:!0,type:Boolean}],collapsible:[7,{},{reflect:!0,type:Boolean}],description:1,disabled:[7,{},{reflect:!0,type:Boolean}],heading:1,headingLevel:[11,{},{type:Number,reflect:!0}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],loading:[7,{},{reflect:!0,type:Boolean}],focusTrapEnabled:[7,{},{reflect:!0,type:Boolean}],focusTrapOptions:[0,{},{attribute:!1}],menuFlipPlacements:[0,{},{attribute:!1}],menuOpen:[7,{},{reflect:!0,type:Boolean}],menuPlacement:[3,{},{reflect:!0}],messageOverrides:[0,{},{attribute:!1}],overlayPositioning:[3,{},{reflect:!0}],scale:[3,{},{reflect:!0}],topLayerDisabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=[V,W]}get closed(){return this._closed}set closed(e){let a=this._closed;e!==a&&this.setClosedState(e)}async scrollContentTo(e){this.panelScrollEl?.scrollTo(e)}async setFocus(e){return this.focusSetter(()=>this.containerRef.value,e)}async updateFocusTrapElements(e){this.focusTrapController.setExtraContainers(e),this.focusTrapController.updateContainerElements()}willUpdate(e){e.has("collapsed")&&this.hasUpdated&&(this.collapsed?this.calcitePanelCollapse.emit():this.calcitePanelExpand.emit())}updated(e){(e.has("focusTrapEnabled")||e.has("closable")||e.has("closed"))&&(!this.closed&&this.closable&&this.focusTrapEnabled?this.focusTrapController.activate():this.focusTrapController.deactivate())}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}focusTrapDisabledOverride(){return!this.focusTrapEnabled||!this.closable||this.closed}async setClosedState(e){if(this.beforeClose&&e)try{await this.beforeClose?.()}catch{return}this._closed=e}resizeHandler(){let{panelScrollEl:e}=this;if(!e||typeof e.scrollHeight!="number"||typeof e.offsetHeight!="number")return;e.scrollHeight>e.offsetHeight?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}closeClickHandler(){this.emitCloseEvent()}emitCloseEvent(){this.calcitePanelClose.emit()}panelKeyDownHandler(e){e.key!=="Escape"||e.defaultPrevented||this.closed||!this.closable||(e.preventDefault(),this.emitCloseEvent())}panelCloseHandler(e){e.defaultPrevented||e.target!==this.el||(this.closed=!0)}collapse(){this.collapsed=!this.collapsed,this.calcitePanelToggle.emit()}panelScrollHandler(){this.calcitePanelScroll.emit()}handleHeaderActionsStartSlotChange(e){this.hasStartActions=h(e)}handleHeaderActionsEndSlotChange(e){this.hasEndActions=h(e)}handleHeaderMenuActionsSlotChange(e){this.hasMenuItems=h(e)}handleActionBarSlotChange(e){let a=H(e).filter(K);a.forEach(i=>i.layout="horizontal"),this.hasActionBar=!!a.length}handleHeaderContentSlotChange(e){this.hasHeaderContent=h(e)}handleHeaderTopSlotChange(e){this.hasHeaderTop=h(e)}handleHeaderDescriptionSlotChange(e){this.hasHeaderDescription=k(e)||H(e).some(T)}handleHeaderHeadingSlotChange(e){this.hasHeaderHeading=k(e)||H(e).some(T)}handleFabSlotChange(e){this.hasFab=h(e)}handleFooterEndSlotChange(e){this.hasFooterEndContent=h(e)}handleFooterStartSlotChange(e){this.hasFooterStartContent=h(e)}handleFooterSlotChange(e){this.hasFooterContent=h(e)}contentBottomSlotChangeHandler(e){this.hasContentBottom=h(e)}contentTopSlotChangeHandler(e){this.hasContentTop=h(e)}setPanelScrollEl(e){O(this.resizeObserver,this.panelScrollEl,e),this.panelScrollEl=e}handleAlertsSlotChange(e){H(e)?.map(a=>{a.nodeName==="CALCITE-ALERT"&&(a.embedded=!0)})}get hasHeaderRow(){return this.hasHeaderContent||!!this.heading||!!this.description||this.hasHeaderHeading||this.hasHeaderDescription||this.hasStartActions||this.hasEndActions||this.collapsible||this.closable||this.hasMenuItems}renderHeaderContent(){let{heading:e,headingLevel:a,description:i,hasHeaderContent:s,hasHeaderDescription:r,hasHeaderHeading:c,icon:u,scale:d}=this,g=!!e||c,p=!!i||r,f=g||p,v=u?n`<calcite-icon class=${o(t.icon)} .flipRtl=${this.iconFlipRtl} .icon=${u} .scale=${R(d)}></calcite-icon>`:null,b=I({class:t.heading,hidden:!g,level:a,children:n`<slot .hidden=${!c} name=${l.heading} @slotchange=${this.handleHeaderHeadingSlotChange}></slot>${c?null:e}`}),C=n`<span class=${o(t.description)} .hidden=${!p}><slot .hidden=${!r} name=${l.description} @slotchange=${this.handleHeaderDescriptionSlotChange}></slot>${r?null:i}</span>`;return m("header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerNonSlottedContent]:!0})} .hidden=${s||!f}>${v}<div class=${o(t.headingTextContent)}>${b}${C}</div></div>`)}renderActionBar(){return n`<div class=${o(t.actionBarContainer)} .hidden=${!this.hasActionBar}><slot name=${l.actionBar} @slotchange=${this.handleActionBarSlotChange}></slot></div>`}renderHeaderSlottedContent(){return m("slotted-header-content",n`<div class=${o({[t.headerContent]:!0,[t.headerSlottedContent]:!0})} .hidden=${!this.hasHeaderContent}><slot name=${l.headerContent} @slotchange=${this.handleHeaderContentSlotChange}></slot></div>`)}renderHeaderTop(){return n`<div class=${o(t.headerTop)} .hidden=${!this.hasHeaderTop}><slot name=${l.headerTop} @slotchange=${this.handleHeaderTopSlotChange}></slot></div>`}renderHeaderStartActions(){let{hasStartActions:e}=this;return m("header-actions-start",n`<div class=${o({[t.headerActionsStart]:!0,[t.headerActions]:!0})} .hidden=${!e}><slot name=${l.headerActionsStart} @slotchange=${this.handleHeaderActionsStartSlotChange}></slot></div>`)}renderHeaderActionsEnd(){let{hasEndActions:e,messages:a,closable:i,collapsed:s,collapseDirection:r,collapsible:c,hasMenuItems:u}=this,{collapse:d,expand:g,close:p}=a,f=[x.expand,x.collapse];r==="up"&&f.reverse();let v=c?n`<calcite-action .aria=${{expanded:!s}} .icon=${s?f[0]:f[1]} id=${A.collapse} .label=${d} @click=${this.collapse} .scale=${this.scale} .text=${d} title=${(s?g:d)??y}></calcite-action>`:null,b=i?n`<calcite-action .ariaLabel=${p} .icon=${x.close} id=${A.close} @click=${this.closeClickHandler} .scale=${this.scale} .text=${p} title=${p??y}></calcite-action>`:null,C=n`<slot name=${l.headerActionsEnd} @slotchange=${this.handleHeaderActionsEndSlotChange}></slot>`,z=e||v||b||u;return m("header-actions-end",n`<div class=${o({[t.headerActionsEnd]:!0,[t.headerActions]:!0})} .hidden=${!z}>${C}${this.renderMenu()}${v}${b}</div>`)}renderMenu(){let{hasMenuItems:e,messages:a,menuOpen:i,menuFlipPlacements:s,menuPlacement:r,scale:c}=this;return m("menu",n`<calcite-action-menu .flipPlacements=${s??["top","bottom"]} .hidden=${!e} .label=${a.options} .open=${i} .overlayPositioning=${this.overlayPositioning} .placement=${r} .scale=${c} .topLayerDisabled=${this.topLayerDisabled}><calcite-action class=${o(t.menuAction)} .icon=${x.menu} .scale=${c} slot=${_.trigger} .text=${a.options}></calcite-action><slot name=${l.headerMenuActions} @slotchange=${this.handleHeaderMenuActionsSlotChange}></slot></calcite-action-menu>`)}renderHeaderNode(){let{hasHeaderContent:e,hasHeaderDescription:a,hasHeaderHeading:i,hasHeaderTop:s,hasStartActions:r,hasEndActions:c,closable:u,collapsible:d,hasMenuItems:g,hasActionBar:p,hasContentTop:f,heading:v,description:b}=this,C=this.renderHeaderContent(),S=e||(!!v||!!b||i||a)||s||r||c||d||u||g||p||f;return this.showHeaderContent=S,n`<header class=${o({[t.header]:!0,[t.headerNoRow]:s&&!this.hasHeaderRow&&!p&&!f})} .hidden=${!(S||p||f)}>${this.renderHeaderTop()}<div class=${o({[t.headerContainer]:!0,[t.headerContainerBorderEnd]:p&&this.hasHeaderRow})} .hidden=${!S}>${this.renderHeaderStartActions()}${this.renderHeaderSlottedContent()}${C}${this.renderHeaderActionsEnd()}</div>${this.renderActionBar()}${this.renderContentTop()}</header>`}renderFooterNode(){let{hasFooterEndContent:e,hasFooterStartContent:a,hasFooterContent:i}=this,s=a||e||i;return n`<footer class=${o(t.footer)} .hidden=${!s}><div class=${o(t.footerContent)} .hidden=${!i}><slot name=${l.footer} @slotchange=${this.handleFooterSlotChange}></slot></div><div class=${o(t.footerStart)} .hidden=${i||!a}><slot name=${l.footerStart} @slotchange=${this.handleFooterStartSlotChange}></slot></div><div class=${o(t.footerEnd)} .hidden=${i||!e}><slot name=${l.footerEnd} @slotchange=${this.handleFooterEndSlotChange}></slot></div></footer>`}renderContent(){return n`<div class=${o(t.contentWrapper)} .hidden=${this.collapsible&&this.collapsed} @scroll=${this.panelScrollHandler} ${E(this.setPanelScrollEl)}><slot></slot>${this.renderFab()}</div>`}renderContentBottom(){return n`<div class=${o(t.contentBottom)} .hidden=${!this.hasContentBottom}><slot name=${l.contentBottom} @slotchange=${this.contentBottomSlotChangeHandler}></slot></div>`}renderContentTop(){return n`<div class=${o({[t.contentTop]:!0,[t.contentTopNoBorder]:this.hasHeaderTop&&!this.hasHeaderRow&&!this.hasActionBar})} .hidden=${!this.hasContentTop}><slot name=${l.contentTop} @slotchange=${this.contentTopSlotChangeHandler}></slot></div>`}renderFab(){return n`<div class=${o(t.fabContainer)} .hidden=${!this.hasFab}><slot name=${l.fab} @slotchange=${this.handleFabSlotChange}></slot></div>`}render(){let{disabled:e,loading:a,closed:i,heading:s,description:r,focusTrapEnabled:c,closable:u}=this,d=c&&u,g=n`<div .ariaBusy=${a} .ariaDescription=${d&&r?r:void 0} .ariaLabel=${d&&s?s:void 0} .ariaLive=${d?"polite":void 0} class=${o(t.container)} .hidden=${i} .role=${d?"dialog":"article"} ${E(this.containerRef)}>${this.renderHeaderNode()}${this.renderContent()}${this.renderContentBottom()}${this.renderFooterNode()}${m("alerts",n`<slot name=${l.alerts} @slotchange=${this.handleAlertsSlotChange}></slot>`)}</div>`;return this.interactiveContainer({disabled:e,children:n`${a?n`<calcite-scrim .loading=${a}></calcite-scrim>`:null}${g}`})}};P("calcite-panel",w);export{w as Panel};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as h}from"./JFCRLKUS.js";import{a as b}from"./6WLVT7DS.js";import"./ZWPNZ5XW.js";import"./EDEBMMT6.js";import"./NA2ZTWW4.js";import"./AM5HDLAS.js";import{E as s,F as c,G as r,H as n,J as d,T as u,g as i,h as l}from"./4LMXYULL.js";var k={button:"button"},R={plus:"plus"},w=i`: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;background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}calcite-button{--calcite-fab-shadow-internal: var(--calcite-shadow-md);box-shadow:var(--calcite-fab-shadow, var(--calcite-fab-shadow-internal));--calcite-button-background-color: var(--calcite-fab-background-color);--calcite-button-border-color: var(--calcite-fab-border-color);--calcite-button-corner-radius: var(--calcite-fab-corner-radius);--calcite-button-text-color: var(--calcite-fab-text-color);--calcite-button-loader-color: var(--calcite-fab-loader-color)}:host([hidden]){display:none}[hidden]{display:none}`,e=class extends r{constructor(){super(...arguments),this.buttonRef=s(),this.focusSetter=b()(this),this.interactiveContainer=h(this),this.appearance="solid",this.disabled=!1,this.icon=R.plus,this.iconFlipRtl=!1,this.kind="brand",this.loading=!1,this.scale="m",this.textEnabled=!1}static{this.properties={appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],kind:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],text:1,textEnabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=w}async setFocus(t){return this.focusSetter(()=>this.buttonRef.value,t)}render(){let{appearance:t,kind:p,disabled:a,loading:f,scale:m,textEnabled:v,icon:y,label:o,text:x,iconFlipRtl:$}=this,g=v?void 0:o||x||void 0;return this.interactiveContainer({disabled:a,children:l`<calcite-button .appearance=${t==="solid"?"solid":"outline-fill"} class=${n(k.button)} .disabled=${a} .iconFlipRtl=${$?"start":void 0} .iconStart=${y} .kind=${p} .label=${o} .loading=${f} round .scale=${m} title=${g??d} type=button width=auto ${c(this.buttonRef)}>${this.textEnabled?this.text:null}</calcite-button>`})}};u("calcite-fab",e);export{e as Fab};
2
+ import{a as h}from"./PKGGSZ3G.js";import{a as b}from"./XKR5TRKJ.js";import"./ZWPNZ5XW.js";import"./IVP2TAIE.js";import"./IDINCKYS.js";import"./HWKBYMC2.js";import{E as s,F as c,G as r,H as n,J as d,T as u,g as i,h as l}from"./JLFMHHHY.js";var k={button:"button"},R={plus:"plus"},w=i`: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;background-color:transparent}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}calcite-button{--calcite-fab-shadow-internal: var(--calcite-shadow-md);box-shadow:var(--calcite-fab-shadow, var(--calcite-fab-shadow-internal));--calcite-button-background-color: var(--calcite-fab-background-color);--calcite-button-border-color: var(--calcite-fab-border-color);--calcite-button-corner-radius: var(--calcite-fab-corner-radius);--calcite-button-text-color: var(--calcite-fab-text-color);--calcite-button-loader-color: var(--calcite-fab-loader-color)}:host([hidden]){display:none}[hidden]{display:none}`,e=class extends r{constructor(){super(...arguments),this.buttonRef=s(),this.focusSetter=b()(this),this.interactiveContainer=h(this),this.appearance="solid",this.disabled=!1,this.icon=R.plus,this.iconFlipRtl=!1,this.kind="brand",this.loading=!1,this.scale="m",this.textEnabled=!1}static{this.properties={appearance:[3,{},{reflect:!0}],disabled:[7,{},{reflect:!0,type:Boolean}],icon:[3,{},{reflect:!0}],iconFlipRtl:[7,{},{reflect:!0,type:Boolean}],kind:[3,{},{reflect:!0}],label:1,loading:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],text:1,textEnabled:[7,{},{reflect:!0,type:Boolean}]}}static{this.styles=w}async setFocus(t){return this.focusSetter(()=>this.buttonRef.value,t)}render(){let{appearance:t,kind:p,disabled:a,loading:f,scale:m,textEnabled:v,icon:y,label:o,text:x,iconFlipRtl:$}=this,g=v?void 0:o||x||void 0;return this.interactiveContainer({disabled:a,children:l`<calcite-button .appearance=${t==="solid"?"solid":"outline-fill"} class=${n(k.button)} .disabled=${a} .iconFlipRtl=${$?"start":void 0} .iconStart=${y} .kind=${p} .label=${o} .loading=${f} round .scale=${m} title=${g??d} type=button width=auto ${c(this.buttonRef)}>${this.textEnabled?this.text:null}</calcite-button>`})}};u("calcite-fab",e);export{e as Fab};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{h as b}from"./R33SHK7J.js";import{j as i}from"./LBUT6VVH.js";import{a as p}from"./JFCRLKUS.js";import{b as y}from"./GZZYSINJ.js";import{a as g}from"./YP3AYJH3.js";import{a as f}from"./6WLVT7DS.js";import"./ZWPNZ5XW.js";import"./EDEBMMT6.js";import"./NA2ZTWW4.js";import{n as v}from"./AM5HDLAS.js";import{G as h,H as t,K as o,T as u,g as n,h as d,p as a}from"./4LMXYULL.js";var x=n`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;cursor:pointer;outline:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.day-wrapper{position:relative;display:flex;inline-size:100%;flex-direction:column;align-items:center;justify-content:center}.day{position:relative;display:flex;inline-size:100%;align-items:center;justify-content:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);line-height:1;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;line-height:var(--calcite-font-line-height-fixed-base);block-size:var(--calcite-internal-day-size);outline-color:var(--calcite-color-transparent);background-color:var(--calcite-date-picker-day-background-color);color:var(--calcite-date-picker-day-text-color, var(--calcite-color-text-1))}.text{margin-block:1px 0px;margin-inline-start:0px}:host([scale=s]){--calcite-internal-day-size: 32px}:host([scale=s]) .day{font-size:var(--calcite-font-size-relative-sm)}:host([scale=m]){--calcite-internal-day-size: 40px}:host([scale=m]) .day{font-size:var(--calcite-font-size-relative-base)}:host([scale=l]){--calcite-internal-day-size: 44px}:host([scale=l]) .day{font-size:var(--calcite-font-size-relative-md)}:host(:not([current-month])) .day{opacity:var(--calcite-opacity-full);color:var(--calcite-color-text-3)}:host(:focus:not([disabled]):not([selected]):not([current-month])) .day{color:var(--calcite-color-text-1)}:host(:hover:not([disabled]):not([selected])) .day{background-color:var(--calcite-date-picker-day-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-date-picker-day-text-color-hover, var(--calcite-color-text-1))}:host(:not([range]):not([selected]).current-day) .day{color:var(--calcite-date-picker-current-day-text-color, var(--calcite-color-brand));font-weight:var(--calcite-font-weight-bold)}:host(:focus[selected]) .day{z-index:var(--calcite-z-index);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))));box-shadow:0 0 0 2px var(--calcite-color-foreground-1)}:host(:focus:not([disabled]):not([selected])) .day{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:hover:not([disabled]):not([selected])) .day{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([selected]) .day{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-date-picker-day-background-color-selected, var(--calcite-color-brand));color:var(--calcite-date-picker-day-text-color-selected, var(--calcite-color-text-inverse))}:host([range-hover]:not([selected])) .day{background-color:var(--calcite-date-picker-day-outside-range-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-date-picker-day-outside-range-text-color-hover, var(--calcite-color-text-1))}:host([highlighted]:not([selected])) .day,:host(:hover[highlighted]:not([selected])) .day{color:var(--calcite-date-picker-day-range-text-color, var(--calcite-color-text-highlight));background-color:var(--calcite-date-picker-day-range-background-color, var(--calcite-color-surface-highlight))}:host([disabled]) .day{color:var(--calcite-color-text-2);text-decoration-line:line-through;opacity:var(--calcite-opacity-disabled)}@media(forced-colors:active){.day{border-radius:0}:host([selected]){outline:2px solid canvasText}:host(:hover:not([selected])) .day{border-radius:50%}:host([range][selected]) .day,:host([highlighted]) .day,:host([range-hover]:not([selected])) .day{background-color:highlight}:host([range-hover]) .day,:host([range][selected][start-of-range]) .day,:host([range][selected][end-of-range]) .day{background-color:canvas}}:host([hidden]){display:none}[hidden]{display:none}`,c={dayWrapper:"day-wrapper",day:"day",text:"text"},r=class extends h{constructor(){super(),this.focusSetter=f()(this),this.interactiveContainer=p(this),this.active=!1,this.currentMonth=!1,this.disabled=!1,this.endOfRange=!1,this.highlighted=!1,this.range=!1,this.rangeHover=!1,this.selected=!1,this.startOfRange=!1,this.calciteInternalDayHover=a({cancelable:!1}),this.calciteInternalDaySelect=a({cancelable:!1}),this.listen("pointerover",this.pointerOverHandler),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],currentMonth:[7,{},{reflect:!0,type:Boolean}],dateTimeFormat:[0,{},{attribute:!1}],day:[9,{},{type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],endOfRange:[7,{},{reflect:!0,type:Boolean}],highlighted:[7,{},{reflect:!0,type:Boolean}],range:[7,{},{reflect:!0,type:Boolean}],rangeHover:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],startOfRange:[7,{},{reflect:!0,type:Boolean}],value:[0,{},{attribute:!1}]}}static{this.styles=x}async setFocus(e){return this.focusSetter(()=>this.el,e)}load(){this.parentDatePickerEl=v(this.el,"calcite-date-picker")??void 0}onClick(){this.disabled||this.calciteInternalDaySelect.emit()}keyDownHandler(e){g(e.key)&&(this.disabled||this.calciteInternalDaySelect.emit(),e.preventDefault())}pointerOverHandler(){this.disabled||this.calciteInternalDayHover.emit()}render(){let e=b(this.value).replaceAll("-","");if(this.parentDatePickerEl){let{numberingSystem:l,lang:s}=this.parentDatePickerEl;i.numberFormatOptions={useGrouping:!1,...l&&{numberingSystem:l},...s&&{locale:s}}}let m=i.localize(String(this.day)),k=this.dateTimeFormat.format(this.value)??null;return this.el.ariaLabel=k,this.el.ariaSelected=y(this.active),o(this.el,"id",e),this.el.role="button",o(this.el,"tabIndex",this.active&&!this.disabled?0:-1),this.interactiveContainer({disabled:this.disabled,children:d`<div aria-hidden=true class=${t(c.dayWrapper)}><span class=${t(c.day)}><span class=${t(c.text)}>${m}</span></span></div>`})}};u("calcite-date-picker-day",r);export{r as DatePickerDay};
2
+ import{h as b}from"./2CC4TXML.js";import{j as i}from"./POUXHA4D.js";import{a as p}from"./PKGGSZ3G.js";import{b as y}from"./GZZYSINJ.js";import{a as g}from"./YP3AYJH3.js";import{a as f}from"./XKR5TRKJ.js";import"./ZWPNZ5XW.js";import"./IVP2TAIE.js";import"./IDINCKYS.js";import{n as v}from"./HWKBYMC2.js";import{G as h,H as t,K as o,T as u,g as n,h as d,p as a}from"./JLFMHHHY.js";var x=n`:host([disabled]){cursor:default;-webkit-user-select:none;user-select:none;opacity:var(--calcite-opacity-disabled)}:host([disabled]) *,:host([disabled]) ::slotted(*){pointer-events:none}:host{position:relative;display:flex;cursor:pointer;outline:none}:host([disabled]) ::slotted([calcite-hydrated][disabled]),:host([disabled]) [calcite-hydrated][disabled]{opacity:1}.interaction-container{display:contents}.day-wrapper{position:relative;display:flex;inline-size:100%;flex-direction:column;align-items:center;justify-content:center}.day{position:relative;display:flex;inline-size:100%;align-items:center;justify-content:center;font-size:var(--calcite-font-size-relative-sm);line-height:var(--calcite-font-line-height-sm);line-height:1;transition-property:background-color,block-size,border-color,box-shadow,color,inset-block-end,inset-block-start,inset-inline-end,inset-inline-start,inset-size,opacity,outline-color,transform;transition-duration:var(--calcite-animation-timing);transition-timing-function:ease-in-out;line-height:var(--calcite-font-line-height-fixed-base);block-size:var(--calcite-internal-day-size);outline-color:var(--calcite-color-transparent);background-color:var(--calcite-date-picker-day-background-color);color:var(--calcite-date-picker-day-text-color, var(--calcite-color-text-1))}.text{margin-block:1px 0px;margin-inline-start:0px}:host([scale=s]){--calcite-internal-day-size: 32px}:host([scale=s]) .day{font-size:var(--calcite-font-size-relative-sm)}:host([scale=m]){--calcite-internal-day-size: 40px}:host([scale=m]) .day{font-size:var(--calcite-font-size-relative-base)}:host([scale=l]){--calcite-internal-day-size: 44px}:host([scale=l]) .day{font-size:var(--calcite-font-size-relative-md)}:host(:not([current-month])) .day{opacity:var(--calcite-opacity-full);color:var(--calcite-color-text-3)}:host(:focus:not([disabled]):not([selected]):not([current-month])) .day{color:var(--calcite-color-text-1)}:host(:hover:not([disabled]):not([selected])) .day{background-color:var(--calcite-date-picker-day-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-date-picker-day-text-color-hover, var(--calcite-color-text-1))}:host(:not([range]):not([selected]).current-day) .day{color:var(--calcite-date-picker-current-day-text-color, var(--calcite-color-brand));font-weight:var(--calcite-font-weight-bold)}:host(:focus[selected]) .day{z-index:var(--calcite-z-index);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))));box-shadow:0 0 0 2px var(--calcite-color-foreground-1)}:host(:focus:not([disabled]):not([selected])) .day{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus, var(--calcite-ui-focus-color, var(--calcite-color-brand)));outline-offset:calc(calc(-1 * var(--calcite-spacing-base)) * calc(1 - (2*clamp(0,var(--calcite-offset-invert-focus),1))))}:host(:hover:not([disabled]):not([selected])) .day{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([selected]) .day{font-weight:var(--calcite-font-weight-medium);background-color:var(--calcite-date-picker-day-background-color-selected, var(--calcite-color-brand));color:var(--calcite-date-picker-day-text-color-selected, var(--calcite-color-text-inverse))}:host([range-hover]:not([selected])) .day{background-color:var(--calcite-date-picker-day-outside-range-background-color-hover, var(--calcite-color-foreground-2));color:var(--calcite-date-picker-day-outside-range-text-color-hover, var(--calcite-color-text-1))}:host([highlighted]:not([selected])) .day,:host(:hover[highlighted]:not([selected])) .day{color:var(--calcite-date-picker-day-range-text-color, var(--calcite-color-text-highlight));background-color:var(--calcite-date-picker-day-range-background-color, var(--calcite-color-surface-highlight))}:host([disabled]) .day{color:var(--calcite-color-text-2);text-decoration-line:line-through;opacity:var(--calcite-opacity-disabled)}@media(forced-colors:active){.day{border-radius:0}:host([selected]){outline:2px solid canvasText}:host(:hover:not([selected])) .day{border-radius:50%}:host([range][selected]) .day,:host([highlighted]) .day,:host([range-hover]:not([selected])) .day{background-color:highlight}:host([range-hover]) .day,:host([range][selected][start-of-range]) .day,:host([range][selected][end-of-range]) .day{background-color:canvas}}:host([hidden]){display:none}[hidden]{display:none}`,c={dayWrapper:"day-wrapper",day:"day",text:"text"},r=class extends h{constructor(){super(),this.focusSetter=f()(this),this.interactiveContainer=p(this),this.active=!1,this.currentMonth=!1,this.disabled=!1,this.endOfRange=!1,this.highlighted=!1,this.range=!1,this.rangeHover=!1,this.selected=!1,this.startOfRange=!1,this.calciteInternalDayHover=a({cancelable:!1}),this.calciteInternalDaySelect=a({cancelable:!1}),this.listen("pointerover",this.pointerOverHandler),this.listen("click",this.onClick),this.listen("keydown",this.keyDownHandler)}static{this.properties={active:[7,{},{reflect:!0,type:Boolean}],currentMonth:[7,{},{reflect:!0,type:Boolean}],dateTimeFormat:[0,{},{attribute:!1}],day:[9,{},{type:Number}],disabled:[7,{},{reflect:!0,type:Boolean}],endOfRange:[7,{},{reflect:!0,type:Boolean}],highlighted:[7,{},{reflect:!0,type:Boolean}],range:[7,{},{reflect:!0,type:Boolean}],rangeHover:[7,{},{reflect:!0,type:Boolean}],scale:[3,{},{reflect:!0}],selected:[7,{},{reflect:!0,type:Boolean}],startOfRange:[7,{},{reflect:!0,type:Boolean}],value:[0,{},{attribute:!1}]}}static{this.styles=x}async setFocus(e){return this.focusSetter(()=>this.el,e)}load(){this.parentDatePickerEl=v(this.el,"calcite-date-picker")??void 0}onClick(){this.disabled||this.calciteInternalDaySelect.emit()}keyDownHandler(e){g(e.key)&&(this.disabled||this.calciteInternalDaySelect.emit(),e.preventDefault())}pointerOverHandler(){this.disabled||this.calciteInternalDayHover.emit()}render(){let e=b(this.value).replaceAll("-","");if(this.parentDatePickerEl){let{numberingSystem:l,lang:s}=this.parentDatePickerEl;i.numberFormatOptions={useGrouping:!1,...l&&{numberingSystem:l},...s&&{locale:s}}}let m=i.localize(String(this.day)),k=this.dateTimeFormat.format(this.value)??null;return this.el.ariaLabel=k,this.el.ariaSelected=y(this.active),o(this.el,"id",e),this.el.role="button",o(this.el,"tabIndex",this.active&&!this.disabled?0:-1),this.interactiveContainer({disabled:this.disabled,children:d`<div aria-hidden=true class=${t(c.dayWrapper)}><span class=${t(c.day)}><span class=${t(c.text)}>${m}</span></span></div>`})}};u("calcite-date-picker-day",r);export{r as DatePickerDay};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as l}from"./UXNJ2I3X.js";import{F as c,H as a,h,i as e,l as s}from"./4LMXYULL.js";var d={arrow:"calcite-floating-ui-arrow",arrowStroke:"calcite-floating-ui-arrow__stroke"},m={width:12,height:6,strokeWidth:1},S=({floatingLayout:w,key:g,ref:f})=>{let{width:t,height:r,strokeWidth:o}=m,i=t/2,$=w==="vertical",n=`M0,0 H${t} L${t-i},${r} Q${i},${r} ${i},${r} Z`;return l(g,h`<svg aria-hidden=true class=${a(d.arrow)} height=${t} viewBox=${`0 0 ${t} ${t+($?0:o)}`} width=${t+($?o:0)} ${c(f)}>${e`${e`<path class=${a(d.arrowStroke)} d=${n??s} fill=none stroke-width=${o+1} />`||""}<path d=${n??s} stroke=none />`}</svg>`)};export{S as a};
2
+ import{a as l}from"./MB26RZ7I.js";import{F as c,H as a,h,i as e,l as s}from"./JLFMHHHY.js";var d={arrow:"calcite-floating-ui-arrow",arrowStroke:"calcite-floating-ui-arrow__stroke"},m={width:12,height:6,strokeWidth:1},S=({floatingLayout:w,key:g,ref:f})=>{let{width:t,height:r,strokeWidth:o}=m,i=t/2,$=w==="vertical",n=`M0,0 H${t} L${t-i},${r} Q${i},${r} ${i},${r} Z`;return l(g,h`<svg aria-hidden=true class=${a(d.arrow)} height=${t} viewBox=${`0 0 ${t} ${t+($?0:o)}`} width=${t+($?o:0)} ${c(f)}>${e`${e`<path class=${a(d.arrowStroke)} d=${n??s} fill=none stroke-width=${o+1} />`||""}<path d=${n??s} stroke=none />`}</svg>`)};export{S as a};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as O}from"./T6CCMW7H.js";import{a as S}from"./VI7SBYXT.js";import{G as X,H as x,J as i,T as N,g as G,h as z,i as v}from"./4LMXYULL.js";function B(t,s,n){let r=s[0]-t[0],o=n[0]-s[0],$=s[1]-t[1],c=n[1]-s[1],h=$/Number(r||o<0&&0),a=c/Number(o||r<0&&0),e=(h*o+a*r)/(r+o);return(Math.sign(h)+Math.sign(a))*Math.min(Math.abs(h),Math.abs(a),.5*Math.abs(e))||0}function Y(t,s,n){let r=s[0]-t[0],o=s[1]-t[1];return r?(3*o/r-n)/2:n}function Z(t,s,n,r,o){let[$,c]=t,[h,a]=s,e=(h-$)/3,l=o([$+e,c+e*n]).join(","),d=o([h-e,a-e*r]).join(","),m=o([h,a]).join(",");return`C ${l} ${d} ${m}`}function H({width:t,height:s,min:n,max:r}){let o=r[0]-n[0],$=r[1]-n[1];return c=>{let h=(c[0]-n[0])/o*t,a=s-(c[1]-n[1])/$*s;return[h,a]}}function I(t){let[s,n]=t[0],r=[s,n],o=[s,n];return t.reduce(({min:$,max:c},[h,a])=>({min:[Math.min($[0],h),Math.min($[1],a)],max:[Math.max(c[0],h),Math.max(c[1],a)]}),{min:r,max:o})}function R({data:t,min:s,max:n,t:r}){if(t.length<3)return"";let[o,$]=r(t[0]),[c,h]=r(s),[a]=r(n),e,l,d,m=t.reduce((y,M,u)=>{if(l=t[u-2],d=t[u-1],u>1){let g=B(l,d,M),f=e===void 0?Y(l,d,g):e,L=Z(l,d,f,g,r);return e=g,`${y} ${L}`}return y},`M ${c},${h} L ${c},${$} L ${o},${$}`),w=t[t.length-1],k=Z(d,w,e,Y(d,w,e),r);return`${m} ${k} L ${a},${h} Z`}var E=G`:host{display:block;block-size:100%}.svg{fill:currentColor;stroke:transparent;margin:0;display:block;block-size:100%;inline-size:100%;padding:0}.svg .graph-path--highlight{fill:var(--calcite-graph-highlight-fill-color, var(--calcite-color-brand));opacity:.5}:host([hidden]){display:none}[hidden]{display:none}`,b={svg:"svg",graphPath:"graph-path",graphPathHighlight:"graph-path--highlight"},C="calcite-graph",p={host:t=>`${C}-${t}`,linearGradient:t=>`linear-gradient-${C}-${t}`,mask:(t,s)=>`${C}-${t}${s}`},P=class extends X{constructor(){super(...arguments),this.graphId=O(),this.resizeObserver=S("resize",()=>this.requestUpdate()),this.data=[]}static{this.properties={colorStops:[0,{},{attribute:!1}],data:[0,{},{attribute:!1}],highlightMax:[9,{},{type:Number}],highlightMin:[9,{},{type:Number}],max:[11,{},{reflect:!0,type:Number}],min:[11,{},{reflect:!0,type:Number}]}}static{this.styles=E}connectedCallback(){super.connectedCallback(),this.resizeObserver?.observe(this.el)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}render(){let{data:s,colorStops:n,el:r,highlightMax:o,highlightMin:$,min:c,max:h}=this,a=this.graphId,{clientHeight:e,clientWidth:l}=r;if(!s||s.length===0)return z`<svg aria-hidden=true class=${x(b.svg)} height=${e??i} preserveAspectRatio=none viewBox=${`0 0 ${l} ${e}`} width=${l??i}></svg>`;let{min:d,max:m}=I(s),w=d,k=m;(c<d[0]||c>d[0])&&(w=[c,0]),(h>m[0]||h<m[0])&&(k=[h,m[1]]);let y=H({min:w,max:k,width:l,height:e}),M=R({data:s,min:d,max:m,t:y}),u=n?`url(#${p.linearGradient(a)})`:void 0;if($!==void 0&&o!==void 0){let[g]=y([$,k[1]]),[f]=y([o,k[1]]);return z`<svg aria-hidden=true class=${x(b.svg)} height=${e??i} preserveAspectRatio=none viewBox=${`0 0 ${l} ${e}`} width=${l??i}>${v`${n?v`<defs><linearGradient id=${p.linearGradient(a)??i} x1=0 x2=1 y1=0 y2=0>${n.map(({offset:L,color:j,opacity:A})=>v`<stop offset=${`${L*100}%`} stop-color=${j??i} stop-opacity=${A??i} />`)}</linearGradient></defs>`:null}<mask height=100% id=${p.mask(a,1)??i} width=100% x=0% y=0%><path d=${`
2
+ import{a as O}from"./T6CCMW7H.js";import{a as S}from"./VI7SBYXT.js";import{G as X,H as x,J as i,T as N,g as G,h as z,i as v}from"./JLFMHHHY.js";function B(t,s,n){let r=s[0]-t[0],o=n[0]-s[0],$=s[1]-t[1],c=n[1]-s[1],h=$/Number(r||o<0&&0),a=c/Number(o||r<0&&0),e=(h*o+a*r)/(r+o);return(Math.sign(h)+Math.sign(a))*Math.min(Math.abs(h),Math.abs(a),.5*Math.abs(e))||0}function Y(t,s,n){let r=s[0]-t[0],o=s[1]-t[1];return r?(3*o/r-n)/2:n}function Z(t,s,n,r,o){let[$,c]=t,[h,a]=s,e=(h-$)/3,l=o([$+e,c+e*n]).join(","),d=o([h-e,a-e*r]).join(","),m=o([h,a]).join(",");return`C ${l} ${d} ${m}`}function H({width:t,height:s,min:n,max:r}){let o=r[0]-n[0],$=r[1]-n[1];return c=>{let h=(c[0]-n[0])/o*t,a=s-(c[1]-n[1])/$*s;return[h,a]}}function I(t){let[s,n]=t[0],r=[s,n],o=[s,n];return t.reduce(({min:$,max:c},[h,a])=>({min:[Math.min($[0],h),Math.min($[1],a)],max:[Math.max(c[0],h),Math.max(c[1],a)]}),{min:r,max:o})}function R({data:t,min:s,max:n,t:r}){if(t.length<3)return"";let[o,$]=r(t[0]),[c,h]=r(s),[a]=r(n),e,l,d,m=t.reduce((y,M,u)=>{if(l=t[u-2],d=t[u-1],u>1){let g=B(l,d,M),f=e===void 0?Y(l,d,g):e,L=Z(l,d,f,g,r);return e=g,`${y} ${L}`}return y},`M ${c},${h} L ${c},${$} L ${o},${$}`),w=t[t.length-1],k=Z(d,w,e,Y(d,w,e),r);return`${m} ${k} L ${a},${h} Z`}var E=G`:host{display:block;block-size:100%}.svg{fill:currentColor;stroke:transparent;margin:0;display:block;block-size:100%;inline-size:100%;padding:0}.svg .graph-path--highlight{fill:var(--calcite-graph-highlight-fill-color, var(--calcite-color-brand));opacity:.5}:host([hidden]){display:none}[hidden]{display:none}`,b={svg:"svg",graphPath:"graph-path",graphPathHighlight:"graph-path--highlight"},C="calcite-graph",p={host:t=>`${C}-${t}`,linearGradient:t=>`linear-gradient-${C}-${t}`,mask:(t,s)=>`${C}-${t}${s}`},P=class extends X{constructor(){super(...arguments),this.graphId=O(),this.resizeObserver=S("resize",()=>this.requestUpdate()),this.data=[]}static{this.properties={colorStops:[0,{},{attribute:!1}],data:[0,{},{attribute:!1}],highlightMax:[9,{},{type:Number}],highlightMin:[9,{},{type:Number}],max:[11,{},{reflect:!0,type:Number}],min:[11,{},{reflect:!0,type:Number}]}}static{this.styles=E}connectedCallback(){super.connectedCallback(),this.resizeObserver?.observe(this.el)}disconnectedCallback(){super.disconnectedCallback(),this.resizeObserver?.disconnect()}render(){let{data:s,colorStops:n,el:r,highlightMax:o,highlightMin:$,min:c,max:h}=this,a=this.graphId,{clientHeight:e,clientWidth:l}=r;if(!s||s.length===0)return z`<svg aria-hidden=true class=${x(b.svg)} height=${e??i} preserveAspectRatio=none viewBox=${`0 0 ${l} ${e}`} width=${l??i}></svg>`;let{min:d,max:m}=I(s),w=d,k=m;(c<d[0]||c>d[0])&&(w=[c,0]),(h>m[0]||h<m[0])&&(k=[h,m[1]]);let y=H({min:w,max:k,width:l,height:e}),M=R({data:s,min:d,max:m,t:y}),u=n?`url(#${p.linearGradient(a)})`:void 0;if($!==void 0&&o!==void 0){let[g]=y([$,k[1]]),[f]=y([o,k[1]]);return z`<svg aria-hidden=true class=${x(b.svg)} height=${e??i} preserveAspectRatio=none viewBox=${`0 0 ${l} ${e}`} width=${l??i}>${v`${n?v`<defs><linearGradient id=${p.linearGradient(a)??i} x1=0 x2=1 y1=0 y2=0>${n.map(({offset:L,color:j,opacity:A})=>v`<stop offset=${`${L*100}%`} stop-color=${j??i} stop-opacity=${A??i} />`)}</linearGradient></defs>`:null}<mask height=100% id=${p.mask(a,1)??i} width=100% x=0% y=0%><path d=${`
3
3
  M 0,0
4
4
  L ${g-1},0
5
5
  L ${g-1},${e}