@arcgis/ai-components 5.0.0-next.135 → 5.0.0-next.137

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 (100) hide show
  1. package/dist/cdn/{45J72RA5.js → 2X4MXAGP.js} +3 -2
  2. package/dist/cdn/{K4DOBIBC.js → 2YU5J7GR.js} +1 -1
  3. package/dist/cdn/{GNYKVIRC.js → 3GN2ULHI.js} +3 -3
  4. package/dist/cdn/{NPQWPRM6.js → 3MC7WUUS.js} +2 -2
  5. package/dist/cdn/{AENVX2C7.js → 4QKLAOX2.js} +2 -2
  6. package/dist/cdn/{IBW6D6XX.js → 5R3XBBPI.js} +2 -2
  7. package/dist/cdn/{H6HTZ2RZ.js → 77UW5IWK.js} +2 -2
  8. package/dist/cdn/7CZJHD5E.js +4 -0
  9. package/dist/cdn/{ETNHCA5Y.js → A4WRDZTQ.js} +2 -2
  10. package/dist/cdn/{NCD5D6JY.js → AAKD5SX2.js} +2 -2
  11. package/dist/cdn/{2I6RIEM7.js → AWERJEZY.js} +2 -2
  12. package/dist/cdn/{PZRNLUV2.js → BU42TIIY.js} +2 -2
  13. package/dist/cdn/{5EXI6IBC.js → C2KQ57RK.js} +33 -33
  14. package/dist/cdn/{BSFH6ITF.js → D7BNWOJC.js} +2 -2
  15. package/dist/cdn/{7VXM3PHG.js → EIEL6M2I.js} +2 -2
  16. package/dist/cdn/{KXZ5YZL6.js → ESFRLW3E.js} +2 -2
  17. package/dist/cdn/{3YJ4XNZB.js → FXYXZK6L.js} +2 -2
  18. package/dist/cdn/{LA353F4X.js → G2D5AXYL.js} +2 -2
  19. package/dist/cdn/HRHXMBOF.js +4 -0
  20. package/dist/cdn/J4W33PXP.js +134 -0
  21. package/dist/cdn/{YQVK2H7R.js → JEJTPF54.js} +1 -1
  22. package/dist/cdn/{VY47US65.js → KL6UK22M.js} +2 -2
  23. package/dist/cdn/{JRSCOKGO.js → KTVRK3Y4.js} +2 -2
  24. package/dist/cdn/{LQKHGIXO.js → LV5GG4KG.js} +2 -2
  25. package/dist/cdn/{6JIAN4EB.js → M4G5BT2E.js} +2 -2
  26. package/dist/cdn/O5MI43R3.js +6 -0
  27. package/dist/cdn/{XOXI7KQN.js → P5L22JWW.js} +2 -2
  28. package/dist/cdn/{QFWBH3U2.js → PI3TDXYV.js} +2 -2
  29. package/dist/cdn/{FQP72TZH.js → PMGGAZSF.js} +2 -2
  30. package/dist/cdn/{D5B4XO32.js → Q5GRZVLA.js} +2 -2
  31. package/dist/cdn/{4BKDN7AJ.js → U3XLNPGW.js} +2 -2
  32. package/dist/cdn/{ZHEJLKZX.js → UFFBFDYM.js} +2 -2
  33. package/dist/cdn/{4JWSHGI3.js → VL7UTIRF.js} +1 -1
  34. package/dist/cdn/{XULCWMYE.js → WD4CZF2P.js} +2 -2
  35. package/dist/cdn/{IHQXGVXR.js → XNR7IV6X.js} +2 -2
  36. package/dist/cdn/{4KXPB47L.js → XV373V66.js} +2 -2
  37. package/dist/cdn/{UROLRFUN.js → YFSPJOU4.js} +2 -2
  38. package/dist/cdn/{ZZIAB76W.js → ZJXE6HWP.js} +2 -2
  39. package/dist/cdn/{RTUKNJRX.js → ZYYIAOK3.js} +2 -2
  40. package/dist/cdn/index.js +2 -2
  41. package/dist/chunks/runtime.js +1 -1
  42. package/dist/chunks/useT9n.js +1 -1
  43. package/dist/chunks/utils.js +1 -1
  44. package/dist/chunks/utils2.js +1 -1
  45. package/dist/components/arcgis-assistant/customElement.d.ts +16 -12
  46. package/dist/components/arcgis-assistant/customElement.js +1 -1
  47. package/dist/components/arcgis-assistant/index.d.ts +0 -4
  48. package/dist/components/arcgis-assistant-agent/customElement.d.ts +7 -8
  49. package/dist/components/arcgis-assistant-agent/customElement.js +1 -1
  50. package/dist/components/arcgis-assistant-chat/customElement.d.ts +15 -15
  51. package/dist/components/arcgis-assistant-chat/customElement.js +1 -1
  52. package/dist/components/arcgis-assistant-chat/index.d.ts +0 -1
  53. package/dist/components/arcgis-assistant-chat-card/customElement.d.ts +29 -16
  54. package/dist/components/arcgis-assistant-chat-card/customElement.js +1 -1
  55. package/dist/components/arcgis-assistant-chat-card/index.d.ts +0 -5
  56. package/dist/components/arcgis-assistant-chat-card-content/customElement.d.ts +9 -9
  57. package/dist/components/arcgis-assistant-chat-card-content/customElement.js +1 -1
  58. package/dist/components/arcgis-assistant-chat-card-content/index.d.ts +0 -1
  59. package/dist/components/arcgis-assistant-chat-entry/customElement.d.ts +28 -17
  60. package/dist/components/arcgis-assistant-chat-entry/customElement.js +1 -1
  61. package/dist/components/arcgis-assistant-chat-entry/index.d.ts +0 -3
  62. package/dist/components/arcgis-assistant-data-exploration-agent/customElement.d.ts +5 -5
  63. package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +1 -1
  64. package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +25 -12
  65. package/dist/components/arcgis-assistant-interrupt/customElement.js +1 -1
  66. package/dist/components/arcgis-assistant-interrupt/index.d.ts +0 -5
  67. package/dist/components/arcgis-assistant-layer-filter-agent/customElement.d.ts +5 -5
  68. package/dist/components/arcgis-assistant-layer-filter-agent/customElement.js +1 -1
  69. package/dist/components/arcgis-assistant-layer-query-agent/customElement.d.ts +5 -5
  70. package/dist/components/arcgis-assistant-layer-query-agent/customElement.js +1 -1
  71. package/dist/components/arcgis-assistant-layer-styling-agent/customElement.d.ts +5 -5
  72. package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +1 -1
  73. package/dist/components/arcgis-assistant-navigation-agent/customElement.d.ts +5 -5
  74. package/dist/components/arcgis-assistant-navigation-agent/customElement.js +1 -1
  75. package/dist/components/arcgis-assistant-shell/customElement.d.ts +34 -23
  76. package/dist/components/arcgis-assistant-shell/customElement.js +1 -1
  77. package/dist/components/arcgis-assistant-shell/index.d.ts +0 -5
  78. package/dist/docs/api.json +1 -2239
  79. package/dist/docs/docs.json +1 -2011
  80. package/dist/docs/vscode.css-custom-data.json +1 -6
  81. package/dist/docs/vscode.html-custom-data.json +1 -306
  82. package/dist/docs/web-types.json +1 -693
  83. package/dist/index.d.ts +28 -19
  84. package/dist/index.js +1 -1
  85. package/dist/loader.js +6 -6
  86. package/dist/types/lumina.d.ts +19 -19
  87. package/dist/types/preact.d.ts +19 -19
  88. package/dist/types/react.d.ts +19 -19
  89. package/dist/types/stencil.d.ts +19 -19
  90. package/package.json +7 -7
  91. package/dist/cdn/5GP65UDI.js +0 -4
  92. package/dist/cdn/I54YR7UU.js +0 -6
  93. package/dist/cdn/ODYS7BCT.js +0 -134
  94. package/dist/cdn/SQPT22F4.js +0 -4
  95. package/dist/components/arcgis-assistant/support/OrchestratorController.d.ts +0 -33
  96. package/dist/components/arcgis-assistant/support/utils.d.ts +0 -1
  97. package/dist/components/assistant/assistant-agents/support/utils.d.ts +0 -14
  98. package/dist/controllers/useT9n.d.ts +0 -1
  99. package/dist/customAgents/AddAgent/AddAgent.d.ts +0 -2
  100. package/dist/runtime.d.ts +0 -6
