@arcgis/portal-components 5.2.0-next.47 → 5.2.0-next.49

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 (325) hide show
  1. package/dist/cdn/{KM5XGRXL.js → 2EJG4DOC.js} +1 -1
  2. package/dist/cdn/2JCFEF3J.js +2 -0
  3. package/dist/cdn/2VLAJOZX.js +2 -0
  4. package/dist/cdn/3MIY7CNH.js +2 -0
  5. package/dist/cdn/3PWVEX4V.js +2 -0
  6. package/dist/cdn/6D3PU4ZT.js +2 -0
  7. package/dist/cdn/75N65DHR.js +2 -0
  8. package/dist/cdn/7QXIBQV7.js +2 -0
  9. package/dist/cdn/AWIVXH7M.js +2 -0
  10. package/dist/cdn/BJTJP57C.js +2 -0
  11. package/dist/cdn/{IBP5XPD5.js → BUKOHPY6.js} +1 -1
  12. package/dist/cdn/{6RK4FBHZ.js → BZRM2V6V.js} +1 -1
  13. package/dist/cdn/{7E5GJIZV.js → CF7ZMRAH.js} +1 -1
  14. package/dist/cdn/CSH3WCYD.js +2 -0
  15. package/dist/cdn/{ZVFNCDG5.js → CU34VHCE.js} +1 -1
  16. package/dist/cdn/DALGPO36.js +2 -0
  17. package/dist/cdn/{GJTJLK6T.js → DHMH2XFA.js} +1 -1
  18. package/dist/cdn/DNMB343K.js +2 -0
  19. package/dist/cdn/{JZKBUYPV.js → EJZ55DVU.js} +1 -1
  20. package/dist/cdn/F3G5N2UU.js +2 -0
  21. package/dist/cdn/{GQMPPCEL.js → FDQ3EJUR.js} +1 -1
  22. package/dist/cdn/{JOUSVRID.js → GKBK32VH.js} +1 -1
  23. package/dist/cdn/GYFQDPCN.js +2 -0
  24. package/dist/cdn/IF2LNWBA.js +2 -0
  25. package/dist/cdn/IFYHXRHA.js +2 -0
  26. package/dist/cdn/{RKNDXSVK.js → ILBX6R25.js} +1 -1
  27. package/dist/cdn/{NJ2WDAJM.js → IOVOCADO.js} +1 -1
  28. package/dist/cdn/{L4DRNGOL.js → IZTK4QQL.js} +1 -1
  29. package/dist/cdn/{TJAX7J4T.js → J46I5HEQ.js} +1 -1
  30. package/dist/cdn/JJ7P5JJ3.js +2 -0
  31. package/dist/cdn/{WO23VQK3.js → JZ2ZI5WO.js} +1 -1
  32. package/dist/cdn/{WGZZB2DJ.js → K7NCYRPX.js} +1 -1
  33. package/dist/cdn/LDCSQHZX.js +2 -0
  34. package/dist/cdn/{CGT2DH3Z.js → LTQA5JRV.js} +1 -1
  35. package/dist/cdn/{BYXDMWEZ.js → M5MGOBU3.js} +1 -1
  36. package/dist/cdn/{HZ5W3DBR.js → M6X5KCWL.js} +1 -1
  37. package/dist/cdn/{JYIPREIH.js → O6QBY4ST.js} +1 -1
  38. package/dist/cdn/OBBYT2AV.js +2 -0
  39. package/dist/cdn/OBVMQ64S.js +2 -0
  40. package/dist/cdn/{AXM6XCZD.js → OFDH6CTA.js} +1 -1
  41. package/dist/cdn/{3KR5RIDQ.js → OGC5YU6V.js} +1 -1
  42. package/dist/cdn/OUN473QW.js +2 -0
  43. package/dist/cdn/{GKOXTQHB.js → P6P7SKFX.js} +1 -1
  44. package/dist/cdn/{IXVR3KMC.js → PBH3JZCG.js} +1 -1
  45. package/dist/cdn/QPFPNUHH.js +2 -0
  46. package/dist/cdn/{WSWHK6LB.js → R3VY2KZV.js} +1 -1
  47. package/dist/cdn/R6SSAPLB.js +3 -0
  48. package/dist/cdn/{3Z3ZPFGJ.js → SJDQS32I.js} +1 -1
  49. package/dist/cdn/SQVFNATF.js +2 -0
  50. package/dist/cdn/{JV23HJTE.js → STZRXY35.js} +1 -1
  51. package/dist/cdn/{SXZRHHXC.js → U2QZZSPC.js} +1 -1
  52. package/dist/cdn/{ZPIXIG3Z.js → UCCRV44E.js} +1 -1
  53. package/dist/cdn/{FXIP4QXJ.js → UQWELJR5.js} +1 -1
  54. package/dist/cdn/{JS45DWQ3.js → VMNR4TQZ.js} +1 -1
  55. package/dist/cdn/{WX65MRDH.js → X6N7Y4IA.js} +1 -1
  56. package/dist/cdn/{D76KMXZD.js → XQJNAQVO.js} +1 -1
  57. package/dist/cdn/{IBU3M4KD.js → XVFCF4AX.js} +2 -2
  58. package/dist/cdn/{AL57LV4E.js → Y4YNN6DS.js} +1 -1
  59. package/dist/cdn/Y5CRBUVL.js +2 -0
  60. package/dist/cdn/YR5FO6PO.js +2 -0
  61. package/dist/cdn/YVKSTDL6.js +2 -0
  62. package/dist/cdn/{WZYBNC3M.js → ZR7DM7HF.js} +3 -3
  63. package/dist/cdn/assets/portal-account-switcher/t9n/messages.en.json +1 -0
  64. package/dist/cdn/assets/portal-navigation/apps/api-for-python.avif +0 -0
  65. package/dist/cdn/assets/portal-navigation/apps/appstudio.avif +0 -0
  66. package/dist/cdn/assets/portal-navigation/apps/arcade.avif +0 -0
  67. package/dist/cdn/assets/portal-navigation/apps/arcgis-360-vr.avif +0 -0
  68. package/dist/cdn/assets/portal-navigation/apps/arcgis-earth.avif +0 -0
  69. package/dist/cdn/assets/portal-navigation/apps/arcgis-enterprise.avif +0 -0
  70. package/dist/cdn/assets/portal-navigation/apps/arcgis-experience-builder.avif +0 -0
  71. package/dist/cdn/assets/portal-navigation/apps/arcgis-geoanalytics.avif +0 -0
  72. package/dist/cdn/assets/portal-navigation/apps/arcgis-hub.avif +0 -0
  73. package/dist/cdn/assets/portal-navigation/apps/arcgis-online.avif +0 -0
  74. package/dist/cdn/assets/portal-navigation/apps/arcgis-pro.avif +0 -0
  75. package/dist/cdn/assets/portal-navigation/apps/arcgis-reality-studio.avif +0 -0
  76. package/dist/cdn/assets/portal-navigation/apps/arcgis-urban.avif +0 -0
  77. package/dist/cdn/assets/portal-navigation/apps/blank.avif +0 -0
  78. package/dist/cdn/assets/portal-navigation/apps/business-analyst.avif +0 -0
  79. package/dist/cdn/assets/portal-navigation/apps/city-engine.avif +0 -0
  80. package/dist/cdn/assets/portal-navigation/apps/collector.avif +0 -0
  81. package/dist/cdn/assets/portal-navigation/apps/community-analyst.avif +0 -0
  82. package/dist/cdn/assets/portal-navigation/apps/configurable-apps.avif +0 -0
  83. package/dist/cdn/assets/portal-navigation/apps/dashboards-beta.avif +0 -0
  84. package/dist/cdn/assets/portal-navigation/apps/dashboards-classic.avif +0 -0
  85. package/dist/cdn/assets/portal-navigation/apps/data-pipelines.avif +0 -0
  86. package/dist/cdn/assets/portal-navigation/apps/deeplearningstudio.avif +0 -0
  87. package/dist/cdn/assets/portal-navigation/apps/demographics.avif +0 -0
  88. package/dist/cdn/assets/portal-navigation/apps/drone2map.avif +0 -0
  89. package/dist/cdn/assets/portal-navigation/apps/esri-events.avif +0 -0
  90. package/dist/cdn/assets/portal-navigation/apps/essential-apps.avif +0 -0
  91. package/dist/cdn/assets/portal-navigation/apps/excalibur.avif +0 -0
  92. package/dist/cdn/assets/portal-navigation/apps/explorer.avif +0 -0
  93. package/dist/cdn/assets/portal-navigation/apps/field-apps.avif +0 -0
  94. package/dist/cdn/assets/portal-navigation/apps/fieldmaps-beta.avif +0 -0
  95. package/dist/cdn/assets/portal-navigation/apps/fieldmaps-ea.avif +0 -0
  96. package/dist/cdn/assets/portal-navigation/apps/fieldmaps.avif +0 -0
  97. package/dist/cdn/assets/portal-navigation/apps/generic-app.avif +0 -0
  98. package/dist/cdn/assets/portal-navigation/apps/geobim.avif +0 -0
  99. package/dist/cdn/assets/portal-navigation/apps/geoplanner.avif +0 -0
  100. package/dist/cdn/assets/portal-navigation/apps/grid-view-9.avif +0 -0
  101. package/dist/cdn/assets/portal-navigation/apps/indoor.avif +0 -0
  102. package/dist/cdn/assets/portal-navigation/apps/indoors.avif +0 -0
  103. package/dist/cdn/assets/portal-navigation/apps/insights.avif +0 -0
  104. package/dist/cdn/assets/portal-navigation/apps/instant-apps.avif +0 -0
  105. package/dist/cdn/assets/portal-navigation/apps/ips.avif +0 -0
  106. package/dist/cdn/assets/portal-navigation/apps/knowledge-studio.avif +0 -0
  107. package/dist/cdn/assets/portal-navigation/apps/living-atlas.avif +0 -0
  108. package/dist/cdn/assets/portal-navigation/apps/location-platform.avif +0 -0
  109. package/dist/cdn/assets/portal-navigation/apps/map-maker.avif +0 -0
  110. package/dist/cdn/assets/portal-navigation/apps/map-viewer-beta.avif +0 -0
  111. package/dist/cdn/assets/portal-navigation/apps/map-viewer-classic.avif +0 -0
  112. package/dist/cdn/assets/portal-navigation/apps/map-viewer.avif +0 -0
  113. package/dist/cdn/assets/portal-navigation/apps/maps-adobe-cloud.avif +0 -0
  114. package/dist/cdn/assets/portal-navigation/apps/maps-for-office.avif +0 -0
  115. package/dist/cdn/assets/portal-navigation/apps/maps-for-power-bi.avif +0 -0
  116. package/dist/cdn/assets/portal-navigation/apps/maps-for-sharepoint.avif +0 -0
  117. package/dist/cdn/assets/portal-navigation/apps/marketplace.avif +0 -0
  118. package/dist/cdn/assets/portal-navigation/apps/mission.avif +0 -0
  119. package/dist/cdn/assets/portal-navigation/apps/monitor.avif +0 -0
  120. package/dist/cdn/assets/portal-navigation/apps/navigator.avif +0 -0
  121. package/dist/cdn/assets/portal-navigation/apps/notebook.avif +0 -0
  122. package/dist/cdn/assets/portal-navigation/apps/office-apps.avif +0 -0
  123. package/dist/cdn/assets/portal-navigation/apps/open-data.avif +0 -0
  124. package/dist/cdn/assets/portal-navigation/apps/operations-dashboard.avif +0 -0
  125. package/dist/cdn/assets/portal-navigation/apps/ortho-maker.avif +0 -0
  126. package/dist/cdn/assets/portal-navigation/apps/pro-extension.avif +0 -0
  127. package/dist/cdn/assets/portal-navigation/apps/quick-capture.avif +0 -0
  128. package/dist/cdn/assets/portal-navigation/apps/redistricting.avif +0 -0
  129. package/dist/cdn/assets/portal-navigation/apps/runtime.avif +0 -0
  130. package/dist/cdn/assets/portal-navigation/apps/scene-viewer.avif +0 -0
  131. package/dist/cdn/assets/portal-navigation/apps/sites.avif +0 -0
  132. package/dist/cdn/assets/portal-navigation/apps/solutions.avif +0 -0
  133. package/dist/cdn/assets/portal-navigation/apps/story-maps.avif +0 -0
  134. package/dist/cdn/assets/portal-navigation/apps/streetmap-premium.avif +0 -0
  135. package/dist/cdn/assets/portal-navigation/apps/survey123.avif +0 -0
  136. package/dist/cdn/assets/portal-navigation/apps/svg-app-circle.svg +1 -0
  137. package/dist/cdn/assets/portal-navigation/apps/svg-app-icon.svg +1 -0
  138. package/dist/cdn/assets/portal-navigation/apps/track-viewer.avif +0 -0
  139. package/dist/cdn/assets/portal-navigation/apps/user-type-extension-online.avif +0 -0
  140. package/dist/cdn/assets/portal-navigation/apps/user-type-extension.avif +0 -0
  141. package/dist/cdn/assets/portal-navigation/apps/vector-tile-style-editor.avif +0 -0
  142. package/dist/cdn/assets/portal-navigation/apps/velocity.avif +0 -0
  143. package/dist/cdn/assets/portal-navigation/apps/web-app-builder.avif +0 -0
  144. package/dist/cdn/assets/portal-navigation/apps/web-editor.avif +0 -0
  145. package/dist/cdn/assets/portal-navigation/apps/web-mapping.avif +0 -0
  146. package/dist/cdn/assets/portal-navigation/apps/workflow-manager-beta.avif +0 -0
  147. package/dist/cdn/assets/portal-navigation/apps/workflow-manager.avif +0 -0
  148. package/dist/cdn/assets/portal-navigation/apps/workforce.avif +0 -0
  149. package/dist/cdn/assets/portal-navigation/product-logos/advanced-editing-user-type-extension-glyph-32.svg +1 -0
  150. package/dist/cdn/assets/portal-navigation/product-logos/arc-hydro-glyph-32.svg +1 -0
  151. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-360-vr-glyph-32.svg +1 -0
  152. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-api-for-python-glyph-32.svg +1 -0
  153. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-appstudio-glyph-32.svg +1 -0
  154. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-arcade-expression-language-glyph-32.svg +1 -0
  155. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-business-analyst-glyph-32.svg +1 -0
  156. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-cityengine-glyph-32.svg +1 -0
  157. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-collector-glyph-32.svg +1 -0
  158. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-community-analyst-glyph-32.svg +1 -0
  159. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-connectors-for-power-automate-glyph-32.svg +1 -0
  160. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-dashboards-glyph-32.svg +1 -0
  161. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-data-interoperability-glyph-32.svg +1 -0
  162. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-data-pipelines-glyph-32.svg +1 -0
  163. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-data-reviewer-glyph-32.svg +1 -0
  164. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-deep-learning-studio-glyph-32.svg +1 -0
  165. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-drone2map-glyph-32.svg +1 -0
  166. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-earth-glyph-32.svg +1 -0
  167. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-enterprise-glyph-32.svg +1 -0
  168. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-excalibur-glyph-32.svg +1 -0
  169. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-excalibur-gray-glyph-32.svg +1 -0
  170. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-experience-builder-glyph-32.svg +1 -0
  171. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-explorer-glyph-32.svg +1 -0
  172. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-field-maps-designer-ea-glyph-32.svg +1 -0
  173. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-field-maps-glyph-32.svg +1 -0
  174. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-flight-glyph-32.svg +1 -0
  175. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-for-autocad-glyph-32.svg +1 -0
  176. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-for-autodesk-forma-glyph-32.svg +1 -0
  177. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-for-developers-glyph-32.svg +1 -0
  178. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-for-excel-glyph-32.svg +1 -0
  179. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-for-microsoft-365-glyph-32.svg +1 -0
  180. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-for-power-apps-glyph-32.svg +1 -0
  181. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-for-teams-glyph-32.svg +1 -0
  182. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-geoanalytics-engine-glyph-32.svg +1 -0
  183. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-geobim-glyph-32.svg +1 -0
  184. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-geoplanner-glyph-32.svg +1 -0
  185. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-hub-glyph-32.svg +1 -0
  186. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-image-glyph-32.svg +1 -0
  187. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-indoors-glyph-32.svg +1 -0
  188. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-insights-glyph-32.svg +1 -0
  189. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-instant-apps-glyph-32.svg +1 -0
  190. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-knowledge-glyph-32.svg +1 -0
  191. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-living-atlas-of-the-world-glyph-32.svg +1 -0
  192. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-location-platform-glyph-32.svg +1 -0
  193. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-logo-glyph-32.svg +76 -0
  194. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-maps-for-adobe-creative-cloud-glyph-32.svg +1 -0
  195. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-maps-for-power-bi-glyph-32.svg +1 -0
  196. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-maps-for-sharepoint-glyph-32.svg +1 -0
  197. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-maps-sdk-for-javascript-glyph-32.svg +1 -0
  198. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-maps-sdks-for-game-engines-glyph-32.svg +1 -0
  199. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-maps-sdks-for-native-apps-glyph-32.svg +1 -0
  200. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-maritime-glyph-32.svg +1 -0
  201. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-marketplace-glyph-32.svg +1 -0
  202. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-mission-glyph-32.svg +1 -0
  203. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-monitor-glyph-32.svg +1 -0
  204. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-monitor-white-glyph-32.svg +1 -0
  205. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-navigator-glyph-32.svg +1 -0
  206. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-notebooks-glyph-32.svg +1 -0
  207. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-online-glyph-32.svg +1 -0
  208. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-open-data-glyph-32.svg +1 -0
  209. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-open-source-apps-glyph-32.svg +1 -0
  210. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-ortho-maker-glyph-32.svg +1 -0
  211. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-parcel-fabric-glyph-32.svg +1 -0
  212. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-pipeline-referencing-glyph-32.svg +1 -0
  213. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-pro-for-intelligence-glyph-32.svg +1 -0
  214. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-pro-glyph-32.svg +1 -0
  215. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-quickcapture-glyph-32.svg +1 -0
  216. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-reality-studio-glyph-32.svg +1 -0
  217. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-roads-and-highways-glyph-32.svg +1 -0
  218. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-sites-glyph-32.svg +1 -0
  219. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-solutions-glyph-32.svg +1 -0
  220. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-storymaps-glyph-32.svg +1 -0
  221. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-streetmap-premium-glyph-32.svg +1 -0
  222. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-survey123-connect-glyph-32.svg +1 -0
  223. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-survey123-glyph-32.svg +1 -0
  224. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-tracker-glyph-32.svg +1 -0
  225. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-urban-glyph-32.svg +1 -0
  226. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-utility-network-management-glyph-32.svg +1 -0
  227. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-velocity-glyph-32.svg +6 -0
  228. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-web-appbuilder-glyph-32.svg +1 -0
  229. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-web-editor-glyph-32.svg +1 -0
  230. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-workflow-manager-glyph-32.svg +1 -0
  231. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-workforce-glyph-32.svg +1 -0
  232. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-world-geocoder-glyph-32.svg +1 -0
  233. package/dist/cdn/assets/portal-navigation/product-logos/calcite-design-system-glyph-32.svg +1 -0
  234. package/dist/cdn/assets/portal-navigation/product-logos/esri-community-glyph-32.svg +1 -0
  235. package/dist/cdn/assets/portal-navigation/product-logos/esri-demographics-glyph-32.svg +1 -0
  236. package/dist/cdn/assets/portal-navigation/product-logos/esri-events-glyph-32.svg +1 -0
  237. package/dist/cdn/assets/portal-navigation/product-logos/esri-offline-documentation-center--glyph-32.svg +1 -0
  238. package/dist/cdn/assets/portal-navigation/product-logos/esri-redistricting-glyph-32.svg +1 -0
  239. package/dist/cdn/assets/portal-navigation/product-logos/esri-reports-glyph-32.svg +1 -0
  240. package/dist/cdn/assets/portal-navigation/product-logos/esri-support-glyph-32.svg +1 -0
  241. package/dist/cdn/assets/portal-navigation/product-logos/map-viewer-glyph-32.svg +1 -0
  242. package/dist/cdn/assets/portal-navigation/product-logos/sceneviewer-glyph-32.svg +1 -0
  243. package/dist/cdn/assets/portal-navigation/product-logos/site-scan-for-arcgis-glyph-32.svg +1 -0
  244. package/dist/cdn/assets/portal-navigation/product-logos/site-scan-for-arcgis-le-glyph-32.svg +1 -0
  245. package/dist/cdn/assets/portal-navigation/product-logos/vector-tile-style-editor-glyph-32.svg +1 -0
  246. package/dist/cdn/assets/portal-navigation/product-logos/xr-viewer-glyph-32.svg +1 -0
  247. package/dist/cdn/assets/portal-navigation/t9n/messages.en.json +1 -0
  248. package/dist/cdn/index.js +1 -1
  249. package/dist/cdn/main.css +1 -1
  250. package/dist/chunks/dom.js +18 -13
  251. package/dist/chunks/fieldAddDelete.js +1 -1
  252. package/dist/chunks/groups2.js +64 -0
  253. package/dist/chunks/icons.js +11 -0
  254. package/dist/chunks/item.js +29 -123
  255. package/dist/chunks/item2.js +119 -77
  256. package/dist/chunks/loadClassificationData.js +19 -19
  257. package/dist/chunks/portal-account-switcher.js +6 -0
  258. package/dist/chunks/portal.js +58 -23
  259. package/dist/chunks/portal2.js +33 -0
  260. package/dist/chunks/requests.js +92 -44
  261. package/dist/chunks/string.js +31 -0
  262. package/dist/chunks/user.js +16 -4
  263. package/dist/chunks/user2.js +146 -75
  264. package/dist/chunks/utils.js +645 -0
  265. package/dist/components/arcgis-portal-account-switcher/customElement.d.ts +98 -0
  266. package/dist/components/arcgis-portal-account-switcher/customElement.js +364 -0
  267. package/dist/components/arcgis-portal-account-switcher/index.d.ts +1 -0
  268. package/dist/components/arcgis-portal-account-switcher/index.js +11 -0
  269. package/dist/components/arcgis-portal-account-switcher-accounts/customElement.d.ts +100 -0
  270. package/dist/components/arcgis-portal-account-switcher-accounts/customElement.js +31 -0
  271. package/dist/components/arcgis-portal-account-switcher-accounts/index.d.ts +1 -0
  272. package/dist/components/arcgis-portal-account-switcher-accounts/index.js +5 -0
  273. package/dist/components/arcgis-portal-account-switcher-list/customElement.d.ts +104 -0
  274. package/dist/components/arcgis-portal-account-switcher-list/customElement.js +51 -0
  275. package/dist/components/arcgis-portal-account-switcher-list/index.d.ts +1 -0
  276. package/dist/components/arcgis-portal-account-switcher-list/index.js +7 -0
  277. package/dist/components/arcgis-portal-ai-assistant/customElement.js +45 -44
  278. package/dist/components/arcgis-portal-classification-config/customElement.js +1 -1
  279. package/dist/components/arcgis-portal-classification-favorite/customElement.js +1 -1
  280. package/dist/components/arcgis-portal-info-banner/customElement.d.ts +14 -0
  281. package/dist/components/arcgis-portal-info-banner/customElement.js +31 -0
  282. package/dist/components/arcgis-portal-info-banner/index.d.ts +1 -0
  283. package/dist/components/arcgis-portal-info-banner/index.js +1 -0
  284. package/dist/components/arcgis-portal-item-type/customElement.d.ts +1 -1
  285. package/dist/components/arcgis-portal-item-type/customElement.js +22 -659
  286. package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +3 -2
  287. package/dist/components/arcgis-portal-navigation/customElement.d.ts +516 -0
  288. package/dist/components/arcgis-portal-navigation/customElement.js +1813 -0
  289. package/dist/components/arcgis-portal-navigation/index.d.ts +1 -0
  290. package/dist/components/arcgis-portal-navigation/index.js +32 -0
  291. package/dist/components/arcgis-portal-navigation/types.d.ts +43 -0
  292. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +12 -27
  293. package/dist/components/arcgis-portal-user-popup/customElement.js +83 -102
  294. package/dist/docs/api.json +1 -1
  295. package/dist/docs/docs.json +1 -1
  296. package/dist/docs/vscode.html-custom-data.json +1 -1
  297. package/dist/docs/web-types.json +1 -1
  298. package/dist/index.d.ts +44 -0
  299. package/dist/loader.js +7 -2
  300. package/dist/types/app-switcher.d.ts +71 -0
  301. package/dist/types/item.d.ts +2 -2
  302. package/dist/types/lumina.d.ts +34 -0
  303. package/dist/types/portal.d.ts +6 -0
  304. package/dist/types/preact.d.ts +39 -0
  305. package/dist/types/react.d.ts +44 -0
  306. package/dist/types/search.d.ts +4 -1
  307. package/dist/types/stencil.d.ts +34 -0
  308. package/dist/types/user.d.ts +14 -1
  309. package/package.json +4 -4
  310. package/dist/cdn/2C475EKD.js +0 -2
  311. package/dist/cdn/35SKVD6F.js +0 -2
  312. package/dist/cdn/3J46PXFF.js +0 -3
  313. package/dist/cdn/6W2IHKCA.js +0 -2
  314. package/dist/cdn/BUJPYZSX.js +0 -2
  315. package/dist/cdn/EI6BAXCQ.js +0 -2
  316. package/dist/cdn/GE75KDIM.js +0 -2
  317. package/dist/cdn/GXJU3U7U.js +0 -2
  318. package/dist/cdn/HMBSJR37.js +0 -2
  319. package/dist/cdn/IC65R4QE.js +0 -2
  320. package/dist/cdn/IHSJ4MKS.js +0 -2
  321. package/dist/cdn/O3KBWLGU.js +0 -2
  322. package/dist/cdn/SUPKZF5M.js +0 -2
  323. package/dist/cdn/U3FVMN32.js +0 -2
  324. package/dist/cdn/WSNLUGEP.js +0 -2
  325. package/dist/cdn/XBIV54LX.js +0 -2
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ import f from"./7QXIBQV7.js";import{c as Re}from"./R6SSAPLB.js";import{b as j,c as ne,d as Ne}from"./GYFQDPCN.js";import e from"./F3G5N2UU.js";import d from"./U2QZZSPC.js";import{a as ie}from"./XEK22IDA.js";import{d as je,e as Ce}from"./OBBYT2AV.js";import{a as K}from"./P6P7SKFX.js";import c from"./AWIVXH7M.js";import"./DFTUMKSN.js";import{a as Pe}from"./YVKSTDL6.js";import b from"./CSH3WCYD.js";import{a as W,b as _e,c as q,d as F,e as J,f as ye,i as $e}from"./6D3PU4ZT.js";import a from"./DALGPO36.js";import{b as xe}from"./2GBRZSEC.js";import{a as E}from"./O6QBY4ST.js";import{a as Te}from"./OFDH6CTA.js";import"./BUKOHPY6.js";import"./XQJNAQVO.js";import{K as O,L as G,M as be,N as B,O as ve,S as we,T as U,h as ge,j as l,k as fe,m as C,w as z}from"./STZRXY35.js";import"./UZLQALHY.js";export default $arcgis.t(([{formatDate:Lt,substitute:X,getLocale:Dt},,Ot,{e:N},{c:Ae,f:Se,g:Ie,h:ke},{c:te},,{a:ae,c:Me},{a:Ee,b:Le,c:De,d:Oe,e:Ge}])=>{function Gt({navigate:e,portal:t,product:i,productInfo:a,productHref:n,messages:r,searchActive:s,showNav:o,projectTitleEditing:p}){let h=s&&i==="Online"&&!o||i!=="Online"&&p&&window.innerWidth<960;if(!i||!t||!r||h)return null;let{name:b,glyph:w}=a||{};return l`<calcite-navigation-logo class="logo fade-in" .heading=${b} .description=${t.name||""} .href=${n} @click=${n?u=>{e({event:u,href:n})}:void 0} .thumbnail=${w}></calcite-navigation-logo>`}var re={},P={Month:2628e3,Week:604800,Day:86400,Hour:3600,Minute:60,Second:1};function Ue(e){if(!e)return null;let t=Math.floor(e/1e3),i=Math.abs(t),a=P.Day*365;switch(!0){case i<P.Minute:return[Math.floor(t/P.Second),"second"];case i<P.Hour:return[Math.floor(t/P.Minute),"minute"];case i<P.Day:return[Math.floor(t/P.Hour),"hour"];case i<P.Week:return[Math.floor(t/P.Day),"day"];case i<P.Month:return[Math.floor(t/P.Week),"week"];case i<a:return[Math.floor(t/P.Month),"month"];default:return[Math.floor(t/a),"year"]}}function qe(e){return(typeof e=="number"?e:e.getTime?.())-new Date().getTime()}function Je({locale:e,time:t,t9n:i}){if(!e||!t)return"";let a=qe(t);re[e]??=new Intl.RelativeTimeFormat(e,{style:"long"});let n=Ue(a);return n?n[1]==="second"?i?.lessThanOneMinute||`< ${re[e].format(n[0]>0?1:-1,"minutes")}`:re[e].format(n[0],n[1]):""}var Rt={month:"long",day:"numeric",year:"numeric"},zt={month:"long",day:"numeric"};function Wt({locale:e,time:t},i){if(!e||!t)return"";let a=new Date(t);return Lt(a,i?Rt:zt)}async function Ft({portal:e}){if(!e?.user)return{result:[]};let t=`${e.restUrl}/community/users/${e.user.id}/notifications`,{result:i,error:a}=await N(t);return a?{error:a}:{result:i?.notifications}}async function Ht(e,t){if(!e?.user)return{success:!0};let i=t.map(a=>({portal:e,id:a})).map(Ke);return{success:!((await Promise.allSettled(i))?.filter(a=>a.status==="rejected"||!a.value?.success)).length}}async function Ke({portal:e,id:t}){let i=`${e.restUrl}/community/users/${e.user?.id}/notifications/${t}/delete`,{result:a}=await N(i,{method:"post"});return a?.success?{success:!0,id:t}:{success:!1,id:t}}var Qe="notifications-menu";function Vt(e){try{let t=decodeURIComponent(e);return t!==e?t:e}catch{return e}}function Bt(e){switch(e){case"group_join_admin":return"users";case"group_application_accepted":return"register";case"group_join":return"file-user";case"group_application_declined":return"user-risk";case"user_invitation_declined":return"group-x";case"user_invitation_accepted":return"user-plus";case"user_invite":return"envelope";case"user_added_to_group":return"user-plus";case"collaboration_workspace_added":case"collaboration_deleted":case"collaboration_leaving":case"collaboration_join":case"collaboration_participant_workspace_join":case"collaboration_participant_workspace_unjoin":case"collaboration_participant_removed":case"collaboration_peer_participant_removed":case"collaboration_participant_access_changed":return"collaboration";case"collaboration_participant_join":return"collaboration-user";case"collaboration_content_store_disk_limit_reached":return"gauge";case"user_email_bounced":return"speech-bubble-exclamation";case"feature_layer_copy_over_failed":case"feature_layer_one_way_shared_not_two_way":case"feature_view_copy_over_failed":case"webapp_not_copied":case"webapp_not_copied_portal":case"insights_item_not_copied":return"collaboration";case"scheduled_task_disabled":return"date-time";case"portal_certificate_about_to_expire":case"portal_certificate_expired":return"hourglass-expired";case"notebook_runtime_deprecated":return"notebook-server";case"ingress_certificate_about_to_expire":case"ingress_certificate_expired":return"certificate";default:return"bell"}}function Ut({notification:e,portal:t,locale:i,t9n:a}){if(e?.received&&e.id){let n={date:Je({locale:i,time:e.received,t9n:a}),id:e.id,text:"",icon:Bt(e.type)};if(e.type==="webapp_not_copied"&&t.isPortal&&(e.type="webapp_not_copied_portal"),e.data?.taskTitle&&(e.data.taskTitle=Vt(e.data.taskTitle)),e.type==="message_received")n.text=e.data.message||"";else if(a.types[e.type]){let r=W({portal:t,usePortalHostname:!!t.user});e.data.baseUrl=`${r}/home/`,n.text=X(a.types[e.type],e.data)}if(n.text)return n}return null}async function ze({portal:e,locale:t,t9n:i}){if(!i)return[];let{result:a,error:n}=await Ft({portal:e});return n&&console.error(n),a?.length?a.map(r=>Ut({notification:r,portal:e,t9n:i,locale:t})).filter(r=>r):[]}function qt({notifications:e,messages:t}){return t?l`<calcite-action class="action" scale=l .text=${t.label} icon=bell .indicator=${!!e?.length} id=${Qe}></calcite-action>`:null}function Q({icon:e,title:t,description:i}){return!t&&!i?null:l`<div class="empty">${e&&l`<svg xmlns=http://www.w3.org/2000/svg width=64 height=64 viewBox="0 0 64 64" fill=none>${fe`<path d=${Pe[e]??C} fill=var(--calcite-color-border-input) />`}</svg>`||""}${t&&l`<h3 class="notifications__empty__header">${t}</h3>`||""}${i&&l`<p class="notifications__empty__text">${i}</p>`||""}</div>`}function Jt({notifications:e,deleteNotifications:t,messages:i,notificationDeleteProgress:a}){return i?l`<calcite-popover .referenceElement=${Qe} .label=${i.label} auto-close pointer-disabled flip-disabled placement=bottom-end scale=l .heading=${i.label}>${e?.length>0?l`<div class="notifications notifications--full">${typeof a=="number"&&l`<calcite-scrim><calcite-loader type=determinate-value .label=${i.deleting} .value=${a}></calcite-loader></calcite-scrim>`||""}<calcite-list .label=${i.label} interaction-mode=static class="notifications__list" scale=l>${E(e,n=>n.id,n=>l`<calcite-list-item closable @calciteListItemClose=${async()=>await t([n.id])} .messageOverrides=${{close:i.dismissLabel}} .iconStart=${n.icon}><div slot=content class="notification"><div class="notification__message" .innerHTML=${n.text??""}></div><div class="notification__date">${n.date}</div></div></calcite-list-item>`)}</calcite-list></div><calcite-button class="notifications__dismiss" scale=l appearance=transparent @click=${async n=>{let r=n.currentTarget?.parentElement;await t(e?.map(({id:s})=>s)),r.open=!1}}>${i.dismissAllLabel}</calcite-button>`:l`<div class="notifications">${Q({title:i.noNotifications,description:i.noNotificationsDescription,icon:"check"})}</div>`}</calcite-popover>`:null}function Kt(e){return e.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&")}function Qt(e,t,i,a){ii(e,JSON.stringify(t),i)}function Xt(e){return ei(e,!0)}function Yt(e){try{window.localStorage.removeItem(e)}catch{}}function Zt(e){try{window.sessionStorage.removeItem(e)}catch{}}function ei(e,t){let i=ti(e);return i&&t?JSON.parse(i):i}function ti(e){let t=document.cookie,i=new RegExp(`(?:^|; )${Kt(e)}=([^;]*)`,"u"),a=t.match(i);return a?decodeURIComponent(a[1]):""}function ii(e,t,i){i=i||{};let a=i?.expires;if(typeof a=="number"){let r=new Date,s=a*24*60*60*1e3;r.setTime(Date.now()+s),a=r,i.expires=r}typeof a!="string"&&a?.toUTCString&&(i.expires=a.toUTCString());let n=`${e}=${encodeURIComponent(t)}`;for(let r of Object.keys(i)){n+=`; ${r}`;let s=i[r];s!==!0&&(n+=`=${s}`)}document.cookie=n}async function ai(e){let t=`owner:"${e.isPortal?"esri":"esri_config"}" AND title:"AppSwitcher Config" AND type:"Application Configuration"`,i=`${e.restUrl}/search`;return await N(i,{query:{num:1,start:0,sortField:"title",sortOrder:"asc",q:t}})}async function ni(e){let t={appSwitcher:{apps:[]}};if(!e?.id||!e.user)return t;let{result:i}=await ai(e),a=i?.results?.[0];if(!a)return t;let n=a.id;return(await te(e,n)).result}async function ri(e,t,i){if(!t||!e?.length)return{result:null};let a=`${i.restUrl}/search`;return await N(a,{query:{num:100,q:`id:(${e.map(n=>`"${n.itemId}"`).join(" OR ")})`}})}async function si(e){let t=`${e.restUrl}/search`,i={num:10,start:0,sortField:"title",sortOrder:"asc",q:'owner:"esri" AND title:"BlockedApps Config" AND type: "Application Configuration"'},{result:a}=await N(t,{query:i}),n=a?.results?.[0]?.id;return n?(await te(e,n))?.result?.blockedApps||[]:[]}function oi(e,t){let i=e?.toLowerCase()||"",a=`${t.title||""} ${t.label||""}`;return!i||a.toLowerCase().includes(i)}function ci(){if(Xt("APSW-query")?.expires>new Date().setHours(new Date().getHours()))return!0;let e={expires:new Date().setHours(new Date().getHours()+5)};return Qt("APSW-query",e,{path:"/",domain:window.location.hostname,sameSite:"Strict"}),!1}function li(e,t){let{landingPage:i}=t||{};return{image:"arcgis-online.png",label:"ArcGIS Online",title:"ArcGIS Online",url:`${W({portal:e})}${i?.url?i.url:ae(e.user)?"organization.html":"index.html"}`}}function We(e){let t=["api-for-python","appstudio","arcade","arcgis-earth","arcgis-enterprise","arcgis-experience-builder","arcgis-geoanalytics","arcgis-hub","arcgis-online","arcgis-pro","arcgis-urban","blank","business-analyst","city-engine","collector","community-analyst","configurable-apps","dashboards-beta","dashboards-classic","data-pipelines","deeplearningstudio","demographics","drone2map","esri-events","essential-apps","excalibur","explorer","field-apps","fieldmaps-beta","fieldmaps-ea","fieldmaps","generic-app","geobim","geoplanner","grid-view-9","indoor","indoors","insights","instant-apps","ips","knowledge-studio","living-atlas","location-platform","map-maker","map-viewer-beta","map-viewer-classic","map-viewer","maps-adobe-cloud","maps-for-office","maps-for-power-bi","maps-for-sharepoint","marketplace","mission","monitor","navigator","notebook","office-apps","open-data","operations-dashboard","ortho-maker","pro-extension","quick-capture","redistricting","runtime","scene-viewer","sites","solutions","story-maps","streetmap-premium","survey123","track-viewer","user-type-extension-online","user-type-extension","vector-tile-style-editor","velocity","web-app-builder","web-editor","web-mapping","workflow-manager-beta","workflow-manager","workforce"].find(i=>e?.includes(i)&&H(`${i}.png`)===e);return t?H(`${t}.avif`):e}function pi(e,t){let i=e?.blockedApps||[],a=[];return!i.length&&!e.blockBetaApps||!t?.length?[]:(e.blockBetaApps&&t.forEach(n=>{n.isBeta&&!i.includes(n.clientid)&&i.push(n.clientid)}),i.forEach(n=>{let r=t.find(s=>s.clientid===n);r&&a.push(r)}),a)}function x(e,t){return t&&t[e.toLowerCase()]?.valid||!1}function ui(e,t){return e?.portalProperties&&!e.portalProperties?.openData?.enabled?!1:x("HubforArcGIS",t)}function di(e,t){if(!e)return!1;let i=["portal:publisher:publishFeeds","portal:publisher:publishRealTimeAnalytics","portal:publisher:publishBigDataAnalytics"],a=(e?.privileges||[]).some(r=>i.includes(r)),n=x("velocity",t);return a&&n}function mi(e){return x("HubforArcGIS",e)}function hi(e,t){return!(e.isPortal&&e.portalProperties?.newMapViewerEnabled===!1)&&x("arcgisWebApps",t)}function gi(e){return!!e.helperServices?.rasterAnalytics&&!!e.helperServices.orthoMapping}function fi(e,t,i){let a=i&&(!e.isPortal||!!e.sourceJSON?.supportsHostedNotebooks),n=!!t?.privileges?.length&&t.privileges.some(r=>r==="premium:publisher:createNotebooks");return a&&n}function bi(e,t){return!!e.helperServices?.locationTracking&&t}function vi(e,t,i,a){let n=e?.user;return{"Open Data":{hasAccess:()=>ui(e,a)},AppStudio:{hasAccess:()=>x("arcgisWebApps",a)},"ArcGIS Velocity":{hasAccess:()=>e.isPortal||di(n,a)},"ArcGIS Hub":{hasAccess:()=>x("HubforArcGIS",a)},"ArcGIS Enterprise Sites":{hasAccess:()=>mi(a)},"ArcGIS QuickCapture Web Designer":{hasAccess:()=>x("arcgisWebApps",a)},"ArcGIS Dashboards":{hasAccess:()=>x("dashboards",a)},"Map Viewer":{hasAccess:()=>hi(e,a)},"Map Viewer Classic":{hasAccess:()=>x("arcgisWebApps",a)},"Operations Dashboard for ArcGIS":{hasAccess:()=>x("opsdashboard",a)},"ArcGIS Dashboards Classic":{hasAccess:()=>x("opsdashboard",a)},"Ortho Maker":{hasAccess:()=>gi(e)},Notebook:{hasAccess:()=>fi(e,n,t)},"Scene Viewer":{hasAccess:()=>x("arcgisWebApps",a)},"Story Maps":{hasAccess:()=>x("arcgisWebApps",a)},Survey123:{hasAccess:()=>x("survey123",a)},"Track Viewer":{hasAccess:()=>bi(e,i)},"Instant Apps":{hasAccess:()=>x("arcgisWebApps",a)},"ArcGIS Maps for Adobe Creative Cloud":{hasAccess:()=>x("arcgisWebApps",a)&&!e.isPortal}}}function wi(e){let t={opsdashboard:1,arcgisWebApps:1,Workforce:1,geoplanner:1,webappbuilder:1,HubforArcGIS:1,appstudio:1,survey123:1,storymaps:1,mapsForOffice:1,mapsForO365:1,mapsForSharePoint:1,mapsForCreativeCloud:1,indoorsweb:1,indoorskiosk:1,indoorsspaceplanner:1,locationplatformWebApps:1,communityanalyst_2:1};return e.isPortal&&(t={...t,arcgisonline:1,arcgisUrban:1,arcgisinstantapps:1}),t}function oe(e){return e.sourceJSON?.subscriptionInfo?.options?.includes("Developer")}function H(e){return U(`assets/portal-navigation/apps/${e||""}`)}function Xe(e,t,i){return e.icon?`${t.restUrl}/portals/self/resources/${e.icon}?token=${i}`:`${t.restUrl}/content/items/${e.itemId}/resources/${e.image||e.properties?.appSwitcher?.image}?token=${i}`}function R(e,t,i){if(e.image?e.image=H(e.image):e.placeHolderIcon=`${H()}svg-app-icon.svg`,e.url?.startsWith("../")){let a=i.urlKey?`${i.urlKey}.${i.customBaseUrl}`:i.portalHostname;e.url=`${window.location.protocol}//${a}${e.url.substring(2,e.url.length)}`}return delete e.isLicensed,delete e.privileges,e.itemId=t,e}function Ye(){return`${H()}svg-app-circle.svg`}function _i(e,t,i){let a=e.properties?.appSwitcher?.image||e.icon;return{abbr:e.properties?.appSwitcher?.abbr||e.abbreviation,itemId:e.itemId,canAccess:!0,webMappingApp:!0,image:a?Xe(e,t,i):void 0,label:e.title||e.label,url:e.url,placeHolderIcon:e.placeHolderIcon||Ye()}}function yi(e,t,i){return e.appSwitcher?.image||e.icon?e.image=Xe(e,t,i):e.placeHolderIcon=Ye(),e.abbr=e.appSwitcher?.abbr||e.abbreviation,delete e.abbreviation,delete e.appSwitcher,delete e.approvedApp,delete e.webMappingApp,e}function Fe(e,t){e.forEach(i=>{i.uid==="Map Viewer Beta"&&(i.uid="Map Viewer"),t.isPortal&&(i.uid==="Operations Dashboard for ArcGIS"?i.uid="ArcGIS Dashboards Classic":i.uid==="Workforce for ArcGIS"&&(i.uid="ArcGIS Workforce"))})}async function $i({userApps:e,servers:t,portal:i,licenses:a,blockedApps:n,provisionedListings:r,orgCapabilities:s,trackViewerEnabled:o,notebookServerEnabled:p,willQueryForItems:h,approvedApps:b}){let w={},u={},S=vi(i,p,o,a),k=wi(i),_=[],T=e.length;for(let d=0;d<T;d++){let c=e[d],v=c.itemId||c.title,I=!0,A=!c.serverFunction||t?.some(f=>{let D=(f.serverFunction?.split(",")||[]).includes(c.serverFunction);return D&&c.serverFunction==="Velocity"&&(c.url=f.url),D}),m=n?.some(f=>c.itemId&&c.itemId===f.itemid||c.title&&c.title===f.title);if(w[v]=1,u[v]=c,m||oe(i)&&!c.showInLocationPlatform||i.sourceJSON?.portalDeploymentType==="ArcGISEnterpriseOnKubernetes"&&c.supportsKubernetes===!1)continue;let y=c.title;if(S[y]&&!S[y]?.hasAccess())continue;let $=i.sourceJSON?.subscriptionInfo;if(c.subscriptionType){$?.type===c.subscriptionType&&(u[v].canAccess=!0,_.push(R(c,v,i)));continue}if(c.orgCapabilities){s?.length&&s.some(f=>c.orgCapabilities?.includes(f.id))&&(u[v].canAccess=!0,_.push(R(c,v,i)));continue}if(!c.privileges?.length&&!c.isLicensed&&A&&(c.label!=="ArcGIS Location Platform"||oe(i))){u[v].canAccess=!0,_.push(R(c,v,i));continue}if(i.user?.sourceJSON?.userLicenseTypeId?.toLowerCase()==="storytellerut"&&c.label?.toLowerCase()==="storymaps"){u[v].canAccess=!0,_.push(R(c,v,i));continue}if(c.privileges?.length&&i.user?.privileges){for(let f=0;f<c.privileges.length;f++)if(!i.user.privileges.includes(c.privileges[f])){I=!1;break}if(!c.isLicensed&&I&&A){u[v].canAccess=!0,_.push(R(c,v,i));continue}}if(c.isLicensed&&I&&A){for(let f=0;f<r.length;f++)if(v===r[f].itemId||v===r[f].title){u[v].canAccess=!0,_.push(R(c,v,i));break}}}let g=await Ae(i);return r.forEach(d=>{if(d.type==="Web Mapping Application"&&!k[d.clientId]&&!w[d.itemId]&&d.url&&d.title&&!w[d.title]&&!d.typeKeywords.includes("hideFromAppSwitcher")){let c=_i(d,i,g);u[d.itemId]=c,_.push(c)}}),{apps:[...b.map(d=>{let c={...d.appProperties,itemId:d.itemId,webMappingApp:!0,approvedApp:!0,canAccess:!h};return u[d.itemId]=c,yi(c,i,g)}),..._],appDictionary:u}}function se(e,t){return e.filter(i=>!t?.some(a=>i.itemId&&i.itemId===a.itemid||i.title&&i.title===a.title))}function He({apps:e,app:t,appDictionary:i,newAppDictionary:a,portal:n}){let r=Object.keys(i).map(s=>i[s]).filter(s=>s.itemId===t.uid||s.title===t.uid).shift();return r&&!i[t.uid]&&(t.uid=r.itemId||r.title||""),r?.hasBeenPopulated||(r?((t.hasChanged||r.hasChanged||!r.canAccess&&!r.ignoreNoAccess)&&ae(n.user)&&(i[t.uid].hasChanged=!0,i[t.uid].ignoreNoAccess=t.ignoreNoAccess),t.isNew&&(i[t.uid].isNew=!0),delete a[t.uid]):(r=t,r.canAccess=!1,r.itemId=t.uid,i[t.uid]=r),i[t.uid].hasBeenPopulated=!0,e.push(r)),e}async function Ai({portal:e,trackViewerEnabled:t,notebookServerEnabled:i}){if(!e?.id||!e.user)return{apps:[],hiddenApps:{}};let a=ci(),[n,r,s,o,p,h,b]=await Promise.all([ni(e),ke(e),Se(e),Ee(e),Le(e),Ge(e),si(e)]),w=e.isPortal?await Oe(e):null,u=s?.result?.properties,S=n?.appSwitcher?.apps||[];e.isPortal||(S=S.filter(m=>m.title!=="Map Viewer Classic"||e.sourceJSON.created<new Date("February 26 2025")),S.unshift(li(e,u)));let k=o?.result?.approvedApps?.filter(m=>!m.hideForNonPrivilegedMember)||[],_={};r?.forEach(m=>{let y=m.clientId?.toLowerCase();y&&(_[y]={valid:!0,itemId:m.itemId,clientId:m.clientId})}),p?.forEach(m=>{let y=m.id?.toLowerCase();y&&(_[y]={valid:!0,clientId:m.id})});let T=pi(h,b),{apps:g,appDictionary:d}=await $i({userApps:S,servers:w,portal:e,blockedApps:T,provisionedListings:r,orgCapabilities:p,licenses:_,trackViewerEnabled:t,notebookServerEnabled:i,willQueryForItems:a,approvedApps:k});u?.appLauncher&&(u?.appLauncher.primary&&Fe(u?.appLauncher.primary,e),u?.appLauncher.secondary&&Fe(u?.appLauncher.secondary,e));let c=[],v=[];if(!u?.appLauncher?.primary||!u?.appLauncher.secondary)c=g.slice().sort((m,y)=>(m.label||"")<(y.label||"")?-1:1),c=se(c,T),v=[];else{let{result:m}=await ri(k,a,e);m?.results?.length&&m.results.forEach($=>{let f=d[$.id];f.canAccess=!0,f.hasChanged=f.url!==$.url?!!$.url:!1});let y={...d};u?.appLauncher?.primary?.forEach($=>{$.label==="Map Viewer"&&($.uid="Map Viewer")}),c=u?.appLauncher.primary.reduce(($,f)=>He({apps:$,app:f,appDictionary:d,newAppDictionary:y,portal:e}),[])||[],v=u?.appLauncher.secondary.reduce(($,f)=>He({apps:$,app:f,appDictionary:d,newAppDictionary:y,portal:e}),[])||[],c=se(c,T),v=se(v,T),oe(e)&&(c=c.filter($=>$.canAccess),v=v.filter($=>$.canAccess));for(let $ of Object.keys(y))y[$].canAccess&&(y[$].isNew=!0,d[$]=y[$],c.push(y[$]))}let I=[...c,...v],A=v.reduce((m,y)=>(y.itemId&&(m[y.itemId]=!0),m),{});return{apps:I,hiddenApps:A,signInSettings:h,licenses:_,userProperties:u}}function Si(e,t){return!e?.itemId||!t?!1:t[e.itemId]}async function Ii({apps:e,hiddenApps:t,userProperties:i,portal:a}){let n=e.reduce((s,o)=>{let p=t[o.itemId];return s[p?"secondary":"primary"].push({label:o.label,uid:o.itemId||o.title}),s},{primary:[],secondary:[]}),r={...i||{},appLauncher:n};return await Ie(r,a)}function Ze({app:e}){if(!e)return null;if(!e.canAccess)return l`<span class="list-item__logo list-item__logo-empty"></span>`;let t=!e.image&&e.abbr;return l`${t&&l`<span class="list-item__logo">${e.placeHolderIcon&&l`<img src=${We(e.placeHolderIcon)??C} class="list-item__logo-bg" alt>`||""}<span style=${ve({fontSize:e.fontSize||"20px"})} class="list-item__abbr">${e.abbr}</span></span>`||""}${e.image&&l`<img src=${We(e.image)??C} class="list-item__logo" alt>`||""}${e.isNew&&l`<span class=${B({"list-item__indicator":!0})}></span>`||""}`}function ki({app:e,hiddenApps:t,messages:i,toggleAppVisibility:a}){if(!e||!i)return null;let n=Si(e,t),{title:r,itemId:s,label:o}=e;return l`<calcite-list-item .label=${r||o} class=${B(n?"app--hidden":"")}><span slot=content-start>${Ze({app:e})}</span><calcite-action .text=${n?i.show:i.hide} .icon=${n?"view-hide":"view-visible"} slot=actions-end @click=${()=>s&&a(s,!n)}></calcite-action></calcite-list-item>`}function xi({app:e,messages:t}){if(!e||!t)return null;let{title:i,itemId:a,label:n,url:r,isNew:s}=e,o=t?.descriptions?.[i]||t?.descriptions?.[n];return l`<li class="list-item" id=${a??C}><a class="list-item__link" href=${r??C}>${l`<span class="list-item__container">${Ze({app:e})}<span class="list-item__title">${i||n}</span>${s&&l`<calcite-chip scale=s class="list-item__chip" icon=asterisk-small .label=${t.new}>${t.new}</calcite-chip>`||""}</span>`}</a>${o&&l`<calcite-tooltip .referenceElement=${a} placement=trailing>${o}</calcite-tooltip>`||""}</li>`}function Ti({apps:e,appsLoading:t,appsSearchTerm:i,hiddenApps:a,messages:n,handleAppsSearch:r,handleAppReorder:s,handleAppSave:o,handleAppHide:p,handleAppCancel:h,handleAppEdit:b,editingApplications:w,portal:u}){if(!e||!n)return null;let S=i?.length>0,k=(e||[]).filter(g=>g.itemId&&(!a?.[g.itemId]||S)&&oi(i,g)),_=S?n.noAppResults.replace("${term}",i):n.noAppsAvailable,T=S?j(u)?n.noAppsDescriptionPublic:n.noAppResultsDescriptionOrg:n.noAppsAvailable;return w?l`<div class="list__header"><calcite-button appearance=outline width=half @click=${()=>{h()}}>${n.cancel}</calcite-button><calcite-button width=half @click=${()=>{o()}}>${n.applyChanges}</calcite-button></div><calcite-list .label=${n.allMyApplications} drag-enabled @calciteListDragEnd=${g=>{let{newIndex:d,oldIndex:c}=g.detail;s({newIndex:d,oldIndex:c})}} .loading=${t}>${E(e,g=>g.itemId,g=>ki({app:g,hiddenApps:a,messages:n,toggleAppVisibility:(d,c)=>{p({app:d,hidden:c})}}))}</calcite-list>`:l`<div class="list__header"><calcite-input type=search icon .placeholder=${n.searchMyApps} scale=m class="list__search" @calciteInputInput=${g=>{r(g.currentTarget.value)}}></calcite-input><calcite-button appearance=transparent kind=neutral icon-start=reorder-cards .label=${n.reorder} @click=${()=>b()}></calcite-button></div>${k?.length>0?l`<ul class="list">${E(k,g=>g.itemId,g=>xi({app:g,messages:n}))}</ul>`:Q({title:_,description:T,icon:i?"search":"apps"})}`}var Ve="portalAppClientId",ue={GeoanalyticsEngine:"geoanalyticsengine",GeoanalyticsFabric:"geoanalyticsfabric",IndoorsOnline:"indoorsonline"};function de(e){return ue.GeoanalyticsEngine===e}function me(e){return ue.GeoanalyticsFabric===e}function et(e){return ue.IndoorsOnline===e}function he(e){return["Location Platform","GeoAnalytics Fabric","GeoAnalytics Engine","Online","Enterprise"].includes(e)}function Pi({portal:e,messages:t,licenses:i,clientId:a,signInSettings:n}){if(!t||!e)return[];let r=e.sourceJSON?.subscriptionInfo,s=Ni({messages:t,portal:e});if(!e.user)return s;if(!e||!s||e?.user&&!i&&!j(e))return[];let o=Li({portal:e,licenses:i,subscriptionInfo:r});return Ei({messages:t,portal:e,clientId:a,signInSettings:n,navLinkDictionary:o})}function ji(e){let{id:t,access:i,isPortal:a}=e;return!t&&!i&&!a}function Ci(e){return new URL(e).pathname===window.location.pathname}function tt({portal:e,clientId:t,signInSettings:i}){let a=e.user,n=et(t),r=!!i?.blockedApps?.includes("arcgisnotebooks"),{gallery:s="all",groups:o="all",map:p="all",notebook:h="notebookCreators",scene:b="all"}=e.portalProperties?.topNav||{},w=["home"];if(!a){if(!e.portalProperties?.topNav){let S=["gallery","map","scene","groups"],k=e.isPortal?["help"]:[];return[...w,...S,...k]}return[...w,...s==="all"?["gallery"]:[],...p==="all"?["map"]:[],...b==="all"?["scene"]:[],...o==="all"?["groups"]:[],...e.isPortal?["help"]:[]]}let u=a.orgId===e.id;return!e.portalProperties?.topNav&&j(e)?w=["ArcGIS","overview","pricing","map","scene","groups","myContent"]:w=[...w,...(s==="all"||s==="members"&&u)&&!n?["gallery"]:[],...(p==="all"||p==="members"&&u||p==="mapCreators"&&ne(a))&&!n?["map"]:[],...(b==="all"||b==="members"&&u||b==="sceneCreators"&&ne(a))&&!n?["scene"]:[],...!r&&(!e.isPortal||e.sourceJSON.supportsHostedNotebooks)&&(h==="members"&&u||h==="notebookCreators"&&Ne(a))&&!n?["notebook"]:[],...(o==="all"||o==="members"&&u)&&!n?["groups"]:[],...u&&!n?["myContent","organization"]:[]],w}function M(e){return`${_e({portal:e})}/`}function Mi({keys:e,navLinkDictionary:t,messages:i}){let a=[];return e.forEach(n=>{let r=t[n];if(r&&(!("show"in r)||r.show)){let{href:s,newTab:o,icon:p}=r;a.push({label:i[n],href:s,newTab:o,icon:p})}}),a}function Ni({messages:e,portal:t}){if(!e||!t)return[];let i=M(t),a={overview:{label:e.overview,href:`${i}../features/features.html`,icon:"information"},pricing:{label:e.pricing,href:`${i}../features/plans/pricing.html`,icon:"credit-card"},map:{label:e.map,href:`${i}apps/mapviewer/index.html`,icon:"map"},scene:{label:e.scene,href:`${i}webscene/viewer.html`,icon:"globe"},help:{label:e.help,href:J(t),newTab:!0,icon:"headset"},home:{label:e.home,href:`${i}index.html`,icon:"home"},gallery:{label:e.gallery,href:`${i}gallery.html`,icon:"gallery"},groups:{label:e.groups,href:`${i}groups.html`,icon:"group"}};return(ji(t)?["overview","pricing","map","scene","help"]:tt({portal:t})).map(n=>a[n])}function Ei({messages:e,portal:t,clientId:i,signInSettings:a,navLinkDictionary:n}){let r=de(i),s=tt({portal:t,clientId:i,signInSettings:a}),o=`${M(t)}geoanalytics${r?"engine":"fabric"}.html`;return r||me(i)?[{href:`${o}#subscription`,label:e.subscription},...r?[{href:`${o}#downloads`,label:e.downloads}]:[],{href:`${o}#credentials`,label:e.developerCredentials},{href:`${o}#account`,label:e.account}]:Mi({keys:s,messages:e,navLinkDictionary:n})}function Li({portal:e,licenses:t,subscriptionInfo:i}){let a=e.user,n=M(e),r=i?.options?.includes("Developer"),s=x("arcgiswebapps",t)||r&&x("locationplatformwebapps",t)||j(e);return{pricing:{href:`${n}../features/plans/pricing.html`},overview:{href:`${n}../features/features.html`},ArcGIS:{href:`${n}${j(e)?"index.html":"../features/features.html"}`,show:j(e)||!a},groups:{href:`${n}groups.html`,icon:"group"},myContent:{href:`${n}content.html`,icon:"files"},map:{show:s,href:`${n}/apps/mapviewer/index.html`,icon:"map"},help:{href:J(e),newTab:!0},gallery:{show:!!e.id&&!r,href:`${n}gallery.html`,icon:"gallery"},home:{show:!j(e)&&!r,href:`${n}index.html`,icon:"home"},scene:{show:s,href:`${n}webscene/viewer.html`,icon:"globe"},notebook:{show:$e(e),href:`${n}notebook/notebookhome.html`,icon:"notebook"},organization:{show:!j(e),href:`${n}organization.html`,icon:"organization"},features:{show:j(e)&&!e.isPortal,href:`${n}../features/features.html`,icon:"information"}}}function Di({portal:e,item:t,messages:i,navigate:a,locale:n}){if(!t||!i||!t.modified)return null;let r=t.modified,s={lessThanOneMinute:i.lessThanOneMinute},o=Ue(qe(r)),p=o?.[1]==="year"||o?.[1]==="month"?Wt({locale:n,time:r},o?.[1]==="year"):Je({locale:n,time:r,t9n:s}),h=`${M(e)}item.html?id=${t.id}`;return K(t.id,l`<li class="list-item"><a class="list-item__link" href=${h??C} @click=${b=>a({event:b,href:h})}>${l`<span class="list-item__container"><span class="list-item__logo list-item__logo--item-type"><arcgis-portal-item-type .item=${t} .user=${e.user} hide-text></arcgis-portal-item-type></span><span class="list-item__content"><span class="list-item__title list-item__title--regular">${t.title}</span><span class="list-item__subtitle">${X(i.lastUpdated,{date:p})}</span></span></span>`}</a></li>`)}function Oi({locale:e,navigate:t,portal:i,open:a,apps:n,appsLoading:r,hiddenApps:s,appsSearchTerm:o,handlePlatformClose:p,handleAppsSearch:h,handleAppReorder:b,handleAppSave:w,handleAppHide:u,handleAppCancel:S,handleAppEdit:k,handleItemSearch:_,editingApplications:T,recentContent:g,recentContentLoading:d,recentContentSearchTerm:c,product:v,productInfo:I,links:A,messages:m}){if(!v||!i||!m)return null;let{name:y,icon:$}=I||{};return l`<calcite-sheet class="platform" .label=${m.label} position=inline-start display-mode=overlay id=example-sheet .open=${a} @calciteSheetClose=${p}><calcite-panel class="platform__panel"><div slot=header-content class="platform__header"><img src=${$??C} class="platform__header-image"><div class="platform__header-text"><h2 class="platform__title">${y}</h2><p class="platform__subtitle">${i.name}</p></div><calcite-action icon=x text="Close menu" scale=l @click=${p}></calcite-action></div><div class="platform__container"><div class="platform__tiles">${A.filter(({icon:f})=>f).map(({label:f,href:D,icon:Y})=>l`<calcite-tile .icon=${Y} .description=${f} .href=${D} alignment=center scale=s></calcite-tile>`)}</div>${i?.user&&!j(i)&&l`<calcite-tabs layout=center class="platform__tabs"><calcite-tab-nav slot=title-group><calcite-tab-title selected>${m.myApps}</calcite-tab-title><calcite-tab-title>${m.recentContent}</calcite-tab-title></calcite-tab-nav><calcite-tab selected class="platform__tab">${r&&l`<calcite-scrim loading></calcite-scrim>`||""}${Ti({apps:n,appsLoading:r,appsSearchTerm:o,hiddenApps:s,messages:m,handleAppsSearch:h,handleAppReorder:b,handleAppSave:w,handleAppHide:u,handleAppCancel:S,handleAppEdit:k,editingApplications:T,portal:i})}</calcite-tab><calcite-tab class="platform__tab"><div class="list__header"><calcite-input type=search icon .placeholder=${m.searchRecentContent} scale=m class="list__search" @calciteInputInput=${f=>_(f.target.value)}></calcite-input></div>${d&&!r&&l`<calcite-scrim loading></calcite-scrim>`||""}<div class="list__container">${g?.length>0||d?l`<ul class="list">${E(g,f=>f.id,f=>Di({portal:i,messages:m,navigate:t,item:f,locale:e}))}</ul>`:c?.length?Q({title:X(m.noAppResults,{term:c}),description:m.recentContentNoResultsDescription,icon:"search"}):Q({title:m.noContent,description:m.noContentDescription,icon:"clock"})}</div></calcite-tab></calcite-tabs>`||""}</div></calcite-panel></calcite-sheet>`}var ce=["new","open","rename","save","saveCopy","share","copyLink","embed","details"];async function Gi(e){return await Promise.resolve({status:"success"})}function le(e){return ce.includes(e.id)}function Ri(e){return(e||[])?.toSorted((t,i)=>{let a=le(t),n=le(i);return a&&!n?-1:n&&!a?1:n&&a?ce.indexOf(t.id)-ce.indexOf(i.id):-1})}function zi(e,t){let i={new:[],save:[],share:[],details:[],custom:[]};if(!t||!e?.length)return i;let a={new:{text:t.new,group:"new"},open:{text:t.open,group:"new"},rename:{text:t.rename,group:"save"},save:{text:t.save,group:"save"},saveCopy:{text:t.saveAsCopy,group:"save"},share:{text:t.manageSharing,group:"share"},copyLink:{text:t.copyLink,group:"share"},embed:{text:t.embed,group:"share"},details:{text:t.itemDetails,group:"details",external:!0}},n=Ri(e),r=[];return n.forEach(s=>{if(!le(s)){r.push(s);return}let{text:o,external:p,group:h}=a[s.id];i[h].push({text:o,external:p,...s})}),r.forEach(s=>{let o=s.group||"custom";i[o].push(s)}),i}function Wi({navigate:e,portal:t,menuItem:i,messages:a,portalItem:n,openProjectTitleEdit:r,projectMenuClick:s}){if(!t||!a||!i||i.id==="details"&&!n)return null;let{external:o,id:p,text:h}=i,b=`${M(t)}item.html?id=${n?.id}`;return K(`${p}${h}`,l`<calcite-dropdown-item .iconEnd=${o?"launch":void 0} .href=${p==="details"?b:i.href} .target=${o?"_blank":void 0} @calciteDropdownItemSelect=${w=>{if(p==="rename"){r?.();return}p==="details"&&e({event:w,href:b}),s?.({type:p})}}>${h}${p==="save"&&l`<calcite-icon icon=bullet-point-large class="project__indicator" scale=s></calcite-icon>`||""}</calcite-dropdown-item>`)}function Fi({navigate:e,portal:t,projectTitle:i,editedProjectTitle:a,handleProjectTitleSave:n,handleProjectTitleEdit:r,handleProjectTitleCancel:s,openProjectTitleEdit:o,portalItem:p,projectTitleEditing:h,projectTitleSaving:b,projectTitleErrorMessage:w,projectMenuIcon:u,projectMenuSaveIndicator:S,projectMenuClick:k,projectMenuOptions:_,projectTitleInputRef:T,projectButtonRef:g,messages:d}){if(!t||!d||!_?.length)return null;let c=zi(_,d),v=!!w;return h?l`<form class="rename" @submit=${async I=>{I.preventDefault(),await n?.(a)}} @keydown=${I=>{I.key==="Escape"&&s?.()}}><calcite-input id=project-title-input type=text scale=l class="rename__input" .label=${d.title} .value=${a} .status=${v?"invalid":"idle"} @calciteInputInput=${I=>r?.(I.target.value)} ${G(T)}></calcite-input>${v&&l`<calcite-popover open .label=${d.error} .referenceElement=${T?.value||"project-title-input"} pointer-disabled placement=bottom-start><calcite-notice kind=danger open><div slot=message>${w}</div></calcite-notice></calcite-popover>`||""}<calcite-action .disabled=${b} icon=check scale=l .text=${d?.saveRename} active class="rename__action" type=submit .loading=${b}></calcite-action><calcite-action .disabled=${b} icon=x scale=l .text=${d?.cancelRename} class="rename__action" @click=${()=>s?.()}></calcite-action></form>`:l`<calcite-dropdown width=m class="fade-in"><calcite-button slot=trigger .iconStart=${u} icon-end=chevron-down scale=m class="project" appearance=transparent kind=neutral ${G(g)}><span class="project__text">${i}${S&&l`<calcite-icon scale=s icon=bullet-point-large class="project__indicator"></calcite-icon>`||""}</span></calcite-button>${E(Object.entries(c).filter(([I,A])=>A.length),([I,A])=>I,([I,A])=>l`<calcite-dropdown-group selection-mode=none>${A.map(m=>Wi({menuItem:m,navigate:e,portal:t,messages:d,portalItem:p,openProjectTitleEdit:o,projectMenuClick:k}))}</calcite-dropdown-group>`)}</calcite-dropdown>`}function Hi(e){return["Location Platform","Online","Enterprise"].includes(e)}function it({portal:e,searchType:t,searchTerm:i}){let a=e?.sourceJSON?.vectorSearchEnabled?`&mode=${t}`:"";return`${M(e)}search.html?q=${i}${a}`}function Vi({portal:e,item:t,messages:i,navigate:a}){if(!t||!i)return null;let n=X(i.by,{itemType:Me(t),owner:t.owner}),r=`${M(e)}item.html?id=${t.id}`;return K(t.id,l`<li class="list-item"><a class="list-item__link" href=${r??C} @click=${s=>a({event:s,href:r})}>${l`<span class="list-item__container"><span class="list-item__logo list-item__logo--item-type"><arcgis-portal-item-type .item=${t} .user=${e.user} hide-text></arcgis-portal-item-type></span><span class="list-item__content"><span class="list-item__title list-item__title--regular list-item__title--large">${t.title}</span><span class="list-item__subtitle list-item__subtitle--large">${n}</span></span></span>`}</a></li>`)}function Bi({portal:e,suggestions:t,messages:i,navigate:a,searchType:n,searchTerm:r}){if(!i||!e||!r)return null;if(!t)return l`<div><calcite-loader scale=l .label=${i.loadingResults}></calcite-loader></div>`;let s=it({portal:e,searchType:n,searchTerm:r});return l`<ul class="list">${t.map(o=>Vi({messages:i,portal:e,item:o,navigate:a}))}</ul><div class="suggestions__footer"><calcite-button icon-end=arrow-right scale=l appearance=outline class="suggestions__footer__button" kind=neutral round .href=${s} @click=${o=>{a({href:s,event:o})}}>${i.viewAll}</calcite-button></div>`}function Ui({portal:e,messages:t,searchType:i,handleSearchTypeChange:a}){if(!t||!e?.sourceJSON?.vectorSearchEnabled)return null;let n=i==="keyword",r=t.searchType;return l`<calcite-chip .label=${r.label} .icon=${n?"text":"effects"} id=search-type-toggle appearance=solid kind=neutral><span>${n?r.keywordTitle:r.semanticTitle}</span><calcite-icon icon=chevron-down scale=s class="suggestions__search-type__icon" aria-hidden=true></calcite-icon></calcite-chip><calcite-popover pointer-disabled .label=${t.searchType.label} reference-element=search-type-toggle placement=bottom-end class="suggestions__search-type"><div class="esri-header-search-type-popover-contents"><calcite-list .label=${t.searchType.label} interaction-mode=interactive display-mode=flat scale=m selection-mode=none><calcite-list-item @calciteListItemSelect=${()=>a("keyword")} icon-start=text value=keyword .label=${r.keywordTitle} .description=${r.keywordDescription}></calcite-list-item><calcite-list-item @calciteListItemSelect=${()=>a("vector")} icon-start=effects value=semantic .label=${r.semanticTitle} .description=${r.semanticDescription}></calcite-list-item></calcite-list></div></calcite-popover>`}function qi({navigate:e,product:t,portal:i,messages:a,searchActive:n,searchType:r,searchTerm:s,suggestions:o,searchInputRef:p,searchActionRef:h,searchPopoverRef:b,handleSearch:w,handleToggleSearch:u,handleSearchTypeChange:S}){if(!Hi(t)||!a||!i)return null;let k=it({portal:i,searchTerm:s,searchType:r});return n?l`<div class="search" id=search-reference-element><calcite-input type=search scale=l icon=search class="search__input" @calciteInputInput=${_=>w(_.target.value)} @keydown=${_=>{_.key==="Enter"&&(e({href:k,event:_}),_.defaultPrevented||(window.location.href=k)),_.key==="Escape"&&u(!1)}} ${G(p)}></calcite-input><calcite-action icon=x scale=l .text=${a?.close} active class="search__action" @click=${()=>u(!1)}></calcite-action><calcite-popover .label=${a.suggestions} reference-element=search-reference-element .open=${n&&!!s} pointer-disabled placement=bottom-start trigger-disabled .focusTrapOptions=${{initialFocus:!1}} ${G(b)}><div class="suggestions__header"><h3 class="suggestions__title">${a.topResults}</h3>${Ui({portal:i,messages:a,searchType:r,handleSearchTypeChange:S})}</div><div class="suggestions__results">${Bi({portal:i,suggestions:o,navigate:e,messages:a,searchType:r,searchTerm:s})}</div></calcite-popover></div>`:l`<calcite-action icon=search scale=l text=search class="search__action fade-in" @click=${()=>u(!0)} ${G(h)}></calcite-action>`}function Ji({signIn:e,messages:t}){return l`<calcite-menu slot=user .label=${t?.account||""} class="border-start fade-in"><calcite-menu-item .label=${t?.signIn||""} text-enabled .text=${t?.signIn||""} @calciteMenuItemSelect=${()=>e()}></calcite-menu-item></calcite-menu>`}function Ki({navigate:e,portal:t,product:i,links:a,messages:n,searchActive:r}){return!i||!t||!n||!he(i)||!a||r?null:l`<calcite-menu slot=content-start .label=${n.label} class="site-nav fade-in">${E(a,({href:s})=>s,({label:s,href:o})=>l`<calcite-menu-item .text=${s} text-enabled .label=${s} .href=${o} .active=${Ci(o)} @click=${p=>e({event:p,href:o})}></calcite-menu-item>`)}</calcite-menu>`}function Qi({userLinks:e,messages:t,openAccountSwitcher:i,portal:a,signOut:n,textDisabled:r}){let s=a?.user;return!s||!e||!t||e?.account?.options.length<1&&e?.resources?.options.length<1?null:l`<div slot=user class="user fade-in"><calcite-navigation-user id=navigation-user full-name=${s?.fullName??C} .username=${s?.username} .thumbnail=${s.thumbnailUrl||void 0} .userId=${s?.id} .textDisabled=${r}></calcite-navigation-user><calcite-dropdown width=m reference-element=navigation-user>${r&&l`<div class="user__top"><arcgis-portal-user-avatar .user=${s} .portal=${a} scale=l class="user__avatar"></arcgis-portal-user-avatar><div class="user__top__text"><h2 class="user__top__full">${s.fullName}</h2><p class="user__top__username">${s.username}</p></div></div>`||""}${Object.values(e).filter(o=>o.options.length).map(({title:o,options:p})=>l`<calcite-dropdown-group selection-mode=none .groupTitle=${o}>${p.map(({icon:h,label:b,href:w})=>l`<calcite-dropdown-item .iconStart=${h} .href=${w}>${b}</calcite-dropdown-item>`)}</calcite-dropdown-group>`)}<calcite-dropdown-group selection-mode=none><calcite-dropdown-item icon-start=sign-out @calciteDropdownItemSelect=${()=>n()}>${t.signOut}</calcite-dropdown-item>${i&&l`<calcite-dropdown-item icon-start=users @calciteDropdownItemSelect=${o=>{let p=je(o.target,"calcite-dropdown");p&&(p.open=!1),i()}}>${t.switchAccounts}</calcite-dropdown-item>`||""}</calcite-dropdown-group></calcite-dropdown></div>`}var at={community:"https://community.esri.com/plugins/common/feature/oauth2sso_v2/sso_login_redirect?referer=https%3A%2F%2Fcommunity.esri.com%2F",myEsri:"https://my.esri.com"};function Xi({messages:e,userLinks:t}){let i={account:{title:e.account,options:[]},resources:{title:e.resources,options:[]}};return t.forEach(a=>{i[a.group].options.push(a)}),i}function Yi({portal:e,messages:t,clientId:i}){if(!e?.user||!t)return{account:{title:t?.account,options:[]},resources:{title:t?.account,options:[]}};let a=ta(e),n=Zi({navLinkDictionary:a,messages:t,clientId:i});return Xi({userLinks:n,messages:t})}function Zi({navLinkDictionary:e,messages:t,clientId:i}){let a=["myProfile","mySettings","myEsri","training","trialDownload","communityForums","arcgisBlog","help"];return(de(i)||me(i))&&(a=["mySettings","arcgisBlog","help"]),et(i)&&(a=[]),ea(a,t,e)}function ea(e,t,i){let a=[];return e.forEach(n=>{let r=i[n];if(r&&(!("show"in r)||r.show)){let{href:s,newTab:o,icon:p,group:h}=r;a.push({label:t[n],group:h,href:s,newTab:o,icon:p})}}),a}function ta(e){let t=M(e),i=ia(e);return{myProfile:{href:`${t}user.html${window.location.pathname.includes("home/user.html")?"?nav=1":""}`,group:"account",icon:"user"},mySettings:{href:`${t}user.html${window.location.pathname.includes("home/user.html")?"?nav=1":""}#settings`,group:"account",icon:"gear"},help:{group:"resources",icon:"question",href:J(e),newTab:!0},communityForums:{show:i,group:"resources",icon:"speech-bubbles",href:at.community,newTab:!0},myEsri:{show:i,group:"account",icon:"globe",href:na(e),newTab:!0},arcgisBlog:{show:i,group:"resources",icon:"article",href:"https://www.esri.com/arcgis-blog/products/arcgis-online",newTab:!0},training:{show:i,group:"resources",icon:"education",href:aa(e),newTab:!0},trialDownload:{group:"resources",icon:"download-to",show:sa(e),href:`${t}/home/user.html${window.location.pathname.includes("home/user.html")?"?nav=1&tab=licenses":"?tab=licenses"}#settings`}}}function ia(e){return!e.isPortal&&e?.user?.sourceJSON?.userType==="both"}function aa(e){return nt(e,`${window.location.protocol}//www.esri.com/training/arcgis-online-training`)}function na(e){return nt(e,at.myEsri)}function nt(e,t){let i=q(e),a=ra(e),n=`https://accounts${a?a==="dev"?"-dev":"-stg":""}.esri.com/`,r=`&authBaseUrl=${F(i.replace("/sharing/rest/",""),e)}`,s=`${n}LoginHandler/switchuser?`,o=`username=${e?.user?.username??""}&redirect_uri=${t}${r}`;return`${s}${o}`}function ra(e){let t=e.portalHostname;return t?.includes("dev")?"dev":t?.includes("qa")?"qa":""}function sa(e){return!e?.isPortal&&["Trial","Trial Press"].includes(e?.sourceJSON.subscriptionInfo?.type)}function oa(e){switch(e){case"360 VR":return{name:"360 VR",fileName:"arcgis-360-vr",icon:"arcgis-360-vr"};case"Business Analyst":return{name:"ArcGIS Business Analyst",fileName:"arcgis-business-analyst",icon:"business-analyst"};case"Dashboards":return{name:"ArcGIS Dashboards",fileName:"arcgis-dashboards",icon:"operations-dashboard"};case"Data Pipelines":return{name:"ArcGIS Data Pipelines",fileName:"arcgis-data-pipelines",icon:"data-pipelines"};case"Deep Learning Studio":return{name:"Deep Learning Studio",fileName:"arcgis-deep-learning-studio",icon:"deeplearningstudio"};case"Enterprise":return{name:"ArcGIS Enterprise",fileName:"arcgis-enterprise",icon:"arcgis-enterprise"};case"Excalibur":return{name:"ArcGIS Excalibur",fileName:"arcgis-excalibur",icon:"excalibur"};case"Experience Builder":return{name:"ArcGIS Experience Builder",fileName:"arcgis-experience-builder",icon:"arcgis-experience-builder"};case"Field Maps":return{name:"Field Maps Designer",fileName:"arcgis-field-maps",icon:"fieldmaps"};case"Field Maps Designer EA":return{name:"Field Maps Designer (EA)",fileName:"arcgis-field-maps-designer-ea",icon:"fieldmaps"};case"GeoAnalytics Engine":case"GeoAnalytics Fabric":return{name:e,fileName:"arcgis-geoanalytics-engine",icon:"arcgis-geoanalytics"};case"GeoBIM":return{name:"ArcGIS GeoBIM",fileName:"arcgis-geobim",icon:"geobim"};case"Hub":return{name:"ArcGIS Hub",fileName:"arcgis-hub",icon:"arcgis-hub"};case"Instant Apps":return{name:"Instant Apps",fileName:"arcgis-instant-apps",icon:"instant-apps"};case"Knowledge":return{name:"ArcGIS Knowledge Studio",fileName:"arcgis-knowledge",icon:"knowledge-studio"};case"Location Platform":return{name:"Location Platform",fileName:"arcgis-location-platform",icon:"location-platform"};case"Map Viewer":return{name:"Map Viewer",fileName:"map-viewer",icon:"map-viewer"};case"Mission":return{name:"ArcGIS Mission Manager",fileName:"arcgis-mission",icon:"mission"};case"Monitor":return{name:"ArcGIS Monitor",fileName:"arcgis-monitor",icon:"monitor"};case"Notebooks":return{name:"ArcGIS Notebooks",fileName:"arcgis-notebooks",icon:"notebook"};case"Online":return{name:"ArcGIS Online",fileName:"arcgis-online",icon:"arcgis-online"};case"Ortho Maker":return{name:"Ortho Maker",fileName:"arcgis-ortho-maker",icon:"ortho-maker"};case"QuickCapture":return{name:"ArcGIS QuickCapture",fileName:"arcgis-quickcapture",icon:"quick-capture"};case"Reality Studio":return{name:"ArcGIS Reality Studio",fileName:"arcgis-reality-studio",icon:"arcgis-reality-studio"};case"Scene Viewer":return{name:"Scene Viewer",fileName:"sceneviewer",icon:"scene-viewer"};case"Solutions":return{name:"ArcGIS Solutions",fileName:"arcgis-solutions",icon:"solutions"};case"StoryMaps":return{name:"ArcGIS StoryMaps",fileName:"arcgis-storymaps",icon:"story-maps"};case"Survey123":return{name:"ArcGIS Survey123",fileName:"arcgis-survey123",icon:"survey123"};case"Tracker":return{name:"Track Viewer",fileName:"arcgis-tracker",icon:"track-viewer"};case"Urban":return{name:"ArcGIS Urban",fileName:"arcgis-urban",icon:"arcgis-urban"};case"Vector Tile Style Editor":return{name:"Vector Tile Style Editor",fileName:"vector-tile-style-editor",icon:"vector-tile-style-editor"};case"Velocity":return{name:"ArcGIS Velocity",fileName:"arcgis-velocity",icon:"velocity"};case"Web Editor":return{name:"Web Editor",fileName:"arcgis-web-editor",icon:"web-editor"};case"Workflow Manager":return{name:"ArcGIS Workflow Manager",fileName:"arcgis-workflow-manager",icon:"workflow-manager"};case"Workforce":return{name:"ArcGIS Workforce",fileName:"arcgis-workforce",icon:"workforce"};default:return{name:"ArcGIS Online",fileName:"arcgis-online",icon:"arcgis-online"}}}function ca({product:e,portal:t,clientId:i}){return e!=="Online"?e:t?.sourceJSON?.subscriptionInfo?.options?.includes("Developer")?"Location Platform":me(i)?"GeoAnalytics Fabric":de(i)?"GeoAnalytics Engine":t?.isPortal?"Enterprise":"Online"}function la(e){let t=ca(e),{name:i,fileName:a,icon:n}=oa(t);return{name:i,glyph:U(`assets/portal-navigation/product-logos/${a}-glyph-32.svg`),icon:U(`assets/portal-navigation/apps/${n}.avif`)}}function pa(){let e=Dt();["item.html","group.html"].some(t=>window.location.href.includes(t))?window.location.href=`./signin.html?locale=${e}&useLandingPage=false&returnUrl=${encodeURIComponent(window.location.href)}`:window.location.href=`./signin.html?locale=${e}&useLandingPage=true`}function ua({portal:e,clientId:t}){let i=W({portal:e});if(e?.isPortal){let a=e.access==="private"?F("signin.html",e):e.allSSL||window.location.protocol==="https:"?F("./index.html",e):`${i}/index.html`;ma(e,a)}else window.location.href=`${i}/pages/Account/manage_accounts.html#client_id=${t}&signout=true`}function da(){Yt(Ve),Zt(Ve)}function ma(e,t=window.location.href){let i=window.location.href.startsWith("http://"),a=ye(e);Ot.destroyCredentials(),da();let n=new URL(F(`${q(e)}oauth2/signout`,e)),{searchParams:r}=n;r.append("client_id","arcgisonline"),r.append("redirect_uri",t),a&&i&&(e.isPortal||e.user?.sourceJSON.provider==="enterprise")&&r.append("token",a),window.location.href=n.href}function L(e,t){if(!e)return 0;let i=Ce({text:e,font:`${t==="s"?".875rem":"1rem"} 'Avenir Next'`});return Math.ceil(i)}function ha({portal:e,product:t,projectTitle:i,links:a,messages:n,productInfo:r}){if(!t||!e)return;let s=e.user,o=he(t)&&a?.length?24+a.reduce((b,w)=>b+16+L(w.label)+16,0):0,p=40+L(i)+32+16+16+12,h=s?Math.max(L(s?.username,"s"),L(s?.fullName)):L(n?.signIn);return{actions:192,project:i?p:0,product:64+Math.max(L(r?.name),L(e.name,"s"))+16,nav:o,user:64+h+16}}function ga({measurements:e,screenWidth:t}){let{actions:i,nav:a,product:n,project:r,user:s}=e,o=64,p=t-i-o>a,h=t-i-(p?a:0)-r-o>n,b=t-a-r-i-n<s;return{nav:p,product:h,user:b?"avatar":"full"}}var rt=' -type:"Code Attachment" -type:"Featured Items" -type:"Symbol Set" -type:"Color Set" -type:"Windows Viewer Add In" -type:"Windows Viewer Configuration" -type:"Map Area" -typekeywords:"MapAreaPackage" -type:"Indoors Map Configuration" -typekeywords:"SMX"';async function Be({portal:e,searchTerm:t}){if(!e?.user)return[];try{return(await e.queryItems({...t?{query:t}:{},filter:`owner:${e.user.username}${rt}`,num:20,sortField:"modified",sortOrder:"desc"})).results}catch{return[]}}async function fa({portal:e,searchTerm:t}){if(!e?.user)return[];let i=Re((t||"").substring(0,409)),a=`${e?.id?`accountid:"${e.id}"`:""}${rt}`,n=`${q(e)}search/suggest`;return(await N(n,{query:{suggest:i,filters:a,searchFields:"title",f:"json"}}))?.result?.results||[]}var ba=ge`:host{display:block}.navigation{width:100%;min-width:0;min-height:4rem;background:var(--calcite-color-foreground-1);border-bottom:1px solid var(--calcite-color-border-3);display:flex;align-items:stretch}.navigation--loading .fade-in{opacity:0}.fade-in{opacity:1;transition:opacity ease-in-out .15s}.content-end{margin-inline-start:auto;display:flex;align-items:center}.content-end[hidden]{display:none}.action{height:100%;--calcite-internal-action-spacing: 1.25rem}.border-start{border-inline-start:1px solid var(--calcite-color-border-3)}.platform{--calcite-sheet-scrim-background: var(--calcite-color-transparent-scrim);--calcite-sheet-width: 24rem}.platform__container{display:flex;flex-direction:column;max-height:100%}.platform__header{display:flex;align-items:center}.platform__header-image{width:48px;height:48px;margin-inline-end:1rem}.platform__header-text{flex:1 1 auto;line-height:1.375}.platform__title{margin:0;padding:0;color:var(--calcite-color-text-1);font-size:var(--calcite-font-size--1);font-weight:var(--calcite-font-weight-medium)}.platform__subtitle{margin:0;padding:0;font-size:var(--calcite-font-size--2);color:var(--calcite-color-text-2)}.platform__panel{border-inline-end:1px solid var(--calcite-color-border-3);--calcite-panel-background-color: var(--calcite-color-foreground-1)}.platform__tiles{margin:.75rem .75rem 1.5rem;display:grid;grid-template-columns:repeat(auto-fit,minmax(100px,1fr));grid-gap:.5rem}.platform__tabs{min-height:0;flex:1 1 auto;--calcite-tab-content-space-y: 0}.platform__tab{position:relative}.list{list-style:none;margin:0;padding:0}.list__container{position:relative}.list__header{display:flex;align-items:center;padding:.5rem .75rem;border-bottom:1px solid var(--calcite-color-border-3);background-color:var(--calcite-color-foreground-1);position:sticky;top:0;z-index:701}.list__search{flex:1 1 auto;--calcite-color-border-input: var(--calcite-color-foreground-1)}.list-item__link{display:block;box-sizing:border-box;width:100%;padding-inline-start:.75rem;background-color:var(--calcite-color-foreground-1);outline-color:transparent;text-decoration:none;outline-offset:0;transition:color var(--calcite-animation-timing) ease-in-out,background-color var(--calcite-animation-timing) ease-in-out,outline-color var(--calcite-internal-animation-timing-fast) ease-in-out,outline-offset var(--calcite-internal-animation-timing-fast) ease-in-out}.list-item__link:hover{background-color:var(--calcite-color-transparent-hover)}.list-item__link:focus{outline:var(--calcite-border-width-md) solid var(--calcite-color-focus);outline-offset:-2px}.list-item__container{box-sizing:border-box;width:100%;padding-block:.5rem;padding-inline-start:0;padding-inline-end:.5rem;border-bottom:1px solid var(--calcite-color-border-3);display:flex;align-items:center;position:relative}.list-item__content{display:flex;flex-direction:column;justify-content:center;min-width:0}.list-item__logo{width:48px;height:48px;flex:0 0 auto;box-sizing:border-box;margin-inline-end:.5rem;justify-content:center;align-items:center;position:relative;display:flex}.list-item__logo-bg{position:absolute}.list-item__indicator{position:absolute;width:.5rem;height:.5rem;border-radius:50%;background-color:var(--calcite-color-status-success);border:2px solid var(--calcite-color-foreground-1);z-index:50;top:.25rem;inset-inline-start:-.25rem}.list-item__abbr{color:#fff;font-weight:700;position:relative}.list-item__logo-empty{border:2px dashed var(--calcite-color-border-3);border-radius:8px}.list-item__logo--item-type{background-color:var(--calcite-color-background);display:flex;justify-content:center;align-items:center}.list-item__title{display:block;font-size:var(--calcite-font-size--1);color:var(--calcite-color-text-1);font-weight:500;word-wrap:break-word}.list-item__title--regular{font-weight:400;padding-top:.25rem}.list-item__title--large{font-size:var(--calcite-font-size-0);line-height:1}.list-item__subtitle{display:block;font-size:var(--calcite-font-size--2);color:var(--calcite-color-text-3);font-weight:500;padding-top:.25rem;padding-bottom:.25rem}.list-item__subtitle--large{font-size:var(--calcite-font-size--1);font-weight:400;padding:0}.list-item__chip{margin-inline-start:auto;--calcite-chip-background-color: var(--calcite-color-foreground-current)}.app--hidden{--calcite-list-background-color: var(--calcite-color-background)}.app--hidden .list-item__logo{opacity:.4}.logo{border-inline-end:1px solid var(--calcite-color-border-3)}.site-nav{margin-inline-start:1.5rem}.project{border-inline-end:1px solid var(--calcite-color-border-3)}.project__indicator{margin-inline-start:1rem;--calcite-ui-icon-color: var(--calcite-color-status-danger);float:inline-end}.project__text{display:flex;font-size:1rem}.rename{width:100%;min-width:0;display:flex;flex:1 1 0;align-items:center;margin-inline-start:.5rem}.rename__action{margin-inline-end:.5rem;display:flex;align-items:center}.rename__input{margin-inline-end:.5rem;display:block;width:100%}.search{width:100%;min-width:0;display:flex;flex:1 1 0;align-items:center;margin-inline-start:.5rem}.search__action{margin-inline-end:.5rem;display:flex;align-items:center}.search__input{margin-inline-end:.5rem;display:block;width:100%}.suggestions__header{display:flex;align-items:center;width:var(--calcite-popover-max-size-x);box-sizing:border-box;padding:.75rem 1rem;border-bottom:1px solid var(--calcite-color-border-3)}.suggestions__title{padding:0;margin:0;font-weight:500;color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-1);flex:1 1 0}.suggestions__search-type{--calcite-popover-max-size-x: 320px}.suggestions__search-type__icon{vertical-align:-.2rem}.suggestions__footer{display:flex;align-items:center;justify-content:center;padding:1rem}.notifications{width:min(24rem,80vw)}.notifications--full:after{content:"";display:block;border-top:1px solid var(--calcite-color-border-3);margin-left:1rem}.notifications__list{max-height:min(18rem,80vh);overflow:auto}.notifications--empty{padding:2rem}.empty{padding:1rem;text-align:center;color:var(--calcite-color-text-3);--calcite-icon-color: var(--calcite-color-status-success-hover)}.empty__header{margin:0;padding:.75rem 0 0;color:var(--calcite-color-text-1);font-weight:500;font-size:var(--calcite-font-size-1)}.empty__text{margin:0;padding:0;color:var(--calcite-color-text-3);font-weight:400;font-size:var(--calcite-font-size-0)}.notification{display:flex;flex-direction:column;padding:.5rem}.notification__message{color:var(--calcite-color-text-1);font-size:var(--calcite-font-size-0);--calcite-color-brand-underline: transparent}.notification__date{color:var(--calcite-color-text-3);font-size:var(--calcite-font-size-0)}.notifications__dismiss{margin-inline-start:auto;margin-inline-end:1rem;margin-block:.5rem}.user{display:flex;--calcite-dropdown-item-text-color: var(--calcite-color-text-3);--calcite-dropdown-group-title-text-color: var(--calcite-color-text-2)}.user__top{display:flex;padding:.75rem;border-bottom:1px solid var(--calcite-color-border-3)}.user__top__avatar{flex:0 0 auto}.user__top__text{box-sizing:border-box;word-wrap:break-word;flex:1 1 0;min-width:0;padding-inline-start:1rem;line-height:1.375}.user__top__full{font-size:1rem;font-weight:medium;color:var(--calcite-colot-text-1);padding:0;margin:0}.user__top__username{font-size:1rem;color:var(--calcite-colot-text-2);padding:0;margin:0}`;function va({messages:e,portal:t,showNav:i,openPlatformMenu:a}){return!e||i&&!t?.user?null:l`<calcite-action .label=${e.applicationMenu} text="app switcher" icon=app-launcher scale=l class="action" @click=${a}></calcite-action>`}var pe=class extends be{constructor(){super(...arguments),this.messages=Te({blocking:!0}),this.refreshNotifications=async()=>{let{portal:t,messages:i}=this;this.notifications=await ze({portal:t,locale:i._t9nLocale,t9n:i.notifications})},this.deleteNotifications=async t=>{let{portal:i}=this;if(t?.length<20)await Ht(i,t);else{let a=0;for await(let n of t)await Ke({id:n,portal:i}),this.notificationDeleteProgress=Math.ceil(a++/t.length*100)}this.notificationDeleteProgress=void 0,this.refreshNotifications()},this.navigate=t=>{this.arcgisNavigate.emit(t)},this.openPlatformMenu=()=>{this.platformMenuOpen=!0},this.projectMenuClick=t=>{this.arcgisNavigationProjectMenuClick.emit(t)},this.openProjectTitleEdit=()=>{this.projectTitleEditing=!0,this.editedProjectTitle=this.projectTitle,requestAnimationFrame(()=>{this.projectTitleInputRef?.value?.setFocus()})},this.closeProjectTitleEdit=()=>{this.projectTitleEditing=!1,this.projectTitleErrorMessage=void 0,requestAnimationFrame(()=>{this.projectButtonRef?.value?.setFocus()})},this.handleProjectTitleSave=async t=>{this.projectTitleSaving=!0;let i=await(this.projectTitleSave||Gi)(t);if(this.projectTitleSaving=!1,i.status==="success"){this.closeProjectTitleEdit();return}i.message&&(this.projectTitleErrorMessage=i.message)},this.handleProjectTitleEdit=t=>{this.editedProjectTitle=t},this.handleProjectTitleCancel=()=>{this.editedProjectTitle=this.projectTitle,this.closeProjectTitleEdit()},this.signOut=()=>{let{portal:t,clientId:i}=this;ua({portal:t,clientId:i}),this.arcgisNavigationSignOut.emit()},this.signIn=()=>{this.arcgisNavigationSignIn.emit(),pa()},this.openAccountSwitcher=()=>{this.accountSwitcherOpen=!0},this.handlePlatformClose=()=>{this.platformMenuOpen=!1,this.handleAppCancel()},this.handleAppSave=async()=>{let{hiddenApps:t,sortedApps:i,userProperties:a,portal:n}=this;this.apps=[...i],this.editingApplications=!1,this.appsLoading=!0;let{result:r}=await Ii({apps:i,hiddenApps:t,userProperties:a,portal:n});r?.success&&(this.previousAppState={apps:i,hiddenApps:t}),await xe(1e3),this.appsLoading=!1},this.handleAppCancel=()=>{this.previousAppState&&(this.apps=this.previousAppState.apps,this.hiddenApps=this.previousAppState.hiddenApps),this.editingApplications=!1},this.handleAppHide=({app:t,hidden:i})=>{!this.hiddenApps||!t||(this.hiddenApps={...this.hiddenApps||{},[t]:i})},this.handleAppReorder=({oldIndex:t,newIndex:i})=>{let a=[...this.sortedApps],n=a[t];a.splice(t,1),a.splice(i,0,n),this.sortedApps=a},this.handleItemSearch=t=>{this.recentContentLoading=!0,this.recentContentSearchTerm=t,this.debouncedItemSearch(t)},this.debouncedItemSearch=ie(async t=>{this.recentContent=await Be({portal:this.portal,searchTerm:t}),this.recentContentLoading=!1},1e3),this.debouncedSuggest=ie(async t=>{this.suggestions=await fa({portal:this.portal,searchTerm:t})},1e3),this.handleSearch=t=>{this.searchTerm=t,this.suggestions=void 0,this.debouncedSuggest(t)},this.sizeSearchPopover=()=>{let t=this.searchInput?.value,i=this.searchPopover?.value;if(!t||!i)return;let a=t.offsetWidth>480?`${t.offsetWidth}px`:"80vw";i.style?.setProperty?.("--calcite-popover-max-size-x",a)},this.handleToggleSearch=t=>{this.searchActive=t,this.searchTerm="",this.suggestions=void 0,requestAnimationFrame(()=>{if(t){this.searchInput?.value?.setFocus(),this.sizeSearchPopover();return}this.searchAction?.value?.setFocus()})},this.handleSearchTypeChange=t=>{this.searchType=t},this.searchInput=O(),this.searchAction=O(),this.searchPopover=O(),this.projectTitleInputRef=O(),this.projectButtonRef=O(),this.links=[],this.notifications=[],this.apps=[],this.hiddenApps={},this.sortedApps=[],this.appsSearchTerm="",this.appsLoading=!0,this.editingApplications=!1,this.recentContent=[],this.recentContentSearchTerm="",this.recentContentLoading=!0,this.platformMenuOpen=!1,this.accountSwitcherOpen=!1,this.projectTitleEditing=!1,this.projectTitleSaving=!1,this.screenWidth=window.innerWidth,this.searchActive=!1,this.searchTerm="",this.searchType="keyword",this.projectMenuOptions=[],this.arcgisNavigate=z(),this.arcgisNavigationProjectMenuClick=z(),this.arcgisNavigationSignIn=z(),this.arcgisNavigationSignOut=z()}static{this.properties={infoBanner:16,links:16,userLinks:16,notifications:16,apps:16,hiddenApps:16,sortedApps:16,previousAppState:16,appsSearchTerm:16,appsLoading:16,editingApplications:16,recentContent:16,recentContentSearchTerm:16,recentContentLoading:16,platformMenuOpen:16,accountSwitcherOpen:16,editedProjectTitle:16,projectTitleEditing:16,projectTitleSaving:16,projectTitleErrorMessage:16,productInfo:16,notificationDeleteProgress:16,measurements:16,screenWidth:16,showProduct:16,showNav:16,showUser:16,searchActive:16,searchTerm:16,suggestions:16,searchType:16,portal:0,portalItem:0,product:1,productHref:1,projectTitle:1,projectTitleSave:0,projectMenuIcon:1,projectMenuSaveIndicator:5,projectMenuOptions:0,disableTrackViewer:5,disableNotebookServer:5,clientId:1}}static{this.styles=ba}#e;async loaded(){let{portal:t,messages:i,clientId:a,product:n}=this;this.calculateMeasurements(),this.productInfo=la({product:n,clientId:a,portal:t}),this.userLinks=Yi({portal:t,messages:i.user,clientId:a}),this.notifications=await ze({portal:t,locale:i._t9nLocale,t9n:i.notifications}),this.recentContent=await Be({portal:t}),this.recentContentLoading=!1;let{apps:r,hiddenApps:s,signInSettings:o,licenses:p,userProperties:h}=await Ai({portal:t,trackViewerEnabled:!this.disableTrackViewer,notebookServerEnabled:!this.disableNotebookServer}),b=await De(t);this.infoBanner=b?.informationalBanner,this.userProperties=h,this.apps=r,this.hiddenApps=s,this.sortedApps=r,this.previousAppState={apps:r,hiddenApps:s},this.appsLoading=!1,this.links=Pi({portal:t,messages:i.links,licenses:p,clientId:a,signInSettings:o}),this.calculateMeasurements()}connectedCallback(){super.connectedCallback(),!(typeof ResizeObserver>"u")&&(this.#e=new ResizeObserver(()=>{requestAnimationFrame(()=>{this.screenWidth=window.innerWidth,this.updateBreakpoints(),this.sizeSearchPopover()})}))}firstUpdated(){this.el&&this.#e&&(this.#e.observe(this.el),this.screenWidth=window.innerWidth)}disconnectedCallback(){this.#e?.disconnect(),this.#e=void 0,super.disconnectedCallback()}calculateMeasurements(){let{links:t,messages:i,portal:a,product:n,productInfo:r,projectTitle:s}=this;if(a){let o=ha({portal:a,product:n,productInfo:r,links:t,messages:i.user,projectTitle:s});this.measurements=o,this.updateBreakpoints()}}updateBreakpoints(){let{measurements:t,screenWidth:i}=this;if(t){let a=ga({measurements:t,screenWidth:i});this.showProduct=a.product,this.showNav=a.nav,this.showUser=a.user}}render(){let{accountSwitcherOpen:t,apps:i,appsLoading:a,appsSearchTerm:n,handleAppCancel:r,handleAppHide:s,handleAppReorder:o,handleAppSave:p,handleItemSearch:h,handlePlatformClose:b,handleSearch:w,handleToggleSearch:u,handleSearchTypeChange:S,hiddenApps:k,infoBanner:_,links:T,messages:g,navigate:d,notifications:c,notificationDeleteProgress:v,openAccountSwitcher:I,portal:A,portalItem:m,product:y,productInfo:$,productHref:f,projectTitle:D,editedProjectTitle:Y,handleProjectTitleSave:st,handleProjectTitleEdit:ot,handleProjectTitleCancel:ct,openProjectTitleEdit:lt,openPlatformMenu:pt,platformMenuOpen:ut,projectTitleEditing:Z,projectTitleSaving:dt,projectTitleErrorMessage:mt,projectMenuIcon:ht,projectMenuSaveIndicator:gt,projectMenuClick:ft,projectMenuOptions:bt,projectTitleInputRef:vt,projectButtonRef:wt,recentContent:_t,recentContentSearchTerm:yt,recentContentLoading:$t,userLinks:At,searchActive:V,searchTerm:St,searchType:It,searchInput:kt,searchAction:xt,searchPopover:Tt,showNav:ee,showProduct:Pt,showUser:jt,suggestions:Ct}=this,Mt=A?.user,Nt=he(y)&&!T?.length||!this.measurements;return l`<arcgis-portal-info-banner .config=${_}></arcgis-portal-info-banner>${A?.isPortal&&m?.loaded&&l`<arcgis-portal-classification-banner .portalItem=${m}></arcgis-portal-classification-banner>`||""}<header class=${B({navigation:!0,"navigation--loading":Nt})}>${va({messages:g?.platform,portal:A,showNav:ee,openPlatformMenu:pt})}${Pt&&Gt({navigate:d,portal:A,product:y,productInfo:$,productHref:f,messages:g?.logo,showNav:ee,searchActive:V,projectTitleEditing:Z})||""}${Fi({navigate:d,portal:A,portalItem:m,messages:g?.project,projectTitle:D,editedProjectTitle:Y,handleProjectTitleSave:st,handleProjectTitleEdit:ot,openProjectTitleEdit:lt,projectTitleErrorMessage:mt,handleProjectTitleCancel:ct,projectTitleEditing:Z,projectTitleSaving:dt,projectMenuIcon:ht,projectMenuSaveIndicator:gt,projectMenuClick:ft,projectMenuOptions:bt,projectTitleInputRef:vt,projectButtonRef:wt})}${ee&&Ki({searchActive:V,navigate:d,portal:A,product:y,messages:g?.links,links:T})||""}<div slot=content-end class="content-end fade-in" .hidden=${Z||V}><slot name=content-end></slot></div>${qi({navigate:d,portal:A,product:y,messages:g?.search,searchActive:V,searchType:It,searchTerm:St,suggestions:Ct,handleSearch:w,handleToggleSearch:u,handleSearchTypeChange:S,searchInputRef:kt,searchActionRef:xt,searchPopoverRef:Tt})}${Mt?l`<calcite-menu class="border-start fade-in" label=test>${qt({notifications:c,messages:g?.notifications})}${Jt({notifications:c,deleteNotifications:this.deleteNotifications,messages:g?.notifications,notificationDeleteProgress:v})}</calcite-menu>${Qi({portal:A,userLinks:At,openAccountSwitcher:A?.isPortal?void 0:I,signOut:this.signOut,messages:g?.user,textDisabled:jt==="avatar"})}`:Ji({messages:g.user,signIn:this.signIn})}</header>${Oi({locale:g._t9nLocale,navigate:d,portal:A,product:y,productInfo:$,messages:g?.platform,apps:i,appsLoading:a,hiddenApps:k,appsSearchTerm:n,editingApplications:this.editingApplications,open:ut,links:T,recentContent:_t,recentContentSearchTerm:yt,recentContentLoading:$t,handlePlatformClose:b,handleAppReorder:o,handleAppEdit:()=>this.editingApplications=!0,handleAppsSearch:Et=>this.appsSearchTerm=Et,handleAppSave:p,handleAppCancel:r,handleAppHide:s,handleItemSearch:h})}${t&&l`<arcgis-portal-account-switcher .portal=${A} .baseUrl=${W({portal:A})}></arcgis-portal-account-switcher>`||""}`}};we("arcgis-portal-navigation",pe);return pe},"intl","portal/Portal","identity/IdentityManager",a,b,c,d,e,f)
@@ -1,4 +1,4 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
2
  var Y=globalThis,Z=Y.ShadowRoot&&(Y.ShadyCSS===void 0||Y.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,vt=Symbol(),Mt=new WeakMap,M=class{constructor(t,e,o){if(this._$cssResult$=!0,o!==vt)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(Z&&t===void 0){let o=e!==void 0&&e.length===1;o&&(t=Mt.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),o&&Mt.set(e,t))}return t}toString(){return this.cssText}},kt=s=>new M(typeof s=="string"?s:s+"",void 0,vt),Ce=(s,...t)=>{let e=s.length===1?s[0]:t.reduce((o,n,r)=>o+(i=>{if(i._$cssResult$===!0)return i.cssText;if(typeof i=="number")return i;throw Error("Value passed to 'css' function must be a 'css' function result: "+i+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+s[r+1],s[0]);return new M(e,s,vt)},jt=(s,t)=>{if(Z)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let o=document.createElement("style"),n=Y.litNonce;n!==void 0&&o.setAttribute("nonce",n),o.textContent=e.cssText,s.appendChild(o)}},Et=Z?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(let o of t.cssRules)e+=o.cssText;return kt(e)})(s):s;var{is:we,defineProperty:Oe,getOwnPropertyDescriptor:Te,getOwnPropertyNames:Se,getOwnPropertySymbols:Pe,getPrototypeOf:Ne}=Object,tt=globalThis,Ht=tt.trustedTypes,xe=Ht?Ht.emptyScript:"",De=tt.reactiveElementPolyfillSupport,k=(s,t)=>s,X={toAttribute(s,t){switch(t){case Boolean:s=s?xe:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch{e=null}}return e}},j=(s,t)=>!we(s,t),zt={attribute:!0,type:String,converter:X,reflect:!1,useDefault:!1,hasChanged:j};Symbol.metadata??=Symbol("metadata"),tt.litPropertyMetadata??=new WeakMap;var A=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=zt){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let o=Symbol(),n=this.getPropertyDescriptor(t,o,e);n!==void 0&&Oe(this.prototype,t,n)}}static getPropertyDescriptor(t,e,o){let{get:n,set:r}=Te(this.prototype,t)??{get(){return this[e]},set(i){this[e]=i}};return{get:n,set(i){let a=n?.call(this);r?.call(this,i),this.requestUpdate(t,a,o)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??zt}static _$Ei(){if(this.hasOwnProperty(k("elementProperties")))return;let t=Ne(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(k("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(k("properties"))){let e=this.properties,o=[...Se(e),...Pe(e)];for(let n of o)this.createProperty(n,e[n])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[o,n]of e)this.elementProperties.set(o,n)}this._$Eh=new Map;for(let[e,o]of this.elementProperties){let n=this._$Eu(e,o);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let o=new Set(t.flat(1/0).reverse());for(let n of o)e.unshift(Et(n))}else t!==void 0&&e.push(Et(t));return e}static _$Eu(t,e){let o=e.attribute;return o===!1?void 0:typeof o=="string"?o:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let o of e.keys())this.hasOwnProperty(o)&&(t.set(o,this[o]),delete this[o]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return jt(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,e,o){this._$AK(t,o)}_$ET(t,e){let o=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,o);if(n!==void 0&&o.reflect===!0){let r=(o.converter?.toAttribute!==void 0?o.converter:X).toAttribute(e,o.type);this._$Em=t,r==null?this.removeAttribute(n):this.setAttribute(n,r),this._$Em=null}}_$AK(t,e){let o=this.constructor,n=o._$Eh.get(t);if(n!==void 0&&this._$Em!==n){let r=o.getPropertyOptions(n),i=typeof r.converter=="function"?{fromAttribute:r.converter}:r.converter?.fromAttribute!==void 0?r.converter:X;this._$Em=n;let a=i.fromAttribute(e,r.type);this[n]=a??this._$Ej?.get(n)??a,this._$Em=null}}requestUpdate(t,e,o,n=!1,r){if(t!==void 0){let i=this.constructor;if(n===!1&&(r=this[t]),o??=i.getPropertyOptions(t),!((o.hasChanged??j)(r,e)||o.useDefault&&o.reflect&&r===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,o))))return;this.C(t,e,o)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:o,reflect:n,wrapped:r},i){o&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,i??e??this[t]),r!==!0||i!==void 0)||(this._$AL.has(t)||(this.hasUpdated||o||(e=void 0),this._$AL.set(t,e)),n===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[n,r]of this._$Ep)this[n]=r;this._$Ep=void 0}let o=this.constructor.elementProperties;if(o.size>0)for(let[n,r]of o){let{wrapped:i}=r,a=this[n];i!==!0||this._$AL.has(n)||a===void 0||this.C(n,void 0,r,a)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach(o=>o.hostUpdate?.()),this.update(e)):this._$EM()}catch(o){throw t=!1,this._$EM(),o}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach(e=>e.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach(e=>this._$ET(e,this[e])),this._$EM()}updated(t){}firstUpdated(t){}};A.elementStyles=[],A.shadowRootOptions={mode:"open"},A[k("elementProperties")]=new Map,A[k("finalized")]=new Map,De?.({ReactiveElement:A}),(tt.reactiveElementVersions??=[]).push("2.1.2");var bt=globalThis,Vt=s=>s,et=bt.trustedTypes,Bt=et?et.createPolicy("lit-html",{createHTML:s=>s}):void 0,At="$lit$",_=`lit$${Math.random().toFixed(9).slice(2)}$`,_t="?"+_,Le=`<${_t}>`,T=document,z=()=>T.createComment(""),V=s=>s===null||typeof s!="object"&&typeof s!="function",Ct=Array.isArray,Qt=s=>Ct(s)||typeof s?.[Symbol.iterator]=="function",$t=`[
3
3
  \f\r]`,H=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Wt=/-->/g,Ft=/>/g,w=RegExp(`>|${$t}(?:([^\\s"'>=/]+)(${$t}*=${$t}*(?:[^
4
- \f\r"'\`<>=]|("|')|))|$)`,"g"),qt=/'/g,Gt=/"/g,Jt=/^(?:script|style|textarea|title)$/i,wt=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),ys=wt(1),gs=wt(2),vs=wt(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Kt=new WeakMap,O=T.createTreeWalker(T,129);function Yt(s,t){if(!Ct(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Bt!==void 0?Bt.createHTML(t):t}var Zt=(s,t)=>{let e=s.length-1,o=[],n,r=t===2?"<svg>":t===3?"<math>":"",i=H;for(let a=0;a<e;a++){let c=s[a],l,u,h=-1,m=0;for(;m<c.length&&(i.lastIndex=m,u=i.exec(c),u!==null);)m=i.lastIndex,i===H?u[1]==="!--"?i=Wt:u[1]!==void 0?i=Ft:u[2]!==void 0?(Jt.test(u[2])&&(n=RegExp("</"+u[2],"g")),i=w):u[3]!==void 0&&(i=w):i===w?u[0]===">"?(i=n??H,h=-1):u[1]===void 0?h=-2:(h=i.lastIndex-u[2].length,l=u[1],i=u[3]===void 0?w:u[3]==='"'?Gt:qt):i===Gt||i===qt?i=w:i===Wt||i===Ft?i=H:(i=w,n=void 0);let v=i===w&&s[a+1].startsWith("/>")?" ":"";r+=i===H?c+Le:h>=0?(o.push(l),c.slice(0,h)+At+c.slice(h)+_+v):c+_+(h===-2?a:v)}return[Yt(s,r+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},B=class s{constructor({strings:t,_$litType$:e},o){let n;this.parts=[];let r=0,i=0,a=t.length-1,c=this.parts,[l,u]=Zt(t,e);if(this.el=s.createElement(l,o),O.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=O.nextNode())!==null&&c.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let h of n.getAttributeNames())if(h.endsWith(At)){let m=u[i++],v=n.getAttribute(h).split(_),C=/([.?@])?(.*)/.exec(m);c.push({type:1,index:r,name:C[2],strings:v,ctor:C[1]==="."?ot:C[1]==="?"?nt:C[1]==="@"?rt:P}),n.removeAttribute(h)}else h.startsWith(_)&&(c.push({type:6,index:r}),n.removeAttribute(h));if(Jt.test(n.tagName)){let h=n.textContent.split(_),m=h.length-1;if(m>0){n.textContent=et?et.emptyScript:"";for(let v=0;v<m;v++)n.append(h[v],z()),O.nextNode(),c.push({type:2,index:++r});n.append(h[m],z())}}}else if(n.nodeType===8)if(n.data===_t)c.push({type:2,index:r});else{let h=-1;for(;(h=n.data.indexOf(_,h+1))!==-1;)c.push({type:7,index:r}),h+=_.length-1}r++}}static createElement(t,e){let o=T.createElement("template");return o.innerHTML=t,o}};function S(s,t,e=s,o){if(t===f)return t;let n=o!==void 0?e._$Co?.[o]:e._$Cl,r=V(t)?void 0:t._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),r===void 0?n=void 0:(n=new r(s),n._$AT(s,e,o)),o!==void 0?(e._$Co??=[])[o]=n:e._$Cl=n),n!==void 0&&(t=S(s,n._$AS(s,t.values),n,o)),t}var st=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:o}=this._$AD,n=(t?.creationScope??T).importNode(e,!0);O.currentNode=n;let r=O.nextNode(),i=0,a=0,c=o[0];for(;c!==void 0;){if(i===c.index){let l;c.type===2?l=new L(r,r.nextSibling,this,t):c.type===1?l=new c.ctor(r,c.name,c.strings,this,t):c.type===6&&(l=new it(r,this,t)),this._$AV.push(l),c=o[++a]}i!==c?.index&&(r=O.nextNode(),i++)}return O.currentNode=T,n}p(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},L=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,n){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),V(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Qt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&V(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:o}=t,n=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=B.createElement(Yt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===n)this._$AH.p(e);else{let r=new st(n,this),i=r.u(this.options);r.p(e),this.T(i),this._$AH=r}}_$AC(t){let e=Kt.get(t.strings);return e===void 0&&Kt.set(t.strings,e=new B(t)),e}k(t){Ct(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,n=0;for(let r of t)n===e.length?e.push(o=new s(this.O(z()),this.O(z()),this,this.options)):o=e[n],o._$AI(r),n++;n<e.length&&(this._$AR(o&&o._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let o=Vt(t).nextSibling;Vt(t).remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,n,r){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=d}_$AI(t,e=this,o,n){let r=this.strings,i=!1;if(r===void 0)t=S(this,t,e,0),i=!V(t)||t!==this._$AH&&t!==f,i&&(this._$AH=t);else{let a=t,c,l;for(t=r[0],c=0;c<r.length-1;c++)l=S(this,a[o+c],e,c),l===f&&(l=this._$AH[c]),i||=!V(l)||l!==this._$AH[c],l===d?t=d:t!==d&&(t+=(l??"")+r[c+1]),this._$AH[c]=l}i&&!n&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ot=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},nt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},rt=class extends P{constructor(t,e,o,n,r){super(t,e,o,n,r),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??d)===f)return;let o=this._$AH,n=t===d&&o!==d||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==d&&(o===d||n);n&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},it=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}},Xt={M:At,P:_,A:_t,C:1,L:Zt,R:st,D:Qt,V:S,I:L,H:P,N:nt,U:rt,B:ot,F:it},Ue=bt.litHtmlPolyfillSupport;Ue?.(B,L),(bt.litHtmlVersions??=[]).push("3.3.2");var at=(s,t,e)=>{let o=e?.renderBefore??t,n=o._$litPart$;if(n===void 0){let r=e?.renderBefore??null;o._$litPart$=n=new L(t.insertBefore(z(),r),r,void 0,e??{})}return n._$AI(s),n};var Ot=globalThis,E=class extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=at(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};E._$litElement$=!0,E.finalized=!0,Ot.litElementHydrateSupport?.({LitElement:E});var Re=Ot.litElementPolyfillSupport;Re?.({LitElement:E});(Ot.litElementVersions??=[]).push("4.2.2");var te=new Set,ee;var se=s=>typeof s=="string"?s:"el"in s?s.el.localName:"localName"in s?s.localName:s.declaredClass,xs=(s,t,e,o)=>{let n=se(t);if(o?.once){let i=`${s}${n}${e}`;if(te.has(i))return;te.add(i)}let r;if(o?.detail){r={};for(let[i,a]of Object.entries(o.detail))if((typeof a=="object"||typeof a=="function")&&a!==null){let c=new WeakRef(a);Object.defineProperty(r,i,{enumerable:!0,get(){return c.deref()}})}else r[i]=a;ee?.log.interceptors?.forEach(i=>i(s,n,e,r)),console[s](`[${n}]: ${e}`,r)}else ee?.log.interceptors?.forEach(i=>i(s,n,e)),console[s](`[${n}]: ${e}`)},oe=s=>{let t=`[${se(s)}] `;return e=>{let o=e instanceof Error&&e.message?e:new Error(String(e));o.message=`${t}${o.message}`,setTimeout(()=>{throw e})}},Ds=s=>`The property \`${s.toString()}\` is required but missing.`,Ls=s=>`The property \`${s.toString()}\` is empty but must have at least one element.`;var p=(s,t,...e)=>{try{return s?.call(t,...e)}catch(o){console.error(o,s)}},W=async(s,t,...e)=>{try{return await s?.call(t,...e)}catch(o){console.error(o,s)}};var q=Symbol.for("controller"),Ie=s=>typeof s=="object"&&s!==null&&(q in s||"hostConnected"in s||"hostDisconnected"in s||"hostUpdate"in s||"hostUpdated"in s),Is=s=>typeof s?.then=="function";var F,x=s=>{F!==s&&(F=s,queueMicrotask(()=>F===s?F=void 0:0))},G=s=>F,N=[],ne=s=>{if(s===void 0){N=[];return}let t=N.indexOf(s);N=t===-1?[...N,s]:N.slice(0,t+1),queueMicrotask(()=>N=[])},re=()=>N,U,Ms=s=>{U!==s&&(U=s,queueMicrotask(()=>U===s?U=void 0:0))},Me=()=>{let s=U;return U=void 0,s},ie=async(s,t)=>{let e=lt(s);if(e===void 0)return s;if(await e.ready,typeof t=="function"){let o=e.watchExports(n=>t(n,o))}return e.exports},ae=async s=>{let t=lt(s);return await t.ready,t},lt=s=>{let e=G().manager.X(s);if(e!==void 0)return e;if(Ie(s))return s;let o=Me();if(o!==void 0)return o},ct=!1,ks=s=>{ct=!0;try{return s()}finally{ct=!1}};var b=class{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}};var ce=(s,t)=>{let e=t>ke?je:t/He,o=0,n=setInterval(()=>{o+=e,o>=t&&(clearInterval(n),s())},e);return n},ke=4e3,je=2e3,He=4;var ze=(s,t,e)=>{let o=Object.keys(s),n=o.length;R===void 0&&queueMicrotask(I),R??=new Map;let r=R.get(s);return r===void 0&&(r={callbacks:[],keyCount:n},R.set(s,r)),r.keyCount!==n&&(r.callbacks.forEach(i=>i(o)),r.callbacks=[],r.keyCount=n),r.callbacks.push(i=>{let a=l=>p(t,null,l),c=i[n];c===void 0?a(void 0):s[c]===e?a(c):a(void 0)}),e},R,I=()=>{R?.forEach(({callbacks:s},t)=>{let e=Object.keys(t);s.forEach(o=>o(e))}),R=void 0},Ve=(s,t,e)=>{let o=s.manager;return o.V!==d&&o.V!==e&&o.S(void 0,void 0),o.T.length===0&&queueMicrotask(()=>o.S(void 0,void 0)),o.V=e,o.T.push((n,r)=>p(t,void 0,e===r?n:void 0)),e},Be=(s=[G(),...re()],t,e)=>{let o=Array.isArray(s)?s:[s],n=o.length+1,r=i=>{n-=1,i!==void 0&&(n=Math.min(n,0)),n===0&&t(i)};o.forEach(i=>ze(i,a=>r(a===void 0?void 0:{key:a,host:i,isReactive:!1}),e));for(let i of o)if("manager"in i&&i.manager.component===i){Ve(i,a=>r(a===void 0?void 0:{key:a,host:i,isReactive:!0}),e);break}return e},We=(s="",t={},e=G())=>{let o={emit:n=>{s===""&&I();let r=new CustomEvent(s,{detail:n,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(r),r}};return s===""&&Be(void 0,n=>s=n.key,o),o},Fe=We.bind(null,""),de;de=q;var Tt=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#n=[],this.#r=[],this.#c=[],this.#l=[],this.#d=[],this.#i=[],this.#p=!1,this.P=new b,this.connectedCalled=!1,this.loadedCalled=!1,this[de]=!0,this.#h=[];let e=this,o=t??G(new.target.name);e.#o=o,e.ready=e.P.promise,e.#a=he(e),e.component=o,e.#o.addController(e),e.#o.manager===void 0||(ne(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#n;#r;#c;#l;#d;#i;#p;#o;catchUpLifecycle(){let{manager:t}=this.#o;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#p&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(oe(this.#o))}#a;get exports(){return this.#a}set exports(t){let e=this.#a;e!==t&&(this.#a=t,this.#h.forEach(p),this.connectedCalled&&this.O!==!1&&this.#o.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#a=e?he(t):t,this.#h.forEach(p)}#h;watchExports(t){let e=()=>t(this.#a);return this.#h.push(e),()=>{this.#h.splice(this.#h.indexOf(e),1)}}get use(){return x(this.#o),ie}get useRef(){return x(this.#o),ae}get useRefSync(){return x(this.#o),lt}controllerRemoved(){this.#o.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#n.push(t)}onUpdate(t){this.#r.push(t)}onUpdated(t){this.#c.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#d.push(t),this.connectedCalled&&this.#o.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#i.forEach(p),t.#i=[]}async triggerLoad(){if(this.#p)return;this.#p=!0;let t=this;t.hostLoad&&await W(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(W)),this.P.resolve(this.#a)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#n.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#r.forEach(le,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#c.forEach(le,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#l.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#d.forEach(this.#u,this)}#u(t){x(this.#o);let e=p(t);(Array.isArray(e)?e:[e]).forEach(n=>{typeof n=="function"?this.#i.push(n):typeof n=="object"&&typeof n.remove=="function"&&this.#i.push(n.remove)})}};function le(s){p(s,void 0,this)}var he=s=>{if(typeof s!="object"&&typeof s!="function"||s===null)return s;let t={get(o,n,r){if(!((n==="exports"||n==="_exports")&&n in o&&o[n]===e)&&(n in o||n in Promise.prototype||typeof n=="symbol"))return typeof o=="function"?o[n]:Reflect.get(o,n,r)}},e=new Proxy(s,t);return e};var pe=Tt;var y={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},$=s=>(...t)=>({_$litDirective$:s,values:t}),g=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var{I:qe}=Xt,ue=s=>s;var ht=s=>s.strings===void 0,fe=()=>document.createComment(""),Js=(s,t,e)=>{let o=s._$AA.parentNode,n=t===void 0?s._$AB:t._$AA;if(e===void 0){let r=o.insertBefore(fe(),n),i=o.insertBefore(fe(),n);e=new qe(r,i,s,s.options)}else{let r=e._$AB.nextSibling,i=e._$AM,a=i!==s;if(a){let c;e._$AQ?.(s),e._$AM=s,e._$AP!==void 0&&(c=s._$AU)!==i._$AU&&e._$AP(c)}if(r!==n||a){let c=e._$AA;for(;c!==r;){let l=ue(c).nextSibling;ue(o).insertBefore(c,n),c=l}}}return e},Ys=(s,t,e=s)=>(s._$AI(t,e),s),Ge={},me=(s,t=Ge)=>s._$AH=t,Zs=s=>s._$AH,Xs=s=>{s._$AR(),s._$AA.remove()};var Ke=$(class extends g{constructor(s){if(super(s),s.type!==y.PROPERTY&&s.type!==y.ATTRIBUTE&&s.type!==y.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ht(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[t]){if(t===f||t===d)return t;let e=s.element,o=s.name;if(s.type===y.PROPERTY){if(t===e[o])return f}else if(s.type===y.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(o))return f}else if(s.type===y.ATTRIBUTE&&e.getAttribute(o)===t+"")return f;return me(s),t}});var K=(s,t)=>{let e=s._$AN;if(e===void 0)return!1;for(let o of e)o._$AO?.(t,!1),K(o,t);return!0},dt=s=>{let t,e;do{if((t=s._$AM)===void 0)break;e=t._$AN,e.delete(s),s=t}while(e?.size===0)},ye=s=>{for(let t;t=s._$AM;s=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(s))break;e.add(s),Ye(t)}};function Qe(s){this._$AN!==void 0?(dt(this),this._$AM=s,ye(this)):this._$AM=s}function Je(s,t=!1,e=0){let o=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(t)if(Array.isArray(o))for(let r=e;r<o.length;r++)K(o[r],!1),dt(o[r]);else o!=null&&(K(o,!1),dt(o));else K(this,s)}var Ye=s=>{s.type==y.CHILD&&(s._$AP??=Je,s._$AQ??=Qe)},pt=class extends g{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,o){super._$AT(t,e,o),ye(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(K(this,t),dt(this))}setValue(t){if(ht(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var yo=()=>new Pt,Pt=class{},St=new WeakMap,Nt=$(class extends pt{render(s){return d}update(s,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=s.options?.host,this.rt(this.ct=s.element)),d}rt(s){if(this.isConnected||(s=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=St.get(t);e===void 0&&(e=new WeakMap,St.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){return typeof this.G=="function"?St.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var ut=s=>s.replace(Xe,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),Xe=/[A-Z]+(?![a-z])|[A-Z]/gu;var ts="randomUUID"in crypto,Po=()=>{if(ts)return crypto.randomUUID();let s=crypto.getRandomValues(new Uint16Array(8));s[3]=s[3]&4095|16384,s[4]=s[4]&16383|32768;let t=e=>s[e].toString(16).padStart(4,"0");return`${t(0)+t(1)}-${t(2)}-${t(3)}-${t(4)}-${t(5)}${t(6)}${t(7)}`};var Dt=s=>{let t=s;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(s),(e.I??e._postLoad).promise}return!1},Lt={};function Ut(){}function Rt(s){for(let t of["Associated","Disabled","Reset","StateRestore"]){let e=`orm${t}Callback`;s.prototype["f"+e]=async function(...o){await this.componentOnReady(),(this.el??this).dispatchEvent(new CustomEvent(`luminaF${e}`,{detail:o}))}}}var es=(s,t)=>function(o,n){if(!globalThis.customElements)return;let i=(n??o??{}).resourcesUrl;i&&s.setAssetPath(i);for(let[a,[c,l="",u=0]]of Object.entries(t)){if(customElements.get(a))continue;let[h,m,v]=l.split(";"),C=h?h?.split(",").map(ss):void 0,gt=C?.map(([D])=>D),J=class extends xt{static{this.formAssociated=u===1}static{this.observedAttributes=C?.map(([,D])=>D).filter(D=>D!=="")}static{this.C=gt}static{this.E=m?m?.split(","):void 0}static{this.D=v?.split(",")}static{this.L=a}static{this.K=s}constructor(){!J.B&&(J.B=c(),J.F()),super()}};customElements.define(a,J)}},ft=Object.defineProperty,ss=s=>{let t=s.split(":");return t.length===1?[t[0],ut(t[0])]:t},os=globalThis.HTMLElement??Ut,xt=class extends os{constructor(){super(),this.#e={},this.#s=[],this.I=new b,this.H=new b,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(o=>{Object.hasOwn(t,o)&&(t.#e[o]=t[o],delete t[o])}),e.A?t.#n({a:e.A}):e.B.then(async o=>{await e.K.p,t.#n(await(o.default?.then(n=>typeof n=="function"?{a:n}:n)??o))}).catch(o=>{t.H.reject(o),setTimeout(()=>{throw o})})}static{this.lumina=!0}static F(){for(let t of this.C??[])ft(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])ft(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])ft(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}static{Rt(this)}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,o){this.#t?.attributeChangedCallback(t,e,o),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=Dt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#n(t){let e=this.constructor,o=e.L,n=this.#e,r=Object.values(t).find(h=>h.L===o),i=`${o}--lazy`,a=r;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);rs(a),!e.A&&(e.A=r,customElements.define(i,r)),r.N=this;let l=document.createElement(i);r.N=void 0,this.#t=l,this.#e=l,this.#s.forEach(h=>l.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(n).forEach(ns,l);let u=this.isConnected;(u||this.G)&&(l.connectedCallback?.(),u||l.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function ns([s,t]){this[s]=t}var rs=s=>{let t=s.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(n,r){e.setAttribute.call(this.el,n,r)},t.removeAttribute=function(n){e.removeAttribute.call(this.el,n)},t.hasAttribute=function(n){return e.hasAttribute.call(this.el,n)},ft(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var mt=class extends pe{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=yt in t&&typeof t.destroy=="function",E.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${yt} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),I();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),x(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>{this.#e.destroy()};this.#t=ce(t,is)}}S(t,e){let o=this.T;this.V=d,this.T=[],o.forEach(n=>n(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},is=1e3,yt="autoDestroyDisabled";var ve=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="class"||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(let o in t)t[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(t)}let e=s.element.classList;for(let o of this.st)o in t||(e.remove(o),this.st.delete(o));for(let o in t){let n=!!t[o];n===this.st.has(o)||this.nt?.has(o)||(n?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return f}});var Ee="important",as=" !"+Ee,$e=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="style"||s.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce((t,e)=>{let o=s[e];return o==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(s,[t]){let{style:e}=s.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let o of this.ft)t[o]==null&&(this.ft.delete(o),o.includes("-")?e.removeProperty(o):e[o]=null);for(let o in t){let n=t[o];if(n!=null){this.ft.add(o);let r=typeof n=="string"&&n.endsWith(as);o.includes("-")||r?e.setProperty(o,r?n.slice(0,-11):n,r?Ee:""):e[o]=n}}return f}});var be=class s extends E{constructor(){super(),this.M=[],this.manager=new mt(this);let t=this,e=t.constructor,o=e.N,n=e.K.o,r=s.prototype.shouldUpdate;t.#n=o?.H??new b,t.I=o?.I??new b,t.J=o?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=o??t,t.#s=t.enableUpdating,t.enableUpdating=Ut,t.shouldUpdate!==r&&(t.#e=t.shouldUpdate,t.shouldUpdate=r),n&&(t.#t=new Map,e.elementProperties.forEach((i,a)=>t.#t.set(a,n()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),o=this.shadowRootOptions===Lt;return this.K?.commonStyles===void 0||o?e:[this.K.commonStyles,...e]}static createProperty(t,e){let o=typeof e=="number"?e:Array.isArray(e)?e[0]:0,n=Array.isArray(e)?e[1]:void 0,r=n?.hasChanged??j,i={attribute:o&1&&typeof t=="string"?ut(t):!1,reflect:!!(o&2),type:o&4?Boolean:o&8?Number:void 0,state:!!(o&16),readOnly:!!(o&32),noAccessor:!!(o&64),useDefault:!!(o&128),c:!1,...n,hasChanged(a,c){let l=r(a,c);return i.c=l,l}};super.createProperty(t,i)}static getPropertyDescriptor(t,e,o){let n=this.K,r=super.getPropertyDescriptor(t,e,o);return o.d=r,{...r,get(){return n.t?.(this.#t.get(t)),r.get?.call(this)},set(i){let a=this.manager;if(o.readOnly&&!ct&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${i}"`);r.set.call(this,i??void 0),o.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(I(),a?.S(t,i))}}}static{this.lumina=!0}static{Rt(this)}#t;#e;#s;#n;#r;#c;get elementInternals(){return this.#c??=this.el.attachInternals(),this.#c}connectedCallback(){this.hasAttribute("defer-hydration")||this.#l(!0)}#l(t){let e=this.constructor.K.c?.(()=>this.requestUpdate());this.#r=e;let o=!this.manager.connectedCalled;t&&super.connectedCallback(),o?queueMicrotask(()=>this.#i().catch(n=>{this.#n.reject(n),setTimeout(()=>{throw n})})):e&&this.requestUpdate()}#d(t){try{this.#r.clear(),this.constructor.K.r(this.#r,()=>super.update(t))}catch(e){throw this.#r.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#r?.destroy(),this.#r=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,o=e.shadowRootOptions,r=t??(o===Lt?this.el:this.el.attachShadow(o));if(t)return this.manager.connectedCalled||this.#l(!1),E.prototype.createRenderRoot.call(this),t;if(this.isConnected){let i=r.getRootNode();i.adoptedStyleSheets=[...i.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return r}async#i(){let t=this.el.G??Dt(this.el);t&&await t;let e=[];for(let n of this.M)"triggerLoad"in n?e.push(n.triggerLoad()):e.push(W(n.hostLoad,n));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(n=>n.has(yt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await 0;let o=this.J.filter(n=>!n.manager?.loadedCalled);o.length&&await Promise.allSettled(o.map(async n=>await n.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let n of this.M)"triggerLoaded"in n?n.triggerLoaded():p(n.hostLoaded,n);this.loaded?.(),this.#n.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#r?this.#d(t):super.update(t)}listen(t,e,o){let n=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,n,o),()=>this.el.removeEventListener(t,n,o)))}listenOn(t,e,o,n){let r=o?.bind(this)??o;this.manager.onLifecycle(()=>(t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)))}async componentOnReady(){return await this.#n.promise,this}addController(t){this.M.push(t),!(q in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var _e=s=>{let t,e=n=>{t=new URL(n,globalThis.location?.href||void 0).href},o={...s,getAssetPath(n){let r=new URL(n,t);return r.origin!==globalThis.location?.origin?r.href:r.pathname},setAssetPath:e,customElement(n,r){r.K=o,r.L=n,customElements.get(n)||customElements.define(n,r)}};return e(s.defaultAssetPath),o};var Ln=s=>typeof s=="object"&&s!=null?ve(s):s,Un=s=>typeof s=="object"&&s!=null?$e(s):s;var It=class extends g{#t;#e;constructor(t){super(t);let e=this;this.#e=function(n){return e.#t.call(this,n)}}render(t){return typeof t=="function"?(this.#t=t,Nt(this.#e)):Nt(t)}},Rn=$(It);var In=d;var Mn=s=>{let t=document.createElement("div");return at(s,t),t.firstElementChild};var Q=_e({defaultAssetPath:"https://jsdev.arcgis.com/5.2.0-next/portal-components/",hydratedAttribute:"hydrated"}),{customElement:Vn,getAssetPath:Bn,setAssetPath:Wn}=Q;Q.t=void 0;Q.o=void 0;Q.c=void 0;Q.r=void 0;export{Is as a,x as b,G as c,ne as d,re as e,Ms as f,ks as g,Ce as h,j as i,ys as j,f as k,d as l,at as m,b as n,xs as o,oe as p,Ds as q,Ls as r,Ve as s,Be as t,We as u,Fe as v,Tt as w,pe as x,Po as y,es as z,y as A,$ as B,g as C,Js as D,Ys as E,me as F,Zs as G,Xs as H,Ke as I,yo as J,Nt as K,be as L,Ln as M,Un as N,In as O,Mn as P,Q,Vn as R,Bn as S};
4
+ \f\r"'\`<>=]|("|')|))|$)`,"g"),qt=/'/g,Gt=/"/g,Jt=/^(?:script|style|textarea|title)$/i,wt=s=>(t,...e)=>({_$litType$:s,strings:t,values:e}),ys=wt(1),gs=wt(2),vs=wt(3),f=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),Kt=new WeakMap,O=T.createTreeWalker(T,129);function Yt(s,t){if(!Ct(s)||!s.hasOwnProperty("raw"))throw Error("invalid template strings array");return Bt!==void 0?Bt.createHTML(t):t}var Zt=(s,t)=>{let e=s.length-1,o=[],n,r=t===2?"<svg>":t===3?"<math>":"",i=H;for(let a=0;a<e;a++){let c=s[a],l,u,h=-1,m=0;for(;m<c.length&&(i.lastIndex=m,u=i.exec(c),u!==null);)m=i.lastIndex,i===H?u[1]==="!--"?i=Wt:u[1]!==void 0?i=Ft:u[2]!==void 0?(Jt.test(u[2])&&(n=RegExp("</"+u[2],"g")),i=w):u[3]!==void 0&&(i=w):i===w?u[0]===">"?(i=n??H,h=-1):u[1]===void 0?h=-2:(h=i.lastIndex-u[2].length,l=u[1],i=u[3]===void 0?w:u[3]==='"'?Gt:qt):i===Gt||i===qt?i=w:i===Wt||i===Ft?i=H:(i=w,n=void 0);let v=i===w&&s[a+1].startsWith("/>")?" ":"";r+=i===H?c+Le:h>=0?(o.push(l),c.slice(0,h)+At+c.slice(h)+_+v):c+_+(h===-2?a:v)}return[Yt(s,r+(s[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),o]},B=class s{constructor({strings:t,_$litType$:e},o){let n;this.parts=[];let r=0,i=0,a=t.length-1,c=this.parts,[l,u]=Zt(t,e);if(this.el=s.createElement(l,o),O.currentNode=this.el.content,e===2||e===3){let h=this.el.content.firstChild;h.replaceWith(...h.childNodes)}for(;(n=O.nextNode())!==null&&c.length<a;){if(n.nodeType===1){if(n.hasAttributes())for(let h of n.getAttributeNames())if(h.endsWith(At)){let m=u[i++],v=n.getAttribute(h).split(_),C=/([.?@])?(.*)/.exec(m);c.push({type:1,index:r,name:C[2],strings:v,ctor:C[1]==="."?ot:C[1]==="?"?nt:C[1]==="@"?rt:P}),n.removeAttribute(h)}else h.startsWith(_)&&(c.push({type:6,index:r}),n.removeAttribute(h));if(Jt.test(n.tagName)){let h=n.textContent.split(_),m=h.length-1;if(m>0){n.textContent=et?et.emptyScript:"";for(let v=0;v<m;v++)n.append(h[v],z()),O.nextNode(),c.push({type:2,index:++r});n.append(h[m],z())}}}else if(n.nodeType===8)if(n.data===_t)c.push({type:2,index:r});else{let h=-1;for(;(h=n.data.indexOf(_,h+1))!==-1;)c.push({type:7,index:r}),h+=_.length-1}r++}}static createElement(t,e){let o=T.createElement("template");return o.innerHTML=t,o}};function S(s,t,e=s,o){if(t===f)return t;let n=o!==void 0?e._$Co?.[o]:e._$Cl,r=V(t)?void 0:t._$litDirective$;return n?.constructor!==r&&(n?._$AO?.(!1),r===void 0?n=void 0:(n=new r(s),n._$AT(s,e,o)),o!==void 0?(e._$Co??=[])[o]=n:e._$Cl=n),n!==void 0&&(t=S(s,n._$AS(s,t.values),n,o)),t}var st=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:o}=this._$AD,n=(t?.creationScope??T).importNode(e,!0);O.currentNode=n;let r=O.nextNode(),i=0,a=0,c=o[0];for(;c!==void 0;){if(i===c.index){let l;c.type===2?l=new L(r,r.nextSibling,this,t):c.type===1?l=new c.ctor(r,c.name,c.strings,this,t):c.type===6&&(l=new it(r,this,t)),this._$AV.push(l),c=o[++a]}i!==c?.index&&(r=O.nextNode(),i++)}return O.currentNode=T,n}p(t){let e=0;for(let o of this._$AV)o!==void 0&&(o.strings!==void 0?(o._$AI(t,o,e),e+=o.strings.length-2):o._$AI(t[e])),e++}},L=class s{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,o,n){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=o,this.options=n,this._$Cv=n?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),V(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==f&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Qt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&V(this._$AH)?this._$AA.nextSibling.data=t:this.T(T.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:o}=t,n=typeof o=="number"?this._$AC(t):(o.el===void 0&&(o.el=B.createElement(Yt(o.h,o.h[0]),this.options)),o);if(this._$AH?._$AD===n)this._$AH.p(e);else{let r=new st(n,this),i=r.u(this.options);r.p(e),this.T(i),this._$AH=r}}_$AC(t){let e=Kt.get(t.strings);return e===void 0&&Kt.set(t.strings,e=new B(t)),e}k(t){Ct(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,o,n=0;for(let r of t)n===e.length?e.push(o=new s(this.O(z()),this.O(z()),this,this.options)):o=e[n],o._$AI(r),n++;n<e.length&&(this._$AR(o&&o._$AB.nextSibling,n),e.length=n)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let o=Vt(t).nextSibling;Vt(t).remove(),t=o}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},P=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,o,n,r){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=n,this.options=r,o.length>2||o[0]!==""||o[1]!==""?(this._$AH=Array(o.length-1).fill(new String),this.strings=o):this._$AH=d}_$AI(t,e=this,o,n){let r=this.strings,i=!1;if(r===void 0)t=S(this,t,e,0),i=!V(t)||t!==this._$AH&&t!==f,i&&(this._$AH=t);else{let a=t,c,l;for(t=r[0],c=0;c<r.length-1;c++)l=S(this,a[o+c],e,c),l===f&&(l=this._$AH[c]),i||=!V(l)||l!==this._$AH[c],l===d?t=d:t!==d&&(t+=(l??"")+r[c+1]),this._$AH[c]=l}i&&!n&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},ot=class extends P{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},nt=class extends P{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},rt=class extends P{constructor(t,e,o,n,r){super(t,e,o,n,r),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??d)===f)return;let o=this._$AH,n=t===d&&o!==d||t.capture!==o.capture||t.once!==o.once||t.passive!==o.passive,r=t!==d&&(o===d||n);n&&this.element.removeEventListener(this.name,this,o),r&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},it=class{constructor(t,e,o){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=o}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}},Xt={M:At,P:_,A:_t,C:1,L:Zt,R:st,D:Qt,V:S,I:L,H:P,N:nt,U:rt,B:ot,F:it},Ue=bt.litHtmlPolyfillSupport;Ue?.(B,L),(bt.litHtmlVersions??=[]).push("3.3.2");var at=(s,t,e)=>{let o=e?.renderBefore??t,n=o._$litPart$;if(n===void 0){let r=e?.renderBefore??null;o._$litPart$=n=new L(t.insertBefore(z(),r),r,void 0,e??{})}return n._$AI(s),n};var Ot=globalThis,E=class extends A{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=at(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return f}};E._$litElement$=!0,E.finalized=!0,Ot.litElementHydrateSupport?.({LitElement:E});var Re=Ot.litElementPolyfillSupport;Re?.({LitElement:E});(Ot.litElementVersions??=[]).push("4.2.2");var te=new Set,ee;var se=s=>typeof s=="string"?s:"el"in s?s.el.localName:"localName"in s?s.localName:s.declaredClass,xs=(s,t,e,o)=>{let n=se(t);if(o?.once){let i=`${s}${n}${e}`;if(te.has(i))return;te.add(i)}let r;if(o?.detail){r={};for(let[i,a]of Object.entries(o.detail))if((typeof a=="object"||typeof a=="function")&&a!==null){let c=new WeakRef(a);Object.defineProperty(r,i,{enumerable:!0,get(){return c.deref()}})}else r[i]=a;ee?.log.interceptors?.forEach(i=>i(s,n,e,r)),console[s](`[${n}]: ${e}`,r)}else ee?.log.interceptors?.forEach(i=>i(s,n,e)),console[s](`[${n}]: ${e}`)},oe=s=>{let t=`[${se(s)}] `;return e=>{let o=e instanceof Error&&e.message?e:new Error(String(e));o.message=`${t}${o.message}`,setTimeout(()=>{throw e})}},Ds=s=>`The property \`${s.toString()}\` is required but missing.`,Ls=s=>`The property \`${s.toString()}\` is empty but must have at least one element.`;var p=(s,t,...e)=>{try{return s?.call(t,...e)}catch(o){console.error(o,s)}},W=async(s,t,...e)=>{try{return await s?.call(t,...e)}catch(o){console.error(o,s)}};var q=Symbol.for("controller"),Ie=s=>typeof s=="object"&&s!==null&&(q in s||"hostConnected"in s||"hostDisconnected"in s||"hostUpdate"in s||"hostUpdated"in s),Is=s=>typeof s?.then=="function";var F,x=s=>{F!==s&&(F=s,queueMicrotask(()=>F===s?F=void 0:0))},G=s=>F,N=[],ne=s=>{if(s===void 0){N=[];return}let t=N.indexOf(s);N=t===-1?[...N,s]:N.slice(0,t+1),queueMicrotask(()=>N=[])},re=()=>N,U,Ms=s=>{U!==s&&(U=s,queueMicrotask(()=>U===s?U=void 0:0))},Me=()=>{let s=U;return U=void 0,s},ie=async(s,t)=>{let e=lt(s);if(e===void 0)return s;if(await e.ready,typeof t=="function"){let o=e.watchExports(n=>t(n,o))}return e.exports},ae=async s=>{let t=lt(s);return await t.ready,t},lt=s=>{let e=G().manager.X(s);if(e!==void 0)return e;if(Ie(s))return s;let o=Me();if(o!==void 0)return o},ct=!1,ks=s=>{ct=!0;try{return s()}finally{ct=!1}};var b=class{constructor(){this.promise=new Promise((t,e)=>{this.resolve=t,this.reject=e})}};var ce=(s,t)=>{let e=t>ke?je:t/He,o=0,n=setInterval(()=>{o+=e,o>=t&&(clearInterval(n),s())},e);return n},ke=4e3,je=2e3,He=4;var ze=(s,t,e)=>{let o=Object.keys(s),n=o.length;R===void 0&&queueMicrotask(I),R??=new Map;let r=R.get(s);return r===void 0&&(r={callbacks:[],keyCount:n},R.set(s,r)),r.keyCount!==n&&(r.callbacks.forEach(i=>i(o)),r.callbacks=[],r.keyCount=n),r.callbacks.push(i=>{let a=l=>p(t,null,l),c=i[n];c===void 0?a(void 0):s[c]===e?a(c):a(void 0)}),e},R,I=()=>{R?.forEach(({callbacks:s},t)=>{let e=Object.keys(t);s.forEach(o=>o(e))}),R=void 0},Ve=(s,t,e)=>{let o=s.manager;return o.V!==d&&o.V!==e&&o.S(void 0,void 0),o.T.length===0&&queueMicrotask(()=>o.S(void 0,void 0)),o.V=e,o.T.push((n,r)=>p(t,void 0,e===r?n:void 0)),e},Be=(s=[G(),...re()],t,e)=>{let o=Array.isArray(s)?s:[s],n=o.length+1,r=i=>{n-=1,i!==void 0&&(n=Math.min(n,0)),n===0&&t(i)};o.forEach(i=>ze(i,a=>r(a===void 0?void 0:{key:a,host:i,isReactive:!1}),e));for(let i of o)if("manager"in i&&i.manager.component===i){Ve(i,a=>r(a===void 0?void 0:{key:a,host:i,isReactive:!0}),e);break}return e},We=(s="",t={},e=G())=>{let o={emit:n=>{s===""&&I();let r=new CustomEvent(s,{detail:n,cancelable:!0,bubbles:!0,composed:!0,...t});return e.el.dispatchEvent(r),r}};return s===""&&Be(void 0,n=>s=n.key,o),o},Fe=We.bind(null,""),de;de=q;var Tt=class{constructor(t){this.#t=[],this.#e=[],this.#s=[],this.#n=[],this.#r=[],this.#c=[],this.#l=[],this.#d=[],this.#i=[],this.#p=!1,this.P=new b,this.connectedCalled=!1,this.loadedCalled=!1,this[de]=!0,this.#h=[];let e=this,o=t??G(new.target.name);e.#o=o,e.ready=e.P.promise,e.#a=he(e),e.component=o,e.#o.addController(e),e.#o.manager===void 0||(ne(e),queueMicrotask(()=>e.catchUpLifecycle()))}#t;#e;#s;#n;#r;#c;#l;#d;#i;#p;#o;catchUpLifecycle(){let{manager:t}=this.#o;t.connectedCalled&&!this.connectedCalled&&this.triggerConnected(),t.#p&&this.triggerLoad().then(()=>t.loadedCalled&&this.triggerLoaded()).catch(oe(this.#o))}#a;get exports(){return this.#a}set exports(t){let e=this.#a;e!==t&&(this.#a=t,this.#h.forEach(p),this.connectedCalled&&this.O!==!1&&this.#o.requestUpdate(this.O,e)),this.P.resolve(t)}setProvisionalExports(t,e=!0){this.#a=e?he(t):t,this.#h.forEach(p)}#h;watchExports(t){let e=()=>t(this.#a);return this.#h.push(e),()=>{this.#h.splice(this.#h.indexOf(e),1)}}get use(){return x(this.#o),ie}get useRef(){return x(this.#o),ae}get useRefSync(){return x(this.#o),lt}controllerRemoved(){this.#o.el.isConnected&&this.triggerDisconnected(),this.triggerDestroy()}onConnected(t){this.#t.push(t)}onDisconnected(t){this.#e.push(t)}onLoad(t){this.#s.push(t)}onLoaded(t){this.#n.push(t)}onUpdate(t){this.#r.push(t)}onUpdated(t){this.#c.push(t)}onDestroy(t){this.#l.push(t)}onLifecycle(t){this.#d.push(t),this.connectedCalled&&this.#o.el.isConnected&&this.#u(t)}triggerConnected(){let t=this;t.hostConnected&&p(t.hostConnected,t),t.#t.forEach(p),t.triggerLifecycle(),t.connectedCalled=!0}triggerDisconnected(){let t=this;t.hostDisconnected&&p(t.hostDisconnected,t),t.#e.forEach(p),t.#i.forEach(p),t.#i=[]}async triggerLoad(){if(this.#p)return;this.#p=!0;let t=this;t.hostLoad&&await W(t.hostLoad,t),this.#s.length>0&&await Promise.allSettled(this.#s.map(W)),this.P.resolve(this.#a)}triggerLoaded(){this.loadedCalled||(this.hostLoaded&&p(this.hostLoaded,this),this.#n.forEach(p),this.loadedCalled=!0)}triggerUpdate(t){this.hostUpdate&&p(this.hostUpdate,this,t),this.#r.forEach(le,t)}triggerUpdated(t){this.hostUpdated&&p(this.hostUpdated,this,t),this.#c.forEach(le,t)}triggerDestroy(){this.hostDestroy&&p(this.hostDestroy,this),this.#l.forEach(p)}triggerLifecycle(){this.hostLifecycle&&this.#u(()=>this.hostLifecycle()),this.#d.forEach(this.#u,this)}#u(t){x(this.#o);let e=p(t);(Array.isArray(e)?e:[e]).forEach(n=>{typeof n=="function"?this.#i.push(n):typeof n=="object"&&typeof n.remove=="function"&&this.#i.push(n.remove)})}};function le(s){p(s,void 0,this)}var he=s=>{if(typeof s!="object"&&typeof s!="function"||s===null)return s;let t={get(o,n,r){if(!((n==="exports"||n==="_exports")&&n in o&&o[n]===e)&&(n in o||n in Promise.prototype||typeof n=="symbol"))return typeof o=="function"?o[n]:Reflect.get(o,n,r)}},e=new Proxy(s,t);return e};var pe=Tt;var y={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},$=s=>(...t)=>({_$litDirective$:s,values:t}),g=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,o){this._$Ct=t,this._$AM=e,this._$Ci=o}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var{I:qe}=Xt,ue=s=>s;var ht=s=>s.strings===void 0,fe=()=>document.createComment(""),Js=(s,t,e)=>{let o=s._$AA.parentNode,n=t===void 0?s._$AB:t._$AA;if(e===void 0){let r=o.insertBefore(fe(),n),i=o.insertBefore(fe(),n);e=new qe(r,i,s,s.options)}else{let r=e._$AB.nextSibling,i=e._$AM,a=i!==s;if(a){let c;e._$AQ?.(s),e._$AM=s,e._$AP!==void 0&&(c=s._$AU)!==i._$AU&&e._$AP(c)}if(r!==n||a){let c=e._$AA;for(;c!==r;){let l=ue(c).nextSibling;ue(o).insertBefore(c,n),c=l}}}return e},Ys=(s,t,e=s)=>(s._$AI(t,e),s),Ge={},me=(s,t=Ge)=>s._$AH=t,Zs=s=>s._$AH,Xs=s=>{s._$AR(),s._$AA.remove()};var Ke=$(class extends g{constructor(s){if(super(s),s.type!==y.PROPERTY&&s.type!==y.ATTRIBUTE&&s.type!==y.BOOLEAN_ATTRIBUTE)throw Error("The `live` directive is not allowed on child or event bindings");if(!ht(s))throw Error("`live` bindings can only contain a single expression")}render(s){return s}update(s,[t]){if(t===f||t===d)return t;let e=s.element,o=s.name;if(s.type===y.PROPERTY){if(t===e[o])return f}else if(s.type===y.BOOLEAN_ATTRIBUTE){if(!!t===e.hasAttribute(o))return f}else if(s.type===y.ATTRIBUTE&&e.getAttribute(o)===t+"")return f;return me(s),t}});var K=(s,t)=>{let e=s._$AN;if(e===void 0)return!1;for(let o of e)o._$AO?.(t,!1),K(o,t);return!0},dt=s=>{let t,e;do{if((t=s._$AM)===void 0)break;e=t._$AN,e.delete(s),s=t}while(e?.size===0)},ye=s=>{for(let t;t=s._$AM;s=t){let e=t._$AN;if(e===void 0)t._$AN=e=new Set;else if(e.has(s))break;e.add(s),Ye(t)}};function Qe(s){this._$AN!==void 0?(dt(this),this._$AM=s,ye(this)):this._$AM=s}function Je(s,t=!1,e=0){let o=this._$AH,n=this._$AN;if(n!==void 0&&n.size!==0)if(t)if(Array.isArray(o))for(let r=e;r<o.length;r++)K(o[r],!1),dt(o[r]);else o!=null&&(K(o,!1),dt(o));else K(this,s)}var Ye=s=>{s.type==y.CHILD&&(s._$AP??=Je,s._$AQ??=Qe)},pt=class extends g{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,o){super._$AT(t,e,o),ye(this),this.isConnected=t._$AU}_$AO(t,e=!0){t!==this.isConnected&&(this.isConnected=t,t?this.reconnected?.():this.disconnected?.()),e&&(K(this,t),dt(this))}setValue(t){if(ht(this._$Ct))this._$Ct._$AI(t,this);else{let e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}};var yo=()=>new Pt,Pt=class{},St=new WeakMap,Nt=$(class extends pt{render(s){return d}update(s,[t]){let e=t!==this.G;return e&&this.G!==void 0&&this.rt(void 0),(e||this.lt!==this.ct)&&(this.G=t,this.ht=s.options?.host,this.rt(this.ct=s.element)),d}rt(s){if(this.isConnected||(s=void 0),typeof this.G=="function"){let t=this.ht??globalThis,e=St.get(t);e===void 0&&(e=new WeakMap,St.set(t,e)),e.get(this.G)!==void 0&&this.G.call(this.ht,void 0),e.set(this.G,s),s!==void 0&&this.G.call(this.ht,s)}else this.G.value=s}get lt(){return typeof this.G=="function"?St.get(this.ht??globalThis)?.get(this.G):this.G?.value}disconnected(){this.lt===this.ct&&this.rt(void 0)}reconnected(){this.rt(this.ct)}});var ut=s=>s.replace(Xe,(t,e)=>`${e===0?"":"-"}${t.toLowerCase()}`),Xe=/[A-Z]+(?![a-z])|[A-Z]/gu;var ts="randomUUID"in crypto,Po=()=>{if(ts)return crypto.randomUUID();let s=crypto.getRandomValues(new Uint16Array(8));s[3]=s[3]&4095|16384,s[4]=s[4]&16383|32768;let t=e=>s[e].toString(16).padStart(4,"0");return`${t(0)+t(1)}-${t(2)}-${t(3)}-${t(4)}-${t(5)}${t(6)}${t(7)}`};var Dt=s=>{let t=s;for(;t=t.parentNode??t.host;)if(t?.constructor?.lumina){let e=t;return e.manager?.loadedCalled||(e.J??e._offspring).push(s),(e.I??e._postLoad).promise}return!1},Lt={};function Ut(){}function Rt(s){for(let t of["Associated","Disabled","Reset","StateRestore"]){let e=`orm${t}Callback`;s.prototype["f"+e]=async function(...o){await this.componentOnReady(),(this.el??this).dispatchEvent(new CustomEvent(`luminaF${e}`,{detail:o}))}}}var es=(s,t)=>function(o,n){if(!globalThis.customElements)return;let i=(n??o??{}).resourcesUrl;i&&s.setAssetPath(i);for(let[a,[c,l="",u=0]]of Object.entries(t)){if(customElements.get(a))continue;let[h,m,v]=l.split(";"),C=h?h?.split(",").map(ss):void 0,gt=C?.map(([D])=>D),J=class extends xt{static{this.formAssociated=u===1}static{this.observedAttributes=C?.map(([,D])=>D).filter(D=>D!=="")}static{this.C=gt}static{this.E=m?m?.split(","):void 0}static{this.D=v?.split(",")}static{this.L=a}static{this.K=s}constructor(){!J.B&&(J.B=c(),J.F()),super()}};customElements.define(a,J)}},ft=Object.defineProperty,ss=s=>{let t=s.split(":");return t.length===1?[t[0],ut(t[0])]:t},os=globalThis.HTMLElement??Ut,xt=class extends os{constructor(){super(),this.#e={},this.#s=[],this.I=new b,this.H=new b,this.J=[];let t=this,e=t.constructor;t._offspring=t.J,t._postLoad=t.I,e.C?.forEach(o=>{Object.hasOwn(t,o)&&(t.#e[o]=t[o],delete t[o])}),e.A?t.#n({a:e.A}):e.B.then(async o=>{await e.K.p,t.#n(await(o.default?.then(n=>typeof n=="function"?{a:n}:n)??o))}).catch(o=>{t.H.reject(o),setTimeout(()=>{throw o})})}static{this.lumina=!0}static F(){for(let t of this.C??[])ft(this.prototype,t,{configurable:!0,enumerable:!0,get(){return this.#e[t]},set(e){this.#e[t]=e}});for(let t of this.E??[])ft(this.prototype,t,{async value(...e){return this.#t||await this.H.promise,await this.#t[t](...e)},configurable:!0});for(let t of this.D??[])ft(this.prototype,t,{value(...e){return this.#t[t](...e)},configurable:!0})}static{Rt(this)}#t;#e;#s;get manager(){return this.#t?.manager}attributeChangedCallback(t,e,o){this.#t?.attributeChangedCallback(t,e,o),this.#t||this.#s.push(t)}connectedCallback(){this.#t?this.#t.connectedCallback?.():queueMicrotask(()=>this.G=Dt(this))}disconnectedCallback(){this.#t?.disconnectedCallback?.()}async componentOnReady(){return await this.H.promise,this}#n(t){let e=this.constructor,o=e.L,n=this.#e,r=Object.values(t).find(h=>h.L===o),i=`${o}--lazy`,a=r;for(;a&&!Object.hasOwn(a,"lumina");)a=Object.getPrototypeOf(a);rs(a),!e.A&&(e.A=r,customElements.define(i,r)),r.N=this;let l=document.createElement(i);r.N=void 0,this.#t=l,this.#e=l,this.#s.forEach(h=>l.attributeChangedCallback(h,null,this.getAttribute(h))),Object.entries(n).forEach(ns,l);let u=this.isConnected;(u||this.G)&&(l.connectedCallback?.(),u||l.disconnectedCallback())}addController(){}requestUpdate(){this.#t?.requestUpdate()}};function ns([s,t]){this[s]=t}var rs=s=>{let t=s.prototype,e=Element.prototype;Object.hasOwn(t,"isConnected")||(t.setAttribute=function(n,r){e.setAttribute.call(this.el,n,r)},t.removeAttribute=function(n){e.removeAttribute.call(this.el,n)},t.hasAttribute=function(n){return e.hasAttribute.call(this.el,n)},ft(t,"isConnected",{get(){return Reflect.get(e,"isConnected",this.el)}}))};var mt=class extends pe{constructor(t){super(t),this.destroyed=!1,this.R=!1,this.V=d,this.T=[],this.#s=new WeakMap,this.#e=t,this.exports=void 0,this.hasDestroy=yt in t&&typeof t.destroy=="function",E.prototype.addController.call(t,{hostConnected:()=>{if(this.destroyed){let e=t.el.localName;throw t.el.remove(),new Error(`The ${e} component has already been destroyed. It cannot be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the ${yt} prop.`)}this.#t!==void 0&&clearTimeout(this.#t),I();for(let e of t.M)"triggerConnected"in e?e.triggerConnected():p(e.hostConnected,e)},hostDisconnected:()=>{for(let e of t.M)"triggerDisconnected"in e?e.triggerDisconnected():p(e.hostDisconnected,e);this.hasDestroy&&!this.destroyed&&this.U()},hostUpdate:()=>{for(let e of t.M)"triggerUpdate"in e?e.triggerUpdate(this.Q):p(e.hostUpdate,e,this.Q)},hostUpdated:()=>{for(let e of t.M)"triggerUpdated"in e?e.triggerUpdated(this.Q):p(e.hostUpdated,e,this.Q);this.Q=void 0}}),queueMicrotask(()=>this.R=!0),x(t)}#t;#e;async destroy(){if(!this.destroyed){this.#e.el.isConnected&&(this.hasDestroy=!1,this.#e.el.remove()),this.#t=void 0,this.destroyed=!0;for(let t of this.#e.M)"triggerDestroy"in t?t.triggerDestroy():p(t.hostDestroy,t);this.#e.M.splice(0)}}U(){if(this.#t!==void 0&&clearTimeout(this.#t),!this.#e.el.isConnected&&!this.#e.autoDestroyDisabled){let t=()=>{this.#e.destroy()};this.#t=ce(t,is)}}S(t,e){let o=this.T;this.V=d,this.T=[],o.forEach(n=>n(t,e))}#s;W(t,e){(typeof e=="object"&&e!==null||typeof e=="function")&&this.#s.set(e,t)}X(t){if(typeof t=="object"&&t!==null||typeof t=="function")return this.#s.get(t)}},is=1e3,yt="autoDestroyDisabled";var ve=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="class"||s.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(s){return" "+Object.keys(s).filter(t=>s[t]).join(" ")+" "}update(s,[t]){if(this.st===void 0){this.st=new Set,s.strings!==void 0&&(this.nt=new Set(s.strings.join(" ").split(/\s/).filter(o=>o!=="")));for(let o in t)t[o]&&!this.nt?.has(o)&&this.st.add(o);return this.render(t)}let e=s.element.classList;for(let o of this.st)o in t||(e.remove(o),this.st.delete(o));for(let o in t){let n=!!t[o];n===this.st.has(o)||this.nt?.has(o)||(n?(e.add(o),this.st.add(o)):(e.remove(o),this.st.delete(o)))}return f}});var Ee="important",as=" !"+Ee,$e=$(class extends g{constructor(s){if(super(s),s.type!==y.ATTRIBUTE||s.name!=="style"||s.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(s){return Object.keys(s).reduce((t,e)=>{let o=s[e];return o==null?t:t+`${e=e.includes("-")?e:e.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${o};`},"")}update(s,[t]){let{style:e}=s.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(t)),this.render(t);for(let o of this.ft)t[o]==null&&(this.ft.delete(o),o.includes("-")?e.removeProperty(o):e[o]=null);for(let o in t){let n=t[o];if(n!=null){this.ft.add(o);let r=typeof n=="string"&&n.endsWith(as);o.includes("-")||r?e.setProperty(o,r?n.slice(0,-11):n,r?Ee:""):e[o]=n}}return f}});var be=class s extends E{constructor(){super(),this.M=[],this.manager=new mt(this);let t=this,e=t.constructor,o=e.N,n=e.K.o,r=s.prototype.shouldUpdate;t.#n=o?.H??new b,t.I=o?.I??new b,t.J=o?.J??[],t._offspring=t.J,t._postLoad=t.I,t.el=o??t,t.#s=t.enableUpdating,t.enableUpdating=Ut,t.shouldUpdate!==r&&(t.#e=t.shouldUpdate,t.shouldUpdate=r),n&&(t.#t=new Map,e.elementProperties.forEach((i,a)=>t.#t.set(a,n()))),!1}static finalizeStyles(t){let e=super.finalizeStyles(t),o=this.shadowRootOptions===Lt;return this.K?.commonStyles===void 0||o?e:[this.K.commonStyles,...e]}static createProperty(t,e){let o=typeof e=="number"?e:Array.isArray(e)?e[0]:0,n=Array.isArray(e)?e[1]:void 0,r=n?.hasChanged??j,i={attribute:o&1&&typeof t=="string"?ut(t):!1,reflect:!!(o&2),type:o&4?Boolean:o&8?Number:void 0,state:!!(o&16),readOnly:!!(o&32),noAccessor:!!(o&64),useDefault:!!(o&128),c:!1,...n,hasChanged(a,c){let l=r(a,c);return i.c=l,l}};super.createProperty(t,i)}static getPropertyDescriptor(t,e,o){let n=this.K,r=super.getPropertyDescriptor(t,e,o);return o.d=r,{...r,get(){return n.t?.(this.#t.get(t)),r.get?.call(this)},set(i){let a=this.manager;if(o.readOnly&&!ct&&(a.R||a.connectedCalled))throw Error(`Cannot assign to read-only property "${t}" of ${this.el.localName}. Trying to assign "${i}"`);r.set.call(this,i??void 0),o.c&&this.#t?.get(t)?.notify(),a.T.length>0&&(I(),a?.S(t,i))}}}static{this.lumina=!0}static{Rt(this)}#t;#e;#s;#n;#r;#c;get elementInternals(){return this.#c??=this.el.attachInternals(),this.#c}connectedCallback(){this.hasAttribute("defer-hydration")||this.#l(!0)}#l(t){let e=this.constructor.K.c?.(()=>this.requestUpdate());this.#r=e;let o=!this.manager.connectedCalled;t&&super.connectedCallback(),o?queueMicrotask(()=>this.#i().catch(n=>{this.#n.reject(n),setTimeout(()=>{throw n})})):e&&this.requestUpdate()}#d(t){try{this.#r.clear(),this.constructor.K.r(this.#r,()=>super.update(t))}catch(e){throw this.#r.clear(),e}}disconnectedCallback(){super.disconnectedCallback(),this.#r?.destroy(),this.#r=void 0}createRenderRoot(){let t=this.el.shadowRoot,e=this.constructor,o=e.shadowRootOptions,r=t??(o===Lt?this.el:this.el.attachShadow(o));if(t)return this.manager.connectedCalled||this.#l(!1),E.prototype.createRenderRoot.call(this),t;if(this.isConnected){let i=r.getRootNode();i.adoptedStyleSheets=[...i.adoptedStyleSheets,...e.elementStyles.map(a=>"styleSheet"in a?a.styleSheet:a)]}return r}async#i(){let t=this.el.G??Dt(this.el);t&&await t;let e=[];for(let n of this.M)"triggerLoad"in n?e.push(n.triggerLoad()):e.push(W(n.hostLoad,n));await Promise.all(e),await this.load?.(),this.manager.hasDestroy&&this.manager.onUpdate(n=>n.has(yt)&&this.manager.U()),this.#s(!0),this.performUpdate(),this.I.resolve(),await 0;let o=this.J.filter(n=>!n.manager?.loadedCalled);o.length&&await Promise.allSettled(o.map(async n=>await n.componentOnReady())),this.J.length=0,this.el.setAttribute(this.constructor.K.hydratedAttribute,"");for(let n of this.M)"triggerLoaded"in n?n.triggerLoaded():p(n.hostLoaded,n);this.loaded?.(),this.#n.resolve()}shouldUpdate(t){return this.manager.Q=t,this.#e?.(t)??!0}update(t){this.#r?this.#d(t):super.update(t)}listen(t,e,o){let n=e?.bind(this)??e;this.manager.onLifecycle(()=>(this.el.addEventListener(t,n,o),()=>this.el.removeEventListener(t,n,o)))}listenOn(t,e,o,n){let r=o?.bind(this)??o;this.manager.onLifecycle(()=>(t.addEventListener(e,r,n),()=>t.removeEventListener(e,r,n)))}async componentOnReady(){return await this.#n.promise,this}addController(t){this.M.push(t),!(q in t)&&this.renderRoot&&this.el.isConnected&&t.hostConnected?.()}removeController(t){this.M.splice(this.M.indexOf(t),1),t.controllerRemoved?.()}};var _e=s=>{let t,e=n=>{t=new URL(n,globalThis.location?.href||void 0).href},o={...s,getAssetPath(n){let r=new URL(n,t);return r.origin!==globalThis.location?.origin?r.href:r.pathname},setAssetPath:e,customElement(n,r){r.K=o,r.L=n,customElements.get(n)||customElements.define(n,r)}};return e(s.defaultAssetPath),o};var Ln=s=>typeof s=="object"&&s!=null?ve(s):s,Un=s=>typeof s=="object"&&s!=null?$e(s):s;var It=class extends g{#t;#e;constructor(t){super(t);let e=this;this.#e=function(n){return e.#t.call(this,n)}}render(t){return typeof t=="function"?(this.#t=t,Nt(this.#e)):Nt(t)}},Rn=$(It);var In=d;var Mn=s=>{let t=document.createElement("div");return at(s,t),t.firstElementChild};var Q=_e({defaultAssetPath:"https://jsdev.arcgis.com/5.2.0-next/portal-components/",hydratedAttribute:"hydrated"}),{customElement:Vn,getAssetPath:Bn,setAssetPath:Wn}=Q;Q.t=void 0;Q.o=void 0;Q.c=void 0;Q.r=void 0;export{Is as a,x as b,G as c,ne as d,re as e,Ms as f,ks as g,Ce as h,j as i,ys as j,gs as k,f as l,d as m,at as n,b as o,xs as p,oe as q,Ds as r,Ls as s,Ve as t,Be as u,We as v,Fe as w,Tt as x,pe as y,Po as z,es as A,y as B,$ as C,g as D,Js as E,Ys as F,me as G,Zs as H,Xs as I,Ke as J,yo as K,Nt as L,be as M,Ln as N,Un as O,In as P,Mn as Q,Q as R,Vn as S,Bn as T};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as i}from"./6W2IHKCA.js";export default $arcgis.t(([a])=>{function w(e){return e.typeKeywords?.includes("Hosted Service")&&e.type!=="Insights Workbook"&&e.type!=="Insights Data Engineering Workbook"&&e.type!=="Insights Page"}function g(e){return e.typeKeywords?.includes("View Service")}function h(e){return e.typeKeywords?.includes("Service Proxy")&&e.typeKeywords.includes("Geocoding filter")}function v(e){return e.type==="Image Collection"&&e.typeKeywords?.includes("Photo locations")}function p(e){return e?.sourceType==="mosaic-dataset"||e?.serviceSourceType==="esriImageServiceSourceTypeMosaicDataset"}function P(e,t){return e.typeKeywords?.includes("Managed Image Collection")||p(t)&&!e.typeKeywords?.includes("Tiled Imagery")}function I(e,t){return!!((e.sourceJSON?.serviceProperties?.tags||e?.serviceProperties?.tags)?.includes("hasMultidimensions")||t?.hasMultidimensions)}function S(e,t){return c(e,t)||y(e,t)}function c(e,t){return e.owner===t.username}function y(e,t){let r=e.owner,n=e.itemControl==="admin",s=["esri_livingatlas","esri_demographics","esri_boundaries"];return e.portal?.isPortal&&!c(e,t)&&n&&r?.includes("esri_")&&!s.includes(r)?!1:n}var K=(e,t)=>!!t.orgId&&e.every(r=>r.isOrgItem);function j(e){return e.typeKeywords?.includes("Spatiotemporal")}function k(e){return e.typeKeywords?.includes("View Service")}function T(e){return e.typeKeywords?.includes("Hosted Service")}function b(e){return e.typeKeywords?.includes("Multi Services View")}function M(e){return e?.hasViews&&!e.sourceSchemaChangesAllowed}async function $(e){let t=e?.portalItem;if(!t)return await Promise.resolve(null);let r=t.portal;if(r?.user){let n=`${i(r)}community/users/${r.user.username}`;return await a(n,{query:{f:"json",token:t.portal.credential?.token},responseType:"json"}).then(async s=>{let o=s.data?.groups??[];return await Promise.resolve(o)},async()=>await Promise.reject(new Error("Failed to fetch user groups")))}return await Promise.resolve(null)}async function C(e){let t=e?.portalItem;if(!t)return await Promise.resolve(null);let r=t.portal,n=`${i(r)}content/items/${t.id}/groups`;return await a(n,{query:{f:"json",token:t.portal.credential?.token},responseType:"json"}).then(async s=>{let o=s.data?.admin??[],u=s.data?.member??[],l=s.data?.other??[],d=[...o,...u,...l];return await Promise.resolve(d)},async()=>await Promise.reject(new Error("Failed to fetch item groups")))}async function V(e,t,{relationshipType:r,direction:n},s=!1){let o=`${i(t)}content/items/${e}/relatedItems`;return await a(o,{query:{f:"json",relationshipType:r,direction:n,includeRecycleBin:s},responseType:"json"})}function _(e,t){return e?.some(r=>t?.some(n=>r.id===n.id&&r.capabilities.includes("updateitemcontrol")))}return{a:w,b:g,c:h,d:v,e:P,f:I,g:S,h:K,i:j,j:k,k:T,l:b,m:M,n:$,o:C,p:V,q:_}},"request")
2
+ import{c as i}from"./6D3PU4ZT.js";export default $arcgis.t(([a])=>{function w(e){return e.typeKeywords?.includes("Hosted Service")&&e.type!=="Insights Workbook"&&e.type!=="Insights Data Engineering Workbook"&&e.type!=="Insights Page"}function g(e){return e.typeKeywords?.includes("View Service")}function h(e){return e.typeKeywords?.includes("Service Proxy")&&e.typeKeywords.includes("Geocoding filter")}function v(e){return e.type==="Image Collection"&&e.typeKeywords?.includes("Photo locations")}function p(e){return e?.sourceType==="mosaic-dataset"||e?.serviceSourceType==="esriImageServiceSourceTypeMosaicDataset"}function P(e,t){return e.typeKeywords?.includes("Managed Image Collection")||p(t)&&!e.typeKeywords?.includes("Tiled Imagery")}function I(e,t){return!!((e.sourceJSON?.serviceProperties?.tags||e?.serviceProperties?.tags)?.includes("hasMultidimensions")||t?.hasMultidimensions)}function S(e,t){return c(e,t)||y(e,t)}function c(e,t){return e.owner===t.username}function y(e,t){let r=e.owner,n=e.itemControl==="admin",s=["esri_livingatlas","esri_demographics","esri_boundaries"];return e.portal?.isPortal&&!c(e,t)&&n&&r?.includes("esri_")&&!s.includes(r)?!1:n}var K=(e,t)=>!!t.orgId&&e.every(r=>r.isOrgItem);function j(e){return e.typeKeywords?.includes("Spatiotemporal")}function k(e){return e.typeKeywords?.includes("View Service")}function T(e){return e.typeKeywords?.includes("Hosted Service")}function b(e){return e.typeKeywords?.includes("Multi Services View")}function M(e){return e?.hasViews&&!e.sourceSchemaChangesAllowed}async function $(e){let t=e?.portalItem;if(!t)return await Promise.resolve(null);let r=t.portal;if(r?.user){let n=`${i(r)}community/users/${r.user.username}`;return await a(n,{query:{f:"json",token:t.portal.credential?.token},responseType:"json"}).then(async s=>{let o=s.data?.groups??[];return await Promise.resolve(o)},async()=>await Promise.reject(new Error("Failed to fetch user groups")))}return await Promise.resolve(null)}async function C(e){let t=e?.portalItem;if(!t)return await Promise.resolve(null);let r=t.portal,n=`${i(r)}content/items/${t.id}/groups`;return await a(n,{query:{f:"json",token:t.portal.credential?.token},responseType:"json"}).then(async s=>{let o=s.data?.admin??[],u=s.data?.member??[],l=s.data?.other??[],d=[...o,...u,...l];return await Promise.resolve(d)},async()=>await Promise.reject(new Error("Failed to fetch item groups")))}async function V(e,t,{relationshipType:r,direction:n},s=!1){let o=`${i(t)}content/items/${e}/relatedItems`;return await a(o,{query:{f:"json",relationshipType:r,direction:n,includeRecycleBin:s},responseType:"json"})}function _(e,t){return e?.some(r=>t?.some(n=>r.id===n.id&&r.capabilities.includes("updateitemcontrol")))}return{a:w,b:g,c:h,d:v,e:P,f:I,g:S,h:K,i:j,j:k,k:T,l:b,m:M,n:$,o:C,p:V,q:_}},"request")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as R}from"./AXM6XCZD.js";import"./IBP5XPD5.js";import"./D76KMXZD.js";import{J as c,K as d,L as S,M as F,N as V,R as M,h as C,j as l,v as y}from"./JV23HJTE.js";import"./UZLQALHY.js";export default $arcgis.t(([T,I,b,x,P,g,h,N,m,u,w,v,D,O,G,z,j,k,W,B,J])=>{var U=C`.extent-picker-modal{z-index:1001}.extent-picker-content{display:flex;min-height:100%;height:100%}.side-panel{padding:var(--calcite-spacing-lg);display:flex;flex-direction:column;overflow-y:auto;max-height:100%;width:420px}.extent-button{margin-top:var(--calcite-spacing-lg)}.use-location-header{margin-top:var(--calcite-spacing-xxxl);margin-bottom:var(--calcite-spacing-lg)}.search-container,.search-container .esri-search{width:100%}.search-container calcite-autocomplete{width:100%}.map-panel{flex:1 1 0%;position:relative;display:flex}.map-loader{position:absolute;z-index:var(--calcite-z-index-1);top:50%;left:50%;transform:translate(-50%,-50%)}.map-container{flex:1 1 0%;opacity:0;transition:opacity .3s ease}.loader-container{flex:1 1 0%}.map-container--loaded{opacity:1}.coordinates-section{margin-top:var(--calcite-spacing-lg)}`,L=class{constructor(e){this.outerRing=[[180,-90],[-180,-90],[-180,90],[180,90],[180,-90]],this.map=e}init(){this.maskSymbol=new k({color:[0,0,0,.5],outline:{color:[128,128,128,.5],width:"0px"}}),this.maskLayer=new v({id:"maskLayer "}),this.overlapLayer=new v({id:"overlapLayer"}),this.map?.add(this.maskLayer),this.map?.add(this.overlapLayer)}hide(){this.maskLayer.visible=!1}show(){this.maskLayer.visible=!0}add(e,t){let i=this.buildGraphic(e,t);if(i)return i.graphic&&this.maskLayer?.add(i.graphic),i}update(e,t,i){i?this.remove(null,i):this.clear();let a=this.buildGraphic(e,t);if(a)return a.graphic&&this.maskLayer?.add(a.graphic),a}clear(){this.maskLayer?.removeAll()}remove(e,t){!e&&!t||(t&&!e&&(e=this.maskLayer?.graphics.getItemAt(t)),e&&this.maskLayer?.remove(e))}buildGraphic(e,t=this.maskSymbol){let i={};if(!e)return i;if(e.type==="extent"&&e.xmax===e.xmin){let o=new h({rings:[this.outerRing]});return i.graphic=new u({geometry:o,symbol:t}),i}e=this.toWGS84(e);let a,s;if(e.type==="extent"){let o=this.checkPolyOverlap(e);o?(a=o?.ring?.reverse(),s=o?.oring?.reverse()):a=[[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin],[e.xmin,e.ymax]]}let r=[];e.xmin===e.xmax?r=[this.outerRing]:r=[this.outerRing,a?.reverse()||[[]]];let n=new h({rings:r});return s&&(i.overlap=s),i.graphic=new u({geometry:n,symbol:t}),i}checkPolyOverlap(e){let t={};if(e.xmax<=e.xmin){let i=[[e.xmin,e.ymin],[180,e.ymin],[180,e.ymax],[e.xmin,e.ymax],[e.xmin,e.ymin]],a=[[-180,e.ymin],[e.xmax,e.ymin],[e.xmax,e.ymax],[-180,e.ymax],[-180,e.ymin]],s=180-Math.abs(e.xmax),r=180-Math.abs(e.xmin);return s>r?(t.ring=a,t.oring=i):(t.ring=i,t.oring=a),t}else return}toWGS84(e){let t=new N({wkid:4326});return m.canProject(e,t)?m.project(e,t):e}};function q(p){if(!p)return;let e=b.assetsPath;e.endsWith("/")||(e+="/"),p?.firstElementChild?.insertAdjacentHTML("beforebegin",`<link rel="stylesheet" href="${e}esri/themes/light/main.css" />`)}var $=class extends S{constructor(){super(...arguments),this.polygonSymbol=new k({style:"solid",color:new I([227,139,79,0]),outline:{color:new I([65,105,255]),width:0}}),this.dlOverlapSymbol=new k({style:"solid",color:[255,0,0,.5],outline:{color:[65,105,255],width:0}}),this.messages=R(),this.searchContainer=c(),this.mapContainer=c(),this.topCoordField=c(),this.bottomCoordField=c(),this.leftCoordField=c(),this.rightCoordField=c(),this.minLatLabel="",this.maxLatLabel="",this.minLngLabel="",this.maxLngLabel="",this.ymax="0",this.ymin="0",this.xmin="0",this.xmax="0",this.isDrawStart=!1,this.loading=!0,this.active=!1,this.contentOnly=!1,this.isArea=!1,this.arcgisExtentPickerChange=y(),this.arcgisExtentPickerClose=y(),this.arcgisExtentPickerSave=y()}static{this.properties={ymax:16,ymin:16,xmin:16,xmax:16,isDrawStart:16,loading:16,featureExtent:16,initialValue:16,active:5,extentValue:0,itemId:1,portal:0,extentService:1,contentOnly:5,isArea:5}}static{this.styles=U}getExtent(){return this.getExtentValue()}async load(){if(this.itemId){if(this.portal){let t=this.portal.url.replace("/sharing/rest/","");t!==b.portalUrl&&(b.portalUrl=t)}let e=new Intl.NumberFormat(w.getLocale(),{minimumFractionDigits:1,maximumFractionDigits:1});this.minLatLabel=e.format(-90),this.maxLatLabel=e.format(90),this.minLngLabel=e.format(-180),this.maxLngLabel=e.format(180),this.item=new z({id:this.itemId,portal:this.portal}),await this.item.load()}if(this.portal&&(this.orgExtent=this.portal.defaultExtent?.toJSON()),this.portal?.region){let e=this.portal.region,t=await j(`${this.portal.url.replace("/sharing/rest/","")}/sharing/rest/portals/self?region=${e}&default=true&f=pjson`,{responseType:"json"});this.orgRegionExtent=t.data.defaultExtent}}async loaded(){q(this.el.shadowRoot),await this.initMap()}convertToNumber(e){return this.parseNumber(e)}setFeatureExtent(e){let t;e.spatialReference.isGeographic?t=new x({xmax:e.xmax,xmin:e.xmin,ymax:e.ymax,ymin:e.ymin,spatialReference:{wkid:4326}}):t=this.toWGS84(e),this.featureExtent?(this.featureExtent.xmin=Math.min(t.xmin,this.featureExtent.xmin),this.featureExtent.ymin=Math.min(t.ymin,this.featureExtent.ymin),this.featureExtent.xmax=Math.max(t.xmax,this.featureExtent.xmax),this.featureExtent.ymax=Math.max(t.ymax,this.featureExtent.ymax)):this.featureExtent=t}async initMap(){let e=new G({basemap:"streets-vector"});if(this.extentService){let t=new O({url:this.extentService}),i=new T({baseLayers:[t],id:"org_basemap"});e.basemap=i}if(this.mask=new L(e),this.mask.init(),this.dateLineLayer=new v({id:"dateLineLayer"}),e.add(this.dateLineLayer),this.areasLayer=new v({id:"areaGraphics"}),e.add(this.areasLayer),this.item?.type==="Feature Service"||this.item?.type==="Map Service"){let t=await D.fromPortalItem({portalItem:this.item});t.visible=!1,e.add(t),t.when(i=>{if("layers"in i)for(let a=0;a<i.layers.length;a++)i.layers.getItemAt(a).queryExtent().then(s=>{s.extent&&this.setFeatureExtent(s.extent)});else i.queryExtent().then(a=>{a.extent&&this.setFeatureExtent(a.extent)})})}this.view=new W({map:e,popup:{dockEnabled:!0,dockOptions:{buttonEnabled:!1,breakpoint:!1,position:"bottom-center"}},zoom:2,center:[0,0],container:this.mapContainer.value}),this.view.when(async()=>{if(this.basemapExtent=this.getBasemapExtent(),this.itemExtent=this.item?.extent,this.extentValue?.xmax!==void 0&&this.extentValue?.xmin!==void 0&&this.extentValue?.ymax!==void 0&&this.extentValue?.ymin!==void 0)this.ymin=this.extentValue?.ymin||"0",this.ymax=this.extentValue?.ymax||"0",this.xmax=this.extentValue?.xmax||"0",this.xmin=this.extentValue?.xmin||"0",this.handleInputChange(),this.initialValue=this.currentExtent;else if(this.itemExtent)await this.drawExtent(this.itemExtent),this.initialValue=this.itemExtent;else if(this.featureExtent)await this.drawExtent(this.featureExtent),this.initialValue=this.featureExtent;else if(this.portal?.defaultExtent){let t=this.portal.defaultExtent.toJSON();await this.drawExtent(t),this.initialValue=t}this.initSearchWidget(),this.loading=!1})}getBasemapExtent(){try{let e,t,i,a;if(this.view?.map?.basemap?.hasOwnProperty("baseLayers")){let s=this.view.map.basemap.baseLayers;if(s.length>0){for(let r of s){let n=r.fullExtent||{xmin:0,ymin:0,xmax:0,ymax:0};e=e!==void 0&&e>n?.xmin?e:n.xmin,i=i!==void 0&&i>n?.ymin?i:n.ymin,t=t!==void 0&&t<n.xmax?t:n.xmax,a=a!==void 0&&a<n.ymax?a:n.ymax}return new x({xmin:e,xmax:t,ymin:i,ymax:a,spatialReference:this.view.spatialReference})}}return new x({ymin:-90,ymax:90,xmin:-180,xmax:180,spatialReference:{wkid:4326}})}catch{return new x({ymin:-90,ymax:90,xmin:-180,xmax:180,spatialReference:{wkid:4326}})}}async drawExtent(e){if(!e||!e.xmin&&e.xmin!==0||!e.xmax&&e.xmax!==0||!e.ymin&&e.ymin!==0||!e.ymax&&e.ymax!==0)return;let t=new h;t.spatialReference=e.spatialReference,t.addRing([new g({x:e.xmin,y:e.ymin}),new g({x:e.xmin,y:e.ymax}),new g({x:e.xmax,y:e.ymax}),new g({x:e.xmax,y:e.ymin}),new g({x:e.xmin,y:e.ymin})]),await this.addInitialExtentPicker({geometry:t})}toWGS84(e){let t=new N({wkid:4326});return m.canProject(e,t)?m.project(e,t):e}formatNum(e){return w.formatNumber(e,{minimumFractionDigits:6,maximumFractionDigits:6})}strippedInvalidChars(e){let t=Array.from({length:10},(i,a)=>a.toString()).join("");return Array.from(e).filter(i=>t.includes(i)||i==="."||i==="-").join("")}parseNumber(e){let t=e.replace(",",".");return t=this.strippedInvalidChars(t),parseFloat(t)}async startupSketching(e,t){if(e&&(e=this.toMap(e)),this.sketchViewModel=new J({updateOnGraphicClick:!1,layer:this.areasLayer,view:this.view,polygonSymbol:this.polygonSymbol}),this.clearAllGraphics(),!t)if(e){e.type==="extent"&&(e=h.fromExtent(e)),this.currentExtent=this.toWGS84(e?.extent?.toJSON()),this.ymax=this.formatNum(this.currentExtent.ymax),this.ymin=this.formatNum(this.currentExtent.ymin),this.xmin=this.formatNum(this.currentExtent.xmin),this.xmax=this.formatNum(this.currentExtent.xmax),this.arcgisExtentPickerChange.emit(this.getExtentValue()),e=P.intersect(e,this.basemapExtent);let i=new u({symbol:this.polygonSymbol,geometry:e});i.geometry&&(this.fallbackExtent=i.geometry.extent,this.areasLayer?.add(i),this.mask?.clear(),this.mask?.update(i.geometry.extent),await this.zoomTo(),setTimeout(async()=>{try{i.layer&&await this.sketchViewModel?.update([i],{tool:"transform",enableRotation:!1,toggleToolOnClick:!1,reshapeOptions:{enableCreateCurveFromStraightEdge:!1}})}catch{}},0))}else this.sketchViewModel.create("rectangle");this.addSketchListeners()}addSketchListeners(){this.sketchViewModel?.on("update",async e=>{if(!e.toolEventInfo)return;let t=e?.graphics?.[0]?.geometry?.extent,i=t&&this.mask?.update(t);if(e.toolEventInfo.type==="scale-stop"||e.toolEventInfo.type==="move-stop"){let a,s=parseFloat(`${t?.xmax??"0"}`).toFixed(6),r=parseFloat(`${t?.xmin??"0"}`).toFixed(6),n=parseFloat(`${t?.ymax??"0"}`).toFixed(6),o=parseFloat(`${t?.ymin??"0"}`).toFixed(6);if(s===r||n===o?(a=t,s===r&&(a.xmax+=1),n===o&&(a.ymax+=1)):a=e?.graphics?.[0]?.geometry?.extent,i?.overlap){let E=i.graphic?.geometry,A=new h({rings:[E?.rings[1]]});await this.addInitialExtentPicker({geometry:A.extent})}else await this.startupSketching(a);this.isDrawStart=!1}else if(this.dateLineLayer?.removeAll(),i?.overlap){let a=new u({geometry:new h({rings:[i.overlap]}),symbol:this.dlOverlapSymbol});this.dateLineLayer?.add(a)}}),this.sketchViewModel?.on("create",async e=>{if(this.dateLineLayer?.removeAll(),!e.graphic)return;this.mask?.clear();let t=e?.graphic?.geometry?.extent,i=this.mask?.add(t);if(i?.overlap?(this.remainderPoly=new u({geometry:new h({rings:[i.overlap]}),symbol:this.dlOverlapSymbol}),this.dateLineLayer?.add(this.remainderPoly)):this.remainderPoly=null,e.state==="complete"){let a,s=e.graphic?.geometry?.extent?.xmin||0,r=e.graphic?.geometry?.extent?.xmax||0,n=e.graphic?.geometry?.extent?.ymin||0,o=e.graphic?.geometry?.extent?.ymax||0;if(s===r||n===o)s===r&&(r=r+1),n===o&&(o=o+1),a=new x({xmin:s,xmax:r,ymin:n,ymax:o,spatialReference:e.graphic?.geometry?.extent?.spatialReference});else{let E=i?.graphic?.geometry;a=new h({rings:[E?.rings[1]]}).extent}this.remainderPoly?await this.addInitialExtentPicker({geometry:a}):await this.startupSketching(a),this.isDrawStart=!1,this.mapContainer.value.focus()}})}async addInitialExtentPicker(e){if(!e.geometry){await this.startupSketching(null,!0);return}let t=this.toMap(e.geometry);await this.startupSketching(t)}async zoomTo(){if(this.areasLayer?.graphics){let e;if(this.areasLayer.graphics.forEach(i=>{let a=i?.geometry?.extent;e=e?e.union(a):a}),!e)return;let t=this.toMap(x.fromJSON(e.toJSON()).expand(1.35));t&&await this.view?.goTo(t)}}clearAllGraphics(){this.sketchViewModel?.cancel(),this.view?.map?.layers?.forEach(e=>{e.type==="graphics"&&e.removeAll()})}toMap(e){return this.view&&m.canProject(e,this.view)?m.project(e,this.view.spatialReference):e}initSearchWidget(){let e=new B({view:this.view,popupEnabled:!1,resultGraphicEnabled:!1,container:this.searchContainer.value}),t=e.viewModel;e.viewModel.allSources.on("change",()=>{t.allSources.forEach(i=>{i.zoomScale=null})}),e.on("select-result",i=>{this.startupSketching(i.result.extent)})}getExtentValue(){return{extent:{ymin:this.normalizeDecimal(this.ymin),ymax:this.normalizeDecimal(this.ymax),xmin:this.normalizeDecimal(this.xmin),xmax:this.normalizeDecimal(this.xmax)}}}handleInputChange(){let e=this.parseNumber(this.ymin),t=this.parseNumber(this.ymax),i=this.parseNumber(this.xmin),a=this.parseNumber(this.xmax),s=new x({spatialReference:{wkid:4326},xmin:i,xmax:a,ymin:e,ymax:t});this.currentExtent=s,this.drawExtent(s)}handleSave(){if(!this.topCoordField.value.isValid()){this.topCoordField.value.setFocus();return}if(!this.bottomCoordField.value.isValid()){this.bottomCoordField.value.setFocus();return}if(!this.leftCoordField.value.isValid()){this.leftCoordField.value.setFocus();return}if(!this.rightCoordField.value.isValid()){this.rightCoordField.value.setFocus();return}this.arcgisExtentPickerSave.emit(this.getExtentValue())}normalizeDecimal(e){return e.replace(",",".")}formatLongitudeError(e){return e.replace("${minLng}",this.minLngLabel).replace("${maxLng}",this.maxLngLabel)}formatLatitudeError(e){return e.replace("${minLat}",this.minLatLabel).replace("${maxLat}",this.maxLatLabel)}async timeout(e){return await new Promise(t=>setTimeout(t,e))}renderModal(){return l`<calcite-dialog class="extent-picker-modal" role=dialog scale=l outside-close-disabled .open=${this.active} placement=cover @calciteDialogClose=${()=>{this.arcgisExtentPickerClose.emit()}} style=${V({"--calcite-dialog-content-space":"0"})} .heading=${this.isArea?this.messages.setArea:this.messages.setExtent} heading-level=3><div class="extent-picker-content">${this.renderContent()}</div>${this.initialValue&&l`<calcite-button appearance=outline slot=footer-start icon-start=reset @click=${async()=>{if(this.initialValue){let e=+this.ymin===f(this.initialValue.ymin)&&+this.ymax===f(this.initialValue.ymax);+this.xmin===f(this.initialValue.xmin)&&+this.xmax===f(this.initialValue.xmax)&&e&&(this.ymin="0",this.ymax="0",this.xmin="0",this.xmax="0",await this.timeout(100)),this.drawExtent(this.initialValue)}}}>${this.messages.revert}</calcite-button>`||""}<calcite-button appearance=outline slot=footer-end @click=${()=>this.arcgisExtentPickerClose.emit()}>${this.messages.cancel}</calcite-button><calcite-button slot=footer-end @click=${async()=>this.handleSave()}>${this.messages.save}</calcite-button></calcite-dialog>`}renderContent(){let e=!!(this.portal&&!this.portal.id),t=!!(this.orgExtent&&!e),i=!!(this.orgRegionExtent&&!e),a=!!this.featureExtent;return l`<div class="side-panel">${!(!t&&!i&&!a)&&l`<div>${this.isArea?this.messages.areaBasedOn:this.messages.extentBasedOn}</div>${t&&l`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=organization @click=${()=>{this.drawExtent(this.orgExtent)}}>${this.messages.orgExtent}</calcite-button>`||""}${i&&l`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=organization @click=${()=>{this.drawExtent(this.orgRegionExtent)}}>${this.messages.orgRegion}</calcite-button>`||""}${a&&l`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=feature-layer @click=${()=>{this.drawExtent(this.featureExtent)}}>${this.messages.currentFeatures}</calcite-button>`||""}`||""}<div class="use-location-header">${this.messages.useLocation}</div><div class="search-container"><div ${d(this.searchContainer)}></div></div><div><div class="use-location-header">${this.isArea?this.messages.drawAreaTitle:this.messages.drawExtentTitle}</div><calcite-action .text=${(this.isArea?this.messages.drawArea:this.messages.drawExtent)||""} text-enabled icon=rectangle-plus .active=${this.isDrawStart} .indicator=${this.isDrawStart} @click=${async()=>{this.isDrawStart=!this.isDrawStart,this.isDrawStart?(this.sketchViewModel||await this.startupSketching(),this.clearAllGraphics(),this.sketchViewModel?.create("rectangle")):(this.sketchViewModel?.cancel(),this.startupSketching(this.fallbackExtent))}}></calcite-action></div><div class="coordinates-section"><calcite-accordion appearance=transparent icon-position=start scale=l><calcite-accordion-item .heading=${this.messages.coordinates}><p>${this.messages.coordinatesDescription}</p><arcgis-portal-extent-picker-coord-field input-id=top-coord .label=${this.messages.top} .value=${this.strippedInvalidChars(this.ymax)} .errorMessage=${this.formatLatitudeError(this.messages.invalidTop||"")} min=-90 max=90 @arcgisCoordChange=${s=>{this.ymax=s.detail;let r=this.bottomCoordField.value.checkRelatedField();r&&(this.ymin=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.topGreaterThanBottom} .validateRelated=${s=>s>this.convertToNumber(this.ymin)} ${d(this.topCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field input-id=bottom-coord .label=${this.messages.bottom} .value=${this.strippedInvalidChars(this.ymin)} .errorMessage=${this.formatLatitudeError(this.messages.invalidBottom||"")} min=-90 max=90 @arcgisCoordChange=${s=>{this.ymin=s.detail;let r=this.topCoordField.value.checkRelatedField();r&&(this.ymax=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.bottomLessThanTop} .validateRelated=${s=>s<this.convertToNumber(this.ymax)} ${d(this.bottomCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field input-id=left-coord .label=${this.messages.left} .value=${this.strippedInvalidChars(this.xmin)} .errorMessage=${this.formatLongitudeError(this.messages.invalidLeft||"")} min=-180 max=180 @arcgisCoordChange=${s=>{this.xmin=s.detail;let r=this.rightCoordField.value.checkRelatedField();r&&(this.xmax=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.leftLessThanRight} .validateRelated=${s=>s<this.convertToNumber(this.xmax)} ${d(this.leftCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field input-id=right-coord .label=${this.messages.right} .value=${this.strippedInvalidChars(this.xmax)} .errorMessage=${this.formatLongitudeError(this.messages.invalidRight||"")} min=-180 max=180 @arcgisCoordChange=${s=>{this.xmax=s.detail;let r=this.leftCoordField.value.checkRelatedField();r&&(this.xmin=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.rightGreaterThanLeft} .validateRelated=${s=>s>this.convertToNumber(this.xmin)} ${d(this.rightCoordField)}></arcgis-portal-extent-picker-coord-field></calcite-accordion-item></calcite-accordion></div></div><div class="map-panel">${this.loading&&l`<calcite-loader class="map-loader" label="Loading the application"></calcite-loader>`||""}<div class=${F({"map-container":!0,"map-container--loaded":!this.loading})} ${d(this.mapContainer)}></div></div>`}render(){return this.contentOnly?l`<div class="extent-picker-content">${this.renderContent()}</div>`:this.renderModal()}};function f(p){return Math.round(p*1e6)/1e6}M("arcgis-portal-extent-picker",$);return $},"Basemap","Color","config","geometry/Extent","geometry/geometryEngine","geometry/Point","geometry/Polygon","geometry/SpatialReference","geometry/support/webMercatorUtils","Graphic","intl","layers/GraphicsLayer","layers/Layer","layers/TileLayer","Map","portal/PortalItem","request","symbols/SimpleFillSymbol","views/MapView","widgets/Search","widgets/Sketch/SketchViewModel")
2
+ import{a as R}from"./OFDH6CTA.js";import"./BUKOHPY6.js";import"./XQJNAQVO.js";import{K as c,L as d,M as S,N as F,O as V,S as M,h as C,j as l,w as y}from"./STZRXY35.js";import"./UZLQALHY.js";export default $arcgis.t(([T,I,b,x,P,g,h,N,m,u,w,v,D,O,G,z,j,k,W,B,J])=>{var U=C`.extent-picker-modal{z-index:1001}.extent-picker-content{display:flex;min-height:100%;height:100%}.side-panel{padding:var(--calcite-spacing-lg);display:flex;flex-direction:column;overflow-y:auto;max-height:100%;width:420px}.extent-button{margin-top:var(--calcite-spacing-lg)}.use-location-header{margin-top:var(--calcite-spacing-xxxl);margin-bottom:var(--calcite-spacing-lg)}.search-container,.search-container .esri-search{width:100%}.search-container calcite-autocomplete{width:100%}.map-panel{flex:1 1 0%;position:relative;display:flex}.map-loader{position:absolute;z-index:var(--calcite-z-index-1);top:50%;left:50%;transform:translate(-50%,-50%)}.map-container{flex:1 1 0%;opacity:0;transition:opacity .3s ease}.loader-container{flex:1 1 0%}.map-container--loaded{opacity:1}.coordinates-section{margin-top:var(--calcite-spacing-lg)}`,L=class{constructor(e){this.outerRing=[[180,-90],[-180,-90],[-180,90],[180,90],[180,-90]],this.map=e}init(){this.maskSymbol=new k({color:[0,0,0,.5],outline:{color:[128,128,128,.5],width:"0px"}}),this.maskLayer=new v({id:"maskLayer "}),this.overlapLayer=new v({id:"overlapLayer"}),this.map?.add(this.maskLayer),this.map?.add(this.overlapLayer)}hide(){this.maskLayer.visible=!1}show(){this.maskLayer.visible=!0}add(e,t){let i=this.buildGraphic(e,t);if(i)return i.graphic&&this.maskLayer?.add(i.graphic),i}update(e,t,i){i?this.remove(null,i):this.clear();let a=this.buildGraphic(e,t);if(a)return a.graphic&&this.maskLayer?.add(a.graphic),a}clear(){this.maskLayer?.removeAll()}remove(e,t){!e&&!t||(t&&!e&&(e=this.maskLayer?.graphics.getItemAt(t)),e&&this.maskLayer?.remove(e))}buildGraphic(e,t=this.maskSymbol){let i={};if(!e)return i;if(e.type==="extent"&&e.xmax===e.xmin){let o=new h({rings:[this.outerRing]});return i.graphic=new u({geometry:o,symbol:t}),i}e=this.toWGS84(e);let a,s;if(e.type==="extent"){let o=this.checkPolyOverlap(e);o?(a=o?.ring?.reverse(),s=o?.oring?.reverse()):a=[[e.xmin,e.ymax],[e.xmax,e.ymax],[e.xmax,e.ymin],[e.xmin,e.ymin],[e.xmin,e.ymax]]}let r=[];e.xmin===e.xmax?r=[this.outerRing]:r=[this.outerRing,a?.reverse()||[[]]];let n=new h({rings:r});return s&&(i.overlap=s),i.graphic=new u({geometry:n,symbol:t}),i}checkPolyOverlap(e){let t={};if(e.xmax<=e.xmin){let i=[[e.xmin,e.ymin],[180,e.ymin],[180,e.ymax],[e.xmin,e.ymax],[e.xmin,e.ymin]],a=[[-180,e.ymin],[e.xmax,e.ymin],[e.xmax,e.ymax],[-180,e.ymax],[-180,e.ymin]],s=180-Math.abs(e.xmax),r=180-Math.abs(e.xmin);return s>r?(t.ring=a,t.oring=i):(t.ring=i,t.oring=a),t}else return}toWGS84(e){let t=new N({wkid:4326});return m.canProject(e,t)?m.project(e,t):e}};function q(p){if(!p)return;let e=b.assetsPath;e.endsWith("/")||(e+="/"),p?.firstElementChild?.insertAdjacentHTML("beforebegin",`<link rel="stylesheet" href="${e}esri/themes/light/main.css" />`)}var $=class extends S{constructor(){super(...arguments),this.polygonSymbol=new k({style:"solid",color:new I([227,139,79,0]),outline:{color:new I([65,105,255]),width:0}}),this.dlOverlapSymbol=new k({style:"solid",color:[255,0,0,.5],outline:{color:[65,105,255],width:0}}),this.messages=R(),this.searchContainer=c(),this.mapContainer=c(),this.topCoordField=c(),this.bottomCoordField=c(),this.leftCoordField=c(),this.rightCoordField=c(),this.minLatLabel="",this.maxLatLabel="",this.minLngLabel="",this.maxLngLabel="",this.ymax="0",this.ymin="0",this.xmin="0",this.xmax="0",this.isDrawStart=!1,this.loading=!0,this.active=!1,this.contentOnly=!1,this.isArea=!1,this.arcgisExtentPickerChange=y(),this.arcgisExtentPickerClose=y(),this.arcgisExtentPickerSave=y()}static{this.properties={ymax:16,ymin:16,xmin:16,xmax:16,isDrawStart:16,loading:16,featureExtent:16,initialValue:16,active:5,extentValue:0,itemId:1,portal:0,extentService:1,contentOnly:5,isArea:5}}static{this.styles=U}getExtent(){return this.getExtentValue()}async load(){if(this.itemId){if(this.portal){let t=this.portal.url.replace("/sharing/rest/","");t!==b.portalUrl&&(b.portalUrl=t)}let e=new Intl.NumberFormat(w.getLocale(),{minimumFractionDigits:1,maximumFractionDigits:1});this.minLatLabel=e.format(-90),this.maxLatLabel=e.format(90),this.minLngLabel=e.format(-180),this.maxLngLabel=e.format(180),this.item=new z({id:this.itemId,portal:this.portal}),await this.item.load()}if(this.portal&&(this.orgExtent=this.portal.defaultExtent?.toJSON()),this.portal?.region){let e=this.portal.region,t=await j(`${this.portal.url.replace("/sharing/rest/","")}/sharing/rest/portals/self?region=${e}&default=true&f=pjson`,{responseType:"json"});this.orgRegionExtent=t.data.defaultExtent}}async loaded(){q(this.el.shadowRoot),await this.initMap()}convertToNumber(e){return this.parseNumber(e)}setFeatureExtent(e){let t;e.spatialReference.isGeographic?t=new x({xmax:e.xmax,xmin:e.xmin,ymax:e.ymax,ymin:e.ymin,spatialReference:{wkid:4326}}):t=this.toWGS84(e),this.featureExtent?(this.featureExtent.xmin=Math.min(t.xmin,this.featureExtent.xmin),this.featureExtent.ymin=Math.min(t.ymin,this.featureExtent.ymin),this.featureExtent.xmax=Math.max(t.xmax,this.featureExtent.xmax),this.featureExtent.ymax=Math.max(t.ymax,this.featureExtent.ymax)):this.featureExtent=t}async initMap(){let e=new G({basemap:"streets-vector"});if(this.extentService){let t=new O({url:this.extentService}),i=new T({baseLayers:[t],id:"org_basemap"});e.basemap=i}if(this.mask=new L(e),this.mask.init(),this.dateLineLayer=new v({id:"dateLineLayer"}),e.add(this.dateLineLayer),this.areasLayer=new v({id:"areaGraphics"}),e.add(this.areasLayer),this.item?.type==="Feature Service"||this.item?.type==="Map Service"){let t=await D.fromPortalItem({portalItem:this.item});t.visible=!1,e.add(t),t.when(i=>{if("layers"in i)for(let a=0;a<i.layers.length;a++)i.layers.getItemAt(a).queryExtent().then(s=>{s.extent&&this.setFeatureExtent(s.extent)});else i.queryExtent().then(a=>{a.extent&&this.setFeatureExtent(a.extent)})})}this.view=new W({map:e,popup:{dockEnabled:!0,dockOptions:{buttonEnabled:!1,breakpoint:!1,position:"bottom-center"}},zoom:2,center:[0,0],container:this.mapContainer.value}),this.view.when(async()=>{if(this.basemapExtent=this.getBasemapExtent(),this.itemExtent=this.item?.extent,this.extentValue?.xmax!==void 0&&this.extentValue?.xmin!==void 0&&this.extentValue?.ymax!==void 0&&this.extentValue?.ymin!==void 0)this.ymin=this.extentValue?.ymin||"0",this.ymax=this.extentValue?.ymax||"0",this.xmax=this.extentValue?.xmax||"0",this.xmin=this.extentValue?.xmin||"0",this.handleInputChange(),this.initialValue=this.currentExtent;else if(this.itemExtent)await this.drawExtent(this.itemExtent),this.initialValue=this.itemExtent;else if(this.featureExtent)await this.drawExtent(this.featureExtent),this.initialValue=this.featureExtent;else if(this.portal?.defaultExtent){let t=this.portal.defaultExtent.toJSON();await this.drawExtent(t),this.initialValue=t}this.initSearchWidget(),this.loading=!1})}getBasemapExtent(){try{let e,t,i,a;if(this.view?.map?.basemap?.hasOwnProperty("baseLayers")){let s=this.view.map.basemap.baseLayers;if(s.length>0){for(let r of s){let n=r.fullExtent||{xmin:0,ymin:0,xmax:0,ymax:0};e=e!==void 0&&e>n?.xmin?e:n.xmin,i=i!==void 0&&i>n?.ymin?i:n.ymin,t=t!==void 0&&t<n.xmax?t:n.xmax,a=a!==void 0&&a<n.ymax?a:n.ymax}return new x({xmin:e,xmax:t,ymin:i,ymax:a,spatialReference:this.view.spatialReference})}}return new x({ymin:-90,ymax:90,xmin:-180,xmax:180,spatialReference:{wkid:4326}})}catch{return new x({ymin:-90,ymax:90,xmin:-180,xmax:180,spatialReference:{wkid:4326}})}}async drawExtent(e){if(!e||!e.xmin&&e.xmin!==0||!e.xmax&&e.xmax!==0||!e.ymin&&e.ymin!==0||!e.ymax&&e.ymax!==0)return;let t=new h;t.spatialReference=e.spatialReference,t.addRing([new g({x:e.xmin,y:e.ymin}),new g({x:e.xmin,y:e.ymax}),new g({x:e.xmax,y:e.ymax}),new g({x:e.xmax,y:e.ymin}),new g({x:e.xmin,y:e.ymin})]),await this.addInitialExtentPicker({geometry:t})}toWGS84(e){let t=new N({wkid:4326});return m.canProject(e,t)?m.project(e,t):e}formatNum(e){return w.formatNumber(e,{minimumFractionDigits:6,maximumFractionDigits:6})}strippedInvalidChars(e){let t=Array.from({length:10},(i,a)=>a.toString()).join("");return Array.from(e).filter(i=>t.includes(i)||i==="."||i==="-").join("")}parseNumber(e){let t=e.replace(",",".");return t=this.strippedInvalidChars(t),parseFloat(t)}async startupSketching(e,t){if(e&&(e=this.toMap(e)),this.sketchViewModel=new J({updateOnGraphicClick:!1,layer:this.areasLayer,view:this.view,polygonSymbol:this.polygonSymbol}),this.clearAllGraphics(),!t)if(e){e.type==="extent"&&(e=h.fromExtent(e)),this.currentExtent=this.toWGS84(e?.extent?.toJSON()),this.ymax=this.formatNum(this.currentExtent.ymax),this.ymin=this.formatNum(this.currentExtent.ymin),this.xmin=this.formatNum(this.currentExtent.xmin),this.xmax=this.formatNum(this.currentExtent.xmax),this.arcgisExtentPickerChange.emit(this.getExtentValue()),e=P.intersect(e,this.basemapExtent);let i=new u({symbol:this.polygonSymbol,geometry:e});i.geometry&&(this.fallbackExtent=i.geometry.extent,this.areasLayer?.add(i),this.mask?.clear(),this.mask?.update(i.geometry.extent),await this.zoomTo(),setTimeout(async()=>{try{i.layer&&await this.sketchViewModel?.update([i],{tool:"transform",enableRotation:!1,toggleToolOnClick:!1,reshapeOptions:{enableCreateCurveFromStraightEdge:!1}})}catch{}},0))}else this.sketchViewModel.create("rectangle");this.addSketchListeners()}addSketchListeners(){this.sketchViewModel?.on("update",async e=>{if(!e.toolEventInfo)return;let t=e?.graphics?.[0]?.geometry?.extent,i=t&&this.mask?.update(t);if(e.toolEventInfo.type==="scale-stop"||e.toolEventInfo.type==="move-stop"){let a,s=parseFloat(`${t?.xmax??"0"}`).toFixed(6),r=parseFloat(`${t?.xmin??"0"}`).toFixed(6),n=parseFloat(`${t?.ymax??"0"}`).toFixed(6),o=parseFloat(`${t?.ymin??"0"}`).toFixed(6);if(s===r||n===o?(a=t,s===r&&(a.xmax+=1),n===o&&(a.ymax+=1)):a=e?.graphics?.[0]?.geometry?.extent,i?.overlap){let E=i.graphic?.geometry,A=new h({rings:[E?.rings[1]]});await this.addInitialExtentPicker({geometry:A.extent})}else await this.startupSketching(a);this.isDrawStart=!1}else if(this.dateLineLayer?.removeAll(),i?.overlap){let a=new u({geometry:new h({rings:[i.overlap]}),symbol:this.dlOverlapSymbol});this.dateLineLayer?.add(a)}}),this.sketchViewModel?.on("create",async e=>{if(this.dateLineLayer?.removeAll(),!e.graphic)return;this.mask?.clear();let t=e?.graphic?.geometry?.extent,i=this.mask?.add(t);if(i?.overlap?(this.remainderPoly=new u({geometry:new h({rings:[i.overlap]}),symbol:this.dlOverlapSymbol}),this.dateLineLayer?.add(this.remainderPoly)):this.remainderPoly=null,e.state==="complete"){let a,s=e.graphic?.geometry?.extent?.xmin||0,r=e.graphic?.geometry?.extent?.xmax||0,n=e.graphic?.geometry?.extent?.ymin||0,o=e.graphic?.geometry?.extent?.ymax||0;if(s===r||n===o)s===r&&(r=r+1),n===o&&(o=o+1),a=new x({xmin:s,xmax:r,ymin:n,ymax:o,spatialReference:e.graphic?.geometry?.extent?.spatialReference});else{let E=i?.graphic?.geometry;a=new h({rings:[E?.rings[1]]}).extent}this.remainderPoly?await this.addInitialExtentPicker({geometry:a}):await this.startupSketching(a),this.isDrawStart=!1,this.mapContainer.value.focus()}})}async addInitialExtentPicker(e){if(!e.geometry){await this.startupSketching(null,!0);return}let t=this.toMap(e.geometry);await this.startupSketching(t)}async zoomTo(){if(this.areasLayer?.graphics){let e;if(this.areasLayer.graphics.forEach(i=>{let a=i?.geometry?.extent;e=e?e.union(a):a}),!e)return;let t=this.toMap(x.fromJSON(e.toJSON()).expand(1.35));t&&await this.view?.goTo(t)}}clearAllGraphics(){this.sketchViewModel?.cancel(),this.view?.map?.layers?.forEach(e=>{e.type==="graphics"&&e.removeAll()})}toMap(e){return this.view&&m.canProject(e,this.view)?m.project(e,this.view.spatialReference):e}initSearchWidget(){let e=new B({view:this.view,popupEnabled:!1,resultGraphicEnabled:!1,container:this.searchContainer.value}),t=e.viewModel;e.viewModel.allSources.on("change",()=>{t.allSources.forEach(i=>{i.zoomScale=null})}),e.on("select-result",i=>{this.startupSketching(i.result.extent)})}getExtentValue(){return{extent:{ymin:this.normalizeDecimal(this.ymin),ymax:this.normalizeDecimal(this.ymax),xmin:this.normalizeDecimal(this.xmin),xmax:this.normalizeDecimal(this.xmax)}}}handleInputChange(){let e=this.parseNumber(this.ymin),t=this.parseNumber(this.ymax),i=this.parseNumber(this.xmin),a=this.parseNumber(this.xmax),s=new x({spatialReference:{wkid:4326},xmin:i,xmax:a,ymin:e,ymax:t});this.currentExtent=s,this.drawExtent(s)}handleSave(){if(!this.topCoordField.value.isValid()){this.topCoordField.value.setFocus();return}if(!this.bottomCoordField.value.isValid()){this.bottomCoordField.value.setFocus();return}if(!this.leftCoordField.value.isValid()){this.leftCoordField.value.setFocus();return}if(!this.rightCoordField.value.isValid()){this.rightCoordField.value.setFocus();return}this.arcgisExtentPickerSave.emit(this.getExtentValue())}normalizeDecimal(e){return e.replace(",",".")}formatLongitudeError(e){return e.replace("${minLng}",this.minLngLabel).replace("${maxLng}",this.maxLngLabel)}formatLatitudeError(e){return e.replace("${minLat}",this.minLatLabel).replace("${maxLat}",this.maxLatLabel)}async timeout(e){return await new Promise(t=>setTimeout(t,e))}renderModal(){return l`<calcite-dialog class="extent-picker-modal" role=dialog scale=l outside-close-disabled .open=${this.active} placement=cover @calciteDialogClose=${()=>{this.arcgisExtentPickerClose.emit()}} style=${V({"--calcite-dialog-content-space":"0"})} .heading=${this.isArea?this.messages.setArea:this.messages.setExtent} heading-level=3><div class="extent-picker-content">${this.renderContent()}</div>${this.initialValue&&l`<calcite-button appearance=outline slot=footer-start icon-start=reset @click=${async()=>{if(this.initialValue){let e=+this.ymin===f(this.initialValue.ymin)&&+this.ymax===f(this.initialValue.ymax);+this.xmin===f(this.initialValue.xmin)&&+this.xmax===f(this.initialValue.xmax)&&e&&(this.ymin="0",this.ymax="0",this.xmin="0",this.xmax="0",await this.timeout(100)),this.drawExtent(this.initialValue)}}}>${this.messages.revert}</calcite-button>`||""}<calcite-button appearance=outline slot=footer-end @click=${()=>this.arcgisExtentPickerClose.emit()}>${this.messages.cancel}</calcite-button><calcite-button slot=footer-end @click=${async()=>this.handleSave()}>${this.messages.save}</calcite-button></calcite-dialog>`}renderContent(){let e=!!(this.portal&&!this.portal.id),t=!!(this.orgExtent&&!e),i=!!(this.orgRegionExtent&&!e),a=!!this.featureExtent;return l`<div class="side-panel">${!(!t&&!i&&!a)&&l`<div>${this.isArea?this.messages.areaBasedOn:this.messages.extentBasedOn}</div>${t&&l`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=organization @click=${()=>{this.drawExtent(this.orgExtent)}}>${this.messages.orgExtent}</calcite-button>`||""}${i&&l`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=organization @click=${()=>{this.drawExtent(this.orgRegionExtent)}}>${this.messages.orgRegion}</calcite-button>`||""}${a&&l`<calcite-button class="extent-button" alignment=start scale=l kind=neutral appearance=outline-fill icon-start=feature-layer @click=${()=>{this.drawExtent(this.featureExtent)}}>${this.messages.currentFeatures}</calcite-button>`||""}`||""}<div class="use-location-header">${this.messages.useLocation}</div><div class="search-container"><div ${d(this.searchContainer)}></div></div><div><div class="use-location-header">${this.isArea?this.messages.drawAreaTitle:this.messages.drawExtentTitle}</div><calcite-action .text=${(this.isArea?this.messages.drawArea:this.messages.drawExtent)||""} text-enabled icon=rectangle-plus .active=${this.isDrawStart} .indicator=${this.isDrawStart} @click=${async()=>{this.isDrawStart=!this.isDrawStart,this.isDrawStart?(this.sketchViewModel||await this.startupSketching(),this.clearAllGraphics(),this.sketchViewModel?.create("rectangle")):(this.sketchViewModel?.cancel(),this.startupSketching(this.fallbackExtent))}}></calcite-action></div><div class="coordinates-section"><calcite-accordion appearance=transparent icon-position=start scale=l><calcite-accordion-item .heading=${this.messages.coordinates}><p>${this.messages.coordinatesDescription}</p><arcgis-portal-extent-picker-coord-field input-id=top-coord .label=${this.messages.top} .value=${this.strippedInvalidChars(this.ymax)} .errorMessage=${this.formatLatitudeError(this.messages.invalidTop||"")} min=-90 max=90 @arcgisCoordChange=${s=>{this.ymax=s.detail;let r=this.bottomCoordField.value.checkRelatedField();r&&(this.ymin=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.topGreaterThanBottom} .validateRelated=${s=>s>this.convertToNumber(this.ymin)} ${d(this.topCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field input-id=bottom-coord .label=${this.messages.bottom} .value=${this.strippedInvalidChars(this.ymin)} .errorMessage=${this.formatLatitudeError(this.messages.invalidBottom||"")} min=-90 max=90 @arcgisCoordChange=${s=>{this.ymin=s.detail;let r=this.topCoordField.value.checkRelatedField();r&&(this.ymax=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.bottomLessThanTop} .validateRelated=${s=>s<this.convertToNumber(this.ymax)} ${d(this.bottomCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field input-id=left-coord .label=${this.messages.left} .value=${this.strippedInvalidChars(this.xmin)} .errorMessage=${this.formatLongitudeError(this.messages.invalidLeft||"")} min=-180 max=180 @arcgisCoordChange=${s=>{this.xmin=s.detail;let r=this.rightCoordField.value.checkRelatedField();r&&(this.xmax=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.leftLessThanRight} .validateRelated=${s=>s<this.convertToNumber(this.xmax)} ${d(this.leftCoordField)}></arcgis-portal-extent-picker-coord-field><arcgis-portal-extent-picker-coord-field input-id=right-coord .label=${this.messages.right} .value=${this.strippedInvalidChars(this.xmax)} .errorMessage=${this.formatLongitudeError(this.messages.invalidRight||"")} min=-180 max=180 @arcgisCoordChange=${s=>{this.xmax=s.detail;let r=this.leftCoordField.value.checkRelatedField();r&&(this.xmin=r),this.handleInputChange()}} .relatedErrorMessage=${this.messages.rightGreaterThanLeft} .validateRelated=${s=>s>this.convertToNumber(this.xmin)} ${d(this.rightCoordField)}></arcgis-portal-extent-picker-coord-field></calcite-accordion-item></calcite-accordion></div></div><div class="map-panel">${this.loading&&l`<calcite-loader class="map-loader" label="Loading the application"></calcite-loader>`||""}<div class=${F({"map-container":!0,"map-container--loaded":!this.loading})} ${d(this.mapContainer)}></div></div>`}render(){return this.contentOnly?l`<div class="extent-picker-content">${this.renderContent()}</div>`:this.renderModal()}};function f(p){return Math.round(p*1e6)/1e6}M("arcgis-portal-extent-picker",$);return $},"Basemap","Color","config","geometry/Extent","geometry/geometryEngine","geometry/Point","geometry/Polygon","geometry/SpatialReference","geometry/support/webMercatorUtils","Graphic","intl","layers/GraphicsLayer","layers/Layer","layers/TileLayer","Map","portal/PortalItem","request","symbols/SimpleFillSymbol","views/MapView","widgets/Search","widgets/Sketch/SketchViewModel")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./SXZRHHXC.js";import{b as W}from"./JS45DWQ3.js";import{a as T}from"./6W2IHKCA.js";import{a as q}from"./AXM6XCZD.js";import"./IBP5XPD5.js";import"./D76KMXZD.js";import{J as C,K as P,L as J,P as A,R as B,h as R,j as y,o as N,q as S,r as j,v as E}from"./JV23HJTE.js";import"./UZLQALHY.js";export default $arcgis.t(([le,Ie,ve,Fe,x,de,I,pe,fe,L,Z,$,ee,{g:G,i:z,j:V,k:U,l:_,m:H,n:K,o:Q,p:X,q:Y}])=>{var k=(i=>(i.expression="expression/",i))(k||{});function F(i){return i!=null}function te(i,e,t){let s=e.fieldName;if(s.includes(k.expression)){let r=t.get(s);return r?.title?r.title:s}else return ee.supportsFieldConfiguration(i)&&i.getFieldConfiguration(s)?i.getFieldAlias(s)||s:e.label||s}function se(i,e,t){let s="";if(/^raster.(?:item|service)pixelvalue/iu.test(i))s="number";else if(e.has(i)){let r=e.get(i);s=r.type?r.type.toLowerCase():""}else if(t.has(i)){let r=t.get(i);s=r.returnType?r.returnType.toLowerCase():""}else s="number";return s}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(t=>{let s=`${k.expression}${t.name}`;e.set(s,t)}),e}async function me(i){return await new Promise((e,t)=>{switch(i.type){case"feature":case"ogc-feature":case"stream":e(i.fields);break;case"sublayer":{let s=i,r=s?.layer;r?.portalItem&&r.url.includes("https://demographics")&&r.url.includes(".arcgis.com")?r.portalItem?.fetchData().then(a=>{if(a?.thematicGroup){let o=new Map(s.fields.map(n=>[n.name,n])),c=a.thematicGroup.fieldNames,p=[];c.forEach(n=>{o.has(n)&&p.push(o.get(n))}),e(p)}else e(s.fields)}).catch(a=>{t(new Error(a))}):e(s.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,t,s){if(!t)return!1;let r=["feature","oriented-imagery"].includes(e.type),a=s?.item??e.portalItem,o=e.sourceJSON;if(!r||!a||!a.portal.user||!U(a)||V(a)||_(a)||H(o)||a.portal.isPortal&&z(a)||["oid","global-id","geometry"].includes(t.type)||await ue(e,t.name,s))return!1;let c=e.sourceJSON.geometryProperties,p=c?.shapeLengthFieldName,n=c?.shapeAreaFieldName;if(d(p,t.name)||d(n,t.name))return!1;let l=e.editFieldsInfo;if(l&&(d(l.creationDateField,t.name)||d(l.creatorField,t.name)||d(l.editDateField,t.name)||d(l.editorField,t.name))||d(e.objectIdField,t.name)||d(e.displayField,t.name)||d(e.typeIdField,t.name)||d(e.subtypeField,t.name)||e.timeInfo&&(d(e.timeInfo.startField,t.name)||d(e.timeInfo.endField,t.name)||d(e.timeInfo.trackIdField,t.name)))return!1;if(!s?.ignoreLayerRenderer&&e.featureReduction){let f=new Set;if(await I.collectFeatureReductionFields(f,e,e.featureReduction),Array.from(f).some(b=>d(b,t.name)))return!1}if(!s?.ignoreLayerRenderer&&(await I.getRendererFields(e.renderer,e.fieldsIndex)).some(f=>d(f,t.name)))return!1;if(!s?.ignoreLayerLabelingInfo){let f=e.labelingInfo?.map(b=>b.labelExpressionInfo?.expression);if(f&&((await I.getExpressionFields(e,f)).some(b=>d(b,t.name))||await oe(e,t,"layer")))return!1}if(!s?.ignoreLayerDefinitionExpression&&e.definitionExpression&&(await $.parseWhereClause(e.definitionExpression,e.fieldsIndex)).fieldNames.some(f=>d(f,t.name))||await ge(e,t,s)||await ye(e,t))return!1;if(await be(e,t))return await Promise.resolve(!1);if(await we(e,t))return await Promise.resolve(!1);if(he(i,e,t)||e.relationships?.map(f=>f.keyField)?.some(f=>d(f,t.name)))return!1;let u=G(a,a.portal.user),v=s?.userItemInfo?.userGroups??await K(e)??[],g=s?.userItemInfo?.itemGroups??await Q(e)??[],w=Y(v,g);if(!u&&!w)return!1;let m=s?.userItemInfo?.relatedItems??await X(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,t){let s=`${i.url}/${i.layerId}/fieldGroups`;try{let r=t?.userItemInfo&&"fieldGroups"in t.userItemInfo?t.userItemInfo.fieldGroups:(await Z(s,{query:{f:"json"},responseType:"json"}))?.data?.fieldGroups;return r?r.some(a=>a.fields.some(o=>d(o,e))):!1}catch{return!1}}function he(i,e,t){if(!i)return!1;let s=i.map?.applicationProperties?.viewing?.search;if(s){let r=s.layers?.find(a=>a.id===e.id);if(r){let a=r?.field?.name;if(a)return d(a,t.name)}}return!1}async function oe(i,e,t){let s=t==="layer"?i.labelingInfo?.filter(o=>F(o.where)):i.sourceJSON?.drawingInfo?.labelingInfo?.filter(o=>F(o.where));if(!s?.length)return!1;let r=[...await Promise.all(s.map(async o=>await $.parseWhereClause(o.where,i.fieldsIndex)))],a=!1;for(let o=0;o<r.length;o++){let c=r[o].fieldNames?.some(p=>d(p,e.name));if(!a&&c){a=!0;break}}return await Promise.resolve(a)}async function ge(i,e,t){let s=i.portalItem;if(!s)return!1;let r=`${T(s.portal)}content/items/${s.id}/data`,a=(t?.userItemInfo?.itemData??await Z(r,{query:{f:"json"},responseType:"json"}))?.data;if(!a)return!1;if(a?.layers){let o=a.layers.find(l=>l.id===i.layerId),c=o?.layerDefinition?.drawingInfo?.renderer,p=o?.layerDefinition?.featureReduction,n=o?.layerDefinition?.definitionExpression;if(!c&&!p&&!n)return!1;if(!t?.ignoreItemRenderer&&c){let l=L.fromJSON(c);if((await I.getRendererFields(l,i.fieldsIndex)).some(u=>d(u,e.name)))return!0}if(!t?.ignoreItemFeatureReduction&&p&&await ne(i,e,p)||n&&(await $.parseWhereClause(n,i.fieldsIndex)).fieldNames.some(l=>d(l,e.name)))return!0}return!1}async function ye(i,e){let t=i.sourceJSON,s=t?.drawingInfo?.renderer,r=t?.featureReduction;if(!s&&!r)return!1;if(s){let a=L.fromJSON(s);if((await I.getRendererFields(a,i.fieldsIndex)).some(o=>d(o,e.name)))return!0}return!!(r&&await ne(i,e,r))}async function be(i,e){let t=i.sourceJSON?.drawingInfo?.labelingInfo;if(!t)return await Promise.resolve(!1);let s=t?.map(r=>r.labelExpressionInfo?.expression);if(s){if((await I.getExpressionFields(i,s)).some(r=>d(r,e.name)))return await Promise.resolve(!0);if(await oe(i,e,"service"))return await Promise.resolve(!0)}return await Promise.resolve(!1)}async function we(i,e){let t=i.sourceJSON?.definitionQuery;return t?(await $.parseWhereClause(t,i.fieldsIndex)).fieldNames.some(s=>d(s,e.name))?await Promise.resolve(!0):await Promise.resolve(!1):await Promise.resolve(!1)}async function ne(i,e,t){let s=t.type==="binning"?pe.fromJSON(t):fe.fromJSON(t),r=new Set;return await I.collectFeatureReductionFields(r,i,s),!!Array.from(r).some(a=>d(a,e.name))}var h=new Map;h.set("oid","key");h.set("guid","key");h.set("global-id","key");h.set("blob","binary");h.set("integer","integer");h.set("small-integer","integer");h.set("big-integer","integer");h.set("single","number");h.set("double","number");h.set("long","number");h.set("number","number");h.set("date","date-time");h.set("date-only","calendar");h.set("time-only","clock");h.set("timestamp-offset","time-zone");h.set("string","string");var Ne=({fieldType:i})=>y`<calcite-icon scale=s .icon=${h.get(i)}></calcite-icon>`,Ee=R`.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}`,O=class extends J{constructor(){super(...arguments),this.arcadeExpMap=new Map,this.cancelNode=C(),this.dialogNode=C(),this.layerFields=[],this.layerFieldsMap=new Map,this.messages=q({blocking:!0}),this.deleteInProgress=!1,this.fieldsAreDeletable=!1,this._propWatcherTask=new W(this,{task:async([e,t])=>{let s=F(e)&&F(t);if(F(e)||N("error",this,S("layer")),F(t)||N("error",this,S("fieldNames")),!s)throw new Error("Required properties are missing");this._propWatcherTask.autoRun=!1,await this.processProps()},args:()=>[this.layer,this.fieldNames]}),this.arcgisBeforeModalClose=E(),this.arcgisClose=E(),this.arcgisBeforeDelete=E(),this.arcgisFieldsDeleted=E()}static{this.properties={config:0,fieldNames:0,layer:0,mapView:0,options:0}}static{this.styles=Ee}async processProps(){let{layer:e,mapView:t,fieldNames:s}=this;if(!e||!s){this.fieldsAreDeletable=!1;return}e.loaded||await e.load(),this.layerFields=e.fields.filter(a=>s.includes(a.name));let r=s.some(a=>!e.fields.find(o=>o.name===a));if(!this.layerFields?.length||r)this.fieldsAreDeletable=!1;else{let a=await Promise.all(this.layerFields.map(async o=>await ae(t,e,o,this.options)));if(this.fieldsAreDeletable=a.every(o=>o),!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 Fe.getCredential(this.item.url.replace("rest/services","rest/admin/services"))}getFieldLabel(e){let{layer:t,arcadeExpMap:s}=this;if(this.options?.ignorePopupTemplate)return this.getFieldDisplayNameFromLayerFields(e);{let r=(t.popupTemplate??t.createPopupTemplate()).fieldInfos?.find(a=>a.fieldName===e);return r?te(t,r,s):this.getFieldDisplayNameFromLayerFields(e)}}getFieldDisplayNameFromLayerFields(e){let{layer:t}=this,s=this.layerFieldsMap.get(e);return de.supportsFieldConfiguration(t)?t.getFieldAlias(e):s.alias??s.name}async deleteFields(){let{layer:e,fieldNames:t}=this,s=`${e.url.replace("/rest/services","/rest/admin/services")}/${e.layerId}/deleteFromDefinition`,r={fields:t.map(o=>({name:o}))},a={deleteFromDefinition:JSON.stringify(r)};await x(s,{query:{...a,f:"json",async:!1},method:"post",responseType:"json"}).then(async o=>{if(o.data?.success){let c=`${e.url}/${e.layerId}`;t.forEach(n=>{e.type==="feature"&&e.floorInfo?.floorField===n&&(e.floorInfo=null)});let p=await x(c,{query:{f:"json"},responseType:"json"});if(p){let n=p.data;this.currentLayerInfo=p.data,n&&(this.updateTypesAndTemplatesOnLayer(),t.forEach(l=>{n.templates?.length?n.templates.forEach(u=>delete u.prototype.attributes[l]):n.types?.forEach(u=>{u.templates.forEach(v=>delete v.prototype.attributes[l])})}),this.updateFeatureService(n))}else this.handleError()}},()=>this.handleError())}updateTypesAndTemplatesOnLayer(){let{currentLayerInfo:e}=this,t=e;if(t.templates?.length){let s=this.updateTemplatesList(t.templates);t.templates=s}else if(t.types){let s=t.types;t.types=[],s.forEach(r=>{r.templates=this.updateTemplatesList(r.templates),this.addType(t,r)})}}updateTemplatesList(e){let{currentLayerInfo:t,messages:s}=this,r=[];return(e??[]).forEach(a=>{let o=new Ie;o.description=a.description??"",o.name=a.name||s.newFeature,o.drawingTool=a.drawingTool||"point";let c={};t.fields.forEach(n=>{let l=!1;for(let u=0;u<a.prototype.attributes.length;u++)if(a.prototype.attributes[u]===n.name){l=!0,c[n.name]=a.prototype.attributes[n.name];break}!l&&n.editable&&(c[n.name]=n.defaultValue||null)});let p=new ve({attributes:c});o.prototype=p,r.push(o)}),r}addType(e,t){e.types?e.types.some(s=>s.id===t.id)||e.types.push(t):e.types=[t]}async updateFeatureService(e){let{layer:t,fieldNames:s}=this,r={templates:e.templates,types:e.types},a=`${t.url.replace("/rest/services","/rest/admin/services")}/${t.layerId}/updateDefinition`,o={f:"json",updateDefinition:JSON.stringify(r)};await x(a,{query:{...o,f:"json"},method:"post",responseType:"json"}).then(async c=>{if(c.data?.success){let p=`${T(this.portal)}content/items/${this.item.id}/data`;if(this.options?.ignorePopupTemplate||s.forEach(n=>{t.popupTemplate?.fieldInfos&&(t.popupTemplate.fieldInfos=t.popupTemplate.fieldInfos.filter(l=>l.fieldName!==n)),t.popupTemplate?.content?.forEach((l,u)=>{l.type==="fields"&&l.fieldInfos&&((t.popupTemplate?.content)[u].fieldInfos=(t.popupTemplate?.content)[u].fieldInfos?.filter(v=>v.fieldName!==n))})}),t.attributeTableTemplate){let n=t.attributeTableTemplate.clone();n.elements=n.elements.filter(l=>!(l.type==="field"&&s.includes(l.fieldName))),n.orderByFields=n.orderByFields.filter(l=>!s.includes(l.field)),t.attributeTableTemplate=n}if(t.fieldConfigurations?.length){let n=le.clone(t.fieldConfigurations).filter(l=>!s.includes(l.name));t.fieldConfigurations=n}await x(p,{query:{f:"json"},responseType:"json"}).then(async n=>{let l=n.data;if(l?.layers||l?.tables){let u=t.isTable,v=u?l.tables:l.layers,g=v?.find(w=>w.id===t.layerId);if(s.forEach(w=>{g?.attributeTableInfo?.attributeTableElements&&(g.attributeTableInfo.attributeTableElements=g.attributeTableInfo.attributeTableElements.map(m=>{if(m.type==="field")return m.fieldName===w?void 0:m;if(m.type==="group"&&Array.isArray(m.attributeTableElements)){let f=m.attributeTableElements.filter(b=>!(b.type==="field"&&b.fieldName===w));return f.length?{...m,attributeTableElements:f}:void 0}return m}).filter(Boolean),g.attributeTableInfo.orderByFields=g.attributeTableInfo.orderByFields.filter(m=>m.field!==w))}),g?.layerDefinition?.fieldConfigurations&&(g.layerDefinition.fieldConfigurations=g.layerDefinition.fieldConfigurations.filter(w=>!s.includes(w.name))),g?.popupInfo){s.forEach(b=>{g.popupInfo.fieldInfos=g.popupInfo.fieldInfos.filter(D=>D.fieldName!==b),g.popupInfo.popupElements?.forEach((D,M)=>{D.type==="fields"&&D.fieldInfos&&(g.popupInfo.popupElements[M].fieldInfos=g.popupInfo.popupElements[M].fieldInfos.filter(ce=>ce.fieldName!==b))})});let w=`${T(this.portal)}content/users/${this.item.owner}/items/${this.item.id}/update`,m={};u?(m.tables=v,l.layers&&(m.layers=l.layers)):(m.layers=v,l.tables&&(m.tables=l.tables));let f={f:"json",text:JSON.stringify(m)};await x(w,{query:{...f},method:"post",responseType:"json"}).then(b=>{b.data?.success?this.handleSuccess():this.handleError()},()=>this.handleError())}else this.handleSuccess()}else n.httpStatus===200&&(!n.data||JSON.stringify(n.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:t}=this;this.successAlertNode&&(this.successAlertNode.parentElement?.removeChild(this.successAlertNode),this.successAlertNode=void 0),this.successAlertNode=A(y`<calcite-alert .label=${t.length===1?e.fieldDeleted:e.fieldsDeleted} kind=success icon=check-circle auto-close open><div slot=message>${t.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=A(y`<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:t}=this;this.errorAlertNode&&(this.errorAlertNode.parentElement?.removeChild(this.errorAlertNode),this.errorAlertNode=void 0),this.errorAlertNode=A(y`<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>${t.isPortal?e.readOnlyErrorMessageEnterprise:e.readOnlyErrorMessage}</div>${!t.isPortal&&y`<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:t,fieldNames:s,deleteInProgress:r}=this;return this._propWatcherTask.render({complete:()=>(t||(s?.length?s?.length===1?N("error",this,"Field cannot be deleted"):N("error",this,"One or more fields cannot be deleted"):N("error",this,j("fieldNames"))),y`<calcite-dialog class="dialog" width=s open modal outside-close-disabled escape-disabled @calciteDialogClose=${()=>this.arcgisClose.emit()} .heading=${s?.length===1?e.deleteField:e.deleteFields} ${P(this.dialogNode)}>${t?y`<div class=${`dialog-content-wrapper ${r?"hide-overflow":""}`}>${this.renderDeleteLoader()}<calcite-label>${s.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 y`<div class="loader-container active"><div class="loader-text">${e.errorOccurred}</div></div>`}renderDeleteLoader(){let{messages:e,fieldNames:t,deleteInProgress:s}=this;return y`<div class=${`loader-container ${s?"active":""}`}><calcite-loader class="loader" .label=${t.length===1?e.deletingField:e.deletingFields} .hidden=${!s}></calcite-loader><div class="loader-text">${t.length===1?e.deletingField:e.deletingFields}</div></div>`}renderFieldsPreview(){let{fieldNames:e,layerFields:t,layerFieldsMap:s,arcadeExpMap:r,messages:a}=this;return y`<calcite-list .label=${a.fields}>${e.map(o=>{let c=t.find(p=>p.name===o);return y`<calcite-list-item .label=${this.getFieldLabel(o)} .description=${`{${o}}`} .value=${o} .disabled=${!c.editable}><div slot=actions-end class="field-icons">${Ne({fieldType:se(o,s,r)})}</div></calcite-list-item>`})}</calcite-list>`}renderCancelButton(){let{messages:e}=this;return y`<calcite-button @click=${()=>this.dialogNode.value.open=!1} slot=footer-end appearance=outline ${P(this.cancelNode)}>${e.cancel}</calcite-button>`}renderDeleteButton(){let{messages:e,fieldNames:t}=this;return y`<calcite-button kind=danger slot=footer-end @click=${async s=>{let{portal:r}=this;s.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())}}>${t.length===1?e.deleteField:e.deleteFieldsWithNumber.replace("${number}",`${t.length}`)}</calcite-button>`}};B("arcgis-portal-field-delete",O);return O},"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)
2
+ import a from"./U2QZZSPC.js";import{b as W}from"./VMNR4TQZ.js";import{c as T}from"./6D3PU4ZT.js";import{a as q}from"./OFDH6CTA.js";import"./BUKOHPY6.js";import"./XQJNAQVO.js";import{K as C,L as P,M as J,Q as A,S as B,h as R,j as y,p as N,r as S,s as j,w as E}from"./STZRXY35.js";import"./UZLQALHY.js";export default $arcgis.t(([le,Ie,ve,Fe,x,de,I,pe,fe,k,Z,$,ee,{g:G,i:z,j:V,k:U,l:_,m:H,n:K,o:Q,p:X,q:Y}])=>{var L=(i=>(i.expression="expression/",i))(L||{});function F(i){return i!=null}function te(i,e,t){let s=e.fieldName;if(s.includes(L.expression)){let r=t.get(s);return r?.title?r.title:s}else return ee.supportsFieldConfiguration(i)&&i.getFieldConfiguration(s)?i.getFieldAlias(s)||s:e.label||s}function se(i,e,t){let s="";if(/^raster.(?:item|service)pixelvalue/iu.test(i))s="number";else if(e.has(i)){let r=e.get(i);s=r.type?r.type.toLowerCase():""}else if(t.has(i)){let r=t.get(i);s=r.returnType?r.returnType.toLowerCase():""}else s="number";return s}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(t=>{let s=`${L.expression}${t.name}`;e.set(s,t)}),e}async function me(i){return await new Promise((e,t)=>{switch(i.type){case"feature":case"ogc-feature":case"stream":e(i.fields);break;case"sublayer":{let s=i,r=s?.layer;r?.portalItem&&r.url.includes("https://demographics")&&r.url.includes(".arcgis.com")?r.portalItem?.fetchData().then(a=>{if(a?.thematicGroup){let o=new Map(s.fields.map(n=>[n.name,n])),c=a.thematicGroup.fieldNames,p=[];c.forEach(n=>{o.has(n)&&p.push(o.get(n))}),e(p)}else e(s.fields)}).catch(a=>{t(new Error(a))}):e(s.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,t,s){if(!t)return!1;let r=["feature","oriented-imagery"].includes(e.type),a=s?.item??e.portalItem,o=e.sourceJSON;if(!r||!a||!a.portal.user||!U(a)||V(a)||_(a)||H(o)||a.portal.isPortal&&z(a)||["oid","global-id","geometry"].includes(t.type)||await ue(e,t.name,s))return!1;let c=e.sourceJSON.geometryProperties,p=c?.shapeLengthFieldName,n=c?.shapeAreaFieldName;if(d(p,t.name)||d(n,t.name))return!1;let l=e.editFieldsInfo;if(l&&(d(l.creationDateField,t.name)||d(l.creatorField,t.name)||d(l.editDateField,t.name)||d(l.editorField,t.name))||d(e.objectIdField,t.name)||d(e.displayField,t.name)||d(e.typeIdField,t.name)||d(e.subtypeField,t.name)||e.timeInfo&&(d(e.timeInfo.startField,t.name)||d(e.timeInfo.endField,t.name)||d(e.timeInfo.trackIdField,t.name)))return!1;if(!s?.ignoreLayerRenderer&&e.featureReduction){let f=new Set;if(await I.collectFeatureReductionFields(f,e,e.featureReduction),Array.from(f).some(b=>d(b,t.name)))return!1}if(!s?.ignoreLayerRenderer&&(await I.getRendererFields(e.renderer,e.fieldsIndex)).some(f=>d(f,t.name)))return!1;if(!s?.ignoreLayerLabelingInfo){let f=e.labelingInfo?.map(b=>b.labelExpressionInfo?.expression);if(f&&((await I.getExpressionFields(e,f)).some(b=>d(b,t.name))||await oe(e,t,"layer")))return!1}if(!s?.ignoreLayerDefinitionExpression&&e.definitionExpression&&(await $.parseWhereClause(e.definitionExpression,e.fieldsIndex)).fieldNames.some(f=>d(f,t.name))||await ge(e,t,s)||await ye(e,t))return!1;if(await be(e,t))return await Promise.resolve(!1);if(await we(e,t))return await Promise.resolve(!1);if(he(i,e,t)||e.relationships?.map(f=>f.keyField)?.some(f=>d(f,t.name)))return!1;let u=G(a,a.portal.user),v=s?.userItemInfo?.userGroups??await K(e)??[],g=s?.userItemInfo?.itemGroups??await Q(e)??[],w=Y(v,g);if(!u&&!w)return!1;let m=s?.userItemInfo?.relatedItems??await X(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,t){let s=`${i.url}/${i.layerId}/fieldGroups`;try{let r=t?.userItemInfo&&"fieldGroups"in t.userItemInfo?t.userItemInfo.fieldGroups:(await Z(s,{query:{f:"json"},responseType:"json"}))?.data?.fieldGroups;return r?r.some(a=>a.fields.some(o=>d(o,e))):!1}catch{return!1}}function he(i,e,t){if(!i)return!1;let s=i.map?.applicationProperties?.viewing?.search;if(s){let r=s.layers?.find(a=>a.id===e.id);if(r){let a=r?.field?.name;if(a)return d(a,t.name)}}return!1}async function oe(i,e,t){let s=t==="layer"?i.labelingInfo?.filter(o=>F(o.where)):i.sourceJSON?.drawingInfo?.labelingInfo?.filter(o=>F(o.where));if(!s?.length)return!1;let r=[...await Promise.all(s.map(async o=>await $.parseWhereClause(o.where,i.fieldsIndex)))],a=!1;for(let o=0;o<r.length;o++){let c=r[o].fieldNames?.some(p=>d(p,e.name));if(!a&&c){a=!0;break}}return await Promise.resolve(a)}async function ge(i,e,t){let s=i.portalItem;if(!s)return!1;let r=`${T(s.portal)}content/items/${s.id}/data`,a=(t?.userItemInfo?.itemData??await Z(r,{query:{f:"json"},responseType:"json"}))?.data;if(!a)return!1;if(a?.layers){let o=a.layers.find(l=>l.id===i.layerId),c=o?.layerDefinition?.drawingInfo?.renderer,p=o?.layerDefinition?.featureReduction,n=o?.layerDefinition?.definitionExpression;if(!c&&!p&&!n)return!1;if(!t?.ignoreItemRenderer&&c){let l=k.fromJSON(c);if((await I.getRendererFields(l,i.fieldsIndex)).some(u=>d(u,e.name)))return!0}if(!t?.ignoreItemFeatureReduction&&p&&await ne(i,e,p)||n&&(await $.parseWhereClause(n,i.fieldsIndex)).fieldNames.some(l=>d(l,e.name)))return!0}return!1}async function ye(i,e){let t=i.sourceJSON,s=t?.drawingInfo?.renderer,r=t?.featureReduction;if(!s&&!r)return!1;if(s){let a=k.fromJSON(s);if((await I.getRendererFields(a,i.fieldsIndex)).some(o=>d(o,e.name)))return!0}return!!(r&&await ne(i,e,r))}async function be(i,e){let t=i.sourceJSON?.drawingInfo?.labelingInfo;if(!t)return await Promise.resolve(!1);let s=t?.map(r=>r.labelExpressionInfo?.expression);if(s){if((await I.getExpressionFields(i,s)).some(r=>d(r,e.name)))return await Promise.resolve(!0);if(await oe(i,e,"service"))return await Promise.resolve(!0)}return await Promise.resolve(!1)}async function we(i,e){let t=i.sourceJSON?.definitionQuery;return t?(await $.parseWhereClause(t,i.fieldsIndex)).fieldNames.some(s=>d(s,e.name))?await Promise.resolve(!0):await Promise.resolve(!1):await Promise.resolve(!1)}async function ne(i,e,t){let s=t.type==="binning"?pe.fromJSON(t):fe.fromJSON(t),r=new Set;return await I.collectFeatureReductionFields(r,i,s),!!Array.from(r).some(a=>d(a,e.name))}var h=new Map;h.set("oid","key");h.set("guid","key");h.set("global-id","key");h.set("blob","binary");h.set("integer","integer");h.set("small-integer","integer");h.set("big-integer","integer");h.set("single","number");h.set("double","number");h.set("long","number");h.set("number","number");h.set("date","date-time");h.set("date-only","calendar");h.set("time-only","clock");h.set("timestamp-offset","time-zone");h.set("string","string");var Ne=({fieldType:i})=>y`<calcite-icon scale=s .icon=${h.get(i)}></calcite-icon>`,Ee=R`.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}`,O=class extends J{constructor(){super(...arguments),this.arcadeExpMap=new Map,this.cancelNode=C(),this.dialogNode=C(),this.layerFields=[],this.layerFieldsMap=new Map,this.messages=q({blocking:!0}),this.deleteInProgress=!1,this.fieldsAreDeletable=!1,this._propWatcherTask=new W(this,{task:async([e,t])=>{let s=F(e)&&F(t);if(F(e)||N("error",this,S("layer")),F(t)||N("error",this,S("fieldNames")),!s)throw new Error("Required properties are missing");this._propWatcherTask.autoRun=!1,await this.processProps()},args:()=>[this.layer,this.fieldNames]}),this.arcgisBeforeModalClose=E(),this.arcgisClose=E(),this.arcgisBeforeDelete=E(),this.arcgisFieldsDeleted=E()}static{this.properties={config:0,fieldNames:0,layer:0,mapView:0,options:0}}static{this.styles=Ee}async processProps(){let{layer:e,mapView:t,fieldNames:s}=this;if(!e||!s){this.fieldsAreDeletable=!1;return}e.loaded||await e.load(),this.layerFields=e.fields.filter(a=>s.includes(a.name));let r=s.some(a=>!e.fields.find(o=>o.name===a));if(!this.layerFields?.length||r)this.fieldsAreDeletable=!1;else{let a=await Promise.all(this.layerFields.map(async o=>await ae(t,e,o,this.options)));if(this.fieldsAreDeletable=a.every(o=>o),!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 Fe.getCredential(this.item.url.replace("rest/services","rest/admin/services"))}getFieldLabel(e){let{layer:t,arcadeExpMap:s}=this;if(this.options?.ignorePopupTemplate)return this.getFieldDisplayNameFromLayerFields(e);{let r=(t.popupTemplate??t.createPopupTemplate()).fieldInfos?.find(a=>a.fieldName===e);return r?te(t,r,s):this.getFieldDisplayNameFromLayerFields(e)}}getFieldDisplayNameFromLayerFields(e){let{layer:t}=this,s=this.layerFieldsMap.get(e);return de.supportsFieldConfiguration(t)?t.getFieldAlias(e):s.alias??s.name}async deleteFields(){let{layer:e,fieldNames:t}=this,s=`${e.url.replace("/rest/services","/rest/admin/services")}/${e.layerId}/deleteFromDefinition`,r={fields:t.map(o=>({name:o}))},a={deleteFromDefinition:JSON.stringify(r)};await x(s,{query:{...a,f:"json",async:!1},method:"post",responseType:"json"}).then(async o=>{if(o.data?.success){let c=`${e.url}/${e.layerId}`;t.forEach(n=>{e.type==="feature"&&e.floorInfo?.floorField===n&&(e.floorInfo=null)});let p=await x(c,{query:{f:"json"},responseType:"json"});if(p){let n=p.data;this.currentLayerInfo=p.data,n&&(this.updateTypesAndTemplatesOnLayer(),t.forEach(l=>{n.templates?.length?n.templates.forEach(u=>delete u.prototype.attributes[l]):n.types?.forEach(u=>{u.templates.forEach(v=>delete v.prototype.attributes[l])})}),this.updateFeatureService(n))}else this.handleError()}},()=>this.handleError())}updateTypesAndTemplatesOnLayer(){let{currentLayerInfo:e}=this,t=e;if(t.templates?.length){let s=this.updateTemplatesList(t.templates);t.templates=s}else if(t.types){let s=t.types;t.types=[],s.forEach(r=>{r.templates=this.updateTemplatesList(r.templates),this.addType(t,r)})}}updateTemplatesList(e){let{currentLayerInfo:t,messages:s}=this,r=[];return(e??[]).forEach(a=>{let o=new Ie;o.description=a.description??"",o.name=a.name||s.newFeature,o.drawingTool=a.drawingTool||"point";let c={};t.fields.forEach(n=>{let l=!1;for(let u=0;u<a.prototype.attributes.length;u++)if(a.prototype.attributes[u]===n.name){l=!0,c[n.name]=a.prototype.attributes[n.name];break}!l&&n.editable&&(c[n.name]=n.defaultValue||null)});let p=new ve({attributes:c});o.prototype=p,r.push(o)}),r}addType(e,t){e.types?e.types.some(s=>s.id===t.id)||e.types.push(t):e.types=[t]}async updateFeatureService(e){let{layer:t,fieldNames:s}=this,r={templates:e.templates,types:e.types},a=`${t.url.replace("/rest/services","/rest/admin/services")}/${t.layerId}/updateDefinition`,o={f:"json",updateDefinition:JSON.stringify(r)};await x(a,{query:{...o,f:"json"},method:"post",responseType:"json"}).then(async c=>{if(c.data?.success){let p=`${T(this.portal)}content/items/${this.item.id}/data`;if(this.options?.ignorePopupTemplate||s.forEach(n=>{t.popupTemplate?.fieldInfos&&(t.popupTemplate.fieldInfos=t.popupTemplate.fieldInfos.filter(l=>l.fieldName!==n)),t.popupTemplate?.content?.forEach((l,u)=>{l.type==="fields"&&l.fieldInfos&&((t.popupTemplate?.content)[u].fieldInfos=(t.popupTemplate?.content)[u].fieldInfos?.filter(v=>v.fieldName!==n))})}),t.attributeTableTemplate){let n=t.attributeTableTemplate.clone();n.elements=n.elements.filter(l=>!(l.type==="field"&&s.includes(l.fieldName))),n.orderByFields=n.orderByFields.filter(l=>!s.includes(l.field)),t.attributeTableTemplate=n}if(t.fieldConfigurations?.length){let n=le.clone(t.fieldConfigurations).filter(l=>!s.includes(l.name));t.fieldConfigurations=n}await x(p,{query:{f:"json"},responseType:"json"}).then(async n=>{let l=n.data;if(l?.layers||l?.tables){let u=t.isTable,v=u?l.tables:l.layers,g=v?.find(w=>w.id===t.layerId);if(s.forEach(w=>{g?.attributeTableInfo?.attributeTableElements&&(g.attributeTableInfo.attributeTableElements=g.attributeTableInfo.attributeTableElements.map(m=>{if(m.type==="field")return m.fieldName===w?void 0:m;if(m.type==="group"&&Array.isArray(m.attributeTableElements)){let f=m.attributeTableElements.filter(b=>!(b.type==="field"&&b.fieldName===w));return f.length?{...m,attributeTableElements:f}:void 0}return m}).filter(Boolean),g.attributeTableInfo.orderByFields=g.attributeTableInfo.orderByFields.filter(m=>m.field!==w))}),g?.layerDefinition?.fieldConfigurations&&(g.layerDefinition.fieldConfigurations=g.layerDefinition.fieldConfigurations.filter(w=>!s.includes(w.name))),g?.popupInfo){s.forEach(b=>{g.popupInfo.fieldInfos=g.popupInfo.fieldInfos.filter(D=>D.fieldName!==b),g.popupInfo.popupElements?.forEach((D,M)=>{D.type==="fields"&&D.fieldInfos&&(g.popupInfo.popupElements[M].fieldInfos=g.popupInfo.popupElements[M].fieldInfos.filter(ce=>ce.fieldName!==b))})});let w=`${T(this.portal)}content/users/${this.item.owner}/items/${this.item.id}/update`,m={};u?(m.tables=v,l.layers&&(m.layers=l.layers)):(m.layers=v,l.tables&&(m.tables=l.tables));let f={f:"json",text:JSON.stringify(m)};await x(w,{query:{...f},method:"post",responseType:"json"}).then(b=>{b.data?.success?this.handleSuccess():this.handleError()},()=>this.handleError())}else this.handleSuccess()}else n.httpStatus===200&&(!n.data||JSON.stringify(n.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:t}=this;this.successAlertNode&&(this.successAlertNode.parentElement?.removeChild(this.successAlertNode),this.successAlertNode=void 0),this.successAlertNode=A(y`<calcite-alert .label=${t.length===1?e.fieldDeleted:e.fieldsDeleted} kind=success icon=check-circle auto-close open><div slot=message>${t.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=A(y`<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:t}=this;this.errorAlertNode&&(this.errorAlertNode.parentElement?.removeChild(this.errorAlertNode),this.errorAlertNode=void 0),this.errorAlertNode=A(y`<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>${t.isPortal?e.readOnlyErrorMessageEnterprise:e.readOnlyErrorMessage}</div>${!t.isPortal&&y`<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:t,fieldNames:s,deleteInProgress:r}=this;return this._propWatcherTask.render({complete:()=>(t||(s?.length?s?.length===1?N("error",this,"Field cannot be deleted"):N("error",this,"One or more fields cannot be deleted"):N("error",this,j("fieldNames"))),y`<calcite-dialog class="dialog" width=s open modal outside-close-disabled escape-disabled @calciteDialogClose=${()=>this.arcgisClose.emit()} .heading=${s?.length===1?e.deleteField:e.deleteFields} ${P(this.dialogNode)}>${t?y`<div class=${`dialog-content-wrapper ${r?"hide-overflow":""}`}>${this.renderDeleteLoader()}<calcite-label>${s.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 y`<div class="loader-container active"><div class="loader-text">${e.errorOccurred}</div></div>`}renderDeleteLoader(){let{messages:e,fieldNames:t,deleteInProgress:s}=this;return y`<div class=${`loader-container ${s?"active":""}`}><calcite-loader class="loader" .label=${t.length===1?e.deletingField:e.deletingFields} .hidden=${!s}></calcite-loader><div class="loader-text">${t.length===1?e.deletingField:e.deletingFields}</div></div>`}renderFieldsPreview(){let{fieldNames:e,layerFields:t,layerFieldsMap:s,arcadeExpMap:r,messages:a}=this;return y`<calcite-list .label=${a.fields}>${e.map(o=>{let c=t.find(p=>p.name===o);return y`<calcite-list-item .label=${this.getFieldLabel(o)} .description=${`{${o}}`} .value=${o} .disabled=${!c.editable}><div slot=actions-end class="field-icons">${Ne({fieldType:se(o,s,r)})}</div></calcite-list-item>`})}</calcite-list>`}renderCancelButton(){let{messages:e}=this;return y`<calcite-button @click=${()=>this.dialogNode.value.open=!1} slot=footer-end appearance=outline ${P(this.cancelNode)}>${e.cancel}</calcite-button>`}renderDeleteButton(){let{messages:e,fieldNames:t}=this;return y`<calcite-button kind=danger slot=footer-end @click=${async s=>{let{portal:r}=this;s.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())}}>${t.length===1?e.deleteField:e.deleteFieldsWithNumber.replace("${number}",`${t.length}`)}</calcite-button>`}};B("arcgis-portal-field-delete",O);return O},"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)