@esri/solutions-components 5.1.1 → 5.1.3

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 (168) hide show
  1. package/dist/cdn/{AXEZNIEX.js → 2CCKYJSY.js} +1 -1
  2. package/dist/cdn/{5YD3IE6V.js → 2DCSGUOX.js} +1 -1
  3. package/dist/cdn/{LSMP2ZCO.js → 2EUQOQY3.js} +1 -1
  4. package/dist/cdn/{2MDEEI52.js → 2GHTA5PV.js} +1 -1
  5. package/dist/cdn/{OYMJFSWN.js → 2GJEHDZJ.js} +1 -1
  6. package/dist/cdn/{LRGW6G5E.js → 2XTZLJ5F.js} +1 -1
  7. package/dist/cdn/{R7DGMKJ5.js → 37CMWBMW.js} +1 -1
  8. package/dist/cdn/{SD3DV4KO.js → 37XAYW3Z.js} +1 -1
  9. package/dist/cdn/{LQFA6HOT.js → 3DFMPPUD.js} +1 -1
  10. package/dist/cdn/{VEBBZ2RS.js → 3MN7XFQ2.js} +1 -1
  11. package/dist/cdn/{RY7S2ICL.js → 3N2AUH5S.js} +1 -1
  12. package/dist/cdn/{HQIM7CQS.js → 3TO6KC3G.js} +2 -2
  13. package/dist/cdn/{G2H3X6NS.js → 3W7ANZME.js} +1 -1
  14. package/dist/cdn/{VX3K6KJB.js → 3XOKCST3.js} +1 -1
  15. package/dist/cdn/{6CVQ3V2G.js → 43MZA66W.js} +1 -1
  16. package/dist/cdn/{DXQBDTBG.js → 45JNINYV.js} +1 -1
  17. package/dist/cdn/{PEI3LZZL.js → 4PDKVX4T.js} +1 -1
  18. package/dist/cdn/{5VUSSAPX.js → 56PIVLPU.js} +1 -1
  19. package/dist/cdn/{YJ3DKEEZ.js → 5BJO5ABV.js} +1 -1
  20. package/dist/cdn/{VXIWNY5G.js → 5EYRW6FE.js} +1 -1
  21. package/dist/cdn/{KENYVRIH.js → 5L7HZJBG.js} +1 -1
  22. package/dist/cdn/{P4ZYEBFM.js → 5LM5R34X.js} +1 -1
  23. package/dist/cdn/{JF2ASXUT.js → 6AVCTQ6J.js} +1 -1
  24. package/dist/cdn/{QWQ535RX.js → 6AWTIASQ.js} +1 -1
  25. package/dist/cdn/{NWNUNME7.js → 6FPVZV4K.js} +1 -1
  26. package/dist/cdn/{5A5W5PLO.js → 6SHN7V3N.js} +1 -1
  27. package/dist/cdn/{IVMHEGLY.js → 6UVMG6O6.js} +1 -1
  28. package/dist/cdn/{SEII6Y3C.js → 7IKNLW73.js} +1 -1
  29. package/dist/cdn/{S57RXN34.js → AHC3CH4P.js} +1 -1
  30. package/dist/cdn/{ERQAH6G3.js → AKXVDLK3.js} +1 -1
  31. package/dist/cdn/AO7XKW2U.js +4 -0
  32. package/dist/cdn/{VNYXOWZX.js → ATEM3GJU.js} +115 -115
  33. package/dist/cdn/{P2QNOVPZ.js → AULN2QXN.js} +1 -1
  34. package/dist/cdn/{KWOBLDUS.js → AX2U2PGS.js} +1 -1
  35. package/dist/cdn/{67KMG355.js → B57TWGXS.js} +1 -1
  36. package/dist/cdn/B7YYMYZB.js +2 -0
  37. package/dist/cdn/{LADUP3BG.js → BACWGZE4.js} +1 -1
  38. package/dist/cdn/{D25JFQEK.js → BDAY2SRY.js} +1 -1
  39. package/dist/cdn/{O6IGMQN7.js → BOQUQFNT.js} +1 -1
  40. package/dist/cdn/{LKVPVQIC.js → BTOTDVAS.js} +1 -1
  41. package/dist/cdn/{XYJU325L.js → BWFET22E.js} +1 -1
  42. package/dist/cdn/{MZOWOFAE.js → C7YLT2V6.js} +1 -1
  43. package/dist/cdn/{V24CDHGH.js → CAXEJ55N.js} +1 -1
  44. package/dist/cdn/{DQPIAF2T.js → CYKO5XJY.js} +1 -1
  45. package/dist/cdn/{HOSSEVH5.js → DDUV67TU.js} +1 -1
  46. package/dist/cdn/{F6LBLCUM.js → DRZ2MEHM.js} +1 -1
  47. package/dist/cdn/DTTQLI5W.js +2 -0
  48. package/dist/cdn/{5FW45CM6.js → EJK7PYN5.js} +1 -1
  49. package/dist/cdn/{4G5PYXFM.js → ENJC4SNG.js} +1 -1
  50. package/dist/cdn/{3BL4GCSN.js → ESH7SFXX.js} +1 -1
  51. package/dist/cdn/{B7CVHLVL.js → F46RK2J3.js} +1 -1
  52. package/dist/cdn/{LIEHXKWK.js → F6H43GFC.js} +1 -1
  53. package/dist/cdn/{ECUD4NU6.js → FAHLQLKD.js} +1 -1
  54. package/dist/cdn/{QMQAQSIA.js → FKQHOE2A.js} +1 -1
  55. package/dist/cdn/{WJRVHF3G.js → FL4YRGDB.js} +1 -1
  56. package/dist/cdn/{KPEPW4QL.js → FPBZRT3J.js} +1 -1
  57. package/dist/cdn/{VPHEAUEZ.js → FWRNU7AK.js} +1 -1
  58. package/dist/cdn/{ZX5GQTIE.js → G63VTGNV.js} +1 -1
  59. package/dist/cdn/{RPUUOIRT.js → GCDVJH5S.js} +1 -1
  60. package/dist/cdn/{SUOJTOE2.js → GCLCH6NX.js} +1 -1
  61. package/dist/cdn/{4SYZADNV.js → GLD7SDA5.js} +1 -1
  62. package/dist/cdn/{GSOMYPWB.js → GVREVCUB.js} +1 -1
  63. package/dist/cdn/{NQP26Q5H.js → HCY3VGST.js} +1 -1
  64. package/dist/cdn/{65I4AUS4.js → HKURBCD6.js} +1 -1
  65. package/dist/cdn/{XA6ZDTKA.js → HSZJX2Q4.js} +1 -1
  66. package/dist/cdn/{GSLDFLWZ.js → HXCNKN3S.js} +1 -1
  67. package/dist/cdn/{JB5XLSNA.js → IK3L2OC3.js} +1 -1
  68. package/dist/cdn/{M5VGNDPK.js → IKA3ESQ5.js} +1 -1
  69. package/dist/cdn/{Y7Z6LFBH.js → IXSDSBUI.js} +1 -1
  70. package/dist/cdn/{XXRBPKMI.js → J5Q7IGCO.js} +1 -1
  71. package/dist/cdn/{OU4VLS5H.js → J6PFJWXU.js} +1 -1
  72. package/dist/cdn/{QTCXH2O3.js → JBBUAR3W.js} +1 -1
  73. package/dist/cdn/{E5A7A2YY.js → JCPQ7OOS.js} +1 -1
  74. package/dist/cdn/{BSIPKI63.js → JNQB7T54.js} +1 -1
  75. package/dist/cdn/{Q5LSIHQ4.js → JX7BWUKD.js} +1 -1
  76. package/dist/cdn/KGL266WS.js +2 -0
  77. package/dist/cdn/{MXPZF4RB.js → KGXEY5HR.js} +1 -1
  78. package/dist/cdn/{WZHA7MTK.js → KN5XFC7O.js} +1 -1
  79. package/dist/cdn/{FDNEF4QD.js → KU2QSXAD.js} +1 -1
  80. package/dist/cdn/{N5D7USS3.js → KX4F4INQ.js} +1 -1
  81. package/dist/cdn/{SWUMBQ6T.js → KZBPVSUW.js} +1 -1
  82. package/dist/cdn/{AIZ2P72X.js → LABCYKSC.js} +1 -1
  83. package/dist/cdn/{GYVIOOMC.js → LI3GKZ35.js} +1 -1
  84. package/dist/cdn/{K6GC6RUA.js → MIKSQTTI.js} +1 -1
  85. package/dist/cdn/{DJXQKOIX.js → MOHSZVTU.js} +1 -1
  86. package/dist/cdn/{JKUPRPWA.js → MWTTZLRQ.js} +1 -1
  87. package/dist/cdn/{VIZY55AV.js → MXNYBLUV.js} +1 -1
  88. package/dist/cdn/{7GVLJERR.js → MZ63UWGX.js} +1 -1
  89. package/dist/cdn/N4MCHYQT.js +2 -0
  90. package/dist/cdn/{MVSQRD5M.js → NAZXHTIH.js} +1 -1
  91. package/dist/cdn/{P734JXTN.js → NBWMZOGE.js} +1 -1
  92. package/dist/cdn/{AIM6JKQK.js → NGAS7OCN.js} +1 -1
  93. package/dist/cdn/{224NND54.js → O7LSXSBD.js} +1 -1
  94. package/dist/cdn/{K5EP7XDM.js → OLN76PG4.js} +1 -1
  95. package/dist/cdn/PIRHBQVO.js +351 -0
  96. package/dist/cdn/{ONAAPGO3.js → PLELSLAV.js} +1 -1
  97. package/dist/cdn/{PGFW2YO5.js → PPLHKHZ3.js} +1 -1
  98. package/dist/cdn/{TDDVICGP.js → PWGCOGC7.js} +1 -1
  99. package/dist/cdn/{NEZAEPUJ.js → QEITYICZ.js} +1 -1
  100. package/dist/cdn/{KLZWOBGK.js → QVDDWNQD.js} +1 -1
  101. package/dist/cdn/{OSOSX7F3.js → QWUJHEPY.js} +1 -1
  102. package/dist/cdn/R437P4KQ.js +2 -0
  103. package/dist/cdn/{ZSATEDPE.js → RKVNFHFD.js} +1 -1
  104. package/dist/cdn/{CJJEWE3Q.js → RM6HYEWM.js} +1 -1
  105. package/dist/cdn/{B7TH7XYI.js → RNMVOUE3.js} +1 -1
  106. package/dist/cdn/{US5ONKMV.js → RQQWTDQG.js} +1 -1
  107. package/dist/cdn/{QKPUJ5CZ.js → S3CBTGXW.js} +1 -1
  108. package/dist/cdn/{XYAVR2MM.js → SGWJLKO4.js} +1 -1
  109. package/dist/cdn/{3T56IY7B.js → SI2EHJJ5.js} +1 -1
  110. package/dist/cdn/{GV3GU3O3.js → SY3D5J7W.js} +1 -1
  111. package/dist/cdn/{VTRC64F6.js → TBXAQ6YS.js} +1 -1
  112. package/dist/cdn/{EWIPITVN.js → TFWTXEN7.js} +1 -1
  113. package/dist/cdn/{OTTBXOCQ.js → TKIL55TV.js} +1 -1
  114. package/dist/cdn/{G772MFBV.js → TSLAML4I.js} +1 -1
  115. package/dist/cdn/{KXANPOG5.js → UCHXRVI7.js} +1 -1
  116. package/dist/cdn/{E4OPUBGE.js → UE2HAEBW.js} +1 -1
  117. package/dist/cdn/{EL34IIAJ.js → UEC5OGAS.js} +1 -1
  118. package/dist/cdn/{R6ANOQU2.js → UKAP3ALW.js} +1 -1
  119. package/dist/cdn/{Z324WI3X.js → UNKENPV5.js} +1 -1
  120. package/dist/cdn/{6FNUCCS3.js → V4OFLP6D.js} +1 -1
  121. package/dist/cdn/{PDJXTJHO.js → VBZL2GZD.js} +1 -1
  122. package/dist/cdn/{JGSZS6VC.js → VLP6VQEG.js} +1 -1
  123. package/dist/cdn/{QKQXW6OQ.js → VZY472CH.js} +1 -1
  124. package/dist/cdn/{HMZ4VIJQ.js → WEADUP3Y.js} +1 -1
  125. package/dist/cdn/{VZ2ZZK3Y.js → WKTMPKVR.js} +1 -1
  126. package/dist/cdn/{W3SEKNJO.js → WXFKH5GM.js} +1 -1
  127. package/dist/cdn/{DEATAJID.js → X52CK3FZ.js} +1 -1
  128. package/dist/cdn/{4MAH5ULJ.js → X7GGOH2R.js} +1 -1
  129. package/dist/cdn/{Y3PEQHDX.js → XEON6B7Z.js} +1 -1
  130. package/dist/cdn/{SAVDBHDE.js → XL66TA6C.js} +1 -1
  131. package/dist/cdn/{KPKJ2OVD.js → XN5455P6.js} +1 -1
  132. package/dist/cdn/{4RWJ22V3.js → XOCNSPTC.js} +1 -1
  133. package/dist/cdn/{TK5EXRZL.js → XOPNEAS5.js} +1 -1
  134. package/dist/cdn/{YVNBCXBJ.js → XR3PT7FP.js} +1 -1
  135. package/dist/cdn/{LOSU3FPH.js → XSJOQTEM.js} +1 -1
  136. package/dist/cdn/{Q5XHG472.js → Y2DDFGCN.js} +1 -1
  137. package/dist/cdn/{DGY2VKHA.js → YWO5HXXP.js} +1 -1
  138. package/dist/cdn/{KLFAQLC6.js → ZIIHIUUV.js} +1 -1
  139. package/dist/cdn/{Q6CXYCV6.js → ZOGD4MGP.js} +1 -1
  140. package/dist/cdn/index.js +1 -1
  141. package/dist/chunks/runtime.js +1 -1
  142. package/dist/components/arcgis-solutions-assistant/customElement.js +125 -119
  143. package/dist/components/crowdsource-manager/customElement.d.ts +0 -6
  144. package/dist/components/crowdsource-manager/customElement.js +14 -11
  145. package/dist/components/layer-table/customElement.js +2 -2
  146. package/dist/docs/api.json +1 -1
  147. package/dist/docs/docs.json +1 -1
  148. package/dist/docs/vscode.html-custom-data.json +1 -1
  149. package/dist/docs/web-types.json +1 -1
  150. package/dist/loader.js +1 -1
  151. package/dist/solutions-components_commit.txt +4 -4
  152. package/dist/types/lumina.d.ts +1 -1
  153. package/dist/types/preact.d.ts +1 -1
  154. package/dist/types/react.d.ts +1 -1
  155. package/dist/types/stencil.d.ts +1 -1
  156. package/dist/utils/interfaces.d.ts +1 -0
  157. package/package.json +1 -3
  158. package/dist/cdn/4VP3KTLL.js +0 -2
  159. package/dist/cdn/BQ2LFMED.js +0 -2
  160. package/dist/cdn/CGQALCTZ.js +0 -4
  161. package/dist/cdn/D5OMLQMV.js +0 -2
  162. package/dist/cdn/IGY23J7D.js +0 -2
  163. package/dist/cdn/OGH565H7.js +0 -3
  164. package/dist/cdn/QH343537.js +0 -56
  165. package/dist/cdn/UUKV62PY.js +0 -109
  166. package/dist/cdn/WNM5Z4SM.js +0 -2
  167. package/dist/cdn/XDLYXP3W.js +0 -359
  168. package/dist/cdn/ZPEVEBJD.js +0 -121
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as m}from"./ONLHK7DM.js";import{a as h}from"./VVZAS55G.js";import{b as _}from"./MXPZF4RB.js";import{b as d}from"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{H as c,J as e,K as r,h as o,i as a,l as p,q as g}from"./T3EPRHTT.js";import"./EXBEKVP5.js";var u={CENTER:"center"},f=o`:host{--instant-apps-landing-page-background-color: var(--calcite-color-brand);--instant-apps-landing-page-text-color: var(--calcite-color-text-inverse);--instant-apps-landing-page-entry-button-color: var(--calcite-color-brand);--instant-apps-landing-page-title-text-font-size: var(--calcite-font-size-6);--instant-apps-landing-page-subtitle-text-font-size: var( --calcite-font-size-3 );--instant-apps-landing-page-description-text-font-size: var( --calcite-font-size-0 );--instant-apps-landing-page-icon-image-scale--s: 100px;--instant-apps-landing-page-icon-image-scale--m: 250px;--instant-apps-landing-page-icon-image-scale--l: 500px;--instant-apps-landing-page-entry-button-margin: 0}:host .instant-apps-landing-page,:host calcite-dialog{box-sizing:border-box;display:flex;flex-direction:column;flex:1;transition:top .5s ease-in-out;position:absolute;top:0;left:0;width:100%;height:100%;padding:60px;--calcite-dialog-background-color: var( --instant-apps-landing-page-background-color );--calcite-dialog-text-color: var(--instant-apps-landing-page-text-color);--calcite-color-text-2: var(--instant-apps-landing-page-text-color)}:host .instant-apps-landing-page__title-text,:host calcite-dialog__title-text{color:var(--instant-apps-landing-page-text-color);font-size:var(--instant-apps-landing-page-title-text-font-size);margin:10px 0}:host .instant-apps-landing-page__subtitle-text,:host calcite-dialog__subtitle-text{font-weight:var(--calcite-font-weight-medium);font-size:var(--instant-apps-landing-page-subtitle-text-font-size);margin:10px 0}:host .instant-apps-landing-page__description-text,:host calcite-dialog__description-text{font-size:var(--instant-apps-landing-page-description-text-font-size);width:50%;min-width:250px;margin-top:10px;color:var(--instant-apps-landing-page-text-color)}:host .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__subtitle-text,:host calcite-dialog__title-text,:host calcite-dialog__subtitle-text{text-shadow:0px 4px 3px rgba(0,0,0,.4),0px 8px 13px rgba(0,0,0,.1),0px 18px 23px rgba(0,0,0,.1)}:host .instant-apps-landing-page__icon-image,:host calcite-dialog__icon-image{margin-bottom:10px}:host .instant-apps-landing-page__icon-image-scale--s,:host calcite-dialog__icon-image-scale--s{width:100px}:host .instant-apps-landing-page__icon-image-scale--m,:host calcite-dialog__icon-image-scale--m{width:250px}:host .instant-apps-landing-page__icon-image-scale--l,:host calcite-dialog__icon-image-scale--l{width:500px}:host .instant-apps-landing-page__button-container,:host calcite-dialog__button-container{display:flex;padding:20px 0}:host .instant-apps-landing-page__button-container .instant-apps-landing-page__entry-button,:host calcite-dialog__button-container .instant-apps-landing-page__entry-button{margin:var(--instant-apps-landing-page-entry-button-margin)}:host .instant-apps-landing-page__entry-button,:host calcite-dialog__entry-button{--calcite-color-brand: var( --instant-apps-landing-page-entry-button-color );--calcite-color-brand-hover: var( --instant-apps-landing-page-entry-button-color );--calcite-color-brand-press: var( --instant-apps-landing-page-entry-button-color )}:host .instant-apps-landing-page__background-action,:host calcite-dialog__background-action{position:absolute;top:1%;right:.5%;max-width:300px}:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__remove-transition{transition:none}:host .instant-apps-landing-page__remove-padding{padding:0}:host .instant-apps-landing-page--closed-no-transition{display:none}:host .instant-apps-landing-page--closed{top:-100%}:host .instant-apps-landing-page__alignment--top-center{justify-content:flex-start;align-items:center}:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;justify-content:center;overflow-y:auto}:host .instant-apps-landing-page__alignment--center{justify-content:center;align-items:center}:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;overflow-y:auto}:host .instant-apps-landing-page__alignment--bottom-center{justify-content:flex-end;align-items:center}:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;overflow-y:auto}:host .instant-apps-landing-page__alignment--top-left{justify-content:flex-start;align-items:flex-start}:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-start;overflow-y:auto}:host .instant-apps-landing-page__alignment--center-left{justify-content:center;align-items:flex-start}:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-start;overflow-y:auto}:host .instant-apps-landing-page__alignment--bottom-left{justify-content:flex-end;align-items:flex-start}:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-start;overflow-y:auto}:host .instant-apps-landing-page__alignment--top-right{justify-content:flex-start;align-items:flex-end}:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end;overflow-y:auto}:host .instant-apps-landing-page__alignment--center-right{justify-content:center;align-items:flex-end}:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end;overflow-y:auto}:host .instant-apps-landing-page__alignment--bottom-right{justify-content:flex-end;align-items:flex-end}:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end;overflow-y:auto}:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host instant-apps-sign-in{width:50%}@media screen and (max-width:500px){:host instant-apps-sign-in{width:100%}}@media only screen and (max-width:768px){:host .instant-apps-landing-page__icon-image{max-width:70%;margin-bottom:20px}:host .instant-apps-landing-page__description-text{width:80%}:host .instant-apps-landing-page__title-text{font-size:var(--calcite-font-size-3)}:host .instant-apps-landing-page__subtitle-text{font-size:var(--calcite-font-size-0)}:host .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;margin-top:auto}:host .instant-apps-landing-page__button-container{display:flex;flex-direction:column;width:100%;margin-top:auto}:host .instant-apps-landing-page__button-container .instant-apps-landing-page__entry-button{width:100%;margin-right:unset;margin-bottom:10px}:host .instant-apps-landing-page instant-apps-sign-in{margin-bottom:auto}}@media only screen and (max-width:896px)and (orientation:landscape){:host .instant-apps-landing-page__icon-image{max-width:25%}}`,t={BASE:"instant-apps-landing-page",rtl:"instant-apps-landing-page--rtl",titleText:"instant-apps-landing-page__title-text",subtitleText:"instant-apps-landing-page__subtitle-text",descriptionText:"instant-apps-landing-page__description-text",iconImage:"instant-apps-landing-page__icon-image",alignment:"instant-apps-landing-page__alignment--",entryButton:"instant-apps-landing-page__entry-button",contentContainer:"instant-apps-landing-page__content-container",buttonContainer:"instant-apps-landing-page__button-container",backgroundAction:"instant-apps-landing-page__background-action",iconImageScale:{s:" instant-apps-landing-page__icon-image-scale--s",m:" instant-apps-landing-page__icon-image-scale--m",l:" instant-apps-landing-page__icon-image-scale--l"}},l=class extends c{constructor(){super(...arguments),this._sanitizer=new h({whiteList:{h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],img:["style","src","width","height"],pre:["style"],p:["id","class","style"],div:["id","class","style","role"],span:["id","class","style","role"],figure:["class","style"],header:["id","class","style","role"]}},!0),this._direction=d(),this.iconImageScale="m",this.alignment=u.CENTER,this.disableTransition=!0,this.open=!0,this.entryButtonScale="l",this.fontFamily="var(--calcite-sans-family);",this.landingPageClose=g(),this.landingPageOpen=g()}static{this.properties={titleText:1,subtitleText:1,descriptionText:1,entryButtonText:1,iconImage:1,iconImageScale:1,iconImageAltText:1,alignment:1,disableTransition:5,backgroundImageSrc:1,open:5,entryButtonScale:1,fontFamily:3,enableSignIn:5,portal:0,oauthappid:1}}static{this.styles=f}willUpdate(n){n.has("open")&&(this.hasUpdated||!this.open)&&(this.open?this.landingPageOpen.emit():this.landingPageClose.emit()),this.checkEnableSignIn()}closeLandingPage(){this.open=!1}getAlignmentClass(){return` ${t.alignment}${this.alignment}`}getIconImageScale(){let{iconImageScale:n}=this,{s:i,m:s,l:x}=t.iconImageScale;return n==="l"?x:n==="s"?i:s}getContentStyle(){let n=m(this.fontFamily);return this.backgroundImageSrc?{fontFamily:n,backgroundSize:"cover",backgroundImage:`url("${this.backgroundImageSrc}")`,backgroundRepeat:"no-repeat",backgroundPosition:"center"}:{fontFamily:n}}checkEnableSignIn(){if(this.enableSignIn){let n=localStorage.getItem("signing-in")?Number(localStorage.getItem("signing-in")):null;n!=null&&((Date.now()-n)/(60*1e3)<2&&(this.open=!1),localStorage.removeItem("signing-in"))}}render(){return this.renderLandingPageContent()}renderLandingPageContent(){let n=this.getAlignmentClass(),i=this._direction==="rtl"?` ${t.rtl}`:"",s=this.getContentStyle();return a`<calcite-dialog .open=${this.open} close-disabled placement=cover><div style=${r(s)} class=${`${t.BASE}${i}${n}`}><div class=${e(t.backgroundAction)}><slot name=background-action></slot></div><div class=${e(t.contentContainer)}>${this.renderIconImage()}${this.renderTitleText()}${this.renderSubtitleText()}${this.renderDescriptionText()}</div>${this.renderEntryButtonContainer()}</div></calcite-dialog>`}renderEntryButtonContainer(){return this.enableSignIn?this.renderLandingPageSignIn():a`<div class=${e(t.buttonContainer)}>${this.renderEntryButton()}<slot name=secondary-action></slot></div>`}renderLandingPageSignIn(){return a`<instant-apps-sign-in type=landingPage landing-page .portal=${this.portal} .oauthappid=${this.oauthappid} .closeLandingPage=${this.closeLandingPage.bind(this)}></instant-apps-sign-in>`}renderIconImage(){return this.iconImage?a`<img class=${`${t.iconImage}${this.getIconImageScale()}`} src=${this.iconImage??p} alt=${this.iconImageAltText??p}>`:null}renderTitleText(){return a`<h1 class=${e(t.titleText)}>${this.titleText}</h1>`}renderSubtitleText(){return a`<span class=${e(t.subtitleText)}>${this.subtitleText}</span>`}renderDescriptionText(){return a`<p class=${e(t.descriptionText)} .innerHTML=${this._sanitizer?.sanitize(this.descriptionText)??""??""}></p>`}renderEntryButton(){return a`<calcite-button class=${e(t.entryButton)} @click=${this.closeLandingPage} .scale=${this.entryButtonScale} appearance=outline-fill>${this.entryButtonText?this.entryButtonText:"Enter"}</calcite-button>`}};_("instant-apps-landing-page",l);export{l as InstantAppsLandingPage};
2
+ import{a as m}from"./ONLHK7DM.js";import{a as h}from"./VVZAS55G.js";import{b as _}from"./KGXEY5HR.js";import{b as d}from"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{H as c,J as e,K as r,h as o,i as a,l as p,q as g}from"./T3EPRHTT.js";import"./EXBEKVP5.js";var u={CENTER:"center"},f=o`:host{--instant-apps-landing-page-background-color: var(--calcite-color-brand);--instant-apps-landing-page-text-color: var(--calcite-color-text-inverse);--instant-apps-landing-page-entry-button-color: var(--calcite-color-brand);--instant-apps-landing-page-title-text-font-size: var(--calcite-font-size-6);--instant-apps-landing-page-subtitle-text-font-size: var( --calcite-font-size-3 );--instant-apps-landing-page-description-text-font-size: var( --calcite-font-size-0 );--instant-apps-landing-page-icon-image-scale--s: 100px;--instant-apps-landing-page-icon-image-scale--m: 250px;--instant-apps-landing-page-icon-image-scale--l: 500px;--instant-apps-landing-page-entry-button-margin: 0}:host .instant-apps-landing-page,:host calcite-dialog{box-sizing:border-box;display:flex;flex-direction:column;flex:1;transition:top .5s ease-in-out;position:absolute;top:0;left:0;width:100%;height:100%;padding:60px;--calcite-dialog-background-color: var( --instant-apps-landing-page-background-color );--calcite-dialog-text-color: var(--instant-apps-landing-page-text-color);--calcite-color-text-2: var(--instant-apps-landing-page-text-color)}:host .instant-apps-landing-page__title-text,:host calcite-dialog__title-text{color:var(--instant-apps-landing-page-text-color);font-size:var(--instant-apps-landing-page-title-text-font-size);margin:10px 0}:host .instant-apps-landing-page__subtitle-text,:host calcite-dialog__subtitle-text{font-weight:var(--calcite-font-weight-medium);font-size:var(--instant-apps-landing-page-subtitle-text-font-size);margin:10px 0}:host .instant-apps-landing-page__description-text,:host calcite-dialog__description-text{font-size:var(--instant-apps-landing-page-description-text-font-size);width:50%;min-width:250px;margin-top:10px;color:var(--instant-apps-landing-page-text-color)}:host .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__subtitle-text,:host calcite-dialog__title-text,:host calcite-dialog__subtitle-text{text-shadow:0px 4px 3px rgba(0,0,0,.4),0px 8px 13px rgba(0,0,0,.1),0px 18px 23px rgba(0,0,0,.1)}:host .instant-apps-landing-page__icon-image,:host calcite-dialog__icon-image{margin-bottom:10px}:host .instant-apps-landing-page__icon-image-scale--s,:host calcite-dialog__icon-image-scale--s{width:100px}:host .instant-apps-landing-page__icon-image-scale--m,:host calcite-dialog__icon-image-scale--m{width:250px}:host .instant-apps-landing-page__icon-image-scale--l,:host calcite-dialog__icon-image-scale--l{width:500px}:host .instant-apps-landing-page__button-container,:host calcite-dialog__button-container{display:flex;padding:20px 0}:host .instant-apps-landing-page__button-container .instant-apps-landing-page__entry-button,:host calcite-dialog__button-container .instant-apps-landing-page__entry-button{margin:var(--instant-apps-landing-page-entry-button-margin)}:host .instant-apps-landing-page__entry-button,:host calcite-dialog__entry-button{--calcite-color-brand: var( --instant-apps-landing-page-entry-button-color );--calcite-color-brand-hover: var( --instant-apps-landing-page-entry-button-color );--calcite-color-brand-press: var( --instant-apps-landing-page-entry-button-color )}:host .instant-apps-landing-page__background-action,:host calcite-dialog__background-action{position:absolute;top:1%;right:.5%;max-width:300px}:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text,:host .instant-apps-landing-page--rtl.instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__remove-transition{transition:none}:host .instant-apps-landing-page__remove-padding{padding:0}:host .instant-apps-landing-page--closed-no-transition{display:none}:host .instant-apps-landing-page--closed{top:-100%}:host .instant-apps-landing-page__alignment--top-center{justify-content:flex-start;align-items:center}:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;justify-content:center;overflow-y:auto}:host .instant-apps-landing-page__alignment--center{justify-content:center;align-items:center}:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;overflow-y:auto}:host .instant-apps-landing-page__alignment--bottom-center{justify-content:flex-end;align-items:center}:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;overflow-y:auto}:host .instant-apps-landing-page__alignment--top-left{justify-content:flex-start;align-items:flex-start}:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-start;overflow-y:auto}:host .instant-apps-landing-page__alignment--center-left{justify-content:center;align-items:flex-start}:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-start;overflow-y:auto}:host .instant-apps-landing-page__alignment--bottom-left{justify-content:flex-end;align-items:flex-start}:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-start;overflow-y:auto}:host .instant-apps-landing-page__alignment--top-right{justify-content:flex-start;align-items:flex-end}:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end;overflow-y:auto}:host .instant-apps-landing-page__alignment--center-right{justify-content:center;align-items:flex-end}:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end;overflow-y:auto}:host .instant-apps-landing-page__alignment--bottom-right{justify-content:flex-end;align-items:flex-end}:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:flex-end;overflow-y:auto}:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--top-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--center-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--bottom-left .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:left}:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--top-center .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--center .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--bottom-center .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:center}:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--top-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--center-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__title-text,:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__subtitle-text,:host .instant-apps-landing-page__alignment--bottom-right .instant-apps-landing-page__content-container .instant-apps-landing-page__description-text{text-align:right}:host instant-apps-sign-in{width:50%}@media screen and (max-width:500px){:host instant-apps-sign-in{width:100%}}@media only screen and (max-width:768px){:host .instant-apps-landing-page__icon-image{max-width:70%;margin-bottom:20px}:host .instant-apps-landing-page__description-text{width:80%}:host .instant-apps-landing-page__title-text{font-size:var(--calcite-font-size-3)}:host .instant-apps-landing-page__subtitle-text{font-size:var(--calcite-font-size-0)}:host .instant-apps-landing-page__content-container{display:flex;flex-direction:column;align-items:center;margin-top:auto}:host .instant-apps-landing-page__button-container{display:flex;flex-direction:column;width:100%;margin-top:auto}:host .instant-apps-landing-page__button-container .instant-apps-landing-page__entry-button{width:100%;margin-right:unset;margin-bottom:10px}:host .instant-apps-landing-page instant-apps-sign-in{margin-bottom:auto}}@media only screen and (max-width:896px)and (orientation:landscape){:host .instant-apps-landing-page__icon-image{max-width:25%}}`,t={BASE:"instant-apps-landing-page",rtl:"instant-apps-landing-page--rtl",titleText:"instant-apps-landing-page__title-text",subtitleText:"instant-apps-landing-page__subtitle-text",descriptionText:"instant-apps-landing-page__description-text",iconImage:"instant-apps-landing-page__icon-image",alignment:"instant-apps-landing-page__alignment--",entryButton:"instant-apps-landing-page__entry-button",contentContainer:"instant-apps-landing-page__content-container",buttonContainer:"instant-apps-landing-page__button-container",backgroundAction:"instant-apps-landing-page__background-action",iconImageScale:{s:" instant-apps-landing-page__icon-image-scale--s",m:" instant-apps-landing-page__icon-image-scale--m",l:" instant-apps-landing-page__icon-image-scale--l"}},l=class extends c{constructor(){super(...arguments),this._sanitizer=new h({whiteList:{h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],img:["style","src","width","height"],pre:["style"],p:["id","class","style"],div:["id","class","style","role"],span:["id","class","style","role"],figure:["class","style"],header:["id","class","style","role"]}},!0),this._direction=d(),this.iconImageScale="m",this.alignment=u.CENTER,this.disableTransition=!0,this.open=!0,this.entryButtonScale="l",this.fontFamily="var(--calcite-sans-family);",this.landingPageClose=g(),this.landingPageOpen=g()}static{this.properties={titleText:1,subtitleText:1,descriptionText:1,entryButtonText:1,iconImage:1,iconImageScale:1,iconImageAltText:1,alignment:1,disableTransition:5,backgroundImageSrc:1,open:5,entryButtonScale:1,fontFamily:3,enableSignIn:5,portal:0,oauthappid:1}}static{this.styles=f}willUpdate(n){n.has("open")&&(this.hasUpdated||!this.open)&&(this.open?this.landingPageOpen.emit():this.landingPageClose.emit()),this.checkEnableSignIn()}closeLandingPage(){this.open=!1}getAlignmentClass(){return` ${t.alignment}${this.alignment}`}getIconImageScale(){let{iconImageScale:n}=this,{s:i,m:s,l:x}=t.iconImageScale;return n==="l"?x:n==="s"?i:s}getContentStyle(){let n=m(this.fontFamily);return this.backgroundImageSrc?{fontFamily:n,backgroundSize:"cover",backgroundImage:`url("${this.backgroundImageSrc}")`,backgroundRepeat:"no-repeat",backgroundPosition:"center"}:{fontFamily:n}}checkEnableSignIn(){if(this.enableSignIn){let n=localStorage.getItem("signing-in")?Number(localStorage.getItem("signing-in")):null;n!=null&&((Date.now()-n)/(60*1e3)<2&&(this.open=!1),localStorage.removeItem("signing-in"))}}render(){return this.renderLandingPageContent()}renderLandingPageContent(){let n=this.getAlignmentClass(),i=this._direction==="rtl"?` ${t.rtl}`:"",s=this.getContentStyle();return a`<calcite-dialog .open=${this.open} close-disabled placement=cover><div style=${r(s)} class=${`${t.BASE}${i}${n}`}><div class=${e(t.backgroundAction)}><slot name=background-action></slot></div><div class=${e(t.contentContainer)}>${this.renderIconImage()}${this.renderTitleText()}${this.renderSubtitleText()}${this.renderDescriptionText()}</div>${this.renderEntryButtonContainer()}</div></calcite-dialog>`}renderEntryButtonContainer(){return this.enableSignIn?this.renderLandingPageSignIn():a`<div class=${e(t.buttonContainer)}>${this.renderEntryButton()}<slot name=secondary-action></slot></div>`}renderLandingPageSignIn(){return a`<instant-apps-sign-in type=landingPage landing-page .portal=${this.portal} .oauthappid=${this.oauthappid} .closeLandingPage=${this.closeLandingPage.bind(this)}></instant-apps-sign-in>`}renderIconImage(){return this.iconImage?a`<img class=${`${t.iconImage}${this.getIconImageScale()}`} src=${this.iconImage??p} alt=${this.iconImageAltText??p}>`:null}renderTitleText(){return a`<h1 class=${e(t.titleText)}>${this.titleText}</h1>`}renderSubtitleText(){return a`<span class=${e(t.subtitleText)}>${this.subtitleText}</span>`}renderDescriptionText(){return a`<p class=${e(t.descriptionText)} .innerHTML=${this._sanitizer?.sanitize(this.descriptionText)??""??""}></p>`}renderEntryButton(){return a`<calcite-button class=${e(t.entryButton)} @click=${this.closeLandingPage} .scale=${this.entryButtonScale} appearance=outline-fill>${this.entryButtonText?this.entryButtonText:"Enter"}</calcite-button>`}};_("instant-apps-landing-page",l);export{l as InstantAppsLandingPage};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as r}from"./AIZ2P72X.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{b as n}from"./YJ3DKEEZ.js";import{H as o,h as l,i as a,q as i}from"./T3EPRHTT.js";import"./EXBEKVP5.js";var c=l`:host{display:block}`,s=class extends o{constructor(){super(...arguments),this.ids=[],this.open=!1,this._isDeleting=!1,this._translations=r({name:"delete-dialog",blocking:!0}),this.editsComplete=i(),this.deleteDialogClose=i()}static{this.properties={ids:0,layer:0,open:5,_isDeleting:16,_translations:16}}static{this.styles=c}render(){let e=this.layer?.title||"",t=this.ids.length===1?(this._translations.confirmSingle||"").replace("{{layer-name}}",e):(this._translations.confirmMultiple||"").replace("{{layer-name}}",e);return a`<calcite-dialog .heading=${this._translations.deleteFeature} kind=danger modal @calciteDialogClose=${()=>this._close()} .open=${this.open} width=s><div>${t}</div><calcite-button appearance=outline kind=danger @click=${()=>this._close()} slot=footer-end width=full>${this._translations.cancel}</calcite-button><calcite-button kind=danger .loading=${this._isDeleting} @click=${()=>{this._deleteFeatures()}} slot=footer-end width=full>${this._translations.delete}</calcite-button></calcite-dialog>`}async _deleteFeatures(){if(this.layer){this._isDeleting=!0;let e=this.ids.map(t=>({objectId:Number(t)}));await this.layer.applyEdits({deleteFeatures:e}),this._isDeleting=!1,this._close(),this.editsComplete.emit("delete")}}_close(){this.open=!1,this.deleteDialogClose.emit()}};n("delete-dialog",s);export{s as DeleteDialog};
2
+ import{a as r}from"./LABCYKSC.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{b as n}from"./5BJO5ABV.js";import{H as o,h as l,i as a,q as i}from"./T3EPRHTT.js";import"./EXBEKVP5.js";var c=l`:host{display:block}`,s=class extends o{constructor(){super(...arguments),this.ids=[],this.open=!1,this._isDeleting=!1,this._translations=r({name:"delete-dialog",blocking:!0}),this.editsComplete=i(),this.deleteDialogClose=i()}static{this.properties={ids:0,layer:0,open:5,_isDeleting:16,_translations:16}}static{this.styles=c}render(){let e=this.layer?.title||"",t=this.ids.length===1?(this._translations.confirmSingle||"").replace("{{layer-name}}",e):(this._translations.confirmMultiple||"").replace("{{layer-name}}",e);return a`<calcite-dialog .heading=${this._translations.deleteFeature} kind=danger modal @calciteDialogClose=${()=>this._close()} .open=${this.open} width=s><div>${t}</div><calcite-button appearance=outline kind=danger @click=${()=>this._close()} slot=footer-end width=full>${this._translations.cancel}</calcite-button><calcite-button kind=danger .loading=${this._isDeleting} @click=${()=>{this._deleteFeatures()}} slot=footer-end width=full>${this._translations.delete}</calcite-button></calcite-dialog>`}async _deleteFeatures(){if(this.layer){this._isDeleting=!0;let e=this.ids.map(t=>({objectId:Number(t)}));await this.layer.applyEdits({deleteFeatures:e}),this._isDeleting=!1,this._close(),this.editsComplete.emit("delete")}}_close(){this.open=!1,this.deleteDialogClose.emit()}};n("delete-dialog",s);export{s as DeleteDialog};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as w}from"./2D6XDWYA.js";import{a as _}from"./65I4AUS4.js";import{b}from"./MXPZF4RB.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{F as u,G as g,H as f,J as s,h as m,i as o,l as h}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([M])=>{var d={"instant-apps":{path:"M11.206 4.805v-1.38a2.231 2.231 0 0 1 2.23-2.231h13.168a2.231 2.231 0 0 1 2.231 2.23v11.15a2.231 2.231 0 0 1-2.23 2.231h-1.398V5.555a.75.75 0 0 0-.75-.75zM30.94 27.204l-5.447-4.41a.211.211 0 0 0-.344.164v2.225H8.197a1.344 1.344 0 0 1-1.344-1.344V11.665a.75.75 0 0 1 .75-.75h9.872a.75.75 0 0 1 .75.75l-.003 7.534a2.422 2.422 0 0 1-.798 1.796l-.945.855h4.3a1.075 1.075 0 0 0 1.074-1.075v-10.54a2.231 2.231 0 0 0-2.23-2.23H5.354a2.148 2.148 0 0 0-2.13 2.23v16.507a2.231 2.231 0 0 0 2.23 2.231l19.695-.003v2.725a.211.211 0 0 0 .344.164l5.447-4.41a.158.158 0 0 0 0-.245z",fill:"#83a238"},"map-viewer":{path:"M21.647 13.706A1.647 1.647 0 1 1 20 15.353a1.647 1.647 0 0 1 1.647-1.647zM19 19.083A1.917 1.917 0 1 1 17.082 21 1.917 1.917 0 0 1 19 19.082zm7.684 3.393a2.433 2.433 0 0 1-.64 1.776l-.01.012c-1.045 1.134-3.215 1.8-5.738 1.8-3.815 0-5.054-1.485-8.586-1.828a6.765 6.765 0 0 1 .566-4.07c.98-1.674 2.445-1.568 3.41-2.724.967-1.157.033-3.384 1.397-4.748 1.539-1.538 3.44-.12 4.57-2.542.877-1.884 1.84-2.98 3.68-3.35a.39.39 0 0 1 .047.07c.132.695 1.097 11.68 1.304 15.604zM6.208 8.864A3.054 3.054 0 0 1 8.115 6.17s2.425-.88 3.09-1.029a2.637 2.637 0 0 1 .314-.01 4.967 4.967 0 0 1 1.157.157l.404.095a7.26 7.26 0 0 0-.238 3.294c.188 1.354.657 2.399-.066 4.361-1.003 2.721-2.901 2.585-3.857 4.562-1.285 2.657.21 6.226-2.182 6.835l.004.002.003.003c-.801.114-1.363.22-1.663.272zm21.549-5.09a.055.055 0 0 0-.022-.037.058.058 0 0 0-.037-.01l-7.37 1.025-8.771-2.742a.227.227 0 0 0-.162.01L3.594 5.566a.054.054 0 0 0-.032.045L1.58 29a41.592 41.592 0 0 1 9.115-1.285c2.765.094 6.646 2.287 10.29 2.177 3.51-.108 8.582-2.382 9.564-2.836a.054.054 0 0 0 .03-.056z",fill:"#3DB8FF"},"story-maps":{path:"M25.5 0C23.015 0 21 .953 21 3.433v8.517a1.467 1.467 0 0 0 .43 1.038l3.837 3.827a.33.33 0 0 0 .466 0l3.836-3.827A1.467 1.467 0 0 0 30 11.95V3.433C30 .953 27.985 0 25.5 0zm0 8.1a2.6 2.6 0 1 1 2.6-2.599A2.599 2.599 0 0 1 25.5 8.1zm-7.856.453c.294-.153.312-.457.312-.788v-2.31a.104.104 0 0 0-.129-.1 6.128 6.128 0 0 0-2.248 1.19.14.14 0 0 1-.167.008c-3.437-2.283-8.543-1.52-12.131-.988-.432.064-1.762.34-2.164.424A.146.146 0 0 0 1 6.133V26.69a.147.147 0 0 0 .05.11.134.134 0 0 0 .116.035A36.394 36.394 0 0 1 9.5 25.781c3.283.054 4.403.96 4.967 1.513l.915.897a.164.164 0 0 0 .23 0l.916-.897a5.98 5.98 0 0 1 3.972-1.47 25.341 25.341 0 0 1 5.715.516c.718.109 1.46.22 2.186.312l1.251.16a.308.308 0 0 0 .348-.305v-7.375a.161.161 0 0 0-.303-.077l-.107.2a7.218 7.218 0 0 1-6.902 3.766 10.455 10.455 0 0 0-5.688.796V9.454a.89.89 0 0 1 .332-.693 2.058 2.058 0 0 1 .312-.208zM14 23.817c-3.071-1.38-5.998-.808-9.447-.293l-.253.036a.263.263 0 0 1-.3-.259V8.525a.098.098 0 0 1 .084-.097l.804-.115c2.518-.372 6.303-1.048 8.708.515a.89.89 0 0 1 .404.746z",fill:"#4fbaa9"},dashboards:{path:"M25.819 28H23.18a.181.181 0 0 1-.181-.181V13.18a.181.181 0 0 1 .181-.181h2.638a.181.181 0 0 1 .181.181V27.82a.181.181 0 0 1-.181.181zM21 27.816v-9.631a.184.184 0 0 0-.184-.185h-2.631a.184.184 0 0 0-.185.184v9.631a.184.184 0 0 0 .184.185h2.631a.184.184 0 0 0 .185-.184zm9.82.184a.18.18 0 0 0 .18-.18v-7.64a.18.18 0 0 0-.18-.18h-2.64a.18.18 0 0 0-.18.18v7.64a.18.18 0 0 0 .18.18zM7 9.267v10.475c.706.033 3.538-1.718 4.274-4.7.679-2.751 3.485-2.864 4.443-2.94 1.766-.14 3.588-.607 4.566-2.798A.216.216 0 0 0 20.085 9H7.267A.267.267 0 0 0 7 9.267zm18.997-1.053A4.411 4.411 0 0 0 21.63 4H2.684A.684.684 0 0 0 2 4.684V21.81A3.19 3.19 0 0 0 5.19 25h9.565a.245.245 0 0 0 .245-.245v-2.362a.393.393 0 0 0-.393-.393H6.38A1.385 1.385 0 0 1 5 20.619V7.349A.348.348 0 0 1 5.348 7h16.324A1.346 1.346 0 0 1 23 8.363v1.28a.357.357 0 0 0 .357.357h2.599a.046.046 0 0 0 .046-.046z",fill:"#ee9e01"},"experience-builder":{path:"M30.85 12.82l-2.85 5v7.44A1.78 1.78 0 0 1 26.22 27H25V7.75a.76.76 0 0 0-.75-.75H12V1.31a.28.28 0 0 1 .42-.25L17.51 4h8.71A1.78 1.78 0 0 1 28 5.78v4.42l2.54 1.47a.83.83 0 0 1 .31 1.15zM12 18h8v-6h-8zm7.62 5H7.75a.76.76 0 0 1-.75-.75V4H5.78A1.78 1.78 0 0 0 4 5.78V13l-2.89 5a.85.85 0 0 0 .31 1.15L4 20.59v4.61A1.78 1.78 0 0 0 5.78 27h8.62l5.18 3a.28.28 0 0 0 .42-.24v-6.39a.38.38 0 0 0-.38-.37z",fill:"#09b8ca"},geoBIM:{path:"M17.802 21.398l6.2 2.557-5.14 2.133a.772.772 0 0 1-1.06-.717zM9.311 7.868a.604.604 0 0 1-.003-1.122L16 4.169l8.12 3.148-8.119 3.184zm-3.5 1.541l8.387 3.413v12.554a.772.772 0 0 1-1.06.717l-6.297-2.736a1.639 1.639 0 0 1-1.03-1.521zM3.844 6.03a1.316 1.316 0 0 0-.827 1.22v17.395a1.316 1.316 0 0 0 .827 1.221L16 30.888l12.983-5.317v-2.423l-7.156-3.023 7.156-2.963v-1.95l-5.101-2.2-3.867 1.516L24 16.123l-6.199 2.505v-5.711l.073-.122 11.108-4.487v-1.95l-12.47-5.047a1.384 1.384 0 0 0-1.027 0z",fill:"#11ad1d"},notebooks:{path:"M2.941 25A.906.906 0 0 1 2 24.135v-.271A.906.906 0 0 1 2.941 23h3.118a.906.906 0 0 1 .941.864v.271a.906.906 0 0 1-.941.865zm3.118-8A.906.906 0 0 0 7 16.135v-.271A.906.906 0 0 0 6.059 15H2.941a.906.906 0 0 0-.941.864v.271a.906.906 0 0 0 .941.865zm0-8A.906.906 0 0 0 7 8.135v-.271A.906.906 0 0 0 6.059 7H2.941A.906.906 0 0 0 2 7.864v.271A.906.906 0 0 0 2.941 9zm9.44 16h-3.726a.773.773 0 0 1-.773-.774V6.171A.172.172 0 0 1 11.172 6H15.5a.5.5 0 0 0 .5-.5v-2a.5.5 0 0 0-.5-.5H5.342A1.345 1.345 0 0 0 4 4.343V5h2.059A2.904 2.904 0 0 1 9 7.858v.277A2.907 2.907 0 0 1 6.059 11H4v2h2.059A2.907 2.907 0 0 1 9 15.864v.271A2.907 2.907 0 0 1 6.059 19H4v2h2.059A2.907 2.907 0 0 1 9 23.864v.271A2.907 2.907 0 0 1 6.059 27H4v1.405a.595.595 0 0 0 .595.595H15.5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zM20 3.5v2a.5.5 0 0 0 .5.5h4a.5.5 0 0 1 .5.5v18a.5.5 0 0 1-.5.5h-4a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h8a.5.5 0 0 0 .5-.5v-25a.5.5 0 0 0-.5-.5h-8a.5.5 0 0 0-.499.5z",fill:"#6e6e6e"},sites:{path:"M2.656 29A.656.656 0 0 1 2 28.344V6.185A3.189 3.189 0 0 1 5.185 3H29.72a.281.281 0 0 1 .281.281v22.53A3.194 3.194 0 0 1 26.81 29zm2.838-3h21.211a.295.295 0 0 0 .296-.295V13.494a.493.493 0 0 0-.493-.494H5v12.506a.494.494 0 0 0 .494.494zM23 9.91a.09.09 0 0 0 .09.09h3.82a.09.09 0 0 0 .09-.09V6.026A.026.026 0 0 0 26.974 6h-3.948a.026.026 0 0 0-.026.026zM6.633 6A1.597 1.597 0 0 0 5 7.595V10h14.523A.477.477 0 0 0 20 9.523V6.477A.477.477 0 0 0 19.523 6zM16 22v-5h7v5zm-7-2v-3h3v3z",fill:"#7842ed"},webAppBuilder:{path:"M15.044 19.974a.188.188 0 0 1-.192-.001l-3.762-2.35a.188.188 0 0 1-.09-.16v-4.098a.188.188 0 0 1 .096-.163l3.761-2.178a.188.188 0 0 1 .182-.001l3.863 2.179a.188.188 0 0 1 .098.165v4.095a.187.187 0 0 1-.092.161zm15.13-1.04a.052.052 0 0 0 .099.022 8.048 8.048 0 0 0 .67-3.147 7.155 7.155 0 0 0-3.507-6.213L17.59 3.768a4.054 4.054 0 0 0-1.968-.627 3.95 3.95 0 0 0-1.894.485c-.607.334-1.132.67-1.278.754a2.951 2.951 0 0 0-1.39 2.506v1.078a.2.2 0 0 0 .307.167l1.365-.87a4.988 4.988 0 0 1 2.319-.792 4.62 4.62 0 0 1 2.219.792s8.442 5.017 9.392 5.576a7.045 7.045 0 0 1 3.513 6.084zM9.546 23.55l.947-.547a.2.2 0 0 0 0-.345l-1.369-.79a4.326 4.326 0 0 1-2.13-3.842V7.286a7.16 7.16 0 0 1 3.63-6.083l.081-.05a.025.025 0 0 0-.012-.045l-.25-.005a8.333 8.333 0 0 0-3.887.994A7.102 7.102 0 0 0 3.069 8.31v10.786a3.96 3.96 0 0 0 1.89 3.362c.894.545 1.605.974 1.81 1.092a2.787 2.787 0 0 0 2.777 0zm4.383 6.37l9.997-5.773a3.959 3.959 0 0 0 1.967-3.32c.021-.929.034-1.604.034-1.806a2.786 2.786 0 0 0-1.39-2.406l-1.123-.57a.2.2 0 0 0-.289.177v1.604a4.45 4.45 0 0 1-2.218 3.842l-3.708 2.14a3.366 3.366 0 0 1-.256.135L11.6 27.128a6.427 6.427 0 0 1-3.343.938 7.137 7.137 0 0 1-3.513-1.038c-.09-.052-.38-.226-.797-.479a.094.094 0 0 0-.134.12 7.182 7.182 0 0 0 2.942 3.25 7.241 7.241 0 0 0 3.587 1.028 7.243 7.243 0 0 0 3.587-1.028z",fill:"#09b8ca"},urban:{path:"M32 14l-4 .003a1 1 0 0 0-1 1V21a1 1 0 0 1-1 1h-2V5.451l-7.598-3.335A1 1 0 0 0 15 3.03V25a1 1 0 0 1-1 1h-2V11.24h-.02L7.5 9l-4.48 2.24H3V20H0v4h5a1 1 0 0 0 1-1V12.717L7.5 12l1.5.717V28a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2V6.094l3 1.317V24a2 2 0 0 0 2 2h5.02A1.977 1.977 0 0 0 30 24.024V17h2z",fill:"#3DB8FF"}},x=new Map;Object.keys(d).forEach(r=>{x.set(r,`<svg viewBox="0 0 32 32" width="32" height="32" fill="${d[r].fill}"><path d="${d[r].path}"/></svg>`)});function c(r){return x.get(r)||""}var V=m`:host{display:block;--instant-apps-create-action-background: var(--calcite-color-foreground-1);--instant-apps-create-action-background-hover: var( --calcite-color-foreground-2 );--instant-apps-create-action-background-press: var( --calcite-color-foreground-3 );--instant-apps-create-action-height: 100%;--instant-apps-create-action-width: fit-content;--instant-apps-create-action-icon-color: var(--calcite-color-text-3);--instant-apps-create-action-icon-hover-color: var(--calcite-color-text-1);--instant-apps-create-background: var(--calcite-color-foreground-1);--instant-apps-create-text-color: var(--calcite-color-text-1);--instant-apps-create-popover-width: 450px}.instant-apps-create{height:100%}.instant-apps-create *{box-sizing:border-box}.instant-apps-create__popover-container,.instant-apps-create__inline-container{padding:1rem 1.5rem;background:var(--instant-apps-create-background);--calcite-color-text-1: var(--instant-apps-create-text-color)}.instant-apps-create__popover-container{width:var(--instant-apps-create-popover-width)}.instant-apps-create calcite-popover{--calcite-color-foreground-1: var(--instant-apps-create-background)}.instant-apps-create calcite-button:last-of-type{margin-top:.5rem}.instant-apps-create__header h3{margin:0;font-weight:var(--calcite-font-weight-medium)}.instant-apps-create__header p{margin:0;padding:0 0 .5rem;font-weight:var(--calcite-font-weight-normal)}.instant-apps-create__options{display:flex;justify-content:space-between;align-items:center;flex-direction:column}.instant-apps-create__option{display:flex;color:inherit;text-decoration:inherit;height:fit-content;margin-bottom:.5rem}.instant-apps-create__option:first-of-type{margin-top:.5rem}.instant-apps-create__option:last-of-type{margin-bottom:0}.instant-apps-create__option{cursor:pointer;--calcite-color-text-link: var(--calcite-color-text-1);align-items:stretch;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)),var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)),var(--tw-shadow);outline-offset:0;outline-color:var(--calcite-color-focus);transition:outline-offset .1s ease-in-out,outline-color .1s ease-in-out}.instant-apps-create__option:hover{outline:1px solid var(--calcite-color-focus);outline-offset:2px}.instant-apps-create__option-icon{display:flex;background:var(--calcite-color-foreground-2);color:var(--calcite-color-text-1);font-size:1.25rem;background-color:var(--calcite-color-background);justify-content:center;align-items:center;flex:1 1 auto;max-width:5rem;min-width:5rem;height:auto}.instant-apps-create__option-icon svg{display:block;overflow-clip-margin:content-box;overflow:hidden}.instant-apps-create__option-text{min-height:2rem;font-size:.75rem;color:var(--calcite-color-text-2);padding:.75rem 0 0 .75rem}.instant-apps-create__option-text-wrapper{display:flex;align-items:center}.instant-apps-create__option-text h3{margin:0;font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium)}.instant-apps-create__option-text calcite-icon{margin-left:.25rem;color:var(--calcite-color-text-link)}.instant-apps-create__option-text p{margin:0;font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-3);line-height:1.35;min-height:3rem}`,n={baseDark:"instant-apps-create calcite-mode-dark",baseLight:"instant-apps-create calcite-mode-light",inlineContainer:"instant-apps-create__inline-container",popoverContainer:"instant-apps-create__popover-container",header:"instant-apps-create__header",option:"instant-apps-create__option",optionIcon:"instant-apps-create__option-icon",optionText:"instant-apps-create__option-text",optionTextWrapper:"instant-apps-create__option-text-wrapper",optionTitle:"instant-apps-create__option-title",optionSubtitle:"instant-apps-create__option-subtitle"},v=class extends f{constructor(){super(...arguments),this._messages=_({name:"instant-apps-create",blocking:!0}),this.popoverEl=u(),this.baseClass=n.baseLight,this.popoverIcon="grid",this.mode="inline",this.popoverPositioning="absolute",this.popoverPlacement="auto",this.showHeader=!0,this.options=["instant-apps","map-viewer","story-maps","experience-builder","dashboards"]}static{this.properties={baseClass:16,popoverIcon:1,mode:3,popoverPositioning:1,popoverPlacement:1,showHeader:5,content:0,options:0,portal:0}}static{this.styles=V}load(){this.baseClass=w(this.el)==="dark"?n.baseDark:n.baseLight,this.initializeModules(),this.initializePredefinedOptions()}willUpdate(t){t.has("content")&&this._createOptionsLookup&&Object.keys(this._createOptionsLookup).forEach(e=>{this._createOptionsLookup[e].href=this.hrefLookup(e)})}disconnectedCallback(){super.disconnectedCallback(),this.handles?.removeAll(),this.handles?.destroy(),this.handles=null}initializeModules(){this.handles=new M}initializePredefinedOptions(){let{instantApps:t,instantAppsDesc:e,mapViewer:a,mapViewerDesc:i,arcgisStoryMaps:p,storyMapsDesc:l,experienceBuilder:$,experienceBuilderDesc:z,dashboards:A,dashboardsDesc:k}=this._messages;this._createOptionsLookup={"instant-apps":{title:t,subtitle:e,img:c("instant-apps"),href:this.hrefLookup("instant-apps")},"map-viewer":{title:a,subtitle:i,img:c("map-viewer"),href:this.hrefLookup("map-viewer")},"story-maps":{title:p,subtitle:l,img:c("story-maps"),href:this.hrefLookup("story-maps")},"experience-builder":{title:$,subtitle:z,img:c("experience-builder"),href:this.hrefLookup("experience-builder")},dashboards:{title:A,subtitle:k,img:c("dashboards"),href:this.hrefLookup("dashboards")}}}hrefLookup(t){let e=this.getBaseUrl(this.portal),a=this._getEnvironment(e),i=this.contentHref();switch(t){case"instant-apps":return`${e}/apps/instantgallery/index.html?${i}`;case"dashboards":return this.content!=null&&"portalItem"in this.content?`${e}/apps/dashboards/new#id=${this.content?.portalItem?.id}`:`${e}/apps/dashboards/new`;case"map-viewer":return`${e}/apps/mapviewer/index.html?${i}`;case"story-maps":return a==="enterprise"?`${e}/apps/storymaps/stories/new?${i}`:`https://storymaps${a==="prod"?"":a}.arcgis.com/stories/new?${i}`;case"experience-builder":return a==="enterprise"?`${e}/apps/experiencebuilder/builder/?page=template&${i}`:`https://experience${a==="prod"?"":a}.arcgis.com/builder/page/template/?${i}`}return""}contentHref(){return this?.content?.portalItem?.type==="Web Map"?`webmap=${this.content?.portalItem?.id}`:this?.content?.portalItem?.type==="Web Scene"?`webscene=${this.content?.portalItem?.id}`:typeof this?.content?.fetchMembers=="function"?`group=${this.content.id}`:""}getBaseUrl(t){if(!t)return"";let{customBaseUrl:e,portalHostname:a,urlKey:i}=t,{protocol:p}=window.location,l=i?`${i}.${e}`:a;return`${p}//${l}`}_getEnvironment(t){let e="";try{e=new URL(t)?.hostname}catch{}return e?.includes("arcgis.com")?e.includes("devext")&&"dev"||e.includes("qaext")&&"qa"||"prod":"enterprise"}render(){let t=this.mode==="popover"?this.renderPopover():this.renderPanel();return o`<div class=${s(this.baseClass)}>${t}</div>`}renderPopover(){let t=this.renderPanel();return[o`<calcite-popover reference-element=create-popover-btn .overlayPositioning=${this.popoverPositioning} .placement=${this.popoverPlacement} auto-close .label=${this._messages.createLabel} ${g(this.popoverEl)}>${t}</calcite-popover>`,o`<calcite-action id=create-popover-btn alignment=center .icon=${this.popoverIcon} title=${this._messages.create??h} .text=${this._messages.create}></calcite-action>`]}renderPanel(){let t=this.showHeader?this.renderHeader():null,e=this.renderPanelOptions(),a=this.mode==="inline"?n.inlineContainer:n.popoverContainer;return o`<div class=${s(a)}>${t}${e}</div>`}renderHeader(){return o`<div class=${s(n.header)}><h3>${this._messages.create}</h3><p>${this._messages.createSubheading}</p></div>`}renderPanelOptions(){return o`<nav>${this.options.map(t=>this.renderOption(t))}</nav>`}renderOption(t){if(typeof t=="string"&&(t=this._createOptionsLookup?.[t]),t==null)return o`<div></div>`;let{title:e,subtitle:a,img:i,href:p}=t;return o`<a class=${s(n.option)} href=${p??h} target=_blank>${o`<span class=${s(n.optionIcon)} .innerHTML=${i??""}></span><span class=${s(n.optionText)}><span class=${s(n.optionTextWrapper)}><h3 class=${s(n.optionTitle)}>${e}</h3><calcite-icon scale=s icon=launch></calcite-icon></span><p class=${s(n.optionSubtitle)}>${a}</p></span>`}</a>`}};b("instant-apps-create",v);return v},"core/Handles")
2
+ import{a as w}from"./2D6XDWYA.js";import{a as _}from"./HKURBCD6.js";import{b}from"./KGXEY5HR.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{F as u,G as g,H as f,J as s,h as m,i as o,l as h}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([M])=>{var d={"instant-apps":{path:"M11.206 4.805v-1.38a2.231 2.231 0 0 1 2.23-2.231h13.168a2.231 2.231 0 0 1 2.231 2.23v11.15a2.231 2.231 0 0 1-2.23 2.231h-1.398V5.555a.75.75 0 0 0-.75-.75zM30.94 27.204l-5.447-4.41a.211.211 0 0 0-.344.164v2.225H8.197a1.344 1.344 0 0 1-1.344-1.344V11.665a.75.75 0 0 1 .75-.75h9.872a.75.75 0 0 1 .75.75l-.003 7.534a2.422 2.422 0 0 1-.798 1.796l-.945.855h4.3a1.075 1.075 0 0 0 1.074-1.075v-10.54a2.231 2.231 0 0 0-2.23-2.23H5.354a2.148 2.148 0 0 0-2.13 2.23v16.507a2.231 2.231 0 0 0 2.23 2.231l19.695-.003v2.725a.211.211 0 0 0 .344.164l5.447-4.41a.158.158 0 0 0 0-.245z",fill:"#83a238"},"map-viewer":{path:"M21.647 13.706A1.647 1.647 0 1 1 20 15.353a1.647 1.647 0 0 1 1.647-1.647zM19 19.083A1.917 1.917 0 1 1 17.082 21 1.917 1.917 0 0 1 19 19.082zm7.684 3.393a2.433 2.433 0 0 1-.64 1.776l-.01.012c-1.045 1.134-3.215 1.8-5.738 1.8-3.815 0-5.054-1.485-8.586-1.828a6.765 6.765 0 0 1 .566-4.07c.98-1.674 2.445-1.568 3.41-2.724.967-1.157.033-3.384 1.397-4.748 1.539-1.538 3.44-.12 4.57-2.542.877-1.884 1.84-2.98 3.68-3.35a.39.39 0 0 1 .047.07c.132.695 1.097 11.68 1.304 15.604zM6.208 8.864A3.054 3.054 0 0 1 8.115 6.17s2.425-.88 3.09-1.029a2.637 2.637 0 0 1 .314-.01 4.967 4.967 0 0 1 1.157.157l.404.095a7.26 7.26 0 0 0-.238 3.294c.188 1.354.657 2.399-.066 4.361-1.003 2.721-2.901 2.585-3.857 4.562-1.285 2.657.21 6.226-2.182 6.835l.004.002.003.003c-.801.114-1.363.22-1.663.272zm21.549-5.09a.055.055 0 0 0-.022-.037.058.058 0 0 0-.037-.01l-7.37 1.025-8.771-2.742a.227.227 0 0 0-.162.01L3.594 5.566a.054.054 0 0 0-.032.045L1.58 29a41.592 41.592 0 0 1 9.115-1.285c2.765.094 6.646 2.287 10.29 2.177 3.51-.108 8.582-2.382 9.564-2.836a.054.054 0 0 0 .03-.056z",fill:"#3DB8FF"},"story-maps":{path:"M25.5 0C23.015 0 21 .953 21 3.433v8.517a1.467 1.467 0 0 0 .43 1.038l3.837 3.827a.33.33 0 0 0 .466 0l3.836-3.827A1.467 1.467 0 0 0 30 11.95V3.433C30 .953 27.985 0 25.5 0zm0 8.1a2.6 2.6 0 1 1 2.6-2.599A2.599 2.599 0 0 1 25.5 8.1zm-7.856.453c.294-.153.312-.457.312-.788v-2.31a.104.104 0 0 0-.129-.1 6.128 6.128 0 0 0-2.248 1.19.14.14 0 0 1-.167.008c-3.437-2.283-8.543-1.52-12.131-.988-.432.064-1.762.34-2.164.424A.146.146 0 0 0 1 6.133V26.69a.147.147 0 0 0 .05.11.134.134 0 0 0 .116.035A36.394 36.394 0 0 1 9.5 25.781c3.283.054 4.403.96 4.967 1.513l.915.897a.164.164 0 0 0 .23 0l.916-.897a5.98 5.98 0 0 1 3.972-1.47 25.341 25.341 0 0 1 5.715.516c.718.109 1.46.22 2.186.312l1.251.16a.308.308 0 0 0 .348-.305v-7.375a.161.161 0 0 0-.303-.077l-.107.2a7.218 7.218 0 0 1-6.902 3.766 10.455 10.455 0 0 0-5.688.796V9.454a.89.89 0 0 1 .332-.693 2.058 2.058 0 0 1 .312-.208zM14 23.817c-3.071-1.38-5.998-.808-9.447-.293l-.253.036a.263.263 0 0 1-.3-.259V8.525a.098.098 0 0 1 .084-.097l.804-.115c2.518-.372 6.303-1.048 8.708.515a.89.89 0 0 1 .404.746z",fill:"#4fbaa9"},dashboards:{path:"M25.819 28H23.18a.181.181 0 0 1-.181-.181V13.18a.181.181 0 0 1 .181-.181h2.638a.181.181 0 0 1 .181.181V27.82a.181.181 0 0 1-.181.181zM21 27.816v-9.631a.184.184 0 0 0-.184-.185h-2.631a.184.184 0 0 0-.185.184v9.631a.184.184 0 0 0 .184.185h2.631a.184.184 0 0 0 .185-.184zm9.82.184a.18.18 0 0 0 .18-.18v-7.64a.18.18 0 0 0-.18-.18h-2.64a.18.18 0 0 0-.18.18v7.64a.18.18 0 0 0 .18.18zM7 9.267v10.475c.706.033 3.538-1.718 4.274-4.7.679-2.751 3.485-2.864 4.443-2.94 1.766-.14 3.588-.607 4.566-2.798A.216.216 0 0 0 20.085 9H7.267A.267.267 0 0 0 7 9.267zm18.997-1.053A4.411 4.411 0 0 0 21.63 4H2.684A.684.684 0 0 0 2 4.684V21.81A3.19 3.19 0 0 0 5.19 25h9.565a.245.245 0 0 0 .245-.245v-2.362a.393.393 0 0 0-.393-.393H6.38A1.385 1.385 0 0 1 5 20.619V7.349A.348.348 0 0 1 5.348 7h16.324A1.346 1.346 0 0 1 23 8.363v1.28a.357.357 0 0 0 .357.357h2.599a.046.046 0 0 0 .046-.046z",fill:"#ee9e01"},"experience-builder":{path:"M30.85 12.82l-2.85 5v7.44A1.78 1.78 0 0 1 26.22 27H25V7.75a.76.76 0 0 0-.75-.75H12V1.31a.28.28 0 0 1 .42-.25L17.51 4h8.71A1.78 1.78 0 0 1 28 5.78v4.42l2.54 1.47a.83.83 0 0 1 .31 1.15zM12 18h8v-6h-8zm7.62 5H7.75a.76.76 0 0 1-.75-.75V4H5.78A1.78 1.78 0 0 0 4 5.78V13l-2.89 5a.85.85 0 0 0 .31 1.15L4 20.59v4.61A1.78 1.78 0 0 0 5.78 27h8.62l5.18 3a.28.28 0 0 0 .42-.24v-6.39a.38.38 0 0 0-.38-.37z",fill:"#09b8ca"},geoBIM:{path:"M17.802 21.398l6.2 2.557-5.14 2.133a.772.772 0 0 1-1.06-.717zM9.311 7.868a.604.604 0 0 1-.003-1.122L16 4.169l8.12 3.148-8.119 3.184zm-3.5 1.541l8.387 3.413v12.554a.772.772 0 0 1-1.06.717l-6.297-2.736a1.639 1.639 0 0 1-1.03-1.521zM3.844 6.03a1.316 1.316 0 0 0-.827 1.22v17.395a1.316 1.316 0 0 0 .827 1.221L16 30.888l12.983-5.317v-2.423l-7.156-3.023 7.156-2.963v-1.95l-5.101-2.2-3.867 1.516L24 16.123l-6.199 2.505v-5.711l.073-.122 11.108-4.487v-1.95l-12.47-5.047a1.384 1.384 0 0 0-1.027 0z",fill:"#11ad1d"},notebooks:{path:"M2.941 25A.906.906 0 0 1 2 24.135v-.271A.906.906 0 0 1 2.941 23h3.118a.906.906 0 0 1 .941.864v.271a.906.906 0 0 1-.941.865zm3.118-8A.906.906 0 0 0 7 16.135v-.271A.906.906 0 0 0 6.059 15H2.941a.906.906 0 0 0-.941.864v.271a.906.906 0 0 0 .941.865zm0-8A.906.906 0 0 0 7 8.135v-.271A.906.906 0 0 0 6.059 7H2.941A.906.906 0 0 0 2 7.864v.271A.906.906 0 0 0 2.941 9zm9.44 16h-3.726a.773.773 0 0 1-.773-.774V6.171A.172.172 0 0 1 11.172 6H15.5a.5.5 0 0 0 .5-.5v-2a.5.5 0 0 0-.5-.5H5.342A1.345 1.345 0 0 0 4 4.343V5h2.059A2.904 2.904 0 0 1 9 7.858v.277A2.907 2.907 0 0 1 6.059 11H4v2h2.059A2.907 2.907 0 0 1 9 15.864v.271A2.907 2.907 0 0 1 6.059 19H4v2h2.059A2.907 2.907 0 0 1 9 23.864v.271A2.907 2.907 0 0 1 6.059 27H4v1.405a.595.595 0 0 0 .595.595H15.5a.5.5 0 0 0 .5-.5v-3a.5.5 0 0 0-.5-.5zM20 3.5v2a.5.5 0 0 0 .5.5h4a.5.5 0 0 1 .5.5v18a.5.5 0 0 1-.5.5h-4a.5.5 0 0 0-.5.5v3a.5.5 0 0 0 .5.5h8a.5.5 0 0 0 .5-.5v-25a.5.5 0 0 0-.5-.5h-8a.5.5 0 0 0-.499.5z",fill:"#6e6e6e"},sites:{path:"M2.656 29A.656.656 0 0 1 2 28.344V6.185A3.189 3.189 0 0 1 5.185 3H29.72a.281.281 0 0 1 .281.281v22.53A3.194 3.194 0 0 1 26.81 29zm2.838-3h21.211a.295.295 0 0 0 .296-.295V13.494a.493.493 0 0 0-.493-.494H5v12.506a.494.494 0 0 0 .494.494zM23 9.91a.09.09 0 0 0 .09.09h3.82a.09.09 0 0 0 .09-.09V6.026A.026.026 0 0 0 26.974 6h-3.948a.026.026 0 0 0-.026.026zM6.633 6A1.597 1.597 0 0 0 5 7.595V10h14.523A.477.477 0 0 0 20 9.523V6.477A.477.477 0 0 0 19.523 6zM16 22v-5h7v5zm-7-2v-3h3v3z",fill:"#7842ed"},webAppBuilder:{path:"M15.044 19.974a.188.188 0 0 1-.192-.001l-3.762-2.35a.188.188 0 0 1-.09-.16v-4.098a.188.188 0 0 1 .096-.163l3.761-2.178a.188.188 0 0 1 .182-.001l3.863 2.179a.188.188 0 0 1 .098.165v4.095a.187.187 0 0 1-.092.161zm15.13-1.04a.052.052 0 0 0 .099.022 8.048 8.048 0 0 0 .67-3.147 7.155 7.155 0 0 0-3.507-6.213L17.59 3.768a4.054 4.054 0 0 0-1.968-.627 3.95 3.95 0 0 0-1.894.485c-.607.334-1.132.67-1.278.754a2.951 2.951 0 0 0-1.39 2.506v1.078a.2.2 0 0 0 .307.167l1.365-.87a4.988 4.988 0 0 1 2.319-.792 4.62 4.62 0 0 1 2.219.792s8.442 5.017 9.392 5.576a7.045 7.045 0 0 1 3.513 6.084zM9.546 23.55l.947-.547a.2.2 0 0 0 0-.345l-1.369-.79a4.326 4.326 0 0 1-2.13-3.842V7.286a7.16 7.16 0 0 1 3.63-6.083l.081-.05a.025.025 0 0 0-.012-.045l-.25-.005a8.333 8.333 0 0 0-3.887.994A7.102 7.102 0 0 0 3.069 8.31v10.786a3.96 3.96 0 0 0 1.89 3.362c.894.545 1.605.974 1.81 1.092a2.787 2.787 0 0 0 2.777 0zm4.383 6.37l9.997-5.773a3.959 3.959 0 0 0 1.967-3.32c.021-.929.034-1.604.034-1.806a2.786 2.786 0 0 0-1.39-2.406l-1.123-.57a.2.2 0 0 0-.289.177v1.604a4.45 4.45 0 0 1-2.218 3.842l-3.708 2.14a3.366 3.366 0 0 1-.256.135L11.6 27.128a6.427 6.427 0 0 1-3.343.938 7.137 7.137 0 0 1-3.513-1.038c-.09-.052-.38-.226-.797-.479a.094.094 0 0 0-.134.12 7.182 7.182 0 0 0 2.942 3.25 7.241 7.241 0 0 0 3.587 1.028 7.243 7.243 0 0 0 3.587-1.028z",fill:"#09b8ca"},urban:{path:"M32 14l-4 .003a1 1 0 0 0-1 1V21a1 1 0 0 1-1 1h-2V5.451l-7.598-3.335A1 1 0 0 0 15 3.03V25a1 1 0 0 1-1 1h-2V11.24h-.02L7.5 9l-4.48 2.24H3V20H0v4h5a1 1 0 0 0 1-1V12.717L7.5 12l1.5.717V28a2 2 0 0 0 2 2h5a2 2 0 0 0 2-2V6.094l3 1.317V24a2 2 0 0 0 2 2h5.02A1.977 1.977 0 0 0 30 24.024V17h2z",fill:"#3DB8FF"}},x=new Map;Object.keys(d).forEach(r=>{x.set(r,`<svg viewBox="0 0 32 32" width="32" height="32" fill="${d[r].fill}"><path d="${d[r].path}"/></svg>`)});function c(r){return x.get(r)||""}var V=m`:host{display:block;--instant-apps-create-action-background: var(--calcite-color-foreground-1);--instant-apps-create-action-background-hover: var( --calcite-color-foreground-2 );--instant-apps-create-action-background-press: var( --calcite-color-foreground-3 );--instant-apps-create-action-height: 100%;--instant-apps-create-action-width: fit-content;--instant-apps-create-action-icon-color: var(--calcite-color-text-3);--instant-apps-create-action-icon-hover-color: var(--calcite-color-text-1);--instant-apps-create-background: var(--calcite-color-foreground-1);--instant-apps-create-text-color: var(--calcite-color-text-1);--instant-apps-create-popover-width: 450px}.instant-apps-create{height:100%}.instant-apps-create *{box-sizing:border-box}.instant-apps-create__popover-container,.instant-apps-create__inline-container{padding:1rem 1.5rem;background:var(--instant-apps-create-background);--calcite-color-text-1: var(--instant-apps-create-text-color)}.instant-apps-create__popover-container{width:var(--instant-apps-create-popover-width)}.instant-apps-create calcite-popover{--calcite-color-foreground-1: var(--instant-apps-create-background)}.instant-apps-create calcite-button:last-of-type{margin-top:.5rem}.instant-apps-create__header h3{margin:0;font-weight:var(--calcite-font-weight-medium)}.instant-apps-create__header p{margin:0;padding:0 0 .5rem;font-weight:var(--calcite-font-weight-normal)}.instant-apps-create__options{display:flex;justify-content:space-between;align-items:center;flex-direction:column}.instant-apps-create__option{display:flex;color:inherit;text-decoration:inherit;height:fit-content;margin-bottom:.5rem}.instant-apps-create__option:first-of-type{margin-top:.5rem}.instant-apps-create__option:last-of-type{margin-bottom:0}.instant-apps-create__option{cursor:pointer;--calcite-color-text-link: var(--calcite-color-text-1);align-items:stretch;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 rgba(0, 0, 0, 0)),var(--tw-ring-shadow, 0 0 rgba(0, 0, 0, 0)),var(--tw-shadow);outline-offset:0;outline-color:var(--calcite-color-focus);transition:outline-offset .1s ease-in-out,outline-color .1s ease-in-out}.instant-apps-create__option:hover{outline:1px solid var(--calcite-color-focus);outline-offset:2px}.instant-apps-create__option-icon{display:flex;background:var(--calcite-color-foreground-2);color:var(--calcite-color-text-1);font-size:1.25rem;background-color:var(--calcite-color-background);justify-content:center;align-items:center;flex:1 1 auto;max-width:5rem;min-width:5rem;height:auto}.instant-apps-create__option-icon svg{display:block;overflow-clip-margin:content-box;overflow:hidden}.instant-apps-create__option-text{min-height:2rem;font-size:.75rem;color:var(--calcite-color-text-2);padding:.75rem 0 0 .75rem}.instant-apps-create__option-text-wrapper{display:flex;align-items:center}.instant-apps-create__option-text h3{margin:0;font-size:var(--calcite-font-size-0);font-weight:var(--calcite-font-weight-medium)}.instant-apps-create__option-text calcite-icon{margin-left:.25rem;color:var(--calcite-color-text-link)}.instant-apps-create__option-text p{margin:0;font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-3);line-height:1.35;min-height:3rem}`,n={baseDark:"instant-apps-create calcite-mode-dark",baseLight:"instant-apps-create calcite-mode-light",inlineContainer:"instant-apps-create__inline-container",popoverContainer:"instant-apps-create__popover-container",header:"instant-apps-create__header",option:"instant-apps-create__option",optionIcon:"instant-apps-create__option-icon",optionText:"instant-apps-create__option-text",optionTextWrapper:"instant-apps-create__option-text-wrapper",optionTitle:"instant-apps-create__option-title",optionSubtitle:"instant-apps-create__option-subtitle"},v=class extends f{constructor(){super(...arguments),this._messages=_({name:"instant-apps-create",blocking:!0}),this.popoverEl=u(),this.baseClass=n.baseLight,this.popoverIcon="grid",this.mode="inline",this.popoverPositioning="absolute",this.popoverPlacement="auto",this.showHeader=!0,this.options=["instant-apps","map-viewer","story-maps","experience-builder","dashboards"]}static{this.properties={baseClass:16,popoverIcon:1,mode:3,popoverPositioning:1,popoverPlacement:1,showHeader:5,content:0,options:0,portal:0}}static{this.styles=V}load(){this.baseClass=w(this.el)==="dark"?n.baseDark:n.baseLight,this.initializeModules(),this.initializePredefinedOptions()}willUpdate(t){t.has("content")&&this._createOptionsLookup&&Object.keys(this._createOptionsLookup).forEach(e=>{this._createOptionsLookup[e].href=this.hrefLookup(e)})}disconnectedCallback(){super.disconnectedCallback(),this.handles?.removeAll(),this.handles?.destroy(),this.handles=null}initializeModules(){this.handles=new M}initializePredefinedOptions(){let{instantApps:t,instantAppsDesc:e,mapViewer:a,mapViewerDesc:i,arcgisStoryMaps:p,storyMapsDesc:l,experienceBuilder:$,experienceBuilderDesc:z,dashboards:A,dashboardsDesc:k}=this._messages;this._createOptionsLookup={"instant-apps":{title:t,subtitle:e,img:c("instant-apps"),href:this.hrefLookup("instant-apps")},"map-viewer":{title:a,subtitle:i,img:c("map-viewer"),href:this.hrefLookup("map-viewer")},"story-maps":{title:p,subtitle:l,img:c("story-maps"),href:this.hrefLookup("story-maps")},"experience-builder":{title:$,subtitle:z,img:c("experience-builder"),href:this.hrefLookup("experience-builder")},dashboards:{title:A,subtitle:k,img:c("dashboards"),href:this.hrefLookup("dashboards")}}}hrefLookup(t){let e=this.getBaseUrl(this.portal),a=this._getEnvironment(e),i=this.contentHref();switch(t){case"instant-apps":return`${e}/apps/instantgallery/index.html?${i}`;case"dashboards":return this.content!=null&&"portalItem"in this.content?`${e}/apps/dashboards/new#id=${this.content?.portalItem?.id}`:`${e}/apps/dashboards/new`;case"map-viewer":return`${e}/apps/mapviewer/index.html?${i}`;case"story-maps":return a==="enterprise"?`${e}/apps/storymaps/stories/new?${i}`:`https://storymaps${a==="prod"?"":a}.arcgis.com/stories/new?${i}`;case"experience-builder":return a==="enterprise"?`${e}/apps/experiencebuilder/builder/?page=template&${i}`:`https://experience${a==="prod"?"":a}.arcgis.com/builder/page/template/?${i}`}return""}contentHref(){return this?.content?.portalItem?.type==="Web Map"?`webmap=${this.content?.portalItem?.id}`:this?.content?.portalItem?.type==="Web Scene"?`webscene=${this.content?.portalItem?.id}`:typeof this?.content?.fetchMembers=="function"?`group=${this.content.id}`:""}getBaseUrl(t){if(!t)return"";let{customBaseUrl:e,portalHostname:a,urlKey:i}=t,{protocol:p}=window.location,l=i?`${i}.${e}`:a;return`${p}//${l}`}_getEnvironment(t){let e="";try{e=new URL(t)?.hostname}catch{}return e?.includes("arcgis.com")?e.includes("devext")&&"dev"||e.includes("qaext")&&"qa"||"prod":"enterprise"}render(){let t=this.mode==="popover"?this.renderPopover():this.renderPanel();return o`<div class=${s(this.baseClass)}>${t}</div>`}renderPopover(){let t=this.renderPanel();return[o`<calcite-popover reference-element=create-popover-btn .overlayPositioning=${this.popoverPositioning} .placement=${this.popoverPlacement} auto-close .label=${this._messages.createLabel} ${g(this.popoverEl)}>${t}</calcite-popover>`,o`<calcite-action id=create-popover-btn alignment=center .icon=${this.popoverIcon} title=${this._messages.create??h} .text=${this._messages.create}></calcite-action>`]}renderPanel(){let t=this.showHeader?this.renderHeader():null,e=this.renderPanelOptions(),a=this.mode==="inline"?n.inlineContainer:n.popoverContainer;return o`<div class=${s(a)}>${t}${e}</div>`}renderHeader(){return o`<div class=${s(n.header)}><h3>${this._messages.create}</h3><p>${this._messages.createSubheading}</p></div>`}renderPanelOptions(){return o`<nav>${this.options.map(t=>this.renderOption(t))}</nav>`}renderOption(t){if(typeof t=="string"&&(t=this._createOptionsLookup?.[t]),t==null)return o`<div></div>`;let{title:e,subtitle:a,img:i,href:p}=t;return o`<a class=${s(n.option)} href=${p??h} target=_blank>${o`<span class=${s(n.optionIcon)} .innerHTML=${i??""}></span><span class=${s(n.optionText)}><span class=${s(n.optionTextWrapper)}><h3 class=${s(n.optionTitle)}>${e}</h3><calcite-icon scale=s icon=launch></calcite-icon></span><p class=${s(n.optionSubtitle)}>${a}</p></span>`}</a>`}};b("instant-apps-create",v);return v},"core/Handles")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as e}from"./YUWXPLTE.js";import{a as h}from"./65I4AUS4.js";import{b as d}from"./MXPZF4RB.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{H as n,J as c,K as i,L as p,h as r,i as a}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([l,{watch:m}])=>{var g=r`:host{display:block}.instant-apps-compass{position:relative;height:100px;border-radius:50%}.instant-apps-compass #instant-compass{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:10}.instant-apps-compass #dir-ring{height:100px;width:100px;border-radius:50%;background-color:var(--calcite-color-foreground-1);border:1px solid var(--calcite-color-border-1);position:relative}.instant-apps-compass #dir-ring .dir-heading{position:absolute;--calcite-fab-background-color: transparent;--calcite-fab-text-color: var(--calcite-color-text-1);--calcite-fab-shadow: none}.instant-apps-compass #dir-ring #north{right:37px;top:5px}.instant-apps-compass #dir-ring #east{right:6px;top:38px}.instant-apps-compass #dir-ring #west{left:4px;top:38px}.instant-apps-compass #dir-ring #south{right:38px;bottom:4px}`,u={base:"instant-apps-compass"},o=class extends n{constructor(){super(...arguments),this._messages=h({name:"instant-apps-compass",blocking:!0}),this.rotationWatcherKey="rotationWatcher",this.baseClass=u.base,this.rotation=0}static{this.properties={baseClass:16,rotation:16,view:0}}static{this.styles=g}get view(){return this._view}set view(t){this._view=t,this.handles?.has(this.rotationWatcherKey)&&this.handles?.remove(this.rotationWatcherKey),this.handles?.add(m(()=>t.rotation,s=>{this.rotation=Math.floor(s)}),this.rotationWatcherKey)}load(){this.initializeModules()}disconnectedCallback(){super.disconnectedCallback(),this.handles?.removeAll(),this.handles?.destroy(),this.handles=null}initializeModules(){this.handles=new l}goToHeading(t){let s=this._view.viewpoint.clone();s.rotation=this.decideRotation(t),this._view.goTo(s)}decideRotation(t){switch(t){case"north":return 0;case"east":return 270;case"south":return 180;case"west":return 90}}render(){return a`<div class=${c(this.baseClass)}><arcgis-compass id=instant-compass .view=${this.view}></arcgis-compass>${this.renderDirectionRing()}</div>`}renderDirectionRing(){return e("dir-ring",a`<div id=dir-ring style=${i({transform:`rotate(${this.rotation}deg)`})}>${["north","east","south","west"].map(t=>this._renderHeading(t))}</div>`)}_renderHeading(t){let s=this._messages[t];return e(t,a`<calcite-button scale=s round kind=neutral class="dir-heading" appearance=transparent id=${t??p} style=${i({transform:`rotate(-${this.rotation}deg)`})} @click=${()=>this.goToHeading(t)}>${s.charAt(0).toLocaleUpperCase()}</calcite-button>`)}};d("instant-apps-compass",o);return o},"core/Handles","core/reactiveUtils")
2
+ import{a as e}from"./YUWXPLTE.js";import{a as h}from"./HKURBCD6.js";import{b as d}from"./KGXEY5HR.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{H as n,J as c,K as i,L as p,h as r,i as a}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([l,{watch:m}])=>{var g=r`:host{display:block}.instant-apps-compass{position:relative;height:100px;border-radius:50%}.instant-apps-compass #instant-compass{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:10}.instant-apps-compass #dir-ring{height:100px;width:100px;border-radius:50%;background-color:var(--calcite-color-foreground-1);border:1px solid var(--calcite-color-border-1);position:relative}.instant-apps-compass #dir-ring .dir-heading{position:absolute;--calcite-fab-background-color: transparent;--calcite-fab-text-color: var(--calcite-color-text-1);--calcite-fab-shadow: none}.instant-apps-compass #dir-ring #north{right:37px;top:5px}.instant-apps-compass #dir-ring #east{right:6px;top:38px}.instant-apps-compass #dir-ring #west{left:4px;top:38px}.instant-apps-compass #dir-ring #south{right:38px;bottom:4px}`,u={base:"instant-apps-compass"},o=class extends n{constructor(){super(...arguments),this._messages=h({name:"instant-apps-compass",blocking:!0}),this.rotationWatcherKey="rotationWatcher",this.baseClass=u.base,this.rotation=0}static{this.properties={baseClass:16,rotation:16,view:0}}static{this.styles=g}get view(){return this._view}set view(t){this._view=t,this.handles?.has(this.rotationWatcherKey)&&this.handles?.remove(this.rotationWatcherKey),this.handles?.add(m(()=>t.rotation,s=>{this.rotation=Math.floor(s)}),this.rotationWatcherKey)}load(){this.initializeModules()}disconnectedCallback(){super.disconnectedCallback(),this.handles?.removeAll(),this.handles?.destroy(),this.handles=null}initializeModules(){this.handles=new l}goToHeading(t){let s=this._view.viewpoint.clone();s.rotation=this.decideRotation(t),this._view.goTo(s)}decideRotation(t){switch(t){case"north":return 0;case"east":return 270;case"south":return 180;case"west":return 90}}render(){return a`<div class=${c(this.baseClass)}><arcgis-compass id=instant-compass .view=${this.view}></arcgis-compass>${this.renderDirectionRing()}</div>`}renderDirectionRing(){return e("dir-ring",a`<div id=dir-ring style=${i({transform:`rotate(${this.rotation}deg)`})}>${["north","east","south","west"].map(t=>this._renderHeading(t))}</div>`)}_renderHeading(t){let s=this._messages[t];return e(t,a`<calcite-button scale=s round kind=neutral class="dir-heading" appearance=transparent id=${t??p} style=${i({transform:`rotate(-${this.rotation}deg)`})} @click=${()=>this.goToHeading(t)}>${s.charAt(0).toLocaleUpperCase()}</calcite-button>`)}};d("instant-apps-compass",o);return o},"core/Handles","core/reactiveUtils")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import e from"./KGUELU4O.js";import{a as Ce,b as Ge,c as ue}from"./TCUNTTNI.js";import d from"./G2H3X6NS.js";import c from"./SHQFXQEI.js";import b from"./QZ2ZMWIH.js";import a from"./CS5N3DOL.js";import{a as Ne}from"./CJ3EZE7U.js";import{d as je}from"./C5KDPY7R.js";import{a as Ke,b as de,c as Ee,d as me,e as Qe,f as Xe,g as ye,h as Re,i as Ye,j as Ze,k as Oe}from"./YM4U4HSN.js";import{a as N}from"./IADXB53D.js";import{a as Q}from"./YUWXPLTE.js";import{b as We}from"./MXPZF4RB.js";import"./Y2AUIXNK.js";import{F as Ue,G as xe,H as qe,J as x,K as k,h as Be,i as L,j as Le,l as pe,u as De}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([ct,vt,pt,U,fe,At,,{a:j,b:J,c:Je,d:he},{a:be,b:Ve,d:et,f:tt,g:we,h:it,i:nt,j:at},{a:rt,b:Ae,c:st,g:lt},oe])=>{(function(d,e){typeof exports=="object"&&typeof module<"u"?e(exports):typeof define=="function"&&define.amd?define(["exports"],e):(d=typeof globalThis<"u"?globalThis:d||self,e(d.maquette={}))})(void 0,(function(d){"use strict";var e=function(){var t,i;return{invalidate:function(){i=void 0,t=void 0},result:function(a,c){if(t)for(var p=0;p<a.length;p++)t[p]!==a[p]&&(i=void 0);return i||(i=c(),t=a),i}}},n="http://www.w3.org/",l="".concat(n,"2000/svg"),r="".concat(n,"1999/xlink"),s=[],h=function(t,i){var a={};return Object.keys(t).forEach(function(c){a[c]=t[c]}),i&&Object.keys(i).forEach(function(c){a[c]=i[c]}),a},u=function(t,i){return t.vnodeSelector!==i.vnodeSelector?!1:t.properties&&i.properties?t.properties.key!==i.properties.key?!1:t.properties.bind===i.properties.bind:!t.properties&&!i.properties},w=function(t){if(typeof t!="string")throw new Error("Style values must be strings")},$=function(t,i,a){if(i.vnodeSelector!==""){for(var c=a;c<t.length;c++)if(u(t[c],i))return c}return-1},S=function(t,i,a,c){var p=t[i];if(p.vnodeSelector!==""){var o=p.properties,C=o?o.key===void 0?o.bind:o.key:void 0;if(!C){for(var g=0;g<t.length;g++)if(g!==i){var f=t[g];if(u(f,p))throw Object.assign(new Error("".concat(a.vnodeSelector," had a ").concat(p.vnodeSelector," child ").concat(c==="added"?c:"removed",", but there is now more than one. You must add unique key properties to make them distinguishable.")),{parentNode:a,childNode:p})}}}},E=function(t){if(t.properties){var i=t.properties.enterAnimation;i&&i(t.domNode,t.properties)}},_=[],T=!1,M=function(t){(t.children||[]).forEach(M),t.properties&&t.properties.afterRemoved&&t.properties.afterRemoved.apply(t.properties.bind||t.properties,[t.domNode])},I=function(){T=!1,_.forEach(M),_.length=0},P=function(t){_.push(t),T||(T=!0,typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(I,{timeout:16}):setTimeout(I,16))},A=function(t){var i=t.domNode;if(t.properties){var a=t.properties.exitAnimation;if(a){i.style.pointerEvents="none";var c=function(){i.parentNode&&(i.parentNode.removeChild(i),P(t))};a(i,c,t.properties);return}}i.parentNode&&(i.parentNode.removeChild(i),P(t))},B=["on","afterCreate","afterUpdate","afterRemoved","enterAnimation","exitAnimation","updateAnimation"];function q(t){return!B.includes(t)}var K=function(t,i,a){if(i){for(var c=a.eventHandlerInterceptor,p=Object.keys(i).filter(q),o=p.length,C=0;C<o;C++){var g=p[C],f=i[g];if(g==="className")throw new Error('Property "className" is not supported, use "class".');if(g==="class")se(t,f,!0);else if(g==="classes")for(var v=Object.keys(f),R=v.length,b=0;b<R;b++){var y=v[b];f[y]&&t.classList.add(y)}else if(g==="styles")for(var z=Object.keys(f),F=z.length,b=0;b<F;b++){var G=z[b],te=f[G];te&&(w(te),a.styleApplyer(t,G,te))}else if(g!=="key"&&f!==null&&f!==void 0){var ve=typeof f;ve==="function"?(g.lastIndexOf("on",0)===0&&c&&(f=c(g,f,t,i)),t[g]=f):a.namespace===l?g==="href"?t.setAttributeNS(r,g,f):t.setAttribute(g,f):ve==="string"&&g!=="value"&&g!=="innerHTML"?t.setAttribute(g,f):t[g]=f}}if(i.on)for(var ie=0,ge=Object.entries(i.on);ie<ge.length;ie++){var Y=ge[ie],Z=Y[0],O=Y[1],ne=typeof O=="function"?O:O.listener;c&&(ne=c(Z,ne,t,i)),ne&&t.addEventListener(Z,ne,typeof O=="function"?void 0:O.options)}}},H=function(t,i,a){if(i)for(var c=0,p=i;c<p.length;c++){var o=p[c];W(o,t,void 0,a)}},D=function(t,i,a){H(t,i.children,a),i.text&&(t.textContent=i.text),K(t,i.properties,a),i.properties&&i.properties.afterCreate&&i.properties.afterCreate.apply(i.properties.bind||i.properties,[t,a,i.vnodeSelector,i.properties,i.children])},W=function(t,i,a,c){var p,o,C=0,g=t.vnodeSelector,f=i.ownerDocument;if(g==="")t.domNode?t.domNode.nodeValue=t.text:(o=t.domNode=f.createTextNode(t.text),a!==void 0?i.insertBefore(o,a):i.appendChild(o));else{for(var v=0;v<=g.length;++v){var R=g.charAt(v);if(v===g.length||R==="."||R==="#"){var b=g.charAt(C-1),y=g.slice(C,v);b==="."?o.classList.add(y):b==="#"?o.id=y:(y==="svg"&&(c=h(c,{namespace:l})),c.namespace!==void 0?o=t.domNode=f.createElementNS(c.namespace,y):(o=t.domNode=t.domNode||(!((p=t.properties)===null||p===void 0)&&p.is?f.createElement(y,{is:t.properties.is}):f.createElement(y)),y==="input"&&t.properties&&t.properties.type!==void 0&&o.setAttribute("type",t.properties.type)),a!==void 0?i.insertBefore(o,a):o.parentNode!==i&&i.appendChild(o)),C=v+1}}D(o,t,c)}},V,se=function(t,i,a){i&&i.split(" ").forEach(function(c){c&&t.classList.toggle(c,a)})},_e=function(t,i,a,c){if(a){for(var p=!1,o=Object.keys(a).filter(q),C=o.length,g=0;g<C;g++){var f=o[g],v=a[f],R=i[f];if(f==="class")R!==v&&(se(t,R,!1),se(t,v,!0));else if(f==="classes")for(var b=t.classList,y=Object.keys(v),z=y.length,F=0;F<z;F++){var G=y[F],te=!!v[G],ve=!!R[G];te!==ve&&(p=!0,te?b.add(G):b.remove(G))}else if(f==="styles")for(var ie=Object.keys(v),ge=ie.length,F=0;F<ge;F++){var Y=ie[F],Z=v[Y],O=R[Y];Z!==O&&(p=!0,Z?(w(Z),c.styleApplyer(t,Y,Z)):c.styleApplyer(t,Y,""))}else if(!v&&typeof R=="string"&&(v=""),f==="value"){var ne=t[f];ne!==v&&v!==R&&(t[f]=v),v!==R&&(p=!0)}else if(v!==R){var He=typeof v;(He!=="function"||!c.eventHandlerInterceptor)&&(c.namespace===l?f==="href"?t.setAttributeNS(r,f,v):t.setAttribute(f,v):He==="string"&&f!=="innerHTML"?f==="role"&&v===""?t.removeAttribute(f):t.setAttribute(f,v):t[f]!==v&&(t[f]=v),p=!0)}}return p}},bt=function(t,i,a,c,p){if(a===c)return!1;a=a||s,c=c||s;for(var o=a.length,C=c.length,g=0,f=0,v,R=!1;f<C;){var b=g<o?a[g]:void 0,y=c[f];if(b!==void 0&&u(b,y))R=V(b,y,p,i,a)||R,g++;else{var z=$(a,y,g+1);if(z>=0){for(v=g;v<z;v++)A(a[v]),S(a,v,t,"removed");R=V(a[z],y,p,i,a)||R,g=z+1}else W(y,i,g<o?a[g].domNode:void 0,p),E(y),S(c,f,t,"added")}f++}if(o>g)for(v=g;v<o;v++)A(a[v]),S(a,v,t,"removed");return R};V=function(t,i,a,c,p){var o=t.domNode,C=!1;if(t===i)return!1;var g=!1;if(i.vnodeSelector===""){if(i.text!==t.text){var f=o.ownerDocument.createTextNode(i.text);try{c.replaceChild(f,o)}catch{c.replaceChild(f,c.childNodes[p.indexOf(t)])}return i.domNode=f,C=!0,C}i.domNode=o}else i.vnodeSelector.lastIndexOf("svg",0)===0&&(a=h(a,{namespace:l})),t.text!==i.text&&(g=!0,i.text===void 0?o.removeChild(o.firstChild):o.textContent=i.text),i.domNode=o,g=bt(i,o,t.children,i.children,a)||g,g=_e(o,t.properties,i.properties,a)||g,i.properties&&i.properties.afterUpdate&&i.properties.afterUpdate.apply(i.properties.bind||i.properties,[o,a,i.vnodeSelector,i.properties,i.children]);return g&&i.properties&&i.properties.updateAnimation&&i.properties.updateAnimation(o,i.properties,t.properties),C};var le=function(t,i){return{getLastRender:function(){return t},update:function(a){if(t.vnodeSelector!==a.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");var c=t;t=a,V(c,a,i,c.domNode.parentNode,[c])},domNode:t.domNode}},wt={namespace:void 0,performanceLogger:function(){},eventHandlerInterceptor:void 0,styleApplyer:function(t,i,a){i.charAt(0)==="-"?t.style.setProperty(i,a):t.style[i]=a}},ee=function(t){return h(wt,t)},ce={create:function(t,i){return i=ee(i),W(t,document.createElement("div"),void 0,i),le(t,i)},append:function(t,i,a){return a=ee(a),W(i,t,void 0,a),le(i,a)},insertBefore:function(t,i,a){return a=ee(a),W(i,t.parentNode,t,a),le(i,a)},merge:function(t,i,a){return a=ee(a),i.domNode=t,D(t,i,a),le(i,a)},replace:function(t,i,a){return a=ee(a),W(i,t.parentNode,t,a),t.parentNode.removeChild(t),le(i,a)}},$t=function(t){return{vnodeSelector:"",properties:void 0,children:void 0,text:t.toString(),domNode:null}},Me=function(t,i,a){for(var c=0,p=i.length;c<p;c++){var o=i[c];Array.isArray(o)?Me(t,o,a):o!=null&&o!==!1&&(typeof o=="string"&&(o=$t(o)),a.push(o))}};function _t(t,i,a){if(Array.isArray(i))a=i,i=void 0;else if(i&&(typeof i=="string"||i.vnodeSelector)||a&&(typeof a=="string"||a.vnodeSelector))throw new Error("h called with invalid arguments");var c,p;return a&&a.length===1&&typeof a[0]=="string"?c=a[0]:a&&(p=[],Me(t,a,p),p.length===0&&(p=void 0)),{vnodeSelector:t,properties:i,children:p,text:c===""?void 0:c,domNode:null}}var Lt=function(t,i,a){var c=[],p=[];return{results:p,map:function(o){for(var C=o.map(t),g=p.slice(),f=0,v=0;v<o.length;v++){var R=o[v],b=C[v];if(b===c[f])p[v]=g[f],a(R,g[f],v),f++;else{for(var y=!1,z=1;z<c.length+1;z++){var F=(f+z)%c.length;if(c[F]===b){p[v]=g[F],a(o[v],g[F],v),f=F+1,y=!0;break}}y||(p[v]=i(R,v))}}p.length=o.length,c=C}}},xt=function(t,i){for(var a=[];t&&t!==i;)a.push(t),t=t.parentNode;return a},Ct=function(t,i){var a=t;return i.forEach(function(c){a=a&&a.children?a.children.find(function(p){return p.domNode===c}):void 0}),a},Et=function(t,i,a){return function(p,o,C,g){return c};function c(p){var o,C;a("domEvent",p);var g=i(),f=xt(p.currentTarget,g.domNode);f.reverse();var v=Ct(g.getLastRender(),f);t.scheduleRender();var R;if(v){var b=(C=(o=v.properties["on".concat(p.type)])!==null&&o!==void 0?o:v.properties.on[p.type].listener)!==null&&C!==void 0?C:v.properties.on[p.type];R=b.apply(v.properties.bind||this,arguments)}return a("domEventProcessed",p),R}},Rt=function(t){var i,a=ee(t),c=a.performanceLogger,p=!0,o,C=!1,g=[],f=[],v=function(b,y,z){var F,G=function(){return F};a.eventHandlerInterceptor=Et(i,G,c),F=b(y,z(),a),g.push(F),f.push(z)},R=function(){if(o=void 0,!!p){p=!1,c("renderStart",void 0);for(var b=0;b<g.length;b++){var y=f[b]();c("rendered",void 0),g[b].update(y),c("patched",void 0)}c("renderDone",void 0),p=!0}};return i={renderNow:R,scheduleRender:function(){!o&&!C&&(o=requestAnimationFrame(R))},stop:function(){o&&(cancelAnimationFrame(o),o=void 0),C=!0},resume:function(){C=!1,p=!0,i.scheduleRender()},append:function(b,y){v(ce.append,b,y)},insertBefore:function(b,y){v(ce.insertBefore,b,y)},merge:function(b,y){v(ce.merge,b,y)},replace:function(b,y){v(ce.replace,b,y)},detach:function(b){for(var y=0;y<f.length;y++)if(f[y]===b)return f.splice(y,1),g.splice(y,1)[0];throw new Error("renderFunction was not found")}},i};d.createCache=e,d.createMapping=Lt,d.createProjector=Rt,d.dom=ce,d.h=_t}));function kt(d,e,n,l){let r=st(d,e,n,l),s=St(r);return r.join(s)}function St(d){return d.every(e=>e&&e.includes(rt.NOT_EQUAL))?Ae.AND:Ae.OR}async function dt(d,e,n,l,r){let{fLayerView:s}=d,h=kt(d,e,n,r),u=s?.filter?.timeExtent??s?.featureEffect?.filter?.timeExtent??null,{type:w}=l;if(ue(w))s.filter=new ct({where:h,timeExtent:u});else if(l.effect){let{includedEffect:$,excludedEffect:S}=l.effect,E=await oe(S,s,"excludedEffect"),_=await oe($,s,"includedEffect");s.featureEffect=new vt({filter:new ct({where:h,timeExtent:u}),includedEffect:_,excludedEffect:E})}return await Promise.resolve()}function It(d,e){let{type:n}=d;ue(n)?Tt(e):Ge(n)&&Ft(d,e)}function Tt(d){d?.allLayerViews?.filter(e=>be(e?.layer?.type))?.forEach(e=>{let n=e,l=ut(n);n.filter=l,n.set("featureEffect",null)})}function Ft(d,e){e?.allLayerViews?.filter(n=>be(n?.layer?.type)).forEach(async n=>{let l=n;if(d?.effect&&l){let{includedEffect:r,excludedEffect:s}=d.effect,h=await oe(s,l,"excludedEffect"),u=await oe(r,l,"includedEffect"),w=ut(l);l.featureEffect=new vt({filter:w,includedEffect:u,excludedEffect:h}),l.set(Ce.FILTER,null)}})}function ut(d){return d?.filter||d?.featureEffect?.filter}var Pt=80,zt=.2,Mt=6;function X(d){let e=typeof d=="number"?d:Number(d);return Number.isFinite(e)?e:0}function ht(d){if("infos"in d)return Math.max(...d.infos.map(e=>ht(e)),0);if("preview"in d&&d.preview){let e=d.preview,n=e.querySelector("svg"),l=X(n?.getAttribute("width")),r=X(n?.getAttribute("height")),s=X(e.style.width?.replace("px","")),h=X(e.style.height?.replace("px","")),u=X(e.clientWidth),w=X(e.clientHeight);return Math.max(l,r,s,h,u,w)}return"src"in d?Math.max(X(d.width),X(d.height)):0}function Ht(d,e){let n=ht(d);return n>=Pt?!0:typeof e!="number"||e<=0?!1:n+Mt>=e}function Bt(d){if(!(d<=0))return d*zt}var Dt=(void 0)(),mt=10,Fe=20,$e=10,Pe=20,ze={univariateAboveAndBelowSymbol:"esri-univariate-above-and-below-ramp__symbol",colorRamp:"esri-legend__color-ramp"};function Ut(d="vertical"){let e={stroke:"rgb(200, 200, 200)",strokeWidth:"1"};return d==="vertical"?L`<svg height=4 width=10>${Le`<line x1=0 y1=2 x2=10 y2=2 style=${k(e)} />`}</svg>`:L`<svg height=10 width=10>${Le`<line x1=5 y1=0 x2=5 y2=10 style=${k(e)} />`}</svg>`}function qt(d,e="vertical"){let n=document.createElement("div");return n.style.height=`${Fe}px`,n.className=ze.univariateAboveAndBelowSymbol,d!=null&&(n.style.opacity=d.toString()),Dt.append(n,Ut.bind(null,e)),n}function yt(d,e,n="vertical",l){d.infos.forEach((r,s)=>{if(l&&s===2)r.preview=qt(e,n);else{let{size:h}=r,u=re(h)+(n==="horizontal"?Pe:$e),w=r.preview.tagName.toLowerCase()==="div",$=w?r.preview:document.createElement("div");$&&($.className=ze.univariateAboveAndBelowSymbol),n==="horizontal"?$&&($.style.width=`${u}px`):$&&($.style.height=`${u}px`),w||$&&$.appendChild(r.preview),r.preview=$}})}var Wt=96;function re(d){return d?d/72*Wt:0}function ot(d,e="classic"){let n=d.infos,l=n[0].size,r=n[n.length-1].size;return e==="classic"?(re(l)+$e)/2:(re(l)-re(r))/2}function ke(d,e){if(!d)return null;let n=d.infos.map(r=>r.color),l=pt.renderColorRampPreviewHTML(e.type==="full"?n:e.type==="above"?n.slice(0,3):n.slice(2,5),{width:e.width,height:e.height,align:e.rampAlignment,effectList:e.effectList});return l.className=ze.colorRamp,e.opacity!=null&&(l.style.opacity=e.opacity.toString()),l}function Gt(d,e,n,l="vertical"){let r=0,s=d.infos,h=Math.floor(s.length/2),u=e==="full"||e==="above"?0:h,w=e==="full"||e==="below"?s.length-1:h;for(let $=u;$<=w;$++)if(n&&$===h)r+=l==="horizontal"?mt:Fe;else{let S=s[$].size,E=re(S)+(l==="horizontal"?Pe:$e);r+=E}return Math.round(r)}function Se(d,e,n,l="vertical"){let r=Gt(d,e,n,l),s=d.infos,h=Math.floor(s.length/2),u=e==="full"||e==="above"?0:h,w=e==="full"||e==="below"?s.length-1:h,$=e==="full"?s[u].size+s[w].size:e==="above"?s[u].size:s[w].size,S=n?l==="vertical"?Fe:mt:0,E=l==="vertical"?$e*(e==="full"?2:1):Pe*(e==="full"?2:1);return Math.round(r-(re($)/2+S/2+E/2))}function Jt(d,e,n="vertical"){let l=d.infos,r=l.find(h=>ye(h)),s=l.find(h=>de(h));return r&&(r={...r},r.infos=[...r.infos],yt(r,e,n,!0)),s&&(s={...s},s.infos=[...s.infos]),n==="horizontal"&&(r?.infos.reverse(),s?.infos.reverse()),{sizeRampElement:r,colorRampElement:s}}function Kt(d,e="vertical"){let n=d.infos,l=n.find(s=>ye(s)),r=n.find(s=>de(s));return l&&(l={...l},l.infos=[...l.infos],yt(l,null,e,!1)),r&&(r={...r},r.infos=[...r.infos]),e==="horizontal"&&(l?.infos.reverse(),r?.infos.reverse()),{sizeRampElement:l,colorRampElement:r}}var Qt=Be`@layer{instant-apps-interactive-legend-classic{display:block;--instant-apps-interactive-legend-heading-font-size: 1rem;--instant-apps-interactive-legend-heading-font-weight: normal;--instant-apps-interactive-legend-caption-font-weight: normal;--instant-apps-interactive-legend-secondary-color: var( --calcite-color-text-1 );--instant-apps-interactive-legend-field-name-font-size: 1rem;--instant-apps-interactive-legend-total-feature-count-font-size: .875rem;--instant-apps-interactive-legend-info-font-size: .875rem;--instant-apps-interactive-legend-info-item-background--selected: #c7ebff;--instant-apps-interactive-legend-info-item-background--selected--dark: #009af2;--instant-apps-interactive-legend-info-item-background--hover: #e9e9e9;--instant-apps-interactive-legend-info-item-background--hover--dark: #4a4a4a;--instant-apps-interactive-legend-info-item-color--selected: var( --calcite-color-text-2 );--instant-apps-interactive-legend-secondary-background-color: var( --calcite-color-background );--instant-apps-interactive-legend-ui-margin: 20px 15px;--instant-apps-interactive-legend-ui-padding: 20px 15px}instant-apps-interactive-legend-classic .esri-legend__service{padding:0}instant-apps-interactive-legend-classic .esri-legend__layer-body,instant-apps-interactive-legend-classic .esri-legend__layer,instant-apps-interactive-legend-classic .esri-legend__layer-table,instant-apps-interactive-legend-classic .esri-legend__group-layer-child,instant-apps-interactive-legend-classic .esri-legend__layer-child-table{margin:0;overflow:hidden}instant-apps-interactive-legend-classic .esri-legend__layer-caption calcite-action{margin-right:5px}instant-apps-interactive-legend-classic .esri-legend__layer-caption{display:flex;align-items:center;font-size:var(--instant-apps-interactive-legend-field-name-font-size);background-color:var(--instant-apps-interactive-legend-secondary-background-color);color:var(--instant-apps-interactive-legend-secondary-color)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-caption-btn-container{white-space:nowrap}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-caption-btn-container calcite-button{margin:2px}instant-apps-interactive-legend-classic .esri-legend__layer-caption{font-weight:var(--instant-apps-interactive-legend-caption-font-weight)}instant-apps-interactive-legend-classic .esri-legend__layer-cell.esri-legend__layer-cell--info{font-size:var(--instant-apps-interactive-legend-info-font-size);text-align:left}instant-apps-interactive-legend-classic .esri-legend__layer-cell,instant-apps-interactive-legend-classic .esri-legend__layer-row{display:flex;align-items:center}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-body{display:block;margin:var(--instant-apps-interactive-legend-ui-margin)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive.instant-apps-interactive-legend__nested-unique-symbol>.esri-legend__layer-body{margin:0}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-row{display:table-row}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-cell{display:table-cell}instant-apps-interactive-legend-classic .esri-legend__layer-cell--symbols{justify-content:center;width:20%}instant-apps-interactive-legend-classic .esri-legend__layer-cell--info{width:65%}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{margin:1px;background:transparent;border:none;width:100%}instant-apps-interactive-legend-classic .esri-legend__layer-body.instant-apps-interactive-legend__layer-body--large-symbol>.esri-legend__layer-row{display:grid;grid-template-columns:minmax(35%,max-content) minmax(0,1fr);column-gap:clamp(.125rem,.3vw,.25rem);align-items:center;width:100%}instant-apps-interactive-legend-classic .esri-legend__layer-body.instant-apps-interactive-legend__layer-body--large-symbol>.esri-legend__layer-row>.esri-legend__layer-cell--symbols{width:35%;box-sizing:border-box;padding-inline:clamp(.125rem,.3vw,.25rem);display:flex;align-items:center;justify-content:center}instant-apps-interactive-legend-classic .esri-legend__layer-body.instant-apps-interactive-legend__layer-body--large-symbol>.esri-legend__layer-row>.esri-legend__layer-cell--info{display:block;width:auto;min-width:0}instant-apps-interactive-legend-classic .esri-legend__layer-cell--info{color:var(--instant-apps-interactive-legend-secondary-color)}instant-apps-interactive-legend-classic .esri-legend__layer-row,instant-apps-interactive-legend-classic .esri-legend__layer-caption{padding:var(--instant-apps-interactive-legend-ui-padding)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{position:relative}instant-apps-interactive-legend-classic .instant-apps-interactive-legend-element-info--selected{background-color:var(--instant-apps-interactive-legend-info-item-background--selected)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend-element-info--selected{cursor:pointer;background-color:var(--instant-apps-interactive-legend-info-item-background--selected--dark)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend-element-info--selected .esri-legend__layer-cell--info{color:var(--calcite-color-text-inverse)}instant-apps-interactive-legend-classic .hide{display:none}.instant-apps-interactive-legend__compact .esri-legend__layer-row{--instant-apps-interactive-legend-ui-padding: 10px 5px}.instant-apps-interactive-legend__compact .esri-legend__layer-row .esri-legend__layer-cell--info:not(:has(.esri-legend__ramp-labels)){display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;line-clamp:2;line-height:1.3125rem;max-height:2.625rem}@media(min-width:992px){instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{cursor:pointer}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive:hover{background-color:var(--instant-apps-interactive-legend-info-item-background--hover)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive:hover.instant-apps-interactive-legend-element-info--selected{background-color:#e2f2fe}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend__layer-row--interactive:hover{background-color:var(--instant-apps-interactive-legend-info-item-background--hover--dark)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend__layer-row--interactive:hover.instant-apps-interactive-legend-element-info--selected{background-color:#26a9f4}}}`,m={layer:"esri-legend__layer",layerBody:"esri-legend__layer-body",layerRow:"esri-legend__layer-row",layerInfo:"esri-legend__layer-cell esri-legend__layer-cell--info",imageryLayerStretchedImage:"esri-legend__imagery-layer-image--stretched",imageryLayerInfoStretched:"esri-legend__imagery-layer-info--stretched",symbolContainer:"esri-legend__layer-cell esri-legend__layer-cell--symbols",symbol:"esri-legend__symbol",rampContainer:"esri-legend__ramps",sizeRamp:"esri-legend__size-ramp",colorRamp:"esri-legend__color-ramp",opacityRamp:"esri-legend__opacity-ramp",rampLabelsContainer:"esri-legend__ramp-labels",rampLabel:"esri-legend__ramp-label",univariateAboveAndBelowLabel:"esri-univariate-above-and-below-ramp__label",message:"esri-legend__message",layerBodyLargeSymbol:"instant-apps-interactive-legend__layer-body--large-symbol",interactiveLayerRow:"instant-apps-interactive-legend__layer-row--interactive",infoSelected:"instant-apps-interactive-legend-element-info--selected",compact:"instant-apps-interactive-legend__compact"},Xt=24,ft={display:"flex",alignItems:"flex-start"},Ie={marginLeft:"3px"},ae={display:"table-cell",verticalAlign:"middle"},Te=class extends qe{constructor(){super(...arguments),this.featureCountRequestId=0,this._legendContainerRef=Ue(),this._hiddenLegendState={},this._pendingRestore={},this._restoreTimeouts={},this.isLoading=!0,this.zoomTo=!1,this.featureCount=!1,this.filterMode={type:Ce.FILTER}}static{this.properties={isLoading:16,legendvm:0,zoomTo:5,featureCount:5,filterMode:0,messages:0}}static{this.styles=Qt}static{this.shadowRootOptions=De}connectedCallback(){super.connectedCallback(),!this.handles&&(this.handles=new At)}async load(){new MutationObserver(()=>{this.requestUpdate()}).observe(this.el,{attributes:!0}),J.onChange("data",()=>this.requestUpdate())}willUpdate(e){e.has("filterMode")&&this.legendvm?.view&&(this.hasUpdated||!ue(this.filterMode.type))&&It(this.filterMode,this.legendvm.view),e.has("featureCount")&&e.get("featureCount")===!1&&this.featureCount&&this.legendvm&&this.refreshFeatureCount().catch(n=>{console.error(n)})}async loaded(){await this.initLegend()}disconnectedCallback(){super.disconnectedCallback(),this.handles?.removeAll(),this.handles?.destroy(),this.handles=null}async initLegend(){try{await U.whenOnce(()=>this.legendvm?.view);let e=async()=>{try{let n=this.legendvm?.view?.map;await n?.load(),await n?.basemap?.load();let l=n?.allLayers?.map(async u=>await u.load()),r=(await Promise.allSettled(l)).map(u=>u?.status==="fulfilled"&&u?.value?u.value:null).filter(u=>!!u),s=[];r.forEach(u=>{this.legendvm?.view&&s.push(this.legendvm.view.whenLayerView(u))}),await Promise.allSettled(s),await Promise.race([U.whenOnce(()=>(this.legendvm?.activeLayerInfos?.length??0)>0),new Promise(u=>{setTimeout(u,250)})]);let h=await we(this.legendvm);Object.keys(h).length===0&&(await new Promise(u=>{setTimeout(u,250)}),h=await we(this.legendvm)),J.set("data",{...j.data,...h}),await this.refreshFeatureCount(),this.isLoading=!1,await this.setupWatchersAndListeners()}catch(n){console.error(n),this.isLoading=!1}};this.legendvm?.view?.when(e),this.legendvm?.view?.map?.layers?.on("after-changes",e)}catch{this.isLoading=!1}}getStretchStopLabel(e){let n=this.messages[e.label];return e.label?`${n}: ${typeof e.value=="string"?e.value:fe.formatNumber(e.value,{style:"decimal",notation:e.value.toString().includes("e")?"scientific":"standard"})}`:""}getTitle(e,n){if(!e)return;if(typeof e=="string"||typeof e=="number")return e;if("value"in e||"unit"in e){let s=typeof this.messages?.dotValue=="string"?this.messages.dotValue:"";return fe.substitute(s,e)}if("colorName"in e||"bandName"in e){let{colorName:s,bandName:h}=e,u=this.messages[s],w=typeof this.messages[h]=="string"?this.messages[h]:h;return`${u}: ${w}`}if("showCount"in e)return e.showCount?this.messages.clusterCountTitle:null;let l=null;if(n){let s=e;l=s.ratioPercentTotal?"showRatioPercentTotal":s.ratioPercent?"showRatioPercent":s.ratio?"showRatio":e.normField?"showNormField":e.field?"showField":null}else if(this.isRendererTitle(n)){let s=e;l=s.normField?"showNormField":s.normByPct?"showNormPct":s.field?"showField":null}let r=l==="showField"?"{field}":typeof l=="string"?this.messages[l]:"";return l?fe.substitute(r,{field:e.field,normField:e.normField}):""}isRendererTitle(e){return!e}async setupWatchersAndListeners(){let e=this.legendvm?.view?.map?.allLayers?.filter(r=>be(r?.type)),n=[];for(let r of e)this.legendvm?.view&&n.push(this.legendvm?.view?.whenLayerView(r));let l=[];try{l=await Promise.all(n)}catch(r){console.error(r)}for(let r of l){let s=`fLayerViewScale-${r.layer.id}`;!this.handles?.has(s)&&r&&this.handles?.add(r.watch("visibleAtCurrentScale",()=>{this.createDataForLayer(r.layer).catch(h=>{console.error(h)})}),s)}e?.forEach(r=>{let s=`fLayer-${r?.id}`;this.handles?.has(s)||this.handles?.add(U?.watch(()=>r?.visible,()=>this.handleFeatureLayerVisibilityChange(r)),s)}),this.handles?.add(U.when(()=>this.legendvm,()=>{U.watch(()=>this.legendvm?.view?.updating,()=>{this.legendvm?.view?.updating&&U.when(()=>!this.legendvm?.view?.updating,()=>{this.refreshFeatureCount().catch(r=>{console.error(r)})},{once:!0,initial:!0})},{initial:!0})},{initial:!0,once:!0})),this.handles?.add(U.on(()=>this.legendvm?.activeLayerInfos,"change",r=>{this.regenerateData().then(()=>{this.handles?.add(U.on(()=>r.children,"change",()=>{this.regenerateData().catch(s=>{console.error(s)})}))}).catch(s=>{console.error(s)})})),this.handles?.add(U.on(()=>this.legendvm?.view?.map?.layers,"after-changes",()=>{this.refreshFeatureCount().catch(r=>{console.error(r)})}))}async createDataForLayer(e){let n=e?.id;if(nt(n,this._pendingRestore,this._hiddenLegendState))return;let l=J.get("data")?.[n],r=it(this.legendvm?.activeLayerInfos)?.find(s=>s?.layer?.id===n);if(!l&&r){let s=await Ve(this.legendvm,r);he({intLegendLayerData:s,layerId:n}),await this.refreshFeatureCount()}}applyFilter(e,n,l,r){return async()=>{let s={...j.data?.[n?.id]};r?await dt(s,e,l,this.filterMode,r):await dt(s,e,l,this.filterMode),he({intLegendLayerData:s,layerId:n?.id})}}async regenerateData(){let e=await we(this.legendvm),n=at(e,j.data,this._pendingRestore,this._hiddenLegendState);J.set("data",n),await this.refreshFeatureCount(),this.requestUpdate()}async refreshFeatureCount(){if(!this.featureCount)return;let e=++this.featureCountRequestId;try{let n=await lt(this.legendvm,j.data);if(e!==this.featureCountRequestId)return;J.set("data",{...j.data,...n})}catch{}}handleFeatureLayerVisibilityChange(e){let n=e.id,l=J.get("data")?.[n];if(e.visible){this.handleFeatureLayerVisible(n,e);return}this.handleFeatureLayerHidden(n,l)}handleFeatureLayerVisible(e,n){if(this._hiddenLegendState[e]){let l=this._hiddenLegendState[e];this._pendingRestore[e]=l,he({intLegendLayerData:l,layerId:e}),delete this._hiddenLegendState[e],this.clearRestoreGuard(e),this._restoreTimeouts[e]=window.setTimeout(()=>{delete this._pendingRestore[e],delete this._restoreTimeouts[e]},250);return}this.createDataForLayer(n).catch(l=>{console.error(l)})}handleFeatureLayerHidden(e,n){this.clearRestoreGuard(e),n&&(this._hiddenLegendState[e]=n)}clearRestoreGuard(e){this._restoreTimeouts[e]&&(clearTimeout(this._restoreTimeouts[e]),delete this._restoreTimeouts[e]),delete this._pendingRestore[e]}isImageryStretchedLegend(e,n){return!0}render(){let e=this.renderFilteredLayers(),n=J.get("compact")?` ${m.compact}`:"";return this.isLoading?Q("interactive-legend-loader",L`<calcite-loader scale=m .label=${this.messages?.loading} .text=${this.messages?.loading}></calcite-loader>`):Q("interactive-legend-classic-container",L`<div class=${`${N(this.el)}${n}`} ${xe(this._legendContainerRef)}>${e?.length>0?e:L`<div class=${x(m.message)}>${this.messages?.noLegend}</div>`}</div>`)}renderFilteredLayers(){return(this.legendvm?.activeLayerInfos?.toArray()).map(e=>this.renderLegendForLayer(e)).filter(e=>!!e)}renderLegendForLayer(e,n){if(!e.ready)return null;if(e.children.length){let s=e.children.map(h=>this.renderLegendForLayer(h,!0)).toArray();return L`<instant-apps-interactive-legend-group-legend-element class=${x(N(this.el))} .legendvm=${this.legendvm} .featureCount=${this.featureCount} .activeLayerInfo=${e} .isChild=${n}><div style=${k({paddingLeft:"20px"})} .id=${`${e?.layer?.id}-legend-layer`} slot=content>${s}</div></instant-apps-interactive-legend-group-legend-element>`}let l=e.legendElements;if(l&&!l.length)return null;let r=l.map((s,h)=>this.renderLegendForElement(s,e.layer,e.effectList,e,h)).filter(s=>!!s);return r.length?L`<instant-apps-interactive-legend-layer-element class=${x(N(this.el))} .legendvm=${this.legendvm} .featureCount=${this.featureCount} .activeLayerInfo=${e} .isChild=${!!n}><div slot=content .id=${`${e?.layer?.id}-legend-layer`} class=${x(m.layer)}>${r}</div></instant-apps-interactive-legend-layer-element>`:null}renderLegendForElement(e,n,l,r,s,h,u){let w=de(e),$=me(e),S=ye(e),E=null,_=Ne(r,e,s),T=Xe(e),M=Bt(this._legendContainerRef?.value?.clientWidth||this.el?.clientWidth);if(Ye(e)||S){let A=e.infos.some(q=>Ht(q,M)),B=e.infos.map((q,K)=>this.renderLegendForElementInfo(q,n,l,S,e,r,s,K,_,u)).filter(q=>!!q);B.length&&(E=L`<div class=${`${m.layerBody}${A?` ${m.layerBodyLargeSymbol}`:""}`}>${B}</div>`)}else if(de(e)||me(e)||Ee(e)||Re(e)){let A=e;E=this.renderLegendForRamp(A,n.opacity)}else if(T){let A=e;E=Q(Ke.RELATIONSHIP_RAMP,L`<instant-apps-interactive-legend-relationship class=${x(N(this.el))} .filterMode=${this.filterMode} .activeLayerInfo=${r} .legendElement=${A}></instant-apps-interactive-legend-relationship>`)}else if(Qe(e)){let A=e;E=this.renderPieChartRamp(A)}else if(Ze(e)){let A=e;E=this.renderUnivariateAboveAndBelowRamp(A,n.opacity,l)}else if(Oe(e)){let A=e;E=this.renderUnivariateColorSizeRamp(A,n.opacity,l)}if(!E)return null;let I=e.title,P=null;if(typeof I=="string")P=I;else if(I){let A=I,B=this.getTitle(A,w||$);this.isRendererTitle(w||$)?"title"in I&&(P=`${I.title} (${B})`):P=B}return L`<instant-apps-interactive-legend-legend-element class=${x(N(this.el))} .activeLayerInfo=${r} .isSizeRamp=${S} .isChild=${!!h} .isColorRamp=${w} .isRelationshipRamp=${T} .isInteractive=${_} .zoomTo=${this.zoomTo} .legendElement=${e} .titleText=${P} .legendvm=${this.legendvm} .legendElementIndex=${s}><div slot=content>${E}</div></instant-apps-interactive-legend-legend-element>`}renderPieChartRamp(e){return L`<div .innerHTML=${`${e.preview?.outerHTML}`}></div>`}renderUnivariateAboveAndBelowRamp(e,n,l){let{sizeRampElement:r,colorRampElement:s}=Jt(e,n);if(!r)return null;let h=Se(r,"above",!0),u=Se(r,"below",!0),w=12,$=ke(s,{width:w,height:h,rampAlignment:"vertical",opacity:n,type:"above",effectList:l}),S=ke(s,{width:w,height:u,rampAlignment:"vertical",opacity:n,type:"below",effectList:l}),E=ot(r),_=r.infos.map(H=>H.label),T=_.map((H,D)=>D===0?L`<div class=${x(H?$?m.univariateAboveAndBelowLabel:m.rampLabel:"")}>${H}</div>`:D===2?L`<div></div>`:null),M=_.length-1,I=Math.floor(_.length/2),P=_.map((H,D)=>D===I||D===M?L`<div class=${x(H?$?m.univariateAboveAndBelowLabel:m.rampLabel:"")}>${H}</div>`:null),A={display:"table-cell",verticalAlign:"middle"},B={marginTop:`${E}px`},q={height:`${h}px`},K={height:`${u}px`};return Q("univariate-above-and-below-ramp-preview",L`<div style=${k(ft)}><div class=${x(m.layerBody)}>${r.infos.map((H,D)=>L`<div class=${`${m.layerRow} ${m.sizeRamp}`}><div class=${x(m.symbol)} style=${k(A)} .innerHTML=${H?.preview?.outerHTML??""??""}></div>${!$&&D%2===0?L`<div class=${x(m.layerInfo)}>${_[D]}</div>`:null}</div>`)}</div>${$?Q("color-ramp-preview",L`<div style=${k(B)}><div style=${k(Ie)}><div style=${k(ae)}><div class=${x(m.rampContainer)}>${$}</div></div><div style=${k(ae)}><div class=${x(m.rampLabelsContainer)} style=${k(q)}>${T}</div></div></div><div style=${k(Ie)}><div style=${k(ae)}><div class=${x(m.rampContainer)}>${S}</div></div><div style=${k(ae)}><div class=${x(m.rampLabelsContainer)} style=${k(K)}>${P}</div></div></div></div>`):null}</div>`)}renderUnivariateColorSizeRamp(e,n,l){let{sizeRampElement:r,colorRampElement:s}=Kt(e);if(!r)return null;let h=ot(r),u=12,w=Se(r,"full",!1),$=ke(s,{width:u,height:w,rampAlignment:"vertical",opacity:n,type:"full",effectList:l}),S=r.infos.length-1,E=r.infos.map((I,P)=>P===0||P===S?L`<div class=${x(I.label?s?m.univariateAboveAndBelowLabel:m.rampLabel:"")}>${I.label}</div>`:null),_={display:"table-cell",verticalAlign:"middle"},T={marginTop:`${h}px`},M={height:`${w}px`};return Q("univariate-above-and-below-ramp-preview",L`<div style=${k(ft)}><div class=${x(m.layerBody)}>${r.infos.map(I=>L`<div class=${`${m.layerRow} ${m.sizeRamp}`}><div class=${x(m.symbol)} style=${k(_)} .innerHTML=${I?.preview?.outerHTML??""??""}></div></div>`)}</div>${Q("color-ramp-preview",L`<div style=${k(T)}><div style=${k(Ie)}><div style=${k(ae)}><div class=${x(m.rampContainer)}>${$}</div></div><div style=${k(ae)}><div class=${x(m.rampLabelsContainer)} style=${k(M)}>${E}</div></div></div></div>`)}</div>`)}renderLegendForRamp(e,n){let l=e.infos,r=me(e),s=Ee(e),h=Re(e),u=e.preview,w=r?m.opacityRamp:"";u&&(u.classList.add(m.colorRamp),w&&u.classList.add(w)),n!=null&&u&&(u.style.opacity=n.toString());let $=l.map(_=>{let T;if(s){let M=this.messages[_.label];T=typeof M=="string"?M:_.label}else h?T="value"in _?this.getStretchStopLabel(_):_.label:T=_.label;return L`<div class=${x(_.label?m.rampLabel:"")}>${T}</div>`}),S={width:`${Xt}px`},E={height:u?.style?.height};return L`<div class=${x(m.layerRow)}><div class=${x(m.symbolContainer)} style=${k({...S})}><div class=${x(m.rampContainer)} ${xe(_=>{_?.firstChild&&_?.firstChild?.remove(),_?.appendChild(u)})}></div></div><div class=${x(m.layerInfo)}><div class=${x(m.rampLabelsContainer)} style=${k({...E})}>${$}</div></div></div>`}renderLegendForElementInfo(e,n,l,r,s,h,u,w,$,S){if("infos"in e)return this.renderLegendForElement(e,n,l,h,u,!0,e);let E=null,_=!this.isImageryStretchedLegend(n,s.type);if("preview"in e){let{outerHTML:W}=e.preview;E=L`<div class=${x(m.symbol)} .innerHTML=${W??""}></div>`}else"src"in e&&(E=this.renderImage(e,n,_));if(!E)return null;let T=_?` ${m.imageryLayerInfoStretched}`:"",M=!_&&r?` ${m.sizeRamp}`:"",I,P=Je(n),A=tt(P,S);if(j.data){let W=et(P,n,e,A,w),V=A?A?.nestedInfos:P,se=je(V),_e=!!h?.children?.length||!!A;I=P?.categories?.size===1&&!_e?!W?.selected:se||W?.selected}let B="label"in e?e.label:null,q=A&&!("value"in e)?!1:$,K=J.get("compact"),H=this.getTitle(B,!1)||"",D=A?s.title:B??n?.id;return q?L`<button @click=${this.applyFilter(e,n,w,S)} class=${`${m.layerRow} ${m.interactiveLayerRow}${I?` ${m.infoSelected}`:""}`} title=${(K?`${H}`:void 0)??pe} .ariaPressed=${I?"true":"false"}><div class=${`${m.symbolContainer}${T}${M}`}>${E}</div><div class=${`${m.layerInfo}${T}`}>${this.getTitle(B,!1)||""}</div>${this.featureCount&&!K?L`<instant-apps-interactive-legend-count class=${x(N(this.el))} .categoryId=${D} .activeLayerInfo=${h} .legendvm=${this.legendvm} .selected=${!!I} .legendElement=${s} .infoIndex=${w}></instant-apps-interactive-legend-count>`:null}</button>`:L`<div class=${x(m.layerRow)}><div class=${`${m.symbolContainer}${T}${M}`}>${E}</div><div class=${`${m.layerInfo}${T}`}>${H}</div></div>`}renderImage(e,n,l){let{label:r,src:s,opacity:h}=e,u=l?` ${m.imageryLayerStretchedImage}`:"",w=l?"":` ${m.symbol}`,$={opacity:`${h??n.opacity}`};return L`<img alt=${this.getTitle(r,!1)??pe} src=${s??pe} width=${e.width} height=${e.height} class=${`$${u}${w}`} style=${k($)}>`}};We("instant-apps-interactive-legend-classic",Te);return Te},"layers/support/FeatureFilter","layers/support/FeatureEffect","symbols/support/symbolUtils","core/reactiveUtils","intl","core/Handles",a,b,c,d,e)
2
+ import e from"./KGUELU4O.js";import d from"./3W7ANZME.js";import{a as Ne}from"./CJ3EZE7U.js";import c from"./SHQFXQEI.js";import{d as je}from"./C5KDPY7R.js";import{a as Ke,b as de,c as Ee,d as me,e as Qe,f as Xe,g as ye,h as Re,i as Ye,j as Ze,k as Oe}from"./YM4U4HSN.js";import{a as Ce,b as Ge,c as ue}from"./TCUNTTNI.js";import{a as N}from"./IADXB53D.js";import b from"./QZ2ZMWIH.js";import a from"./CS5N3DOL.js";import{a as Q}from"./YUWXPLTE.js";import{b as We}from"./KGXEY5HR.js";import"./Y2AUIXNK.js";import{F as Ue,G as xe,H as qe,J as x,K as k,h as Be,i as L,j as Le,l as pe,u as De}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([ct,vt,pt,U,fe,At,,{a:j,b:J,c:Je,d:he},{a:be,b:Ve,d:et,f:tt,g:we,h:it,i:nt,j:at},{a:rt,b:Ae,c:st,g:lt},oe])=>{(function(d,e){typeof exports=="object"&&typeof module<"u"?e(exports):typeof define=="function"&&define.amd?define(["exports"],e):(d=typeof globalThis<"u"?globalThis:d||self,e(d.maquette={}))})(void 0,(function(d){"use strict";var e=function(){var t,i;return{invalidate:function(){i=void 0,t=void 0},result:function(a,c){if(t)for(var p=0;p<a.length;p++)t[p]!==a[p]&&(i=void 0);return i||(i=c(),t=a),i}}},n="http://www.w3.org/",l="".concat(n,"2000/svg"),r="".concat(n,"1999/xlink"),s=[],h=function(t,i){var a={};return Object.keys(t).forEach(function(c){a[c]=t[c]}),i&&Object.keys(i).forEach(function(c){a[c]=i[c]}),a},u=function(t,i){return t.vnodeSelector!==i.vnodeSelector?!1:t.properties&&i.properties?t.properties.key!==i.properties.key?!1:t.properties.bind===i.properties.bind:!t.properties&&!i.properties},w=function(t){if(typeof t!="string")throw new Error("Style values must be strings")},$=function(t,i,a){if(i.vnodeSelector!==""){for(var c=a;c<t.length;c++)if(u(t[c],i))return c}return-1},S=function(t,i,a,c){var p=t[i];if(p.vnodeSelector!==""){var o=p.properties,C=o?o.key===void 0?o.bind:o.key:void 0;if(!C){for(var g=0;g<t.length;g++)if(g!==i){var f=t[g];if(u(f,p))throw Object.assign(new Error("".concat(a.vnodeSelector," had a ").concat(p.vnodeSelector," child ").concat(c==="added"?c:"removed",", but there is now more than one. You must add unique key properties to make them distinguishable.")),{parentNode:a,childNode:p})}}}},E=function(t){if(t.properties){var i=t.properties.enterAnimation;i&&i(t.domNode,t.properties)}},_=[],T=!1,M=function(t){(t.children||[]).forEach(M),t.properties&&t.properties.afterRemoved&&t.properties.afterRemoved.apply(t.properties.bind||t.properties,[t.domNode])},I=function(){T=!1,_.forEach(M),_.length=0},P=function(t){_.push(t),T||(T=!0,typeof window<"u"&&"requestIdleCallback"in window?window.requestIdleCallback(I,{timeout:16}):setTimeout(I,16))},A=function(t){var i=t.domNode;if(t.properties){var a=t.properties.exitAnimation;if(a){i.style.pointerEvents="none";var c=function(){i.parentNode&&(i.parentNode.removeChild(i),P(t))};a(i,c,t.properties);return}}i.parentNode&&(i.parentNode.removeChild(i),P(t))},B=["on","afterCreate","afterUpdate","afterRemoved","enterAnimation","exitAnimation","updateAnimation"];function q(t){return!B.includes(t)}var K=function(t,i,a){if(i){for(var c=a.eventHandlerInterceptor,p=Object.keys(i).filter(q),o=p.length,C=0;C<o;C++){var g=p[C],f=i[g];if(g==="className")throw new Error('Property "className" is not supported, use "class".');if(g==="class")se(t,f,!0);else if(g==="classes")for(var v=Object.keys(f),R=v.length,b=0;b<R;b++){var y=v[b];f[y]&&t.classList.add(y)}else if(g==="styles")for(var z=Object.keys(f),F=z.length,b=0;b<F;b++){var G=z[b],te=f[G];te&&(w(te),a.styleApplyer(t,G,te))}else if(g!=="key"&&f!==null&&f!==void 0){var ve=typeof f;ve==="function"?(g.lastIndexOf("on",0)===0&&c&&(f=c(g,f,t,i)),t[g]=f):a.namespace===l?g==="href"?t.setAttributeNS(r,g,f):t.setAttribute(g,f):ve==="string"&&g!=="value"&&g!=="innerHTML"?t.setAttribute(g,f):t[g]=f}}if(i.on)for(var ie=0,ge=Object.entries(i.on);ie<ge.length;ie++){var Y=ge[ie],Z=Y[0],O=Y[1],ne=typeof O=="function"?O:O.listener;c&&(ne=c(Z,ne,t,i)),ne&&t.addEventListener(Z,ne,typeof O=="function"?void 0:O.options)}}},H=function(t,i,a){if(i)for(var c=0,p=i;c<p.length;c++){var o=p[c];W(o,t,void 0,a)}},D=function(t,i,a){H(t,i.children,a),i.text&&(t.textContent=i.text),K(t,i.properties,a),i.properties&&i.properties.afterCreate&&i.properties.afterCreate.apply(i.properties.bind||i.properties,[t,a,i.vnodeSelector,i.properties,i.children])},W=function(t,i,a,c){var p,o,C=0,g=t.vnodeSelector,f=i.ownerDocument;if(g==="")t.domNode?t.domNode.nodeValue=t.text:(o=t.domNode=f.createTextNode(t.text),a!==void 0?i.insertBefore(o,a):i.appendChild(o));else{for(var v=0;v<=g.length;++v){var R=g.charAt(v);if(v===g.length||R==="."||R==="#"){var b=g.charAt(C-1),y=g.slice(C,v);b==="."?o.classList.add(y):b==="#"?o.id=y:(y==="svg"&&(c=h(c,{namespace:l})),c.namespace!==void 0?o=t.domNode=f.createElementNS(c.namespace,y):(o=t.domNode=t.domNode||(!((p=t.properties)===null||p===void 0)&&p.is?f.createElement(y,{is:t.properties.is}):f.createElement(y)),y==="input"&&t.properties&&t.properties.type!==void 0&&o.setAttribute("type",t.properties.type)),a!==void 0?i.insertBefore(o,a):o.parentNode!==i&&i.appendChild(o)),C=v+1}}D(o,t,c)}},V,se=function(t,i,a){i&&i.split(" ").forEach(function(c){c&&t.classList.toggle(c,a)})},_e=function(t,i,a,c){if(a){for(var p=!1,o=Object.keys(a).filter(q),C=o.length,g=0;g<C;g++){var f=o[g],v=a[f],R=i[f];if(f==="class")R!==v&&(se(t,R,!1),se(t,v,!0));else if(f==="classes")for(var b=t.classList,y=Object.keys(v),z=y.length,F=0;F<z;F++){var G=y[F],te=!!v[G],ve=!!R[G];te!==ve&&(p=!0,te?b.add(G):b.remove(G))}else if(f==="styles")for(var ie=Object.keys(v),ge=ie.length,F=0;F<ge;F++){var Y=ie[F],Z=v[Y],O=R[Y];Z!==O&&(p=!0,Z?(w(Z),c.styleApplyer(t,Y,Z)):c.styleApplyer(t,Y,""))}else if(!v&&typeof R=="string"&&(v=""),f==="value"){var ne=t[f];ne!==v&&v!==R&&(t[f]=v),v!==R&&(p=!0)}else if(v!==R){var He=typeof v;(He!=="function"||!c.eventHandlerInterceptor)&&(c.namespace===l?f==="href"?t.setAttributeNS(r,f,v):t.setAttribute(f,v):He==="string"&&f!=="innerHTML"?f==="role"&&v===""?t.removeAttribute(f):t.setAttribute(f,v):t[f]!==v&&(t[f]=v),p=!0)}}return p}},bt=function(t,i,a,c,p){if(a===c)return!1;a=a||s,c=c||s;for(var o=a.length,C=c.length,g=0,f=0,v,R=!1;f<C;){var b=g<o?a[g]:void 0,y=c[f];if(b!==void 0&&u(b,y))R=V(b,y,p,i,a)||R,g++;else{var z=$(a,y,g+1);if(z>=0){for(v=g;v<z;v++)A(a[v]),S(a,v,t,"removed");R=V(a[z],y,p,i,a)||R,g=z+1}else W(y,i,g<o?a[g].domNode:void 0,p),E(y),S(c,f,t,"added")}f++}if(o>g)for(v=g;v<o;v++)A(a[v]),S(a,v,t,"removed");return R};V=function(t,i,a,c,p){var o=t.domNode,C=!1;if(t===i)return!1;var g=!1;if(i.vnodeSelector===""){if(i.text!==t.text){var f=o.ownerDocument.createTextNode(i.text);try{c.replaceChild(f,o)}catch{c.replaceChild(f,c.childNodes[p.indexOf(t)])}return i.domNode=f,C=!0,C}i.domNode=o}else i.vnodeSelector.lastIndexOf("svg",0)===0&&(a=h(a,{namespace:l})),t.text!==i.text&&(g=!0,i.text===void 0?o.removeChild(o.firstChild):o.textContent=i.text),i.domNode=o,g=bt(i,o,t.children,i.children,a)||g,g=_e(o,t.properties,i.properties,a)||g,i.properties&&i.properties.afterUpdate&&i.properties.afterUpdate.apply(i.properties.bind||i.properties,[o,a,i.vnodeSelector,i.properties,i.children]);return g&&i.properties&&i.properties.updateAnimation&&i.properties.updateAnimation(o,i.properties,t.properties),C};var le=function(t,i){return{getLastRender:function(){return t},update:function(a){if(t.vnodeSelector!==a.vnodeSelector)throw new Error("The selector for the root VNode may not be changed. (consider using dom.merge and add one extra level to the virtual DOM)");var c=t;t=a,V(c,a,i,c.domNode.parentNode,[c])},domNode:t.domNode}},wt={namespace:void 0,performanceLogger:function(){},eventHandlerInterceptor:void 0,styleApplyer:function(t,i,a){i.charAt(0)==="-"?t.style.setProperty(i,a):t.style[i]=a}},ee=function(t){return h(wt,t)},ce={create:function(t,i){return i=ee(i),W(t,document.createElement("div"),void 0,i),le(t,i)},append:function(t,i,a){return a=ee(a),W(i,t,void 0,a),le(i,a)},insertBefore:function(t,i,a){return a=ee(a),W(i,t.parentNode,t,a),le(i,a)},merge:function(t,i,a){return a=ee(a),i.domNode=t,D(t,i,a),le(i,a)},replace:function(t,i,a){return a=ee(a),W(i,t.parentNode,t,a),t.parentNode.removeChild(t),le(i,a)}},$t=function(t){return{vnodeSelector:"",properties:void 0,children:void 0,text:t.toString(),domNode:null}},Me=function(t,i,a){for(var c=0,p=i.length;c<p;c++){var o=i[c];Array.isArray(o)?Me(t,o,a):o!=null&&o!==!1&&(typeof o=="string"&&(o=$t(o)),a.push(o))}};function _t(t,i,a){if(Array.isArray(i))a=i,i=void 0;else if(i&&(typeof i=="string"||i.vnodeSelector)||a&&(typeof a=="string"||a.vnodeSelector))throw new Error("h called with invalid arguments");var c,p;return a&&a.length===1&&typeof a[0]=="string"?c=a[0]:a&&(p=[],Me(t,a,p),p.length===0&&(p=void 0)),{vnodeSelector:t,properties:i,children:p,text:c===""?void 0:c,domNode:null}}var Lt=function(t,i,a){var c=[],p=[];return{results:p,map:function(o){for(var C=o.map(t),g=p.slice(),f=0,v=0;v<o.length;v++){var R=o[v],b=C[v];if(b===c[f])p[v]=g[f],a(R,g[f],v),f++;else{for(var y=!1,z=1;z<c.length+1;z++){var F=(f+z)%c.length;if(c[F]===b){p[v]=g[F],a(o[v],g[F],v),f=F+1,y=!0;break}}y||(p[v]=i(R,v))}}p.length=o.length,c=C}}},xt=function(t,i){for(var a=[];t&&t!==i;)a.push(t),t=t.parentNode;return a},Ct=function(t,i){var a=t;return i.forEach(function(c){a=a&&a.children?a.children.find(function(p){return p.domNode===c}):void 0}),a},Et=function(t,i,a){return function(p,o,C,g){return c};function c(p){var o,C;a("domEvent",p);var g=i(),f=xt(p.currentTarget,g.domNode);f.reverse();var v=Ct(g.getLastRender(),f);t.scheduleRender();var R;if(v){var b=(C=(o=v.properties["on".concat(p.type)])!==null&&o!==void 0?o:v.properties.on[p.type].listener)!==null&&C!==void 0?C:v.properties.on[p.type];R=b.apply(v.properties.bind||this,arguments)}return a("domEventProcessed",p),R}},Rt=function(t){var i,a=ee(t),c=a.performanceLogger,p=!0,o,C=!1,g=[],f=[],v=function(b,y,z){var F,G=function(){return F};a.eventHandlerInterceptor=Et(i,G,c),F=b(y,z(),a),g.push(F),f.push(z)},R=function(){if(o=void 0,!!p){p=!1,c("renderStart",void 0);for(var b=0;b<g.length;b++){var y=f[b]();c("rendered",void 0),g[b].update(y),c("patched",void 0)}c("renderDone",void 0),p=!0}};return i={renderNow:R,scheduleRender:function(){!o&&!C&&(o=requestAnimationFrame(R))},stop:function(){o&&(cancelAnimationFrame(o),o=void 0),C=!0},resume:function(){C=!1,p=!0,i.scheduleRender()},append:function(b,y){v(ce.append,b,y)},insertBefore:function(b,y){v(ce.insertBefore,b,y)},merge:function(b,y){v(ce.merge,b,y)},replace:function(b,y){v(ce.replace,b,y)},detach:function(b){for(var y=0;y<f.length;y++)if(f[y]===b)return f.splice(y,1),g.splice(y,1)[0];throw new Error("renderFunction was not found")}},i};d.createCache=e,d.createMapping=Lt,d.createProjector=Rt,d.dom=ce,d.h=_t}));function kt(d,e,n,l){let r=st(d,e,n,l),s=St(r);return r.join(s)}function St(d){return d.every(e=>e&&e.includes(rt.NOT_EQUAL))?Ae.AND:Ae.OR}async function dt(d,e,n,l,r){let{fLayerView:s}=d,h=kt(d,e,n,r),u=s?.filter?.timeExtent??s?.featureEffect?.filter?.timeExtent??null,{type:w}=l;if(ue(w))s.filter=new ct({where:h,timeExtent:u});else if(l.effect){let{includedEffect:$,excludedEffect:S}=l.effect,E=await oe(S,s,"excludedEffect"),_=await oe($,s,"includedEffect");s.featureEffect=new vt({filter:new ct({where:h,timeExtent:u}),includedEffect:_,excludedEffect:E})}return await Promise.resolve()}function It(d,e){let{type:n}=d;ue(n)?Tt(e):Ge(n)&&Ft(d,e)}function Tt(d){d?.allLayerViews?.filter(e=>be(e?.layer?.type))?.forEach(e=>{let n=e,l=ut(n);n.filter=l,n.set("featureEffect",null)})}function Ft(d,e){e?.allLayerViews?.filter(n=>be(n?.layer?.type)).forEach(async n=>{let l=n;if(d?.effect&&l){let{includedEffect:r,excludedEffect:s}=d.effect,h=await oe(s,l,"excludedEffect"),u=await oe(r,l,"includedEffect"),w=ut(l);l.featureEffect=new vt({filter:w,includedEffect:u,excludedEffect:h}),l.set(Ce.FILTER,null)}})}function ut(d){return d?.filter||d?.featureEffect?.filter}var Pt=80,zt=.2,Mt=6;function X(d){let e=typeof d=="number"?d:Number(d);return Number.isFinite(e)?e:0}function ht(d){if("infos"in d)return Math.max(...d.infos.map(e=>ht(e)),0);if("preview"in d&&d.preview){let e=d.preview,n=e.querySelector("svg"),l=X(n?.getAttribute("width")),r=X(n?.getAttribute("height")),s=X(e.style.width?.replace("px","")),h=X(e.style.height?.replace("px","")),u=X(e.clientWidth),w=X(e.clientHeight);return Math.max(l,r,s,h,u,w)}return"src"in d?Math.max(X(d.width),X(d.height)):0}function Ht(d,e){let n=ht(d);return n>=Pt?!0:typeof e!="number"||e<=0?!1:n+Mt>=e}function Bt(d){if(!(d<=0))return d*zt}var Dt=(void 0)(),mt=10,Fe=20,$e=10,Pe=20,ze={univariateAboveAndBelowSymbol:"esri-univariate-above-and-below-ramp__symbol",colorRamp:"esri-legend__color-ramp"};function Ut(d="vertical"){let e={stroke:"rgb(200, 200, 200)",strokeWidth:"1"};return d==="vertical"?L`<svg height=4 width=10>${Le`<line x1=0 y1=2 x2=10 y2=2 style=${k(e)} />`}</svg>`:L`<svg height=10 width=10>${Le`<line x1=5 y1=0 x2=5 y2=10 style=${k(e)} />`}</svg>`}function qt(d,e="vertical"){let n=document.createElement("div");return n.style.height=`${Fe}px`,n.className=ze.univariateAboveAndBelowSymbol,d!=null&&(n.style.opacity=d.toString()),Dt.append(n,Ut.bind(null,e)),n}function yt(d,e,n="vertical",l){d.infos.forEach((r,s)=>{if(l&&s===2)r.preview=qt(e,n);else{let{size:h}=r,u=re(h)+(n==="horizontal"?Pe:$e),w=r.preview.tagName.toLowerCase()==="div",$=w?r.preview:document.createElement("div");$&&($.className=ze.univariateAboveAndBelowSymbol),n==="horizontal"?$&&($.style.width=`${u}px`):$&&($.style.height=`${u}px`),w||$&&$.appendChild(r.preview),r.preview=$}})}var Wt=96;function re(d){return d?d/72*Wt:0}function ot(d,e="classic"){let n=d.infos,l=n[0].size,r=n[n.length-1].size;return e==="classic"?(re(l)+$e)/2:(re(l)-re(r))/2}function ke(d,e){if(!d)return null;let n=d.infos.map(r=>r.color),l=pt.renderColorRampPreviewHTML(e.type==="full"?n:e.type==="above"?n.slice(0,3):n.slice(2,5),{width:e.width,height:e.height,align:e.rampAlignment,effectList:e.effectList});return l.className=ze.colorRamp,e.opacity!=null&&(l.style.opacity=e.opacity.toString()),l}function Gt(d,e,n,l="vertical"){let r=0,s=d.infos,h=Math.floor(s.length/2),u=e==="full"||e==="above"?0:h,w=e==="full"||e==="below"?s.length-1:h;for(let $=u;$<=w;$++)if(n&&$===h)r+=l==="horizontal"?mt:Fe;else{let S=s[$].size,E=re(S)+(l==="horizontal"?Pe:$e);r+=E}return Math.round(r)}function Se(d,e,n,l="vertical"){let r=Gt(d,e,n,l),s=d.infos,h=Math.floor(s.length/2),u=e==="full"||e==="above"?0:h,w=e==="full"||e==="below"?s.length-1:h,$=e==="full"?s[u].size+s[w].size:e==="above"?s[u].size:s[w].size,S=n?l==="vertical"?Fe:mt:0,E=l==="vertical"?$e*(e==="full"?2:1):Pe*(e==="full"?2:1);return Math.round(r-(re($)/2+S/2+E/2))}function Jt(d,e,n="vertical"){let l=d.infos,r=l.find(h=>ye(h)),s=l.find(h=>de(h));return r&&(r={...r},r.infos=[...r.infos],yt(r,e,n,!0)),s&&(s={...s},s.infos=[...s.infos]),n==="horizontal"&&(r?.infos.reverse(),s?.infos.reverse()),{sizeRampElement:r,colorRampElement:s}}function Kt(d,e="vertical"){let n=d.infos,l=n.find(s=>ye(s)),r=n.find(s=>de(s));return l&&(l={...l},l.infos=[...l.infos],yt(l,null,e,!1)),r&&(r={...r},r.infos=[...r.infos]),e==="horizontal"&&(l?.infos.reverse(),r?.infos.reverse()),{sizeRampElement:l,colorRampElement:r}}var Qt=Be`@layer{instant-apps-interactive-legend-classic{display:block;--instant-apps-interactive-legend-heading-font-size: 1rem;--instant-apps-interactive-legend-heading-font-weight: normal;--instant-apps-interactive-legend-caption-font-weight: normal;--instant-apps-interactive-legend-secondary-color: var( --calcite-color-text-1 );--instant-apps-interactive-legend-field-name-font-size: 1rem;--instant-apps-interactive-legend-total-feature-count-font-size: .875rem;--instant-apps-interactive-legend-info-font-size: .875rem;--instant-apps-interactive-legend-info-item-background--selected: #c7ebff;--instant-apps-interactive-legend-info-item-background--selected--dark: #009af2;--instant-apps-interactive-legend-info-item-background--hover: #e9e9e9;--instant-apps-interactive-legend-info-item-background--hover--dark: #4a4a4a;--instant-apps-interactive-legend-info-item-color--selected: var( --calcite-color-text-2 );--instant-apps-interactive-legend-secondary-background-color: var( --calcite-color-background );--instant-apps-interactive-legend-ui-margin: 20px 15px;--instant-apps-interactive-legend-ui-padding: 20px 15px}instant-apps-interactive-legend-classic .esri-legend__service{padding:0}instant-apps-interactive-legend-classic .esri-legend__layer-body,instant-apps-interactive-legend-classic .esri-legend__layer,instant-apps-interactive-legend-classic .esri-legend__layer-table,instant-apps-interactive-legend-classic .esri-legend__group-layer-child,instant-apps-interactive-legend-classic .esri-legend__layer-child-table{margin:0;overflow:hidden}instant-apps-interactive-legend-classic .esri-legend__layer-caption calcite-action{margin-right:5px}instant-apps-interactive-legend-classic .esri-legend__layer-caption{display:flex;align-items:center;font-size:var(--instant-apps-interactive-legend-field-name-font-size);background-color:var(--instant-apps-interactive-legend-secondary-background-color);color:var(--instant-apps-interactive-legend-secondary-color)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-caption-btn-container{white-space:nowrap}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-caption-btn-container calcite-button{margin:2px}instant-apps-interactive-legend-classic .esri-legend__layer-caption{font-weight:var(--instant-apps-interactive-legend-caption-font-weight)}instant-apps-interactive-legend-classic .esri-legend__layer-cell.esri-legend__layer-cell--info{font-size:var(--instant-apps-interactive-legend-info-font-size);text-align:left}instant-apps-interactive-legend-classic .esri-legend__layer-cell,instant-apps-interactive-legend-classic .esri-legend__layer-row{display:flex;align-items:center}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-body{display:block;margin:var(--instant-apps-interactive-legend-ui-margin)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive.instant-apps-interactive-legend__nested-unique-symbol>.esri-legend__layer-body{margin:0}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-row{display:table-row}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__non-interactive .esri-legend__layer-cell{display:table-cell}instant-apps-interactive-legend-classic .esri-legend__layer-cell--symbols{justify-content:center;width:20%}instant-apps-interactive-legend-classic .esri-legend__layer-cell--info{width:65%}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{margin:1px;background:transparent;border:none;width:100%}instant-apps-interactive-legend-classic .esri-legend__layer-body.instant-apps-interactive-legend__layer-body--large-symbol>.esri-legend__layer-row{display:grid;grid-template-columns:minmax(35%,max-content) minmax(0,1fr);column-gap:clamp(.125rem,.3vw,.25rem);align-items:center;width:100%}instant-apps-interactive-legend-classic .esri-legend__layer-body.instant-apps-interactive-legend__layer-body--large-symbol>.esri-legend__layer-row>.esri-legend__layer-cell--symbols{width:35%;box-sizing:border-box;padding-inline:clamp(.125rem,.3vw,.25rem);display:flex;align-items:center;justify-content:center}instant-apps-interactive-legend-classic .esri-legend__layer-body.instant-apps-interactive-legend__layer-body--large-symbol>.esri-legend__layer-row>.esri-legend__layer-cell--info{display:block;width:auto;min-width:0}instant-apps-interactive-legend-classic .esri-legend__layer-cell--info{color:var(--instant-apps-interactive-legend-secondary-color)}instant-apps-interactive-legend-classic .esri-legend__layer-row,instant-apps-interactive-legend-classic .esri-legend__layer-caption{padding:var(--instant-apps-interactive-legend-ui-padding)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{position:relative}instant-apps-interactive-legend-classic .instant-apps-interactive-legend-element-info--selected{background-color:var(--instant-apps-interactive-legend-info-item-background--selected)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend-element-info--selected{cursor:pointer;background-color:var(--instant-apps-interactive-legend-info-item-background--selected--dark)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend-element-info--selected .esri-legend__layer-cell--info{color:var(--calcite-color-text-inverse)}instant-apps-interactive-legend-classic .hide{display:none}.instant-apps-interactive-legend__compact .esri-legend__layer-row{--instant-apps-interactive-legend-ui-padding: 10px 5px}.instant-apps-interactive-legend__compact .esri-legend__layer-row .esri-legend__layer-cell--info:not(:has(.esri-legend__ramp-labels)){display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;text-overflow:ellipsis;line-clamp:2;line-height:1.3125rem;max-height:2.625rem}@media(min-width:992px){instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive{cursor:pointer}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive:hover{background-color:var(--instant-apps-interactive-legend-info-item-background--hover)}instant-apps-interactive-legend-classic .instant-apps-interactive-legend__layer-row--interactive:hover.instant-apps-interactive-legend-element-info--selected{background-color:#e2f2fe}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend__layer-row--interactive:hover{background-color:var(--instant-apps-interactive-legend-info-item-background--hover--dark)}instant-apps-interactive-legend-classic .calcite-mode-dark .instant-apps-interactive-legend__layer-row--interactive:hover.instant-apps-interactive-legend-element-info--selected{background-color:#26a9f4}}}`,m={layer:"esri-legend__layer",layerBody:"esri-legend__layer-body",layerRow:"esri-legend__layer-row",layerInfo:"esri-legend__layer-cell esri-legend__layer-cell--info",imageryLayerStretchedImage:"esri-legend__imagery-layer-image--stretched",imageryLayerInfoStretched:"esri-legend__imagery-layer-info--stretched",symbolContainer:"esri-legend__layer-cell esri-legend__layer-cell--symbols",symbol:"esri-legend__symbol",rampContainer:"esri-legend__ramps",sizeRamp:"esri-legend__size-ramp",colorRamp:"esri-legend__color-ramp",opacityRamp:"esri-legend__opacity-ramp",rampLabelsContainer:"esri-legend__ramp-labels",rampLabel:"esri-legend__ramp-label",univariateAboveAndBelowLabel:"esri-univariate-above-and-below-ramp__label",message:"esri-legend__message",layerBodyLargeSymbol:"instant-apps-interactive-legend__layer-body--large-symbol",interactiveLayerRow:"instant-apps-interactive-legend__layer-row--interactive",infoSelected:"instant-apps-interactive-legend-element-info--selected",compact:"instant-apps-interactive-legend__compact"},Xt=24,ft={display:"flex",alignItems:"flex-start"},Ie={marginLeft:"3px"},ae={display:"table-cell",verticalAlign:"middle"},Te=class extends qe{constructor(){super(...arguments),this.featureCountRequestId=0,this._legendContainerRef=Ue(),this._hiddenLegendState={},this._pendingRestore={},this._restoreTimeouts={},this.isLoading=!0,this.zoomTo=!1,this.featureCount=!1,this.filterMode={type:Ce.FILTER}}static{this.properties={isLoading:16,legendvm:0,zoomTo:5,featureCount:5,filterMode:0,messages:0}}static{this.styles=Qt}static{this.shadowRootOptions=De}connectedCallback(){super.connectedCallback(),!this.handles&&(this.handles=new At)}async load(){new MutationObserver(()=>{this.requestUpdate()}).observe(this.el,{attributes:!0}),J.onChange("data",()=>this.requestUpdate())}willUpdate(e){e.has("filterMode")&&this.legendvm?.view&&(this.hasUpdated||!ue(this.filterMode.type))&&It(this.filterMode,this.legendvm.view),e.has("featureCount")&&e.get("featureCount")===!1&&this.featureCount&&this.legendvm&&this.refreshFeatureCount().catch(n=>{console.error(n)})}async loaded(){await this.initLegend()}disconnectedCallback(){super.disconnectedCallback(),this.handles?.removeAll(),this.handles?.destroy(),this.handles=null}async initLegend(){try{await U.whenOnce(()=>this.legendvm?.view);let e=async()=>{try{let n=this.legendvm?.view?.map;await n?.load(),await n?.basemap?.load();let l=n?.allLayers?.map(async u=>await u.load()),r=(await Promise.allSettled(l)).map(u=>u?.status==="fulfilled"&&u?.value?u.value:null).filter(u=>!!u),s=[];r.forEach(u=>{this.legendvm?.view&&s.push(this.legendvm.view.whenLayerView(u))}),await Promise.allSettled(s),await Promise.race([U.whenOnce(()=>(this.legendvm?.activeLayerInfos?.length??0)>0),new Promise(u=>{setTimeout(u,250)})]);let h=await we(this.legendvm);Object.keys(h).length===0&&(await new Promise(u=>{setTimeout(u,250)}),h=await we(this.legendvm)),J.set("data",{...j.data,...h}),await this.refreshFeatureCount(),this.isLoading=!1,await this.setupWatchersAndListeners()}catch(n){console.error(n),this.isLoading=!1}};this.legendvm?.view?.when(e),this.legendvm?.view?.map?.layers?.on("after-changes",e)}catch{this.isLoading=!1}}getStretchStopLabel(e){let n=this.messages[e.label];return e.label?`${n}: ${typeof e.value=="string"?e.value:fe.formatNumber(e.value,{style:"decimal",notation:e.value.toString().includes("e")?"scientific":"standard"})}`:""}getTitle(e,n){if(!e)return;if(typeof e=="string"||typeof e=="number")return e;if("value"in e||"unit"in e){let s=typeof this.messages?.dotValue=="string"?this.messages.dotValue:"";return fe.substitute(s,e)}if("colorName"in e||"bandName"in e){let{colorName:s,bandName:h}=e,u=this.messages[s],w=typeof this.messages[h]=="string"?this.messages[h]:h;return`${u}: ${w}`}if("showCount"in e)return e.showCount?this.messages.clusterCountTitle:null;let l=null;if(n){let s=e;l=s.ratioPercentTotal?"showRatioPercentTotal":s.ratioPercent?"showRatioPercent":s.ratio?"showRatio":e.normField?"showNormField":e.field?"showField":null}else if(this.isRendererTitle(n)){let s=e;l=s.normField?"showNormField":s.normByPct?"showNormPct":s.field?"showField":null}let r=l==="showField"?"{field}":typeof l=="string"?this.messages[l]:"";return l?fe.substitute(r,{field:e.field,normField:e.normField}):""}isRendererTitle(e){return!e}async setupWatchersAndListeners(){let e=this.legendvm?.view?.map?.allLayers?.filter(r=>be(r?.type)),n=[];for(let r of e)this.legendvm?.view&&n.push(this.legendvm?.view?.whenLayerView(r));let l=[];try{l=await Promise.all(n)}catch(r){console.error(r)}for(let r of l){let s=`fLayerViewScale-${r.layer.id}`;!this.handles?.has(s)&&r&&this.handles?.add(r.watch("visibleAtCurrentScale",()=>{this.createDataForLayer(r.layer).catch(h=>{console.error(h)})}),s)}e?.forEach(r=>{let s=`fLayer-${r?.id}`;this.handles?.has(s)||this.handles?.add(U?.watch(()=>r?.visible,()=>this.handleFeatureLayerVisibilityChange(r)),s)}),this.handles?.add(U.when(()=>this.legendvm,()=>{U.watch(()=>this.legendvm?.view?.updating,()=>{this.legendvm?.view?.updating&&U.when(()=>!this.legendvm?.view?.updating,()=>{this.refreshFeatureCount().catch(r=>{console.error(r)})},{once:!0,initial:!0})},{initial:!0})},{initial:!0,once:!0})),this.handles?.add(U.on(()=>this.legendvm?.activeLayerInfos,"change",r=>{this.regenerateData().then(()=>{this.handles?.add(U.on(()=>r.children,"change",()=>{this.regenerateData().catch(s=>{console.error(s)})}))}).catch(s=>{console.error(s)})})),this.handles?.add(U.on(()=>this.legendvm?.view?.map?.layers,"after-changes",()=>{this.refreshFeatureCount().catch(r=>{console.error(r)})}))}async createDataForLayer(e){let n=e?.id;if(nt(n,this._pendingRestore,this._hiddenLegendState))return;let l=J.get("data")?.[n],r=it(this.legendvm?.activeLayerInfos)?.find(s=>s?.layer?.id===n);if(!l&&r){let s=await Ve(this.legendvm,r);he({intLegendLayerData:s,layerId:n}),await this.refreshFeatureCount()}}applyFilter(e,n,l,r){return async()=>{let s={...j.data?.[n?.id]};r?await dt(s,e,l,this.filterMode,r):await dt(s,e,l,this.filterMode),he({intLegendLayerData:s,layerId:n?.id})}}async regenerateData(){let e=await we(this.legendvm),n=at(e,j.data,this._pendingRestore,this._hiddenLegendState);J.set("data",n),await this.refreshFeatureCount(),this.requestUpdate()}async refreshFeatureCount(){if(!this.featureCount)return;let e=++this.featureCountRequestId;try{let n=await lt(this.legendvm,j.data);if(e!==this.featureCountRequestId)return;J.set("data",{...j.data,...n})}catch{}}handleFeatureLayerVisibilityChange(e){let n=e.id,l=J.get("data")?.[n];if(e.visible){this.handleFeatureLayerVisible(n,e);return}this.handleFeatureLayerHidden(n,l)}handleFeatureLayerVisible(e,n){if(this._hiddenLegendState[e]){let l=this._hiddenLegendState[e];this._pendingRestore[e]=l,he({intLegendLayerData:l,layerId:e}),delete this._hiddenLegendState[e],this.clearRestoreGuard(e),this._restoreTimeouts[e]=window.setTimeout(()=>{delete this._pendingRestore[e],delete this._restoreTimeouts[e]},250);return}this.createDataForLayer(n).catch(l=>{console.error(l)})}handleFeatureLayerHidden(e,n){this.clearRestoreGuard(e),n&&(this._hiddenLegendState[e]=n)}clearRestoreGuard(e){this._restoreTimeouts[e]&&(clearTimeout(this._restoreTimeouts[e]),delete this._restoreTimeouts[e]),delete this._pendingRestore[e]}isImageryStretchedLegend(e,n){return!0}render(){let e=this.renderFilteredLayers(),n=J.get("compact")?` ${m.compact}`:"";return this.isLoading?Q("interactive-legend-loader",L`<calcite-loader scale=m .label=${this.messages?.loading} .text=${this.messages?.loading}></calcite-loader>`):Q("interactive-legend-classic-container",L`<div class=${`${N(this.el)}${n}`} ${xe(this._legendContainerRef)}>${e?.length>0?e:L`<div class=${x(m.message)}>${this.messages?.noLegend}</div>`}</div>`)}renderFilteredLayers(){return(this.legendvm?.activeLayerInfos?.toArray()).map(e=>this.renderLegendForLayer(e)).filter(e=>!!e)}renderLegendForLayer(e,n){if(!e.ready)return null;if(e.children.length){let s=e.children.map(h=>this.renderLegendForLayer(h,!0)).toArray();return L`<instant-apps-interactive-legend-group-legend-element class=${x(N(this.el))} .legendvm=${this.legendvm} .featureCount=${this.featureCount} .activeLayerInfo=${e} .isChild=${n}><div style=${k({paddingLeft:"20px"})} .id=${`${e?.layer?.id}-legend-layer`} slot=content>${s}</div></instant-apps-interactive-legend-group-legend-element>`}let l=e.legendElements;if(l&&!l.length)return null;let r=l.map((s,h)=>this.renderLegendForElement(s,e.layer,e.effectList,e,h)).filter(s=>!!s);return r.length?L`<instant-apps-interactive-legend-layer-element class=${x(N(this.el))} .legendvm=${this.legendvm} .featureCount=${this.featureCount} .activeLayerInfo=${e} .isChild=${!!n}><div slot=content .id=${`${e?.layer?.id}-legend-layer`} class=${x(m.layer)}>${r}</div></instant-apps-interactive-legend-layer-element>`:null}renderLegendForElement(e,n,l,r,s,h,u){let w=de(e),$=me(e),S=ye(e),E=null,_=Ne(r,e,s),T=Xe(e),M=Bt(this._legendContainerRef?.value?.clientWidth||this.el?.clientWidth);if(Ye(e)||S){let A=e.infos.some(q=>Ht(q,M)),B=e.infos.map((q,K)=>this.renderLegendForElementInfo(q,n,l,S,e,r,s,K,_,u)).filter(q=>!!q);B.length&&(E=L`<div class=${`${m.layerBody}${A?` ${m.layerBodyLargeSymbol}`:""}`}>${B}</div>`)}else if(de(e)||me(e)||Ee(e)||Re(e)){let A=e;E=this.renderLegendForRamp(A,n.opacity)}else if(T){let A=e;E=Q(Ke.RELATIONSHIP_RAMP,L`<instant-apps-interactive-legend-relationship class=${x(N(this.el))} .filterMode=${this.filterMode} .activeLayerInfo=${r} .legendElement=${A}></instant-apps-interactive-legend-relationship>`)}else if(Qe(e)){let A=e;E=this.renderPieChartRamp(A)}else if(Ze(e)){let A=e;E=this.renderUnivariateAboveAndBelowRamp(A,n.opacity,l)}else if(Oe(e)){let A=e;E=this.renderUnivariateColorSizeRamp(A,n.opacity,l)}if(!E)return null;let I=e.title,P=null;if(typeof I=="string")P=I;else if(I){let A=I,B=this.getTitle(A,w||$);this.isRendererTitle(w||$)?"title"in I&&(P=`${I.title} (${B})`):P=B}return L`<instant-apps-interactive-legend-legend-element class=${x(N(this.el))} .activeLayerInfo=${r} .isSizeRamp=${S} .isChild=${!!h} .isColorRamp=${w} .isRelationshipRamp=${T} .isInteractive=${_} .zoomTo=${this.zoomTo} .legendElement=${e} .titleText=${P} .legendvm=${this.legendvm} .legendElementIndex=${s}><div slot=content>${E}</div></instant-apps-interactive-legend-legend-element>`}renderPieChartRamp(e){return L`<div .innerHTML=${`${e.preview?.outerHTML}`}></div>`}renderUnivariateAboveAndBelowRamp(e,n,l){let{sizeRampElement:r,colorRampElement:s}=Jt(e,n);if(!r)return null;let h=Se(r,"above",!0),u=Se(r,"below",!0),w=12,$=ke(s,{width:w,height:h,rampAlignment:"vertical",opacity:n,type:"above",effectList:l}),S=ke(s,{width:w,height:u,rampAlignment:"vertical",opacity:n,type:"below",effectList:l}),E=ot(r),_=r.infos.map(H=>H.label),T=_.map((H,D)=>D===0?L`<div class=${x(H?$?m.univariateAboveAndBelowLabel:m.rampLabel:"")}>${H}</div>`:D===2?L`<div></div>`:null),M=_.length-1,I=Math.floor(_.length/2),P=_.map((H,D)=>D===I||D===M?L`<div class=${x(H?$?m.univariateAboveAndBelowLabel:m.rampLabel:"")}>${H}</div>`:null),A={display:"table-cell",verticalAlign:"middle"},B={marginTop:`${E}px`},q={height:`${h}px`},K={height:`${u}px`};return Q("univariate-above-and-below-ramp-preview",L`<div style=${k(ft)}><div class=${x(m.layerBody)}>${r.infos.map((H,D)=>L`<div class=${`${m.layerRow} ${m.sizeRamp}`}><div class=${x(m.symbol)} style=${k(A)} .innerHTML=${H?.preview?.outerHTML??""??""}></div>${!$&&D%2===0?L`<div class=${x(m.layerInfo)}>${_[D]}</div>`:null}</div>`)}</div>${$?Q("color-ramp-preview",L`<div style=${k(B)}><div style=${k(Ie)}><div style=${k(ae)}><div class=${x(m.rampContainer)}>${$}</div></div><div style=${k(ae)}><div class=${x(m.rampLabelsContainer)} style=${k(q)}>${T}</div></div></div><div style=${k(Ie)}><div style=${k(ae)}><div class=${x(m.rampContainer)}>${S}</div></div><div style=${k(ae)}><div class=${x(m.rampLabelsContainer)} style=${k(K)}>${P}</div></div></div></div>`):null}</div>`)}renderUnivariateColorSizeRamp(e,n,l){let{sizeRampElement:r,colorRampElement:s}=Kt(e);if(!r)return null;let h=ot(r),u=12,w=Se(r,"full",!1),$=ke(s,{width:u,height:w,rampAlignment:"vertical",opacity:n,type:"full",effectList:l}),S=r.infos.length-1,E=r.infos.map((I,P)=>P===0||P===S?L`<div class=${x(I.label?s?m.univariateAboveAndBelowLabel:m.rampLabel:"")}>${I.label}</div>`:null),_={display:"table-cell",verticalAlign:"middle"},T={marginTop:`${h}px`},M={height:`${w}px`};return Q("univariate-above-and-below-ramp-preview",L`<div style=${k(ft)}><div class=${x(m.layerBody)}>${r.infos.map(I=>L`<div class=${`${m.layerRow} ${m.sizeRamp}`}><div class=${x(m.symbol)} style=${k(_)} .innerHTML=${I?.preview?.outerHTML??""??""}></div></div>`)}</div>${Q("color-ramp-preview",L`<div style=${k(T)}><div style=${k(Ie)}><div style=${k(ae)}><div class=${x(m.rampContainer)}>${$}</div></div><div style=${k(ae)}><div class=${x(m.rampLabelsContainer)} style=${k(M)}>${E}</div></div></div></div>`)}</div>`)}renderLegendForRamp(e,n){let l=e.infos,r=me(e),s=Ee(e),h=Re(e),u=e.preview,w=r?m.opacityRamp:"";u&&(u.classList.add(m.colorRamp),w&&u.classList.add(w)),n!=null&&u&&(u.style.opacity=n.toString());let $=l.map(_=>{let T;if(s){let M=this.messages[_.label];T=typeof M=="string"?M:_.label}else h?T="value"in _?this.getStretchStopLabel(_):_.label:T=_.label;return L`<div class=${x(_.label?m.rampLabel:"")}>${T}</div>`}),S={width:`${Xt}px`},E={height:u?.style?.height};return L`<div class=${x(m.layerRow)}><div class=${x(m.symbolContainer)} style=${k({...S})}><div class=${x(m.rampContainer)} ${xe(_=>{_?.firstChild&&_?.firstChild?.remove(),_?.appendChild(u)})}></div></div><div class=${x(m.layerInfo)}><div class=${x(m.rampLabelsContainer)} style=${k({...E})}>${$}</div></div></div>`}renderLegendForElementInfo(e,n,l,r,s,h,u,w,$,S){if("infos"in e)return this.renderLegendForElement(e,n,l,h,u,!0,e);let E=null,_=!this.isImageryStretchedLegend(n,s.type);if("preview"in e){let{outerHTML:W}=e.preview;E=L`<div class=${x(m.symbol)} .innerHTML=${W??""}></div>`}else"src"in e&&(E=this.renderImage(e,n,_));if(!E)return null;let T=_?` ${m.imageryLayerInfoStretched}`:"",M=!_&&r?` ${m.sizeRamp}`:"",I,P=Je(n),A=tt(P,S);if(j.data){let W=et(P,n,e,A,w),V=A?A?.nestedInfos:P,se=je(V),_e=!!h?.children?.length||!!A;I=P?.categories?.size===1&&!_e?!W?.selected:se||W?.selected}let B="label"in e?e.label:null,q=A&&!("value"in e)?!1:$,K=J.get("compact"),H=this.getTitle(B,!1)||"",D=A?s.title:B??n?.id;return q?L`<button @click=${this.applyFilter(e,n,w,S)} class=${`${m.layerRow} ${m.interactiveLayerRow}${I?` ${m.infoSelected}`:""}`} title=${(K?`${H}`:void 0)??pe} .ariaPressed=${I?"true":"false"}><div class=${`${m.symbolContainer}${T}${M}`}>${E}</div><div class=${`${m.layerInfo}${T}`}>${this.getTitle(B,!1)||""}</div>${this.featureCount&&!K?L`<instant-apps-interactive-legend-count class=${x(N(this.el))} .categoryId=${D} .activeLayerInfo=${h} .legendvm=${this.legendvm} .selected=${!!I} .legendElement=${s} .infoIndex=${w}></instant-apps-interactive-legend-count>`:null}</button>`:L`<div class=${x(m.layerRow)}><div class=${`${m.symbolContainer}${T}${M}`}>${E}</div><div class=${`${m.layerInfo}${T}`}>${H}</div></div>`}renderImage(e,n,l){let{label:r,src:s,opacity:h}=e,u=l?` ${m.imageryLayerStretchedImage}`:"",w=l?"":` ${m.symbol}`,$={opacity:`${h??n.opacity}`};return L`<img alt=${this.getTitle(r,!1)??pe} src=${s??pe} width=${e.width} height=${e.height} class=${`$${u}${w}`} style=${k($)}>`}};We("instant-apps-interactive-legend-classic",Te);return Te},"layers/support/FeatureFilter","layers/support/FeatureEffect","symbols/support/symbolUtils","core/reactiveUtils","intl","core/Handles",a,b,c,d,e)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import c from"./KGUELU4O.js";import a from"./CS5N3DOL.js";import{a as b}from"./YUWXPLTE.js";import{a as C}from"./65I4AUS4.js";import{b as _}from"./MXPZF4RB.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{F as v,G as S,H as x,J as f,h as E,i as s,u as T}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([D,L,P,u,h,F,M,p])=>{var{state:t,onChange:k}=M({timeInfoConfigItems:[],filterMode:{type:"filter"},view:null,timeSlider:null,timeInfoItems:[],selectedTimeInfoItem:null,loading:!0,timeSliderConfig:{},autoPlay:!1}),g="time-slider-watch",I=class{constructor(){this.initializeModules()}async initializeModules(){try{this.handles=new D}catch{}}async init(e){if(!e)return;e&&(e.innerHTML=""),t?.timeSlider?.viewModel?.state==="playing"&&t.timeSlider.stop();let{view:i,timeInfoConfigItems:n}=t;if(i)try{if(await i.when(),n.length===1&&n[0]?.type==="map")this.initTimeSlider(e,n[0]);else{let r=await this.getTimeLayerViews(i,n);t.timeInfoItems=this.generateTimeInfoItems(r,n),this.initTimeSlider(e)}}catch{}finally{this.setupFilterModeWatcher()}}destroy(){this.handles?.removeAll(),this.handles=null,t.timeSlider?.destroy()}async getTimeLayerViews(e,i){let n=e.map?.allLayers,r=l=>n?.find(({id:c})=>l===c),a=i.map(({id:l})=>r(l)).map(async l=>await e.whenLayerView(l));return await Promise.all(a)}generateTimeInfoItems(e,i){return[...i].map(n=>{let r=e.find(({layer:a})=>a.id===n.id);return this.generateTimeInfoItem(r,n)})}generateTimeInfoItem(e,{increments:i,rangeStart:n,rangeEnd:r,timeIntervalValue:a}){let l=e?.layer?.timeInfo?.fullTimeExtent;return{layerView:e,unit:i,timeIntervalValue:a??1,rangeStart:new Date(n),rangeEnd:new Date(r),timeExtent:l,previousTimeExtent:null}}initTimeSlider(e,i){let n=r=>{t.timeSlider=new F(r),t.autoPlay&&t.timeSlider.play()};if(i){let r=this.getTimeSliderConfig(e,i);n(r)}else{let r=t?.timeInfoItems?.[0];if(!r)return;t.selectedTimeInfoItem=r;let a=this.getTimeSliderConfig(e);n(a)}t.view?.type==="2d"&&this.initialize2DView()}setupFilterModeWatcher(){k("filterMode",e=>{e&&t.timeInfoItems.forEach(i=>{let n=i.layerView;this.applyTimeExtent(n,n?.featureEffect?.filter?.timeExtent||n.filter?.timeExtent,e)})})}getTimeSliderConfig(e,i){let n={container:e,mode:"time-window",view:t.view?.type==="3d"?t.view:null,...t.timeSliderConfig};if(i){let o=t.view?.map?.widgets?.timeSlider,w={...n,fullTimeExtent:o?.fullTimeExtent,timeExtent:o?.currentTimeExtent};return o?.stopInterval?.unit&&o?.stopInterval?.value&&(w.stops={interval:new h({unit:o?.stopInterval?.unit,value:o?.stopInterval?.value})}),w}let[{timeExtent:r,rangeStart:a,rangeEnd:l,unit:c,timeIntervalValue:V}]=t.timeInfoItems;return{...n,fullTimeExtent:r,timeExtent:new u({start:a,end:l}),stops:{interval:new h({unit:c,value:V})}}}initialize2DView(){t.timeInfoItems.forEach(e=>this.applyTimeExtent(e.layerView,new u({start:e.rangeStart,end:e.rangeEnd}))),this.setupTimeExtentWatcher()}applyTimeExtent(e,i,n){t.filterMode?.type==="effect"?this.applyFeatureEffect(e,i,n):this.applyFeatureFilter(e,i)}applyFeatureEffect(e,i,n){if(e){if(e.filter&&e.set("filter",null),!e?.featureEffect?.filter||n){this.handleUpdatedFeatureEffect(e,i);return}e.featureEffect.filter.timeExtent=i}}async handleUpdatedFeatureEffect(e,i){e.featureEffect=new L({filter:{timeExtent:i},includedEffect:await p(t.filterMode?.effect?.includedEffect??"",e,"includedEffect"),excludedEffect:await p(t.filterMode?.effect?.excludedEffect??"",e,"excludedEffect")})}async applyFeatureFilter(e,i){if(e.featureEffect&&e.set("featureEffect",null),!e.filter){e.filter=new P({timeExtent:i});return}e.filter.timeExtent=i}setupTimeExtentWatcher(){this.handles?.has(g)&&this.handles?.remove(g),t?.timeSlider&&this.handles?.add(t.timeSlider.watch("timeExtent",e=>this.applyTimeExtent(t.selectedTimeInfoItem?.layerView,e)),g)}updateSelectedTimeInfoItem(e){t.timeSlider&&(t.selectedTimeInfoItem&&(t.selectedTimeInfoItem.previousTimeExtent=t.timeSlider.timeExtent),t.selectedTimeInfoItem=e,this.reconfigureTimeSlider(e),this.applyTimeExtent(e.layerView,t.timeSlider.timeExtent),this.setupTimeExtentWatcher())}async reconfigureTimeSlider(e){t.timeSlider&&(t.timeSlider.fullTimeExtent=e.timeExtent,t.timeSlider.timeExtent=this.getTimeExtent(e),t.timeSlider.stops={interval:this.getTimeInterval(e)})}getTimeExtent({rangeStart:e,rangeEnd:i,previousTimeExtent:n}){return n??new u({start:e,end:i})}getTimeInterval(e){let i=e.unit??e.layerView?.layer?.timeInfo?.interval?.unit;return new h({unit:i,value:1})}getLabel(e){return e?.layerView?.layer?.title||""}},m=new I,R=E`@layer{.instant-apps-time-filter{position:relative;display:block;min-width:375px;min-height:200px}.instant-apps-time-filter__background{background-color:var(--calcite-color-background);position:absolute;top:0;left:0;width:100%;height:100%;z-index:0}.instant-apps-time-filter calcite-dropdown{width:100%}.instant-apps-time-filter calcite-dropdown calcite-button{--calcite-color-brand: var(--calcite-color-text-1)}.instant-apps-time-filter__layer-title{font-weight:550;display:inline-block;padding:10px}.instant-apps-time-filter__loading-container{display:flex;justify-content:center;align-items:center;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.instant-apps-time-filter--3d{min-height:160px}}`,d={base:"instant-apps-time-filter",layerTitle:"instant-apps-time-filter__layer-title",loadingContainer:"instant-apps-time-filter__loading-container",background:"instant-apps-time-filter__background",threeD:" instant-apps-time-filter--3d"},y=class extends x{constructor(){super(...arguments),this._messages=C({name:"instant-apps-time-filter"}),this.timeSliderRef=v(),this.timeInfoConfigItems=[],this.autoPlay=!1}static{this.properties={timeInfoConfigItems:0,filterMode:0,view:0,timeSliderConfig:0,autoPlay:5}}static{this.styles=R}static{this.shadowRootOptions=T}async load(){t.view=this.view,t.timeInfoConfigItems=this.timeInfoConfigItems,t.autoPlay=!!this.autoPlay,this.timeSliderConfig&&(t.timeSliderConfig=this.timeSliderConfig),this.filterMode&&(t.filterMode=this.filterMode)}willUpdate(e){e.has("timeInfoConfigItems")&&(this.hasUpdated||this.timeInfoConfigItems?.length>0)&&(t.timeInfoConfigItems=this.timeInfoConfigItems,m.init(this.timeSliderRef.value)),e.has("filterMode")&&(t.filterMode=this.filterMode),e.has("timeSliderConfig")&&(t.timeSliderConfig=this.timeSliderConfig,m.init(this.timeSliderRef.value)),e.has("autoPlay")&&(this.hasUpdated||this.autoPlay)&&(t.autoPlay=this.autoPlay,t.timeSlider&&(t.autoPlay?t.timeSlider.play():t.timeSlider.stop()))}async loaded(){try{await m.init(this.timeSliderRef.value)}catch{}finally{t.loading=!1}}render(){return s`<div class=${`${d.base}${this.view.type!=="2d"?d.threeD:""}`}>${this._renderLoader()}${this.view.type==="2d"&&this._renderTopEl()||""}${b("time-slider",s`<div ${S(this.timeSliderRef)}></div>`)}</div>`}_renderLoader(){return t.loading?s`<div><div class=${f(d.background)}></div><div class=${f(d.loadingContainer)}><calcite-loader scale=m .label=${this._messages.loading??""} .text=${this._messages.loading}></calcite-loader></div></div>`:null}_renderTopEl(){return this.timeInfoConfigItems.length>1?this._renderDropdown():this._renderLayerTitle()}_renderLayerTitle(){let e=t.selectedTimeInfoItem?.layerView?.layer?.title;return s`<span class=${f(d.layerTitle)}>${e}</span>`}_renderDropdown(){return t.selectedTimeInfoItem?s`<calcite-dropdown>${this._renderDropdownButton()}${this._renderDropdownItems()}</calcite-dropdown>`:null}_renderDropdownButton(){return s`<calcite-button slot=trigger appearance=transparent icon-end=chevron-down width=full alignment=space-between>${m.getLabel(t.selectedTimeInfoItem)}</calcite-button>`}_renderDropdownItems(){return t.timeInfoItems.map(e=>this._renderDropdownItem(e))}_renderDropdownItem(e){let i=t.selectedTimeInfoItem?.layerView?.layer?.id,n=e?.layerView?.layer?.id;return s`<calcite-dropdown-item @calciteDropdownItemSelect=${()=>m.updateSelectedTimeInfoItem(e)} .selected=${i===n}>${m.getLabel(e)}</calcite-dropdown-item>`}};_("instant-apps-time-filter",y);return y},"core/Handles","layers/support/FeatureEffect","layers/support/FeatureFilter","time/TimeExtent","time/TimeInterval","widgets/TimeSlider",a,c)
2
+ import c from"./KGUELU4O.js";import a from"./CS5N3DOL.js";import{a as b}from"./YUWXPLTE.js";import{a as C}from"./HKURBCD6.js";import{b as _}from"./KGXEY5HR.js";import"./QMAV4UTN.js";import"./Y2AUIXNK.js";import{F as v,G as S,H as x,J as f,h as E,i as s,u as T}from"./T3EPRHTT.js";import"./EXBEKVP5.js";export default $arcgis.t(([D,L,P,u,h,F,M,p])=>{var{state:t,onChange:k}=M({timeInfoConfigItems:[],filterMode:{type:"filter"},view:null,timeSlider:null,timeInfoItems:[],selectedTimeInfoItem:null,loading:!0,timeSliderConfig:{},autoPlay:!1}),g="time-slider-watch",I=class{constructor(){this.initializeModules()}async initializeModules(){try{this.handles=new D}catch{}}async init(e){if(!e)return;e&&(e.innerHTML=""),t?.timeSlider?.viewModel?.state==="playing"&&t.timeSlider.stop();let{view:i,timeInfoConfigItems:n}=t;if(i)try{if(await i.when(),n.length===1&&n[0]?.type==="map")this.initTimeSlider(e,n[0]);else{let r=await this.getTimeLayerViews(i,n);t.timeInfoItems=this.generateTimeInfoItems(r,n),this.initTimeSlider(e)}}catch{}finally{this.setupFilterModeWatcher()}}destroy(){this.handles?.removeAll(),this.handles=null,t.timeSlider?.destroy()}async getTimeLayerViews(e,i){let n=e.map?.allLayers,r=l=>n?.find(({id:c})=>l===c),a=i.map(({id:l})=>r(l)).map(async l=>await e.whenLayerView(l));return await Promise.all(a)}generateTimeInfoItems(e,i){return[...i].map(n=>{let r=e.find(({layer:a})=>a.id===n.id);return this.generateTimeInfoItem(r,n)})}generateTimeInfoItem(e,{increments:i,rangeStart:n,rangeEnd:r,timeIntervalValue:a}){let l=e?.layer?.timeInfo?.fullTimeExtent;return{layerView:e,unit:i,timeIntervalValue:a??1,rangeStart:new Date(n),rangeEnd:new Date(r),timeExtent:l,previousTimeExtent:null}}initTimeSlider(e,i){let n=r=>{t.timeSlider=new F(r),t.autoPlay&&t.timeSlider.play()};if(i){let r=this.getTimeSliderConfig(e,i);n(r)}else{let r=t?.timeInfoItems?.[0];if(!r)return;t.selectedTimeInfoItem=r;let a=this.getTimeSliderConfig(e);n(a)}t.view?.type==="2d"&&this.initialize2DView()}setupFilterModeWatcher(){k("filterMode",e=>{e&&t.timeInfoItems.forEach(i=>{let n=i.layerView;this.applyTimeExtent(n,n?.featureEffect?.filter?.timeExtent||n.filter?.timeExtent,e)})})}getTimeSliderConfig(e,i){let n={container:e,mode:"time-window",view:t.view?.type==="3d"?t.view:null,...t.timeSliderConfig};if(i){let o=t.view?.map?.widgets?.timeSlider,w={...n,fullTimeExtent:o?.fullTimeExtent,timeExtent:o?.currentTimeExtent};return o?.stopInterval?.unit&&o?.stopInterval?.value&&(w.stops={interval:new h({unit:o?.stopInterval?.unit,value:o?.stopInterval?.value})}),w}let[{timeExtent:r,rangeStart:a,rangeEnd:l,unit:c,timeIntervalValue:V}]=t.timeInfoItems;return{...n,fullTimeExtent:r,timeExtent:new u({start:a,end:l}),stops:{interval:new h({unit:c,value:V})}}}initialize2DView(){t.timeInfoItems.forEach(e=>this.applyTimeExtent(e.layerView,new u({start:e.rangeStart,end:e.rangeEnd}))),this.setupTimeExtentWatcher()}applyTimeExtent(e,i,n){t.filterMode?.type==="effect"?this.applyFeatureEffect(e,i,n):this.applyFeatureFilter(e,i)}applyFeatureEffect(e,i,n){if(e){if(e.filter&&e.set("filter",null),!e?.featureEffect?.filter||n){this.handleUpdatedFeatureEffect(e,i);return}e.featureEffect.filter.timeExtent=i}}async handleUpdatedFeatureEffect(e,i){e.featureEffect=new L({filter:{timeExtent:i},includedEffect:await p(t.filterMode?.effect?.includedEffect??"",e,"includedEffect"),excludedEffect:await p(t.filterMode?.effect?.excludedEffect??"",e,"excludedEffect")})}async applyFeatureFilter(e,i){if(e.featureEffect&&e.set("featureEffect",null),!e.filter){e.filter=new P({timeExtent:i});return}e.filter.timeExtent=i}setupTimeExtentWatcher(){this.handles?.has(g)&&this.handles?.remove(g),t?.timeSlider&&this.handles?.add(t.timeSlider.watch("timeExtent",e=>this.applyTimeExtent(t.selectedTimeInfoItem?.layerView,e)),g)}updateSelectedTimeInfoItem(e){t.timeSlider&&(t.selectedTimeInfoItem&&(t.selectedTimeInfoItem.previousTimeExtent=t.timeSlider.timeExtent),t.selectedTimeInfoItem=e,this.reconfigureTimeSlider(e),this.applyTimeExtent(e.layerView,t.timeSlider.timeExtent),this.setupTimeExtentWatcher())}async reconfigureTimeSlider(e){t.timeSlider&&(t.timeSlider.fullTimeExtent=e.timeExtent,t.timeSlider.timeExtent=this.getTimeExtent(e),t.timeSlider.stops={interval:this.getTimeInterval(e)})}getTimeExtent({rangeStart:e,rangeEnd:i,previousTimeExtent:n}){return n??new u({start:e,end:i})}getTimeInterval(e){let i=e.unit??e.layerView?.layer?.timeInfo?.interval?.unit;return new h({unit:i,value:1})}getLabel(e){return e?.layerView?.layer?.title||""}},m=new I,R=E`@layer{.instant-apps-time-filter{position:relative;display:block;min-width:375px;min-height:200px}.instant-apps-time-filter__background{background-color:var(--calcite-color-background);position:absolute;top:0;left:0;width:100%;height:100%;z-index:0}.instant-apps-time-filter calcite-dropdown{width:100%}.instant-apps-time-filter calcite-dropdown calcite-button{--calcite-color-brand: var(--calcite-color-text-1)}.instant-apps-time-filter__layer-title{font-weight:550;display:inline-block;padding:10px}.instant-apps-time-filter__loading-container{display:flex;justify-content:center;align-items:center;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1}.instant-apps-time-filter--3d{min-height:160px}}`,d={base:"instant-apps-time-filter",layerTitle:"instant-apps-time-filter__layer-title",loadingContainer:"instant-apps-time-filter__loading-container",background:"instant-apps-time-filter__background",threeD:" instant-apps-time-filter--3d"},y=class extends x{constructor(){super(...arguments),this._messages=C({name:"instant-apps-time-filter"}),this.timeSliderRef=v(),this.timeInfoConfigItems=[],this.autoPlay=!1}static{this.properties={timeInfoConfigItems:0,filterMode:0,view:0,timeSliderConfig:0,autoPlay:5}}static{this.styles=R}static{this.shadowRootOptions=T}async load(){t.view=this.view,t.timeInfoConfigItems=this.timeInfoConfigItems,t.autoPlay=!!this.autoPlay,this.timeSliderConfig&&(t.timeSliderConfig=this.timeSliderConfig),this.filterMode&&(t.filterMode=this.filterMode)}willUpdate(e){e.has("timeInfoConfigItems")&&(this.hasUpdated||this.timeInfoConfigItems?.length>0)&&(t.timeInfoConfigItems=this.timeInfoConfigItems,m.init(this.timeSliderRef.value)),e.has("filterMode")&&(t.filterMode=this.filterMode),e.has("timeSliderConfig")&&(t.timeSliderConfig=this.timeSliderConfig,m.init(this.timeSliderRef.value)),e.has("autoPlay")&&(this.hasUpdated||this.autoPlay)&&(t.autoPlay=this.autoPlay,t.timeSlider&&(t.autoPlay?t.timeSlider.play():t.timeSlider.stop()))}async loaded(){try{await m.init(this.timeSliderRef.value)}catch{}finally{t.loading=!1}}render(){return s`<div class=${`${d.base}${this.view.type!=="2d"?d.threeD:""}`}>${this._renderLoader()}${this.view.type==="2d"&&this._renderTopEl()||""}${b("time-slider",s`<div ${S(this.timeSliderRef)}></div>`)}</div>`}_renderLoader(){return t.loading?s`<div><div class=${f(d.background)}></div><div class=${f(d.loadingContainer)}><calcite-loader scale=m .label=${this._messages.loading??""} .text=${this._messages.loading}></calcite-loader></div></div>`:null}_renderTopEl(){return this.timeInfoConfigItems.length>1?this._renderDropdown():this._renderLayerTitle()}_renderLayerTitle(){let e=t.selectedTimeInfoItem?.layerView?.layer?.title;return s`<span class=${f(d.layerTitle)}>${e}</span>`}_renderDropdown(){return t.selectedTimeInfoItem?s`<calcite-dropdown>${this._renderDropdownButton()}${this._renderDropdownItems()}</calcite-dropdown>`:null}_renderDropdownButton(){return s`<calcite-button slot=trigger appearance=transparent icon-end=chevron-down width=full alignment=space-between>${m.getLabel(t.selectedTimeInfoItem)}</calcite-button>`}_renderDropdownItems(){return t.timeInfoItems.map(e=>this._renderDropdownItem(e))}_renderDropdownItem(e){let i=t.selectedTimeInfoItem?.layerView?.layer?.id,n=e?.layerView?.layer?.id;return s`<calcite-dropdown-item @calciteDropdownItemSelect=${()=>m.updateSelectedTimeInfoItem(e)} .selected=${i===n}>${m.getLabel(e)}</calcite-dropdown-item>`}};_("instant-apps-time-filter",y);return y},"core/Handles","layers/support/FeatureEffect","layers/support/FeatureFilter","time/TimeExtent","time/TimeInterval","widgets/TimeSlider",a,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as F}from"./YUWXPLTE.js";import{a as R}from"./PPFEO3UH.js";import b from"./4RWJ22V3.js";import{a as $,b as C}from"./2B4SGB3I.js";import{b as d}from"./RLSY4VUQ.js";import{a as S}from"./AIZ2P72X.js";import{b as w}from"./YJ3DKEEZ.js";import{F as o,G as r,H as x,J as c,K as h,h as v,i as a,q as y}from"./T3EPRHTT.js";export default $arcgis.t(([{j:u,k:f,r:_}])=>{var O=v`.display-flex{display:flex}.border-override{border-top-width:var(--calcite-border-width-none);border-bottom-width:var(--calcite-border-width-none)}.header-override{--calcite-panel-header-content-space: 0px;--calcite-panel-header-background-color: var(--calcite-color-surface-3)}.panel-override{--calcite-panel-background-color: var(--calcite-color-surface-3);--calcite-panel-border-color: none}.label-override{--calcite-label-margin-bottom: 0px;font-weight:var(--calcite-font-weight-medium)}.header-button-padding{padding-top:var(--calcite-spacing-sm);padding-bottom:var(--calcite-spacing-sm);padding-inline-start:var(--calcite-spacing-lg);padding-inline-end:var(--calcite-spacing-lg)}.padding-start{padding-inline-start:var(--calcite-spacing-sm)}.align-items-center{align-items:center}.justify-content-end{justify-content:end}.filter-width-350{--calcite-shell-panel-width: 350px}.z-index-1{z-index:1}.z-index-2{z-index:2}h1{font-weight:unset;margin:0;padding:0}@container (max-width: 800px){.filter{display:none}}.mock-fab{--calcite-fab-shadow-internal: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);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-text-color: var(--calcite-fab-text-color);--calcite-button-loader-color: var(--calcite-fab-loader-color)}.background-override{--calcite-shell-panel-background-color: var(--calcite-color-surface-4);--calcite-panel-background-color: var(--calcite-color-surface-4)}.chips-container{display:flex;flex-wrap:wrap;align-items:center;gap:var(--calcite-spacing-xs);flex:1;padding-block:var(--calcite-spacing-xs)}.header-content-wrapper{min-height:50px;flex-wrap:wrap;gap:var(--calcite-spacing-xs);padding-inline-start:var(--calcite-spacing-lg);padding-top:8px}.position-relative{position:relative;height:100%;overflow:hidden}.height-100{height:100%}.border-none{border:none}.height-50{height:50px}.chip-group{max-width:100%}.chip-group{display:flex;flex-wrap:wrap}.responsive-chip{max-width:100%}.responsive-chip .chip-text{display:inline-flex;align-items:center;line-height:1;max-width:100%}@container (max-width: 800px){.responsive-chip{max-width:100%;min-width:0}.responsive-chip .chip-text{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}.mobile-stack{flex-direction:column;align-items:flex-start;padding-top:var(--calcite-spacing-md)}`,g=class extends x{constructor(){super(),this.solutionsCount=0,this._isLoading=!0,this._filterOpen=!0,this._filters={categories:[],searchTerm:""},this._isMobile=!1,this._translations=S({name:"solutions-all-shell",blocking:!0}),this._allSolutionsPanelRef=o(),this._solutionsFilterPanelRef=o(),this._mainPanelRef=o(),this._panelFixed=!1,this._configContextConsumer=d({context:C,subscribe:!0}),this._isMobileContextConsumer=d({context:$,subscribe:!0,callback:e=>this._isMobile=e}),this.filterRemoved=y(),this.listenOn(window,"searchChanged",e=>{e.detail&&e.detail.scope==="all-solutions"&&this._filterApplied(e.detail.option,e.detail.logSearchTelemetry)}),this.listenOn(window,"toggleFilter",this._toggleFilter),this.listenOn(window,"cardsFetched",()=>{this._isLoading=!1,this._syncSolutionChipOrderWithDisplayedCards()}),this.listenOn(window,"solutionMatchesFromAssistant",e=>{this._applyAssistantSolutionMatches(e.detail)})}static{this.properties={solutionsCount:9,_isLoading:16,_filterOpen:16,_filters:16,_isMobile:16,_translations:16}}static{this.styles=O}willUpdate(e){e.has("_isMobile")&&(this._filterOpen=!this._isMobile)}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async searchSolutions(e){if(this._allSolutionsPanelRef.value.setSearchOptions(e),"industry"in e||"domain"in e){e.displayValue=e.domain||e.industry;let t=e.industry?Object.entries(u).find(([,s])=>s===e.industry)?.[0]:void 0,i=e.domain?Object.entries(f).find(([,s])=>s===e.domain)?.[0]:void 0;e.industry=t||"",e.domain=i||"",e.value=i||t||"",this._solutionsFilterPanelRef.value.changeIndustryFilter(e.industry,e.domain,e.displayValue,!0)}else("searchTerm"in e||"sortType"in e)&&("searchTerm"in e&&(this._filters.searchTerm=e.searchTerm),this._allSolutionsPanelRef.value?.searchSolutions(e))}async load(){this._isMobileContextConsumer.value&&(this._isMobile=this._isMobileContextConsumer.value)}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&(t.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(t=>{t.forEach(i=>{if(i.type==="attributes"&&i.attributeName==="tabindex"){let s=i.target;s.classList.contains("content-wrapper")&&s.tabIndex===0&&(s.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&this._panelObserver.observe(t,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){let e=this._isMobile?"justify-content-end":"",t=this._isLoading?"display-none":"";return a`<calcite-shell class=${`position-relative ${t}`}>${this._isMobile?"":this._getFilterPanel()}<h1 class="height-100"><calcite-panel class="border-override header-override panel-override z-index-1" ${r(this._mainPanelRef)}><div class=${c(this._isMobile?`mobile-stack ${e}`:`display-flex align-items-center header-content-wrapper ${e}`)} slot=header-content><calcite-label class="label-override">${this._translations.numberOfSolutions.replace("{{count}}",this.solutionsCount.toString())}</calcite-label><div class="chips-container">${this._renderChips()}${this._filters.categories&&this._filters.categories?.length>0&&a`<calcite-button appearance=transparent icon-start=reset kind=neutral @click=${()=>{let i=this._filters.categories?.some(s=>s.type==="solution")??!1;this._filters={...this._filters,categories:[]},i&&window.dispatchEvent(new CustomEvent("clearAssistantResultFilters")),this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories),this._filters.searchTerm!==""&&this._allSolutionsPanelRef.value?.searchSolutions({searchTerm:this._filters.searchTerm}),this.filterRemoved.emit([])}} .label=${this._translations.clearIndustryFilter}>${this._translations.clearIndustryFilter}</calcite-button>`||""}</div></div>${this._isMobile&&this._getFilterPanel()||""}${this._getSolutionsAllPanel()}</calcite-panel></h1></calcite-shell>`}_getFilterPanel(){let e=this._filterOpen?{display:"flex"}:"";return this._isMobile?a`<calcite-panel class=${`border-none ${this._filterOpen?"background-override":"filter background-override"}`} id=solutions-all-shell-panel-start style=${h(e)}><solutions-filter-panel class="height-100" @applyFilter=${t=>{this._filterApplied(t.detail)}} ${r(this._solutionsFilterPanelRef)}></solutions-filter-panel></calcite-panel>`:a`<calcite-shell-panel class="filter background-override filter-width-350" id=solutions-all-shell-panel-start slot=panel-start style=${h(e)}><calcite-panel class="border-none"><solutions-filter-panel class="height-100" @applyFilter=${t=>{this._filterApplied(t.detail)}} ${r(this._solutionsFilterPanelRef)}></solutions-filter-panel></calcite-panel></calcite-shell-panel>`}_getSolutionsAllPanel(){let e=this._isMobile&&this._filterOpen?{display:"none"}:"";return a`<solutions-all-panel @cardsFetched=${this._updateSolutionCount} style=${h(e)} ${r(this._allSolutionsPanelRef)}></solutions-all-panel>`}_renderChips(){if(!this._filters.categories)return;let e=this._filters.categories.filter(t=>t.type==="industry"||t.type==="domain"||t.type==="solution");if(e.length!==0)return a`<calcite-chip-group class="chip-group" .label=${this._translations.appliedFilters}>${this._filters.displayValue&&this._filters.displayValue!==""?F(`${this._filters.displayValue}`,a`<calcite-chip appearance=outline-fill class=${c(this._isMobile?"responsive-chip":"padding-start responsive-chip")} closable .label=${this._filters.displayValue??""} @calciteChipClose=${()=>this._chipClosed(this._filters.displayValue,"solution")} .value=${this._filters.displayValue}>${this._filters.displayValue}</calcite-chip>`):R(e,t=>`${t.type}:${t.value}`,t=>a`<calcite-chip appearance=outline-fill class=${c(this._isMobile?"responsive-chip":"padding-start responsive-chip")} closable .label=${t.displayValue} @calciteChipClose=${()=>this._chipClosed(t.displayValue,t.type)} .value=${t.displayValue}>${t.displayValue}</calcite-chip>`)}</calcite-chip-group>`}_updateSolutionCount(e){this.solutionsCount=e.detail}_syncSolutionChipOrderWithDisplayedCards(){if(!this._filters.categories?.length)return;let e=this._filters.categories.filter(l=>l.type==="solution");if(e.length<=1)return;let t=this._allSolutionsPanelRef.value?.getDisplayedSolutionIds?.()??[];if(!t.length)return;let i=new Map;t.forEach((l,p)=>{i.set(l,p)});let s=[...e].sort((l,p)=>{let m=i.get(String(l.value)),b=i.get(String(p.value)),T=m===void 0?Number.MAX_SAFE_INTEGER:m,P=b===void 0?Number.MAX_SAFE_INTEGER:b;return T-P}),n=this._filters.categories.filter(l=>l.type!=="solution");this._filters={...this._filters,categories:[...n,...s]}}_chipClosed(e,t){if(this._filters.categories){if(t==="solution"){this._filters={...this._filters,categories:[]},window.dispatchEvent(new CustomEvent("clearAssistantResultFilters")),this._allSolutionsPanelRef.value?.searchSolutions(),this._filters.searchTerm!==""&&this._allSolutionsPanelRef.value?.searchSolutions({searchTerm:this._filters.searchTerm});return}if(t==="industry")this._filters.categories=[];else{let i=this._filters.categories.filter(s=>s.displayValue!==e&&s.type!==t);this._filters.categories=i}this._filters.categories.length>0?this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories):this._filters.searchTerm!==""?(this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories),this._allSolutionsPanelRef.value?.searchSolutions({searchTerm:this._filters.searchTerm})):this._allSolutionsPanelRef.value?.searchSolutions(),this.filterRemoved.emit(this._filters.categories)}}_applyAssistantSolutionMatches(e){let t=Array.isArray(e?.solutionIds)?e.solutionIds:[],i=Array.isArray(e?.solutionTitles)?e.solutionTitles:[],s=t.map((n,l)=>({type:"solution",value:n,displayValue:i[l]??n}));this._filters={categories:s,searchTerm:"",displayValue:this._translations.aiAssistantResults},this.filterRemoved.emit([])}_toggleFilter(){this._filterOpen=!this._filterOpen}_logFilterTelemetry(e){if((e.type==="industry"||e.type==="domain")&&e.industry){let t=[u[e.industry]];if(e.domain){let i=f[e.domain];t.push(i)}this._telemetry?.logEvent({category:_.ALL_SOLUTIONS,action:"Filter",dimensions:t})}}_filterApplied(e,t){if(this._filters.categories)if(e){let i=e;if("displayValue"in e)this._filters.categories.push(e),this._logFilterTelemetry(e);else if(Array.isArray(e)&&e.length>0){e.length>=2&&(i=[e[e.length-1]]),this._filters={categories:e,searchTerm:this._filters.searchTerm};let s=e[e.length-1];s&&this._logFilterTelemetry(s)}if("searchTerm"in i&&(this._filters.searchTerm=i.searchTerm,t&&i.searchTerm)){this._telemetry?.logEvent({category:_.ALL_SOLUTIONS,action:"Search",dimensions:[i.searchTerm]});return}this._allSolutionsPanelRef.value?.searchSolutions(i)}else this._filters.categories=[],this._allSolutionsPanelRef.value?.searchSolutions()}};w("solutions-all-shell",g);return g},b)
2
+ import{a as R}from"./PPFEO3UH.js";import{a as F}from"./YUWXPLTE.js";import b from"./XOCNSPTC.js";import{a as $,b as C}from"./2B4SGB3I.js";import{b as d}from"./RLSY4VUQ.js";import{a as S}from"./LABCYKSC.js";import{b as w}from"./5BJO5ABV.js";import{F as o,G as r,H as x,J as c,K as h,h as v,i as a,q as y}from"./T3EPRHTT.js";export default $arcgis.t(([{j:u,k:f,r:_}])=>{var O=v`.display-flex{display:flex}.border-override{border-top-width:var(--calcite-border-width-none);border-bottom-width:var(--calcite-border-width-none)}.header-override{--calcite-panel-header-content-space: 0px;--calcite-panel-header-background-color: var(--calcite-color-surface-3)}.panel-override{--calcite-panel-background-color: var(--calcite-color-surface-3);--calcite-panel-border-color: none}.label-override{--calcite-label-margin-bottom: 0px;font-weight:var(--calcite-font-weight-medium)}.header-button-padding{padding-top:var(--calcite-spacing-sm);padding-bottom:var(--calcite-spacing-sm);padding-inline-start:var(--calcite-spacing-lg);padding-inline-end:var(--calcite-spacing-lg)}.padding-start{padding-inline-start:var(--calcite-spacing-sm)}.align-items-center{align-items:center}.justify-content-end{justify-content:end}.filter-width-350{--calcite-shell-panel-width: 350px}.z-index-1{z-index:1}.z-index-2{z-index:2}h1{font-weight:unset;margin:0;padding:0}@container (max-width: 800px){.filter{display:none}}.mock-fab{--calcite-fab-shadow-internal: 0 6px 20px -4px rgba(0, 0, 0, .1), 0 4px 12px -2px rgba(0, 0, 0, .08);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-text-color: var(--calcite-fab-text-color);--calcite-button-loader-color: var(--calcite-fab-loader-color)}.background-override{--calcite-shell-panel-background-color: var(--calcite-color-surface-4);--calcite-panel-background-color: var(--calcite-color-surface-4)}.chips-container{display:flex;flex-wrap:wrap;align-items:center;gap:var(--calcite-spacing-xs);flex:1;padding-block:var(--calcite-spacing-xs)}.header-content-wrapper{min-height:50px;flex-wrap:wrap;gap:var(--calcite-spacing-xs);padding-inline-start:var(--calcite-spacing-lg);padding-top:8px}.position-relative{position:relative;height:100%;overflow:hidden}.height-100{height:100%}.border-none{border:none}.height-50{height:50px}.chip-group{max-width:100%}.chip-group{display:flex;flex-wrap:wrap}.responsive-chip{max-width:100%}.responsive-chip .chip-text{display:inline-flex;align-items:center;line-height:1;max-width:100%}@container (max-width: 800px){.responsive-chip{max-width:100%;min-width:0}.responsive-chip .chip-text{max-width:100%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}}.mobile-stack{flex-direction:column;align-items:flex-start;padding-top:var(--calcite-spacing-md)}`,g=class extends x{constructor(){super(),this.solutionsCount=0,this._isLoading=!0,this._filterOpen=!0,this._filters={categories:[],searchTerm:""},this._isMobile=!1,this._translations=S({name:"solutions-all-shell",blocking:!0}),this._allSolutionsPanelRef=o(),this._solutionsFilterPanelRef=o(),this._mainPanelRef=o(),this._panelFixed=!1,this._configContextConsumer=d({context:C,subscribe:!0}),this._isMobileContextConsumer=d({context:$,subscribe:!0,callback:e=>this._isMobile=e}),this.filterRemoved=y(),this.listenOn(window,"searchChanged",e=>{e.detail&&e.detail.scope==="all-solutions"&&this._filterApplied(e.detail.option,e.detail.logSearchTelemetry)}),this.listenOn(window,"toggleFilter",this._toggleFilter),this.listenOn(window,"cardsFetched",()=>{this._isLoading=!1,this._syncSolutionChipOrderWithDisplayedCards()}),this.listenOn(window,"solutionMatchesFromAssistant",e=>{this._applyAssistantSolutionMatches(e.detail)})}static{this.properties={solutionsCount:9,_isLoading:16,_filterOpen:16,_filters:16,_isMobile:16,_translations:16}}static{this.styles=O}willUpdate(e){e.has("_isMobile")&&(this._filterOpen=!this._isMobile)}get _telemetry(){return this._configContextConsumer.value?.telemetrySession}async searchSolutions(e){if(this._allSolutionsPanelRef.value.setSearchOptions(e),"industry"in e||"domain"in e){e.displayValue=e.domain||e.industry;let t=e.industry?Object.entries(u).find(([,s])=>s===e.industry)?.[0]:void 0,i=e.domain?Object.entries(f).find(([,s])=>s===e.domain)?.[0]:void 0;e.industry=t||"",e.domain=i||"",e.value=i||t||"",this._solutionsFilterPanelRef.value.changeIndustryFilter(e.industry,e.domain,e.displayValue,!0)}else("searchTerm"in e||"sortType"in e)&&("searchTerm"in e&&(this._filters.searchTerm=e.searchTerm),this._allSolutionsPanelRef.value?.searchSolutions(e))}async load(){this._isMobileContextConsumer.value&&(this._isMobile=this._isMobileContextConsumer.value)}updated(){this._fixPanelContentWrapperFocus()}_fixPanelContentWrapperFocus(){if(!this._panelFixed&&this._mainPanelRef.value){let e=this._mainPanelRef.value;e.componentOnReady?.().then(()=>{if(e.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&(t.tabIndex=-1,this._panelFixed=!0,this._setupPanelObserver())}}).catch(()=>{this._panelFixed=!0})}}_setupPanelObserver(){if(this._panelObserver)return;this._panelObserver=new MutationObserver(t=>{t.forEach(i=>{if(i.type==="attributes"&&i.attributeName==="tabindex"){let s=i.target;s.classList.contains("content-wrapper")&&s.tabIndex===0&&(s.tabIndex=-1)}})});let e=this._mainPanelRef.value;if(e?.shadowRoot){let t=e.shadowRoot.querySelector(".content-wrapper");t&&this._panelObserver.observe(t,{attributes:!0,attributeFilter:["tabindex"]})}}disconnectedCallback(){super.disconnectedCallback(),this._panelObserver?.disconnect()}render(){let e=this._isMobile?"justify-content-end":"",t=this._isLoading?"display-none":"";return a`<calcite-shell class=${`position-relative ${t}`}>${this._isMobile?"":this._getFilterPanel()}<h1 class="height-100"><calcite-panel class="border-override header-override panel-override z-index-1" ${r(this._mainPanelRef)}><div class=${c(this._isMobile?`mobile-stack ${e}`:`display-flex align-items-center header-content-wrapper ${e}`)} slot=header-content><calcite-label class="label-override">${this._translations.numberOfSolutions.replace("{{count}}",this.solutionsCount.toString())}</calcite-label><div class="chips-container">${this._renderChips()}${this._filters.categories&&this._filters.categories?.length>0&&a`<calcite-button appearance=transparent icon-start=reset kind=neutral @click=${()=>{let i=this._filters.categories?.some(s=>s.type==="solution")??!1;this._filters={...this._filters,categories:[]},i&&window.dispatchEvent(new CustomEvent("clearAssistantResultFilters")),this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories),this._filters.searchTerm!==""&&this._allSolutionsPanelRef.value?.searchSolutions({searchTerm:this._filters.searchTerm}),this.filterRemoved.emit([])}} .label=${this._translations.clearIndustryFilter}>${this._translations.clearIndustryFilter}</calcite-button>`||""}</div></div>${this._isMobile&&this._getFilterPanel()||""}${this._getSolutionsAllPanel()}</calcite-panel></h1></calcite-shell>`}_getFilterPanel(){let e=this._filterOpen?{display:"flex"}:"";return this._isMobile?a`<calcite-panel class=${`border-none ${this._filterOpen?"background-override":"filter background-override"}`} id=solutions-all-shell-panel-start style=${h(e)}><solutions-filter-panel class="height-100" @applyFilter=${t=>{this._filterApplied(t.detail)}} ${r(this._solutionsFilterPanelRef)}></solutions-filter-panel></calcite-panel>`:a`<calcite-shell-panel class="filter background-override filter-width-350" id=solutions-all-shell-panel-start slot=panel-start style=${h(e)}><calcite-panel class="border-none"><solutions-filter-panel class="height-100" @applyFilter=${t=>{this._filterApplied(t.detail)}} ${r(this._solutionsFilterPanelRef)}></solutions-filter-panel></calcite-panel></calcite-shell-panel>`}_getSolutionsAllPanel(){let e=this._isMobile&&this._filterOpen?{display:"none"}:"";return a`<solutions-all-panel @cardsFetched=${this._updateSolutionCount} style=${h(e)} ${r(this._allSolutionsPanelRef)}></solutions-all-panel>`}_renderChips(){if(!this._filters.categories)return;let e=this._filters.categories.filter(t=>t.type==="industry"||t.type==="domain"||t.type==="solution");if(e.length!==0)return a`<calcite-chip-group class="chip-group" .label=${this._translations.appliedFilters}>${this._filters.displayValue&&this._filters.displayValue!==""?F(`${this._filters.displayValue}`,a`<calcite-chip appearance=outline-fill class=${c(this._isMobile?"responsive-chip":"padding-start responsive-chip")} closable .label=${this._filters.displayValue??""} @calciteChipClose=${()=>this._chipClosed(this._filters.displayValue,"solution")} .value=${this._filters.displayValue}>${this._filters.displayValue}</calcite-chip>`):R(e,t=>`${t.type}:${t.value}`,t=>a`<calcite-chip appearance=outline-fill class=${c(this._isMobile?"responsive-chip":"padding-start responsive-chip")} closable .label=${t.displayValue} @calciteChipClose=${()=>this._chipClosed(t.displayValue,t.type)} .value=${t.displayValue}>${t.displayValue}</calcite-chip>`)}</calcite-chip-group>`}_updateSolutionCount(e){this.solutionsCount=e.detail}_syncSolutionChipOrderWithDisplayedCards(){if(!this._filters.categories?.length)return;let e=this._filters.categories.filter(l=>l.type==="solution");if(e.length<=1)return;let t=this._allSolutionsPanelRef.value?.getDisplayedSolutionIds?.()??[];if(!t.length)return;let i=new Map;t.forEach((l,p)=>{i.set(l,p)});let s=[...e].sort((l,p)=>{let m=i.get(String(l.value)),b=i.get(String(p.value)),T=m===void 0?Number.MAX_SAFE_INTEGER:m,P=b===void 0?Number.MAX_SAFE_INTEGER:b;return T-P}),n=this._filters.categories.filter(l=>l.type!=="solution");this._filters={...this._filters,categories:[...n,...s]}}_chipClosed(e,t){if(this._filters.categories){if(t==="solution"){this._filters={...this._filters,categories:[]},window.dispatchEvent(new CustomEvent("clearAssistantResultFilters")),this._allSolutionsPanelRef.value?.searchSolutions(),this._filters.searchTerm!==""&&this._allSolutionsPanelRef.value?.searchSolutions({searchTerm:this._filters.searchTerm});return}if(t==="industry")this._filters.categories=[];else{let i=this._filters.categories.filter(s=>s.displayValue!==e&&s.type!==t);this._filters.categories=i}this._filters.categories.length>0?this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories):this._filters.searchTerm!==""?(this._allSolutionsPanelRef.value?.searchSolutions(this._filters.categories),this._allSolutionsPanelRef.value?.searchSolutions({searchTerm:this._filters.searchTerm})):this._allSolutionsPanelRef.value?.searchSolutions(),this.filterRemoved.emit(this._filters.categories)}}_applyAssistantSolutionMatches(e){let t=Array.isArray(e?.solutionIds)?e.solutionIds:[],i=Array.isArray(e?.solutionTitles)?e.solutionTitles:[],s=t.map((n,l)=>({type:"solution",value:n,displayValue:i[l]??n}));this._filters={categories:s,searchTerm:"",displayValue:this._translations.aiAssistantResults},this.filterRemoved.emit([])}_toggleFilter(){this._filterOpen=!this._filterOpen}_logFilterTelemetry(e){if((e.type==="industry"||e.type==="domain")&&e.industry){let t=[u[e.industry]];if(e.domain){let i=f[e.domain];t.push(i)}this._telemetry?.logEvent({category:_.ALL_SOLUTIONS,action:"Filter",dimensions:t})}}_filterApplied(e,t){if(this._filters.categories)if(e){let i=e;if("displayValue"in e)this._filters.categories.push(e),this._logFilterTelemetry(e);else if(Array.isArray(e)&&e.length>0){e.length>=2&&(i=[e[e.length-1]]),this._filters={categories:e,searchTerm:this._filters.searchTerm};let s=e[e.length-1];s&&this._logFilterTelemetry(s)}if("searchTerm"in i&&(this._filters.searchTerm=i.searchTerm,t&&i.searchTerm)){this._telemetry?.logEvent({category:_.ALL_SOLUTIONS,action:"Search",dimensions:[i.searchTerm]});return}this._allSolutionsPanelRef.value?.searchSolutions(i)}else this._filters.categories=[],this._allSolutionsPanelRef.value?.searchSolutions()}};w("solutions-all-shell",g);return g},b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{ka as c,ob as p}from"./CGQALCTZ.js";import{u as d}from"./3TAQSXLA.js";var V=250,g=new Set(["add","all","alter","and","any","as","asc","backup","between","by","case","check","column","constraint","create","database","date","default","delete","desc","distinct","drop","exec","exists","foreign","from","full","group","having","in","index","inner","insert","into","is","join","key","left","like","limit","not","null","on","or","order","outer","primary","procedure","right","rownum","select","set","subtype","table","top","truncate","union","unique","update","values","view","where"]),w=new Set(["objectid","globalid","created_date","created_user","last_edited_date","last_edited_user","fid","shape","shape_length","shape_area"]),x=/[\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{1F1E0}-\u{1F1FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{1F900}-\u{1F9FF}\u{1F018}-\u{1F270}\u{238C}-\u{2454}\u{20D0}-\u{20FF}\u{FE0F}]/u;function n(e){return!e||e.trim().length===0}function s(e){return e.length>V}function l(e,r){return x.test(e)?!0:r==="item"?/[><~`$^+=|]/u.test(e):/[/<>\\]/u.test(e)}async function b(e,r){let t=r,a=await t.getUsername(),y={q:new d().match(e).in("title").and().match(a).in("owner"),filter:"type:Solution",authentication:t},h=(await p(y)).results.map(i=>i.title),{folders:m}=await c(t),f=m.map(i=>i.title),u=[...h,...f].map(i=>i.trim().toLowerCase()),o=e.toLowerCase(),F=u.filter(i=>i===o),T=u.filter(i=>i.startsWith(o));return{conflictingNames:F,similiarNames:T}}async function L(e,r,t=!1){return n(e)?{isValid:!1,errorType:"empty"}:s(e)?{isValid:!1,errorType:"exceed-length"}:l(e,"folder")||l(e,"item")?{isValid:!1,errorType:"special-character"}:!t&&r&&(await b(e.trim(),r)).conflictingNames.length>0?{isValid:!1,errorType:"not-unique"}:{isValid:!0,errorType:null}}function C(e){return n(e)?{isValid:!1,errorType:"empty"}:s(e)?{isValid:!1,errorType:"exceed-length"}:l(e,"item")?{isValid:!1,errorType:"special-character"}:{isValid:!0,errorType:null}}function v(e,r,t=!1){if(e.length>r)return{isValid:!1,errorType:"exceed-length"};let a=[];return e.includes("<")&&a.push("<"),e.includes(">")&&a.push(">"),!t&&e.includes("/")&&a.push("/"),a.length>0?{isValid:!1,errorType:"special-character"}:{isValid:!0,errorType:null}}function S(e){return n(e)?{isValid:!1,errorType:"empty"}:s(e)?{isValid:!1,errorType:"exceed-length"}:{isValid:!0,errorType:null}}function k(e,r=[]){return n(e)?{isValid:!1,errorType:"empty"}:/^[\p{L}][\p{L}\p{N}\p{M}_]*$/u.test(e)?e.length>31?{isValid:!1,errorType:"exceed-length"}:g.has(e.toLowerCase())?{isValid:!1,errorType:"sql-keyword"}:w.has(e.toLowerCase())?{isValid:!1,errorType:"system-field"}:r.includes(e.toLowerCase())?{isValid:!1,errorType:"duplicate-field"}:{isValid:!0,errorType:null}:{isValid:!1,errorType:"invalid-format"}}function q(e){return e<1||e>4e3?{isValid:!1,errorType:"out-of-range"}:{isValid:!0,errorType:null}}function N(e,r,t=!1){return t?{isValid:!0,errorType:null}:e.trim().length===0?{isValid:!1,errorType:"empty"}:e.length>r?{isValid:!1,errorType:"exceed-length"}:{isValid:!0,errorType:null}}export{g as a,w as b,x as c,b as d,L as e,C as f,v as g,S as h,k as i,q as j,N as k};
2
+ import{ka as c,ob as p}from"./AO7XKW2U.js";import{u as d}from"./3TAQSXLA.js";var V=250,g=new Set(["add","all","alter","and","any","as","asc","backup","between","by","case","check","column","constraint","create","database","date","default","delete","desc","distinct","drop","exec","exists","foreign","from","full","group","having","in","index","inner","insert","into","is","join","key","left","like","limit","not","null","on","or","order","outer","primary","procedure","right","rownum","select","set","subtype","table","top","truncate","union","unique","update","values","view","where"]),w=new Set(["objectid","globalid","created_date","created_user","last_edited_date","last_edited_user","fid","shape","shape_length","shape_area"]),x=/[\u{1F600}-\u{1F64F}\u{1F300}-\u{1F5FF}\u{1F680}-\u{1F6FF}\u{1F1E0}-\u{1F1FF}\u{2600}-\u{26FF}\u{2700}-\u{27BF}\u{1F900}-\u{1F9FF}\u{1F018}-\u{1F270}\u{238C}-\u{2454}\u{20D0}-\u{20FF}\u{FE0F}]/u;function n(e){return!e||e.trim().length===0}function s(e){return e.length>V}function l(e,r){return x.test(e)?!0:r==="item"?/[><~`$^+=|]/u.test(e):/[/<>\\]/u.test(e)}async function b(e,r){let t=r,a=await t.getUsername(),y={q:new d().match(e).in("title").and().match(a).in("owner"),filter:"type:Solution",authentication:t},h=(await p(y)).results.map(i=>i.title),{folders:m}=await c(t),f=m.map(i=>i.title),u=[...h,...f].map(i=>i.trim().toLowerCase()),o=e.toLowerCase(),F=u.filter(i=>i===o),T=u.filter(i=>i.startsWith(o));return{conflictingNames:F,similiarNames:T}}async function L(e,r,t=!1){return n(e)?{isValid:!1,errorType:"empty"}:s(e)?{isValid:!1,errorType:"exceed-length"}:l(e,"folder")||l(e,"item")?{isValid:!1,errorType:"special-character"}:!t&&r&&(await b(e.trim(),r)).conflictingNames.length>0?{isValid:!1,errorType:"not-unique"}:{isValid:!0,errorType:null}}function C(e){return n(e)?{isValid:!1,errorType:"empty"}:s(e)?{isValid:!1,errorType:"exceed-length"}:l(e,"item")?{isValid:!1,errorType:"special-character"}:{isValid:!0,errorType:null}}function v(e,r,t=!1){if(e.length>r)return{isValid:!1,errorType:"exceed-length"};let a=[];return e.includes("<")&&a.push("<"),e.includes(">")&&a.push(">"),!t&&e.includes("/")&&a.push("/"),a.length>0?{isValid:!1,errorType:"special-character"}:{isValid:!0,errorType:null}}function S(e){return n(e)?{isValid:!1,errorType:"empty"}:s(e)?{isValid:!1,errorType:"exceed-length"}:{isValid:!0,errorType:null}}function k(e,r=[]){return n(e)?{isValid:!1,errorType:"empty"}:/^[\p{L}][\p{L}\p{N}\p{M}_]*$/u.test(e)?e.length>31?{isValid:!1,errorType:"exceed-length"}:g.has(e.toLowerCase())?{isValid:!1,errorType:"sql-keyword"}:w.has(e.toLowerCase())?{isValid:!1,errorType:"system-field"}:r.includes(e.toLowerCase())?{isValid:!1,errorType:"duplicate-field"}:{isValid:!0,errorType:null}:{isValid:!1,errorType:"invalid-format"}}function q(e){return e<1||e>4e3?{isValid:!1,errorType:"out-of-range"}:{isValid:!0,errorType:null}}function N(e,r,t=!1){return t?{isValid:!0,errorType:null}:e.trim().length===0?{isValid:!1,errorType:"empty"}:e.length>r?{isValid:!1,errorType:"exceed-length"}:{isValid:!0,errorType:null}}export{g as a,w as b,x as c,b as d,L as e,C as f,v as g,S as h,k as i,q as j,N as k};