@arcgis/ai-components 5.1.0-next.4 → 5.1.0-next.41

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 (95) hide show
  1. package/dist/cdn/24MYCR6F.js +3 -0
  2. package/dist/cdn/2JJGDGMG.js +67 -0
  3. package/dist/cdn/433QN6BZ.js +2 -0
  4. package/dist/cdn/{R3LASMEM.js → 6Z5UQ3RY.js} +106 -107
  5. package/dist/cdn/75CJ2C4L.js +2 -0
  6. package/dist/cdn/7ITNTTBI.js +2 -0
  7. package/dist/cdn/{CN6VFVA2.js → BSIB6MUI.js} +1 -0
  8. package/dist/cdn/COBFCTOX.js +2 -0
  9. package/dist/cdn/CXBXMIVC.js +2 -0
  10. package/dist/cdn/{UY4FI7AP.js → FHXNY4QC.js} +1 -1
  11. package/dist/cdn/HN2XKXPX.js +2 -0
  12. package/dist/cdn/HRAAW2JX.js +2 -0
  13. package/dist/cdn/NCO7XIEC.js +3 -0
  14. package/dist/cdn/OG537NIF.js +2 -0
  15. package/dist/cdn/RNZITNTO.js +2 -0
  16. package/dist/cdn/{62K6RJZZ.js → SA7B3M2J.js} +1 -1
  17. package/dist/cdn/TBEVPWWN.js +2 -0
  18. package/dist/cdn/UIXYUELQ.js +2 -0
  19. package/dist/cdn/UY42NIH7.js +2 -0
  20. package/dist/cdn/VC3I52HI.js +2 -0
  21. package/dist/cdn/{ZYQ6U2YH.js → VDUOWASW.js} +14 -0
  22. package/dist/cdn/{NKNUZCLA.js → W2A22QZU.js} +15 -0
  23. package/dist/cdn/XI5SV3HJ.js +47 -0
  24. package/dist/cdn/XSVSCXUM.js +2 -0
  25. package/dist/cdn/XUUCW7HH.js +2 -0
  26. package/dist/cdn/{M7XUI5KY.js → Z6ZNHTPJ.js} +35 -3
  27. package/dist/cdn/ZF5LIGCC.js +275 -0
  28. package/dist/cdn/ZPGX72R2.js +4 -0
  29. package/dist/cdn/index.js +1 -1
  30. package/dist/cdn/main.css +1 -1
  31. package/dist/chunks/converterUtils.js +117 -0
  32. package/dist/chunks/utils.js +16 -14
  33. package/dist/chunks/utils2.js +8 -3
  34. package/dist/components/arcgis-assistant/customElement.d.ts +286 -23
  35. package/dist/components/arcgis-assistant/customElement.js +172 -142
  36. package/dist/components/arcgis-assistant/index.js +2 -1
  37. package/dist/components/arcgis-assistant/types.d.ts +97 -0
  38. package/dist/components/arcgis-assistant-agent/customElement.d.ts +22 -8
  39. package/dist/components/arcgis-assistant-agent/customElement.js +7 -7
  40. package/dist/components/arcgis-assistant-chat/customElement.d.ts +8 -6
  41. package/dist/components/arcgis-assistant-chat/customElement.js +14 -14
  42. package/dist/components/arcgis-assistant-chat-card/customElement.d.ts +12 -5
  43. package/dist/components/arcgis-assistant-chat-card/customElement.js +59 -25
  44. package/dist/components/arcgis-assistant-chat-card/index.js +2 -0
  45. package/dist/components/arcgis-assistant-chat-card-content/customElement.js +14 -12
  46. package/dist/components/arcgis-assistant-chat-card-content/index.js +1 -0
  47. package/dist/components/arcgis-assistant-chat-entry/customElement.d.ts +5 -2
  48. package/dist/components/arcgis-assistant-chat-entry/customElement.js +42 -20
  49. package/dist/components/arcgis-assistant-data-exploration-agent/customElement.d.ts +73 -6
  50. package/dist/components/arcgis-assistant-data-exploration-agent/customElement.js +5 -5
  51. package/dist/components/arcgis-assistant-help-agent/customElement.d.ts +73 -0
  52. package/dist/components/arcgis-assistant-help-agent/customElement.js +26 -0
  53. package/dist/components/arcgis-assistant-help-agent/index.d.ts +1 -0
  54. package/dist/components/arcgis-assistant-help-agent/index.js +1 -0
  55. package/dist/components/arcgis-assistant-interrupt/customElement.d.ts +1 -1
  56. package/dist/components/arcgis-assistant-interrupt/customElement.js +8 -8
  57. package/dist/components/arcgis-assistant-layer-filter-agent/customElement.js +3 -3
  58. package/dist/components/arcgis-assistant-layer-query-agent/customElement.js +10 -10
  59. package/dist/components/arcgis-assistant-layer-styling-agent/customElement.js +6 -6
  60. package/dist/components/arcgis-assistant-navigation-agent/customElement.d.ts +53 -6
  61. package/dist/components/arcgis-assistant-navigation-agent/customElement.js +5 -5
  62. package/dist/components/arcgis-assistant-shell/customElement.d.ts +3 -0
  63. package/dist/components/arcgis-assistant-shell/customElement.js +12 -11
  64. package/dist/docs/api.json +1 -1
  65. package/dist/docs/docs.json +1 -1
  66. package/dist/docs/vscode.html-custom-data.json +1 -1
  67. package/dist/docs/web-types.json +1 -1
  68. package/dist/index.d.ts +16 -0
  69. package/dist/loader.js +9 -8
  70. package/dist/types/lumina.d.ts +19 -5
  71. package/dist/types/preact.d.ts +20 -5
  72. package/dist/types/react.d.ts +21 -5
  73. package/dist/types/stencil.d.ts +19 -5
  74. package/dist/utils/index.d.ts +305 -0
  75. package/dist/utils/index.js +13 -0
  76. package/package.json +15 -8
  77. package/dist/cdn/26V7SXDR.js +0 -4
  78. package/dist/cdn/4Y73V2HU.js +0 -2
  79. package/dist/cdn/5DFZMIRZ.js +0 -2
  80. package/dist/cdn/6ULHJSIQ.js +0 -245
  81. package/dist/cdn/AQZDEJJZ.js +0 -2
  82. package/dist/cdn/GCFT45CD.js +0 -2
  83. package/dist/cdn/I22GHLAO.js +0 -2
  84. package/dist/cdn/IFWK7P7O.js +0 -2
  85. package/dist/cdn/KJZARHAM.js +0 -2
  86. package/dist/cdn/M672SFG6.js +0 -2
  87. package/dist/cdn/MLJ7GXKB.js +0 -2
  88. package/dist/cdn/PCBMGVNZ.js +0 -4
  89. package/dist/cdn/Q674OE2M.js +0 -2
  90. package/dist/cdn/QOIX2B5M.js +0 -2
  91. package/dist/cdn/SOWNHB7F.js +0 -30
  92. package/dist/cdn/SW3IAT6V.js +0 -2
  93. package/dist/cdn/VUHDKXFM.js +0 -2
  94. package/dist/cdn/XVUE27HC.js +0 -2
  95. package/dist/cdn/ZFFHP5DI.js +0 -2
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{a as o,b as l}from"./2JJGDGMG.js";import{g as i,h as t,v as c,w as a,z as r}from"./ZPGX72R2.js";import"./CFDTXKJ6.js";var d=i`.assistant-chat-card-content__skeleton-block{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);width:100%}.assistant-chat-card-content__skeleton-text{display:block;height:.95em;border-radius:var(--calcite-border-radius);background:linear-gradient(90deg,color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent),color-mix(in srgb,var(--calcite-color-foreground-3) 85%,transparent),color-mix(in srgb,var(--calcite-color-foreground-2) 65%,transparent));background-size:200% 100%;animation:assistant-chat-card-content-shimmer 1.2s ease-in-out infinite;width:85%}.assistant-chat-card-content__skeleton-text:last-child{width:70%}@keyframes assistant-chat-card-content-shimmer{0%{background-position:-150% 0}to{background-position:150% 0}}@media(prefers-reduced-motion){.assistant-chat-card-content__skeleton-text{animation:none}}.assistant-chat-card-content__text-container{padding:0 var(--calcite-spacing-sm);display:flex;flex-direction:column;gap:var(--calcite-spacing-sm);color:var(--calcite-color-text-1)}.assistant-chat-card-content__text-container pre{background-color:var(--calcite-color-foreground-1);padding:var(--calcite-spacing-sm);border-radius:var(--calcite-border-radius);color:var(--calcite-color-text-1);direction:ltr;max-width:100%;overflow:auto}.assistant-chat-card-content__text-container pre code{display:block;white-space:pre;font-family:var(--calcite-code-family)}.assistant-chat-card-content__loading-container{display:flex;flex-direction:column;gap:var(--calcite-spacing-sm)}.assistant-chat-card-content__loading{display:flex;align-items:center;gap:var(--calcite-spacing-sm)}.assistant-chat-card-content__text-loading{font-style:italic;word-wrap:break-word;word-break:break-all;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:1;line-clamp:1;-webkit-box-orient:vertical}.assistant-chat-card-content__error-notice{padding:var(--calcite-spacing-sm)}`,n="assistant-chat-card-content",e={textLoading:`${n}__text-loading`,skeletonBlock:`${n}__skeleton-block`,skeletonText:`${n}__skeleton-text`},s=class extends c{constructor(){super(...arguments),this.loading=!1,this.type="text"}static{this.properties={loading:5,type:1,content:1,loadingMessage:1}}static{this.styles=d}_renderText(){return t`<div class="assistant-chat-card-content__text-container">${this.loading?t`<div class="assistant-chat-card-content__loading-container"><div class="assistant-chat-card-content__loading"><calcite-loader label=loading inline></calcite-loader><div class=${a(e.textLoading)}>${this.loadingMessage}</div></div><div class=${a(e.skeletonBlock)}><span class=${a(e.skeletonText)}></span><span class=${a(e.skeletonText)}></span></div></div>`:t`<div>${o(l(this.content))}</div>`}</div>`}_renderError(){return t`<calcite-notice class="assistant-chat-card-content__error-notice" open icon kind=warning width=auto><div slot=message>${this.content}</div></calcite-notice>`}render(){switch(this.type){case"text":return this._renderText();case"error":return this._renderError();default:return t`<p>Unsupported content type</p>`}}};r("arcgis-assistant-chat-card-content",s);export{s as ArcgisAssistantChatCardContent};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{a as o}from"./FHXNY4QC.js";import"./WBSNYWJJ.js";import{g as a,h as s,n as e,v as n,z as l}from"./ZPGX72R2.js";import"./CFDTXKJ6.js";export default $arcgis.t(([r])=>{var c=a`.assistant-shell__footer-container{display:flex;flex-direction:column;flex:1 1 0;gap:var(--calcite-spacing-md)}.assistant-shell__content-container{display:flex;flex-direction:column;flex:1 1 0;min-height:0;position:relative;overflow:auto}.assistant-shell__suggested-prompts-container{display:flex;justify-content:center;width:100%}.assistant-shell__suggested-prompts{padding:var(--calcite-spacing-md);max-width:100%;box-sizing:border-box}calcite-chip{max-width:100%}.assistant-shell__suggested-prompt{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:normal;cursor:pointer}`,i=class extends n{constructor(){super(...arguments),this._messages=o({blocking:!0}),this.description="",this.loading=!1,this.entryMessageClosed=!1,this.awaitingResponse=!1,this.suggestedPrompts=[],this.inputValue="",this.messages=new r([]),this.arcgisCancel=e(),this.arcgisSubmit=e()}static{this.properties={heading:1,description:1,loading:5,entryMessage:1,entryMessageClosed:5,awaitingResponse:5,suggestedPrompts:0,inputValue:1,status:1,messages:0}}static{this.styles=c}_renderSuggestedPrompts(){return this.suggestedPrompts?.length?s`<div class="assistant-shell__suggested-prompts-container"><calcite-chip-group class="assistant-shell__suggested-prompts" .label=${this._messages.suggestedPromptsLabel??"suggested prompts"}>${this.suggestedPrompts.map(t=>s`<calcite-chip .value=${t} .label=${t} appearance=outline-fill kind=brand @calciteChipSelect=${()=>this.inputValue=t}><div class="assistant-shell__suggested-prompt">${t}</div></calcite-chip>`)}</calcite-chip-group></div>`:null}render(){return s`<calcite-panel .loading=${this.loading} .heading=${this.heading??this._messages.shellHeading} .description=${this.description}><slot slot=header-actions-end name=header-actions-end></slot><div class="assistant-shell__content-container"><slot></slot></div>${this._renderSuggestedPrompts()}<div class="assistant-shell__footer-container" slot=footer><slot name=entry-message>${this.entryMessageClosed?null:s`<calcite-notice slot=entry-message .open=${!this.entryMessageClosed} kind=info closable icon width=full><div slot=message>${this.entryMessage??this._messages.shellEntryMessage}</div></calcite-notice>`}</slot><arcgis-assistant-chat-entry .awaitingResponse=${this.awaitingResponse} .arcgisSubmit=${this.arcgisSubmit} .arcgisCancel=${this.arcgisCancel} .inputValue=${this.inputValue} .status=${this.status} .messages=${this.messages}><slot name=entry-actions-start slot=entry-actions-start></slot></arcgis-assistant-chat-entry><slot name=footer-content></slot></div></calcite-panel>`}};l("arcgis-assistant-shell",i);return i},"core/Collection")
@@ -11,6 +11,7 @@ Choose only from registered agents. Input format will be: {{id: string, name: st
11
11
 
12
12
  Rules:
13
13
 
14
+ - Pay primary attention to the **latest user query** when determining intents. Use the full context only if the latest query explicitly depends on it.
14
15
  - Output 0\u2013{maxIntents} items, ordered for execution.
15
16
  - Do **not** include any labels outside the list above.
16
17
  - Do **not** include "none"; return an empty list instead when unrelated questions like labels, popups, etc.
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{b as e,c as i}from"./OG537NIF.js";import"./CXBXMIVC.js";import"./WBSNYWJJ.js";import{v as s,z as a}from"./ZPGX72R2.js";import"./CFDTXKJ6.js";var t=class extends s{static{this.properties={agent:0,context:0}}async getContext(){return e(this.context)?await this.context():this.context}load(){i(this)}};a("arcgis-assistant-agent",t);export{t as ArcgisAssistantAgent};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{b as r}from"./WBSNYWJJ.js";function c(t,e){return e?typeof e=="string"?u(t,e)??null:e:r(t,"arcgis-map")??null}function u(t,e){let l=e.includes("#")||e.includes(".")||e.includes("["),n=t.getRootNode();return(l?void 0:n.querySelector(`#${e}`))??n.querySelector(e)??void 0}export{c as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{a as $,c as k}from"./WBSNYWJJ.js";import{a as C,b as L,c as m,d as f,e as P,f as O,i as g,j as v,l as w,u as N}from"./26V7SXDR.js";var _=t=>(...s)=>{let o=f(),e=new t(...s),r=e.exports;m(o.at(-1));let n=e.component.manager;n.W(e,r),e.watchExports(n.W.bind(n,e)),P(e);let a=[e.component,...o].reverse();return v(a,i=>i===void 0?void 0:j(e,i,r),r)},j=(t,{host:s,key:o,isReactive:e},r)=>{let n=s,a=n[o]!==t.exports,i=n[o]!==r,c=r!==t.exports;if(a&&!i&&c&&(n[o]=t.exports),s===t.component){if(e){let l=t.component.manager;i&&l.W(t,n[o]),t.onUpdate(u=>{if(u.has(o)){let x=n[o];x!==t.exports&&l.W(t,x)}})}t.O=e?void 0:o}let d=t.component.constructor.elementProperties.get(o)?.readOnly;t.watchExports(()=>{n[o]!==t.exports&&(d?O(()=>{n[o]=t.exports}):n[o]=t.exports)})};var z="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),M=new Set(z),h="en",U={pt:"pt-PT",nb:"no",nn:"no",zh:"zh-CN"},F=async(t,s,o="")=>{let e=`${s}/${o}`,r=`${e}${t}.json`;return b[r]??(b[r]=A(t,e)),await b[r]},b={},A=async(t,s)=>{let o=`${s}${t}.json`;try{let e=await fetch(o);if(e.ok)return await e.json()}catch(e){return g("error","intl",`An unknown error occurred while fetching localization strings at ${o}`,{detail:{error:e}}),{}}return t===h?{}:await A(h,s)},y=t=>{let s=k(t,"lang",globalThis.navigator?.language||h);return{lang:s,t9nLocale:T(s)}},T=t=>{let[s,o]=t.split("-"),e=s.toLowerCase(),r=e;return o&&(r=`${e}-${o.toUpperCase()}`),r=U[r]??r,M.has(r)?r:o?T(e):h},D=(t,s,o,e)=>{let r,n=()=>K(t,s(),e).then(a=>{(r?.lang!==a.lang||r.t9nLocale!==a.t9nLocale||r.t9nStrings!==a.t9nStrings)&&o(a),r=a}).catch(a=>{g("error","intl","Error updating component locale state",{detail:{error:a}})});return queueMicrotask(n),$(t,["lang"],n)},K=async(t,s,o=t.localName.split("-").slice(1).join("-"))=>{let{lang:e,t9nLocale:r}=y(t),n=`${s}/${o}/t9n`,i=o===null?{}:await F(r,n,"messages.");return{lang:e,t9nLocale:r,t9nStrings:i}};var W=t=>I(void 0,t);var E=class extends w{constructor(s,o){super(s);let e=this.exports;try{L(this.component);let r=o(this.component,this),n=this.exports!==e;if(C(r)){n||this.setProvisionalExports(r);let a=r.then(i=>{this.exports=i,super.catchUpLifecycle()}).catch(i=>{this.P.reject(i)});this.onLoad(async()=>await a)}else(!n||r!==void 0)&&(this.exports=r),queueMicrotask(()=>super.catchUpLifecycle())}catch(r){this.P.reject(r)}}catchUpLifecycle(){}},I=_(E);var S=t=>(s={})=>W((o,e)=>{let r=y(o.el),n={_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0},a=o;e.onLifecycle(()=>D(o.el,()=>t("./assets"),({t9nLocale:c,t9nStrings:p,lang:d})=>{let l={...p,_lang:d,_t9nLocale:c,_loading:!1};e.exports=l;let u=p.componentLabel;typeof u=="string"&&"label"in o&&o.label==null&&(o.label??=u),i(a.messageOverrides)},s.name));let i=c=>{let p=e.exports,d=p._original??p,l=V(d,c);c&&(l._original=d),e.exports=l};return"messageOverrides"in a&&e.onUpdate(c=>{c.has("messageOverrides")&&i(a.messageOverrides)}),s.blocking?(e.setProvisionalExports(n,!1),e.ready):n}),V=(t,s)=>{if(!s)return t;let o={...t};return Object.entries(s).forEach(([e,r])=>{t[e]!==void 0&&(typeof r=="object"?o[e]=V(t[e],r):o[e]=r??t[e])}),o};var ct=S(N);export{ct as a};
2
+ import{a as $,c as k}from"./WBSNYWJJ.js";import{A as N,a as C,b as L,c as m,d as f,e as P,f as O,k as g,m as v,o as w}from"./ZPGX72R2.js";var _=t=>(...s)=>{let o=f(),e=new t(...s),r=e.exports;m(o.at(-1));let n=e.component.manager;n.W(e,r),e.watchExports(n.W.bind(n,e)),P(e);let a=[e.component,...o].reverse();return v(a,i=>i===void 0?void 0:j(e,i,r),r)},j=(t,{host:s,key:o,isReactive:e},r)=>{let n=s,a=n[o]!==t.exports,i=n[o]!==r,c=r!==t.exports;if(a&&!i&&c&&(n[o]=t.exports),s===t.component){if(e){let l=t.component.manager;i&&l.W(t,n[o]),t.onUpdate(u=>{if(u.has(o)){let x=n[o];x!==t.exports&&l.W(t,x)}})}t.O=e?void 0:o}let d=t.component.constructor.elementProperties.get(o)?.readOnly;t.watchExports(()=>{n[o]!==t.exports&&(d?O(()=>{n[o]=t.exports}):n[o]=t.exports)})};var z="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),M=new Set(z),h="en",U={pt:"pt-PT",nb:"no",nn:"no",zh:"zh-CN"},F=async(t,s,o="")=>{let e=`${s}/${o}`,r=`${e}${t}.json`;return b[r]??(b[r]=A(t,e)),await b[r]},b={},A=async(t,s)=>{let o=`${s}${t}.json`;try{let e=await fetch(o);if(e.ok)return await e.json()}catch(e){return g("error","intl",`An unknown error occurred while fetching localization strings at ${o}`,{detail:{error:e}}),{}}return t===h?{}:await A(h,s)},y=t=>{let s=k(t,"lang",globalThis.navigator?.language||h);return{lang:s,t9nLocale:T(s)}},T=t=>{let[s,o]=t.split("-"),e=s.toLowerCase(),r=e;return o&&(r=`${e}-${o.toUpperCase()}`),r=U[r]??r,M.has(r)?r:o?T(e):h},D=(t,s,o,e)=>{let r,n=()=>K(t,s(),e).then(a=>{(r?.lang!==a.lang||r.t9nLocale!==a.t9nLocale||r.t9nStrings!==a.t9nStrings)&&o(a),r=a}).catch(a=>{g("error","intl","Error updating component locale state",{detail:{error:a}})});return queueMicrotask(n),$(t,["lang"],n)},K=async(t,s,o=t.localName.split("-").slice(1).join("-"))=>{let{lang:e,t9nLocale:r}=y(t),n=`${s}/${o}/t9n`,i=o===null?{}:await F(r,n,"messages.");return{lang:e,t9nLocale:r,t9nStrings:i}};var W=t=>I(void 0,t);var E=class extends w{constructor(s,o){super(s);let e=this.exports;try{L(this.component);let r=o(this.component,this),n=this.exports!==e;if(C(r)){n||this.setProvisionalExports(r);let a=r.then(i=>{this.exports=i,super.catchUpLifecycle()}).catch(i=>{this.P.reject(i)});this.onLoad(async()=>await a)}else(!n||r!==void 0)&&(this.exports=r),queueMicrotask(()=>super.catchUpLifecycle())}catch(r){this.P.reject(r)}}catchUpLifecycle(){}},I=_(E);var S=t=>(s={})=>W((o,e)=>{let r=y(o.el),n={_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0},a=o;e.onLifecycle(()=>D(o.el,()=>t("./assets"),({t9nLocale:c,t9nStrings:p,lang:d})=>{let l={...p,_lang:d,_t9nLocale:c,_loading:!1};e.exports=l;let u=p.componentLabel;typeof u=="string"&&"label"in o&&o.label==null&&(o.label??=u),i(a.messageOverrides)},s.name));let i=c=>{let p=e.exports,d=p._original??p,l=V(d,c);c&&(l._original=d),e.exports=l};return"messageOverrides"in a&&e.onUpdate(c=>{c.has("messageOverrides")&&i(a.messageOverrides)}),s.blocking?(e.setProvisionalExports(n,!1),e.ready):n}),V=(t,s)=>{if(!s)return t;let o={...t};return Object.entries(s).forEach(([e,r])=>{t[e]!==void 0&&(typeof r=="object"?o[e]=V(t[e],r):o[e]=r??t[e])}),o};var ct=S(N);export{ct as a};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import c from"./ZF5LIGCC.js";import b from"./6Z5UQ3RY.js";import{a as r,c as a}from"./OG537NIF.js";import"./CXBXMIVC.js";import"./WBSNYWJJ.js";import{v as s,z as e}from"./ZPGX72R2.js";import"./CFDTXKJ6.js";export default $arcgis.t(([,{f:i}])=>{var t=class extends s{constructor(){super(...arguments),this.agent=i}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-help-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=r(this,"arcgis-assistant-help-agent"),a(this)}};e("arcgis-assistant-help-agent",t);return t},b,c)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import c from"./ZF5LIGCC.js";import b from"./6Z5UQ3RY.js";import{a as s,c as a}from"./OG537NIF.js";import"./CXBXMIVC.js";import"./WBSNYWJJ.js";import{v as e,z as r}from"./ZPGX72R2.js";import"./CFDTXKJ6.js";export default $arcgis.t(([,{d:i}])=>{var t=class extends e{constructor(){super(...arguments),this.agent=i}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-layer-query-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=s(this,"arcgis-assistant-layer-query-agent"),a(this)}};r("arcgis-assistant-layer-query-agent",t);return t},b,c)
@@ -0,0 +1,3 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{a as h,b as g}from"./2JJGDGMG.js";import{a as d}from"./FHXNY4QC.js";import"./WBSNYWJJ.js";import{g as i,h as t,n as c,t as o,u as n,v as r,z as l}from"./ZPGX72R2.js";import"./CFDTXKJ6.js";export default $arcgis.t(([{watch:p}])=>{var _=i`:host{display:block;container-type:inline-size}.assistant-chat-card__prompt-container{display:flex;align-items:center;gap:var(--calcite-spacing-md);background:color-mix(in srgb,var(--calcite-color-brand) 25%,transparent);color:var(--calcite-color-text-1);padding:var(--calcite-spacing-md);border-radius:var(--calcite-border-radius);width:fit-content;margin-left:auto;justify-content:flex-end}.assistant-chat-card__prompt-avatar{display:flex;align-items:center;justify-content:center}.assistant-chat-card__content-container{display:flex;flex:1;flex-direction:column;width:100%}.assistant-chat-card__response-container{display:flex;flex-direction:column;align-items:flex-start;gap:var(--calcite-spacing-sm);width:100%;text-align:left}.assistant-chat-card__response-icon{padding:var(--calcite-spacing-sm);border-radius:var(--calcite-spacing-xl);background:var(--calcite-color-brand);color:var(--calcite-color-foreground-1)}.assistant-chat-card__footer{display:flex;width:100%;justify-content:space-between;padding:0 var(--calcite-spacing-xxs)}.assistant-chat-card__feedback-actions{display:flex;flex-direction:row;gap:var(--calcite-spacing-xxs)}.assistant-chat-card__log-container{padding:0 var(--calcite-spacing-sm);border-radius:var(--calcite-border-radius);margin-bottom:var(--calcite-spacing-sm)}.assistant-chat-card__log{margin:0;background-color:var(--calcite-color-foreground-1);width:100%;max-height:300px;overflow:auto}.assistant-chat-card__log-entry{margin-left:var(--calcite-spacing-sm);padding:var(--calcite-spacing-xxs) var(--calcite-spacing-lg);border-left:1px solid var(--calcite-color-border-1)}.assistant-chat-card__footer-start,.assistant-chat-card__footer-end{display:flex;gap:var(--calcite-spacing-xxs)}@container (min-width: 480px){.assistant-chat-card__prompt-container,.assistant-chat-card__response-container{max-width:80%}}`,s=class extends r{constructor(){super(...arguments),this._messages=d({blocking:!0}),this._endRef=o(),this._showLog=!1,this.loading=!1,this.feedbackEnabled=!1,this.logEnabled=!1,this.copyEnabled=!1,this.arcgisFeedback=c()}static{this.properties={_showLog:16,_role:16,_content:16,_log:16,_error:16,_feedback:16,loading:5,messageRole:1,feedbackEnabled:5,logEnabled:5,copyEnabled:5,content:1,loadingMessage:1,log:0,error:1,user:1,message:0}}static{this.styles=_}get _role(){return this.message?.role??this.messageRole}get _content(){return this.message?.content??this.content}get _log(){return(this.message?.role==="assistant"?this.message?.log:void 0)??this.log}get _error(){return(this.message?.role==="assistant"?this.message?.error:void 0)??this.error}get _feedback(){return this.message?.role==="assistant"?this.message?.feedback?.positive:void 0}loaded(){this.manager.onLifecycle(()=>[p(()=>this._showLog,()=>this._scrollToEnd())])}_scrollToEnd(){requestAnimationFrame(()=>{this._endRef.value?.scrollIntoView({behavior:"smooth",block:"end"})})}_handleFeedback(a){this.message?.role==="assistant"&&(this.message.feedback=this.message.feedback?.positive===a?void 0:{positive:a},this.arcgisFeedback.emit(this.message),this.requestUpdate())}_renderLog(){return this._log&&this._showLog&&this.logEnabled?t`<div class="assistant-chat-card__log-container"><div class="assistant-chat-card__log"><calcite-accordion appearance=transparent icon-position=start icon-type=chevron scale=s>${this._log.map(a=>{let e=a.includes(`
3
+ `)||a.length>70;return t`<calcite-accordion-item .heading=${e?`${a.substring(0,70)}...`:a} .expanded=${e}><div class="assistant-chat-card__log-entry">${e?h(g(a)):null}</div></calcite-accordion-item>`})}</calcite-accordion></div></div>`:null}_renderThumbsUpButton(){return t`<calcite-action id=action-thumbs-up icon=thumbs-up scale=s .active=${this._feedback===!0} @click=${()=>this._handleFeedback(!0)} text></calcite-action><calcite-tooltip reference-element=action-thumbs-up overlay-positioning=fixed placement=bottom><span>${this._messages.thumbsUpLabel}</span></calcite-tooltip>`}_renderThumbsDownButton(){return t`<calcite-action id=action-thumbs-down icon=thumbs-down scale=s .active=${this._feedback===!1} @click=${()=>this._handleFeedback(!1)} text></calcite-action><calcite-tooltip reference-element=action-thumbs-down overlay-positioning=fixed placement=bottom><span>${this._messages.thumbsDownLabel}</span></calcite-tooltip>`}_renderFeedback(){return this.feedbackEnabled&&!this._error?t`<div class="assistant-chat-card__feedback-actions">${this._renderThumbsUpButton()}${this._renderThumbsDownButton()}</div>`:null}_renderCopyButton(){return!this._error&&this.copyEnabled?t`<calcite-action id=action-copy icon=copy-to-clipboard scale=s @click=${async()=>{try{this._content&&await navigator.clipboard.writeText(this._content)}catch(a){console.error("Failed to copy text to clipboard:",a)}}} text></calcite-action><calcite-tooltip reference-element=action-copy overlay-positioning=fixed placement=bottom><span>${this._messages.copyButtonLabel}</span></calcite-tooltip>`:null}_renderLogButton(){return this._log&&this.logEnabled?t`<calcite-action id=action-log icon=access-string-results scale=s @click=${()=>this._showLog=!this._showLog} .text=${this._messages.logButtonLabel} .active=${this._showLog}></calcite-action><calcite-tooltip reference-element=action-log overlay-positioning=fixed placement=bottom><span>${this._messages.logButtonLabel}</span></calcite-tooltip>`:null}_renderFooter(){return this.loading?null:t`<div class="assistant-chat-card__footer"><div class="assistant-chat-card__footer-start">${this._renderCopyButton()}${this._renderLogButton()}<slot name=footer-actions-start></slot></div><div class="assistant-chat-card__footer-end"><slot name=footer-actions-end></slot>${this._renderFeedback()}</div></div>`}render(){return this._role==="user"?t`<div class="assistant-chat-card__prompt-container"><div>${this._content}</div><div class="assistant-chat-card__prompt-avatar"><calcite-avatar .fullName=${this.user} scale=s></calcite-avatar></div></div>`:t`<div class="assistant-chat-card__response-container"><calcite-icon icon=effects class="assistant-chat-card__response-icon" scale=s></calcite-icon><div class="assistant-chat-card__content-container"><arcgis-assistant-chat-card-content .loading=${this.loading} .loadingMessage=${this.loadingMessage} .type=${this._error?"error":"text"} .content=${this._error??this._content}></arcgis-assistant-chat-card-content>${this._renderLog()}${this._renderFooter()}</div><div ${n(this._endRef)}></div></div>`}};l("arcgis-assistant-chat-card",s);return s},"core/reactiveUtils")
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{a as s}from"./CXBXMIVC.js";import{b as r}from"./WBSNYWJJ.js";function i(e,t){let n=s(e.el,e.referenceElement);if(n)return n;let a=r(e.el,"arcgis-assistant"),o=s(e.el,a?.referenceElement);if(o)return o;throw new Error(`${t}: Reference element not found`)}function g(e,t){let n=i(e,t).view;if(!n)throw new Error(`${t}: Reference element does not have a view`);return n}function l(e){return typeof e=="function"}function m(e){let t=r(e.el,"arcgis-assistant");if(t===void 0)throw new Error("arcgis-assistant-agent must be used within an arcgis-assistant element");t.register({agent:e.agent,getContext:async()=>await e.getContext?.()??e.context??{}})}export{g as a,l as b,m as c};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import c from"./ZF5LIGCC.js";import b from"./6Z5UQ3RY.js";import{a as r,c as e}from"./OG537NIF.js";import"./CXBXMIVC.js";import"./WBSNYWJJ.js";import{v as a,z as s}from"./ZPGX72R2.js";import"./CFDTXKJ6.js";export default $arcgis.t(([,{b:i}])=>{var t=class extends a{constructor(){super(...arguments),this.agent=i}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-data-exploration-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=r(this,"arcgis-assistant-data-exploration-agent"),e(this)}};s("arcgis-assistant-data-exploration-agent",t);return t},b,c)
@@ -14,7 +14,7 @@ Look at the **latest** user message from the chat history.
14
14
  ### Rules
15
15
 
16
16
  - "What layers are in this map?" \u2192 List the layer names
17
- - "What fields are in this layer?" \u2192 List the field names for that layer
17
+ - "What fields are in this layer?" \u2192 Call the tool to list the field names for that layer
18
18
  - "What can you do?" / "What can I ask?" \u2192 Suggest specific queries using EXACT layer and field names from the context above
19
19
  - "Tell me about this map" \u2192 Summarize layers and capabilities
20
20
  - "Create a chart of all wells ans their depth" \u2192 If a question is map related but not supported by available capabilities, say so. Add that support for this might be added in the future.
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{a as k}from"./FHXNY4QC.js";import c from"./6Z5UQ3RY.js";import{a as C}from"./CXBXMIVC.js";import"./WBSNYWJJ.js";import{g as b,h,l as v,n as a,t as u,u as m,v as f,z as w}from"./ZPGX72R2.js";import"./CFDTXKJ6.js";export default $arcgis.t(([S,{whenOnce:I,watch:L,when:P},O,M,{property:p,subclass:x},{y:E}])=>{var R=b`:host{display:block;width:var(--arcgis-internal-panel-width, 100%);height:var(--arcgis-internal-expand-max-height, 100%)}`,A=Object.defineProperty,z=Object.getOwnPropertyDescriptor,l=(c,t,e,i)=>{for(var s=i>1?void 0:i?z(t,e):t,r=c.length-1,n;r>=0;r--)(n=c[r])&&(s=(i?n(t,e,s):n(s))||s);return i&&s&&A(t,e,s),s},o=class extends M{constructor(c){super(c),this.view=null,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 I(()=>!this.view.updating),this._set("orchestrator",await E.init({agents:[...this.agents],view:this.view??void 0})),this.addHandles([L(()=>[this.view,this.agents],()=>void this._initialize())])}clearChatHistory(){this.orchestrator?.newConversation()}async*ask(c,t){if(!this.orchestrator)throw new Error("Orchestrator not initialized yet.");this._set("processing",!0),this._set("processingStep","");let e=[];try{let i=this.orchestrator.ask(c);for await(let s of i){let r=s.runId;if(t?.aborted){yield{type:"cancelled",runId:r};break}switch(s.type){case"trace":{this._set("processingStep",s.data.text),e.push(s.data.text);break}case"completed":{if(!s.result.content.length){yield{type:"completed",error:"Could not process the request.",log:e,runId:r};return}let n=s.result.content;this._set("processingStep",""),yield{type:"completed",response:n,log:e,runId:r};return}case"interrupt":{let{kind:n,message:g,metadata:_}=s.interrupt,d=Array.isArray(_)?[..._]:[],$=(()=>{switch(n){case"booleanChoice":return{type:"boolean-choice",message:g,options:d};case"singleSelection":return{type:"single-select",message:g,options:d};case"multipleSelection":return{type:"multi-select",message:g,options:d};case"textInput":return{type:"text-input",message:g};default:return{type:n,message:g,options:d}}})();this._set("processingStep","Waiting for user input..."),yield{type:"interrupt",payload:$,runId:r};break}case"cancelled":{yield{type:"cancelled",runId:r};return}case"error":{yield{type:"completed",error:s.error.message,log:e,runId:r};return}default:{console.warn("Unknown event type:",s);break}}}}catch(i){console.warn("Error during message processing:",i),yield{type:"completed",error:"An error occurred during message processing.",log:e,runId:"error"};return}finally{this._set("processing",!1)}}};l([p({readOnly:!0})],o.prototype,"orchestrator",2);l([p()],o.prototype,"agents",2);l([p()],o.prototype,"portal",2);l([p()],o.prototype,"view",2);l([p({readOnly:!0})],o.prototype,"loading",2);l([p({readOnly:!0})],o.prototype,"processing",2);l([p({readOnly:!0})],o.prototype,"processingStep",2);o=l([x("OrchestratorController")],o);var H="Embeddings resource 'embeddings-v01.json' not found in the webmap portal item.",j="Embeddings not found for this web map.",F="https://developers.arcgis.com/javascript/latest/agentic-apps/ai-webmap-setup/#embeddings",y=class extends f{constructor(){super(...arguments),this._messages=k({blocking:!0}),this.#t=u(),this.#e=u(),this.#s=null,this.#a=new Map,this.#r=O.getDefault(),this.#i=t=>{t.stopPropagation(),this.arcgisInterruptCancel.emit(),this.orchestrator?.cancelInterrupt(),this._interrupt=null},this.#o=t=>{t.stopPropagation();let e=t.detail;this.arcgisInterruptSubmit.emit(e),this.orchestrator?.resumeInterrupt(e),this._interrupt=null},this.#n=t=>{t.stopPropagation(),this.keepSuggestedPrompts||(this.suggestedPrompts=[]);let e=t.detail;this.arcgisSubmit.emit(e),this.submitMessage(e)},this.#l=t=>{if(t.stopPropagation(),this.arcgisCancel.emit(),this._interrupt){this.orchestrator?.cancelInterrupt(),this._interrupt=null;return}this.#s?.abort()},this.#c=t=>{t.stopPropagation();let e=t.detail;this.arcgisFeedback.emit(e)},this._orchestratorController=null,this._interrupt=null,this._error=null,this.messages=new S([]),this.referenceElement=null,this.suggestedPrompts=[],this.feedbackEnabled=!1,this.keepSuggestedPrompts=!1,this.logEnabled=!1,this.copyEnabled=!1,this.arcgisCancel=a(),this.arcgisError=a(),this.arcgisFeedback=a(),this.arcgisInterrupt=a(),this.arcgisInterruptCancel=a(),this.arcgisInterruptSubmit=a(),this.arcgisReady=a(),this.arcgisSubmit=a()}static{this.properties={_orchestratorController:16,_interrupt:16,_error:16,_user:16,messages:0,orchestrator:32,entryMessage:1,heading:1,description:1,referenceElement:1,suggestedPrompts:0,feedbackEnabled:5,keepSuggestedPrompts:5,logEnabled:5,copyEnabled:5}}static{this.styles=R}#t;#e;#s;#a;#r;#i;#o;#n;#l;#c;async#h(){try{let t=C(this.el,this.referenceElement);await t?.componentOnReady();let e=[...this.#a.values()];return e.length?(this._orchestratorController=new o({agents:e,portal:this.#r,view:t?.view}),await this._orchestratorController.load(),!0):(this._error="No agents found.",!1)}catch(t){return this._error=t?.message??"Error initializing orchestrator.",v(this)(t),!1}}get _user(){return this.#r?.user?.fullName||this.#r?.user?.username}get orchestrator(){return this._orchestratorController?.orchestrator}async clearChatHistory(){this._reset(),this._orchestratorController?.clearChatHistory()}register(t){this.#a.set(t.agent.id,t)}async submitMessage(t){let e=t.trim();if(!e||(this.messages.push({id:Date.now().toString(),role:"user",content:e}),!this._orchestratorController))return;let i=this._orchestratorController.ask(e,this.#s?.signal);for await(let s of i){let r=s.runId;switch(s.type){case"completed":this.messages.push({role:"assistant",content:s.response,log:s.log,error:s.error,id:r});break;case"interrupt":this._interrupt={...s.payload,id:r};break;case"cancelled":this.messages.push({role:"assistant",error:"Request cancelled.",id:r});break}}}load(){this.manager.onLifecycle(this._reset.bind(this))}loaded(){this.manager.onLifecycle(()=>{this.#t.value?.addEventListener("arcgisSubmit",this.#n),this.#t.value?.addEventListener("arcgisCancel",this.#l),this.#t.value?.addEventListener("arcgisFeedback",this.#c);let t=P(()=>!!this._interrupt&&!!this.#e.value,()=>{let e=this.#e.value;e.removeEventListener("arcgisSubmit",this.#o),e.removeEventListener("arcgisCancel",this.#i),e.addEventListener("arcgisSubmit",this.#o,{once:!0}),e.addEventListener("arcgisCancel",this.#i,{once:!0}),this._interrupt&&this.arcgisInterrupt.emit(this._interrupt)});return queueMicrotask(()=>{this.#h().then(e=>{e?this.arcgisReady.emit():this._error&&this.arcgisError.emit(new Error(this._error))})}),()=>{t.remove(),this.#e.value?.removeEventListener("arcgisSubmit",this.#o),this.#e.value?.removeEventListener("arcgisCancel",this.#i),this.#t.value?.removeEventListener("arcgisSubmit",this.#n),this.#t.value?.removeEventListener("arcgisCancel",this.#l),this.#t.value?.removeEventListener("arcgisFeedback",this.#c),this._orchestratorController?.destroy(),this._orchestratorController=null}})}_reset(){this.#s?.abort(),this._interrupt=null,this.messages.removeAll(),this._error=null}_renderErrorNotice(){return this._error?h`<calcite-notice closable slot=entry-message open kind=danger icon width=full>${this._error===H?h`<div slot=message>${j}</div><calcite-link slot=link .href=${F} target=_blank title="Learn about web map embeddings">Read more</calcite-link>`:h`<div slot=message>${this._error}</div>`}</calcite-notice>`:null}render(){return h`<arcgis-assistant-shell .loading=${!this._orchestratorController&&!this._error||this._orchestratorController?.loading} .heading=${this.heading??this._messages.assistantLabel} .description=${this.description} .entryMessage=${this.entryMessage} .entryMessageClosed=${this.messages.length>0} .awaitingResponse=${this._orchestratorController?.processing} .suggestedPrompts=${this.suggestedPrompts} .messages=${this.messages} ${m(this.#t)}>${this._renderErrorNotice()}${this._interrupt?h`<arcgis-assistant-interrupt slot=entry-message .type=${this._interrupt.type} .message=${this._interrupt.message} .options=${this._interrupt.options} ${m(this.#e)}></arcgis-assistant-interrupt>`:null}<arcgis-assistant-chat .loading=${this._orchestratorController?.processing} .loadingMessage=${this._orchestratorController?.processingStep||""} .messages=${this.messages} .user=${this._user} .feedbackEnabled=${this.feedbackEnabled} .logEnabled=${this.logEnabled} .copyEnabled=${this.copyEnabled}><slot></slot></arcgis-assistant-chat><slot name=header-actions-end slot=header-actions-end></slot>${this.entryMessage?null:h`<slot name=entry-message slot=entry-message></slot>`}<slot name=entry-actions-start slot=entry-actions-start></slot><slot name=footer-content slot=footer-content></slot></arcgis-assistant-shell>`}};w("arcgis-assistant",y);return y},"core/Collection","core/reactiveUtils","portal/Portal","core/Accessor","core/accessorSupport/decorators",c)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{a as v}from"./FHXNY4QC.js";import"./WBSNYWJJ.js";import{g as u,h as i,n as r,t as d,u as p,v as g,x as m,z as y}from"./ZPGX72R2.js";import"./CFDTXKJ6.js";export default $arcgis.t(([{watch:_},f])=>{var w=u`.assistant-chat-entry__input-container{display:flex;flex-direction:column}.assistant-chat-entry__footer-start{display:flex;gap:var(--calcite-spacing-md);flex-wrap:wrap;align-items:center}.assistant-chat-entry__footer-end{display:flex;gap:var(--calcite-spacing-md);align-items:center}.assistant-chat-entry__status-indicator{width:9px;height:9px;border-radius:100%;background-color:var(--calcite-color-status-success)}.assistant-chat-entry__status-indicator[data-status=working]{background-color:var(--calcite-color-status-warning)}.assistant-chat-entry__status-indicator[data-status=error]{background-color:var(--calcite-color-status-danger)}.assistant-chat-entry__status-text{text-transform:capitalize}`,n=class extends g{constructor(){super(...arguments),this.#s=d(),this.#t=-1,this.#a="",this._messages=v({blocking:!0}),this.keyboardShortcutsDisabled=!1,this.awaitingResponse=!1,this.inputValue="",this.messages=new f([]),this.arcgisCancel=r(),this.arcgisSubmit=r()}static{this.properties={_userMessages:16,keyboardShortcutsDisabled:5,entryPlaceholder:1,awaitingResponse:5,inputValue:1,status:1,messages:0}}static{this.styles=w}#s;#t;#a;get _userMessages(){return this.messages.toArray().filter(t=>t.role==="user").map(({content:t})=>t)}loaded(){this.manager.onLifecycle(()=>[_(()=>this.inputValue,t=>{this.#s.value&&(this.#s.value.value=t)},{initial:!0})])}async _submitMessage(){if(this.awaitingResponse){this.arcgisCancel.emit();return}let t=this.#s.value?.value.trim();t&&(this.arcgisSubmit.emit(t),this.#t=-1,this.#a="",this.#s.value&&(this.#s.value.value="",await this.#s.value.setFocus()))}async _navigateHistory(t,o){let s=this.#s.value;if(!s)return;let a=this._userMessages;if(a.length===0)return;let c=s.value??"",l=s.shadowRoot?.querySelector("textarea"),e=l?.selectionStart,h=l?.selectionEnd;if(!(e==null||h==null)&&!(e!==h||t==="up"&&e!==0||t==="down"&&e!==c.length)){if(t==="up"){this.#t===-1?(this.#a=c,this.#t=a.length-1):this.#t=Math.max(0,this.#t-1),s.value=a[this.#t]??"",o.preventDefault();return}this.#t!==-1&&(this.#t<a.length-1?(this.#t+=1,s.value=a[this.#t]??""):(this.#t=-1,s.value=this.#a),o.preventDefault())}}render(){return i`<div class="assistant-chat-entry__input-container"><calcite-text-area .value=${this.#s.value?.value} .placeholder=${this.entryPlaceholder??this._messages.entryPlaceholder} resize=vertical @keydown=${async t=>{t.altKey||t.ctrlKey||t.metaKey||t.shiftKey||this.keyboardShortcutsDisabled||(t.key==="Enter"?(t.preventDefault(),await this._submitMessage()):t.key==="ArrowUp"?await this._navigateHistory("up",t):t.key==="ArrowDown"&&await this._navigateHistory("down",t))}} ${p(this.#s)}><div slot=footer-start class="assistant-chat-entry__footer-start"><slot name=entry-actions-start></slot></div><div slot=footer-end class="assistant-chat-entry__footer-end">${this.status?i`<div id=tooltip-status class="assistant-chat-entry__status-indicator" data-status=${this.status??m}></div><calcite-tooltip reference-element=tooltip-status offset-distance=12><span class="assistant-chat-entry__status-text">${this.status}</span></calcite-tooltip>`:null}<calcite-button .iconStart=${this.awaitingResponse?"circle-stop":"send"} slot=footer-end round @click=${()=>void this._submitMessage()}>${this.awaitingResponse?this._messages.stopButtonLabel:this._messages.askButtonLabel}</calcite-button></div></calcite-text-area></div>`}};y("arcgis-assistant-chat-entry",n);return n},"core/reactiveUtils","core/Collection")
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import c from"./ZF5LIGCC.js";import b from"./6Z5UQ3RY.js";import{a as e,c as a}from"./OG537NIF.js";import"./CXBXMIVC.js";import"./WBSNYWJJ.js";import{v as s,z as r}from"./ZPGX72R2.js";import"./CFDTXKJ6.js";export default $arcgis.t(([,{e:i}])=>{var t=class extends s{constructor(){super(...arguments),this.agent=i}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-layer-styling-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=e(this,"arcgis-assistant-layer-styling-agent"),a(this)}};r("arcgis-assistant-layer-styling-agent",t);return t},b,c)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{a as n}from"./FHXNY4QC.js";import"./WBSNYWJJ.js";import{g as a,h as e,n as s,v as c,z as l}from"./ZPGX72R2.js";import"./CFDTXKJ6.js";var o=a``,i=class extends c{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 null;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.type==="boolean-choice"?!0:this.#t)}>${this._messages.submitButtonLabel}</calcite-button></calcite-panel>`}};l("arcgis-assistant-interrupt",i);export{i as ArcgisAssistantInterrupt};
@@ -29,6 +29,20 @@ Validator: Before producing output, verify every field used exists in the listed
29
29
 
30
30
  Use the most recent relevant user question from the chat history. The question will **not** be restated again here. Start with a fresh WHERE clause for each question - do not inherit filters from previous questions unless user explicitly asks to combine them.
31
31
 
32
+ ### Rules for generating where clause SQL expressions:
33
+
34
+ - Use only the field\u2019s **\`name\`** in the output expression.
35
+ - Use metadata (\`alias\`, \`description\`, \`statistics\`) only to help understand the user's meaning \u2014 not in the syntax.
36
+ - Use field \`type\` to choose appropriate operators:
37
+ - **String** \u2192 \`LIKE '%value%'\`, \`=\`, \`IN (...)\` (prefer \`LIKE\` over \`=\`)
38
+ - **Number/Date** \u2192 \`=\`, \`<\`, \`>\`, \`BETWEEN\`, etc.
39
+ - Use fields with the **highest \`relevanceScore\`**.
40
+ - DO NOT use subqueries or \`SELECT\` keyword.
41
+ - Combine conditions with \`AND\`, \`OR\`, or \`NOT\` as appropriate.
42
+ - **Coded-value domain fields** \u2192 Always use the numeric/string **code** in WHERE clauses, never the domain name. Domain values are listed under each field as \`code=name\` pairs
43
+ - **Range domain fields** \u2192 Use the listed min/max as valid bounds for comparisons.
44
+ - If no meaningful layer filter can be generated, do not call a tool.
45
+
32
46
  ### Mixed Questions
33
47
 
34
48
  If a question has both aggregate and display components (e.g., "How many wells have depth > 100? Show them"):
@@ -6,6 +6,8 @@ You are an assistant that classifies user intent for navigation agent.
6
6
  You are given the following tool options:
7
7
  {tools}
8
8
 
9
+ Bookmarks: {bookmarks}
10
+
9
11
  Use the most recent relevant user question from the chat history. The question will **not** be restated again here.
10
12
 
11
13
  Return exactly one intent (tool name) based on the user's request.
@@ -13,5 +15,18 @@ If none apply, return an **empty string**.
13
15
 
14
16
  Choose only from provided tools.
15
17
 
18
+ ## Note:
19
+
20
+ This is the order of preference in case of overlap:
21
+
22
+ 1. Bookmark (if exists)
23
+ 2. Feature (if exists)
24
+ 3. Geocode / Address
25
+
26
+ For example, "Where is Yosemite National Park". This is an address, but:
27
+ A map that contains a bookmark with Yosemite National Park should prefer the bookmark.
28
+ A map that has the National Parks layer, for example, should prefer the feature.
29
+ If these do not exist, geocode and go to that address.
30
+
16
31
  Return the name of the tool as a string.
17
32
  `;export{e as default};
@@ -0,0 +1,47 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import"./CFDTXKJ6.js";var e=`## Task: Summarize Geographic Features
3
+
4
+ You are given features from ArcGIS Feature layer for multiple layers:
5
+ {queryResponse}
6
+
7
+ Also consider any **relevant context from the chat history**, such as user questions or instructions.
8
+
9
+ ### Your goal:
10
+
11
+ 1. If the user question is about a **specific calculation** (e.g., average, total, count, min, max), return only the **direct numeric answer** \u2014 short and clear.
12
+ - Example: \u201CThe average price is $4.00.\u201D
13
+
14
+ 2. If the question is more general or there are **multiple features with varying attributes**, write a **brief summary** (2\u20133 sentences max) that highlights key patterns or insights.
15
+
16
+ 3. The response can be per layer, or summarize based on the question.
17
+
18
+ 4. DO NOT ramble.
19
+
20
+ 5. If a \`geometryFilter\` is used, do NOT assume the feature referenced in that geometry (e.g., "ApplicationNumber = 'XYZ'") must appear in the results. It may only be used as a spatial anchor.
21
+
22
+ Only describe what _was_ found \u2014 not what was _used to search_.
23
+
24
+ 6. If no feature \`attributes\` are returned but \`totalCount\` is present, assume the spatial filter was applied correctly. There is no need to say the subset was not returned \u2014 just summarize based on the count and available context.
25
+
26
+ 7. Do not give suggestions like exporting the results as the tools are not capable to do that.
27
+
28
+ 8. Use bullet points for lists and use new lines (\\n) and appropriate formatting in your response.
29
+
30
+ 9. Do NOT say things like "I can't change the map", "I can't highlight features", or suggest WHERE clauses for the user to run manually. A separate system handles map visualization automatically after this step. Your job is ONLY to summarize the data returned by the query.
31
+
32
+ In all cases:
33
+
34
+ - Focus on **notable attribute values**, **commonalities or differences**, and **interesting trends**.
35
+ - If the feature list is empty or not meaningful, state that clearly.
36
+
37
+ ### STRICT OUTPUT RULES
38
+
39
+ - Do NOT ask follow-up questions.
40
+ - Do NOT offer additional actions or suggestions.
41
+ - Do NOT explain what you can do next.
42
+ - Do NOT add conversational phrases.
43
+ - Do NOT add any text beyond the requested summary or numeric answer.
44
+ - End the response immediately after the summary.
45
+ - Do NOT include introductory phrases (e.g., "Found", "Here are", "The results show").
46
+ - Do NOT restate the user\u2019s question.
47
+ `;export{e as default};
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import c from"./ZF5LIGCC.js";import b from"./6Z5UQ3RY.js";import{a as i,c as e}from"./OG537NIF.js";import"./CXBXMIVC.js";import"./WBSNYWJJ.js";import{v as a,z as s}from"./ZPGX72R2.js";import"./CFDTXKJ6.js";export default $arcgis.t(([,{a:r}])=>{var t=class extends a{constructor(){super(...arguments),this.agent=r}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-navigation-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=i(this,"arcgis-assistant-navigation-agent"),e(this)}};s("arcgis-assistant-navigation-agent",t);return t},b,c)
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import c from"./ZF5LIGCC.js";import b from"./6Z5UQ3RY.js";import{a as s,c as a}from"./OG537NIF.js";import"./CXBXMIVC.js";import"./WBSNYWJJ.js";import{v as r,z as e}from"./ZPGX72R2.js";import"./CFDTXKJ6.js";export default $arcgis.t(([,{c:i}])=>{var t=class extends r{constructor(){super(...arguments),this.agent=i}static{this.properties={referenceElement:1}}#t;getContext(){if(!this.#t)throw new Error("arcgis-assistant-layer-filter-agent requires a mapView");return{mapView:this.#t}}load(){this.#t=s(this,"arcgis-assistant-layer-filter-agent"),a(this)}};e("arcgis-assistant-layer-filter-agent",t);return t},b,c)
@@ -1,9 +1,9 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
2
  import"./CFDTXKJ6.js";var e=`# ArcGIS Online Map Viewer \u2014 Layer Filter Tool Calling Assistant
3
3
 
4
- You are an assistant that helps generate layer filter expressions for **ArcGIS Online Map Viewer** by selecting and calling the appropriate tool.
4
+ You are an assistant that helps manage layer filters and visual effects for **ArcGIS Online Map Viewer** by selecting and calling the appropriate tool.
5
5
 
6
- CRITICAL: You MUST make exactly ONE tool call. You are FORBIDDEN from making zero or multiple tool calls. Even if the question has been answered, you need to filter the features.
6
+ You may make **zero or one** tool call based on the user's request.
7
7
 
8
8
  ## You are given:
9
9
 
@@ -18,6 +18,9 @@ FieldInfo:
18
18
  - \`description\`: optional field metadata
19
19
  - \`statistics\`: such as min, max, unique values, etc.
20
20
 
21
+ This is what the query tool returned:
22
+ {queryResponse}
23
+
21
24
  ## Your task
22
25
 
23
26
  1. Analyze the user's request and the provided layer and field information.
@@ -26,6 +29,26 @@ FieldInfo:
26
29
 
27
30
  The tool will apply the provided WHERE clause to the layer in the map viewer.
28
31
 
32
+ ## When to call a tool
33
+
34
+ ALWAYS call a tool to visually highlight features on the map when:
35
+
36
+ - The user asked to "show", "find", "locate", or "where is" something
37
+ - The user asked a question that identifies specific features (e.g., "which has the highest...?", "find all X that are Y")
38
+ - The user wants to clear or rest filters of the map
39
+
40
+ The purpose is to visually emphasize the relevant features on the map so the user can
41
+ see them.
42
+
43
+ ### No tool call
44
+
45
+ Make no tool call when:
46
+
47
+ - The query returned zero features
48
+ - The user asked a pure aggregate/statistical question (e.g., "what is the average?", "how many total?")
49
+ - No meaningful filter can be generated
50
+ - The user's question was fully answered by the query step with no need for map interaction
51
+
29
52
  ### Rules for generating Layer Filter expressions:
30
53
 
31
54
  - Use only the field\u2019s **\`name\`** in the output expression.
@@ -36,8 +59,17 @@ The tool will apply the provided WHERE clause to the layer in the map viewer.
36
59
  - Use fields with the **highest \`relevanceScore\`**.
37
60
  - DO NOT use subqueries or \`SELECT\` keyword.
38
61
  - Combine conditions with \`AND\`, \`OR\`, or \`NOT\` as appropriate.
62
+ - **Coded-value domain fields** \u2192 Always use the numeric/string **code** in WHERE clauses, never the domain name. Domain values are listed under each field as \`code=name\` pairs
63
+ - **Range domain fields** \u2192 Use the listed min/max as valid bounds for comparisons.
39
64
  - If no meaningful layer filter can be generated, do not call a tool.
40
65
 
66
+ ## Top N / Ranked queries
67
+
68
+ When the query response includes \`objectIds\` and \`objectIdField\`, use them:
69
+ {{objectIdField}} IN (id1, id2, id3, ...)
70
+
71
+ This ensures ONLY the exact features from the query get the effect.
72
+
41
73
  ## SQL-92 Date/Time Syntax
42
74
 
43
75
  User timezone: {userTimezone} ({userTimezoneOffset})
@@ -48,7 +80,7 @@ To convert: if offset is \`-08:00\`, add 8 hours. If \`-05:00\`, add 5 hours.
48
80
 
49
81
  Format: \`TIMESTAMP 'YYYY-MM-DD HH:MM:SS'\`
50
82
 
51
- ## RULES
83
+ ## Geometry and Spatial Queries (for setFeatureEffect)
52
84
 
53
85
  When dealing with geometry and proximity and spatial queries:
54
86