@arcgis/ai-components 5.2.0-next.113 → 5.2.0-next.115

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 (297) hide show
  1. package/dist/agent-utils/LLMAgent.js +78 -53
  2. package/dist/agent-utils/types.d.ts +16 -3
  3. package/dist/agents/tools/filter/setFeatureEffect/adapter.js +17 -17
  4. package/dist/agents/tools/query/getStatistics/adapter.js +5 -5
  5. package/dist/agents/tools/query/getTopFeatures/adapter.js +3 -3
  6. package/dist/agents/tools/query/queryFeatures/adapter.js +1 -1
  7. package/dist/cdn/{7KSFIRXB.js → 23CPLCYW.js} +1 -1
  8. package/dist/cdn/{DG27JEYG.js → 2NODROJN.js} +2 -2
  9. package/dist/cdn/{TWU3QXAS.js → 4PKMJMND.js} +1 -1
  10. package/dist/cdn/{6P44KOKX.js → 4WYNWR6R.js} +1 -1
  11. package/dist/cdn/{6OOZSZRJ.js → 5QXGQW2N.js} +1 -1
  12. package/dist/cdn/6KSMVYBS.js +2 -0
  13. package/dist/cdn/{JICNSK6Y.js → 6XZYQ74A.js} +1 -1
  14. package/dist/cdn/{33PB7ALY.js → 6YRLY5TX.js} +1 -1
  15. package/dist/cdn/{WSWB3B7B.js → 7ELUGB4X.js} +1 -1
  16. package/dist/cdn/{BBPD2AS7.js → BJNYJCS5.js} +1 -1
  17. package/dist/cdn/{VNLSYVPE.js → BKAXFQIS.js} +1 -1
  18. package/dist/cdn/{POZYDAU2.js → BN7CIVBD.js} +1 -1
  19. package/dist/cdn/{V6HOUZPZ.js → C7P6MHMZ.js} +1 -1
  20. package/dist/cdn/{SZRJTQ54.js → CA3RNGPN.js} +1 -1
  21. package/dist/cdn/{POL6HKCG.js → CESQ3SFP.js} +1 -1
  22. package/dist/cdn/{ENM3L4AC.js → CLTV27HJ.js} +1 -1
  23. package/dist/cdn/{F5NIRETW.js → CSTXLFCP.js} +1 -1
  24. package/dist/cdn/{5A355PGH.js → CVAVY7R2.js} +1 -1
  25. package/dist/cdn/{HMNBUGH2.js → CZIAU7PC.js} +1 -1
  26. package/dist/cdn/{HMIDFTEI.js → DEPD7PJL.js} +1 -1
  27. package/dist/cdn/EJ7QJLUE.js +2 -0
  28. package/dist/cdn/{AVZ5Y6BK.js → ES54NWOB.js} +1 -1
  29. package/dist/cdn/{EDXTPEEU.js → FYIZOGHC.js} +1 -1
  30. package/dist/cdn/{SITY6L4S.js → FZTNWDOU.js} +1 -1
  31. package/dist/cdn/{HHP5YLUI.js → H4N7VNL5.js} +1 -1
  32. package/dist/cdn/{QNXI3WOF.js → HAHL6K4X.js} +2 -2
  33. package/dist/cdn/{EVMIYZWD.js → HFHRMM6Q.js} +1 -1
  34. package/dist/cdn/{2MWUBKWI.js → HSILCMAR.js} +1 -1
  35. package/dist/cdn/IMRIVNHX.js +2 -0
  36. package/dist/cdn/{IH26MIYY.js → ITCZC2VY.js} +1 -1
  37. package/dist/cdn/{AHCXG7XF.js → JNOH4PD5.js} +1 -1
  38. package/dist/cdn/{LAVFUDUG.js → JTEY4E7E.js} +1 -1
  39. package/dist/cdn/{3UEKINYC.js → JTKVVKZK.js} +1 -1
  40. package/dist/cdn/{O4NVW75A.js → K5FWDMTV.js} +1 -1
  41. package/dist/cdn/KA3S22NQ.js +2 -0
  42. package/dist/cdn/{EYOWRGDP.js → KPJHQ424.js} +1 -1
  43. package/dist/cdn/{MXTXJKFE.js → KQGC2FCP.js} +1 -1
  44. package/dist/cdn/{DE26DAW5.js → LDIUJUI7.js} +1 -1
  45. package/dist/cdn/NR2O3AP2.js +2 -0
  46. package/dist/cdn/NWJQ7KTC.js +2 -0
  47. package/dist/cdn/{BL273EGZ.js → OT5ECP4V.js} +2 -0
  48. package/dist/cdn/{DWH23NJN.js → PGVLC374.js} +1 -1
  49. package/dist/cdn/{SXM4NUT5.js → PQRE67OM.js} +1 -1
  50. package/dist/cdn/QZL4SAYR.js +6 -0
  51. package/dist/cdn/{TO2NY7EA.js → RGOCE3QN.js} +1 -1
  52. package/dist/cdn/{EYY367WR.js → SLD4ZVT6.js} +1 -1
  53. package/dist/cdn/{H6P3WP5D.js → UT6JA4TK.js} +1 -1
  54. package/dist/cdn/{7EHOFQ2P.js → UZ6OAU3F.js} +2 -2
  55. package/dist/cdn/{33SFAZQG.js → VBEZDXBV.js} +1 -1
  56. package/dist/cdn/{RXF2NUOL.js → VF4BIBQT.js} +1 -1
  57. package/dist/cdn/VJRJ2HAM.js +3 -0
  58. package/dist/cdn/{UDRKUVZP.js → VYOIFJVE.js} +1 -1
  59. package/dist/cdn/{C7JPWFZE.js → XUYARLRP.js} +1 -1
  60. package/dist/cdn/ZA2WIUWH.js +2 -0
  61. package/dist/cdn/{TYATJUNF.js → ZCFYGCCV.js} +1 -1
  62. package/dist/cdn/ZGZX7GR5.js +2 -0
  63. package/dist/cdn/agent-utils/index.js +1 -1
  64. package/dist/cdn/assets/assistant/t9n/messages.ar.json +1 -1
  65. package/dist/cdn/assets/assistant/t9n/messages.bg.json +1 -1
  66. package/dist/cdn/assets/assistant/t9n/messages.bs.json +1 -1
  67. package/dist/cdn/assets/assistant/t9n/messages.ca.json +1 -1
  68. package/dist/cdn/assets/assistant/t9n/messages.cs.json +1 -1
  69. package/dist/cdn/assets/assistant/t9n/messages.da.json +1 -1
  70. package/dist/cdn/assets/assistant/t9n/messages.de.json +1 -1
  71. package/dist/cdn/assets/assistant/t9n/messages.el.json +1 -1
  72. package/dist/cdn/assets/assistant/t9n/messages.en.json +1 -1
  73. package/dist/cdn/assets/assistant/t9n/messages.es.json +1 -1
  74. package/dist/cdn/assets/assistant/t9n/messages.et.json +1 -1
  75. package/dist/cdn/assets/assistant/t9n/messages.fi.json +1 -1
  76. package/dist/cdn/assets/assistant/t9n/messages.fr.json +1 -1
  77. package/dist/cdn/assets/assistant/t9n/messages.he.json +1 -1
  78. package/dist/cdn/assets/assistant/t9n/messages.hr.json +1 -1
  79. package/dist/cdn/assets/assistant/t9n/messages.hu.json +1 -1
  80. package/dist/cdn/assets/assistant/t9n/messages.id.json +1 -1
  81. package/dist/cdn/assets/assistant/t9n/messages.it.json +1 -1
  82. package/dist/cdn/assets/assistant/t9n/messages.ja.json +1 -1
  83. package/dist/cdn/assets/assistant/t9n/messages.ko.json +1 -1
  84. package/dist/cdn/assets/assistant/t9n/messages.lt.json +1 -1
  85. package/dist/cdn/assets/assistant/t9n/messages.lv.json +1 -1
  86. package/dist/cdn/assets/assistant/t9n/messages.nl.json +1 -1
  87. package/dist/cdn/assets/assistant/t9n/messages.no.json +1 -1
  88. package/dist/cdn/assets/assistant/t9n/messages.pl.json +1 -1
  89. package/dist/cdn/assets/assistant/t9n/messages.pt-BR.json +1 -1
  90. package/dist/cdn/assets/assistant/t9n/messages.pt-PT.json +1 -1
  91. package/dist/cdn/assets/assistant/t9n/messages.ro.json +1 -1
  92. package/dist/cdn/assets/assistant/t9n/messages.ru.json +1 -1
  93. package/dist/cdn/assets/assistant/t9n/messages.sk.json +1 -1
  94. package/dist/cdn/assets/assistant/t9n/messages.sl.json +1 -1
  95. package/dist/cdn/assets/assistant/t9n/messages.sr.json +1 -1
  96. package/dist/cdn/assets/assistant/t9n/messages.sv.json +1 -1
  97. package/dist/cdn/assets/assistant/t9n/messages.th.json +1 -1
  98. package/dist/cdn/assets/assistant/t9n/messages.tr.json +1 -1
  99. package/dist/cdn/assets/assistant/t9n/messages.uk.json +1 -1
  100. package/dist/cdn/assets/assistant/t9n/messages.vi.json +1 -1
  101. package/dist/cdn/assets/assistant/t9n/messages.zh-CN.json +1 -1
  102. package/dist/cdn/assets/assistant/t9n/messages.zh-HK.json +1 -1
  103. package/dist/cdn/assets/assistant/t9n/messages.zh-TW.json +1 -1
  104. package/dist/cdn/assets/assistant-chat-entry/t9n/messages.en.json +1 -1
  105. package/dist/cdn/assets/assistant-interrupt/t9n/messages.ar.json +1 -1
  106. package/dist/cdn/assets/assistant-interrupt/t9n/messages.bg.json +1 -1
  107. package/dist/cdn/assets/assistant-interrupt/t9n/messages.bs.json +1 -1
  108. package/dist/cdn/assets/assistant-interrupt/t9n/messages.ca.json +1 -1
  109. package/dist/cdn/assets/assistant-interrupt/t9n/messages.cs.json +1 -1
  110. package/dist/cdn/assets/assistant-interrupt/t9n/messages.da.json +1 -1
  111. package/dist/cdn/assets/assistant-interrupt/t9n/messages.de.json +1 -1
  112. package/dist/cdn/assets/assistant-interrupt/t9n/messages.el.json +1 -1
  113. package/dist/cdn/assets/assistant-interrupt/t9n/messages.es.json +1 -1
  114. package/dist/cdn/assets/assistant-interrupt/t9n/messages.et.json +1 -1
  115. package/dist/cdn/assets/assistant-interrupt/t9n/messages.fi.json +1 -1
  116. package/dist/cdn/assets/assistant-interrupt/t9n/messages.fr.json +1 -1
  117. package/dist/cdn/assets/assistant-interrupt/t9n/messages.he.json +1 -1
  118. package/dist/cdn/assets/assistant-interrupt/t9n/messages.hr.json +1 -1
  119. package/dist/cdn/assets/assistant-interrupt/t9n/messages.hu.json +1 -1
  120. package/dist/cdn/assets/assistant-interrupt/t9n/messages.id.json +1 -1
  121. package/dist/cdn/assets/assistant-interrupt/t9n/messages.it.json +1 -1
  122. package/dist/cdn/assets/assistant-interrupt/t9n/messages.ja.json +1 -1
  123. package/dist/cdn/assets/assistant-interrupt/t9n/messages.ko.json +1 -1
  124. package/dist/cdn/assets/assistant-interrupt/t9n/messages.lt.json +1 -1
  125. package/dist/cdn/assets/assistant-interrupt/t9n/messages.lv.json +1 -1
  126. package/dist/cdn/assets/assistant-interrupt/t9n/messages.nl.json +1 -1
  127. package/dist/cdn/assets/assistant-interrupt/t9n/messages.no.json +1 -1
  128. package/dist/cdn/assets/assistant-interrupt/t9n/messages.pl.json +1 -1
  129. package/dist/cdn/assets/assistant-interrupt/t9n/messages.pt-BR.json +1 -1
  130. package/dist/cdn/assets/assistant-interrupt/t9n/messages.pt-PT.json +1 -1
  131. package/dist/cdn/assets/assistant-interrupt/t9n/messages.ro.json +1 -1
  132. package/dist/cdn/assets/assistant-interrupt/t9n/messages.ru.json +1 -1
  133. package/dist/cdn/assets/assistant-interrupt/t9n/messages.sk.json +1 -1
  134. package/dist/cdn/assets/assistant-interrupt/t9n/messages.sl.json +1 -1
  135. package/dist/cdn/assets/assistant-interrupt/t9n/messages.sr.json +1 -1
  136. package/dist/cdn/assets/assistant-interrupt/t9n/messages.sv.json +1 -1
  137. package/dist/cdn/assets/assistant-interrupt/t9n/messages.th.json +1 -1
  138. package/dist/cdn/assets/assistant-interrupt/t9n/messages.tr.json +1 -1
  139. package/dist/cdn/assets/assistant-interrupt/t9n/messages.uk.json +1 -1
  140. package/dist/cdn/assets/assistant-interrupt/t9n/messages.vi.json +1 -1
  141. package/dist/cdn/assets/assistant-interrupt/t9n/messages.zh-CN.json +1 -1
  142. package/dist/cdn/assets/assistant-interrupt/t9n/messages.zh-HK.json +1 -1
  143. package/dist/cdn/assets/assistant-interrupt/t9n/messages.zh-TW.json +1 -1
  144. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.ar.json +1 -0
  145. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.bg.json +1 -0
  146. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.bs.json +1 -0
  147. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.ca.json +1 -0
  148. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.cs.json +1 -0
  149. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.da.json +1 -0
  150. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.de.json +1 -0
  151. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.el.json +1 -0
  152. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.es.json +1 -0
  153. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.et.json +1 -0
  154. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.fi.json +1 -0
  155. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.fr.json +1 -0
  156. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.he.json +1 -0
  157. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.hr.json +1 -0
  158. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.hu.json +1 -0
  159. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.id.json +1 -0
  160. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.it.json +1 -0
  161. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.ja.json +1 -0
  162. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.ko.json +1 -0
  163. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.lt.json +1 -0
  164. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.lv.json +1 -0
  165. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.nl.json +1 -0
  166. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.no.json +1 -0
  167. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.pl.json +1 -0
  168. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.pt-BR.json +1 -0
  169. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.pt-PT.json +1 -0
  170. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.ro.json +1 -0
  171. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.ru.json +1 -0
  172. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.sk.json +1 -0
  173. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.sl.json +1 -0
  174. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.sr.json +1 -0
  175. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.sv.json +1 -0
  176. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.th.json +1 -0
  177. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.tr.json +1 -0
  178. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.uk.json +1 -0
  179. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.vi.json +1 -0
  180. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.zh-CN.json +1 -0
  181. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.zh-HK.json +1 -0
  182. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.zh-TW.json +1 -0
  183. package/dist/cdn/assets/assistant-message/t9n/messages.ar.json +1 -0
  184. package/dist/cdn/assets/assistant-message/t9n/messages.bg.json +1 -0
  185. package/dist/cdn/assets/assistant-message/t9n/messages.bs.json +1 -0
  186. package/dist/cdn/assets/assistant-message/t9n/messages.ca.json +1 -0
  187. package/dist/cdn/assets/assistant-message/t9n/messages.cs.json +1 -0
  188. package/dist/cdn/assets/assistant-message/t9n/messages.da.json +1 -0
  189. package/dist/cdn/assets/assistant-message/t9n/messages.de.json +1 -0
  190. package/dist/cdn/assets/assistant-message/t9n/messages.el.json +1 -0
  191. package/dist/cdn/assets/assistant-message/t9n/messages.es.json +1 -0
  192. package/dist/cdn/assets/assistant-message/t9n/messages.et.json +1 -0
  193. package/dist/cdn/assets/assistant-message/t9n/messages.fi.json +1 -0
  194. package/dist/cdn/assets/assistant-message/t9n/messages.fr.json +1 -0
  195. package/dist/cdn/assets/assistant-message/t9n/messages.he.json +1 -0
  196. package/dist/cdn/assets/assistant-message/t9n/messages.hr.json +1 -0
  197. package/dist/cdn/assets/assistant-message/t9n/messages.hu.json +1 -0
  198. package/dist/cdn/assets/assistant-message/t9n/messages.id.json +1 -0
  199. package/dist/cdn/assets/assistant-message/t9n/messages.it.json +1 -0
  200. package/dist/cdn/assets/assistant-message/t9n/messages.ja.json +1 -0
  201. package/dist/cdn/assets/assistant-message/t9n/messages.ko.json +1 -0
  202. package/dist/cdn/assets/assistant-message/t9n/messages.lt.json +1 -0
  203. package/dist/cdn/assets/assistant-message/t9n/messages.lv.json +1 -0
  204. package/dist/cdn/assets/assistant-message/t9n/messages.nl.json +1 -0
  205. package/dist/cdn/assets/assistant-message/t9n/messages.no.json +1 -0
  206. package/dist/cdn/assets/assistant-message/t9n/messages.pl.json +1 -0
  207. package/dist/cdn/assets/assistant-message/t9n/messages.pt-BR.json +1 -0
  208. package/dist/cdn/assets/assistant-message/t9n/messages.pt-PT.json +1 -0
  209. package/dist/cdn/assets/assistant-message/t9n/messages.ro.json +1 -0
  210. package/dist/cdn/assets/assistant-message/t9n/messages.ru.json +1 -0
  211. package/dist/cdn/assets/assistant-message/t9n/messages.sk.json +1 -0
  212. package/dist/cdn/assets/assistant-message/t9n/messages.sl.json +1 -0
  213. package/dist/cdn/assets/assistant-message/t9n/messages.sr.json +1 -0
  214. package/dist/cdn/assets/assistant-message/t9n/messages.sv.json +1 -0
  215. package/dist/cdn/assets/assistant-message/t9n/messages.th.json +1 -0
  216. package/dist/cdn/assets/assistant-message/t9n/messages.tr.json +1 -0
  217. package/dist/cdn/assets/assistant-message/t9n/messages.uk.json +1 -0
  218. package/dist/cdn/assets/assistant-message/t9n/messages.vi.json +1 -0
  219. package/dist/cdn/assets/assistant-message/t9n/messages.zh-CN.json +1 -0
  220. package/dist/cdn/assets/assistant-message/t9n/messages.zh-HK.json +1 -0
  221. package/dist/cdn/assets/assistant-message/t9n/messages.zh-TW.json +1 -0
  222. package/dist/cdn/assets/assistant-message-loading/t9n/messages.ar.json +1 -0
  223. package/dist/cdn/assets/assistant-message-loading/t9n/messages.bg.json +1 -0
  224. package/dist/cdn/assets/assistant-message-loading/t9n/messages.bs.json +1 -0
  225. package/dist/cdn/assets/assistant-message-loading/t9n/messages.ca.json +1 -0
  226. package/dist/cdn/assets/assistant-message-loading/t9n/messages.cs.json +1 -0
  227. package/dist/cdn/assets/assistant-message-loading/t9n/messages.da.json +1 -0
  228. package/dist/cdn/assets/assistant-message-loading/t9n/messages.de.json +1 -0
  229. package/dist/cdn/assets/assistant-message-loading/t9n/messages.el.json +1 -0
  230. package/dist/cdn/assets/assistant-message-loading/t9n/messages.es.json +1 -0
  231. package/dist/cdn/assets/assistant-message-loading/t9n/messages.et.json +1 -0
  232. package/dist/cdn/assets/assistant-message-loading/t9n/messages.fi.json +1 -0
  233. package/dist/cdn/assets/assistant-message-loading/t9n/messages.fr.json +1 -0
  234. package/dist/cdn/assets/assistant-message-loading/t9n/messages.he.json +1 -0
  235. package/dist/cdn/assets/assistant-message-loading/t9n/messages.hr.json +1 -0
  236. package/dist/cdn/assets/assistant-message-loading/t9n/messages.hu.json +1 -0
  237. package/dist/cdn/assets/assistant-message-loading/t9n/messages.id.json +1 -0
  238. package/dist/cdn/assets/assistant-message-loading/t9n/messages.it.json +1 -0
  239. package/dist/cdn/assets/assistant-message-loading/t9n/messages.ja.json +1 -0
  240. package/dist/cdn/assets/assistant-message-loading/t9n/messages.ko.json +1 -0
  241. package/dist/cdn/assets/assistant-message-loading/t9n/messages.lt.json +1 -0
  242. package/dist/cdn/assets/assistant-message-loading/t9n/messages.lv.json +1 -0
  243. package/dist/cdn/assets/assistant-message-loading/t9n/messages.nl.json +1 -0
  244. package/dist/cdn/assets/assistant-message-loading/t9n/messages.no.json +1 -0
  245. package/dist/cdn/assets/assistant-message-loading/t9n/messages.pl.json +1 -0
  246. package/dist/cdn/assets/assistant-message-loading/t9n/messages.pt-BR.json +1 -0
  247. package/dist/cdn/assets/assistant-message-loading/t9n/messages.pt-PT.json +1 -0
  248. package/dist/cdn/assets/assistant-message-loading/t9n/messages.ro.json +1 -0
  249. package/dist/cdn/assets/assistant-message-loading/t9n/messages.ru.json +1 -0
  250. package/dist/cdn/assets/assistant-message-loading/t9n/messages.sk.json +1 -0
  251. package/dist/cdn/assets/assistant-message-loading/t9n/messages.sl.json +1 -0
  252. package/dist/cdn/assets/assistant-message-loading/t9n/messages.sr.json +1 -0
  253. package/dist/cdn/assets/assistant-message-loading/t9n/messages.sv.json +1 -0
  254. package/dist/cdn/assets/assistant-message-loading/t9n/messages.th.json +1 -0
  255. package/dist/cdn/assets/assistant-message-loading/t9n/messages.tr.json +1 -0
  256. package/dist/cdn/assets/assistant-message-loading/t9n/messages.uk.json +1 -0
  257. package/dist/cdn/assets/assistant-message-loading/t9n/messages.vi.json +1 -0
  258. package/dist/cdn/assets/assistant-message-loading/t9n/messages.zh-CN.json +1 -0
  259. package/dist/cdn/assets/assistant-message-loading/t9n/messages.zh-HK.json +1 -0
  260. package/dist/cdn/assets/assistant-message-loading/t9n/messages.zh-TW.json +1 -0
  261. package/dist/cdn/index.js +1 -1
  262. package/dist/chunks/SKILL.js +1 -1
  263. package/dist/chunks/SKILL2.js +1 -1
  264. package/dist/chunks/baseAgentState.js +7 -6
  265. package/dist/chunks/dataExplorationAgent.js +3 -3
  266. package/dist/chunks/intent_prompt.js +2 -0
  267. package/dist/chunks/orchestrator.js +9 -6
  268. package/dist/chunks/resolveGeometryFilter.js +149 -0
  269. package/dist/chunks/state.js +50 -39
  270. package/dist/components/arcgis-assistant/customElement.d.ts +23 -3
  271. package/dist/components/arcgis-assistant/customElement.js +213 -187
  272. package/dist/components/arcgis-assistant/types.d.ts +108 -0
  273. package/dist/components/arcgis-assistant-chat-entry/customElement.d.ts +15 -4
  274. package/dist/components/arcgis-assistant-chat-entry/customElement.js +344 -45
  275. package/dist/components/arcgis-assistant-chat-entry/index.js +3 -0
  276. package/dist/docs/api.json +1 -1
  277. package/dist/docs/docs.json +1 -1
  278. package/dist/docs/vscode.html-custom-data.json +1 -1
  279. package/dist/docs/web-types.json +1 -1
  280. package/dist/loader.js +2 -2
  281. package/dist/types/lumina.d.ts +2 -2
  282. package/dist/types/preact.d.ts +2 -2
  283. package/dist/types/react.d.ts +2 -2
  284. package/dist/types/stencil.d.ts +2 -2
  285. package/dist/utils/index.d.ts +20 -0
  286. package/package.json +5 -5
  287. package/dist/cdn/2O4DON37.js +0 -2
  288. package/dist/cdn/4AQBRGO2.js +0 -3
  289. package/dist/cdn/4IU63OWQ.js +0 -2
  290. package/dist/cdn/FS7GXTTQ.js +0 -6
  291. package/dist/cdn/JQYLMTDP.js +0 -2
  292. package/dist/cdn/OMF6ITSG.js +0 -2
  293. package/dist/cdn/RLEHNAIA.js +0 -2
  294. package/dist/cdn/SHI76XUV.js +0 -2
  295. package/dist/cdn/UHICISBZ.js +0 -2
  296. package/dist/cdn/ZFOG3KXV.js +0 -2
  297. package/dist/chunks/resolvePointGeometryFilter.js +0 -92
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{b as y}from"./6OOZSZRJ.js";import{a as v}from"./RLEHNAIA.js";import{g as p,h as r,n as o,t as n,u as c,v as g,w as m,z as f}from"./COH3QXWG.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";export default $arcgis.t(([b])=>{var w=p`:host{--calcite-text-area-border-color: var(--calcite-color-border-1);--calcite-text-area-divider-color: var(--calcite-color-border-1);--calcite-text-area-corner-radius: var(--calcite-border-radius)}.input-container{display:flex;flex-direction:column}.footer-start{display:flex;gap:var(--calcite-spacing-md);flex-wrap:wrap;align-items:center}.footer-end{display:flex;gap:var(--calcite-spacing-md);align-items:center}.status-indicator{width:9px;height:9px;border-radius:100%;background-color:var(--calcite-color-status-success)}.status-indicator[data-status=working]{background-color:var(--calcite-color-status-warning)}.status-indicator[data-status=error]{background-color:var(--calcite-color-status-danger)}.status-text{text-transform:capitalize}.focused{--calcite-text-area-shadow: var(--calcite-shadow-sm)}`,l=class extends g{constructor(){super(...arguments),this.#s=n(),this.#a=n(),this.#t=-1,this.#e="",this.#i=t=>{t.stopPropagation();let s=t.detail;this._setDraftValue(s.value),s.focusInput&&this.#s.value&&this.#s.value.setFocus()},this.#r=t=>{let s=t.target.value??"";this.inputValue=s,this.#e=s},this._messages=y({blocking:!0}),this._inFocus=!1,this.keyboardShortcutsDisabled=!1,this.awaitingResponse=!1,this.inputValue="",this.voiceInputEnabled=!1,this.messages=new b([]),this.disabled=!1,this.arcgisCancel=o(),this.arcgisSubmit=o()}static{this.properties={_inFocus:16,_userMessages:16,keyboardShortcutsDisabled:5,entryPlaceholder:1,awaitingResponse:5,inputValue:1,status:1,voiceInputEnabled:5,messages:0,disabled:5}}static{this.styles=w}#s;#a;#t;#e;#i;#r;get _userMessages(){return this.messages.toArray().filter(t=>t.role==="user").map(({content:t})=>t)}async submitMessage(){if(this.awaitingResponse){this.arcgisCancel.emit();return}let t=this.inputValue.trim();t&&(this.arcgisSubmit.emit(t),this.inputValue="",this.#t=-1,this.#e="",this.#a.value?.clearDraftSession(),this.#s.value&&await this.#s.value.setFocus())}loaded(){this.manager.onLifecycle(()=>(this.el.addEventListener("arcgisVoiceInputDraftChange",this.#i),{remove:()=>{this.el.removeEventListener("arcgisVoiceInputDraftChange",this.#i)}}))}async _navigateHistory(t,s){let i=this.#s.value;if(!i)return;let e=this._userMessages;if(e.length===0)return;let u=i.value??"",h=i.shadowRoot?.querySelector("textarea"),a=h?.selectionStart,d=h?.selectionEnd;if(!(a==null||d==null)&&!(a!==d||t==="up"&&a!==0||t==="down"&&a!==u.length)){if(t==="up"){this.#t===-1?(this.#e=u,this.#t=e.length-1):this.#t=Math.max(0,this.#t-1),this.inputValue=e[this.#t]??"",s.preventDefault();return}this.#t!==-1&&(this.#t<e.length-1?(this.#t+=1,this.inputValue=e[this.#t]??""):(this.#t=-1,this.inputValue=this.#e),s.preventDefault())}}_setDraftValue(t){this.inputValue=t,this.#t=-1,this.#e=t}_onFocusIn(){this._inFocus=!0}_onFocusOut(){this._inFocus=!1}render(){return r`<div class="input-container"><calcite-text-area class=${m(v({focused:this._inFocus}))} .value=${this.inputValue} .placeholder=${this.entryPlaceholder??this._messages.entryPlaceholder} resize=vertical @calciteTextAreaInput=${this.#r} .disabled=${this.disabled} @keydown=${async t=>{t.altKey||t.ctrlKey||t.metaKey||t.shiftKey||this.keyboardShortcutsDisabled||(t.key==="Enter"?(t.preventDefault(),await this.submitMessage()):t.key==="ArrowUp"?await this._navigateHistory("up",t):t.key==="ArrowDown"&&await this._navigateHistory("down",t))}} @focusin=${this._onFocusIn} @focusout=${this._onFocusOut} ${c(this.#s)}><div slot=footer-start class="footer-start"><slot name=entry-actions-start></slot></div><div slot=footer-end class="footer-end">${this.voiceInputEnabled?r`<arcgis-assistant-speech-input .awaitingResponse=${this.awaitingResponse} .inputValue=${this.inputValue} ${c(this.#a)}></arcgis-assistant-speech-input>`:null}<slot name=entry-actions-end></slot></div></calcite-text-area></div>`}};f("arcgis-assistant-chat-entry",l);return l},"core/Collection")
@@ -1,3 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as I}from"./5BBXNT75.js";import b from"./7EHOFQ2P.js";import{a as $}from"./434TAA3J.js";import{b as D}from"./6OOZSZRJ.js";import{a as M}from"./3UEKINYC.js";import"./RLEHNAIA.js";import a from"./DG27JEYG.js";import"./FS7GXTTQ.js";import{g as A,h,k as C,l as P,n as d,t as v,u as f,v as T,x as y,z as L}from"./COH3QXWG.js";import"./R74ZHFA6.js";import"./V7Y22FRP.js";import"./AXTQU5YL.js";import"./LOQ2PKV5.js";import"./IYLFJCJ2.js";import"./VXFQANGJ.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([B,{whenOnce:F,watch:q,when:V},j,,U,,,H,{property:b,subclass:W},,{b:R}])=>{var G=A`:host{display:block;width:var(--arcgis-internal-panel-width, 100%);height:var(--arcgis-internal-expand-max-height, 100%);--calcite-panel-content-bottom-space: 0}.footer-container{display:flex;flex-direction:column;flex:1 1 0;gap:var(--calcite-spacing-md)}.content-container{display:flex;flex-direction:column;flex:1 1 0;min-height:0;position:relative;overflow:auto}.suggested-prompts-container{display:flex;justify-content:center;width:100%;background:var(--calcite-panel-background-color, var(--calcite-color-background))}.suggested-prompts{display:block;padding:var(--calcite-spacing-md);max-width:100%;box-sizing:border-box}.error-notice{padding:var(--calcite-spacing-sm)}.interrupt-waiting-message{font-style:italic;color:var(--calcite-color-text-2)}`;function S(o){return o.trim()?I.lexer(o).filter(t=>t.type!=="space").map(t=>I.parser([t])):[]}var w=class{constructor(){this._stableParts=[],this._stableText="",this._rawText=""}push(t){return this._rawText+=t,this._advanceStableBoundary(),this.getParts()}finalize(){let t=this._rawText.slice(this._stableText.length);return t.trim()&&(this._stableParts.push(...S(t)),this._stableText=this._rawText),this._stableParts}getParts(){let t=this._trimIncompleteTail(this._rawText.slice(this._stableText.length)),e=t.trim()?S(t):[];return[...this._stableParts,...e]}reset(){this._stableParts=[],this._stableText="",this._rawText=""}_advanceStableBoundary(){let t=this._rawText.slice(this._stableText.length),e=this._lastSafeBoundary(t);if(e<=0)return;let s=t.slice(0,e);this._stableParts.push(...S(s)),this._stableText+=s}_lastSafeBoundary(t){let e=t.split(`
3
- `),s=!1,r=0,i=0;for(let l of e)/^\s*(```|~~~)/u.test(l)&&(s=!s),i+=l.length+1,l.trim()===""&&!s&&(r=i);return r<t.length?r:0}_trimIncompleteTail(t){let e=t.lastIndexOf("<");if(e!==-1&&!t.includes(">",e))return t.slice(0,e);let s=this._earliestUnclosedTag(t);if(s!==-1)return t.slice(0,s);let r=t.lastIndexOf("[");if(r!==-1){let i=t.slice(r);if(!/\[[^\]]*\]\([^)]*\)/u.test(i))return t.slice(0,r)}return t}_earliestUnclosedTag(t){let e=new Set(["br","img","hr","input","meta","link","area","base","col","embed","source","track","wbr"]),s=/<(\/?)([a-zA-Z][\w-]*)\b[^>]*?(\/?)>/gu,r=[];for(let i=s.exec(t);i;i=s.exec(t)){let[,l,a,n]=i,c=a.toLowerCase();if(!(e.has(c)||n==="/"))if(l==="/"){for(let g=r.length-1;g>=0;g--)if(r[g].name===c){r.splice(g);break}}else r.push({name:c,index:i.index})}return r.length?r[0].index:-1}};function Z(o){let t=new w;return t.push(o),t.finalize()}var J=async o=>await new Promise(t=>setTimeout(t,o));async function*K(o,{chunkSize:t=15,delay:e=50}={}){let s=new w;for(let r=0;r<o.length;r+=t)yield s.push(o.slice(r,r+t)),await J(e);yield s.finalize()}var Q=Object.defineProperty,X=Object.getOwnPropertyDescriptor,m=(o,t,e,s)=>{for(var r=s>1?void 0:s?X(t,e):t,i=o.length-1,l;i>=0;i--)(l=o[i])&&(r=(s?l(t,e,r):l(r))||r);return s&&r&&Q(t,e,r),r},O=o=>!o||typeof o!="object"?!1:o.name==="AbortError";async function*z(o,t,e,s,r=!1){if(r){if(s?.aborted){yield{type:"cancelled",log:e,runId:t};return}yield{type:"block-data",blockType:"text",data:{parts:Z(o)},runId:t};return}for await(let i of K(o)){if(s?.aborted){yield{type:"cancelled",log:e,runId:t};return}yield{type:"block-data",blockType:"text",data:{parts:i},runId:t}}}var p=class extends H{constructor(o){super(o),this.view=null,this.streamingDisabled=!1,this.runtimeEventsEnabled=!1,this.loading=!1,this.processing=!1,this.processingStep=""}async load(){this._set("loading",!0);try{await this._initialize()}finally{this._set("loading",!1)}}destroy(){this.orchestrator?.dispose(),super.destroy()}async _initialize(){this.removeHandles(),await Promise.all([this.portal.load(),this.view?.when()]),this.view&&await F(()=>!this.view.updating),this._set("orchestrator",await R.init({agents:[...this.agents],runtimeEventsEnabled:this.runtimeEventsEnabled,view:this.view??void 0})),this.addHandles([q(()=>[this.view,this.agents],()=>{this._initialize()})])}clearChatHistory(){this.orchestrator?.newConversation()}async*ask(o,t,e){if(!this.orchestrator)throw new Error("Orchestrator not initialized yet.");this._set("processing",!0),this._set("processingStep","");let s=[],r,i="pending";try{let l=this.orchestrator.ask(o,t);for await(let a of l)switch(i=a.runId,a.type){case"runtime":{yield{type:"runtime",event:a,runId:i};break}case"trace":{this._set("processingStep",a.data.text),s.push(a.data.text);break}case"completed":{this._set("processing",!1),this._set("processingStep","");let n=a.result,c=!!n.content.length,g=!!r?.length;if(!c&&!g){yield{type:"completed",error:"No response received.",log:s,runId:i};return}let u=n.content;if(yield{type:"block-start",blockType:"text",runId:i},yield*z(u,i,s,e,this.streamingDisabled),yield{type:"block-end",blockType:"text",runId:i},g)for(let k of r){if(e?.aborted){yield{type:"cancelled",log:s,runId:i};return}let{type:_,data:E}=k;if(yield{type:"block-start",blockType:_,runId:i},_==="text"){let N=typeof E?.content=="string"?E.content:"";yield*z(N,i,s,e,this.streamingDisabled)}else yield{type:"block-data",blockType:_,data:E,runId:i};yield{type:"block-end",blockType:_,runId:i}}yield{type:"completed",response:u,blocks:r,log:s,runId:i};return}case"ux-suggestion":{let n=a.suggestion;r=r?[...r,n]:[n];break}case"interrupt":{let{kind:n,message:c,metadata:g}=a.interrupt,u=Array.isArray(g)?g.filter(_=>typeof _=="string"):[],k=(()=>{switch(n){case"booleanChoice":return{type:"boolean-choice",message:c,options:u};case"singleSelection":return{type:"single-select",message:c,options:u};case"multipleSelection":return{type:"multi-select",message:c,options:u};case"textInput":return{type:"text-input",message:c};default:return{type:n,message:c,options:u}}})();this._set("processingStep","Waiting for user input..."),yield{type:"interrupt",payload:k,runId:i};break}case"cancelled":{yield{type:"cancelled",log:s,runId:i};return}case"error":{if(e?.aborted||O(a.error)){yield{type:"cancelled",log:s,runId:i};return}yield{type:"completed",error:a.error.message,log:s,runId:i};return}default:{console.warn("Unknown event type:",a);break}}}catch(l){if(e?.aborted||O(l)){yield{type:"cancelled",log:s,runId:i};return}console.warn("Error during message processing:",l),yield{type:"completed",error:"An error occurred during message processing.",log:s,runId:"error"};return}finally{this._set("processing",!1)}}cancel(){this.orchestrator?.cancel()}};m([b({readOnly:!0})],p.prototype,"orchestrator",2);m([b()],p.prototype,"agents",2);m([b()],p.prototype,"portal",2);m([b()],p.prototype,"view",2);m([b()],p.prototype,"streamingDisabled",2);m([b()],p.prototype,"runtimeEventsEnabled",2);m([b({readOnly:!0})],p.prototype,"loading",2);m([b({readOnly:!0})],p.prototype,"processing",2);m([b({readOnly:!0})],p.prototype,"processingStep",2);p=m([W("OrchestratorController")],p);var Y="Embeddings resource 'embeddings-v01.json' not found in the webmap portal item.",tt="Embeddings not found for this web map.",et="https://developers.arcgis.com/javascript/latest/agentic-apps/ai-webmap-setup/#embeddings",x=class extends T{constructor(){super(...arguments),this._messages=D({blocking:!0}),this.#t=v(),this.#o=v(),this.#i=v(),this.#e=null,this.#r=new Map,this.#s=j.getDefault(),this.#a=t=>{t.stopPropagation(),this.cancelInterrupt()},this.#n=t=>{t.stopPropagation();let e=t.detail;this.submitInterrupt(e)},this.#l=t=>{t.stopPropagation(),this.keepSuggestedPrompts||(this.suggestedPrompts=[]);let e=t.detail;this._inputValue="",this.arcgisSubmit.emit(e),this.submitMessage(e)},this.#c=t=>{if(this._canceling=!0,t.stopPropagation(),this.arcgisCancel.emit(),this._interrupt){this.orchestrator?.cancelInterrupt(),this._interrupt=null;return}this._orchestratorController?.cancel(),this.#e?.abort(),this.#e=null},this.#h=t=>{t.stopPropagation();let e=t.detail;this.arcgisFeedback.emit(e)},this.#g=t=>{t.stopPropagation();let e=t.detail;this._inputValue=e.prompt,this.arcgisPromptSelect.emit(e)},this.#u=t=>{this.arcgisSlottableRequest.emit(t.detail)},this._orchestratorController=null,this._interrupt=null,this._interruptDetails=[],this._error=null,this._inputValue="",this._isAnswering=!1,this._canceling=!1,this.messages=new B([]),this.referenceElement=null,this.suggestedPrompts=[],this.feedbackEnabled=!1,this.keepSuggestedPrompts=!1,this.streamingDisabled=!1,this.runtimeEventsEnabled=!1,this.logEnabled=!1,this.copyEnabled=!1,this.voiceInputEnabled=!1,this.readAloudEnabled=!1,this.assistantAvatarEnabled=!1,this.userAvatarEnabled=!1,this.arcgisCancel=d(),this.arcgisError=d(),this.arcgisFeedback=d(),this.arcgisInterrupt=d(),this.arcgisInterruptCancel=d(),this.arcgisInterruptSubmit=d(),this.arcgisPromptSelect=d(),this.arcgisReady=d(),this.arcgisResponse=d(),this.arcgisRuntime=d({bubbles:!1,composed:!1}),this.arcgisSlottableRequest=d({bubbles:!1,composed:!1}),this.arcgisSubmit=d()}static{this.properties={_orchestratorController:16,_interrupt:16,_interruptDetails:16,_error:16,_inputValue:16,_isAnswering:16,_signedInUserId:16,_canceling:16,_isSignedIn:16,_user:16,awaitingResponse:32,awaitingResponseStep:32,interrupt:32,messages:0,orchestrator:32,entryMessage:1,heading:1,description:1,referenceElement:1,alwaysUseAgentId:1,allowedAgentIds:0,suggestedPrompts:0,feedbackEnabled:5,keepSuggestedPrompts:5,streamingDisabled:5,runtimeEventsEnabled:5,logEnabled:5,copyEnabled:5,voiceInputEnabled:5,readAloudEnabled:5,assistantAvatarEnabled:5,userAvatarEnabled:5}}static{this.styles=G}#t;#o;#i;#e;#r;#s;#a;#n;#l;#c;#h;#g;#u;get _isSignedIn(){return!!this.#s?.user||!!this._signedInUserId}get _user(){return this.#s?.user?.fullName||this.#s?.user?.username}get awaitingResponse(){return this._orchestratorController?.processing??!1}get awaitingResponseStep(){return this._orchestratorController?.processingStep??""}get interrupt(){return this._interrupt}get orchestrator(){return this._orchestratorController?.orchestrator}cancelInterrupt(){this.arcgisInterruptCancel.emit(),this.orchestrator?.cancelInterrupt(),this._interrupt=null}async clearChatHistory(){this._reset(),this._orchestratorController?.clearChatHistory()}register(t){this.#r.set(t.agent.id,t),this._orchestratorController&&this.#d()}submitInterrupt(t){this.arcgisInterruptSubmit.emit(t),this._interrupt&&(this._interruptDetails=[...this._interruptDetails,{interrupt:this._interrupt,response:t}]),this.orchestrator?.resumeInterrupt(t),this._interrupt=null}async submitMessage(t){let e=t.trim();if(!e||(this.messages.push({id:Date.now().toString(),role:"user",content:e}),!this._orchestratorController))return;this.#e=new AbortController,this._orchestratorController.streamingDisabled=this.streamingDisabled;let s=this.alwaysUseAgentId?{routing:"direct",agentId:this.alwaysUseAgentId}:{routing:"auto",agentIds:this.allowedAgentIds},r=this._orchestratorController.ask(e,s,this.#e?.signal);for await(let i of r){let l=i.runId,a=this.messages.at(-1);switch(i.type){case"runtime":this.arcgisRuntime.emit(i.event);break;case"block-start":{this._isAnswering=!0;let n={type:i.blockType,isPending:!0};if(a?.role==="assistant"&&a.id===l){let c=[...a.blocks??[],n];this.messages.splice(-1,1,{...a,blocks:c})}else this.messages.push({role:"assistant",blocks:[n],id:l,isStreaming:!0,interrupts:this._interruptDetails}),this._interruptDetails=[];break}case"block-data":{if(a?.role!=="assistant"||a?.id!==l)break;let n=[...a.blocks??[]],c=n[n.length-1],{blockType:g,data:u}=i;if(c?.type!==g||!c.isPending)break;g==="text"?n[n.length-1]={...c,data:{...c.data,parts:u?.parts}}:n[n.length-1]={...c,data:{...c.data,...u??{}}},this.messages.splice(-1,1,{...a,blocks:n});break}case"block-end":{if(a?.role!=="assistant"||a?.id!==l)break;let n=[...a.blocks??[]],c=n[n.length-1];if(c?.type!==i.blockType||!c.isPending)break;let g=c;n[n.length-1]={...g,data:{...g.data},isPending:!1},this.messages.splice(-1,1,{...a,blocks:n});break}case"completed":i.error?(this.messages.push({role:"assistant",log:i.log,error:i.error,id:l,interrupts:this._interruptDetails}),this._interruptDetails=[]):a?.role==="assistant"&&a.id===l&&this.messages.splice(-1,1,{...a,content:i.response,blocks:a.blocks?.map(n=>({...n,data:{...n.data},isPending:!1}))??[],isStreaming:!1,log:i.log}),this._isAnswering=!1,this.#e=null,this._canceling=!1;break;case"interrupt":this._interrupt={...i.payload,id:l},this.arcgisInterrupt.emit(this._interrupt);break;case"cancelled":a?.role==="assistant"&&a.id===l?this.messages.splice(-1,1,{...a,blocks:a.blocks?.filter(n=>n.type==="text"||!n.isPending)??[],isStreaming:!1,log:i.log,error:`(${this._messages.stoppedByUserLabel})`}):(this.messages.push({role:"assistant",log:i.log,error:`(${this._messages.stoppedByUserLabel})`,id:l,interrupts:this._interruptDetails}),this._interruptDetails=[]),this._isAnswering=!1,this.#e=null,this._canceling=!1;break}}}unregister(t){this.#r.delete(t),this._orchestratorController&&this.#d()}load(){this.manager.onLifecycle(this._reset.bind(this))}loaded(){this.manager.onLifecycle(()=>{this.#t.value?.addEventListener("arcgisPromptSelect",this.#g),this.#t.value?.addEventListener("arcgisSubmit",this.#l),this.#t.value?.addEventListener("arcgisCancel",this.#c),this.#t.value?.addEventListener("arcgisFeedback",this.#h);let t=V(()=>!!this._interrupt&&!!this.#i.value,()=>{let s=this.#i.value;s.removeEventListener("arcgisSubmit",this.#n),s.removeEventListener("arcgisCancel",this.#a),s.addEventListener("arcgisSubmit",this.#n,{once:!0}),s.addEventListener("arcgisCancel",this.#a,{once:!0})}),e=this.messages.on("after-add",s=>{let r=s.item;r.role==="assistant"&&(r.error||r.content)&&this.arcgisResponse.emit(r)});return queueMicrotask(()=>{this.#p()}),()=>{t.remove(),e.remove(),this.#t.value?.removeEventListener("arcgisPromptSelect",this.#g),this.#i.value?.removeEventListener("arcgisSubmit",this.#n),this.#i.value?.removeEventListener("arcgisCancel",this.#a),this.#t.value?.removeEventListener("arcgisSubmit",this.#l),this.#t.value?.removeEventListener("arcgisCancel",this.#c),this.#t.value?.removeEventListener("arcgisFeedback",this.#h),this._orchestratorController?.destroy(),this._orchestratorController=null}})}willUpdate(t){this.hasUpdated&&t.has("runtimeEventsEnabled")&&this._orchestratorController&&(this._orchestratorController.destroy(),this._orchestratorController=null,this.#p())}async#m(){await U.checkSignInStatus(this.#s.url);let t=await this.#s.load();if(!t.helperServices?.aiAssistantServices?.url)throw new Error(this._messages.serviceUrlNotAvailableMessage);let e=!1,s=await t.fetchSettings();if(s.aiConfig?e=s.aiConfig.aiForOrg?.enabled===!0&&s.aiConfig.aiForOrg?.aiCapabilities?.aiAgents?.enabled===!0:e=s.aiAssistantsEnabled===!0,!e)throw new Error(this._messages.aiAssistantsNotEnabledMessage);if(!t.isPortal&&t?.user?.privileges?.includes("portal:user:useAIAssistants")!==!0)throw new Error(this._messages.userPrivilegesNotSufficientMessage)}async#d(){try{this._error=null;let t=M(this.el,this.referenceElement);await t?.componentOnReady();let e=[...this.#r.values()];return e.length?(await this.#m(),this._orchestratorController?.destroy(),this._orchestratorController=new p({agents:e,portal:this.#s,runtimeEventsEnabled:this.runtimeEventsEnabled,streamingDisabled:this.streamingDisabled,view:t?.view}),await this._orchestratorController.load(),this.requestUpdate(),!0):(this._error=this._messages.noAgentsFoundMessage,!1)}catch(t){return this._error=t?.message??this._messages.orchestratorInitializationErrorMessage,P(this)(t),!1}}async#p(){await this.#d()?this.arcgisReady.emit():this._error&&this.arcgisError.emit(new Error(this._error))}_reset(){this._orchestratorController?.cancel(),this.#e?.abort(),this._interrupt=null,this.messages.removeAll(),this._error=null,this._inputValue="",this._signedInUserId=void 0}_renderEntryMessage(){return this._isSignedIn?this._error?this._renderErrorNotice():this.entryMessage?this.messages.length>0?null:h`<calcite-notice open kind=brand closable icon width=full><div slot=message>${this.entryMessage}</div></calcite-notice>`:h`<slot name=entry-message></slot>`:this._renderSignInNotice()}_renderSignInNotice(){let t=this.#s;return h`<calcite-notice slot=entry-message open kind=brand icon width=full><div slot=message>${this._messages.signInRequiredMessage}</div>${t?h`<calcite-link slot=link @click=${async()=>{try{let e=await U.getCredential(`${t.url}/sharing`);this._signedInUserId=e.userId,this._error=null,this.requestUpdate(),await this.#p()}catch(e){this._error=e?.message??this._messages.signInErrorMessage,this.arcgisError.emit(new Error(this._error)),C("error",this,"Error signing in:",{detail:{error:e}})}}} target=_blank title=${this._messages.signInToArcGISOnlineLabel??y}>${this._messages.signInLabel}</calcite-link>`:h`<div slot=link>${this._messages.noPortalInformationMessage}</div>`}</calcite-notice>`}_renderErrorNotice(){return this._error?h`<calcite-notice slot=entry-message open kind=brand icon width=full>${this._error===Y?h`<div slot=message>${tt}</div><calcite-link slot=link .href=${et} target=_blank title=${this._messages.learnAboutWebMapEmbeddingsLabel??y}>${this._messages.readMoreLabel}</calcite-link>`:h`<div slot=message>${this._error}</div>`}</calcite-notice>`:null}render(){return h`<calcite-panel .loading=${!this._orchestratorController&&!this._error||this._orchestratorController?.loading} .heading=${this.heading??this._messages.assistantLabel} .description=${this.description} ${f(this.#t)}><slot name=header-actions-start slot=header-actions-start></slot><slot name=header-actions-end slot=header-actions-end></slot><div class="content-container"><arcgis-assistant-chat .loading=${this.awaitingResponse} .messages=${this.messages} .interrupt=${this._interrupt}><slot name=message-starter slot=message-starter></slot><slot name=messages slot=messages>${this.messages.map(t=>t.role==="assistant"?h`<arcgis-assistant-message .message=${t} .feedbackEnabled=${this.feedbackEnabled} .logEnabled=${this.logEnabled} .copyEnabled=${this.copyEnabled} .readAloudEnabled=${this.readAloudEnabled} @arcgisSlottableRequest=${this.#u} .assistantAvatarEnabled=${this.assistantAvatarEnabled}>${t.blocks?.map((e,s)=>h`<slot name=${$(t.id,s)??y} slot=${$(t.id,s)??y}><arcgis-assistant-message-block .block=${e}></arcgis-assistant-message-block></slot>`)}</arcgis-assistant-message>`:h`<arcgis-assistant-user-message .message=${t} .user=${this._user} .userAvatarEnabled=${this.userAvatarEnabled}></arcgis-assistant-user-message>`)}</slot>${this._interrupt?h`<div slot=message-loading><div class="interrupt-waiting-message">${this._messages.waitingForUserInputMessage}</div></div>`:h`<slot name=message-loading slot=message-loading><arcgis-assistant-message-loading .loading=${this.awaitingResponse} .loadingMessage=${this.awaitingResponseStep} .assistantAvatarEnabled=${this.assistantAvatarEnabled} .interrupts=${this._interruptDetails}></arcgis-assistant-message-loading></slot>`}</arcgis-assistant-chat></div>${this._interrupt?h`<slot name=interrupt><arcgis-assistant-interrupt slot=content-bottom .type=${this._interrupt.type} .message=${this._interrupt.message} .options=${this._interrupt.options} ${f(this.#i)}></arcgis-assistant-interrupt></slot>`:this.suggestedPrompts?.length?h`<div class="suggested-prompts-container" slot=content-bottom><arcgis-assistant-suggested-prompts class="suggested-prompts" .prompts=${this.suggestedPrompts}></arcgis-assistant-suggested-prompts></div>`:null}<div class="footer-container" slot=footer>${this._renderEntryMessage()}<slot name=chat-entry><arcgis-assistant-chat-entry .awaitingResponse=${this.awaitingResponse||this._isAnswering} .inputValue=${this._inputValue} .messages=${this.messages} .voiceInputEnabled=${this.voiceInputEnabled} .disabled=${this._canceling||!this._isSignedIn||!!this._interrupt||!!this._error} ${f(this.#o)}><slot name=entry-actions-start slot=entry-actions-start></slot><slot name=entry-actions-end slot=entry-actions-end><calcite-button .iconStart=${this.awaitingResponse||this._isAnswering?"circle-stop":"send"} @click=${()=>{this.#o.value?.submitMessage()}} round>${this.awaitingResponse||this._isAnswering?this._messages.stopButtonLabel:this._messages.askButtonLabel}</calcite-button></slot></arcgis-assistant-chat-entry></slot><slot name=footer-content></slot></div></calcite-panel>`}};L("arcgis-assistant",x);return x},"core/Collection","core/reactiveUtils","portal/Portal","request","identity/IdentityManager","config","layers/FeatureLayer","core/Accessor","core/accessorSupport/decorators",a,b)
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./QNXI3WOF.js";export default $arcgis.t(([{a:e}])=>{var t=[async()=>(await import("./OMF6ITSG.js")).default,async()=>(await import("./ZFOG3KXV.js")).default],r=e({id:"dataExploration",name:"Data Exploration Agent",description:"Explores feature-layer data and applies data-driven map filters using on-demand query and filter skills.",skillLoaders:t,modelTier:"default",systemPrompt:"You are an ArcGIS data exploration agent.",instructions:"A request can require both query and filter skills. Treat show, display, highlight, map, filter, reveal, emphasize, include, or exclude as visual map intent when the request targets matching features. For visual map intent, do not stop after query. First use query to identify/count the matching features, then load the filter skill and call setFeatureEffect with the same layer, where clause, geometry filter, extent setting, or object IDs. Use only tool results to describe data or map changes.",fallbackMessage:"Data exploration request completed.",failureMessage:"I couldn't complete the data exploration request."});return r},a)
@@ -1,6 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{ka as r}from"./LOQ2PKV5.js";var a=(e,t)=>t,d=(e,t)=>({...e,...t}),o=(e="",t)=>{let s=typeof t=="string"?t.trim():"";if(!s)return e;let u=e.trim();if(!u)return s;if(u===s)return e;let n=u.split(`
3
-
4
- `);return n[n.length-1]?.trim()===s?e:`${e}
5
-
6
- ${s}`},c=()=>({userRequest:"",assignedTask:"",messages:[],priorSteps:[],sharedState:{},sharedResources:[]}),i=()=>({agentExecutionContext:r({reducer:d,default:c}),outputMessage:r({reducer:o,default:()=>""}),summary:r({reducer:a,default:()=>""}),status:r({reducer:a}),sharedStatePatch:r({reducer:a}),sharedResourceAdditions:r({reducer:a})}),f=()=>i();export{a,d as b,o as c,c as d,i as e,f};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{d as b}from"./FS7GXTTQ.js";import{Ya as G,ka as w,r as E,s as y}from"./LOQ2PKV5.js";var x=new Set(["agentExecutionContext","outputMessage","summary","status"]);function O(r){let o=[...new Set([...r].filter(t=>x.has(t)))];if(o.length!==0)throw new Error(`custom state cannot define reserved runtime fields: ${o.join(", ")}.`)}function $(r){let o=Object.entries(r);return Object.fromEntries(o.map(([t,n])=>[t,w({reducer:(s,u)=>u,default:()=>n})]))}function S(r={}){O(Object.keys(r));let o=$(r);return w.Root({...o,agentExecutionContext:w({reducer:(t,n)=>({...t,...n}),default:b}),outputMessage:w({reducer:(t="",n)=>typeof n=="string"&&n.trim()?n:t,default:()=>""}),summary:w({reducer:(t="",n)=>typeof n=="string"?n:t,default:()=>""}),status:w({reducer:(t,n)=>n??t,default:()=>{}})})}function C(r,o=[]){let t=new Set(o);for(let s of r)for(let u of Object.keys(s.shape??{}))t.add(u);let n=Object.fromEntries([...t].map(s=>[s,void 0]));return S(n)}function P(r,o,t,n={}){let{agent:s,entryNode:u,middlewares:c=[]}=n,i=new G(t);if(Object.keys(r).length===0)throw new Error("Graph requires at least one node.");if(o.length===0)throw new Error("Graph requires at least one edge.");if(c.length>0&&!s)throw new Error("Graph middleware requires agent metadata.");let a=new Set(Object.keys(r)),m=new Map,g=new Map;for(let e of a)m.set(e,0),g.set(e,0);for(let e of o)"to"in e?(a.has(e.from)&&g.set(e.from,(g.get(e.from)??0)+1),a.has(e.to)&&m.set(e.to,(m.get(e.to)??0)+1)):a.has(e.from)&&g.set(e.from,(g.get(e.from)??0)+1);for(let[e,f]of Object.entries(r)){let h=N(s,e,c,async(d,p)=>await Promise.resolve(f(d,p))),l=async(d,p)=>await h(d,p);i=i.addNode(e,l)}for(let e of o)if("to"in e){let f=e.from,h=e.to;if(!a.has(f))throw new Error(`Graph edge references unknown from-node: ${f}`);if(!a.has(h))throw new Error(`Graph edge references unknown to-node: ${h}`);i.addEdge(f,h)}else{let f=e.from;if(!a.has(f))throw new Error(`Graph conditional edge references unknown from-node: ${f}`);i.addConditionalEdges(f,async(h,l)=>{let d=await e.decide(h,l);if(!d)return y;if(!a.has(d))throw new Error(`Graph conditional edge returned unknown node: ${d}`);return d})}let k=v(a,m,u);i.addEdge(E,k);let j=[...a].filter(e=>(g.get(e)??0)===0);for(let e of j)i.addEdge(e,y);return i}function N(r,o,t,n){return!t.length||!r?n:async(s,u)=>await t.reduceRight((c,i)=>async a=>await i.handler(a,c),async c=>{let i=await n(c.state,c.config);return{...c.state,...i}})({agent:r,config:u,nodeName:o,state:s})}function v(r,o,t){if(t){if(!r.has(t))throw new Error(`Graph entry node references unknown node: ${t}`);return t}let n=[...r].filter(s=>(o.get(s)??0)===0);if(n.length!==1)throw new Error(`Graph could not infer a single entry node (found ${n.length}). Provide an explicit entryNode or ensure exactly one node has no incoming edges.`);return n[0]}export{O as a,$ as b,S as c,C as d,P as e};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./UZLQALHY.js";var e='---\nname: query\ndescription: Answers questions about feature-layer data, including counts, matching records, field values, aggregates, rankings, and spatially constrained results. Use when the user asks to inspect or summarize map data.\nallowed-tools: findRelevantLayers findRelevantFields getAttribute getStatistics getTopFeatures queryFeatures\n---\n\n# Query\n\n- When the task refers to an address, place, or location resolved by an earlier agent, call `listSharedResources` with `point` as the requested kind. If a resource description clearly matches the location, pass its exact ID as `geometryFilter.sharedResourceId` and use `where: "1=1"` unless the user requests an additional attribute filter. If no resource clearly matches a referential location such as "this location," state that the spatial anchor is unavailable and do not guess coordinates.\n- Start with `findRelevantLayers` unless a previous tool result from this run explicitly identifies the relevant layer ID. Use the assigned task as the semantic query.\n- If no relevant layers are returned, explain that no matching map layer was found and stop. Never invent a layer ID.\n- Before querying, call `findRelevantFields` with only relevant layer IDs. Use only the exact field names and categorical values returned by `findRelevantFields`.\n- Set `includeSummaryStatistics` to true when the requested answer directly depends on whole-layer numeric summary statistics such as average, minimum, maximum, sum, variance, standard deviation, null count, or range. Otherwise leave it false and use `getStatistics` later if analysis requires statistics under an attribute or spatial constraint.\n- Use statistics returned by `findRelevantFields` when they directly answer an unfiltered whole-layer question. Use `getStatistics` when a where clause or spatial constraint must be applied.\n- Use `queryFeatures` to count, find, or list matching features. It is the default query tool.\n- Use `getTopFeatures` for highest, lowest, first, last, or top-N records ranked by an existing field.\n- Use `getAttribute` only when retrieving a particular attribute from a specifically identified feature.\n- Use real field names rather than aliases in SQL-92 where clauses. Use `1=1` when no attribute filter is requested.\n- Set `useCurrentExtent` only when the user explicitly refers to the current view or visible map area.\n- If the request asks to visually show, display, highlight, map, filter, reveal, emphasize, hide, include, or exclude matching features, preserve the information needed for a visual operation in the working context: layer ID, where clause, geometry filter, `useCurrentExtent`, object IDs when available, and count. Preserve the exact values returned or used by tools so another skill can reuse them without repeating discovery.\n- Base the final answer only on returned tool data. State failures or empty results directly and do not fabricate values.\n';export{e as default};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- var d=(...o)=>{let t=[];for(let n=0;n<o.length;++n){let s=o[n];if(typeof s=="string")t.push(s);else if(Array.isArray(s))t.push.apply(t,s);else if(typeof s=="object")for(let a in s)s[a]&&t.push(a)}let e=t.join(" ");return t.length=0,e},u=(o,t)=>{let e=o;for(;e;){if(e===t)return!0;if(!e.parentNode)return!1;e.parentNode instanceof ShadowRoot?e=e.parentNode.host:e=e.parentNode}return!1},g=(o,t,e)=>{let n=m(t).subscribe;return n(s=>{s.some(r=>u(o,r.target))&&e()})},l={},m=o=>{let t=o.join(","),e=l[t];if(e!==void 0)return e;let n=new Set,s=new MutationObserver(r=>n.forEach(c=>c(r)));globalThis.document&&s.observe(document.documentElement,{attributes:!0,attributeFilter:o,subtree:!0});let a={subscribe:r=>(n.add(r),()=>{n.delete(r),n.size===0&&(s.disconnect(),l[t]=void 0)})};return l[t]=a,a},i=(o,t)=>{let e=o;for(;e;){let n=e.closest?.(t);if(n)return n;let s=e.getRootNode?.();if(s===globalThis.document)return;e=s?.host}};var h=(o,t,e)=>i(o,`[${t}]`)?.getAttribute(t)??e;export{d as a,g as b,i as c,h as d};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as l,b as S}from"./P4XZMBU5.js";import b from"./TYATJUNF.js";import{d as w,e as v}from"./JQYLMTDP.js";import a from"./DG27JEYG.js";import{c as d}from"./QRMRID2M.js";import{a as f,c as u}from"./AXTQU5YL.js";import{P as g,aa as c}from"./LOQ2PKV5.js";export default $arcgis.t(([,,,{watch:T},,{property:m,subclass:_},{b:h},y])=>{var x=Object.defineProperty,k=Object.getOwnPropertyDescriptor,a=(t,r,e,o)=>{for(var s=o>1?void 0:o?k(r,e):r,n=t.length-1,p;n>=0;n--)(p=t[n])&&(s=(o?p(r,e,s):p(s))||s);return o&&s&&x(r,e,s),s},i=class extends y{constructor(t){super(t),this.modelTier="default"}initialize(){this.addHandles(T(()=>[this.description,this.inputSchema,this.modelTier,this.name,this.outputSchema,this.prompt,this.tools],()=>{this.generate()},{initial:!0,sync:!0}))}getSchemas(){return[this.inputSchema,this.outputSchema].filter(Boolean)}generate(){let t=this.prompt?c.fromTemplate(this.prompt).inputVariables:[],r=w(this.getSchemas(),t);this._set("workspace",r);let e=this.id,o={[e]:this._invoke.bind(this)},s=[{from:e,decide:()=>{}}];this._set("createGraph",()=>v(o,s,r,{agent:this,entryNode:e,middlewares:this.middlewares}))}async _invoke(t,r){try{return this.outputSchema?await this._invokeStructured(t,r):await this._invokeUnstructured(t,r)}catch(e){if(g(e))throw e;let o=e instanceof Error?e.message:String(e);return l({outputMessage:o},"failed",o)}}async _invokeStructured(t,r){if(!this.outputSchema)throw new Error("Output schema is required for structured invocation.");let e=await u({model:await h({modelTier:this.modelTier}),systemPrompt:await this._getPromptWithInputVariables(t),tools:this._getTools(),checkpointer:!0,middleware:d(this.middlewares),responseFormat:f(this.outputSchema)}).invoke({messages:t.agentExecutionContext.messages},r);if(!("structuredResponse"in e)||e.structuredResponse===void 0)throw new Error("LLMAgent did not receive structured output from createAgent.");return S(e.structuredResponse,this.outputSchema,e.messages)}async _invokeUnstructured(t,r){let e=(await u({model:await h({modelTier:this.modelTier}),systemPrompt:await this._getPromptWithInputVariables(t),tools:this._getTools(),checkpointer:!0,middleware:d(this.middlewares)}).invoke({messages:t.agentExecutionContext.messages},r)).messages,o=e.at(-1)?.text??"",s=o.trim()||"LLMAgent completed.";return l({agentExecutionContext:{...t.agentExecutionContext,messages:e},outputMessage:o},"success",s)}async _getPromptWithInputVariables(t){return await c.fromTemplate(this.prompt).format(t)}_getTools(){return this.tools?.map(t=>"getTool"in t?t.getTool():t)??[]}};a([m()],i.prototype,"prompt",2);a([m()],i.prototype,"tools",2);a([m()],i.prototype,"inputSchema",2);a([m()],i.prototype,"outputSchema",2);a([m()],i.prototype,"modelTier",2);i=a([_("LLMAgent")],i);return i},"identity/IdentityManager","portal/Portal","request","core/reactiveUtils","layers/FeatureLayer","core/accessorSupport/decorators",a,b)
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as r}from"./VXFQANGJ.js";export default $arcgis.t(([p,l])=>{var m=["feet","kilometers","meters","miles","nautical-miles","us-nautical-miles"],u=r.enum(m);var f=750;function y(e){return"point"in e&&e.point!==void 0}function h(e){return"layerId"in e&&e.layerId!==void 0}var $=async(e,a)=>{if(y(e)){let{point:t}=e;return{geometry:new p({x:t.x,y:t.y,spatialReference:t.spatialReference?{wkid:t.spatialReference.wkid}:a.spatialReference})}}if(h(e)){let t=a.map?.allLayers.find(o=>o.id===e.layerId);if(!t)return{error:`Could not find geometry layer with ID: ${e.layerId}`};let i=t.title??t.id,n=e.where?.trim()||"1=1";try{let o=await t.queryFeatures({where:n,returnGeometry:!0,outSpatialReference:a.spatialReference,num:f+1});if(!o.features.length)return{error:`No features found in geometry layer "${i}" with the specified where clause: ${n}`};if(o.features.length>f)return{error:`Geometry filter for layer "${i}" matched too many features (${o.features.length}+). Please narrow the geometry layer filter.`};let s=o.features.map(d=>d.geometry).filter(d=>!!d);if(!s.length)return{error:"No valid geometries found for the matched geometry layer features."};let c=s.length===1?s[0]:l.executeMany(s);return c?(c.spatialReference||(c.spatialReference=a.spatialReference),{geometry:c}):{error:"Failed to combine geometries from geometry layer."}}catch(o){return{error:`Failed to query geometry: ${String(o)}`}}}return{error:"Invalid geometry configuration provided"}},g=r.object({id:r.string()}),b=r.object({id:r.string(),kind:r.literal("point"),payload:r.object({x:r.number(),y:r.number(),spatialReference:r.object({wkid:r.number()}).optional()})}),x=r.object({sharedResourceId:r.string().describe("ID of a point returned by listSharedResources for a previously geocoded address or place."),distance:r.number().optional().describe("Optional buffer distance around the point."),units:u.optional().describe("The units for the distance buffer.")}),j=(e,a)=>{if(!e||!("sharedResourceId"in e))return e;if(!a)throw new Error("Shared resources are unavailable in the tool runtime state.");let t=a.find(n=>{let o=g.safeParse(n);return o.success&&o.data.id===e.sharedResourceId});if(!t)throw new Error(`Shared resource not found: ${e.sharedResourceId}`);let i=b.safeParse(t);if(!i.success)throw new Error(`Shared resource ${e.sharedResourceId} does not contain a valid point.`);return{point:i.data.payload,distance:e.distance,units:e.units}};return{a:u,b:y,c:h,d:$,e:x,f:j}},"geometry/Point","geometry/operators/unionOperator")
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./UZLQALHY.js";var e='---\nname: filter\ndescription: Changes feature emphasis on the map by including, excluding, highlighting, dimming, or clearing filtered features. Use when the user asks to visually filter feature-layer data.\nallowed-tools: findRelevantLayers findRelevantFields setFeatureEffect resetMap clearFilters\n---\n\n# Filter\n\n- Use `clearFilters` when the user asks only to remove feature filters or effects. Use `resetMap` only when the user asks to reset the broader map state.\n- Reuse a preceding query result from this run whenever it contains the layer ID and filtering criteria needed for the visual operation. Do not repeat layer or field discovery in that case.\n- A preceding query result may provide the layer ID, where clause, geometry filter, `useCurrentExtent`, object IDs, and count. Preserve and reuse those values rather than reconstructing them.\n- If no usable preceding query geometry exists and the task refers to an address, place, or location resolved by an earlier agent, call `listSharedResources` with `point` as the requested kind. If a resource description clearly matches the location, pass its exact ID as `geometryFilter.sharedResourceId` and use `where: "1=1"` unless the user requests an additional attribute filter. If no resource clearly matches a referential location such as "this location," state that the spatial anchor is unavailable and do not guess coordinates.\n- If no usable preceding query result exists, start with `findRelevantLayers`. Use the assigned task as the semantic query. If no relevant layers are returned, explain that no matching map layer was found and stop. Never invent a layer ID.\n- When discovery is required, call `findRelevantFields` with only relevant layer IDs before constructing a filter. Use only the exact field names and categorical values returned by `findRelevantFields`.\n- Leave `includeSummaryStatistics` false unless the filter criteria explicitly depend on a requested numeric summary.\n- Use real field names rather than aliases in SQL-92 where clauses. Use `1=1` when no attribute filter is requested.\n- For highlight, show, include, exclude, or other visual-filter requests with feature criteria, call `setFeatureEffect` using the same layer ID, where clause, geometry filter, and `useCurrentExtent` value determined by the preceding query or discovery steps.\n- If a preceding query returned object IDs for ranked, top-N, or otherwise selected records, pass those object IDs to `setFeatureEffect` instead of rebuilding the selection using only a where clause.\n- Prefer the default feature effects unless the user explicitly requests a particular visual treatment.\n- Set `useCurrentExtent` only when the user explicitly refers to the current view or visible map area.\n- When available, use the preceding query result for feature counts or attribute details in the final response.\n- Report the `setFeatureEffect` outcome faithfully. Do not claim that a map effect was applied when the tool failed or no matching layer or field was found.\n';export{e as default};
@@ -1,92 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import l from "@arcgis/core/geometry/Point.js";
3
- import * as f from "@arcgis/core/geometry/operators/unionOperator.js";
4
- import r from "zod";
5
- import { distanceUnitsSchema as m } from "../agents/tools/shared/types.js";
6
- const d = 750;
7
- function y(e) {
8
- return "point" in e && e.point !== void 0;
9
- }
10
- function h(e) {
11
- return "layerId" in e && e.layerId !== void 0;
12
- }
13
- const v = async (e, n) => {
14
- if (y(e)) {
15
- const { point: t } = e;
16
- return { geometry: new l({
17
- x: t.x,
18
- y: t.y,
19
- spatialReference: t.spatialReference ? { wkid: t.spatialReference.wkid } : n.spatialReference
20
- }) };
21
- }
22
- if (h(e)) {
23
- const t = n.map?.allLayers.find(
24
- (o) => o.id === e.layerId
25
- );
26
- if (!t)
27
- return { error: `Could not find geometry layer with ID: ${e.layerId}` };
28
- const a = t.title ?? t.id, s = e.where?.trim() || "1=1";
29
- try {
30
- const o = await t.queryFeatures({
31
- where: s,
32
- returnGeometry: !0,
33
- outSpatialReference: n.spatialReference,
34
- num: d + 1
35
- });
36
- if (!o.features.length)
37
- return {
38
- error: `No features found in geometry layer "${a}" with the specified where clause: ${s}`
39
- };
40
- if (o.features.length > d)
41
- return {
42
- error: `Geometry filter for layer "${a}" matched too many features (${o.features.length}+). Please narrow the geometry layer filter.`
43
- };
44
- const i = o.features.map((c) => c.geometry).filter((c) => !!c);
45
- if (!i.length)
46
- return { error: "No valid geometries found for the matched geometry layer features." };
47
- const u = i.length === 1 ? i[0] : f.executeMany(i);
48
- return u ? (u.spatialReference || (u.spatialReference = n.spatialReference), { geometry: u }) : { error: "Failed to combine geometries from geometry layer." };
49
- } catch (o) {
50
- return { error: `Failed to query geometry: ${String(o)}` };
51
- }
52
- }
53
- return { error: "Invalid geometry configuration provided" };
54
- }, p = r.object({ id: r.string() }), b = r.object({
55
- id: r.string(),
56
- kind: r.literal("point"),
57
- payload: r.object({
58
- x: r.number(),
59
- y: r.number(),
60
- spatialReference: r.object({ wkid: r.number() }).optional()
61
- })
62
- }), S = r.object({
63
- sharedResourceId: r.string().describe("ID of a point returned by listSharedResources for a previously geocoded address or place."),
64
- distance: r.number().optional().describe("Optional buffer distance around the point."),
65
- units: m.optional().describe("The units for the distance buffer.")
66
- }), g = (e, n) => {
67
- if (!e || !("sharedResourceId" in e))
68
- return e;
69
- if (!n)
70
- throw new Error("Shared resources are unavailable in the tool runtime state.");
71
- const t = n.find((s) => {
72
- const o = p.safeParse(s);
73
- return o.success && o.data.id === e.sharedResourceId;
74
- });
75
- if (!t)
76
- throw new Error(`Shared resource not found: ${e.sharedResourceId}`);
77
- const a = b.safeParse(t);
78
- if (!a.success)
79
- throw new Error(`Shared resource ${e.sharedResourceId} does not contain a valid point.`);
80
- return {
81
- point: a.data.payload,
82
- distance: e.distance,
83
- units: e.units
84
- };
85
- };
86
- export {
87
- y as a,
88
- v as g,
89
- h as i,
90
- g as r,
91
- S as s
92
- };