@arcgis/portal-components 5.2.0-next.134 → 5.2.0-next.135

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 (270) hide show
  1. package/dist/cdn/2N267CQJ.js +2 -0
  2. package/dist/cdn/2WTWI376.js +2 -0
  3. package/dist/cdn/{7NNSALJQ.js → 3GRYBMC6.js} +1 -1
  4. package/dist/cdn/3HEKI54S.js +2 -0
  5. package/dist/cdn/{MFT5NBI5.js → 47AEGGQB.js} +1 -1
  6. package/dist/cdn/{5ITAQNJ6.js → 4PQO4X4X.js} +1 -1
  7. package/dist/cdn/4TQWZ2KF.js +9 -0
  8. package/dist/cdn/{B2YUF4DX.js → 576MGJVB.js} +1 -1
  9. package/dist/cdn/5OLOB42V.js +2 -0
  10. package/dist/cdn/5QJFE2TZ.js +2 -0
  11. package/dist/cdn/5ZOQN2RD.js +2 -0
  12. package/dist/cdn/{RBGARTND.js → 636D2CQX.js} +1 -1
  13. package/dist/cdn/6D5PKX2I.js +2 -0
  14. package/dist/cdn/6OGBUPNX.js +2 -0
  15. package/dist/cdn/74ZBFN22.js +2 -0
  16. package/dist/cdn/{NBB7R2RE.js → 7RVBLIFE.js} +1 -1
  17. package/dist/cdn/A7HUDHZU.js +2 -0
  18. package/dist/cdn/A7XG2CGZ.js +2 -0
  19. package/dist/cdn/AROVW3UH.js +2 -0
  20. package/dist/cdn/AUVW676U.js +2 -0
  21. package/dist/cdn/BFSOZIZT.js +2 -0
  22. package/dist/cdn/{EBPLUTN5.js → BGZVQGWE.js} +1 -1
  23. package/dist/cdn/BIXJGL7B.js +2 -0
  24. package/dist/cdn/BQPBJWMI.js +2 -0
  25. package/dist/cdn/BQR4YDYX.js +2 -0
  26. package/dist/cdn/CBL5PQQB.js +2 -0
  27. package/dist/cdn/D7MON5HR.js +2 -0
  28. package/dist/cdn/DOOROTIK.js +2 -0
  29. package/dist/cdn/DP3RFREY.js +2 -0
  30. package/dist/cdn/DQJLTSBY.js +2 -0
  31. package/dist/cdn/E37TWXOS.js +2 -0
  32. package/dist/cdn/E5MBJ2OM.js +2 -0
  33. package/dist/cdn/FEXHSQ6Z.js +2 -0
  34. package/dist/cdn/FN64OJAN.js +2 -0
  35. package/dist/cdn/FS5XBCHL.js +2 -0
  36. package/dist/cdn/GBFEHPAL.js +2 -0
  37. package/dist/cdn/GKBQITIV.js +2 -0
  38. package/dist/cdn/GX6RPWBL.js +2 -0
  39. package/dist/cdn/{CVOWIH4J.js → GXGPSLRY.js} +1 -1
  40. package/dist/cdn/HCVZKEPD.js +2 -0
  41. package/dist/cdn/HHO6EQZB.js +2 -0
  42. package/dist/cdn/{6NRVGSZJ.js → HNE7TSIC.js} +1 -1
  43. package/dist/cdn/HNIPFKPI.js +2 -0
  44. package/dist/cdn/IAUHMY3T.js +2 -0
  45. package/dist/cdn/ID2H3IUI.js +2 -0
  46. package/dist/cdn/INRJRPFE.js +2 -0
  47. package/dist/cdn/{KCYIOVJQ.js → ISJALOUO.js} +1 -1
  48. package/dist/cdn/IVQXK46W.js +2 -0
  49. package/dist/cdn/IYNMMRVZ.js +2 -0
  50. package/dist/cdn/JI4MTBTR.js +2 -0
  51. package/dist/cdn/JYORYNSD.js +2 -0
  52. package/dist/cdn/KFIQURH5.js +2 -0
  53. package/dist/cdn/L4JQV42D.js +2 -0
  54. package/dist/cdn/M6UW4NQ5.js +2 -0
  55. package/dist/cdn/MTUFZXUQ.js +2 -0
  56. package/dist/cdn/{TYPCOTRW.js → MXM422M5.js} +1 -1
  57. package/dist/cdn/{RL2H7TI6.js → MXSBJ4UL.js} +1 -1
  58. package/dist/cdn/NDZYRGOO.js +2 -0
  59. package/dist/cdn/{JJUCB3OG.js → OJGDXUKZ.js} +1 -1
  60. package/dist/cdn/OT3GDLUB.js +2 -0
  61. package/dist/cdn/OTTQ54QN.js +2 -0
  62. package/dist/cdn/{ZEP2GDDJ.js → PIAWVFRU.js} +1 -1
  63. package/dist/cdn/PJ4ISUWJ.js +2 -0
  64. package/dist/cdn/PWOYHZOU.js +2 -0
  65. package/dist/cdn/{MQISQ7P3.js → Q6VNNX2L.js} +1 -1
  66. package/dist/cdn/QABX5STK.js +2 -0
  67. package/dist/cdn/QDWOQBO3.js +3 -0
  68. package/dist/cdn/SG23BRS4.js +2 -0
  69. package/dist/cdn/T3B2IOBY.js +2 -0
  70. package/dist/cdn/T3RJKB2A.js +2 -0
  71. package/dist/cdn/TV3JAEAU.js +2 -0
  72. package/dist/cdn/UMKPSK3Y.js +2 -0
  73. package/dist/cdn/UXZTO272.js +4 -0
  74. package/dist/cdn/VLIJNVNM.js +2 -0
  75. package/dist/cdn/VOZJP55F.js +2 -0
  76. package/dist/cdn/VPAW5MZH.js +2 -0
  77. package/dist/cdn/WEKTI5QA.js +2 -0
  78. package/dist/cdn/WHX4LFPO.js +670 -0
  79. package/dist/cdn/WLSTJTHH.js +2 -0
  80. package/dist/cdn/WRXH4QIH.js +2 -0
  81. package/dist/cdn/XOFCMJBQ.js +150 -0
  82. package/dist/cdn/YBYLRWDO.js +2 -0
  83. package/dist/cdn/YUV3L73F.js +2 -0
  84. package/dist/cdn/YWS3KTEP.js +2 -0
  85. package/dist/cdn/Z2K2TPTY.js +2 -0
  86. package/dist/cdn/ZDA2LVTP.js +2 -0
  87. package/dist/cdn/assets/portal-entity-picker/t9n/messages.en.json +1 -0
  88. package/dist/cdn/index.js +1 -1
  89. package/dist/cdn/main.css +1 -1
  90. package/dist/chunks/item.js +17 -13
  91. package/dist/chunks/string.js +15 -9
  92. package/dist/chunks/utils.js +28 -83
  93. package/dist/chunks/utils2.js +75 -651
  94. package/dist/chunks/utils3.js +664 -0
  95. package/dist/components/arcgis-portal-ai-assistant/customElement.js +21 -17
  96. package/dist/components/arcgis-portal-entity-picker/customElement.d.ts +87 -0
  97. package/dist/components/arcgis-portal-entity-picker/customElement.js +247 -0
  98. package/dist/components/arcgis-portal-entity-picker/index.d.ts +1 -0
  99. package/dist/components/arcgis-portal-entity-picker/index.js +11 -0
  100. package/dist/components/arcgis-portal-group-browser/customElement.js +1 -1
  101. package/dist/components/arcgis-portal-group-card/customElement.js +7 -7
  102. package/dist/components/arcgis-portal-group-picker/customElement.d.ts +20 -0
  103. package/dist/components/arcgis-portal-group-picker/customElement.js +15 -0
  104. package/dist/components/arcgis-portal-group-picker/index.d.ts +1 -0
  105. package/dist/components/arcgis-portal-group-picker/index.js +2 -0
  106. package/dist/components/arcgis-portal-item-actions/customElement.js +1 -1
  107. package/dist/components/arcgis-portal-item-card/customElement.js +15 -15
  108. package/dist/components/arcgis-portal-item-favorite/customElement.js +1 -1
  109. package/dist/components/arcgis-portal-item-picker/customElement.d.ts +20 -0
  110. package/dist/components/arcgis-portal-item-picker/customElement.js +15 -0
  111. package/dist/components/arcgis-portal-item-picker/index.d.ts +1 -0
  112. package/dist/components/arcgis-portal-item-picker/index.js +2 -0
  113. package/dist/components/arcgis-portal-item-type/customElement.js +1 -1
  114. package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +75 -101
  115. package/dist/components/arcgis-portal-navigation/customElement.js +2 -2
  116. package/dist/components/arcgis-portal-user-picker/customElement.d.ts +20 -0
  117. package/dist/components/arcgis-portal-user-picker/customElement.js +15 -0
  118. package/dist/components/arcgis-portal-user-picker/index.d.ts +1 -0
  119. package/dist/components/arcgis-portal-user-picker/index.js +2 -0
  120. package/dist/docs/api.json +1 -1
  121. package/dist/docs/docs.json +1 -1
  122. package/dist/docs/vscode.html-custom-data.json +1 -1
  123. package/dist/docs/web-types.json +1 -1
  124. package/dist/index.d.ts +40 -0
  125. package/dist/loader.js +4 -0
  126. package/dist/types/lumina.d.ts +24 -0
  127. package/dist/types/portalEntityPicker.d.ts +18 -0
  128. package/dist/types/preact.d.ts +28 -0
  129. package/dist/types/react.d.ts +32 -0
  130. package/dist/types/stencil.d.ts +24 -0
  131. package/package.json +7 -7
  132. package/dist/cdn/245E7G7N.js +0 -14
  133. package/dist/cdn/27HHZHV5.js +0 -2
  134. package/dist/cdn/2RWCT4ED.js +0 -19
  135. package/dist/cdn/34DIIWGC.js +0 -2
  136. package/dist/cdn/3NA4M2MH.js +0 -2
  137. package/dist/cdn/3OBIA66A.js +0 -69
  138. package/dist/cdn/3YS4G5QE.js +0 -2
  139. package/dist/cdn/426RS2JW.js +0 -2
  140. package/dist/cdn/4BQASKGB.js +0 -2
  141. package/dist/cdn/4FQWB6HA.js +0 -2
  142. package/dist/cdn/4LMVMZGG.js +0 -2
  143. package/dist/cdn/4RPNBHB5.js +0 -2
  144. package/dist/cdn/5D75JDVE.js +0 -2
  145. package/dist/cdn/5GLUIQ7R.js +0 -2
  146. package/dist/cdn/63THOLAY.js +0 -49
  147. package/dist/cdn/6FKARLGX.js +0 -2
  148. package/dist/cdn/6JJUORUU.js +0 -2
  149. package/dist/cdn/6PTPTTSS.js +0 -2
  150. package/dist/cdn/6XRVLKAZ.js +0 -2
  151. package/dist/cdn/74OADAQ6.js +0 -2
  152. package/dist/cdn/7PMLGJZR.js +0 -75
  153. package/dist/cdn/7TN5Q3I2.js +0 -2
  154. package/dist/cdn/7UNUBFFC.js +0 -2
  155. package/dist/cdn/ABIXHCPF.js +0 -5
  156. package/dist/cdn/AMBLICID.js +0 -2
  157. package/dist/cdn/ASDS73QU.js +0 -245
  158. package/dist/cdn/BADETB57.js +0 -2
  159. package/dist/cdn/BJ6YM6ZC.js +0 -2
  160. package/dist/cdn/BNFEED2K.js +0 -2
  161. package/dist/cdn/BPQ6ZBLE.js +0 -2
  162. package/dist/cdn/BV6XVVX2.js +0 -2
  163. package/dist/cdn/C2WQAFUM.js +0 -2
  164. package/dist/cdn/C7ZFXRPS.js +0 -122
  165. package/dist/cdn/CAPW3SVN.js +0 -2
  166. package/dist/cdn/CGBXIK2L.js +0 -2
  167. package/dist/cdn/CVTQ3A4T.js +0 -2
  168. package/dist/cdn/D4MCG57T.js +0 -2
  169. package/dist/cdn/DISKTSUL.js +0 -2
  170. package/dist/cdn/DPNKUVXU.js +0 -2
  171. package/dist/cdn/E2AHTEKS.js +0 -2
  172. package/dist/cdn/EBUPCIL6.js +0 -2
  173. package/dist/cdn/EJXMHOYA.js +0 -2
  174. package/dist/cdn/EOQHBWKK.js +0 -2
  175. package/dist/cdn/EXBWPG5Y.js +0 -4
  176. package/dist/cdn/FED2DOMO.js +0 -2
  177. package/dist/cdn/FHXIGKK4.js +0 -2
  178. package/dist/cdn/FJ3PFFCN.js +0 -2
  179. package/dist/cdn/FNHI7NZ4.js +0 -2
  180. package/dist/cdn/FOHZXQNV.js +0 -2
  181. package/dist/cdn/FPKKNRZY.js +0 -2
  182. package/dist/cdn/G5PORPTQ.js +0 -2
  183. package/dist/cdn/GCB5BYDM.js +0 -11
  184. package/dist/cdn/GDKX2CGS.js +0 -2
  185. package/dist/cdn/GOHJT66O.js +0 -2
  186. package/dist/cdn/H5RBBOBZ.js +0 -2
  187. package/dist/cdn/HKD2GF4M.js +0 -2
  188. package/dist/cdn/I5C4SV6N.js +0 -2
  189. package/dist/cdn/I64ZE3TR.js +0 -2
  190. package/dist/cdn/IJ3CLFAU.js +0 -22
  191. package/dist/cdn/JB2P4KY4.js +0 -2
  192. package/dist/cdn/JIBKSQBE.js +0 -2
  193. package/dist/cdn/JIOUF6RV.js +0 -2
  194. package/dist/cdn/JMZYTFZZ.js +0 -41
  195. package/dist/cdn/JZ7SSPKB.js +0 -2
  196. package/dist/cdn/K4LXMVNH.js +0 -2
  197. package/dist/cdn/KALKWPUR.js +0 -2
  198. package/dist/cdn/KCLCOBT2.js +0 -2
  199. package/dist/cdn/KEM54FSC.js +0 -2
  200. package/dist/cdn/KNRJ3WXR.js +0 -98
  201. package/dist/cdn/KOZMWZTT.js +0 -2
  202. package/dist/cdn/KS2JQYWA.js +0 -2
  203. package/dist/cdn/KWEVRR34.js +0 -2
  204. package/dist/cdn/L33CMX4M.js +0 -2
  205. package/dist/cdn/L6KBBJEC.js +0 -36
  206. package/dist/cdn/LL5AA56F.js +0 -2
  207. package/dist/cdn/LM6H2RMV.js +0 -2
  208. package/dist/cdn/M33TAW7V.js +0 -2
  209. package/dist/cdn/MC3V6J4M.js +0 -2
  210. package/dist/cdn/MDGR5FJS.js +0 -2
  211. package/dist/cdn/NQMXSOYA.js +0 -2
  212. package/dist/cdn/NUQSQHFS.js +0 -2
  213. package/dist/cdn/NXJTHWZ6.js +0 -2
  214. package/dist/cdn/OLXC7CE4.js +0 -2
  215. package/dist/cdn/PCFYL72V.js +0 -2
  216. package/dist/cdn/PEO5PFZF.js +0 -2
  217. package/dist/cdn/PQ75545K.js +0 -2
  218. package/dist/cdn/Q5GFMD4E.js +0 -2
  219. package/dist/cdn/QE4CNVDQ.js +0 -34
  220. package/dist/cdn/QFHL5APV.js +0 -2
  221. package/dist/cdn/QJ7AI54H.js +0 -135
  222. package/dist/cdn/QKCV7CY2.js +0 -77
  223. package/dist/cdn/R74ZHFA6.js +0 -2
  224. package/dist/cdn/RZV3CS2K.js +0 -2
  225. package/dist/cdn/S2BGAMSA.js +0 -2
  226. package/dist/cdn/S772GWA3.js +0 -2
  227. package/dist/cdn/SABP5QOL.js +0 -2
  228. package/dist/cdn/SGI3WLNF.js +0 -2
  229. package/dist/cdn/SLTFLCVR.js +0 -99
  230. package/dist/cdn/SOFQU6KS.js +0 -654
  231. package/dist/cdn/SXSWBX5T.js +0 -2
  232. package/dist/cdn/TCAC2CO6.js +0 -2
  233. package/dist/cdn/TKCE4WYE.js +0 -3
  234. package/dist/cdn/UDDG7VVX.js +0 -2
  235. package/dist/cdn/UFNGJCCT.js +0 -2
  236. package/dist/cdn/UZMFRVR5.js +0 -2
  237. package/dist/cdn/V4EYW3O6.js +0 -56
  238. package/dist/cdn/V4UI5WTN.js +0 -2
  239. package/dist/cdn/V5BCQN5U.js +0 -2
  240. package/dist/cdn/V75YULVA.js +0 -2
  241. package/dist/cdn/VLCHVVVZ.js +0 -2
  242. package/dist/cdn/VUBYPGZG.js +0 -2
  243. package/dist/cdn/VW7DSKPH.js +0 -109
  244. package/dist/cdn/VX6EE6FY.js +0 -2
  245. package/dist/cdn/VXAWOPU3.js +0 -2
  246. package/dist/cdn/W2SYL7IJ.js +0 -71
  247. package/dist/cdn/W4FGRGLV.js +0 -146
  248. package/dist/cdn/W4SAWMXS.js +0 -31
  249. package/dist/cdn/WBZLQZYR.js +0 -134
  250. package/dist/cdn/WGM3TQIL.js +0 -2
  251. package/dist/cdn/WKJEITKD.js +0 -2
  252. package/dist/cdn/WMT55UQD.js +0 -2
  253. package/dist/cdn/WMV67HW3.js +0 -2
  254. package/dist/cdn/WOOCTQS3.js +0 -2
  255. package/dist/cdn/X4GCKBT2.js +0 -2
  256. package/dist/cdn/XATZUXUP.js +0 -2
  257. package/dist/cdn/XCJJESRE.js +0 -2
  258. package/dist/cdn/XD3TUJLE.js +0 -2
  259. package/dist/cdn/XDKRJYZ2.js +0 -2
  260. package/dist/cdn/XMSFS5AT.js +0 -2
  261. package/dist/cdn/XZF5RW4B.js +0 -2
  262. package/dist/cdn/YARGA5LY.js +0 -2
  263. package/dist/cdn/YDA23ZS6.js +0 -2
  264. package/dist/cdn/YYHDUC6G.js +0 -2
  265. package/dist/cdn/ZIIB5RYY.js +0 -2
  266. package/dist/cdn/ZJJOTRSO.js +0 -138
  267. package/dist/cdn/ZP4Q36AO.js +0 -2
  268. package/dist/cdn/ZQWENT2S.js +0 -3
  269. /package/dist/cdn/{ZZ44GQ4I.js → QUOPWSRC.js} +0 -0
  270. /package/dist/cdn/{NQQLTGIK.js → UTA2UBBS.js} +0 -0
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{c as a}from"./QDWOQBO3.js";import b from"./F3ODJVJC.js";export default $arcgis.t(([c,{e:s}])=>{var d=async(r,t,e)=>{let o=a(t);if(!o)return{};try{return{result:await r.queryItems({...e,query:o})}}catch(n){return console.error(n),{error:{code:"unhandledError"}}}},l=async(r,t,e)=>{let o=`${t.restUrl}/content/users/${r.id}/items/${e}/generateContext`;try{return{result:(await c(o,{method:"post",responseType:"json",query:{f:"json"}})).data}}catch(n){return console.error("Error fetching item context:",n),{error:{code:"unhandledError"}}}};async function y(r,t){if(!r||!t)return{result:null};let e=`${r.restUrl}/content/items/${t}/data`;return await s(e)}return{a:d,b:l,c:y}},"request",b)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a}from"./E5MBJ2OM.js";import b from"./BFSOZIZT.js";import"./UZCHLKLO.js";import"./2GBRZSEC.js";import"./OJGDXUKZ.js";import"./HHO6EQZB.js";import"./ISJALOUO.js";import"./UXZTO272.js";import"./UZLQALHY.js";export default $arcgis.t(([])=>{return a},b)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as l,c}from"./25XJ66JO.js";import"./5YDITHQA.js";import{M as a,N as s,O as n,S as i,h as r,j as e}from"./UXZTO272.js";import"./UZLQALHY.js";var m=r`:host{display:block}.banner{font-weight:var(--calcite-font-weight-bold);font-size:var(--calcite-font-size-0);line-height:1.25rem;font-family:var(--calcite-sans-family);text-align:center;padding:.75rem 2rem;border-bottom:1px solid var(--calcite-color-border-1)}.banner--bottom{border-bottom:none;border-top:1px solid var(--calcite-color-border-1)}.banner__text{margin:0;padding:0;overflow-wrap:break-word}`,t=class extends a{constructor(){super(...arguments),this.position="top"}static{this.properties={config:0,position:1}}static{this.styles=m}render(){let{position:b,config:o}=this;return o?.enabled?e`<div style=${n({backgroundColor:o.bgColor,color:o.fontColor})} class=${s({banner:!0,"banner--bottom":b==="bottom"})}><p class="banner__text">${l(c(o.text))}</p></div>`:null}};i("arcgis-portal-info-banner",t);export{t as ArcgisPortalInfoBanner};
@@ -0,0 +1,4 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ var Y=globalThis,Z=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Et=Symbol(),kt=new WeakMap,M=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==Et)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Z&&t===void 0){let o=e!==void 0&&e.length===1;o&&(t=kt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&kt.set(e,t))}return t}toString(){return this.cssText}},jt=s=>new M(typeof s=="string"?s:s+"",void 0,Et),Ce=(s,...t)=>{let e=s.length===1?s[0]:t.reduce((o,n,r)=>o+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+s[r+1],s[0]);return new M(e,s,Et)},Ht=(s,t)=>{if(Z)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let o=document.createElement("style"),n=Y.litNonce;n!==void 0&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o)}},$t=Z?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(let o of t.cssRules)e+=o.cssText;return jt(e)})(s):s;var{is:we,defineProperty:Oe,getOwnPropertyDescriptor:Te,getOwnPropertyNames:Se,getOwnPropertySymbols:Pe,getPrototypeOf:Ne}=Object,tt=globalThis,Vt=tt.trustedTypes,De=Vt?Vt.emptyScript:"",xe=tt.reactiveElementPolyfillSupport,k=(s,t)=>s,X={toAttribute(s,t){switch(t){case Boolean:s=s?De:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},j=(s,t)=>!we(s,t),zt={attribute:!0,type:String,converter:X,reflect:!1,useDefault:!1,hasChanged:j};Symbol.metadata??=Symbol("metadata"),tt.litPropertyMetadata??=new WeakMap;var A=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=zt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let o=Symbol(),n=this.getPropertyDescriptor(t,o,e);n!==void 0&&Oe(this.prototype,t,n)}}static getPropertyDescriptor(t,e,o){let{get:n,set:r}=Te(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:n,set(i){let a=n?.call(this);r?.call(this,i),this.requestUpdate(t,a,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??zt}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;let t=Ne(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){let e=this.properties,o=[...Se(e),...Pe(e)];for(let n of o)this.createProperty(n,e[n])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[o,n]of e)this.elementProperties.set(o,n)}this._$Eh=new Map;for(let[e,o]of this.elementProperties){let n=this._$Eu(e,o);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let n of o)e.unshift($t(n))}else t!==void 0&&e.push($t(t));return e}static _$Eu(t,e){let o=e.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Ht(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){let o=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,o);if(n!==void 0&&o.reflect===!0){let r=(o.converter?.toAttribute!==void 0?o.converter:X).toAttribute(e,o.type);this._$Em=t,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}_$AK(t,e){let o=this.constructor,n=o._$Eh.get(t);if(n!==void 0&&this._$Em!==n){let r=o.getPropertyOptions(n),i=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:X;this._$Em=n;let a=i.fromAttribute(e,r.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(t,e,o,n=!1,r){if(t!==void 0){let i=this.constructor;if(n===!1&&(r=this[t]),o??=i.getPropertyOptions(t),!((o.hasChanged??j)(r,e)||o.useDefault&&o.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,o))))return;this.C(t,e,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:n,wrapped:r},i){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),r!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),n===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,r]of this._$Ep)this[n]=r;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[n,r]of o){let{wrapped:i}=r,a=this[n];i!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,r,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(e)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[k("elementProperties")]=new Map,A[k("finalized")]=new Map,xe?.({ReactiveElement:A}),(tt.reactiveElementVersions??=[]).push("2.1.2");var At=globalThis,Bt=s=>s,et=At.trustedTypes,Wt=et?et.createPolicy("lit-html",{createHTML:s=>s}):void 0,_t="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,Ct="?"+_,Le=`<${Ct}>`,T=document,V=()=>T.createComment(""),z=s=>s===null||typeof s!="object"&&typeof s!="function",wt=Array.isArray,Jt=s=>wt(s)||typeof s?.[Symbol.iterator]=="function",bt=`[
3
+ \f\r]`,H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Ft=/-->/g,qt=/>/g,w=RegExp(`>|${bt}(?:([^\\s"'>=/]+)(${bt}*=${bt}*(?:[^
4
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),Gt=/'/g,Kt=/"/g,Yt=/^(?:script|style|textarea|title)$/i,Ot=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),ys=Ot(1),gs=Ot(2),vs=Ot(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Qt=new WeakMap,O=T.createTreeWalker(T,129);function Zt(s,t){if(!wt(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Wt!==void 0?Wt.createHTML(t):t}var Xt=(s,t)=>{let e=s.length-1,o=[],n,r=t===2?"<svg>":t===3?"<math>":"",i=H;for(let a=0;a<e;a++){let c=s[a],l,u,h=-1,m=0;for(;m<c.length&&(i.lastIndex=m,u=i.exec(c),u!==null);)m=i.lastIndex,i===H?u[1]==="!--"?i=Ft:u[1]!==void 0?i=qt:u[2]!==void 0?(Yt.test(u[2])&&(n=RegExp("</"+u[2],"g")),i=w):u[3]!==void 0&&(i=w):i===w?u[0]===">"?(i=n??H,h=-1):u[1]===void 0?h=-2:(h=i.lastIndex-u[2].length,l=u[1],i=u[3]===void 0?w:u[3]==='"'?Kt:Gt):i===Kt||i===Gt?i=w:i===Ft||i===qt?i=H:(i=w,n=void 0);let v=i===w&&s[a+1].startsWith("/>")?" ":"";r+=i===H?c+Le:h>=0?(o.push(l),c.slice(0,h)+_t+c.slice(h)+_+v):c+_+(h===-2?a:v)}return[Zt(s,r+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},B=class s{constructor({strings:t,_$litType$:e},o){let n;this.parts=[];let r=0,i=0,a=t.length-1,c=this.parts,[l,u]=Xt(t,e);if(this.el=s.createElement(l,o),O.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=O.nextNode())!==null&&c.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let h of n.getAttributeNames())if(h.endsWith(_t)){let m=u[i++],v=n.getAttribute(h).split(_),C=/([.?@])?(.*)/.exec(m);c.push({type:1,index:r,name:C[2],strings:v,ctor:C[1]==="."?ot:C[1]==="?"?nt:C[1]==="@"?rt:P}),n.removeAttribute(h)}else h.startsWith(_)&&(c.push({type:6,index:r}),n.removeAttribute(h));if(Yt.test(n.tagName)){let h=n.textContent.split(_),m=h.length-1;if(m>0){n.textContent=et?et.emptyScript:"";for(let v=0;v<m;v++)n.append(h[v],V()),O.nextNode(),c.push({type:2,index:++r});n.append(h[m],V())}}}else if(n.nodeType===8)if(n.data===Ct)c.push({type:2,index:r});else{let h=-1;for(;(h=n.data.indexOf(_,h+1))!==-1;)c.push({type:7,index:r}),h+=_.length-1}r++}}static createElement(t,e){let o=T.createElement("template");return o.innerHTML=t,o}};function S(s,t,e=s,o){if(t===f)return t;let n=o!==void 0?e._$Co?.[o]:e._$Cl,r=z(t)?void 0:t._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),r===void 0?n=void 0:(n=new r(s),n._$AT(s,e,o)),o!==void 0?(e._$Co??=[])[o]=n:e._$Cl=n),n!==void 0&&(t=S(s,n._$AS(s,t.values),n,o)),t}var st=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:o}=this._$AD,n=(t?.creationScope??T).importNode(e,!0);O.currentNode=n;let r=O.nextNode(),i=0,a=0,c=o[0];for(;c!==void 0;){if(i===c.index){let l;c.type===2?l=new L(r,r.nextSibling,this,t):c.type===1?l=new c.ctor(r,c.name,c.strings,this,t):c.type===6&&(l=new it(r,this,t)),this._$AV.push(l),c=o[++a]}i!==c?.index&&(r=O.nextNode(),i++)}return O.currentNode=T,n}p(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},L=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,n){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),z(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Jt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&z(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:o}=t,n=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=B.createElement(Zt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===n)this._$AH.p(e);else{let r=new st(n,this),i=r.u(this.options);r.p(e),this.T(i),this._$AH=r}}_$AC(t){let e=Qt.get(t.strings);return e===void 0&&Qt.set(t.strings,e=new B(t)),e}k(t){wt(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,n=0;for(let r of t)n===e.length?e.push(o=new s(this.O(V()),this.O(V()),this,this.options)):o=e[n],o._$AI(r),n++;n<e.length&&(this._$AR(o&&o._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let o=Bt(t).nextSibling;Bt(t).remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,n,r){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=d}_$AI(t,e=this,o,n){let r=this.strings,i=!1;if(r===void 0)t=S(this,t,e,0),i=!z(t)||t!==this._$AH&&t!==f,i&&(this._$AH=t);else{let a=t,c,l;for(t=r[0],c=0;c<r.length-1;c++)l=S(this,a[o+c],e,c),l===f&&(l=this._$AH[c]),i||=!z(l)||l!==this._$AH[c],l===d?t=d:t!==d&&(t+=(l??"")+r[c+1]),this._$AH[c]=l}i&&!n&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ot=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},nt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},rt=class extends P{constructor(t,e,o,n,r){super(t,e,o,n,r),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??d)===f)return;let o=this._$AH,n=t===d&&o!==d||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==d&&(o===d||n);n&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},it=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}},te={M:_t,P:_,A:Ct,C:1,L:Xt,R:st,D:Jt,V:S,I:L,H:P,N:nt,U:rt,B:ot,F:it},Ue=At.litHtmlPolyfillSupport;Ue?.(B,L),(At.litHtmlVersions??=[]).push("3.3.2");var at=(s,t,e)=>{let o=e?.renderBefore??t,n=o._$litPart$;if(n===void 0){let r=e?.renderBefore??null;o._$litPart$=n=new L(t.insertBefore(V(),r),r,void 0,e??{})}return n._$AI(s),n};var Tt=globalThis,E=class extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=at(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};E._$litElement$=!0,E.finalized=!0,Tt.litElementHydrateSupport?.({LitElement:E});var Re=Tt.litElementPolyfillSupport;Re?.({LitElement:E});(Tt.litElementVersions??=[]).push("4.2.2");var ee=new Set,se;var oe=s=>typeof s=="string"?s:"el"in s?s.el.localName:"localName"in s?s.localName:s.declaredClass,Ds=(s,t,e,o)=>{let n=oe(t);if(o?.once){let i=`${s}${n}${e}`;if(ee.has(i))return;ee.add(i)}let r;if(o?.detail){r={};for(let[i,a]of Object.entries(o.detail))if((typeof a=="object"||typeof a=="function")&&a!==null){let c=new WeakRef(a);Object.defineProperty(r,i,{enumerable:!0,get(){return c.deref()}})}else r[i]=a;se?.log.interceptors?.forEach(i=>i(s,n,e,r)),console[s](`[${n}]: ${e}`,r)}else se?.log.interceptors?.forEach(i=>i(s,n,e)),console[s](`[${n}]: ${e}`)},ne=s=>{let t=`[${oe(s)}] `;return e=>{let o=e instanceof Error&&e.message?e:new Error(String(e));o.message=`${t}${o.message}`,setTimeout(()=>{throw e})}},xs=s=>`The property \`${s.toString()}\` is required but missing.`,Ls=s=>`The property \`${s.toString()}\` is empty but must have at least one element.`;var p=(s,t,...e)=>{try{return s?.call(t,...e)}catch(o){console.error(o,s)}},W=async(s,t,...e)=>{try{return await s?.call(t,...e)}catch(o){console.error(o,s)}};var q=Symbol.for("controller"),Ie=s=>typeof s=="object"&&s!==null&&(q in s||"hostConnected"in s||"hostDisconnected"in s||"hostUpdate"in s||"hostUpdated"in s),Is=s=>typeof s?.then=="function";var F,D=s=>{F!==s&&(F=s,queueMicrotask(()=>F===s?F=void 0:0))},G=s=>F,N=[],lt=s=>{if(s===void 0){N=[];return}let t=N.indexOf(s);N=t===-1?[...N,s]:N.slice(0,t+1),queueMicrotask(()=>N=[])},re=()=>N,U,Ms=s=>{U!==s&&(U=s,queueMicrotask(()=>U===s?U=void 0:0))},Me=()=>{let s=U;return U=void 0,s},ie=async(s,t)=>{let e=ht(s);if(e===void 0)return s;if(await e.ready,typeof t=="function"){let o=e.watchExports(n=>t(n,o))}return e.exports},ae=async s=>{let t=ht(s);return await t.ready,t},ht=s=>{let e=G().manager.X(s);if(e!==void 0)return e;if(Ie(s))return s;let o=Me();if(o!==void 0)return o},ct=!1,ks=s=>{ct=!0;try{return s()}finally{ct=!1}};var b=class{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}};var ce=(s,t)=>{let e=t>ke?je:t/He,o=0,n=setInterval(()=>{o+=e,o>=t&&(clearInterval(n),s())},e);return n},ke=4e3,je=2e3,He=4;var Ve=(s,t,e)=>{let o=Object.keys(s),n=o.length;R===void 0&&queueMicrotask(I),R??=new Map;let r=R.get(s);return r===void 0&&(r={callbacks:[],keyCount:n},R.set(s,r)),r.keyCount!==n&&(r.callbacks.forEach(i=>i(o)),r.callbacks=[],r.keyCount=n),r.callbacks.push(i=>{let a=l=>p(t,null,l),c=i[n];c===void 0?a(void 0):s[c]===e?a(c):a(void 0)}),e},R,I=()=>{R?.forEach(({callbacks:s},t)=>{let e=Object.keys(t);s.forEach(o=>o(e))}),R=void 0},ze=(s,t,e)=>{let o=s.manager;return o.V!==d&&o.V!==e&&o.S(void 0,void 0),o.T.length===0&&queueMicrotask(()=>o.S(void 0,void 0)),o.V=e,o.T.push((n,r)=>p(t,void 0,e===r?n:void 0)),e},Be=(s=[G(),...re()],t,e)=>{let o=Array.isArray(s)?s:[s],n=o.length+1,r=i=>{n-=1,i!==void 0&&(n=Math.min(n,0)),n===0&&t(i)};o.forEach(i=>Ve(i,a=>r(a===void 0?void 0:{key:a,host:i,isReactive:!1}),e));for(let i of o)if("manager"in i&&i.manager.component===i){ze(i,a=>r(a===void 0?void 0:{key:a,host:i,isReactive:!0}),e);break}return e},We=(s="",t={},e=G())=>{let o={emit:n=>{s===""&&I();let r=new CustomEvent(s,{detail:n,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(r),r}};return s===""&&Be(void 0,n=>s=n.key,o),o},Fe=We.bind(null,""),de;de=q;var St=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#n=[],this.#r=[],this.#c=[],this.#l=[],this.#d=[],this.#i=[],this.#p=!1,this.P=new b,this.connectedCalled=!1,this.loadedCalled=!1,this[de]=!0,this.#h=[];let e=this,o=t??G(new.target.name);e.#o=o,e.ready=e.P.promise,e.#a=he(e),e.component=o,e.#o.addController(e),e.#o.manager===void 0||(lt(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#n;#r;#c;#l;#d;#i;#p;#o;catchUpLifecycle(){let{manager:t}=this.#o;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#p&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(ne(this.#o))}#a;get exports(){return this.#a}set exports(t){let e=this.#a;e!==t&&(this.#a=t,this.#h.forEach(p),this.connectedCalled&&this.O!==!1&&this.#o.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#a=e?he(t):t,this.#h.forEach(p)}#h;watchExports(t){let e=()=>t(this.#a);return this.#h.push(e),()=>{this.#h.splice(this.#h.indexOf(e),1)}}get use(){return D(this.#o),ie}get useRef(){return D(this.#o),ae}get useRefSync(){return D(this.#o),ht}controllerRemoved(){this.#o.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#n.push(t)}onUpdate(t){this.#r.push(t)}onUpdated(t){this.#c.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#d.push(t),this.connectedCalled&&this.#o.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#i.forEach(p),t.#i=[]}async triggerLoad(){if(this.#p)return;this.#p=!0;let t=this;t.hostLoad&&await W(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(W)),this.P.resolve(this.#a)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#n.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#r.forEach(le,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#c.forEach(le,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#l.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#d.forEach(this.#u,this)}#u(t){D(this.#o);let e=p(t);(Array.isArray(e)?e:[e]).forEach(n=>{typeof n=="function"?this.#i.push(n):typeof n=="object"&&typeof n.remove=="function"&&this.#i.push(n.remove)})}};function le(s){p(s,void 0,this)}var he=s=>{if(typeof s!="object"&&typeof s!="function"||s===null)return s;let t={get(o,n,r){if(!((n==="exports"||n==="_exports")&&n in o&&o[n]===e)&&(n in o||n in Promise.prototype||typeof n=="symbol"))return typeof o=="function"?o[n]:Reflect.get(o,n,r)}},e=new Proxy(s,t);return e};var pe=St;var y={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},$=s=>(...t)=>({_$litDirective$:s,values:t}),g=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var{I:qe}=te,ue=s=>s;var dt=s=>s.strings===void 0,fe=()=>document.createComment(""),Js=(s,t,e)=>{let o=s._$AA.parentNode,n=t===void 0?s._$AB:t._$AA;if(e===void 0){let r=o.insertBefore(fe(),n),i=o.insertBefore(fe(),n);e=new qe(r,i,s,s.options)}else{let r=e._$AB.nextSibling,i=e._$AM,a=i!==s;if(a){let c;e._$AQ?.(s),e._$AM=s,e._$AP!==void 0&&(c=s._$AU)!==i._$AU&&e._$AP(c)}if(r!==n||a){let c=e._$AA;for(;c!==r;){let l=ue(c).nextSibling;ue(o).insertBefore(c,n),c=l}}}return e},Ys=(s,t,e=s)=>(s._$AI(t,e),s),Ge={},me=(s,t=Ge)=>s._$AH=t,Zs=s=>s._$AH,Xs=s=>{s._$AR(),s._$AA.remove()};var Ke=$(class extends g{constructor(s){if(super(s),s.type!==y.PROPERTY&&s.type!==y.ATTRIBUTE&&s.type!==y.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!dt(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[t]){if(t===f||t===d)return t;let e=s.element,o=s.name;if(s.type===y.PROPERTY){if(t===e[o])return f}else if(s.type===y.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(o))return f}else if(s.type===y.ATTRIBUTE&&e.getAttribute(o)===t+"")return f;return me(s),t}});var K=(s,t)=>{let e=s._$AN;if(e===void 0)return!1;for(let o of e)o._$AO?.(t,!1),K(o,t);return!0},pt=s=>{let t,e;do{if((t=s._$AM)===void 0)break;e=t._$AN,e.delete(s),s=t}while(e?.size===0)},ye=s=>{for(let t;t=s._$AM;s=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(s))break;e.add(s),Ye(t)}};function Qe(s){this._$AN!==void 0?(pt(this),this._$AM=s,ye(this)):this._$AM=s}function Je(s,t=!1,e=0){let o=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(t)if(Array.isArray(o))for(let r=e;r<o.length;r++)K(o[r],!1),pt(o[r]);else o!=null&&(K(o,!1),pt(o));else K(this,s)}var Ye=s=>{s.type==y.CHILD&&(s._$AP??=Je,s._$AQ??=Qe)},ut=class extends g{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,o){super._$AT(t,e,o),ye(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(K(this,t),pt(this))}setValue(t){if(dt(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var yo=()=>new Nt,Nt=class{},Pt=new WeakMap,Dt=$(class extends ut{render(s){return d}update(s,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=s.options?.host,this.rt(this.ct=s.element)),d}rt(s){if(this.isConnected||(s=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=Pt.get(t);e===void 0&&(e=new WeakMap,Pt.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){return typeof this.G=="function"?Pt.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var ft=s=>s.replace(Xe,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),Xe=/[A-Z]+(?![a-z])|[A-Z]/gu;var ts="randomUUID"in crypto,Po=()=>{if(ts)return crypto.randomUUID();let s=crypto.getRandomValues(new Uint16Array(8));s[3]=s[3]&4095|16384,s[4]=s[4]&16383|32768;let t=e=>s[e].toString(16).padStart(4,"0");return`${t(0)+t(1)}-${t(2)}-${t(3)}-${t(4)}-${t(5)}${t(6)}${t(7)}`};var Lt=s=>{let t=s;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(s),(e.I??e._postLoad).promise}return!1},Ut={};function Rt(){}function It(s){for(let t of["Associated","Disabled","Reset","StateRestore"]){let e=`orm${t}Callback`;s.prototype["f"+e]=async function(...o){await this.componentOnReady(),(this.el??this).dispatchEvent(new CustomEvent(`luminaF${e}`,{detail:o}))}}}var es=(s,t)=>function(o,n){if(!globalThis.customElements)return;let i=(n??o??{}).resourcesUrl;i&&s.setAssetPath(i);for(let[a,[c,l="",u=0]]of Object.entries(t)){if(customElements.get(a))continue;let[h,m,v]=l.split(";"),C=h?h?.split(",").map(ss):void 0,vt=C?.map(([x])=>x),J=class extends xt{static{this.formAssociated=u===1}static{this.observedAttributes=C?.map(([,x])=>x).filter(x=>x!=="")}static{this.C=vt}static{this.E=m?m?.split(","):void 0}static{this.D=v?.split(",")}static{this.L=a}static{this.K=s}constructor(){!J.B&&(J.B=c(),J.F()),super()}};customElements.define(a,J)}},mt=Object.defineProperty,ss=s=>{let t=s.split(":");return t.length===1?[t[0],ft(t[0])]:t},os=globalThis.HTMLElement??Rt,xt=class extends os{constructor(){super(),this.#e={},this.#s=[],this.I=new b,this.H=new b,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(o=>{Object.hasOwn(t,o)&&(t.#e[o]=t[o],delete t[o])}),e.A?t.#n({a:e.A}):e.B.then(async o=>{await e.K.p,t.#n(await(o.default?.then(n=>typeof n=="function"?{a:n}:n)??o))}).catch(o=>{t.H.reject(o),setTimeout(()=>{throw o})})}static{this.lumina=!0}static F(){for(let t of this.C??[])mt(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])mt(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])mt(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}static{It(this)}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,o){this.#t?.attributeChangedCallback(t,e,o),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=Lt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#n(t){let e=this.constructor,o=e.L,n=this.#e,r=Object.values(t).find(h=>h.L===o),i=`${o}--lazy`,a=r;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);rs(a),!e.A&&(e.A=r,customElements.define(i,r)),r.N=this;let l=document.createElement(i);r.N=void 0,this.#t=l,this.#e=l,this.#s.forEach(h=>l.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(n).forEach(ns,l);let u=this.isConnected;(u||this.G)&&(l.connectedCallback?.(),u||l.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function ns([s,t]){this[s]=t}var rs=s=>{let t=s.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(n,r){e.setAttribute.call(this.el,n,r)},t.removeAttribute=function(n){e.removeAttribute.call(this.el,n)},t.hasAttribute=function(n){return e.hasAttribute.call(this.el,n)},mt(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var yt=class extends pe{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=gt in t&&typeof t.destroy=="function",E.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${gt} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),I();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),lt(void 0),D(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>{this.#e.destroy()};this.#t=ce(t,is)}}S(t,e){let o=this.T;this.V=d,this.T=[],o.forEach(n=>n(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},is=1e3,gt="autoDestroyDisabled";var ve=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="class"||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(let o in t)t[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(t)}let e=s.element.classList;for(let o of this.st)o in t||(e.remove(o),this.st.delete(o));for(let o in t){let n=!!t[o];n===this.st.has(o)||this.nt?.has(o)||(n?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return f}});var Ee="important",as=" !"+Ee,$e=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="style"||s.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce((t,e)=>{let o=s[e];return o==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(s,[t]){let{style:e}=s.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let o of this.ft)t[o]==null&&(this.ft.delete(o),o.includes("-")?e.removeProperty(o):e[o]=null);for(let o in t){let n=t[o];if(n!=null){this.ft.add(o);let r=typeof n=="string"&&n.endsWith(as);o.includes("-")||r?e.setProperty(o,r?n.slice(0,-11):n,r?Ee:""):e[o]=n}}return f}});var be=class s extends E{constructor(){super(),this.M=[],this.manager=new yt(this);let t=this,e=t.constructor,o=e.N,n=e.K.o,r=s.prototype.shouldUpdate;t.#n=o?.H??new b,t.I=o?.I??new b,t.J=o?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=o??t,t.#s=t.enableUpdating,t.enableUpdating=Rt,t.shouldUpdate!==r&&(t.#e=t.shouldUpdate,t.shouldUpdate=r),n&&(t.#t=new Map,e.elementProperties.forEach((i,a)=>t.#t.set(a,n()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),o=this.shadowRootOptions===Ut;return this.K?.commonStyles===void 0||o?e:[this.K.commonStyles,...e]}static createProperty(t,e){let o=typeof e=="number"?e:Array.isArray(e)?e[0]:0,n=Array.isArray(e)?e[1]:void 0,r=n?.hasChanged??j,i={attribute:o&1&&typeof t=="string"?ft(t):!1,reflect:!!(o&2),type:o&4?Boolean:o&8?Number:void 0,state:!!(o&16),readOnly:!!(o&32),noAccessor:!!(o&64),useDefault:!!(o&128),c:!1,...n,hasChanged(a,c){let l=r(a,c);return i.c=l,l}};super.createProperty(t,i)}static getPropertyDescriptor(t,e,o){let n=this.K,r=super.getPropertyDescriptor(t,e,o);return o.d=r,{...r,get(){return n.t?.(this.#t.get(t)),r.get?.call(this)},set(i){let a=this.manager;if(o.readOnly&&!ct&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${i}"`);r.set.call(this,i??void 0),o.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(I(),a?.S(t,i))}}}static{this.lumina=!0}static{It(this)}#t;#e;#s;#n;#r;#c;get elementInternals(){return this.#c??=this.el.attachInternals(),this.#c}connectedCallback(){this.hasAttribute("defer-hydration")||this.#l(!0)}#l(t){let e=this.constructor.K.c?.(()=>this.requestUpdate());this.#r=e;let o=!this.manager.connectedCalled;t&&super.connectedCallback(),o?queueMicrotask(()=>this.#i().catch(n=>{this.#n.reject(n),setTimeout(()=>{throw n})})):e&&this.requestUpdate()}#d(t){try{this.#r.clear(),this.constructor.K.r(this.#r,()=>super.update(t))}catch(e){throw this.#r.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#r?.destroy(),this.#r=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,o=e.shadowRootOptions,r=t??(o===Ut?this.el:this.el.attachShadow(o));if(t)return this.manager.connectedCalled||this.#l(!1),E.prototype.createRenderRoot.call(this),t;if(this.isConnected){let i=r.getRootNode();i.adoptedStyleSheets=[...i.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return r}async#i(){let t=this.el.G??Lt(this.el);t&&await t;let e=[];for(let n of this.M)"triggerLoad"in n?e.push(n.triggerLoad()):e.push(W(n.hostLoad,n));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(n=>n.has(gt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await 0;let o=this.J.filter(n=>!n.manager?.loadedCalled);o.length&&await Promise.allSettled(o.map(async n=>await n.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let n of this.M)"triggerLoaded"in n?n.triggerLoaded():p(n.hostLoaded,n);this.loaded?.(),this.#n.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#r?this.#d(t):super.update(t)}listen(t,e,o){let n=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,n,o),()=>this.el.removeEventListener(t,n,o)))}listenOn(t,e,o,n){let r=o?.bind(this)??o;this.manager.onLifecycle(()=>(t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)))}async componentOnReady(){return await this.#n.promise,this}addController(t){this.M.push(t),!(q in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var _e=s=>{let t,e=n=>{t=new URL(n,globalThis.location?.href||void 0).href},o={...s,getAssetPath(n){let r=new URL(n,t);return r.origin!==globalThis.location?.origin?r.href:r.pathname},setAssetPath:e,customElement(n,r){r.K=o,r.L=n,customElements.get(n)||customElements.define(n,r)}};return e(s.defaultAssetPath),o};var Ln=s=>typeof s=="object"&&s!=null?ve(s):s,Un=s=>typeof s=="object"&&s!=null?$e(s):s;var Mt=class extends g{#t;#e;constructor(t){super(t);let e=this;this.#e=function(n){return e.#t.call(this,n)}}render(t){return typeof t=="function"?(this.#t=t,Dt(this.#e)):Dt(t)}},Rn=$(Mt);var In=d;var Mn=s=>{let t=document.createElement("div");return at(s,t),t.firstElementChild};var Q=_e({defaultAssetPath:"https://jsdev.arcgis.com/5.2.0-next/portal-components/",hydratedAttribute:"hydrated"}),{customElement:zn,getAssetPath:Bn,setAssetPath:Wn}=Q;Q.t=void 0;Q.o=void 0;Q.c=void 0;Q.r=void 0;export{Is as a,D as b,G as c,lt as d,re as e,Ms as f,ks as g,Ce as h,j as i,ys as j,gs as k,f as l,d as m,at as n,b as o,Ds as p,ne as q,xs as r,Ls as s,ze as t,Be as u,We as v,Fe as w,St as x,pe as y,Po as z,es as A,y as B,$ as C,g as D,Js as E,Ys as F,me as G,Zs as H,Xs as I,Ke as J,yo as K,Dt as L,be as M,Ln as N,Un as O,In as P,Mn as Q,Q as R,zn as S,Bn as T};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import c from"./QUOPWSRC.js";import b from"./TJYPEMON.js";import"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import{a as f}from"./OJGDXUKZ.js";import"./HHO6EQZB.js";import"./ISJALOUO.js";import{M as d,N as h,P as p,S as g,T as y,h as m,j as a}from"./UXZTO272.js";import"./UZLQALHY.js";export default $arcgis.t(([,{b:x}])=>{var $=m`:host{display:inline-flex;align-items:center}:host([scale="s"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--2);--arcgis-portal-item-type-spacing: 1rem}:host([scale="m"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size--1);--arcgis-portal-item-type-spacing: 1rem}:host([scale="l"]){--arcgis-portal-item-type-font-size: var(--calcite-font-size-0);--arcgis-portal-item-type-spacing: 1rem}.icon{display:block;flex-grow:0;flex-shrink:0;width:var(--arcgis-portal-item-type-spacing);height:var(--arcgis-portal-item-type-spacing)}.text{color:var(--calcite-text-color-2);font-size:var(--arcgis-portal-item-type-font-size);line-height:1.25rem}.text--ellipsis{text-overflow:ellipsis;overflow:hidden;white-space:nowrap}.text--spaced{margin-inline-start:calc(var(--arcgis-portal-item-type-spacing) / 2);word-wrap:break-word;word-break:break-word}`,n=class extends d{constructor(){super(...arguments),this.messages=f({blocking:!0}),this.icon=null,this.displayName="",this.displayNameHosted="",this.scale="s"}static{this.properties={icon:16,displayName:16,displayNameHosted:16,item:0,serviceInfo:0,portal:0,user:0,scale:3,hideText:5,hideIcon:5,ellipsis:5,showHosted:5}}static{this.styles=$}async load(){this.item&&await this.getItemDisplayInformation()}async getItemDisplayInformation(){let{messages:o,user:r,serviceInfo:l,portal:e,item:t}=this,{displayName:i,displayNameHosted:c,icon:s}=await x({item:t,messages:o,serviceInfo:l,user:r,portal:e||t.portal});this.displayName=i,this.displayNameHosted=c,this.icon=s}render(){let{showHosted:o,displayNameHosted:r,scale:l,icon:e,hideText:t,hideIcon:i,ellipsis:c}=this;if(!e)return null;let s=o?r:this.displayName,v=s?.includes("(")?"":"&#x202D;",w=y(`./assets/portal-item-type/icons/${e}16.svg`),u=this.hideText?s:void 0;return a`${!i&&a`<span class="icon"><img src=${w??p} alt=${(u||"")??p} class=${`icon icon--${l}`}></span>`||""}${!t&&a`<span class=${h({text:!0,"text--spaced":!i,"text--ellipsis":c})} .innerHTML=${`${v}${s}`}></span>`||""}`}};g("arcgis-portal-item-type",n);return n},b,c)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{b as S}from"./5EFYJYWM.js";import e from"./TJYPEMON.js";import c from"./E37TWXOS.js";import"./CFBSBZSS.js";import a from"./OUFIJDIW.js";import"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import{a as $}from"./OJGDXUKZ.js";import"./HHO6EQZB.js";import"./ISJALOUO.js";import{M as k,P as b,S as w,h as D,j as d,w as g}from"./UXZTO272.js";import"./UZLQALHY.js";export default $arcgis.t(([x,_,{substitute:C},{b:y},,{b:u}])=>{async function F(s,e,t=!1){try{let i=new Map;for(let n of s){let{id:a,owner:l}=n,c=i.get(l)??[];c.push(a),i.set(l,c)}let r=[];for(let[n,a]of i){let l=`${e.restUrl}/content/users/${encodeURIComponent(n)}/deleteItems`;for(let c of S(a,100)){let o=x(l,{method:"post",query:{f:"json",items:c.join(","),permanentDelete:t}});r.push(o.then(({data:m})=>m))}}return{result:(await Promise.all(r)).flatMap(({results:n})=>n)}}catch{return{error:{code:"unhandledError"}}}}async function B(s){let{item:e,portal:t,permanentlyDelete:i}=s,{id:r,owner:n}=e;if(!r||!n)return{error:{code:"unhandledError"}};let a=t.recycleBinEnabled&&!i?"/canRecycle":"/canDelete",l=`${t.restUrl}/content/users/${encodeURIComponent(n)}/items/${r}${a}`;try{return{result:(await x(l,{query:{f:"json"}})).data}}catch(c){let o=c.details?.raw;switch(o?.messageCode){case"CONT_00481":case"CONT_00483":case"CONT_00484":return{error:{code:"itemHasDependentItems"}};case"CONT_0048":return{error:{code:"itemDeleteProtected"}};default:return{error:{code:"unhandledError",message:o?.message}}}}}function R(s,e){return(s.relatedItems??[]).map(t=>U(t,e))}function U(s,e){return s instanceof _?s:new _({...s,portal:e})}async function p({itemId:s,portal:e,relationship:t,includeRecycleBin:i,nextkey:r}){let{relationshipType:n,direction:a}=t,l=`${e.restUrl}/content/items/${s}/relatedItems`;try{let c=await y({url:l,portal:e,params:{includeRecycleBin:i,f:"json",relationshipType:n?Array.isArray(n)?n.join(","):n:void 0,direction:a,nextkey:r}});return{success:!0,result:{...c,relatedItems:R(c,e)}}}catch(c){return{success:!1,error:c}}}async function P({itemId:s,portal:e,relationship:t,includeRecycleBin:i,num:r,nextkey:n}){let{relationshipRules:a,direction:l}=t,c=`${e.restUrl}/content/items/${s}/relatedItems`;try{let o=await y({url:c,portal:e,params:{includeRecycleBin:i,f:"json",...a?.length?{relationshipRules:a.join(",")}:{},includeSystemManaged:"true",excludedFlags:"legacy,exclude",num:r,direction:l,nextkey:n}});return{success:!0,result:{...o,relatedItems:R(o,e)}}}catch(o){return{success:!1,error:o}}}async function M(s,e){let{id:t,type:i,typeKeywords:r=[]}=s;if(!t)return null;let n=["Scene Service","Map Service","WFS","OGCFeatureServer","Vector Tile Service","3DTiles Service"].includes(i),a=["Map Service","Vector Tile Service"].includes(i),l=o=>o?.typeKeywords?.includes("View Service")??!1,c=()=>n?[{relationshipType:["Service2Service"],direction:"reverse"},{relationshipType:["Service2Data"],direction:"forward"}]:r.includes("Bulk Published Service")?{relationshipType:["DataStore2BPService"],direction:"reverse"}:i==="Geoprocessing Service"&&r.includes("Notebook Web Tool")?{relationshipType:["Notebook2WebTool"],direction:"reverse"}:r.includes("Route Layer")?{relationshipType:["Service2Route"],direction:"reverse"}:i==="Mobile Application"?{relationshipType:["MobileApp2Code"],direction:"reverse"}:i==="Map Package"?{relationshipType:["Area2Package"],direction:"reverse"}:i==="Feature Service"?{relationshipType:["Service2Layer"],direction:"reverse"}:r.includes("Document")?{relationshipType:["Item2Attachment"],direction:"reverse"}:i==="Application Configuration"?{relationshipType:["Map2AppConfig"],direction:"reverse"}:{relationshipType:["Service2Data"],direction:"forward"};try{let o=c();if(!o)return null;if(!Array.isArray(o))return{sourceData:(await p({itemId:t,portal:e,relationship:o})).result?.relatedItems?.[0]??null,relationship:o};if(n){let m={relationshipType:["Service2Service"],direction:"reverse"},v=await p({itemId:t,portal:e,relationship:m}),h=v.result?.total?v.result.relatedItems.shift()??null:null;if(a&&!l(h)||!h){m={relationshipType:["Service2Data"],direction:"forward"};let f=await p({itemId:t,portal:e,relationship:m});return{sourceData:f.result?.total?f.result.relatedItems.shift()??h:h,relationship:m}}return{sourceData:h,relationship:m}}return null}catch(o){return console.error(o),{sourceData:null,relationship:{direction:"forward"}}}}async function A(s,e){let{id:t,type:i,typeKeywords:r=[]}=s;try{let n=i==="Notebook"?{relationshipType:["Notebook2WebTool"],direction:"forward"}:r.includes("Has Related Route Layers")?{relationshipType:["Service2Route"],direction:"forward"}:r.includes("Hosted Service")||i==="Feature Service"?{relationshipType:["Service2Service"],direction:i==="Feed"?"reverse":"forward"}:i==="Data Store"||r.includes("ArcGIS Server")?{relationshipType:["DataStore2BPService"],direction:"forward"}:{relationshipType:["Service2Data"],direction:"reverse"},a=await p({itemId:t,portal:e,relationship:n});return{resultData:{items:a.result?.total?a.result.relatedItems:null,count:a.result?.total??0},relationship:n}}catch(n){return console.error(n),{resultData:{items:null,count:0},relationship:{direction:"forward"}}}}async function L(s,e){let{id:t}=s;try{return(await p({itemId:t,portal:e,relationship:{relationshipType:["ReplacementItem2Item"],direction:"forward"}})).result?.relatedItems??[]}catch(i){return console.error(i),[]}}async function N(s,e){let t=await P({itemId:s.id,portal:e,relationship:{direction:"forward"}}),i=await M(s,e),r=await A(s,e),n=await L(s,e),a={usedByItems:t.result?.relatedItems??[],sourceData:i?.sourceData??null,resultData:r.resultData.items,replacementItemFor:n.length?n:null},{result:l,error:c}=await B({item:s,portal:e,permanentlyDelete:!1});if(c)switch(c.code){case"itemHasDependentItems":return{item:s,...a,kind:"cannotDelete",reason:"hasDependentItems"};case"itemDeleteProtected":return{item:s,...a,kind:"cannotDelete",reason:"deleteProtected"};default:return{item:s,...a,kind:"cannotDelete",reason:"uncaught"}}if(!l?.success){let{result:o}=await B({item:s,portal:e,permanentlyDelete:!0});return o?.success?{item:s,...a,kind:"permanentlyDelete",reason:"notSupported"}:{item:s,...a,kind:"cannotDelete",reason:"uncaught"}}return{item:s,...a,kind:"recycle"}}var E=D`:host{display:block}calcite-dialog{--calcite-dialog-content-space: 0;--calcite-dialog-background-color: var(--calcite-color-background)}calcite-panel{display:flex;flex-direction:column;gap:.75rem;>*{margin-inline:.75rem}}.panel__content{width:100%;box-sizing:border-box}.bucket__content{display:flex;align-items:flex-start;gap:.75rem;width:100%}.bucket__icon{flex-shrink:0}.bucket__details{display:flex;flex:1 1 auto;flex-direction:column;min-width:0}.bucket__header{font-weight:500}.bucket__label{margin-inline-end:.25rem}.bucket__description{line-height:1.35;font-size:var(--calcite-font-size--1)}.bucket__link{display:flex;align-items:center;min-height:1.5rem}.panel__checkbox{width:100%;padding-block:.75rem;padding-inline-start:.75rem;background-color:var(--calcite-color-foreground-1)}.panel__related-items{margin-top:1rem;border:1px solid var(--calcite-color-border-2)}.panel__related-items-icon{color:var(--calcite-color-status-warning)}.panel__related-items-notice{padding-bottom:.75rem}arcgis-portal-review-related-items{margin-bottom:.75rem}.discouraged-items-warning{margin-bottom:.75rem}`;function j({recycleItems:s,cannotDeleteItems:e,permanentlyDeleteItems:t}){return[...s,...e,...t]}function H(s){return s.map(({item:e,sourceData:t,resultData:i,replacementItemFor:r})=>({item:e,sourceData:t,resultData:i,replacementItemFor:r}))}function O(s,e,t){return!e&&!!t?.length&&!u(s)}function q({selectedItems:s}){let e=[];return e.push(...s.flatMap(({item:t,sourceData:i,resultData:r,replacementItemFor:n})=>{let a=O(t,i,r),l=!!(r?.some(c=>!c.inRecycleBin)&&!z(t,r)&&!W(t,r));return a&&l?[{item:t,reason:"dependent",offendingItems:r??void 0}]:n&&n?.length>0?[{item:t,reason:"replacement",offendingItems:n}]:[]})),e}function z(s,e){let t=e[0];return s.type==="Feed"&&u(s)&&e.length===1&&t?.type==="Feature Service"&&u(t)}function W(s,e){let t=e[0];return s.type==="Feature Service"&&u(s)&&e.length===1&&t?.type==="Feed"&&u(t)}function G(s,e,t,i){let r=["id","ja","ko","th","vi","zh-cn","zh-hk","zh-tw"],n=["en","ca","da","de","el","es","et","fi","hi","hu","it","nb","nl","pt-pt","sv","tr"],a=s??"en",l=e.unknown;return(t===1||r.includes(a))&&(l=e.single),t!==1&&n.includes(a)&&(l=e.multiple),C(l,{...i,number:t})}function T({id:s,linkText:e,label:t,placement:i,relatedItems:r,portal:n,user:a}){return d`<calcite-link id=${s??b}>${e}</calcite-link><calcite-popover .label=${t} .referenceElement=${s} .placement=${i}><arcgis-portal-review-related-items .relatedItems=${r} .portal=${n} .user=${a}></arcgis-portal-review-related-items></calcite-popover>`}var I=class extends k{constructor(){super(...arguments),this.deleteStatusRequestId=0,this.messages=$({blocking:!0}),this.isLoading=!0,this.hasReviewedImpactedItems=!1,this.cannotDeleteItems=[],this.recycleItems=[],this.permanentlyDeleteItems=[],this.reviewingDirectlyUsedByItems=!1,this.markedForDeprecation=[],this.active=!0,this.items=[],this.user=null,this.disableLinks=!1,this.arcgisCancel=g(),this.arcgisConfirm=g(),this.arcgisError=g()}static{this.properties={isLoading:16,hasReviewedImpactedItems:16,cannotDeleteItems:16,recycleItems:16,permanentlyDeleteItems:16,reviewingDirectlyUsedByItems:16,markedForDeprecation:16,active:5,items:0,portal:0,user:0,disableLinks:5}}static{this.styles=E}willUpdate(e){let t=e.has("items")||e.has("portal")||e.has("user")||e.has("active");this.active&&t&&(this.user??=this.portal?.user||null,this.resetState(),this.determineDeleteStatus(++this.deleteStatusRequestId))}async handleDelete(){let{result:e=[]}=await F(this.recycleItems.map(({item:t})=>t),{restUrl:this.portal.restUrl});this.active=!1,this.arcgisConfirm.emit({deletedItems:e,permanentlyDeletedItems:null,deletedItemsCount:e?.length??0,permanentlyDeletedItemsCount:0})}handleDialogClose(){this.active&&this.arcgisCancel.emit(),this.active=!1,this.resetState()}resetState(){this.isLoading=!0,this.hasReviewedImpactedItems=!1,this.cannotDeleteItems=[],this.recycleItems=[],this.permanentlyDeleteItems=[],this.reviewingDirectlyUsedByItems=!1,this.markedForDeprecation=[],++this.deleteStatusRequestId}async determineDeleteStatus(e){let t=await Promise.all(this.items.map(async i=>await N(i,this.portal)));e===this.deleteStatusRequestId&&(this.cannotDeleteItems=t.filter(i=>i.kind==="cannotDelete"),this.recycleItems=t.filter(i=>i.kind==="recycle"),this.permanentlyDeleteItems=t.filter(i=>i.kind==="permanentlyDelete"),this.isLoading=!1)}get recyclableItemsHaveImpactedItems(){return this.recycleItems.some(({usedByItems:e})=>e.length>0)}get itemsNeedReview(){return this.recycleItems.some(({usedByItems:e})=>e.length>0)}get deleteButtonEnabled(){return!this.isLoading&&(!this.itemsNeedReview||this.hasReviewedImpactedItems)}get deleteMode(){return this.markedForDeprecation.length>0?"deprecate":this.permanentlyDeleteItems.length>0?"permanentlyDelete":this.recycleItems.length>0&&this.cannotDeleteItems.length>0?"mixed":this.recycleItems.length>0?"delete":(this.cannotDeleteItems.length>0,"none")}getHeaderText(){return this.items.length===1?this.messages.deleteItem:this.messages.deleteItems}renderBucket({icon:e,label:t,description:i,link:r,bucket:n}){return d`<calcite-block scale=l expanded><div class="bucket__content"><calcite-icon class="bucket__icon" scale=l .icon=${e}></calcite-icon><div class="bucket__details"><div class="bucket__header"><span class="bucket__label">${t}</span><span>${this.renderBucketItems(n)}</span></div><span class="bucket__description">${i}</span>${r&&d`<div class="bucket__link"><calcite-link .href=${r.href} target=_blank icon-start=launch>${r.text??this.messages.moreInfo}</calcite-link></div>`||""}</div></div></calcite-block>`}renderBucketItems(e=[]){if(e.length===0)return null;if(e.length===1){let r=e[0].item,n=r.itemPageUrl??void 0;return d`<calcite-link .href=${n} target=_blank><arcgis-portal-item-type .item=${r} .portal=${this.portal} .user=${this.user} hide-text></arcgis-portal-item-type>${r.title}</calcite-link>`}let t=`delete-items-bucket-${e.map(({item:r})=>r.id).join("-")}`,i=e.map(({item:r})=>r);return T({id:t,linkText:e.length,label:this.messages.bucketItems.replace("{count}",String(e.length)),placement:"bottom-start",relatedItems:i,portal:this.portal,user:this.user})}renderRelatedItemsPopover(e){let t=e.flatMap(({usedByItems:i})=>i);return e.length>1||t.length===0?null:T({id:"delete-items-directly-used-by",linkText:G(this.messages._t9nLocale,this.messages.usedByOtherItems,t.length),label:this.messages.usedByPopover,placement:"auto",relatedItems:t,portal:this.portal,user:this.user})}renderDirectlyUsedByItems(){let e=j({recycleItems:this.recycleItems,cannotDeleteItems:this.cannotDeleteItems,permanentlyDeleteItems:this.permanentlyDeleteItems}),t=e.flatMap(({usedByItems:r})=>r),i=q({selectedItems:H(e)});return d`${this.items.length===1&&this.deleteMode==="delete"&&i.length>0?d`<div class="discouraged-items-warning"><calcite-notice kind=warning open><div slot=message>${this.messages.deleteDiscouraged}</div><calcite-link icon-end=launch slot=link>${this.messages.learnMoreAboutDeletingSourceItems}</calcite-link></calcite-notice></div>`:null}<arcgis-portal-review-related-items .sourceItem=${this.items[0]??null} .relatedItems=${t} .portal=${this.portal} .user=${this.user}></arcgis-portal-review-related-items>`}renderDirectlyUsedByItemsNotice(){let e=this.recycleItems.filter(({usedByItems:i})=>i.length>0).length,t=this.messages.reviewRelatedItems[this.items.length===1?"single":"multiple"].replace("{affectedCount}",String(e)).replace("{totalCount}",String(this.items.length));return d`<div class="panel__related-items-notice"><calcite-notice kind=warning icon open><div slot=message>${t}</div><calcite-button appearance=transparent slot=actions-end @click=${()=>this.reviewingDirectlyUsedByItems=!0}>${this.messages.reviewItems}</calcite-button></calcite-notice></div>`}renderSingleItemDelete(){return d`<calcite-panel>${this.renderRecycleBucket()}${this.renderCannotDeleteBucket()}${this.renderPermanentlyDeleteBucket()}${this.renderDirectlyUsedByItems()}${this.recyclableItemsHaveImpactedItems&&d`<div>${this.items.length>1?this.renderDirectlyUsedByItemsNotice():null}</div>`||""}</calcite-panel>`}renderRecycleBucket(){return!this.recycleItems||this.recycleItems.length===0?null:this.renderBucket({icon:"recycle-bin",label:this.messages.summary.willBeRecycled,description:this.messages.summary.canBeRecovered.single.replace("{days}","14"),bucket:this.recycleItems})}renderCannotDeleteBucket(){if(!this.cannotDeleteItems||this.cannotDeleteItems.length===0)return null;let e=this.cannotDeleteItems?.[0]?.reason;return this.renderBucket({icon:"security",label:this.messages.summary.cannotDelete,description:e==="hasDependentItems"?this.messages.summary.protectedGroup.hasDependentItemsDescription.singleOneDependentItem:this.messages.summary.protectedGroup.deleteProtectedDescription,bucket:this.cannotDeleteItems})}renderPermanentlyDeleteBucket(){return!this.permanentlyDeleteItems||this.permanentlyDeleteItems.length===0?null:this.renderBucket({icon:"trash",label:this.messages.summary.permanentlyDelete,description:this.messages.summary.permanentDelete.notSupported.single,bucket:this.permanentlyDeleteItems})}render(){let{items:e,portal:t,deleteMode:i}=this;if(!(!e||!t))return d`<calcite-dialog modal .open=${this.active} width=s .heading=${this.getHeaderText()} heading-level=2 outside-close-disabled escape-disabled kind=danger @calciteDialogClose=${this.handleDialogClose}><div class="panel__content">${this.isLoading?d`<calcite-scrim loading></calcite-scrim>`:this.renderSingleItemDelete()}</div>${this.itemsNeedReview&&d`<calcite-checkbox slot=content-bottom class="panel__checkbox" @calciteCheckboxChange=${r=>{this.hasReviewedImpactedItems=r.target.checked}} .labelText=${this.messages.reviewImpactedItems}></calcite-checkbox>`||""}<calcite-button slot=footer-end appearance=outline-fill @click=${()=>{this.active=!1,this.arcgisCancel.emit()}}>${this.messages.cancel}</calcite-button>${i!=="none"&&d`<calcite-button .disabled=${!this.deleteButtonEnabled} kind=danger slot=footer-end @click=${async()=>await this.handleDelete()}>${this.messages.delete}</calcite-button>`||""}</calcite-dialog>`}};w("arcgis-portal-delete-items",I);return I},"request","portal/PortalItem","intl",a,c,e)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import c from"./YWS3KTEP.js";import b from"./4PQO4X4X.js";import a from"./576MGJVB.js";import"./2GBRZSEC.js";import"./OJGDXUKZ.js";import"./HHO6EQZB.js";import"./ISJALOUO.js";import"./UXZTO272.js";import"./UZLQALHY.js";export default $arcgis.t(([,,a])=>{return a},a,b,c)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import f from"./3GRYBMC6.js";import{a as w,b as P}from"./PIAWVFRU.js";import e from"./Q75EBGI2.js";import c from"./576MGJVB.js";import a from"./F3ODJVJC.js";import{a as S}from"./OJGDXUKZ.js";import{a as E,e as I}from"./HHO6EQZB.js";import"./ISJALOUO.js";import{K as d,L as m,M as b,P as C,S as y,h as g,j as n}from"./UXZTO272.js";import"./UZLQALHY.js";export default $arcgis.t(([{createArcadeExecutor:F},{watch:q},{c:v},,{a:f,b:c,c:p,d:R,e:V,f:_},{a:x,b:$}])=>{async function k({portalClassificationSchema:r,itemClassification:t}){let i=Object.entries(r.attributes).map(async([e])=>{let s=await T(e,r,t);return{[e]:{enabled:s}}}),a=await Promise.all(i);return Object.assign({},...a)}async function T(r,t,i){let a=t?.attributes?.[r];if(!a)return!1;let{isAttributeEnabled:e}=a;return e?await h(e,JSON.stringify(t),i):!0}async function j({portalClassificationSchema:r,itemClassification:t}){let i=Object.entries(r.attributes).map(async([e])=>{let s=await M(e,r,t);return{[e]:{valueExpressionResult:s}}}),a=await Promise.all(i);return Object.assign({},...a)}async function M(r,t,i){let a=t.attributes[r];if(!a)throw Error(`Attribute ${r} not found in schema`);let e=a.valueExpression,s=a.validValues,o=a.validValuesMap;return s?.length?s:o&&Object.keys(o)?.length?o:e?await h(e,t,i,r):null}async function N({portalClassificationSchema:r,itemClassification:t}){let i=Object.entries(r.attributes).map(async([e])=>{let s=await H(e,r,t);return{[e]:{attributeValidationResult:s}}}),a=await Promise.all(i);return Object.assign({},...a)}async function H(r,t,i){let a=t?.attributes?.[r];if(!a)return null;let e=a?.attributeValidation;return e?await h(e,JSON.stringify(t),i,r):null}var O=async(r,t)=>{let i=r?.bannerExpression;return i?.length?await h(i,r,t):W(r,t)},W=(r,t)=>{let i=Object.entries(r.attributes).sort(([,s],[,o])=>(s?.bannerOrder??0)-(o?.bannerOrder??0)),a=[],e=[];return i.forEach(([s,o])=>{let l=t?.[s];l&&o.bannerOrder&&(a.push(U({elementType:o.uiElement??"",selectionDisplayLabel:o.bannerLabel??"",labelDelimiter:o.labelDelimiter??"",classificationProp:l,valueDelimiter:o.valueDelimiter??""})),e.push(o.attributeDelimiter??""))}),a.length>0?a.reduce((s,o,l)=>l===0?o:`${s}${e[l-1]}${o}`,""):""},U=({elementType:r,selectionDisplayLabel:t,labelDelimiter:i,classificationProp:a,valueDelimiter:e})=>{let s=r.includes("multi")&&a?a.split("").join(e):a;return`${t}${i}${s}`};async function h(r,t,i,a=""){let e={schemaJsonString:typeof t=="string"?t:JSON.stringify(t),valueJsonString:JSON.stringify(i),attributeId:a};return(await J(r)).execute(e)}async function J(r){return await F(r,{variables:[{name:"schemaJsonString",type:"text"},{name:"valueJsonString",type:"text"},{name:"attributeId",type:"text"}]})}var L=g`:host{height:100%;box-sizing:border-box;display:flex;flex-direction:column}.header-section{padding:var(--calcite-spacing-sm)}.header-section__title-container{display:flex;align-items:center;justify-content:space-between}.header-section__title-text{margin:unset;font-weight:unset;font-size:var(--calcite-font-size)}.header-section__title-popover{padding:var(--calcite-spacing-md)}.form-section{display:flex;border-top:var(--calcite-border-width-sm) solid var(--calcite-color-border-1);padding:var(--calcite-spacing-sm);height:100%;overflow:hidden}.form-section__sidebar{flex:1;padding:var(--calcite-spacing-sm)}.form-section__main-content{flex:3;padding:var(--calcite-spacing-sm);overflow:auto}.danger{color:var(--calcite-color-status-danger)}.spacing-y{margin:var(--calcite-spacing-md) 0}`,u=class extends b{constructor(){super(),this.classificationModel=x(this),this.messages=S(),this.formMainContentRef=d(),this.bannerRef=d(),this._classificationDataTask=$(this),this._formCreationTask=new P(this,{task:async()=>{if(await this._classificationDataTask.taskComplete,!this.portalClassificationSchema||!this.portalItem)throw new Error("Portal item and classification schema are required to render the form");let t=this.portalItem.clone();if(await t.load(),!this.primaryAttribute)throw new Error("primaryAttribute is required but was undefined.");this.existingClassification=!!t.classification,t.classification=f(t.classification,this.primaryAttribute,this.portalClassificationSchema),t.classification&&(t.classification.banner=await O(this.portalClassificationSchema,t.classification)),this.pendingPortalItem=t,this.cleanupItemClassificationWatchHandle(),this._itemClassificationWatchHandle=q(()=>this.portalItem.classification,i=>{if(this.pendingPortalItem){let a=this.pendingPortalItem.clone();a.load().then(()=>{a.classification=i,this.pendingPortalItem=a}).catch(e=>{console.error(e)})}}),this._itemClassificationWatchPortalItem=this.portalItem,this._itemClassificationWatchPortalItem.addHandles(this._itemClassificationWatchHandle,"arcgis-classification-config"),await this.evaluateAttributeExpressions(this.portalClassificationSchema,this.pendingPortalItem),this.pendingPortalItem.classification=c(this.pendingPortalItem.classification,this.attributeExpressionResults),this.pendingPortalItem=this.pendingPortalItem.clone(),this.existingClassification&&this.validateForm()},args:()=>[this.portalItem,this.portalClassificationSchema]}),this.getFormDisplayOrder=t=>this.portalClassificationSchema?.layouts.default.layoutElements[t].formDisplayOrder??0,this.addEditInfoAttributes=()=>{if(!this.pendingPortalItem?.classification)return{};let t=structuredClone(this.pendingPortalItem.classification),i=_(this.pendingPortalItem,t);return{...t,...i}},this.updateFavoriteClassification=t=>{this.favoriteClassifications=t},this.updateClassificationData=async t=>{let i=t.classification;if(this.selectedFavoriteClassificationName=t.name,this.pendingPortalItem){let a=this.pendingPortalItem.clone();if(await a.load(),a.classification=p(this.portalClassificationSchema,i),!this.portalClassificationSchema)return;await this.evaluateAttributeExpressions(this.portalClassificationSchema,a),a.classification=c(a.classification,this.attributeExpressionResults),this.pendingPortalItem=a}},this.existingClassification=!1,this.portalClassificationSchema=this.classificationModel.portalClassificationSchema,this.primaryAttribute=this.classificationModel.primaryAttribute,this.attributeExpressionResults=new Map,this.formValidationErrors=[],this.formValidationErrorsSource="other",this.remoteValidationErrors="",this.canUserConfigureClassification=!0,this.favoriteClassifications=[],this.isRequiredErrors=new Set,this.status=this.classificationModel.status,this.values={},this.valid=!1,this.autoDestroyDisabled=!1,this.arcgisPropertyChange=I()("status","values","valid")}static{this.properties={existingClassification:16,portalClassificationSchema:16,primaryAttribute:16,attributeExpressionResults:16,formValidationErrors:16,formValidationErrorsSource:16,itemClassification:16,pendingPortalItem:16,selectedCategory:16,remoteValidationErrors:16,canUserConfigureClassification:16,favoriteClassifications:16,selectedFavoriteClassificationName:16,isRequiredErrors:16,portalItem:0,status:35,values:[1,{type:Object}],valid:7,autoDestroyDisabled:5}}static{this.styles=L}async destroy(){this.cleanupItemClassificationWatchHandle(),await this.destroyManagedChildren(),await this.manager.destroy()}async resetForm(){if(this.existingClassification)this.pendingPortalItem=this.portalItem?.clone(),this.portalClassificationSchema&&this.pendingPortalItem&&(await this.evaluateAttributeExpressions(this.portalClassificationSchema,this.pendingPortalItem),this.pendingPortalItem.classification=c(this.pendingPortalItem.classification,this.attributeExpressionResults),this.validateForm());else if(this.portalItem&&this.primaryAttribute&&this.portalClassificationSchema){let t=this.portalItem.clone();await t.load(),this.pendingPortalItem=this.portalItem?.clone(),this.pendingPortalItem.classification=f(t.classification,this.primaryAttribute,this.portalClassificationSchema),this.portalClassificationSchema&&this.pendingPortalItem&&(await this.evaluateAttributeExpressions(this.portalClassificationSchema,this.pendingPortalItem),this.pendingPortalItem.classification=c(this.pendingPortalItem.classification,this.attributeExpressionResults))}}async validateForm(){this.updateFormValidationErrors(),await this.updateRemoteValidationErrors()}async load(){try{await V(this.portalItem)||(this.canUserConfigureClassification=!1);let t=await v(this.portalItem);if(t){let{result:i,error:a}=t;if(a&&a.details.raw.messageCode!=="COM_1177"){console.error(a);return}i&&(this.favoriteClassifications=i.favorites)}}catch(t){console.error("Error occured while loading arcgis-classification-config:",t)}}willUpdate(t){if(t.has("pendingPortalItem")){let i=this.addEditInfoAttributes();this.values=i}(t.has("formValidationErrors")||t.has("remoteValidationErrors"))&&(this.valid=!this.formValidationErrors.length&&!this.remoteValidationErrors)}loaded(){let t=E(this.el,"form");t&&(this.listenOn(t,"formdata",this.updateFormData),this.listenOn(t,"submit",this.handleFormSubmit)),this.listen("submit",this.handleFormSubmit)}async updateClassificationProperty(t){if(!this.pendingPortalItem||!this.portalClassificationSchema)return;let i=this.pendingPortalItem.clone();await i.load(),Object.entries(t??{}).forEach(([a,e])=>{if(a===this.primaryAttribute){let s=R(e,i.classification,this.primaryAttribute);s=p(this.portalClassificationSchema,s),i.classification=s}else{let s=new Map(Object.entries(i.classification??{}));if(e===void 0||e===""||Array.isArray(e)&&e.length===0)s.delete(a);else if(s.set(a,e),a==="fgi"&&!s.has("fgiOptions")){let o=this.portalClassificationSchema?.attributes?.fgiOptions?.defaultValue??[];s.set("fgiOptions",Array.isArray(o)?o:[o])}i.classification=Object.fromEntries(s)}}),i.classification&&!i.classification.fgi&&delete i.classification.fgiOptions,await this.evaluateAttributeExpressions(this.portalClassificationSchema,i),i.classification=c(i.classification,this.attributeExpressionResults),i.classification&&(i.classification.banner=await O(this.portalClassificationSchema,i.classification)),this.pendingPortalItem=i,this.existingClassification&&this.validateForm(),t&&"classification"in t&&this.updateIsRequiredErrors()}handleCategorySelectChange(t){this.selectedCategory=t.target.selectedItems[0].value}async evaluateAttributeExpressions(t,i){let a=await k({portalClassificationSchema:t,itemClassification:i.classification}),e=await j({portalClassificationSchema:t,itemClassification:i.classification}),s=await N({portalClassificationSchema:t,itemClassification:i.classification});Object.keys(t.attributes).forEach(o=>{let l=a[o]?.enabled??!0,D=e[o]?.valueExpressionResult,A=s[o]?.attributeValidationResult;this.attributeExpressionResults.set(o,{enabled:l,valueExpressionResult:D,attributeValidationResult:A})})}updateIsRequiredErrors(){let t=new Set;Object.entries(this.portalClassificationSchema?.attributes??{})?.forEach(([i,a])=>{a.isRequired&&!this.pendingPortalItem?.classification?.[i]&&this.pendingPortalItem?.classification?.[i]!==0&&t.add(i)}),this.isRequiredErrors=t}updateFormValidationErrors(t=!1,i="other"){let a=[];Object.entries(this.portalClassificationSchema?.attributes??{})?.forEach(([e,s])=>{s.isRequired&&!this.pendingPortalItem?.classification?.[e]&&this.pendingPortalItem?.classification?.[e]!==0&&(!t||this.isRequiredErrors.has(e))&&a.push({attribute:s.label,reason:this.messages.isrequired??"is required",category:s.attributeCategory}),this.attributeExpressionResults.get(e)?.attributeValidationResult&&a.push({attribute:s.label,reason:this.attributeExpressionResults.get(e)?.attributeValidationResult??"",category:s.attributeCategory})}),this.formValidationErrors=a,this.formValidationErrorsSource=i}async updateRemoteValidationErrors(){if(!this.pendingPortalItem?.classification)return;let t=await this.classificationModel.validateClassification(void 0,this.pendingPortalItem?.classification,this.pendingPortalItem.portal.restUrl);this.remoteValidationErrors=t}cleanupItemClassificationWatchHandle(){this._itemClassificationWatchHandle?.remove(),this._itemClassificationWatchHandle=void 0,this._itemClassificationWatchPortalItem?.removeHandles("arcgis-classification-config"),this._itemClassificationWatchPortalItem=void 0}async destroyManagedChildren(){let t=this.bannerRef.value;!t?.autoDestroyDisabled||t.manager?.destroyed||await t.destroy()}async handleFormSubmit(t){this.validateForm(),this.updateIsRequiredErrors(),this.formMainContentRef.value?.scrollIntoView()}updateFormData(t){let i=t.formData,a=this.addEditInfoAttributes();a=c(a,this.attributeExpressionResults),Object.entries(a??{}).forEach(([e,s])=>{i.set(e,s)})}renderCategoryTabs(){return this._classificationDataTask.render({complete:()=>{if(this.portalClassificationSchema?.attributeCategories?.length)return this.selectedCategory||(this.selectedCategory=this.portalClassificationSchema?.attributeCategories[0]),n`<calcite-list .label=${this.messages.selectcategory??"select category"} selection-appearance=border selection-mode=single-persist @calciteListChange=${this.handleCategorySelectChange}>${this.portalClassificationSchema.attributeCategories.map(t=>{let i=this.formValidationErrors.filter(a=>a.category===t).length;return n`<calcite-list-item .label=${t} .value=${t} .selected=${this.selectedCategory===t} .description=${i?`${i} ${i>1?this.messages.errors:this.messages.error}`:void 0}>${i&&n`<div slot=content-end class="danger"><calcite-icon icon=exclamation-mark-triangle scale=s></calcite-icon></div>`||""}</calcite-list-item>`})}</calcite-list>`}})}renderValidationErrors(){return this.formValidationErrors.length&&(!this.selectedCategory||this.formValidationErrors.some(t=>this.selectedCategory===t.category)||this.formValidationErrorsSource==="favorite")?n`<calcite-notice open icon=exclamation-mark-triangle class="spacing-y" kind=danger><div slot=message>${this.messages.bannererror??"Some fields are incomplete or contain errors. Check the highlighted fields for details."}</div></calcite-notice>`:null}renderFavoriteClassification(){let t=this.portalClassificationSchema?.attributeCategories?.[0]??"Default";return this.selectedCategory=this.portalClassificationSchema?.attributeCategories?.length?this.selectedCategory:"Default",this.selectedCategory===t?n`<arcgis-portal-classification-favorite .portalItem=${this.pendingPortalItem??this.portalItem} .classificationValue=${this.pendingPortalItem?.classification} .favoriteClassifications=${this.favoriteClassifications} .selectedFavoriteClassificationName=${this.selectedFavoriteClassificationName} .attributeExpressionResults=${this.attributeExpressionResults} .resetFavoriteClassification=${i=>this.updateFavoriteClassification(i)} .updateClassificationData=${async i=>{await this.updateClassificationData(i),this.updateFormValidationErrors(!1,"favorite"),this.updateIsRequiredErrors()}}></arcgis-portal-classification-favorite>`:null}renderForm(){return this._formCreationTask.render({pending:()=>n`<calcite-loader .label=${this.messages.loading??"loading"}></calcite-loader>`,complete:()=>{if(!this.pendingPortalItem||!this.portalClassificationSchema)return;let t=Object.entries(this.portalClassificationSchema.attributes).sort(([i],[a])=>this.getFormDisplayOrder(i)-this.getFormDisplayOrder(a));return n`${this.renderValidationErrors()}${this.renderFavoriteClassification()}${t.filter(([,{attributeCategory:i}])=>this.selectedCategory===i||!i).map(([i,a])=>{if(this.attributeExpressionResults.get(i)?.enabled===!1)return null;let e=this.pendingPortalItem?.classification?.[i];return n`<arcgis-portal-classification-form-element .attributeKey=${i} .attribute=${a} .value=${e} @arcgisAttributeValueChange=${async s=>{await this.updateClassificationProperty(s.detail),a.isRequired&&!s.detail[i]?this.isRequiredErrors.add(i):this.isRequiredErrors=new Set(Array.from(this.isRequiredErrors).filter(o=>o!==i)),this.updateFormValidationErrors(!0)}} .renderingInfo=${this.attributeExpressionResults.get(i)} .isRequiredErrors=${this.isRequiredErrors}></arcgis-portal-classification-form-element>`})}`}})}renderNotice(t,i="warning"){return n`<calcite-notice icon=exclamation-mark-triangle open class="spacing-y" .kind=${i}><div slot=message>${t}</div></calcite-notice>`}renderHelpTooltip(){return this.portalClassificationSchema?.helpTooltip?n`<calcite-action id=portal-classification-config-tooltip-button .text=${this.portalClassificationSchema?.helpTooltip} icon=information></calcite-action><calcite-popover .label=${this.portalClassificationSchema?.helpTooltip} reference-element=portal-classification-config-tooltip-button placement=bottom-end overlay-positioning=fixed auto-close><div class="header-section__title-popover"><calcite-link .href=${this.portalClassificationSchema?.helpUrl} target=_blank id=portal-classification-config-tooltip-button>${this.portalClassificationSchema?.helpTooltip}</calcite-link></div></calcite-popover>`:null}render(){return this.portalItem?this._classificationDataTask.render({pending:()=>n`<calcite-loader .label=${this.messages.loading??"loading"}></calcite-loader>`,error:()=>this.renderNotice(this.messages.anerroroccurred??"An error has occurred.","danger"),complete:()=>this.portalItem?this.canUserConfigureClassification?this.portalItem.portal.hasClassificationSchema?n`<div class="header-section" role=region aria-label=${this.messages.documentbannerpreview??"documentbannerpreview"??C}><div class="header-section__title-container"><h2 class="header-section__title-text">${this.messages.documentbannerpreview??"documentbannerpreview"}</h2>${this.renderHelpTooltip()}</div>${this._formCreationTask.status===w.COMPLETE&&n`<arcgis-portal-classification-banner .portalItem=${this.pendingPortalItem??this.portalItem} variant=preview .missingExistingClassification=${!this.existingClassification} .autoDestroyDisabled=${this.autoDestroyDisabled} ${m(this.bannerRef)}></arcgis-portal-classification-banner>`||""}</div><div class="form-section">${this.portalClassificationSchema?.attributeCategories?.length&&n`<div class="form-section__sidebar">${this.renderCategoryTabs()}</div>`||""}<div class="form-section__main-content" ${m(this.formMainContentRef)}>${this.renderForm()}</div></div>`:this.renderNotice(this.messages.missingclassificationschema??"Portal is missing classification schema."):this.renderNotice(this.messages.userconfigurepermissionrequired??"User configuration permission is required."):this.renderNotice(this.messages.portalitemrequired??"Portal item is required.")}):this.renderNotice(this.messages.portalitemrequired??"Portal item is required.")}};y("arcgis-portal-classification-config",u);return u},"arcade","core/reactiveUtils",a,c,e,f)