@arcgis/portal-components 5.2.0-next.7 → 5.2.0-next.71

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 (517) hide show
  1. package/README.md +2 -2
  2. package/dist/cdn/24L3PS2J.js +2 -0
  3. package/dist/cdn/2BUE3JLM.js +2 -0
  4. package/dist/cdn/2C6GSZLF.js +2 -0
  5. package/dist/cdn/2GBRZSEC.js +2 -0
  6. package/dist/cdn/2IIE3YY2.js +660 -0
  7. package/dist/cdn/2RMN34M3.js +2 -0
  8. package/dist/cdn/2WI5FBDF.js +2 -0
  9. package/dist/cdn/3CGDAKQD.js +2 -0
  10. package/dist/cdn/3IA7YX3J.js +2 -0
  11. package/dist/cdn/{GQFWFZXP.js → 3OBIA66A.js} +1 -1
  12. package/dist/cdn/3VHKKQKD.js +2 -0
  13. package/dist/cdn/4JYY326A.js +2 -0
  14. package/dist/cdn/4Q6KHGPX.js +2 -0
  15. package/dist/cdn/4QA4AYHJ.js +3 -0
  16. package/dist/cdn/556LTKMV.js +2 -0
  17. package/dist/cdn/55FL7WQV.js +2 -0
  18. package/dist/cdn/56LBNVWI.js +2 -0
  19. package/dist/cdn/5GK4VL6E.js +2 -0
  20. package/dist/cdn/5YULDF4I.js +2 -0
  21. package/dist/cdn/{7WZHZP6U.js → 63THOLAY.js} +9 -3
  22. package/dist/cdn/66QLSGRO.js +2 -0
  23. package/dist/cdn/{DHHSKOUY.js → 6BUBZ7WC.js} +1 -1
  24. package/dist/cdn/6KVA4AKM.js +2 -0
  25. package/dist/cdn/6TO2BYXU.js +2 -0
  26. package/dist/cdn/7FER4S6E.js +2 -0
  27. package/dist/cdn/7X4JEFCG.js +2 -0
  28. package/dist/cdn/7XINE67Y.js +2 -0
  29. package/dist/cdn/A4AA5T6M.js +2 -0
  30. package/dist/cdn/{WOZDQW3S.js → AAHGOYVY.js} +1 -1
  31. package/dist/cdn/ABNBGV65.js +2 -0
  32. package/dist/cdn/ADHQAGMF.js +2 -0
  33. package/dist/cdn/{QNUYUNEY.js → AQLILDJK.js} +1 -1
  34. package/dist/cdn/AVMIEBYN.js +2 -0
  35. package/dist/cdn/B5OENWBU.js +2 -0
  36. package/dist/cdn/{ZTHTFEYA.js → BGQ633WP.js} +1 -1
  37. package/dist/cdn/{DKBTJJMW.js → C7ZFXRPS.js} +1 -1
  38. package/dist/cdn/CFBSBZSS.js +2 -0
  39. package/dist/cdn/CZQEMMJG.js +2 -0
  40. package/dist/cdn/{GT26WGJS.js → D4VYYWA6.js} +1 -1
  41. package/dist/cdn/EBYEZR4N.js +2 -0
  42. package/dist/cdn/EDPNHNQ2.js +2 -0
  43. package/dist/cdn/F3ODJVJC.js +2 -0
  44. package/dist/cdn/FH2SJYYU.js +2 -0
  45. package/dist/cdn/FL3NSFMY.js +2 -0
  46. package/dist/cdn/FLXTOBVV.js +2 -0
  47. package/dist/cdn/G4HKVJ53.js +2 -0
  48. package/dist/cdn/GIV4XNVY.js +2 -0
  49. package/dist/cdn/GRQL4XCF.js +2 -0
  50. package/dist/cdn/H2WZ3ZHI.js +2 -0
  51. package/dist/cdn/IJ3CLFAU.js +22 -0
  52. package/dist/cdn/IX2DKW34.js +2 -0
  53. package/dist/cdn/JTIPENXE.js +2 -0
  54. package/dist/cdn/JVGCIDQW.js +2 -0
  55. package/dist/cdn/{3PAHY5KA.js → KNRJ3WXR.js} +1 -1
  56. package/dist/cdn/L2BME3WC.js +2 -0
  57. package/dist/cdn/{F6V7MLPY.js → L6KBBJEC.js} +1 -1
  58. package/dist/cdn/LI7PX6XN.js +2 -0
  59. package/dist/cdn/LRADZ46B.js +2 -0
  60. package/dist/cdn/M7DQVQO6.js +2 -0
  61. package/dist/cdn/N4PON7TR.js +2 -0
  62. package/dist/cdn/NDMJK6MD.js +66 -0
  63. package/dist/cdn/OBBYT2AV.js +2 -0
  64. package/dist/cdn/{53MSUMA3.js → OT4PZJNB.js} +17 -1
  65. package/dist/cdn/P5PUXFZT.js +2 -0
  66. package/dist/cdn/PGCNY5GO.js +451 -0
  67. package/dist/cdn/QE4CNVDQ.js +34 -0
  68. package/dist/cdn/{AQWTJKUH.js → QKCV7CY2.js} +10 -8
  69. package/dist/cdn/QS3GXAIH.js +2 -0
  70. package/dist/cdn/QZD2UBOW.js +2 -0
  71. package/dist/cdn/RMXAPW7B.js +2 -0
  72. package/dist/cdn/RPFWESQ4.js +2 -0
  73. package/dist/cdn/RVCPNNVS.js +2 -0
  74. package/dist/cdn/SLSCUAED.js +2 -0
  75. package/dist/cdn/SLTFLCVR.js +99 -0
  76. package/dist/cdn/TGTT2CVD.js +2 -0
  77. package/dist/cdn/{DXCPWJU4.js → TKCE4WYE.js} +1 -1
  78. package/dist/cdn/TQLHU3PC.js +2 -0
  79. package/dist/cdn/UUGX7XW6.js +2 -0
  80. package/dist/cdn/UZCHLKLO.js +2 -0
  81. package/dist/cdn/UZLQALHY.js +2 -0
  82. package/dist/cdn/V4EVETH3.js +2 -0
  83. package/dist/cdn/{RR4BIAPA.js → V4EYW3O6.js} +1 -1
  84. package/dist/cdn/V6VNED6L.js +2 -0
  85. package/dist/cdn/V6ZHHCLD.js +2 -0
  86. package/dist/cdn/VMQIDO4Z.js +2 -0
  87. package/dist/cdn/{74XFARCV.js → VW7DSKPH.js} +1 -1
  88. package/dist/cdn/W2SYL7IJ.js +71 -0
  89. package/dist/cdn/{LQ3DMZ3K.js → W3UBNVKL.js} +1 -1
  90. package/dist/cdn/{W6PSG4GX.js → W4FGRGLV.js} +10 -5
  91. package/dist/cdn/{SYJSVUUR.js → W4SAWMXS.js} +1 -1
  92. package/dist/cdn/WBZLQZYR.js +134 -0
  93. package/dist/cdn/WFBLVCZP.js +2 -0
  94. package/dist/cdn/WQGRTBPJ.js +2 -0
  95. package/dist/cdn/XBK3SKPG.js +2 -0
  96. package/dist/cdn/XDVSCHDD.js +2 -0
  97. package/dist/cdn/XEK22IDA.js +2 -0
  98. package/dist/cdn/{LAFNDBTQ.js → XLLMHJCE.js} +1 -1
  99. package/dist/cdn/Y2XRSYBB.js +2 -0
  100. package/dist/cdn/Y6LXW5X5.js +2 -0
  101. package/dist/cdn/YLXNYRQX.js +2 -0
  102. package/dist/cdn/YPRKDQA4.js +2 -0
  103. package/dist/cdn/YVKSTDL6.js +2 -0
  104. package/dist/cdn/ZIHVOT5D.js +2 -0
  105. package/dist/cdn/assets/portal-account-switcher/t9n/messages.en.json +1 -0
  106. package/dist/cdn/assets/portal-ai-assistant/t9n/messages.en.json +1 -1
  107. package/dist/cdn/assets/portal-browser/t9n/messages.en.json +1 -0
  108. package/dist/cdn/assets/portal-group-badges/t9n/messages.en.json +1 -0
  109. package/dist/cdn/assets/portal-group-browser/t9n/messages.en.json +1 -0
  110. package/dist/cdn/assets/portal-group-card/t9n/messages.en.json +1 -0
  111. package/dist/cdn/assets/portal-item-badges/t9n/messages.en.json +1 -0
  112. package/dist/cdn/assets/portal-item-card/t9n/messages.en.json +1 -0
  113. package/dist/cdn/assets/portal-item-favorite/t9n/messages.en.json +1 -0
  114. package/dist/cdn/assets/portal-item-type/icons/applicationtheme16.svg +1 -0
  115. package/dist/cdn/assets/portal-item-type/icons/applicationtheme32.svg +1 -0
  116. package/dist/cdn/assets/portal-item-type/icons/layout16.svg +1 -0
  117. package/dist/cdn/assets/portal-item-type/icons/layout32.svg +1 -0
  118. package/dist/cdn/assets/portal-item-type/icons/parquetfeaturelayer16.svg +1 -0
  119. package/dist/cdn/assets/portal-item-type/icons/parquetfeaturelayer32.svg +1 -0
  120. package/dist/cdn/assets/portal-item-type/icons/storymapframe16.svg +1 -0
  121. package/dist/cdn/assets/portal-item-type/icons/storymapframe32.svg +1 -0
  122. package/dist/cdn/assets/portal-item-type/t9n/messages.en.json +1 -1
  123. package/dist/cdn/assets/portal-navigation/apps/api-for-python.avif +0 -0
  124. package/dist/cdn/assets/portal-navigation/apps/appstudio.avif +0 -0
  125. package/dist/cdn/assets/portal-navigation/apps/arcade.avif +0 -0
  126. package/dist/cdn/assets/portal-navigation/apps/arcgis-360-vr.avif +0 -0
  127. package/dist/cdn/assets/portal-navigation/apps/arcgis-earth.avif +0 -0
  128. package/dist/cdn/assets/portal-navigation/apps/arcgis-enterprise.avif +0 -0
  129. package/dist/cdn/assets/portal-navigation/apps/arcgis-experience-builder.avif +0 -0
  130. package/dist/cdn/assets/portal-navigation/apps/arcgis-geoanalytics.avif +0 -0
  131. package/dist/cdn/assets/portal-navigation/apps/arcgis-hub.avif +0 -0
  132. package/dist/cdn/assets/portal-navigation/apps/arcgis-online.avif +0 -0
  133. package/dist/cdn/assets/portal-navigation/apps/arcgis-pro.avif +0 -0
  134. package/dist/cdn/assets/portal-navigation/apps/arcgis-reality-studio.avif +0 -0
  135. package/dist/cdn/assets/portal-navigation/apps/arcgis-urban.avif +0 -0
  136. package/dist/cdn/assets/portal-navigation/apps/blank.avif +0 -0
  137. package/dist/cdn/assets/portal-navigation/apps/business-analyst.avif +0 -0
  138. package/dist/cdn/assets/portal-navigation/apps/city-engine.avif +0 -0
  139. package/dist/cdn/assets/portal-navigation/apps/collector.avif +0 -0
  140. package/dist/cdn/assets/portal-navigation/apps/community-analyst.avif +0 -0
  141. package/dist/cdn/assets/portal-navigation/apps/configurable-apps.avif +0 -0
  142. package/dist/cdn/assets/portal-navigation/apps/dashboards-beta.avif +0 -0
  143. package/dist/cdn/assets/portal-navigation/apps/dashboards-classic.avif +0 -0
  144. package/dist/cdn/assets/portal-navigation/apps/data-pipelines.avif +0 -0
  145. package/dist/cdn/assets/portal-navigation/apps/deeplearningstudio.avif +0 -0
  146. package/dist/cdn/assets/portal-navigation/apps/demographics.avif +0 -0
  147. package/dist/cdn/assets/portal-navigation/apps/drone2map.avif +0 -0
  148. package/dist/cdn/assets/portal-navigation/apps/esri-events.avif +0 -0
  149. package/dist/cdn/assets/portal-navigation/apps/essential-apps.avif +0 -0
  150. package/dist/cdn/assets/portal-navigation/apps/excalibur.avif +0 -0
  151. package/dist/cdn/assets/portal-navigation/apps/explorer.avif +0 -0
  152. package/dist/cdn/assets/portal-navigation/apps/field-apps.avif +0 -0
  153. package/dist/cdn/assets/portal-navigation/apps/fieldmaps-beta.avif +0 -0
  154. package/dist/cdn/assets/portal-navigation/apps/fieldmaps-ea.avif +0 -0
  155. package/dist/cdn/assets/portal-navigation/apps/fieldmaps.avif +0 -0
  156. package/dist/cdn/assets/portal-navigation/apps/generic-app.avif +0 -0
  157. package/dist/cdn/assets/portal-navigation/apps/geobim.avif +0 -0
  158. package/dist/cdn/assets/portal-navigation/apps/geoplanner.avif +0 -0
  159. package/dist/cdn/assets/portal-navigation/apps/grid-view-9.avif +0 -0
  160. package/dist/cdn/assets/portal-navigation/apps/indoor.avif +0 -0
  161. package/dist/cdn/assets/portal-navigation/apps/indoors.avif +0 -0
  162. package/dist/cdn/assets/portal-navigation/apps/insights.avif +0 -0
  163. package/dist/cdn/assets/portal-navigation/apps/instant-apps.avif +0 -0
  164. package/dist/cdn/assets/portal-navigation/apps/ips.avif +0 -0
  165. package/dist/cdn/assets/portal-navigation/apps/knowledge-studio.avif +0 -0
  166. package/dist/cdn/assets/portal-navigation/apps/living-atlas.avif +0 -0
  167. package/dist/cdn/assets/portal-navigation/apps/location-platform.avif +0 -0
  168. package/dist/cdn/assets/portal-navigation/apps/map-maker.avif +0 -0
  169. package/dist/cdn/assets/portal-navigation/apps/map-viewer-beta.avif +0 -0
  170. package/dist/cdn/assets/portal-navigation/apps/map-viewer-classic.avif +0 -0
  171. package/dist/cdn/assets/portal-navigation/apps/map-viewer.avif +0 -0
  172. package/dist/cdn/assets/portal-navigation/apps/maps-adobe-cloud.avif +0 -0
  173. package/dist/cdn/assets/portal-navigation/apps/maps-for-office.avif +0 -0
  174. package/dist/cdn/assets/portal-navigation/apps/maps-for-power-bi.avif +0 -0
  175. package/dist/cdn/assets/portal-navigation/apps/maps-for-sharepoint.avif +0 -0
  176. package/dist/cdn/assets/portal-navigation/apps/marketplace.avif +0 -0
  177. package/dist/cdn/assets/portal-navigation/apps/mission.avif +0 -0
  178. package/dist/cdn/assets/portal-navigation/apps/monitor.avif +0 -0
  179. package/dist/cdn/assets/portal-navigation/apps/navigator.avif +0 -0
  180. package/dist/cdn/assets/portal-navigation/apps/notebook.avif +0 -0
  181. package/dist/cdn/assets/portal-navigation/apps/office-apps.avif +0 -0
  182. package/dist/cdn/assets/portal-navigation/apps/open-data.avif +0 -0
  183. package/dist/cdn/assets/portal-navigation/apps/operations-dashboard.avif +0 -0
  184. package/dist/cdn/assets/portal-navigation/apps/ortho-maker.avif +0 -0
  185. package/dist/cdn/assets/portal-navigation/apps/pro-extension.avif +0 -0
  186. package/dist/cdn/assets/portal-navigation/apps/quick-capture.avif +0 -0
  187. package/dist/cdn/assets/portal-navigation/apps/redistricting.avif +0 -0
  188. package/dist/cdn/assets/portal-navigation/apps/runtime.avif +0 -0
  189. package/dist/cdn/assets/portal-navigation/apps/scene-viewer.avif +0 -0
  190. package/dist/cdn/assets/portal-navigation/apps/sites.avif +0 -0
  191. package/dist/cdn/assets/portal-navigation/apps/solutions.avif +0 -0
  192. package/dist/cdn/assets/portal-navigation/apps/story-maps.avif +0 -0
  193. package/dist/cdn/assets/portal-navigation/apps/streetmap-premium.avif +0 -0
  194. package/dist/cdn/assets/portal-navigation/apps/survey123.avif +0 -0
  195. package/dist/cdn/assets/portal-navigation/apps/svg-app-circle.svg +1 -0
  196. package/dist/cdn/assets/portal-navigation/apps/svg-app-icon.svg +1 -0
  197. package/dist/cdn/assets/portal-navigation/apps/track-viewer.avif +0 -0
  198. package/dist/cdn/assets/portal-navigation/apps/user-type-extension-online.avif +0 -0
  199. package/dist/cdn/assets/portal-navigation/apps/user-type-extension.avif +0 -0
  200. package/dist/cdn/assets/portal-navigation/apps/vector-tile-style-editor.avif +0 -0
  201. package/dist/cdn/assets/portal-navigation/apps/velocity.avif +0 -0
  202. package/dist/cdn/assets/portal-navigation/apps/web-app-builder.avif +0 -0
  203. package/dist/cdn/assets/portal-navigation/apps/web-editor.avif +0 -0
  204. package/dist/cdn/assets/portal-navigation/apps/web-mapping.avif +0 -0
  205. package/dist/cdn/assets/portal-navigation/apps/workflow-manager-beta.avif +0 -0
  206. package/dist/cdn/assets/portal-navigation/apps/workflow-manager.avif +0 -0
  207. package/dist/cdn/assets/portal-navigation/apps/workforce.avif +0 -0
  208. package/dist/cdn/assets/portal-navigation/product-logos/advanced-editing-user-type-extension-glyph-32.svg +1 -0
  209. package/dist/cdn/assets/portal-navigation/product-logos/arc-hydro-glyph-32.svg +1 -0
  210. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-360-vr-glyph-32.svg +1 -0
  211. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-api-for-python-glyph-32.svg +1 -0
  212. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-appstudio-glyph-32.svg +1 -0
  213. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-arcade-expression-language-glyph-32.svg +1 -0
  214. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-business-analyst-glyph-32.svg +1 -0
  215. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-cityengine-glyph-32.svg +1 -0
  216. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-collector-glyph-32.svg +1 -0
  217. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-community-analyst-glyph-32.svg +1 -0
  218. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-connectors-for-power-automate-glyph-32.svg +1 -0
  219. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-dashboards-glyph-32.svg +1 -0
  220. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-data-interoperability-glyph-32.svg +1 -0
  221. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-data-pipelines-glyph-32.svg +1 -0
  222. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-data-reviewer-glyph-32.svg +1 -0
  223. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-deep-learning-studio-glyph-32.svg +1 -0
  224. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-drone2map-glyph-32.svg +1 -0
  225. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-earth-glyph-32.svg +1 -0
  226. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-enterprise-glyph-32.svg +1 -0
  227. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-excalibur-glyph-32.svg +1 -0
  228. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-excalibur-gray-glyph-32.svg +1 -0
  229. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-experience-builder-glyph-32.svg +1 -0
  230. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-explorer-glyph-32.svg +1 -0
  231. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-field-maps-designer-ea-glyph-32.svg +1 -0
  232. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-field-maps-glyph-32.svg +1 -0
  233. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-flight-glyph-32.svg +1 -0
  234. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-for-autocad-glyph-32.svg +1 -0
  235. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-for-autodesk-forma-glyph-32.svg +1 -0
  236. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-for-developers-glyph-32.svg +1 -0
  237. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-for-excel-glyph-32.svg +1 -0
  238. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-for-microsoft-365-glyph-32.svg +1 -0
  239. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-for-power-apps-glyph-32.svg +1 -0
  240. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-for-teams-glyph-32.svg +1 -0
  241. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-geoanalytics-engine-glyph-32.svg +1 -0
  242. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-geobim-glyph-32.svg +1 -0
  243. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-geoplanner-glyph-32.svg +1 -0
  244. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-hub-glyph-32.svg +1 -0
  245. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-image-glyph-32.svg +1 -0
  246. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-indoors-glyph-32.svg +1 -0
  247. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-insights-glyph-32.svg +1 -0
  248. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-instant-apps-glyph-32.svg +1 -0
  249. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-knowledge-glyph-32.svg +1 -0
  250. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-living-atlas-of-the-world-glyph-32.svg +1 -0
  251. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-location-platform-glyph-32.svg +1 -0
  252. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-logo-glyph-32.svg +76 -0
  253. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-maps-for-adobe-creative-cloud-glyph-32.svg +1 -0
  254. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-maps-for-power-bi-glyph-32.svg +1 -0
  255. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-maps-for-sharepoint-glyph-32.svg +1 -0
  256. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-maps-sdk-for-javascript-glyph-32.svg +1 -0
  257. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-maps-sdks-for-game-engines-glyph-32.svg +1 -0
  258. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-maps-sdks-for-native-apps-glyph-32.svg +1 -0
  259. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-maritime-glyph-32.svg +1 -0
  260. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-marketplace-glyph-32.svg +1 -0
  261. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-mission-glyph-32.svg +1 -0
  262. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-monitor-glyph-32.svg +1 -0
  263. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-monitor-white-glyph-32.svg +1 -0
  264. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-navigator-glyph-32.svg +1 -0
  265. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-notebooks-glyph-32.svg +1 -0
  266. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-online-glyph-32.svg +1 -0
  267. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-open-data-glyph-32.svg +1 -0
  268. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-open-source-apps-glyph-32.svg +1 -0
  269. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-ortho-maker-glyph-32.svg +1 -0
  270. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-parcel-fabric-glyph-32.svg +1 -0
  271. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-pipeline-referencing-glyph-32.svg +1 -0
  272. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-pro-for-intelligence-glyph-32.svg +1 -0
  273. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-pro-glyph-32.svg +1 -0
  274. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-quickcapture-glyph-32.svg +1 -0
  275. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-reality-studio-glyph-32.svg +1 -0
  276. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-roads-and-highways-glyph-32.svg +1 -0
  277. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-sites-glyph-32.svg +1 -0
  278. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-solutions-glyph-32.svg +1 -0
  279. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-storymaps-glyph-32.svg +1 -0
  280. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-streetmap-premium-glyph-32.svg +1 -0
  281. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-survey123-connect-glyph-32.svg +1 -0
  282. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-survey123-glyph-32.svg +1 -0
  283. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-tracker-glyph-32.svg +1 -0
  284. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-urban-glyph-32.svg +1 -0
  285. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-utility-network-management-glyph-32.svg +1 -0
  286. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-velocity-glyph-32.svg +6 -0
  287. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-web-appbuilder-glyph-32.svg +1 -0
  288. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-web-editor-glyph-32.svg +1 -0
  289. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-workflow-manager-glyph-32.svg +1 -0
  290. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-workforce-glyph-32.svg +1 -0
  291. package/dist/cdn/assets/portal-navigation/product-logos/arcgis-world-geocoder-glyph-32.svg +1 -0
  292. package/dist/cdn/assets/portal-navigation/product-logos/calcite-design-system-glyph-32.svg +1 -0
  293. package/dist/cdn/assets/portal-navigation/product-logos/esri-community-glyph-32.svg +1 -0
  294. package/dist/cdn/assets/portal-navigation/product-logos/esri-demographics-glyph-32.svg +1 -0
  295. package/dist/cdn/assets/portal-navigation/product-logos/esri-events-glyph-32.svg +1 -0
  296. package/dist/cdn/assets/portal-navigation/product-logos/esri-offline-documentation-center--glyph-32.svg +1 -0
  297. package/dist/cdn/assets/portal-navigation/product-logos/esri-redistricting-glyph-32.svg +1 -0
  298. package/dist/cdn/assets/portal-navigation/product-logos/esri-reports-glyph-32.svg +1 -0
  299. package/dist/cdn/assets/portal-navigation/product-logos/esri-support-glyph-32.svg +1 -0
  300. package/dist/cdn/assets/portal-navigation/product-logos/map-viewer-glyph-32.svg +1 -0
  301. package/dist/cdn/assets/portal-navigation/product-logos/sceneviewer-glyph-32.svg +1 -0
  302. package/dist/cdn/assets/portal-navigation/product-logos/site-scan-for-arcgis-glyph-32.svg +1 -0
  303. package/dist/cdn/assets/portal-navigation/product-logos/site-scan-for-arcgis-le-glyph-32.svg +1 -0
  304. package/dist/cdn/assets/portal-navigation/product-logos/vector-tile-style-editor-glyph-32.svg +1 -0
  305. package/dist/cdn/assets/portal-navigation/product-logos/xr-viewer-glyph-32.svg +1 -0
  306. package/dist/cdn/assets/portal-navigation/t9n/messages.en.json +1 -0
  307. package/dist/cdn/index.js +1 -1
  308. package/dist/cdn/main.css +1 -1
  309. package/dist/chunks/dom.js +41 -0
  310. package/dist/chunks/fieldAddDelete.js +1 -1
  311. package/dist/chunks/functionalities.js +6 -4
  312. package/dist/chunks/groups.js +13 -35
  313. package/dist/chunks/groups2.js +11 -0
  314. package/dist/chunks/icons.js +11 -0
  315. package/dist/chunks/info.js +179 -0
  316. package/dist/chunks/item.js +15 -15
  317. package/dist/chunks/item2.js +34 -0
  318. package/dist/chunks/items.js +16 -0
  319. package/dist/chunks/loadClassificationData.js +19 -19
  320. package/dist/chunks/portal-account-switcher.js +6 -0
  321. package/dist/chunks/portal-browser.js +220 -0
  322. package/dist/chunks/portal-item-badge.js +346 -0
  323. package/dist/chunks/portal.js +91 -8
  324. package/dist/chunks/portal2.js +59 -0
  325. package/dist/chunks/query.js +159 -0
  326. package/dist/chunks/request.js +87 -0
  327. package/dist/chunks/requests.js +92 -44
  328. package/dist/chunks/store.js +14 -0
  329. package/dist/chunks/string.js +36 -0
  330. package/dist/chunks/thumbnail.js +189 -0
  331. package/dist/chunks/ui.js +9 -0
  332. package/dist/chunks/url.js +17 -0
  333. package/dist/chunks/user.js +99 -4
  334. package/dist/chunks/user2.js +13 -107
  335. package/dist/chunks/users.js +7 -0
  336. package/dist/chunks/utils.js +88 -0
  337. package/dist/chunks/utils2.js +653 -0
  338. package/dist/chunks/verified.js +40 -0
  339. package/dist/components/arcgis-portal-account-switcher/customElement.d.ts +99 -0
  340. package/dist/components/arcgis-portal-account-switcher/customElement.js +365 -0
  341. package/dist/components/arcgis-portal-account-switcher/index.d.ts +1 -0
  342. package/dist/components/arcgis-portal-account-switcher/index.js +11 -0
  343. package/dist/components/arcgis-portal-account-switcher-accounts/customElement.d.ts +100 -0
  344. package/dist/components/arcgis-portal-account-switcher-accounts/customElement.js +31 -0
  345. package/dist/components/arcgis-portal-account-switcher-accounts/index.d.ts +1 -0
  346. package/dist/components/arcgis-portal-account-switcher-accounts/index.js +5 -0
  347. package/dist/components/arcgis-portal-account-switcher-list/customElement.d.ts +104 -0
  348. package/dist/components/arcgis-portal-account-switcher-list/customElement.js +51 -0
  349. package/dist/components/arcgis-portal-account-switcher-list/index.d.ts +1 -0
  350. package/dist/components/arcgis-portal-account-switcher-list/index.js +7 -0
  351. package/dist/components/arcgis-portal-ai-assistant/agents/types.d.ts +62 -3
  352. package/dist/components/arcgis-portal-ai-assistant/customElement.d.ts +59 -3
  353. package/dist/components/arcgis-portal-ai-assistant/customElement.js +1768 -592
  354. package/dist/components/arcgis-portal-ai-assistant/data/capability-registries/types.d.ts +34 -0
  355. package/dist/components/arcgis-portal-browser/customElement.d.ts +243 -0
  356. package/dist/components/arcgis-portal-browser/customElement.js +16 -0
  357. package/dist/components/arcgis-portal-browser/index.d.ts +1 -0
  358. package/dist/components/arcgis-portal-browser/index.js +6 -0
  359. package/dist/components/arcgis-portal-browser/utils/store.d.ts +35 -0
  360. package/dist/components/arcgis-portal-browser/utils/types.d.ts +24 -0
  361. package/dist/components/arcgis-portal-browser-actions/customElement.d.ts +185 -0
  362. package/dist/components/arcgis-portal-browser-actions/customElement.js +73 -0
  363. package/dist/components/arcgis-portal-browser-actions/index.d.ts +1 -0
  364. package/dist/components/arcgis-portal-browser-actions/index.js +6 -0
  365. package/dist/components/arcgis-portal-browser-actions/types.d.ts +9 -0
  366. package/dist/components/arcgis-portal-browser-filter-status/customElement.d.ts +193 -0
  367. package/dist/components/arcgis-portal-browser-filter-status/customElement.js +56 -0
  368. package/dist/components/arcgis-portal-browser-filter-status/index.d.ts +1 -0
  369. package/dist/components/arcgis-portal-browser-filter-status/index.js +5 -0
  370. package/dist/components/arcgis-portal-browser-pagination/customElement.d.ts +194 -0
  371. package/dist/components/arcgis-portal-browser-pagination/customElement.js +49 -0
  372. package/dist/components/arcgis-portal-browser-pagination/index.d.ts +1 -0
  373. package/dist/components/arcgis-portal-browser-pagination/index.js +2 -0
  374. package/dist/components/arcgis-portal-browser-search/customElement.d.ts +195 -0
  375. package/dist/components/arcgis-portal-browser-search/customElement.js +62 -0
  376. package/dist/components/arcgis-portal-browser-search/index.d.ts +1 -0
  377. package/dist/components/arcgis-portal-browser-search/index.js +3 -0
  378. package/dist/components/arcgis-portal-browser-sort/customElement.d.ts +196 -0
  379. package/dist/components/arcgis-portal-browser-sort/customElement.js +93 -0
  380. package/dist/components/arcgis-portal-browser-sort/index.d.ts +1 -0
  381. package/dist/components/arcgis-portal-browser-sort/index.js +9 -0
  382. package/dist/components/arcgis-portal-browser-sort/utils.d.ts +3 -0
  383. package/dist/components/arcgis-portal-browser-top-bar/customElement.d.ts +190 -0
  384. package/dist/components/arcgis-portal-browser-top-bar/customElement.js +50 -0
  385. package/dist/components/arcgis-portal-browser-top-bar/index.d.ts +1 -0
  386. package/dist/components/arcgis-portal-browser-top-bar/index.js +3 -0
  387. package/dist/components/arcgis-portal-browser-view/customElement.d.ts +21 -0
  388. package/dist/components/arcgis-portal-browser-view/customElement.js +30 -0
  389. package/dist/components/arcgis-portal-browser-view/index.d.ts +1 -0
  390. package/dist/components/arcgis-portal-browser-view/index.js +5 -0
  391. package/dist/components/arcgis-portal-classification-config/customElement.js +7 -7
  392. package/dist/components/arcgis-portal-classification-favorite/customElement.js +1 -1
  393. package/dist/components/arcgis-portal-field-delete/customElement.js +2 -1
  394. package/dist/components/arcgis-portal-group-badges/customElement.d.ts +101 -0
  395. package/dist/components/arcgis-portal-group-badges/customElement.js +51 -0
  396. package/dist/components/arcgis-portal-group-badges/index.d.ts +1 -0
  397. package/dist/components/arcgis-portal-group-badges/index.js +3 -0
  398. package/dist/components/arcgis-portal-group-badges/types.d.ts +3 -0
  399. package/dist/components/arcgis-portal-group-browser/customElement.d.ts +475 -0
  400. package/dist/components/arcgis-portal-group-browser/customElement.js +492 -0
  401. package/dist/components/arcgis-portal-group-browser/index.d.ts +1 -0
  402. package/dist/components/arcgis-portal-group-browser/index.js +6 -0
  403. package/dist/components/arcgis-portal-group-browser/types.d.ts +197 -0
  404. package/dist/components/arcgis-portal-group-browser-preview/customElement.d.ts +225 -0
  405. package/dist/components/arcgis-portal-group-browser-preview/customElement.js +150 -0
  406. package/dist/components/arcgis-portal-group-browser-preview/index.d.ts +1 -0
  407. package/dist/components/arcgis-portal-group-browser-preview/index.js +12 -0
  408. package/dist/components/arcgis-portal-group-browser-preview-card/customElement.d.ts +82 -0
  409. package/dist/components/arcgis-portal-group-browser-preview-card/customElement.js +93 -0
  410. package/dist/components/arcgis-portal-group-browser-preview-card/index.d.ts +1 -0
  411. package/dist/components/arcgis-portal-group-browser-preview-card/index.js +6 -0
  412. package/dist/components/arcgis-portal-group-card/customElement.d.ts +169 -0
  413. package/dist/components/arcgis-portal-group-card/customElement.js +163 -0
  414. package/dist/components/arcgis-portal-group-card/index.d.ts +1 -0
  415. package/dist/components/arcgis-portal-group-card/index.js +8 -0
  416. package/dist/components/arcgis-portal-group-thumbnail/customElement.d.ts +32 -0
  417. package/dist/components/arcgis-portal-group-thumbnail/customElement.js +153 -0
  418. package/dist/components/arcgis-portal-group-thumbnail/index.d.ts +1 -0
  419. package/dist/components/arcgis-portal-group-thumbnail/index.js +3 -0
  420. package/dist/components/arcgis-portal-info-banner/customElement.d.ts +14 -0
  421. package/dist/components/arcgis-portal-info-banner/customElement.js +31 -0
  422. package/dist/components/arcgis-portal-info-banner/index.d.ts +1 -0
  423. package/dist/components/arcgis-portal-info-banner/index.js +1 -0
  424. package/dist/components/arcgis-portal-item-actions/customElement.d.ts +74 -0
  425. package/dist/components/arcgis-portal-item-actions/customElement.js +89 -0
  426. package/dist/components/arcgis-portal-item-actions/index.d.ts +1 -0
  427. package/dist/components/arcgis-portal-item-actions/index.js +5 -0
  428. package/dist/components/arcgis-portal-item-badge/customElement.d.ts +260 -0
  429. package/dist/components/arcgis-portal-item-badge/customElement.js +9 -0
  430. package/dist/components/arcgis-portal-item-badge/index.d.ts +1 -0
  431. package/dist/components/arcgis-portal-item-badge/index.js +5 -0
  432. package/dist/components/arcgis-portal-item-badges/customElement.d.ts +48 -0
  433. package/dist/components/arcgis-portal-item-badges/customElement.js +35 -0
  434. package/dist/components/arcgis-portal-item-badges/index.d.ts +1 -0
  435. package/dist/components/arcgis-portal-item-badges/index.js +2 -0
  436. package/dist/components/arcgis-portal-item-badges/types.d.ts +1 -0
  437. package/dist/components/arcgis-portal-item-card/customElement.d.ts +215 -0
  438. package/dist/components/arcgis-portal-item-card/customElement.js +190 -0
  439. package/dist/components/arcgis-portal-item-card/index.d.ts +1 -0
  440. package/dist/components/arcgis-portal-item-card/index.js +10 -0
  441. package/dist/components/arcgis-portal-item-favorite/customElement.d.ts +36 -0
  442. package/dist/components/arcgis-portal-item-favorite/customElement.js +66 -0
  443. package/dist/components/arcgis-portal-item-favorite/index.d.ts +1 -0
  444. package/dist/components/arcgis-portal-item-favorite/index.js +3 -0
  445. package/dist/components/arcgis-portal-item-favorite/utils.d.ts +4 -0
  446. package/dist/components/arcgis-portal-item-type/customElement.d.ts +3 -1
  447. package/dist/components/arcgis-portal-item-type/customElement.js +22 -651
  448. package/dist/components/arcgis-portal-mentionable-text-area/customElement.js +40 -38
  449. package/dist/components/arcgis-portal-navigation/customElement.d.ts +528 -0
  450. package/dist/components/arcgis-portal-navigation/customElement.js +1849 -0
  451. package/dist/components/arcgis-portal-navigation/index.d.ts +1 -0
  452. package/dist/components/arcgis-portal-navigation/index.js +30 -0
  453. package/dist/components/arcgis-portal-navigation/types.d.ts +44 -0
  454. package/dist/components/arcgis-portal-replacement-item-redirect/customElement.js +53 -410
  455. package/dist/components/arcgis-portal-user-avatar/customElement.js +2 -2
  456. package/dist/components/arcgis-portal-user-popup/customElement.d.ts +5 -2
  457. package/dist/components/arcgis-portal-user-popup/customElement.js +82 -141
  458. package/dist/components/arcgis-portal-voice-input/customElement.d.ts +1 -1
  459. package/dist/components/portal-browser/components/portal-browser-filter/customElement.js +14 -0
  460. package/dist/components/portal-browser/components/portal-browser-filter/index.js +3 -0
  461. package/dist/components/portal-browser/components/portal-browser-filter-date/customElement.js +59 -0
  462. package/dist/components/portal-browser/components/portal-browser-filter-date/index.js +4 -0
  463. package/dist/components/portal-browser/components/portal-browser-filters/customElement.js +11 -0
  464. package/dist/components/portal-browser/components/portal-browser-filters/index.js +2 -0
  465. package/dist/components/portal-group-browser-filters/customElement.js +129 -0
  466. package/dist/components/portal-group-browser-filters/index.js +5 -0
  467. package/dist/components/portal-group-browser-pagination/customElement.js +13 -0
  468. package/dist/components/portal-group-browser-pagination/index.js +2 -0
  469. package/dist/components/portal-group-browser-sort/customElement.js +16 -0
  470. package/dist/components/portal-group-browser-sort/index.js +2 -0
  471. package/dist/docs/api.json +1 -1
  472. package/dist/docs/docs.json +1 -1
  473. package/dist/docs/vscode.css-custom-data.json +1 -1
  474. package/dist/docs/vscode.html-custom-data.json +1 -1
  475. package/dist/docs/web-types.json +1 -1
  476. package/dist/index.d.ts +206 -2
  477. package/dist/loader.js +28 -4
  478. package/dist/types/app-switcher.d.ts +71 -0
  479. package/dist/types/group.d.ts +14 -16
  480. package/dist/types/item.d.ts +80 -1
  481. package/dist/types/lumina.d.ts +170 -1
  482. package/dist/types/portal.d.ts +6 -0
  483. package/dist/types/preact.d.ts +194 -1
  484. package/dist/types/react.d.ts +218 -1
  485. package/dist/types/search.d.ts +30 -0
  486. package/dist/types/stencil.d.ts +170 -1
  487. package/dist/types/user.d.ts +16 -3
  488. package/package.json +9 -10
  489. package/dist/cdn/35SKVD6F.js +0 -2
  490. package/dist/cdn/5VSDGPHH.js +0 -2
  491. package/dist/cdn/72N3KAXN.js +0 -2
  492. package/dist/cdn/ANPXRYLV.js +0 -5
  493. package/dist/cdn/B7633S2A.js +0 -422
  494. package/dist/cdn/BEHLBKKM.js +0 -2
  495. package/dist/cdn/EVDOPN3G.js +0 -54
  496. package/dist/cdn/G47ZZQYL.js +0 -2
  497. package/dist/cdn/G6QT6MYP.js +0 -65
  498. package/dist/cdn/GAHILDQF.js +0 -45
  499. package/dist/cdn/GHQ3ZW4U.js +0 -2
  500. package/dist/cdn/JNRN6DTV.js +0 -2
  501. package/dist/cdn/K3HS2LQ7.js +0 -2
  502. package/dist/cdn/KEKBRUUC.js +0 -2
  503. package/dist/cdn/L3BQK62N.js +0 -2
  504. package/dist/cdn/MX3F5ZCL.js +0 -2
  505. package/dist/cdn/O3KBWLGU.js +0 -2
  506. package/dist/cdn/OQDPULPD.js +0 -2
  507. package/dist/cdn/RNLVNDGG.js +0 -2
  508. package/dist/cdn/T25WZ6OL.js +0 -516
  509. package/dist/cdn/TMYTUOSS.js +0 -2
  510. package/dist/cdn/UPEVTVNZ.js +0 -2
  511. package/dist/cdn/V2EOXGK2.js +0 -2
  512. package/dist/cdn/X5NBQPTM.js +0 -2
  513. package/dist/cdn/YG5YYL6X.js +0 -2
  514. package/dist/cdn/YIMNOUTF.js +0 -2
  515. package/dist/cdn/YL7PGYWC.js +0 -5
  516. package/dist/cdn/YMPTDKT6.js +0 -2
  517. package/dist/cdn/YVJRXWM3.js +0 -3
