@arcgis/ai-components 5.2.0-next.75 → 5.2.0-next.77
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.
- package/dist/agents/tools/filter/clearFilters/adapter.d.ts +8 -0
- package/dist/{chunks/adapter12.js → agents/tools/filter/clearFilters/adapter.js} +1 -1
- package/dist/agents/tools/filter/resetMap/adapter.d.ts +8 -0
- package/dist/{chunks/adapter13.js → agents/tools/filter/resetMap/adapter.js} +1 -1
- package/dist/agents/tools/filter/setFeatureEffect/adapter.d.ts +8 -0
- package/dist/{chunks/adapter14.js → agents/tools/filter/setFeatureEffect/adapter.js} +2 -2
- package/dist/agents/tools/help/listFields/adapter.d.ts +11 -0
- package/dist/{chunks/adapter11.js → agents/tools/help/listFields/adapter.js} +1 -1
- package/dist/agents/tools/navigation/goToAddress/adapter.d.ts +10 -0
- package/dist/{chunks/adapter2.js → agents/tools/navigation/goToAddress/adapter.js} +1 -1
- package/dist/agents/tools/navigation/goToBookmark/adapter.d.ts +8 -0
- package/dist/{chunks/adapter3.js → agents/tools/navigation/goToBookmark/adapter.js} +1 -1
- package/dist/agents/tools/navigation/goToFeatures/adapter.d.ts +8 -0
- package/dist/{chunks/adapter4.js → agents/tools/navigation/goToFeatures/adapter.js} +1 -1
- package/dist/agents/tools/navigation/goToFullExtent/adapter.d.ts +8 -0
- package/dist/{chunks/adapter5.js → agents/tools/navigation/goToFullExtent/adapter.js} +1 -1
- package/dist/agents/tools/navigation/goToHomeExtent/adapter.d.ts +8 -0
- package/dist/{chunks/adapter6.js → agents/tools/navigation/goToHomeExtent/adapter.js} +1 -1
- package/dist/agents/tools/navigation/goToLayer/adapter.d.ts +8 -0
- package/dist/{chunks/adapter7.js → agents/tools/navigation/goToLayer/adapter.js} +1 -1
- package/dist/agents/tools/navigation/goToScale/adapter.d.ts +8 -0
- package/dist/{chunks/adapter8.js → agents/tools/navigation/goToScale/adapter.js} +1 -1
- package/dist/agents/tools/navigation/goToViewpoint/adapter.d.ts +8 -0
- package/dist/{chunks/adapter9.js → agents/tools/navigation/goToViewpoint/adapter.js} +1 -1
- package/dist/agents/tools/navigation/goToZoom/adapter.d.ts +8 -0
- package/dist/{chunks/adapter10.js → agents/tools/navigation/goToZoom/adapter.js} +1 -1
- package/dist/agents/tools/query/getAttribute/adapter.d.ts +8 -0
- package/dist/{chunks/adapter15.js → agents/tools/query/getAttribute/adapter.js} +2 -2
- package/dist/agents/tools/query/getStatistics/adapter.d.ts +8 -0
- package/dist/{chunks/adapter16.js → agents/tools/query/getStatistics/adapter.js} +4 -4
- package/dist/agents/tools/query/getTopFeatures/adapter.d.ts +8 -0
- package/dist/{chunks/adapter17.js → agents/tools/query/getTopFeatures/adapter.js} +4 -4
- package/dist/agents/tools/query/queryFeatures/adapter.d.ts +8 -0
- package/dist/{chunks/adapter18.js → agents/tools/query/queryFeatures/adapter.js} +4 -4
- package/dist/cdn/{GRHIFCQX.js → 2EY3BQQX.js} +1 -1
- package/dist/cdn/{253R5CBD.js → 2SQKAJ73.js} +1 -1
- package/dist/cdn/{MM33KJPF.js → 4OGR5QKS.js} +1 -1
- package/dist/cdn/{66SKMECC.js → 4WIDLQUH.js} +1 -1
- package/dist/cdn/{WMZ24LWS.js → 5X7EG7D2.js} +1 -1
- package/dist/cdn/{5R6QUF5B.js → 7V6OSTFC.js} +1 -1
- package/dist/cdn/{5WLNL4HZ.js → 7ZFAFKJT.js} +1 -1
- package/dist/cdn/{QZ3NQTNQ.js → BWLXDT75.js} +1 -1
- package/dist/cdn/{I6PD2HSL.js → CJMUJXPL.js} +1 -1
- package/dist/cdn/{CWD37QFT.js → CZM4URK7.js} +1 -1
- package/dist/cdn/{2VBPA27M.js → DOXBIASP.js} +1 -1
- package/dist/cdn/{TQXLSW4A.js → EZYONVBU.js} +1 -1
- package/dist/cdn/{VYTYVWR6.js → FZ4CURWW.js} +1 -1
- package/dist/cdn/{HZ5ARNAM.js → GFEOVHJK.js} +1 -1
- package/dist/cdn/{MDM2K3U7.js → GOKLRL6M.js} +1 -1
- package/dist/cdn/{UPWAOZXQ.js → GPZJANRQ.js} +1 -1
- package/dist/cdn/{6CLF7KIK.js → GZGDLURS.js} +1 -1
- package/dist/cdn/{NIY32GK2.js → H6IJRTHM.js} +1 -1
- package/dist/cdn/{TKYI5QRL.js → JO5ETMPS.js} +1 -1
- package/dist/cdn/{323DHVYA.js → JSMNXHYG.js} +1 -1
- package/dist/cdn/{U6FBRUM4.js → LZP3OBKS.js} +1 -1
- package/dist/cdn/{K33MZ726.js → PUHRBGKB.js} +1 -1
- package/dist/cdn/{5DVRVY4L.js → Q57QWN5W.js} +1 -1
- package/dist/cdn/{QRHZXLZN.js → RBE55SWR.js} +1 -1
- package/dist/cdn/{IRNSIUBT.js → RCFAXADI.js} +1 -1
- package/dist/cdn/{RADWN4ZP.js → T4RIGOXB.js} +1 -1
- package/dist/cdn/{S6OYR4VI.js → TYZ3FRGW.js} +1 -1
- package/dist/cdn/{5RVELJU4.js → UB6PAQZ7.js} +1 -1
- package/dist/cdn/{7E2QMWK6.js → UHZG7SKO.js} +1 -1
- package/dist/cdn/{V6HOUZPZ.js → YLGKKWZK.js} +1 -1
- package/dist/cdn/YLVJA4ZE.js +2 -0
- package/dist/cdn/ZOEMBHRF.js +2 -0
- package/dist/cdn/agent-utils/index.js +1 -1
- package/dist/cdn/index.js +1 -1
- package/dist/chunks/adapter.js +7 -7
- package/dist/chunks/helpGraph.js +1 -1
- package/dist/chunks/navigationGraph.js +9 -9
- package/dist/chunks/utils2.js +10 -41
- package/dist/chunks/utils3.js +41 -10
- package/dist/components/arcgis-assistant/customElement.js +1 -1
- package/dist/components/arcgis-assistant-agent/customElement.js +18 -18
- package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +11 -11
- package/dist/components/arcgis-assistant-help-agent/customElement.js +17 -17
- package/dist/components/arcgis-assistant-knowledge-agent/customElement.js +18 -18
- package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +18 -18
- package/dist/components/arcgis-assistant-navigation-agent/customElement.js +9 -9
- package/dist/docs/api.json +1 -1
- package/dist/docs/docs.json +1 -1
- package/dist/docs/web-types.json +1 -1
- package/package.json +22 -5
- package/dist/cdn/IDUC4CPV.js +0 -2
- package/dist/cdn/K335IAIE.js +0 -2
- /package/dist/cdn/{BS2PFNU4.js → 5WYRJMBW.js} +0 -0
- /package/dist/cdn/{RU2T7GUX.js → 5ZFUGNRN.js} +0 -0
- /package/dist/cdn/{4YXYLX4H.js → 6HF36IKA.js} +0 -0
- /package/dist/cdn/{77QFSIWW.js → 7SRLZQVC.js} +0 -0
- /package/dist/cdn/{KA3FF3ZO.js → JKIESH74.js} +0 -0
- /package/dist/cdn/{CGXQAB3A.js → K2R6XVK3.js} +0 -0
- /package/dist/cdn/{LCFIADOZ.js → KITIP6J2.js} +0 -0
- /package/dist/cdn/{T2GJLEYV.js → KWD2ECTM.js} +0 -0
- /package/dist/cdn/{DYASSC7Z.js → LLUGJKAQ.js} +0 -0
- /package/dist/cdn/{3UEKINYC.js → MMHDT4KV.js} +0 -0
- /package/dist/cdn/{WS3T73IY.js → OAKRPM7D.js} +0 -0
- /package/dist/cdn/{Q4IQUEZN.js → U2D53TAX.js} +0 -0
- /package/dist/cdn/{4MFEKBKL.js → V52XWEGV.js} +0 -0
- /package/dist/cdn/{EAEQONP7.js → VLLZ2FFU.js} +0 -0
- /package/dist/cdn/{DY36ATOA.js → WKTQVBFJ.js} +0 -0
- /package/dist/cdn/{5PJXNTLZ.js → Y7XD7ZRD.js} +0 -0
- /package/dist/cdn/{UIXX3XEN.js → YEZ3AMNX.js} +0 -0
- /package/dist/cdn/{QVOMX3R6.js → Z5W4V7RC.js} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import p from"./
|
|
2
|
+
import p from"./UB6PAQZ7.js";import n from"./ONMNQBPO.js";import m from"./TYZ3FRGW.js";import l from"./KITIP6J2.js";import"./Z5W4V7RC.js";import k from"./KWD2ECTM.js";import j from"./U2D53TAX.js";import h from"./OAKRPM7D.js";import g from"./V52XWEGV.js";import f from"./CCC6LBMY.js";import"./34O57OGV.js";import{a as o,c as s}from"./YLGKKWZK.js";import"./7SRLZQVC.js";import"./FDOMMK2M.js";import e from"./6HF36IKA.js";import"./Y7XD7ZRD.js";import"./VLLZ2FFU.js";import d from"./5ZFUGNRN.js";import"./LLUGJKAQ.js";import"./WKTQVBFJ.js";import"./K2R6XVK3.js";import"./MMHDT4KV.js";import"./RLEHNAIA.js";import c from"./AT4XVTJR.js";import"./7M6VKBTK.js";import"./5WYRJMBW.js";import"./YEZ3AMNX.js";import b from"./JKIESH74.js";import a from"./QNNGPA3Q.js";import"./ONQ6JSBJ.js";import{v as i,z as r}from"./6TA5KFAQ.js";import"./R74ZHFA6.js";import"./7VAQUCBU.js";import"./VOKXKU7M.js";import"./EWLXNGKH.js";import"./AI6DYOKR.js";import"./VXFQANGJ.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([,,,,,,,,,,,,,,,,,,,,,,,,m])=>{var t=class extends i{constructor(){super(...arguments),this.agent=m}static{this.properties={referenceElement:1}}#t;#i;getContext(){if(!this.#t)throw new Error("arcgis-assistant-navigation-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=o(this,"arcgis-assistant-navigation-agent"),this.#i=s(this)}disconnectedCallback(){this.#i?.unregister(this.agent.id),super.disconnectedCallback()}};r("arcgis-assistant-navigation-agent",t);return t},"identity/IdentityManager","portal/Portal","request","config","core/reactiveUtils","layers/FeatureLayer","intl","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","views/LinkChartView","rest/knowledgeGraphService",a,b,c,d,e,f,g,h,j,k,l,m,n,p)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import q from"./
|
|
2
|
+
import q from"./JSMNXHYG.js";import p from"./ONMNQBPO.js";import n from"./TYZ3FRGW.js";import l from"./KITIP6J2.js";import"./Z5W4V7RC.js";import k from"./KWD2ECTM.js";import j from"./U2D53TAX.js";import h from"./OAKRPM7D.js";import g from"./V52XWEGV.js";import f from"./CCC6LBMY.js";import"./34O57OGV.js";import{a as o,c as m}from"./YLGKKWZK.js";import"./7SRLZQVC.js";import"./FDOMMK2M.js";import e from"./6HF36IKA.js";import"./Y7XD7ZRD.js";import"./VLLZ2FFU.js";import d from"./5ZFUGNRN.js";import"./LLUGJKAQ.js";import"./WKTQVBFJ.js";import"./K2R6XVK3.js";import"./MMHDT4KV.js";import"./RLEHNAIA.js";import c from"./AT4XVTJR.js";import"./7M6VKBTK.js";import"./5WYRJMBW.js";import"./YEZ3AMNX.js";import b from"./JKIESH74.js";import a from"./QNNGPA3Q.js";import"./ONQ6JSBJ.js";import{v as i,z as r}from"./6TA5KFAQ.js";import"./R74ZHFA6.js";import"./7VAQUCBU.js";import"./VOKXKU7M.js";import"./EWLXNGKH.js";import"./AI6DYOKR.js";import"./VXFQANGJ.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([,,,,,,,,,,,,,,,,,,,,,,,,p])=>{var t=class extends i{constructor(){super(...arguments),this.agent=p}static{this.properties={referenceElement:1}}#t;#i;getContext(){if(!this.#t)throw new Error("arcgis-assistant-layer-styling-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=o(this,"arcgis-assistant-layer-styling-agent"),this.#i=m(this)}disconnectedCallback(){this.#i?.unregister(this.agent.id),super.disconnectedCallback()}};r("arcgis-assistant-layer-styling-agent",t);return t},"identity/IdentityManager","portal/Portal","request","config","core/reactiveUtils","layers/FeatureLayer","intl","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","views/LinkChartView","rest/knowledgeGraphService",a,b,c,d,e,f,g,h,j,k,l,n,p,q)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import q from"./
|
|
2
|
+
import q from"./FZ4CURWW.js";import n from"./ONMNQBPO.js";import m from"./TYZ3FRGW.js";import l from"./KITIP6J2.js";import"./Z5W4V7RC.js";import k from"./KWD2ECTM.js";import j from"./U2D53TAX.js";import h from"./OAKRPM7D.js";import g from"./V52XWEGV.js";import f from"./CCC6LBMY.js";import"./34O57OGV.js";import{a as o,c as p}from"./YLGKKWZK.js";import"./7SRLZQVC.js";import"./FDOMMK2M.js";import e from"./6HF36IKA.js";import"./Y7XD7ZRD.js";import"./VLLZ2FFU.js";import d from"./5ZFUGNRN.js";import"./LLUGJKAQ.js";import"./WKTQVBFJ.js";import"./K2R6XVK3.js";import"./MMHDT4KV.js";import"./RLEHNAIA.js";import c from"./AT4XVTJR.js";import"./7M6VKBTK.js";import"./5WYRJMBW.js";import"./YEZ3AMNX.js";import b from"./JKIESH74.js";import a from"./QNNGPA3Q.js";import"./ONQ6JSBJ.js";import{v as i,z as r}from"./6TA5KFAQ.js";import"./R74ZHFA6.js";import"./7VAQUCBU.js";import"./VOKXKU7M.js";import"./EWLXNGKH.js";import"./AI6DYOKR.js";import"./VXFQANGJ.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([,,,,,,,,,,,,,,,,,,,,,,,,m])=>{var t=class extends i{constructor(){super(...arguments),this.agent=m}static{this.properties={referenceElement:1}}#t;#i;getContext(){if(!this.#t)throw new Error("arcgis-assistant-help-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=o(this,"arcgis-assistant-help-agent"),this.#i=p(this)}disconnectedCallback(){this.#i?.unregister(this.agent.id),super.disconnectedCallback()}};r("arcgis-assistant-help-agent",t);return t},"identity/IdentityManager","portal/Portal","request","config","core/reactiveUtils","layers/FeatureLayer","intl","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","views/LinkChartView","rest/knowledgeGraphService",a,b,c,d,e,f,g,h,j,k,l,m,n,q)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import n from"./
|
|
2
|
+
import n from"./EZYONVBU.js";import m from"./TYZ3FRGW.js";import l from"./KITIP6J2.js";import"./Z5W4V7RC.js";import k from"./KWD2ECTM.js";import j from"./U2D53TAX.js";import i from"./OAKRPM7D.js";import h from"./V52XWEGV.js";import g from"./CCC6LBMY.js";import"./34O57OGV.js";import{c as s,d as p}from"./YLGKKWZK.js";import"./7SRLZQVC.js";import"./FDOMMK2M.js";import f from"./6HF36IKA.js";import"./Y7XD7ZRD.js";import"./VLLZ2FFU.js";import d from"./5ZFUGNRN.js";import"./LLUGJKAQ.js";import"./WKTQVBFJ.js";import"./K2R6XVK3.js";import"./MMHDT4KV.js";import"./RLEHNAIA.js";import c from"./AT4XVTJR.js";import"./7M6VKBTK.js";import"./5WYRJMBW.js";import"./YEZ3AMNX.js";import b from"./JKIESH74.js";import a from"./QNNGPA3Q.js";import"./ONQ6JSBJ.js";import{v as e,z as o}from"./6TA5KFAQ.js";import"./R74ZHFA6.js";import"./7VAQUCBU.js";import"./VOKXKU7M.js";import"./EWLXNGKH.js";import"./AI6DYOKR.js";import"./VXFQANGJ.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([,,,,,,,,,{fetchKnowledgeGraph:m},,,,,,,,,,,,,n])=>{var r=class extends e{constructor(){super(...arguments),this.agent=n}static{this.properties={referenceElement:1,serviceUrl:3,context:0}}#i;#r;#t;#e;get serviceUrl(){return this.#r}set serviceUrl(t){this.#r=t}async getContext(){let t=this.context?{...this.context,knowledgeGraph:void 0,view:void 0}:{};if(this.#i)return{...t,view:this.#i};if(this.#t)try{let i=await this.#t;return{...t,knowledgeGraph:i}}catch(i){console.error("Failed to load knowledge graph via service URL:",i)}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(t){t.has("serviceUrl")&&this.serviceUrl?this.#t=m(this.serviceUrl):this.#t=void 0}load(){this.#i=p(this)??void 0,this.#e=s(this)}disconnectedCallback(){this.#e?.unregister(this.agent.id),super.disconnectedCallback()}};o("arcgis-assistant-knowledge-agent",r);return r},"identity/IdentityManager","portal/Portal","request","config","core/reactiveUtils","layers/FeatureLayer","intl","smartMapping/statistics/summaryStatistics","smartMapping/statistics/uniqueValues","rest/knowledgeGraphService",a,b,c,d,f,g,h,i,j,k,l,m,n)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a}from"./
|
|
2
|
+
import{a}from"./LLUGJKAQ.js";import"./ONQ6JSBJ.js";import"./AI6DYOKR.js";import"./VXFQANGJ.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export{a as goToHomeExtentTool};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import c from"./ONMNQBPO.js";import b from"./
|
|
2
|
+
import c from"./ONMNQBPO.js";import b from"./TYZ3FRGW.js";import{a as y}from"./FDOMMK2M.js";import a from"./AT4XVTJR.js";import{a as i}from"./7VAQUCBU.js";import{Ya as S,a as u,b as p,s as f}from"./EWLXNGKH.js";export default $arcgis.t(([,,,,,,{p:x},{a:w,c:E,e:I,f:v,g:L,h:F,i:$,j:C,k:N,l:R,m:T,n:b,o:_,p:A,q:h},j])=>{var k=.7,z=10,D=async(a,t)=>{try{await i({text:"Similarity search to find fields"},t);let e=y(t,"fieldSearch"),n=y(t,"layersAndFieldsRegistry"),o=y(t,"embeddingCache"),r=await e.searchFields({text:a.agentExecutionContext.assignedTask,layerIds:a.vectorSearchLayerIds,minScore:k,topResults:z,embeddingCache:o}),m=r.map(({layerId:d,results:c})=>{let g=c.map(s=>` - ${s.name} (${s.score.toFixed(2)})`).join(`
|
|
3
3
|
`);return`${n.get(d)?.layerItem.name??d}:
|
|
4
4
|
${g}`}).join(`
|
|
5
5
|
`),l;return r.length>0?l=`Vector search completed. Matching layers and fields with scores:
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import b from"./L7XTRDFM.js";import{a as E}from"./B6CJG5UH.js";import{a as I}from"./434TAA3J.js";import{a as D}from"./2GH3K5JP.js";import"./OKMZQXBQ.js";import{a as R}from"./
|
|
2
|
+
import b from"./L7XTRDFM.js";import{a as E}from"./B6CJG5UH.js";import{a as I}from"./434TAA3J.js";import{a as D}from"./2GH3K5JP.js";import"./OKMZQXBQ.js";import{a as R}from"./MMHDT4KV.js";import"./RLEHNAIA.js";import a from"./AT4XVTJR.js";import"./7M6VKBTK.js";import{g as $,h as c,k as C,l as P,n as d,t as _,u as y,v as T,x as k,z as A}from"./6TA5KFAQ.js";import"./R74ZHFA6.js";import"./7VAQUCBU.js";import"./VOKXKU7M.js";import"./EWLXNGKH.js";import"./AI6DYOKR.js";import"./VXFQANGJ.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([N,{whenOnce:U,watch:B,when:V},j,,q,,,H,{property:m,subclass:F},,{b:L}])=>{var G=$`:host{display:block;width:var(--arcgis-internal-panel-width, 100%);height:var(--arcgis-internal-expand-max-height, 100%);--calcite-panel-content-bottom-space: 0}.footer-container{display:flex;flex-direction:column;flex:1 1 0;gap:var(--calcite-spacing-md)}.content-container{display:flex;flex-direction:column;flex:1 1 0;min-height:0;position:relative;overflow:auto}.suggested-prompts-container{display:flex;justify-content:center;width:100%;background:var(--calcite-panel-background-color, var(--calcite-color-background))}.suggested-prompts{display:block;padding:var(--calcite-spacing-md);max-width:100%;box-sizing:border-box}.error-notice{padding:var(--calcite-spacing-sm)}.interrupt-waiting-message{font-style:italic;color:var(--calcite-color-text-2)}`;function S(o){return o.trim()?E.lexer(o).filter(t=>t.type!=="space").map(t=>E.parser([t])):[]}var f=class{constructor(){this._stableParts=[],this._stableText="",this._rawText=""}push(t){return this._rawText+=t,this._advanceStableBoundary(),this.getParts()}finalize(){let t=this._rawText.slice(this._stableText.length);return t.trim()&&(this._stableParts.push(...S(t)),this._stableText=this._rawText),this._stableParts}getParts(){let t=this._trimIncompleteTail(this._rawText.slice(this._stableText.length)),s=t.trim()?S(t):[];return[...this._stableParts,...s]}reset(){this._stableParts=[],this._stableText="",this._rawText=""}_advanceStableBoundary(){let t=this._rawText.slice(this._stableText.length),s=this._lastSafeBoundary(t);if(s<=0)return;let i=t.slice(0,s);this._stableParts.push(...S(i)),this._stableText+=i}_lastSafeBoundary(t){let s=t.split(`
|
|
3
3
|
`),i=!1,e=0,n=0;for(let r of s)/^\s*(```|~~~)/u.test(r)&&(i=!i),n+=r.length+1,r.trim()===""&&!i&&(e=n);return e<t.length?e:0}_trimIncompleteTail(t){let s=t.lastIndexOf("<");if(s!==-1&&!t.includes(">",s))return t.slice(0,s);let i=this._earliestUnclosedTag(t);if(i!==-1)return t.slice(0,i);let e=t.lastIndexOf("[");if(e!==-1){let n=t.slice(e);if(!/\[[^\]]*\]\([^)]*\)/u.test(n))return t.slice(0,e)}return t}_earliestUnclosedTag(t){let s=new Set(["br","img","hr","input","meta","link","area","base","col","embed","source","track","wbr"]),i=/<(\/?)([a-zA-Z][\w-]*)\b[^>]*?(\/?)>/gu,e=[];for(let n=i.exec(t);n;n=i.exec(t)){let[,r,a,l]=n,h=a.toLowerCase();if(!(s.has(h)||l==="/"))if(r==="/"){for(let g=e.length-1;g>=0;g--)if(e[g].name===h){e.splice(g);break}}else e.push({name:h,index:n.index})}return e.length?e[0].index:-1}};function W(o){let t=new f;return t.push(o),t.finalize()}var Y=async o=>await new Promise(t=>setTimeout(t,o));async function*Z(o,{chunkSize:t=15,delay:s=50}={}){let i=new f;for(let e=0;e<o.length;e+=t)yield i.push(o.slice(e,e+t)),await Y(s);yield i.finalize()}var J=Object.defineProperty,K=Object.getOwnPropertyDescriptor,u=(o,t,s,i)=>{for(var e=i>1?void 0:i?K(t,s):t,n=o.length-1,r;n>=0;n--)(r=o[n])&&(e=(i?r(t,s,e):r(e))||e);return i&&e&&J(t,s,e),e},O=o=>!o||typeof o!="object"?!1:o.name==="AbortError";async function*z(o,t,s,i,e=!1){if(e){if(i?.aborted){yield{type:"cancelled",log:s,runId:t};return}yield{type:"block-data",blockType:"text",data:{parts:W(o)},runId:t};return}for await(let n of Z(o)){if(i?.aborted){yield{type:"cancelled",log:s,runId:t};return}yield{type:"block-data",blockType:"text",data:{parts:n},runId:t}}}var p=class extends H{constructor(o){super(o),this.view=null,this.streamingDisabled=!1,this.loading=!1,this.processing=!1,this.processingStep=""}async load(){this._set("loading",!0);try{await this._initialize()}finally{this._set("loading",!1)}}destroy(){this.orchestrator?.dispose(),super.destroy()}async _initialize(){this.removeHandles(),await Promise.all([this.portal.load(),this.view?.when()]),this.view&&await U(()=>!this.view.updating),this._set("orchestrator",await L.init({agents:[...this.agents],view:this.view??void 0})),this.addHandles([B(()=>[this.view,this.agents],()=>{this._initialize()})])}clearChatHistory(){this.orchestrator?.newConversation()}async*ask(o,t){if(!this.orchestrator)throw new Error("Orchestrator not initialized yet.");this._set("processing",!0),this._set("processingStep","");let s=[],i,e="pending";try{let n=this.orchestrator.ask(o);for await(let r of n)switch(e=r.runId,r.type){case"trace":{this._set("processingStep",r.data.text),s.push(r.data.text);break}case"completed":{this._set("processing",!1),this._set("processingStep","");let a=r.result,l=!!a.content.length,h=!!i?.length;if(!l&&!h){yield{type:"completed",error:"No response received.",log:s,runId:e};return}let g=a.content;if(yield{type:"block-start",blockType:"text",runId:e},yield*z(g,e,s,t,this.streamingDisabled),yield{type:"block-end",blockType:"text",runId:e},h)for(let v of i){if(t?.aborted){yield{type:"cancelled",log:s,runId:e};return}let{type:b,data:w}=v;if(yield{type:"block-start",blockType:b,runId:e},b==="text"){let M=typeof w?.content=="string"?w.content:"";yield*z(M,e,s,t,this.streamingDisabled)}else yield{type:"block-data",blockType:b,data:w,runId:e};yield{type:"block-end",blockType:b,runId:e}}yield{type:"completed",response:g,blocks:i,log:s,runId:e};return}case"ux-suggestion":{let a=r.suggestion;i=i?[...i,a]:[a];break}case"interrupt":{let{kind:a,message:l,metadata:h}=r.interrupt,g=Array.isArray(h)?h.filter(b=>typeof b=="string"):[],v=(()=>{switch(a){case"booleanChoice":return{type:"boolean-choice",message:l,options:g};case"singleSelection":return{type:"single-select",message:l,options:g};case"multipleSelection":return{type:"multi-select",message:l,options:g};case"textInput":return{type:"text-input",message:l};default:return{type:a,message:l,options:g}}})();this._set("processingStep","Waiting for user input..."),yield{type:"interrupt",payload:v,runId:e};break}case"cancelled":{yield{type:"cancelled",log:s,runId:e};return}case"error":{if(t?.aborted||O(r.error)){yield{type:"cancelled",log:s,runId:e};return}yield{type:"completed",error:r.error.message,log:s,runId:e};return}default:{console.warn("Unknown event type:",r);break}}}catch(n){if(t?.aborted||O(n)){yield{type:"cancelled",log:s,runId:e};return}console.warn("Error during message processing:",n),yield{type:"completed",error:"An error occurred during message processing.",log:s,runId:"error"};return}finally{this._set("processing",!1)}}cancel(){this.orchestrator?.cancel()}};u([m({readOnly:!0})],p.prototype,"orchestrator",2);u([m()],p.prototype,"agents",2);u([m()],p.prototype,"portal",2);u([m()],p.prototype,"view",2);u([m()],p.prototype,"streamingDisabled",2);u([m({readOnly:!0})],p.prototype,"loading",2);u([m({readOnly:!0})],p.prototype,"processing",2);u([m({readOnly:!0})],p.prototype,"processingStep",2);p=u([F("OrchestratorController")],p);var Q="Embeddings resource 'embeddings-v01.json' not found in the webmap portal item.",X="Embeddings not found for this web map.",tt="https://developers.arcgis.com/javascript/latest/agentic-apps/ai-webmap-setup/#embeddings",x=class extends T{constructor(){super(...arguments),this._messages=D({blocking:!0}),this.#t=_(),this.#l=_(),this.#s=_(),this.#e=null,this.#r=new Map,this.#i=j.getDefault(),this.#a=t=>{t.stopPropagation(),this.cancelInterrupt()},this.#n=t=>{t.stopPropagation();let s=t.detail;this.submitInterrupt(s)},this.#c=t=>{t.stopPropagation(),this.keepSuggestedPrompts||(this.suggestedPrompts=[]);let s=t.detail;this._inputValue="",this.arcgisSubmit.emit(s),this.submitMessage(s)},this.#h=t=>{if(this._canceling=!0,t.stopPropagation(),this.arcgisCancel.emit(),this._interrupt){this.orchestrator?.cancelInterrupt(),this._interrupt=null;return}this._orchestratorController?.cancel(),this.#e?.abort(),this.#e=null},this.#g=t=>{t.stopPropagation();let s=t.detail;this.arcgisFeedback.emit(s)},this.#d=t=>{t.stopPropagation();let s=t.detail;this._inputValue=s.prompt,this.arcgisPromptSelect.emit(s)},this.#p=t=>{this.arcgisSlottableRequest.emit(t.detail)},this._orchestratorController=null,this._interrupt=null,this._interruptDetails=[],this._error=null,this._inputValue="",this._isAnswering=!1,this._canceling=!1,this.messages=new N([]),this.referenceElement=null,this.suggestedPrompts=[],this.feedbackEnabled=!1,this.keepSuggestedPrompts=!1,this.streamingDisabled=!1,this.logEnabled=!1,this.copyEnabled=!1,this.voiceInputEnabled=!1,this.readAloudEnabled=!1,this.assistantAvatarEnabled=!1,this.arcgisCancel=d(),this.arcgisError=d(),this.arcgisFeedback=d(),this.arcgisInterrupt=d(),this.arcgisInterruptCancel=d(),this.arcgisInterruptSubmit=d(),this.arcgisPromptSelect=d(),this.arcgisReady=d(),this.arcgisSubmit=d(),this.arcgisSlottableRequest=d({bubbles:!1,composed:!1}),this.arcgisResponse=d()}static{this.properties={_orchestratorController:16,_interrupt:16,_interruptDetails:16,_error:16,_inputValue:16,_isAnswering:16,_signedInUserId:16,_canceling:16,_isSignedIn:16,_user:16,awaitingResponse:32,awaitingResponseStep:32,interrupt:32,messages:0,orchestrator:32,entryMessage:1,heading:1,description:1,referenceElement:1,suggestedPrompts:0,feedbackEnabled:5,keepSuggestedPrompts:5,streamingDisabled:5,logEnabled:5,copyEnabled:5,voiceInputEnabled:5,readAloudEnabled:5,assistantAvatarEnabled:5}}static{this.styles=G}#t;#l;#s;#e;#r;#i;#a;#n;#c;#h;#g;#d;#p;async#o(){try{let t=R(this.el,this.referenceElement);await t?.componentOnReady();let s=[...this.#r.values()];return s.length?(this._orchestratorController?.destroy(),this._orchestratorController=new p({agents:s,portal:this.#i,streamingDisabled:this.streamingDisabled,view:t?.view}),await this._orchestratorController.load(),!0):(this._error="No agents found.",!1)}catch(t){return this._error=t?.message??"Error initializing orchestrator.",P(this)(t),!1}}get _isSignedIn(){return!!this.#i?.user||!!this._signedInUserId}get _user(){return this.#i?.user?.fullName||this.#i?.user?.username}get awaitingResponse(){return this._orchestratorController?.processing??!1}get awaitingResponseStep(){return this._orchestratorController?.processingStep??""}get interrupt(){return this._interrupt}get orchestrator(){return this._orchestratorController?.orchestrator}async clearChatHistory(){this._reset(),this._orchestratorController?.clearChatHistory()}cancelInterrupt(){this.arcgisInterruptCancel.emit(),this.orchestrator?.cancelInterrupt(),this._interrupt=null}register(t){this.#r.set(t.agent.id,t),this._orchestratorController&&this.#o()}unregister(t){this.#r.delete(t),this._orchestratorController&&this.#o()}async submitMessage(t){let s=t.trim();if(!s||(this.messages.push({id:Date.now().toString(),role:"user",content:s}),!this._orchestratorController))return;this.#e=new AbortController,this._orchestratorController.streamingDisabled=this.streamingDisabled;let i=this._orchestratorController.ask(s,this.#e?.signal);for await(let e of i){let n=e.runId,r=this.messages.at(-1);switch(e.type){case"block-start":{this._isAnswering=!0;let a={type:e.blockType,isPending:!0};if(r?.role==="assistant"&&r.id===n){let l=[...r.blocks??[],a];this.messages.splice(-1,1,{...r,blocks:l})}else this.messages.push({role:"assistant",blocks:[a],id:n,isStreaming:!0,interrupts:this._interruptDetails}),this._interruptDetails=[];break}case"block-data":{if(r?.role!=="assistant"||r?.id!==n)break;let a=[...r.blocks??[]],l=a[a.length-1],{blockType:h,data:g}=e;if(l?.type!==h||!l.isPending)break;h==="text"?a[a.length-1]={...l,data:{...l.data,parts:g?.parts}}:a[a.length-1]={...l,data:{...l.data,...g??{}}},this.messages.splice(-1,1,{...r,blocks:a});break}case"block-end":{if(r?.role!=="assistant"||r?.id!==n)break;let a=[...r.blocks??[]],l=a[a.length-1];if(l?.type!==e.blockType||!l.isPending)break;let h=l;a[a.length-1]={...h,data:{...h.data},isPending:!1},this.messages.splice(-1,1,{...r,blocks:a});break}case"completed":e.error?(this.messages.push({role:"assistant",log:e.log,error:e.error,id:n,interrupts:this._interruptDetails}),this._interruptDetails=[]):r?.role==="assistant"&&r.id===n&&this.messages.splice(-1,1,{...r,content:e.response,blocks:r.blocks?.map(a=>({...a,data:{...a.data},isPending:!1}))??[],isStreaming:!1,log:e.log}),this._isAnswering=!1,this.#e=null,this._canceling=!1;break;case"interrupt":this._interrupt={...e.payload,id:n},this.arcgisInterrupt.emit(this._interrupt);break;case"cancelled":r?.role==="assistant"&&r.id===n?this.messages.splice(-1,1,{...r,blocks:r.blocks?.filter(a=>a.type==="text"||!a.isPending)??[],isStreaming:!1,log:e.log,error:"(Stopped by user)"}):(this.messages.push({role:"assistant",log:e.log,error:"(Stopped by user)",id:n,interrupts:this._interruptDetails}),this._interruptDetails=[]),this._isAnswering=!1,this.#e=null,this._canceling=!1;break}}}submitInterrupt(t){this.arcgisInterruptSubmit.emit(t),this._interrupt&&(this._interruptDetails=[...this._interruptDetails,{interrupt:this._interrupt,response:t}]),this.orchestrator?.resumeInterrupt(t),this._interrupt=null}load(){this.manager.onLifecycle(this._reset.bind(this))}loaded(){this.manager.onLifecycle(()=>{this.#t.value?.addEventListener("arcgisPromptSelect",this.#d),this.#t.value?.addEventListener("arcgisSubmit",this.#c),this.#t.value?.addEventListener("arcgisCancel",this.#h),this.#t.value?.addEventListener("arcgisFeedback",this.#g);let t=V(()=>!!this._interrupt&&!!this.#s.value,()=>{let i=this.#s.value;i.removeEventListener("arcgisSubmit",this.#n),i.removeEventListener("arcgisCancel",this.#a),i.addEventListener("arcgisSubmit",this.#n,{once:!0}),i.addEventListener("arcgisCancel",this.#a,{once:!0})}),s=this.messages.on("after-add",i=>{let e=i.item;e.role==="assistant"&&(e.error||e.content)&&this.arcgisResponse.emit(e)});return queueMicrotask(()=>{this.#o().then(i=>{i?this.arcgisReady.emit():this._error&&this.arcgisError.emit(new Error(this._error))})}),()=>{t.remove(),s.remove(),this.#t.value?.removeEventListener("arcgisPromptSelect",this.#d),this.#s.value?.removeEventListener("arcgisSubmit",this.#n),this.#s.value?.removeEventListener("arcgisCancel",this.#a),this.#t.value?.removeEventListener("arcgisSubmit",this.#c),this.#t.value?.removeEventListener("arcgisCancel",this.#h),this.#t.value?.removeEventListener("arcgisFeedback",this.#g),this._orchestratorController?.destroy(),this._orchestratorController=null}})}_reset(){this._orchestratorController?.cancel(),this.#e?.abort(),this._interrupt=null,this.messages.removeAll(),this._error=null,this._inputValue="",this._signedInUserId=void 0}_renderEntryMessage(){return this._isSignedIn?this._error?this._renderErrorNotice():this.entryMessage?this.messages.length>0?null:c`<calcite-notice open kind=brand closable icon width=full><div slot=message>${this.entryMessage}</div></calcite-notice>`:c`<slot name=entry-message></slot>`:this._renderSignInNotice()}_renderSignInNotice(){let t=this.#i;return c`<calcite-notice slot=entry-message open kind=brand icon width=full><div slot=message>You need to sign in to use the assistant chat.</div>${t?c`<calcite-link slot=link @click=${async()=>{try{let s=await q.getCredential(`${t.url}/sharing`);this._signedInUserId=s.userId,this._error=null,this.requestUpdate(),await this.#o()?this.arcgisReady.emit():this._error&&this.arcgisError.emit(new Error(this._error))}catch(s){this._error=s?.message??"Error signing in.",this.arcgisError.emit(new Error(this._error)),C("error",this,"Error signing in:",{detail:{error:s}})}}} target=_blank title="Sign in to ArcGIS Online">Sign in</calcite-link>`:c`<div slot=link>No portal information available</div>`}</calcite-notice>`}_renderErrorNotice(){return this._error?c`<calcite-notice slot=entry-message open kind=brand icon width=full>${this._error===Q?c`<div slot=message>${X}</div><calcite-link slot=link .href=${tt} target=_blank title="Learn about web map embeddings">Read more</calcite-link>`:c`<div slot=message>${this._error}</div>`}</calcite-notice>`:null}render(){return c`<calcite-panel .loading=${!this._orchestratorController&&!this._error||this._orchestratorController?.loading} .heading=${this.heading??this._messages.assistantLabel} .description=${this.description} ${y(this.#t)}><slot name=header-actions-start slot=header-actions-start></slot><slot name=header-actions-end slot=header-actions-end></slot><div class="content-container"><arcgis-assistant-chat .loading=${this.awaitingResponse} .messages=${this.messages} .interrupt=${this._interrupt}><slot name=message-starter slot=message-starter></slot><slot name=messages slot=messages>${this.messages.map(t=>t.role==="assistant"?c`<arcgis-assistant-message .message=${t} .feedbackEnabled=${this.feedbackEnabled} .logEnabled=${this.logEnabled} .copyEnabled=${this.copyEnabled} .readAloudEnabled=${this.readAloudEnabled} @arcgisSlottableRequest=${this.#p} .assistantAvatarEnabled=${this.assistantAvatarEnabled}>${t.blocks?.map((s,i)=>c`<slot name=${I(t.id,i)??k} slot=${I(t.id,i)??k}><arcgis-assistant-message-block .block=${s}></arcgis-assistant-message-block></slot>`)}</arcgis-assistant-message>`:c`<arcgis-assistant-user-message .message=${t} .user=${this._user}></arcgis-assistant-user-message>`)}</slot>${this._interrupt?c`<div slot=message-loading><div class="interrupt-waiting-message">waiting for user input...</div></div>`:c`<slot name=message-loading slot=message-loading><arcgis-assistant-message-loading .loading=${this.awaitingResponse} .loadingMessage=${this.awaitingResponseStep} .assistantAvatarEnabled=${this.assistantAvatarEnabled} .interrupts=${this._interruptDetails}></arcgis-assistant-message-loading></slot>`}</arcgis-assistant-chat></div>${this._interrupt?c`<slot name=interrupt><arcgis-assistant-interrupt slot=content-bottom .type=${this._interrupt.type} .message=${this._interrupt.message} .options=${this._interrupt.options} ${y(this.#s)}></arcgis-assistant-interrupt></slot>`:this.suggestedPrompts?.length?c`<div class="suggested-prompts-container" slot=content-bottom><arcgis-assistant-suggested-prompts class="suggested-prompts" .prompts=${this.suggestedPrompts}></arcgis-assistant-suggested-prompts></div>`:null}<div class="footer-container" slot=footer>${this._renderEntryMessage()}<slot name=chat-entry><arcgis-assistant-chat-entry .awaitingResponse=${this.awaitingResponse||this._isAnswering} .inputValue=${this._inputValue} .messages=${this.messages} .voiceInputEnabled=${this.voiceInputEnabled} .disabled=${this._canceling||!this._isSignedIn||!!this._interrupt} ${y(this.#l)}><slot name=entry-actions-start slot=entry-actions-start></slot><slot name=entry-actions-end slot=entry-actions-end><calcite-button .iconStart=${this.awaitingResponse||this._isAnswering?"circle-stop":"send"} @click=${()=>{this.#l.value?.submitMessage()}} round>${this.awaitingResponse||this._isAnswering?this._messages.stopButtonLabel:this._messages.askButtonLabel}</calcite-button></slot></arcgis-assistant-chat-entry></slot><slot name=footer-content></slot></div></calcite-panel>`}};A("arcgis-assistant",x);return x},"core/Collection","core/reactiveUtils","portal/Portal","request","identity/IdentityManager","config","layers/FeatureLayer","core/Accessor","core/accessorSupport/decorators",a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a}from"./
|
|
2
|
+
import{a}from"./Z5W4V7RC.js";import"./ONQ6JSBJ.js";import"./AI6DYOKR.js";import"./VXFQANGJ.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export{a as goToZoomTool};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a}from"./
|
|
2
|
+
import{a}from"./WKTQVBFJ.js";import"./ONQ6JSBJ.js";import"./AI6DYOKR.js";import"./VXFQANGJ.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export{a as goToLayerTool};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a}from"./
|
|
2
|
+
import{a}from"./5WYRJMBW.js";import"./ONQ6JSBJ.js";import"./AI6DYOKR.js";import"./VXFQANGJ.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export{a as clearFiltersTool};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import v from"./
|
|
2
|
+
import v from"./UB6PAQZ7.js";import t from"./DOXBIASP.js";import s from"./FZ4CURWW.js";import r from"./EZYONVBU.js";import q from"./JSMNXHYG.js";import p from"./ONMNQBPO.js";import o from"./TYZ3FRGW.js";import n from"./KITIP6J2.js";import"./Z5W4V7RC.js";import m from"./KWD2ECTM.js";import l from"./U2D53TAX.js";import k from"./OAKRPM7D.js";import j from"./V52XWEGV.js";import i from"./CCC6LBMY.js";import"./34O57OGV.js";import"./7SRLZQVC.js";import"./FDOMMK2M.js";import f from"./6HF36IKA.js";import"./Y7XD7ZRD.js";import"./VLLZ2FFU.js";import e from"./5ZFUGNRN.js";import"./LLUGJKAQ.js";import"./WKTQVBFJ.js";import"./K2R6XVK3.js";import d from"./L7XTRDFM.js";import c from"./AT4XVTJR.js";import{e as g,f as h}from"./7M6VKBTK.js";import"./5WYRJMBW.js";import"./YEZ3AMNX.js";import b from"./JKIESH74.js";import a from"./QNNGPA3Q.js";import"./ONQ6JSBJ.js";import"./R74ZHFA6.js";import{a as y,b as u}from"./7VAQUCBU.js";import"./VOKXKU7M.js";import"./EWLXNGKH.js";import"./AI6DYOKR.js";import"./VXFQANGJ.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([C,I,,,{d:w,g:v,h:A,i:b,j:S,k:d,l:f,m:M,n:E,o:P,p:T,q:x,r:D},{a:p,b:V},,,,,,,,,,,L,k,W,R,O])=>{var U=async e=>{let a=e.allLayers.toArray(),o=[],r=new Map;for(let t of a)if(t instanceof C){let i=(async()=>{let n=await x(t),s=await D(t,n);r.set(t.id,{layerItem:s,fieldRegistry:n})})();o.push(i)}return await Promise.all(o),r},q=async e=>{await I.whenOnce(()=>e.ready);let a=await U(e.map),{layers:o}=await z(a),r={schemaVersion:v,modified:Date.now(),embeddings:{modelProvider:b,model:S,dimensions:A,templates:{layer:d,field:f}},layers:o},t=M.safeParse(r);if(!t.success)throw console.error("Schema Mismatch:",t.error.format()),new Error("Webmap embedding generation failed validation.");return t.data},z=async e=>{let a=[],o=[];for(let[i,{fieldRegistry:n,layerItem:s}]of e.entries()){let l=H(d,{name:s.name,title:s.title,description:s.description});a.push(l);let m={id:i,name:s.name??"",title:s.title,description:s.description,vector:[],fields:[]};for(let[,c]of n.entries()){let N=H(f,{name:c.name,alias:c.alias,description:c.description});a.push(N),m.fields.push({name:c.name,alias:c.alias,description:c.description,vector:[]})}o.push(m)}let r=await p(a),t=0;return{layers:o.map(i=>(i.vector=r[t++],i.fields.forEach(n=>{n.vector=r[t++]}),i))}},H=(e,a)=>e.replace(/\{(\w+)\}/gu,(o,r)=>a[r]??""),F=(e,a)=>{if(e.length!==a.length)throw new Error("Vectors must be the same length");let o=0,r=0,t=0;for(let s=0;s<e.length;++s){let l=e[s],m=a[s];o+=l*m,r+=l*l,t+=m*m}let i=Math.sqrt(r*t);if(i===0)return 0;let n=o/i;return Math.max(-1,Math.min(1,n))},ee=E,ae=P,te=T,se=y,re=p,oe=F,ie=O,ne=L,me=R,ce=W,le=k,de=q,fe=()=>g(),pe=()=>h(),ge=async(e,a)=>await u(e,a),he=async({modelTier:e="default",config:a}={})=>await w({modelTier:e,config:a});return{ArcgisKnowledgeAgent:le,DataExplorationAgent:me,HelpAgent:ce,LayerStylingAgent:ne,NavigationAgent:ie,Orchestrator:V,cosineSimilarity:oe,createAgentRuntimeState:fe,createAgentRuntimeStateWithSharedState:pe,createChatModel:he,createWebmapEmbeddings:de,getEmbeddings:re,invokeStructuredPrompt:ae,invokeTextPrompt:ee,invokeToolPrompt:te,sendTraceMessage:se,sendUXSuggestion:ge}},"layers/FeatureLayer","core/reactiveUtils",a,b,c,d,e,f,i,j,k,l,m,n,o,p,q,r,s,t,v)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a}from"./
|
|
2
|
+
import{a}from"./YEZ3AMNX.js";import"./ONQ6JSBJ.js";import"./AI6DYOKR.js";import"./VXFQANGJ.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export{a as resetMapTool};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import i from"./
|
|
2
|
+
import i from"./KWD2ECTM.js";import h from"./U2D53TAX.js";import f from"./OAKRPM7D.js";import e from"./V52XWEGV.js";import c from"./AT4XVTJR.js";import{e as R,f as le}from"./7M6VKBTK.js";import{a as de}from"./5WYRJMBW.js";import{a as ue}from"./YEZ3AMNX.js";import a from"./JKIESH74.js";import{a as b,b as T}from"./7VAQUCBU.js";import{Fa as se,Sa as A,g as ne,j as D,k as P,ka as y,y as ie}from"./EWLXNGKH.js";import{Dc as g,S as $,W as B,fa as N}from"./AI6DYOKR.js";import{a as d}from"./VXFQANGJ.js";export default $arcgis.t(([ve,_,Se,,_e,,{createRenderer:Fe},{getSchemesByTag:Le,getSchemes:Qe},{getBackgroundColorTheme:xe},{createAgeRenderer:Ge,createContinuousRenderer:Ve},{getSchemesByTag:re},{createContinuousRenderer:Be},{createRenderer:Ke},{getSchemesByTag:Ue},{createRenderer:He},{getSchemesByTag:We},{createRenderer:Je},{getSchemesByTag:Ze},{createRenderer:Ye},{getSchemesByTag:Xe},{createAgeRenderer:et,createContinuousRenderer:tt},{createRenderer:rt},{getSchemesByTag:ot},at,ke,,{fetchKnowledgeGraph:Ee,executeQueryStreaming:nt,executeSearchStreaming:it},st,{getBindParametersFromCypherQuery:lt},pe,{o:ce},fe,ye,he,me])=>{var Te=e=>Array.isArray(e)&&e.every($),De=e=>typeof e=="object"&&e!=null&&"messages"in e&&Te(e.messages),Pe=e=>typeof e=="object"&&e!=null&&"lg_tool_call"in e,O=class extends se{tools;handleToolErrors=!0;trace=!1;constructor(e,t){let{name:r,tags:o,handleToolErrors:a}=t??{};super({name:r,tags:o,func:(i,s)=>this.run(i,s)}),this.tools=e,this.handleToolErrors=a??this.handleToolErrors}async runTool(e,t,r){let o=this.tools.find(a=>a.name===e.name);try{if(o===void 0)throw new Error(`Tool "${e.name}" not found.`);let a={...e,type:"tool_call"},i={...t,state:r,toolCallId:e.id??"",config:t,context:t.context,store:t.store??null,writer:t.writer??t.configurable?.writer??null},s=await o.invoke(a,i);return $(s)&&s.getType()==="tool"||P(s)?s:new B({status:"success",name:o.name,content:typeof s=="string"?s:JSON.stringify(s),tool_call_id:e.id})}catch(a){if(!this.handleToolErrors||ie(a))throw a;return new B({status:"error",content:`Error: ${a.message}
|
|
3
3
|
Please fix your mistakes.`,name:e.name,tool_call_id:e.id??""})}}async run(e,t){let r;if(Pe(e)){let{lg_tool_call:i,...s}=e;r=[await this.runTool(i,t,s)]}else{let i;if(Te(e))i=e;else if(De(e))i=e.messages;else throw new Error("ToolNode only accepts BaseMessage[] or { messages: BaseMessage[] } as input.");let s=new Set(i.filter(c=>c.getType()==="tool").map(c=>c.tool_call_id)),n;for(let c=i.length-1;c>=0;c-=1){let l=i[c];if(N(l)){n=l;break}}if(n==null||!N(n))throw new Error("ToolNode only accepts AIMessages as input.");r=await Promise.all(n.tool_calls?.filter(c=>c.id==null||!s.has(c.id)).map(c=>this.runTool(c,t,e))??[])}if(!r.some(P))return Array.isArray(e)?r:{messages:r};let o=[],a=null;for(let i of r)P(i)?i.graph===D.PARENT&&Array.isArray(i.goto)&&i.goto.every(s=>ne(s))?a?a.goto.push(...i.goto):a=new D({graph:D.PARENT,goto:i.goto}):o.push(i):o.push(Array.isArray(e)?[i]:{messages:[i]});return a&&o.push(a),o}};var zo=y.Root({llmInputMessages:y({reducer:(e,t)=>A([],t),default:()=>[]})});var I=(e,t)=>t??e,La=y.Root({...le(),intent:y({reducer:I}),vectorSearchLayerResults:y({reducer:I,default:()=>[]}),vectorSearchFieldResults:y({reducer:I}),navigationInternalState:y({reducer:I,default:()=>({toolCallMessage:void 0})})}),Me=Object.assign({"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_lc_context.md":()=>import("./J6A4AS7E.js").then(e=>e.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_map_context.md":()=>import("./TPULIO6I.js").then(e=>e.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_cypher_query_prompt.md":()=>import("./IHP25JWI.js").then(e=>e.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_lucene_generation_prompt.md":()=>import("./CEKOEHB3.js").then(e=>e.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_summarize_result_prompt.md":()=>import("./VAXH6RUQ.js").then(e=>e.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_tool_prompt.md":()=>import("./AOVJ34QE.js").then(e=>e.default),"../agents/dataExploration/prompts/data_explore_filter_prompt.md":()=>import("./PQ2DPOFM.js").then(e=>e.default),"../agents/dataExploration/prompts/data_explore_query_prompt.md":()=>import("./SDWWUWAF.js").then(e=>e.default),"../agents/dataExploration/prompts/summarize_query_response_prompt.md":()=>import("./FYZATVB3.js").then(e=>e.default),"../agents/help/prompts/help_prompt.md":()=>import("./NEV6OZN3.js").then(e=>e.default),"../agents/layerStyling/prompts/layer_styling_prompt.md":()=>import("./ICBIUFK7.js").then(e=>e.default),"../agents/navigation/prompts/navigation_intent_prompt.md":()=>import("./JEBRN3EU.js").then(e=>e.default),"../agents/navigation/prompts/navigation_tool_prompt.md":()=>import("./UHEYPSOR.js").then(e=>e.default)});async function L(e){let t=Object.entries(Me).find(([r])=>r.endsWith(`/${e}.md`));if(!t)throw new Error(`Prompt not found: ${e}
|
|
4
4
|
Available prompts:
|
|
5
5
|
${Object.keys(Me).join(`
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import f from"./ONMNQBPO.js";import e from"./
|
|
2
|
+
import f from"./ONMNQBPO.js";import e from"./TYZ3FRGW.js";import d from"./KITIP6J2.js";import{a as Z}from"./Z5W4V7RC.js";import{a as h}from"./FDOMMK2M.js";import c from"./6HF36IKA.js";import{a as F}from"./Y7XD7ZRD.js";import{a as C}from"./VLLZ2FFU.js";import b from"./5ZFUGNRN.js";import{a as L}from"./LLUGJKAQ.js";import{a as _}from"./WKTQVBFJ.js";import{a as I}from"./K2R6XVK3.js";import a from"./AT4XVTJR.js";import{a as x}from"./ONQ6JSBJ.js";import{a as g}from"./7VAQUCBU.js";import{Ya as E,a as w,b as k}from"./EWLXNGKH.js";import{a as y}from"./VXFQANGJ.js";export default $arcgis.t(([,,,,,,{o:$,p:N},R,b,M,{a:A,b:v,c:S,d:q,e:V},j])=>{var T=[b,F,C,R,L,_,I,M,Z];async function B(e,t){let a=await S("navigation_tool_prompt"),{mapView:s}=x(t,["mapView"]),c=s.map.bookmarks?.map(p=>p.name).filter(Boolean)??[],i=e.vectorSearchLayerResults?.length>0?e.vectorSearchLayerResults.map((p,G)=>`${G+1}. layerId=${p.id} | title=${p.title??""} | name=${p.name??""} | score=${p.score.toFixed(2)}`).join(`
|
|
3
3
|
`):"",l=e.vectorSearchFieldResults?.length>0?JSON.stringify(e.vectorSearchFieldResults,null,2):"",n=e.intent==="goToBookmark"&&c.length?`Available bookmarks:
|
|
4
4
|
${c.map(p=>`- ${p}`).join(`
|
|
5
5
|
`)}`:"",o=(e.intent==="goToLayer"||e.intent==="goToFeatures")&&e.vectorSearchLayerResults?.length?`Candidate layers:
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import b from"./
|
|
2
|
+
import b from"./JKIESH74.js";import a from"./QNNGPA3Q.js";import"./ONQ6JSBJ.js";import"./AI6DYOKR.js";import"./VXFQANGJ.js";import"./MWYBF3F3.js";import"./UZLQALHY.js";export default $arcgis.t(([,a])=>{return a},a,b)
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{a as s,b as i}from"./
|
|
2
|
+
import{a as s,b as i}from"./MMHDT4KV.js";import{c as r}from"./RLEHNAIA.js";function c(e,n){let t=s(e.el,e.referenceElement);if(t)return t;let o=r(e.el,"arcgis-assistant"),a=s(e.el,o?.referenceElement);if(a)return a;throw new Error(`${n}: Reference element not found`)}function g(e,n){let t=c(e,n).view;if(!t)throw new Error(`${n}: Reference element does not have a view`);return t}function m(e){return typeof e=="function"}function w(e){let n=r(e.el,"arcgis-assistant");if(n===void 0)throw new Error("arcgis-assistant-agent must be used within an arcgis-assistant element");return n.register({agent:e.agent,getContext:async()=>await e.getContext?.()??e.context??{}}),n}function f(e){let n=i(e.el,e.referenceElement);if(n)return n;let t=r(e.el,"arcgis-assistant");return s(e.el,t?.referenceElement)||null}function E(e){let n=f(e);return n?n.view:null}export{g as a,m as b,w as c,E as d};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import"../UZLQALHY.js";var e,a,i,c,u,s,w,l,f,m,p,y;async function r(n,t){if(t in n)return n[t];if("default"in n){let o=await n.default;return typeof o=="object"&&o!==null&&t in o?o[t]:o}throw new Error(`Unable to resolve ${String(t)} from module.`)}function W(n,t){let o={};for(let[b,k]of Object.entries(t))o[b]=h(n,k);return o}function d(n,t){return n.object(W(n,t))}function h(n,t){let o=g(n,t);return t.required===!0?o:o.optional()}function g(n,t){let o=T(n,t);return t.description!==void 0&&(o=o.describe(t.description)),o}function S(n,t){switch(t){case"string":return n.string();case"number":return n.number();case"boolean":return n.boolean()}}function A(n){return n==="string"||n==="number"||n==="boolean"}function T(n,t){switch(t.type){case"string":{if(t.enum!=null){if(t.enum.length===0)throw new Error("String schema field enum must include at least one value.");return n.enum(t.enum)}return n.string()}case"number":return n.number();case"boolean":return n.boolean();case"array":{if(t.itemType==null)throw new Error("Array schema field requires an itemType definition.");return n.array(A(t.itemType)?S(n,t.itemType):g(n,t.itemType))}case"object":{if(t.fields==null)throw new Error("Object schema field requires a fields definition.");return d(n,t.fields)}}}async function L(n){p??=import("../APFZY4PI.js");let t=await p;return d(t.z,n)}async function j(n,t){y??=import("../
|
|
2
|
+
import"../UZLQALHY.js";var e,a,i,c,u,s,w,l,f,m,p,y;async function r(n,t){if(t in n)return n[t];if("default"in n){let o=await n.default;return typeof o=="object"&&o!==null&&t in o?o[t]:o}throw new Error(`Unable to resolve ${String(t)} from module.`)}function W(n,t){let o={};for(let[b,k]of Object.entries(t))o[b]=h(n,k);return o}function d(n,t){return n.object(W(n,t))}function h(n,t){let o=g(n,t);return t.required===!0?o:o.optional()}function g(n,t){let o=T(n,t);return t.description!==void 0&&(o=o.describe(t.description)),o}function S(n,t){switch(t){case"string":return n.string();case"number":return n.number();case"boolean":return n.boolean()}}function A(n){return n==="string"||n==="number"||n==="boolean"}function T(n,t){switch(t.type){case"string":{if(t.enum!=null){if(t.enum.length===0)throw new Error("String schema field enum must include at least one value.");return n.enum(t.enum)}return n.string()}case"number":return n.number();case"boolean":return n.boolean();case"array":{if(t.itemType==null)throw new Error("Array schema field requires an itemType definition.");return n.array(A(t.itemType)?S(n,t.itemType):g(n,t.itemType))}case"object":{if(t.fields==null)throw new Error("Object schema field requires a fields definition.");return d(n,t.fields)}}}async function L(n){p??=import("../APFZY4PI.js");let t=await p;return d(t.z,n)}async function j(n,t){y??=import("../RCFAXADI.js");let o=await y;return await(await r(o,"sendUXSuggestion"))(n,t)}async function q(n){e??=import("../6KFMRBAA.js");let t=await e,o=await r(t,"FunctionAgent");return new o(n)}async function E(n){a??=import("../J6SZIQJA.js");let t=await a,o=await r(t,"FunctionTool");return new o(n)}async function F(n){i??=import("../EMLOVMD4.js");let t=await i,o=await r(t,"LLMAgent");return new o(n)}async function v(n){c??=import("../KPO4XX6J.js");let t=await c,o=await r(t,"WorkflowAgent");return new o(n)}async function U(n){u??=import("../PSYRZMX2.js");let t=await u,o=await r(t,"ConditionalWorkflow");return new o(n)}async function M(n){s??=import("../4HDDRBIY.js");let t=await s,o=await r(t,"LoopWorkflow");return new o(n)}async function P(n){w??=import("../WP7ORLSB.js");let t=await w,o=await r(t,"ParallelWorkflow");return new o(n)}async function R(n){l??=import("../HMUWQCXU.js");let t=await l,o=await r(t,"RouterWorkflow");return new o(n)}async function X(n){f??=import("../4NJ2FF7H.js");let t=await f,o=await r(t,"SequentialWorkflow");return new o(n)}async function x(n){m??=import("../ZQMBJ6MI.js");let t=await m,o=await r(t,"SwitchWorkflow");return new o(n)}export{U as createConditionalWorkflow,q as createFunctionAgent,E as createFunctionTool,F as createLLMAgent,M as createLoopWorkflow,P as createParallelWorkflow,R as createRouterWorkflow,L as createSchema,X as createSequentialWorkflow,x as createSwitchWorkflow,v as createWorkflowAgent,j as sendUXSuggestion};
|
package/dist/cdn/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import{p as s,y as e}from"./6TA5KFAQ.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";var a=s(e,{"arcgis-assistant":[()=>import("./
|
|
2
|
+
import{p as s,y as e}from"./6TA5KFAQ.js";import"./R74ZHFA6.js";import"./UZLQALHY.js";var a=s(e,{"arcgis-assistant":[()=>import("./LZP3OBKS.js"),"_messages:,assistantAvatarEnabled,awaitingResponse:,awaitingResponseStep:,copyEnabled,description,entryMessage,feedbackEnabled,heading,interrupt:,keepSuggestedPrompts,logEnabled,messages:,orchestrator:,readAloudEnabled,referenceElement,streamingDisabled,suggestedPrompts:,voiceInputEnabled;clearChatHistory,submitMessage;cancelInterrupt,register,submitInterrupt,unregister"],"arcgis-assistant-agent":[()=>import("./BWLXDT75.js"),"agent:,context:,itemId,workflow:;getContext"],"arcgis-assistant-data-exploration-agent":[()=>import("./2SQKAJ73.js"),"referenceElement;;getContext"],"arcgis-assistant-help-agent":[()=>import("./GZGDLURS.js"),"referenceElement;;getContext"],"arcgis-assistant-knowledge-agent":[()=>import("./H6IJRTHM.js"),"context:,referenceElement,serviceUrl;getContext"],"arcgis-assistant-layer-styling-agent":[()=>import("./GPZJANRQ.js"),"referenceElement;;getContext"],"arcgis-assistant-navigation-agent":[()=>import("./GOKLRL6M.js"),"referenceElement;;getContext"],"arcgis-assistant-chat":[()=>import("./WQGJATNJ.js"),"interrupt:,loading,messages:"],"arcgis-assistant-chat-entry":[()=>import("./XRE5USHA.js"),"_messages:,awaitingResponse,disabled,entryPlaceholder,inputValue,keyboardShortcutsDisabled,messages:,status,voiceInputEnabled;submitMessage"],"arcgis-assistant-interrupt":[()=>import("./DCSZPL7R.js"),"_messages:,message,options:,type"],"arcgis-assistant-interrupt-preview":[()=>import("./2Y4DTOGT.js"),"interrupts:"],"arcgis-assistant-message":[()=>import("./T4ECSHM7.js"),"assistantAvatarEnabled,copyEnabled,feedbackEnabled,footerDisabled,logEnabled,message:,readAloudEnabled"],"arcgis-assistant-message-block":[()=>import("./OKTBWKNG.js"),"block:"],"arcgis-assistant-message-feedback":[()=>import("./KKLAQF3Z.js"),"_messages:,feedbackEnabled,message:"],"arcgis-assistant-message-footer":[()=>import("./5TI2F5XX.js"),"_messages:,copyEnabled,feedbackEnabled,logEnabled,message:,readAloudEnabled"],"arcgis-assistant-message-loading":[()=>import("./WSHWQDO2.js"),"assistantAvatarEnabled,interrupts:,loading,loadingMessage"],"arcgis-assistant-message-log":[()=>import("./U3XIDLHO.js"),"log:,logEnabled,showLog"],"arcgis-assistant-message-read-aloud":[()=>import("./GLBE7OW2.js"),"_messages:,message:,readAloudEnabled"],"arcgis-assistant-message-text":[()=>import("./3S5G5SIX.js"),"content,parts:"],"arcgis-assistant-speech-input":[()=>import("./ZCEMEUP7.js"),"awaitingResponse,inputValue,language,mode;;clearDraftSession"],"arcgis-assistant-suggested-prompts":[()=>import("./KLYNL2ZT.js"),"_messages:,label,prompts:"],"arcgis-assistant-user-message":[()=>import("./FSGIG7UN.js"),"content,message:,user"]});a({resourcesUrl:import.meta.url});var t=new CSSStyleSheet;t.replaceSync("@layer{:not([hydrated]):is(arcgis-assistant,arcgis-assistant-agent,arcgis-assistant-data-exploration-agent,arcgis-assistant-help-agent,arcgis-assistant-knowledge-agent,arcgis-assistant-layer-styling-agent,arcgis-assistant-navigation-agent,arcgis-assistant-chat,arcgis-assistant-chat-entry,arcgis-assistant-interrupt,arcgis-assistant-message,arcgis-assistant-message-block,arcgis-assistant-message-feedback,arcgis-assistant-message-footer,arcgis-assistant-message-loading,arcgis-assistant-message-log,arcgis-assistant-message-read-aloud,arcgis-assistant-message-text,arcgis-assistant-speech-input,arcgis-assistant-suggested-prompts,arcgis-assistant-user-message){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,t];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r,p,j,i=(a.importMap??={}).imports??={})=>{"agent-utils/index,agent-utils/middlewares/middleware,agent-utils/middlewares/humanInTheLoop,agent-utils/middlewares/trace".split(",").map(e=>i[p+e+j]=i[p+e]=import.meta.resolve("./"+e+j));a.t=(c,...x)=>Promise.all(x.map(x=>x.then?x:(!a?.forceESM&&a?.import||(x=>import(x+".js").then(m=>m.default??m)))("@arcgis/core/"+x))).then(c);r.p=a.t(([m])=>{r.t=m.trackAccess;r.o=m.createObservable;r.c=m.createTrackingTarget;r.r=m.runTracked},"applications/Components/reactiveUtils")})($arcgis,e,"@arcgis/ai-components/",".js")
|
package/dist/chunks/adapter.js
CHANGED
|
@@ -34,13 +34,13 @@ import { createAgeRenderer as Ce, createContinuousRenderer as $e } from "@arcgis
|
|
|
34
34
|
import { createRenderer as Pe } from "@arcgis/core/smartMapping/renderers/type.js";
|
|
35
35
|
import { getSchemesByTag as Ee } from "@arcgis/core/smartMapping/symbology/type.js";
|
|
36
36
|
import { ToolNode as ze } from "@langchain/langgraph/prebuilt";
|
|
37
|
-
import { clearFiltersTool as ke } from "
|
|
38
|
-
import { resetMapTool as Ae } from "
|
|
39
|
-
import { setFeatureEffectTool as qe } from "
|
|
40
|
-
import { getAttributeTool as Me } from "
|
|
41
|
-
import { getStatisticsTool as Ne } from "
|
|
42
|
-
import { getTopFeaturesTool as De } from "
|
|
43
|
-
import { queryFeaturesTool as Le } from "
|
|
37
|
+
import { clearFiltersTool as ke } from "../agents/tools/filter/clearFilters/adapter.js";
|
|
38
|
+
import { resetMapTool as Ae } from "../agents/tools/filter/resetMap/adapter.js";
|
|
39
|
+
import { setFeatureEffectTool as qe } from "../agents/tools/filter/setFeatureEffect/adapter.js";
|
|
40
|
+
import { getAttributeTool as Me } from "../agents/tools/query/getAttribute/adapter.js";
|
|
41
|
+
import { getStatisticsTool as Ne } from "../agents/tools/query/getStatistics/adapter.js";
|
|
42
|
+
import { getTopFeaturesTool as De } from "../agents/tools/query/getTopFeatures/adapter.js";
|
|
43
|
+
import { queryFeaturesTool as Le } from "../agents/tools/query/queryFeatures/adapter.js";
|
|
44
44
|
import Ge from "@arcgis/core/WebLinkChart.js";
|
|
45
45
|
import re from "@arcgis/core/rest/knowledgeGraph/GraphQueryStreaming.js";
|
|
46
46
|
import "@arcgis/core/views/LinkChartView.js";
|
package/dist/chunks/helpGraph.js
CHANGED
|
@@ -13,7 +13,7 @@ import "@arcgis/core/config.js";
|
|
|
13
13
|
import "@arcgis/core/core/reactiveUtils.js";
|
|
14
14
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
15
15
|
import { f as p } from "./fetchService.js";
|
|
16
|
-
import { listLayerFieldsTool as S } from "
|
|
16
|
+
import { listLayerFieldsTool as S } from "../agents/tools/help/listFields/adapter.js";
|
|
17
17
|
import { h as E } from "./toolCallResponse.js";
|
|
18
18
|
import { ToolNode as T } from "@langchain/langgraph/prebuilt";
|
|
19
19
|
import { s as m } from "./index.js";
|
|
@@ -12,15 +12,15 @@ import "@langchain/openai";
|
|
|
12
12
|
import "@arcgis/core/config.js";
|
|
13
13
|
import "@arcgis/core/core/reactiveUtils.js";
|
|
14
14
|
import "@arcgis/core/layers/FeatureLayer.js";
|
|
15
|
-
import { goToAddressTool as A } from "
|
|
16
|
-
import { goToBookmarkTool as _ } from "
|
|
17
|
-
import { goToFeaturesTool as I } from "
|
|
18
|
-
import { goToFullExtentTool as q } from "
|
|
19
|
-
import { goToHomeExtentTool as Z } from "
|
|
20
|
-
import { goToLayerTool as V } from "
|
|
21
|
-
import { goToScaleTool as j } from "
|
|
22
|
-
import { goToViewpointTool as P } from "
|
|
23
|
-
import { goToZoomTool as z } from "
|
|
15
|
+
import { goToAddressTool as A } from "../agents/tools/navigation/goToAddress/adapter.js";
|
|
16
|
+
import { goToBookmarkTool as _ } from "../agents/tools/navigation/goToBookmark/adapter.js";
|
|
17
|
+
import { goToFeaturesTool as I } from "../agents/tools/navigation/goToFeatures/adapter.js";
|
|
18
|
+
import { goToFullExtentTool as q } from "../agents/tools/navigation/goToFullExtent/adapter.js";
|
|
19
|
+
import { goToHomeExtentTool as Z } from "../agents/tools/navigation/goToHomeExtent/adapter.js";
|
|
20
|
+
import { goToLayerTool as V } from "../agents/tools/navigation/goToLayer/adapter.js";
|
|
21
|
+
import { goToScaleTool as j } from "../agents/tools/navigation/goToScale/adapter.js";
|
|
22
|
+
import { goToViewpointTool as P } from "../agents/tools/navigation/goToViewpoint/adapter.js";
|
|
23
|
+
import { goToZoomTool as z } from "../agents/tools/navigation/goToZoom/adapter.js";
|
|
24
24
|
import { f as w } from "./fetchAgentContext.js";
|
|
25
25
|
import { h as G } from "./toolCallResponse.js";
|
|
26
26
|
import { s as p } from "./index.js";
|
package/dist/chunks/utils2.js
CHANGED
|
@@ -1,47 +1,16 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { getClosestElement as
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const r = s(e.el, e.referenceElement);
|
|
6
|
-
if (r)
|
|
7
|
-
return r;
|
|
8
|
-
const n = i(e.el, "arcgis-assistant"), a = s(e.el, n?.referenceElement);
|
|
9
|
-
if (a)
|
|
10
|
-
return a;
|
|
11
|
-
throw new Error(`${t}: Reference element not found`);
|
|
2
|
+
import { getClosestElement as s } from "@arcgis/toolkit/dom";
|
|
3
|
+
function l(t, o) {
|
|
4
|
+
return o ? typeof o == "string" ? u(t, o) ?? null : o : s(t, "arcgis-map") ?? null;
|
|
12
5
|
}
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
if (!n)
|
|
16
|
-
throw new Error(`${t}: Reference element does not have a view`);
|
|
17
|
-
return n;
|
|
6
|
+
function n(t, o) {
|
|
7
|
+
return o ? typeof o == "string" ? u(t, o) ?? null : o : s(t, "arcgis-link-chart") ?? s(t, "arcgis-map") ?? null;
|
|
18
8
|
}
|
|
19
|
-
function
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
function g(e) {
|
|
23
|
-
const t = i(e.el, "arcgis-assistant");
|
|
24
|
-
if (t === void 0)
|
|
25
|
-
throw new Error("arcgis-assistant-agent must be used within an arcgis-assistant element");
|
|
26
|
-
return t.register({
|
|
27
|
-
agent: e.agent,
|
|
28
|
-
getContext: async () => await e.getContext?.() ?? e.context ?? {}
|
|
29
|
-
}), t;
|
|
30
|
-
}
|
|
31
|
-
function l(e) {
|
|
32
|
-
const t = o(e.el, e.referenceElement);
|
|
33
|
-
if (t)
|
|
34
|
-
return t;
|
|
35
|
-
const r = i(e.el, "arcgis-assistant"), n = s(e.el, r?.referenceElement);
|
|
36
|
-
return n || null;
|
|
37
|
-
}
|
|
38
|
-
function v(e) {
|
|
39
|
-
const t = l(e);
|
|
40
|
-
return t ? t.view : null;
|
|
9
|
+
function u(t, o) {
|
|
10
|
+
const r = o.includes("#") || o.includes(".") || o.includes("["), i = t.getRootNode();
|
|
11
|
+
return (r ? void 0 : i.querySelector(`#${o}`)) ?? i.querySelector(o) ?? void 0;
|
|
41
12
|
}
|
|
42
13
|
export {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
g as i,
|
|
46
|
-
m as r
|
|
14
|
+
n as a,
|
|
15
|
+
l as g
|
|
47
16
|
};
|
package/dist/chunks/utils3.js
CHANGED
|
@@ -1,16 +1,47 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
|
-
import { getClosestElement as
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
import { getClosestElement as i } from "@arcgis/toolkit/dom";
|
|
3
|
+
import { g as s, a as o } from "./utils2.js";
|
|
4
|
+
function c(e, t) {
|
|
5
|
+
const r = s(e.el, e.referenceElement);
|
|
6
|
+
if (r)
|
|
7
|
+
return r;
|
|
8
|
+
const n = i(e.el, "arcgis-assistant"), a = s(e.el, n?.referenceElement);
|
|
9
|
+
if (a)
|
|
10
|
+
return a;
|
|
11
|
+
throw new Error(`${t}: Reference element not found`);
|
|
5
12
|
}
|
|
6
|
-
function
|
|
7
|
-
|
|
13
|
+
function m(e, t) {
|
|
14
|
+
const n = c(e, t).view;
|
|
15
|
+
if (!n)
|
|
16
|
+
throw new Error(`${t}: Reference element does not have a view`);
|
|
17
|
+
return n;
|
|
8
18
|
}
|
|
9
|
-
function
|
|
10
|
-
|
|
11
|
-
|
|
19
|
+
function w(e) {
|
|
20
|
+
return typeof e == "function";
|
|
21
|
+
}
|
|
22
|
+
function g(e) {
|
|
23
|
+
const t = i(e.el, "arcgis-assistant");
|
|
24
|
+
if (t === void 0)
|
|
25
|
+
throw new Error("arcgis-assistant-agent must be used within an arcgis-assistant element");
|
|
26
|
+
return t.register({
|
|
27
|
+
agent: e.agent,
|
|
28
|
+
getContext: async () => await e.getContext?.() ?? e.context ?? {}
|
|
29
|
+
}), t;
|
|
30
|
+
}
|
|
31
|
+
function l(e) {
|
|
32
|
+
const t = o(e.el, e.referenceElement);
|
|
33
|
+
if (t)
|
|
34
|
+
return t;
|
|
35
|
+
const r = i(e.el, "arcgis-assistant"), n = s(e.el, r?.referenceElement);
|
|
36
|
+
return n || null;
|
|
37
|
+
}
|
|
38
|
+
function v(e) {
|
|
39
|
+
const t = l(e);
|
|
40
|
+
return t ? t.view : null;
|
|
12
41
|
}
|
|
13
42
|
export {
|
|
14
|
-
|
|
15
|
-
|
|
43
|
+
v as a,
|
|
44
|
+
w as b,
|
|
45
|
+
g as i,
|
|
46
|
+
m as r
|
|
16
47
|
};
|
|
@@ -24,7 +24,7 @@ import "@langchain/langgraph/web";
|
|
|
24
24
|
import j from "@arcgis/core/core/Accessor.js";
|
|
25
25
|
import { property as m, subclass as q } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
26
26
|
import { marked as E } from "marked";
|
|
27
|
-
import { g as H } from "../../chunks/
|
|
27
|
+
import { g as H } from "../../chunks/utils2.js";
|
|
28
28
|
import { g as S } from "../../chunks/slottableRequestUtils.js";
|
|
29
29
|
const F = A`:host{display:block;width:var(--arcgis-internal-panel-width, 100%);height:var(--arcgis-internal-expand-max-height, 100%);--calcite-panel-content-bottom-space: 0}.footer-container{display:flex;flex-direction:column;flex:1 1 0;gap:var(--calcite-spacing-md)}.content-container{display:flex;flex-direction:column;flex:1 1 0;min-height:0;position:relative;overflow:auto}.suggested-prompts-container{display:flex;justify-content:center;width:100%;background:var(--calcite-panel-background-color, var(--calcite-color-background))}.suggested-prompts{display:block;padding:var(--calcite-spacing-md);max-width:100%;box-sizing:border-box}.error-notice{padding:var(--calcite-spacing-sm)}.interrupt-waiting-message{font-style:italic;color:var(--calcite-color-text-2)}`;
|
|
30
30
|
function w(o) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
|
|
2
2
|
import { c as W } from "../../chunks/runtime.js";
|
|
3
3
|
import { LitElement as L } from "@arcgis/lumina";
|
|
4
|
-
import { b as G, i as z } from "../../chunks/
|
|
4
|
+
import { b as G, i as z } from "../../chunks/utils3.js";
|
|
5
5
|
import J from "@arcgis/core/portal/PortalItem.js";
|
|
6
6
|
import j from "@arcgis/core/portal/Portal.js";
|
|
7
7
|
import { property as n, subclass as l } from "@arcgis/core/core/accessorSupport/decorators.js";
|
|
@@ -183,71 +183,71 @@ function D(t) {
|
|
|
183
183
|
const rt = /* @__PURE__ */ new Map([
|
|
184
184
|
[
|
|
185
185
|
"clear_filters",
|
|
186
|
-
async () => (await import("../../
|
|
186
|
+
async () => (await import("../../agents/tools/filter/clearFilters/adapter.js")).clearFiltersTool
|
|
187
187
|
],
|
|
188
188
|
[
|
|
189
189
|
"reset_map",
|
|
190
|
-
async () => (await import("../../
|
|
190
|
+
async () => (await import("../../agents/tools/filter/resetMap/adapter.js")).resetMapTool
|
|
191
191
|
],
|
|
192
192
|
[
|
|
193
193
|
"set_feature_effect",
|
|
194
|
-
async () => (await import("../../
|
|
194
|
+
async () => (await import("../../agents/tools/filter/setFeatureEffect/adapter.js")).setFeatureEffectTool
|
|
195
195
|
],
|
|
196
196
|
[
|
|
197
197
|
"list_layer_fields",
|
|
198
|
-
async () => (await import("../../
|
|
198
|
+
async () => (await import("../../agents/tools/help/listFields/adapter.js")).listLayerFieldsTool
|
|
199
199
|
],
|
|
200
200
|
[
|
|
201
201
|
"go_to_address",
|
|
202
|
-
async () => (await import("../../
|
|
202
|
+
async () => (await import("../../agents/tools/navigation/goToAddress/adapter.js")).goToAddressTool
|
|
203
203
|
],
|
|
204
204
|
[
|
|
205
205
|
"go_to_bookmark",
|
|
206
|
-
async () => (await import("../../
|
|
206
|
+
async () => (await import("../../agents/tools/navigation/goToBookmark/adapter.js")).goToBookmarkTool
|
|
207
207
|
],
|
|
208
208
|
[
|
|
209
209
|
"go_to_features",
|
|
210
|
-
async () => (await import("../../
|
|
210
|
+
async () => (await import("../../agents/tools/navigation/goToFeatures/adapter.js")).goToFeaturesTool
|
|
211
211
|
],
|
|
212
212
|
[
|
|
213
213
|
"go_to_full_extent",
|
|
214
|
-
async () => (await import("../../
|
|
214
|
+
async () => (await import("../../agents/tools/navigation/goToFullExtent/adapter.js")).goToFullExtentTool
|
|
215
215
|
],
|
|
216
216
|
[
|
|
217
217
|
"go_to_home_extent",
|
|
218
|
-
async () => (await import("../../
|
|
218
|
+
async () => (await import("../../agents/tools/navigation/goToHomeExtent/adapter.js")).goToHomeExtentTool
|
|
219
219
|
],
|
|
220
220
|
[
|
|
221
221
|
"go_to_layer",
|
|
222
|
-
async () => (await import("../../
|
|
222
|
+
async () => (await import("../../agents/tools/navigation/goToLayer/adapter.js")).goToLayerTool
|
|
223
223
|
],
|
|
224
224
|
[
|
|
225
225
|
"go_to_scale",
|
|
226
|
-
async () => (await import("../../
|
|
226
|
+
async () => (await import("../../agents/tools/navigation/goToScale/adapter.js")).goToScaleTool
|
|
227
227
|
],
|
|
228
228
|
[
|
|
229
229
|
"go_to_viewpoint",
|
|
230
|
-
async () => (await import("../../
|
|
230
|
+
async () => (await import("../../agents/tools/navigation/goToViewpoint/adapter.js")).goToViewpointTool
|
|
231
231
|
],
|
|
232
232
|
[
|
|
233
233
|
"go_to_zoom",
|
|
234
|
-
async () => (await import("../../
|
|
234
|
+
async () => (await import("../../agents/tools/navigation/goToZoom/adapter.js")).goToZoomTool
|
|
235
235
|
],
|
|
236
236
|
[
|
|
237
237
|
"get_attribute",
|
|
238
|
-
async () => (await import("../../
|
|
238
|
+
async () => (await import("../../agents/tools/query/getAttribute/adapter.js")).getAttributeTool
|
|
239
239
|
],
|
|
240
240
|
[
|
|
241
241
|
"get_statistics",
|
|
242
|
-
async () => (await import("../../
|
|
242
|
+
async () => (await import("../../agents/tools/query/getStatistics/adapter.js")).getStatisticsTool
|
|
243
243
|
],
|
|
244
244
|
[
|
|
245
245
|
"get_top_features",
|
|
246
|
-
async () => (await import("../../
|
|
246
|
+
async () => (await import("../../agents/tools/query/getTopFeatures/adapter.js")).getTopFeaturesTool
|
|
247
247
|
],
|
|
248
248
|
[
|
|
249
249
|
"query_features",
|
|
250
|
-
async () => (await import("../../
|
|
250
|
+
async () => (await import("../../agents/tools/query/queryFeatures/adapter.js")).queryFeaturesTool
|
|
251
251
|
]
|
|
252
252
|
]);
|
|
253
253
|
async function st(t) {
|