@arcgis/ai-components 5.2.0-next.11 → 5.2.0-next.110

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 (371) hide show
  1. package/LICENSE.md +4 -2
  2. package/README.md +2 -2
  3. package/dist/agent-utils/BaseAgent.js +1 -1
  4. package/dist/agent-utils/FunctionAgent.js +1 -1
  5. package/dist/agent-utils/LLMAgent.d.ts +5 -2
  6. package/dist/agent-utils/LLMAgent.js +7 -4
  7. package/dist/agent-utils/WorkflowAgent.js +15 -16
  8. package/dist/agent-utils/index.d.ts +78 -0
  9. package/dist/agent-utils/index.js +117 -98
  10. package/dist/agent-utils/middlewares/humanInTheLoop.js +1 -1
  11. package/dist/agent-utils/middlewares/middleware.js +1 -1
  12. package/dist/agent-utils/middlewares/trace.d.ts +2 -0
  13. package/dist/agent-utils/middlewares/trace.js +1 -1
  14. package/dist/agent-utils/middlewares/types.js +1 -1
  15. package/dist/agent-utils/tools/FunctionTool.js +1 -1
  16. package/dist/agent-utils/types.d.ts +13 -13
  17. package/dist/agent-utils/workflows/ConditionalWorkflow.js +1 -1
  18. package/dist/agent-utils/workflows/LoopWorkflow.js +1 -1
  19. package/dist/agent-utils/workflows/ParallelWorkflow.js +1 -1
  20. package/dist/agent-utils/workflows/RouterWorkflow.js +1 -1
  21. package/dist/agent-utils/workflows/SequentialWorkflow.js +1 -1
  22. package/dist/agent-utils/workflows/SwitchWorkflow.js +1 -1
  23. package/dist/agentic-workflow/AgenticWorkflowRuntime.d.ts +24 -0
  24. package/dist/agentic-workflow/Edge.d.ts +16 -0
  25. package/dist/agentic-workflow/WebAgent.d.ts +39 -0
  26. package/dist/agentic-workflow/jsonTypes.d.ts +189 -0
  27. package/dist/agentic-workflow/nodes/AgentNode.d.ts +28 -0
  28. package/dist/agentic-workflow/nodes/BaseNode.d.ts +35 -0
  29. package/dist/agentic-workflow/nodes/EndMessageNode.d.ts +25 -0
  30. package/dist/agentic-workflow/nodes/StartNode.d.ts +21 -0
  31. package/dist/agentic-workflow/nodes/tools/ArcgisTool.d.ts +21 -0
  32. package/dist/agentic-workflow/types.d.ts +29 -0
  33. package/dist/agents/runtime/skill/createSkillAgent.d.ts +31 -0
  34. package/dist/agents/runtime/skill/createSkillAgent.js +260 -0
  35. package/dist/agents/runtime/skill/loadAgentSkills.d.ts +16 -0
  36. package/dist/agents/runtime/skill/types.d.ts +28 -0
  37. package/dist/agents/runtime/skill/types.js +2 -0
  38. package/dist/agents/tools/filter/clearFilters/adapter.d.ts +8 -0
  39. package/dist/agents/tools/filter/clearFilters/adapter.js +22 -0
  40. package/dist/agents/tools/filter/resetMap/adapter.d.ts +8 -0
  41. package/dist/agents/tools/filter/resetMap/adapter.js +22 -0
  42. package/dist/agents/tools/filter/setFeatureEffect/adapter.d.ts +8 -0
  43. package/dist/agents/tools/filter/setFeatureEffect/adapter.js +122 -0
  44. package/dist/agents/tools/help/listFields/adapter.d.ts +11 -0
  45. package/dist/agents/tools/help/listFields/adapter.js +30 -0
  46. package/dist/agents/tools/navigation/goToAddress/adapter.d.ts +10 -0
  47. package/dist/agents/tools/navigation/goToAddress/adapter.js +60 -0
  48. package/dist/agents/tools/navigation/goToBookmark/adapter.d.ts +8 -0
  49. package/dist/agents/tools/navigation/goToBookmark/adapter.js +30 -0
  50. package/dist/agents/tools/navigation/goToFeatures/adapter.d.ts +8 -0
  51. package/dist/agents/tools/navigation/goToFeatures/adapter.js +50 -0
  52. package/dist/agents/tools/navigation/goToFullExtent/adapter.d.ts +8 -0
  53. package/dist/agents/tools/navigation/goToFullExtent/adapter.js +27 -0
  54. package/dist/agents/tools/navigation/goToHomeExtent/adapter.d.ts +8 -0
  55. package/dist/agents/tools/navigation/goToHomeExtent/adapter.js +24 -0
  56. package/dist/agents/tools/navigation/goToLayer/adapter.d.ts +8 -0
  57. package/dist/agents/tools/navigation/goToLayer/adapter.js +26 -0
  58. package/dist/agents/tools/navigation/goToScale/adapter.d.ts +8 -0
  59. package/dist/agents/tools/navigation/goToScale/adapter.js +21 -0
  60. package/dist/agents/tools/navigation/goToViewpoint/adapter.d.ts +8 -0
  61. package/dist/agents/tools/navigation/goToViewpoint/adapter.js +42 -0
  62. package/dist/agents/tools/navigation/goToZoom/adapter.d.ts +8 -0
  63. package/dist/agents/tools/navigation/goToZoom/adapter.js +21 -0
  64. package/dist/agents/tools/query/getAttribute/adapter.d.ts +8 -0
  65. package/dist/agents/tools/query/getAttribute/adapter.js +40 -0
  66. package/dist/agents/tools/query/getStatistics/adapter.d.ts +8 -0
  67. package/dist/agents/tools/query/getStatistics/adapter.js +158 -0
  68. package/dist/agents/tools/query/getTopFeatures/adapter.d.ts +8 -0
  69. package/dist/agents/tools/query/getTopFeatures/adapter.js +145 -0
  70. package/dist/agents/tools/query/queryFeatures/adapter.d.ts +8 -0
  71. package/dist/agents/tools/query/queryFeatures/adapter.js +131 -0
  72. package/dist/agents/tools/search/findRelevantFields/adapter.d.ts +8 -0
  73. package/dist/agents/tools/search/findRelevantFields/adapter.js +57 -0
  74. package/dist/agents/tools/search/findRelevantLayers/adapter.d.ts +8 -0
  75. package/dist/agents/tools/search/findRelevantLayers/adapter.js +38 -0
  76. package/dist/agents/tools/shared/resolveToolArtifact.d.ts +22 -0
  77. package/dist/agents/tools/shared/resolveToolArtifact.js +20 -0
  78. package/dist/agents/tools/shared/types.d.ts +22 -0
  79. package/dist/agents/tools/shared/types.js +6 -0
  80. package/dist/cdn/24EIZVUM.js +2 -0
  81. package/dist/cdn/25MBI4PD.js +2 -0
  82. package/dist/cdn/275FFTBE.js +2 -0
  83. package/dist/cdn/27CK3JHY.js +2 -0
  84. package/dist/cdn/2F4TPWZQ.js +2 -0
  85. package/dist/cdn/2LVYAXHG.js +44 -0
  86. package/dist/cdn/2UJPYWWZ.js +3 -0
  87. package/dist/cdn/2WXXSZP5.js +2 -0
  88. package/dist/cdn/{Q7TL5Q5N.js → 3KNLFIM3.js} +2 -2
  89. package/dist/cdn/3PPXAIRE.js +14 -0
  90. package/dist/cdn/45BDE3MG.js +2 -0
  91. package/dist/cdn/477I66FH.js +56 -0
  92. package/dist/cdn/4CFCV47G.js +2 -0
  93. package/dist/cdn/4IWDBEMN.js +34 -0
  94. package/dist/cdn/4OI4QEV7.js +6 -0
  95. package/dist/cdn/{DXVU45KM.js → 4VBOTWC3.js} +2 -2
  96. package/dist/cdn/4YOG5F3W.js +2 -0
  97. package/dist/cdn/53KIFJFA.js +4 -0
  98. package/dist/cdn/5X23DDDZ.js +2 -0
  99. package/dist/cdn/65LCK3GG.js +3 -0
  100. package/dist/cdn/6KWGSXIN.js +2 -0
  101. package/dist/cdn/7DOYUO7L.js +71 -0
  102. package/dist/cdn/{WAIFKDR3.js → 7UBTNDV6.js} +2 -2
  103. package/dist/cdn/7Y43R7QJ.js +2 -0
  104. package/dist/cdn/A6LBMS7A.js +2 -0
  105. package/dist/cdn/AP3KPOHN.js +2 -0
  106. package/dist/cdn/AUCKEB52.js +2 -0
  107. package/dist/cdn/B3HXSEBN.js +2 -0
  108. package/dist/cdn/BBEGLIZC.js +2 -0
  109. package/dist/cdn/BJMGT6GV.js +19 -0
  110. package/dist/cdn/BTOBEN7Q.js +2 -0
  111. package/dist/cdn/BTTCBEPW.js +2 -0
  112. package/dist/cdn/BVUCNXC5.js +2 -0
  113. package/dist/cdn/CAOMMQSY.js +66 -0
  114. package/dist/cdn/CKUUYQLO.js +2 -0
  115. package/dist/cdn/{ZEYIBYSF.js → CSE6BHOJ.js} +2 -2
  116. package/dist/cdn/CX2HJ67C.js +2 -0
  117. package/dist/cdn/EGRRZTF6.js +2 -0
  118. package/dist/cdn/EK3PM4L5.js +2 -0
  119. package/dist/cdn/EXMEB4X2.js +2 -0
  120. package/dist/cdn/EYGZJKVD.js +2 -0
  121. package/dist/cdn/{24QNMEFG.js → FDRAKF5D.js} +2 -2
  122. package/dist/cdn/FHBRXZLV.js +2 -0
  123. package/dist/cdn/{5CV7R5IS.js → FK2CVSXW.js} +6 -6
  124. package/dist/cdn/FLUI6GCU.js +2 -0
  125. package/dist/cdn/{ZTBA5PM7.js → FPH52WOH.js} +2 -2
  126. package/dist/cdn/FRYS2PZJ.js +2 -0
  127. package/dist/cdn/FSLQCZRN.js +2 -0
  128. package/dist/cdn/{LQ6R5YRN.js → FTTLFIBV.js} +2 -2
  129. package/dist/cdn/FV6FHLYW.js +2 -0
  130. package/dist/cdn/G24MNC7D.js +6 -0
  131. package/dist/cdn/{F6QHMKF5.js → GW3IVAAZ.js} +2 -2
  132. package/dist/cdn/HI3XKFHD.js +2 -0
  133. package/dist/cdn/HKIA5PWU.js +2 -0
  134. package/dist/cdn/{6ZW7Z36F.js → HMMYCSOK.js} +4 -4
  135. package/dist/cdn/HNTSDY3J.js +2 -0
  136. package/dist/cdn/HV7MVIQV.js +2 -0
  137. package/dist/cdn/I3SUE2TR.js +2 -0
  138. package/dist/cdn/I72ST4JR.js +134 -0
  139. package/dist/cdn/{T537PKP4.js → IHUWQOMK.js} +2 -2
  140. package/dist/cdn/JMXXRRKQ.js +22 -0
  141. package/dist/cdn/JUNMTIB3.js +2 -0
  142. package/dist/cdn/{6YMR4QSD.js → JYNHWJUZ.js} +2 -2
  143. package/dist/cdn/KAX4A7SF.js +2 -0
  144. package/dist/cdn/KBSXHSBX.js +2 -0
  145. package/dist/cdn/KKCLHXHG.js +2 -0
  146. package/dist/cdn/L2HLFWCV.js +72 -0
  147. package/dist/cdn/{7RCQFLPP.js → L3BTURBA.js} +2 -2
  148. package/dist/cdn/LBTGOMCT.js +2 -0
  149. package/dist/cdn/LIRT72WY.js +2 -0
  150. package/dist/cdn/LL324IL6.js +2 -0
  151. package/dist/cdn/LLY5A2E2.js +2 -0
  152. package/dist/cdn/LXIKAXUT.js +2 -0
  153. package/dist/cdn/M2U456J5.js +181 -0
  154. package/dist/cdn/M3KKORBG.js +2 -0
  155. package/dist/cdn/M5B6X46F.js +2 -0
  156. package/dist/cdn/{X2ZDYHCG.js → MZUDIQQH.js} +11 -6
  157. package/dist/cdn/NBDOPGSN.js +2 -0
  158. package/dist/cdn/NGR5NVZE.js +2 -0
  159. package/dist/cdn/{5ZZGKP7N.js → NNPA3NLK.js} +2 -2
  160. package/dist/cdn/NV7CL4S3.js +2 -0
  161. package/dist/cdn/{5W7S2RS4.js → OALQBAZR.js} +2 -2
  162. package/dist/cdn/OF3TAARW.js +2 -0
  163. package/dist/cdn/{AZGGTNA3.js → OXC2WP7W.js} +2 -2
  164. package/dist/cdn/PJPP6LOS.js +3 -0
  165. package/dist/cdn/PUZ6RAFQ.js +2 -0
  166. package/dist/cdn/QAX6UF4L.js +99 -0
  167. package/dist/cdn/{NE7E52YR.js → QTEPFTAU.js} +10 -4
  168. package/dist/cdn/ROS22KOA.js +2 -0
  169. package/dist/cdn/RSM7MEVT.js +9 -0
  170. package/dist/cdn/SBNNJ5WA.js +2 -0
  171. package/dist/cdn/SDX46GZY.js +2 -0
  172. package/dist/cdn/SI22EJLC.js +2 -0
  173. package/dist/cdn/SJMAKF4P.js +2 -0
  174. package/dist/cdn/SNG3WODY.js +2 -0
  175. package/dist/cdn/STOGCXJH.js +2 -0
  176. package/dist/cdn/SUC2MIGE.js +2 -0
  177. package/dist/cdn/SXYKNDOF.js +2 -0
  178. package/dist/cdn/SZ2L5556.js +2 -0
  179. package/dist/cdn/T6W6F4TF.js +2 -0
  180. package/dist/cdn/TB2GJALS.js +2 -0
  181. package/dist/cdn/TFAJNKBC.js +2 -0
  182. package/dist/cdn/TLPZELG3.js +2 -0
  183. package/dist/cdn/TXZQZR3I.js +2 -0
  184. package/dist/cdn/UAZPINUQ.js +2 -0
  185. package/dist/cdn/UGIHS7OA.js +2 -0
  186. package/dist/cdn/{FX7UOGHP.js → V266DJ5V.js} +2 -2
  187. package/dist/cdn/V4PJMCJZ.js +2 -0
  188. package/dist/cdn/{P7DG5T3Z.js → V52GSTOC.js} +2 -2
  189. package/dist/cdn/VGLBH473.js +2 -0
  190. package/dist/cdn/VK6CCPTG.js +2 -0
  191. package/dist/cdn/{ZS2TZ6BF.js → VLPELJUS.js} +2 -2
  192. package/dist/cdn/VT5EWFH7.js +2 -0
  193. package/dist/cdn/{7CYGX4F4.js → VXLKTQ36.js} +2 -2
  194. package/dist/cdn/W54XYT2A.js +2 -0
  195. package/dist/cdn/X42ACC66.js +5 -0
  196. package/dist/cdn/XNUWVZN7.js +2 -0
  197. package/dist/cdn/XOTPSCNF.js +2 -0
  198. package/dist/cdn/XRVGYRXL.js +14 -0
  199. package/dist/cdn/XV7RMYLR.js +2 -0
  200. package/dist/cdn/XVJFPZTW.js +2 -0
  201. package/dist/cdn/XZF7Y6B2.js +2 -0
  202. package/dist/cdn/{UPEEHMSY.js → Y4TYL2AL.js} +2 -2
  203. package/dist/cdn/Y4ZOB6UH.js +2 -0
  204. package/dist/cdn/Y6CV2NZR.js +2 -0
  205. package/dist/cdn/YIXASZUW.js +2 -0
  206. package/dist/cdn/YOW3YKWR.js +11 -0
  207. package/dist/cdn/{23EQTPO3.js → ZA7ZU2F7.js} +2 -2
  208. package/dist/cdn/ZJWR4W2S.js +208 -0
  209. package/dist/cdn/ZWIKFBOU.js +2 -0
  210. package/dist/cdn/ZY3JQCZQ.js +179 -0
  211. package/dist/cdn/agent-utils/index.js +2 -2
  212. package/dist/cdn/agent-utils/middlewares/humanInTheLoop.js +2 -2
  213. package/dist/cdn/agent-utils/middlewares/middleware.js +2 -2
  214. package/dist/cdn/agent-utils/middlewares/trace.js +2 -2
  215. package/dist/cdn/assets/assistant/t9n/messages.en.json +1 -1
  216. package/dist/cdn/assets/assistant-interrupt/t9n/messages.en.json +1 -1
  217. package/dist/cdn/assets/assistant-interrupt-preview/t9n/messages.en.json +1 -0
  218. package/dist/cdn/assets/assistant-message/t9n/messages.en.json +1 -0
  219. package/dist/cdn/assets/assistant-message-loading/t9n/messages.en.json +1 -0
  220. package/dist/cdn/index.js +2 -2
  221. package/dist/chunks/BaseWorkflow.js +1 -1
  222. package/dist/chunks/SKILL.js +5 -0
  223. package/dist/chunks/SKILL2.js +5 -0
  224. package/dist/chunks/SKILL3.js +22 -0
  225. package/dist/chunks/SKILL4.js +5 -0
  226. package/dist/chunks/adapter.js +1127 -2011
  227. package/dist/chunks/aiFactory.js +94 -0
  228. package/dist/chunks/arcgisKnowledgeGraph.js +97 -77
  229. package/dist/chunks/arcgisToolRegistry.js +88 -0
  230. package/dist/chunks/arcgis_knowledge_current_lc_context.js +20 -3
  231. package/dist/chunks/arcgis_knowledge_current_map_context.js +32 -3
  232. package/dist/chunks/arcgis_knowledge_cypher_query_prompt.js +102 -0
  233. package/dist/chunks/arcgis_knowledge_lucene_generation_prompt.js +1 -1
  234. package/dist/chunks/arcgis_knowledge_summarize_result_prompt.js +117 -28
  235. package/dist/chunks/arcgis_knowledge_tool_prompt.js +1 -1
  236. package/dist/chunks/baseAgentState.js +58 -0
  237. package/dist/chunks/converterUtils.js +67 -42
  238. package/dist/chunks/dataExplorationAgent.js +19 -0
  239. package/dist/chunks/data_explore_filter_prompt.js +1 -1
  240. package/dist/chunks/data_explore_query_prompt.js +10 -5
  241. package/dist/chunks/embeddings.worker.js +1 -1
  242. package/dist/chunks/fetchAgentContext.js +13 -0
  243. package/dist/chunks/fetchService.js +10 -0
  244. package/dist/chunks/fieldStatistics.js +79 -0
  245. package/dist/chunks/field_descriptions_prompt.js +1 -1
  246. package/dist/chunks/formatFeatureAttributes.js +132 -0
  247. package/dist/chunks/generateLayerDescriptions.js +190 -311
  248. package/dist/chunks/graph.js +1 -1
  249. package/dist/chunks/helpAgent.js +34 -0
  250. package/dist/chunks/help_prompt.js +35 -18
  251. package/dist/chunks/index.js +1 -1
  252. package/dist/chunks/intent_prompt.js +3 -3
  253. package/dist/chunks/layerStylingGraph.js +102 -84
  254. package/dist/chunks/layer_descriptions_prompt.js +1 -1
  255. package/dist/chunks/layer_styling_prompt.js +1 -1
  256. package/dist/chunks/mergeWhereClauses.js +15 -0
  257. package/dist/chunks/navigationAgent.js +27 -0
  258. package/dist/chunks/navigation_intent_prompt.js +9 -3
  259. package/dist/chunks/navigation_tool_prompt.js +1 -1
  260. package/dist/chunks/orchestrator.js +446 -235
  261. package/dist/chunks/requireAgentServices.js +11 -0
  262. package/dist/chunks/resolvePointGeometryFilter.js +92 -0
  263. package/dist/chunks/runtime.js +1 -1
  264. package/dist/chunks/slottableRequestUtils.js +1 -1
  265. package/dist/chunks/state.js +22 -28
  266. package/dist/chunks/summarize_query_response_prompt.js +1 -1
  267. package/dist/chunks/useT9n.js +1 -1
  268. package/dist/chunks/utils.js +1 -1
  269. package/dist/chunks/utils2.js +12 -12
  270. package/dist/chunks/utils3.js +1 -1
  271. package/dist/components/arcgis-assistant/customElement.d.ts +102 -1
  272. package/dist/components/arcgis-assistant/customElement.js +332 -184
  273. package/dist/components/arcgis-assistant-agent/customElement.d.ts +13 -1
  274. package/dist/components/arcgis-assistant-agent/customElement.js +533 -11
  275. package/dist/components/arcgis-assistant-chat/customElement.js +23 -18
  276. package/dist/components/arcgis-assistant-chat-entry/customElement.js +1 -1
  277. package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +35 -9
  278. package/dist/components/arcgis-assistant-help-agent/customElement.js +32 -9
  279. package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +4 -0
  280. package/dist/components/arcgis-assistant-interrupt/customElement.js +12 -13
  281. package/dist/components/arcgis-assistant-interrupt-preview/customElement.js +13 -9
  282. package/dist/components/arcgis-assistant-knowledge-agent/customElement.d.ts +1 -1
  283. package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +41 -17
  284. package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +31 -8
  285. package/dist/components/arcgis-assistant-message/customElement.d.ts +3 -0
  286. package/dist/components/arcgis-assistant-message/customElement.js +10 -9
  287. package/dist/components/arcgis-assistant-message-block/customElement.js +2 -2
  288. package/dist/components/arcgis-assistant-message-feedback/customElement.js +1 -1
  289. package/dist/components/arcgis-assistant-message-footer/customElement.js +1 -1
  290. package/dist/components/arcgis-assistant-message-loading/customElement.d.ts +3 -0
  291. package/dist/components/arcgis-assistant-message-loading/customElement.js +12 -11
  292. package/dist/components/arcgis-assistant-message-log/customElement.js +1 -1
  293. package/dist/components/arcgis-assistant-message-read-aloud/customElement.js +1 -1
  294. package/dist/components/arcgis-assistant-message-text/customElement.d.ts +1 -0
  295. package/dist/components/arcgis-assistant-message-text/customElement.js +13 -13
  296. package/dist/components/arcgis-assistant-navigation-agent/customElement.js +34 -10
  297. package/dist/components/arcgis-assistant-speech-input/customElement.js +35 -53
  298. package/dist/components/arcgis-assistant-suggested-prompts/customElement.js +1 -1
  299. package/dist/components/arcgis-assistant-user-message/customElement.d.ts +2 -0
  300. package/dist/components/arcgis-assistant-user-message/customElement.js +16 -11
  301. package/dist/docs/api.json +1 -1
  302. package/dist/docs/docs.json +1 -1
  303. package/dist/docs/vscode.html-custom-data.json +1 -1
  304. package/dist/docs/web-types.json +1 -1
  305. package/dist/index.js +1 -1
  306. package/dist/loader.js +7 -7
  307. package/dist/oauth-callback.html +1 -1
  308. package/dist/orchestrator/models/types.d.ts +1 -0
  309. package/dist/orchestrator/orchestrator/orchestratorEvents.d.ts +78 -0
  310. package/dist/orchestrator/providers/arcgis/aiFactory.d.ts +15 -0
  311. package/dist/orchestrator/types/types.d.ts +17 -0
  312. package/dist/types/lumina.d.ts +5 -4
  313. package/dist/types/preact.d.ts +5 -4
  314. package/dist/types/react.d.ts +5 -4
  315. package/dist/types/stencil.d.ts +7 -6
  316. package/dist/utils/index.d.ts +75 -39
  317. package/dist/utils/index.js +708 -84
  318. package/package.json +35 -12
  319. package/dist/cdn/34SG44C3.js +0 -72
  320. package/dist/cdn/3JGWGKT6.js +0 -2
  321. package/dist/cdn/3NBDVZ2I.js +0 -2
  322. package/dist/cdn/3VOQD2MR.js +0 -2
  323. package/dist/cdn/434TAA3J.js +0 -2
  324. package/dist/cdn/53NTYC4I.js +0 -2
  325. package/dist/cdn/5QAHYX7Y.js +0 -5
  326. package/dist/cdn/AXDZBBNL.js +0 -45
  327. package/dist/cdn/B7WJFBOZ.js +0 -2
  328. package/dist/cdn/BX7FSMUU.js +0 -56
  329. package/dist/cdn/CHPQM77M.js +0 -181
  330. package/dist/cdn/DHKUXLU3.js +0 -179
  331. package/dist/cdn/DQSEBKOX.js +0 -2
  332. package/dist/cdn/DZ2QWNUA.js +0 -3
  333. package/dist/cdn/EBISDZ5H.js +0 -2
  334. package/dist/cdn/ERL2CB2Y.js +0 -14
  335. package/dist/cdn/F2AHA4GB.js +0 -54
  336. package/dist/cdn/FUIGPHBH.js +0 -2
  337. package/dist/cdn/H2CHHGGH.js +0 -2
  338. package/dist/cdn/HWKDNS4K.js +0 -4
  339. package/dist/cdn/IMQ4TVHF.js +0 -16
  340. package/dist/cdn/IOD3GDA7.js +0 -2
  341. package/dist/cdn/IR7PTESF.js +0 -2
  342. package/dist/cdn/IRZDTYO2.js +0 -2
  343. package/dist/cdn/JIWK6QK6.js +0 -2
  344. package/dist/cdn/JLKGS6Y5.js +0 -36
  345. package/dist/cdn/K3JCH4XW.js +0 -2
  346. package/dist/cdn/KHXUWZHB.js +0 -2
  347. package/dist/cdn/KMQ3SP4I.js +0 -5
  348. package/dist/cdn/LIFK3QSD.js +0 -2
  349. package/dist/cdn/NXKKG5TK.js +0 -2
  350. package/dist/cdn/O3EN27N5.js +0 -2
  351. package/dist/cdn/O3RFFPU3.js +0 -6
  352. package/dist/cdn/PBO6FZN6.js +0 -2
  353. package/dist/cdn/Q3ZW4FYA.js +0 -3
  354. package/dist/cdn/Q6LRANX6.js +0 -2
  355. package/dist/cdn/QCSN44H4.js +0 -2
  356. package/dist/cdn/R56X6ZKR.js +0 -161
  357. package/dist/cdn/RUURNLTP.js +0 -2
  358. package/dist/cdn/T43LEBBE.js +0 -47
  359. package/dist/cdn/TR4GFL7X.js +0 -2
  360. package/dist/cdn/WNS5ZUF5.js +0 -2
  361. package/dist/cdn/X4XY5HIE.js +0 -2
  362. package/dist/cdn/XOH56EQ2.js +0 -2
  363. package/dist/cdn/XON27U6U.js +0 -2
  364. package/dist/cdn/YIMNOUTF.js +0 -2
  365. package/dist/cdn/YLN2BZ5J.js +0 -2
  366. package/dist/cdn/YUKR4AZW.js +0 -2
  367. package/dist/cdn/Z2G7MP5L.js +0 -22
  368. package/dist/chunks/dataExplorationGraph.js +0 -310
  369. package/dist/chunks/helpGraph.js +0 -126
  370. package/dist/chunks/navigationGraph.js +0 -270
  371. package/dist/chunks/toolCallResponse.js +0 -31
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{wc as u}from"./CHPQM77M.js";import"./ZEYIBYSF.js";import"./YIMNOUTF.js";export default $arcgis.t(([d,{property:a,subclass:h}])=>{var l=Object.defineProperty,m=Object.getOwnPropertyDescriptor,s=(e,t,n,r)=>{for(var o=r>1?void 0:r?m(t,n):t,c=e.length-1,p;c>=0;c--)(p=e[c])&&(o=(r?p(t,n,o):p(o))||o);return r&&o&&l(t,n,o),o},i=class extends d{constructor(e){super(e),this.resultMode="continue",this.middlewares=[]}getTool(){return u(this._executeWithMiddlewares.bind(this),{name:this.name,description:this.description,returnDirect:this.resultMode==="terminal",schema:this.inputSchema})}async _executeWithMiddlewares(e,t){let n=async r=>{let o=await this.execute(r.input,r.config);return this._validateOutput(o)};return await this.middlewares.reduceRight((r,o)=>async c=>await o.handler(c,r),n)({config:t,input:e,tool:this,toolCallId:f(t)})}_validateOutput(e){if(!this.outputSchema)return e;let t=this.outputSchema.safeParse(e);if(!t.success)throw new Error(`FunctionTool output schema validation failed: ${t.error.message}`);return t.data}};s([a()],i.prototype,"name",2);s([a()],i.prototype,"description",2);s([a()],i.prototype,"resultMode",2);s([a()],i.prototype,"inputSchema",2);s([a()],i.prototype,"outputSchema",2);s([a()],i.prototype,"middlewares",2);s([a()],i.prototype,"execute",2);i=s([h("FunctionTool")],i);function f(e){let t=e?.toolCall;return typeof t?.id=="string"?t.id:void 0}return i},"core/Accessor","core/accessorSupport/decorators")
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{Dc as u}from"./M2U456J5.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([d,{property:a,subclass:h}])=>{var l=Object.defineProperty,m=Object.getOwnPropertyDescriptor,s=(e,t,n,r)=>{for(var o=r>1?void 0:r?m(t,n):t,c=e.length-1,p;c>=0;c--)(p=e[c])&&(o=(r?p(t,n,o):p(o))||o);return r&&o&&l(t,n,o),o},i=class extends d{constructor(e){super(e),this.resultMode="continue",this.middlewares=[]}getTool(){return u(this._executeWithMiddlewares.bind(this),{name:this.name,description:this.description,returnDirect:this.resultMode==="terminal",schema:this.inputSchema})}async _executeWithMiddlewares(e,t){let n=async r=>{let o=await this.execute(r.input,r.config);return this._validateOutput(o)};return await this.middlewares.reduceRight((r,o)=>async c=>await o.handler(c,r),n)({config:t,input:e,tool:this,toolCallId:f(t)})}_validateOutput(e){if(!this.outputSchema)return e;let t=this.outputSchema.safeParse(e);if(!t.success)throw new Error(`FunctionTool output schema validation failed: ${t.error.message}`);return t.data}};s([a()],i.prototype,"name",2);s([a()],i.prototype,"description",2);s([a()],i.prototype,"resultMode",2);s([a()],i.prototype,"inputSchema",2);s([a()],i.prototype,"outputSchema",2);s([a()],i.prototype,"middlewares",2);s([a()],i.prototype,"execute",2);i=s([h("FunctionTool")],i);function f(e){let t=e?.toolCall;return typeof t?.id=="string"?t.id:void 0}return i},"core/Accessor","core/accessorSupport/decorators")
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import"./BVUCNXC5.js";var e="---\nname: navigation\ndescription: Navigates the map to addresses, bookmarks, layers, matching features, extents, scales, zoom levels, and viewpoints using live map context and semantic layer and field search.\nallowed-tools: findRelevantLayers findRelevantFields goToAddress goToBookmark goToFeatures goToFullExtent goToHomeExtent goToLayer goToScale goToViewpoint goToZoom\n---\n\n# Navigation\n\n- Complete exactly one map-changing navigation action for the assigned task. Semantic search calls do not count as navigation actions.\n- Use the runtime context as the authoritative source for the current zoom level and exact available bookmark names.\n- Prefer an available bookmark over a feature or address when it clearly matches the requested place. Prefer a matching map feature over geocoding when the request identifies a layer or feature. Otherwise use `goToAddress` for an address or place name.\n- Use `goToZoom`, `goToScale`, or `goToViewpoint` directly for explicit numeric requests. For a relative zoom request, calculate one level above or below the current zoom from the runtime context and keep it within the tool's supported range.\n- Use `goToHomeExtent` to reset the map and `goToFullExtent` for the full-world extent. These actions do not require semantic search.\n- Before `goToLayer`, call `findRelevantLayers` with a concise query describing the requested layer. Use only a returned `layerId`. If there is no clear match, do not invent an ID or navigate.\n- Before `goToFeatures`, call `findRelevantLayers`, then call `findRelevantFields` with the relevant returned layer IDs and a query describing the requested condition. Use only the exact layer IDs returned by `findRelevantLayers`. Use only the exact field names and categorical values returned by `findRelevantFields`.\n- Build `goToFeatures` filters with valid ArcGIS SQL-92. Use field names rather than aliases, use coded-value domain codes when supplied, quote string values, and use `1=1` when all features in the selected layer are requested.\n- Do not call `findRelevantFields` for layer-only navigation or direct address, bookmark, extent, scale, viewpoint, or zoom navigation.\n- If required map context or semantic search results are missing or ambiguous, explain what is missing instead of guessing.\n- Report the navigation tool result faithfully. Never claim the map moved when the tool failed.\n";export{e as default};
@@ -0,0 +1,5 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{a as o}from"./V4PJMCJZ.js";import{Dc as a}from"./M2U456J5.js";import{a as r}from"./5X23DDDZ.js";var f=(l,i)=>{let t=Array.from(l.values()).find(({layerItem:e})=>e.title?.toLowerCase().includes(i.toLowerCase()));if(!t){let e=Array.from(l.values()).map(y=>y.layerItem.title).join(", ");return`Could not find a layer matching "${i}". Available layers: ${e}`}let s=Array.from(t.fieldRegistry.values()),n=s.map(e=>`- **${e.alias||e.name}** (\`${e.name}\`, ${e.type})${e.description?`: ${e.description}`:""}`).join(`
3
+ `);return`**${t.layerItem.title}** has ${s.length} field(s):
4
+
5
+ ${n}`},m=({layerTitle:l},i)=>{let t=o(i,"layersAndFieldsRegistry");return f(t,l)},u=a(m,{name:"listLayerFields",description:"Lists all fields for a given layer by title. Use ONLY when the user explicitly asks to see fields, columns, or attributes of a specific named layer. Do NOT call this tool for general help questions, capability overviews, or layer listing.",schema:r.object({layerTitle:r.string().describe("The title or partial title of the layer to list fields for.")})});export{u as a};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{ta as c}from"./M2U456J5.js";function f(e,s,t){return{...e,status:s,summary:t}}function g(e){let s=Object.entries(e).filter(([t,n])=>t!=="agentExecutionContext"&&t!=="outputMessage"&&t!=="summary"&&t!=="status"&&n!==void 0);if(s.length!==0)try{return JSON.stringify(Object.fromEntries(s),null,2)}catch{return}}function m(e,s,t=[]){let n=s.safeParse(e);if(n.success){let u={...n.data},r=g(u),a=r??"LLMAgent produced structured output.",o=r??u.outputMessage,i={...u,...o?{outputMessage:o}:{},agentExecutionContext:{messages:[...t,new c(typeof o=="string"&&o.trim()?o:a)]}};return f(i,"success",a)}else throw new Error(`LLMAgent output schema validation failed: ${n.error.message}`)}function l(e,s){let t={outputMessage:e.outputMessage};if(s){let n=s.shape,u=e;for(let r of Object.keys(n??{}))r in e&&(t[r]=u[r])}return t}export{f as a,m as b,l as c};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{$a as Ea,A as j,Aa as ga,B as k,Ba as ha,C as l,Ca as ia,D as m,Da as ja,E as n,Ea as ka,F as o,G as p,Ga as la,H as q,Ha as ma,I as r,Ia as na,J as s,Ja as oa,K as t,Ka as pa,L as u,La as qa,M as v,Ma as ra,N as w,Na as sa,O as x,Oa as ta,P as y,Pa as ua,Q as z,Qa as va,R as A,Ra as wa,S as B,Sa as xa,T as C,Ta as ya,U as D,Ua as za,V as E,Va as Aa,W as F,X as G,Y as H,Ya as Ba,Z as I,Za as Ca,_a as Da,ab as Fa,ba as J,bb as Ga,ca as K,cb as Ha,da as L,db as Ia,ea as M,eb as Ja,fa as N,fb as Ka,ga as O,gb as La,ha as P,ia as Q,ja as R,ka as S,l as a,la as T,ma as U,na as V,oa as W,pa as X,qa as Y,r as b,ra as Z,s as c,sa as _,t as d,ta as $,u as e,ua as aa,v as f,va as ba,w as g,wa as ca,xa as da,y as h,ya as ea,z as i,za as fa}from"./ZJWR4W2S.js";import"./M2U456J5.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export{S as Annotation,O as AsyncBatchedStore,Q as BaseChannel,L as BaseCheckpointSaver,l as BaseLangGraphError,N as BaseStore,R as BinaryOperatorAggregate,e as COMMAND_SYMBOL,a as ChatModelStreamImpl,j as Command,f as CommandInstance,Ca as CompiledStateGraph,qa as DeltaChannel,ua as DeltaValue,c as END,C as EmptyChannelError,B as EmptyInputError,$ as EventLog,la as Graph,m as GraphBubbleUp,p as GraphDrained,r as GraphInterrupt,n as GraphRecursionError,ha as GraphRunStream,o as GraphValueError,d as INTERRUPT,P as InMemoryStore,D as InvalidUpdateError,M as MemorySaver,Da as MessageGraph,Ia as MessagesAnnotation,Aa as MessagesDeltaValue,za as MessagesValue,Ja as MessagesZodMeta,Ka as MessagesZodState,E as MultipleSubgraphsError,t as NodeError,s as NodeInterrupt,z as NodeTimeoutError,h as Overwrite,v as ParentCommand,wa as REMOVE_ALL_MESSAGES,sa as ReducedValue,G as RemoteException,X as RunControl,b as START,Y as STREAM_EVENTS_V3_MODES,g as Send,Ba as StateGraph,H as StateGraphInputError,va as StateSchema,$ as StreamChannel,ia as SubgraphRunStream,F as UnreachableNodeError,ta as UntrackedValue,ra as UntrackedValueChannel,xa as addMessages,_ as convertToProtocolEvent,K as copyCheckpoint,ja as createGraphRunStream,ba as createLifecycleTransformer,ca as createMessagesTransformer,ea as createSubgraphDiscoveryTransformer,fa as createValuesTransformer,J as emptyCheckpoint,Ga as entrypoint,aa as filterLifecycleEntries,da as filterSubgraphHandles,V as getConfig,W as getCurrentTaskInput,oa as getJsonSchemaFromSchema,Ha as getPreviousState,pa as getSchemaDefaultGetter,T as getStore,I as getSubgraphsSeenSet,U as getWriter,ka as interrupt,Z as isCheckpointEnvelope,k as isCommand,x as isGraphBubbleUp,q as isGraphDrained,y as isGraphInterrupt,i as isInterrupted,ga as isNativeTransformer,u as isNodeError,A as isNodeTimeoutError,w as isParentCommand,na as isSerializableSchema,ma as isStandardSchema,ya as messagesDeltaReducer,xa as messagesStateReducer,Ea as pushMessage,Fa as task,La as writer};
@@ -0,0 +1,14 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{a as A}from"./2F4TPWZQ.js";import b from"./ZY3JQCZQ.js";import{a as y}from"./V4PJMCJZ.js";import a from"./2LVYAXHG.js";import{a as i}from"./V52GSTOC.js";import{J as f,Ya as S,r as u,s as p}from"./ZJWR4W2S.js";export default $arcgis.t(([,,,,,,{p:x},{b:w,d:E,j:I,k:L,l:v,m:F,n:$,o:C,p:N,q:R,r:T,s:_,t:b,u:h}])=>{var M=async(t,a)=>{let e=t.tool_calls??[];if(e.length===0){await i({text:`LLM did not request any tool calls: ${String(t?.content)}`},a);return}await Promise.all(e.map(async r=>await i({text:`LLM invoked ${r.name} tool with arguments: ${JSON.stringify(r.args,null,2)}`},a)))},k=.7,P=10,z=async(t,a)=>{try{await i({text:"Similarity search to find fields"},a);let e=y(a,"fieldSearch"),r=y(a,"layersAndFieldsRegistry"),n=y(a,"embeddingCache"),o=await e.searchFields({text:t.agentExecutionContext.assignedTask,layerIds:t.vectorSearchLayerIds,minScore:k,topResults:P,embeddingCache:n}),m=o.map(({layerId:c,results:d})=>{let g=d.map(s=>` - ${s.name} (${s.score.toFixed(2)})`).join(`
3
+ `);return`${r.get(c)?.layerItem.name??c}:
4
+ ${g}`}).join(`
5
+ `),l;return o.length>0?l=`Vector search completed. Matching layers and fields with scores:
6
+ ${m}`:l=`No vector search results found for score over ${k}.`,await i({text:l},a),{...t,vectorSearchFieldResults:o}}catch(e){throw await i({text:`Error during vector search: ${e instanceof Error?e.message:String(e)}`},a),new Error(`Vector search failed: ${e instanceof Error?e.message:String(e)}`)}},D=.7,G=async(t,a)=>{try{await i({text:`Similarity search to find layers: ${t.agentExecutionContext.assignedTask}`},a);let e=y(a,"layerSearch"),r=y(a,"layersAndFieldsRegistry"),n=await e.searchLayers({text:t.agentExecutionContext.assignedTask,minScore:D}),o=n.map(c=>c.id),m=n.map(({id:c,score:d})=>`${r.get(c)?.layerItem.name??c} (${d.toFixed(2)})`).join(`
7
+ `),l;return o.length>0?l=`Vector search completed. Matching layers with scores:
8
+ ${m}`:l="Vector search completed. No matching layers found.",await i({text:l},a),{...t,vectorSearchLayerIds:o}}catch(e){throw await i({text:`Error during vector search: ${e instanceof Error?e.message:String(e)}`},a),new Error(`Vector search failed: ${e instanceof Error?e.message:String(e)}`)}},j=[I,L,v,F,$,C,N,R,T,_,b],V=(t,a=3)=>{let e=t.map((n,o)=>n.type==="human"?o:-1).filter(n=>n!==-1);if(e.length===0)return[];let r=e.length>a?e[e.length-a]:e[0];return t.slice(r)},H=async(t,a)=>{await i({text:"Requesting LLM for layer query results"},a);let e=await E("navigation_intent_prompt");if(!a?.configurable)throw new Error("config.configurable is required for layer query tools");let r={layerFieldInfo:t.layerFieldInfo},n=await x({promptText:e,modelTier:"advanced",config:a,messages:V(t.agentExecutionContext.messages),inputVariables:r,tools:j});return await M(n,a),{...t,agentExecutionContext:{...t.agentExecutionContext,messages:[...t.agentExecutionContext.messages,n]}}};async function B(t,a){let e=await new w(j,{handleToolErrors:!1}).invoke({messages:V(t.agentExecutionContext.messages)},a),r=e.messages.map(o=>o.text).join(`
9
+ `);await i({text:`Finished executing layer filter tool: ${r}`},a);let n=e.messages.map(o=>o.text).join(`
10
+ `);return{...t,outputMessage:n}}var J=async(t,a)=>(await i({text:"Exiting Layer Styling agent"},a),t),O=async(t,a)=>{try{await i({text:"Populating layer and field info"},a);let e=[];for(let r of t.vectorSearchFieldResults){let n=function(g){let s=l.get(g)?.layerItem;return s?[s.name&&`Name: ${s.name}`,s.title&&`Title: ${s.title}`,s.description&&`Description: ${s.description}`].filter(Boolean).join(" | "):g},{layerId:o,results:m}=r,l=y(a,"layersAndFieldsRegistry"),c=l.get(o)?.fieldRegistry;if(!c)continue;let d=e.find(g=>g.layerId===o);d||(d={layerId:o,layerSummary:n(o),fieldInfos:[]},e.push(d));for(let g of m){let s=c.get(g.name);s&&d.fieldInfos.push(s)}}return await i({text:"Populated layerFieldInfo"},a),{...t,layerFieldInfo:e}}catch(e){throw await i({text:"Error populating layerFieldInfo"},a),new Error(`Error populating layerFieldInfo: ${e instanceof Error?e.message:String(e)}`)}},U=(t,a)=>{let e=t.vectorSearchLayerIds??[];if(e.length<=1)return{...t,selectedLayerId:t.vectorSearchLayerIds[0]};let{hitlResponse:r}=a.configurable;if(r?.agentId!==q.id||r.id!=="reviewLayerSelection"){let o={agentId:q.id,id:"reviewLayerSelection",kind:"singleSelection",message:"Choose a layer to apply the styles.",metadata:[...e]};throw new f(o)}let n=null;return Array.isArray(r.payload)&&r.payload.length>0&&(n=r.payload[0]),{...t,selectedLayerId:n??t.vectorSearchLayerIds[0]}},K=(t,a)=>A(["layerSearch","fieldSearch","layersAndFieldsRegistry"],"Layer Styling Agent")(t,a),Q=()=>new S(h).addNode("requireLayerStylingServices",K).addNode("vectorSearchLayers",G).addNode("layerSelectionHITL",U).addNode("vectorSearchFields",z).addNode("populateLayerFieldInfo",O).addNode("agent",H).addNode("tools",B).addNode("earlyExit",J).addEdge(u,"requireLayerStylingServices").addEdge("requireLayerStylingServices","vectorSearchLayers").addConditionalEdges("layerSelectionHITL",t=>t.vectorSearchLayerIds.length?"vectorSearchFields":"earlyExit").addConditionalEdges("vectorSearchFields",t=>t.vectorSearchFieldResults.length?"populateLayerFieldInfo":"earlyExit").addEdge("populateLayerFieldInfo","agent").addEdge("agent","tools").addEdge("tools",p).addEdge("earlyExit",p),W=String.raw`- **layerStyling** — User wants to change how features are drawn or styled on the map based on their data, such as applying color, size, transparency, symbols, or charts according to field values.
11
+ _Example: “Color points by sales amount”_
12
+ _Example: “Show population density with a color gradient”_
13
+ _Example: “Create a relationship map between height and depth”_
14
+ _Example: “Vary circle sizes according to population”_`,q={id:"layerStyling",name:"Layer Styling Agent",description:W,createGraph:Q,workspace:h};return{a:M,b:q}},"identity/IdentityManager","portal/Portal","request","config","core/reactiveUtils","layers/FeatureLayer",a,b)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{c as i,e as c}from"./2WXXSZP5.js";export default $arcgis.t(([m,{subclass:p}])=>{function a(t){return t?Object.keys(t.shape??{}):[]}function d(t){let e={};for(let n of t)for(let s of a(n))e[s]=void 0;return e}function g(t,e){return Object.fromEntries(e.filter(n=>Object.hasOwn(t,n)).map(n=>[n,t[n]]))}function l(t,e){return`${t.id}_${e}`}function h(t,e){let n=e.inputSchema;return n?{...g(t,a(n)),agentExecutionContext:t.agentExecutionContext,outputMessage:t.outputMessage,status:void 0,summary:""}:{...t,status:void 0,summary:""}}function x(t,e){return t.outputSchema?g(e,a(t.outputSchema)):{}}function y(t){let e={outputMessage:t.outputMessage,status:t.status,summary:t.summary};return t.agentExecutionContext&&(e.agentExecutionContext=t.agentExecutionContext),e}function v(t,e){return async(n,s)=>{let o=await t.run(h(n,t),s),r=x(t,o);return e||o.status==="failed"?{...r,...y(o)}:{...r,outputMessage:o.outputMessage}}}var w=Object.getOwnPropertyDescriptor,E=(t,e,n,s)=>{for(var o=s>1?void 0:s?w(e,n):e,r=t.length-1,u;r>=0;r--)(u=t[r])&&(o=u(o)||o);return o},f=class extends m{generate(){let t=this.getAgents();this.validateAgents(t);for(let r of t)r.generate();let e=d(t.flatMap(r=>r.getSchemas())),n=i(e),s=this.buildNodes(t),o=this.buildEdges(t);return{workspace:n,createGraph:()=>c(s,o,n,{entryNode:this.getEntryNode(t)})}}buildNodes(t){let e={};for(let[n,s]of t.entries())e[l(s,n)]=v(s,this.isTerminalAgent(t,n));return e}validateAgents(t){if(!t.length)throw new Error("Workflow requires at least one agent.")}};f=E([p("BaseWorkflow")],f);return{a:a,b:d,c:l,d:f}},"core/Accessor","core/accessorSupport/decorators")
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import b from"./KKCLHXHG.js";import{a as B,b as S}from"./LLY5A2E2.js";import a from"./VGLBH473.js";import{a as g}from"./A6LBMS7A.js";import{Dc as h}from"./M2U456J5.js";import{a as e}from"./5X23DDDZ.js";export default $arcgis.t(([k,j,{a:m,d:b,e:w,f:F},{d:T}])=>{var q=i=>i.flatMap(t=>t.split(",")).map(t=>t.trim()).map(t=>t.split(/\s+/u)[0]?.replace(/^"|"$/gu,"")).filter(t=>!!t),R=async(i,t,n,a,d)=>{let s=n.map?.allLayers.find(o=>o.id===i.layerId),c=await n.whenLayerView(s),u=s.title??i.layerId,l;if(a){let o=await b(a,n);if("error"in o)return{tool:"getTopFeatures",layerName:u,summary:"Geometry lookup failed",details:{error:o.error}};if(!o.geometry)return{tool:"getTopFeatures",layerName:u,summary:"No features found for geometry filter",details:{error:`No features found matching: ${"where"in a?a.where:"unknown criteria"}`}};l=o.geometry}else d&&(l=n.extent.clone());let y=t.groupByFields&&t.groupByFields.length>0,f=s.objectIdField,p=i.outFields.includes("*")?["*"]:[...new Set([...i.outFields,f])];try{let o;if(y){let r=new k({where:i.where||"1=1",outFields:p,orderByFields:i.orderByFields,geometry:l,spatialRelationship:l?"intersects":void 0,distance:a?.distance,units:a?.units,topFilter:new j({topCount:t.topCount,groupByFields:t.groupByFields,orderByFields:t.orderByFields})});o=await s.queryTopFeatures(r)}else{let r=s.createQuery();r.where=S(s.definitionExpression,i.where||"1=1"),r.outFields=p.length?p:["*"],r.orderByFields=t.orderByFields,r.returnGeometry=!1,r.num=t.topCount,l&&(r.geometry=l,r.spatialRelationship="intersects"),a?.distance&&(r.distance=a.distance),a?.units&&(r.units=a.units),r.outSpatialReference=n.spatialReference;let v=[...new Set([...i.outFields,...q(t.orderByFields)])],N=B(c,v,d??!1);try{o=N?await c.queryFeatures(r):await s.queryFeatures(r)}catch(x){console.warn("Client-side query failed, falling back to server:",x),o=await s.queryFeatures(r)}}let C=o.features.map(r=>r.attributes[f]),{attributes:I}=T(s,o,n.timeZone);return{tool:"getTopFeatures",layerName:u,summary:`Top ${t.topCount} features extracted`,details:{topCount:t.topCount,attributes:I,objectIds:C,objectIdField:f,where:i.where,orderByFields:t.orderByFields,...y&&{groupByFields:t.groupByFields}}}}catch(o){return{tool:"getTopFeatures",layerName:u,summary:"Query failed",details:{error:o instanceof Error?o.message:String(o)}}}},D=async({targetLayer:i,topFilter:t,geometryFilter:n,useCurrentExtent:a},d)=>{let{mapView:s}=g(d,["mapView"]),c=F(n,d.state?.agentExecutionContext?.sharedResources),u=await R(i,t,s,c,a);return JSON.stringify(u,null,2)},E=e.object({layerId:e.string().describe("The layerId of the layer containing the geometry by which to filter."),where:e.string().describe("The SQL-92 where clause representing the features from which to filter."),distance:e.number().optional().describe("The buffer distance around the geometry."),units:m.optional().describe("The units for the distance buffer.")}),L=e.object({point:e.object({x:e.number().describe("X coordinate (longitude) from navigation result"),y:e.number().describe("Y coordinate (latitude) from navigation result"),spatialReference:e.object({wkid:e.number().describe("Spatial reference WKID (e.g., 4326 for WGS84)")}).optional().describe("Spatial reference. Defaults to map's spatial reference if not provided.")}).describe("Point coordinates from a previous navigation/geocoding result"),distance:e.number().optional().describe("Optional buffer distance around the point."),units:m.optional().describe("The units for the distance buffer.")}),U=e.object({targetLayer:e.object({layerId:e.string().describe("The layerId of the layer containing the field from which to get a value."),where:e.string().describe("The SQL-92 where clause representing the feature from which to get an attribute value."),orderByFields:e.array(e.string().describe("The field(s) and order for which to sort the resulting features.")),outFields:e.array(e.string().describe('The fields to include in the output that will be presented to the user. This should include identifying information about the resulting features, like a name or id, along with the values desired in the output. If unsure, choose all fields ("*").').default("*"))}),geometryFilter:e.union([E,L,w]).optional().describe("Geometry filter for spatial queries. Use 'sharedResourceId' with an ID from listSharedResources for a previously geocoded location. Use 'point' for inline coordinates or 'layerId/where' for features from another layer."),topFilter:e.object({topCount:e.number().describe("Number of top features to return per group."),orderByFields:e.array(e.string().describe("Field(s) to rank by with ASC/DESC. Must be existing field names, not aggregate functions.")),groupByFields:e.array(e.string().describe("Field(s) to group results by. Returns top N per group."))}).required(),useCurrentExtent:e.boolean().optional().describe("Set to true ONLY when user explicitly asks about features 'in my view', 'on my map', 'I am looking at'. Default is false (queries entire layer).")}),Y=h(D,{name:"getTopFeatures",description:'Returns top N features ranked by an existing field value. Use for "highest", "lowest", "top N" questions where ranking is based on a field that already exists in the data (e.g., population, value, date, depth). orderByFields must be actual field names with ASC/DESC. Do NOT use aggregate functions like COUNT(), SUM(), AVG() - those require getStatistics.',schema:U});return Y},"rest/support/TopFeaturesQuery","rest/support/TopFilter",a,b)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import b from"./M3KKORBG.js";import a from"./KKCLHXHG.js";import"./A6LBMS7A.js";import"./M2U456J5.js";import"./5X23DDDZ.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([,a])=>{return a},a,b)
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as l}from"./YLN2BZ5J.js";import"./QCSN44H4.js";import"./NXKKG5TK.js";import{g as a,h as e,k as o,t as i,u as n,v as r,z as c}from"./HWKDNS4K.js";import"./YIMNOUTF.js";export default $arcgis.t(([{watch:d}])=>{var g=a`.container{display:flex;align-items:center;width:100%;justify-content:space-between;gap:var(--calcite-spacing-xs)}.start,.end{display:flex;align-items:center;gap:var(--calcite-spacing-xs)}`,t=class extends r{constructor(){super(...arguments),this._messages=l({blocking:!0}),this._endRef=i(),this._showLog=!1,this.feedbackEnabled=!1,this.logEnabled=!1,this.copyEnabled=!1,this.readAloudEnabled=!1}static{this.properties={_showLog:16,feedbackEnabled:5,logEnabled:5,copyEnabled:5,readAloudEnabled:5,message:0}}static{this.styles=g}loaded(){this.manager.onLifecycle(()=>[d(()=>this._showLog,()=>this._scrollToEnd())])}_scrollToEnd(){requestAnimationFrame(()=>{this._endRef.value?.scrollIntoView({behavior:"smooth",block:"end"})})}_renderCopyButton(){return!this.message?.error&&this.copyEnabled?e`<calcite-action id=action-copy icon=copy-to-clipboard scale=s @click=${async()=>{try{let s=this.message?.content?.trim();s&&await navigator.clipboard.writeText(s)}catch(s){o("warn","assistant-message-footer","Failed to copy text to clipboard",{once:!0,detail:{error:s}})}}} text></calcite-action><calcite-tooltip reference-element=action-copy overlay-positioning=fixed placement=bottom><span>${this._messages.copyButtonLabel}</span></calcite-tooltip>`:null}_renderLogButton(){return this.message?.log?.length&&this.logEnabled?e`<calcite-action id=action-log icon=access-string-results scale=s @click=${()=>this._showLog=!this._showLog} .text=${this._messages.logButtonLabel} .active=${this._showLog}></calcite-action><calcite-tooltip reference-element=action-log overlay-positioning=fixed placement=bottom><span>${this._messages.logButtonLabel}</span></calcite-tooltip>`:null}_renderReadAloudButton(){return e`<arcgis-assistant-message-read-aloud .message=${this.message} .readAloudEnabled=${this.readAloudEnabled}></arcgis-assistant-message-read-aloud>`}_renderLog(){return e`<arcgis-assistant-message-log .log=${this.message?.log} .showLog=${this._showLog} .logEnabled=${this.logEnabled}></arcgis-assistant-message-log>`}_renderFeedback(){return e`<arcgis-assistant-message-feedback .message=${this.message} .feedbackEnabled=${this.feedbackEnabled}></arcgis-assistant-message-feedback>`}render(){return e`${this._renderLog()}<div class="container"><div class="start">${this._renderCopyButton()}${this._renderLogButton()}${this._renderReadAloudButton()}<slot name=footer-actions-start></slot></div><div class="end"><slot name=footer-actions-end></slot>${this._renderFeedback()}</div></div><div ${n(this._endRef)}></div>`}};c("arcgis-assistant-message-footer",t);return t},"core/reactiveUtils")
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{b as l}from"./BBEGLIZC.js";import"./4YOG5F3W.js";import{g as a,h as e,k as o,t as i,u as n,v as r,z as c}from"./53KIFJFA.js";import"./TLPZELG3.js";import"./BVUCNXC5.js";export default $arcgis.t(([{watch:d}])=>{var g=a`.container{display:flex;align-items:center;width:100%;justify-content:space-between;gap:var(--calcite-spacing-xs)}.start,.end{display:flex;align-items:center;gap:var(--calcite-spacing-xs)}`,t=class extends r{constructor(){super(...arguments),this._messages=l({blocking:!0}),this._endRef=i(),this._showLog=!1,this.feedbackEnabled=!1,this.logEnabled=!1,this.copyEnabled=!1,this.readAloudEnabled=!1}static{this.properties={_showLog:16,feedbackEnabled:5,logEnabled:5,copyEnabled:5,readAloudEnabled:5,message:0}}static{this.styles=g}loaded(){this.manager.onLifecycle(()=>[d(()=>this._showLog,()=>this._scrollToEnd())])}_scrollToEnd(){requestAnimationFrame(()=>{this._endRef.value?.scrollIntoView({behavior:"smooth",block:"end"})})}_renderCopyButton(){return!this.message?.error&&this.copyEnabled?e`<calcite-action id=action-copy icon=copy-to-clipboard scale=s @click=${async()=>{try{let s=this.message?.content?.trim();s&&await navigator.clipboard.writeText(s)}catch(s){o("warn","assistant-message-footer","Failed to copy text to clipboard",{once:!0,detail:{error:s}})}}} text></calcite-action><calcite-tooltip reference-element=action-copy overlay-positioning=fixed placement=bottom><span>${this._messages.copyButtonLabel}</span></calcite-tooltip>`:null}_renderLogButton(){return this.message?.log?.length&&this.logEnabled?e`<calcite-action id=action-log icon=access-string-results scale=s @click=${()=>this._showLog=!this._showLog} .text=${this._messages.logButtonLabel} .active=${this._showLog}></calcite-action><calcite-tooltip reference-element=action-log overlay-positioning=fixed placement=bottom><span>${this._messages.logButtonLabel}</span></calcite-tooltip>`:null}_renderReadAloudButton(){return e`<arcgis-assistant-message-read-aloud .message=${this.message} .readAloudEnabled=${this.readAloudEnabled}></arcgis-assistant-message-read-aloud>`}_renderLog(){return e`<arcgis-assistant-message-log .log=${this.message?.log} .showLog=${this._showLog} .logEnabled=${this.logEnabled}></arcgis-assistant-message-log>`}_renderFeedback(){return e`<arcgis-assistant-message-feedback .message=${this.message} .feedbackEnabled=${this.feedbackEnabled}></arcgis-assistant-message-feedback>`}render(){return e`${this._renderLog()}<div class="container"><div class="start">${this._renderCopyButton()}${this._renderLogButton()}${this._renderReadAloudButton()}<slot name=footer-actions-start></slot></div><div class="end"><slot name=footer-actions-end></slot>${this._renderFeedback()}</div></div><div ${n(this._endRef)}></div>`}};c("arcgis-assistant-message-footer",t);return t},"core/reactiveUtils")
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import a from"./VK6CCPTG.js";import"./A6LBMS7A.js";import"./M2U456J5.js";import"./5X23DDDZ.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([a])=>{return a},a)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import"./BVUCNXC5.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};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import p from"./XRVGYRXL.js";import"./2F4TPWZQ.js";import n from"./ZY3JQCZQ.js";import{a as o,c as m}from"./SNG3WODY.js";import"./M5B6X46F.js";import l from"./VK6CCPTG.js";import"./LXIKAXUT.js";import k from"./M3KKORBG.js";import j from"./3PPXAIRE.js";import h from"./XVJFPZTW.js";import g from"./YOW3YKWR.js";import f from"./KKCLHXHG.js";import"./LLY5A2E2.js";import"./X42ACC66.js";import"./V4PJMCJZ.js";import e from"./EK3PM4L5.js";import"./T6W6F4TF.js";import"./CKUUYQLO.js";import d from"./KBSXHSBX.js";import"./275FFTBE.js";import"./TFAJNKBC.js";import"./HV7MVIQV.js";import"./OALQBAZR.js";import"./4YOG5F3W.js";import c from"./2LVYAXHG.js";import"./4OI4QEV7.js";import"./SJMAKF4P.js";import"./TXZQZR3I.js";import b from"./STOGCXJH.js";import a from"./VGLBH473.js";import"./A6LBMS7A.js";import{v as i,z as r}from"./53KIFJFA.js";import"./TLPZELG3.js";import"./V52GSTOC.js";import"./477I66FH.js";import"./ZJWR4W2S.js";import"./M2U456J5.js";import"./5X23DDDZ.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([,,,,,,,,,,,,,,,,,,,,,,{b:p}])=>{var t=class extends i{constructor(){super(...arguments),this.agent=p}static{this.properties={referenceElement:1}}#t;#i;getContext(){if(!this.#t)throw new Error("arcgis-assistant-layer-styling-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=o(this,"arcgis-assistant-layer-styling-agent"),this.#i=m(this)}disconnectedCallback(){this.#i?.unregister(this.agent.id),super.disconnectedCallback()}};r("arcgis-assistant-layer-styling-agent",t);return t},"identity/IdentityManager","portal/Portal","request","config","core/reactiveUtils","layers/FeatureLayer","intl","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","rest/knowledgeGraphService",a,b,c,d,e,f,g,h,j,k,l,n,p)
@@ -0,0 +1,11 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import b from"./KKCLHXHG.js";import{a as x,b as O}from"./LLY5A2E2.js";import a from"./VGLBH473.js";import{a as L}from"./A6LBMS7A.js";import{Dc as T}from"./M2U456J5.js";import{a as e}from"./5X23DDDZ.js";export default $arcgis.t(([{a:p,b:g,c:b,d:v,e:R,f:j},{d:N}])=>{var w=25,k=i=>i.flatMap(r=>r.split(",")).map(r=>r.trim()).map(r=>r.split(/\s+/u)[0]?.replace(/^"|"$/gu,"")).filter(r=>!!r),E=async(i,r,t,l)=>{let s=r.map?.allLayers.find(u=>u.id===i.layerId),d=await r.whenLayerView(s),f=s.title??i.layerId,h;if(t){let u=await v(t,r);if("error"in u){let o={error:u.error};if(b(t)){let c=r.map?.allLayers.find(m=>m.id===t.layerId);o.geometryLayerName=c?.title??c?.id,o.geometryLayerId=t.layerId,o.geometryWhere=t.where}else g(t)&&(o.point=t.point);return{tool:"queryFeatures",layerName:f,summary:"Geometry lookup failed",details:o}}if(!u.geometry){let o={};if(b(t)){let c=r.map?.allLayers.find(m=>m.id===t.layerId);o.error=`No features found matching: ${t.where}`,o.geometryLayerName=c?.title??c?.id,o.geometryLayerId=t.layerId,o.geometryWhere=t.where}else g(t)&&(o.error="Failed to create point geometry",o.point=t.point);return{tool:"queryFeatures",layerName:f,summary:"No features found for geometry filter",details:o}}h=u.geometry}else l&&(h=r.extent.clone());let C=[...new Set([...i.outFields,...k(i.orderByFields)])],F=x(d,C,l??!1),I=s.objectIdField,a=s.createQuery();a.where=O(s.definitionExpression,i.where||"1=1"),a.outFields=i.outFields.includes("*")?["*"]:[...new Set([...i.outFields,I])],a.orderByFields=i.orderByFields,h&&(a.geometry=h,a.spatialRelationship="intersects"),t?.distance&&(a.distance=t.distance),t?.units&&(a.units=t.units),a.outSpatialReference=r.spatialReference;let n,y;try{n=F?await d.queryFeatureCount(a):await s.queryFeatureCount(a),n>0&&n<=w&&(y=F?await d.queryFeatures(a):await s.queryFeatures(a))}catch(u){console.warn("Client-side query failed, falling back to server:",u),n=await s.queryFeatureCount(a),n>0&&n<=w&&(y=await s.queryFeatures(a))}let{objectIds:q,attributes:S}=y?N(s,y,r.timeZone):{objectIds:void 0,attributes:void 0};return{tool:"queryFeatures",layerName:f,summary:`${n} features found`,details:{totalCount:n,where:i.where,orderByFields:i.orderByFields,outFields:i.outFields,...q&&{objectIds:q,objectIdField:I},...S&&{attributes:S},...n>w&&{note:`${n} features found.`}}}};async function W({targetLayer:i,geometryFilter:r,useCurrentExtent:t},l){let{mapView:s}=L(l,["mapView"]),d=j(r,l.state?.agentExecutionContext?.sharedResources),f=await E(i,s,d,t);return JSON.stringify(f,null,2)}var B=e.object({layerId:e.string().describe("The layerId of the layer containing the geometry by which to filter."),where:e.string().describe("The SQL-92 where clause representing the features from which to filter."),distance:e.number().optional().describe("The buffer distance around the geometry."),units:p.optional().describe("The units for the distance buffer.")}),U=e.object({point:e.object({x:e.number().describe("X coordinate (longitude) from navigation result"),y:e.number().describe("Y coordinate (latitude) from navigation result"),spatialReference:e.object({wkid:e.number().describe("Spatial reference WKID (e.g., 4326 for WGS84)")}).optional().describe("Spatial reference. Defaults to map's spatial reference if not provided.")}).describe("Point coordinates from a previous navigation/geocoding result"),distance:e.number().optional().describe("Optional buffer distance around the point."),units:p.optional().describe("The units for the distance buffer.")}),D=e.object({targetLayer:e.object({layerId:e.string().describe("The layerId of the layer containing the field from which to get a value."),where:e.string().describe("SQL-92 where clause. IMPORTANT: When using geometryFilter.point or geometryFilter.sharedResourceId for point-in-polygon queries, set this to '1=1' to return all features that intersect the point. Only add attribute filters if the user specifically requests them in addition to the spatial query."),orderByFields:e.array(e.string().describe("The field(s) and order for which to sort the resulting features.")),outFields:e.array(e.string().describe('The fields to include in the output that will be presented to the user. This should include identifying information about the resulting features, like a name or id, along with the values desired in the output. If unsure, choose all fields ("*").').default("*"))}),geometryFilter:e.union([B,U,R]).optional().describe("Geometry filter for spatial queries. Use 'sharedResourceId' with an ID from listSharedResources for a previously geocoded location. Use 'point' for inline coordinates or 'layerId/where' for features from another layer."),useCurrentExtent:e.boolean().optional().describe("Set to true ONLY when user explicitly asks about features 'in my view', 'on my map', 'I am looking at', OR when the user refers back to features previously identified using the current extent (e.g. 'these', 'those', 'them', 'the same ones'). Default is false (queries entire layer).")}),H=T(W,{name:"queryFeatures",description:`Queries features from a layer. Returns the total count of matching features, plus individual feature attributes if \u226425 features match.
3
+
4
+ USE THIS TOOL FOR:
5
+ - "Show / display / list features where..." \u2014 finding and listing features
6
+ - "How many X are Y?" \u2014 counting features that match a condition
7
+ - "Which features..." / "Find features..." \u2014 identifying specific features
8
+ - Spatial queries \u2014 finding features near/within/intersecting other features
9
+ - Any question where the user wants to SEE or COUNT matching features
10
+
11
+ This is the DEFAULT tool for most queries. When in doubt, use this tool.`,schema:D});return H},a,b)
@@ -1,3 +1,3 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./YIMNOUTF.js";var o=`(function(){"use strict";const h=(a,r)=>{if(a.length!==r.length)throw new Error("Vectors must be the same length");let c=0,t=0,e=0;for(let n=0;n<a.length;++n){const s=a[n],l=r[n];c+=s*l,t+=s*s,e+=l*l}const i=Math.sqrt(t*e);if(i===0)return 0;const m=c/i;return Math.max(-1,Math.min(1,m))},f=(a,r,c=.6)=>{const t=[],e=[...a];for(;t.length<r&&e.length>0;){let i=-1,m=-1/0;for(let n=0;n<e.length;n++){const s=e[n].score,l=t.length===0?0:Math.max(...t.map(o=>h(e[n].vector,o.vector))),d=c*s-(1-c)*l;d>m&&(m=d,i=n)}t.push(e[i]),e.splice(i,1)}return t.map(({name:i,score:m})=>({name:i,score:m}))};let p=[];const u=new Map,v=12,y=10,M=a=>{p=a.layers.map(r=>({id:r.id,vector:r.vector}))},E=a=>{u.clear();for(const r of a.layers){const c=r.fields.map(t=>({name:t.name,vector:t.vector}));u.set(r.id,c)}};globalThis.addEventListener("message",a=>{(async()=>{const{type:r,webmapEmbeddings:c,layerIdForFieldsSearch:t=[],requestId:e,precomputedEmbedding:i,minScore:m=0,topResults:n=v}=a.data;switch(r){case"generateEmbeddings":{c&&(M(c),E(c)),globalThis.postMessage("completed");break}case"layerSearch":{if(p.length>0)try{const s=p.map(o=>({id:o.id,vector:o.vector,score:h(i,o.vector)})),d=f(s.map(o=>({name:o.id,vector:o.vector,score:o.score})),y).map(({name:o,score:b})=>({id:o,score:b}));globalThis.postMessage({requestId:e,results:d})}catch(s){globalThis.postMessage({requestId:e,results:[],error:s instanceof Error?s.message:"Calculation error"})}else globalThis.postMessage({requestId:e,results:[],error:"Layer embeddings not initialized"});break}case"fieldSearch":{if(t.length>0)try{const s=t.map(l=>{const d=u.get(l);if(!d)return{layerId:l,results:[]};const o=d.map(g=>({name:g.name,vector:g.vector,score:h(i,g.vector)})).filter(({score:g})=>g>=m),b=f(o,n);return{layerId:l,results:b}});globalThis.postMessage({requestId:e,results:s})}catch(s){globalThis.postMessage({requestId:e,results:[],error:s instanceof Error?s.message:"Field search calculation error"})}break}default:console.warn("Unknown message type:",r)}})()})})();
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import"./BVUCNXC5.js";var o=`(function(){"use strict";const h=(a,r)=>{if(a.length!==r.length)throw new Error("Vectors must be the same length");let c=0,t=0,e=0;for(let n=0;n<a.length;++n){const s=a[n],l=r[n];c+=s*l,t+=s*s,e+=l*l}const i=Math.sqrt(t*e);if(i===0)return 0;const m=c/i;return Math.max(-1,Math.min(1,m))},f=(a,r,c=.6)=>{const t=[],e=[...a];for(;t.length<r&&e.length>0;){let i=-1,m=-1/0;for(let n=0;n<e.length;n++){const s=e[n].score,l=t.length===0?0:Math.max(...t.map(o=>h(e[n].vector,o.vector))),d=c*s-(1-c)*l;d>m&&(m=d,i=n)}t.push(e[i]),e.splice(i,1)}return t.map(({name:i,score:m})=>({name:i,score:m}))};let p=[];const u=new Map,v=12,y=10,M=a=>{p=a.layers.map(r=>({id:r.id,vector:r.vector}))},E=a=>{u.clear();for(const r of a.layers){const c=r.fields.map(t=>({name:t.name,vector:t.vector}));u.set(r.id,c)}};globalThis.addEventListener("message",a=>{(async()=>{const{type:r,webmapEmbeddings:c,layerIdForFieldsSearch:t=[],requestId:e,precomputedEmbedding:i,minScore:m=0,topResults:n=v}=a.data;switch(r){case"generateEmbeddings":{c&&(M(c),E(c)),globalThis.postMessage("completed");break}case"layerSearch":{if(p.length>0)try{const s=p.map(o=>({id:o.id,vector:o.vector,score:h(i,o.vector)})),d=f(s.map(o=>({name:o.id,vector:o.vector,score:o.score})),y).map(({name:o,score:b})=>({id:o,score:b}));globalThis.postMessage({requestId:e,results:d})}catch(s){globalThis.postMessage({requestId:e,results:[],error:s instanceof Error?s.message:"Calculation error"})}else globalThis.postMessage({requestId:e,results:[],error:"Layer embeddings not initialized"});break}case"fieldSearch":{if(t.length>0)try{const s=t.map(l=>{const d=u.get(l);if(!d)return{layerId:l,results:[]};const o=d.map(g=>({name:g.name,vector:g.vector,score:h(i,g.vector)})).filter(({score:g})=>g>=m),b=f(o,n);return{layerId:l,results:b}});globalThis.postMessage({requestId:e,results:s})}catch(s){globalThis.postMessage({requestId:e,results:[],error:s instanceof Error?s.message:"Field search calculation error"})}break}default:console.warn("Unknown message type:",r)}})()})})();
3
3
  `,r=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",o],{type:"text/javascript;charset=utf-8"});function a(t){let e;try{if(e=r&&(self.URL||self.webkitURL).createObjectURL(r),!e)throw"";let s=new Worker(e,{name:t?.name});return s.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),s}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(o),{name:t?.name})}}export{a as default};