@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
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{g as C,h as S,n as c,v as R,x as m,z as y}from"./53KIFJFA.js";import"./TLPZELG3.js";import"./BVUCNXC5.js";export default $arcgis.t(([{watch:u},{property:d,subclass:f},w])=>{var I=C`.button{--calcite-button-background-color: var(--calcite-color-transparent);--calcite-button-border-color: transparent;--calcite-button-icon-color: var(--calcite-color-text-3);--calcite-button-text-color: var(--calcite-color-text-3);flex:0 0 auto;position:relative}.button[data-state=disabled]{--calcite-button-icon-color: var(--calcite-color-text-3);opacity:var(--calcite-opacity-disabled)}.button[data-state=listening]{--calcite-button-background-color: color-mix( in srgb, var(--calcite-color-brand) 14%, var(--calcite-color-foreground-1) );--calcite-button-border-color: color-mix(in srgb, var(--calcite-color-brand) 24%, transparent);--calcite-button-icon-color: var(--calcite-color-brand);--calcite-button-text-color: var(--calcite-color-brand);box-shadow:var(--calcite-shadow-sm)}.button[data-state=listening]:hover{--calcite-button-background-color: color-mix( in srgb, var(--calcite-color-brand-hover, var(--calcite-color-brand)) 18%, var(--calcite-color-foreground-1) )}.button[data-state=listening]:active{--calcite-button-background-color: color-mix( in srgb, var(--calcite-color-brand) 24%, var(--calcite-color-foreground-1) )}.button[data-state=processing]{--calcite-button-background-color: color-mix( in srgb, var(--calcite-color-brand) 10%, var(--calcite-color-foreground-1) );--calcite-button-border-color: color-mix(in srgb, var(--calcite-color-brand) 20%, transparent);--calcite-button-icon-color: var(--calcite-color-brand);--calcite-button-text-color: var(--calcite-color-brand)}.button[data-state=error]{--calcite-button-background-color: color-mix( in srgb, var(--calcite-color-status-danger) 12%, var(--calcite-color-foreground-1) );--calcite-button-border-color: color-mix(in srgb, var(--calcite-color-status-danger) 24%, transparent);--calcite-button-icon-color: var(--calcite-color-status-danger);--calcite-button-text-color: var(--calcite-color-status-danger)}.button[data-state=listening]:after{content:"";position:absolute;inset:-4px;border:1px solid color-mix(in srgb,var(--calcite-color-brand) 40%,transparent);border-radius:inherit;opacity:0;pointer-events:none;transform:scale(.92);animation:assistant-speech-input-recording-pulse 1.8s ease-out infinite}@keyframes assistant-speech-input-recording-pulse{0%{opacity:.65;transform:scale(.92)}70%{opacity:0;transform:scale(1.16)}to{opacity:0;transform:scale(1.16)}}@media(prefers-reduced-motion){.button[data-state=listening]:after{animation:none}}`,T=["audio/webm;codecs=opus","audio/webm","audio/mp4","audio/ogg;codecs=opus","audio/ogg"];function h(e){return e.replace(/\s+/gu," ").trim()}var x=Object.defineProperty,V=Object.getOwnPropertyDescriptor,p=(e,t,s,i)=>{for(var r=i>1?void 0:i?V(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(r=(i?o(t,s,r):o(r))||r);return i&&r&&x(t,s,r),r},a=class extends w{constructor(e){super(e),this.state="idle",this.liveTranscript="",this.transcript="",this.errorCode=void 0}static isSupported(){return!1}};p([d()],a.prototype,"language",2);p([d({readOnly:!0})],a.prototype,"state",2);p([d({readOnly:!0})],a.prototype,"liveTranscript",2);p([d({readOnly:!0})],a.prototype,"transcript",2);p([d({readOnly:!0})],a.prototype,"errorCode",2);a=p([f("SpeechController")],a);var O=Object.defineProperty,M=Object.getOwnPropertyDescriptor,g=(e,t,s,i)=>{for(var r=i>1?void 0:i?M(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(r=(i?o(t,s,r):o(r))||r);return i&&r&&O(t,s,r),r},l=class extends a{constructor(e){super(e),this._activeSessionId=null,this._mediaRecorder=null,this._mediaRecorderChunkIndex=0,this._mediaRecorderStopReason=null,this._mediaStream=null,this._pendingChunkOperations=new Set,this._recordedChunks=[],this.handleRecording=null,this.chunkTimeSlice=3e3}get _mimeType(){return typeof window>"u"||typeof window.MediaRecorder?.isTypeSupported!="function"?"":T.find(e=>window.MediaRecorder.isTypeSupported(e))??""}destroy(){this._mediaRecorder&&(this._mediaRecorder.onstart=null,this._mediaRecorder.ondataavailable=null,this._mediaRecorder.onerror=null,this._mediaRecorder.onstop=null),this.cancel(),this._mediaRecorder=null}_queuePendingChunkOperation(e){this._pendingChunkOperations.add(e),e.finally(()=>{this._pendingChunkOperations.delete(e)})}async _awaitPendingChunkOperations(){this._pendingChunkOperations.size&&await Promise.allSettled(Array.from(this._pendingChunkOperations))}_onDataAvailable(e){let t=this._activeSessionId;t!=null&&this._queuePendingChunkOperation(this._processDataAvailable(e,t))}async _processDataAvailable(e,t){let s=e.data;if(!s.size||t!==this._activeSessionId)return;this._recordedChunks.push(s);let i=s.type||this._mediaRecorder?.mimeType||this._mimeType,r=this._mediaRecorderStopReason==="toggle"&&this._mediaRecorder?.state==="inactive";try{if(!this.handleRecording)return;let n=h(await this.handleRecording(s,i,this._mediaRecorderChunkIndex,r)??"");if(t!==this._activeSessionId)return;n&&this._set("liveTranscript",h(`${this.liveTranscript} ${n}`))}catch(n){if(t!==this._activeSessionId)return;this._failSession(n instanceof Error&&n.message==="transcription-unavailable"?"transcription-unavailable":"transcription-failed");return}!r&&t===this._activeSessionId&&(this._mediaRecorderChunkIndex+=1)}_failSession(e){let t=this._mediaRecorder;if(t){t.onstart=null,t.ondataavailable=null,t.onerror=null,t.onstop=null;try{t.state!=="inactive"&&t.stop()}catch{}}this._activeSessionId=null,this._mediaRecorder=null,this._mediaRecorderChunkIndex=0,this._mediaRecorderStopReason=null,this._pendingChunkOperations.clear(),this._recordedChunks=[],this._releaseMediaStream(),this._set("liveTranscript",""),this._set("transcript",""),this._set("state","error"),this._set("errorCode",e)}_onError(){this._failSession("recording-failed")}_onStart(){this._set("state","listening")}_onStop(){this._handleStop()}_releaseMediaStream(){this._mediaStream?.getTracks().forEach(e=>e.stop()),this._mediaStream=null}async _handleStop(){let e=this._mediaRecorder,t=this._activeSessionId,s=this._mediaRecorderStopReason,i=e?.mimeType||this._recordedChunks.find(n=>!!n.type)?.type||"",r=[...this._recordedChunks];if(this._mediaRecorder=null,this._mediaRecorderChunkIndex=0,this._releaseMediaStream(),s==="cancel"){this._activeSessionId===t&&(this._activeSessionId=null),this._mediaRecorderStopReason=null,this._pendingChunkOperations.clear(),this._recordedChunks=[],this._set("liveTranscript",""),this._set("transcript",""),this._set("state","idle"),this._set("errorCode",void 0);return}if(t==null){this._mediaRecorderStopReason=null,this._pendingChunkOperations.clear(),this._recordedChunks=[],this._set("state","idle"),this._set("errorCode",void 0);return}if(await this._awaitPendingChunkOperations(),t===this._activeSessionId){if(!(i?new Blob(r,{type:i}):new Blob(r)).size){this._activeSessionId===t&&(this._activeSessionId=null),this._mediaRecorderStopReason=null,this._recordedChunks=[],this._set("state","error"),this._set("errorCode","recording-failed");return}this._set("state","processing"),this._set("transcript",h(`${this.transcript} ${this.liveTranscript}`)),this._set("liveTranscript",""),this._activeSessionId===t&&(this._activeSessionId=null),this._set("state","idle"),this._set("errorCode",void 0),this._mediaRecorderStopReason=null,this._recordedChunks=[]}}start(){if(!l.isSupported()){this._set("errorCode","not-supported");return}let e=Date.now();this._activeSessionId=e,this._mediaRecorderChunkIndex=0,this._mediaRecorderStopReason=null,this._pendingChunkOperations.clear(),this._recordedChunks=[],this._set("liveTranscript",""),this._set("transcript",""),this._set("errorCode",void 0),navigator.mediaDevices.getUserMedia({audio:!0}).then(t=>{if(e!==this._activeSessionId){t.getTracks().forEach(r=>r.stop());return}let s=this._mimeType,i=s?new window.MediaRecorder(t,{mimeType:s}):new window.MediaRecorder(t);this._mediaStream=t,this._mediaRecorder=i,this._mediaRecorderChunkIndex=0,this._mediaRecorderStopReason=null,this._recordedChunks=[],i.ondataavailable=this._onDataAvailable.bind(this),i.onerror=this._onError.bind(this),i.onstart=this._onStart.bind(this),i.onstop=this._onStop.bind(this),this._mediaRecorder.start(this.chunkTimeSlice)}).catch(t=>{e===this._activeSessionId&&(this._activeSessionId=null,this._mediaRecorder=null,this._mediaRecorderChunkIndex=0,this._mediaRecorderStopReason=null,this._pendingChunkOperations.clear(),this._recordedChunks=[],this._releaseMediaStream(),t instanceof DOMException&&t.name==="NotAllowedError"?(this._set("state","error"),this._set("errorCode","not-allowed")):(this._set("state","error"),this._set("errorCode","recording-failed")))})}stop(){if(this._mediaRecorder){this._mediaRecorderStopReason="toggle";try{this._mediaRecorder.state!=="inactive"?this._mediaRecorder.stop():this._handleStop()}catch{}}}cancel(){let e=this._mediaRecorder;if(this._activeSessionId=null,this._mediaRecorderStopReason="cancel",this._mediaRecorderChunkIndex=0,this._pendingChunkOperations.clear(),this._recordedChunks=[],this._set("liveTranscript",""),this._set("transcript",""),this._set("state","idle"),this._set("errorCode",void 0),!e){this._releaseMediaStream();return}try{if(e.state!=="inactive"){e.stop();return}}catch{}this._mediaRecorder=null,this._releaseMediaStream()}static isSupported(){return typeof window<"u"&&!!(window.MediaRecorder&&navigator.mediaDevices?.getUserMedia)}};g([d()],l.prototype,"_mimeType",1);g([d()],l.prototype,"handleRecording",2);g([d()],l.prototype,"chunkTimeSlice",2);l=g([f("MediaRecorderController")],l);var D=Object.getOwnPropertyDescriptor,E=(e,t,s,i)=>{for(var r=i>1?void 0:i?D(t,s):t,n=e.length-1,o;n>=0;n--)(o=e[n])&&(r=o(r)||r);return r};function k(){if(typeof window>"u")return null;let e=window;return e.SpeechRecognition??e.webkitSpeechRecognition??null}var _=class extends a{constructor(e){super(e),this._isCancelled=!1,this._recognition=null}initialize(){let e=k();if(!e)return;let t=new e;t.continuous=!0,t.interimResults=!0,this.language&&(t.lang=this.language),t.onstart=this._onStart.bind(this),t.onresult=this._onResult.bind(this),t.onerror=this._onError.bind(this),t.onend=this._onEnd.bind(this),t.onspeechend=this._onSpeechEnd.bind(this),this._recognition=t}destroy(){this._recognition&&(this._recognition.onstart=null,this._recognition.onresult=null,this._recognition.onerror=null,this._recognition.onend=null,this._recognition.onspeechend=null,this.cancel(),this._recognition=null)}_onStart(){this._isCancelled=!1,this._set("state","listening")}_onResult(e){let{finalTranscript:t,liveTranscript:s}=Array.from(e.results).reduce((i,r)=>(r.isFinal?i.finalTranscript+=r[0].transcript:i.liveTranscript+=r[0].transcript,i),{finalTranscript:"",liveTranscript:""});this._set("transcript",h(t)),this._set("liveTranscript",h(s))}_onError(e){if(e.error==="aborted"&&this._isCancelled){this._set("state","idle");return}let t="unhandled";switch(e.error){case"no-speech":t="no-speech";break;case"service-not-allowed":case"not-allowed":t="not-allowed";break;default:t="unhandled"}this._set("state","error"),this._set("errorCode",t)}_onEnd(){let e=h(`${this.transcript} ${this.liveTranscript}`);if(this._set("liveTranscript",""),this._isCancelled){this._set("transcript",""),this._set("state","idle"),this._set("errorCode",void 0);return}this.errorCode?this._set("transcript",""):(this._set("transcript",e),this._set("state","idle")),this._set("errorCode",void 0)}_onSpeechEnd(){this._set("state","processing")}_reset(e=!1){this._isCancelled=e,this._set("liveTranscript",""),this._set("transcript",""),this._set("errorCode",void 0),this._set("state","idle")}start(){if(!this._recognition){this._set("errorCode","not-supported");return}this._reset(!1);try{this._recognition.start()}catch{this._set("state","error"),this._set("errorCode","unhandled")}}stop(){if(this._recognition){this._set("state","processing");try{this._recognition.stop()}catch{}}}cancel(){if(this._recognition){this._reset(!0);try{this._recognition.abort()}catch{}}}static isSupported(){return!!k()}};_=E([f("WebSpeechController")],_);function b(e){let{baseValue:t,transcript:s}=e;if(!s)return t;let i=t.trim();return i?`${i} ${s}`:s}var v=class extends R{constructor(){super(...arguments),this.#t=null,this._resolvedMode="disabled",this.awaitingResponse=!1,this.inputValue="",this.mode="web-speech",this.arcgisVoiceInputDraftChange=c(),this.arcgisVoiceInputError=c(),this.arcgisVoiceInputInterimTranscription=c(),this.arcgisVoiceInputStart=c(),this.arcgisVoiceInputStop=c(),this.arcgisVoiceInputTranscription=c(),this.arcgisVoiceInputTranscriptionStreamChunk=c()}static{this.properties={_resolvedMode:16,_state:16,_errorCode:16,_liveTranscript:16,_transcript:16,_isButtonDisabled:16,_buttonLabel:16,awaitingResponse:5,inputValue:1,language:1,mode:1}}static{this.styles=I}#t;get _state(){return this._speechController?.state??"idle"}get _errorCode(){return this._speechController?.errorCode??null}get _liveTranscript(){return this._speechController?.liveTranscript??""}get _transcript(){return this._speechController?.transcript??""}get _isButtonDisabled(){return this._resolvedMode==="disabled"||this.awaitingResponse||this._state==="processing"}get _buttonLabel(){if(this.awaitingResponse)return"Voice input unavailable while assistant is responding";if(this._resolvedMode==="disabled")return"Voice input unavailable";switch(this._state){case"error":return this._errorCode==="not-allowed"?"Microphone permission denied. Retry voice input":"Retry voice input";case"listening":return"Stop voice input";case"processing":return"Processing voice input";default:return"Start voice input"}}clearDraftSession(){this.#t=null}loaded(){this.manager.onLifecycle(()=>[u(()=>[this.mode,this.language],()=>{this._configureController()},{initial:!0}),u(()=>this.awaitingResponse,t=>{t&&this._cancelActiveSession()},{initial:!0}),u(()=>this._liveTranscript,t=>{if(t){let s=h(`${this._transcript} ${t}`);this.arcgisVoiceInputInterimTranscription.emit({transcript:s}),this._applyVoiceInputTranscript(s)}}),u(()=>this._transcript,t=>{t&&(this.arcgisVoiceInputTranscription.emit({transcript:t}),this._applyVoiceInputTranscript(t,{final:!0}))}),u(()=>this._state,t=>{t==="error"&&this._errorCode&&this.arcgisVoiceInputError.emit({errorCode:this._errorCode})})])}disconnectedCallback(){super.disconnectedCallback(),this._destroySpeechController()}_configureController(){let t=this._resolveMode();this._destroySpeechController(),this._resolvedMode=t,t!=="disabled"&&(this._speechController=t==="web-speech"?new _({language:this.language}):new l({language:this.language,handleRecording:this._handleRecording.bind(this)}))}_destroySpeechController(){this._speechController?.cancel(),this._speechController?.destroy(),this._speechController=void 0}_emitDraftChange(t,s){this.arcgisVoiceInputDraftChange.emit({focusInput:s?.focusInput,value:t})}_startVoiceInputSession(){this.#t={baseValue:this.inputValue.trim(),phase:"listening",transcript:""}}_finishVoiceInputSession(){let t=this.#t;if(!t){this._emitDraftChange(this.inputValue.trim());return}let s={...t,phase:"stopped"},i=b(s);this.#t=s,this._emitDraftChange(i)}async _applyVoiceInputTranscript(t,s){let i=this.#t;if(!t||!i)return;if(i.phase==="stopped"){let o=b(i);if(this.inputValue.trim()!==o){this.clearDraftSession();return}}let r={...i,transcript:t},n=b(r);this.#t=r,this._emitDraftChange(n,{focusInput:s?.final&&r.phase==="stopped"})}async _handleToggle(){if(!(this._isButtonDisabled||!this._speechController)){if(this._state==="listening"){this._speechController.stop(),this._finishVoiceInputSession(),this.arcgisVoiceInputStop.emit();return}this._speechController.start(),this._startVoiceInputSession(),this.arcgisVoiceInputStart.emit()}}async _handleRecording(t,s,i,r){let n;return this.arcgisVoiceInputTranscriptionStreamChunk.emit({blob:t,chunkIndex:i,isFinal:r,mimeType:s,respondWithTranscript:o=>{n=o}}),n}_resolveMode(){return this.mode==="disabled"?"disabled":this.mode==="web-speech"&&_.isSupported()?"web-speech":l.isSupported()?"media-recorder":"disabled"}async _cancelActiveSession(){this._speechController&&this._resolvedMode!=="disabled"&&this._speechController.cancel(),this.clearDraftSession()}render(){return S`<calcite-button appearance=transparent class="button" data-mode=${this._resolvedMode??m} data-state=${(this._resolvedMode==="disabled"?"disabled":this._state)??m} .disabled=${this._isButtonDisabled} icon-start=microphone kind=neutral .label=${this._buttonLabel} .loading=${this._state==="processing"} round scale=m @click=${()=>{this._handleToggle()}}></calcite-button>`}};y("arcgis-assistant-speech-input",v);return v},"core/reactiveUtils","core/accessorSupport/decorators","core/Accessor")
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ function i(o,e){let t=o?.configurable?.context;if(!t||typeof t!="object")throw new Error("Agent context missing");let n=e.filter(r=>!(r in t));if(n.length)throw new Error(`Agent context missing: ${n.join(", ")}`);return t}export{i as a};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import a from"./XV7RMYLR.js";import"./2WXXSZP5.js";import"./4OI4QEV7.js";import"./ZJWR4W2S.js";import"./M2U456J5.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([{property:d,subclass:f},{a:u,c:i,d:c}])=>{var m=Object.defineProperty,g=Object.getOwnPropertyDescriptor,p=(e,o,r,t)=>{for(var s=t>1?void 0:t?g(o,r):o,a=e.length-1,n;a>=0;a--)(n=e[a])&&(s=(t?n(o,r,s):n(s))||s);return t&&s&&m(o,r,s),s},l=class extends c{constructor(e){super(e)}getAgents(){return this.agents}getEntryNode(e){return e[0]?i(e[0],0):void 0}isTerminalAgent(e,o){return o===e.length-1}validateAgents(e){super.validateAgents(e);let o=new Map;for(let[r,t]of e.entries()){let s=e[r-1];if(t.outputSchema)for(let a of u(t.outputSchema)){let n=o.get(a)??[];n.push(`${t.name} [${r}]`),o.set(a,n)}if(!(r===0||!t.inputSchema||s?.outputSchema))throw new Error(`Workflow agent "${t.name}" declares an input schema, so upstream agent "${s.name}" must declare an output schema.`)}for(let[r,t]of o.entries())t.length>1&&console.warn(`Workflow output field "${r}" is declared by multiple steps (${t.join(", ")}). Later steps will overwrite earlier values in shared state.`)}buildEdges(e){return e.length===1?[{from:i(e[0],0),decide:()=>{}}]:e.slice(0,-1).map((o,r)=>({from:i(o,r),decide:t=>t.status==="failed"?void 0:i(e[r+1],r+1)}))}};p([d()],l.prototype,"agents",2);l=p([f("SequentialWorkflow")],l);return l},"core/accessorSupport/decorators",a)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import b from"./3PPXAIRE.js";import"./LLY5A2E2.js";import"./V4PJMCJZ.js";import a from"./VGLBH473.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)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ function o(e,n){return`block-${e}-${n}`}export{o as a};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{b as A,d as N}from"./4YOG5F3W.js";import{A as $,a as x,b as C,c as f,d as m,e as L,f as P,k as g,m as v,n as O,o as w}from"./53KIFJFA.js";var _=t=>(...s)=>{let e=m(),o=new t(...s),r=o.exports;f(e.at(-1));let n=o.component.manager;n.W(o,r),o.watchExports(n.W.bind(n,o)),L(o);let a=[o.component,...e].reverse();return v(a,i=>i===void 0?void 0:F(o,i,r),r)},F=(t,{host:s,key:e,isReactive:o},r)=>{let n=s,a=n[e]!==t.exports,i=n[e]!==r,l=r!==t.exports;if(a&&!i&&l&&(n[e]=t.exports),s===t.component){if(o){let p=t.component.manager;i&&p.W(t,n[e]),t.onUpdate(u=>{if(u.has(e)){let y=n[e];y!==t.exports&&p.W(t,y)}})}t.O=o?void 0:e}let c=t.component.constructor.elementProperties.get(e)?.readOnly;t.watchExports(()=>{n[e]!==t.exports&&(c?P(()=>{n[e]=t.exports}):n[e]=t.exports)})};var b=t=>{let s=N(t,"lang",globalThis.navigator?.language||h);return{lang:s,t9nLocale:V(s)}},D=(t,s,e,o)=>{let r,n=()=>W(t,s(),o).then(a=>{(r?.lang!==a.lang||r.t9nLocale!==a.t9nLocale||r.t9nStrings!==a.t9nStrings)&&e(a),r=a}).catch(a=>{g("error","intl","Error updating component locale state",{detail:{error:a}})});return queueMicrotask(n),A(t,["lang"],n)},W=async(t,s,e=t.localName.split("-").slice(1).join("-"))=>{let{lang:o,t9nLocale:r}=b(t),n=`${s}/${e}/t9n`,i=e===null?{}:await I(r,n,"messages.");return{lang:o,t9nLocale:r,t9nStrings:i}};var K="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),q=new Set(K),h="en",R={pt:"pt-BR",nb:"no",nn:"no",zh:"zh-CN"},I=async(t,s,e="")=>{let o=`${s}/${e}`,r=`${o}${t}.json`;return j[r]??=k(t,o),await j[r]},j={},k=async(t,s)=>{let e=`${s}${t}.json`;try{let o=await fetch(e);if(o.ok)return await o.json()}catch(o){return g("error","intl",`An unknown error occurred while fetching localization strings at ${e}`,{detail:{error:o}}),{}}return t===h?{}:await k(h,s)},V=t=>{let[s,e]=t.split("-"),o=s.toLowerCase(),r=o;return e&&(r=`${o}-${e.toUpperCase()}`),r=R[r]??r,q.has(r)?r:e?V(o):h};var z=t=>B(void 0,t);var E=class extends w{constructor(s,e){super(s);let o=this.exports;try{C(this.component);let r=e(this.component,this),n=this.exports!==o;if(x(r)){n||this.setProvisionalExports(r);let a=r.then(i=>{this.exports=i,super.catchUpLifecycle()}).catch(i=>{this.P.reject(i)});this.onLoad(async()=>await a)}else(!n||r!==void 0)&&(this.exports=r),queueMicrotask(()=>super.catchUpLifecycle())}catch(r){this.P.reject(r)}}catchUpLifecycle(){}},B=_(E);var it=(t,s,e)=>z((o,r)=>{let n=s,a=O({bubbles:!1,composed:!1});return r.onUpdated(i=>{if(!n.some(c=>i.has(c)))return;let l=e(T(t,n,i)),d=e(T(t,n));l.forEach((c,p)=>{d.has(p)||a.emit({...c,data:void 0})}),d.forEach((c,p)=>{let u=l.get(p);(!u||!M(u,c))&&a.emit(c)})}),a});function T(t,s,e){let o={};return s.forEach(r=>{o[r]=e?.has(r)?e.get(r):t[r]}),o}function M(t,s){if(t===s)return!0;if(!t||!s||typeof t!="object"||typeof s!="object"||Array.isArray(t)||Array.isArray(s))return!1;let e=Object.entries(t),o=Object.entries(s);return e.length!==o.length?!1:e.every(([r,n])=>M(n,s[r]))}var S=t=>(s={})=>z((e,o)=>{let r=b(e.el),n={_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0},a=e;o.onLifecycle(()=>D(e.el,()=>t("./assets"),({t9nLocale:l,t9nStrings:d,lang:c})=>{let p={...d,_lang:c,_t9nLocale:l,_loading:!1};o.exports=p;let u=d.componentLabel;typeof u=="string"&&"label"in e&&e.label==null&&(e.label??=u),i(a.messageOverrides)},s.name));let i=l=>{let d=o.exports,c=d._original??d,p=U(c,l);l&&(p._original=c),o.exports=p};return"messageOverrides"in a&&o.onUpdate(l=>{l.has("messageOverrides")&&i(a.messageOverrides)}),s.blocking?(o.setProvisionalExports(n,!1),o.ready):n}),U=(t,s)=>{if(!s)return t;let e={...t};return Object.entries(s).forEach(([o,r])=>{t[o]!==void 0&&(typeof r=="object"?e[o]=U(t[o],r):e[o]=r??t[o])}),e};var dt=S($);export{it as a,dt as b};
@@ -0,0 +1,19 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import"./BVUCNXC5.js";var e=`---
3
+ name: help
4
+ description: Answers questions about the current map, its layers and fields, available assistant capabilities, unsupported map actions, and unrelated requests that need a map-focused redirect.
5
+ allowed-tools: listLayerFields
6
+ ---
7
+
8
+ # Help
9
+
10
+ - Use the runtime context supplied with this skill as the authoritative source for map, layer, field, and capability information.
11
+ - List layers using the layers in the runtime context.
12
+ - When the user explicitly asks for fields, columns, or attributes of a named layer, call \`listLayerFields\` with that layer title. Do not use \`listLayerFields\` for general help, capability summaries, or layer listings.
13
+ - Summarize what the map contains using its actual layer titles, descriptions, and fields.
14
+ - Explain available capabilities using only the registered agents in the runtime context. Do not claim an action is supported unless a registered agent description supports it.
15
+ - For requests such as "what can I ask?", suggest 3-5 concise examples that use actual layer and field names from the map context.
16
+ - If a map-related action is unsupported, say so directly and suggest a nearby supported capability when one is available.
17
+ - You know only this map and the registered assistant capabilities. For unrelated questions, politely say that you do not have that information and redirect to a specific map-related question using the returned context.
18
+ - Keep responses concise. Use bullets for lists and never invent map details, fields, agents, or capabilities.
19
+ `;export{e as default};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import a from"./EGRRZTF6.js";import{e as l}from"./2WXXSZP5.js";import"./4OI4QEV7.js";import"./ZJWR4W2S.js";import"./M2U456J5.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([{property:p,subclass:m},{watch:w},c])=>{var d=Object.defineProperty,f=Object.getOwnPropertyDescriptor,n=(e,r,s,o)=>{for(var t=o>1?void 0:o?f(r,s):r,i=e.length-1,a;i>=0;i--)(a=e[i])&&(t=(o?a(r,s,t):a(t))||t);return o&&t&&d(r,s,t),t},h=class extends c{constructor(e){super(e)}initialize(){this.addHandles(w(()=>[this.name,this.description,this.inputSchema,this.outputSchema,this.workflow],()=>this.generate(),{initial:!0,sync:!0}))}getSchemas(){return[this.inputSchema,...this.workflow.getAgents().flatMap(e=>e.getSchemas()),this.outputSchema].filter(Boolean)}generate(){let{workspace:e,createGraph:r}=this.workflow.generate();if(this._set("workspace",e),!this.middlewares?.length)this._set("createGraph",r);else{let s=this.id,o={[s]:async(i,a)=>await r().compile().invoke(i,a)},t=[{from:s,decide:()=>{}}];this._set("createGraph",()=>l(o,t,e,{agent:this,entryNode:s,middlewares:this.middlewares}))}}};n([p()],h.prototype,"workflow",2);n([p()],h.prototype,"inputSchema",2);n([p()],h.prototype,"outputSchema",2);h=n([m("WorkflowAgent")],h);return h},"core/accessorSupport/decorators","core/reactiveUtils",a)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{a}from"./X42ACC66.js";import"./V4PJMCJZ.js";import"./M2U456J5.js";import"./5X23DDDZ.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export{a as listLayerFieldsTool};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(b,a)=>()=>{try{return a||b((a={exports:{}}).exports,a),a.exports}catch(c){throw a=0,c}},n=(b,a)=>{for(var c in a)e(b,c,{get:a[c],enumerable:!0})},l=(b,a,c,f)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of i(a))!k.call(b,d)&&d!==c&&e(b,d,{get:()=>a[d],enumerable:!(f=h(a,d))||f.enumerable});return b};var o=(b,a,c)=>(c=b!=null?g(j(b)):{},l(a||!b||!b.__esModule?e(c,"default",{value:b,enumerable:!0}):c,b));export{m as a,n as b,o as c};
@@ -0,0 +1,66 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ function N(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var z=N();function ae(r){z=r}var R={exec:()=>null};function _(r){let e=[];return t=>{let s=Math.max(0,Math.min(3,t-1)),n=e[s];return n||(n=r(s),e[s]=n),n}}function u(r,e=""){let t=typeof r=="string"?r:r.source,s={replace:(n,l)=>{let a=typeof l=="string"?l:l.source;return a=a.replace(f.caret,"$1"),t=t.replace(n,a),s},getRegex:()=>new RegExp(t,e)};return s}var we=((r="")=>{try{return!!new RegExp("(?<=1)(?<!1)"+r)}catch{return!1}})(),f={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,endingSpaceTabChar:/[ \t]$/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:_(r=>new RegExp(`^ {0,${r}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`)),hrRegex:_(r=>new RegExp(`^ {0,${r}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`)),fencesBeginRegex:_(r=>new RegExp(`^ {0,${r}}(?:\`\`\`|~~~)`)),headingBeginRegex:_(r=>new RegExp(`^ {0,${r}}#`)),htmlBeginRegex:_(r=>new RegExp(`^ {0,${r}}<(?:[a-z].*>|!--)`,"i")),blockquoteBeginRegex:_(r=>new RegExp(`^ {0,${r}}>`))},me=/^(?:[ \t]*(?:\n|$))+/,Se=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,$e=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,C=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ye=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,G=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,oe=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ce=u(oe).replace(/bull/g,G).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),Re=u(oe).replace(/bull/g,G).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}(?:\s|$)/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),X=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table|[ \t]+\n)[^\n]+)*)/,Te=/^[^\n]+/,U=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,ze=u(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",U).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),_e=u(/^(bull)([ \t][^\n]*?)?(?:\n|$)/).replace(/bull/g,G).getRegex(),O="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",W=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Ae=u("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n*|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>[^\\n]*\\n*|$)|<![A-Z][\\s\\S]*?(?:>[^\\n]*\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>[^\\n]*\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][a-z0-9-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][a-z0-9-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",W).replace("tag",O).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),he=r=>u(X).replace("hr",C).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list",r).replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),Pe=he(/ {0,3}(?:[*+-]|1[.)])[ \t]+[^ \t\n]/),Le=he(/ {0,3}(?:[*+-]|\d{1,9}[.)])(?:[ \t]|\n|$)/),Ee=u(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Le).getRegex(),F={blockquote:Ee,code:Se,def:ze,fences:$e,heading:ye,hr:C,html:Ae,lheading:ce,list:_e,newline:me,paragraph:Pe,table:R,text:Te},ee=u("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",C).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex(),Ie={...F,lheading:Re,table:ee,paragraph:u(X).replace("hr",C).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",ee).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*(?:\\n|$))|~~~)[^\\n]*(?:\\n|$)").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]+[^ \\t\\n]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",O).getRegex()},Ce={...F,html:u(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",W).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:R,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:u(X).replace("hr",C).replace("heading",` *#{1,6} *[^
3
+ ]`).replace("lheading",ce).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Be=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,qe=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,pe=/^( {2,}|\\)\n(?!\s*$)/,ve=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,$=/[\p{P}\p{S}]/u,A=/[\s\p{P}\p{S}]/u,B=/[^\s\p{P}\p{S}]/u,Ze=u(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,A).getRegex(),De=/[\p{Pi}\p{Ps}"']/u,ue=/(?!~)[\p{P}\p{S}]/u,Oe=/(?!~)[\s\p{P}\p{S}]/u,Qe=/(?:[^\s\p{P}\p{S}]|~)/u,Me=u(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",we?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),ge=/^(?:\*+(?:((?!\*)punct)|([^\s*]))?)|^_+(?:((?!_)punct)|([^\s_]))?/,je=u(ge,"u").replace(/punct/g,$).getRegex(),He=u(ge,"u").replace(/punct/g,ue).getRegex(),Ne=/^(?:\*+(?:((?!\*)(?!openQuote)punct)|([^\s*]))?)|^_+(?:((?!_)(?!openQuote)punct)|([^\s_]))?/,Ge=u(Ne,"u").replace(/openQuote/g,De).replace(/punct/g,$).getRegex(),ke="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Xe=u(ke,"gu").replace(/notPunctSpace/g,B).replace(/punctSpace/g,A).replace(/punct/g,$).getRegex(),Ue=u(ke,"gu").replace(/notPunctSpace/g,Qe).replace(/punctSpace/g,Oe).replace(/punct/g,ue).getRegex(),We="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)[\\s](\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|(?:(?!\\*)punct|notPunctSpace)(\\*+)(?!\\*)(?=notPunctSpace)",Fe=u(We,"gu").replace(/notPunctSpace/g,B).replace(/punctSpace/g,A).replace(/punct/g,$).getRegex(),Je=u("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,B).replace(/punctSpace/g,A).replace(/punct/g,$).getRegex(),Ke="^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)[\\s](_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)|(?:(?!_)punct|notPunctSpace)(_+)(?!_)(?=notPunctSpace)",Ve=u(Ke,"gu").replace(/notPunctSpace/g,B).replace(/punctSpace/g,A).replace(/punct/g,$).getRegex(),Ye=u(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,$).getRegex(),et="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",tt=u(et,"gu").replace(/notPunctSpace/g,B).replace(/punctSpace/g,A).replace(/punct/g,$).getRegex(),rt=u(/\\(punct)/,"gu").replace(/punct/g,$).getRegex(),nt=u(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),st=u(W).replace("(?:-->|$)","-->").getRegex(),lt=u("^comment|^</[a-zA-Z][a-zA-Z0-9-]*\\s*>|^<[a-zA-Z][a-zA-Z0-9-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",st).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),it=/\[(?:\\[\s\S]|[^\[\]\\])*\]/,v=u(/(?:\[(?:brackets|\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+(?!`)[^`]*?`+(?!`)|``+(?=\])|[^\[\]\\`])*?/).replace("brackets",it).getRegex(),at=u(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]+(?:\n[ \t]*)?|\n[ \t]*)(title))?\s*\)/).replace("label",v).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]+|(?=\))/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),de=u(/^!?\[(label)\]\[(ref)\]/).replace("label",v).replace("ref",U).getRegex(),fe=u(/^!?\[(ref)\](?:\[\])?/).replace("ref",U).getRegex(),ot=u("reflink|nolink(?!\\()","g").replace("reflink",de).replace("nolink",fe).getRegex(),te=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,J={_backpedal:R,anyPunctuation:rt,autolink:nt,blockSkip:Me,br:pe,code:qe,del:R,delLDelim:R,delRDelim:R,emStrongLDelim:je,emStrongRDelimAst:Xe,emStrongRDelimUnd:Je,escape:Be,link:at,nolink:fe,punctuation:Ze,reflink:de,reflinkSearch:ot,tag:lt,text:ve,url:R},ct={...J,emStrongLDelim:Ge,emStrongRDelimAst:Fe,emStrongRDelimUnd:Ve,link:u(/^!?\[(label)\]\((.*?)\)/).replace("label",v).getRegex(),reflink:u(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",v).getRegex()},M={...J,emStrongRDelimAst:Ue,emStrongLDelim:He,delLDelim:Ye,delRDelim:tt,url:u(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",te).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![\w-])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:u(/^(`+|~+|[^`~])(?:(?=[`~])|(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",te).getRegex()},ht={...M,br:u(pe).replace("{2,}","*").getRegex(),text:u(M.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},q={normal:F,gfm:Ie,pedantic:Ce},E={normal:J,gfm:M,breaks:ht,pedantic:ct},pt={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},re=r=>pt[r];function b(r,e){if(e){if(f.escapeTest.test(r))return r.replace(f.escapeReplace,re)}else if(f.escapeTestNoEncode.test(r))return r.replace(f.escapeReplaceNoEncode,re);return r}function ne(r){try{r=encodeURI(r).replace(f.percentDecode,"%")}catch{return null}return r}function se(r,e){let t=r.replace(f.findPipe,(l,a,i)=>{let c=!1,o=a;for(;--o>=0&&i[o]==="\\";)c=!c;return c?"|":" |"}),s=t.split(f.splitPipe),n=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;n<s.length;n++)s[n]=s[n].trim().replace(f.slashPipe,"|");return s}function y(r,e,t){let s=r.length;if(s===0)return"";let n=0;for(;n<s;){let l=r.charAt(s-n-1);if(l===e&&!t)n++;else if(l!==e&&t)n++;else break}return r.slice(0,s-n)}function le(r){let e=r.split(`
4
+ `),t=e.length-1;for(;t>=0&&f.blankLine.test(e[t]);)t--;return e.length-t<=2?r:e.slice(0,t+1).join(`
5
+ `)}function ut(r,e){if(r.indexOf(e[1])===-1)return-1;let t=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])t++;else if(r[s]===e[1]&&(t--,t<0))return s;return t>0?-2:-1}function gt(r,e=0){let t=e,s="";for(let n of r)if(n===" "){let l=4-t%4;s+=" ".repeat(l),t+=l}else s+=n,t++;return s}function ie(r,e,t,s,n){let l=e.href,a=e.title||null,i=r[1].replace(n.other.outputLinkReplace,"$1"),c=r[0].charAt(0)==="!";s.state.inLink=!0;let o=s.state.linkEmitted,p=s.state.inRawBlock;s.state.linkEmitted=!1;let h=s.inlineTokens(i),g=s.state.linkEmitted;if(s.state.linkEmitted=o,s.state.inLink=!1,!c){if(g){s.state.inRawBlock=p;return}s.state.linkEmitted=!0}return{type:c?"image":"link",raw:t,href:l,title:a,text:i,tokens:h}}function kt(r,e,t){let s=r.match(t.other.indentCodeCompensation);if(s===null)return e;let n=s[1];return e.split(`
6
+ `).map(l=>{let a=l.match(t.other.beginningSpace);if(a===null)return l;let[i]=a;return l.slice(Math.min(i.length,n.length))}).join(`
7
+ `)}var Z=class{options;rules;lexer;constructor(r){this.options=r||z}space(r){let e=this.rules.block.newline.exec(r);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(r){let e=this.rules.block.code.exec(r);if(e){let t=this.options.pedantic?e[0]:le(e[0]),s=t.replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t,codeBlockStyle:"indented",text:s}}}fences(r){let e=this.rules.block.fences.exec(r);if(e){let t=e[0],s=kt(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:s}}}heading(r){let e=this.rules.block.heading.exec(r);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let s=y(t,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceTabChar.test(s))&&(t=s.trim())}return{type:"heading",raw:y(e[0],`
8
+ `),depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(r){let e=this.rules.block.hr.exec(r);if(e)return{type:"hr",raw:y(e[0],`
9
+ `)}}blockquote(r){let e=this.rules.block.blockquote.exec(r);if(e){let t=y(e[0],`
10
+ `).split(`
11
+ `),s="",n="",l=[];for(;t.length>0;){let a=!1,i=[],c;for(c=0;c<t.length;c++)if(this.rules.other.blockquoteStart.test(t[c]))i.push(t[c]),a=!0;else if(!a)i.push(t[c]);else break;t=t.slice(c);let o=i.join(`
12
+ `),p=o.replace(this.rules.other.blockquoteSetextReplace,`
13
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
14
+ ${o}`:o,n=n?`${n}
15
+ ${p}`:p;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(p,l,!0),this.lexer.state.top=h,t.length===0)break;let g=l.at(-1);if(g?.type==="code")break;if(g?.type==="blockquote"){let x=g,d=t.join(`
16
+ `),S=x.raw+`
17
+ `+d.replace(this.rules.other.blockquoteSetextReplace2,""),P=this.blockquote(S);l[l.length-1]=P,s=`${s}
18
+ ${d}`,n=n.substring(0,n.length-x.text.length)+P.text;break}else if(g?.type==="list"){let x=g,d=x.raw+`
19
+ `+t.join(`
20
+ `),S=this.list(d);l[l.length-1]=S,s=s.substring(0,s.length-g.raw.length)+S.raw,n=n.substring(0,n.length-x.raw.length)+S.raw,t=d.substring(l.at(-1).raw.length).split(`
21
+ `);continue}}return{type:"blockquote",raw:s,tokens:l,text:n}}}list(r){let e=this.rules.block.list.exec(r);if(e){let t=e[1].trim(),s=t.length>1,n={type:"list",raw:"",ordered:s,start:s?+t.slice(0,-1):"",loose:!1,items:[]};t=s?`\\d{1,9}\\${t.slice(-1)}`:`\\${t}`,this.options.pedantic&&(t=s?t:"[*+-]");let l=this.rules.other.listItemRegex(t),a=!1;for(;r;){let c=!1,o="",p="";if(!(e=l.exec(r))||this.rules.block.hr.test(r))break;o=e[0],r=r.substring(o.length);let h=gt(e[2].split(`
22
+ `,1)[0],e[1].length),g=r.split(`
23
+ `,1)[0],x=!h.trim(),d=0;if(this.options.pedantic?(d=2,p=h.trimStart()):x?d=e[1].length+1:(d=h.search(this.rules.other.nonSpaceChar),d=d>4?1:d,p=h.slice(d),d+=e[1].length),x&&this.rules.other.blankLine.test(g)&&(o+=g+`
24
+ `,r=r.substring(g.length+1),c=!0),!c){let S=this.rules.other.nextBulletRegex(d),P=this.rules.other.hrRegex(d),V=this.rules.other.fencesBeginRegex(d),Y=this.rules.other.headingBeginRegex(d),xe=this.rules.other.htmlBeginRegex(d),be=this.rules.other.blockquoteBeginRegex(d);for(;r;){let Q=r.split(`
25
+ `,1)[0],L;if(g=Q,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),L=g):L=g.replace(this.rules.other.tabCharGlobal," "),V.test(g)||Y.test(g)||xe.test(g)||be.test(g)||S.test(g)||P.test(g))break;if(L.search(this.rules.other.nonSpaceChar)>=d||!g.trim())p+=`
26
+ `+L.slice(d);else{if(x||h.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||V.test(h)||Y.test(h)||P.test(h))break;p+=`
27
+ `+g}x=!g.trim(),o+=Q+`
28
+ `,r=r.substring(Q.length+1),h=L.slice(d)}}n.loose||(a?n.loose=!0:this.rules.other.doubleBlankLine.test(o)&&(a=!0)),n.items.push({type:"list_item",raw:o,task:!!this.options.gfm&&this.rules.other.listIsTask.test(p),loose:!1,text:p,tokens:[]}),n.raw+=o}let i=n.items.at(-1);if(i)i.raw=i.raw.trimEnd(),i.text=i.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let c of n.items)if(this.lexer.state.top=!1,c.tokens=this.lexer.blockTokens(c.text,[]),!n.loose){let o=c.tokens.filter(h=>h.type==="space"),p=o.length>0&&o.some(h=>this.rules.other.anyLine.test(h.raw));n.loose=p}for(let c of n.items){let o=c.tokens[0];if(c.task&&(o?.type==="text"||o?.type==="paragraph")){c.text=c.text.replace(this.rules.other.listReplaceTask,""),o.raw=o.raw.replace(this.rules.other.listReplaceTask,""),o.text=o.text.replace(this.rules.other.listReplaceTask,"");for(let h=this.lexer.inlineQueue.length-1;h>=0;h--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[h].src)){this.lexer.inlineQueue[h].src=this.lexer.inlineQueue[h].src.replace(this.rules.other.listReplaceTask,"");break}let p=this.rules.other.listTaskCheckbox.exec(c.raw);if(p){let h={type:"checkbox",raw:p[0]+" ",checked:p[0]!=="[ ]"};c.checked=h.checked,n.loose?c.tokens[0]&&["paragraph","text"].includes(c.tokens[0].type)&&"tokens"in c.tokens[0]&&c.tokens[0].tokens?(c.tokens[0].raw=h.raw+c.tokens[0].raw,c.tokens[0].text=h.raw+c.tokens[0].text,c.tokens[0].tokens.unshift(h)):c.tokens.unshift({type:"paragraph",raw:h.raw,text:h.raw,tokens:[h]}):c.tokens.unshift(h)}}else c.task&&(c.task=!1)}if(n.loose)for(let c of n.items){c.loose=!0;for(let o of c.tokens)o.type==="text"&&(o.type="paragraph")}return n}}html(r){let e=this.rules.block.html.exec(r);if(e){let t=le(e[0]);return{type:"html",block:!0,raw:t,pre:e[1]==="pre"||e[1]==="script"||e[1]==="style",text:t}}}def(r){let e=this.rules.block.def.exec(r);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:y(e[0],`
29
+ `),href:s,title:n}}}table(r){let e=this.rules.block.table.exec(r);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let t=se(e[1]),s=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split(`
30
+ `):[],l={type:"table",raw:y(e[0],`
31
+ `),header:[],align:[],rows:[]};if(t.length===s.length){for(let a of s)this.rules.other.tableAlignRight.test(a)?l.align.push("right"):this.rules.other.tableAlignCenter.test(a)?l.align.push("center"):this.rules.other.tableAlignLeft.test(a)?l.align.push("left"):l.align.push(null);for(let a=0;a<t.length;a++)l.header.push({text:t[a],tokens:this.lexer.inline(t[a]),header:!0,align:l.align[a]});for(let a of n)l.rows.push(se(a,l.header.length).map((i,c)=>({text:i,tokens:this.lexer.inline(i),header:!1,align:l.align[c]})));return l}}lheading(r){let e=this.rules.block.lheading.exec(r);if(e){let t=e[1].trim();return{type:"heading",raw:y(e[0],`
32
+ `),depth:e[2].charAt(0)==="="?1:2,text:t,tokens:this.lexer.inline(t)}}}paragraph(r){let e=this.rules.block.paragraph.exec(r);if(e){let t=e[1].charAt(e[1].length-1)===`
33
+ `?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(r){let e=this.rules.block.text.exec(r);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(r){let e=this.rules.inline.escape.exec(r);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(r){let e=this.rules.inline.tag.exec(r);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(r){let e=this.rules.inline.link.exec(r);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let l=y(t.slice(0,-1),"\\");if((t.length-l.length)%2===0)return}else{let l=ut(e[2],"()");if(l===-2)return;if(l>-1){let a=(e[0].indexOf("!")===0?5:4)+e[1].length+l;e[2]=e[2].substring(0,l),e[0]=e[0].substring(0,a).trim(),e[3]=""}}let s=e[2],n="";if(this.options.pedantic){let l=this.rules.other.pedanticHrefTitle.exec(s);l&&(s=l[1],n=l[3])}else n=e[3]?e[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?s=s.slice(1):s=s.slice(1,-1)),ie(e,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(r,e){let t;if((t=this.rules.inline.reflink.exec(r))||(t=this.rules.inline.nolink.exec(r))){let s=(t[2]||t[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=e[s.toLowerCase()];if(!n){let l=t[0].charAt(0);return{type:"text",raw:l,text:l}}return ie(t,n,t[0],this.lexer,this.rules)}}emStrong(r,e,t=""){let s=this.rules.inline.emStrongLDelim.exec(r);if(!(!s||!s[1]&&!s[2]&&!s[3]&&!s[4]||s[4]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[3])||!t||this.rules.inline.punctuation.exec(t))){let n=[...s[0]].length-1,l,a,i=n,c=0,o=s[0][0],p=t===o,h=o==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,e=e.slice(-1*r.length+n);(s=h.exec(e))!==null;){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l)continue;if(a=[...l].length,s[3]||s[4]){i+=a;continue}else if(s[5]||s[6]){if(n%3&&!((n+a)%3)){c+=a;continue}if(p)break}if(i-=a,i>0)continue;a=Math.min(a,a+i+c);let g=[...s[0]][0].length,x=r.slice(0,n+s.index+g+a);if(Math.min(n,a)%2){let S=x.slice(1,-1);return{type:"em",raw:x,text:S,tokens:this.lexer.inlineTokens(S)}}let d=x.slice(2,-2);return{type:"strong",raw:x,text:d,tokens:this.lexer.inlineTokens(d)}}}}codespan(r){let e=this.rules.inline.code.exec(r);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(t),n=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return s&&n&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(r){let e=this.rules.inline.br.exec(r);if(e)return{type:"br",raw:e[0]}}del(r,e,t=""){let s=this.rules.inline.delLDelim.exec(r);if(s&&(!s[1]||!t||this.rules.inline.punctuation.exec(t))){let n=[...s[0]].length-1,l,a,i=n,c=this.rules.inline.delRDelim;for(c.lastIndex=0,e=e.slice(-1*r.length+n);(s=c.exec(e))!==null;){if(l=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!l||(a=[...l].length,a!==n))continue;if(s[3]||s[4]){i+=a;continue}if(i-=a,i>0)continue;a=Math.min(a,a+i);let o=[...s[0]][0].length,p=r.slice(0,n+s.index+o+a),h=p.slice(n,-n);return{type:"del",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}}}autolink(r){let e=this.rules.inline.autolink.exec(r);if(e){let t,s;return e[2]==="@"?(t=e[1],s="mailto:"+t):(t=e[1],s=t),{type:"link",raw:e[0],text:t,href:s,autolink:!0,tokens:[{type:"text",raw:t,text:t}]}}}url(r){let e;if(e=this.rules.inline.url.exec(r)){let t,s;if(e[2]==="@")t=e[0],s="mailto:"+t;else{let n;do n=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??"";while(n!==e[0]);t=e[0],e[1]==="www."?s="http://"+e[0]:s=e[0]}return{type:"link",raw:e[0],text:t,href:s,autolink:!0,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(r){let e=this.rules.inline.text.exec(r);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},w=class j{tokens;options;state;inlineQueue;tokenizer;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||z,this.options.tokenizer=this.options.tokenizer||new Z,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,linkEmitted:!1,top:!0};let t={other:f,block:q.normal,inline:E.normal};this.options.pedantic?(t.block=q.pedantic,t.inline=E.pedantic):this.options.gfm&&(t.block=q.gfm,this.options.breaks?t.inline=E.breaks:t.inline=E.gfm),this.tokenizer.rules=t}static get rules(){return{block:q,inline:E}}static lex(e,t){return new j(t).lex(e)}static lexInline(e,t){return new j(t).inlineTokens(e)}lex(e){e=e.replace(f.carriageReturn,`
34
+ `),this.blockTokens(e,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let s=this.inlineQueue[t];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],s=!1){this.tokenizer.lexer=this,this.options.pedantic&&(e=e.replace(f.tabCharGlobal," ").replace(f.spaceLine,""));let n=1/0;for(;e;){if(e.length<n)n=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}let l;if(this.options.extensions?.block?.some(i=>(l=i.call({lexer:this},e,t))?(e=e.substring(l.raw.length),t.push(l),!0):!1))continue;if(l=this.tokenizer.space(e)){e=e.substring(l.raw.length);let i=t.at(-1);l.raw.length===1&&i!==void 0?i.raw+=`
35
+ `:t.push(l);continue}if(l=this.tokenizer.code(e)){e=e.substring(l.raw.length);let i=t.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(`
36
+ `)?"":`
37
+ `)+l.raw,i.text+=`
38
+ `+l.text,this.inlineQueue.at(-1).src=i.text):t.push(l);continue}if(l=this.tokenizer.fences(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.heading(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.hr(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.blockquote(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.list(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.html(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.def(e)){e=e.substring(l.raw.length);let i=t.at(-1);i?.type==="paragraph"||i?.type==="text"?(i.raw+=(i.raw.endsWith(`
39
+ `)?"":`
40
+ `)+l.raw,i.text+=`
41
+ `+l.raw,this.inlineQueue.at(-1).src=i.text):this.tokens.links[l.tag]||(this.tokens.links[l.tag]={href:l.href,title:l.title},t.push(l));continue}if(l=this.tokenizer.table(e)){e=e.substring(l.raw.length),t.push(l);continue}if(l=this.tokenizer.lheading(e)){e=e.substring(l.raw.length),t.push(l);continue}let a=e;if(this.options.extensions?.startBlock){let i=1/0,c=e.slice(1),o;this.options.extensions.startBlock.forEach(p=>{o=p.call({lexer:this},c),typeof o=="number"&&o>=0&&(i=Math.min(i,o))}),i<1/0&&i>=0&&(a=e.substring(0,i+1))}if(this.state.top&&(l=this.tokenizer.paragraph(a))){let i=t.at(-1);s&&i?.type==="paragraph"?(i.raw+=(i.raw.endsWith(`
42
+ `)?"":`
43
+ `)+l.raw,i.text+=`
44
+ `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(l),s=a.length!==e.length,e=e.substring(l.raw.length);continue}if(l=this.tokenizer.text(e)){e=e.substring(l.raw.length);let i=t.at(-1);i?.type==="text"?(i.raw+=(i.raw.endsWith(`
45
+ `)?"":`
46
+ `)+l.raw,i.text+=`
47
+ `+l.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=i.text):t.push(l);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}linkInText(e){if(!e.includes("["))return!1;let t=this.tokenizer.rules.inline.link;for(let s of e.matchAll(this.tokenizer.rules.inline.blockSkip))if(t.test(s[0])&&e.charAt(s.index-1)!=="!")return!0;for(let s of e.matchAll(this.tokenizer.rules.inline.reflinkSearch)){let n=s[0],l=n.lastIndexOf("[");if(!(n.charAt(0)==="!"||!Object.hasOwn(this.tokens.links,n.slice(l+1,-1)))&&!(l>1&&this.linkInText(n.slice(1,l-1))))return!0}return!1}inlineTokens(e,t=[]){this.tokenizer.lexer=this;let s=e;if(this.tokens.links&&e.includes("[")){let i=this.tokenizer.rules.inline.reflinkSearch,c=o=>{let p=o.lastIndexOf("[");if(!Object.hasOwn(this.tokens.links,o.slice(p+1,-1)))return o;if(p>1&&o.charAt(0)!=="!"){let h=o.slice(1,p-1);if(this.linkInText(h))return"["+h.replace(i,c)+"]["+"a".repeat(o.length-p-2)+"]"}return"["+"a".repeat(o.length-2)+"]"};s=s.replace(i,c)}s=s.replace(this.tokenizer.rules.inline.anyPunctuation,i=>"+".repeat(i.length)),s=s.replace(this.tokenizer.rules.inline.blockSkip,(i,c,o)=>{let p=o?o.length:0;return i.slice(0,p)+"["+"a".repeat(i.length-p-2)+"]"}),s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let n=!1,l="",a=1/0;for(;e;){if(e.length<a)a=e.length;else{this.infiniteLoopError(e.charCodeAt(0));break}n||(l=""),n=!1;let i;if(this.options.extensions?.inline?.some(o=>(i=o.call({lexer:this},e,t))?(e=e.substring(i.raw.length),t.push(i),!0):!1))continue;if(i=this.tokenizer.escape(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.tag(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.link(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(i.raw.length);let o=t.at(-1);i.type==="text"&&o?.type==="text"?(o.raw+=i.raw,o.text+=i.text):t.push(i);continue}if(i=this.tokenizer.emStrong(e,s,l)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.codespan(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.br(e)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.del(e,s,l)){e=e.substring(i.raw.length),t.push(i);continue}if(i=this.tokenizer.autolink(e)){e=e.substring(i.raw.length),t.push(i);continue}if(!this.state.inLink&&(i=this.tokenizer.url(e))){e=e.substring(i.raw.length),t.push(i);continue}let c=e;if(this.options.extensions?.startInline){let o=1/0,p=e.slice(1),h;this.options.extensions.startInline.forEach(g=>{h=g.call({lexer:this},p),typeof h=="number"&&h>=0&&(o=Math.min(o,h))}),o<1/0&&o>=0&&(c=e.substring(0,o+1))}if(i=this.tokenizer.inlineText(c)){e=e.substring(i.raw.length),i.raw.slice(-1)!=="_"&&(l=i.raw.slice(-1)),n=!0;let o=t.at(-1);o?.type==="text"?(o.raw+=i.raw,o.text+=i.text):t.push(i);continue}if(e){this.infiniteLoopError(e.charCodeAt(0));break}}return t}infiniteLoopError(e){let t="Infinite loop on byte: "+e;if(this.options.silent)console.error(t);else throw new Error(t)}},D=class{options;parser;constructor(r){this.options=r||z}space(r){return""}code({text:r,lang:e,escaped:t}){let s=(e||"").match(f.notSpaceStart)?.[0],n=r?r.replace(f.endingNewline,"")+`
48
+ `:"";return s?'<pre><code class="language-'+b(s)+'">'+(t?n:b(n,!0))+`</code></pre>
49
+ `:"<pre><code>"+(t?n:b(n,!0))+`</code></pre>
50
+ `}blockquote({tokens:r}){return`<blockquote>
51
+ ${this.parser.parse(r)}</blockquote>
52
+ `}html({text:r}){return r}def(r){return""}heading({tokens:r,depth:e}){return`<h${e}>${this.parser.parseInline(r)}</h${e}>
53
+ `}hr(r){return`<hr>
54
+ `}list(r){let e=r.ordered,t=r.start,s="";for(let a=0;a<r.items.length;a++){let i=r.items[a];s+=this.listitem(i)}let n=e?"ol":"ul",l=e&&t!==1?' start="'+t+'"':"";return"<"+n+l+`>
55
+ `+s+"</"+n+`>
56
+ `}listitem(r){return`<li>${this.parser.parse(r.tokens)}</li>
57
+ `}checkbox({checked:r}){return"<input "+(r?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:r}){return`<p>${this.parser.parseInline(r)}</p>
58
+ `}table(r){let e="",t="";for(let n=0;n<r.header.length;n++)t+=this.tablecell(r.header[n]);e+=this.tablerow({text:t});let s="";for(let n=0;n<r.rows.length;n++){let l=r.rows[n];t="";for(let a=0;a<l.length;a++)t+=this.tablecell(l[a]);s+=this.tablerow({text:t})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
59
+ <thead>
60
+ `+e+`</thead>
61
+ `+s+`</table>
62
+ `}tablerow({text:r}){return`<tr>
63
+ ${r}</tr>
64
+ `}tablecell(r){let e=this.parser.parseInline(r.tokens),t=r.header?"th":"td";return(r.align?`<${t} align="${r.align}">`:`<${t}>`)+e+`</${t}>
65
+ `}strong({tokens:r}){return`<strong>${this.parser.parseInline(r)}</strong>`}em({tokens:r}){return`<em>${this.parser.parseInline(r)}</em>`}codespan({text:r}){return`<code>${b(r,!0)}</code>`}br(r){return"<br>"}del({tokens:r}){return`<del>${this.parser.parseInline(r)}</del>`}link({href:r,title:e,text:t,tokens:s,autolink:n}){let l=n?b(t,!0):this.parser.parseInline(s),a=ne(r);if(a===null)return l;r=b(a,n);let i='<a href="'+r+'"';return e&&(i+=' title="'+b(e)+'"'),i+=">"+l+"</a>",i}image({href:r,title:e,text:t,tokens:s}){s&&(t=this.parser.parseInline(s,this.parser.textRenderer));let n=ne(r);if(n===null)return b(t);r=n;let l=`<img src="${b(r)}" alt="${b(t)}"`;return e&&(l+=` title="${b(e)}"`),l+=">",l}text(r){return"tokens"in r&&r.tokens?this.parser.parseInline(r.tokens):"escaped"in r&&r.escaped?r.text:b(r.text)}},K=class{strong({text:r}){return r}em({text:r}){return r}codespan({text:r}){return r}del({text:r}){return r}html({text:r}){return r}text({text:r}){return r}link({text:r}){return""+r}image({text:r}){return""+r}br(){return""}checkbox({raw:r}){return r}},m=class H{options;renderer;textRenderer;constructor(e){this.options=e||z,this.options.renderer=this.options.renderer||new D,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new K}static parse(e,t){return new H(t).parse(e)}static parseInline(e,t){return new H(t).parseInline(e)}parse(e){this.renderer.parser=this;let t="";for(let s=0;s<e.length;s++){let n=e[s];if(this.options.extensions?.renderers?.[n.type]){let a=n,i=this.options.extensions.renderers[a.type].call({parser:this},a);if(i!==!1||!["space","hr","heading","code","table","blockquote","list","checkbox","html","def","paragraph","text"].includes(a.type)){t+=i||"";continue}}let l=n;switch(l.type){case"space":{t+=this.renderer.space(l);break}case"hr":{t+=this.renderer.hr(l);break}case"heading":{t+=this.renderer.heading(l);break}case"code":{t+=this.renderer.code(l);break}case"table":{t+=this.renderer.table(l);break}case"blockquote":{t+=this.renderer.blockquote(l);break}case"list":{t+=this.renderer.list(l);break}case"checkbox":{t+=this.renderer.checkbox(l);break}case"html":{t+=this.renderer.html(l);break}case"def":{t+=this.renderer.def(l);break}case"paragraph":{t+=this.renderer.paragraph(l);break}case"text":{t+=this.renderer.text(l);break}default:{let a='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return t}parseInline(e,t=this.renderer){this.renderer.parser=this;let s="";for(let n=0;n<e.length;n++){let l=e[n];if(this.options.extensions?.renderers?.[l.type]){let i=this.options.extensions.renderers[l.type].call({parser:this},l);if(i!==!1||!["escape","html","link","image","checkbox","strong","em","codespan","br","del","text"].includes(l.type)){s+=i||"";continue}}let a=l;switch(a.type){case"escape":{s+=t.text(a);break}case"html":{s+=t.html(a);break}case"link":{s+=t.link(a);break}case"image":{s+=t.image(a);break}case"checkbox":{s+=t.checkbox(a);break}case"strong":{s+=t.strong(a);break}case"em":{s+=t.em(a);break}case"codespan":{s+=t.codespan(a);break}case"br":{s+=t.br(a);break}case"del":{s+=t.del(a);break}case"text":{s+=t.text(a);break}default:{let i='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(i),"";throw new Error(i)}}}return s}},I=class{options;block;constructor(r){this.options=r||z}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(r){return r}postprocess(r){return r}processAllTokens(r){return r}emStrongMask(r){return r}provideLexer(r=this.block){return r?w.lex:w.lexInline}provideParser(r=this.block){return r?m.parse:m.parseInline}},dt=class{defaults=N();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=m;Renderer=D;TextRenderer=K;Lexer=w;Tokenizer=Z;Hooks=I;constructor(...r){this.use(...r)}walkTokens(r,e){let t=[];for(let s of r)switch(t=t.concat(e.call(this,s)),s.type){case"table":{let n=s;for(let l of n.header)t=t.concat(this.walkTokens(l.tokens,e));for(let l of n.rows)for(let a of l)t=t.concat(this.walkTokens(a.tokens,e));break}case"list":{let n=s;t=t.concat(this.walkTokens(n.items,e));break}default:{let n=s;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let a=n[l].flat(1/0);t=t.concat(this.walkTokens(a,e))}):n.tokens&&(t=t.concat(this.walkTokens(n.tokens,e)))}}return t}use(...r){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return r.forEach(t=>{let s={...t};if(s.async=this.defaults.async||s.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let l=e.renderers[n.name];l?e.renderers[n.name]=function(...a){let i=n.renderer.apply(this,a);return i===!1&&(i=l.apply(this,a)),i}:e.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let l=e[n.level];l?l.unshift(n.tokenizer):e[n.level]=[n.tokenizer],n.start&&(n.level==="block"?e.startBlock?e.startBlock.push(n.start):e.startBlock=[n.start]:n.level==="inline"&&(e.startInline?e.startInline.push(n.start):e.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(e.childTokens[n.name]=n.childTokens)}),s.extensions=e),t.renderer){let n=this.defaults.renderer||new D(this.defaults);for(let l in t.renderer){if(!(l in n))throw new Error(`renderer '${l}' does not exist`);if(["options","parser"].includes(l))continue;let a=l,i=t.renderer[a],c=n[a];n[a]=(...o)=>{let p=i.apply(n,o);return p===!1&&(p=c.apply(n,o)),p||""}}s.renderer=n}if(t.tokenizer){let n=this.defaults.tokenizer||new Z(this.defaults);for(let l in t.tokenizer){if(!(l in n))throw new Error(`tokenizer '${l}' does not exist`);if(["options","rules","lexer"].includes(l))continue;let a=l,i=t.tokenizer[a],c=n[a];n[a]=(...o)=>{let p=i.apply(n,o);return p===!1&&(p=c.apply(n,o)),p}}s.tokenizer=n}if(t.hooks){let n=this.defaults.hooks||new I;for(let l in t.hooks){if(!(l in n))throw new Error(`hook '${l}' does not exist`);if(["options","block"].includes(l))continue;let a=l,i=t.hooks[a],c=n[a];I.passThroughHooks.has(l)?n[a]=o=>{if(this.defaults.async&&I.passThroughHooksRespectAsync.has(l))return(async()=>{let h=await i.call(n,o);return c.call(n,h)})();let p=i.call(n,o);return c.call(n,p)}:n[a]=(...o)=>{if(this.defaults.async)return(async()=>{let h=await i.apply(n,o);return h===!1&&(h=await c.apply(n,o)),h})();let p=i.apply(n,o);return p===!1&&(p=c.apply(n,o)),p}}s.hooks=n}if(t.walkTokens){let n=this.defaults.walkTokens,l=t.walkTokens;s.walkTokens=function(a){let i=[];return i.push(l.call(this,a)),n&&(i=i.concat(n.call(this,a))),i}}this.defaults={...this.defaults,...s}}),this}setOptions(r){return this.defaults={...this.defaults,...r},this}lexer(r,e){return w.lex(r,e??this.defaults)}parser(r,e){return m.parse(r,e??this.defaults)}parseMarkdown(r){return(e,t)=>{let s={...t},n={...this.defaults,...s},l=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&s.async===!1)return l(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||e===null)return l(new Error("marked(): input parameter is undefined or null"));if(typeof e!="string")return l(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=r),n.async)return(async()=>{let a=n.hooks?await n.hooks.preprocess(e):e,i=await(n.hooks?await n.hooks.provideLexer(r):r?w.lex:w.lexInline)(a,n),c=n.hooks?await n.hooks.processAllTokens(i):i;n.walkTokens&&await Promise.all(this.walkTokens(c,n.walkTokens));let o=await(n.hooks?await n.hooks.provideParser(r):r?m.parse:m.parseInline)(c,n);return n.hooks?await n.hooks.postprocess(o):o})().catch(l);try{n.hooks&&(e=n.hooks.preprocess(e));let a=(n.hooks?n.hooks.provideLexer(r):r?w.lex:w.lexInline)(e,n);n.hooks&&(a=n.hooks.processAllTokens(a)),n.walkTokens&&this.walkTokens(a,n.walkTokens);let i=(n.hooks?n.hooks.provideParser(r):r?m.parse:m.parseInline)(a,n);return n.hooks&&(i=n.hooks.postprocess(i)),i}catch(a){return l(a)}}}onError(r,e){return t=>{if(t.message+=`
66
+ Please report this to https://github.com/markedjs/marked.`,r){let s="<p>An error occurred:</p><pre>"+b(t.message+"",!0)+"</pre>";return e?Promise.resolve(s):s}if(e)return Promise.reject(t);throw t}}},T=new dt;function k(r,e){return T.parse(r,e)}k.options=k.setOptions=function(r){return T.setOptions(r),k.defaults=T.defaults,ae(k.defaults),k};k.getDefaults=N;k.defaults=z;function ft(...r){return T.use(...r),k.defaults=T.defaults,ae(k.defaults),k}k.use=ft;k.walkTokens=function(r,e){return T.walkTokens(r,e)};k.parseInline=T.parseInline;k.Parser=m;k.parser=m.parse;k.Renderer=D;k.TextRenderer=K;k.Lexer=w;k.lexer=w.lex;k.Tokenizer=Z;k.Hooks=I;k.parse=k;var xt=k.options,bt=k.setOptions,wt=k.walkTokens,mt=k.parseInline;var St=m.parse,$t=w.lex;export{k as a};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{a as u}from"./A6LBMS7A.js";import{Dc as d}from"./M2U456J5.js";import{Dd as s}from"./CSE6BHOJ.js";async function f(o,a,n){let e=n.map?.allLayers.find(r=>r.id===o);if(!e)return{text:`Error: Layer with id ${o} not found`};let t=a?.trim()?a:"1=1",l=e.createQuery();l.where=t;try{let{extent:r,count:i}=await e.queryExtent(l);if(i===0)return{text:`No features found in ${e.title} matching: ${t}`,where:t};if(r)await n.goTo(r);else return{text:`Error: Unable to determine extent for ${e.title}`,where:t};let c={layerId:o,layerTitle:e.title??o,where:t,count:i};return{text:`Successfully zoomed to ${i} feature(s) in ${e.title} matching: ${t}`,where:t,sharedStatePatch:{lastNavigatedFeatures:{value:c}}}}catch(r){return console.error("Error in goToFeatures:",r),{text:`Error: ${r instanceof Error?r.message:"Unknown error"}`,where:t}}}async function h({layerId:o,where:a},n){let{mapView:e}=u(n,["mapView"]);return await f(o,a,e)}var m=s.object({layerId:s.string().describe("The layerId of the layer to zoom to."),where:s.string().describe("ArcGIS SQL-92 WHERE expression used for `query.where` on the selected layer. Start with a fresh filter for the current request unless the task explicitly refers to prior results. Use only field name values from the selected layer, not aliases. Use field metadata only to interpret intent: prefer LIKE '%value%' for string fields, and use =, <, >, BETWEEN, IN, IS NULL, AND/OR/NOT as appropriate for number/date fields. For coded-value domain fields, use the domain code already provided in layerInfo.domain.codedValues, never the display label. Respect range-domain bounds when they are provided. Do NOT include subqueries, nested SELECT, JOIN, GROUP BY, HAVING, ORDER BY, or semicolons.")}),E=d(h,{name:"goToFeatures",description:"Go to the features that match the given filter for the given layerId. Use coded-value domain codes from layer field metadata when building the WHERE clause.",schema:m});export{E as a};
@@ -1,5 +1,5 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{b as Q}from"./YIMNOUTF.js";var xu,$n=Object.freeze({status:"aborted"});function s(t,r,i){function o(c,l){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),c._zod.traits.has(t))return;c._zod.traits.add(t),r(c,l);let u=a.prototype,d=Object.keys(u);for(let p=0;p<d.length;p++){let _=d[p];_ in c||(c[_]=u[_].bind(c))}}let e=i?.Parent??Object;class n extends e{}Object.defineProperty(n,"name",{value:t});function a(c){var l;let u=i?.Parent?new n:this;o(u,c),(l=u._zod).deferred??(l.deferred=[]);for(let d of u._zod.deferred)d();return u}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:c=>i?.Parent&&c instanceof i.Parent?!0:c?._zod?.traits?.has(t)}),Object.defineProperty(a,"name",{value:t}),a}var hn=Symbol("zod_brand"),G=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},ne=class extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}};(xu=globalThis).__zod_globalConfig??(xu.__zod_globalConfig={});var pe=globalThis.__zod_globalConfig;function U(t){return t&&Object.assign(pe,t),pe}var v={};Q(v,{BIGINT_FORMAT_RANGES:()=>jn,Class:()=>yn,NUMBER_FORMAT_RANGES:()=>wn,aborted:()=>ce,allowsEval:()=>kn,assert:()=>Sd,assertEqual:()=>xd,assertIs:()=>zd,assertNever:()=>Id,assertNotEqual:()=>kd,assignProp:()=>oe,base64ToUint8Array:()=>zu,base64urlToUint8Array:()=>Vd,cached:()=>ke,captureStackTrace:()=>Dt,cleanEnum:()=>Jd,cleanRegex:()=>tt,clone:()=>T,cloneDef:()=>jd,createTransparentProxy:()=>Nd,defineLazy:()=>z,esc:()=>Zt,escapeRegex:()=>K,explicitlyAborted:()=>Pn,extend:()=>Ad,finalizeIssue:()=>E,floatSafeRemainder:()=>bn,getElementAtPath:()=>Pd,getEnumValues:()=>et,getLengthableOrigin:()=>it,getParsedType:()=>Dd,getSizableOrigin:()=>nt,hexToUint8Array:()=>Kd,isObject:()=>fe,isPlainObject:()=>ae,issue:()=>ze,joinValues:()=>m,jsonStringifyReplacer:()=>xe,merge:()=>Rd,mergeDefs:()=>ee,normalizeParams:()=>h,nullish:()=>ie,numKeys:()=>Zd,objectClone:()=>wd,omit:()=>Ed,optionalKeys:()=>Sn,parsedType:()=>g,partial:()=>Cd,pick:()=>Td,prefixIssues:()=>C,primitiveTypes:()=>In,promiseAllObject:()=>Ud,propertyKeyTypes:()=>rt,randomString:()=>Od,required:()=>Fd,safeExtend:()=>Ld,shallowClone:()=>zn,slugify:()=>xn,stringifyPrimitive:()=>f,uint8ArrayToBase64:()=>Iu,uint8ArrayToBase64url:()=>Md,uint8ArrayToHex:()=>Gd,unwrapMessage:()=>Qe});function xd(t){return t}function kd(t){return t}function zd(t){}function Id(t){throw new Error("Unexpected value in exhaustive check")}function Sd(t){}function et(t){let r=Object.values(t).filter(o=>typeof o=="number");return Object.entries(t).filter(([o,e])=>r.indexOf(+o)===-1).map(([o,e])=>e)}function m(t,r="|"){return t.map(i=>f(i)).join(r)}function xe(t,r){return typeof r=="bigint"?r.toString():r}function ke(t){return{get value(){{let i=t();return Object.defineProperty(this,"value",{value:i}),i}throw new Error("cached value already set")}}}function ie(t){return t==null}function tt(t){let r=t.startsWith("^")?1:0,i=t.endsWith("$")?t.length-1:t.length;return t.slice(r,i)}function bn(t,r){let i=t/r,o=Math.round(i),e=Number.EPSILON*Math.max(Math.abs(i),1);return Math.abs(i-o)<e?0:i-o}var ku=Symbol("evaluating");function z(t,r,i){let o;Object.defineProperty(t,r,{get(){if(o!==ku)return o===void 0&&(o=ku,o=i()),o},set(e){Object.defineProperty(t,r,{value:e})},configurable:!0})}function wd(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function oe(t,r,i){Object.defineProperty(t,r,{value:i,writable:!0,enumerable:!0,configurable:!0})}function ee(...t){let r={};for(let i of t){let o=Object.getOwnPropertyDescriptors(i);Object.assign(r,o)}return Object.defineProperties({},r)}function jd(t){return ee(t._zod.def)}function Pd(t,r){return r?r.reduce((i,o)=>i?.[o],t):t}function Ud(t){let r=Object.keys(t),i=r.map(o=>t[o]);return Promise.all(i).then(o=>{let e={};for(let n=0;n<r.length;n++)e[r[n]]=o[n];return e})}function Od(t=10){let r="abcdefghijklmnopqrstuvwxyz",i="";for(let o=0;o<t;o++)i+=r[Math.floor(Math.random()*r.length)];return i}function Zt(t){return JSON.stringify(t)}function xn(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Dt="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function fe(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var kn=ke(()=>{if(pe.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function ae(t){if(fe(t)===!1)return!1;let r=t.constructor;if(r===void 0||typeof r!="function")return!0;let i=r.prototype;return!(fe(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function zn(t){return ae(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function Zd(t){let r=0;for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&r++;return r}var Dd=t=>{let r=typeof t;switch(r){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${r}`)}},rt=new Set(["string","number","symbol"]),In=new Set(["string","number","bigint","boolean","symbol","undefined"]);function K(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function T(t,r,i){let o=new t._zod.constr(r??t._zod.def);return(!r||i?.parent)&&(o._zod.parent=t),o}function h(t){let r=t;if(!r)return{};if(typeof r=="string")return{error:()=>r};if(r?.message!==void 0){if(r?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function Nd(t){let r;return new Proxy({},{get(i,o,e){return r??(r=t()),Reflect.get(r,o,e)},set(i,o,e,n){return r??(r=t()),Reflect.set(r,o,e,n)},has(i,o){return r??(r=t()),Reflect.has(r,o)},deleteProperty(i,o){return r??(r=t()),Reflect.deleteProperty(r,o)},ownKeys(i){return r??(r=t()),Reflect.ownKeys(r)},getOwnPropertyDescriptor(i,o){return r??(r=t()),Reflect.getOwnPropertyDescriptor(r,o)},defineProperty(i,o,e){return r??(r=t()),Reflect.defineProperty(r,o,e)}})}function f(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Sn(t){return Object.keys(t).filter(r=>t[r]._zod.optin==="optional"&&t[r]._zod.optout==="optional")}var wn={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},jn={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Td(t,r){let i=t._zod.def,o=i.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let n=ee(t._zod.def,{get shape(){let a={};for(let c in r){if(!(c in i.shape))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(a[c]=i.shape[c])}return oe(this,"shape",a),a},checks:[]});return T(t,n)}function Ed(t,r){let i=t._zod.def,o=i.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let n=ee(t._zod.def,{get shape(){let a={...t._zod.def.shape};for(let c in r){if(!(c in i.shape))throw new Error(`Unrecognized key: "${c}"`);r[c]&&delete a[c]}return oe(this,"shape",a),a},checks:[]});return T(t,n)}function Ad(t,r){if(!ae(r))throw new Error("Invalid input to extend: expected a plain object");let i=t._zod.def.checks;if(i&&i.length>0){let n=t._zod.def.shape;for(let a in r)if(Object.getOwnPropertyDescriptor(n,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let e=ee(t._zod.def,{get shape(){let n={...t._zod.def.shape,...r};return oe(this,"shape",n),n}});return T(t,e)}function Ld(t,r){if(!ae(r))throw new Error("Invalid input to safeExtend: expected a plain object");let i=ee(t._zod.def,{get shape(){let o={...t._zod.def.shape,...r};return oe(this,"shape",o),o}});return T(t,i)}function Rd(t,r){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let i=ee(t._zod.def,{get shape(){let o={...t._zod.def.shape,...r._zod.def.shape};return oe(this,"shape",o),o},get catchall(){return r._zod.def.catchall},checks:r._zod.def.checks??[]});return T(t,i)}function Cd(t,r,i){let e=r._zod.def.checks;if(e&&e.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=ee(r._zod.def,{get shape(){let c=r._zod.def.shape,l={...c};if(i)for(let u in i){if(!(u in c))throw new Error(`Unrecognized key: "${u}"`);i[u]&&(l[u]=t?new t({type:"optional",innerType:c[u]}):c[u])}else for(let u in c)l[u]=t?new t({type:"optional",innerType:c[u]}):c[u];return oe(this,"shape",l),l},checks:[]});return T(r,a)}function Fd(t,r,i){let o=ee(r._zod.def,{get shape(){let e=r._zod.def.shape,n={...e};if(i)for(let a in i){if(!(a in n))throw new Error(`Unrecognized key: "${a}"`);i[a]&&(n[a]=new t({type:"nonoptional",innerType:e[a]}))}else for(let a in e)n[a]=new t({type:"nonoptional",innerType:e[a]});return oe(this,"shape",n),n}});return T(r,o)}function ce(t,r=0){if(t.aborted===!0)return!0;for(let i=r;i<t.issues.length;i++)if(t.issues[i]?.continue!==!0)return!0;return!1}function Pn(t,r=0){if(t.aborted===!0)return!0;for(let i=r;i<t.issues.length;i++)if(t.issues[i]?.continue===!1)return!0;return!1}function C(t,r){return r.map(i=>{var o;return(o=i).path??(o.path=[]),i.path.unshift(t),i})}function Qe(t){return typeof t=="string"?t:t?.message}function E(t,r,i){let o=t.message?t.message:Qe(t.inst?._zod.def?.error?.(t))??Qe(r?.error?.(t))??Qe(i.customError?.(t))??Qe(i.localeError?.(t))??"Invalid input",{inst:e,continue:n,input:a,...c}=t;return c.path??(c.path=[]),c.message=o,r?.reportInput&&(c.input=a),c}function nt(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function it(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function g(t){let r=typeof t;switch(r){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let i=t;if(i&&Object.getPrototypeOf(i)!==Object.prototype&&"constructor"in i&&i.constructor)return i.constructor.name}}return r}function ze(...t){let[r,i,o]=t;return typeof r=="string"?{message:r,code:"custom",input:i,inst:o}:{...r}}function Jd(t){return Object.entries(t).filter(([r,i])=>Number.isNaN(Number.parseInt(r,10))).map(r=>r[1])}function zu(t){let r=atob(t),i=new Uint8Array(r.length);for(let o=0;o<r.length;o++)i[o]=r.charCodeAt(o);return i}function Iu(t){let r="";for(let i=0;i<t.length;i++)r+=String.fromCharCode(t[i]);return btoa(r)}function Vd(t){let r=t.replace(/-/g,"+").replace(/_/g,"/"),i="=".repeat((4-r.length%4)%4);return zu(r+i)}function Md(t){return Iu(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Kd(t){let r=t.replace(/^0x/,"");if(r.length%2!==0)throw new Error("Invalid hex string length");let i=new Uint8Array(r.length/2);for(let o=0;o<r.length;o+=2)i[o/2]=Number.parseInt(r.slice(o,o+2),16);return i}function Gd(t){return Array.from(t).map(r=>r.toString(16).padStart(2,"0")).join("")}var yn=class{constructor(...r){}};var Su=(t,r)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:r,enumerable:!1}),t.message=JSON.stringify(r,xe,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},ot=s("$ZodError",Su),F=s("$ZodError",Su,{Parent:Error});function at(t,r=i=>i.message){let i={},o=[];for(let e of t.issues)e.path.length>0?(i[e.path[0]]=i[e.path[0]]||[],i[e.path[0]].push(r(e))):o.push(r(e));return{formErrors:o,fieldErrors:i}}function ct(t,r=i=>i.message){let i={_errors:[]},o=(e,n=[])=>{for(let a of e.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(c=>o({issues:c},[...n,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...n,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...n,...a.path]);else{let c=[...n,...a.path];if(c.length===0)i._errors.push(r(a));else{let l=i,u=0;for(;u<c.length;){let d=c[u];u===c.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(r(a))):l[d]=l[d]||{_errors:[]},l=l[d],u++}}}};return o(t),i}function Un(t,r=i=>i.message){let i={errors:[]},o=(e,n=[])=>{var a,c;for(let l of e.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(u=>o({issues:u},[...n,...l.path]));else if(l.code==="invalid_key")o({issues:l.issues},[...n,...l.path]);else if(l.code==="invalid_element")o({issues:l.issues},[...n,...l.path]);else{let u=[...n,...l.path];if(u.length===0){i.errors.push(r(l));continue}let d=i,p=0;for(;p<u.length;){let _=u[p],$=p===u.length-1;typeof _=="string"?(d.properties??(d.properties={}),(a=d.properties)[_]??(a[_]={errors:[]}),d=d.properties[_]):(d.items??(d.items=[]),(c=d.items)[_]??(c[_]={errors:[]}),d=d.items[_]),$&&d.errors.push(r(l)),p++}}};return o(t),i}function wu(t){let r=[],i=t.map(o=>typeof o=="object"?o.key:o);for(let o of i)typeof o=="number"?r.push(`[${o}]`):typeof o=="symbol"?r.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?r.push(`[${JSON.stringify(o)}]`):(r.length&&r.push("."),r.push(o));return r.join("")}function On(t){let r=[],i=[...t.issues].sort((o,e)=>(o.path??[]).length-(e.path??[]).length);for(let o of i)r.push(`\u2716 ${o.message}`),o.path?.length&&r.push(` \u2192 at ${wu(o.path)}`);return r.join(`
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{b as Q}from"./BVUCNXC5.js";var xu,$n=Object.freeze({status:"aborted"});function s(t,r,i){function o(c,l){if(c._zod||Object.defineProperty(c,"_zod",{value:{def:l,constr:a,traits:new Set},enumerable:!1}),c._zod.traits.has(t))return;c._zod.traits.add(t),r(c,l);let u=a.prototype,d=Object.keys(u);for(let p=0;p<d.length;p++){let _=d[p];_ in c||(c[_]=u[_].bind(c))}}let e=i?.Parent??Object;class n extends e{}Object.defineProperty(n,"name",{value:t});function a(c){var l;let u=i?.Parent?new n:this;o(u,c),(l=u._zod).deferred??(l.deferred=[]);for(let d of u._zod.deferred)d();return u}return Object.defineProperty(a,"init",{value:o}),Object.defineProperty(a,Symbol.hasInstance,{value:c=>i?.Parent&&c instanceof i.Parent?!0:c?._zod?.traits?.has(t)}),Object.defineProperty(a,"name",{value:t}),a}var hn=Symbol("zod_brand"),G=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},ne=class extends Error{constructor(r){super(`Encountered unidirectional transform during encode: ${r}`),this.name="ZodEncodeError"}};(xu=globalThis).__zod_globalConfig??(xu.__zod_globalConfig={});var pe=globalThis.__zod_globalConfig;function U(t){return t&&Object.assign(pe,t),pe}var v={};Q(v,{BIGINT_FORMAT_RANGES:()=>jn,Class:()=>yn,NUMBER_FORMAT_RANGES:()=>wn,aborted:()=>ce,allowsEval:()=>kn,assert:()=>Sd,assertEqual:()=>xd,assertIs:()=>zd,assertNever:()=>Id,assertNotEqual:()=>kd,assignProp:()=>oe,base64ToUint8Array:()=>zu,base64urlToUint8Array:()=>Vd,cached:()=>ke,captureStackTrace:()=>Dt,cleanEnum:()=>Jd,cleanRegex:()=>tt,clone:()=>T,cloneDef:()=>jd,createTransparentProxy:()=>Nd,defineLazy:()=>z,esc:()=>Zt,escapeRegex:()=>K,explicitlyAborted:()=>Pn,extend:()=>Ad,finalizeIssue:()=>E,floatSafeRemainder:()=>bn,getElementAtPath:()=>Pd,getEnumValues:()=>et,getLengthableOrigin:()=>it,getParsedType:()=>Dd,getSizableOrigin:()=>nt,hexToUint8Array:()=>Kd,isObject:()=>fe,isPlainObject:()=>ae,issue:()=>ze,joinValues:()=>m,jsonStringifyReplacer:()=>xe,merge:()=>Rd,mergeDefs:()=>ee,normalizeParams:()=>h,nullish:()=>ie,numKeys:()=>Zd,objectClone:()=>wd,omit:()=>Ed,optionalKeys:()=>Sn,parsedType:()=>g,partial:()=>Cd,pick:()=>Td,prefixIssues:()=>C,primitiveTypes:()=>In,promiseAllObject:()=>Ud,propertyKeyTypes:()=>rt,randomString:()=>Od,required:()=>Fd,safeExtend:()=>Ld,shallowClone:()=>zn,slugify:()=>xn,stringifyPrimitive:()=>f,uint8ArrayToBase64:()=>Iu,uint8ArrayToBase64url:()=>Md,uint8ArrayToHex:()=>Gd,unwrapMessage:()=>Qe});function xd(t){return t}function kd(t){return t}function zd(t){}function Id(t){throw new Error("Unexpected value in exhaustive check")}function Sd(t){}function et(t){let r=Object.values(t).filter(o=>typeof o=="number");return Object.entries(t).filter(([o,e])=>r.indexOf(+o)===-1).map(([o,e])=>e)}function m(t,r="|"){return t.map(i=>f(i)).join(r)}function xe(t,r){return typeof r=="bigint"?r.toString():r}function ke(t){return{get value(){{let i=t();return Object.defineProperty(this,"value",{value:i}),i}throw new Error("cached value already set")}}}function ie(t){return t==null}function tt(t){let r=t.startsWith("^")?1:0,i=t.endsWith("$")?t.length-1:t.length;return t.slice(r,i)}function bn(t,r){let i=t/r,o=Math.round(i),e=Number.EPSILON*Math.max(Math.abs(i),1);return Math.abs(i-o)<e?0:i-o}var ku=Symbol("evaluating");function z(t,r,i){let o;Object.defineProperty(t,r,{get(){if(o!==ku)return o===void 0&&(o=ku,o=i()),o},set(e){Object.defineProperty(t,r,{value:e})},configurable:!0})}function wd(t){return Object.create(Object.getPrototypeOf(t),Object.getOwnPropertyDescriptors(t))}function oe(t,r,i){Object.defineProperty(t,r,{value:i,writable:!0,enumerable:!0,configurable:!0})}function ee(...t){let r={};for(let i of t){let o=Object.getOwnPropertyDescriptors(i);Object.assign(r,o)}return Object.defineProperties({},r)}function jd(t){return ee(t._zod.def)}function Pd(t,r){return r?r.reduce((i,o)=>i?.[o],t):t}function Ud(t){let r=Object.keys(t),i=r.map(o=>t[o]);return Promise.all(i).then(o=>{let e={};for(let n=0;n<r.length;n++)e[r[n]]=o[n];return e})}function Od(t=10){let r="abcdefghijklmnopqrstuvwxyz",i="";for(let o=0;o<t;o++)i+=r[Math.floor(Math.random()*r.length)];return i}function Zt(t){return JSON.stringify(t)}function xn(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var Dt="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function fe(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}var kn=ke(()=>{if(pe.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let t=Function;return new t(""),!0}catch{return!1}});function ae(t){if(fe(t)===!1)return!1;let r=t.constructor;if(r===void 0||typeof r!="function")return!0;let i=r.prototype;return!(fe(i)===!1||Object.prototype.hasOwnProperty.call(i,"isPrototypeOf")===!1)}function zn(t){return ae(t)?{...t}:Array.isArray(t)?[...t]:t instanceof Map?new Map(t):t instanceof Set?new Set(t):t}function Zd(t){let r=0;for(let i in t)Object.prototype.hasOwnProperty.call(t,i)&&r++;return r}var Dd=t=>{let r=typeof t;switch(r){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(t)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(t)?"array":t===null?"null":t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?"promise":typeof Map<"u"&&t instanceof Map?"map":typeof Set<"u"&&t instanceof Set?"set":typeof Date<"u"&&t instanceof Date?"date":typeof File<"u"&&t instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${r}`)}},rt=new Set(["string","number","symbol"]),In=new Set(["string","number","bigint","boolean","symbol","undefined"]);function K(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function T(t,r,i){let o=new t._zod.constr(r??t._zod.def);return(!r||i?.parent)&&(o._zod.parent=t),o}function h(t){let r=t;if(!r)return{};if(typeof r=="string")return{error:()=>r};if(r?.message!==void 0){if(r?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");r.error=r.message}return delete r.message,typeof r.error=="string"?{...r,error:()=>r.error}:r}function Nd(t){let r;return new Proxy({},{get(i,o,e){return r??(r=t()),Reflect.get(r,o,e)},set(i,o,e,n){return r??(r=t()),Reflect.set(r,o,e,n)},has(i,o){return r??(r=t()),Reflect.has(r,o)},deleteProperty(i,o){return r??(r=t()),Reflect.deleteProperty(r,o)},ownKeys(i){return r??(r=t()),Reflect.ownKeys(r)},getOwnPropertyDescriptor(i,o){return r??(r=t()),Reflect.getOwnPropertyDescriptor(r,o)},defineProperty(i,o,e){return r??(r=t()),Reflect.defineProperty(r,o,e)}})}function f(t){return typeof t=="bigint"?t.toString()+"n":typeof t=="string"?`"${t}"`:`${t}`}function Sn(t){return Object.keys(t).filter(r=>t[r]._zod.optin==="optional"&&t[r]._zod.optout==="optional")}var wn={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},jn={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Td(t,r){let i=t._zod.def,o=i.checks;if(o&&o.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let n=ee(t._zod.def,{get shape(){let a={};for(let c in r){if(!(c in i.shape))throw new Error(`Unrecognized key: "${c}"`);r[c]&&(a[c]=i.shape[c])}return oe(this,"shape",a),a},checks:[]});return T(t,n)}function Ed(t,r){let i=t._zod.def,o=i.checks;if(o&&o.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let n=ee(t._zod.def,{get shape(){let a={...t._zod.def.shape};for(let c in r){if(!(c in i.shape))throw new Error(`Unrecognized key: "${c}"`);r[c]&&delete a[c]}return oe(this,"shape",a),a},checks:[]});return T(t,n)}function Ad(t,r){if(!ae(r))throw new Error("Invalid input to extend: expected a plain object");let i=t._zod.def.checks;if(i&&i.length>0){let n=t._zod.def.shape;for(let a in r)if(Object.getOwnPropertyDescriptor(n,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let e=ee(t._zod.def,{get shape(){let n={...t._zod.def.shape,...r};return oe(this,"shape",n),n}});return T(t,e)}function Ld(t,r){if(!ae(r))throw new Error("Invalid input to safeExtend: expected a plain object");let i=ee(t._zod.def,{get shape(){let o={...t._zod.def.shape,...r};return oe(this,"shape",o),o}});return T(t,i)}function Rd(t,r){if(t._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let i=ee(t._zod.def,{get shape(){let o={...t._zod.def.shape,...r._zod.def.shape};return oe(this,"shape",o),o},get catchall(){return r._zod.def.catchall},checks:r._zod.def.checks??[]});return T(t,i)}function Cd(t,r,i){let e=r._zod.def.checks;if(e&&e.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=ee(r._zod.def,{get shape(){let c=r._zod.def.shape,l={...c};if(i)for(let u in i){if(!(u in c))throw new Error(`Unrecognized key: "${u}"`);i[u]&&(l[u]=t?new t({type:"optional",innerType:c[u]}):c[u])}else for(let u in c)l[u]=t?new t({type:"optional",innerType:c[u]}):c[u];return oe(this,"shape",l),l},checks:[]});return T(r,a)}function Fd(t,r,i){let o=ee(r._zod.def,{get shape(){let e=r._zod.def.shape,n={...e};if(i)for(let a in i){if(!(a in n))throw new Error(`Unrecognized key: "${a}"`);i[a]&&(n[a]=new t({type:"nonoptional",innerType:e[a]}))}else for(let a in e)n[a]=new t({type:"nonoptional",innerType:e[a]});return oe(this,"shape",n),n}});return T(r,o)}function ce(t,r=0){if(t.aborted===!0)return!0;for(let i=r;i<t.issues.length;i++)if(t.issues[i]?.continue!==!0)return!0;return!1}function Pn(t,r=0){if(t.aborted===!0)return!0;for(let i=r;i<t.issues.length;i++)if(t.issues[i]?.continue===!1)return!0;return!1}function C(t,r){return r.map(i=>{var o;return(o=i).path??(o.path=[]),i.path.unshift(t),i})}function Qe(t){return typeof t=="string"?t:t?.message}function E(t,r,i){let o=t.message?t.message:Qe(t.inst?._zod.def?.error?.(t))??Qe(r?.error?.(t))??Qe(i.customError?.(t))??Qe(i.localeError?.(t))??"Invalid input",{inst:e,continue:n,input:a,...c}=t;return c.path??(c.path=[]),c.message=o,r?.reportInput&&(c.input=a),c}function nt(t){return t instanceof Set?"set":t instanceof Map?"map":t instanceof File?"file":"unknown"}function it(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function g(t){let r=typeof t;switch(r){case"number":return Number.isNaN(t)?"nan":"number";case"object":{if(t===null)return"null";if(Array.isArray(t))return"array";let i=t;if(i&&Object.getPrototypeOf(i)!==Object.prototype&&"constructor"in i&&i.constructor)return i.constructor.name}}return r}function ze(...t){let[r,i,o]=t;return typeof r=="string"?{message:r,code:"custom",input:i,inst:o}:{...r}}function Jd(t){return Object.entries(t).filter(([r,i])=>Number.isNaN(Number.parseInt(r,10))).map(r=>r[1])}function zu(t){let r=atob(t),i=new Uint8Array(r.length);for(let o=0;o<r.length;o++)i[o]=r.charCodeAt(o);return i}function Iu(t){let r="";for(let i=0;i<t.length;i++)r+=String.fromCharCode(t[i]);return btoa(r)}function Vd(t){let r=t.replace(/-/g,"+").replace(/_/g,"/"),i="=".repeat((4-r.length%4)%4);return zu(r+i)}function Md(t){return Iu(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function Kd(t){let r=t.replace(/^0x/,"");if(r.length%2!==0)throw new Error("Invalid hex string length");let i=new Uint8Array(r.length/2);for(let o=0;o<r.length;o+=2)i[o/2]=Number.parseInt(r.slice(o,o+2),16);return i}function Gd(t){return Array.from(t).map(r=>r.toString(16).padStart(2,"0")).join("")}var yn=class{constructor(...r){}};var Su=(t,r)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:r,enumerable:!1}),t.message=JSON.stringify(r,xe,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},ot=s("$ZodError",Su),F=s("$ZodError",Su,{Parent:Error});function at(t,r=i=>i.message){let i={},o=[];for(let e of t.issues)e.path.length>0?(i[e.path[0]]=i[e.path[0]]||[],i[e.path[0]].push(r(e))):o.push(r(e));return{formErrors:o,fieldErrors:i}}function ct(t,r=i=>i.message){let i={_errors:[]},o=(e,n=[])=>{for(let a of e.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(c=>o({issues:c},[...n,...a.path]));else if(a.code==="invalid_key")o({issues:a.issues},[...n,...a.path]);else if(a.code==="invalid_element")o({issues:a.issues},[...n,...a.path]);else{let c=[...n,...a.path];if(c.length===0)i._errors.push(r(a));else{let l=i,u=0;for(;u<c.length;){let d=c[u];u===c.length-1?(l[d]=l[d]||{_errors:[]},l[d]._errors.push(r(a))):l[d]=l[d]||{_errors:[]},l=l[d],u++}}}};return o(t),i}function Un(t,r=i=>i.message){let i={errors:[]},o=(e,n=[])=>{var a,c;for(let l of e.issues)if(l.code==="invalid_union"&&l.errors.length)l.errors.map(u=>o({issues:u},[...n,...l.path]));else if(l.code==="invalid_key")o({issues:l.issues},[...n,...l.path]);else if(l.code==="invalid_element")o({issues:l.issues},[...n,...l.path]);else{let u=[...n,...l.path];if(u.length===0){i.errors.push(r(l));continue}let d=i,p=0;for(;p<u.length;){let _=u[p],$=p===u.length-1;typeof _=="string"?(d.properties??(d.properties={}),(a=d.properties)[_]??(a[_]={errors:[]}),d=d.properties[_]):(d.items??(d.items=[]),(c=d.items)[_]??(c[_]={errors:[]}),d=d.items[_]),$&&d.errors.push(r(l)),p++}}};return o(t),i}function wu(t){let r=[],i=t.map(o=>typeof o=="object"?o.key:o);for(let o of i)typeof o=="number"?r.push(`[${o}]`):typeof o=="symbol"?r.push(`[${JSON.stringify(String(o))}]`):/[^\w$]/.test(o)?r.push(`[${JSON.stringify(o)}]`):(r.length&&r.push("."),r.push(o));return r.join("")}function On(t){let r=[],i=[...t.issues].sort((o,e)=>(o.path??[]).length-(e.path??[]).length);for(let o of i)r.push(`\u2716 ${o.message}`),o.path?.length&&r.push(` \u2192 at ${wu(o.path)}`);return r.join(`
3
3
  `)}var V={};Q(V,{base64:()=>Wn,base64url:()=>Nt,bigint:()=>ei,boolean:()=>ri,browserEmail:()=>tm,cidrv4:()=>Kn,cidrv6:()=>Gn,cuid:()=>Zn,cuid2:()=>Dn,date:()=>qn,datetime:()=>Hn,domain:()=>im,duration:()=>Ln,e164:()=>Xn,email:()=>Cn,emoji:()=>Fn,extendedDuration:()=>Bd,guid:()=>Rn,hex:()=>om,hostname:()=>nm,html5Email:()=>Hd,httpProtocol:()=>Bn,idnEmail:()=>em,integer:()=>ti,ipv4:()=>Jn,ipv6:()=>Vn,ksuid:()=>En,lowercase:()=>oi,mac:()=>Mn,md5_base64:()=>cm,md5_base64url:()=>um,md5_hex:()=>am,nanoid:()=>An,null:()=>ni,number:()=>Tt,rfc5322Email:()=>Qd,sha1_base64:()=>sm,sha1_base64url:()=>dm,sha1_hex:()=>lm,sha256_base64:()=>pm,sha256_base64url:()=>fm,sha256_hex:()=>mm,sha384_base64:()=>vm,sha384_base64url:()=>$m,sha384_hex:()=>gm,sha512_base64:()=>_m,sha512_base64url:()=>ym,sha512_hex:()=>hm,string:()=>Qn,time:()=>Yn,ulid:()=>Nn,undefined:()=>ii,unicodeEmail:()=>ju,uppercase:()=>ai,uuid:()=>ge,uuid4:()=>Xd,uuid6:()=>qd,uuid7:()=>Yd,xid:()=>Tn});var Zn=/^[cC][0-9a-z]{6,}$/,Dn=/^[0-9a-z]+$/,Nn=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Tn=/^[0-9a-vA-V]{20}$/,En=/^[A-Za-z0-9]{27}$/,An=/^[a-zA-Z0-9_-]{21}$/,Ln=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,Bd=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Rn=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ge=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Xd=ge(4),qd=ge(6),Yd=ge(7),Cn=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Hd=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Qd=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,ju=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,em=ju,tm=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,rm="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Fn(){return new RegExp(rm,"u")}var Jn=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Vn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Mn=t=>{let r=K(t??":");return new RegExp(`^(?:[0-9A-F]{2}${r}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${r}){5}[0-9a-f]{2}$`)},Kn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Gn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Wn=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Nt=/^[A-Za-z0-9_-]*$/,nm=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,im=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,Bn=/^https?$/,Xn=/^\+[1-9]\d{6,14}$/,Pu="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",qn=new RegExp(`^${Pu}$`);function Uu(t){let r="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${r}`:t.precision===0?`${r}:[0-5]\\d`:`${r}:[0-5]\\d\\.\\d{${t.precision}}`:`${r}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Yn(t){return new RegExp(`^${Uu(t)}$`)}function Hn(t){let r=Uu({precision:t.precision}),i=["Z"];t.local&&i.push(""),t.offset&&i.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let o=`${r}(?:${i.join("|")})`;return new RegExp(`^${Pu}T(?:${o})$`)}var Qn=t=>{let r=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${r}$`)},ei=/^-?\d+n?$/,ti=/^-?\d+$/,Tt=/^-?\d+(?:\.\d+)?$/,ri=/^(?:true|false)$/i,ni=/^null$/i;var ii=/^undefined$/i;var oi=/^[^A-Z]*$/,ai=/^[^a-z]*$/,om=/^[0-9a-fA-F]*$/;function ut(t,r){return new RegExp(`^[A-Za-z0-9+/]{${t}}${r}$`)}function lt(t){return new RegExp(`^[A-Za-z0-9_-]{${t}}$`)}var am=/^[0-9a-fA-F]{32}$/,cm=ut(22,"=="),um=lt(22),lm=/^[0-9a-fA-F]{40}$/,sm=ut(27,"="),dm=lt(27),mm=/^[0-9a-fA-F]{64}$/,pm=ut(43,"="),fm=lt(43),gm=/^[0-9a-fA-F]{96}$/,vm=ut(64,""),$m=lt(64),hm=/^[0-9a-fA-F]{128}$/,_m=ut(86,"=="),ym=lt(86);var j=s("$ZodCheck",(t,r)=>{var i;t._zod??(t._zod={}),t._zod.def=r,(i=t._zod).onattach??(i.onattach=[])}),Zu={number:"number",bigint:"bigint",object:"date"},Et=s("$ZodCheckLessThan",(t,r)=>{j.init(t,r);let i=Zu[typeof r.value];t._zod.onattach.push(o=>{let e=o._zod.bag,n=(r.inclusive?e.maximum:e.exclusiveMaximum)??Number.POSITIVE_INFINITY;r.value<n&&(r.inclusive?e.maximum=r.value:e.exclusiveMaximum=r.value)}),t._zod.check=o=>{(r.inclusive?o.value<=r.value:o.value<r.value)||o.issues.push({origin:i,code:"too_big",maximum:typeof r.value=="object"?r.value.getTime():r.value,input:o.value,inclusive:r.inclusive,inst:t,continue:!r.abort})}}),At=s("$ZodCheckGreaterThan",(t,r)=>{j.init(t,r);let i=Zu[typeof r.value];t._zod.onattach.push(o=>{let e=o._zod.bag,n=(r.inclusive?e.minimum:e.exclusiveMinimum)??Number.NEGATIVE_INFINITY;r.value>n&&(r.inclusive?e.minimum=r.value:e.exclusiveMinimum=r.value)}),t._zod.check=o=>{(r.inclusive?o.value>=r.value:o.value>r.value)||o.issues.push({origin:i,code:"too_small",minimum:typeof r.value=="object"?r.value.getTime():r.value,input:o.value,inclusive:r.inclusive,inst:t,continue:!r.abort})}}),ci=s("$ZodCheckMultipleOf",(t,r)=>{j.init(t,r),t._zod.onattach.push(i=>{var o;(o=i._zod.bag).multipleOf??(o.multipleOf=r.value)}),t._zod.check=i=>{if(typeof i.value!=typeof r.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof i.value=="bigint"?i.value%r.value===BigInt(0):bn(i.value,r.value)===0)||i.issues.push({origin:typeof i.value,code:"not_multiple_of",divisor:r.value,input:i.value,inst:t,continue:!r.abort})}}),ui=s("$ZodCheckNumberFormat",(t,r)=>{j.init(t,r),r.format=r.format||"float64";let i=r.format?.includes("int"),o=i?"int":"number",[e,n]=wn[r.format];t._zod.onattach.push(a=>{let c=a._zod.bag;c.format=r.format,c.minimum=e,c.maximum=n,i&&(c.pattern=ti)}),t._zod.check=a=>{let c=a.value;if(i){if(!Number.isInteger(c)){a.issues.push({expected:o,format:r.format,code:"invalid_type",continue:!1,input:c,inst:t});return}if(!Number.isSafeInteger(c)){c>0?a.issues.push({input:c,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:o,inclusive:!0,continue:!r.abort}):a.issues.push({input:c,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:o,inclusive:!0,continue:!r.abort});return}}c<e&&a.issues.push({origin:"number",input:c,code:"too_small",minimum:e,inclusive:!0,inst:t,continue:!r.abort}),c>n&&a.issues.push({origin:"number",input:c,code:"too_big",maximum:n,inclusive:!0,inst:t,continue:!r.abort})}}),li=s("$ZodCheckBigIntFormat",(t,r)=>{j.init(t,r);let[i,o]=jn[r.format];t._zod.onattach.push(e=>{let n=e._zod.bag;n.format=r.format,n.minimum=i,n.maximum=o}),t._zod.check=e=>{let n=e.value;n<i&&e.issues.push({origin:"bigint",input:n,code:"too_small",minimum:i,inclusive:!0,inst:t,continue:!r.abort}),n>o&&e.issues.push({origin:"bigint",input:n,code:"too_big",maximum:o,inclusive:!0,inst:t,continue:!r.abort})}}),si=s("$ZodCheckMaxSize",(t,r)=>{var i;j.init(t,r),(i=t._zod.def).when??(i.when=o=>{let e=o.value;return!ie(e)&&e.size!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<e&&(o._zod.bag.maximum=r.maximum)}),t._zod.check=o=>{let e=o.value;e.size<=r.maximum||o.issues.push({origin:nt(e),code:"too_big",maximum:r.maximum,inclusive:!0,input:e,inst:t,continue:!r.abort})}}),di=s("$ZodCheckMinSize",(t,r)=>{var i;j.init(t,r),(i=t._zod.def).when??(i.when=o=>{let e=o.value;return!ie(e)&&e.size!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>e&&(o._zod.bag.minimum=r.minimum)}),t._zod.check=o=>{let e=o.value;e.size>=r.minimum||o.issues.push({origin:nt(e),code:"too_small",minimum:r.minimum,inclusive:!0,input:e,inst:t,continue:!r.abort})}}),mi=s("$ZodCheckSizeEquals",(t,r)=>{var i;j.init(t,r),(i=t._zod.def).when??(i.when=o=>{let e=o.value;return!ie(e)&&e.size!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag;e.minimum=r.size,e.maximum=r.size,e.size=r.size}),t._zod.check=o=>{let e=o.value,n=e.size;if(n===r.size)return;let a=n>r.size;o.issues.push({origin:nt(e),...a?{code:"too_big",maximum:r.size}:{code:"too_small",minimum:r.size},inclusive:!0,exact:!0,input:o.value,inst:t,continue:!r.abort})}}),pi=s("$ZodCheckMaxLength",(t,r)=>{var i;j.init(t,r),(i=t._zod.def).when??(i.when=o=>{let e=o.value;return!ie(e)&&e.length!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag.maximum??Number.POSITIVE_INFINITY;r.maximum<e&&(o._zod.bag.maximum=r.maximum)}),t._zod.check=o=>{let e=o.value;if(e.length<=r.maximum)return;let a=it(e);o.issues.push({origin:a,code:"too_big",maximum:r.maximum,inclusive:!0,input:e,inst:t,continue:!r.abort})}}),fi=s("$ZodCheckMinLength",(t,r)=>{var i;j.init(t,r),(i=t._zod.def).when??(i.when=o=>{let e=o.value;return!ie(e)&&e.length!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag.minimum??Number.NEGATIVE_INFINITY;r.minimum>e&&(o._zod.bag.minimum=r.minimum)}),t._zod.check=o=>{let e=o.value;if(e.length>=r.minimum)return;let a=it(e);o.issues.push({origin:a,code:"too_small",minimum:r.minimum,inclusive:!0,input:e,inst:t,continue:!r.abort})}}),gi=s("$ZodCheckLengthEquals",(t,r)=>{var i;j.init(t,r),(i=t._zod.def).when??(i.when=o=>{let e=o.value;return!ie(e)&&e.length!==void 0}),t._zod.onattach.push(o=>{let e=o._zod.bag;e.minimum=r.length,e.maximum=r.length,e.length=r.length}),t._zod.check=o=>{let e=o.value,n=e.length;if(n===r.length)return;let a=it(e),c=n>r.length;o.issues.push({origin:a,...c?{code:"too_big",maximum:r.length}:{code:"too_small",minimum:r.length},inclusive:!0,exact:!0,input:o.value,inst:t,continue:!r.abort})}}),Ie=s("$ZodCheckStringFormat",(t,r)=>{var i,o;j.init(t,r),t._zod.onattach.push(e=>{let n=e._zod.bag;n.format=r.format,r.pattern&&(n.patterns??(n.patterns=new Set),n.patterns.add(r.pattern))}),r.pattern?(i=t._zod).check??(i.check=e=>{r.pattern.lastIndex=0,!r.pattern.test(e.value)&&e.issues.push({origin:"string",code:"invalid_format",format:r.format,input:e.value,...r.pattern?{pattern:r.pattern.toString()}:{},inst:t,continue:!r.abort})}):(o=t._zod).check??(o.check=()=>{})}),vi=s("$ZodCheckRegex",(t,r)=>{Ie.init(t,r),t._zod.check=i=>{r.pattern.lastIndex=0,!r.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:"regex",input:i.value,pattern:r.pattern.toString(),inst:t,continue:!r.abort})}}),$i=s("$ZodCheckLowerCase",(t,r)=>{r.pattern??(r.pattern=oi),Ie.init(t,r)}),hi=s("$ZodCheckUpperCase",(t,r)=>{r.pattern??(r.pattern=ai),Ie.init(t,r)}),_i=s("$ZodCheckIncludes",(t,r)=>{j.init(t,r);let i=K(r.includes),o=new RegExp(typeof r.position=="number"?`^.{${r.position}}${i}`:i);r.pattern=o,t._zod.onattach.push(e=>{let n=e._zod.bag;n.patterns??(n.patterns=new Set),n.patterns.add(o)}),t._zod.check=e=>{e.value.includes(r.includes,r.position)||e.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:r.includes,input:e.value,inst:t,continue:!r.abort})}}),yi=s("$ZodCheckStartsWith",(t,r)=>{j.init(t,r);let i=new RegExp(`^${K(r.prefix)}.*`);r.pattern??(r.pattern=i),t._zod.onattach.push(o=>{let e=o._zod.bag;e.patterns??(e.patterns=new Set),e.patterns.add(i)}),t._zod.check=o=>{o.value.startsWith(r.prefix)||o.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:r.prefix,input:o.value,inst:t,continue:!r.abort})}}),bi=s("$ZodCheckEndsWith",(t,r)=>{j.init(t,r);let i=new RegExp(`.*${K(r.suffix)}$`);r.pattern??(r.pattern=i),t._zod.onattach.push(o=>{let e=o._zod.bag;e.patterns??(e.patterns=new Set),e.patterns.add(i)}),t._zod.check=o=>{o.value.endsWith(r.suffix)||o.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:r.suffix,input:o.value,inst:t,continue:!r.abort})}});function Ou(t,r,i){t.issues.length&&r.issues.push(...C(i,t.issues))}var xi=s("$ZodCheckProperty",(t,r)=>{j.init(t,r),t._zod.check=i=>{let o=r.schema._zod.run({value:i.value[r.property],issues:[]},{});if(o instanceof Promise)return o.then(e=>Ou(e,i,r.property));Ou(o,i,r.property)}}),ki=s("$ZodCheckMimeType",(t,r)=>{j.init(t,r);let i=new Set(r.mime);t._zod.onattach.push(o=>{o._zod.bag.mime=r.mime}),t._zod.check=o=>{i.has(o.value.type)||o.issues.push({code:"invalid_value",values:r.mime,input:o.value.type,inst:t,continue:!r.abort})}}),zi=s("$ZodCheckOverwrite",(t,r)=>{j.init(t,r),t._zod.check=i=>{i.value=r.tx(i.value)}});var st=class{constructor(r=[]){this.content=[],this.indent=0,this&&(this.args=r)}indented(r){this.indent+=1,r(this),this.indent-=1}write(r){if(typeof r=="function"){r(this,{execution:"sync"}),r(this,{execution:"async"});return}let o=r.split(`
4
4
  `).filter(a=>a),e=Math.min(...o.map(a=>a.length-a.trimStart().length)),n=o.map(a=>a.slice(e)).map(a=>" ".repeat(this.indent*2)+a);for(let a of n)this.content.push(a)}compile(){let r=Function,i=this?.args,e=[...(this?.content??[""]).map(n=>` ${n}`)];return new r(...i,e.join(`
5
5
  `))}};var Se=t=>(r,i,o,e)=>{let n=o?{...o,async:!1}:{async:!1},a=r._zod.run({value:i,issues:[]},n);if(a instanceof Promise)throw new G;if(a.issues.length){let c=new(e?.Err??t)(a.issues.map(l=>E(l,n,U())));throw Dt(c,e?.callee),c}return a.value},Lt=Se(F),we=t=>async(r,i,o,e)=>{let n=o?{...o,async:!0}:{async:!0},a=r._zod.run({value:i,issues:[]},n);if(a instanceof Promise&&(a=await a),a.issues.length){let c=new(e?.Err??t)(a.issues.map(l=>E(l,n,U())));throw Dt(c,e?.callee),c}return a.value},Rt=we(F),je=t=>(r,i,o)=>{let e=o?{...o,async:!1}:{async:!1},n=r._zod.run({value:i,issues:[]},e);if(n instanceof Promise)throw new G;return n.issues.length?{success:!1,error:new(t??ot)(n.issues.map(a=>E(a,e,U())))}:{success:!0,data:n.value}},Ii=je(F),Pe=t=>async(r,i,o)=>{let e=o?{...o,async:!0}:{async:!0},n=r._zod.run({value:i,issues:[]},e);return n instanceof Promise&&(n=await n),n.issues.length?{success:!1,error:new t(n.issues.map(a=>E(a,e,U())))}:{success:!0,data:n.value}},Si=Pe(F),Ct=t=>(r,i,o)=>{let e=o?{...o,direction:"backward"}:{direction:"backward"};return Se(t)(r,i,e)},bm=Ct(F),Ft=t=>(r,i,o)=>Se(t)(r,i,o),xm=Ft(F),Jt=t=>async(r,i,o)=>{let e=o?{...o,direction:"backward"}:{direction:"backward"};return we(t)(r,i,e)},km=Jt(F),Vt=t=>async(r,i,o)=>we(t)(r,i,o),zm=Vt(F),Mt=t=>(r,i,o)=>{let e=o?{...o,direction:"backward"}:{direction:"backward"};return je(t)(r,i,e)},Im=Mt(F),Kt=t=>(r,i,o)=>je(t)(r,i,o),Sm=Kt(F),Gt=t=>async(r,i,o)=>{let e=o?{...o,direction:"backward"}:{direction:"backward"};return Pe(t)(r,i,e)},wm=Gt(F),Wt=t=>async(r,i,o)=>Pe(t)(r,i,o),jm=Wt(F);var wi={major:4,minor:4,patch:3};var x=s("$ZodType",(t,r)=>{var i;t??(t={}),t._zod.def=r,t._zod.bag=t._zod.bag||{},t._zod.version=wi;let o=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&o.unshift(t);for(let e of o)for(let n of e._zod.onattach)n(t);if(o.length===0)(i=t._zod).deferred??(i.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{let e=(a,c,l)=>{let u=ce(a),d;for(let p of c){if(p._zod.def.when){if(Pn(a)||!p._zod.def.when(a))continue}else if(u)continue;let _=a.issues.length,$=p._zod.check(a);if($ instanceof Promise&&l?.async===!1)throw new G;if(d||$ instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await $,a.issues.length!==_&&(u||(u=ce(a,_)))});else{if(a.issues.length===_)continue;u||(u=ce(a,_))}}return d?d.then(()=>a):a},n=(a,c,l)=>{if(ce(a))return a.aborted=!0,a;let u=e(c,o,l);if(u instanceof Promise){if(l.async===!1)throw new G;return u.then(d=>t._zod.parse(d,l))}return t._zod.parse(u,l)};t._zod.run=(a,c)=>{if(c.skipChecks)return t._zod.parse(a,c);if(c.direction==="backward"){let u=t._zod.parse({value:a.value,issues:[]},{...c,skipChecks:!0});return u instanceof Promise?u.then(d=>n(d,a,c)):n(u,a,c)}let l=t._zod.parse(a,c);if(l instanceof Promise){if(c.async===!1)throw new G;return l.then(u=>e(u,o,c))}return e(l,o,c)}}z(t,"~standard",()=>({validate:e=>{try{let n=Ii(t,e);return n.success?{value:n.data}:{issues:n.error?.issues}}catch{return Si(t,e).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),ve=s("$ZodString",(t,r)=>{x.init(t,r),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??Qn(t._zod.bag),t._zod.parse=(i,o)=>{if(r.coerce)try{i.value=String(i.value)}catch{}return typeof i.value=="string"||i.issues.push({expected:"string",code:"invalid_type",input:i.value,inst:t}),i}}),S=s("$ZodStringFormat",(t,r)=>{Ie.init(t,r),ve.init(t,r)}),Pi=s("$ZodGUID",(t,r)=>{r.pattern??(r.pattern=Rn),S.init(t,r)}),Ui=s("$ZodUUID",(t,r)=>{if(r.version){let o={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[r.version];if(o===void 0)throw new Error(`Invalid UUID version: "${r.version}"`);r.pattern??(r.pattern=ge(o))}else r.pattern??(r.pattern=ge());S.init(t,r)}),Oi=s("$ZodEmail",(t,r)=>{r.pattern??(r.pattern=Cn),S.init(t,r)}),Zi=s("$ZodURL",(t,r)=>{S.init(t,r),t._zod.check=i=>{try{let o=i.value.trim();if(!r.normalize&&r.protocol?.source===Bn.source&&!/^https?:\/\//i.test(o)){i.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:i.value,inst:t,continue:!r.abort});return}let e=new URL(o);r.hostname&&(r.hostname.lastIndex=0,r.hostname.test(e.hostname)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:r.hostname.source,input:i.value,inst:t,continue:!r.abort})),r.protocol&&(r.protocol.lastIndex=0,r.protocol.test(e.protocol.endsWith(":")?e.protocol.slice(0,-1):e.protocol)||i.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:r.protocol.source,input:i.value,inst:t,continue:!r.abort})),r.normalize?i.value=e.href:i.value=o;return}catch{i.issues.push({code:"invalid_format",format:"url",input:i.value,inst:t,continue:!r.abort})}}}),Di=s("$ZodEmoji",(t,r)=>{r.pattern??(r.pattern=Fn()),S.init(t,r)}),Ni=s("$ZodNanoID",(t,r)=>{r.pattern??(r.pattern=An),S.init(t,r)}),Ti=s("$ZodCUID",(t,r)=>{r.pattern??(r.pattern=Zn),S.init(t,r)}),Ei=s("$ZodCUID2",(t,r)=>{r.pattern??(r.pattern=Dn),S.init(t,r)}),Ai=s("$ZodULID",(t,r)=>{r.pattern??(r.pattern=Nn),S.init(t,r)}),Li=s("$ZodXID",(t,r)=>{r.pattern??(r.pattern=Tn),S.init(t,r)}),Ri=s("$ZodKSUID",(t,r)=>{r.pattern??(r.pattern=En),S.init(t,r)}),Ci=s("$ZodISODateTime",(t,r)=>{r.pattern??(r.pattern=Hn(r)),S.init(t,r)}),Fi=s("$ZodISODate",(t,r)=>{r.pattern??(r.pattern=qn),S.init(t,r)}),Ji=s("$ZodISOTime",(t,r)=>{r.pattern??(r.pattern=Yn(r)),S.init(t,r)}),Vi=s("$ZodISODuration",(t,r)=>{r.pattern??(r.pattern=Ln),S.init(t,r)}),Mi=s("$ZodIPv4",(t,r)=>{r.pattern??(r.pattern=Jn),S.init(t,r),t._zod.bag.format="ipv4"}),Ki=s("$ZodIPv6",(t,r)=>{r.pattern??(r.pattern=Vn),S.init(t,r),t._zod.bag.format="ipv6",t._zod.check=i=>{try{new URL(`http://[${i.value}]`)}catch{i.issues.push({code:"invalid_format",format:"ipv6",input:i.value,inst:t,continue:!r.abort})}}}),Gi=s("$ZodMAC",(t,r)=>{r.pattern??(r.pattern=Mn(r.delimiter)),S.init(t,r),t._zod.bag.format="mac"}),Wi=s("$ZodCIDRv4",(t,r)=>{r.pattern??(r.pattern=Kn),S.init(t,r)}),Bi=s("$ZodCIDRv6",(t,r)=>{r.pattern??(r.pattern=Gn),S.init(t,r),t._zod.check=i=>{let o=i.value.split("/");try{if(o.length!==2)throw new Error;let[e,n]=o;if(!n)throw new Error;let a=Number(n);if(`${a}`!==n)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${e}]`)}catch{i.issues.push({code:"invalid_format",format:"cidrv6",input:i.value,inst:t,continue:!r.abort})}}});function Xi(t){if(t==="")return!0;if(/\s/.test(t)||t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}var qi=s("$ZodBase64",(t,r)=>{r.pattern??(r.pattern=Wn),S.init(t,r),t._zod.bag.contentEncoding="base64",t._zod.check=i=>{Xi(i.value)||i.issues.push({code:"invalid_format",format:"base64",input:i.value,inst:t,continue:!r.abort})}});function Bu(t){if(!Nt.test(t))return!1;let r=t.replace(/[-_]/g,o=>o==="-"?"+":"/"),i=r.padEnd(Math.ceil(r.length/4)*4,"=");return Xi(i)}var Yi=s("$ZodBase64URL",(t,r)=>{r.pattern??(r.pattern=Nt),S.init(t,r),t._zod.bag.contentEncoding="base64url",t._zod.check=i=>{Bu(i.value)||i.issues.push({code:"invalid_format",format:"base64url",input:i.value,inst:t,continue:!r.abort})}}),Hi=s("$ZodE164",(t,r)=>{r.pattern??(r.pattern=Xn),S.init(t,r)});function Xu(t,r=null){try{let i=t.split(".");if(i.length!==3)return!1;let[o]=i;if(!o)return!1;let e=JSON.parse(atob(o));return!("typ"in e&&e?.typ!=="JWT"||!e.alg||r&&(!("alg"in e)||e.alg!==r))}catch{return!1}}var Qi=s("$ZodJWT",(t,r)=>{S.init(t,r),t._zod.check=i=>{Xu(i.value,r.alg)||i.issues.push({code:"invalid_format",format:"jwt",input:i.value,inst:t,continue:!r.abort})}}),eo=s("$ZodCustomStringFormat",(t,r)=>{S.init(t,r),t._zod.check=i=>{r.fn(i.value)||i.issues.push({code:"invalid_format",format:r.format,input:i.value,inst:t,continue:!r.abort})}}),Ht=s("$ZodNumber",(t,r)=>{x.init(t,r),t._zod.pattern=t._zod.bag.pattern??Tt,t._zod.parse=(i,o)=>{if(r.coerce)try{i.value=Number(i.value)}catch{}let e=i.value;if(typeof e=="number"&&!Number.isNaN(e)&&Number.isFinite(e))return i;let n=typeof e=="number"?Number.isNaN(e)?"NaN":Number.isFinite(e)?void 0:"Infinity":void 0;return i.issues.push({expected:"number",code:"invalid_type",input:e,inst:t,...n?{received:n}:{}}),i}}),to=s("$ZodNumberFormat",(t,r)=>{ui.init(t,r),Ht.init(t,r)}),dt=s("$ZodBoolean",(t,r)=>{x.init(t,r),t._zod.pattern=ri,t._zod.parse=(i,o)=>{if(r.coerce)try{i.value=!!i.value}catch{}let e=i.value;return typeof e=="boolean"||i.issues.push({expected:"boolean",code:"invalid_type",input:e,inst:t}),i}}),Qt=s("$ZodBigInt",(t,r)=>{x.init(t,r),t._zod.pattern=ei,t._zod.parse=(i,o)=>{if(r.coerce)try{i.value=BigInt(i.value)}catch{}return typeof i.value=="bigint"||i.issues.push({expected:"bigint",code:"invalid_type",input:i.value,inst:t}),i}}),ro=s("$ZodBigIntFormat",(t,r)=>{li.init(t,r),Qt.init(t,r)}),no=s("$ZodSymbol",(t,r)=>{x.init(t,r),t._zod.parse=(i,o)=>{let e=i.value;return typeof e=="symbol"||i.issues.push({expected:"symbol",code:"invalid_type",input:e,inst:t}),i}}),io=s("$ZodUndefined",(t,r)=>{x.init(t,r),t._zod.pattern=ii,t._zod.values=new Set([void 0]),t._zod.parse=(i,o)=>{let e=i.value;return typeof e>"u"||i.issues.push({expected:"undefined",code:"invalid_type",input:e,inst:t}),i}}),oo=s("$ZodNull",(t,r)=>{x.init(t,r),t._zod.pattern=ni,t._zod.values=new Set([null]),t._zod.parse=(i,o)=>{let e=i.value;return e===null||i.issues.push({expected:"null",code:"invalid_type",input:e,inst:t}),i}}),ao=s("$ZodAny",(t,r)=>{x.init(t,r),t._zod.parse=i=>i}),co=s("$ZodUnknown",(t,r)=>{x.init(t,r),t._zod.parse=i=>i}),uo=s("$ZodNever",(t,r)=>{x.init(t,r),t._zod.parse=(i,o)=>(i.issues.push({expected:"never",code:"invalid_type",input:i.value,inst:t}),i)}),lo=s("$ZodVoid",(t,r)=>{x.init(t,r),t._zod.parse=(i,o)=>{let e=i.value;return typeof e>"u"||i.issues.push({expected:"void",code:"invalid_type",input:e,inst:t}),i}}),so=s("$ZodDate",(t,r)=>{x.init(t,r),t._zod.parse=(i,o)=>{if(r.coerce)try{i.value=new Date(i.value)}catch{}let e=i.value,n=e instanceof Date;return n&&!Number.isNaN(e.getTime())||i.issues.push({expected:"date",code:"invalid_type",input:e,...n?{received:"Invalid Date"}:{},inst:t}),i}});function Nu(t,r,i){t.issues.length&&r.issues.push(...C(i,t.issues)),r.value[i]=t.value}var mo=s("$ZodArray",(t,r)=>{x.init(t,r),t._zod.parse=(i,o)=>{let e=i.value;if(!Array.isArray(e))return i.issues.push({expected:"array",code:"invalid_type",input:e,inst:t}),i;i.value=Array(e.length);let n=[];for(let a=0;a<e.length;a++){let c=e[a],l=r.element._zod.run({value:c,issues:[]},o);l instanceof Promise?n.push(l.then(u=>Nu(u,i,a))):Nu(l,i,a)}return n.length?Promise.all(n).then(()=>i):i}});function Yt(t,r,i,o,e,n){let a=i in o;if(t.issues.length){if(e&&n&&!a)return;r.issues.push(...C(i,t.issues))}if(!a&&!e){t.issues.length||r.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[i]});return}t.value===void 0?a&&(r.value[i]=void 0):r.value[i]=t.value}function qu(t){let r=Object.keys(t.shape);for(let o of r)if(!t.shape?.[o]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${o}": expected a Zod schema`);let i=Sn(t.shape);return{...t,keys:r,keySet:new Set(r),numKeys:r.length,optionalKeys:new Set(i)}}function Yu(t,r,i,o,e,n){let a=[],c=e.keySet,l=e.catchall._zod,u=l.def.type,d=l.optin==="optional",p=l.optout==="optional";for(let _ in r){if(_==="__proto__"||c.has(_))continue;if(u==="never"){a.push(_);continue}let $=l.run({value:r[_],issues:[]},o);$ instanceof Promise?t.push($.then(b=>Yt(b,i,_,r,d,p))):Yt($,i,_,r,d,p)}return a.length&&i.issues.push({code:"unrecognized_keys",keys:a,input:r,inst:n}),t.length?Promise.all(t).then(()=>i):i}var Hu=s("$ZodObject",(t,r)=>{if(x.init(t,r),!Object.getOwnPropertyDescriptor(r,"shape")?.get){let c=r.shape;Object.defineProperty(r,"shape",{get:()=>{let l={...c};return Object.defineProperty(r,"shape",{value:l}),l}})}let o=ke(()=>qu(r));z(t._zod,"propValues",()=>{let c=r.shape,l={};for(let u in c){let d=c[u]._zod;if(d.values){l[u]??(l[u]=new Set);for(let p of d.values)l[u].add(p)}}return l});let e=fe,n=r.catchall,a;t._zod.parse=(c,l)=>{a??(a=o.value);let u=c.value;if(!e(u))return c.issues.push({expected:"object",code:"invalid_type",input:u,inst:t}),c;c.value={};let d=[],p=a.shape;for(let _ of a.keys){let $=p[_],b=$._zod.optin==="optional",R=$._zod.optout==="optional",O=$._zod.run({value:u[_],issues:[]},l);O instanceof Promise?d.push(O.then(vn=>Yt(vn,c,_,u,b,R))):Yt(O,c,_,u,b,R)}return n?Yu(d,u,c,l,o.value,t):d.length?Promise.all(d).then(()=>c):c}}),po=s("$ZodObjectJIT",(t,r)=>{Hu.init(t,r);let i=t._zod.parse,o=ke(()=>qu(r)),e=_=>{let $=new st(["shape","payload","ctx"]),b=o.value,R=B=>{let P=Zt(B);return`shape[${P}]._zod.run({ value: input[${P}], issues: [] }, ctx)`};$.write("const input = payload.value;");let O=Object.create(null),vn=0;for(let B of b.keys)O[B]=`key_${vn++}`;$.write("const newResult = {};");for(let B of b.keys){let P=O[B],Z=Zt(B),yu=_[B],bu=yu?._zod?.optin==="optional",bd=yu?._zod?.optout==="optional";$.write(`const ${P} = ${R(B)};`),bu&&bd?$.write(`
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import b from"./OF3TAARW.js";import{a as t}from"./V4PJMCJZ.js";import{a as l}from"./A6LBMS7A.js";import{Dc as d}from"./M2U456J5.js";import{a}from"./5X23DDDZ.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([o])=>{var g=.7,b=10;async function S(i){let{query:e,layerIds:s,includeSummaryStatistics:r=!1,fieldSearch:c,layersAndFieldsRegistry:m,embeddingCache:y,mapView:u,minScore:f=g,topResults:h=b}=i,n=await c.searchFields({text:e,layerIds:s,minScore:f,topResults:h,embeddingCache:y}),p=await o(n,m,u,r);return{matches:n,...p}}var v=a.object({query:a.string().describe("A concise semantic description of the fields relevant to the user's task."),layerIds:a.array(a.string()).min(1).describe("Layer IDs returned by findRelevantLayers, restricted to layers relevant to the current task."),includeSummaryStatistics:a.boolean().optional().default(!1).describe("Set to true only when the task directly asks for numeric summaries such as average, minimum, maximum, total, variance, or range.")});async function w(i,e){let{mapView:s}=l(e,["mapView"]),r=await S({...i,fieldSearch:t(e,"fieldSearch"),layersAndFieldsRegistry:t(e,"layersAndFieldsRegistry"),embeddingCache:t(e,"embeddingCache"),mapView:s});return JSON.stringify(r,null,2)}var A=d(w,{name:"findRelevantFields",description:"Finds relevant fields within candidate layers. Returns ranked matches, field metadata, categorical values, and optional numeric summary statistics. Call findRelevantLayers first when layer IDs are not already known.",schema:v});return A},b)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{c}from"./2WXXSZP5.js";export default $arcgis.t(([l,{property:i,subclass:y},{watch:d}])=>{var w=Object.defineProperty,g=Object.getOwnPropertyDescriptor,t=(s,a,p,o)=>{for(var r=o>1?void 0:o?g(a,p):a,h=s.length-1,n;h>=0;h--)(n=s[h])&&(r=(o?n(a,p,r):n(r))||r);return o&&r&&w(a,p,r),r},m=()=>{throw new Error("createGraph method not implemented.")},e=class extends l{constructor(){super(...arguments),this.description="",this.middlewares=[],this.createGraph=m,this.workspace=c()}initialize(){this.addHandles([d(()=>[this.name,this.description],()=>this.generate(),{initial:!0,sync:!0}),d(()=>this.createGraph,()=>this._compiledGraph=void 0)])}get id(){return this.name.replace(/\s+/gu,"-").toLowerCase()}get registration(){return{id:this.id,name:this.name,description:this.description,createGraph:this.createGraph,workspace:this.workspace}}async run(s={},a){return this.createGraph===m&&this.generate(),this._compiledGraph=this._compiledGraph??this.createGraph().compile(),await this._compiledGraph.invoke(s,a)}};t([i({readOnly:!0})],e.prototype,"id",1);t([i()],e.prototype,"name",2);t([i()],e.prototype,"description",2);t([i()],e.prototype,"middlewares",2);t([i({readOnly:!0})],e.prototype,"createGraph",2);t([i({readOnly:!0})],e.prototype,"workspace",2);t([i({readOnly:!0})],e.prototype,"registration",1);e=t([y("BaseAgent")],e);return e},"core/Accessor","core/accessorSupport/decorators","core/reactiveUtils")
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{a as c}from"./A6LBMS7A.js";import{Dc as d}from"./M2U456J5.js";import{a}from"./5X23DDDZ.js";export default $arcgis.t(([i,u,w,{addressToLocations:S},v])=>{async function y(e,s){let r=w.getDefault().helperServices,n=r.geocode.find(g=>g.name==="ArcGIS World Geocoding Service")??r.geocode[0];if(!n)throw new Error("No geocoding service found in helperServices.");let l=n.url,m=`${i.assetsPath?.endsWith("/")?i.assetsPath:`${i.assetsPath}/`}esri/images/search/search-symbol-32.png`,o=(await S(l,{address:{SingleLine:e},outFields:["Match_addr"]}))?.[0];if(!o?.extent||!o.location)throw new Error(`Could not find location for: ${e}`);let h=new v({url:m,width:24,height:24}),p=new u({geometry:o.location,symbol:h});s.graphics.removeAll(),s.graphics.add(p),await s.goTo(o.extent);let t={address:o.address??e,location:o.location.toJSON(),extent:o.extent.toJSON()},f={value:t,sharedStatePatch:{lastResolvedLocation:{value:t}},sharedResourceAdditions:[{kind:"point",description:t.address,payload:t.location}]};return[`Successfully zoomed to ${t.address}.`,f]}async function T({address:e},s){let{mapView:r}=c(s,["mapView"]);return await y(e,r)}var A=a.object({address:a.string().describe("The full address or place name to locate.")}),W=d(T,{name:"goToAddress",description:"Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",schema:A,responseFormat:"content_and_artifact"});return W},"config","Graphic","portal/Portal","rest/locator","symbols/PictureMarkerSymbol")
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import b from"./STOGCXJH.js";import a from"./VGLBH473.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)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import a from"./XV7RMYLR.js";import"./2WXXSZP5.js";import"./4OI4QEV7.js";import"./ZJWR4W2S.js";import"./M2U456J5.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([{property:l,subclass:w},{c:p,d:d}])=>{var y=Object.defineProperty,m=Object.getOwnPropertyDescriptor,f=e=>{throw TypeError(e)},h=(e,t,o,n)=>{for(var r=n>1?void 0:n?m(t,o):t,s=e.length-1,g;s>=0;s--)(g=e[s])&&(r=(n?g(t,o,r):g(r))||r);return n&&r&&y(t,o,r),r},k=(e,t,o)=>t.has(e)||f("Cannot "+o),b=(e,t,o)=>t.has(e)?f("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,o),c=(e,t,o)=>(k(e,t,"access private method"),o),a,i,u=class extends d{constructor(e){super(e),b(this,a)}getAgents(){return c(this,a,i).call(this),[this.routerAgent,...Object.values(this.agentsMap)]}buildEdges(e){c(this,a,i).call(this);let t=p(this.routerAgent,0),o=new Map;for(let[n,[r]]of Object.entries(this.agentsMap).entries())o.set(r,p(e[n+1],n+1));return[{from:t,decide:n=>{let r=n[this.routerOutputKey];if(typeof r!="string"||!r)throw new Error("RouterWorkflow decideRoute could not determine next agent from state.");let s=o.get(r);if(!s)throw new Error(`RouterWorkflow decideRoute returned unknown agent: ${r}. Expected one of: ${Object.keys(this.agentsMap).join(", ")||"(none)"}.`);return s}}]}getEntryNode(){return c(this,a,i).call(this),p(this.routerAgent,0)}isTerminalAgent(e,t){return t>0}validateAgents(e){c(this,a,i).call(this),super.validateAgents(e)}};a=new WeakSet;i=function(){if(!Object.keys(this.agentsMap).length)throw new Error("RouterWorkflow requires a non-empty agentsMap.")};h([l()],u.prototype,"agentsMap",2);h([l()],u.prototype,"routerAgent",2);h([l()],u.prototype,"routerOutputKey",2);u=h([w("RouterWorkflow")],u);return u},"core/accessorSupport/decorators",a)
@@ -1,2 +1,2 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as o}from"./YLN2BZ5J.js";import"./QCSN44H4.js";import"./NXKKG5TK.js";import{g as a,h as e,n as i,v as c,z as n}from"./HWKDNS4K.js";import"./YIMNOUTF.js";var r=a`.actions{display:flex;flex-direction:row;gap:var(--calcite-spacing-xs)}`,t=class extends c{constructor(){super(...arguments),this._messages=o({blocking:!0}),this.feedbackEnabled=!1,this.arcgisFeedback=i()}static{this.properties={feedbackEnabled:5,message:0}}static{this.styles=r}_handleFeedback(s){this.message&&(this.message.feedback=this.message.feedback?.positive===s?void 0:{positive:s},this.arcgisFeedback.emit(this.message),this.requestUpdate())}_getFeedback(){return this.message?.feedback?.positive}_renderThumbsUpButton(){return e`<calcite-action id=action-thumbs-up icon=thumbs-up scale=s .active=${this._getFeedback()===!0} @click=${()=>this._handleFeedback(!0)} text></calcite-action><calcite-tooltip reference-element=action-thumbs-up overlay-positioning=fixed placement=bottom><span>${this._messages.thumbsUpLabel}</span></calcite-tooltip>`}_renderThumbsDownButton(){return e`<calcite-action id=action-thumbs-down icon=thumbs-down scale=s .active=${this._getFeedback()===!1} @click=${()=>this._handleFeedback(!1)} text></calcite-action><calcite-tooltip reference-element=action-thumbs-down overlay-positioning=fixed placement=bottom><span>${this._messages.thumbsDownLabel}</span></calcite-tooltip>`}render(){return this.feedbackEnabled&&!this.message?.error?e`<div class="actions">${this._renderThumbsUpButton()}${this._renderThumbsDownButton()}</div>`:null}};n("arcgis-assistant-message-feedback",t);export{t as ArcgisAssistantMessageFeedback};
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{b as o}from"./BBEGLIZC.js";import"./4YOG5F3W.js";import{g as a,h as e,n as i,v as c,z as n}from"./53KIFJFA.js";import"./TLPZELG3.js";import"./BVUCNXC5.js";var r=a`.actions{display:flex;flex-direction:row;gap:var(--calcite-spacing-xs)}`,t=class extends c{constructor(){super(...arguments),this._messages=o({blocking:!0}),this.feedbackEnabled=!1,this.arcgisFeedback=i()}static{this.properties={feedbackEnabled:5,message:0}}static{this.styles=r}_handleFeedback(s){this.message&&(this.message.feedback=this.message.feedback?.positive===s?void 0:{positive:s},this.arcgisFeedback.emit(this.message),this.requestUpdate())}_getFeedback(){return this.message?.feedback?.positive}_renderThumbsUpButton(){return e`<calcite-action id=action-thumbs-up icon=thumbs-up scale=s .active=${this._getFeedback()===!0} @click=${()=>this._handleFeedback(!0)} text></calcite-action><calcite-tooltip reference-element=action-thumbs-up overlay-positioning=fixed placement=bottom><span>${this._messages.thumbsUpLabel}</span></calcite-tooltip>`}_renderThumbsDownButton(){return e`<calcite-action id=action-thumbs-down icon=thumbs-down scale=s .active=${this._getFeedback()===!1} @click=${()=>this._handleFeedback(!1)} text></calcite-action><calcite-tooltip reference-element=action-thumbs-down overlay-positioning=fixed placement=bottom><span>${this._messages.thumbsDownLabel}</span></calcite-tooltip>`}render(){return this.feedbackEnabled&&!this.message?.error?e`<div class="actions">${this._renderThumbsUpButton()}${this._renderThumbsDownButton()}</div>`:null}};n("arcgis-assistant-message-feedback",t);export{t as ArcgisAssistantMessageFeedback};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{a as r}from"./B3HXSEBN.js";import{a as m,b}from"./BBEGLIZC.js";import"./4YOG5F3W.js";import{g as l,h as e,v as c,x as d,z as g}from"./53KIFJFA.js";import"./TLPZELG3.js";import"./BVUCNXC5.js";var p=l`:host{display:block;container-type:inline-size}.container{display:flex;flex-direction:column;align-items:flex-start;gap:var(--calcite-spacing-sm);width:100%;text-align:left}.icon{padding:var(--calcite-spacing-sm);border-radius:var(--calcite-spacing-xl);background:var(--calcite-color-brand);color:var(--calcite-color-foreground-1)}.content-container{display:flex;flex:1;flex-direction:column;width:100%;min-width:0;gap:var(--calcite-spacing-md)}.content{display:flex;flex-direction:column;min-width:0;gap:var(--calcite-spacing-sm)}.blocks{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm)}.block-pending{display:flex;justify-content:center;align-items:center;padding:var(--calcite-spacing-sm);background:linear-gradient(90deg,color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent),color-mix(in srgb,var(--calcite-color-foreground-3) 85%,transparent),color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent));background-size:200% 100%;animation:assistant-message-loading-shimmer 2s ease-in-out infinite;border-radius:var(--calcite-border-radius);min-height:100px}.message-error{font-style:italic}@container (min-width: 480px){.container{max-width:80%}}@keyframes assistant-message-loading-shimmer{0%{background-position:-150% 0}to{background-position:150% 0}}@media(prefers-reduced-motion){.block-pending{animation:none}}`;function u({message:a}){let s=new Map;return a&&a.blocks?.forEach((i,t)=>{if(!i.isPending){let n=r(a.id,t);s.set(n,{data:{block:i,index:t,message:a},name:"block",slotName:n})}}),s}var o=class extends c{constructor(){super(...arguments),this._messages=b({blocking:!0}),this.arcgisSlottableRequest=m(this,["message"],u),this.feedbackEnabled=!1,this.logEnabled=!1,this.copyEnabled=!1,this.readAloudEnabled=!1,this.footerDisabled=!1,this.assistantAvatarEnabled=!1}static{this.properties={_isStreaming:16,feedbackEnabled:5,logEnabled:5,copyEnabled:5,readAloudEnabled:5,footerDisabled:5,message:0,assistantAvatarEnabled:5}}static{this.styles=p}get _isStreaming(){return!!this.message?.isStreaming}_renderContent(){let s=this.message,i=s?.id;if(i)return e`<div class="content"><arcgis-assistant-interrupt-preview .interrupts=${this.message?.interrupts}></arcgis-assistant-interrupt-preview>${s.blocks?.length?e`<div class="blocks">${s.blocks.map((t,n)=>t.isPending&&t.type!=="text"?e`<div class="block-pending"></div>`:e`<slot name=${r(i,n)??d}></slot>`)}</div>`:null}</div>`}_renderFooter(){return e`<arcgis-assistant-message-footer .message=${this.message} .feedbackEnabled=${this.feedbackEnabled} .logEnabled=${this.logEnabled} .copyEnabled=${this.copyEnabled} .readAloudEnabled=${this.readAloudEnabled}></arcgis-assistant-message-footer>`}render(){return e`<div class="container">${this.assistantAvatarEnabled?e`<slot name=icon><calcite-icon icon=effects class="icon" scale=s></calcite-icon></slot>`:null}<div class="content-container"><slot name=content>${this._renderContent()}</slot>${this.message?.error?e`<div class="message-error">${this.message.error}</div>`:null}${this._isStreaming?e`<div class="streaming-indicator"><calcite-loader .label=${this._messages.loadingLabel} inline></calcite-loader></div>`:null}${!this.footerDisabled&&!this._isStreaming?e`<slot name=footer>${this._renderFooter()}</slot>`:null}</div></div>`}};g("arcgis-assistant-message",o);export{o as ArcgisAssistantMessage};
@@ -1,9 +1,9 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"./R56X6ZKR.js";import a from"./T43LEBBE.js";import{c as K,d as E}from"./RUURNLTP.js";import"./5W7S2RS4.js";import"./NXKKG5TK.js";import{v as y,z as f}from"./HWKDNS4K.js";import{a as c,b}from"./P7DG5T3Z.js";import"./BX7FSMUU.js";import{a as x,b as d,j as k,ta as _}from"./DHKUXLU3.js";import{Z as v}from"./CHPQM77M.js";import"./WNS5ZUF5.js";import"./ZEYIBYSF.js";import"./YIMNOUTF.js";export default $arcgis.t(([,,,,,,,,,,,,,,,{fetchKnowledgeGraph:B},{j:A,l:q},{K:u,L:C,M:G,N:T,O:N,P:R,Q:L,R:$,S:z,T:F,U:D,a:S,m:g,n:h,p:M}])=>{var I=[R,L,F,$,N,D,z];async function O(e,a){let r=await g("arcgis_knowledge_tool_prompt"),o=C(a),s={assignedTask:e.agentExecutionContext.assignedTask,userRequest:e.agentExecutionContext.userRequest,priorSteps:e.agentExecutionContext.priorSteps,contextType:o},n=await q({promptText:r,messages:e.arcgisKnowledgeMessages,inputVariables:s,tools:I}),i=(n.tool_calls?.length??0)>0,t=typeof n.text=="string"?n.text.trim():"",l=t.length>0,p=n.content.toString();return!i&&(o==="map"||o==="knowledgeGraph")?{...e,arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages,n],outputMessage:o==="map"?"No tools were found for the current view and prompt. Maps do not support changing nonspatial visibility, layout changes, or generation from queries.":"No tools were found for the current prompt and knowledge graph service. A knowledge graph service only supports search and query.",status:"success"}:{...e,arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages,n],outputMessage:i?p:t,status:i?e.status:l?"success":"failed",summary:p?h(p):"ArcGIS Knowledge Agent tool executed."}}var U={generateCypher:"generated-cypher-query",queryGraphData:"graph-query-result",searchGraphData:"graph-search-result",addRecords:"added-records",applyLayout:"applied-layout",changeNonspatialVisibility:"changed-nonspatial-visibility",createLinkChart:"created-link-chart"};function V(e){return!!e&&e.status==="success"&&!!U[e.toolName]}function J(e){return{type:U[e.toolName],data:e.details}}async function P(e,a){let r=new S(I,{handleToolErrors:!1});try{let o=await r.invoke({messages:e.arcgisKnowledgeMessages},a),s=[];for(let t of o.messages){let l;if(typeof t.content!="string")throw new Error(`Unexpected tool message content type: ${typeof t.content}. Expected string.`);try{l=JSON.parse(t.content)}catch{throw new Error(`Failed to parse tool message content as JSON. Tool: ${t.name??"unknown"}.
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/1.0/LICENSE.txt */
2
+ import{a as R}from"./2F4TPWZQ.js";import b from"./ZY3JQCZQ.js";import a from"./2LVYAXHG.js";import{a as c,b as k}from"./V52GSTOC.js";import{A as f,Ya as x,r as w,s as d}from"./ZJWR4W2S.js";import{ta as u}from"./M2U456J5.js";export default $arcgis.t(([,,,,,,{n:_,p:b},{A:S,B:M,C:T,D:E,E:C,F:G,G:N,b:v,d:m,e:h,w:y,x:A,y:K,z:q}])=>{var z=[M,T,G,E,S,N,C];async function $(e,a){let s=await m("arcgis_knowledge_tool_prompt"),o=A(a),n={assignedTask:e.agentExecutionContext.assignedTask,userRequest:e.agentExecutionContext.userRequest,priorSteps:e.agentExecutionContext.priorSteps,contextType:o},r=await b({promptText:s,messages:e.arcgisKnowledgeMessages,inputVariables:n,tools:z,config:a}),i=(r.tool_calls?.length??0)>0,t=typeof r.text=="string"?r.text.trim():"",l=t.length>0,p=r.content.toString();return!i&&(o==="map"||o==="knowledgeGraph")?{...e,arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages,r],outputMessage:o==="map"?"No tools were found for the current view and prompt. Maps do not support changing nonspatial visibility, layout changes, or generation from queries.":"No tools were found for the current prompt and knowledge graph service. A knowledge graph service only supports search and query.",status:"success"}:{...e,arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages,r],outputMessage:i?p:t,status:i?e.status:l?"success":"failed",summary:p?h(p):"ArcGIS Knowledge Agent tool executed."}}var L={generateCypher:"generated-cypher-query",queryGraphData:"graph-query-result",searchGraphData:"graph-search-result",addRecords:"added-records",applyLayout:"applied-layout",changeNonspatialVisibility:"changed-nonspatial-visibility",createLinkChart:"created-link-chart"};function I(e){return!!e&&e.status==="success"&&!!L[e.toolName]}function D(e){return{type:L[e.toolName],data:e.details}}async function F(e,a){let s=new v(z,{handleToolErrors:!1});try{let o=await s.invoke({messages:e.arcgisKnowledgeMessages},a),n=[];for(let t of o.messages){let l;if(typeof t.content!="string")throw new Error(`Unexpected tool message content type: ${typeof t.content}. Expected string.`);try{l=JSON.parse(t.content)}catch{throw new Error(`Failed to parse tool message content as JSON. Tool: ${t.name??"unknown"}.
3
3
 
4
- Original Content: ${t.content}`)}if(!l||typeof l!="object"||!("toolName"in l))throw new Error(`Parsed tool message content does not have expected structure. Parsed content: ${JSON.stringify(l)}`);s.push(l)}await c({text:`Finished executing ArcGIS Knowledge Agent tools: ${o.messages.filter(t=>t.name).map(t=>t.name).join(", ")}`},a);let n=s.filter(t=>typeof t!="string").map(t=>`- Called Tool: ${t.toolName}, Status: ${t.status}`),i=s[0];return i&&V(i)&&await b(J(i),a),{...e,outputMessage:n.join(`
5
- `),summary:n.length?h(n.join(`
6
- `)):"ArcGIS Knowledge Agent did not execute any tools or return any results.",arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages,...o.messages],arcgisKnowledgeToolResult:s}}catch(o){let s=o instanceof Error?o.message:String(o);return await c({text:`ArcGIS Knowledge Agent tool execution failed unexpectedly: ${s}`},a),{...e,outputMessage:`ArcGIS Knowledge Agent tool execution failed unexpectedly: ${s}`,status:"failed",summary:h(`ArcGIS Knowledge Agent tool execution failed unexpectedly: ${s}`),arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages]}}}var H=(e,a)=>M([],"ArcgisKnowledge Agent")(e,a);async function Q(e,a){let r=(e.arcgisKnowledgeToolResult??[]).map(l=>({...l,details:void 0})),{knowledgeGraph:o}=await G(a),s=T.getDataModelTypesSummary(o.dataModel),n={assignedTask:e.agentExecutionContext.assignedTask,userRequest:e.agentExecutionContext.userRequest,toolResult:r,dataModelSummary:s},i=await A({promptText:await g("arcgis_knowledge_summarize_result_prompt"),modelTier:"default",inputVariables:n}),t=typeof i=="string"?i:i.content;return{...e,outputMessage:t,status:"success",summary:h(t),arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages,new v(t)]}}function m(e){return async(a,r)=>r?.configurable?.abortSignal?.aborted?(await c({text:"Knowledge Agent execution cancelled"},r),new k({goto:d,update:{outputMessage:"Knowledge Agent execution cancelled",summary:"Knowledge Agent execution cancelled",status:"failed"}})):await e(a,r)}var X=()=>new _(u).addNode("requireArcgisKnowledgeServices",H).addNode("agent",m(O)).addNode("tools",m(P)).addNode("summarizationLLM",m(Q)).addEdge(x,"requireArcgisKnowledgeServices").addEdge("requireArcgisKnowledgeServices","agent").addConditionalEdges("agent",e=>(e.arcgisKnowledgeMessages[e.arcgisKnowledgeMessages.length-1]?.tool_calls?.length??0)>0?"tools":d).addConditionalEdges("tools",e=>e.status==="failed"?d:"summarizationLLM").addEdge("summarizationLLM",d),Y=String.raw`The purpose of this agent is to work with Knowledge Graph data, a graph database technology that represents and stores data as interconnected entities (nodes) and relationships (edges).
4
+ Original Content: ${t.content}`)}if(!l||typeof l!="object"||!("toolName"in l))throw new Error(`Parsed tool message content does not have expected structure. Parsed content: ${JSON.stringify(l)}`);n.push(l)}await c({text:`Finished executing ArcGIS Knowledge Agent tools: ${o.messages.filter(t=>t.name).map(t=>t.name).join(", ")}`},a);let r=n.filter(t=>typeof t!="string").map(t=>`- Called Tool: ${t.toolName}, Status: ${t.status}`),i=n[0];return i&&I(i)&&await k(D(i),a),{...e,outputMessage:r.join(`
5
+ `),summary:r.length?h(r.join(`
6
+ `)):"ArcGIS Knowledge Agent did not execute any tools or return any results.",arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages,...o.messages],arcgisKnowledgeToolResult:n}}catch(o){let n=o instanceof Error?o.message:String(o);return await c({text:`ArcGIS Knowledge Agent tool execution failed unexpectedly: ${n}`},a),{...e,outputMessage:`ArcGIS Knowledge Agent tool execution failed unexpectedly: ${n}`,status:"failed",summary:h(`ArcGIS Knowledge Agent tool execution failed unexpectedly: ${n}`),arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages]}}}var V=(e,a)=>R([],"ArcgisKnowledge Agent")(e,a);async function O(e,a){let s=(e.arcgisKnowledgeToolResult??[]).map(l=>({...l,details:void 0})),{knowledgeGraph:o}=await K(a),n=q.getDataModelTypesSummary(o.dataModel),r={assignedTask:e.agentExecutionContext.assignedTask,userRequest:e.agentExecutionContext.userRequest,toolResult:s,dataModelSummary:n},i=await _({promptText:await m("arcgis_knowledge_summarize_result_prompt"),modelTier:"default",inputVariables:r,config:a}),t=typeof i=="string"?i:i.content;return{...e,outputMessage:t,status:"success",summary:h(t),arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages,new u(t)]}}async function j(e){let a=e.arcgisKnowledgeToolResult?.[0],s=a?.status==="success"?a.summary:"ArcGIS Knowledge Agent tool execution failed.";return{...e,outputMessage:s,status:"success",summary:h(s),arcgisKnowledgeMessages:[...e.arcgisKnowledgeMessages,new u(s)]}}function g(e){return async(a,s)=>s?.signal?.aborted?(await c({text:"Knowledge Agent execution cancelled"},s),new f({goto:d,update:{outputMessage:"Knowledge Agent execution cancelled",summary:"Knowledge Agent execution cancelled",status:"failed"}})):await e(a,s)}var J=()=>new x(y).addNode("requireArcgisKnowledgeServices",V).addNode("agent",g($)).addNode("tools",g(F)).addNode("summarizationLLM",g(O)).addNode("finalizeToolSummary",g(j)).addEdge(w,"requireArcgisKnowledgeServices").addEdge("requireArcgisKnowledgeServices","agent").addConditionalEdges("agent",e=>(e.arcgisKnowledgeMessages[e.arcgisKnowledgeMessages.length-1]?.tool_calls?.length??0)>0?"tools":d).addConditionalEdges("tools",e=>{if(e.status==="failed")return d;let a=e.arcgisKnowledgeToolResult?.[0];return a?.status==="success"&&["applyLayout","changeNonspatialVisibility"].includes(a.toolName)?"finalizeToolSummary":"summarizationLLM"}).addEdge("summarizationLLM",d).addEdge("finalizeToolSummary",d),P=String.raw`The purpose of this agent is to work with Knowledge Graph data, a graph database technology that represents and stores data as interconnected entities (nodes) and relationships (edges).
7
7
  This agent has two categories of skills: those that work with an active link chart visualization of a subset of the data in the knowledge graph, and those that work with the knowledge graph data more generally against the entire dataset in the service and database.
8
8
  For link charts, the agent enables users to interact with a link chart by adding new entities (also called nodes) or relationships (also called edges), removing existing entities or relationships,
9
9
  expanding the graph from particular entities, finding relationships between specified entities on the link chart and adding them to the link chart, finding all relationships
@@ -41,4 +41,4 @@ _example: "Discover and add all the relationships originating at 'Entity E' to t
41
41
  _example: "Show me all entities with a name similar to 'Smith' and add them to the link chart"_
42
42
  _example: "Find reports in my graph that have a title similar to 'Quarterly Earnings'"_
43
43
  _example: "Find John Smith and all people he has made phone calls to in the last year"_
44
- _example: "What is the average age of all people who work for Esri?"_`,j={id:"arcgisKnowledge",name:"ArcgisKnowledge Agent",description:Y,createGraph:X,workspace:u};var w=class extends y{constructor(){super(...arguments),this.agent=j}static{this.properties={referenceElement:1,serviceUrl:3,context:0}}#t;#a;#e;get serviceUrl(){return this.#a}set serviceUrl(a){this.#a=a}async getContext(){let a=this.context?{...this.context,knowledgeGraph:void 0,view:void 0}:{};if(this.#t)return{...a,view:this.#t};if(this.#e)try{let r=await this.#e;return{...a,knowledgeGraph:r}}catch(r){console.error("Failed to load knowledge graph via service URL:",r)}if(!this.context?.knowledgeGraph&&!this.context?.view)throw new Error("arcgis-assistant-knowledge-agent requires either a knowledgeGraph or view in context, and neither were provided");return this.context}willUpdate(a){a.has("serviceUrl")&&this.serviceUrl?this.#e=B(this.serviceUrl):this.#e=void 0}load(){this.#t=E(this)??void 0,K(this)}};f("arcgis-assistant-knowledge-agent",w);return w},"identity/IdentityManager","portal/Portal","config","core/reactiveUtils","layers/FeatureLayer","request","intl","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","identity/IdentityManager","portal/Portal","config","core/reactiveUtils","layers/FeatureLayer","request","rest/knowledgeGraphService",a,e)
44
+ _example: "What is the average age of all people who work for Esri?"_`,de={id:"arcgisKnowledge",name:"ArcgisKnowledge Agent",description:P,createGraph:J,workspace:y};return de},"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 a from"./KBSXHSBX.js";import"./A6LBMS7A.js";import"./M2U456J5.js";import"./5X23DDDZ.js";import"./CSE6BHOJ.js";import"./BVUCNXC5.js";export default $arcgis.t(([a])=>{return a},a)