@@ -1,7 +1,7 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.135 */
4
- import"./YQVK2H7R.js";var e=`## GIS Feature Layer Intent Classifier
3
+ v5.0.0-next.137 */
4
+ import"./JEJTPF54.js";var e=`## GIS Feature Layer Intent Classifier
5
5
 
6
6
  You are an assistant that classifies user intent in ArcGIS Online Map Viewer.
7
7
 
@@ -17,4 +17,5 @@ Rules:
17
17
  - Do **not** include any labels outside the list above.
18
18
  - Do **not** include "none"; return an empty list instead when unrelated questions like labels, popups, etc.
19
19
  - If none apply, return an empty array [].
20
+ - Each returned intent must be supported by evidence in the user request. Don\u2019t add \u2018nice-to-have\u2019 follow-up intents.
20
21
  `;export{e as default};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.135 */
3
+ v5.0.0-next.137 */
4
4
  var a=(n,t)=>{let e=n;for(;e;){if(e===t)return!0;if(!e.parentNode)return!1;e.parentNode instanceof ShadowRoot?e=e.parentNode.host:e=e.parentNode}return!1},f=(n,t,e)=>{let s=l(t).subscribe;return s(o=>{o.some(r=>a(n,r.target))&&e()})},c={},l=n=>{let t=n.join(","),e=c[t];if(e!==void 0)return e;let s=new Set,o=new MutationObserver(r=>s.forEach(u=>u(r)));globalThis.document&&o.observe(document.documentElement,{attributes:!0,attributeFilter:n,subtree:!0});let i={subscribe:r=>(s.add(r),()=>{s.delete(r),s.size===0&&(o.disconnect(),c[t]=void 0)})};return c[t]=i,i},d=(n,t)=>{let e=n;for(;e;){let s=e.closest?.(t);if(s)return s;let o=e.getRootNode?.();if(o===globalThis.document)return;e=o.host}};var h=(n,t,e)=>d(n,`[${t}]`)?.getAttribute(t)??e;export{f as a,d as b,h as c};
@@ -1,12 +1,12 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.135 */
4
- import a from"./ODYS7BCT.js";import{Ba as _,F as O,I as H,M as j,Wa as n,Y as K}from"./5EXI6IBC.js";export default $arcgis.t(([tt,oe,Ne,rt,{addressToLocations:at},Re,V,U,ie,ne,Ae,qe,se,ke,{createRenderer:ot},{getSchemesByTag:it,getSchemes:nt},{getBackgroundColorTheme:Te},{createAgeRenderer:st,createContinuousRenderer:lt},{getSchemesByTag:le},{createContinuousRenderer:ct},{createRenderer:dt},{getSchemesByTag:ut},{createRenderer:mt},{getSchemesByTag:ht},{createRenderer:ft},{getSchemesByTag:gt},{createRenderer:yt},{getSchemesByTag:pt},{createAgeRenderer:wt,createContinuousRenderer:bt},{createRenderer:St},{getSchemesByTag:vt},{a:ge,b:ye,c:p,d:g,e:N,f:x,g:pe,h:G,i:W,j:we,k:R,l:A,m:m,n:E,o:Y,p:be,q:C}])=>{var ve=e=>Array.isArray(e)&&e.every(O),He=e=>typeof e=="object"&&e!=null&&"messages"in e&&ve(e.messages),Ke=e=>typeof e=="object"&&e!=null&&"lg_tool_call"in e,L=class extends we{constructor(r,t){let{name:a,tags:o,handleToolErrors:i}=t??{};super({name:a,tags:o,func:(s,l)=>this.run(s,l)}),Object.defineProperty(this,"tools",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"handleToolErrors",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"trace",{enumerable:!0,configurable:!0,writable:!0,value:!1}),this.tools=r,this.handleToolErrors=i??this.handleToolErrors}async runTool(r,t){let a=this.tools.find(o=>o.name===r.name);try{if(a===void 0)throw new Error(`Tool "${r.name}" not found.`);let o=await a.invoke({...r,type:"tool_call"},t);return O(o)&&o.getType()==="tool"||W(o)?o:new H({status:"success",name:a.name,content:typeof o=="string"?o:JSON.stringify(o),tool_call_id:r.id})}catch(o){if(!this.handleToolErrors||ye(o))throw o;return new H({status:"error",content:`Error: ${o.message}
3
+ v5.0.0-next.137 */
4
+ import a from"./J4W33PXP.js";import{Fa as _,J as O,M as H,Q as j,aa as K}from"./C2KQ57RK.js";export default $arcgis.t(([tt,oe,Ne,rt,{addressToLocations:at},Re,V,U,ie,ne,Ae,qe,se,ke,{createRenderer:ot},{getSchemesByTag:it,getSchemes:nt},{getBackgroundColorTheme:Te},{createAgeRenderer:st,createContinuousRenderer:lt},{getSchemesByTag:le},{createContinuousRenderer:ct},{createRenderer:dt},{getSchemesByTag:ut},{createRenderer:mt},{getSchemesByTag:ht},{createRenderer:ft},{getSchemesByTag:gt},{createRenderer:yt},{getSchemesByTag:pt},{createAgeRenderer:wt,createContinuousRenderer:bt},{createRenderer:St},{getSchemesByTag:vt},{a:ge,b:ye,c:p,d:g,e:n,f:N,g:x,h:pe,i:G,j:W,k:we,l:R,m:A,n:m,o:E,p:Y,q:be,r:C}])=>{var ve=e=>Array.isArray(e)&&e.every(O),He=e=>typeof e=="object"&&e!=null&&"messages"in e&&ve(e.messages),Ke=e=>typeof e=="object"&&e!=null&&"lg_tool_call"in e,L=class extends we{constructor(r,t){let{name:a,tags:o,handleToolErrors:i}=t??{};super({name:a,tags:o,func:(s,l)=>this.run(s,l)}),Object.defineProperty(this,"tools",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"handleToolErrors",{enumerable:!0,configurable:!0,writable:!0,value:!0}),Object.defineProperty(this,"trace",{enumerable:!0,configurable:!0,writable:!0,value:!1}),this.tools=r,this.handleToolErrors=i??this.handleToolErrors}async runTool(r,t){let a=this.tools.find(o=>o.name===r.name);try{if(a===void 0)throw new Error(`Tool "${r.name}" not found.`);let o=await a.invoke({...r,type:"tool_call"},t);return O(o)&&o.getType()==="tool"||W(o)?o:new H({status:"success",name:a.name,content:typeof o=="string"?o:JSON.stringify(o),tool_call_id:r.id})}catch(o){if(!this.handleToolErrors||ye(o))throw o;return new H({status:"error",content:`Error: ${o.message}
5
5
  Please fix your mistakes.`,name:r.name,tool_call_id:r.id??""})}}async run(r,t){let a;if(Ke(r))a=[await this.runTool(r.lg_tool_call,t)];else{let s;if(ve(r))s=r;else if(He(r))s=r.messages;else throw new Error("ToolNode only accepts BaseMessage[] or { messages: BaseMessage[] } as input.");let l=new Set(s.filter(c=>c.getType()==="tool").map(c=>c.tool_call_id)),d;for(let c=s.length-1;c>=0;c-=1){let u=s[c];if(u.getType()==="ai"){d=u;break}}if(d?.getType()!=="ai")throw new Error("ToolNode only accepts AIMessages as input.");a=await Promise.all(d.tool_calls?.filter(c=>c.id==null||!l.has(c.id)).map(c=>this.runTool(c,t))??[])}if(!a.some(W))return Array.isArray(r)?a:{messages:a};let o=[],i=null;for(let s of a)W(s)?s.graph===G.PARENT&&Array.isArray(s.goto)&&s.goto.every(l=>pe(l))?i?i.goto.push(...s.goto):i=new G({graph:G.PARENT,goto:s.goto}):o.push(s):o.push(Array.isArray(r)?[s]:{messages:[s]});return i&&o.push(i),o}};var Rn=g.Root({llmInputMessages:g({reducer:(e,r)=>A([],r),default:()=>[]})});var ze=g.Root({messages:g({reducer:A,default:()=>[]}),outputMessage:g({reducer:(e="",r)=>{let t=typeof r=="string"?r.trim():"";if(!t)return e;let a=e.trim();if(!a)return t;if(a===t)return e;let o=a.split(`
6
6
 
7
7
  `);return o[o.length-1]?.trim()===t?e:`${e}
8
8
 
9
- ${t}`},default:()=>""}),intent:g({reducer:(e,r)=>r}),vectorSearchLayerResults:g({reducer:(e,r)=>r,default:()=>[]}),vectorSearchFieldResults:g({reducer:(e,r)=>r})});async function Tt(e,r){let t="https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer";console.log(`[goToAddress] Geocoding: ${e}`);let a=(await at(t,{address:{SingleLine:e},outFields:["Match_addr"]}))?.[0];if(!a?.extent)throw new Error(`Could not find location for: ${e}`);let{xmin:o,ymin:i,xmax:s,ymax:l,spatialReference:d}=a.extent,c=new Ne({xmin:o,ymin:i,xmax:s,ymax:l,spatialReference:d}),u=(o+s)/2,h=(i+l)/2,y=new oe({x:u,y:h,spatialReference:d}),f=new rt({style:"circle",color:"red",size:12}),w=new tt({geometry:y,symbol:f});return r.graphics.removeAll(),r.graphics.add(w),await r.goTo(c),`Successfully zoomed to: ${a.address}. Location coordinates: x=${u}, y=${h}, wkid=${d.wkid}`}var xt=["mapView"];function $(e){let r=e?.configurable?.context;if(!r||typeof r!="object")throw new Error("NavigationAgent context missing");let t=xt.filter(a=>!(a in r));if(t.length)throw new Error(`NavigationAgent context missing: ${t.join(", ")}`);return r}async function Et({address:e},r){let{mapView:t}=$(r);return await Tt(e,t)}var Lt=n.object({address:n.string().describe("The full address or place name to locate.")}),It=p(Et,{name:"goToAddress",description:"Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",schema:Lt});async function $t(e,r){let t=r.map.bookmarks;if(!t||t.length===0)throw new Error("No bookmarks found in the map.");let a=t.find(i=>i.name===e);if(!a)throw new Error(`Bookmark with name "${e}" not found.`);let o=a.viewpoint;if(!o)throw new Error(`Bookmark with name "${e}" does not have a valid viewpoint.`);return await r.goTo(o),`Navigated to bookmark: ${e}`}async function Ft({bookmarkName:e},r){let{mapView:t}=$(r);return await Promise.resolve($t(e,t))}var _t=_.object({bookmarkName:_.string().describe("The name of the bookmark to navigate to.")}),Nt=p(Ft,{name:"goToBookmark",description:"Go to the extent of the bookmark with the given name.",schema:_t});async function Rt(e,r,t){let a=t.map?.allLayers.find(i=>i.id===e);if(!a)return`Error: Layer with id ${e} not found`;let o=a.createQuery();o.where=r??"1=1";try{let{extent:i,count:s}=await a.queryExtent(o);if(s===0)return`No features found in ${a.title} matching: ${r}`;if(i)await t.goTo(i);else return`Error: Unable to determine extent for ${a.title}`;return`Successfully zoomed to ${s} feature(s) in ${a.title}`}catch(i){return console.error("Error in goToFeatures:",i),`Error: ${i instanceof Error?i.message:"Unknown error"}`}}async function At({layerId:e,where:r},t){let{mapView:a}=$(t);return await Rt(e,r,a)}var qt=_.object({layerId:_.string().describe("The layerId of the layer to zoom to."),where:_.string().describe("The sql-92 where clause used to query features to zoom to")}),kt=p(At,{name:"goToFeatures",description:"Go to the features that match the given filter related to the given layerId.",schema:qt});async function zt(e){let r=new Ne({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}}).expand(.7);return await e.goTo(r),"Successfully zoomed to world extent"}async function Mt(e,r){let{mapView:t}=$(r);return await zt(t)}var Ct=_.object({}),jt=p(Mt,{name:"goToFullExtent",description:"Zooms the map to the full world extent using Esri's Geocoding Service.",schema:Ct});async function Vt(e){let r=e.map.initialViewProperties?.viewpoint?.targetGeometry;if(r)await e.goTo(r);else throw new Error("Initial extent is undefined");return"Successfully zoomed to home extent"}async function Ot(e,r){let{mapView:t}=$(r);return await Vt(t)}var Dt=n.object({}),Bt=p(Ot,{name:"goToHomeExtent",description:"Go to the initial web map view extent",schema:Dt});async function Qt(e,r){await r.when();let t=r.map?.allLayers.find(o=>o.id===e);if(!t)return console.warn(`[goToLayer] No matching FeatureLayer found for: ${e}`),`Could not find layer for: ${e}`;console.log(`[goToLayer] Zooming to layer: ${t.title}`);let a=t.fullExtent;return a?(await r.goTo(a),t.visible=!0,`Successfully zoomed to: ${t.title??""}`):"Layer has no defined extent. Cannot zoom to layer."}async function Pt({layerId:e},r){let{mapView:t}=$(r);return await Qt(e,t)}var Gt=_.object({layerId:_.string().describe("The id of the layer to navigate to")}),Wt=p(Pt,{name:"goToLayer",description:"Zooms the map view to the full extent of the top matching layer.",schema:Gt});async function Ut(e,r){return await r.goTo({scale:e}),`Successfully zoomed to: ${e}`}async function Jt({scale:e},r){let{mapView:t}=$(r);return await Ut(e,t)}var Zt=n.object({scale:n.number().describe("The map scale of the view to go to.")}),Ht=p(Jt,{name:"goToScale",description:"Go to the specified view scale.",schema:Zt});async function Kt(e,r,t){let a={target:new oe({longitude:e.longitude,latitude:e.latitude,spatialReference:{wkid:4326}})};return t?.zoom!==void 0&&(a.zoom=t.zoom),t?.scale!==void 0&&(a.scale=t.scale),await r.goTo(a),`Successfully navigated to: ${[`(${e.latitude}\xB0, ${e.longitude}\xB0)`,t?.zoom!==void 0?`zoom ${t.zoom}`:"",t?.scale!==void 0?`scale 1:${t.scale}`:""].filter(Boolean).join(", ")}`}async function Yt({center:e,zoom:r,scale:t},a){let{mapView:o}=$(a);return await Kt(e,o,{zoom:r,scale:t})}var Xt=n.object({center:n.object({longitude:n.number().describe("The longitude (x-coordinate) of the point to navigate to."),latitude:n.number().describe("The latitude (y-coordinate) of the point to navigate to.")}),zoom:n.number().optional().describe("The zoom level. Higher values = more zoomed in."),scale:n.number().optional().describe("The map scale. Alternative to zoom. Smaller numbers = more zoomed in.")}),er=p(Yt,{name:"goToViewpoint",description:"Go to the specified viewpoint. This can contain a combination of scale, center, zoom, etc.",schema:Xt});async function tr(e,r){return await r.goTo({zoom:e}),`Successfully zoomed to: ${e}`}async function rr({zoom:e},r){let{mapView:t}=$(r);return await tr(e,t)}var ar=n.object({zoom:n.number().min(1).max(20).describe("The zoom level of the view to go to.")}),or=p(rr,{name:"goToZoom",description:'Go to the specified zoom level. If input is generic (e.g. "zoom in", then only zoom to the next appropriate level - increase level for zooming in and decrease for zooming out.).',schema:ar}),ce=[It,Nt,kt,jt,Bt,Wt,Ht,er,or],xe=Object.assign({"../agents/dataExploration/prompts/data_explore_filter_prompt.md":()=>import("./FQP72TZH.js").then(e=>e.default),"../agents/dataExploration/prompts/data_explore_query_prompt.md":()=>import("./RTUKNJRX.js").then(e=>e.default),"../agents/layerFilter/prompts/layer_filter_prompt.md":()=>import("./LA353F4X.js").then(e=>e.default),"../agents/layerQuery/prompts/data_query_prompt.md":()=>import("./KXZ5YZL6.js").then(e=>e.default),"../agents/layerQuery/prompts/summarize_query_response_prompt.md":()=>import("./D5B4XO32.js").then(e=>e.default),"../agents/layerStyling/prompts/layer_styling_prompt.md":()=>import("./VY47US65.js").then(e=>e.default),"../agents/linkChart/prompts/link_chart_intent_prompt.md":()=>import("./4BKDN7AJ.js").then(e=>e.default),"../agents/linkChart/prompts/link_chart_tool_prompt.md":()=>import("./XULCWMYE.js").then(e=>e.default),"../agents/navigation/prompts/navigation_intent_prompt.md":()=>import("./2I6RIEM7.js").then(e=>e.default),"../agents/navigation/prompts/navigation_tool_prompt.md":()=>import("./H6HTZ2RZ.js").then(e=>e.default)});async function q(e){let r=Object.entries(xe).find(([t])=>t.endsWith(`/${e}.md`));if(console.log(`entry for prompt "${e}":`,r),!r)throw new Error(`Prompt not found: ${e}
9
+ ${t}`},default:()=>""}),intent:g({reducer:(e,r)=>r}),vectorSearchLayerResults:g({reducer:(e,r)=>r,default:()=>[]}),vectorSearchFieldResults:g({reducer:(e,r)=>r})});async function Tt(e,r){let t="https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer";console.log(`[goToAddress] Geocoding: ${e}`);let a=(await at(t,{address:{SingleLine:e},outFields:["Match_addr"]}))?.[0];if(!a?.extent)throw new Error(`Could not find location for: ${e}`);let{xmin:o,ymin:i,xmax:s,ymax:l,spatialReference:d}=a.extent,c=new Ne({xmin:o,ymin:i,xmax:s,ymax:l,spatialReference:d}),u=(o+s)/2,h=(i+l)/2,y=new oe({x:u,y:h,spatialReference:d}),f=new rt({style:"circle",color:"red",size:12}),w=new tt({geometry:y,symbol:f});return r.graphics.removeAll(),r.graphics.add(w),await r.goTo(c),`Successfully zoomed to: ${a.address}. Location coordinates: x=${u}, y=${h}, wkid=${d.wkid}`}var xt=["mapView"];function $(e){let r=e?.configurable?.context;if(!r||typeof r!="object")throw new Error("NavigationAgent context missing");let t=xt.filter(a=>!(a in r));if(t.length)throw new Error(`NavigationAgent context missing: ${t.join(", ")}`);return r}async function Et({address:e},r){let{mapView:t}=$(r);return await Tt(e,t)}var Lt=n.object({address:n.string().describe("The full address or place name to locate.")}),It=p(Et,{name:"goToAddress",description:"Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",schema:Lt});async function $t(e,r){let t=r.map.bookmarks;if(!t||t.length===0)throw new Error("No bookmarks found in the map.");let a=t.find(i=>i.name===e);if(!a)throw new Error(`Bookmark with name "${e}" not found.`);let o=a.viewpoint;if(!o)throw new Error(`Bookmark with name "${e}" does not have a valid viewpoint.`);return await r.goTo(o),`Navigated to bookmark: ${e}`}async function Ft({bookmarkName:e},r){let{mapView:t}=$(r);return await Promise.resolve($t(e,t))}var _t=_.object({bookmarkName:_.string().describe("The name of the bookmark to navigate to.")}),Nt=p(Ft,{name:"goToBookmark",description:"Go to the extent of the bookmark with the given name.",schema:_t});async function Rt(e,r,t){let a=t.map?.allLayers.find(i=>i.id===e);if(!a)return`Error: Layer with id ${e} not found`;let o=a.createQuery();o.where=r??"1=1";try{let{extent:i,count:s}=await a.queryExtent(o);if(s===0)return`No features found in ${a.title} matching: ${r}`;if(i)await t.goTo(i);else return`Error: Unable to determine extent for ${a.title}`;return`Successfully zoomed to ${s} feature(s) in ${a.title}`}catch(i){return console.error("Error in goToFeatures:",i),`Error: ${i instanceof Error?i.message:"Unknown error"}`}}async function At({layerId:e,where:r},t){let{mapView:a}=$(t);return await Rt(e,r,a)}var qt=_.object({layerId:_.string().describe("The layerId of the layer to zoom to."),where:_.string().describe("The sql-92 where clause used to query features to zoom to")}),kt=p(At,{name:"goToFeatures",description:"Go to the features that match the given filter related to the given layerId.",schema:qt});async function zt(e){let r=new Ne({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}}).expand(.7);return await e.goTo(r),"Successfully zoomed to world extent"}async function Mt(e,r){let{mapView:t}=$(r);return await zt(t)}var Ct=_.object({}),jt=p(Mt,{name:"goToFullExtent",description:"Zooms the map to the full world extent using Esri's Geocoding Service.",schema:Ct});async function Vt(e){let r=e.map.initialViewProperties?.viewpoint?.targetGeometry;if(r)await e.goTo(r);else throw new Error("Initial extent is undefined");return"Successfully zoomed to home extent"}async function Ot(e,r){let{mapView:t}=$(r);return await Vt(t)}var Dt=n.object({}),Bt=p(Ot,{name:"goToHomeExtent",description:"Go to the initial web map view extent",schema:Dt});async function Qt(e,r){await r.when();let t=r.map?.allLayers.find(o=>o.id===e);if(!t)return console.warn(`[goToLayer] No matching FeatureLayer found for: ${e}`),`Could not find layer for: ${e}`;console.log(`[goToLayer] Zooming to layer: ${t.title}`);let a=t.fullExtent;return a?(await r.goTo(a),t.visible=!0,`Successfully zoomed to: ${t.title??""}`):"Layer has no defined extent. Cannot zoom to layer."}async function Pt({layerId:e},r){let{mapView:t}=$(r);return await Qt(e,t)}var Gt=_.object({layerId:_.string().describe("The id of the layer to navigate to")}),Wt=p(Pt,{name:"goToLayer",description:"Zooms the map view to the full extent of the top matching layer.",schema:Gt});async function Ut(e,r){return await r.goTo({scale:e}),`Successfully zoomed to: ${e}`}async function Jt({scale:e},r){let{mapView:t}=$(r);return await Ut(e,t)}var Zt=n.object({scale:n.number().describe("The map scale of the view to go to.")}),Ht=p(Jt,{name:"goToScale",description:"Go to the specified view scale.",schema:Zt});async function Kt(e,r,t){let a={target:new oe({longitude:e.longitude,latitude:e.latitude,spatialReference:{wkid:4326}})};return t?.zoom!==void 0&&(a.zoom=t.zoom),t?.scale!==void 0&&(a.scale=t.scale),await r.goTo(a),`Successfully navigated to: ${[`(${e.latitude}\xB0, ${e.longitude}\xB0)`,t?.zoom!==void 0?`zoom ${t.zoom}`:"",t?.scale!==void 0?`scale 1:${t.scale}`:""].filter(Boolean).join(", ")}`}async function Yt({center:e,zoom:r,scale:t},a){let{mapView:o}=$(a);return await Kt(e,o,{zoom:r,scale:t})}var Xt=n.object({center:n.object({longitude:n.number().describe("The longitude (x-coordinate) of the point to navigate to."),latitude:n.number().describe("The latitude (y-coordinate) of the point to navigate to.")}),zoom:n.number().optional().describe("The zoom level. Higher values = more zoomed in."),scale:n.number().optional().describe("The map scale. Alternative to zoom. Smaller numbers = more zoomed in.")}),er=p(Yt,{name:"goToViewpoint",description:"Go to the specified viewpoint. This can contain a combination of scale, center, zoom, etc.",schema:Xt});async function tr(e,r){return await r.goTo({zoom:e}),`Successfully zoomed to: ${e}`}async function rr({zoom:e},r){let{mapView:t}=$(r);return await tr(e,t)}var ar=n.object({zoom:n.number().min(1).max(20).describe("The zoom level of the view to go to.")}),or=p(rr,{name:"goToZoom",description:'Go to the specified zoom level. If input is generic (e.g. "zoom in", then only zoom to the next appropriate level - increase level for zooming in and decrease for zooming out.).',schema:ar}),ce=[It,Nt,kt,jt,Bt,Wt,Ht,er,or],xe=Object.assign({"../agents/dataExploration/prompts/data_explore_filter_prompt.md":()=>import("./PMGGAZSF.js").then(e=>e.default),"../agents/dataExploration/prompts/data_explore_query_prompt.md":()=>import("./ZYYIAOK3.js").then(e=>e.default),"../agents/layerFilter/prompts/layer_filter_prompt.md":()=>import("./G2D5AXYL.js").then(e=>e.default),"../agents/layerQuery/prompts/data_query_prompt.md":()=>import("./ESFRLW3E.js").then(e=>e.default),"../agents/layerQuery/prompts/summarize_query_response_prompt.md":()=>import("./Q5GRZVLA.js").then(e=>e.default),"../agents/layerStyling/prompts/layer_styling_prompt.md":()=>import("./KL6UK22M.js").then(e=>e.default),"../agents/linkChart/prompts/link_chart_intent_prompt.md":()=>import("./U3XLNPGW.js").then(e=>e.default),"../agents/linkChart/prompts/link_chart_tool_prompt.md":()=>import("./WD4CZF2P.js").then(e=>e.default),"../agents/navigation/prompts/navigation_intent_prompt.md":()=>import("./AWERJEZY.js").then(e=>e.default),"../agents/navigation/prompts/navigation_tool_prompt.md":()=>import("./77UW5IWK.js").then(e=>e.default)});async function q(e){let r=Object.entries(xe).find(([t])=>t.endsWith(`/${e}.md`));if(console.log(`entry for prompt "${e}":`,r),!r)throw new Error(`Prompt not found: ${e}
10
10
  Available prompts:
11
11
  ${Object.keys(xe).join(`
12
12
  `)}`);return await r[1]()}var ir=(e,r=3)=>e.filter(t=>t instanceof K).slice(-r),S=(e,r=3)=>{let t=e.map((o,i)=>o instanceof K?i:-1).filter(o=>o!==-1);if(t.length===0)return[];let a=t.length>r?t[t.length-r]:t[0];return e.slice(a)},F=(e,r=" ")=>ir(e).map(t=>t.content).join(r).trim();async function nr(e,r){let t=await q("navigation_tool_prompt"),{mapView:a}=$(r),o=a.map,i=e.vectorSearchLayerResults?.length>0?e.vectorSearchLayerResults.map((w,v)=>`${v+1}. layerId=${w.id} | title=${w.title??""} | name=${w.name??""} | score=${w.score.toFixed(2)}`).join(`
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.135 */
4
- import{a as n}from"./NCD5D6JY.js";import"./K4DOBIBC.js";import{g as a,h as e,k as s,p as l,t as c}from"./I54YR7UU.js";import"./YQVK2H7R.js";var o=a``,i=class extends l{constructor(){super(...arguments),this.#t=[],this._messages=n({blocking:!0}),this.arcgisCancel=s(),this.arcgisSubmit=s()}static{this.properties={type:1,message:1,options:0}}static{this.styles=o}#t;_renderInterruptOptions(){switch(this.type){case"single-select":return e`<calcite-list selection-mode=single-persist .label=${this._messages.optionsLabel} @calciteListChange=${t=>this.#t=t.target.selectedItems[0]?.value}>${this.options?.map(t=>e`<calcite-list-item .label=${t} .value=${t}></calcite-list-item>`)}</calcite-list>`;case"multi-select":return e`<calcite-list selection-mode=multiple .label=${this._messages.optionsLabel} @calciteListChange=${t=>this.#t=t.target.selectedItems.map(r=>r.value)}>${this.options?.map(t=>e`<calcite-list-item .label=${t} .value=${t}></calcite-list-item>`)}</calcite-list>`;case"boolean-choice":return e`<calcite-list selection-mode=single-persist .label=${this._messages.optionsLabel} @calciteListChange=${t=>this.#t=t.target.selectedItems[0]?.value}>${this.options?.map(t=>e`<calcite-list-item .label=${t} .value=${t}></calcite-list-item>`)}</calcite-list>`;case"text-input":return e`<calcite-input .label=${this._messages.enterTextLabel} @calciteInputInput=${t=>this.#t=t.target.value}></calcite-input>`}}render(){return e`<calcite-panel .description=${this.message}>${this._renderInterruptOptions()}<calcite-button slot=footer-end appearance=outline @click=${()=>this.arcgisCancel.emit()}>${this._messages.cancelButtonLabel}</calcite-button><calcite-button slot=footer-end appearance=solid @click=${()=>this.arcgisSubmit.emit(this.#t)}>${this._messages.submitButtonLabel}</calcite-button></calcite-panel>`}};c("arcgis-assistant-interrupt",i);export{i as ArcgisAssistantInterrupt};
3
+ v5.0.0-next.137 */
4
+ import{a as n}from"./AAKD5SX2.js";import"./2YU5J7GR.js";import{g as a,h as e,k as s,p as l,t as c}from"./O5MI43R3.js";import"./JEJTPF54.js";var o=a``,i=class extends l{constructor(){super(...arguments),this.#t=[],this._messages=n({blocking:!0}),this.arcgisCancel=s(),this.arcgisSubmit=s()}static{this.properties={type:1,message:1,options:0}}static{this.styles=o}#t;_renderInterruptOptions(){switch(this.type){case"single-select":return e`<calcite-list selection-mode=single-persist .label=${this._messages.optionsLabel} @calciteListChange=${t=>this.#t=t.target.selectedItems[0]?.value}>${this.options?.map(t=>e`<calcite-list-item .label=${t} .value=${t}></calcite-list-item>`)}</calcite-list>`;case"multi-select":return e`<calcite-list selection-mode=multiple .label=${this._messages.optionsLabel} @calciteListChange=${t=>this.#t=t.target.selectedItems.map(r=>r.value)}>${this.options?.map(t=>e`<calcite-list-item .label=${t} .value=${t}></calcite-list-item>`)}</calcite-list>`;case"boolean-choice":return e`<calcite-list selection-mode=single-persist .label=${this._messages.optionsLabel} @calciteListChange=${t=>this.#t=t.target.selectedItems[0]?.value}>${this.options?.map(t=>e`<calcite-list-item .label=${t} .value=${t}></calcite-list-item>`)}</calcite-list>`;case"text-input":return e`<calcite-input .label=${this._messages.enterTextLabel} @calciteInputInput=${t=>this.#t=t.target.value}></calcite-input>`}}render(){return e`<calcite-panel .description=${this.message}>${this._renderInterruptOptions()}<calcite-button slot=footer-end appearance=outline @click=${()=>this.arcgisCancel.emit()}>${this._messages.cancelButtonLabel}</calcite-button><calcite-button slot=footer-end appearance=solid @click=${()=>this.arcgisSubmit.emit(this.#t)}>${this._messages.submitButtonLabel}</calcite-button></calcite-panel>`}};c("arcgis-assistant-interrupt",i);export{i as ArcgisAssistantInterrupt};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.135 */
4
- import{g as e,h as t,n as i,o,p as r,t as n}from"./I54YR7UU.js";import"./YQVK2H7R.js";export default $arcgis.t(([c,{watch:l}])=>{var g=e`.assistant-chat__messages-container{display:flex;flex:1;flex-direction:column}.assistant-chat__messages-list{padding:var(--calcite-spacing-lg);display:flex;flex-direction:column;gap:var(--calcite-spacing-md);flex:1 1 auto;min-height:0;justify-content:flex-end;overflow:auto}`,a=class extends r{constructor(){super(...arguments),this.#s=i(),this.loading=!1,this.loadingMessage="",this.messages=new c([])}static{this.properties={loading:5,loadingMessage:1,user:1,messages:0}}static{this.styles=g}#s;firstUpdated(){this._scrollToEnd()}loaded(){this.manager.onLifecycle(()=>[this.messages.on("change",()=>{this.requestUpdate(),this._scrollToEnd()}),l(()=>this.loading,()=>{this._scrollToEnd()})])}_scrollToEnd(){requestAnimationFrame(()=>{this.#s.value?.scrollIntoView({behavior:"smooth"})})}render(){return t`<div class="assistant-chat__messages-container"><div class="assistant-chat__messages-list"><slot></slot>${this.messages.map(s=>t`<arcgis-assistant-chat-card .type=${s.type} .content=${s.content} .log=${s.log} .error=${s.error} .user=${this.user}></arcgis-assistant-chat-card>`)}${this.loading?t`<arcgis-assistant-chat-card .loading=${this.loading} .loadingMessage=${this.loadingMessage} type=response></arcgis-assistant-chat-card>`:null}</div><div ${o(this.#s)}></div></div>`}};n("arcgis-assistant-chat",a);return a},"core/Collection","core/reactiveUtils")
3
+ v5.0.0-next.137 */
4
+ import{g as e,h as t,n as i,o,p as r,t as n}from"./O5MI43R3.js";import"./JEJTPF54.js";export default $arcgis.t(([c,{watch:l}])=>{var g=e`.assistant-chat__messages-container{display:flex;flex:1;flex-direction:column}.assistant-chat__messages-list{padding:var(--calcite-spacing-lg);display:flex;flex-direction:column;gap:var(--calcite-spacing-md);flex:1 1 auto;min-height:0;justify-content:flex-end;overflow:auto}`,a=class extends r{constructor(){super(...arguments),this.#s=i(),this.loading=!1,this.loadingMessage="",this.messages=new c([])}static{this.properties={loading:5,loadingMessage:1,user:1,messages:0}}static{this.styles=g}#s;firstUpdated(){this._scrollToEnd()}loaded(){this.manager.onLifecycle(()=>[this.messages.on("change",()=>{this.requestUpdate(),this._scrollToEnd()}),l(()=>this.loading,()=>{this._scrollToEnd()})])}_scrollToEnd(){requestAnimationFrame(()=>{this.#s.value?.scrollIntoView({behavior:"smooth"})})}render(){return t`<div class="assistant-chat__messages-container"><div class="assistant-chat__messages-list"><slot></slot>${this.messages.map(s=>t`<arcgis-assistant-chat-card .type=${s.type} .content=${s.content} .log=${s.log} .error=${s.error} .user=${this.user}></arcgis-assistant-chat-card>`)}${this.loading?t`<arcgis-assistant-chat-card .loading=${this.loading} .loadingMessage=${this.loadingMessage} type=response></arcgis-assistant-chat-card>`:null}</div><div ${o(this.#s)}></div></div>`}};n("arcgis-assistant-chat",a);return a},"core/Collection","core/reactiveUtils")
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.135 */
4
- import{Zb as a}from"./5EXI6IBC.js";import"./YQVK2H7R.js";export{a as PromptTemplate};
3
+ v5.0.0-next.137 */
4
+ import{ac as a}from"./C2KQ57RK.js";import"./JEJTPF54.js";export{a as PromptTemplate};
@@ -1,7 +1,7 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.135 */
4
- import"./YQVK2H7R.js";var e=`# Navigation Tool Instructions
3
+ v5.0.0-next.137 */
4
+ import"./JEJTPF54.js";var e=`# Navigation Tool Instructions
5
5
 
6
6
  CRITICAL: You are FORBIDDEN from making multiple tool calls. You MUST make exactly ONE tool call.
7
7