@@ -1,375 +1,205 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import { c as Z } from "../../chunks/runtime.js";
3
- import { LitElement as tt, createEvent as et } from "@arcgis/lumina";
4
- import { css as st, render as at, html as w } from "lit";
5
- import { createRef as M, ref as T } from "lit/directives/ref.js";
6
- import { u as rt } from "../../chunks/useT9n.js";
7
- import { a as P, t as ot } from "../../chunks/functionalities.js";
8
- import { Annotation as h, StateGraph as $, START as G, END as y, NodeInterrupt as V } from "@langchain/langgraph/web";
9
- import { sendTraceMessage as g, invokeStructuredPrompt as b, createChatModel as F, sendUXSuggestion as B, createAgentRuntimeStateWithSharedState as E } from "@arcgis/ai-components/utils/index.js";
10
- import n from "zod";
11
- import { ChatPromptTemplate as L } from "@langchain/core/prompts";
12
- import { createAgent as Q } from "langchain";
13
- import { tool as K } from "@langchain/core/tools";
14
- import { s as nt, g as it, a as lt, c as ct, q as ut } from "../../chunks/groups.js";
15
- import mt from "@arcgis/core/identity/IdentityManager.js";
16
- import k from "@arcgis/core/request.js";
17
- import { Annotation as dt } from "@langchain/langgraph";
18
- const x = (s) => {
19
- for (let t = s.length - 1; t >= 0; t -= 1) {
20
- const e = s[t];
21
- if (e.type !== "human")
22
- continue;
23
- const a = e.content;
24
- if (typeof a == "string")
25
- return a;
26
- if (Array.isArray(a))
27
- return a.map(
28
- (r) => typeof r == "string" ? r : "text" in r && typeof r.text == "string" ? r.text : ""
29
- ).join(" ").trim();
30
- }
31
- return "";
32
- }, pt = () => ({ latestItemId: null, memory: {} }), N = (s) => {
33
- const t = s?.agentExecutionContext.sharedState.portalItemAnalyticsSummaryMemory?.value;
34
- return t ? { latestItemId: t.latestItemId, memory: t.memory } : pt();
35
- }, gt = n.object({
36
- intent: n.enum(["summarize", "followUp", "clarify"]),
37
- itemId: n.string().default(""),
38
- question: n.string().default("")
39
- }), ht = n.object({ summary: n.string(), followUpQuestions: n.array(n.string()).default([]) }), ft = n.object({ answer: n.string(), isRelevant: n.boolean() }), yt = async (s, t) => {
40
- await g({ text: "Answering follow-up...", agentName: "analytics" }, t);
41
- const e = N(s), a = s.analyticsItemId ?? e.latestItemId, r = a ? e.memory[a] : void 0, l = s.analyticsQuestion || x(s.agentExecutionContext.messages);
42
- return r ? {
43
- status: "success",
44
- outputMessage: (await b({
45
- promptText: bt,
46
- schema: ft,
47
- modelTier: "default",
48
- inputVariables: {
49
- summary: r.summary,
50
- question: l,
51
- fullContext: JSON.stringify(r.fullContext)
52
- }
53
- })).answer
54
- } : {
55
- status: "success",
56
- outputMessage: "I don't have enough information yet. Please ask me to summarize the item first using summarize item <item id>."
57
- };
58
- }, bt = `
59
- You answer follow-up questions about an ArcGIS item.
60
-
61
- Ground your answer in the provided item context.
62
- If the answer is not available from the provided context, state that clearly and suggest what to check next.
63
-
64
- Response rules:
65
- - Reply in concise markdown.
66
- - Keep the answer focused on the follow-up question.
67
- - Do not include internal identifiers.
68
- - Mark isRelevant=false when the question is not about this item or cannot be grounded in this item context.
69
-
70
- Item summary:
71
- {summary}
72
-
73
- Item full context
74
- {fullContext}
75
-
76
- Question:
77
- {question}
78
- `;
79
- function I(s) {
80
- const { portal: t, user: e } = s ?? {};
81
- if (!s || !t || !e)
2
+ import { c as Ue } from "../../chunks/runtime.js";
3
+ import { LitElement as Fe, createEvent as Oe } from "@arcgis/lumina";
4
+ import { css as Ke, render as Ve, html as b } from "lit";
5
+ import { createRef as P, ref as q } from "lit/directives/ref.js";
6
+ import { u as je } from "../../chunks/useT9n.js";
7
+ import { NodeInterrupt as fe, Annotation as h, StateGraph as G, START as A, END as w } from "@langchain/langgraph/web";
8
+ import { sendTraceMessage as m, invokeStructuredPrompt as v, sendUXSuggestion as B, createAgentRuntimeStateWithSharedState as N, createChatModel as Q, getEmbeddings as Le } from "@arcgis/ai-components/utils/index.js";
9
+ import s from "zod";
10
+ import { a as Be, c as Qe, q as We } from "../../chunks/groups.js";
11
+ import Je from "@arcgis/core/identity/IdentityManager.js";
12
+ import Y from "@arcgis/core/request.js";
13
+ import { a as R, t as _e, b as Ye } from "../../chunks/functionalities.js";
14
+ import { ChatPromptTemplate as W } from "@langchain/core/prompts";
15
+ import { tool as ye } from "@langchain/core/tools";
16
+ import { s as He, a as Xe } from "../../chunks/item2.js";
17
+ import { g as Ze, e as et, i as tt, c as at, a as nt } from "../../chunks/groups2.js";
18
+ import rt from "@arcgis/core/portal/Portal.js";
19
+ const we = (e) => {
20
+ const { portal: t, user: a } = e ?? {};
21
+ return !!e && !!t && !!a;
22
+ };
23
+ function T(e) {
24
+ if (!we(e))
82
25
  throw new Error("Invalid context: PortalAssistantContext with portal and user is required.");
83
26
  }
84
- const W = K(
85
- async ({ itemTitle: s }, t) => {
86
- const e = s.trim();
87
- if (!e)
88
- return null;
89
- const a = t?.configurable?.context;
90
- I(a);
91
- const { result: r, error: l } = await nt(a.portal, e, { num: 1 });
92
- return l && console.error("Error searching for portal item by title:", l), r?.results[0]?.id || null;
93
- },
94
- {
95
- name: "resolvePortalItemIdByTitle",
96
- description: 'Resolves an ArcGIS Portal item title to the best-match item id. Use this when a user references an item by title (including hash mentions like #title or #"title with spaces") instead of an explicit item id.',
97
- schema: n.object({
98
- itemTitle: n.string().describe("The portal item title to resolve to an item id.")
99
- })
100
- }
101
- ), It = async (s, t) => {
102
- await g({ text: "Analyzing intent...", agentName: "analytics" }, t);
103
- const e = x(s.agentExecutionContext.messages), a = !!N(s).latestItemId, r = await L.fromTemplate(wt).format({
104
- userMessage: e,
105
- hasSummaryContext: String(a)
106
- }), c = await Q({
107
- model: await F({ modelTier: "fast" }),
108
- tools: [W],
109
- systemPrompt: r,
110
- responseFormat: gt,
111
- checkpointer: !0
112
- }).invoke({ messages: s.agentExecutionContext.messages }, t), { intent: i, itemId: o, question: u } = c.structuredResponse, m = i === "clarify" || i === "summarize" && !o || i === "followUp" && !u;
113
- return {
114
- agentExecutionContext: { ...s.agentExecutionContext },
115
- analyticsIntent: m ? "clarify" : i,
116
- analyticsItemId: o || null,
117
- analyticsQuestion: u || "",
118
- status: "success",
119
- outputMessage: m ? 'Please clarify with summarize item <item id>, summarize item #<title>, or summarize item #"<title with spaces>".' : ""
120
- };
121
- }, wt = `
122
- Classify the user analytics request.
27
+ const ot = `
28
+ Write a concise, friendly success message for adding members to a group.
123
29
 
124
30
  Rules:
125
- - intent="summarize" only when the user explicitly asks to summarize/overview/recap an item.
126
- - intent="followUp" for analytical questions about item details, including schema/fields/attributes/layers.
127
- - intent="clarify" when neither summarize nor follow-up intent is clear.
128
- - itemId must be the final resolved item id.
129
- - If request has explicit item id, set itemId directly.
130
- - If request references item title (for example #title, #"title with spaces", or plain quoted title), call resolvePortalItemIdByTitle and set itemId to the returned value.
131
- - Never return item titles in output fields.
132
- - If intent is "followUp", set question to the user's full question/request text.
133
- - If intent is "summarize", set question="".
134
- - When user asks to show/list/explain fields, schema, attributes, columns, or layer details, classify as "followUp" unless they explicitly request a summary.
135
- - If hasSummaryContext is true, prefer "followUp" for detail-oriented requests that do not explicitly ask to summarize.
136
-
137
- Examples:
138
- - "Summarize item 0123456789abcdef0123456789abcdef" => summarize, itemId="0123456789abcdef0123456789abcdef"
139
- - "Summarize item #california" => summarize, call resolvePortalItemIdByTitle("california") and set itemId to tool result
140
- - "Summarize item #"california farmland"" => summarize, call resolvePortalItemIdByTitle("california farmland") and set itemId to tool result
141
- - "Show the layer's available fields" => followUp
142
- - "List attributes and explain what status means" => followUp
143
- - "What fields are available?" with hasSummaryContext=true => followUp
144
- - "Give me an overview of item 0123456789abcdef0123456789abcdef" => summarize
31
+ - Keep it to 1-2 short sentences.
32
+ - Use plain text only.
33
+ - If there is no notAddedMembers, confirm that all requested members were added successfully.
34
+ - If there are notAddedMembers, acknowledge that some members could not be added and list the added and not added members separately then mention why based on the context
35
+ - Make sure to bold the usernames
145
36
 
146
- hasSummaryContext:
147
- {hasSummaryContext}
37
+ Added members:
38
+ {addedMembers}
148
39
 
149
- User message:
150
- {userMessage}
151
- `, xt = async (s, t) => {
152
- const e = s.analyticsItemId;
153
- if (!e)
154
- return {
155
- status: "success",
156
- outputMessage: 'Please clarify with summarize item <item id>, summarize item #<title>, or summarize item #"<title with spaces>".'
157
- };
158
- await g({ text: `Summarizing item ${e}...`, agentName: "analytics" }, t);
159
- const a = t?.configurable?.context;
160
- I(a);
161
- const { portal: r, user: l } = a, { result: c, error: i } = await it(l, r, e);
162
- if (i || !c)
163
- return await g({ text: "Failed to get item context for summarization", agentName: "analytics" }, t), {
164
- status: "success",
165
- outputMessage: "Unable to retrieve item context for summarization."
166
- };
167
- const { context: o } = c, u = await b({
168
- promptText: vt,
169
- schema: ht,
170
- modelTier: "default",
171
- inputVariables: { context: JSON.stringify(o) }
172
- }), { followUpQuestions: d, summary: p } = u, m = N(s), f = {
173
- latestItemId: e,
174
- memory: {
175
- ...m.memory,
176
- [e]: { summary: p, followUpQuestions: d, fullContext: o }
177
- }
178
- };
179
- return d.length && await B({ type: "suggested-prompts", data: { prompts: d } }, t), {
180
- status: "success",
181
- outputMessage: p,
182
- sharedStatePatch: { portalItemAnalyticsSummaryMemory: { value: f } }
183
- };
184
- }, vt = `
185
- You are a item summary tool for ArcGIS. Your job is to summarize an item's info based on the provided context.
186
- Summary rules:
187
- - The summary should be concise markdown, make sure to format the output nicely so it's easy to read.
188
- - Target length: 80-150 words.
189
- - Provide one short descriptive paragraph.
190
- - Also propose 3 concise follow-up questions grounded in the item summary.
191
- - Keep follow-up questions specific and actionable.
192
- Follow-up questions rules:
193
- - These questions should be in the format of a prompt that the user can click on.
194
- - Make sure the questions are relevant to the item summary and that you can answer based solely on the provided context.
195
- Do not include internal identifiers.
196
- If the user asks for a detailed summary, you may expand the response up to 300 words.
197
- Item context:
198
- {context}
199
- `, C = (s, t) => t ?? s, O = h.Root({
200
- ...E(),
201
- // States shared only across nodes in the graph, not between invocations
202
- analyticsIntent: h({
203
- reducer: C,
204
- default: () => "clarify"
205
- }),
206
- analyticsItemId: h({
207
- reducer: C,
208
- default: () => null
209
- }),
210
- analyticsQuestion: h({
211
- reducer: C,
212
- default: () => ""
213
- })
214
- }), St = () => new $(O).addNode("detectAnalyticsIntent", It).addNode("summarizePortalItem", xt).addNode("answerAnalyticsFollowUp", yt).addEdge(G, "detectAnalyticsIntent").addConditionalEdges("detectAnalyticsIntent", (t) => t.analyticsIntent === "summarize" ? "summarizePortalItem" : t.analyticsIntent === "followUp" ? "answerAnalyticsFollowUp" : y).addEdge("summarizePortalItem", y).addEdge("answerAnalyticsFollowUp", y), Mt = String.raw`- **portal-item-analytics** - Portal item analytics assistant:
215
- - summarizes ArcGIS portal items from item context
216
- - suggests follow-up prompts grounded in the item
217
- `, Tt = {
218
- id: "portal-item-analytics",
219
- name: "Portal Item Analytics",
220
- description: Mt,
221
- createGraph: St,
222
- workspace: O
223
- }, Pt = (s) => s.map((t) => `"${t}"`).join(", "), At = n.object({
224
- successMessage: n.string().default("")
225
- }), q = "portal-group-creation", D = "approveAddMembers", Ct = async (s, t) => {
226
- if (s.intentParams.intent !== "addMembers")
40
+ Not added members:
41
+ {notAddedMembers}
42
+ `, st = (e) => e.map((t) => `"${t}"`).join(", "), it = s.object({
43
+ successMessage: s.string().default("")
44
+ }), H = "portal-group-creation", X = "approveAddMembers", ut = async (e, t) => {
45
+ if (e.intentParams.intent !== "addMembers")
227
46
  return {
228
47
  status: "success",
229
48
  outputMessage: "Use @mention usernames for the members you want to add."
230
49
  };
231
- const e = s.agentExecutionContext.sharedState.createdGroupId?.value;
232
- if (!e)
50
+ const a = e.agentExecutionContext.sharedState.createdGroupId?.value;
51
+ if (!a)
233
52
  return {
234
53
  status: "success",
235
54
  outputMessage: "Create a group first, then add members using @mention usernames."
236
55
  };
237
- const a = s.intentParams.memberInfo.memberIdentifiers.map((m) => m.trim()).filter(Boolean);
238
- if (!a.length)
56
+ const n = e.intentParams.memberInfo.memberIdentifiers.map((p) => p.trim()).filter(Boolean);
57
+ if (!n.length)
239
58
  return {
240
59
  status: "success",
241
60
  outputMessage: "Use @mention usernames for the members you want to add."
242
61
  };
243
- const l = `The following member(s) will be added to the newly created group:
62
+ const o = `The following member(s) will be added to the newly created group:
244
63
 
245
- ${a.map((m) => `- **@${m}**`).join(`
64
+ ${n.map((p) => `- **@${p}**`).join(`
246
65
  `)}
247
66
 
248
- Do you want to continue?`, { hitlResponse: c } = t?.configurable ?? {};
249
- if (c?.agentId !== q || c.id !== D) {
250
- const m = {
251
- agentId: q,
252
- id: D,
67
+ Do you want to continue?`, { hitlResponse: u } = t?.configurable ?? {};
68
+ if (u?.agentId !== H || u.id !== X) {
69
+ const p = {
70
+ agentId: H,
71
+ id: X,
253
72
  kind: "booleanChoice",
254
- message: l,
73
+ message: o,
255
74
  metadata: {
256
75
  action: "addMembers",
257
- groupId: e,
258
- members: [...a]
76
+ groupId: a,
77
+ members: [...n]
259
78
  }
260
79
  };
261
- throw new V(m);
80
+ throw new fe(p);
262
81
  }
263
- if (c.payload !== !0)
82
+ if (u.payload !== !0)
264
83
  return {
265
84
  status: "success",
266
85
  outputMessage: "Okay, I cancelled adding members to the group."
267
86
  };
268
- await g(
269
- { text: `Adding members ${Pt(a)}...`, agentName: "group-creation" },
87
+ await m(
88
+ { text: `Adding members ${st(n)}...`, agentName: "group-creation" },
270
89
  t
271
90
  );
272
91
  const i = t?.configurable?.context;
273
- I(i);
274
- const { result: o, error: u } = await lt(i.portal, e, a);
275
- if (u || !o)
92
+ T(i);
93
+ const { result: l, error: c } = await Be(i.portal, a, n);
94
+ if (c || !l)
276
95
  return {
277
96
  status: "success",
278
97
  outputMessage: "I could not add members to that group. Please confirm group access and user accounts, then try again."
279
98
  };
280
- const { addedUsernames: d, notAddedUsers: p } = o;
99
+ const { addedUsernames: d, notAddedUsers: g } = l;
281
100
  try {
282
- const f = (await b({
283
- promptText: $t,
284
- schema: At,
101
+ const f = (await v({
102
+ promptText: ot,
103
+ schema: it,
285
104
  modelTier: "fast",
286
105
  inputVariables: {
287
106
  addedMembers: d.join(", "),
288
107
  notAddedMembers: JSON.stringify(
289
- p.map((v) => ({ username: v.username, reason: v.error.message }))
108
+ g.map((y) => ({ username: y.username, reason: y.error.message }))
290
109
  )
291
110
  }
292
111
  })).successMessage;
293
112
  if (f)
294
113
  return { status: "success", outputMessage: f };
295
- } catch (m) {
296
- console.error("Error generating add-members success message:", m);
114
+ } catch (p) {
115
+ console.error("Error generating add-members success message:", p);
297
116
  }
298
117
  return {};
299
- }, $t = `
300
- Write a concise, friendly success message for adding members to a group.
118
+ }, ct = `
119
+ Write a concise, friendly success message after creating a portal group.
120
+
121
+ Rules:
122
+ - Mention that the group was created successfully.
123
+ - Mention that the user can add members by using @mention usernames.
124
+ - Keep it to 1-2 short sentences.
125
+ - Make sure to bold the group title in the message.
126
+
127
+ Group title:
128
+ {groupTitle}
129
+ `, lt = `
130
+ Write a concise, friendly failure message after an attempt to create a portal group.
301
131
 
302
132
  Rules:
303
133
  - Keep it to 1-2 short sentences.
304
134
  - Use plain text only.
305
- - If there is no notAddedMembers, confirm that all requested members were added successfully.
306
- - If there are notAddedMembers, acknowledge that some members could not be added and list the added and not added members separately then mention why based on the context
307
- - Make sure to bold the usernames
135
+ - Mention that group creation failed.
136
+ - Include the failure reason in user-friendly language.
137
+ - End with a clear next step the user can try.
308
138
 
309
- Added members:
310
- {addedMembers}
139
+ Group title:
140
+ {groupTitle}
311
141
 
312
- Not added members:
313
- {notAddedMembers}
314
- `, R = "portal-group-creation", U = "approveCreateGroup", Gt = n.object({
315
- successMessage: n.string().default("")
316
- }), Et = n.object({
317
- failureMessage: n.string().default("")
318
- }), Nt = async (s, t) => {
319
- if (s.intentParams.intent !== "create")
142
+ Failure reason:
143
+ {failureReason}
144
+ `, Z = "portal-group-creation", ee = "approveCreateGroup", dt = s.object({
145
+ successMessage: s.string().default("")
146
+ }), pt = s.object({
147
+ failureMessage: s.string().default("")
148
+ }), mt = async (e, t) => {
149
+ if (e.intentParams.intent !== "create")
320
150
  return {
321
151
  status: "success",
322
152
  outputMessage: "Tell me the group title you want to use."
323
153
  };
324
- const e = s.intentParams.title.trim();
325
- if (!e)
154
+ const a = e.intentParams.title.trim();
155
+ if (!a)
326
156
  return {
327
157
  status: "success",
328
158
  outputMessage: "What title would you like for the new group?"
329
159
  };
330
- const a = `A group with the title **${e}** will be created. Do you want to continue?`, { hitlResponse: r } = t?.configurable;
331
- if (r?.agentId !== R || r.id !== U) {
332
- const u = {
333
- agentId: R,
334
- id: U,
160
+ const n = `A group with the title **${a}** will be created. Do you want to continue?`, { hitlResponse: r } = t?.configurable;
161
+ if (r?.agentId !== Z || r.id !== ee) {
162
+ const c = {
163
+ agentId: Z,
164
+ id: ee,
335
165
  kind: "booleanChoice",
336
- message: a,
166
+ message: n,
337
167
  metadata: {
338
168
  action: "createGroup",
339
- title: e,
169
+ title: a,
340
170
  access: "private"
341
171
  }
342
172
  };
343
- throw new V(u);
173
+ throw new fe(c);
344
174
  }
345
175
  if (r.payload !== !0)
346
176
  return {
347
177
  status: "success",
348
- outputMessage: `Okay, I cancelled creating **${e}**.`
178
+ outputMessage: `Okay, I cancelled creating **${a}**.`
349
179
  };
350
- await g({ text: `Creating group "${e}"...`, agentName: "group-creation" }, t);
351
- const l = t?.configurable?.context;
352
- I(l);
353
- const { result: c, error: i } = await ct(l.portal, {
354
- title: e,
180
+ await m({ text: `Creating group "${a}"...`, agentName: "group-creation" }, t);
181
+ const o = t?.configurable?.context;
182
+ T(o);
183
+ const { result: u, error: i } = await Qe(o.portal, {
184
+ title: a,
355
185
  access: "private"
356
186
  });
357
- if (i || !c) {
358
- const u = i?.message?.trim() || "No additional details were provided.";
187
+ if (i || !u) {
188
+ const c = i?.message?.trim() || "No additional details were provided.";
359
189
  try {
360
- const p = (await b({
361
- promptText: qt,
362
- schema: Et,
190
+ const g = (await v({
191
+ promptText: lt,
192
+ schema: pt,
363
193
  modelTier: "fast",
364
194
  inputVariables: {
365
- groupTitle: e,
366
- failureReason: u
195
+ groupTitle: a,
196
+ failureReason: c
367
197
  }
368
198
  })).failureMessage.trim();
369
- if (p)
199
+ if (g)
370
200
  return {
371
201
  status: "success",
372
- outputMessage: p
202
+ outputMessage: g
373
203
  };
374
204
  } catch (d) {
375
205
  console.error("Error generating create-group failure message:", d);
@@ -379,72 +209,42 @@ Not added members:
379
209
  outputMessage: "I could not create that group. Please confirm your permissions and try again with the group title."
380
210
  };
381
211
  }
382
- const o = c.id;
212
+ const l = u.id;
383
213
  try {
384
- const d = (await b({
385
- promptText: kt,
386
- schema: Gt,
214
+ const d = (await v({
215
+ promptText: ct,
216
+ schema: dt,
387
217
  modelTier: "fast",
388
218
  inputVariables: {
389
- groupTitle: e
219
+ groupTitle: a
390
220
  }
391
221
  })).successMessage.trim();
392
222
  if (d)
393
223
  return {
394
224
  status: "success",
395
225
  outputMessage: d,
396
- sharedStatePatch: { createdGroupId: { value: o } },
397
- createdGroupId: o
226
+ sharedStatePatch: { createdGroupId: { value: l } },
227
+ createdGroupId: l
398
228
  };
399
- } catch (u) {
400
- console.error("Error generating create-group success message:", u);
229
+ } catch (c) {
230
+ console.error("Error generating create-group success message:", c);
401
231
  }
402
232
  return {};
403
- }, kt = `
404
- Write a concise, friendly success message after creating a portal group.
405
-
406
- Rules:
407
- - Mention that the group was created successfully.
408
- - Mention that the user can add members by using @mention usernames.
409
- - Keep it to 1-2 short sentences.
410
- - Make sure to bold the group title in the message.
411
-
412
- Group title:
413
- {groupTitle}
414
- `, qt = `
415
- Write a concise, friendly failure message after an attempt to create a portal group.
416
-
417
- Rules:
418
- - Keep it to 1-2 short sentences.
419
- - Use plain text only.
420
- - Mention that group creation failed.
421
- - Include the failure reason in user-friendly language.
422
- - End with a clear next step the user can try.
423
-
424
- Group title:
425
- {groupTitle}
426
-
427
- Failure reason:
428
- {failureReason}
429
- `, Dt = n.object({
430
- intent: n.enum(["clarify", "create", "addMembers"]).default("clarify"),
431
- title: n.string().default(""),
432
- memberIdentifiers: n.array(n.string()).default([]),
433
- clarifyMessage: n.string().default("")
434
- }), Rt = async (s, t) => {
435
- await g({ text: "Thinking about groups...", agentName: "group-creation" }, t);
436
- const e = x(s.agentExecutionContext.messages).trim(), a = await b({
437
- promptText: Ut,
438
- schema: Dt,
439
- modelTier: "default",
440
- inputVariables: { userMessage: e }
441
- }), r = a.title.trim(), l = a.memberIdentifiers.filter(Boolean), c = a.clarifyMessage.trim(), i = a.intent === "create" && !!r, o = a.intent === "addMembers" && l.length > 0;
442
- return {
443
- intentParams: i ? { intent: "create", title: r } : o ? { intent: "addMembers", memberInfo: { memberIdentifiers: l } } : { intent: "clarify" },
444
- status: "success",
445
- outputMessage: !i && !o ? c : ""
446
- };
447
- }, Ut = `
233
+ }, I = (e) => {
234
+ for (let t = e.length - 1; t >= 0; t -= 1) {
235
+ const a = e[t];
236
+ if (a.type !== "human")
237
+ continue;
238
+ const n = a.content;
239
+ if (typeof n == "string")
240
+ return n;
241
+ if (Array.isArray(n))
242
+ return n.map(
243
+ (r) => typeof r == "string" ? r : "text" in r && typeof r.text == "string" ? r.text : ""
244
+ ).join(" ").trim();
245
+ }
246
+ return "";
247
+ }, gt = `
448
248
  You classify whether a user is asking to create a new ArcGIS Portal group or add members to an existing group.
449
249
 
450
250
  Rules:
@@ -470,186 +270,230 @@ Examples:
470
270
 
471
271
  User message:
472
272
  {userMessage}
473
- `, zt = n.discriminatedUnion("destinationType", [
474
- n.object({
475
- destinationType: n.literal("portal-content")
476
- }),
477
- n.object({
478
- destinationType: n.literal("portal-groups")
479
- }),
480
- n.object({
481
- destinationType: n.literal("portal-item"),
482
- itemId: n.string().trim().min(1)
483
- }),
484
- n.object({
485
- destinationType: n.literal("portal-group"),
486
- groupId: n.string().trim().min(1)
487
- })
488
- ]);
489
- function jt(s) {
490
- const t = zt.safeParse(s);
491
- return t.success ? t.data : void 0;
492
- }
493
- const _ = "portal-navigation", J = async (s, t) => {
494
- await B({ type: _, data: { ...s } }, t);
495
- }, Vt = async (s, t) => {
496
- const e = s.createdGroupId ?? s.agentExecutionContext.sharedState.createdGroupId?.value;
497
- return e ? (await g({ text: "Preparing navigation...", agentName: "group-creation" }, t), await J({ destinationType: "portal-group", groupId: e }, t), {}) : {};
498
- }, z = (s, t) => t ?? s, Y = h.Root({
499
- ...E(),
273
+ `, ht = s.object({
274
+ intent: s.enum(["clarify", "create", "addMembers"]).default("clarify"),
275
+ title: s.string().default(""),
276
+ memberIdentifiers: s.array(s.string()).default([]),
277
+ clarifyMessage: s.string().default("")
278
+ }), ft = async (e, t) => {
279
+ await m({ text: "Thinking about groups...", agentName: "group-creation" }, t);
280
+ const a = I(e.agentExecutionContext.messages).trim(), n = await v({
281
+ promptText: gt,
282
+ schema: ht,
283
+ modelTier: "default",
284
+ inputVariables: { userMessage: a }
285
+ }), r = n.title.trim(), o = n.memberIdentifiers.filter(Boolean), u = n.clarifyMessage.trim(), i = n.intent === "create" && !!r, l = n.intent === "addMembers" && o.length > 0;
286
+ return {
287
+ intentParams: i ? { intent: "create", title: r } : l ? { intent: "addMembers", memberInfo: { memberIdentifiers: o } } : { intent: "clarify" },
288
+ status: "success",
289
+ outputMessage: !i && !l ? u : ""
290
+ };
291
+ }, yt = ["favorites", "group", "living-atlas", "org"], wt = ["featured", "my", "organization"], bt = ["licenses", "members", "overview", "reports", "settings", "status"], vt = s.object({
292
+ destinationType: s.literal("portal-content"),
293
+ hash: s.enum(yt).optional(),
294
+ t9nKey: s.string().min(1).optional()
295
+ }), It = s.object({
296
+ destinationType: s.literal("portal-groups"),
297
+ hash: s.enum(wt).optional(),
298
+ t9nKey: s.string().min(1).optional()
299
+ }), xt = s.object({
300
+ destinationType: s.literal("portal-org"),
301
+ hash: s.enum(bt).optional(),
302
+ t9nKey: s.string().min(1).optional()
303
+ }), St = s.object({
304
+ destinationType: s.literal("portal-item"),
305
+ itemId: s.string().trim().min(1),
306
+ t9nKey: s.string().min(1).optional()
307
+ }), Tt = s.object({
308
+ destinationType: s.literal("portal-group"),
309
+ groupId: s.string().trim().min(1),
310
+ t9nKey: s.string().min(1).optional()
311
+ }), Mt = s.object({
312
+ destinationType: s.union([
313
+ s.literal("portal-gallery"),
314
+ s.literal("portal-map-viewer"),
315
+ s.literal("portal-notebooks"),
316
+ s.literal("portal-scene-viewer")
317
+ ]),
318
+ t9nKey: s.string().min(1).optional()
319
+ }), Ct = s.union([
320
+ vt,
321
+ It,
322
+ xt,
323
+ St,
324
+ Tt,
325
+ Mt
326
+ ]), be = "portal-navigation", D = async (e, t) => {
327
+ const a = t?.configurable?.context;
328
+ !we(a) || !a.navigationTargetMap?.[e.destinationType] || await B({ type: be, data: { ...e } }, t);
329
+ }, Gt = async (e, t) => {
330
+ const a = e.createdGroupId ?? e.agentExecutionContext.sharedState.createdGroupId?.value;
331
+ return a ? (await m({ text: "Preparing navigation...", agentName: "group-creation" }, t), await D({ destinationType: "portal-group", groupId: a }, t), {}) : {};
332
+ }, te = (e, t) => t ?? e, ve = h.Root({
333
+ ...N(),
500
334
  // * Shared state between nodes (but not persisted to the agent execution context)
501
335
  /** Parameters related to the user's intent for group creation actions */
502
- intentParams: h({ reducer: z, default: () => ({ intent: "clarify" }) }),
336
+ intentParams: h({ reducer: te, default: () => ({ intent: "clarify" }) }),
503
337
  /** The ID of the group that was created
504
338
  * even though we already have this in the shared state
505
339
  * we still need it here to also share between nodes
506
340
  */
507
- createdGroupId: h({ reducer: z, default: () => "" })
508
- }), Ft = () => new $(Y).addNode("detectGroupCreationIntent", Rt).addNode("createPortalGroup", Nt).addNode("addMembersToPortalGroup", Ct).addNode("suggestCreatedGroupNavigation", Vt).addEdge(G, "detectGroupCreationIntent").addConditionalEdges("detectGroupCreationIntent", (t) => {
341
+ createdGroupId: h({ reducer: te, default: () => "" })
342
+ }), At = () => new G(ve).addNode("detectGroupCreationIntent", ft).addNode("createPortalGroup", mt).addNode("addMembersToPortalGroup", ut).addNode("suggestCreatedGroupNavigation", Gt).addEdge(A, "detectGroupCreationIntent").addConditionalEdges("detectGroupCreationIntent", (t) => {
509
343
  switch (t.intentParams.intent) {
510
344
  case "create":
511
345
  return "createPortalGroup";
512
346
  case "addMembers":
513
347
  return "addMembersToPortalGroup";
514
348
  default:
515
- return y;
349
+ return w;
516
350
  }
517
- }).addEdge("createPortalGroup", "suggestCreatedGroupNavigation").addEdge("addMembersToPortalGroup", "suggestCreatedGroupNavigation").addEdge("suggestCreatedGroupNavigation", y), Bt = String.raw`- **portal-group-creation** - Portal group creation assistant:
351
+ }).addEdge("createPortalGroup", "suggestCreatedGroupNavigation").addEdge("addMembersToPortalGroup", "suggestCreatedGroupNavigation").addEdge("suggestCreatedGroupNavigation", w), Nt = String.raw`- **portal-group-creation** - Portal group creation assistant:
518
352
  - creates a new ArcGIS Portal group for the signed-in user
519
353
  - adds users to the newly created group using @mention usernames
520
- `, Lt = {
354
+ `, Pt = {
521
355
  id: "portal-group-creation",
522
356
  name: "Portal Group Creation",
523
- description: Bt,
524
- createGraph: Ft,
525
- workspace: Y
526
- }, H = "portalDocAssistantMemory", Qt = () => ({ conversationId: "" }), Kt = (s) => {
527
- const t = s?.[H]?.value;
357
+ description: Nt,
358
+ createGraph: At,
359
+ workspace: ve
360
+ }, Ie = "portalDocAssistantMemory", qt = () => ({ conversationId: "" }), Et = (e) => {
361
+ const t = e?.[Ie]?.value;
528
362
  if (!t || typeof t != "object")
529
- return Qt();
530
- const e = t;
363
+ return qt();
364
+ const a = t;
365
+ return {
366
+ conversationId: typeof a.conversationId == "string" ? a.conversationId : ""
367
+ };
368
+ }, kt = (e) => ({
369
+ [Ie]: { value: e }
370
+ }), zt = {
371
+ pipeline: {
372
+ follow_up: { allow: !1 }
373
+ }
374
+ };
375
+ function $t(e) {
531
376
  return {
532
- conversationId: typeof e.conversationId == "string" ? e.conversationId : ""
377
+ kind: "DocAIAssistantRequest",
378
+ filters: {
379
+ ...zt,
380
+ persona: { persona: e }
381
+ }
533
382
  };
534
- }, Wt = (s) => ({
535
- [H]: { value: s }
536
- });
537
- async function Ot({
538
- portal: s,
383
+ }
384
+ async function Rt({
385
+ portal: e,
539
386
  question: t,
540
- persona: e,
541
- previousConversationId: a,
387
+ persona: a,
388
+ previousConversationId: n,
542
389
  signal: r,
543
- skillId: l
390
+ skillId: o
544
391
  }) {
545
- l ??= "doc_ai_assistant";
546
- const i = await _t({
547
- portal: s,
548
- skillId: l,
392
+ o ??= "doc_ai_assistant";
393
+ const u = $t(a), i = await Dt({
394
+ portal: e,
395
+ skillId: o,
549
396
  message: t,
550
- options: { context: {
551
- kind: "DocAIAssistantRequest",
552
- filters: { persona: { persona: e } }
553
- }, previousConversationId: a, signal: r }
397
+ options: { context: u, previousConversationId: n, signal: r }
554
398
  });
555
399
  return {
556
- reply: Jt(i, l),
400
+ reply: Ut(i, o),
557
401
  conversationId: i[0]?.conversationId ?? ""
558
402
  };
559
403
  }
560
- async function _t({
561
- portal: s,
404
+ async function Dt({
405
+ portal: e,
562
406
  skillId: t,
563
- message: e,
564
- options: a
407
+ message: a,
408
+ options: n
565
409
  }) {
566
- const l = `${s.helperServices.aiAssistantServices.url}/skills/${t}/chat`, c = {
410
+ const o = `${e.helperServices.aiAssistantServices.url}/skills/${t}/chat`, u = {
567
411
  "Content-Type": "application/json",
568
- token: mt.findCredential(s.url)?.token ?? ""
569
- }, i = await k(l, {
412
+ token: Je.findCredential(e.url)?.token ?? ""
413
+ }, i = await Y(o, {
570
414
  method: "post",
571
415
  body: JSON.stringify({
572
- message: e,
573
- context: a.context,
574
- conversationId: a.previousConversationId
416
+ message: a,
417
+ context: n.context,
418
+ conversationId: n.previousConversationId
575
419
  }),
576
- headers: c,
577
- signal: a.signal
420
+ headers: u,
421
+ signal: n.signal
578
422
  });
579
423
  if (i.httpStatus !== 200)
580
424
  throw new Error(`Doc assistant chat failed (${i.httpStatus})`, {
581
425
  cause: i.data
582
426
  });
583
- const o = i.data, u = [o], { conversationId: d, inquiryId: p } = o, m = async (f, v) => {
584
- if (!v)
427
+ const l = i.data, c = [l], { conversationId: d, inquiryId: g } = l, p = async (f, y) => {
428
+ if (!y)
585
429
  return;
586
- await ot(1e3);
587
- const S = await k(l, {
430
+ await _e(500);
431
+ const x = await Y(o, {
588
432
  method: "post",
589
- body: JSON.stringify({ conversationId: d, inquiryId: p, ackSequenceNumber: f }),
590
- headers: c,
591
- signal: a.signal
433
+ body: JSON.stringify({ conversationId: d, inquiryId: g, ackSequenceNumber: f }),
434
+ headers: u,
435
+ signal: n.signal
592
436
  });
593
- if (S.httpStatus !== 200)
594
- throw new Error(`Doc assistant poll failed (${S.httpStatus})`, {
595
- cause: S.data
437
+ if (x.httpStatus !== 200)
438
+ throw new Error(`Doc assistant poll failed (${x.httpStatus})`, {
439
+ cause: x.data
596
440
  });
597
- const A = S.data;
598
- u.push(A), await m(A.sequenceNumber, A.hasMore);
441
+ const M = x.data;
442
+ c.push(M), await p(M.sequenceNumber, M.hasMore);
599
443
  };
600
- return o.hasMore && await m(o.sequenceNumber, o.hasMore), u;
444
+ return l.hasMore && await p(l.sequenceNumber, l.hasMore), c;
601
445
  }
602
- function Jt(s, t) {
446
+ function Ut(e, t) {
603
447
  switch (t) {
604
448
  case "doc_chat":
605
- return s.find((e) => e.message != null)?.message ?? "";
449
+ return e.find((a) => a.message != null)?.message ?? "";
606
450
  case "doc_ai_assistant":
607
- for (let e = s.length - 1; e >= 0; e -= 1) {
608
- const a = s[e];
609
- if (a.context?.kind === "DocAIAssistantContext") {
610
- const r = a.context.results?.[0]?.reply;
451
+ for (let a = e.length - 1; a >= 0; a -= 1) {
452
+ const n = e[a];
453
+ if (n.context?.kind === "DocAIAssistantContext") {
454
+ const r = n.context.results?.[0]?.reply;
611
455
  if (r)
612
456
  return r;
613
457
  }
614
458
  }
615
459
  return "";
616
460
  default:
617
- return P(t);
461
+ return R(t);
618
462
  }
619
463
  }
620
- const Yt = async (s, t) => {
621
- await g({ text: "Asking documentation assistant...", agentName: "doc-assistant" }, t);
622
- const e = x(s.agentExecutionContext.messages).trim();
623
- if (!e)
464
+ const Ft = async (e, t) => {
465
+ await m({ text: "Asking documentation assistant...", agentName: "doc-assistant" }, t);
466
+ const a = I(e.agentExecutionContext.messages).trim();
467
+ if (!a)
624
468
  return {
625
469
  status: "success",
626
470
  outputMessage: "Please share your question and I can help with ArcGIS and Portal documentation."
627
471
  };
628
- const a = t?.configurable?.context;
629
- I(a);
630
- const r = Kt(s.agentExecutionContext.sharedState), { reply: l, conversationId: c } = await Ot({
631
- portal: a.portal,
632
- question: e,
472
+ const n = t?.configurable?.context;
473
+ T(n);
474
+ const r = Et(e.agentExecutionContext.sharedState), { reply: o, conversationId: u } = await Rt({
475
+ portal: n.portal,
476
+ question: a,
633
477
  previousConversationId: r.conversationId || void 0,
634
478
  skillId: "doc_ai_assistant",
635
- persona: "developers"
479
+ persona: "doc-online"
636
480
  });
637
481
  return {
638
482
  status: "success",
639
- outputMessage: l.trim() || "I could not retrieve a response from the documentation assistant.",
640
- sharedStatePatch: Wt({
641
- conversationId: c || r.conversationId
483
+ outputMessage: o.trim() || "I could not retrieve a response from the documentation assistant.",
484
+ sharedStatePatch: kt({
485
+ conversationId: u || r.conversationId
642
486
  })
643
487
  };
644
- }, Ht = K(
645
- async ({ groupTitle: s }, t) => {
646
- const e = s.trim();
647
- if (!e)
488
+ }, xe = ye(
489
+ async ({ groupTitle: e }, t) => {
490
+ const a = e.trim();
491
+ if (!a)
648
492
  return null;
649
- const a = t?.configurable?.context;
650
- I(a);
493
+ const n = t?.configurable?.context;
494
+ T(n);
651
495
  try {
652
- return (await ut(a.portal, { query: `title:${e}`, num: 1 }))?.results[0]?.id || null;
496
+ return (await We(n.portal, { query: `title:${a}`, num: 1 }))?.results[0]?.id || null;
653
497
  } catch (r) {
654
498
  return console.error("Error searching for portal group by title:", r), null;
655
499
  }
@@ -657,198 +501,1530 @@ const Yt = async (s, t) => {
657
501
  {
658
502
  name: "resolvePortalGroupIdByTitle",
659
503
  description: "Resolves an ArcGIS Portal group title to the best-match group id. Use this when a user references a group by title instead of an explicit group id.",
660
- schema: n.object({
661
- groupTitle: n.string().describe("The portal group title to resolve to a group id.")
504
+ schema: s.object({
505
+ groupTitle: s.string().describe("The portal group title to resolve to a group id.")
662
506
  })
663
507
  }
664
- ), j = n.object({
665
- shouldSuggestNavigation: n.boolean().default(!1),
666
- destinationType: n.enum(["none", "portal-content", "portal-item", "portal-groups", "portal-group"]).default("none"),
667
- itemId: n.string().default(""),
668
- groupId: n.string().default("")
669
- }), Xt = async (s, t) => {
670
- await g({ text: "Extracting navigation intent...", agentName: "doc-assistant" }, t);
671
- const e = s.outputMessage.trim();
672
- if (!e)
673
- return {};
674
- const a = x(s.agentExecutionContext.messages).trim(), r = await L.fromTemplate(te).format({
675
- question: a,
676
- response: e
677
- }), c = await Q({
678
- model: await F({ modelTier: "default" }),
679
- tools: [W, Ht],
680
- systemPrompt: r,
681
- responseFormat: j,
682
- checkpointer: !0
683
- }).invoke({ messages: s.agentExecutionContext.messages }, t), i = j.parse(c.structuredResponse ?? {});
684
- if (!i.shouldSuggestNavigation || i.destinationType === "none")
685
- return {};
686
- const o = Zt(i);
687
- return o ? (await J(o, t), {}) : {};
688
- };
689
- function Zt({
690
- destinationType: s,
691
- itemId: t,
692
- groupId: e
693
- }) {
694
- switch (s) {
695
- case "portal-content":
696
- return { destinationType: "portal-content" };
697
- case "portal-groups":
698
- return { destinationType: "portal-groups" };
699
- case "portal-item":
700
- return t ? { destinationType: "portal-item", itemId: t } : null;
701
- case "portal-group":
702
- return e ? { destinationType: "portal-group", groupId: e } : null;
703
- case "none":
508
+ ), Se = ye(
509
+ async ({ itemTitle: e }, t) => {
510
+ const a = e.trim();
511
+ if (!a)
704
512
  return null;
705
- default:
706
- return P(s);
513
+ const n = t?.configurable?.context;
514
+ T(n);
515
+ const { result: r, error: o } = await He(n.portal, a, { num: 1 });
516
+ return o && console.error("Error searching for portal item by title:", o), r?.results[0]?.id || null;
517
+ },
518
+ {
519
+ name: "resolvePortalItemIdByTitle",
520
+ description: 'Resolves an ArcGIS Portal item title to the best-match item id. Use this when a user references an item by title (including hash mentions like #title or #"title with spaces") instead of an explicit item id.',
521
+ schema: s.object({
522
+ itemTitle: s.string().describe("The portal item title to resolve to an item id.")
523
+ })
707
524
  }
525
+ );
526
+ function C(e, t = "#") {
527
+ const a = e.match(new RegExp(`\\${t}"([^"]+)"`, "u"));
528
+ if (a?.[1])
529
+ return a[1].trim();
530
+ const n = e.match(new RegExp(`\\${t}([^\\s"']+)`, "u"));
531
+ return n?.[1] ? n[1].trim() : null;
708
532
  }
709
- const te = `
533
+ const Te = {
534
+ "portal-content": {
535
+ description: "The main content page of the portal.",
536
+ hints: ["My content", "Content"]
537
+ },
538
+ "portal-content-favorites": {
539
+ description: "The Favorites view under Content in the portal.",
540
+ hints: ["My favorites", "Favorites", "Content favorites"]
541
+ },
542
+ "portal-content-group": {
543
+ description: "The Groups view under Content in the portal.",
544
+ hints: ["Content groups", "Group content", "My groups content"]
545
+ },
546
+ "portal-content-living-atlas": {
547
+ description: "The Living Atlas view under Content in the portal.",
548
+ hints: ["Living Atlas", "Content living atlas"]
549
+ },
550
+ "portal-content-organization": {
551
+ description: "The Organization view under Content in the portal.",
552
+ hints: ["Organization content", "Content organization", "My organization content"]
553
+ },
554
+ "portal-gallery": {
555
+ description: "The gallery page of the portal.",
556
+ hints: ["Gallery", "Featured content", "Maps and apps"]
557
+ },
558
+ "portal-group": {
559
+ description: "A specific group page in the portal.",
560
+ hints: ["Group", "group page"]
561
+ },
562
+ "portal-groups": {
563
+ description: "The groups listing page of the portal.",
564
+ hints: ["Groups", "Browse groups"]
565
+ },
566
+ "portal-groups-featured": {
567
+ description: "The Featured groups view under Groups in the portal.",
568
+ hints: ["Featured groups", "Groups featured"]
569
+ },
570
+ "portal-groups-my": {
571
+ description: "The My groups view under Groups in the portal.",
572
+ hints: ["My groups", "Groups my"]
573
+ },
574
+ "portal-groups-organization": {
575
+ description: "The Organization groups view under Groups in the portal.",
576
+ hints: ["Organization groups", "Groups organization", "My organization groups"]
577
+ },
578
+ "portal-item": {
579
+ description: "A specific item page in the portal.",
580
+ hints: ["Item", "item page"]
581
+ },
582
+ "portal-map-viewer": {
583
+ description: "The Map Viewer app of the portal.",
584
+ hints: ["Map Viewer", "Map", "Open map"]
585
+ },
586
+ "portal-notebooks": {
587
+ description: "The Notebooks home page of the portal.",
588
+ hints: ["Notebooks", "Notebook home", "My notebooks"]
589
+ },
590
+ "portal-scene-viewer": {
591
+ description: "The Scene Viewer app of the portal.",
592
+ hints: ["Scene Viewer", "Scene", "3D scene"]
593
+ },
594
+ "portal-org-security": {
595
+ description: "The Organization > Settings > Security page of the portal.",
596
+ hints: ["Organization settings", "Security", "Organization > Settings > Security"]
597
+ }
598
+ }, Ot = Ye(Te), Kt = Object.entries(Te).map(([e, { description: t, hints: a }]) => ` - ${e}: ${t} (hints: ${a.join(", ")})`).join(`
599
+ `), Vt = `
710
600
  You decide whether the assistant response should include a navigation action to ArcGIS Portal.
711
601
 
712
602
  Given the user question and assistant response:
713
603
  - Decide if a navigation action would help the user complete the task.
714
- - If yes, choose one destination type:
715
- - portal-content: portal content page
716
- - portal-groups: groups listing page
717
- - portal-item: specific item page (requires itemId)
718
- - portal-group: specific group page (requires groupId)
604
+ - If yes, choose one destinationType:
605
+ ${Kt}
719
606
 
720
607
  Rules:
608
+ - Only suggest navigation when you are highly confident the destination will help complete the user's task.
609
+ - If confidence is below 0.85, set shouldSuggestNavigation=false and destinationType=none.
610
+ - If there is no clear destination from the allowed types, set shouldSuggestNavigation=false and destinationType=none.
721
611
  - If no navigation is useful, set shouldSuggestNavigation=false and destinationType=none.
722
- - If destinationType is portal-item and user references an item by title (for example #title, #"title with spaces", or plain quoted title), call resolvePortalItemIdByTitle and set itemId from the tool result.
723
- - If destinationType is portal-group and user references a group by title (for example $title, $"title with spaces", or plain quoted group title), call resolvePortalGroupIdByTitle and set groupId from the tool result.
724
- - Do not invent itemId.
725
- - Do not invent groupId.
726
- - Prefer destinationType=portal-content for generic "go to content" guidance.
612
+ - Prefer the most specific destination that is clearly supported by the question and response.
613
+ - Use entity-level destinations over collection/root destinations when both could apply and the entity target is explicit.
614
+ - Use collection/root destinations only for generic browsing intent with no specific entity target.
615
+ - If a chosen destination requires parameters, include all required parameters.
616
+ - If required parameters are missing or uncertain, set shouldSuggestNavigation=false and destinationType=none.
617
+ - Do not invent required parameters.
618
+ - Always include a confidence score from 0 to 1 in the output.
619
+ - Confidence means confidence that a navigation suggestion should be shown to the user.
620
+ - If shouldSuggestNavigation=false or destinationType=none, confidence must be <= 0.5.
621
+ - Use confidence >= 0.85 only when shouldSuggestNavigation=true and destinationType is not none.
727
622
 
728
623
  User question:
729
624
  {question}
730
625
 
731
626
  Assistant response:
732
627
  {response}
733
- `, X = dt.Root({
734
- ...E()
735
- }), ee = () => new $(X).addNode("answerDocQuestion", Yt).addNode("extractNavigationIntent", Xt).addEdge(G, "answerDocQuestion").addEdge("answerDocQuestion", "extractNavigationIntent").addEdge("extractNavigationIntent", y), se = String.raw`- **portal-doc-assistant** - General ArcGIS documentation and Portal help assistant:
736
- - answers general ArcGIS, Portal, Enterprise, and JavaScript SDK questions
737
- - acts as a fallback when specialized agents are not applicable
738
- `, ae = {
739
- id: "portal-doc-assistant",
740
- name: "Portal Doc Assistant",
741
- description: se,
742
- createGraph: ee,
743
- workspace: X
744
- }, re = st`:host{height:100%;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-3);display:block;width:100%;--tw-shadow: 0 1px 6px -1px rgba(0, 0, 0, .16), 0 1px 2px -1px rgba(0, 0, 0, .08);--tw-shadow-colored: 0 1px 6px -1px var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.chat-entry{display:flex;flex-direction:column;gap:.75rem;width:100%}.chat-actions{display:flex;justify-content:flex-end;gap:.5rem}.header-actions{display:flex;gap:.5rem;padding-inline-start:.75rem}.navigation-block{display:flex;flex-direction:column;align-items:stretch;gap:.35rem;margin-top:.5rem}.navigation-button{width:100%;margin-block:.25rem}.navigation-block-description{font-size:.75rem;color:var(--calcite-color-text-3)}`, oe = (s, t) => {
745
- const { destinationType: e } = s, a = `${t.url}/home`;
746
- switch (e) {
747
- case "portal-content":
748
- return `${a}/content.html`;
749
- case "portal-groups":
750
- return `${a}/groups.html`;
751
- case "portal-item":
752
- return `${a}/item.html?id=${s.itemId}`;
628
+ `, ae = s.object({
629
+ shouldSuggestNavigation: s.boolean().default(!1),
630
+ destinationType: s.enum(["none", ...Ot]).default("none"),
631
+ itemId: s.string().default(""),
632
+ groupId: s.string().default(""),
633
+ confidence: s.number().min(0).max(1).default(0)
634
+ }), jt = async (e, t) => {
635
+ await m({ text: "Extracting navigation intent...", agentName: "doc-assistant" }, t);
636
+ const a = e.outputMessage.trim();
637
+ if (!a)
638
+ return {};
639
+ const n = I(e.agentExecutionContext.messages).trim(), r = await W.fromTemplate(Vt).format({
640
+ question: n,
641
+ response: a
642
+ }), u = (await Q({ modelTier: "fast" })).withStructuredOutput(ae), i = ae.parse(await u.invoke(r));
643
+ if (!i.shouldSuggestNavigation || i.destinationType === "none")
644
+ return {};
645
+ if (i.destinationType === "portal-item" && !i.itemId) {
646
+ const c = C(n, "#");
647
+ c && (i.itemId = await Se.invoke({ itemTitle: c }, t) ?? "");
648
+ }
649
+ if (i.destinationType === "portal-group" && !i.groupId) {
650
+ const c = C(n, "$") ?? C(n, "#");
651
+ c && (i.groupId = await xe.invoke({ groupTitle: c }, t) ?? "");
652
+ }
653
+ const l = Lt(i);
654
+ return l ? (await D(l, t), {}) : {};
655
+ };
656
+ function Lt({
657
+ destinationType: e,
658
+ itemId: t,
659
+ groupId: a
660
+ }) {
661
+ switch (e) {
662
+ case "portal-content":
663
+ case "portal-gallery":
664
+ case "portal-groups":
665
+ case "portal-map-viewer":
666
+ case "portal-notebooks":
667
+ case "portal-scene-viewer":
668
+ return { destinationType: e };
669
+ case "portal-org-security":
670
+ return { destinationType: "portal-org", hash: "settings" };
671
+ case "portal-content-favorites":
672
+ return { destinationType: "portal-content", hash: "favorites" };
673
+ case "portal-content-group":
674
+ return { destinationType: "portal-content", hash: "group" };
675
+ case "portal-content-living-atlas":
676
+ return { destinationType: "portal-content", hash: "living-atlas" };
677
+ case "portal-content-organization":
678
+ return { destinationType: "portal-content", hash: "org" };
679
+ case "portal-groups-featured":
680
+ return { destinationType: "portal-groups", hash: "featured" };
681
+ case "portal-groups-my":
682
+ return { destinationType: "portal-groups", hash: "my" };
683
+ case "portal-groups-organization":
684
+ return { destinationType: "portal-groups", hash: "organization" };
685
+ case "portal-item":
686
+ return t ? { destinationType: e, itemId: t } : null;
687
+ case "portal-group":
688
+ return a ? { destinationType: e, groupId: a } : null;
689
+ case "none":
690
+ return null;
691
+ default:
692
+ return R(e);
693
+ }
694
+ }
695
+ const Me = h.Root({
696
+ ...N()
697
+ }), Bt = () => new G(Me).addNode("answerDocQuestion", Ft).addNode("extractNavigationIntent", jt).addEdge(A, "answerDocQuestion").addEdge("answerDocQuestion", "extractNavigationIntent").addEdge("extractNavigationIntent", w), Qt = String.raw`- **portal-doc-assistant** - General ArcGIS documentation and Portal help assistant:
698
+ - answers general ArcGIS, Portal, Enterprise, and JavaScript SDK questions
699
+ - acts as a fallback when specialized agents are not applicable
700
+ `, Wt = {
701
+ id: "portal-doc-assistant",
702
+ name: "Portal Doc Assistant",
703
+ description: Qt,
704
+ createGraph: Bt,
705
+ workspace: Me
706
+ }, Jt = () => ({ latestGroupId: null, memory: {} }), U = (e) => {
707
+ const t = e?.agentExecutionContext.sharedState.portalGroupSummaryMemory?.value;
708
+ return t ? { latestGroupId: t.latestGroupId, memory: t.memory } : Jt();
709
+ }, Ce = `
710
+ Shared markdown formatting rules:
711
+ - Use clear markdown headings (##) to separate sections.
712
+ - Use concise bullet points for lists of facts, counts, or signals.
713
+ - Emphasize key metrics with bold labels (for example: **Recent items:** 4).
714
+ - Keep wording direct and analytical; avoid filler language but make sure the language is friendly.
715
+ - Do not include raw internal IDs unless explicitly requested.
716
+ `, _t = `
717
+ You answer follow-up questions about ArcGIS group analytics.
718
+
719
+ ${Ce}
720
+
721
+ Ground your answer in the provided group analytics summary and context.
722
+ If the answer is not available from the provided context, state that clearly and suggest what to check next.
723
+
724
+ Response rules:
725
+ - Reply in concise markdown with this section structure:
726
+ 1) ## Answer
727
+ 2) ## Evidence
728
+ 3) ## Gaps (only when data is missing)
729
+ - Keep the answer focused on the follow-up question.
730
+ - Do not include internal identifiers.
731
+ - Mark isRelevant=false when the question is not about this group or cannot be grounded in this group context.
732
+
733
+ Group analytics summary:
734
+ {summary}
735
+
736
+ Group full context:
737
+ {fullContext}
738
+
739
+ Question:
740
+ {question}
741
+ `, Yt = async (e, t) => {
742
+ await m({ text: "Answering group follow-up...", agentName: "group-analytics" }, t);
743
+ const a = U(e), n = e.groupSummaryGroupId ?? a.latestGroupId, r = n ? a.memory[n] : void 0, o = e.groupSummaryQuestion || I(e.agentExecutionContext.messages);
744
+ return r ? {
745
+ status: "success",
746
+ outputMessage: (await v({
747
+ promptText: _t,
748
+ schema: Ht,
749
+ modelTier: "default",
750
+ inputVariables: {
751
+ summary: r.summary,
752
+ question: o,
753
+ fullContext: JSON.stringify(r.fullContext)
754
+ }
755
+ })).answer
756
+ } : {
757
+ status: "success",
758
+ outputMessage: "I do not have group analytics context yet. Ask me to analyze a group first with analyze group <group id>."
759
+ };
760
+ }, Ht = s.object({
761
+ answer: s.string(),
762
+ isRelevant: s.boolean()
763
+ }), Xt = `
764
+ Classify the user's request for ArcGIS Portal group analytics.
765
+
766
+ Rules:
767
+ - intent="summarize" only when the user explicitly asks to summarize, analyze, overview, or recap a group.
768
+ - intent="followUp" for follow-up questions about a previously analyzed group.
769
+ - intent="navigation" when the user asks to open, go to, navigate to, or view the group page.
770
+ - intent="clarify" when intent or required group target is missing.
771
+ - groupId must be the final resolved group id.
772
+ - If request has explicit group id, set groupId directly.
773
+ - If request references group title (for example $title, $"title with spaces", or plain quoted group title), call resolvePortalGroupIdByTitle and set groupId to the tool result.
774
+ - Never return group titles in output fields.
775
+ - If intent is "followUp", set question to the user's full question/request text.
776
+ - If intent is "navigation", set question="".
777
+ - If intent is "summarize", set question="".
778
+ - If intent is "navigation" and no group is specified, leave groupId empty so the system can navigate to the groups listing page.
779
+ - If hasAnalyticsContext is true and the user asks about the same group context without an explicit summarize/analyze command, prefer "followUp".
780
+
781
+ Examples:
782
+ - "Analyze group 0123456789abcdef0123456789abcdef" => summarize, groupId="0123456789abcdef0123456789abcdef"
783
+ - "Analyze group $living atlas" => summarize, call resolvePortalGroupIdByTitle("living atlas") and set groupId to tool result
784
+ - "Analyze group $"living atlas basemaps"" => summarize, call resolvePortalGroupIdByTitle("living atlas basemaps") and set groupId to tool result
785
+ - "Is this group active?" with hasAnalyticsContext=true => followUp
786
+
787
+ hasAnalyticsContext:
788
+ {hasAnalyticsContext}
789
+
790
+ User message:
791
+ {userMessage}
792
+ `, Zt = async (e, t) => {
793
+ await m({ text: "Analyzing group-analytics intent...", agentName: "group-analytics" }, t);
794
+ const a = I(e.agentExecutionContext.messages), n = !!U(e).latestGroupId, r = await W.fromTemplate(Xt).format({
795
+ userMessage: a,
796
+ hasAnalyticsContext: String(n)
797
+ }), u = (await Q({ modelTier: "fast" })).withStructuredOutput(ne), i = ne.parse(await u.invoke(r));
798
+ let l = i.groupId;
799
+ if ((i.intent === "summarize" || i.intent === "navigation") && !l) {
800
+ const y = C(a, "$");
801
+ y && (l = await xe.invoke({ groupTitle: y }, t) ?? "");
802
+ }
803
+ const { intent: c, question: d } = i, g = c === "summarize" && !l, p = c === "followUp" && !(d ?? "").trim(), f = c === "clarify" || g || p;
804
+ return {
805
+ groupSummaryIntent: f ? "clarify" : c,
806
+ groupSummaryGroupId: l || null,
807
+ groupSummaryQuestion: d || "",
808
+ status: "success",
809
+ outputMessage: f ? "Please clarify with a group id or title" : ""
810
+ };
811
+ }, ne = s.object({
812
+ intent: s.enum(["summarize", "followUp", "navigation", "clarify"]),
813
+ groupId: s.string().default(""),
814
+ question: s.string().default("")
815
+ }), ea = async (e, t) => {
816
+ const a = U(e), n = e.groupSummaryGroupId ?? a.latestGroupId;
817
+ return await m({ text: "Preparing navigation...", agentName: "group-analytics" }, t), await D(
818
+ n ? { destinationType: "portal-group", groupId: n } : { destinationType: "portal-groups" },
819
+ t
820
+ ), { status: "success" };
821
+ };
822
+ function Ge({ timestamp: e, now: t, windowMs: a }) {
823
+ return e ? t - e <= a : !1;
824
+ }
825
+ const ta = 720 * 60 * 60 * 1e3;
826
+ function aa(e) {
827
+ const t = Ze(e);
828
+ return {
829
+ id: e.id ?? "",
830
+ title: e.title ?? "",
831
+ description: e.description ?? "",
832
+ snippet: e.snippet ?? "",
833
+ access: e.access ?? null,
834
+ owner: e.owner ?? "",
835
+ tags: e.tags ?? [],
836
+ created: e.created?.getTime(),
837
+ modified: e.modified?.getTime(),
838
+ isInvitationOnly: e.isInvitationOnly,
839
+ sourceSignals: {
840
+ capabilities: nt(e),
841
+ membershipAccess: at(e),
842
+ isOpenData: tt(e),
843
+ isDistributedCollaborationGroup: et(e),
844
+ orgId: t.orgId,
845
+ hiddenMembers: t.hiddenMembers,
846
+ isViewOnly: t.isViewOnly,
847
+ isReadOnly: t.isReadOnly,
848
+ leavingDisallowed: t.leavingDisallowed
849
+ }
850
+ };
851
+ }
852
+ async function na(e) {
853
+ const t = { owner: e.owner ?? "", admins: [], users: [] };
854
+ try {
855
+ return await e.fetchMembers();
856
+ } catch (a) {
857
+ return console.warn("Unable to fetch group members for analytics context", a), t;
858
+ }
859
+ }
860
+ function ra(e) {
861
+ return e.map((t) => ({
862
+ id: t.id ?? "",
863
+ title: t.title ?? "Untitled",
864
+ type: t.type ?? "Unknown",
865
+ owner: t.owner ?? "",
866
+ created: t.created?.getTime(),
867
+ modified: t.modified?.getTime()
868
+ }));
869
+ }
870
+ function oa(e, t) {
871
+ return e.filter(
872
+ (a) => a.modified ? Ge({ timestamp: a.modified, now: t, windowMs: ta }) : !1
873
+ );
874
+ }
875
+ function sa(e) {
876
+ const t = /* @__PURE__ */ new Map();
877
+ for (const a of e)
878
+ t.set(a.type, (t.get(a.type) ?? 0) + 1);
879
+ return [...t.entries()].sort((a, n) => n[1] - a[1] || a[0].localeCompare(n[0])).slice(0, 6).map(([a, n]) => ({ type: a, count: n }));
880
+ }
881
+ async function ia(e) {
882
+ const t = await e.queryItems({ num: 20, sortField: "modified", sortOrder: "desc" }), a = ra(t.results), n = Date.now();
883
+ return {
884
+ total: t.total,
885
+ topItems: a,
886
+ recentlyModifiedItems: oa(a, n),
887
+ topItemTypes: sa(a)
888
+ };
889
+ }
890
+ async function ua(e, t) {
891
+ if (!t)
892
+ return { error: { code: "missingGroupId", message: "Group id is required." } };
893
+ try {
894
+ const n = (await e.queryGroups({ query: `id:${t}`, num: 1 })).results[0];
895
+ if (!n)
896
+ return { error: { code: "groupNotFound", message: `No group found for id: ${t}` } };
897
+ const r = aa(n), o = await na(n), u = await ia(n);
898
+ return { result: { group: r, members: o, items: u } };
899
+ } catch (a) {
900
+ return console.error("Error fetching portal group analytics context:", a), { error: { code: "unhandledError" } };
901
+ }
902
+ }
903
+ const ca = `
904
+ You summarize ArcGIS Portal groups based on structured context and deterministic activity signals.
905
+
906
+ ${Ce}
907
+
908
+ Output format requirements:
909
+ - Return concise markdown with clear sections in this order:
910
+ 1) Overview
911
+ 2) Activity
912
+ 3) Members
913
+ 4) Content Theme
914
+ 5) Contribution Model
915
+ 6) Unknowns / Data Gaps
916
+ - Keep total response about 180-280 words unless the user asked for extra detail.
917
+ - Avoid internal-only implementation details and do not expose raw IDs unless user explicitly asks.
918
+
919
+ Reasoning rules:
920
+ - Use deterministicSignals as the source of truth for active/recent status.
921
+ - If group description/snippet are empty, infer purpose from tags, item title patterns, and item type distribution.
922
+ - For members, report owner/admin/user counts when available; if unavailable due to permission scope, explicitly say so.
923
+ - For contribution model, use membershipAccess, capabilities, and sourceJSON flags to characterize collaboration vs distribution behavior.
924
+ - Be explicit when signals are heuristic or unavailable.
925
+
926
+ Follow-up prompt rules:
927
+ - Generate exactly 3 follow-up prompts.
928
+ - Write them as direct first-person user chat prompts that can be clicked and sent as-is.
929
+ - Do not write meta-questions such as "Would you like..." or "Do you want me to...".
930
+ - Keep each prompt short, specific, and actionable.
931
+ - Every prompt must be answerable using only the provided group context and deterministic signals.
932
+ - Do not require external data, navigation, or additional fetches.
933
+ - Tailor each prompt to this specific group's available signals (content mix, activity, members, and contribution model).
934
+ - Avoid repeating phrasing from prior prompts or using generic template wording.
935
+ - If a signal is unavailable (for example members), do not ask follow-ups that depend on that missing signal.
936
+
937
+ Group context:
938
+ {context}
939
+
940
+ Deterministic signals:
941
+ {deterministicSignals}
942
+ `, la = 2160 * 60 * 60 * 1e3, da = async (e, t) => {
943
+ const a = e.groupSummaryGroupId;
944
+ if (!a)
945
+ return {
946
+ status: "success",
947
+ outputMessage: 'Please clarify with analyze group <group id>, analyze group $<title>, or analyze group $"<title with spaces>".'
948
+ };
949
+ await m({ text: `Analyzing group ${a}...`, agentName: "group-analytics" }, t);
950
+ const n = t?.configurable?.context;
951
+ T(n);
952
+ const { result: r, error: o } = await ua(n.portal, a);
953
+ if (o || !r)
954
+ return await m({ text: "Failed to fetch group context", agentName: "group-analytics" }, t), {
955
+ status: "success",
956
+ outputMessage: "Unable to retrieve group context for analytics."
957
+ };
958
+ const { group: u, items: i } = r, l = Date.now(), c = u.modified, d = c ? Ge({ timestamp: c, now: l, windowMs: la }) : !1, g = i.recentlyModifiedItems.length, p = g > 0, f = d || p, y = await v({
959
+ promptText: ca,
960
+ schema: pa,
961
+ modelTier: "default",
962
+ inputVariables: {
963
+ context: JSON.stringify(r),
964
+ deterministicSignals: JSON.stringify({
965
+ isGroupActive: f,
966
+ isGroupRecentlyModified: d,
967
+ hasRecentlyAddedOrUpdatedContent: p,
968
+ recentItemCount: g
969
+ })
970
+ }
971
+ }), { followUpQuestions: x, summary: M } = y, Re = U(e), De = {
972
+ latestGroupId: a,
973
+ memory: {
974
+ ...Re.memory,
975
+ [a]: { summary: M, followUpQuestions: x, fullContext: r }
976
+ }
977
+ };
978
+ return x.length && await B({ type: "suggested-prompts", data: { prompts: x } }, t), {
979
+ status: "success",
980
+ outputMessage: M,
981
+ sharedStatePatch: { portalGroupSummaryMemory: { value: De } }
982
+ };
983
+ }, pa = s.object({
984
+ summary: s.string(),
985
+ followUpQuestions: s.array(s.string()).default([])
986
+ }), F = (e, t) => t ?? e, Ae = h.Root({
987
+ ...N(),
988
+ groupSummaryIntent: h({
989
+ reducer: F,
990
+ default: () => "clarify"
991
+ }),
992
+ groupSummaryGroupId: h({
993
+ reducer: F,
994
+ default: () => null
995
+ }),
996
+ groupSummaryQuestion: h({
997
+ reducer: F,
998
+ default: () => ""
999
+ })
1000
+ }), ma = () => new G(Ae).addNode("detectGroupSummaryIntent", Zt).addNode("summarizePortalGroup", da).addNode("answerGroupSummaryFollowUp", Yt).addNode("suggestGroupSummaryNavigation", ea).addEdge(A, "detectGroupSummaryIntent").addConditionalEdges("detectGroupSummaryIntent", (t) => t.groupSummaryIntent === "summarize" ? "summarizePortalGroup" : t.groupSummaryIntent === "followUp" ? "answerGroupSummaryFollowUp" : t.groupSummaryIntent === "navigation" ? "suggestGroupSummaryNavigation" : w).addEdge("summarizePortalGroup", w).addEdge("answerGroupSummaryFollowUp", w).addEdge("suggestGroupSummaryNavigation", w), ga = String.raw`- **portal-group-analytics** - Portal group analytics assistant:
1001
+ - summarizes ArcGIS portal groups from group context and sourceJSON details
1002
+ - answers follow-up questions grounded in the summarized group
1003
+ - suggests navigation to groups when relevant
1004
+ `, ha = {
1005
+ id: "portal-group-analytics",
1006
+ name: "Portal Group Analytics",
1007
+ description: ga,
1008
+ createGraph: ma,
1009
+ workspace: Ae
1010
+ }, fa = () => ({ latestItemId: null, memory: {} }), J = (e) => {
1011
+ const t = e?.agentExecutionContext.sharedState.portalItemAnalyticsSummaryMemory?.value;
1012
+ return t ? { latestItemId: t.latestItemId, memory: t.memory } : fa();
1013
+ }, re = s.object({
1014
+ intent: s.enum(["summarize", "followUp", "clarify"]),
1015
+ itemId: s.string().default(""),
1016
+ question: s.string().default("")
1017
+ }), ya = s.object({ summary: s.string(), followUpQuestions: s.array(s.string()).default([]) }), wa = s.object({ answer: s.string(), isRelevant: s.boolean() }), ba = `
1018
+ You answer follow-up questions about an ArcGIS item.
1019
+
1020
+ Ground your answer in the provided item context.
1021
+ If the answer is not available from the provided context, state that clearly and suggest what to check next.
1022
+
1023
+ Response rules:
1024
+ - Reply in concise markdown.
1025
+ - Keep the answer focused on the follow-up question.
1026
+ - Do not include internal identifiers.
1027
+ - Mark isRelevant=false when the question is not about this item or cannot be grounded in this item context.
1028
+
1029
+ Item summary:
1030
+ {summary}
1031
+
1032
+ Item full context
1033
+ {fullContext}
1034
+
1035
+ Question:
1036
+ {question}
1037
+ `, va = async (e, t) => {
1038
+ await m({ text: "Answering follow-up...", agentName: "analytics" }, t);
1039
+ const a = J(e), n = e.analyticsItemId ?? a.latestItemId, r = n ? a.memory[n] : void 0, o = e.analyticsQuestion || I(e.agentExecutionContext.messages);
1040
+ return r ? {
1041
+ status: "success",
1042
+ outputMessage: (await v({
1043
+ promptText: ba,
1044
+ schema: wa,
1045
+ modelTier: "default",
1046
+ inputVariables: {
1047
+ summary: r.summary,
1048
+ question: o,
1049
+ fullContext: JSON.stringify(r.fullContext)
1050
+ }
1051
+ })).answer
1052
+ } : {
1053
+ status: "success",
1054
+ outputMessage: "I don't have enough information yet. Please ask me to summarize the item first using summarize item <item id>."
1055
+ };
1056
+ }, Ia = `
1057
+ Classify the user analytics request.
1058
+
1059
+ Rules:
1060
+ - intent="summarize" only when the user explicitly asks to summarize/overview/recap an item.
1061
+ - intent="followUp" for analytical questions about item details, including schema/fields/attributes/layers.
1062
+ - intent="clarify" when neither summarize nor follow-up intent is clear.
1063
+ - itemId must be the final resolved item id.
1064
+ - If request has explicit item id, set itemId directly.
1065
+ - If request references item title (for example #title, #"title with spaces", or plain quoted title), call resolvePortalItemIdByTitle and set itemId to the returned value.
1066
+ - Never return item titles in output fields.
1067
+ - If intent is "followUp", set question to the user's full question/request text.
1068
+ - If intent is "summarize", set question="".
1069
+ - When user asks to show/list/explain fields, schema, attributes, columns, or layer details, classify as "followUp" unless they explicitly request a summary.
1070
+ - If hasSummaryContext is true, prefer "followUp" for detail-oriented requests that do not explicitly ask to summarize.
1071
+
1072
+ Examples:
1073
+ - "Summarize item 0123456789abcdef0123456789abcdef" => summarize, itemId="0123456789abcdef0123456789abcdef"
1074
+ - "Summarize item #california" => summarize, call resolvePortalItemIdByTitle("california") and set itemId to tool result
1075
+ - "Summarize item #"california farmland"" => summarize, call resolvePortalItemIdByTitle("california farmland") and set itemId to tool result
1076
+ - "Show the layer's available fields" => followUp
1077
+ - "List attributes and explain what status means" => followUp
1078
+ - "What fields are available?" with hasSummaryContext=true => followUp
1079
+ - "Give me an overview of item 0123456789abcdef0123456789abcdef" => summarize
1080
+
1081
+ hasSummaryContext:
1082
+ {hasSummaryContext}
1083
+
1084
+ User message:
1085
+ {userMessage}
1086
+ `, xa = async (e, t) => {
1087
+ await m({ text: "Analyzing intent...", agentName: "analytics" }, t);
1088
+ const a = I(e.agentExecutionContext.messages), n = !!J(e).latestItemId, r = await W.fromTemplate(Ia).format({
1089
+ userMessage: a,
1090
+ hasSummaryContext: String(n)
1091
+ }), u = (await Q({ modelTier: "fast" })).withStructuredOutput(re), i = re.parse(await u.invoke(r));
1092
+ let l = i.itemId;
1093
+ if (i.intent === "summarize" && !l) {
1094
+ const y = C(a, "#");
1095
+ y && (l = await Se.invoke({ itemTitle: y }, t) ?? "");
1096
+ }
1097
+ const { intent: c, question: d } = i, f = c === "clarify" || c === "summarize" && !l || c === "followUp" && !d;
1098
+ return {
1099
+ agentExecutionContext: { ...e.agentExecutionContext },
1100
+ analyticsIntent: f ? "clarify" : c,
1101
+ analyticsItemId: l || null,
1102
+ analyticsQuestion: d || "",
1103
+ status: "success",
1104
+ outputMessage: f ? 'Please clarify with summarize item <item id>, summarize item #<title>, or summarize item #"<title with spaces>".' : ""
1105
+ };
1106
+ }, Sa = `
1107
+ You are a item summary tool for ArcGIS. Your job is to summarize an item's info based on the provided context.
1108
+ Summary rules:
1109
+ - The summary should be concise markdown, make sure to format the output nicely so it's easy to read.
1110
+ - Target length: 80-150 words.
1111
+ - Provide one short descriptive paragraph.
1112
+ - Also propose 3 concise follow-up questions grounded in the item summary.
1113
+ - Keep follow-up questions specific and actionable.
1114
+ Follow-up questions rules:
1115
+ - These questions should be in the format of a prompt that the user can click on.
1116
+ - Make sure the questions are relevant to the item summary and that you can answer based solely on the provided context.
1117
+ Do not include internal identifiers.
1118
+ If the user asks for a detailed summary, you may expand the response up to 300 words.
1119
+ Item context:
1120
+ {context}
1121
+ `, Ta = async (e, t) => {
1122
+ const a = e.analyticsItemId;
1123
+ if (!a)
1124
+ return {
1125
+ status: "success",
1126
+ outputMessage: 'Please clarify with summarize item <item id>, summarize item #<title>, or summarize item #"<title with spaces>".'
1127
+ };
1128
+ await m({ text: `Summarizing item ${a}...`, agentName: "analytics" }, t);
1129
+ const n = t?.configurable?.context;
1130
+ T(n);
1131
+ const { portal: r, user: o } = n, { result: u, error: i } = await Xe(o, r, a);
1132
+ if (i || !u)
1133
+ return await m({ text: "Failed to get item context for summarization", agentName: "analytics" }, t), {
1134
+ status: "success",
1135
+ outputMessage: "Unable to retrieve item context for summarization."
1136
+ };
1137
+ const { context: l } = u, c = await v({
1138
+ promptText: Sa,
1139
+ schema: ya,
1140
+ modelTier: "default",
1141
+ inputVariables: { context: JSON.stringify(l) }
1142
+ }), { followUpQuestions: d, summary: g } = c, p = J(e), f = {
1143
+ latestItemId: a,
1144
+ memory: {
1145
+ ...p.memory,
1146
+ [a]: { summary: g, followUpQuestions: d, fullContext: l }
1147
+ }
1148
+ };
1149
+ return d.length && await B({ type: "suggested-prompts", data: { prompts: d } }, t), {
1150
+ status: "success",
1151
+ outputMessage: g,
1152
+ sharedStatePatch: { portalItemAnalyticsSummaryMemory: { value: f } }
1153
+ };
1154
+ }, O = (e, t) => t ?? e, Ne = h.Root({
1155
+ ...N(),
1156
+ // States shared only across nodes in the graph, not between invocations
1157
+ analyticsIntent: h({
1158
+ reducer: O,
1159
+ default: () => "clarify"
1160
+ }),
1161
+ analyticsItemId: h({
1162
+ reducer: O,
1163
+ default: () => null
1164
+ }),
1165
+ analyticsQuestion: h({
1166
+ reducer: O,
1167
+ default: () => ""
1168
+ })
1169
+ }), Ma = () => new G(Ne).addNode("detectAnalyticsIntent", xa).addNode("summarizePortalItem", Ta).addNode("answerAnalyticsFollowUp", va).addEdge(A, "detectAnalyticsIntent").addConditionalEdges("detectAnalyticsIntent", (t) => t.analyticsIntent === "summarize" ? "summarizePortalItem" : t.analyticsIntent === "followUp" ? "answerAnalyticsFollowUp" : w).addEdge("summarizePortalItem", w).addEdge("answerAnalyticsFollowUp", w), Ca = String.raw`- **portal-item-analytics** - Portal item analytics assistant:
1170
+ - answers questions about one specific ArcGIS portal item when item context is present
1171
+ - summarizes item details, metadata, and context grounded in that item
1172
+ - suggests follow-up prompts grounded in the same item
1173
+ - use for item-specific requests, not for gallery browsing, featured content, or opening Map Viewer
1174
+ `, Ga = {
1175
+ id: "portal-item-analytics",
1176
+ name: "Portal Item Analytics",
1177
+ description: Ca,
1178
+ createGraph: Ma,
1179
+ workspace: Ne
1180
+ }, Aa = {
1181
+ schemaVersion: "1.0",
1182
+ capabilities: [
1183
+ {
1184
+ id: "my-content",
1185
+ title: "My content",
1186
+ description: "Browse, discover, search, and filter ArcGIS content—including maps, apps, datasets, and other items—that you own or can access.",
1187
+ hints: ["view my content", "show my content", "my content"],
1188
+ platforms: ["online", "enterprise"],
1189
+ resolutions: {
1190
+ navigate: {
1191
+ routeKey: "content"
1192
+ }
1193
+ }
1194
+ },
1195
+ {
1196
+ id: "create-feature-layer",
1197
+ title: "Create feature layer",
1198
+ description: "Generate an editable feature layer by copying fields from templates or existing layers.",
1199
+ hints: ["add a feature layer", "make a feature layer", "generate a feature layer"],
1200
+ platforms: ["online", "enterprise"],
1201
+ resolutions: {
1202
+ navigate: {
1203
+ routeKey: "content"
1204
+ }
1205
+ }
1206
+ },
1207
+ {
1208
+ id: "create-folder",
1209
+ title: "Create folder",
1210
+ description: "Create a new folder in your ArcGIS content to organize your items.",
1211
+ hints: ["create a folder", "make a folder", "set up a folder", "new folder"],
1212
+ platforms: ["online", "enterprise"],
1213
+ resolutions: {
1214
+ navigate: {
1215
+ routeKey: "content"
1216
+ }
1217
+ }
1218
+ }
1219
+ ]
1220
+ }, Na = {
1221
+ schemaVersion: "1.0",
1222
+ capabilities: [
1223
+ {
1224
+ id: "my groups",
1225
+ title: "My groups",
1226
+ description: "Browse, discover, search, and filter ArcGIS content collections—including maps, apps, datasets, and other items—that you own, belong to, or can access.",
1227
+ hints: ["view my groups", "show my groups", "my groups"],
1228
+ platforms: ["online", "enterprise"],
1229
+ resolutions: {
1230
+ navigate: {
1231
+ routeKey: "groups"
1232
+ }
1233
+ }
1234
+ },
1235
+ {
1236
+ id: "create-group",
1237
+ title: "Create group",
1238
+ description: "Create a new ArcGIS Portal group owned by the signed-in user.",
1239
+ hints: ["create a group", "make a group", "set up a group", "new group"],
1240
+ platforms: ["online", "enterprise"],
1241
+ resolutions: {
1242
+ navigate: {
1243
+ routeKey: "groups"
1244
+ }
1245
+ }
1246
+ },
1247
+ {
1248
+ id: "featured-groups",
1249
+ title: "Featured groups",
1250
+ description: "Browse, discover, search, and filter ArcGIS content collections—including maps, apps, datasets, and other items—that organization administrators choose to highlight in ArcGIS.",
1251
+ hints: ["view featured groups", "show featured groups", "highlighted groups", "top groups"],
1252
+ platforms: ["online", "enterprise"],
1253
+ resolutions: {
1254
+ navigate: {
1255
+ routeKey: "groups",
1256
+ hash: "featured"
1257
+ }
1258
+ }
1259
+ },
1260
+ {
1261
+ id: "organization-groups",
1262
+ title: "Organization groups",
1263
+ description: "Browse, discover, search, and filter ArcGIS content collections—including maps, apps, datasets, and other items—that are specific to your organization in ArcGIS.",
1264
+ hints: ["view organization groups", "show organization groups"],
1265
+ platforms: ["online", "enterprise"],
1266
+ resolutions: {
1267
+ navigate: {
1268
+ routeKey: "groups",
1269
+ hash: "organization"
1270
+ }
1271
+ }
1272
+ }
1273
+ ]
1274
+ }, Pa = {
1275
+ schemaVersion: "1.0",
1276
+ capabilities: [
1277
+ {
1278
+ id: "org-config-mfa",
1279
+ title: "Multifactor Authentication (MFA)",
1280
+ description: "Configure organization-level multifactor authentication (MFA) settings. Administrators can enable MFA for ArcGIS logins, allow recovery codes for members, view MFA adoption status, enforce MFA requirements for all members, manage the MFA exemption list, and designate administrators who can troubleshoot MFA issues.",
1281
+ hints: ["config MFA", "set up MFA"],
1282
+ platforms: ["online", "enterprise"],
1283
+ resolutions: {
1284
+ navigate: {
1285
+ routeKey: "organization",
1286
+ queryParams: {
1287
+ tab: "security"
1288
+ },
1289
+ hash: "settings"
1290
+ }
1291
+ }
1292
+ }
1293
+ ]
1294
+ }, qa = {
1295
+ "contentRouteRegistry.ts": Aa,
1296
+ "groupsRouteRegistry.ts": Na,
1297
+ "orgSettingsRouteRegistry.ts": Pa
1298
+ };
1299
+ function oe(e) {
1300
+ const t = [], a = /* @__PURE__ */ new Set();
1301
+ for (const [n, r] of Object.entries(e))
1302
+ for (const o of r.capabilities) {
1303
+ if (a.has(o.id))
1304
+ throw new Error(`${n}: duplicate capability id "${o.id}" across registries`);
1305
+ a.add(o.id), t.push(o);
1306
+ }
1307
+ return t;
1308
+ }
1309
+ let E;
1310
+ function S(e) {
1311
+ return e ? E = oe({ customCapabilities: e }) : E || (E = oe(qa)), E;
1312
+ }
1313
+ const Ea = /^(?:take me to|navigate to|go to|show me|open)\s+(?:the\s+)?/u;
1314
+ function $(e) {
1315
+ return e.toLowerCase().replace(/[^a-z0-9]+/gu, " ").trim().replace(Ea, "").trim();
1316
+ }
1317
+ const ka = s.object({
1318
+ capabilityIds: s.array(s.string()).default([]),
1319
+ confidence: s.number().min(0).max(1).default(0),
1320
+ reason: s.string().default("")
1321
+ }), se = 0.8, za = String.raw`You select Portal navigation capabilities for a user's request.
1322
+
1323
+ Select only capability IDs from the supplied candidates. Return an empty array when none fit.
1324
+ A named surface is required: do not select a capability on another Portal surface.
1325
+ Retrieval scores are hints only, not ground truth.
1326
+
1327
+ User request:
1328
+ {userRequest}
1329
+
1330
+ Candidates:
1331
+ {candidates}`, $a = async (e, t) => {
1332
+ if (e.outputMessage || e.targets.length === 0)
1333
+ return {};
1334
+ const a = I(e.agentExecutionContext.messages).trim(), n = Ra(a, e);
1335
+ if (n.length === 1)
1336
+ return console.info("[arcgis-portal-ai-assistant] navigation capability selection:", {
1337
+ method: "exact-match",
1338
+ request: a,
1339
+ selectedCapabilityIds: n
1340
+ }), { chosenCapabilityIds: n };
1341
+ await m({ text: "Choosing a navigation destination...", agentName: "navigation" }, t);
1342
+ const r = JSON.stringify(
1343
+ e.targets.map(({ capability: o, keywordScore: u, semanticScore: i }) => ({
1344
+ id: o.id,
1345
+ title: o.title,
1346
+ description: o.description,
1347
+ route: o.resolutions.navigate,
1348
+ keywordScore: u,
1349
+ semanticScore: i
1350
+ }))
1351
+ );
1352
+ try {
1353
+ const o = await v({
1354
+ promptText: za,
1355
+ schema: ka,
1356
+ modelTier: "fast",
1357
+ inputVariables: { candidates: r, userRequest: a }
1358
+ }), u = new Set(e.targets.map(({ capability: l }) => l.id)), i = o.capabilityIds.filter((l) => u.has(l));
1359
+ return console.info("[arcgis-portal-ai-assistant] navigation capability selection:", {
1360
+ confidence: o.confidence,
1361
+ method: "structured-model",
1362
+ reason: o.reason,
1363
+ request: a,
1364
+ selectedCapabilityIds: i
1365
+ }), o.confidence < se ? {
1366
+ chosenCapabilityIds: [],
1367
+ status: "failed",
1368
+ summary: `Navigation selection confidence ${o.confidence} is below the required ${se}; defer to the Portal Doc Assistant.`
1369
+ } : { chosenCapabilityIds: i };
1370
+ } catch {
1371
+ return console.info("[arcgis-portal-ai-assistant] navigation capability selection:", {
1372
+ method: "structured-model-unavailable",
1373
+ request: a,
1374
+ selectedCapabilityIds: []
1375
+ }), { chosenCapabilityIds: [] };
1376
+ }
1377
+ };
1378
+ function Ra(e, t) {
1379
+ const a = $(e);
1380
+ return t.targets.filter(
1381
+ ({ capability: n }) => [n.title, ...n.hints].some(
1382
+ (r) => $(r) === a
1383
+ )
1384
+ ).map(({ capability: n }) => n.id);
1385
+ }
1386
+ const Pe = /* @__PURE__ */ new Set(["1d", "7d", "14d", "30d", "3m", "6m"]), Da = s.object({
1387
+ period: s.string(),
1388
+ startTime: s.string(),
1389
+ endTime: s.string()
1390
+ }), Ua = String.raw`Extract temporal filters for an ArcGIS storage-credits query.
1391
+
1392
+ Return JSON only with these optional string fields:
1393
+ - period
1394
+ - startTime
1395
+ - endTime
1396
+
1397
+ Rules:
1398
+ - period must use <integer><unit> with unit in d,w,m (examples: 7d, 2w, 3m).
1399
+ - If the request is a relative range and period can be determined, always include period.
1400
+ - For "last quarter" or "previous quarter", use calendar-quarter boundaries and include period as 3m with both startTime and endTime.
1401
+ - For "last quarter" or "previous quarter", endTime must be the UTC end of the previous quarter, not "now".
1402
+ - If period matches one of these supported periods and the range ends today, period alone is sufficient:
1403
+ 1d, 7d, 14d, 30d, 3m, 6m.
1404
+ - If the request implies a range not supported as period (for example 2m or 10d), include startTime and endTime.
1405
+ - For custom date ranges (for example "last december"), provide startTime and endTime.
1406
+ - startTime and endTime must be epoch milliseconds as strings.
1407
+ - If the end of range is "now", set endTime to {nowEpochMs}.
1408
+ - If temporal intent is unclear, return empty strings for all fields.
1409
+
1410
+ Now UTC:
1411
+ - ISO: {nowIso}
1412
+ - Epoch ms: {nowEpochMs}
1413
+
1414
+ User request:
1415
+ {userRequest}`;
1416
+ async function Fa(e, t = /* @__PURE__ */ new Date()) {
1417
+ const a = e.trim();
1418
+ if (!a)
1419
+ return {};
1420
+ try {
1421
+ const n = await v({
1422
+ promptText: Ua,
1423
+ schema: Da,
1424
+ modelTier: "fast",
1425
+ inputVariables: {
1426
+ nowEpochMs: String(t.getTime()),
1427
+ nowIso: t.toISOString(),
1428
+ userRequest: a
1429
+ }
1430
+ });
1431
+ return Oa(n, t);
1432
+ } catch (n) {
1433
+ return console.error(n), {};
1434
+ }
1435
+ }
1436
+ function Oa(e, t = /* @__PURE__ */ new Date()) {
1437
+ const a = ie(e.startTime), n = ie(e.endTime), r = Ka(e.period);
1438
+ if (r) {
1439
+ if (a !== void 0 && n !== void 0 && a < n)
1440
+ return { period: r, startTime: String(a), endTime: String(n) };
1441
+ const o = Pe.has(r);
1442
+ if (!o || n !== void 0 && !ja(n, t.getTime())) {
1443
+ const i = n ?? t.getTime(), l = Va(r, new Date(i));
1444
+ if (l !== void 0)
1445
+ return {
1446
+ period: r,
1447
+ startTime: String(l),
1448
+ endTime: String(i)
1449
+ };
1450
+ }
1451
+ return o ? {
1452
+ period: r,
1453
+ ...a !== void 0 ? { startTime: String(a) } : {},
1454
+ ...n !== void 0 ? { endTime: String(n) } : {}
1455
+ } : { period: r };
1456
+ }
1457
+ return a !== void 0 && n !== void 0 && a < n ? { startTime: String(a), endTime: String(n) } : a !== void 0 ? { startTime: String(a), endTime: String(t.getTime()) } : {};
1458
+ }
1459
+ function Ka(e) {
1460
+ const t = e?.trim().match(/^(\d+)\s*([dwm])$/iu);
1461
+ if (!t)
1462
+ return;
1463
+ const a = Number.parseInt(t[1], 10);
1464
+ if (!Number.isFinite(a) || a <= 0)
1465
+ return;
1466
+ const n = t[2].toLowerCase();
1467
+ if (n === "w") {
1468
+ const r = a * 7;
1469
+ if (Pe.has(`${r}d`))
1470
+ return `${r}d`;
1471
+ }
1472
+ return `${a}${n}`;
1473
+ }
1474
+ function Va(e, t) {
1475
+ const a = e.match(/^(\d+)([dwm])$/u);
1476
+ if (!a)
1477
+ return;
1478
+ const n = Number.parseInt(a[1], 10);
1479
+ if (!Number.isFinite(n) || n <= 0)
1480
+ return;
1481
+ const r = a[2];
1482
+ if (r === "d")
1483
+ return t.getTime() - n * 24 * 60 * 60 * 1e3;
1484
+ if (r === "w")
1485
+ return t.getTime() - n * 7 * 24 * 60 * 60 * 1e3;
1486
+ const o = new Date(t.getTime());
1487
+ return o.setUTCMonth(o.getUTCMonth() - n), o.getTime();
1488
+ }
1489
+ function ie(e) {
1490
+ if (!e)
1491
+ return;
1492
+ const t = Number.parseInt(e, 10);
1493
+ if (!(!Number.isFinite(t) || t <= 0))
1494
+ return t;
1495
+ }
1496
+ function ja(e, t) {
1497
+ const a = new Date(e), n = new Date(t);
1498
+ return a.getUTCFullYear() === n.getUTCFullYear() && a.getUTCMonth() === n.getUTCMonth() && a.getUTCDate() === n.getUTCDate();
1499
+ }
1500
+ async function La(e, t, a) {
1501
+ const n = S().find((o) => o.id === e);
1502
+ if (!n)
1503
+ return;
1504
+ const r = await Qa(Ba(n), a);
1505
+ return r && Ja(r, t) ? { capability: n, target: r } : void 0;
1506
+ }
1507
+ function Ba(e) {
1508
+ const { hash: t, queryParams: a, routeKey: n } = e.resolutions.navigate;
1509
+ switch (n) {
1510
+ case "content":
1511
+ switch (e.id) {
1512
+ case "my-content":
1513
+ return { destinationType: "portal-content", t9nKey: "myContent" };
1514
+ case "create-feature-layer":
1515
+ return { destinationType: "portal-content", t9nKey: "createFeatureLayer" };
1516
+ case "create-folder":
1517
+ return { destinationType: "portal-content", t9nKey: "createFolder" };
1518
+ default:
1519
+ return { destinationType: "portal-content" };
1520
+ }
1521
+ case "groups":
1522
+ if (t === "featured")
1523
+ return { destinationType: "portal-groups", hash: "featured", t9nKey: "featuredGroups" };
1524
+ if (t === "organization")
1525
+ return { destinationType: "portal-groups", hash: "organization", t9nKey: "organizationGroups" };
1526
+ switch (e.id) {
1527
+ case "my groups":
1528
+ return { destinationType: "portal-groups", hash: "my", t9nKey: "myGroups" };
1529
+ case "create-group":
1530
+ return { destinationType: "portal-groups", t9nKey: "createGroup" };
1531
+ default:
1532
+ return { destinationType: "portal-groups" };
1533
+ }
1534
+ case "organization":
1535
+ return {
1536
+ destinationType: "portal-org",
1537
+ hash: t,
1538
+ queryParams: a,
1539
+ buttonLabel: e.buttonLabel
1540
+ };
1541
+ default:
1542
+ return;
1543
+ }
1544
+ }
1545
+ async function Qa(e, t) {
1546
+ if (!e || !t || !Wa(e))
1547
+ return e;
1548
+ const a = await Fa(t);
1549
+ if (!a.period && !a.startTime && !a.endTime)
1550
+ return e;
1551
+ const n = {
1552
+ ...e.queryParams,
1553
+ ...a.period ? { period: a.period } : {},
1554
+ ...a.startTime ? { startTime: a.startTime } : {},
1555
+ ...a.endTime ? { endTime: a.endTime } : {}
1556
+ };
1557
+ return { ...e, queryParams: n };
1558
+ }
1559
+ function Wa(e) {
1560
+ return e.destinationType === "portal-org" && e.hash === "status";
1561
+ }
1562
+ function Ja(e, t) {
1563
+ return !t || !!t[e.destinationType];
1564
+ }
1565
+ const _a = async (e, t) => {
1566
+ if (e.outputMessage || e.status === "failed")
1567
+ return {};
1568
+ const a = e.targets.find(({ capability: o }) => e.chosenCapabilityIds.includes(o.id)) ?? e.targets[0];
1569
+ if (!a)
1570
+ return {
1571
+ outputMessage: "I couldn't find a matching Portal page. Try asking to open your content, groups, or organization settings.",
1572
+ sharedStatePatch: { navLastAnsweredRequest: { value: ue(e) } },
1573
+ status: "success",
1574
+ summary: "Navigation could not find a matching capability; route another agent if appropriate."
1575
+ };
1576
+ const n = ue(e), r = await La(a.capability.id, void 0, n);
1577
+ return r ? (await m({ text: "Preparing navigation...", agentName: "navigation" }, t), await D(r.target, t), {
1578
+ outputMessage: e.chosenCapabilityIds.length ? a.capability.description : `The closest place to start is ${a.capability.title}. Click the button below to open it.`,
1579
+ status: "success",
1580
+ summary: `Navigation suggested ${a.capability.id}${e.retrievalDegraded ? " using keyword-only retrieval" : ""}.`,
1581
+ sharedStatePatch: { navLastAnsweredRequest: { value: n } }
1582
+ }) : (console.warn(`Navigation capability ${a.capability.id} was not found in the resolver.`), {
1583
+ outputMessage: "I found a possible destination, but couldn't resolve a valid Portal navigation target. Try asking to open your content, groups, or organization settings.",
1584
+ status: "success",
1585
+ summary: `Navigation resolver could not map ${a.capability.id}.`,
1586
+ sharedStatePatch: { navLastAnsweredRequest: { value: n } }
1587
+ });
1588
+ };
1589
+ function ue(e) {
1590
+ return I(e.agentExecutionContext.messages) || e.agentExecutionContext.userRequest;
1591
+ }
1592
+ async function qe(e) {
1593
+ return e.length === 0 ? [] : (await rt.getDefault().load(), await Le(e));
1594
+ }
1595
+ const Ya = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1596
+ __proto__: null,
1597
+ generateEmbeddings: qe
1598
+ }, Symbol.toStringTag, { value: "Module" }));
1599
+ function Ha(e) {
1600
+ const t = [], a = `${e.title}. ${e.description}`;
1601
+ a.trim().length > 0 && t.push({ field: "summary", text: a });
1602
+ const n = e.hints;
1603
+ if (Array.isArray(n))
1604
+ for (const r of n)
1605
+ typeof r == "string" && r.trim().length > 0 && t.push({ field: "hint", text: r });
1606
+ return t;
1607
+ }
1608
+ let k, _, z = 0;
1609
+ async function Xa(e = {}) {
1610
+ const t = z;
1611
+ return k ??= en(e.embed ?? tn).then((a) => (t === z && (_ = a), a)).catch((a) => {
1612
+ throw t === z && (k = void 0), a;
1613
+ }), await k;
1614
+ }
1615
+ function Za() {
1616
+ return _;
1617
+ }
1618
+ function ce() {
1619
+ z += 1, _ = void 0, k = void 0;
1620
+ }
1621
+ async function en(e) {
1622
+ const t = an(), a = await e(t.map((n) => n.text));
1623
+ if (a.length !== t.length)
1624
+ throw new Error(`Expected ${t.length} vectors, got ${a.length}`);
1625
+ return t.map((n, r) => ({
1626
+ ...n,
1627
+ vector: a[r]
1628
+ }));
1629
+ }
1630
+ async function tn(e) {
1631
+ const { generateEmbeddings: t } = await Promise.resolve().then(() => Ya);
1632
+ return await t(e);
1633
+ }
1634
+ function an() {
1635
+ return S().flatMap(
1636
+ (e) => Ha(e).map(({ field: t, text: a }) => ({
1637
+ capabilityId: e.id,
1638
+ field: t,
1639
+ text: a
1640
+ }))
1641
+ );
1642
+ }
1643
+ const le = 1.2, de = 0.75, nn = 60, rn = 0.65, K = {
1644
+ description: 1,
1645
+ hint: 2,
1646
+ title: 3
1647
+ };
1648
+ let L;
1649
+ function on() {
1650
+ L = void 0;
1651
+ }
1652
+ async function sn(e, t = {}) {
1653
+ const a = dn(Ee(e));
1654
+ let n = [], r = !1, o;
1655
+ if (e.trim()) {
1656
+ const u = t.loadEmbeddings, i = Za();
1657
+ if (!u && !i)
1658
+ r = !0, o = "Capability embeddings are still loading.";
1659
+ else
1660
+ try {
1661
+ if (u) {
1662
+ const [l, c] = await Promise.all([
1663
+ (t.embedQuery ?? me)(e),
1664
+ u()
1665
+ ]);
1666
+ n = pe(l, c);
1667
+ } else if (i) {
1668
+ const l = await (t.embedQuery ?? me)(e);
1669
+ n = pe(l, i);
1670
+ }
1671
+ } catch {
1672
+ r = !0, o = "Semantic search is unavailable.";
1673
+ }
1674
+ }
1675
+ return {
1676
+ degraded: r,
1677
+ ...o ? { degradedReason: o } : {},
1678
+ // RRF combines ranks rather than raw scores because BM25 and cosine
1679
+ // similarity are on different scales.
1680
+ matches: mn(a, n, t.topN ?? 5)
1681
+ };
1682
+ }
1683
+ function un() {
1684
+ return L ??= cn(S()), L;
1685
+ }
1686
+ function cn(e) {
1687
+ const t = /* @__PURE__ */ new Map(), a = e.map((n) => {
1688
+ const r = /* @__PURE__ */ new Map();
1689
+ V(r, n.title, K.title), V(r, n.description, K.description);
1690
+ for (const o of n.hints)
1691
+ V(r, o, K.hint);
1692
+ for (const o of r.keys())
1693
+ t.set(o, (t.get(o) ?? 0) + 1);
1694
+ return {
1695
+ capability: n,
1696
+ length: ln(r),
1697
+ termFrequencies: r
1698
+ };
1699
+ });
1700
+ return {
1701
+ averageDocumentLength: a.length ? a.reduce((n, r) => n + r.length, 0) / a.length : 0,
1702
+ documentFrequency: t,
1703
+ documents: a
1704
+ };
1705
+ }
1706
+ function V(e, t, a) {
1707
+ for (const n of Ee(t))
1708
+ e.set(n, (e.get(n) ?? 0) + a);
1709
+ }
1710
+ function ln(e) {
1711
+ return [...e.values()].reduce((t, a) => t + a, 0);
1712
+ }
1713
+ function Ee(e) {
1714
+ return e.toLowerCase().split(/[^a-z0-9]+/u).filter(Boolean);
1715
+ }
1716
+ function dn(e) {
1717
+ const t = un(), a = new Set(e), n = t.documents.length;
1718
+ return t.documents.map(({ capability: r, length: o, termFrequencies: u }) => {
1719
+ let i = 0;
1720
+ for (const l of a) {
1721
+ const c = u.get(l), d = t.documentFrequency.get(l);
1722
+ if (!c || !d)
1723
+ continue;
1724
+ const g = Math.log(1 + (n - d + 0.5) / (d + 0.5)), p = le * (1 - de + de * (o / t.averageDocumentLength));
1725
+ i += g * (c * (le + 1) / (c + p));
1726
+ }
1727
+ return { capability: r, score: i };
1728
+ }).filter(({ score: r }) => r > 0).sort(ke);
1729
+ }
1730
+ function pe(e, t) {
1731
+ const a = /* @__PURE__ */ new Map();
1732
+ for (const r of t) {
1733
+ const o = pn(e, r.vector);
1734
+ if (o === void 0)
1735
+ continue;
1736
+ const u = a.get(r.capabilityId);
1737
+ (u === void 0 || o > u) && a.set(r.capabilityId, o);
1738
+ }
1739
+ const n = new Map(S().map((r) => [r.id, r]));
1740
+ return [...a.entries()].flatMap(([r, o]) => {
1741
+ const u = n.get(r);
1742
+ return u && o >= rn ? [{ capability: u, score: o }] : [];
1743
+ }).sort(ke);
1744
+ }
1745
+ function pn(e, t) {
1746
+ if (e.length === 0 || e.length !== t.length)
1747
+ return;
1748
+ let a = 0, n = 0, r = 0;
1749
+ for (let u = 0; u < e.length; u += 1)
1750
+ a += e[u] * t[u], n += e[u] ** 2, r += t[u] ** 2;
1751
+ const o = Math.sqrt(n) * Math.sqrt(r);
1752
+ return o === 0 ? void 0 : a / o;
1753
+ }
1754
+ async function me(e) {
1755
+ const [t] = await qe([e]);
1756
+ if (!t)
1757
+ throw new Error("Expected one query embedding.");
1758
+ return t;
1759
+ }
1760
+ function mn(e, t, a) {
1761
+ const n = /* @__PURE__ */ new Map();
1762
+ return ge(n, e, "keyword"), ge(n, t, "semantic"), [...n.values()].sort((r, o) => o.score !== r.score ? o.score - r.score : (o.semanticScore ?? 0) !== (r.semanticScore ?? 0) ? (o.semanticScore ?? 0) - (r.semanticScore ?? 0) : (o.keywordScore ?? 0) !== (r.keywordScore ?? 0) ? (o.keywordScore ?? 0) - (r.keywordScore ?? 0) : r.capability.id.localeCompare(o.capability.id)).slice(0, Math.max(0, a));
1763
+ }
1764
+ function ge(e, t, a) {
1765
+ for (const [n, { capability: r, score: o }] of t.entries()) {
1766
+ const u = n + 1, i = e.get(r.id) ?? { capability: r, score: 0 };
1767
+ i.score += 1 / (nn + u), a === "keyword" ? (i.keywordRank = u, i.keywordScore = o) : (i.semanticRank = u, i.semanticScore = o), e.set(r.id, i);
1768
+ }
1769
+ }
1770
+ function ke(e, t) {
1771
+ return t.score - e.score || e.capability.id.localeCompare(t.capability.id);
1772
+ }
1773
+ const gn = async (e, t) => {
1774
+ await m({ text: "Finding a place to navigate...", agentName: "navigation" }, t);
1775
+ const a = I(e.agentExecutionContext.messages).trim();
1776
+ try {
1777
+ const n = await sn(a, { topN: 5 });
1778
+ return console.table(
1779
+ n.matches.map(({ capability: r, keywordRank: o, keywordScore: u, semanticRank: i, semanticScore: l, score: c }) => ({
1780
+ capability: r.title,
1781
+ fusedScore: c,
1782
+ keywordRank: o,
1783
+ keywordScore: u,
1784
+ semanticRank: i,
1785
+ semanticScore: l
1786
+ }))
1787
+ ), n.degradedReason && console.info("[arcgis-portal-ai-assistant] navigation semantic search:", n.degradedReason), {
1788
+ chosenCapabilityIds: [],
1789
+ retrievalDegraded: n.degradedReason ?? "",
1790
+ targets: hn(a, n.matches)
1791
+ };
1792
+ } catch {
1793
+ return {
1794
+ chosenCapabilityIds: [],
1795
+ outputMessage: "I couldn't look up a Portal page right now. Please try again.",
1796
+ status: "failed",
1797
+ targets: []
1798
+ };
1799
+ }
1800
+ };
1801
+ function hn(e, t) {
1802
+ const a = $(e), n = t.filter(
1803
+ ({ capability: o }) => [o.title, ...o.hints].some(
1804
+ (u) => $(u) === a
1805
+ )
1806
+ );
1807
+ if (n.length !== 1)
1808
+ return t;
1809
+ const [r] = n;
1810
+ return [r, ...t.filter((o) => o !== r)];
1811
+ }
1812
+ const j = (e, t) => t ?? e, ze = h.Root({
1813
+ ...N(),
1814
+ chosenCapabilityIds: h({ reducer: j, default: () => [] }),
1815
+ // Empty when hybrid keyword-and-semantic retrieval succeeds; otherwise
1816
+ // contains the semantic-search failure reason for response diagnostics.
1817
+ retrievalDegraded: h({ reducer: j, default: () => "" }),
1818
+ targets: h({ reducer: j, default: () => [] })
1819
+ }), fn = () => new G(ze).addNode("retrieveNavigationTargets", gn).addNode("chooseNavigationTargets", $a).addNode("respondWithNavigation", _a).addEdge(A, "retrieveNavigationTargets").addEdge("retrieveNavigationTargets", "chooseNavigationTargets").addEdge("chooseNavigationTargets", "respondWithNavigation").addEdge("respondWithNavigation", w);
1820
+ function yn() {
1821
+ const e = S().map(({ hints: t, title: a }) => t[0] ?? a).join(", ");
1822
+ return String.raw`- **portal-navigation** - Portal page navigation assistant:
1823
+ - routes requests to open, show, or navigate to a Portal page, including creation-flow pages
1824
+ - falls back to the closest Portal page where a workflow starts when another agent cannot perform the action
1825
+ - handles short navigation follow-ups after asking the user to open a page
1826
+ - capability examples: ${e}
1827
+ - do not use for general "how do I" questions unless the user explicitly asks to reach a page
1828
+ `;
1829
+ }
1830
+ const wn = {
1831
+ id: "navigation",
1832
+ name: "Portal Navigation",
1833
+ get description() {
1834
+ return yn();
1835
+ },
1836
+ createGraph: fn,
1837
+ workspace: ze
1838
+ }, bn = Ke`:host{height:100%;border-width:1px;border-style:solid;border-color:var(--calcite-color-border-3);display:block;width:100%;--tw-shadow: 0 1px 6px -1px rgba(0, 0, 0, .16), 0 1px 2px -1px rgba(0, 0, 0, .08);--tw-shadow-colored: 0 1px 6px -1px var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.chat-entry{display:flex;flex-direction:column;gap:.75rem;width:100%}.chat-actions{display:flex;justify-content:flex-end;gap:.5rem}.header-actions{display:flex;gap:.5rem;padding-inline-start:.75rem}.navigation-block{display:flex;flex-direction:column;align-items:stretch;gap:.35rem;margin-top:.5rem}.navigation-button{width:100%;margin-block:.25rem}.navigation-block-description{font-size:.75rem;color:var(--calcite-color-text-3)}`;
1839
+ function vn(e, t) {
1840
+ if (!t)
1841
+ return;
1842
+ const { destinationType: a } = e;
1843
+ switch (a) {
1844
+ case "portal-content":
1845
+ return t[a]?.(e.hash);
1846
+ case "portal-groups":
1847
+ return t[a]?.(e.hash);
1848
+ case "portal-org":
1849
+ return t[a]?.(e.hash, e.queryParams);
1850
+ case "portal-gallery":
1851
+ return t[a];
1852
+ case "portal-map-viewer":
1853
+ case "portal-notebooks":
1854
+ case "portal-scene-viewer":
1855
+ return t[a];
1856
+ case "portal-item":
1857
+ return t[a]?.(e.itemId);
753
1858
  case "portal-group":
754
- return `${a}/group.html?id=${s.groupId}`;
1859
+ return t[a]?.(e.groupId);
755
1860
  default:
756
- return P(e);
1861
+ return R(a);
757
1862
  }
1863
+ }
1864
+ function In(e) {
1865
+ const t = Ct.safeParse(e);
1866
+ return t.success ? t.data : void 0;
1867
+ }
1868
+ const xn = { myContent: "My content", createFeatureLayer: "Create feature layer", createFolder: "Create folder", myGroups: "My groups", createGroup: "Create group", featuredGroups: "Featured groups", organizationGroups: "Organization groups", configureMultifactorAuthentication: "Configure multifactor authentication" }, $e = {
1869
+ navigationTargets: xn
758
1870
  };
759
- class ne extends tt {
1871
+ function Sn(e, t) {
1872
+ const a = he(e.t9nKey, t.navigationTargets) ?? he(e.t9nKey, $e.navigationTargets);
1873
+ if (a)
1874
+ return a;
1875
+ const n = t.navigation;
1876
+ switch (e.destinationType) {
1877
+ case "portal-content":
1878
+ switch (e.hash) {
1879
+ case "favorites":
1880
+ return n.openContentFavorites;
1881
+ case "group":
1882
+ return n.openContentGroup;
1883
+ case "living-atlas":
1884
+ return n.openContentLivingAtlas;
1885
+ case "org":
1886
+ return n.openContentOrganization;
1887
+ default:
1888
+ return n.openContent;
1889
+ }
1890
+ case "portal-gallery":
1891
+ return n.openGallery;
1892
+ case "portal-groups":
1893
+ switch (e.hash) {
1894
+ case "featured":
1895
+ return n.openGroupsFeatured;
1896
+ case "my":
1897
+ return n.openGroupsMy;
1898
+ case "organization":
1899
+ return n.openGroupsOrganization;
1900
+ default:
1901
+ return n.openGroups;
1902
+ }
1903
+ case "portal-map-viewer":
1904
+ return n.openMapViewer;
1905
+ case "portal-notebooks":
1906
+ return n.openNotebooks;
1907
+ case "portal-scene-viewer":
1908
+ return n.openSceneViewer;
1909
+ case "portal-org":
1910
+ return n.openOrgSettings;
1911
+ case "portal-item":
1912
+ return n.openItem;
1913
+ case "portal-group":
1914
+ return n.openGroup;
1915
+ default:
1916
+ return R(e);
1917
+ }
1918
+ }
1919
+ function he(e, t) {
1920
+ if (!(!e || !t || !Tn(e)))
1921
+ return t[e];
1922
+ }
1923
+ function Tn(e) {
1924
+ return e in $e.navigationTargets;
1925
+ }
1926
+ class Mn extends Fe {
760
1927
  constructor() {
761
- super(...arguments), this.t9n = rt({ blocking: !0 }), this.assistantEl = M(), this.formEl = M(), this.voiceInputEl = M(), this.inputEl = M(), this.navigationSlotElements = /* @__PURE__ */ new Map(), this.handleSlottableRequest = (t) => {
762
- const e = t.detail, a = e.data?.block;
763
- if (!a)
1928
+ super(), this.t9n = je({ blocking: !0 }), this.assistantEl = P(), this.formEl = P(), this.voiceInputEl = P(), this.inputEl = P(), this.navigationSlotElements = /* @__PURE__ */ new Map(), this.handleSlottableRequest = (t) => {
1929
+ const a = t.detail, n = a.data?.block;
1930
+ if (!n)
764
1931
  return;
765
- const r = this.getNavigationAction(a);
766
- r && this.upsertNavigationSlotElement(e.slotName, r);
767
- }, this.inputText = "", this.showVoiceInput = !0, this.isListening = !1, this.isVoiceInputDisabled = !1, this.interrupt = null, this.autoDestroyDisabled = !1, this.defaultClosed = !1, this.arcgisPortalNavigationRequest = et();
1932
+ const r = this.getNavigationAction(n);
1933
+ r && this.upsertNavigationSlotElement(a.slotName, r);
1934
+ }, this.inputText = "", this.showVoiceInput = !0, this.isListening = !1, this.isVoiceInputDisabled = !1, this.interrupt = null, this.autoDestroyDisabled = !1, this.defaultClosed = !1, this.arcgisPortalNavigationRequest = Oe(), S();
768
1935
  }
769
1936
  static {
770
- this.properties = { inputText: 16, showVoiceInput: 16, isListening: 16, isVoiceInputDisabled: 16, interrupt: 16, autoDestroyDisabled: 5, portal: 0, user: 0, config: 0, defaultClosed: 5 };
1937
+ this.properties = { inputText: 16, showVoiceInput: 16, isListening: 16, isVoiceInputDisabled: 16, interrupt: 16, autoDestroyDisabled: 5, portal: 0, user: 0, config: 0, navigationTargetMap: 0, disabledAgents: 0, defaultClosed: 5, navigationCapabilities: 0 };
771
1938
  }
772
1939
  static {
773
- this.styles = re;
1940
+ this.styles = bn;
1941
+ }
1942
+ async load() {
1943
+ await this.refreshCapabilityEmbeddings();
1944
+ }
1945
+ willUpdate(t) {
1946
+ !this.hasUpdated || !t.has("navigationCapabilities") || this.refreshCapabilityEmbeddings();
1947
+ }
1948
+ async clearEmbeddingsCache() {
1949
+ ce();
1950
+ }
1951
+ isAgentEnabled(t) {
1952
+ return !this.disabledAgents?.[t];
1953
+ }
1954
+ async refreshCapabilityEmbeddings() {
1955
+ try {
1956
+ S(this.navigationCapabilities), on(), ce(), await Xa();
1957
+ } catch (t) {
1958
+ console.warn("[arcgis-portal-ai-assistant] embeddings warm-up failed:", t);
1959
+ }
774
1960
  }
775
1961
  getNavigationAction(t) {
776
- if (t?.type !== _)
1962
+ if (t?.type !== be)
777
1963
  return;
778
- const e = jt(t.data);
779
- if (!e)
1964
+ const a = t.data, n = In(a);
1965
+ if (!n)
780
1966
  return;
781
- const a = oe(e, this.portal);
782
- if (a)
783
- return { href: a, targetDetail: e, label: this.getNavigationText(e.destinationType) };
1967
+ const r = vn(a, this.navigationTargetMap);
1968
+ if (r)
1969
+ return {
1970
+ href: r,
1971
+ targetDetail: a,
1972
+ label: a?.buttonLabel || Sn(n, this.t9n)
1973
+ };
784
1974
  }
785
- upsertNavigationSlotElement(t, e) {
786
- const a = this.assistantEl.value;
787
- if (!a)
1975
+ upsertNavigationSlotElement(t, a) {
1976
+ const n = this.assistantEl.value;
1977
+ if (!n)
788
1978
  return;
789
- let r = this.navigationSlotElements.get(t);
790
- r || (r = document.createElement("div"), r.slot = t, this.navigationSlotElements.set(t, r), a.append(r)), at(w`<div><calcite-button class="navigation-button" appearance=outline width=full .href=${e.href} icon-end=launch @click=${(l) => {
791
- l.preventDefault(), this.arcgisPortalNavigationRequest.emit({
792
- href: e.href,
793
- targetDetail: e.targetDetail
1979
+ const r = `navigation:${t}`;
1980
+ let o = this.navigationSlotElements.get(r);
1981
+ o || (o = document.createElement("div"), o.slot = t, this.navigationSlotElements.set(r, o), n.append(o)), Ve(b`<div><calcite-button class="navigation-button" appearance=outline width=full .href=${a.href} icon-end=launch @click=${(u) => {
1982
+ u.preventDefault(), this.arcgisPortalNavigationRequest.emit({
1983
+ href: a.href,
1984
+ targetDetail: a.targetDetail
794
1985
  });
795
- }}>${e.label}</calcite-button>${e.description ? w`<div class="navigation-block-description">${e.description}</div>` : null}</div>`, r);
796
- }
797
- getNavigationText(t) {
798
- const e = this.t9n.navigation;
799
- switch (t) {
800
- case "portal-content":
801
- return e.openContent;
802
- case "portal-groups":
803
- return e.openGroups;
804
- case "portal-item":
805
- return e.openItem;
806
- case "portal-group":
807
- return e.openGroup;
808
- default:
809
- return P(t);
810
- }
1986
+ }}>${a.label}</calcite-button>${a.description ? b`<div class="navigation-block-description">${a.description}</div>` : null}</div>`, o);
811
1987
  }
812
1988
  render() {
813
- const { t9n: t, inputText: e, portal: a, user: r, showVoiceInput: l, isListening: c, isVoiceInputDisabled: i } = this;
814
- return w`<arcgis-assistant log-enabled keep-suggested-prompts .heading=${t.heading} .entryMessage=${t.entryMessage} @arcgisSlottableRequest=${this.handleSlottableRequest} @arcgisInterrupt=${({ detail: o }) => {
815
- this.interrupt = o;
1989
+ const { t9n: t, inputText: a, portal: n, user: r, navigationTargetMap: o, showVoiceInput: u, isListening: i, isVoiceInputDisabled: l } = this;
1990
+ return b`<arcgis-assistant log-enabled keep-suggested-prompts .heading=${t.heading} .entryMessage=${t.entryMessage} @arcgisSlottableRequest=${this.handleSlottableRequest} @arcgisInterrupt=${({ detail: c }) => {
1991
+ this.interrupt = c;
816
1992
  }} @arcgisInterruptCancel=${() => {
817
1993
  this.interrupt = null;
818
1994
  }} @arcgisInterruptSubmit=${() => {
819
1995
  this.interrupt = null;
820
- }} @arcgisPromptSelect=${({ detail: o }) => {
821
- this.inputText = o.prompt, requestAnimationFrame(() => {
1996
+ }} @arcgisPromptSelect=${({ detail: c }) => {
1997
+ this.inputText = c.prompt, requestAnimationFrame(() => {
822
1998
  this.inputEl.value?.focusTextArea();
823
1999
  });
824
- }} ${T(this.assistantEl)}><div slot=header-actions-start class="header-actions"><calcite-icon icon=effects></calcite-icon></div><form slot=chat-entry class="chat-entry" @submit=${(o) => {
825
- o.preventDefault();
826
- const u = e.trim();
827
- u && (this.assistantEl.value?.submitMessage(u), this.inputText = "");
828
- }} ${T(this.formEl)}><arcgis-portal-mentionable-text-area .portal=${a} .user=${r} rows=3 .popoverListLabel=${t.mentionEntities} .placeholder=${t.placeholder} .value=${e} @arcgisUserMentionableTextAreaKeyDown=${({ detail: o }) => {
829
- o.key === "Enter" && !o.shiftKey && (o.preventDefault(), this.formEl.value?.requestSubmit());
830
- }} @arcgisUserMentionableTextAreaChange=${({ detail: o }) => {
831
- this.inputText = o ?? "";
832
- }} ${T(this.inputEl)}></arcgis-portal-mentionable-text-area><div class="chat-actions"><arcgis-portal-voice-input @arcgisVoiceInputStart=${() => {
2000
+ }} ${q(this.assistantEl)}><div slot=header-actions-start class="header-actions"><calcite-icon icon=effects></calcite-icon></div><form slot=chat-entry class="chat-entry" @submit=${(c) => {
2001
+ c.preventDefault();
2002
+ const d = a.trim();
2003
+ d && (this.assistantEl.value?.submitMessage(d), this.inputText = "");
2004
+ }} ${q(this.formEl)}><arcgis-portal-mentionable-text-area .portal=${n} .user=${r} rows=3 .popoverListLabel=${t.mentionEntities} .placeholder=${t.placeholder} .value=${a} @arcgisUserMentionableTextAreaKeyDown=${({ detail: c }) => {
2005
+ c.key === "Enter" && !c.shiftKey && (c.preventDefault(), this.formEl.value?.requestSubmit());
2006
+ }} @arcgisUserMentionableTextAreaChange=${({ detail: c }) => {
2007
+ this.inputText = c ?? "";
2008
+ }} ${q(this.inputEl)}></arcgis-portal-mentionable-text-area><div class="chat-actions"><arcgis-portal-voice-input @arcgisVoiceInputStart=${() => {
833
2009
  this.isListening = !0, this.isVoiceInputDisabled = !1;
834
2010
  }} @arcgisVoiceInputStop=${() => {
835
2011
  this.isListening = !1, this.isVoiceInputDisabled = !1;
836
- }} @arcgisVoiceInputError=${(o) => {
837
- o.detail.errorCode === "not-supported" && (this.showVoiceInput = !1);
838
- }} @arcgisVoiceInputInterimTranscription=${(o) => {
839
- this.inputText = o.detail.text;
840
- }} ${T(this.voiceInputEl)}></arcgis-portal-voice-input>${l && w`<calcite-button icon-start=microphone .label=${t.voiceInput} round .disabled=${i} .appearance=${c ? "solid" : "outline-fill"} @click=${async () => {
2012
+ }} @arcgisVoiceInputError=${(c) => {
2013
+ c.detail.errorCode === "not-supported" && (this.showVoiceInput = !1);
2014
+ }} @arcgisVoiceInputInterimTranscription=${(c) => {
2015
+ this.inputText = c.detail.text;
2016
+ }} ${q(this.voiceInputEl)}></arcgis-portal-voice-input>${u && b`<calcite-button icon-start=microphone .label=${t.voiceInput} round .disabled=${l} .appearance=${i ? "solid" : "outline-fill"} @click=${async () => {
841
2017
  this.isVoiceInputDisabled = !0;
842
- const o = this.voiceInputEl.value;
843
- c ? await o?.stopListening() : await o?.startListening();
844
- }}></calcite-button>` || ""}<calcite-button type=submit icon-start=send round .disabled=${!e.trim()} .label=${t.send}>${t.send}</calcite-button></div></form><arcgis-assistant-agent .agent=${Tt} .context=${{ portal: a, user: r }}></arcgis-assistant-agent><arcgis-assistant-agent .agent=${Lt} .context=${{ portal: a, user: r }}></arcgis-assistant-agent><arcgis-assistant-agent .agent=${ae} .context=${{ portal: a, user: r }}></arcgis-assistant-agent>${this.interrupt && w`<arcgis-portal-ai-assistant-interrupt slot=interrupt .type=${this.interrupt.type} .message=${this.interrupt.message} .options=${this.interrupt.options} @arcgisSubmit=${({ detail: o }) => {
845
- this.assistantEl.value?.submitInterrupt(o);
2018
+ const c = this.voiceInputEl.value;
2019
+ i ? await c?.stopListening() : await c?.startListening();
2020
+ }}></calcite-button>` || ""}<calcite-button type=submit icon-start=send round .disabled=${!a.trim()} .label=${t.send}>${t.send}</calcite-button></div></form>${this.isAgentEnabled("itemAnalytics") && b`<arcgis-assistant-agent .agent=${Ga} .context=${{ portal: n, user: r, navigationTargetMap: o }}></arcgis-assistant-agent>` || ""}${this.isAgentEnabled("groupCreation") && b`<arcgis-assistant-agent .agent=${Pt} .context=${{ portal: n, user: r, navigationTargetMap: o }}></arcgis-assistant-agent>` || ""}${this.isAgentEnabled("docAssistant") && b`<arcgis-assistant-agent .agent=${Wt} .context=${{ portal: n, user: r, navigationTargetMap: o }}></arcgis-assistant-agent>` || ""}${this.isAgentEnabled("groupAnalytics") && b`<arcgis-assistant-agent .agent=${ha} .context=${{ portal: n, user: r, navigationTargetMap: o }}></arcgis-assistant-agent>` || ""}${this.isAgentEnabled("navigation") && b`<arcgis-assistant-agent .agent=${wn} .context=${{ portal: n, user: r, navigationTargetMap: o }}></arcgis-assistant-agent>` || ""}${this.interrupt && b`<arcgis-portal-ai-assistant-interrupt slot=interrupt .type=${this.interrupt.type} .message=${this.interrupt.message} .options=${this.interrupt.options} @arcgisSubmit=${({ detail: c }) => {
2021
+ this.assistantEl.value?.submitInterrupt(c);
846
2022
  }} @arcgisCancel=${() => {
847
2023
  this.assistantEl.value?.cancelInterrupt();
848
2024
  }}></arcgis-portal-ai-assistant-interrupt>` || ""}</arcgis-assistant>`;
849
2025
  }
850
2026
  }
851
- Z("arcgis-portal-ai-assistant", ne);
2027
+ Ue("arcgis-portal-ai-assistant", Mn);
852
2028
  export {
853
- ne as ArcgisPortalAiAssistant
2029
+ Mn as ArcgisPortalAiAssistant
854
2030
  };