@arcgis/portal-components 5.2.0-next.140 → 5.2.0-next.142

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 (261) hide show
  1. package/dist/cdn/{Z6R3C4AK.js → 23X56P4K.js} +2 -2
  2. package/dist/cdn/{VDXESPJK.js → 25XJ66JO.js} +2 -2
  3. package/dist/cdn/2A4BYZOS.js +2 -0
  4. package/dist/cdn/{EMJQI4MA.js → 2GBRZSEC.js} +1 -1
  5. package/dist/cdn/{LISDTBEX.js → 2I5SLQC5.js} +2 -2
  6. package/dist/cdn/{ZKZDKJ6D.js → 3R4PPD5N.js} +2 -2
  7. package/dist/cdn/3SO52LKS.js +2 -0
  8. package/dist/cdn/{SGDDFWCJ.js → 456JKNCU.js} +2 -2
  9. package/dist/cdn/{32BWFMTC.js → 47PU5HDG.js} +2 -2
  10. package/dist/cdn/{3CQKCUM5.js → 4SHXR62X.js} +2 -2
  11. package/dist/cdn/{ABORO35R.js → 4TQWZ2KF.js} +2 -2
  12. package/dist/cdn/{L64UURQB.js → 4ZTWQN6Q.js} +2 -2
  13. package/dist/cdn/{4TSXFX3M.js → 55FL7WQV.js} +2 -2
  14. package/dist/cdn/{ZDDN7UKS.js → 5EFYJYWM.js} +1 -1
  15. package/dist/cdn/{3EYB5GQX.js → 5FDUO7J4.js} +2 -2
  16. package/dist/cdn/{FIQZPIIK.js → 5FOWUL6I.js} +2 -2
  17. package/dist/cdn/{DAAON2UO.js → 5YDITHQA.js} +1 -1
  18. package/dist/cdn/{K2XSYDAP.js → 6BMWSGLA.js} +2 -2
  19. package/dist/cdn/6EE4B3MI.js +2 -0
  20. package/dist/cdn/{JIJO4CAS.js → 6EY5GHKE.js} +2 -2
  21. package/dist/cdn/6KVA4AKM.js +2 -0
  22. package/dist/cdn/6LST5YZY.js +2 -0
  23. package/dist/cdn/{JN23JH3T.js → 6MWSS5YF.js} +2 -2
  24. package/dist/cdn/{V6A6MKLU.js → 6TO2BYXU.js} +1 -1
  25. package/dist/cdn/{GSOBDGLK.js → 7NK6UF47.js} +2 -2
  26. package/dist/cdn/{I273CANO.js → 7NQY5QJK.js} +2 -2
  27. package/dist/cdn/7TGCBYRK.js +2 -0
  28. package/dist/cdn/ADSPENPN.js +2 -0
  29. package/dist/cdn/{I6IRHXWR.js → ADZAKBOJ.js} +2 -2
  30. package/dist/cdn/{TLM457Z5.js → AE574B3G.js} +2 -2
  31. package/dist/cdn/{CXXV6WJT.js → AXNTYD46.js} +2 -2
  32. package/dist/cdn/{OD5WXP7J.js → B3NVWHCS.js} +2 -2
  33. package/dist/cdn/B4YHTYJB.js +2 -0
  34. package/dist/cdn/{PNIFJ5DQ.js → BIXJGL7B.js} +1 -1
  35. package/dist/cdn/{OXPXXIWL.js → BRJE3G3H.js} +2 -2
  36. package/dist/cdn/{A2SQ4EMZ.js → C5U7YKVI.js} +2 -2
  37. package/dist/cdn/C5VUNN4M.js +2 -0
  38. package/dist/cdn/{PKA745KL.js → CFBSBZSS.js} +1 -1
  39. package/dist/cdn/{7LMZHJZG.js → CVOWIH4J.js} +2 -2
  40. package/dist/cdn/{AICPYLWE.js → CWSEBETE.js} +3 -3
  41. package/dist/cdn/{DLI4XKJ3.js → D6QHNXEH.js} +2 -2
  42. package/dist/cdn/{YZTBAUIO.js → D7LRCAK4.js} +2 -2
  43. package/dist/cdn/DF5GVVDW.js +2 -0
  44. package/dist/cdn/{BKD7JSV2.js → DIKRXF22.js} +2 -2
  45. package/dist/cdn/{DDBXEXOV.js → DKIYHE4A.js} +2 -2
  46. package/dist/cdn/{GX7U3727.js → E3FQ4QWE.js} +2 -2
  47. package/dist/cdn/EJN2JQOX.js +2 -0
  48. package/dist/cdn/{ROX3GKKA.js → F3ODJVJC.js} +1 -1
  49. package/dist/cdn/{4QFTKB6T.js → FFLIAQOL.js} +2 -2
  50. package/dist/cdn/FQOOFBPI.js +2 -0
  51. package/dist/cdn/FQYC25GN.js +2 -0
  52. package/dist/cdn/{3LEQ37YT.js → FSACXOM3.js} +2 -2
  53. package/dist/cdn/{APSYZEPP.js → FTKD53UG.js} +2 -2
  54. package/dist/cdn/G6WPLOLV.js +2 -0
  55. package/dist/cdn/{TNUCSWBN.js → GEZH4D32.js} +2 -2
  56. package/dist/cdn/{5C5GHX4D.js → GTZ4LKEQ.js} +2 -2
  57. package/dist/cdn/{4KTRAA2J.js → ILDTKRON.js} +1 -1
  58. package/dist/cdn/{YTODQCOG.js → IXSEMBHA.js} +2 -2
  59. package/dist/cdn/{3NSHGKZA.js → JUDF3TYJ.js} +2 -2
  60. package/dist/cdn/KC4FTTKP.js +2 -0
  61. package/dist/cdn/{OR6T5SB3.js → KIKEE2KY.js} +2 -2
  62. package/dist/cdn/KOLH76KG.js +2 -0
  63. package/dist/cdn/{AXOBMX3S.js → KYNL256E.js} +2 -2
  64. package/dist/cdn/{5HZNBMW6.js → LNWWUPFK.js} +2 -2
  65. package/dist/cdn/{SVROAT3Z.js → LP4IB3PV.js} +2 -2
  66. package/dist/cdn/LRHPL6B5.js +2 -0
  67. package/dist/cdn/M6BRGNH3.js +2 -0
  68. package/dist/cdn/{LWFACY3F.js → MCX22B23.js} +2 -2
  69. package/dist/cdn/MHNYLHFR.js +2 -0
  70. package/dist/cdn/{GAF4YT5N.js → MQISQ7P3.js} +2 -2
  71. package/dist/cdn/MY7AYBBR.js +2 -0
  72. package/dist/cdn/{JPUUMGX5.js → NDRCB2K3.js} +2 -2
  73. package/dist/cdn/{NWVLGU2C.js → NICTB76A.js} +2 -2
  74. package/dist/cdn/{MKSFNVXL.js → NXFE6R2N.js} +2 -2
  75. package/dist/cdn/{CD5UWSCP.js → O5LFDRK2.js} +2 -2
  76. package/dist/cdn/{TOICLGFK.js → OJNU7H3F.js} +2 -2
  77. package/dist/cdn/{IN4JPZTY.js → OQGUCK3G.js} +2 -2
  78. package/dist/cdn/{PMRFXB4F.js → OUFIJDIW.js} +2 -2
  79. package/dist/cdn/{TWCJJCPC.js → OV5O7YP4.js} +2 -2
  80. package/dist/cdn/{TGCJUIEL.js → Q75EBGI2.js} +1 -1
  81. package/dist/cdn/QBV7VDQK.js +2 -0
  82. package/dist/cdn/QCOJMMT3.js +2 -0
  83. package/dist/cdn/{JOUR2FB2.js → QDWOQBO3.js} +2 -2
  84. package/dist/cdn/{4PRXQFCV.js → QKBGX2OY.js} +2 -2
  85. package/dist/cdn/{LYLQCBVX.js → QKK6N2AN.js} +2 -2
  86. package/dist/cdn/{N5QLV56W.js → QNCMFQSA.js} +2 -2
  87. package/dist/cdn/{KV4ZZSNW.js → QS3GXAIH.js} +1 -1
  88. package/dist/cdn/{JWBUJT43.js → QSAZVVVL.js} +2 -2
  89. package/dist/cdn/{DHMNNIXZ.js → QUOPWSRC.js} +2 -2
  90. package/dist/cdn/QYMSY57N.js +2 -0
  91. package/dist/cdn/{TXC7YBGL.js → R3QN5WF2.js} +2 -2
  92. package/dist/cdn/R57DISOR.js +2 -0
  93. package/dist/cdn/{OUMTV5H5.js → R74ZHFA6.js} +1 -1
  94. package/dist/cdn/{RQYNPDN3.js → RBGARTND.js} +2 -2
  95. package/dist/cdn/{TOTWYGB3.js → RUB2GDBE.js} +2 -2
  96. package/dist/cdn/{PZDI5ZDC.js → SG7Z5VLB.js} +2 -2
  97. package/dist/cdn/{TUUUK3VX.js → T2HQNZ36.js} +2 -2
  98. package/dist/cdn/{TBZXKKGP.js → T3RJKB2A.js} +2 -2
  99. package/dist/cdn/{XYMBRPC7.js → TJYPEMON.js} +2 -2
  100. package/dist/cdn/{2YZWRFCI.js → UGRFT75G.js} +2 -2
  101. package/dist/cdn/UKHCSMA4.js +2 -0
  102. package/dist/cdn/{74T6IXSN.js → UQKT5JQZ.js} +2 -2
  103. package/dist/cdn/{U3KMGSVH.js → USGROSML.js} +2 -2
  104. package/dist/cdn/{FRE56NBG.js → UTA2UBBS.js} +2 -2
  105. package/dist/cdn/{4MUB6TL6.js → UZCHLKLO.js} +1 -1
  106. package/dist/cdn/{5PV2GUZW.js → UZLQALHY.js} +1 -1
  107. package/dist/cdn/{M5PPX4ZX.js → V5YXPHYD.js} +2 -2
  108. package/dist/cdn/{K75JTQPW.js → VMQIDO4Z.js} +2 -2
  109. package/dist/cdn/{EQDYQOOT.js → WDMNL6PJ.js} +2 -2
  110. package/dist/cdn/{GUL7EIJ4.js → XEK22IDA.js} +1 -1
  111. package/dist/cdn/{RHCRPJWS.js → XKC6SPS4.js} +2 -2
  112. package/dist/cdn/XNEYNX5G.js +2 -0
  113. package/dist/cdn/{MLYQGIJU.js → XOFCMJBQ.js} +2 -2
  114. package/dist/cdn/XUPYBBRI.js +2 -0
  115. package/dist/cdn/{GUO7HKSP.js → Y3YIMI2Z.js} +4 -4
  116. package/dist/cdn/{3UFTKKFG.js → YUQFNMEZ.js} +1 -1
  117. package/dist/cdn/{YG6ZGQ46.js → YVKSTDL6.js} +1 -1
  118. package/dist/cdn/ZAIRH5DL.js +2 -0
  119. package/dist/cdn/{24QSQLRY.js → ZSILF72K.js} +2 -2
  120. package/dist/cdn/index.js +2 -2
  121. package/dist/chunks/common.js +1 -1
  122. package/dist/chunks/dom.js +1 -1
  123. package/dist/chunks/fieldAddDelete.js +1 -1
  124. package/dist/chunks/functional.js +1 -1
  125. package/dist/chunks/functionalities.js +1 -1
  126. package/dist/chunks/groups.js +1 -1
  127. package/dist/chunks/groups2.js +1 -1
  128. package/dist/chunks/icons.js +1 -1
  129. package/dist/chunks/info.js +1 -1
  130. package/dist/chunks/item.js +1 -1
  131. package/dist/chunks/item2.js +1 -1
  132. package/dist/chunks/itemThumbnail.js +1 -1
  133. package/dist/chunks/items.js +1 -1
  134. package/dist/chunks/loadClassificationData.js +1 -1
  135. package/dist/chunks/portal-account-switcher.js +1 -1
  136. package/dist/chunks/portal-browser-filter-date.js +1 -1
  137. package/dist/chunks/portal-browser.js +1 -1
  138. package/dist/chunks/portal-delete-items-review.js +1 -1
  139. package/dist/chunks/portal-item-badge.js +1 -1
  140. package/dist/chunks/portal-related-items-list-item.js +1 -1
  141. package/dist/chunks/portal.js +1 -1
  142. package/dist/chunks/portal2.js +1 -1
  143. package/dist/chunks/query.js +1 -1
  144. package/dist/chunks/request.js +1 -1
  145. package/dist/chunks/requests.js +1 -1
  146. package/dist/chunks/runtime.js +2 -2
  147. package/dist/chunks/services.js +1 -1
  148. package/dist/chunks/store.js +1 -1
  149. package/dist/chunks/string.js +1 -1
  150. package/dist/chunks/ui.js +1 -1
  151. package/dist/chunks/url.js +1 -1
  152. package/dist/chunks/useT9n.js +1 -1
  153. package/dist/chunks/user.js +1 -1
  154. package/dist/chunks/user2.js +1 -1
  155. package/dist/chunks/users.js +1 -1
  156. package/dist/chunks/utils.js +1 -1
  157. package/dist/chunks/utils2.js +1 -1
  158. package/dist/chunks/utils3.js +1 -1
  159. package/dist/chunks/verified.js +1 -1
  160. package/dist/components/arcgis-portal-account-switcher/customElement.d.ts +4 -1
  161. package/dist/components/arcgis-portal-account-switcher/customElement.js +87 -85
  162. package/dist/components/arcgis-portal-account-switcher-accounts/customElement.d.ts +4 -4
  163. package/dist/components/arcgis-portal-account-switcher-accounts/customElement.js +9 -9
  164. package/dist/components/arcgis-portal-account-switcher-list/customElement.d.ts +4 -4
  165. package/dist/components/arcgis-portal-account-switcher-list/customElement.js +7 -7
  166. package/dist/components/arcgis-portal-account-switcher-signout/customElement.d.ts +5 -5
  167. package/dist/components/arcgis-portal-account-switcher-signout/customElement.js +4 -4
  168. package/dist/components/arcgis-portal-add-gps-metadata/customElement.js +1 -1
  169. package/dist/components/arcgis-portal-ai-assistant/customElement.js +1 -1
  170. package/dist/components/arcgis-portal-ai-assistant-interrupt/customElement.js +1 -1
  171. package/dist/components/arcgis-portal-browser/customElement.js +1 -1
  172. package/dist/components/arcgis-portal-browser-actions/customElement.js +1 -1
  173. package/dist/components/arcgis-portal-browser-filter-status/customElement.js +1 -1
  174. package/dist/components/arcgis-portal-browser-pagination/customElement.js +1 -1
  175. package/dist/components/arcgis-portal-browser-search/customElement.js +1 -1
  176. package/dist/components/arcgis-portal-browser-sort/customElement.js +1 -1
  177. package/dist/components/arcgis-portal-browser-top-bar/customElement.js +1 -1
  178. package/dist/components/arcgis-portal-browser-view/customElement.js +1 -1
  179. package/dist/components/arcgis-portal-classification-banner/customElement.js +1 -1
  180. package/dist/components/arcgis-portal-classification-config/customElement.js +1 -1
  181. package/dist/components/arcgis-portal-classification-favorite/customElement.js +1 -1
  182. package/dist/components/arcgis-portal-classification-form-element/customElement.js +1 -1
  183. package/dist/components/arcgis-portal-delete-items/customElement.js +1 -1
  184. package/dist/components/arcgis-portal-delete-items-review/customElement.js +1 -1
  185. package/dist/components/arcgis-portal-entity-picker/customElement.js +1 -1
  186. package/dist/components/arcgis-portal-extent-picker/customElement.js +1 -1
  187. package/dist/components/arcgis-portal-extent-picker-coord-field/customElement.js +1 -1
  188. package/dist/components/arcgis-portal-field-delete/customElement.js +1 -1
  189. package/dist/components/arcgis-portal-group-badges/customElement.js +1 -1
  190. package/dist/components/arcgis-portal-group-browser/customElement.js +1 -1
  191. package/dist/components/arcgis-portal-group-browser-card/customElement.js +1 -1
  192. package/dist/components/arcgis-portal-group-browser-preview/customElement.js +1 -1
  193. package/dist/components/arcgis-portal-group-browser-preview-card/customElement.js +1 -1
  194. package/dist/components/arcgis-portal-group-card/customElement.js +17 -17
  195. package/dist/components/arcgis-portal-group-picker/customElement.js +1 -1
  196. package/dist/components/arcgis-portal-group-thumbnail/customElement.js +1 -1
  197. package/dist/components/arcgis-portal-info-banner/customElement.js +1 -1
  198. package/dist/components/arcgis-portal-item-actions/customElement.js +1 -1
  199. package/dist/components/arcgis-portal-item-badge/customElement.js +1 -1
  200. package/dist/components/arcgis-portal-item-badges/customElement.js +1 -1
  201. package/dist/components/arcgis-portal-item-card/customElement.js +59 -59
  202. package/dist/components/arcgis-portal-item-favorite/customElement.js +1 -1
  203. package/dist/components/arcgis-portal-item-picker/customElement.js +1 -1
  204. package/dist/components/arcgis-portal-item-thumbnail/customElement.js +1 -1
  205. package/dist/components/arcgis-portal-item-type/customElement.js +1 -1
  206. package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +1 -1
  207. package/dist/components/arcgis-portal-navigation/customElement.js +1 -1
  208. package/dist/components/arcgis-portal-navigation/index.js +4 -4
  209. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +1 -1
  210. package/dist/components/arcgis-portal-review-related-items/customElement.js +1 -1
  211. package/dist/components/arcgis-portal-sublayer-type/customElement.js +1 -1
  212. package/dist/components/arcgis-portal-user-avatar/customElement.js +1 -1
  213. package/dist/components/arcgis-portal-user-picker/customElement.js +1 -1
  214. package/dist/components/arcgis-portal-user-popup/customElement.js +1 -1
  215. package/dist/components/arcgis-portal-voice-input/customElement.js +1 -1
  216. package/dist/components/portal-browser/components/portal-browser-filter/customElement.js +1 -1
  217. package/dist/components/portal-browser/components/portal-browser-filter-date/customElement.js +1 -1
  218. package/dist/components/portal-browser/components/portal-browser-filters/customElement.js +1 -1
  219. package/dist/components/portal-group-browser-filters/customElement.js +1 -1
  220. package/dist/components/portal-group-browser-pagination/customElement.js +1 -1
  221. package/dist/components/portal-group-browser-sort/customElement.js +1 -1
  222. package/dist/components/portal-related-items-list-item/customElement.js +1 -1
  223. package/dist/docs/api.json +1 -1
  224. package/dist/docs/docs.json +1 -1
  225. package/dist/docs/vscode.html-custom-data.json +1 -1
  226. package/dist/docs/web-types.json +1 -1
  227. package/dist/index.js +1 -1
  228. package/dist/loader.js +1 -1
  229. package/dist/types/lumina.d.ts +6 -6
  230. package/dist/types/preact.d.ts +6 -6
  231. package/dist/types/react.d.ts +6 -6
  232. package/dist/types/stencil.d.ts +6 -6
  233. package/package.json +7 -7
  234. package/dist/cdn/23FS4XTG.js +0 -2
  235. package/dist/cdn/2MPQ5IWJ.js +0 -2
  236. package/dist/cdn/46BUEBWS.js +0 -2
  237. package/dist/cdn/4AI52H7C.js +0 -2
  238. package/dist/cdn/5PPZNVWG.js +0 -2
  239. package/dist/cdn/66XWNGQ2.js +0 -2
  240. package/dist/cdn/6F4SJDRR.js +0 -2
  241. package/dist/cdn/7ZWYUHGK.js +0 -2
  242. package/dist/cdn/AJQT7UXB.js +0 -2
  243. package/dist/cdn/AZOJHVAO.js +0 -2
  244. package/dist/cdn/BSTA5KI5.js +0 -2
  245. package/dist/cdn/DYO5P3F2.js +0 -2
  246. package/dist/cdn/E3INH2O6.js +0 -2
  247. package/dist/cdn/E66BDC6N.js +0 -2
  248. package/dist/cdn/EEAVX4PP.js +0 -2
  249. package/dist/cdn/EITRZQSC.js +0 -2
  250. package/dist/cdn/FIBQAMJ3.js +0 -2
  251. package/dist/cdn/FNLBJ4ZQ.js +0 -2
  252. package/dist/cdn/GXM3XY3J.js +0 -2
  253. package/dist/cdn/I6NVKNZJ.js +0 -2
  254. package/dist/cdn/J5FKIZAM.js +0 -2
  255. package/dist/cdn/JL52W3Z4.js +0 -2
  256. package/dist/cdn/N4VOTJ25.js +0 -2
  257. package/dist/cdn/NRMQDCM3.js +0 -2
  258. package/dist/cdn/RVYSVTPQ.js +0 -2
  259. package/dist/cdn/SLQQ44IA.js +0 -2
  260. package/dist/cdn/WC3FPLYQ.js +0 -2
  261. package/dist/cdn/YYTEJVBL.js +0 -2
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as v}from"./K2XSYDAP.js";import{t as y,u as m,y as h}from"./AICPYLWE.js";export default $arcgis.t(([{on:B,watch:E},{createObservable:x,trackAccess:w},{property:C,subclass:b},g])=>{var Y=(r,e)=>n=>P(n,r),u=class extends h{constructor(e,n){super(e),this.Y=new Map,this.A=void 0,this.#o=x();let t=this;t.#e=n,t.Z(),t.setProvisionalExports(k(e,new WeakRef(t),e.M.length-1,t.instance,t.Y),!1),y(e,s=>{if(s){let c=E(()=>e[s],o=>{if(o===t.instance)return;let i=t.instance;t.exports=o,t.instance=o,t.Y.forEach((a,l)=>e.requestUpdate(a,i[l])),t.#t&&i.destroy(),t.#t=!1},{sync:!0});t.onDestroy(c.remove)}},t.exports)}#t;#o;#e;get exports(){return w(this.#o),super.exports}set exports(e){super.exports=e,this.#o.notify()}Z(){let e=this;e.instance="prototype"in e.#e&&"declaredClass"in e.#e.prototype?new e.#e:e.#e(),e.#t=!0}hostConnected(){this.exports=this.instance}hostDestroy(){this.#t&&this.instance.destroy?.()}},P=v(u),k=(r,e,n,t,s)=>new Proxy(t,{get:(c,o)=>{let i=c[o];if(typeof o=="symbol"||s.has(o))return i;let a=r.M[n];return a.A=o,m(r,l=>{if(a.A=void 0,l!==void 0){let p=l.key;s.set(o,p);let d=r.constructor.getPropertyOptions(p),f=o!==p&&p.toLowerCase().includes("disable");A(e,d,o,p,f),d.i===void 0&&O(d,n,o,f)}},i)}}),A=(r,e,n,t,s,c)=>c=E(()=>{let o=r.deref();return o===void 0||o.component.manager.destroyed?c=c.remove():o.exports[n]},(o,i)=>{if(!c)return;r.deref().component?.requestUpdate(t,s?!i:i),e.c=!1},{sync:!0}),O=(r,e,n,t)=>{r.d.get=function(){let s=this.M[e]?.exports[n];return t?!s:s},r.d.set=function(s){let c=this.M[e];c.A!==n&&(c.exports[n]=t?!s:s)}};var T=r=>{let e=class extends g{},n=typeof r=="function"?r():r,t=Object.getOwnPropertyDescriptors(n);for(let[c,o]of Object.entries(t))Object.defineProperty(e.prototype,c,o),C()(e.prototype,c);let s=b()(e);return new s};return{a:Y,b:T}},"core/reactiveUtils","applications/Components/reactiveUtils","core/accessorSupport/decorators","core/Accessor")
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as v}from"./6BMWSGLA.js";import{t as y,u as m,y as h}from"./CWSEBETE.js";export default $arcgis.t(([{on:B,watch:E},{createObservable:x,trackAccess:w},{property:C,subclass:b},g])=>{var Y=(r,e)=>n=>P(n,r),u=class extends h{constructor(e,n){super(e),this.Y=new Map,this.A=void 0,this.#o=x();let t=this;t.#e=n,t.Z(),t.setProvisionalExports(k(e,new WeakRef(t),e.M.length-1,t.instance,t.Y),!1),y(e,s=>{if(s){let c=E(()=>e[s],o=>{if(o===t.instance)return;let i=t.instance;t.exports=o,t.instance=o,t.Y.forEach((a,l)=>e.requestUpdate(a,i[l])),t.#t&&i.destroy(),t.#t=!1},{sync:!0});t.onDestroy(c.remove)}},t.exports)}#t;#o;#e;get exports(){return w(this.#o),super.exports}set exports(e){super.exports=e,this.#o.notify()}Z(){let e=this;e.instance="prototype"in e.#e&&"declaredClass"in e.#e.prototype?new e.#e:e.#e(),e.#t=!0}hostConnected(){this.exports=this.instance}hostDestroy(){this.#t&&this.instance.destroy?.()}},P=v(u),k=(r,e,n,t,s)=>new Proxy(t,{get:(c,o)=>{let i=c[o];if(typeof o=="symbol"||s.has(o))return i;let a=r.M[n];return a.A=o,m(r,l=>{if(a.A=void 0,l!==void 0){let p=l.key;s.set(o,p);let d=r.constructor.getPropertyOptions(p),f=o!==p&&p.toLowerCase().includes("disable");A(e,d,o,p,f),d.i===void 0&&O(d,n,o,f)}},i)}}),A=(r,e,n,t,s,c)=>c=E(()=>{let o=r.deref();return o===void 0||o.component.manager.destroyed?c=c.remove():o.exports[n]},(o,i)=>{if(!c)return;r.deref().component?.requestUpdate(t,s?!i:i),e.c=!1},{sync:!0}),O=(r,e,n,t)=>{r.d.get=function(){let s=this.M[e]?.exports[n];return t?!s:s},r.d.set=function(s){let c=this.M[e];c.A!==n&&(c.exports[n]=t?!s:s)}};var T=r=>{let e=class extends g{},n=typeof r=="function"?r():r,t=Object.getOwnPropertyDescriptors(n);for(let[c,o]of Object.entries(t))Object.defineProperty(e.prototype,c,o),C()(e.prototype,c);let s=b()(e);return new s};return{a:Y,b:T}},"core/reactiveUtils","applications/Components/reactiveUtils","core/accessorSupport/decorators","core/Accessor")
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as f,b as S,c as O}from"./U3KMGSVH.js";import a from"./XYMBRPC7.js";import"./4KTRAA2J.js";import{d as E}from"./K75JTQPW.js";import"./KV4ZZSNW.js";import{c as R}from"./EMJQI4MA.js";import{L,M as x,O as U,R as P,h as I,j as y,w as M}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([{execute:K},{a:v,h:w}])=>{function z(t){return t?`${t.xmin},${t.ymin},${t.xmax},${t.ymax}`:""}function V(t){return t&&t.xmin>=-180&&t.xmax<=180&&t.ymin>=-90&&t.ymax<=90&&t.xmin<=t.xmax&&t.ymin<=t.ymax?[[t.xmin,t.ymin],[t.xmax,t.ymax]]:[[-180,-90],[180,90]]}var m=document.createElement("div");m.style.height="532px";m.style.left="-10000px";m.style.position="absolute";m.style.top="-10000px";m.style.width="800px";async function A({item:t,portal:e,serviceInfo:a}){let i=t.thumbnailUrl,n=t.url??"",r=["Map Service","Feature Service","Image Service"];if(i)return i;if(!r.includes(t.type??""))return"";if(t.type==="Map Service"||t.type==="Image Service"||n.includes("/MapServer")){let l=z(t.extent);return l?G({serviceUrl:n,extent:l,size:"800,532",format:"image",serviceInfo:a}):""}return t.type==="Feature Service"?await j(t,e):""}function G({visibleLayers:t,serviceUrl:e,serviceInfo:a,size:i,extent:n,bboxSR:r,imageSR:l,format:h}){if(!a)return"";let s=e,u=s.includes("/MapServer"),p=t,d=s.indexOf("/MapServer");if(!p&&u&&d!==-1){let g=s.indexOf("?");p=g>-1?s.substring(d+11,g):s.substring(d+11),s=g>-1?s.substring(0,d+10)+s.substring(g):s.substring(0,d+10)}u||(u=!!(a.capabilities?.toLowerCase().includes("map")||a.supportedImageFormatTypes));let c=s.indexOf("?"),o;if(c===-1)if(u)o=`${s}/export?`;else{if((a.currentVersion??0)>=10.1)return`${s}/info/thumbnail`;o=`${s}/exportImage?`}else if(u)o=`${s.substring(0,c)}/export${s.substring(c)}&`;else{if((a.currentVersion??0)>=10.1)return`${s.substring(0,c)}/info/thumbnail${s.substring(c)}`;o=`${s.substring(0,c)}/exportImage${s.substring(c)}&`}return o+=`size=${i}&bbox=${n}`,r&&(o+=`&bboxSR=${r}`),l&&(o+=`&imageSR=${l}`),u?(o+=a.supportedImageFormatTypes?.includes("PNG32")?`&format=png32&f=${h}`:`&format=png24&f=${h}`,p&&(o+=`&layers=show:${p}`)):o+=`&format=jpgpng&f=${h}&interpolation=RSP_NearestNeighbor&bandIds=null`,o}async function j(t,e){if(!e||!t.id)return"";m.isConnected||document.body.append(m);let a,i;try{let[{default:n},{default:r},{default:l},h,{default:s},{default:u},{default:p},{default:d}]=await Promise.all([$arcgis.t(m=>m[0],"Basemap"),$arcgis.t(m=>m[0],"layers/FeatureLayer"),$arcgis.t(m=>m[0],"Map"),$arcgis.t(m=>m[0],"rest/print"),$arcgis.t(m=>m[0],"rest/support/PrintParameters"),$arcgis.t(m=>m[0],"rest/support/PrintTemplate"),$arcgis.t(m=>m[0],"smartMapping/heuristics/scaleRange"),$arcgis.t(m=>m[0],"views/MapView")]),c=new r({portalItem:{id:t.id,portal:e}}),o=e.defaultBasemap?.id??"",g=o.includes("basemap")?"topo-vector":new n({portalItem:{id:o,portal:e}});a=new l({basemap:g}),i=new d({map:a,container:m}),await i.when();let $=0,b=0;o.includes("basemap")||({minScale:$,maxScale:b}=await p({layer:c,view:i}));let k=await c.queryExtent();if(!k.extent)return"";await i.goTo(k.extent),c.minScale=$,c.maxScale=b,a.add(c),i.scale=b,await new Promise(D=>setTimeout(D,2e3));let N=e.helperServices?.printTask?.url??"https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task",_=new u({format:"png32",exportOptions:{dpi:96,width:800,height:532},layout:"map-only",showLabels:!1,attributionVisible:!1});return(await h.execute(N,new s({view:i,template:_}))).url??""}catch{return""}finally{i?.destroy(),a?.destroy()}}async function F({webMap:t,extent:e,portal:a,spatialReference:i}){let n=a?.helperServices?.printTask?.url;if(!n)return"";let r={Web_Map_as_JSON:JSON.stringify({...t,mapOptions:{showAttribution:!1,extent:{xmin:e[0][0],ymin:e[0][1],xmax:e[1][0],ymax:e[1][1],spatialReference:{wkid:4326}},spatialReference:i},exportOptions:{dpi:96,outputSize:[600,400]},layoutOptions:{}}),Format:"PNG32",Layout_Template:"MAP_ONLY"};return(await K(n,r)).results?.find(l=>l.dataType==="data-file")?.value?.url??""}async function W({item:t,portal:e}){let a=t.url||(e&&t.id?`${v(t.id,e)}/data`:"");if(!a||!e?.defaultBasemap)return"";let i=new URL(a),n=new URL(e.restUrl).hostname,r=E(e);r&&i.hostname===n&&i.searchParams.set("token",r);let l={baseMap:{...e.defaultBasemap.toJSON(),title:"basemap"},operationalLayers:[{url:i.toString(),id:`KML_${t.id}`,opacity:1,title:t.title,visibility:!0,type:"KML"}]};return await F({webMap:l,extent:V(t.extent),portal:e,spatialReference:{wkid:4326}})}async function B({item:t,portal:e}){if(!e||!t.id)return"";let a=v(t.id,e),i={operationalLayers:[],baseMap:{baseMapLayers:[{id:t.id,type:"VectorTileLayer",layerType:"VectorTileLayer",title:t.title,styleUrl:`${a}/resources/styles/root.json`,visibility:!0,opacity:1}],title:"Topographic"},spatialReference:{wkid:102100,latestWkid:3857},authoringApp:"WebMapViewer",authoringAppVersion:"5.3",version:"2.10"};return await F({webMap:i,extent:V(t.extent),portal:e,spatialReference:{wkid:102100}})}async function C({item:t,portal:e,serviceInfo:a}){let i=f(t),n=t.type??"",r;try{R(["Image Service","Map Service","Feature Service"],n)&&(r=await A({item:t,portal:e,serviceInfo:a})||i),n==="Vector Tile Service"&&(r=await B({item:t,portal:e})||i),n==="KML"&&(r=await W({item:t,portal:e})||i)}catch{return{error:{code:"unhandledError"}}}return{result:r??i}}function J(t,e){if(!t)return!1;let a=t.includes("thumbnail/ago_downloaded."),i=t.includes("Utilities/PrintingTools");return!t.includes("images/transparent.gif")&&(e?.isPortal?!i:!a)}function q(t,e){let a=!!e&&w(t,e),i=t.type==="Dashboard";return!S(t)&&a&&i}function H(t,e,a){let i=S(t),n=J(i,e),r=["Feature Service","Vector Tile Service"].includes(t.type)&&!n,l=t.type==="Feature Service"&&t.typeKeywords?.includes("Location Tracking Service"),h=t.typeKeywords?.includes("Table");if(t.type==="Image"||i&&!r||l||h)return!1;let s=t.typeKeywords?.includes("Tiled Imagery"),u=t.type==="Image Service"&&!s||t.type==="Map Service",p=!!a&&w(t,a);return p&&u||p&&t.type==="Feature Service"||t.type==="Vector Tile Service"||p&&t.type==="KML"}var Q=I`:host{display:block;height:100%;position:relative;width:100%}.outer{position:relative;width:100%;height:100%;aspect-ratio:3 / 2;min-height:0}.inner{position:absolute;inset:0;background-color:var(--calcite-color-background)}.inner--loading{animation:thumbnail-shimmer 1s linear infinite;background-image:linear-gradient(to right,var(--calcite-color-background) 0%,var(--calcite-color-foreground-2),var(--calcite-color-background) 40%,var(--calcite-color-background) 100%);background-repeat:no-repeat;background-size:800px 100%}.thumbnail{display:block;width:100%;height:100%;object-fit:cover;opacity:1;transition:opacity .3s linear}.thumbnail--loading{opacity:0}.fallback{display:flex;height:100%;width:100%;align-items:center;justify-content:center;background-color:var(--calcite-color-foreground-2);color:var(--calcite-color-text-3)}@keyframes thumbnail-shimmer{0%{background-position:-468px 0}to{background-position:468px 0}}`,T=class extends L{constructor(){super(...arguments),this.generating=!1,this.imageError=!1,this.loading=!0,this.thumbnailUri=null,this.useDefaultThumbnail=!1,this.useProduction=!1,this.generate=!1,this.arcgisItemThumbnailGenerated=M()}static{this.properties={imageError:16,loading:16,thumbnailUri:16,useDefaultThumbnail:16,item:0,user:0,portal:0,useProduction:5,generate:5,serviceInfo:0,cacheString:1}}static{this.styles=Q}async generateThumbnail(e=!1){let{item:a,portal:i}=this;if(this.loading=!0,this.generating)return this.thumbnailUri??"";try{this.generating=!0;let n=e?f(a):await C({item:a,portal:i,serviceInfo:this.serviceInfo}),r=typeof n=="string"?n:n.result??f(a);return this.thumbnailUri=r,this.useDefaultThumbnail=!1,this.arcgisItemThumbnailGenerated.emit(r),this.generating=!1,r}catch{return this.generating=!1,""}}willUpdate(e){(e.has("item")||e.has("portal")||e.has("user")||e.has("useProduction")||e.has("cacheString")||e.has("generate"))&&this.updateThumbnail()}async updateThumbnail(){let{item:e,portal:a,user:i}=this;this.imageError=!1,this.useDefaultThumbnail=!1;let n=this.generate&&H(e,a,i),r=this.generate&&q(e,i);n&&await this.generateThumbnail()||(this.thumbnailUri=r?f(e):O(a,e,!1,this.useProduction,this.cacheString),r&&await this.generateThumbnail(!0))}render(){let e=this.thumbnailUri;return this.imageError?null:y`<div class="outer"><div class=${x({inner:!0,"inner--loading":this.loading})}>${e?y`<img class=${x({thumbnail:!0,"thumbnail--loading":this.loading})} src=${e??U} alt @load=${()=>{this.loading=!1}} @error=${()=>{if(!this.useDefaultThumbnail&&this.item){this.loading=!0,this.useDefaultThumbnail=!0,this.thumbnailUri=f(this.item);return}this.imageError=!0,this.loading=!1}}>`:null}</div></div>`}};P("arcgis-portal-item-thumbnail",T);return T},"rest/geoprocessor",a)
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as f,b as S,c as O}from"./USGROSML.js";import a from"./TJYPEMON.js";import"./ILDTKRON.js";import{d as E}from"./VMQIDO4Z.js";import"./QS3GXAIH.js";import{c as R}from"./2GBRZSEC.js";import{L,M as x,O as U,R as P,h as I,j as y,w as M}from"./CWSEBETE.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";export default $arcgis.t(([{execute:K},{a:v,h:w}])=>{function z(t){return t?`${t.xmin},${t.ymin},${t.xmax},${t.ymax}`:""}function V(t){return t&&t.xmin>=-180&&t.xmax<=180&&t.ymin>=-90&&t.ymax<=90&&t.xmin<=t.xmax&&t.ymin<=t.ymax?[[t.xmin,t.ymin],[t.xmax,t.ymax]]:[[-180,-90],[180,90]]}var m=document.createElement("div");m.style.height="532px";m.style.left="-10000px";m.style.position="absolute";m.style.top="-10000px";m.style.width="800px";async function A({item:t,portal:e,serviceInfo:a}){let i=t.thumbnailUrl,n=t.url??"",r=["Map Service","Feature Service","Image Service"];if(i)return i;if(!r.includes(t.type??""))return"";if(t.type==="Map Service"||t.type==="Image Service"||n.includes("/MapServer")){let l=z(t.extent);return l?G({serviceUrl:n,extent:l,size:"800,532",format:"image",serviceInfo:a}):""}return t.type==="Feature Service"?await j(t,e):""}function G({visibleLayers:t,serviceUrl:e,serviceInfo:a,size:i,extent:n,bboxSR:r,imageSR:l,format:h}){if(!a)return"";let s=e,u=s.includes("/MapServer"),p=t,d=s.indexOf("/MapServer");if(!p&&u&&d!==-1){let g=s.indexOf("?");p=g>-1?s.substring(d+11,g):s.substring(d+11),s=g>-1?s.substring(0,d+10)+s.substring(g):s.substring(0,d+10)}u||(u=!!(a.capabilities?.toLowerCase().includes("map")||a.supportedImageFormatTypes));let c=s.indexOf("?"),o;if(c===-1)if(u)o=`${s}/export?`;else{if((a.currentVersion??0)>=10.1)return`${s}/info/thumbnail`;o=`${s}/exportImage?`}else if(u)o=`${s.substring(0,c)}/export${s.substring(c)}&`;else{if((a.currentVersion??0)>=10.1)return`${s.substring(0,c)}/info/thumbnail${s.substring(c)}`;o=`${s.substring(0,c)}/exportImage${s.substring(c)}&`}return o+=`size=${i}&bbox=${n}`,r&&(o+=`&bboxSR=${r}`),l&&(o+=`&imageSR=${l}`),u?(o+=a.supportedImageFormatTypes?.includes("PNG32")?`&format=png32&f=${h}`:`&format=png24&f=${h}`,p&&(o+=`&layers=show:${p}`)):o+=`&format=jpgpng&f=${h}&interpolation=RSP_NearestNeighbor&bandIds=null`,o}async function j(t,e){if(!e||!t.id)return"";m.isConnected||document.body.append(m);let a,i;try{let[{default:n},{default:r},{default:l},h,{default:s},{default:u},{default:p},{default:d}]=await Promise.all([$arcgis.t(m=>m[0],"Basemap"),$arcgis.t(m=>m[0],"layers/FeatureLayer"),$arcgis.t(m=>m[0],"Map"),$arcgis.t(m=>m[0],"rest/print"),$arcgis.t(m=>m[0],"rest/support/PrintParameters"),$arcgis.t(m=>m[0],"rest/support/PrintTemplate"),$arcgis.t(m=>m[0],"smartMapping/heuristics/scaleRange"),$arcgis.t(m=>m[0],"views/MapView")]),c=new r({portalItem:{id:t.id,portal:e}}),o=e.defaultBasemap?.id??"",g=o.includes("basemap")?"topo-vector":new n({portalItem:{id:o,portal:e}});a=new l({basemap:g}),i=new d({map:a,container:m}),await i.when();let $=0,b=0;o.includes("basemap")||({minScale:$,maxScale:b}=await p({layer:c,view:i}));let k=await c.queryExtent();if(!k.extent)return"";await i.goTo(k.extent),c.minScale=$,c.maxScale=b,a.add(c),i.scale=b,await new Promise(D=>setTimeout(D,2e3));let N=e.helperServices?.printTask?.url??"https://utility.arcgisonline.com/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task",_=new u({format:"png32",exportOptions:{dpi:96,width:800,height:532},layout:"map-only",showLabels:!1,attributionVisible:!1});return(await h.execute(N,new s({view:i,template:_}))).url??""}catch{return""}finally{i?.destroy(),a?.destroy()}}async function F({webMap:t,extent:e,portal:a,spatialReference:i}){let n=a?.helperServices?.printTask?.url;if(!n)return"";let r={Web_Map_as_JSON:JSON.stringify({...t,mapOptions:{showAttribution:!1,extent:{xmin:e[0][0],ymin:e[0][1],xmax:e[1][0],ymax:e[1][1],spatialReference:{wkid:4326}},spatialReference:i},exportOptions:{dpi:96,outputSize:[600,400]},layoutOptions:{}}),Format:"PNG32",Layout_Template:"MAP_ONLY"};return(await K(n,r)).results?.find(l=>l.dataType==="data-file")?.value?.url??""}async function W({item:t,portal:e}){let a=t.url||(e&&t.id?`${v(t.id,e)}/data`:"");if(!a||!e?.defaultBasemap)return"";let i=new URL(a),n=new URL(e.restUrl).hostname,r=E(e);r&&i.hostname===n&&i.searchParams.set("token",r);let l={baseMap:{...e.defaultBasemap.toJSON(),title:"basemap"},operationalLayers:[{url:i.toString(),id:`KML_${t.id}`,opacity:1,title:t.title,visibility:!0,type:"KML"}]};return await F({webMap:l,extent:V(t.extent),portal:e,spatialReference:{wkid:4326}})}async function B({item:t,portal:e}){if(!e||!t.id)return"";let a=v(t.id,e),i={operationalLayers:[],baseMap:{baseMapLayers:[{id:t.id,type:"VectorTileLayer",layerType:"VectorTileLayer",title:t.title,styleUrl:`${a}/resources/styles/root.json`,visibility:!0,opacity:1}],title:"Topographic"},spatialReference:{wkid:102100,latestWkid:3857},authoringApp:"WebMapViewer",authoringAppVersion:"5.3",version:"2.10"};return await F({webMap:i,extent:V(t.extent),portal:e,spatialReference:{wkid:102100}})}async function C({item:t,portal:e,serviceInfo:a}){let i=f(t),n=t.type??"",r;try{R(["Image Service","Map Service","Feature Service"],n)&&(r=await A({item:t,portal:e,serviceInfo:a})||i),n==="Vector Tile Service"&&(r=await B({item:t,portal:e})||i),n==="KML"&&(r=await W({item:t,portal:e})||i)}catch{return{error:{code:"unhandledError"}}}return{result:r??i}}function J(t,e){if(!t)return!1;let a=t.includes("thumbnail/ago_downloaded."),i=t.includes("Utilities/PrintingTools");return!t.includes("images/transparent.gif")&&(e?.isPortal?!i:!a)}function q(t,e){let a=!!e&&w(t,e),i=t.type==="Dashboard";return!S(t)&&a&&i}function H(t,e,a){let i=S(t),n=J(i,e),r=["Feature Service","Vector Tile Service"].includes(t.type)&&!n,l=t.type==="Feature Service"&&t.typeKeywords?.includes("Location Tracking Service"),h=t.typeKeywords?.includes("Table");if(t.type==="Image"||i&&!r||l||h)return!1;let s=t.typeKeywords?.includes("Tiled Imagery"),u=t.type==="Image Service"&&!s||t.type==="Map Service",p=!!a&&w(t,a);return p&&u||p&&t.type==="Feature Service"||t.type==="Vector Tile Service"||p&&t.type==="KML"}var Q=I`:host{display:block;height:100%;position:relative;width:100%}.outer{position:relative;width:100%;height:100%;aspect-ratio:3 / 2;min-height:0}.inner{position:absolute;inset:0;background-color:var(--calcite-color-background)}.inner--loading{animation:thumbnail-shimmer 1s linear infinite;background-image:linear-gradient(to right,var(--calcite-color-background) 0%,var(--calcite-color-foreground-2),var(--calcite-color-background) 40%,var(--calcite-color-background) 100%);background-repeat:no-repeat;background-size:800px 100%}.thumbnail{display:block;width:100%;height:100%;object-fit:cover;opacity:1;transition:opacity .3s linear}.thumbnail--loading{opacity:0}.fallback{display:flex;height:100%;width:100%;align-items:center;justify-content:center;background-color:var(--calcite-color-foreground-2);color:var(--calcite-color-text-3)}@keyframes thumbnail-shimmer{0%{background-position:-468px 0}to{background-position:468px 0}}`,T=class extends L{constructor(){super(...arguments),this.generating=!1,this.imageError=!1,this.loading=!0,this.thumbnailUri=null,this.useDefaultThumbnail=!1,this.useProduction=!1,this.generate=!1,this.arcgisItemThumbnailGenerated=M()}static{this.properties={imageError:16,loading:16,thumbnailUri:16,useDefaultThumbnail:16,item:0,user:0,portal:0,useProduction:5,generate:5,serviceInfo:0,cacheString:1}}static{this.styles=Q}async generateThumbnail(e=!1){let{item:a,portal:i}=this;if(this.loading=!0,this.generating)return this.thumbnailUri??"";try{this.generating=!0;let n=e?f(a):await C({item:a,portal:i,serviceInfo:this.serviceInfo}),r=typeof n=="string"?n:n.result??f(a);return this.thumbnailUri=r,this.useDefaultThumbnail=!1,this.arcgisItemThumbnailGenerated.emit(r),this.generating=!1,r}catch{return this.generating=!1,""}}willUpdate(e){(e.has("item")||e.has("portal")||e.has("user")||e.has("useProduction")||e.has("cacheString")||e.has("generate"))&&this.updateThumbnail()}async updateThumbnail(){let{item:e,portal:a,user:i}=this;this.imageError=!1,this.useDefaultThumbnail=!1;let n=this.generate&&H(e,a,i),r=this.generate&&q(e,i);n&&await this.generateThumbnail()||(this.thumbnailUri=r?f(e):O(a,e,!1,this.useProduction,this.cacheString),r&&await this.generateThumbnail(!0))}render(){let e=this.thumbnailUri;return this.imageError?null:y`<div class="outer"><div class=${x({inner:!0,"inner--loading":this.loading})}>${e?y`<img class=${x({thumbnail:!0,"thumbnail--loading":this.loading})} src=${e??U} alt @load=${()=>{this.loading=!1}} @error=${()=>{if(!this.useDefaultThumbnail&&this.item){this.loading=!0,this.useDefaultThumbnail=!0,this.thumbnailUri=f(this.item);return}this.imageError=!0,this.loading=!1}}>`:null}</div></div>`}};P("arcgis-portal-item-thumbnail",T);return T},"rest/geoprocessor",a)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import e from"./4ZTWQN6Q.js";import"./6TO2BYXU.js";import d from"./MQISQ7P3.js";import"./6KVA4AKM.js";import"./ILDTKRON.js";import"./CFBSBZSS.js";import"./25XJ66JO.js";import"./5YDITHQA.js";import c from"./RBGARTND.js";import b from"./F3ODJVJC.js";import a from"./OUFIJDIW.js";import"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import"./XUPYBBRI.js";import"./C5U7YKVI.js";import"./6BMWSGLA.js";import"./CWSEBETE.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";export default $arcgis.t(([,,,,{b:r}])=>{return r},a,b,c,d,e)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import h from"./E3FQ4QWE.js";import"./BIXJGL7B.js";import g from"./47PU5HDG.js";import f from"./IXSEMBHA.js";import"./ILDTKRON.js";import d from"./6EY5GHKE.js";import"./CFBSBZSS.js";import"./QDWOQBO3.js";import"./UZCHLKLO.js";import"./25XJ66JO.js";import"./5YDITHQA.js";import c from"./RBGARTND.js";import b from"./F3ODJVJC.js";import"./OV5O7YP4.js";import"./KYNL256E.js";import a from"./OUFIJDIW.js";import"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import"./XUPYBBRI.js";import"./C5U7YKVI.js";import"./6BMWSGLA.js";import{R as e}from"./CWSEBETE.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";export default $arcgis.t(([,,,,,,r])=>{var t=class extends r{constructor(){super(...arguments),this.entityType="item",this.selected=null}static{this.properties={entityType:32,selected:0}}};e("arcgis-portal-item-picker",t);return t},a,b,c,d,f,g,h)
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import f from"./I273CANO.js";import{a as w,b as P}from"./OR6T5SB3.js";import e from"./TGCJUIEL.js";import c from"./5HZNBMW6.js";import a from"./ROX3GKKA.js";import{a as S}from"./7ZWYUHGK.js";import{a as E,e as I}from"./A2SQ4EMZ.js";import"./K2XSYDAP.js";import{J as d,K as m,L as b,O as C,R as y,h as g,j as n}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.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)
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import f from"./7NQY5QJK.js";import{a as w,b as P}from"./KIKEE2KY.js";import e from"./Q75EBGI2.js";import c from"./LNWWUPFK.js";import a from"./F3ODJVJC.js";import{a as S}from"./XUPYBBRI.js";import{a as E,e as I}from"./C5U7YKVI.js";import"./6BMWSGLA.js";import{J as d,K as m,L as b,O as C,R as y,h as g,j as n}from"./CWSEBETE.js";import"./R74ZHFA6.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)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as r}from"./23X56P4K.js";import{a as g}from"./XUPYBBRI.js";import"./C5U7YKVI.js";import"./6BMWSGLA.js";import{J as a,K as o,L as l,R as n,j as c,w as i}from"./CWSEBETE.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";export default $arcgis.t(([{substitute:m}])=>{var s=class extends l{constructor(){super(...arguments),this.messages=g({blocking:!0,name:"portal-account-switcher"}),this.dialogRef=a(),this.signedInAccounts=[],this.arcgisSignOutSwitchAccount=i(),this.arcgisSignOutAll=i(),this.arcgisSignOutCloseDialog=i()}static{this.properties={portal:0,signedInAccounts:0}}static{this.styles=r}render(){let{messages:t,portal:e,signedInAccounts:u}=this,d=e.user?.username??"";return c`<calcite-dialog scale=m width=s open outside-close-disabled close-disabled modal kind=success .heading=${t.signedOut} heading-level=2 @calciteDialogClose=${()=>this.arcgisSignOutCloseDialog.emit()} ${o(this.dialogRef)}><calcite-notice kind=neutral open width=full><h3 slot=title class="notice-title" .innerHTML=${m(t.signedOutHeader,{username:d})??""}></h3><p slot=message class="account-description">${t.closeWindow}</p></calcite-notice><calcite-block .heading=${t.stillSignedIn} .description=${t.clickToSwitch} expanded heading-level=3><arcgis-portal-account-switcher-list .portal=${e} .linkedAccounts=${u} .actions=${["switch"]} interactive @arcgisAccountListSwitch=${h=>{this.arcgisSignOutSwitchAccount.emit(h.detail)}}></arcgis-portal-account-switcher-list></calcite-block><calcite-button slot=footer width=full @click=${()=>this.arcgisSignOutAll.emit()}>${t.signOutAll}</calcite-button></calcite-dialog>`}};n("arcgis-portal-account-switcher-signout",s);return s},"intl")
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{b as y}from"./VDXESPJK.js";import a from"./PMRFXB4F.js";export default $arcgis.t(([{a:$,b:i}])=>{async function k(a,s,o,t,r){let l=a.portal?.portalHostname||t?.portalHostname||t?.restUrl?.replace("/sharing/rest",""),p=r?`https://www.arcgis.com/sharing/rest/portals/${s}`:`https://${l}/sharing/rest/portals/${s}`;if(!l&&!r)return null;let c=r?{disableIdentityLookup:!0,addTokenManually:!1}:{},e=await i({url:p,portal:t,options:c}),{urlKey:g,thumbnail:u,customBaseUrl:w}=e,m=`https://${g}.${w}/`,b=u?`${m}sharing/rest/portals/self/resources/${u}`:null,d="",f="";try{let n=await i({url:`${p}/resources/localizedOrgProperties`,portal:t,params:{start:1,num:100},options:c});if(n){let h=n[o]||n.default;d=h.name,f=h.description}}catch{}return{name:d||e.name,description:y(f||e.description),url:`${m}home/`,thumbnail:b}}async function H(a,s,o,t){let r=a.sourceJSON?.orgId??a.portal?.id??o?.id;return await $({requester:async()=>await k(a,r,s,o,t),key:"verified",id:r})}return H},a)
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{b as y}from"./25XJ66JO.js";import a from"./OUFIJDIW.js";export default $arcgis.t(([{a:$,b:i}])=>{async function k(a,s,o,t,r){let l=a.portal?.portalHostname||t?.portalHostname||t?.restUrl?.replace("/sharing/rest",""),p=r?`https://www.arcgis.com/sharing/rest/portals/${s}`:`https://${l}/sharing/rest/portals/${s}`;if(!l&&!r)return null;let c=r?{disableIdentityLookup:!0,addTokenManually:!1}:{},e=await i({url:p,portal:t,options:c}),{urlKey:g,thumbnail:u,customBaseUrl:w}=e,m=`https://${g}.${w}/`,b=u?`${m}sharing/rest/portals/self/resources/${u}`:null,d="",f="";try{let n=await i({url:`${p}/resources/localizedOrgProperties`,portal:t,params:{start:1,num:100},options:c});if(n){let h=n[o]||n.default;d=h.name,f=h.description}}catch{}return{name:d||e.name,description:y(f||e.description),url:`${m}home/`,thumbnail:b}}async function H(a,s,o,t){let r=a.sourceJSON?.orgId??a.portal?.id??o?.id;return await $({requester:async()=>await k(a,r,s,o,t),key:"verified",id:r})}return H},a)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import c from"./JUDF3TYJ.js";import b from"./XKC6SPS4.js";import a from"./LNWWUPFK.js";import"./XUPYBBRI.js";import"./C5U7YKVI.js";import"./6BMWSGLA.js";import"./CWSEBETE.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";export default $arcgis.t(([,,a])=>{return a},a,b,c)
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{c as m}from"./A2SQ4EMZ.js";import"./K2XSYDAP.js";import{J as d,K as p,L as u,M as s,O as o,R as h,h as n,j as a,w as c}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";var v=n`.coord-field{margin-bottom:var(--calcite-spacing-sm)}.coord-label{display:block;margin-bottom:var(--calcite-spacing-sm);font-size:14px}.coordinate-input{width:100%;block-size:var(--calcite-spacing-xxxl);box-sizing:border-box;padding-inline:var(--calcite-spacing-md);font-size:14px;color:var(--calcite-color-text-3);outline-color:var(--calcite-color-brand)}.coordinate-input--error{border:1px solid var(--calcite-color-status-danger)}.coord-error-message{position:relative;max-width:100%;margin:var(--calcite-spacing-sm) 0;display:flex;font-size:14px;padding:6px 7px;background-color:var(--calcite-color-foreground-1);border:1px solid var(--calcite-color-status-danger);box-shadow:0 1px 2px #00000054}.coord-error-message:before{pointer-events:none;content:"";position:absolute;left:11px;top:-16px;width:0;height:0;border:8px solid transparent;border-bottom-color:var(--calcite-color-status-danger)}.coord-error-message:after{position:absolute;pointer-events:none;content:"";left:11px;top:-15px;width:0;height:0;border:8px solid transparent;border-bottom-color:var(--calcite-color-foreground-1)}.is-rtl .coord-error-message:before,.is-rtl .coord-error-message:after{left:initial;right:11px}.coord-error-message calcite-icon{color:var(--calcite-color-status-danger)}.coord-error-message__text{margin-left:var(--calcite-spacing-sm);margin-right:var(--calcite-spacing-sm);line-height:var(--calcite-spacing-xl)}`,l=class extends u{constructor(){super(...arguments),this._direction=m(),this.inputEl=d(),this.isInvalid=!1,this.currentError="",this.inputValue="",this.label="",this.value="",this.errorMessage="",this.min=-180,this.max=180,this.validateRelated=()=>!0,this.relatedErrorMessage="",this.inputId="",this.arcgisCoordChange=c()}static{this.properties={isInvalid:16,currentError:16,inputValue:16,label:1,value:1,errorMessage:1,min:9,max:9,validateRelated:0,relatedErrorMessage:1,inputId:1}}static{this.styles=v}checkRelatedField(){return!this.inputValue||!this.isInvalid||!this.validate(this.inputValue)?"":this.inputValue}isValid(){return!this.isInvalid}setFocus(){this.inputEl.value?.focus()}willUpdate(t){t.has("value")&&this.validate(this.value)}isValidCoord(t,e,i){if(!t?.match(/^-?[0-9]*(\.|,)?[0-9]+$/u))return!1;let r=this.parseNumber(t);return r>=e&&r<=i}validate(t){if(this.isInvalid=!this.isValidCoord(t,this.min,this.max),this.isInvalid)return this.currentError=this.errorMessage,!1;let e=this.parseNumber(t);return this.isInvalid=!this.validateRelated(e),this.isInvalid?(this.currentError=this.relatedErrorMessage,!1):!0}parseNumber(t){let e=`-${Array.from({length:10},(r,g)=>g.toString()).join("")}`,i=t.replace(",",".");return i=Array.from(i).filter(r=>e.includes(r)||r===".").join(""),parseFloat(i)}render(){return a`<div class=${s({"coord-field":!0,"is-rtl":this._direction==="rtl"})}><label class="coord-label" for=${this.inputId??o}>${this.label}</label><calcite-input-number number-button-type=none id=${this.inputId??o} class=${s({"coordinate-input":!0})} .value=${`${this.parseNumber(this.value)}`} @calciteInputNumberChange=${t=>{this.inputValue=t.target.value,this.validate(this.inputValue)&&this.arcgisCoordChange.emit(this.inputValue)}} .status=${this.isInvalid?"invalid":"valid"} ${p(this.inputEl)}></calcite-input-number>${this.isInvalid&&a`<div class="coord-error-message"><calcite-icon icon=exclamation-mark-triangle scale=s></calcite-icon><div class="coord-error-message__text">${this.currentError}</div></div>`||""}</div>`}};h("arcgis-portal-extent-picker-coord-field",l);export{l as ArcgisPortalExtentPickerCoordField};
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{c as m}from"./C5U7YKVI.js";import"./6BMWSGLA.js";import{J as d,K as p,L as u,M as s,O as o,R as h,h as n,j as a,w as c}from"./CWSEBETE.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";var v=n`.coord-field{margin-bottom:var(--calcite-spacing-sm)}.coord-label{display:block;margin-bottom:var(--calcite-spacing-sm);font-size:14px}.coordinate-input{width:100%;block-size:var(--calcite-spacing-xxxl);box-sizing:border-box;padding-inline:var(--calcite-spacing-md);font-size:14px;color:var(--calcite-color-text-3);outline-color:var(--calcite-color-brand)}.coordinate-input--error{border:1px solid var(--calcite-color-status-danger)}.coord-error-message{position:relative;max-width:100%;margin:var(--calcite-spacing-sm) 0;display:flex;font-size:14px;padding:6px 7px;background-color:var(--calcite-color-foreground-1);border:1px solid var(--calcite-color-status-danger);box-shadow:0 1px 2px #00000054}.coord-error-message:before{pointer-events:none;content:"";position:absolute;left:11px;top:-16px;width:0;height:0;border:8px solid transparent;border-bottom-color:var(--calcite-color-status-danger)}.coord-error-message:after{position:absolute;pointer-events:none;content:"";left:11px;top:-15px;width:0;height:0;border:8px solid transparent;border-bottom-color:var(--calcite-color-foreground-1)}.is-rtl .coord-error-message:before,.is-rtl .coord-error-message:after{left:initial;right:11px}.coord-error-message calcite-icon{color:var(--calcite-color-status-danger)}.coord-error-message__text{margin-left:var(--calcite-spacing-sm);margin-right:var(--calcite-spacing-sm);line-height:var(--calcite-spacing-xl)}`,l=class extends u{constructor(){super(...arguments),this._direction=m(),this.inputEl=d(),this.isInvalid=!1,this.currentError="",this.inputValue="",this.label="",this.value="",this.errorMessage="",this.min=-180,this.max=180,this.validateRelated=()=>!0,this.relatedErrorMessage="",this.inputId="",this.arcgisCoordChange=c()}static{this.properties={isInvalid:16,currentError:16,inputValue:16,label:1,value:1,errorMessage:1,min:9,max:9,validateRelated:0,relatedErrorMessage:1,inputId:1}}static{this.styles=v}checkRelatedField(){return!this.inputValue||!this.isInvalid||!this.validate(this.inputValue)?"":this.inputValue}isValid(){return!this.isInvalid}setFocus(){this.inputEl.value?.focus()}willUpdate(t){t.has("value")&&this.validate(this.value)}isValidCoord(t,e,i){if(!t?.match(/^-?[0-9]*(\.|,)?[0-9]+$/u))return!1;let r=this.parseNumber(t);return r>=e&&r<=i}validate(t){if(this.isInvalid=!this.isValidCoord(t,this.min,this.max),this.isInvalid)return this.currentError=this.errorMessage,!1;let e=this.parseNumber(t);return this.isInvalid=!this.validateRelated(e),this.isInvalid?(this.currentError=this.relatedErrorMessage,!1):!0}parseNumber(t){let e=`-${Array.from({length:10},(r,g)=>g.toString()).join("")}`,i=t.replace(",",".");return i=Array.from(i).filter(r=>e.includes(r)||r===".").join(""),parseFloat(i)}render(){return a`<div class=${s({"coord-field":!0,"is-rtl":this._direction==="rtl"})}><label class="coord-label" for=${this.inputId??o}>${this.label}</label><calcite-input-number number-button-type=none id=${this.inputId??o} class=${s({"coordinate-input":!0})} .value=${`${this.parseNumber(this.value)}`} @calciteInputNumberChange=${t=>{this.inputValue=t.target.value,this.validate(this.inputValue)&&this.arcgisCoordChange.emit(this.inputValue)}} .status=${this.isInvalid?"invalid":"valid"} ${p(this.inputEl)}></calcite-input-number>${this.isInvalid&&a`<div class="coord-error-message"><calcite-icon icon=exclamation-mark-triangle scale=s></calcite-icon><div class="coord-error-message__text">${this.currentError}</div></div>`||""}</div>`}};h("arcgis-portal-extent-picker-coord-field",l);export{l as ArcgisPortalExtentPickerCoordField};
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as b,d as k}from"./K75JTQPW.js";import"./KV4ZZSNW.js";import"./EMJQI4MA.js";import{J as c,K as h,L as g,N as f,O as $,R as d,h as m,j as l}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";var E=/^#[0-9a-f]{3}$/iu,x=/^#[0-9a-f]{6}$/iu;function u(o){return I(o)||v(o)}function I(o){return o?.length===4&&E.test(o)}function v(o){return o?.length===7&&x.test(o)}function O(o){if(!u(o))return null;let t=o.replace("#","");if(t.length===3){let[e,i,r]=t.split("");return{r:Number.parseInt(`${e}${e}`,16),g:Number.parseInt(`${i}${i}`,16),b:Number.parseInt(`${r}${r}`,16)}}return{r:Number.parseInt(t.slice(0,2),16),g:Number.parseInt(t.slice(2,4),16),b:Number.parseInt(t.slice(4,6),16)}}function w(o){let t=0;for(let i=0;i<o.length;i++)t=o.charCodeAt(i)+((t<<5)-t);let e="#";for(let i=0;i<3;i++){let r=t>>i*8&255;e+=`00${r.toString(16)}`.slice(-2)}return e}function y(o){let{r:t,g:e,b:i}=o;t/=255,e/=255,i/=255;let r=Math.max(t,e,i),n=Math.min(t,e,i),s=r-n;if(s===0)return 0;let a=0;switch(r){case t:a=(e-i)/s+(e<i?6:0);break;case e:a=(i-t)/s+2;break;default:a=(t-e)/s+4;break}return Math.round(a*60)}function M(o){let t=O(o);return t?y(t):0}var T=m`:host{display:inline-block}:host([scale="s"]){height:1.5rem;width:1.5rem;font-size:.625rem}:host([scale="m"]){height:2rem;width:2rem;font-size:.75rem}:host([scale="l"]){font-size:1rem;height:2.75rem;width:2.75rem}:host([scale="xl"]){font-size:1.25rem;height:4rem;width:4rem}.icon{display:flex;color:var(--calcite-color-text-3)}.background{position:relative;display:flex;height:100%;width:100%;align-items:center;justify-content:center}.initials{position:absolute;font-weight:700;text-transform:uppercase;color:var(--calcite-color-text-2)}.thumbnail{height:100%;width:100%}.tooltip-text{margin:0;padding:0;font-size:.75rem;color:var(--calcite-color-text-2)}calcite-tooltip{pointer-events:none}`,p=class extends g{constructor(){super(...arguments),this.imageEl=c(),this.fallbackEl=c(),this.tooltipEl=c(),this.imageError=!1,this.tooltipOpen=!1,this.tooltip=!1,this.scale="m"}static{this.properties={imageError:16,tooltipOpen:16,group:0,portal:0,tooltip:5,scale:3}}static{this.styles=T}willUpdate(t){t.has("group")&&(this.imageError=!1)}updated(){let t=this.tooltipEl.value,e=this.imageEl.value||this.fallbackEl.value;t&&e&&(t.referenceElement=e)}isDarkMode(){return!!this.el.closest(".calcite-mode-dark")}getThumbnailURI(){let{group:t,portal:e}=this;if(!t)return null;if(t.thumbnailUrl)return t.thumbnailUrl;let i=t.thumbnail;if(!i)return null;if(i.startsWith("http"))return i;if(!e||!t.id)return null;let r=k(e),n=r?`?token=${r}`:"";return`${b(e)}community/groups/${t.id}/info/${i}${n}`}generateFillColor(){let{id:t,title:e}=this.group||{},i=t?`#${t.slice(Math.max(0,t.length-6))}`:"",r=t&&u(i)?i:w(e||"");if(!t&&!e||!u(r))return"var(--calcite-color-foreground-2)";let n=M(r),s=this.isDarkMode()?20:90;return`hsl(${n}, 60%, ${s}%)`}generateInitials(){let t=this.group?.title?.trim().charAt(0);return t?.match(/^\w+$/u)?t:null}getIconScale(){return this.scale==="xl"?"l":this.scale==="xs"?"s":this.scale}renderTooltip(){return!this.tooltip||!this.group?.title?null:l`<calcite-tooltip .open=${this.tooltipOpen} close-on-click placement=bottom-start offset-distance=6 offset-skidding=0 ${h(this.tooltipEl)}><p class="tooltip-text">${this.group.title}</p></calcite-tooltip>`}render(){let t=this.getThumbnailURI();if(t&&!this.imageError)return l`<img class="thumbnail" src=${t??$} alt @error=${()=>{this.imageError=!0}} @mouseenter=${()=>{this.tooltipOpen=!0}} @mouseleave=${()=>{this.tooltipOpen=!1}} @focusin=${()=>{this.tooltipOpen=!0}} @focusout=${()=>{this.tooltipOpen=!1}} ${h(this.imageEl)}>${this.renderTooltip()}`;let e=this.generateInitials();return l`<span class="background" style=${f({backgroundColor:this.generateFillColor()})} @mouseenter=${()=>{this.tooltipOpen=!0}} @mouseleave=${()=>{this.tooltipOpen=!1}} @focusin=${()=>{this.tooltipOpen=!0}} @focusout=${()=>{this.tooltipOpen=!1}} ${h(this.fallbackEl)}>${e?l`<span aria-hidden=true class="initials">${e}</span>`:l`<calcite-icon class="icon" icon=users .scale=${this.getIconScale()}></calcite-icon>`}</span>${this.renderTooltip()}`}};d("arcgis-portal-group-thumbnail",p);export{p as ArcgisPortalGroupThumbnail};
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as b,d as k}from"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import{J as c,K as h,L as g,N as f,O as $,R as d,h as m,j as l}from"./CWSEBETE.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";var E=/^#[0-9a-f]{3}$/iu,x=/^#[0-9a-f]{6}$/iu;function u(o){return I(o)||v(o)}function I(o){return o?.length===4&&E.test(o)}function v(o){return o?.length===7&&x.test(o)}function O(o){if(!u(o))return null;let t=o.replace("#","");if(t.length===3){let[e,i,r]=t.split("");return{r:Number.parseInt(`${e}${e}`,16),g:Number.parseInt(`${i}${i}`,16),b:Number.parseInt(`${r}${r}`,16)}}return{r:Number.parseInt(t.slice(0,2),16),g:Number.parseInt(t.slice(2,4),16),b:Number.parseInt(t.slice(4,6),16)}}function w(o){let t=0;for(let i=0;i<o.length;i++)t=o.charCodeAt(i)+((t<<5)-t);let e="#";for(let i=0;i<3;i++){let r=t>>i*8&255;e+=`00${r.toString(16)}`.slice(-2)}return e}function y(o){let{r:t,g:e,b:i}=o;t/=255,e/=255,i/=255;let r=Math.max(t,e,i),n=Math.min(t,e,i),s=r-n;if(s===0)return 0;let a=0;switch(r){case t:a=(e-i)/s+(e<i?6:0);break;case e:a=(i-t)/s+2;break;default:a=(t-e)/s+4;break}return Math.round(a*60)}function M(o){let t=O(o);return t?y(t):0}var T=m`:host{display:inline-block}:host([scale="s"]){height:1.5rem;width:1.5rem;font-size:.625rem}:host([scale="m"]){height:2rem;width:2rem;font-size:.75rem}:host([scale="l"]){font-size:1rem;height:2.75rem;width:2.75rem}:host([scale="xl"]){font-size:1.25rem;height:4rem;width:4rem}.icon{display:flex;color:var(--calcite-color-text-3)}.background{position:relative;display:flex;height:100%;width:100%;align-items:center;justify-content:center}.initials{position:absolute;font-weight:700;text-transform:uppercase;color:var(--calcite-color-text-2)}.thumbnail{height:100%;width:100%}.tooltip-text{margin:0;padding:0;font-size:.75rem;color:var(--calcite-color-text-2)}calcite-tooltip{pointer-events:none}`,p=class extends g{constructor(){super(...arguments),this.imageEl=c(),this.fallbackEl=c(),this.tooltipEl=c(),this.imageError=!1,this.tooltipOpen=!1,this.tooltip=!1,this.scale="m"}static{this.properties={imageError:16,tooltipOpen:16,group:0,portal:0,tooltip:5,scale:3}}static{this.styles=T}willUpdate(t){t.has("group")&&(this.imageError=!1)}updated(){let t=this.tooltipEl.value,e=this.imageEl.value||this.fallbackEl.value;t&&e&&(t.referenceElement=e)}isDarkMode(){return!!this.el.closest(".calcite-mode-dark")}getThumbnailURI(){let{group:t,portal:e}=this;if(!t)return null;if(t.thumbnailUrl)return t.thumbnailUrl;let i=t.thumbnail;if(!i)return null;if(i.startsWith("http"))return i;if(!e||!t.id)return null;let r=k(e),n=r?`?token=${r}`:"";return`${b(e)}community/groups/${t.id}/info/${i}${n}`}generateFillColor(){let{id:t,title:e}=this.group||{},i=t?`#${t.slice(Math.max(0,t.length-6))}`:"",r=t&&u(i)?i:w(e||"");if(!t&&!e||!u(r))return"var(--calcite-color-foreground-2)";let n=M(r),s=this.isDarkMode()?20:90;return`hsl(${n}, 60%, ${s}%)`}generateInitials(){let t=this.group?.title?.trim().charAt(0);return t?.match(/^\w+$/u)?t:null}getIconScale(){return this.scale==="xl"?"l":this.scale==="xs"?"s":this.scale}renderTooltip(){return!this.tooltip||!this.group?.title?null:l`<calcite-tooltip .open=${this.tooltipOpen} close-on-click placement=bottom-start offset-distance=6 offset-skidding=0 ${h(this.tooltipEl)}><p class="tooltip-text">${this.group.title}</p></calcite-tooltip>`}render(){let t=this.getThumbnailURI();if(t&&!this.imageError)return l`<img class="thumbnail" src=${t??$} alt @error=${()=>{this.imageError=!0}} @mouseenter=${()=>{this.tooltipOpen=!0}} @mouseleave=${()=>{this.tooltipOpen=!1}} @focusin=${()=>{this.tooltipOpen=!0}} @focusout=${()=>{this.tooltipOpen=!1}} ${h(this.imageEl)}>${this.renderTooltip()}`;let e=this.generateInitials();return l`<span class="background" style=${f({backgroundColor:this.generateFillColor()})} @mouseenter=${()=>{this.tooltipOpen=!0}} @mouseleave=${()=>{this.tooltipOpen=!1}} @focusin=${()=>{this.tooltipOpen=!0}} @focusout=${()=>{this.tooltipOpen=!1}} ${h(this.fallbackEl)}>${e?l`<span aria-hidden=true class="initials">${e}</span>`:l`<calcite-icon class="icon" icon=users .scale=${this.getIconScale()}></calcite-icon>`}</span>${this.renderTooltip()}`}};d("arcgis-portal-group-thumbnail",p);export{p as ArcgisPortalGroupThumbnail};
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as g}from"./7ZWYUHGK.js";import{L as m,O as l,R as u,h as p,j as s,w as d}from"./AICPYLWE.js";var w=p`.sort-accordion-wrap{border-bottom:1px solid var(--calcite-color-border-2)}.sort-title{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-0);padding:1rem .5rem;margin:0 0 -1px;line-height:1;border-bottom:1px solid var(--calcite-color-border-2)}.dropdown-sort-order-items--in-dialog{max-height:var(--arcgis-browser-sort-max-height, none)}.sort-accordion-item{--calcite-accordion-item-content-space: .75rem .25rem;--calcite-accordion-icon-margin: .5rem;border-top:1px solid var(--calcite-color-border-1)}.sort-accordion-content{margin:-.75rem .5rem 0}`,b={title:["asc","alphabetical"],owner:["asc","alphabetical"],numviews:["desc","num"],relevance:["desc"],modified:["desc","recent"],created:["desc","recent"],size:["desc","size"],fullname:["asc","alphabetical"],username:["asc","alphabetical"],name:["asc","alphabetical"],membertype:["asc","alphabetical"],joined:["desc","recent"],lastlogin:["desc","recent"],added:["desc","recent"],dataset:["asc","alphabetical"],mfaenabled:["desc","default"],description:["asc","alphabetical"],lastSyncFailureCount:["desc","num"],invitationsPendingCount:["desc","num"],participantGroupLinksCount:["desc","num"]};function n(a,e,r){let[t,o]=b[a],i=a==="modified"&&r?e.deleted||"Date deleted":e[a]||a,c={asc:(o?e[`${o}Asc`]:void 0)||e.defaultAsc,desc:(o?e[`${o}Desc`]:void 0)||e.defaultDesc};return{label:i,showSortOrder:!!o,defaultSortOrder:t,sortOrderLabels:c}}var h=class extends m{constructor(){super(...arguments),this._messages=g({name:"portal-browser",blocking:!0}),this.sortOrders=["asc","desc"],this.options=[],this.appearance="dropdown",this.showText=!0,this.useDeleted=!1,this.arcgisBrowserSortFieldChange=d(),this.arcgisBrowserSortOrderChange=d()}static{this.properties={options:0,field:1,order:1,appearance:1,showText:5,useDeleted:5}}static{this.styles=w}getI18n(){return this._messages.sort}renderFieldOption(e,r){let t=this.getI18n(),o=n(e,t,this.useDeleted);return s`<calcite-dropdown-item .selected=${r===e} @calciteDropdownItemSelect=${()=>this.arcgisBrowserSortFieldChange.emit(e)}>${o.label}</calcite-dropdown-item>`}renderButton(e){let r=this.getI18n(),t=n(e,r,this.useDeleted),o=`${r.sortBy} ${t.label}`;return s`<calcite-button class="button" slot=trigger scale=m appearance=outline-fill kind=neutral icon-start=sort-descending icon-flip-rtl=start .label=${o}>${this.showText?t.label:null}</calcite-button>`}renderDropdown(){if(!this.options.length)return null;let e=this.getI18n(),r=this.field&&this.options.includes(this.field)?this.field:this.options[0],t=n(r,e,this.useDeleted),o=this.order||t.defaultSortOrder;return s`<calcite-dropdown placement=bottom-end scale=m overlay-positioning=fixed width=m>${this.renderButton(r)}<calcite-dropdown-group selection-mode=single .groupTitle=${e.sortBy}>${this.options.map(i=>this.renderFieldOption(i,r))}</calcite-dropdown-group>${t.showSortOrder&&s`<calcite-dropdown-group selection-mode=single .groupTitle=${e.sortDirection}>${this.sortOrders.map(i=>s`<calcite-dropdown-item .selected=${o===i} @calciteDropdownItemSelect=${()=>this.arcgisBrowserSortOrderChange.emit(i)}>${t.sortOrderLabels[i]}</calcite-dropdown-item>`)}</calcite-dropdown-group>`||""}</calcite-dropdown>`}renderTreeItem(e,r){let t=this.getI18n(),o=n(e,t,this.useDeleted);return s`<calcite-tree-item data-value=${e??l} .selected=${r===e}><a>${o.label}</a></calcite-tree-item>`}renderAccordion(e,r,t){return t?null:s`<calcite-accordion-item .heading=${e} class="sort-accordion-item"><div class="sort-accordion-content">${r}</div></calcite-accordion-item>`}renderAccordions(){if(!this.options.length)return null;let e=this.getI18n(),r=this.field&&this.options.includes(this.field)?this.field:this.options[0],t=n(r,e,this.useDeleted),o=this.order||t.defaultSortOrder;return s`<div class="sort-accordion-wrap"><h3 class="sort-title">${e.sort}</h3><calcite-accordion appearance=transparent icon-type=chevron scale=m icon-position=start>${this.renderAccordion(e.sortBy,s`<calcite-tree @calciteTreeSelect=${i=>{let c=i.target.selectedItems?.[0]?.dataset.value;c&&typeof c=="string"&&this.arcgisBrowserSortFieldChange.emit(c)}}>${this.options.map(i=>this.renderTreeItem(i,r))}</calcite-tree>`)}${this.renderAccordion(e.sortDirection,s`<calcite-tree @calciteTreeSelect=${i=>{let c=i.target.selectedItems?.[0]?.dataset.value;(c==="asc"||c==="desc")&&this.arcgisBrowserSortOrderChange.emit(c)}}>${this.sortOrders.map(i=>s`<calcite-tree-item data-value=${i??l} .selected=${o===i}><a>${t.sortOrderLabels[i]}</a></calcite-tree-item>`)}</calcite-tree>`,!t.showSortOrder)}</calcite-accordion></div>`}render(){return this.appearance==="accordion"?this.renderAccordions():this.renderDropdown()}};u("arcgis-portal-browser-sort",h);export{h as a};
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as g}from"./XUPYBBRI.js";import{L as m,O as l,R as u,h as p,j as s,w as d}from"./CWSEBETE.js";var w=p`.sort-accordion-wrap{border-bottom:1px solid var(--calcite-color-border-2)}.sort-title{font-weight:var(--calcite-font-weight-medium);color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-0);padding:1rem .5rem;margin:0 0 -1px;line-height:1;border-bottom:1px solid var(--calcite-color-border-2)}.dropdown-sort-order-items--in-dialog{max-height:var(--arcgis-browser-sort-max-height, none)}.sort-accordion-item{--calcite-accordion-item-content-space: .75rem .25rem;--calcite-accordion-icon-margin: .5rem;border-top:1px solid var(--calcite-color-border-1)}.sort-accordion-content{margin:-.75rem .5rem 0}`,b={title:["asc","alphabetical"],owner:["asc","alphabetical"],numviews:["desc","num"],relevance:["desc"],modified:["desc","recent"],created:["desc","recent"],size:["desc","size"],fullname:["asc","alphabetical"],username:["asc","alphabetical"],name:["asc","alphabetical"],membertype:["asc","alphabetical"],joined:["desc","recent"],lastlogin:["desc","recent"],added:["desc","recent"],dataset:["asc","alphabetical"],mfaenabled:["desc","default"],description:["asc","alphabetical"],lastSyncFailureCount:["desc","num"],invitationsPendingCount:["desc","num"],participantGroupLinksCount:["desc","num"]};function n(a,e,r){let[t,o]=b[a],i=a==="modified"&&r?e.deleted||"Date deleted":e[a]||a,c={asc:(o?e[`${o}Asc`]:void 0)||e.defaultAsc,desc:(o?e[`${o}Desc`]:void 0)||e.defaultDesc};return{label:i,showSortOrder:!!o,defaultSortOrder:t,sortOrderLabels:c}}var h=class extends m{constructor(){super(...arguments),this._messages=g({name:"portal-browser",blocking:!0}),this.sortOrders=["asc","desc"],this.options=[],this.appearance="dropdown",this.showText=!0,this.useDeleted=!1,this.arcgisBrowserSortFieldChange=d(),this.arcgisBrowserSortOrderChange=d()}static{this.properties={options:0,field:1,order:1,appearance:1,showText:5,useDeleted:5}}static{this.styles=w}getI18n(){return this._messages.sort}renderFieldOption(e,r){let t=this.getI18n(),o=n(e,t,this.useDeleted);return s`<calcite-dropdown-item .selected=${r===e} @calciteDropdownItemSelect=${()=>this.arcgisBrowserSortFieldChange.emit(e)}>${o.label}</calcite-dropdown-item>`}renderButton(e){let r=this.getI18n(),t=n(e,r,this.useDeleted),o=`${r.sortBy} ${t.label}`;return s`<calcite-button class="button" slot=trigger scale=m appearance=outline-fill kind=neutral icon-start=sort-descending icon-flip-rtl=start .label=${o}>${this.showText?t.label:null}</calcite-button>`}renderDropdown(){if(!this.options.length)return null;let e=this.getI18n(),r=this.field&&this.options.includes(this.field)?this.field:this.options[0],t=n(r,e,this.useDeleted),o=this.order||t.defaultSortOrder;return s`<calcite-dropdown placement=bottom-end scale=m overlay-positioning=fixed width=m>${this.renderButton(r)}<calcite-dropdown-group selection-mode=single .groupTitle=${e.sortBy}>${this.options.map(i=>this.renderFieldOption(i,r))}</calcite-dropdown-group>${t.showSortOrder&&s`<calcite-dropdown-group selection-mode=single .groupTitle=${e.sortDirection}>${this.sortOrders.map(i=>s`<calcite-dropdown-item .selected=${o===i} @calciteDropdownItemSelect=${()=>this.arcgisBrowserSortOrderChange.emit(i)}>${t.sortOrderLabels[i]}</calcite-dropdown-item>`)}</calcite-dropdown-group>`||""}</calcite-dropdown>`}renderTreeItem(e,r){let t=this.getI18n(),o=n(e,t,this.useDeleted);return s`<calcite-tree-item data-value=${e??l} .selected=${r===e}><a>${o.label}</a></calcite-tree-item>`}renderAccordion(e,r,t){return t?null:s`<calcite-accordion-item .heading=${e} class="sort-accordion-item"><div class="sort-accordion-content">${r}</div></calcite-accordion-item>`}renderAccordions(){if(!this.options.length)return null;let e=this.getI18n(),r=this.field&&this.options.includes(this.field)?this.field:this.options[0],t=n(r,e,this.useDeleted),o=this.order||t.defaultSortOrder;return s`<div class="sort-accordion-wrap"><h3 class="sort-title">${e.sort}</h3><calcite-accordion appearance=transparent icon-type=chevron scale=m icon-position=start>${this.renderAccordion(e.sortBy,s`<calcite-tree @calciteTreeSelect=${i=>{let c=i.target.selectedItems?.[0]?.dataset.value;c&&typeof c=="string"&&this.arcgisBrowserSortFieldChange.emit(c)}}>${this.options.map(i=>this.renderTreeItem(i,r))}</calcite-tree>`)}${this.renderAccordion(e.sortDirection,s`<calcite-tree @calciteTreeSelect=${i=>{let c=i.target.selectedItems?.[0]?.dataset.value;(c==="asc"||c==="desc")&&this.arcgisBrowserSortOrderChange.emit(c)}}>${this.sortOrders.map(i=>s`<calcite-tree-item data-value=${i??l} .selected=${o===i}><a>${t.sortOrderLabels[i]}</a></calcite-tree-item>`)}</calcite-tree>`,!t.showSortOrder)}</calcite-accordion></div>`}render(){return this.appearance==="accordion"?this.renderAccordions():this.renderDropdown()}};u("arcgis-portal-browser-sort",h);export{h as a};
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a,b as m}from"./TOTWYGB3.js";import{a as l}from"./7ZWYUHGK.js";import{L as i,R as r,h as s,j as e}from"./AICPYLWE.js";export default $arcgis.t(([{substitute:c}])=>{var n=s`:host{display:block}.items-directly-using{display:block;padding-block-end:.75rem}`,t=class extends i{constructor(){super(...arguments),this.messages=l({blocking:!0}),this.sourceItem=null,this.relatedItems=[]}static{this.properties={sourceItem:0,relatedItems:0,portal:0,user:0}}static{this.styles=[n,a]}render(){return this.relatedItems.length?e`<span class="items-directly-using" .innerHTML=${c(this.messages.itemsDirectlyUsing,{itemTitle:this.sourceItem?.title??"",count:this.relatedItems.length})??""}></span><calcite-list label="Related items">${this.relatedItems.map(o=>m({item:o,portal:this.portal,user:this.user,lang:this.messages._lang}))}</calcite-list>`:null}};r("arcgis-portal-review-related-items",t);return t},"intl")
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a,b as m}from"./RUB2GDBE.js";import{a as l}from"./XUPYBBRI.js";import{L as i,R as r,h as s,j as e}from"./CWSEBETE.js";export default $arcgis.t(([{substitute:c}])=>{var n=s`:host{display:block}.items-directly-using{display:block;padding-block-end:.75rem}`,t=class extends i{constructor(){super(...arguments),this.messages=l({blocking:!0}),this.sourceItem=null,this.relatedItems=[]}static{this.properties={sourceItem:0,relatedItems:0,portal:0,user:0}}static{this.styles=[n,a]}render(){return this.relatedItems.length?e`<span class="items-directly-using" .innerHTML=${c(this.messages.itemsDirectlyUsing,{itemTitle:this.sourceItem?.title??"",count:this.relatedItems.length})??""}></span><calcite-list label="Related items">${this.relatedItems.map(o=>m({item:o,portal:this.portal,user:this.user,lang:this.messages._lang}))}</calcite-list>`:null}};r("arcgis-portal-review-related-items",t);return t},"intl")
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import a from"./XYMBRPC7.js";import{b as z}from"./OR6T5SB3.js";import{a as E}from"./K75JTQPW.js";import"./KV4ZZSNW.js";import"./EMJQI4MA.js";import{a as B}from"./7ZWYUHGK.js";import"./A2SQ4EMZ.js";import"./K2XSYDAP.js";import{J as S,K as C,L as j,P as D,R as J,h as M,j as _,p as N,r as A,s as R,w as F}from"./AICPYLWE.js";import"./OUMTV5H5.js";import"./5PV2GUZW.js";export default $arcgis.t(([le,ve,we,Ie,$,de,v,pe,fe,P,X,T,ee,{h:W,j:q,k:G,l:U,m:V,n:H,o:Q,p:K,q:Y,r:Z}])=>{var k=(i=>(i.expression="expression/",i))(k||{});function I(i){return i!=null}function se(i,e,s){let t=e.fieldName;if(t.includes(k.expression)){let r=s.get(t);return r?.title?r.title:t}else return ee.supportsFieldConfiguration(i)&&i.getFieldConfiguration(t)?i.getFieldAlias(t)||t:e.label||t}function te(i,e,s){let t="";if(/^raster.(?:item|service)pixelvalue/iu.test(i))t="number";else if(e.has(i)){let r=e.get(i);t=r.type?r.type.toLowerCase():""}else if(s.has(i)){let r=s.get(i);t=r.returnType?r.returnType.toLowerCase():""}else t="number";return t}async function ie(i){return new Map((await me(i)).filter(e=>e.visible).map(e=>[e.name,e]))}function re(i){let e=new Map;return i?.expressionInfos&&i.expressionInfos.forEach(s=>{let t=`${k.expression}${s.name}`;e.set(t,s)}),e}async function me(i){return await new Promise((e,s)=>{switch(i.type){case"feature":case"ogc-feature":case"stream":e(i.fields);break;case"sublayer":{let t=i,r=t?.layer;r?.portalItem&&r.url.includes("https://demographics")&&r.url.includes(".arcgis.com")?r.portalItem?.fetchData().then(a=>{if(a?.thematicGroup){let n=new Map(t.fields.map(o=>[o.name,o])),c=a.thematicGroup.fieldNames,p=[];c.forEach(o=>{n.has(o)&&p.push(n.get(o))}),e(p)}else e(t.fields)}).catch(a=>{s(new Error(a))}):e(t.fields);break}case"imagery":case"imagery-tile":case"wcs":e(i.rasterFields);break;default:e("fields"in i?i.fields??[]:[])}})}function d(i,e){return!i||!e?!1:i.toLocaleLowerCase()===e.toLocaleLowerCase()}async function ae(i,e,s,t){if(!s)return!1;let r=["feature","oriented-imagery"].includes(e.type),a=t?.item??e.portalItem,n=e.sourceJSON;if(!r||!a||!a.portal.user||!U(a)||G(a)||V(a)||H(n)||a.portal.isPortal&&q(a)||["oid","global-id","geometry"].includes(s.type)||await ue(e,s.name,t))return!1;let c=e.sourceJSON.geometryProperties,p=c?.shapeLengthFieldName,o=c?.shapeAreaFieldName;if(d(p,s.name)||d(o,s.name))return!1;let l=e.editFieldsInfo;if(l&&(d(l.creationDateField,s.name)||d(l.creatorField,s.name)||d(l.editDateField,s.name)||d(l.editorField,s.name))||d(e.objectIdField,s.name)||d(e.displayField,s.name)||d(e.typeIdField,s.name)||d(e.subtypeField,s.name)||e.timeInfo&&(d(e.timeInfo.startField,s.name)||d(e.timeInfo.endField,s.name)||d(e.timeInfo.trackIdField,s.name)))return!1;if(!t?.ignoreLayerRenderer&&e.featureReduction){let f=new Set;if(await v.collectFeatureReductionFields(f,e,e.featureReduction),Array.from(f).some(y=>d(y,s.name)))return!1}if(!t?.ignoreLayerRenderer&&(await v.getRendererFields(e.renderer,e.fieldsIndex)).some(f=>d(f,s.name)))return!1;if(!t?.ignoreLayerLabelingInfo){let f=e.labelingInfo?.map(y=>y.labelExpressionInfo?.expression);if(f&&((await v.getExpressionFields(e,f)).some(y=>d(y,s.name))||await ne(e,s,"layer")))return!1}if(!t?.ignoreLayerDefinitionExpression&&e.definitionExpression&&(await T.parseWhereClause(e.definitionExpression,e.fieldsIndex)).fieldNames.some(f=>d(f,s.name))||await he(e,s,t)||await _e(e,s))return!1;if(await ye(e,s))return await Promise.resolve(!1);if(await be(e,s))return await Promise.resolve(!1);if(ge(i,e,s)||e.relationships?.map(f=>f.keyField)?.some(f=>d(f,s.name)))return!1;let u=W(a,a.portal.user),w=t?.userItemInfo?.userGroups??await Q(e)??[],h=t?.userItemInfo?.itemGroups??await K(e)??[],b=Z(w,h);if(!u&&!b)return!1;let m=t?.userItemInfo?.relatedItems??await Y(a.id,a.portal,{relationshipType:"Service2Service"});return!(m?.data?.relatedItems&&m.data.relatedItems.some(f=>["WMTS","Map Service","Vector Tile Service"].includes(f.type)))}async function ue(i,e,s){let t=`${i.url}/${i.layerId}/fieldGroups`;try{let r=s?.userItemInfo&&"fieldGroups"in s.userItemInfo?s.userItemInfo.fieldGroups:(await X(t,{query:{f:"json"},responseType:"json"}))?.data?.fieldGroups;return r?r.some(a=>a.fields.some(n=>d(n,e))):!1}catch{return!1}}function ge(i,e,s){if(!i)return!1;let t=i.map?.applicationProperties?.viewing?.search;if(t){let r=t.layers?.find(a=>a.id===e.id);if(r){let a=r?.field?.name;if(a)return d(a,s.name)}}return!1}async function ne(i,e,s){let t=s==="layer"?i.labelingInfo?.filter(n=>I(n.where)):i.sourceJSON?.drawingInfo?.labelingInfo?.filter(n=>I(n.where));if(!t?.length)return!1;let r=[...await Promise.all(t.map(async n=>await T.parseWhereClause(n.where,i.fieldsIndex)))],a=!1;for(let n=0;n<r.length;n++){let c=r[n].fieldNames?.some(p=>d(p,e.name));if(!a&&c){a=!0;break}}return await Promise.resolve(a)}async function he(i,e,s){let t=i.portalItem;if(!t)return!1;let r=`${E(t.portal)}content/items/${t.id}/data`,a=(s?.userItemInfo?.itemData??await X(r,{query:{f:"json"},responseType:"json"}))?.data;if(!a)return!1;if(a?.layers){let n=a.layers.find(l=>l.id===i.layerId),c=n?.layerDefinition?.drawingInfo?.renderer,p=n?.layerDefinition?.featureReduction,o=n?.layerDefinition?.definitionExpression;if(!c&&!p&&!o)return!1;if(!s?.ignoreItemRenderer&&c){let l=P.fromJSON(c);if((await v.getRendererFields(l,i.fieldsIndex)).some(u=>d(u,e.name)))return!0}if(!s?.ignoreItemFeatureReduction&&p&&await oe(i,e,p)||o&&(await T.parseWhereClause(o,i.fieldsIndex)).fieldNames.some(l=>d(l,e.name)))return!0}return!1}async function _e(i,e){let s=i.sourceJSON,t=s?.drawingInfo?.renderer,r=s?.featureReduction;if(!t&&!r)return!1;if(t){let a=P.fromJSON(t);if((await v.getRendererFields(a,i.fieldsIndex)).some(n=>d(n,e.name)))return!0}return!!(r&&await oe(i,e,r))}async function ye(i,e){let s=i.sourceJSON?.drawingInfo?.labelingInfo;if(!s)return await Promise.resolve(!1);let t=s?.map(r=>r.labelExpressionInfo?.expression);if(t){if((await v.getExpressionFields(i,t)).some(r=>d(r,e.name)))return await Promise.resolve(!0);if(await ne(i,e,"service"))return await Promise.resolve(!0)}return await Promise.resolve(!1)}async function be(i,e){let s=i.sourceJSON?.definitionQuery;return s?(await T.parseWhereClause(s,i.fieldsIndex)).fieldNames.some(t=>d(t,e.name))?await Promise.resolve(!0):await Promise.resolve(!1):await Promise.resolve(!1)}async function oe(i,e,s){let t=s.type==="binning"?pe.fromJSON(s):fe.fromJSON(s),r=new Set;return await v.collectFeatureReductionFields(r,i,t),!!Array.from(r).some(a=>d(a,e.name))}var g=new Map;g.set("oid","key");g.set("guid","key");g.set("global-id","key");g.set("blob","binary");g.set("integer","integer");g.set("small-integer","integer");g.set("big-integer","integer");g.set("single","number");g.set("double","number");g.set("long","number");g.set("number","number");g.set("date","date-time");g.set("date-only","calendar");g.set("time-only","clock");g.set("timestamp-offset","time-zone");g.set("string","string");var Ne=({fieldType:i})=>_`<calcite-icon scale=s .icon=${g.get(i)}></calcite-icon>`,Fe=["esrignss_speed","esrignss_direction","esrisnsr_azimuth","esrignss_positionsourcetype","esrignss_receiver","esrignss_h_rms","esrignss_v_rms","esrignss_latitude","esrignss_longitude","esrignss_altitude","esrignss_pdop","esrignss_hdop","esrignss_vdop","esrignss_fixtype","esrignss_correctionage","esrignss_stationid","esrignss_numsats","esrignss_fixdatetime","esrignss_avg_h_rms","esrignss_avg_v_rms","esrignss_avg_positions","esrignss_h_stddev","esrignss_correction_source_name","esrignss_correction_source_type","esrignss_custom_attributes","esrignss_h_95_status","esrignss_ntrip_mount_point","esrignss_antenna_height","esrignss_orthometric_height","esrignss_profile_has_hor_xform","esrignss_profile_hor_xform","esrignss_receiver_gcs","esrignss_receiver_gcs_wkid","esrignss_receiver_geoid","esrignss_receiver_ref_epoch","esrisnsr_tilt_azimuth_accuracy","esrisnsr_tilt_azimuth","esrisnsr_tilt_angle_accuracy","esrisnsr_tilt_angle","esrignss_tilt_compensated","esrignss_cp1_latitude","esrignss_cp1_longitude","esrignss_cp1_altitude","esrignss_cp1_h_rms","esrignss_cp1_v_rms","esrignss_cp1_fixdatetime","esrignss_cp1_fixtype","esrignss_cp1_corr_age","esrignss_cp1_stationid","esrignss_cp1_numsats","esrignss_cp1_pdop","esrignss_cp1_hdop","esrignss_cp1_vdop","esrignss_cp1_avg_h_rms","esrignss_cp1_avg_v_rms","esrignss_cp1_avg_positions","esrignss_cp1_h_stddev","esrisnsr_cp1_slope_dist","esrisnsr_cp1_inclination","esrisnsr_cp1_azimuth","esrignss_cp2_latitude","esrignss_cp2_longitude","esrignss_cp2_altitude","esrignss_cp2_h_rms","esrignss_cp2_v_rms","esrignss_cp2_fixdatetime","esrignss_cp2_fixtype","esrignss_cp2_corr_age","esrignss_cp2_stationid","esrignss_cp2_numsats","esrignss_cp2_pdop","esrignss_cp2_hdop","esrignss_cp2_vdop","esrignss_cp2_avg_h_rms","esrignss_cp2_avg_v_rms","esrignss_cp2_avg_positions","esrignss_cp2_h_stddev","esrisnsr_cp2_slope_dist","esrisnsr_cp2_inclination","esrisnsr_cp2_azimuth","esrisnsr_offset_method","esrisnsr_offset_device","esrisnsr_offset_laser_height","esrisnsr_offset_laser_target_ht","esrisnsr_offset_mag_var","esrignss_worst_h_rms","esrignss_worst_v_rms","esrignss_worst_fixtype","esrignss_manual_locations"],Ee=M`.dialog{--calcite-dialog-max-size-y: 60%}.dialog-content-wrapper{position:relative;min-height:100px}.hide-overflow{overflow:hidden}.field-icons{padding:0 var(--calcite-spacing-lg);display:flex;align-items:center}.warning{border-bottom:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);margin-bottom:var(--calcite-spacing-md)}.warning-message{font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-bold)}.loader-container{position:absolute;height:100%;width:100%;top:0;right:0;display:none;z-index:40;overflow:hidden;background:#fffffff2;padding:0}.active{display:flex;flex-direction:column;align-items:center;justify-content:center}.loader{padding:0}.loader-text{font-weight:var(--calcite-font-weight-medium);text-align:center;margin-right:6.25rem;margin-left:6.25rem}`,L=class extends j{constructor(){super(...arguments),this.arcadeExpMap=new Map,this.cancelNode=S(),this.dialogNode=S(),this.layerFields=[],this.layerFieldsMap=new Map,this.messages=B({blocking:!0}),this.deleteInProgress=!1,this.fieldsAreDeletable=!1,this._propWatcherTask=new z(this,{task:async([e,s])=>{let t=I(e)&&I(s);if(I(e)||N("error",this,A("layer")),I(s)||N("error",this,A("fieldNames")),!t)throw new Error("Required properties are missing");this._propWatcherTask.autoRun=!1,await this.processProps()},args:()=>[this.layer,this.fieldNames]}),this.arcgisBeforeModalClose=F(),this.arcgisClose=F(),this.arcgisBeforeDelete=F(),this.arcgisFieldsDeleted=F()}static{this.properties={config:0,fieldNames:0,layer:0,mapView:0,options:0}}static{this.styles=Ee}async processProps(){let{layer:e,mapView:s,fieldNames:t}=this;if(!e||!t){this.fieldsAreDeletable=!1;return}e.loaded||await e.load(),this.layerFields=e.fields.filter(a=>t.includes(a.name));let r=t.some(a=>!e.fields.find(n=>n.name===a));if(!this.layerFields?.length||r)this.fieldsAreDeletable=!1;else{let a=await Promise.all(this.layerFields.map(async n=>await ae(s,e,n,this.options)));if(this.fieldsAreDeletable=a.every(n=>n),!this.fieldsAreDeletable)return}if(this.layerFieldsMap=await ie(e),this.options?.ignorePopupTemplate||(this.arcadeExpMap=re(e.popupTemplate)),this.portal=e.portalItem?.portal??this.options?.portal,this.item=e.portalItem??this.options?.item,!this.item){this.fieldsAreDeletable=!1;return}await Ie.getCredential(this.item.url.replace("rest/services","rest/admin/services"))}getFieldLabel(e){let{layer:s,arcadeExpMap:t}=this;if(this.options?.ignorePopupTemplate)return this.getFieldDisplayNameFromLayerFields(e);{let r=(s.popupTemplate??s.createPopupTemplate()).fieldInfos?.find(a=>a.fieldName===e);return r?se(s,r,t):this.getFieldDisplayNameFromLayerFields(e)}}getFieldDisplayNameFromLayerFields(e){let{layer:s}=this,t=this.layerFieldsMap.get(e);return de.supportsFieldConfiguration(s)?s.getFieldAlias(e):t.alias??t.name}async deleteFields(){let{layer:e,fieldNames:s}=this,t=`${e.url.replace("/rest/services","/rest/admin/services")}/${e.layerId}/deleteFromDefinition`,r={fields:s.map(n=>({name:n}))},a={deleteFromDefinition:JSON.stringify(r)};await $(t,{query:{...a,f:"json",async:!1},method:"post",responseType:"json"}).then(async n=>{if(n.data?.success){let c=`${e.url}/${e.layerId}`;s.forEach(o=>{e.type==="feature"&&e.floorInfo?.floorField===o&&(e.floorInfo=null)});let p=await $(c,{query:{f:"json"},responseType:"json"});if(p){let o=p.data;this.currentLayerInfo=p.data,o&&(this.updateTypesAndTemplatesOnLayer(),s.forEach(l=>{o.templates?.length?o.templates.forEach(u=>delete u.prototype.attributes[l]):o.types?.forEach(u=>{u.templates.forEach(w=>delete w.prototype.attributes[l])})}),this.updateFeatureService(o))}else this.handleError()}else this.handleError()},()=>this.handleError())}updateTypesAndTemplatesOnLayer(){let{currentLayerInfo:e}=this,s=e;if(s.templates?.length){let t=this.updateTemplatesList(s.templates);s.templates=t}else if(s.types){let t=s.types;s.types=[],t.forEach(r=>{r.templates=this.updateTemplatesList(r.templates),this.addType(s,r)})}}updateTemplatesList(e){let{currentLayerInfo:s,messages:t}=this,r=[];return(e??[]).forEach(a=>{let n=new ve;n.description=a.description??"",n.name=a.name||t.newFeature,n.drawingTool=a.drawingTool||"point";let c={};s.fields.forEach(o=>{let l=!1;for(let u=0;u<a.prototype.attributes.length;u++)if(a.prototype.attributes[u]===o.name){l=!0,c[o.name]=a.prototype.attributes[o.name];break}!l&&o.editable&&!Fe.includes(o.name)&&(c[o.name]=o.defaultValue||null)});let p=new we({attributes:c});n.prototype=p,r.push(n)}),r}addType(e,s){e.types?e.types.some(t=>t.id===s.id)||e.types.push(s):e.types=[s]}async updateFeatureService(e){let{layer:s,fieldNames:t}=this,r={templates:e.templates,types:e.types},a=`${s.url.replace("/rest/services","/rest/admin/services")}/${s.layerId}/updateDefinition`,n={f:"json",updateDefinition:JSON.stringify(r)};await $(a,{query:{...n,f:"json"},method:"post",responseType:"json"}).then(async c=>{if(c.data?.success){let p=`${E(this.portal)}content/items/${this.item.id}/data`;if(this.options?.ignorePopupTemplate||t.forEach(o=>{s.popupTemplate?.fieldInfos&&(s.popupTemplate.fieldInfos=s.popupTemplate.fieldInfos.filter(l=>l.fieldName!==o)),s.popupTemplate?.content?.forEach((l,u)=>{l.type==="fields"&&l.fieldInfos&&((s.popupTemplate?.content)[u].fieldInfos=(s.popupTemplate?.content)[u].fieldInfos?.filter(w=>w.fieldName!==o))})}),s.attributeTableTemplate){let o=s.attributeTableTemplate.clone();o.elements=o.elements.filter(l=>!(l.type==="field"&&t.includes(l.fieldName))),o.orderByFields=o.orderByFields.filter(l=>!t.includes(l.field)),s.attributeTableTemplate=o}if(s.fieldConfigurations?.length){let o=le.clone(s.fieldConfigurations).filter(l=>!t.includes(l.name));s.fieldConfigurations=o}await $(p,{query:{f:"json"},responseType:"json"}).then(async o=>{let l=o.data;if(l?.layers||l?.tables){let u=s.isTable,w=u?l.tables:l.layers,h=w?.find(b=>b.id===s.layerId);if(t.forEach(b=>{h?.attributeTableInfo?.attributeTableElements&&(h.attributeTableInfo.attributeTableElements=h.attributeTableInfo.attributeTableElements.map(m=>{if(m.type==="field")return m.fieldName===b?void 0:m;if(m.type==="group"&&Array.isArray(m.attributeTableElements)){let f=m.attributeTableElements.filter(y=>!(y.type==="field"&&y.fieldName===b));return f.length?{...m,attributeTableElements:f}:void 0}return m}).filter(Boolean),h.attributeTableInfo.orderByFields=h.attributeTableInfo.orderByFields.filter(m=>m.field!==b))}),h?.layerDefinition?.fieldConfigurations&&(h.layerDefinition.fieldConfigurations=h.layerDefinition.fieldConfigurations.filter(b=>!t.includes(b.name))),h?.popupInfo){t.forEach(y=>{h.popupInfo.fieldInfos=h.popupInfo.fieldInfos.filter(x=>x.fieldName!==y),h.popupInfo.popupElements?.forEach((x,O)=>{x.type==="fields"&&x.fieldInfos&&(h.popupInfo.popupElements[O].fieldInfos=h.popupInfo.popupElements[O].fieldInfos.filter(ce=>ce.fieldName!==y))})});let b=`${E(this.portal)}content/users/${this.item.owner}/items/${this.item.id}/update`,m={};u?(m.tables=w,l.layers&&(m.layers=l.layers)):(m.layers=w,l.tables&&(m.tables=l.tables));let f={f:"json",text:JSON.stringify(m)};await $(b,{query:{...f},method:"post",responseType:"json"}).then(y=>{y.data?.success?this.handleSuccess():this.handleError()},()=>this.handleError())}else this.handleSuccess()}else o.httpStatus===200&&(!o.data||JSON.stringify(o.data)==="{}")?this.handleSuccess():this.handleError()},()=>this.handleError())}},()=>this.handleError())}handleSuccess(){this.arcgisFieldsDeleted.emit(),this.dialogNode?.value&&(this.dialogNode.value.open=!1),this.options?.handleCloseOnConsumer?this.arcgisBeforeModalClose.emit("success"):this.displaySuccessAlert()}handleError(e){this.dialogNode?.value&&(this.dialogNode.value.open=!1),e?this.options?.handleCloseOnConsumer?this.arcgisBeforeModalClose.emit("read-only-error"):this.displayReadOnlyErrorAlert():this.options?.handleCloseOnConsumer?this.arcgisBeforeModalClose.emit("error"):this.displayErrorAlert()}displaySuccessAlert(){let{messages:e,fieldNames:s}=this;this.successAlertNode&&(this.successAlertNode.parentElement?.removeChild(this.successAlertNode),this.successAlertNode=void 0),this.successAlertNode=D(_`<calcite-alert .label=${s.length===1?e.fieldDeleted:e.fieldsDeleted} kind=success icon=check-circle auto-close open><div slot=message>${s.length===1?e.fieldDeleted:e.fieldsDeleted}</div></calcite-alert>`),document.body.append(this.successAlertNode)}displayErrorAlert(){let{messages:e}=this;this.errorAlertNode&&(this.errorAlertNode.parentElement?.removeChild(this.errorAlertNode),this.errorAlertNode=void 0),this.errorAlertNode=D(_`<calcite-alert .label=${e.fieldDeletionUnsuccessful} kind=danger icon=exclamation-mark-triangle auto-close open><div slot=message>${e.fieldDeletionUnsuccessful}</div></calcite-alert>`),document.body.append(this.errorAlertNode)}displayReadOnlyErrorAlert(){let{messages:e,portal:s}=this;this.errorAlertNode&&(this.errorAlertNode.parentElement?.removeChild(this.errorAlertNode),this.errorAlertNode=void 0),this.errorAlertNode=D(_`<calcite-alert .label=${e.fieldDeletionUnsuccessful} kind=danger icon=exclamation-mark-triangle auto-close auto-close-duration=slow open><div slot=title>${e.error}</div><div slot=message>${s.isPortal?e.readOnlyErrorMessageEnterprise:e.readOnlyErrorMessage}</div>${!s.isPortal&&_`<calcite-link slot=link target=_blank href=https://status.arcgis.com>${e.healthDashboard}</calcite-link>`||""}</calcite-alert>`),document.body.append(this.errorAlertNode)}render(){let{messages:e,fieldsAreDeletable:s,fieldNames:t,deleteInProgress:r}=this;return this._propWatcherTask.render({complete:()=>(s||(t?.length?t?.length===1?N("error",this,"Field cannot be deleted"):N("error",this,"One or more fields cannot be deleted"):N("error",this,R("fieldNames"))),_`<calcite-dialog class="dialog" width=s open modal outside-close-disabled escape-disabled @calciteDialogClose=${()=>this.arcgisClose.emit()} .heading=${t?.length===1?e.deleteField:e.deleteFields} ${C(this.dialogNode)}>${s?_`<div class=${`dialog-content-wrapper ${r?"hide-overflow":""}`}>${this.renderDeleteLoader()}<calcite-label>${t.length===1?e.deletePrompt:e.deleteMultiplePrompt}</calcite-label>${this.renderFieldsPreview()}</div>${this.renderCancelButton()}${this.renderDeleteButton()}`:this.renderError()}</calcite-dialog>`)})}renderError(){let{messages:e}=this;return _`<div class="loader-container active"><div class="loader-text">${e.errorOccurred}</div></div>`}renderDeleteLoader(){let{messages:e,fieldNames:s,deleteInProgress:t}=this;return _`<div class=${`loader-container ${t?"active":""}`}><calcite-loader class="loader" .label=${s.length===1?e.deletingField:e.deletingFields} .hidden=${!t}></calcite-loader><div class="loader-text">${s.length===1?e.deletingField:e.deletingFields}</div></div>`}renderFieldsPreview(){let{fieldNames:e,layerFields:s,layerFieldsMap:t,arcadeExpMap:r,messages:a}=this;return _`<calcite-list .label=${a.fields}>${e.map(n=>{let c=s.find(p=>p.name===n);return _`<calcite-list-item .label=${this.getFieldLabel(n)} .description=${`{${n}}`} .value=${n} .disabled=${!c.editable}><div slot=actions-end class="field-icons">${Ne({fieldType:te(n,t,r)})}</div></calcite-list-item>`})}</calcite-list>`}renderCancelButton(){let{messages:e}=this;return _`<calcite-button @click=${()=>this.dialogNode.value.open=!1} slot=footer-end appearance=outline ${C(this.cancelNode)}>${e.cancel}</calcite-button>`}renderDeleteButton(){let{messages:e,fieldNames:s}=this;return _`<calcite-button kind=danger slot=footer-end @click=${async t=>{let{portal:r}=this;t.currentTarget.disabled=!0,this.cancelNode.value.disabled=!0,this.dialogNode.value.closeDisabled=!0,r.sourceJSON?.isReadOnly?this.handleError(!0):(this.deleteInProgress=!0,this.requestUpdate(),this.arcgisBeforeDelete.emit(),await this.deleteFields())}}>${s.length===1?e.deleteField:e.deleteFieldsWithNumber.replace("${number}",`${s.length}`)}</calcite-button>`}};J("arcgis-portal-field-delete",L);return L},"core/lang","layers/support/FeatureTemplate","Graphic","identity/IdentityManager","request","applications/PortalApp/layerUtils","layers/support/fieldUtils","layers/support/FeatureReductionBinning","layers/support/FeatureReductionCluster","renderers/support/jsonUtils","request","core/sql","applications/PortalApp/layerUtils",a)
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import a from"./TJYPEMON.js";import{b as z}from"./KIKEE2KY.js";import{a as E}from"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import{a as B}from"./XUPYBBRI.js";import"./C5U7YKVI.js";import"./6BMWSGLA.js";import{J as S,K as C,L as j,P as D,R as J,h as M,j as _,p as N,r as A,s as R,w as F}from"./CWSEBETE.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";export default $arcgis.t(([le,ve,we,Ie,$,de,v,pe,fe,P,X,T,ee,{h:W,j:q,k:G,l:U,m:V,n:H,o:Q,p:K,q:Y,r:Z}])=>{var k=(i=>(i.expression="expression/",i))(k||{});function I(i){return i!=null}function se(i,e,s){let t=e.fieldName;if(t.includes(k.expression)){let r=s.get(t);return r?.title?r.title:t}else return ee.supportsFieldConfiguration(i)&&i.getFieldConfiguration(t)?i.getFieldAlias(t)||t:e.label||t}function te(i,e,s){let t="";if(/^raster.(?:item|service)pixelvalue/iu.test(i))t="number";else if(e.has(i)){let r=e.get(i);t=r.type?r.type.toLowerCase():""}else if(s.has(i)){let r=s.get(i);t=r.returnType?r.returnType.toLowerCase():""}else t="number";return t}async function ie(i){return new Map((await me(i)).filter(e=>e.visible).map(e=>[e.name,e]))}function re(i){let e=new Map;return i?.expressionInfos&&i.expressionInfos.forEach(s=>{let t=`${k.expression}${s.name}`;e.set(t,s)}),e}async function me(i){return await new Promise((e,s)=>{switch(i.type){case"feature":case"ogc-feature":case"stream":e(i.fields);break;case"sublayer":{let t=i,r=t?.layer;r?.portalItem&&r.url.includes("https://demographics")&&r.url.includes(".arcgis.com")?r.portalItem?.fetchData().then(a=>{if(a?.thematicGroup){let n=new Map(t.fields.map(o=>[o.name,o])),c=a.thematicGroup.fieldNames,p=[];c.forEach(o=>{n.has(o)&&p.push(n.get(o))}),e(p)}else e(t.fields)}).catch(a=>{s(new Error(a))}):e(t.fields);break}case"imagery":case"imagery-tile":case"wcs":e(i.rasterFields);break;default:e("fields"in i?i.fields??[]:[])}})}function d(i,e){return!i||!e?!1:i.toLocaleLowerCase()===e.toLocaleLowerCase()}async function ae(i,e,s,t){if(!s)return!1;let r=["feature","oriented-imagery"].includes(e.type),a=t?.item??e.portalItem,n=e.sourceJSON;if(!r||!a||!a.portal.user||!U(a)||G(a)||V(a)||H(n)||a.portal.isPortal&&q(a)||["oid","global-id","geometry"].includes(s.type)||await ue(e,s.name,t))return!1;let c=e.sourceJSON.geometryProperties,p=c?.shapeLengthFieldName,o=c?.shapeAreaFieldName;if(d(p,s.name)||d(o,s.name))return!1;let l=e.editFieldsInfo;if(l&&(d(l.creationDateField,s.name)||d(l.creatorField,s.name)||d(l.editDateField,s.name)||d(l.editorField,s.name))||d(e.objectIdField,s.name)||d(e.displayField,s.name)||d(e.typeIdField,s.name)||d(e.subtypeField,s.name)||e.timeInfo&&(d(e.timeInfo.startField,s.name)||d(e.timeInfo.endField,s.name)||d(e.timeInfo.trackIdField,s.name)))return!1;if(!t?.ignoreLayerRenderer&&e.featureReduction){let f=new Set;if(await v.collectFeatureReductionFields(f,e,e.featureReduction),Array.from(f).some(y=>d(y,s.name)))return!1}if(!t?.ignoreLayerRenderer&&(await v.getRendererFields(e.renderer,e.fieldsIndex)).some(f=>d(f,s.name)))return!1;if(!t?.ignoreLayerLabelingInfo){let f=e.labelingInfo?.map(y=>y.labelExpressionInfo?.expression);if(f&&((await v.getExpressionFields(e,f)).some(y=>d(y,s.name))||await ne(e,s,"layer")))return!1}if(!t?.ignoreLayerDefinitionExpression&&e.definitionExpression&&(await T.parseWhereClause(e.definitionExpression,e.fieldsIndex)).fieldNames.some(f=>d(f,s.name))||await he(e,s,t)||await _e(e,s))return!1;if(await ye(e,s))return await Promise.resolve(!1);if(await be(e,s))return await Promise.resolve(!1);if(ge(i,e,s)||e.relationships?.map(f=>f.keyField)?.some(f=>d(f,s.name)))return!1;let u=W(a,a.portal.user),w=t?.userItemInfo?.userGroups??await Q(e)??[],h=t?.userItemInfo?.itemGroups??await K(e)??[],b=Z(w,h);if(!u&&!b)return!1;let m=t?.userItemInfo?.relatedItems??await Y(a.id,a.portal,{relationshipType:"Service2Service"});return!(m?.data?.relatedItems&&m.data.relatedItems.some(f=>["WMTS","Map Service","Vector Tile Service"].includes(f.type)))}async function ue(i,e,s){let t=`${i.url}/${i.layerId}/fieldGroups`;try{let r=s?.userItemInfo&&"fieldGroups"in s.userItemInfo?s.userItemInfo.fieldGroups:(await X(t,{query:{f:"json"},responseType:"json"}))?.data?.fieldGroups;return r?r.some(a=>a.fields.some(n=>d(n,e))):!1}catch{return!1}}function ge(i,e,s){if(!i)return!1;let t=i.map?.applicationProperties?.viewing?.search;if(t){let r=t.layers?.find(a=>a.id===e.id);if(r){let a=r?.field?.name;if(a)return d(a,s.name)}}return!1}async function ne(i,e,s){let t=s==="layer"?i.labelingInfo?.filter(n=>I(n.where)):i.sourceJSON?.drawingInfo?.labelingInfo?.filter(n=>I(n.where));if(!t?.length)return!1;let r=[...await Promise.all(t.map(async n=>await T.parseWhereClause(n.where,i.fieldsIndex)))],a=!1;for(let n=0;n<r.length;n++){let c=r[n].fieldNames?.some(p=>d(p,e.name));if(!a&&c){a=!0;break}}return await Promise.resolve(a)}async function he(i,e,s){let t=i.portalItem;if(!t)return!1;let r=`${E(t.portal)}content/items/${t.id}/data`,a=(s?.userItemInfo?.itemData??await X(r,{query:{f:"json"},responseType:"json"}))?.data;if(!a)return!1;if(a?.layers){let n=a.layers.find(l=>l.id===i.layerId),c=n?.layerDefinition?.drawingInfo?.renderer,p=n?.layerDefinition?.featureReduction,o=n?.layerDefinition?.definitionExpression;if(!c&&!p&&!o)return!1;if(!s?.ignoreItemRenderer&&c){let l=P.fromJSON(c);if((await v.getRendererFields(l,i.fieldsIndex)).some(u=>d(u,e.name)))return!0}if(!s?.ignoreItemFeatureReduction&&p&&await oe(i,e,p)||o&&(await T.parseWhereClause(o,i.fieldsIndex)).fieldNames.some(l=>d(l,e.name)))return!0}return!1}async function _e(i,e){let s=i.sourceJSON,t=s?.drawingInfo?.renderer,r=s?.featureReduction;if(!t&&!r)return!1;if(t){let a=P.fromJSON(t);if((await v.getRendererFields(a,i.fieldsIndex)).some(n=>d(n,e.name)))return!0}return!!(r&&await oe(i,e,r))}async function ye(i,e){let s=i.sourceJSON?.drawingInfo?.labelingInfo;if(!s)return await Promise.resolve(!1);let t=s?.map(r=>r.labelExpressionInfo?.expression);if(t){if((await v.getExpressionFields(i,t)).some(r=>d(r,e.name)))return await Promise.resolve(!0);if(await ne(i,e,"service"))return await Promise.resolve(!0)}return await Promise.resolve(!1)}async function be(i,e){let s=i.sourceJSON?.definitionQuery;return s?(await T.parseWhereClause(s,i.fieldsIndex)).fieldNames.some(t=>d(t,e.name))?await Promise.resolve(!0):await Promise.resolve(!1):await Promise.resolve(!1)}async function oe(i,e,s){let t=s.type==="binning"?pe.fromJSON(s):fe.fromJSON(s),r=new Set;return await v.collectFeatureReductionFields(r,i,t),!!Array.from(r).some(a=>d(a,e.name))}var g=new Map;g.set("oid","key");g.set("guid","key");g.set("global-id","key");g.set("blob","binary");g.set("integer","integer");g.set("small-integer","integer");g.set("big-integer","integer");g.set("single","number");g.set("double","number");g.set("long","number");g.set("number","number");g.set("date","date-time");g.set("date-only","calendar");g.set("time-only","clock");g.set("timestamp-offset","time-zone");g.set("string","string");var Ne=({fieldType:i})=>_`<calcite-icon scale=s .icon=${g.get(i)}></calcite-icon>`,Fe=["esrignss_speed","esrignss_direction","esrisnsr_azimuth","esrignss_positionsourcetype","esrignss_receiver","esrignss_h_rms","esrignss_v_rms","esrignss_latitude","esrignss_longitude","esrignss_altitude","esrignss_pdop","esrignss_hdop","esrignss_vdop","esrignss_fixtype","esrignss_correctionage","esrignss_stationid","esrignss_numsats","esrignss_fixdatetime","esrignss_avg_h_rms","esrignss_avg_v_rms","esrignss_avg_positions","esrignss_h_stddev","esrignss_correction_source_name","esrignss_correction_source_type","esrignss_custom_attributes","esrignss_h_95_status","esrignss_ntrip_mount_point","esrignss_antenna_height","esrignss_orthometric_height","esrignss_profile_has_hor_xform","esrignss_profile_hor_xform","esrignss_receiver_gcs","esrignss_receiver_gcs_wkid","esrignss_receiver_geoid","esrignss_receiver_ref_epoch","esrisnsr_tilt_azimuth_accuracy","esrisnsr_tilt_azimuth","esrisnsr_tilt_angle_accuracy","esrisnsr_tilt_angle","esrignss_tilt_compensated","esrignss_cp1_latitude","esrignss_cp1_longitude","esrignss_cp1_altitude","esrignss_cp1_h_rms","esrignss_cp1_v_rms","esrignss_cp1_fixdatetime","esrignss_cp1_fixtype","esrignss_cp1_corr_age","esrignss_cp1_stationid","esrignss_cp1_numsats","esrignss_cp1_pdop","esrignss_cp1_hdop","esrignss_cp1_vdop","esrignss_cp1_avg_h_rms","esrignss_cp1_avg_v_rms","esrignss_cp1_avg_positions","esrignss_cp1_h_stddev","esrisnsr_cp1_slope_dist","esrisnsr_cp1_inclination","esrisnsr_cp1_azimuth","esrignss_cp2_latitude","esrignss_cp2_longitude","esrignss_cp2_altitude","esrignss_cp2_h_rms","esrignss_cp2_v_rms","esrignss_cp2_fixdatetime","esrignss_cp2_fixtype","esrignss_cp2_corr_age","esrignss_cp2_stationid","esrignss_cp2_numsats","esrignss_cp2_pdop","esrignss_cp2_hdop","esrignss_cp2_vdop","esrignss_cp2_avg_h_rms","esrignss_cp2_avg_v_rms","esrignss_cp2_avg_positions","esrignss_cp2_h_stddev","esrisnsr_cp2_slope_dist","esrisnsr_cp2_inclination","esrisnsr_cp2_azimuth","esrisnsr_offset_method","esrisnsr_offset_device","esrisnsr_offset_laser_height","esrisnsr_offset_laser_target_ht","esrisnsr_offset_mag_var","esrignss_worst_h_rms","esrignss_worst_v_rms","esrignss_worst_fixtype","esrignss_manual_locations"],Ee=M`.dialog{--calcite-dialog-max-size-y: 60%}.dialog-content-wrapper{position:relative;min-height:100px}.hide-overflow{overflow:hidden}.field-icons{padding:0 var(--calcite-spacing-lg);display:flex;align-items:center}.warning{border-bottom:var(--calcite-border-width-sm) solid var(--calcite-color-border-3);margin-bottom:var(--calcite-spacing-md)}.warning-message{font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-bold)}.loader-container{position:absolute;height:100%;width:100%;top:0;right:0;display:none;z-index:40;overflow:hidden;background:#fffffff2;padding:0}.active{display:flex;flex-direction:column;align-items:center;justify-content:center}.loader{padding:0}.loader-text{font-weight:var(--calcite-font-weight-medium);text-align:center;margin-right:6.25rem;margin-left:6.25rem}`,L=class extends j{constructor(){super(...arguments),this.arcadeExpMap=new Map,this.cancelNode=S(),this.dialogNode=S(),this.layerFields=[],this.layerFieldsMap=new Map,this.messages=B({blocking:!0}),this.deleteInProgress=!1,this.fieldsAreDeletable=!1,this._propWatcherTask=new z(this,{task:async([e,s])=>{let t=I(e)&&I(s);if(I(e)||N("error",this,A("layer")),I(s)||N("error",this,A("fieldNames")),!t)throw new Error("Required properties are missing");this._propWatcherTask.autoRun=!1,await this.processProps()},args:()=>[this.layer,this.fieldNames]}),this.arcgisBeforeModalClose=F(),this.arcgisClose=F(),this.arcgisBeforeDelete=F(),this.arcgisFieldsDeleted=F()}static{this.properties={config:0,fieldNames:0,layer:0,mapView:0,options:0}}static{this.styles=Ee}async processProps(){let{layer:e,mapView:s,fieldNames:t}=this;if(!e||!t){this.fieldsAreDeletable=!1;return}e.loaded||await e.load(),this.layerFields=e.fields.filter(a=>t.includes(a.name));let r=t.some(a=>!e.fields.find(n=>n.name===a));if(!this.layerFields?.length||r)this.fieldsAreDeletable=!1;else{let a=await Promise.all(this.layerFields.map(async n=>await ae(s,e,n,this.options)));if(this.fieldsAreDeletable=a.every(n=>n),!this.fieldsAreDeletable)return}if(this.layerFieldsMap=await ie(e),this.options?.ignorePopupTemplate||(this.arcadeExpMap=re(e.popupTemplate)),this.portal=e.portalItem?.portal??this.options?.portal,this.item=e.portalItem??this.options?.item,!this.item){this.fieldsAreDeletable=!1;return}await Ie.getCredential(this.item.url.replace("rest/services","rest/admin/services"))}getFieldLabel(e){let{layer:s,arcadeExpMap:t}=this;if(this.options?.ignorePopupTemplate)return this.getFieldDisplayNameFromLayerFields(e);{let r=(s.popupTemplate??s.createPopupTemplate()).fieldInfos?.find(a=>a.fieldName===e);return r?se(s,r,t):this.getFieldDisplayNameFromLayerFields(e)}}getFieldDisplayNameFromLayerFields(e){let{layer:s}=this,t=this.layerFieldsMap.get(e);return de.supportsFieldConfiguration(s)?s.getFieldAlias(e):t.alias??t.name}async deleteFields(){let{layer:e,fieldNames:s}=this,t=`${e.url.replace("/rest/services","/rest/admin/services")}/${e.layerId}/deleteFromDefinition`,r={fields:s.map(n=>({name:n}))},a={deleteFromDefinition:JSON.stringify(r)};await $(t,{query:{...a,f:"json",async:!1},method:"post",responseType:"json"}).then(async n=>{if(n.data?.success){let c=`${e.url}/${e.layerId}`;s.forEach(o=>{e.type==="feature"&&e.floorInfo?.floorField===o&&(e.floorInfo=null)});let p=await $(c,{query:{f:"json"},responseType:"json"});if(p){let o=p.data;this.currentLayerInfo=p.data,o&&(this.updateTypesAndTemplatesOnLayer(),s.forEach(l=>{o.templates?.length?o.templates.forEach(u=>delete u.prototype.attributes[l]):o.types?.forEach(u=>{u.templates.forEach(w=>delete w.prototype.attributes[l])})}),this.updateFeatureService(o))}else this.handleError()}else this.handleError()},()=>this.handleError())}updateTypesAndTemplatesOnLayer(){let{currentLayerInfo:e}=this,s=e;if(s.templates?.length){let t=this.updateTemplatesList(s.templates);s.templates=t}else if(s.types){let t=s.types;s.types=[],t.forEach(r=>{r.templates=this.updateTemplatesList(r.templates),this.addType(s,r)})}}updateTemplatesList(e){let{currentLayerInfo:s,messages:t}=this,r=[];return(e??[]).forEach(a=>{let n=new ve;n.description=a.description??"",n.name=a.name||t.newFeature,n.drawingTool=a.drawingTool||"point";let c={};s.fields.forEach(o=>{let l=!1;for(let u=0;u<a.prototype.attributes.length;u++)if(a.prototype.attributes[u]===o.name){l=!0,c[o.name]=a.prototype.attributes[o.name];break}!l&&o.editable&&!Fe.includes(o.name)&&(c[o.name]=o.defaultValue||null)});let p=new we({attributes:c});n.prototype=p,r.push(n)}),r}addType(e,s){e.types?e.types.some(t=>t.id===s.id)||e.types.push(s):e.types=[s]}async updateFeatureService(e){let{layer:s,fieldNames:t}=this,r={templates:e.templates,types:e.types},a=`${s.url.replace("/rest/services","/rest/admin/services")}/${s.layerId}/updateDefinition`,n={f:"json",updateDefinition:JSON.stringify(r)};await $(a,{query:{...n,f:"json"},method:"post",responseType:"json"}).then(async c=>{if(c.data?.success){let p=`${E(this.portal)}content/items/${this.item.id}/data`;if(this.options?.ignorePopupTemplate||t.forEach(o=>{s.popupTemplate?.fieldInfos&&(s.popupTemplate.fieldInfos=s.popupTemplate.fieldInfos.filter(l=>l.fieldName!==o)),s.popupTemplate?.content?.forEach((l,u)=>{l.type==="fields"&&l.fieldInfos&&((s.popupTemplate?.content)[u].fieldInfos=(s.popupTemplate?.content)[u].fieldInfos?.filter(w=>w.fieldName!==o))})}),s.attributeTableTemplate){let o=s.attributeTableTemplate.clone();o.elements=o.elements.filter(l=>!(l.type==="field"&&t.includes(l.fieldName))),o.orderByFields=o.orderByFields.filter(l=>!t.includes(l.field)),s.attributeTableTemplate=o}if(s.fieldConfigurations?.length){let o=le.clone(s.fieldConfigurations).filter(l=>!t.includes(l.name));s.fieldConfigurations=o}await $(p,{query:{f:"json"},responseType:"json"}).then(async o=>{let l=o.data;if(l?.layers||l?.tables){let u=s.isTable,w=u?l.tables:l.layers,h=w?.find(b=>b.id===s.layerId);if(t.forEach(b=>{h?.attributeTableInfo?.attributeTableElements&&(h.attributeTableInfo.attributeTableElements=h.attributeTableInfo.attributeTableElements.map(m=>{if(m.type==="field")return m.fieldName===b?void 0:m;if(m.type==="group"&&Array.isArray(m.attributeTableElements)){let f=m.attributeTableElements.filter(y=>!(y.type==="field"&&y.fieldName===b));return f.length?{...m,attributeTableElements:f}:void 0}return m}).filter(Boolean),h.attributeTableInfo.orderByFields=h.attributeTableInfo.orderByFields.filter(m=>m.field!==b))}),h?.layerDefinition?.fieldConfigurations&&(h.layerDefinition.fieldConfigurations=h.layerDefinition.fieldConfigurations.filter(b=>!t.includes(b.name))),h?.popupInfo){t.forEach(y=>{h.popupInfo.fieldInfos=h.popupInfo.fieldInfos.filter(x=>x.fieldName!==y),h.popupInfo.popupElements?.forEach((x,O)=>{x.type==="fields"&&x.fieldInfos&&(h.popupInfo.popupElements[O].fieldInfos=h.popupInfo.popupElements[O].fieldInfos.filter(ce=>ce.fieldName!==y))})});let b=`${E(this.portal)}content/users/${this.item.owner}/items/${this.item.id}/update`,m={};u?(m.tables=w,l.layers&&(m.layers=l.layers)):(m.layers=w,l.tables&&(m.tables=l.tables));let f={f:"json",text:JSON.stringify(m)};await $(b,{query:{...f},method:"post",responseType:"json"}).then(y=>{y.data?.success?this.handleSuccess():this.handleError()},()=>this.handleError())}else this.handleSuccess()}else o.httpStatus===200&&(!o.data||JSON.stringify(o.data)==="{}")?this.handleSuccess():this.handleError()},()=>this.handleError())}},()=>this.handleError())}handleSuccess(){this.arcgisFieldsDeleted.emit(),this.dialogNode?.value&&(this.dialogNode.value.open=!1),this.options?.handleCloseOnConsumer?this.arcgisBeforeModalClose.emit("success"):this.displaySuccessAlert()}handleError(e){this.dialogNode?.value&&(this.dialogNode.value.open=!1),e?this.options?.handleCloseOnConsumer?this.arcgisBeforeModalClose.emit("read-only-error"):this.displayReadOnlyErrorAlert():this.options?.handleCloseOnConsumer?this.arcgisBeforeModalClose.emit("error"):this.displayErrorAlert()}displaySuccessAlert(){let{messages:e,fieldNames:s}=this;this.successAlertNode&&(this.successAlertNode.parentElement?.removeChild(this.successAlertNode),this.successAlertNode=void 0),this.successAlertNode=D(_`<calcite-alert .label=${s.length===1?e.fieldDeleted:e.fieldsDeleted} kind=success icon=check-circle auto-close open><div slot=message>${s.length===1?e.fieldDeleted:e.fieldsDeleted}</div></calcite-alert>`),document.body.append(this.successAlertNode)}displayErrorAlert(){let{messages:e}=this;this.errorAlertNode&&(this.errorAlertNode.parentElement?.removeChild(this.errorAlertNode),this.errorAlertNode=void 0),this.errorAlertNode=D(_`<calcite-alert .label=${e.fieldDeletionUnsuccessful} kind=danger icon=exclamation-mark-triangle auto-close open><div slot=message>${e.fieldDeletionUnsuccessful}</div></calcite-alert>`),document.body.append(this.errorAlertNode)}displayReadOnlyErrorAlert(){let{messages:e,portal:s}=this;this.errorAlertNode&&(this.errorAlertNode.parentElement?.removeChild(this.errorAlertNode),this.errorAlertNode=void 0),this.errorAlertNode=D(_`<calcite-alert .label=${e.fieldDeletionUnsuccessful} kind=danger icon=exclamation-mark-triangle auto-close auto-close-duration=slow open><div slot=title>${e.error}</div><div slot=message>${s.isPortal?e.readOnlyErrorMessageEnterprise:e.readOnlyErrorMessage}</div>${!s.isPortal&&_`<calcite-link slot=link target=_blank href=https://status.arcgis.com>${e.healthDashboard}</calcite-link>`||""}</calcite-alert>`),document.body.append(this.errorAlertNode)}render(){let{messages:e,fieldsAreDeletable:s,fieldNames:t,deleteInProgress:r}=this;return this._propWatcherTask.render({complete:()=>(s||(t?.length?t?.length===1?N("error",this,"Field cannot be deleted"):N("error",this,"One or more fields cannot be deleted"):N("error",this,R("fieldNames"))),_`<calcite-dialog class="dialog" width=s open modal outside-close-disabled escape-disabled @calciteDialogClose=${()=>this.arcgisClose.emit()} .heading=${t?.length===1?e.deleteField:e.deleteFields} ${C(this.dialogNode)}>${s?_`<div class=${`dialog-content-wrapper ${r?"hide-overflow":""}`}>${this.renderDeleteLoader()}<calcite-label>${t.length===1?e.deletePrompt:e.deleteMultiplePrompt}</calcite-label>${this.renderFieldsPreview()}</div>${this.renderCancelButton()}${this.renderDeleteButton()}`:this.renderError()}</calcite-dialog>`)})}renderError(){let{messages:e}=this;return _`<div class="loader-container active"><div class="loader-text">${e.errorOccurred}</div></div>`}renderDeleteLoader(){let{messages:e,fieldNames:s,deleteInProgress:t}=this;return _`<div class=${`loader-container ${t?"active":""}`}><calcite-loader class="loader" .label=${s.length===1?e.deletingField:e.deletingFields} .hidden=${!t}></calcite-loader><div class="loader-text">${s.length===1?e.deletingField:e.deletingFields}</div></div>`}renderFieldsPreview(){let{fieldNames:e,layerFields:s,layerFieldsMap:t,arcadeExpMap:r,messages:a}=this;return _`<calcite-list .label=${a.fields}>${e.map(n=>{let c=s.find(p=>p.name===n);return _`<calcite-list-item .label=${this.getFieldLabel(n)} .description=${`{${n}}`} .value=${n} .disabled=${!c.editable}><div slot=actions-end class="field-icons">${Ne({fieldType:te(n,t,r)})}</div></calcite-list-item>`})}</calcite-list>`}renderCancelButton(){let{messages:e}=this;return _`<calcite-button @click=${()=>this.dialogNode.value.open=!1} slot=footer-end appearance=outline ${C(this.cancelNode)}>${e.cancel}</calcite-button>`}renderDeleteButton(){let{messages:e,fieldNames:s}=this;return _`<calcite-button kind=danger slot=footer-end @click=${async t=>{let{portal:r}=this;t.currentTarget.disabled=!0,this.cancelNode.value.disabled=!0,this.dialogNode.value.closeDisabled=!0,r.sourceJSON?.isReadOnly?this.handleError(!0):(this.deleteInProgress=!0,this.requestUpdate(),this.arcgisBeforeDelete.emit(),await this.deleteFields())}}>${s.length===1?e.deleteField:e.deleteFieldsWithNumber.replace("${number}",`${s.length}`)}</calcite-button>`}};J("arcgis-portal-field-delete",L);return L},"core/lang","layers/support/FeatureTemplate","Graphic","identity/IdentityManager","request","applications/PortalApp/layerUtils","layers/support/fieldUtils","layers/support/FeatureReductionBinning","layers/support/FeatureReductionCluster","renderers/support/jsonUtils","request","core/sql","applications/PortalApp/layerUtils",a)
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{A as n,B as o,C as a,l as r,m as s}from"./AICPYLWE.js";var i=class extends a{constructor(t){if(super(t),this.it=s,t.type!==n.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===s||t==null)return this._t=void 0,this.it=t;if(t===r)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};i.directiveName="unsafeHTML",i.resultType=1;var f=o(i);export{f as a};
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{A as n,B as o,C as a,l as r,m as s}from"./CWSEBETE.js";var i=class extends a{constructor(t){if(super(t),this.it=s,t.type!==n.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===s||t==null)return this._t=void 0,this.it=t;if(t===r)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};i.directiveName="unsafeHTML",i.resultType=1;var f=o(i);export{f as a};
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as w,d as y,e as g}from"./K75JTQPW.js";export default $arcgis.t(([E,k])=>{var u={},c={},l={};async function x({requester:t,key:o,id:e,cacheOption:r}){let n=l[o]?.[e]?.expireAt,a=!!n&&new Date().getTime()>n;if(u[o]?.[e]&&!a)return u[o][e];c[o]||(c[o]={}),(!c[o][e]||a)&&(c[o][e]=t());let i=await c[o][e];if(u[o]||(u[o]={}),l[o]||(l[o]={}),u[o][e]=i,r){let{expireAfter:p,getExpireAfterFromResult:s}=r,m=s||p?new Date().getTime()+(s?.(i)??p??0):null;l[o][e]={...l[o][e],expireAt:m}}return i}async function D({url:t,portal:o,params:e={},options:r={},method:n,abortControllerId:a,excludeJson:i}){let p=P(a)?.signal,{customToken:s,addTokenManually:m,addSSL:A,useProxy:S}=r,f={...e};if(!t.includes("f=")&&!i&&(f.f="json"),s)f.token=s;else if(m!==!1){let h=await T(o);h&&(f.token=h)}let C=A?M(t,o):t,b={query:f,method:n||"auto",...r,timeout:r.timeout||0,useProxy:S,...r?.disableIdentityLookup?{authMode:"anonymous"}:{}},q=await k(C,{signal:p,...b});return a&&(d[a]=void 0),q.data}var d={};function P(t){if(t)return d[t]&&d[t].abort(),d[t]=new AbortController,d[t]}async function T(t){let o=g(t);if(!t?.isPortal||!o)return y(t);let e=t?.user;if(!e&&o)return;let{token:r}=await x({requester:async()=>await I(t),key:"platformSelf",id:e?.id??t.id??"<unknown>",cacheOption:{getExpireAfterFromResult:n=>n.expires_in}});return r}var I=async t=>{let o={"X-Esri-Auth-Client-Id":await L(t),"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/u,"")};return(await k(`${w(t)}/oauth2/platformSelf`,{authMode:"no-prompt",headers:o,withCredentials:!0,method:"post"})).data},L=async t=>(await x({requester:async()=>await E.getCredential(w(t),{oAuthPopupConfirmation:!1}),key:"credential",id:t.user?.id??"<unknown>"})).oAuthState?.appId??"arcgisonline";function M(t,o){return window.location.protocol==="https:"||o.allSSL?t.replace("http:","https:"):t}return{a:x,b:D,c:T}},"identity/IdentityManager","request")
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as w,d as y,e as g}from"./VMQIDO4Z.js";export default $arcgis.t(([E,k])=>{var u={},c={},l={};async function x({requester:t,key:o,id:e,cacheOption:r}){let n=l[o]?.[e]?.expireAt,a=!!n&&new Date().getTime()>n;if(u[o]?.[e]&&!a)return u[o][e];c[o]||(c[o]={}),(!c[o][e]||a)&&(c[o][e]=t());let i=await c[o][e];if(u[o]||(u[o]={}),l[o]||(l[o]={}),u[o][e]=i,r){let{expireAfter:p,getExpireAfterFromResult:s}=r,m=s||p?new Date().getTime()+(s?.(i)??p??0):null;l[o][e]={...l[o][e],expireAt:m}}return i}async function D({url:t,portal:o,params:e={},options:r={},method:n,abortControllerId:a,excludeJson:i}){let p=P(a)?.signal,{customToken:s,addTokenManually:m,addSSL:A,useProxy:S}=r,f={...e};if(!t.includes("f=")&&!i&&(f.f="json"),s)f.token=s;else if(m!==!1){let h=await T(o);h&&(f.token=h)}let C=A?M(t,o):t,b={query:f,method:n||"auto",...r,timeout:r.timeout||0,useProxy:S,...r?.disableIdentityLookup?{authMode:"anonymous"}:{}},q=await k(C,{signal:p,...b});return a&&(d[a]=void 0),q.data}var d={};function P(t){if(t)return d[t]&&d[t].abort(),d[t]=new AbortController,d[t]}async function T(t){let o=g(t);if(!t?.isPortal||!o)return y(t);let e=t?.user;if(!e&&o)return;let{token:r}=await x({requester:async()=>await I(t),key:"platformSelf",id:e?.id??t.id??"<unknown>",cacheOption:{getExpireAfterFromResult:n=>n.expires_in}});return r}var I=async t=>{let o={"X-Esri-Auth-Client-Id":await L(t),"X-Esri-Auth-Redirect-Uri":window.location.href.replace(/#.*$/u,"")};return(await k(`${w(t)}/oauth2/platformSelf`,{authMode:"no-prompt",headers:o,withCredentials:!0,method:"post"})).data},L=async t=>(await x({requester:async()=>await E.getCredential(w(t),{oAuthPopupConfirmation:!1}),key:"credential",id:t.user?.id??"<unknown>"})).oAuthState?.appId??"arcgisonline";function M(t,o){return window.location.protocol==="https:"||o.allSSL?t.replace("http:","https:"):t}return{a:x,b:D,c:T}},"identity/IdentityManager","request")
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{B as s,C as i,F as o,m as r}from"./AICPYLWE.js";var u=s(class extends i{constructor(){super(...arguments),this.key=r}render(t,e){return this.key=t,e}update(t,[e,m]){return e!==this.key&&(o(t),this.key=e),m}});export{u as a};
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{B as s,C as i,F as o,m as r}from"./CWSEBETE.js";var u=s(class extends i{constructor(){super(...arguments),this.key=r}render(t,e){return this.key=t,e}update(t,[e,m]){return e!==this.key&&(o(t),this.key=e),m}});export{u as a};
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
2
  export default $arcgis.t(([{once:l},c])=>{var D=(t,e,r)=>{let a=d(t,e,r);return a=m(r,a),a},d=(t,e,r)=>{let a=r.classificationMetadata.defaultValue,s=structuredClone(t)??{[e]:a};return s[e]??=a,s},$=(t,e)=>t&&Object.fromEntries(Object.entries(t).filter(([r])=>e.get(r)?.enabled!==!1)),m=(t,e)=>{let r=structuredClone(e);return Object.entries(t.attributes).forEach(([a,s])=>{if(r?.[a])return;let{uiElement:o,defaultValue:n}=s;switch(o){case"date":r&&(r[a]=p(s));break;case"multi-select":case"multi-grouped-select-nested":n&&r&&(r[a]=[n]);break;case"checkbox":n&&r&&(r[a]=n==="true");break;case"single-select":case"text":n&&r&&(r[a]=n);break}}),r?.fgi||delete r?.fgiOptions,r},p=t=>{let e=new Date,{type:r,defaultDateTimeline:a,defaultDateTimelineUnits:s}=t;if(r==="date"&&a&&s)switch(s.toLowerCase()){case"years":e.setFullYear(e.getFullYear()+a);break;case"months":e.setMonth(e.getMonth()+a);break;case"days":e.setDate(e.getDate()+a);break}let o=(e.getMonth()+1).toString(),n=e.getDate().toString();return`${e.getFullYear()}-${o.length===1?`0${o}`:o}-${n.length===1?`0${n}`:n}`},k=(t,e,r)=>{let a=e?.createdUser,s=e?.createdDate;return e={[r]:t,...a?{createdUser:a}:{},...s?{createdDate:s}:{}},e},U=async t=>{try{if(!t)return!1;t.loaded||await t.load();let e=t.portal.user??await l(()=>t?.portal.user);if(!e)return!1;let r=e.privileges.includes("portal:admin:updateItems");return i(t,e)||g(t,e)||r||t.access==="shared"&&await f(t,e)}catch(e){return console.error(e),!1}};function i(t,e){return t.owner===e.username}function g(t,e){let r=t.owner,a=t.itemControl==="admin",s=["esri_livingatlas","esri_demographics","esri_boundaries"];return t.portal?.isPortal&&!i(t,e)&&a&&r?.includes("esri_")&&!s.includes(r)?!1:a}var f=async(t,e)=>{let r=t.portal.restUrl,a=(await h(e,r)).result??[],s=(await b(t,r)).result??[];return a?.some(o=>s?.some(n=>o.id===n.id&&o.capabilities.includes("updateitemcontrol")))},h=async(t,e)=>{let r=`${e}/community/users/${t.username}`;try{return{result:(await c(r,{query:{f:"json"},responseType:"json"})).data?.groups??[]}}catch{return{error:{code:"unhandledError"}}}},b=async(t,e)=>{let r=t.id,a=`${e}/content/items/${r}/groups`;try{let s=await c(a,{query:{f:"json",method:"post"},responseType:"json"}),o=s.data?.admin??[],n=s.data?.member??[],u=s.data?.other??[];return{result:[...o,...n,...u]}}catch{return{error:{code:"unhandledError"}}}},j=(t,e)=>{let r=Date.now(),a=t?.portal.user?.username??"",{createdUser:s=a,createdDate:o=r}=e??{};return{createdUser:s,createdDate:o,lastEditedUser:a,lastEditedDate:r}};return{a:D,b:$,c:m,d:k,e:U,f:j}},"core/reactiveUtils","request")
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import a from"./456JKNCU.js";import"./USGROSML.js";import"./ILDTKRON.js";import"./VMQIDO4Z.js";import"./QS3GXAIH.js";import"./2GBRZSEC.js";import"./CWSEBETE.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";export default $arcgis.t(([a])=>{return a},a)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{b as a}from"./FFLIAQOL.js";import"./25XJ66JO.js";import"./5YDITHQA.js";import"./OV5O7YP4.js";import"./XUPYBBRI.js";import"./C5U7YKVI.js";import"./6BMWSGLA.js";import"./CWSEBETE.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";export{a as ArcgisPortalBrowserFilterStatus};
@@ -1,3 +1,3 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{a as n}from"./VDXESPJK.js";function c(e){let t=/(https?:\/\/[^\s]+)/gu;return e?.replace(t,r=>`<a href="${r}" target="_blank">${r}</a>`)}function u(e){return e?.replace(/(?:\r)/gu,"&#10;").replace(/(?:\n)/gu,"&#13;")}function a(e){return e?.replace(/(?:&#10;)/gu,"\r").replace(/(?:&#13;)/gu,`
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import{a as n}from"./25XJ66JO.js";function c(e){let t=/(https?:\/\/[^\s]+)/gu;return e?.replace(t,r=>`<a href="${r}" target="_blank">${r}</a>`)}function u(e){return e?.replace(/(?:\r)/gu,"&#10;").replace(/(?:\n)/gu,"&#13;")}function a(e){return e?.replace(/(?:&#10;)/gu,"\r").replace(/(?:&#13;)/gu,`
3
3
  `)}function o(e){return e?.replace(/&#10;&#13;|&#10;|&#13;|\r\n|\r|\n/gu,"<br>")}function i(e,t){let r=document.documentElement.dir==="rtl";return e.replace("${start}",r?t.end:t.start).replace("${end}",r?t.start:t.end).replace("${total}",t.total)}function l(e=""){let t=n(e);return["id:","title:","type:","typekeywords:","owner:"].some(r=>e.includes(r))?t.replace(/[<>\/\\?]/gu,"\\$&").trim():t.replace(/[\[\]\{\}\(\)\-+:<>\/\\?]/gu,"\\$&").trim()}function p(e){let t=l(e.replace(/\s+/gu," "));if(t)return`title:"${t.replace(/"/gu,'\\"')}"`}function g(e){return o(u(c(a(e))))}function f(e){return e?.endsWith("/")?e.slice(0,e.length-1):e}export{i as a,l as b,p as c,g as d,f as e};