@arcgis/ai-components 5.0.0-next.163 → 5.0.0-next.165

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.
@@ -0,0 +1,67 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
+ import{i as Ae,j as ae,q as Se,r as Te,s as Re}from"./XJBDOKVO.js";var F=class extends Re{constructor(t){if(super(t),this.it=ae,t.type!==Se.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===ae||t==null)return this._t=void 0,this.it=t;if(t===Ae)return t;if(typeof t!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this._t;this.it=t;let r=[t];return r.raw=r,this._t={_$litType$:this.constructor.resultType,strings:r,values:[]}}};F.directiveName="unsafeHTML",F.resultType=1;var Kr=Te(F);var U=function(){return U=Object.assign||function(t){for(var r,s=1,n=arguments.length;s<n;s++){r=arguments[s];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},U.apply(this,arguments)},le={exports:{}},x={},oe={exports:{}},E={};function ze(){var e={};return e["align-content"]=!1,e["align-items"]=!1,e["align-self"]=!1,e["alignment-adjust"]=!1,e["alignment-baseline"]=!1,e.all=!1,e["anchor-point"]=!1,e.animation=!1,e["animation-delay"]=!1,e["animation-direction"]=!1,e["animation-duration"]=!1,e["animation-fill-mode"]=!1,e["animation-iteration-count"]=!1,e["animation-name"]=!1,e["animation-play-state"]=!1,e["animation-timing-function"]=!1,e.azimuth=!1,e["backface-visibility"]=!1,e.background=!0,e["background-attachment"]=!0,e["background-clip"]=!0,e["background-color"]=!0,e["background-image"]=!0,e["background-origin"]=!0,e["background-position"]=!0,e["background-repeat"]=!0,e["background-size"]=!0,e["baseline-shift"]=!1,e.binding=!1,e.bleed=!1,e["bookmark-label"]=!1,e["bookmark-level"]=!1,e["bookmark-state"]=!1,e.border=!0,e["border-bottom"]=!0,e["border-bottom-color"]=!0,e["border-bottom-left-radius"]=!0,e["border-bottom-right-radius"]=!0,e["border-bottom-style"]=!0,e["border-bottom-width"]=!0,e["border-collapse"]=!0,e["border-color"]=!0,e["border-image"]=!0,e["border-image-outset"]=!0,e["border-image-repeat"]=!0,e["border-image-slice"]=!0,e["border-image-source"]=!0,e["border-image-width"]=!0,e["border-left"]=!0,e["border-left-color"]=!0,e["border-left-style"]=!0,e["border-left-width"]=!0,e["border-radius"]=!0,e["border-right"]=!0,e["border-right-color"]=!0,e["border-right-style"]=!0,e["border-right-width"]=!0,e["border-spacing"]=!0,e["border-style"]=!0,e["border-top"]=!0,e["border-top-color"]=!0,e["border-top-left-radius"]=!0,e["border-top-right-radius"]=!0,e["border-top-style"]=!0,e["border-top-width"]=!0,e["border-width"]=!0,e.bottom=!1,e["box-decoration-break"]=!0,e["box-shadow"]=!0,e["box-sizing"]=!0,e["box-snap"]=!0,e["box-suppress"]=!0,e["break-after"]=!0,e["break-before"]=!0,e["break-inside"]=!0,e["caption-side"]=!1,e.chains=!1,e.clear=!0,e.clip=!1,e["clip-path"]=!1,e["clip-rule"]=!1,e.color=!0,e["color-interpolation-filters"]=!0,e["column-count"]=!1,e["column-fill"]=!1,e["column-gap"]=!1,e["column-rule"]=!1,e["column-rule-color"]=!1,e["column-rule-style"]=!1,e["column-rule-width"]=!1,e["column-span"]=!1,e["column-width"]=!1,e.columns=!1,e.contain=!1,e.content=!1,e["counter-increment"]=!1,e["counter-reset"]=!1,e["counter-set"]=!1,e.crop=!1,e.cue=!1,e["cue-after"]=!1,e["cue-before"]=!1,e.cursor=!1,e.direction=!1,e.display=!0,e["display-inside"]=!0,e["display-list"]=!0,e["display-outside"]=!0,e["dominant-baseline"]=!1,e.elevation=!1,e["empty-cells"]=!1,e.filter=!1,e.flex=!1,e["flex-basis"]=!1,e["flex-direction"]=!1,e["flex-flow"]=!1,e["flex-grow"]=!1,e["flex-shrink"]=!1,e["flex-wrap"]=!1,e.float=!1,e["float-offset"]=!1,e["flood-color"]=!1,e["flood-opacity"]=!1,e["flow-from"]=!1,e["flow-into"]=!1,e.font=!0,e["font-family"]=!0,e["font-feature-settings"]=!0,e["font-kerning"]=!0,e["font-language-override"]=!0,e["font-size"]=!0,e["font-size-adjust"]=!0,e["font-stretch"]=!0,e["font-style"]=!0,e["font-synthesis"]=!0,e["font-variant"]=!0,e["font-variant-alternates"]=!0,e["font-variant-caps"]=!0,e["font-variant-east-asian"]=!0,e["font-variant-ligatures"]=!0,e["font-variant-numeric"]=!0,e["font-variant-position"]=!0,e["font-weight"]=!0,e.grid=!1,e["grid-area"]=!1,e["grid-auto-columns"]=!1,e["grid-auto-flow"]=!1,e["grid-auto-rows"]=!1,e["grid-column"]=!1,e["grid-column-end"]=!1,e["grid-column-start"]=!1,e["grid-row"]=!1,e["grid-row-end"]=!1,e["grid-row-start"]=!1,e["grid-template"]=!1,e["grid-template-areas"]=!1,e["grid-template-columns"]=!1,e["grid-template-rows"]=!1,e["hanging-punctuation"]=!1,e.height=!0,e.hyphens=!1,e.icon=!1,e["image-orientation"]=!1,e["image-resolution"]=!1,e["ime-mode"]=!1,e["initial-letters"]=!1,e["inline-box-align"]=!1,e["justify-content"]=!1,e["justify-items"]=!1,e["justify-self"]=!1,e.left=!1,e["letter-spacing"]=!0,e["lighting-color"]=!0,e["line-box-contain"]=!1,e["line-break"]=!1,e["line-grid"]=!1,e["line-height"]=!1,e["line-snap"]=!1,e["line-stacking"]=!1,e["line-stacking-ruby"]=!1,e["line-stacking-shift"]=!1,e["line-stacking-strategy"]=!1,e["list-style"]=!0,e["list-style-image"]=!0,e["list-style-position"]=!0,e["list-style-type"]=!0,e.margin=!0,e["margin-bottom"]=!0,e["margin-left"]=!0,e["margin-right"]=!0,e["margin-top"]=!0,e["marker-offset"]=!1,e["marker-side"]=!1,e.marks=!1,e.mask=!1,e["mask-box"]=!1,e["mask-box-outset"]=!1,e["mask-box-repeat"]=!1,e["mask-box-slice"]=!1,e["mask-box-source"]=!1,e["mask-box-width"]=!1,e["mask-clip"]=!1,e["mask-image"]=!1,e["mask-origin"]=!1,e["mask-position"]=!1,e["mask-repeat"]=!1,e["mask-size"]=!1,e["mask-source-type"]=!1,e["mask-type"]=!1,e["max-height"]=!0,e["max-lines"]=!1,e["max-width"]=!0,e["min-height"]=!0,e["min-width"]=!0,e["move-to"]=!1,e["nav-down"]=!1,e["nav-index"]=!1,e["nav-left"]=!1,e["nav-right"]=!1,e["nav-up"]=!1,e["object-fit"]=!1,e["object-position"]=!1,e.opacity=!1,e.order=!1,e.orphans=!1,e.outline=!1,e["outline-color"]=!1,e["outline-offset"]=!1,e["outline-style"]=!1,e["outline-width"]=!1,e.overflow=!1,e["overflow-wrap"]=!1,e["overflow-x"]=!1,e["overflow-y"]=!1,e.padding=!0,e["padding-bottom"]=!0,e["padding-left"]=!0,e["padding-right"]=!0,e["padding-top"]=!0,e.page=!1,e["page-break-after"]=!1,e["page-break-before"]=!1,e["page-break-inside"]=!1,e["page-policy"]=!1,e.pause=!1,e["pause-after"]=!1,e["pause-before"]=!1,e.perspective=!1,e["perspective-origin"]=!1,e.pitch=!1,e["pitch-range"]=!1,e["play-during"]=!1,e.position=!1,e["presentation-level"]=!1,e.quotes=!1,e["region-fragment"]=!1,e.resize=!1,e.rest=!1,e["rest-after"]=!1,e["rest-before"]=!1,e.richness=!1,e.right=!1,e.rotation=!1,e["rotation-point"]=!1,e["ruby-align"]=!1,e["ruby-merge"]=!1,e["ruby-position"]=!1,e["shape-image-threshold"]=!1,e["shape-outside"]=!1,e["shape-margin"]=!1,e.size=!1,e.speak=!1,e["speak-as"]=!1,e["speak-header"]=!1,e["speak-numeral"]=!1,e["speak-punctuation"]=!1,e["speech-rate"]=!1,e.stress=!1,e["string-set"]=!1,e["tab-size"]=!1,e["table-layout"]=!1,e["text-align"]=!0,e["text-align-last"]=!0,e["text-combine-upright"]=!0,e["text-decoration"]=!0,e["text-decoration-color"]=!0,e["text-decoration-line"]=!0,e["text-decoration-skip"]=!0,e["text-decoration-style"]=!0,e["text-emphasis"]=!0,e["text-emphasis-color"]=!0,e["text-emphasis-position"]=!0,e["text-emphasis-style"]=!0,e["text-height"]=!0,e["text-indent"]=!0,e["text-justify"]=!0,e["text-orientation"]=!0,e["text-overflow"]=!0,e["text-shadow"]=!0,e["text-space-collapse"]=!0,e["text-transform"]=!0,e["text-underline-position"]=!0,e["text-wrap"]=!0,e.top=!1,e.transform=!1,e["transform-origin"]=!1,e["transform-style"]=!1,e.transition=!1,e["transition-delay"]=!1,e["transition-duration"]=!1,e["transition-property"]=!1,e["transition-timing-function"]=!1,e["unicode-bidi"]=!1,e["vertical-align"]=!1,e.visibility=!1,e["voice-balance"]=!1,e["voice-duration"]=!1,e["voice-family"]=!1,e["voice-pitch"]=!1,e["voice-range"]=!1,e["voice-rate"]=!1,e["voice-stress"]=!1,e["voice-volume"]=!1,e.volume=!1,e["white-space"]=!1,e.widows=!1,e.width=!0,e["will-change"]=!1,e["word-break"]=!0,e["word-spacing"]=!0,e["word-wrap"]=!0,e["wrap-flow"]=!1,e["wrap-through"]=!1,e["writing-mode"]=!1,e["z-index"]=!1,e}function pt(e,t,r){}function ft(e,t,r){}var ht=/javascript\s*\:/img;function gt(e,t){return ht.test(t)?"":t}E.whiteList=ze();E.getDefaultWhiteList=ze;E.onAttr=pt;E.onIgnoreAttr=ft;E.safeAttrValue=gt;var dt={indexOf:function(e,t){var r,s;if(Array.prototype.indexOf)return e.indexOf(t);for(r=0,s=e.length;r<s;r++)if(e[r]===t)return r;return-1},forEach:function(e,t,r){var s,n;if(Array.prototype.forEach)return e.forEach(t,r);for(s=0,n=e.length;s<n;s++)t.call(r,e[s],s,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(e){return String.prototype.trimRight?e.trimRight():e.replace(/(\s*$)/g,"")}},N=dt;function kt(e,t){e=N.trimRight(e),e[e.length-1]!==";"&&(e+=";");var r=e.length,s=!1,n=0,i=0,a="";function o(){if(!s){var c=N.trim(e.slice(n,i)),p=c.indexOf(":");if(p!==-1){var f=N.trim(c.slice(0,p)),h=N.trim(c.slice(p+1));if(f){var g=t(n,a.length,f,h,c);g&&(a+=g+"; ")}}}n=i+1}for(;i<r;i++){var l=e[i];if(l==="/"&&e[i+1]==="*"){var u=e.indexOf("*/",i+2);if(u===-1)break;i=u+1,n=i+1,s=!1}else l==="("?s=!0:l===")"?s=!1:l===";"?s||o():l===`
3
+ `&&o()}return N.trim(a)}var bt=kt,Z=E,xt=bt;function $e(e){return e==null}function mt(e){var t={};for(var r in e)t[r]=e[r];return t}function Ce(e){e=mt(e||{}),e.whiteList=e.whiteList||Z.whiteList,e.onAttr=e.onAttr||Z.onAttr,e.onIgnoreAttr=e.onIgnoreAttr||Z.onIgnoreAttr,e.safeAttrValue=e.safeAttrValue||Z.safeAttrValue,this.options=e}Ce.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,r=t.options,s=r.whiteList,n=r.onAttr,i=r.onIgnoreAttr,a=r.safeAttrValue,o=xt(e,function(l,u,c,p,f){var h=s[c],g=!1;if(h===!0?g=h:typeof h=="function"?g=h(p):h instanceof RegExp&&(g=h.test(p)),g!==!0&&(g=!1),p=a(c,p),!!p){var b={position:u,sourcePosition:l,source:f,isWhite:g};if(g){var m=n(c,p,b);return $e(m)?c+":"+p:m}else{var m=i(c,p,b);if(!$e(m))return m}}});return o};var wt=Ce;(function(e,t){var r=E,s=wt;function n(a,o){var l=new s(o);return l.process(a)}t=e.exports=n,t.FilterCSS=s;for(var i in r)t[i]=r[i]})(oe,oe.exports);var ce=oe.exports,ue={indexOf:function(e,t){var r,s;if(Array.prototype.indexOf)return e.indexOf(t);for(r=0,s=e.length;r<s;r++)if(e[r]===t)return r;return-1},forEach:function(e,t,r){var s,n;if(Array.prototype.forEach)return e.forEach(t,r);for(s=0,n=e.length;s<n;s++)t.call(r,e[s],s,e)},trim:function(e){return String.prototype.trim?e.trim():e.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(e){var t=/\s|\n|\t/,r=t.exec(e);return r?r.index:-1}},yt=ce.FilterCSS,vt=ce.getDefaultWhiteList,J=ue;function Pe(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","crossorigin","loop","muted","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],figcaption:[],figure:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],summary:[],sup:[],strong:[],strike:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","crossorigin","loop","muted","playsinline","poster","preload","src","height","width"]}}var Ie=new yt;function At(e,t,r){}function St(e,t,r){}function Tt(e,t,r){}function Rt(e,t,r){}function Oe(e){return e.replace(Lt,"&lt;").replace(_t,"&gt;")}function $t(e,t,r,s){if(r=Ve(r),t==="href"||t==="src"){if(r=J.trim(r),r==="#")return"#";if(!(r.substr(0,7)==="http://"||r.substr(0,8)==="https://"||r.substr(0,7)==="mailto:"||r.substr(0,4)==="tel:"||r.substr(0,11)==="data:image/"||r.substr(0,6)==="ftp://"||r.substr(0,2)==="./"||r.substr(0,3)==="../"||r[0]==="#"||r[0]==="/"))return""}else if(t==="background"){if(j.lastIndex=0,j.test(r))return""}else if(t==="style"){if(Le.lastIndex=0,Le.test(r)||(_e.lastIndex=0,_e.test(r)&&(j.lastIndex=0,j.test(r))))return"";s!==!1&&(s=s||Ie,r=s.process(r))}return r=Me(r),r}var Lt=/</g,_t=/>/g,Et=/"/g,zt=/&quot;/g,Ct=/&#([a-zA-Z0-9]*);?/gim,Pt=/&colon;?/gim,It=/&newline;?/gim,j=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a):/gi,Le=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,_e=/u\s*r\s*l\s*\(.*/gi;function qe(e){return e.replace(Et,"&quot;")}function Be(e){return e.replace(zt,'"')}function De(e){return e.replace(Ct,function(r,s){return s[0]==="x"||s[0]==="X"?String.fromCharCode(parseInt(s.substr(1),16)):String.fromCharCode(parseInt(s,10))})}function Fe(e){return e.replace(Pt,":").replace(It," ")}function Ne(e){for(var t="",r=0,s=e.length;r<s;r++)t+=e.charCodeAt(r)<32?" ":e.charAt(r);return J.trim(t)}function Ve(e){return e=Be(e),e=De(e),e=Fe(e),e=Ne(e),e}function Me(e){return e=qe(e),e=Oe(e),e}function Ot(){return""}function qt(e,t){typeof t!="function"&&(t=function(){});var r=!Array.isArray(e);function s(a){return r?!0:J.indexOf(e,a)!==-1}var n=[],i=!1;return{onIgnoreTag:function(a,o,l){if(s(a))if(l.isClosing){var u="[/removed]",c=l.position+u.length;return n.push([i!==!1?i:l.position,c]),i=!1,u}else return i||(i=l.position),"[removed]";else return t(a,o,l)},remove:function(a){var o="",l=0;return J.forEach(n,function(u){o+=a.slice(l,u[0]),l=u[1]}),o+=a.slice(l),o}}}function Bt(e){for(var t="",r=0;r<e.length;){var s=e.indexOf("<!--",r);if(s===-1){t+=e.slice(r);break}t+=e.slice(r,s);var n=e.indexOf("-->",s);if(n===-1)break;r=n+3}return t}function Dt(e){var t=e.split("");return t=t.filter(function(r){var s=r.charCodeAt(0);return s===127?!1:s<=31?s===10||s===13:!0}),t.join("")}x.whiteList=Pe();x.getDefaultWhiteList=Pe;x.onTag=At;x.onIgnoreTag=St;x.onTagAttr=Tt;x.onIgnoreTagAttr=Rt;x.safeAttrValue=$t;x.escapeHtml=Oe;x.escapeQuote=qe;x.unescapeQuote=Be;x.escapeHtmlEntities=De;x.escapeDangerHtml5Entities=Fe;x.clearNonPrintableCharacter=Ne;x.friendlyAttrValue=Ve;x.escapeAttrValue=Me;x.onIgnoreTagStripAll=Ot;x.StripTagBody=qt;x.stripCommentTag=Bt;x.stripBlankChar=Dt;x.cssFilter=Ie;x.getDefaultCSSWhiteList=vt;var K={},R=ue;function Ft(e){var t=R.spaceIndex(e),r;return t===-1?r=e.slice(1,-1):r=e.slice(1,t+1),r=R.trim(r).toLowerCase(),r.slice(0,1)==="/"&&(r=r.slice(1)),r.slice(-1)==="/"&&(r=r.slice(0,-1)),r}function Nt(e){return e.slice(0,2)==="</"}function Vt(e,t,r){var s="",n=0,i=!1,a=!1,o=0,l=e.length,u="",c="";e:for(o=0;o<l;o++){var p=e.charAt(o);if(i===!1){if(p==="<"){i=o;continue}}else if(a===!1){if(p==="<"){s+=r(e.slice(n,o)),i=o,n=o;continue}if(p===">"){s+=r(e.slice(n,i)),c=e.slice(i,o+1),u=Ft(c),s+=t(i,s.length,u,c,Nt(c)),n=o+1,i=!1;continue}if(p==='"'||p==="'")for(var f=1,h=e.charAt(o-f);h.trim()===""||h==="=";){if(h==="="){a=p;continue e}h=e.charAt(o-++f)}}else if(p===a){a=!1;continue}}return n<e.length&&(s+=r(e.substr(n))),s}var Mt=/[^a-zA-Z0-9\\_:.-]/gim;function Ht(e,t){var r=0,s=0,n=[],i=!1,a=e.length;function o(f,h){if(f=R.trim(f),f=f.replace(Mt,"").toLowerCase(),!(f.length<1)){var g=t(f,h||"");g&&n.push(g)}}for(var l=0;l<a;l++){var u=e.charAt(l),c,p;if(i===!1&&u==="="){i=e.slice(r,l),r=l+1,s=e.charAt(r)==='"'||e.charAt(r)==="'"?r:Gt(e,l+1);continue}if(i!==!1&&l===s){if(p=e.indexOf(u,l+1),p===-1)break;c=R.trim(e.slice(s+1,p)),o(i,c),i=!1,l=p,r=l+1;continue}if(/\s|\n|\t/.test(u))if(e=e.replace(/\s|\n|\t/g," "),i===!1)if(p=Wt(e,l),p===-1){c=R.trim(e.slice(r,l)),o(c),i=!1,r=l+1;continue}else{l=p-1;continue}else if(p=Zt(e,l-1),p===-1){c=R.trim(e.slice(r,l)),c=Ee(c),o(i,c),i=!1,r=l+1;continue}else continue}return r<e.length&&(i===!1?o(e.slice(r)):o(i,Ee(R.trim(e.slice(r))))),R.trim(n.join(" "))}function Wt(e,t){for(;t<e.length;t++){var r=e[t];if(r!==" ")return r==="="?t:-1}}function Gt(e,t){for(;t<e.length;t++){var r=e[t];if(r!==" ")return r==="'"||r==='"'?t:-1}}function Zt(e,t){for(;t>0;t--){var r=e[t];if(r!==" ")return r==="="?t:-1}}function jt(e){return e[0]==='"'&&e[e.length-1]==='"'||e[0]==="'"&&e[e.length-1]==="'"}function Ee(e){return jt(e)?e.substr(1,e.length-2):e}K.parseTag=Vt;K.parseAttr=Ht;var Xt=ce.FilterCSS,y=x,He=K,Qt=He.parseTag,Ut=He.parseAttr,Q=ue;function X(e){return e==null}function Jt(e){var t=Q.spaceIndex(e);if(t===-1)return{html:"",closing:e[e.length-2]==="/"};e=Q.trim(e.slice(t+1,-1));var r=e[e.length-1]==="/";return r&&(e=Q.trim(e.slice(0,-1))),{html:e,closing:r}}function Kt(e){var t={};for(var r in e)t[r]=e[r];return t}function Yt(e){var t={};for(var r in e)Array.isArray(e[r])?t[r.toLowerCase()]=e[r].map(function(s){return s.toLowerCase()}):t[r.toLowerCase()]=e[r];return t}function We(e){e=Kt(e||{}),e.stripIgnoreTag&&(e.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),e.onIgnoreTag=y.onIgnoreTagStripAll),e.whiteList||e.allowList?e.whiteList=Yt(e.whiteList||e.allowList):e.whiteList=y.whiteList,e.onTag=e.onTag||y.onTag,e.onTagAttr=e.onTagAttr||y.onTagAttr,e.onIgnoreTag=e.onIgnoreTag||y.onIgnoreTag,e.onIgnoreTagAttr=e.onIgnoreTagAttr||y.onIgnoreTagAttr,e.safeAttrValue=e.safeAttrValue||y.safeAttrValue,e.escapeHtml=e.escapeHtml||y.escapeHtml,this.options=e,e.css===!1?this.cssFilter=!1:(e.css=e.css||{},this.cssFilter=new Xt(e.css))}We.prototype.process=function(e){if(e=e||"",e=e.toString(),!e)return"";var t=this,r=t.options,s=r.whiteList,n=r.onTag,i=r.onIgnoreTag,a=r.onTagAttr,o=r.onIgnoreTagAttr,l=r.safeAttrValue,u=r.escapeHtml,c=t.cssFilter;r.stripBlankChar&&(e=y.stripBlankChar(e)),r.allowCommentTag||(e=y.stripCommentTag(e));var p=!1;r.stripIgnoreTagBody&&(p=y.StripTagBody(r.stripIgnoreTagBody,i),i=p.onIgnoreTag);var f=Qt(e,function(h,g,b,m,$){var L={sourcePosition:h,position:g,isClosing:$,isWhite:Object.prototype.hasOwnProperty.call(s,b)},_=n(b,m,L);if(!X(_))return _;if(L.isWhite){if(L.isClosing)return"</"+b+">";var G=Jt(m),B=s[b],T=Ut(G.html,function(I,O){var ie=Q.indexOf(B,I)!==-1,D=a(b,I,O,ie);return X(D)?ie?(O=l(b,I,O,c),O?I+'="'+O+'"':I):(D=o(b,I,O,ie),X(D)?void 0:D):D});return m="<"+b,T&&(m+=" "+T),G.closing&&(m+=" /"),m+=">",m}else return _=i(b,m,L),X(_)?u(m):_},u);return p&&(f=p.remove(f)),f};var er=We;(function(e,t){var r=x,s=K,n=er;function i(o,l){var u=new n(l);return u.process(o)}t=e.exports=i,t.filterXSS=i,t.FilterXSS=n,(function(){for(var o in r)t[o]=r[o];for(var l in s)t[l]=s[l]})();function a(){return typeof self<"u"&&typeof DedicatedWorkerGlobalScope<"u"&&self instanceof DedicatedWorkerGlobalScope}a()&&(self.filterXSS=e.exports)})(le,le.exports);var q=le.exports,tr=function(e){if(typeof e!="object"||e===null||Object.prototype.toString.call(e)!=="[object Object]")return!1;var t=Object.getPrototypeOf(e);if(t===null)return!0;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t},Ge=(function(){function e(t,r){var s=this;this.arcgisWhiteList={a:["href","style","target"],abbr:["title"],article:["style"],aside:["style"],audio:["autoplay","controls","loop","muted","preload"],b:[],blockquote:["style"],br:[],code:["style"],dd:["style"],del:["style"],details:["open","style"],div:["align","aria-hidden","aria-label","style"],dl:["style"],dt:["style"],em:[],figcaption:["style"],figure:["style"],font:["color","face","size","style"],footer:["style"],h1:["style"],h2:["style"],h3:["style"],h4:["style"],h5:["style"],h6:["style"],header:["style"],hr:[],i:[],img:["alt","border","height","src","style","width"],li:[],main:["style"],mark:["style"],nav:["style"],ol:[],p:["style"],pre:["style"],section:["style"],source:["media","src","type"],span:["aria-hidden","aria-label","style"],strong:[],sub:["style"],summary:["style"],sup:["style"],table:["border","cellpadding","cellspacing","height","style","width"],tbody:[],tr:["align","height","style","valign"],td:["align","colspan","height","nowrap","rowspan","style","valign","width"],th:["align","colspan","height","nowrap","rowspan","style","valign","width"],time:["style"],u:[],ul:[],video:["autoplay","controls","height","loop","muted","poster","preload","width"]},this.arcgisCSSWhiteList=U(U({},q.getDefaultCSSWhiteList()),{"align-items":!0,"align-self":!0,flex:!0,"flex-basis":!0,"flex-direction":!0,"flex-flow":!0,"flex-grow":!0,"flex-shrink":!0,"flex-wrap":!0,float:!0,gap:!0,grid:!0,"grid-area":!0,"grid-auto-columns":!0,"grid-auto-flow":!0,"grid-auto-rows":!0,"grid-column":!0,"grid-column-end":!0,"grid-column-start":!0,"grid-row":!0,"grid-row-end":!0,"grid-row-start":!0,"grid-template":!0,"grid-template-areas":!0,"grid-template-columns":!0,"grid-template-rows":!0,"justify-content":!0,"justify-items":!0,"justify-self":!0,"line-height":!0,overflow:!0}),this.allowedProtocols=["http","https","mailto","iform","tel","flow","lfmobile","arcgis-navigator","arcgis-appstudio-player","arcgis-survey123","arcgis-collector","arcgis-workforce","arcgis-explorer","arcgis-trek2there","arcgis-quickcapture","mspbi","comgooglemaps","pdfefile","pdfehttp","pdfehttps","boxapp","boxemm","awb","awbs","gropen","radarscope"],this.arcgisFilterOptions={allowCommentTag:!0,safeAttrValue:function(i,a,o,l){return i==="a"&&a==="href"||(i==="img"||i==="source")&&a==="src"?s.sanitizeUrl(o):q.safeAttrValue(i,a,o,l)}},this._entityMap={"&":"&#x38;","<":"&#x3C;",">":"&#x3E;",'"':"&#x22;","'":"&#x27;","/":"&#x2F;"};var n;t&&!r?n=t:t&&r?(n=Object.create(this.arcgisFilterOptions),n.css={whiteList:this.arcgisCSSWhiteList},Object.keys(t).forEach(function(i){if(i==="whiteList")n.whiteList=s._extendObjectOfArrays([s.arcgisWhiteList,t.whiteList||{}]);else if(i==="css"){var a=t.css.whiteList;a!=null&&t.css instanceof Object&&Object.keys(a).forEach(function(o){return n.css.whiteList[o]=a[o]})}else n[i]=t[i]})):(n=Object.create(this.arcgisFilterOptions),n.whiteList=this.arcgisWhiteList,n.css={whiteList:this.arcgisCSSWhiteList}),this.xssFilterOptions=n,this._xssFilter=new q.FilterXSS(n)}return e.prototype.sanitize=function(t,r){switch(r===void 0&&(r={}),typeof t){case"number":return isNaN(t)||!isFinite(t)?null:t;case"boolean":return t;case"string":return this._xssFilter.process(t);case"object":return this._iterateOverObject(t,r);default:return r.allowUndefined&&typeof t>"u"?void 0:null}},e.prototype.sanitizeUrl=function(t,r){var s=(r??{}).isProtocolRequired,n=s===void 0?!0:s,i=this._trim(t.substring(0,t.indexOf(":"))),a=t==="/",o=/^#/.test(t),l=i&&this.allowedProtocols.indexOf(i.toLowerCase())>-1;return a||o||l?q.escapeAttrValue(t):!i&&!n?q.escapeAttrValue("https://".concat(t)):""},e.prototype.sanitizeHTMLAttribute=function(t,r,s,n){return typeof this.xssFilterOptions.safeAttrValue=="function"?this.xssFilterOptions.safeAttrValue(t,r,s,n):q.safeAttrValue(t,r,s,n)},e.prototype.validate=function(t,r){r===void 0&&(r={});var s=this.sanitize(t,r);return{isValid:t===s,sanitized:s}},e.prototype.encodeHTML=function(t){var r=this;return String(t).replace(/[&<>"'\/]/g,function(s){return r._entityMap[s]})},e.prototype.encodeAttrValue=function(t){var r=/^[a-zA-Z0-9]$/;return String(t).replace(/[\x00-\xFF]/g,function(s,n){return r.test(s)?s:"&#x".concat(Number(t.charCodeAt(n)).toString(16),";")})},e.prototype._extendObjectOfArrays=function(t){var r={};return t.forEach(function(s){Object.keys(s).forEach(function(n){Array.isArray(s[n])&&Array.isArray(r[n])?r[n]=r[n].concat(s[n]):r[n]=s[n]})}),r},e.prototype._iterateOverObject=function(t,r){var s=this;r===void 0&&(r={});try{var n=!1,i=void 0;if(Array.isArray(t))i=t.reduce(function(o,l){var u=s.validate(l,r);return u.isValid?o.concat([l]):(n=!0,o.concat([u.sanitized]))},[]);else if(tr(t)){var a=Object.keys(t);i=a.reduce(function(o,l){var u=t[l],c=s.validate(u,r);return c.isValid?o[l]=u:(n=!0,o[l]=c.sanitized),o},{})}else return r.allowUndefined&&typeof t>"u"?void 0:null;return n?i:t}catch{return null}},e.prototype._trim=function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},e})();function ge(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var P=ge();function Ke(e){P=e}var z={exec:()=>null};function d(e,t=""){let r=typeof e=="string"?e:e.source,s={replace:(n,i)=>{let a=typeof i=="string"?i:i.source;return a=a.replace(w.caret,"$1"),r=r.replace(n,a),s},getRegex:()=>new RegExp(r,t)};return s}var rr=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),w={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i"),blockquoteBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}>`)},nr=/^(?:[ \t]*(?:\n|$))+/,sr=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,ir=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,W=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,ar=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,de=/ {0,3}(?:[*+-]|\d{1,9}[.)])/,Ye=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,et=d(Ye).replace(/bull/g,de).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),lr=d(Ye).replace(/bull/g,de).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),ke=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,or=/^[^\n]+/,be=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,cr=d(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",be).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ur=d(/^(bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,de).getRegex(),ne="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",xe=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,pr=d("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",xe).replace("tag",ne).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),tt=d(ke).replace("hr",W).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ne).getRegex(),fr=d(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",tt).getRegex(),me={blockquote:fr,code:sr,def:cr,fences:ir,heading:ar,hr:W,html:pr,lheading:et,list:ur,newline:nr,paragraph:tt,table:z,text:or},Ze=d("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",W).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ne).getRegex(),hr={...me,lheading:lr,table:Ze,paragraph:d(ke).replace("hr",W).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Ze).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)])[ \\t]").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",ne).getRegex()},gr={...me,html:d(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",xe).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:z,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:d(ke).replace("hr",W).replace("heading",` *#{1,6} *[^
4
+ ]`).replace("lheading",et).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},dr=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,kr=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,rt=/^( {2,}|\\)\n(?!\s*$)/,br=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,se=/[\p{P}\p{S}]/u,we=/[\s\p{P}\p{S}]/u,nt=/[^\s\p{P}\p{S}]/u,xr=d(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,we).getRegex(),st=/(?!~)[\p{P}\p{S}]/u,mr=/(?!~)[\s\p{P}\p{S}]/u,wr=/(?:[^\s\p{P}\p{S}]|~)/u,it=/(?![*_])[\p{P}\p{S}]/u,yr=/(?![*_])[\s\p{P}\p{S}]/u,vr=/(?:[^\s\p{P}\p{S}]|[*_])/u,Ar=d(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",rr?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),at=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Sr=d(at,"u").replace(/punct/g,se).getRegex(),Tr=d(at,"u").replace(/punct/g,st).getRegex(),lt="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Rr=d(lt,"gu").replace(/notPunctSpace/g,nt).replace(/punctSpace/g,we).replace(/punct/g,se).getRegex(),$r=d(lt,"gu").replace(/notPunctSpace/g,wr).replace(/punctSpace/g,mr).replace(/punct/g,st).getRegex(),Lr=d("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,nt).replace(/punctSpace/g,we).replace(/punct/g,se).getRegex(),_r=d(/^~~?(?:((?!~)punct)|[^\s~])/,"u").replace(/punct/g,it).getRegex(),Er="^[^~]+(?=[^~])|(?!~)punct(~~?)(?=[\\s]|$)|notPunctSpace(~~?)(?!~)(?=punctSpace|$)|(?!~)punctSpace(~~?)(?=notPunctSpace)|[\\s](~~?)(?!~)(?=punct)|(?!~)punct(~~?)(?!~)(?=punct)|notPunctSpace(~~?)(?=notPunctSpace)",zr=d(Er,"gu").replace(/notPunctSpace/g,vr).replace(/punctSpace/g,yr).replace(/punct/g,it).getRegex(),Cr=d(/\\(punct)/,"gu").replace(/punct/g,se).getRegex(),Pr=d(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Ir=d(xe).replace("(?:-->|$)","-->").getRegex(),Or=d("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Ir).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),ee=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,qr=d(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",ee).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ot=d(/^!?\[(label)\]\[(ref)\]/).replace("label",ee).replace("ref",be).getRegex(),ct=d(/^!?\[(ref)\](?:\[\])?/).replace("ref",be).getRegex(),Br=d("reflink|nolink(?!\\()","g").replace("reflink",ot).replace("nolink",ct).getRegex(),je=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,ye={_backpedal:z,anyPunctuation:Cr,autolink:Pr,blockSkip:Ar,br:rt,code:kr,del:z,delLDelim:z,delRDelim:z,emStrongLDelim:Sr,emStrongRDelimAst:Rr,emStrongRDelimUnd:Lr,escape:dr,link:qr,nolink:ct,punctuation:xr,reflink:ot,reflinkSearch:Br,tag:Or,text:br,url:z},Dr={...ye,link:d(/^!?\[(label)\]\((.*?)\)/).replace("label",ee).getRegex(),reflink:d(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",ee).getRegex()},pe={...ye,emStrongRDelimAst:$r,emStrongLDelim:Tr,delLDelim:_r,delRDelim:zr,url:d(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",je).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:d(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",je).getRegex()},Fr={...pe,br:d(rt).replace("{2,}","*").getRegex(),text:d(pe.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},Y={normal:me,gfm:hr,pedantic:gr},V={normal:ye,gfm:pe,breaks:Fr,pedantic:Dr},Nr={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Xe=e=>Nr[e];function S(e,t){if(t){if(w.escapeTest.test(e))return e.replace(w.escapeReplace,Xe)}else if(w.escapeTestNoEncode.test(e))return e.replace(w.escapeReplaceNoEncode,Xe);return e}function Qe(e){try{e=encodeURI(e).replace(w.percentDecode,"%")}catch{return null}return e}function Ue(e,t){let r=e.replace(w.findPipe,(i,a,o)=>{let l=!1,u=a;for(;--u>=0&&o[u]==="\\";)l=!l;return l?"|":" |"}),s=r.split(w.splitPipe),n=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),t)if(s.length>t)s.splice(t);else for(;s.length<t;)s.push("");for(;n<s.length;n++)s[n]=s[n].trim().replace(w.slashPipe,"|");return s}function M(e,t,r){let s=e.length;if(s===0)return"";let n=0;for(;n<s;){let i=e.charAt(s-n-1);if(i===t&&!r)n++;else if(i!==t&&r)n++;else break}return e.slice(0,s-n)}function Vr(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let s=0;s<e.length;s++)if(e[s]==="\\")s++;else if(e[s]===t[0])r++;else if(e[s]===t[1]&&(r--,r<0))return s;return r>0?-2:-1}function Mr(e,t=0){let r=t,s="";for(let n of e)if(n===" "){let i=4-r%4;s+=" ".repeat(i),r+=i}else s+=n,r++;return s}function Je(e,t,r,s,n){let i=t.href,a=t.title||null,o=e[1].replace(n.other.outputLinkReplace,"$1");s.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:i,title:a,text:o,tokens:s.inlineTokens(o)};return s.state.inLink=!1,l}function Hr(e,t,r){let s=e.match(r.other.indentCodeCompensation);if(s===null)return t;let n=s[1];return t.split(`
5
+ `).map(i=>{let a=i.match(r.other.beginningSpace);if(a===null)return i;let[o]=a;return o.length>=n.length?i.slice(n.length):i}).join(`
6
+ `)}var te=class{options;rules;lexer;constructor(e){this.options=e||P}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:"space",raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let r=t[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:t[0],codeBlockStyle:"indented",text:this.options.pedantic?r:M(r,`
7
+ `)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let r=t[0],s=Hr(r,t[3]||"",this.rules);return{type:"code",raw:r,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):t[2],text:s}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let r=t[2].trim();if(this.rules.other.endingHash.test(r)){let s=M(r,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(r=s.trim())}return{type:"heading",raw:t[0],depth:t[1].length,text:r,tokens:this.lexer.inline(r)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:"hr",raw:M(t[0],`
8
+ `)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let r=M(t[0],`
9
+ `).split(`
10
+ `),s="",n="",i=[];for(;r.length>0;){let a=!1,o=[],l;for(l=0;l<r.length;l++)if(this.rules.other.blockquoteStart.test(r[l]))o.push(r[l]),a=!0;else if(!a)o.push(r[l]);else break;r=r.slice(l);let u=o.join(`
11
+ `),c=u.replace(this.rules.other.blockquoteSetextReplace,`
12
+ $1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
13
+ ${u}`:u,n=n?`${n}
14
+ ${c}`:c;let p=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=p,r.length===0)break;let f=i.at(-1);if(f?.type==="code")break;if(f?.type==="blockquote"){let h=f,g=h.raw+`
15
+ `+r.join(`
16
+ `),b=this.blockquote(g);i[i.length-1]=b,s=s.substring(0,s.length-h.raw.length)+b.raw,n=n.substring(0,n.length-h.text.length)+b.text;break}else if(f?.type==="list"){let h=f,g=h.raw+`
17
+ `+r.join(`
18
+ `),b=this.list(g);i[i.length-1]=b,s=s.substring(0,s.length-f.raw.length)+b.raw,n=n.substring(0,n.length-h.raw.length)+b.raw,r=g.substring(i.at(-1).raw.length).split(`
19
+ `);continue}}return{type:"blockquote",raw:s,tokens:i,text:n}}}list(e){let t=this.rules.block.list.exec(e);if(t){let r=t[1].trim(),s=r.length>1,n={type:"list",raw:"",ordered:s,start:s?+r.slice(0,-1):"",loose:!1,items:[]};r=s?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=s?r:"[*+-]");let i=this.rules.other.listItemRegex(r),a=!1;for(;e;){let l=!1,u="",c="";if(!(t=i.exec(e))||this.rules.block.hr.test(e))break;u=t[0],e=e.substring(u.length);let p=Mr(t[2].split(`
20
+ `,1)[0],t[1].length),f=e.split(`
21
+ `,1)[0],h=!p.trim(),g=0;if(this.options.pedantic?(g=2,c=p.trimStart()):h?g=t[1].length+1:(g=p.search(this.rules.other.nonSpaceChar),g=g>4?1:g,c=p.slice(g),g+=t[1].length),h&&this.rules.other.blankLine.test(f)&&(u+=f+`
22
+ `,e=e.substring(f.length+1),l=!0),!l){let b=this.rules.other.nextBulletRegex(g),m=this.rules.other.hrRegex(g),$=this.rules.other.fencesBeginRegex(g),L=this.rules.other.headingBeginRegex(g),_=this.rules.other.htmlBeginRegex(g),G=this.rules.other.blockquoteBeginRegex(g);for(;e;){let B=e.split(`
23
+ `,1)[0],T;if(f=B,this.options.pedantic?(f=f.replace(this.rules.other.listReplaceNesting," "),T=f):T=f.replace(this.rules.other.tabCharGlobal," "),$.test(f)||L.test(f)||_.test(f)||G.test(f)||b.test(f)||m.test(f))break;if(T.search(this.rules.other.nonSpaceChar)>=g||!f.trim())c+=`
24
+ `+T.slice(g);else{if(h||p.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||$.test(p)||L.test(p)||m.test(p))break;c+=`
25
+ `+f}h=!f.trim(),u+=B+`
26
+ `,e=e.substring(B.length+1),p=T.slice(g)}}n.loose||(a?n.loose=!0:this.rules.other.doubleBlankLine.test(u)&&(a=!0)),n.items.push({type:"list_item",raw:u,task:!!this.options.gfm&&this.rules.other.listIsTask.test(c),loose:!1,text:c,tokens:[]}),n.raw+=u}let o=n.items.at(-1);if(o)o.raw=o.raw.trimEnd(),o.text=o.text.trimEnd();else return;n.raw=n.raw.trimEnd();for(let l of n.items){if(this.lexer.state.top=!1,l.tokens=this.lexer.blockTokens(l.text,[]),l.task){if(l.text=l.text.replace(this.rules.other.listReplaceTask,""),l.tokens[0]?.type==="text"||l.tokens[0]?.type==="paragraph"){l.tokens[0].raw=l.tokens[0].raw.replace(this.rules.other.listReplaceTask,""),l.tokens[0].text=l.tokens[0].text.replace(this.rules.other.listReplaceTask,"");for(let c=this.lexer.inlineQueue.length-1;c>=0;c--)if(this.rules.other.listIsTask.test(this.lexer.inlineQueue[c].src)){this.lexer.inlineQueue[c].src=this.lexer.inlineQueue[c].src.replace(this.rules.other.listReplaceTask,"");break}}let u=this.rules.other.listTaskCheckbox.exec(l.raw);if(u){let c={type:"checkbox",raw:u[0]+" ",checked:u[0]!=="[ ]"};l.checked=c.checked,n.loose?l.tokens[0]&&["paragraph","text"].includes(l.tokens[0].type)&&"tokens"in l.tokens[0]&&l.tokens[0].tokens?(l.tokens[0].raw=c.raw+l.tokens[0].raw,l.tokens[0].text=c.raw+l.tokens[0].text,l.tokens[0].tokens.unshift(c)):l.tokens.unshift({type:"paragraph",raw:c.raw,text:c.raw,tokens:[c]}):l.tokens.unshift(c)}}if(!n.loose){let u=l.tokens.filter(p=>p.type==="space"),c=u.length>0&&u.some(p=>this.rules.other.anyLine.test(p.raw));n.loose=c}}if(n.loose)for(let l of n.items){l.loose=!0;for(let u of l.tokens)u.type==="text"&&(u.type="paragraph")}return n}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:"html",block:!0,raw:t[0],pre:t[1]==="pre"||t[1]==="script"||t[1]==="style",text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let r=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=t[2]?t[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",n=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):t[3];return{type:"def",tag:r,raw:t[0],href:s,title:n}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let r=Ue(t[1]),s=t[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,"").split(`
27
+ `):[],i={type:"table",raw:t[0],header:[],align:[],rows:[]};if(r.length===s.length){for(let a of s)this.rules.other.tableAlignRight.test(a)?i.align.push("right"):this.rules.other.tableAlignCenter.test(a)?i.align.push("center"):this.rules.other.tableAlignLeft.test(a)?i.align.push("left"):i.align.push(null);for(let a=0;a<r.length;a++)i.header.push({text:r[a],tokens:this.lexer.inline(r[a]),header:!0,align:i.align[a]});for(let a of n)i.rows.push(Ue(a,i.header.length).map((o,l)=>({text:o,tokens:this.lexer.inline(o),header:!1,align:i.align[l]})));return i}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:"heading",raw:t[0],depth:t[2].charAt(0)==="="?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let r=t[1].charAt(t[1].length-1)===`
28
+ `?t[1].slice(0,-1):t[1];return{type:"paragraph",raw:t[0],text:r,tokens:this.lexer.inline(r)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:"escape",raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let r=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(r)){if(!this.rules.other.endAngleBracket.test(r))return;let i=M(r.slice(0,-1),"\\");if((r.length-i.length)%2===0)return}else{let i=Vr(t[2],"()");if(i===-2)return;if(i>-1){let a=(t[0].indexOf("!")===0?5:4)+t[1].length+i;t[2]=t[2].substring(0,i),t[0]=t[0].substring(0,a).trim(),t[3]=""}}let s=t[2],n="";if(this.options.pedantic){let i=this.rules.other.pedanticHrefTitle.exec(s);i&&(s=i[1],n=i[3])}else n=t[3]?t[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(r)?s=s.slice(1):s=s.slice(1,-1)),Je(t,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:n&&n.replace(this.rules.inline.anyPunctuation,"$1")},t[0],this.lexer,this.rules)}}reflink(e,t){let r;if((r=this.rules.inline.reflink.exec(e))||(r=this.rules.inline.nolink.exec(e))){let s=(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," "),n=t[s.toLowerCase()];if(!n){let i=r[0].charAt(0);return{type:"text",raw:i,text:i}}return Je(r,n,r[0],this.lexer,this.rules)}}emStrong(e,t,r=""){let s=this.rules.inline.emStrongLDelim.exec(e);if(!(!s||s[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!r||this.rules.inline.punctuation.exec(r))){let n=[...s[0]].length-1,i,a,o=n,l=0,u=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(u.lastIndex=0,t=t.slice(-1*e.length+n);(s=u.exec(t))!=null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i)continue;if(a=[...i].length,s[3]||s[4]){o+=a;continue}else if((s[5]||s[6])&&n%3&&!((n+a)%3)){l+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+l);let c=[...s[0]][0].length,p=e.slice(0,n+s.index+c+a);if(Math.min(n,a)%2){let h=p.slice(1,-1);return{type:"em",raw:p,text:h,tokens:this.lexer.inlineTokens(h)}}let f=p.slice(2,-2);return{type:"strong",raw:p,text:f,tokens:this.lexer.inlineTokens(f)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let r=t[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(r),n=this.rules.other.startingSpaceChar.test(r)&&this.rules.other.endingSpaceChar.test(r);return s&&n&&(r=r.substring(1,r.length-1)),{type:"codespan",raw:t[0],text:r}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:"br",raw:t[0]}}del(e,t,r=""){let s=this.rules.inline.delLDelim.exec(e);if(s&&(!s[1]||!r||this.rules.inline.punctuation.exec(r))){let n=[...s[0]].length-1,i,a,o=n,l=this.rules.inline.delRDelim;for(l.lastIndex=0,t=t.slice(-1*e.length+n);(s=l.exec(t))!=null;){if(i=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!i||(a=[...i].length,a!==n))continue;if(s[3]||s[4]){o+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o);let u=[...s[0]][0].length,c=e.slice(0,n+s.index+u+a),p=c.slice(n,-n);return{type:"del",raw:c,text:p,tokens:this.lexer.inlineTokens(p)}}}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let r,s;return t[2]==="@"?(r=t[1],s="mailto:"+r):(r=t[1],s=r),{type:"link",raw:t[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let r,s;if(t[2]==="@")r=t[0],s="mailto:"+r;else{let n;do n=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??"";while(n!==t[0]);r=t[0],t[1]==="www."?s="http://"+t[0]:s=t[0]}return{type:"link",raw:t[0],text:r,href:s,tokens:[{type:"text",raw:r,text:r}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let r=this.lexer.state.inRawBlock;return{type:"text",raw:t[0],text:t[0],escaped:r}}}},v=class fe{tokens;options;state;inlineQueue;tokenizer;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||P,this.options.tokenizer=this.options.tokenizer||new te,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let r={other:w,block:Y.normal,inline:V.normal};this.options.pedantic?(r.block=Y.pedantic,r.inline=V.pedantic):this.options.gfm&&(r.block=Y.gfm,this.options.breaks?r.inline=V.breaks:r.inline=V.gfm),this.tokenizer.rules=r}static get rules(){return{block:Y,inline:V}}static lex(t,r){return new fe(r).lex(t)}static lexInline(t,r){return new fe(r).inlineTokens(t)}lex(t){t=t.replace(w.carriageReturn,`
29
+ `),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let s=this.inlineQueue[r];this.inlineTokens(s.src,s.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],s=!1){for(this.options.pedantic&&(t=t.replace(w.tabCharGlobal," ").replace(w.spaceLine,""));t;){let n;if(this.options.extensions?.block?.some(a=>(n=a.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let a=r.at(-1);n.raw.length===1&&a!==void 0?a.raw+=`
30
+ `:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
31
+ `)?"":`
32
+ `)+n.raw,a.text+=`
33
+ `+n.text,this.inlineQueue.at(-1).src=a.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let a=r.at(-1);a?.type==="paragraph"||a?.type==="text"?(a.raw+=(a.raw.endsWith(`
34
+ `)?"":`
35
+ `)+n.raw,a.text+=`
36
+ `+n.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let i=t;if(this.options.extensions?.startBlock){let a=1/0,o=t.slice(1),l;this.options.extensions.startBlock.forEach(u=>{l=u.call({lexer:this},o),typeof l=="number"&&l>=0&&(a=Math.min(a,l))}),a<1/0&&a>=0&&(i=t.substring(0,a+1))}if(this.state.top&&(n=this.tokenizer.paragraph(i))){let a=r.at(-1);s&&a?.type==="paragraph"?(a.raw+=(a.raw.endsWith(`
37
+ `)?"":`
38
+ `)+n.raw,a.text+=`
39
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(n),s=i.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let a=r.at(-1);a?.type==="text"?(a.raw+=(a.raw.endsWith(`
40
+ `)?"":`
41
+ `)+n.raw,a.text+=`
42
+ `+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(n);continue}if(t){let a="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(a);break}else throw new Error(a)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let s=t,n=null;if(this.tokens.links){let l=Object.keys(this.tokens.links);if(l.length>0)for(;(n=this.tokenizer.rules.inline.reflinkSearch.exec(s))!=null;)l.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(s=s.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+s.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(n=this.tokenizer.rules.inline.anyPunctuation.exec(s))!=null;)s=s.slice(0,n.index)+"++"+s.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(n=this.tokenizer.rules.inline.blockSkip.exec(s))!=null;)i=n[2]?n[2].length:0,s=s.slice(0,n.index+i)+"["+"a".repeat(n[0].length-i-2)+"]"+s.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);s=this.options.hooks?.emStrongMask?.call({lexer:this},s)??s;let a=!1,o="";for(;t;){a||(o=""),a=!1;let l;if(this.options.extensions?.inline?.some(c=>(l=c.call({lexer:this},t,r))?(t=t.substring(l.raw.length),r.push(l),!0):!1))continue;if(l=this.tokenizer.escape(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.tag(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.link(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(l.raw.length);let c=r.at(-1);l.type==="text"&&c?.type==="text"?(c.raw+=l.raw,c.text+=l.text):r.push(l);continue}if(l=this.tokenizer.emStrong(t,s,o)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.codespan(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.br(t)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.del(t,s,o)){t=t.substring(l.raw.length),r.push(l);continue}if(l=this.tokenizer.autolink(t)){t=t.substring(l.raw.length),r.push(l);continue}if(!this.state.inLink&&(l=this.tokenizer.url(t))){t=t.substring(l.raw.length),r.push(l);continue}let u=t;if(this.options.extensions?.startInline){let c=1/0,p=t.slice(1),f;this.options.extensions.startInline.forEach(h=>{f=h.call({lexer:this},p),typeof f=="number"&&f>=0&&(c=Math.min(c,f))}),c<1/0&&c>=0&&(u=t.substring(0,c+1))}if(l=this.tokenizer.inlineText(u)){t=t.substring(l.raw.length),l.raw.slice(-1)!=="_"&&(o=l.raw.slice(-1)),a=!0;let c=r.at(-1);c?.type==="text"?(c.raw+=l.raw,c.text+=l.text):r.push(l);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return r}},re=class{options;parser;constructor(e){this.options=e||P}space(e){return""}code({text:e,lang:t,escaped:r}){let s=(t||"").match(w.notSpaceStart)?.[0],n=e.replace(w.endingNewline,"")+`
43
+ `;return s?'<pre><code class="language-'+S(s)+'">'+(r?n:S(n,!0))+`</code></pre>
44
+ `:"<pre><code>"+(r?n:S(n,!0))+`</code></pre>
45
+ `}blockquote({tokens:e}){return`<blockquote>
46
+ ${this.parser.parse(e)}</blockquote>
47
+ `}html({text:e}){return e}def(e){return""}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
48
+ `}hr(e){return`<hr>
49
+ `}list(e){let t=e.ordered,r=e.start,s="";for(let a=0;a<e.items.length;a++){let o=e.items[a];s+=this.listitem(o)}let n=t?"ol":"ul",i=t&&r!==1?' start="'+r+'"':"";return"<"+n+i+`>
50
+ `+s+"</"+n+`>
51
+ `}listitem(e){return`<li>${this.parser.parse(e.tokens)}</li>
52
+ `}checkbox({checked:e}){return"<input "+(e?'checked="" ':"")+'disabled="" type="checkbox"> '}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
53
+ `}table(e){let t="",r="";for(let n=0;n<e.header.length;n++)r+=this.tablecell(e.header[n]);t+=this.tablerow({text:r});let s="";for(let n=0;n<e.rows.length;n++){let i=e.rows[n];r="";for(let a=0;a<i.length;a++)r+=this.tablecell(i[a]);s+=this.tablerow({text:r})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
54
+ <thead>
55
+ `+t+`</thead>
56
+ `+s+`</table>
57
+ `}tablerow({text:e}){return`<tr>
58
+ ${e}</tr>
59
+ `}tablecell(e){let t=this.parser.parseInline(e.tokens),r=e.header?"th":"td";return(e.align?`<${r} align="${e.align}">`:`<${r}>`)+t+`</${r}>
60
+ `}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${S(e,!0)}</code>`}br(e){return"<br>"}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:r}){let s=this.parser.parseInline(r),n=Qe(e);if(n===null)return s;e=n;let i='<a href="'+e+'"';return t&&(i+=' title="'+S(t)+'"'),i+=">"+s+"</a>",i}image({href:e,title:t,text:r,tokens:s}){s&&(r=this.parser.parseInline(s,this.parser.textRenderer));let n=Qe(e);if(n===null)return S(r);e=n;let i=`<img src="${e}" alt="${r}"`;return t&&(i+=` title="${S(t)}"`),i+=">",i}text(e){return"tokens"in e&&e.tokens?this.parser.parseInline(e.tokens):"escaped"in e&&e.escaped?e.text:S(e.text)}},ve=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return""+e}image({text:e}){return""+e}br(){return""}checkbox({raw:e}){return e}},A=class he{options;renderer;textRenderer;constructor(t){this.options=t||P,this.options.renderer=this.options.renderer||new re,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new ve}static parse(t,r){return new he(r).parse(t)}static parseInline(t,r){return new he(r).parseInline(t)}parse(t){let r="";for(let s=0;s<t.length;s++){let n=t[s];if(this.options.extensions?.renderers?.[n.type]){let a=n,o=this.options.extensions.renderers[a.type].call({parser:this},a);if(o!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(a.type)){r+=o||"";continue}}let i=n;switch(i.type){case"space":{r+=this.renderer.space(i);break}case"hr":{r+=this.renderer.hr(i);break}case"heading":{r+=this.renderer.heading(i);break}case"code":{r+=this.renderer.code(i);break}case"table":{r+=this.renderer.table(i);break}case"blockquote":{r+=this.renderer.blockquote(i);break}case"list":{r+=this.renderer.list(i);break}case"checkbox":{r+=this.renderer.checkbox(i);break}case"html":{r+=this.renderer.html(i);break}case"def":{r+=this.renderer.def(i);break}case"paragraph":{r+=this.renderer.paragraph(i);break}case"text":{r+=this.renderer.text(i);break}default:{let a='Token with "'+i.type+'" type was not found.';if(this.options.silent)return console.error(a),"";throw new Error(a)}}}return r}parseInline(t,r=this.renderer){let s="";for(let n=0;n<t.length;n++){let i=t[n];if(this.options.extensions?.renderers?.[i.type]){let o=this.options.extensions.renderers[i.type].call({parser:this},i);if(o!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(i.type)){s+=o||"";continue}}let a=i;switch(a.type){case"escape":{s+=r.text(a);break}case"html":{s+=r.html(a);break}case"link":{s+=r.link(a);break}case"image":{s+=r.image(a);break}case"checkbox":{s+=r.checkbox(a);break}case"strong":{s+=r.strong(a);break}case"em":{s+=r.em(a);break}case"codespan":{s+=r.codespan(a);break}case"br":{s+=r.br(a);break}case"del":{s+=r.del(a);break}case"text":{s+=r.text(a);break}default:{let o='Token with "'+a.type+'" type was not found.';if(this.options.silent)return console.error(o),"";throw new Error(o)}}}return s}},H=class{options;block;constructor(e){this.options=e||P}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?v.lex:v.lexInline}provideParser(){return this.block?A.parse:A.parseInline}},Wr=class{defaults=ge();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=A;Renderer=re;TextRenderer=ve;Lexer=v;Tokenizer=te;Hooks=H;constructor(...e){this.use(...e)}walkTokens(e,t){let r=[];for(let s of e)switch(r=r.concat(t.call(this,s)),s.type){case"table":{let n=s;for(let i of n.header)r=r.concat(this.walkTokens(i.tokens,t));for(let i of n.rows)for(let a of i)r=r.concat(this.walkTokens(a.tokens,t));break}case"list":{let n=s;r=r.concat(this.walkTokens(n.items,t));break}default:{let n=s;this.defaults.extensions?.childTokens?.[n.type]?this.defaults.extensions.childTokens[n.type].forEach(i=>{let a=n[i].flat(1/0);r=r.concat(this.walkTokens(a,t))}):n.tokens&&(r=r.concat(this.walkTokens(n.tokens,t)))}}return r}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(r=>{let s={...r};if(s.async=this.defaults.async||s.async||!1,r.extensions&&(r.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let i=t.renderers[n.name];i?t.renderers[n.name]=function(...a){let o=n.renderer.apply(this,a);return o===!1&&(o=i.apply(this,a)),o}:t.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||n.level!=="block"&&n.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let i=t[n.level];i?i.unshift(n.tokenizer):t[n.level]=[n.tokenizer],n.start&&(n.level==="block"?t.startBlock?t.startBlock.push(n.start):t.startBlock=[n.start]:n.level==="inline"&&(t.startInline?t.startInline.push(n.start):t.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(t.childTokens[n.name]=n.childTokens)}),s.extensions=t),r.renderer){let n=this.defaults.renderer||new re(this.defaults);for(let i in r.renderer){if(!(i in n))throw new Error(`renderer '${i}' does not exist`);if(["options","parser"].includes(i))continue;let a=i,o=r.renderer[a],l=n[a];n[a]=(...u)=>{let c=o.apply(n,u);return c===!1&&(c=l.apply(n,u)),c||""}}s.renderer=n}if(r.tokenizer){let n=this.defaults.tokenizer||new te(this.defaults);for(let i in r.tokenizer){if(!(i in n))throw new Error(`tokenizer '${i}' does not exist`);if(["options","rules","lexer"].includes(i))continue;let a=i,o=r.tokenizer[a],l=n[a];n[a]=(...u)=>{let c=o.apply(n,u);return c===!1&&(c=l.apply(n,u)),c}}s.tokenizer=n}if(r.hooks){let n=this.defaults.hooks||new H;for(let i in r.hooks){if(!(i in n))throw new Error(`hook '${i}' does not exist`);if(["options","block"].includes(i))continue;let a=i,o=r.hooks[a],l=n[a];H.passThroughHooks.has(i)?n[a]=u=>{if(this.defaults.async&&H.passThroughHooksRespectAsync.has(i))return(async()=>{let p=await o.call(n,u);return l.call(n,p)})();let c=o.call(n,u);return l.call(n,c)}:n[a]=(...u)=>{if(this.defaults.async)return(async()=>{let p=await o.apply(n,u);return p===!1&&(p=await l.apply(n,u)),p})();let c=o.apply(n,u);return c===!1&&(c=l.apply(n,u)),c}}s.hooks=n}if(r.walkTokens){let n=this.defaults.walkTokens,i=r.walkTokens;s.walkTokens=function(a){let o=[];return o.push(i.call(this,a)),n&&(o=o.concat(n.call(this,a))),o}}this.defaults={...this.defaults,...s}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return v.lex(e,t??this.defaults)}parser(e,t){return A.parse(e,t??this.defaults)}parseMarkdown(e){return(t,r)=>{let s={...r},n={...this.defaults,...s},i=this.onError(!!n.silent,!!n.async);if(this.defaults.async===!0&&s.async===!1)return i(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof t>"u"||t===null)return i(new Error("marked(): input parameter is undefined or null"));if(typeof t!="string")return i(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(t)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=e),n.async)return(async()=>{let a=n.hooks?await n.hooks.preprocess(t):t,o=await(n.hooks?await n.hooks.provideLexer():e?v.lex:v.lexInline)(a,n),l=n.hooks?await n.hooks.processAllTokens(o):o;n.walkTokens&&await Promise.all(this.walkTokens(l,n.walkTokens));let u=await(n.hooks?await n.hooks.provideParser():e?A.parse:A.parseInline)(l,n);return n.hooks?await n.hooks.postprocess(u):u})().catch(i);try{n.hooks&&(t=n.hooks.preprocess(t));let a=(n.hooks?n.hooks.provideLexer():e?v.lex:v.lexInline)(t,n);n.hooks&&(a=n.hooks.processAllTokens(a)),n.walkTokens&&this.walkTokens(a,n.walkTokens);let o=(n.hooks?n.hooks.provideParser():e?A.parse:A.parseInline)(a,n);return n.hooks&&(o=n.hooks.postprocess(o)),o}catch(a){return i(a)}}}onError(e,t){return r=>{if(r.message+=`
61
+ Please report this to https://github.com/markedjs/marked.`,e){let s="<p>An error occurred:</p><pre>"+S(r.message+"",!0)+"</pre>";return t?Promise.resolve(s):s}if(t)return Promise.reject(r);throw r}}},C=new Wr;function k(e,t){return C.parse(e,t)}k.options=k.setOptions=function(e){return C.setOptions(e),k.defaults=C.defaults,Ke(k.defaults),k};k.getDefaults=ge;k.defaults=P;k.use=function(...e){return C.use(...e),k.defaults=C.defaults,Ke(k.defaults),k};k.walkTokens=function(e,t){return C.walkTokens(e,t)};k.parseInline=C.parseInline;k.Parser=A;k.parser=A.parse;k.Renderer=re;k.TextRenderer=ve;k.Lexer=v;k.lexer=v.lex;k.Tokenizer=te;k.Hooks=H;k.parse=k;var nn=k.options,sn=k.setOptions,an=k.use,ln=k.walkTokens,on=k.parseInline;var cn=A.parse,un=v.lex;k.use({gfm:!0,breaks:!0,async:!1});var Gr=new Ge({whiteList:{ol:["start"],li:["value"],"calcite-table":["caption","bordered","striped","layout","scale","class"],"calcite-table-row":["slot","class"],"calcite-table-header":["heading","alignment","description","class"],"calcite-table-cell":["alignment","colspan","rowspan","class"],pre:["class"],code:["class"]}},!0);function Zr(e){return Gr.sanitize(e)}function ut(e,t){let r=e.indexOf("{",t),s=e.indexOf("[",t);return r===-1?s:s===-1?r:Math.min(r,s)}function jr(e){if(e.trimStart().startsWith("```"))return null;for(let t=ut(e,0);t!==-1;t=ut(e,t+1)){let r=0,s=0;for(let n=t;n<e.length;n++){let i=e[n];if(i==="{"?r++:i==="}"?r--:i==="["?s++:i==="]"&&s--,r<0||s<0)break;if(r===0&&s===0&&n>t)return e.slice(t,n+1)}}return null}function mn(e){if(!e)return"";let t=e,r=jr(e);if(r)try{let i=JSON.parse(r),a=`
62
+
63
+ \`\`\`json
64
+ ${JSON.stringify(i,null,2)}
65
+ \`\`\`
66
+
67
+ `;t=e.replace(r,a)}catch{}let s=Xr(t),n=Qr(s);return Zr(n)}function Xr(e){return e?k.parse(e,{async:!1}):""}function Qr(e){if(!e||typeof DOMParser>"u")return e;try{let t=new DOMParser().parseFromString(e,"text/html");return Array.from(t.querySelectorAll("table")).forEach((r,s)=>{let n=t.createElement("calcite-table");n.setAttribute("caption",`Table ${s+1}`),n.setAttribute("striped","true");let i=r.querySelector("thead");if(i){let o=Array.from(i.querySelectorAll("tr"));for(let l of o){let u=t.createElement("calcite-table-row");u.setAttribute("slot","table-header");let c=Array.from(l.querySelectorAll("th, td"));for(let p of c){let f=(p.textContent??"").trim(),h=t.createElement("calcite-table-header");h.setAttribute("heading",f),u.appendChild(h)}n.appendChild(u)}}let a=r.querySelector("tbody");(a?Array.from(a.querySelectorAll("tr")):Array.from(r.querySelectorAll("tr")).filter(o=>!i?.contains(o))).forEach((o,l)=>{let u=t.createElement("calcite-table-row"),c=!i&&l===0&&o.querySelectorAll("th").length>0;c&&u.setAttribute("slot","table-header");let p=Array.from(o.querySelectorAll("th, td"));for(let f of p){if(c&&f.localName==="th"){let m=(f.textContent??"").trim(),$=t.createElement("calcite-table-header");$.setAttribute("heading",m),u.appendChild($);return}let h=t.createElement("calcite-table-cell"),g=f.getAttribute("colspan"),b=f.getAttribute("rowspan");g&&h.setAttribute("colspan",g),b&&h.setAttribute("rowspan",b),h.innerHTML=f.innerHTML,u.appendChild(h)}n.appendChild(u)}),r.replaceWith(n)}),t.body.innerHTML}catch{return e}}export{Kr as a,mn as b};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as o,b as l}from"./EJ4UHNLB.js";import{g as i,h as t,v as c,w as a,z as r}from"./XJBDOKVO.js";import"./2GMCG6SX.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};
2
+ import{a as o,b as l}from"./2SN74N7F.js";import{g as i,h as t,v as c,w as a,z as r}from"./XJBDOKVO.js";import"./2GMCG6SX.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};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import b from"./C3GRPYZJ.js";import a from"./3CF3CQKC.js";import{a as r,b as i}from"./GIZ3VXFU.js";import"./JA77AZOL.js";import"./2LSVWAZO.js";import{v as s,z as e}from"./XJBDOKVO.js";import"./2GMCG6SX.js";export default $arcgis.t(([,{f:a}])=>{var t=class extends s{constructor(){super(...arguments),this.agent=a}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"),i(this)}};e("arcgis-assistant-help-agent",t);return t},a,b)
2
+ import b from"./5CXPY6RU.js";import a from"./3CF3CQKC.js";import{a as r,b as i}from"./GIZ3VXFU.js";import"./JA77AZOL.js";import"./2LSVWAZO.js";import{v as s,z as e}from"./XJBDOKVO.js";import"./2GMCG6SX.js";export default $arcgis.t(([,{f:a}])=>{var t=class extends s{constructor(){super(...arguments),this.agent=a}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"),i(this)}};e("arcgis-assistant-help-agent",t);return t},a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import b from"./C3GRPYZJ.js";import a from"./3CF3CQKC.js";import{a as e,b as i}from"./GIZ3VXFU.js";import"./JA77AZOL.js";import"./2LSVWAZO.js";import{v as s,z as r}from"./XJBDOKVO.js";import"./2GMCG6SX.js";export default $arcgis.t(([,{e:a}])=>{var t=class extends s{constructor(){super(...arguments),this.agent=a}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"),i(this)}};r("arcgis-assistant-layer-styling-agent",t);return t},a,b)
2
+ import b from"./5CXPY6RU.js";import a from"./3CF3CQKC.js";import{a as e,b as i}from"./GIZ3VXFU.js";import"./JA77AZOL.js";import"./2LSVWAZO.js";import{v as s,z as r}from"./XJBDOKVO.js";import"./2GMCG6SX.js";export default $arcgis.t(([,{e:a}])=>{var t=class extends s{constructor(){super(...arguments),this.agent=a}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"),i(this)}};r("arcgis-assistant-layer-styling-agent",t);return t},a,b)
@@ -4,7 +4,7 @@ import a from"./3CF3CQKC.js";export default $arcgis.t(([ft,me,Pe,gt,{addressToLo
4
4
 
5
5
  `);return o[o.length-1]?.trim()===t?e:`${e}
6
6
 
7
- ${t}`},default:()=>""}),intent:p({reducer:(e,r)=>r}),vectorSearchLayerResults:p({reducer:(e,r)=>r,default:()=>[]}),vectorSearchFieldResults:p({reducer:(e,r)=>r})});async function Ct(e,r){let t=V.getDefault().helperServices.geocode.find(q=>q.name==="ArcGIS World Geocoding Service");if(!t)throw new Error("ArcGIS World Geocoding Service not found in helperServices.");let a=t.url,o=`${ie.assetsPath?.endsWith("/")?ie.assetsPath:`${ie.assetsPath}/`}esri/images/search/search-symbol-32.png`;console.log(`[goToAddress] Geocoding: ${e} using ${a}`);let i=(await pt(a,{address:{SingleLine:e},outFields:["Match_addr"]}))?.[0];if(!i?.extent)throw new Error(`Could not find location for: ${e}`);let{xmin:n,ymin:l,xmax:d,ymax:c,spatialReference:u}=i.extent,m=new Pe({xmin:n,ymin:l,xmax:d,ymax:c,spatialReference:u}),f=(n+d)/2,g=(l+c)/2,b=new me({x:f,y:g,spatialReference:u}),v=new gt({url:o,width:24,height:24}),S=new ft({geometry:b,symbol:v});return r.graphics.removeAll(),r.graphics.add(S),await r.goTo(m),`Successfully zoomed to: ${i.address}. Location coordinates: x=${f}, y=${g}, wkid=${u.wkid}`}var jt=["mapView"];function I(e){let r=e?.configurable?.context;if(!r||typeof r!="object")throw new Error("NavigationAgent context missing");let t=jt.filter(a=>!(a in r));if(t.length)throw new Error(`NavigationAgent context missing: ${t.join(", ")}`);return r}async function Vt({address:e},r){let{mapView:t}=I(r);return await Ct(e,t)}var Ot=s.object({address:s.string().describe("The full address or place name to locate.")}),Dt=y(Vt,{name:"goToAddress",description:"Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",schema:Ot});async function Pt(e,r){let t=r.map.bookmarks;if(!t||t.length===0)throw new Error("No bookmarks found in the map.");let a=t.find(i=>i.name===e);if(!a)throw new Error(`Bookmark with name "${e}" not found.`);let o=a.viewpoint;if(!o)throw new Error(`Bookmark with name "${e}" does not have a valid viewpoint.`);return await r.goTo(o),`Navigated to bookmark: ${e}`}async function Gt({bookmarkName:e},r){let{mapView:t}=I(r);return await Promise.resolve(Pt(e,t))}var Bt=A.object({bookmarkName:A.string().describe("The name of the bookmark to navigate to.")}),Qt=y(Gt,{name:"goToBookmark",description:"Go to the extent of the bookmark with the given name.",schema:Bt});async function Wt(e,r,t){let a=t.map?.allLayers.find(i=>i.id===e);if(!a)return`Error: Layer with id ${e} not found`;let o=a.createQuery();o.where=r??"1=1";try{let{extent:i,count:n}=await a.queryExtent(o);if(n===0)return`No features found in ${a.title} matching: ${r}`;if(i)await t.goTo(i);else return`Error: Unable to determine extent for ${a.title}`;return`Successfully zoomed to ${n} feature(s) in ${a.title}`}catch(i){return console.error("Error in goToFeatures:",i),`Error: ${i instanceof Error?i.message:"Unknown error"}`}}async function Kt({layerId:e,where:r},t){let{mapView:a}=I(t);return await Wt(e,r,a)}var Ut=A.object({layerId:A.string().describe("The layerId of the layer to zoom to."),where:A.string().describe("The sql-92 where clause used to query features to zoom to")}),Ht=y(Kt,{name:"goToFeatures",description:"Go to the features that match the given filter related to the given layerId.",schema:Ut});async function Jt(e){let r=new Pe({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}}).expand(.7);return await e.goTo(r),"Successfully zoomed to world extent"}async function Zt(e,r){let{mapView:t}=I(r);return await Jt(t)}var Xt=A.object({}),Yt=y(Zt,{name:"goToFullExtent",description:"Zooms the map to the full world extent using Esri's Geocoding Service.",schema:Xt});async function er(e){let r=e.map.initialViewProperties?.viewpoint?.targetGeometry;if(r)await e.goTo(r);else throw new Error("Initial extent is undefined");return"Successfully zoomed to home extent"}async function tr(e,r){let{mapView:t}=I(r);return await er(t)}var rr=s.object({}),ar=y(tr,{name:"goToHomeExtent",description:"Go to the initial web map view extent",schema:rr});async function or(e,r){await r.when();let t=r.map?.allLayers.find(o=>o.id===e);if(!t)return console.warn(`[goToLayer] No matching FeatureLayer found for: ${e}`),`Could not find layer for: ${e}`;console.log(`[goToLayer] Zooming to layer: ${t.title}`);let a;return(t.type==="link-chart"||t.type==="knowledge-graph-sublayer")&&r.map?.activeLinkChartLayer?a=r.map.diagramNodesExtent:a=t.fullExtent,a?(await r.goTo(a),t.visible=!0,`Successfully zoomed to: ${t.title??""}`):"Layer has no defined extent. Cannot zoom to layer."}async function ir({layerId:e},r){let{mapView:t}=I(r);return await or(e,t)}var nr=A.object({layerId:A.string().describe("The id of the layer to navigate to")}),sr=y(ir,{name:"goToLayer",description:"Zooms the map view to the full extent of the top matching layer.",schema:nr});async function lr(e,r){return await r.goTo({scale:e}),`Successfully zoomed to: ${e}`}async function cr({scale:e},r){let{mapView:t}=I(r);return await lr(e,t)}var dr=s.object({scale:s.number().describe("The map scale of the view to go to.")}),ur=y(cr,{name:"goToScale",description:"Go to the specified view scale.",schema:dr});async function hr(e,r,t){let a={target:new me({longitude:e.longitude,latitude:e.latitude,spatialReference:{wkid:4326}})};return t?.zoom!==void 0&&(a.zoom=t.zoom),t?.scale!==void 0&&(a.scale=t.scale),await r.goTo(a),`Successfully navigated to: ${[`(${e.latitude}\xB0, ${e.longitude}\xB0)`,t?.zoom!==void 0?`zoom ${t.zoom}`:"",t?.scale!==void 0?`scale 1:${t.scale}`:""].filter(Boolean).join(", ")}`}async function mr({center:e,zoom:r,scale:t},a){let{mapView:o}=I(a);return await hr(e,o,{zoom:r,scale:t})}var fr=s.object({center:s.object({longitude:s.number().describe("The longitude (x-coordinate) of the point to navigate to."),latitude:s.number().describe("The latitude (y-coordinate) of the point to navigate to.")}),zoom:s.number().optional().describe("The zoom level. Higher values = more zoomed in."),scale:s.number().optional().describe("The map scale. Alternative to zoom. Smaller numbers = more zoomed in.")}),gr=y(mr,{name:"goToViewpoint",description:"Go to the specified viewpoint. This can contain a combination of scale, center, zoom, etc.",schema:fr});async function pr(e,r){return await r.goTo({zoom:e}),`Successfully zoomed to: ${e}`}async function yr({zoom:e},r){let{mapView:t}=I(r);return await pr(e,t)}var wr=s.object({zoom:s.number().min(1).max(20).describe("The zoom level of the view to go to.")}),br=y(yr,{name:"goToZoom",description:'Go to the specified zoom level. If input is generic (e.g. "zoom in", then only zoom to the next appropriate level - increase level for zooming in and decrease for zooming out.).',schema:wr}),we=[Dt,Qt,Ht,Yt,ar,sr,ur,gr,br],Me=Object.assign({"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_lc_context.md":()=>import("./QZJ4SRT5.js").then(e=>e.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_intent_prompt.md":()=>import("./BN4IYD74.js").then(e=>e.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_tool_prompt.md":()=>import("./M32BWJ4D.js").then(e=>e.default),"../agents/dataExploration/prompts/data_explore_filter_prompt.md":()=>import("./YNQSQY4Y.js").then(e=>e.default),"../agents/dataExploration/prompts/data_explore_query_prompt.md":()=>import("./G65WIFNI.js").then(e=>e.default),"../agents/dataExploration/prompts/summarize_query_response_prompt.md":()=>import("./WE5QPXDZ.js").then(e=>e.default),"../agents/help/prompts/help_prompt.md":()=>import("./XOLWLHTD.js").then(e=>e.default),"../agents/layerFilter/prompts/layer_filter_prompt.md":()=>import("./Y4325EIX.js").then(e=>e.default),"../agents/layerQuery/prompts/data_query_prompt.md":()=>import("./3YA7AYJB.js").then(e=>e.default),"../agents/layerQuery/prompts/summarize_query_response_prompt.md":()=>import("./JVPRUGML.js").then(e=>e.default),"../agents/layerStyling/prompts/layer_styling_prompt.md":()=>import("./TBTPT64L.js").then(e=>e.default),"../agents/navigation/prompts/navigation_intent_prompt.md":()=>import("./QYS2QVQH.js").then(e=>e.default),"../agents/navigation/prompts/navigation_tool_prompt.md":()=>import("./IMPD5HA4.js").then(e=>e.default)});async function $(e){let r=Object.entries(Me).find(([t])=>t.endsWith(`/${e}.md`));if(console.log(`entry for prompt "${e}":`,r),!r)throw new Error(`Prompt not found: ${e}
7
+ ${t}`},default:()=>""}),intent:p({reducer:(e,r)=>r}),vectorSearchLayerResults:p({reducer:(e,r)=>r,default:()=>[]}),vectorSearchFieldResults:p({reducer:(e,r)=>r})});async function Ct(e,r){let t=V.getDefault().helperServices.geocode.find(q=>q.name==="ArcGIS World Geocoding Service");if(!t)throw new Error("ArcGIS World Geocoding Service not found in helperServices.");let a=t.url,o=`${ie.assetsPath?.endsWith("/")?ie.assetsPath:`${ie.assetsPath}/`}esri/images/search/search-symbol-32.png`;console.log(`[goToAddress] Geocoding: ${e} using ${a}`);let i=(await pt(a,{address:{SingleLine:e},outFields:["Match_addr"]}))?.[0];if(!i?.extent)throw new Error(`Could not find location for: ${e}`);let{xmin:n,ymin:l,xmax:d,ymax:c,spatialReference:u}=i.extent,m=new Pe({xmin:n,ymin:l,xmax:d,ymax:c,spatialReference:u}),f=(n+d)/2,g=(l+c)/2,b=new me({x:f,y:g,spatialReference:u}),v=new gt({url:o,width:24,height:24}),S=new ft({geometry:b,symbol:v});return r.graphics.removeAll(),r.graphics.add(S),await r.goTo(m),`Successfully zoomed to: ${e}. Location coordinates: x=${f}, y=${g}, wkid=${u.wkid}`}var jt=["mapView"];function I(e){let r=e?.configurable?.context;if(!r||typeof r!="object")throw new Error("NavigationAgent context missing");let t=jt.filter(a=>!(a in r));if(t.length)throw new Error(`NavigationAgent context missing: ${t.join(", ")}`);return r}async function Vt({address:e},r){let{mapView:t}=I(r);return await Ct(e,t)}var Ot=s.object({address:s.string().describe("The full address or place name to locate.")}),Dt=y(Vt,{name:"goToAddress",description:"Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",schema:Ot});async function Pt(e,r){let t=r.map.bookmarks;if(!t||t.length===0)throw new Error("No bookmarks found in the map.");let a=t.find(i=>i.name===e);if(!a)throw new Error(`Bookmark with name "${e}" not found.`);let o=a.viewpoint;if(!o)throw new Error(`Bookmark with name "${e}" does not have a valid viewpoint.`);return await r.goTo(o),`Navigated to bookmark: ${e}`}async function Gt({bookmarkName:e},r){let{mapView:t}=I(r);return await Promise.resolve(Pt(e,t))}var Bt=A.object({bookmarkName:A.string().describe("The name of the bookmark to navigate to.")}),Qt=y(Gt,{name:"goToBookmark",description:"Go to the extent of the bookmark with the given name.",schema:Bt});async function Wt(e,r,t){let a=t.map?.allLayers.find(i=>i.id===e);if(!a)return`Error: Layer with id ${e} not found`;let o=a.createQuery();o.where=r??"1=1";try{let{extent:i,count:n}=await a.queryExtent(o);if(n===0)return`No features found in ${a.title} matching: ${r}`;if(i)await t.goTo(i);else return`Error: Unable to determine extent for ${a.title}`;return`Successfully zoomed to ${n} feature(s) in ${a.title}`}catch(i){return console.error("Error in goToFeatures:",i),`Error: ${i instanceof Error?i.message:"Unknown error"}`}}async function Kt({layerId:e,where:r},t){let{mapView:a}=I(t);return await Wt(e,r,a)}var Ut=A.object({layerId:A.string().describe("The layerId of the layer to zoom to."),where:A.string().describe("The sql-92 where clause used to query features to zoom to")}),Ht=y(Kt,{name:"goToFeatures",description:"Go to the features that match the given filter related to the given layerId.",schema:Ut});async function Jt(e){let r=new Pe({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}}).expand(.7);return await e.goTo(r),"Successfully zoomed to world extent"}async function Zt(e,r){let{mapView:t}=I(r);return await Jt(t)}var Xt=A.object({}),Yt=y(Zt,{name:"goToFullExtent",description:"Zooms the map to the full world extent using Esri's Geocoding Service.",schema:Xt});async function er(e){let r=e.map.initialViewProperties?.viewpoint?.targetGeometry;if(r)await e.goTo(r);else throw new Error("Initial extent is undefined");return"Successfully zoomed to home extent"}async function tr(e,r){let{mapView:t}=I(r);return await er(t)}var rr=s.object({}),ar=y(tr,{name:"goToHomeExtent",description:"Go to the initial web map view extent",schema:rr});async function or(e,r){await r.when();let t=r.map?.allLayers.find(o=>o.id===e);if(!t)return console.warn(`[goToLayer] No matching FeatureLayer found for: ${e}`),`Could not find layer for: ${e}`;console.log(`[goToLayer] Zooming to layer: ${t.title}`);let a;return(t.type==="link-chart"||t.type==="knowledge-graph-sublayer")&&r.map?.activeLinkChartLayer?a=r.map.diagramNodesExtent:a=t.fullExtent,a?(await r.goTo(a),t.visible=!0,`Successfully zoomed to: ${t.title??""}`):"Layer has no defined extent. Cannot zoom to layer."}async function ir({layerId:e},r){let{mapView:t}=I(r);return await or(e,t)}var nr=A.object({layerId:A.string().describe("The id of the layer to navigate to")}),sr=y(ir,{name:"goToLayer",description:"Zooms the map view to the full extent of the top matching layer.",schema:nr});async function lr(e,r){return await r.goTo({scale:e}),`Successfully zoomed to: ${e}`}async function cr({scale:e},r){let{mapView:t}=I(r);return await lr(e,t)}var dr=s.object({scale:s.number().describe("The map scale of the view to go to.")}),ur=y(cr,{name:"goToScale",description:"Go to the specified view scale.",schema:dr});async function hr(e,r,t){let a={target:new me({longitude:e.longitude,latitude:e.latitude,spatialReference:{wkid:4326}})};return t?.zoom!==void 0&&(a.zoom=t.zoom),t?.scale!==void 0&&(a.scale=t.scale),await r.goTo(a),`Successfully navigated to: ${[`(${e.latitude}\xB0, ${e.longitude}\xB0)`,t?.zoom!==void 0?`zoom ${t.zoom}`:"",t?.scale!==void 0?`scale 1:${t.scale}`:""].filter(Boolean).join(", ")}`}async function mr({center:e,zoom:r,scale:t},a){let{mapView:o}=I(a);return await hr(e,o,{zoom:r,scale:t})}var fr=s.object({center:s.object({longitude:s.number().describe("The longitude (x-coordinate) of the point to navigate to."),latitude:s.number().describe("The latitude (y-coordinate) of the point to navigate to.")}),zoom:s.number().optional().describe("The zoom level. Higher values = more zoomed in."),scale:s.number().optional().describe("The map scale. Alternative to zoom. Smaller numbers = more zoomed in.")}),gr=y(mr,{name:"goToViewpoint",description:"Go to the specified viewpoint. This can contain a combination of scale, center, zoom, etc.",schema:fr});async function pr(e,r){return await r.goTo({zoom:e}),`Successfully zoomed to: ${e}`}async function yr({zoom:e},r){let{mapView:t}=I(r);return await pr(e,t)}var wr=s.object({zoom:s.number().min(1).max(20).describe("The zoom level of the view to go to.")}),br=y(yr,{name:"goToZoom",description:'Go to the specified zoom level. If input is generic (e.g. "zoom in", then only zoom to the next appropriate level - increase level for zooming in and decrease for zooming out.).',schema:wr}),we=[Dt,Qt,Ht,Yt,ar,sr,ur,gr,br],Me=Object.assign({"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_lc_context.md":()=>import("./QZJ4SRT5.js").then(e=>e.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_intent_prompt.md":()=>import("./BN4IYD74.js").then(e=>e.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_tool_prompt.md":()=>import("./M32BWJ4D.js").then(e=>e.default),"../agents/dataExploration/prompts/data_explore_filter_prompt.md":()=>import("./YNQSQY4Y.js").then(e=>e.default),"../agents/dataExploration/prompts/data_explore_query_prompt.md":()=>import("./G65WIFNI.js").then(e=>e.default),"../agents/dataExploration/prompts/summarize_query_response_prompt.md":()=>import("./WE5QPXDZ.js").then(e=>e.default),"../agents/help/prompts/help_prompt.md":()=>import("./XOLWLHTD.js").then(e=>e.default),"../agents/layerFilter/prompts/layer_filter_prompt.md":()=>import("./Y4325EIX.js").then(e=>e.default),"../agents/layerQuery/prompts/data_query_prompt.md":()=>import("./3YA7AYJB.js").then(e=>e.default),"../agents/layerQuery/prompts/summarize_query_response_prompt.md":()=>import("./JVPRUGML.js").then(e=>e.default),"../agents/layerStyling/prompts/layer_styling_prompt.md":()=>import("./TBTPT64L.js").then(e=>e.default),"../agents/navigation/prompts/navigation_intent_prompt.md":()=>import("./QYS2QVQH.js").then(e=>e.default),"../agents/navigation/prompts/navigation_tool_prompt.md":()=>import("./IMPD5HA4.js").then(e=>e.default)});async function $(e){let r=Object.entries(Me).find(([t])=>t.endsWith(`/${e}.md`));if(console.log(`entry for prompt "${e}":`,r),!r)throw new Error(`Prompt not found: ${e}
8
8
  Available prompts:
9
9
  ${Object.keys(Me).join(`
10
10
  `)}`);return await r[1]()}var vr=(e,r=3)=>e.filter(t=>t instanceof ae).slice(-r),T=(e,r=3)=>{let t=e.map((o,i)=>o instanceof ae?i:-1).filter(o=>o!==-1);if(t.length===0)return[];let a=t.length>r?t[t.length-r]:t[0];return e.slice(a)},N=(e,r=" ")=>vr(e).map(t=>t.content).join(r).trim();async function Sr(e,r){let t=await $("navigation_tool_prompt"),{mapView:a}=I(r),o=a.map,i=e.vectorSearchLayerResults?.length>0?e.vectorSearchLayerResults.map((b,v)=>`${v+1}. layerId=${b.id} | title=${b.title??""} | name=${b.name??""} | score=${b.score.toFixed(2)}`).join(`
@@ -44,9 +44,7 @@ ${c.results.map(u=>` - ${u.name} (${u.score.toFixed(2)})`).join(`
44
44
 
45
45
  `);return o[o.length-1]?.trim()===t?e:`${e}
46
46
 
47
- ${t}`},default:()=>""}),vectorSearchLayerIds:p(),vectorSearchFieldResults:p(),layerFieldInfo:p(),queryResponse:p()}),Nr=async(e,r)=>(await h({text:"Exiting Data Exploration agent"},r),e),Q=async(e,r)=>{let t=e.tool_calls??[];if(t.length===0){await h({text:`LLM did not request any tool calls: ${String(e?.content)}`},r);return}await Promise.all(t.map(async a=>await h({text:`LLM requested tool call with arguments: ${JSON.stringify(a.args,null,2)}`},r))),console.log("LLM response:",JSON.stringify(e.tool_calls,null,2))},qr=["mapView"];function M(e){let r=e?.configurable?.context;if(!r||typeof r!="object")throw new Error("DataExplorationAgent context missing");let t=qr.filter(a=>!(a in r));if(t.length)throw new Error(`DataExplorationAgent context missing: ${t.join(", ")}`);return r}var Ar=e=>{let r=e.map?.allLayers.filter(a=>a.type==="feature"),t=0;return r?.forEach(a=>{let o=a;o.featureEffect&&(o.featureEffect=null,t++)}),t>0?`Cleared filters from ${t} layer(s). View unchanged.`:"No active filters to clear. View unchanged."},Rr=async(e,r)=>{let{mapView:t}=M(r);return Ar(t)},Mr=y(Rr,{name:"clearFilters",description:"Clears all feature effects/filters from the map but does NOT change the current view. Use when user says 'clear filters', 'reset filters', 'remove filters', 'show all features', or wants to remove emphasis without navigating anywhere.",schema:s.object({})}),zr=async e=>{e.map?.allLayers.filter(t=>t.type==="feature")?.forEach(t=>{let a=t;a.featureEffect&&(a.featureEffect=null)});let r=e.map.initialViewProperties?.viewpoint?.targetGeometry;return r?(await e.goTo(r),"Cleared all filters and returned to home extent."):"Cleared all filters. Could not determine home extent."},Cr=async(e,r)=>{let{mapView:t}=M(r);return await zr(t)},jr=y(Cr,{name:"resetMap",description:"Clears all feature effects/filters from the map AND zooms to the home extent (initial map view). Use when user says 'reset map', 'reset the map', 'start over', or wants to both clear filters and return to the initial view.",schema:s.object({})});function se(e){return"point"in e&&e.point!==void 0}function le(e){return"layerId"in e&&e.layerId!==void 0}var Y=async(e,r)=>{if(se(e)){let{point:t}=e;return{geometry:new me({x:t.x,y:t.y,spatialReference:t.spatialReference?{wkid:t.spatialReference.wkid}:r.spatialReference})}}if(le(e)){let t=r.map?.allLayers.find(a=>a.id===e.layerId);if(!t)return{error:`Could not find geometry layer with ID: ${e.layerId}`};try{let a=await t.queryFeatures({where:e.where,returnGeometry:!0,outSpatialReference:r.spatialReference});if(!a.features.length)return{error:`No features found in geometry layer with the specified where clause: ${e.where}`};let o;if(a.features.length===1){let i=a.features[0].geometry;if(!i)return{error:"The geometry of the first feature is undefined or null."};o=i}else{let i=a.features.map(l=>l.geometry),n=X.executeMany(i);if(!n)return{error:"Failed to create a combined geometry."};o=n}return o.spatialReference||(o.spatialReference=r.spatialReference),{geometry:o}}catch(a){return{error:`Failed to query geometry: ${String(a)}`}}}return{error:"Invalid geometry configuration provided"}},Vr=async(e,r,t)=>{let a=e.map?.allLayers.find(i=>i.id===r),o=a.createQuery();o.where=t??"1=1";try{let{extent:i,count:n}=await a.queryExtent(o);return!i||n===0?{success:!1,error:`No features found for where clause: ${t}`}:(await e.goTo(i),{success:!0})}catch(i){return{success:!1,error:i instanceof Error?i.message:String(i)}}},Or=async(e,r,t,a,o)=>{let i=r.map?.allLayers.find(c=>c.id===e.layerId);if(!i)return`Could not find target layer with ID: ${e.layerId}`;let n;if(o){let c=await Y(o,r);if("error"in c)return c.error;n=c.geometry}i.featureEffect=null,i.featureEffect=new Ge({filter:new B({where:e.where,geometry:n,spatialRelationship:"intersects",distance:o?.distance,units:o?.units}),includedEffect:t,excludedEffect:a}),i.visible=!0;let l=await Vr(r,o?o.layerId:e.layerId,o?o.where:e.where),d=i.title??e.layerId;return l.success?`Applied feature effects to target layer "${i.title??e.layerId}"${o?` using geometry from layer "${o.layerId}"`:""}.`:`Applied filter to "${d}" but no features matched. ${l.error}`},Dr=["feet","kilometers","meters","miles","nautical-miles","us-nautical-miles"],j=s.enum(Dr),Pr=async({targetLayer:e,geometryLayer:r,includedEffect:t="drop-shadow(2px, 2px, 2px, gray)",excludedEffect:a="grayscale(100%) opacity(60%) blur(2px)"},o)=>{let{mapView:i}=M(o);return await Or(e,i,t,a,r)},Gr=s.object({targetLayer:s.object({layerId:s.string().describe("The layerId of the layer on which to set a feature effect."),where:s.string().describe("The SQL-92 where clause representing the features to emphasize.")}),geometryLayer:s.object({layerId:s.string().describe("The layerId of the layer containing the geometry by which to filter."),where:s.string().describe("The SQL-92 where clause representing the features from which to filter features from the targetLayer by geometry."),distance:s.number().describe("The distance by which to filter the input geometry."),units:j.describe("The units used to filter by geometry and distance.")}).optional().describe("Optional geometry-based filtering parameters for spatial queries."),includedEffect:s.string().default("drop-shadow(2px, 2px, 2px, gray)").describe("The effect applied to features that meet the filter requirements. Valid effects include: bloom, blur, brightness, contrast, drop-shadow, grayscale, hue-rotate, invert, opacity, saturate, and sepia. Prefer default unless specified."),excludedEffect:s.string().default("grayscale(100%) opacity(60%) blur(2px)").describe("The effect applied to features that do not meet the filter requirements. Valid effects include: bloom, blur, brightness, contrast, drop-shadow, grayscale, hue-rotate, invert, opacity, saturate, and sepia. Prefer default unless specified.")}),Br=y(Pr,{name:"setFeatureEffect",description:"Sets a feature effect on a given layer with given filter parameters and feature effects to emphasize certain features that meet a filter requirement. If no feature effect information is provided, then use the default effect provided.",schema:Gr}),ce=(e,r,t)=>{if(e&&typeof e!="function"){let a="getField"in t&&t.getField?.(e),o=a&&"getFieldDomain"in t&&t.getFieldDomain?t.getFieldDomain(a.name):null;if(o?.type==="coded-value"){let i=o.codedValues.find(n=>n.code===r);return i?i.name:null}}return null},Qr=(e,r,t)=>{let a=e.createQuery();return a.outFields=[r],a.where=t||"1=1",a.num=1,a},Wr=async(e,r,t,a)=>{let o=a.map?.allLayers.find(c=>c.id===e),i=Qr(o,r,t.where),n=(await o.queryFeatures(i)).features[0],l=n?n.attributes[r]:null,d=ce(r,l,o)||l;return{tool:"getAttribute",layerName:o.title??e,summary:`${r} = ${d}`,details:{fieldName:r,value:d,where:t.where}}};async function Kr({layerId:e,fieldName:r,query:t},a){let{mapView:o}=M(a),i=await Wr(e,r,t,o);return JSON.stringify(i,null,2)}var Ur=s.object({layerId:s.string().describe("The layerId of the layer containing the field from which to get a value."),fieldName:s.string().describe("The name of the field/attribute from which to get a field value."),query:s.object({where:s.string().describe("The SQL-92 where clause representing the feature from which to get an attribute value.")})}),Hr=y(Kr,{name:"getAttribute",description:"Returns an attribute value for a given feature.",schema:Ur}),be=(e,r)=>r?e.hasAllFeaturesInView:e.hasAllFeatures,Jr=async e=>{let{targetLayer:r,fieldName:t,statisticType:a,mapView:o,layersAndFieldsRegistry:i,geometryLayer:n}=e,l=o.map?.allLayers.find(S=>S.id===r.layerId);if(!l)throw new Error(`Layer '${r.layerId}' not found.`);let d=await o.whenLayerView(l),c=i.get(r.layerId)?.fieldRegistry.get(t);if(!c)throw new Error(`Field '${t}' not found.`);let u,m;if(n){let S=await Y(n,o);if("error"in S)throw new Error(S.error);if(!S.geometry)throw new Error(`No features found matching: ${n.where}`);u={geometryLayerId:n.layerId,geometryWhere:n.where,distance:n.distance,units:n.units,applied:!0},m=new B({geometry:S.geometry,distance:n.distance,units:n.units,spatialRelationship:"intersects"})}let f=be(d,!1),g=null,b=null,v=10;if(c.type!=="geometry"&&c.type!=="oid"&&c.type!=="global-id")try{g=await fe({layer:l,useFeaturesInView:f,view:f?o:void 0,field:t,sqlWhere:r.where,...m&&{filter:m},outStatisticTypes:{include:[a]}}),["string","small-integer","integer"].includes(c.type)&&(b=(await ge({layer:l,useFeaturesInView:f,view:f?o:void 0,field:t,sqlWhere:r.where,...m&&{filter:m}})).uniqueValueInfos.sort((S,q)=>q.count-S.count).slice(0,v))}catch(S){console.error("Statistics error:",S)}return{tool:"getStatistics",layerName:l.title??r.layerId,summary:`${a} = ${typeof g?.[a]=="number"?g[a]:"N/A"}`,details:{fieldName:t,statisticType:a,statistic:g?.[a]??null,summaryStatistics:g,uniqueValues:b,where:r.where,spatialFilterInfo:u}}};async function Zr({targetLayer:e,fieldName:r,statisticType:t,geometryLayer:a},o){let i=w(o,"layersAndFieldsRegistry"),{mapView:n}=M(o),l=await Jr({targetLayer:e,fieldName:r,statisticType:t,mapView:n,layersAndFieldsRegistry:i,geometryLayer:a});return JSON.stringify(l,null,2)}var Xr=s.object({targetLayer:s.object({layerId:s.string().describe("The layerId of the layer containing the field from which to get a value."),where:s.string().describe("The SQL-92 where clause representing the feature from which to get an attribute value.")}),geometryLayer:s.union([s.object({layerId:s.string().describe("The layerId of the layer containing the geometry by which to filter."),where:s.string().describe("The SQL-92 where clause representing the features from which to filter features from the targetLayer by geometry."),distance:s.number().optional().describe("The distance by which to query from the input geometry."),units:j.optional().describe("The units used to query by geometry and distance.")}),s.object({}).strict()]).optional().describe("Optional geometry-based filtering parameters for spatial queries."),fieldName:s.string().describe("The name of the field for which to get statistics. STRICTLY DO NOT use OBJECTID. Use any other field"),statisticType:s.enum(["avg","max","median","min","stddev","sum","variance","nullcount","count"]).describe("The statistic type to calculate.")}),Yr=y(Zr,{name:"getStatistics",description:'Returns one or more summary statistics for the given field. Statistic types include: count, maximum, minimum, average, median, standard deviation, variance, mode, sum, nullcount (number of features without a value for a given field), unique values. For "most common/frequent" questions: Use statisticType "count" on a categorical field. The response includes uniqueValues sorted by frequency (most common first). Statistics can be returned for number, date, and string fields. Also returns frequency analysis for string fields - unique values sorted by occurrence count (most frequent first). Use this for "most common", "most frequent", or "how many of each" questions. Only call this tool when the question requires filtering (e.g. a WHERE clause or spatial constraint) that cannot be satisfied by precomputed stats.',schema:Xr}),ea=async(e,r,t,a)=>{let o=t.map?.allLayers.find(u=>u.id===e.layerId),i=await t.whenLayerView(o),n=o.title??e.layerId,l;if(a){let u=await Y(a,t);if("error"in u)return{tool:"getTopFeatures",layerName:n,summary:"Geometry lookup failed",details:{error:u.error}};if(!u.geometry)return{tool:"getTopFeatures",layerName:n,summary:"No features found for geometry filter",details:{error:`No features found matching: ${a.where}`}};l=u.geometry}let d=e.outFields.length>2?e.outFields:["*"],c=r.groupByFields&&r.groupByFields.length>0;try{let u;if(c){let f=new Be({where:e.where||"1=1",outFields:d,orderByFields:e.orderByFields,geometry:l,spatialRelationship:l?"intersects":void 0,distance:a?.distance,units:a?.units,topFilter:new Qe({topCount:r.topCount,groupByFields:r.groupByFields,orderByFields:r.orderByFields})});u=await o.queryTopFeatures(f)}else{let f=new pe({where:e.where||"1=1",outFields:d,orderByFields:r.orderByFields,num:r.topCount,geometry:l,spatialRelationship:l?"intersects":void 0,distance:a?.distance,units:a?.units,outSpatialReference:t.spatialReference}),g=be(i,!1);try{u=g?await i.queryFeatures(f):await o.queryFeatures(f)}catch(b){console.warn("Client-side query failed, falling back to server:",b),u=await o.queryFeatures(f)}}let m=u.features.map(f=>f.attributes);return{tool:"getTopFeatures",layerName:n,summary:`Top ${r.topCount} features extracted`,details:{topCount:r.topCount,attributes:m,where:e.where,orderByFields:r.orderByFields,...c&&{groupByFields:r.groupByFields}}}}catch(u){return{tool:"getTopFeatures",layerName:n,summary:"Query failed",details:{error:u instanceof Error?u.message:String(u)}}}},ta=async({targetLayer:e,topFilter:r,geometryLayer:t},a)=>{let{mapView:o}=M(a),i=await ea(e,r,o,t);return JSON.stringify(i,null,2)},ra=s.object({targetLayer:s.object({layerId:s.string().describe("The layerId of the layer containing the field from which to get a value."),where:s.string().describe("The SQL-92 where clause representing the feature from which to get an attribute value."),orderByFields:s.array(s.string().describe("The field(s) and order for which to sort the resulting features.")),outFields:s.array(s.string().describe('The fields to include in the output that will be presented to the user. This should include identifying information about the resulting features, like a name or id, along with the values desired in the output. If unsure, choose all fields ("*").').default("*"))}),geometryLayer:s.object({layerId:s.string().describe("The layerId of the layer containing the geometry by which to filter."),where:s.string().describe("The SQL-92 where clause representing the features from which to filter features from the targetLayer by geometry."),distance:s.number().optional().describe("The distance by which to query from the input geometry."),units:j.describe("The units used to query by geometry and distance.").optional()}).optional().describe("Optional geometry-based filtering parameters for spatial queries."),topFilter:s.object({topCount:s.number().describe("Number of top features to return per group."),orderByFields:s.array(s.string().describe("Field(s) to rank by with ASC/DESC. Must be existing field names, not aggregate functions.")),groupByFields:s.array(s.string().describe("Field(s) to group results by. Returns top N per group."))})}),aa=y(ta,{name:"getTopFeatures",description:'Returns top N features ranked by an existing field value. Use for "highest", "lowest", "top N" questions where ranking is based on a field that already exists in the data (e.g., population, value, date, depth). orderByFields must be actual field names with ASC/DESC. Do NOT use aggregate functions like COUNT(), SUM(), AVG() - those require getStatistics.',schema:ra}),ne=25,oa=async(e,r,t,a)=>{let o=r.map?.allLayers.find(g=>g.id===e.layerId),i=await r.whenLayerView(o),n=o.title??e.layerId,l;if(t){let g=await Y(t,r);if("error"in g){let b={error:g.error};return le(t)?(b.geometryLayerId=t.layerId,b.geometryWhere=t.where):se(t)&&(b.point=t.point),{tool:"queryFeatures",layerName:n,summary:"Geometry lookup failed",details:b}}if(!g.geometry){let b={};return le(t)?(b.error=`No features found matching: ${t.where}`,b.geometryLayerId=t.layerId,b.geometryWhere=t.where):se(t)&&(b.error="Failed to create point geometry",b.point=t.point),{tool:"queryFeatures",layerName:n,summary:"No features found for geometry filter",details:b}}l=g.geometry}else a&&(l=r.extent.clone());let d=be(i,a??!1),c=new pe({where:e.where||"1=1",outFields:e.outFields.length?e.outFields:["*"],orderByFields:e.orderByFields,...l&&{geometry:l,spatialRelationship:"intersects"},...t?.distance&&{distance:t.distance},...t?.units&&{units:t.units},outSpatialReference:r.spatialReference}),u,m;try{u=d?await i.queryFeatureCount(c):await o.queryFeatureCount(c),u>0&&u<=ne&&(m=d?await i.queryFeatures(c):await o.queryFeatures(c),m&&m.features.forEach(g=>{let b=g.attributes;o.fields.forEach(v=>{let S=b[v.name],q=ce(v.name,S,o);q&&(b[v.name]=q)})}))}catch(g){console.warn("Client-side query failed, falling back to server:",g),u=await o.queryFeatureCount(c),u>0&&u<=ne&&(m=await o.queryFeatures(c),m&&m.features.forEach(b=>{o.fields.forEach(v=>{let S=b.attributes[v.name],q=ce(v.name,S,o);q&&(b.attributes[v.name]=q)})}))}let f=m?.features.map(g=>g.attributes);return{tool:"queryFeatures",layerName:n,summary:`${u} features found`,details:{totalCount:u,where:e.where,...f&&{attributes:f},...u>ne&&{note:`${u} features found. Too many to list. Use filters to narrow results.`}}}};async function ia({targetLayer:e,geometryFilter:r,useCurrentExtent:t},a){let{mapView:o}=M(a),i=await oa(e,o,r,t);return JSON.stringify(i,null,2)}var na=s.object({layerId:s.string().describe("The layerId of the layer containing the geometry by which to filter."),where:s.string().describe("The SQL-92 where clause representing the features from which to filter."),distance:s.number().optional().describe("The buffer distance around the geometry."),units:j.optional().describe("The units for the distance buffer.")}),sa=s.object({point:s.object({x:s.number().describe("X coordinate (longitude) from navigation result"),y:s.number().describe("Y coordinate (latitude) from navigation result"),spatialReference:s.object({wkid:s.number().describe("Spatial reference WKID (e.g., 4326 for WGS84)")}).optional().describe("Spatial reference. Defaults to map's spatial reference if not provided.")}).describe("Point coordinates from a previous navigation/geocoding result"),distance:s.number().optional().describe("Optional buffer distance around the point."),units:j.optional().describe("The units for the distance buffer.")}),la=s.object({targetLayer:s.object({layerId:s.string().describe("The layerId of the layer containing the field from which to get a value."),where:s.string().describe("SQL-92 where clause. IMPORTANT: When using geometryFilter.point for point-in-polygon queries, set this to '1=1' to return all features that intersect the point. Only add attribute filters if the user specifically requests them in addition to the spatial query."),orderByFields:s.array(s.string().describe("The field(s) and order for which to sort the resulting features.")),outFields:s.array(s.string().describe('The fields to include in the output that will be presented to the user. This should include identifying information about the resulting features, like a name or id, along with the values desired in the output. If unsure, choose all fields ("*").').default("*"))}),geometryFilter:s.union([na,sa]).optional().describe("Geometry filter for spatial queries. Use 'point' option with x/y coordinates from navigation results to find features at that location (point-in-polygon). Use 'layerId/where' option to filter by features from another layer."),useCurrentExtent:s.boolean().optional().describe("Set to true ONLY when user explicitly asks about features 'in my view', 'on my map', 'I am looking at'. Default is false (queries entire layer).")}),ca=y(ia,{name:"queryFeatures",description:"Queries features from a layer. Returns count and attributes (if \u226425 features). Use for listing features, finding features matching conditions, or spatial queries.",schema:la}),Je=[Hr,Yr,aa,ca],Ze=[Br,jr,Mr],ee=()=>{let e=new Date().getTimezoneOffset(),r=e<=0?"+":"-",t=Math.floor(Math.abs(e)/60).toString().padStart(2,"0"),a=(Math.abs(e)%60).toString().padStart(2,"0"),o=`${r}${t}:${a}`;return{userTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,userTimezoneOffset:o}},da=async(e,r)=>{await h({text:"Requesting LLM for layer filter results"},r);let t=await $("data_explore_filter_prompt");if(!r?.configurable)throw new Error("config.configurable is required for layer filter tools");let{userTimezone:a,userTimezoneOffset:o}=ee(),i={layerFieldInfo:e.layerFieldInfo,userTimezone:a,userTimezoneOffset:o},n=await C({promptText:t,modelTier:"advanced",messages:T(e.messages),inputVariables:i,tools:Ze}),l=[...e.messages,n];if(!((n.tool_calls?.length??0)>0))return await h({text:"LLM determined no filter changes needed"},r),{...e,messages:l};let d=[...l,n],c=n.content.toString();return await Q(n,r),{...e,messages:d,outputMessage:c}},ua=async(e,r)=>{await h({text:"Requesting LLM for layer query results"},r);let t=await $("data_explore_query_prompt");if(!r?.configurable)throw new Error("config.configurable is required for layer query tools");let{userTimezone:a,userTimezoneOffset:o}=ee(),i={layerFieldInfo:e.layerFieldInfo,userTimezone:a,userTimezoneOffset:o},n=await C({promptText:t,modelTier:"advanced",messages:T(e.messages),inputVariables:i,tools:Je}),l=[...e.messages,n],d=n.content.toString();return await Q(n,r),{...e,messages:l,outputMessage:d}},ha=async(e,r)=>{try{await h({text:"Requesting LLM for summary on query results"},r);let t=await $("summarize_query_response_prompt"),a={queryResponse:e.queryResponse},o=await H({promptText:t,messages:T(e.messages),inputVariables:a}),i=typeof o=="string"?o:o.content,n=new z(i);return await h({text:`Received response from LLM: ${i}`},r),{...e,outputMessage:i,messages:[...e.messages,n]}}catch(t){throw await h({text:"Error during filter LLM request"},r),new Error(`Error during filter LLM request: ${t instanceof Error?t.message:String(t)}`)}};async function ma(e,r){let t=await new R(Ze).invoke({messages:T(e.messages)},r),a=[...e.messages,...t.messages],o=t.messages.map(l=>new z({content:l.content,additional_kwargs:l.additional_kwargs}));await h({text:`Finished executing layer filter tool: ${t.messages.map(l=>l.content).join(", ")}`},r);let i=[...a,...o],n=o.map(l=>l.content).join(`
48
-
49
- `);return{...e,messages:i,outputMessage:n}}var fa=new R(Je);async function ga(e,r){let{messages:t}=await fa.invoke({messages:T(e.messages)},r),a=[],o=[];for(let n of t){let l=n.content,d;if(typeof l!="string"){d={tool:n.name??"unknown",layerName:"unknown",summary:"Query failed",details:{error:"Skipping non-string tool output:",raw:l}};continue}try{d=JSON.parse(l)}catch{d={tool:n.name??"unknown",layerName:"unknown",summary:"Query failed",details:{error:l}}}a.push(d),d.details&&typeof d.details=="object"&&"error"in d.details?o.push(`- ${d.tool}: Error - ${String(d.details.error)}`):o.push(`- ${d.layerName}: ${d.summary}`)}let i=[...e.messages,...t];return await h({text:`Finished executing layer query tool: ${o.join(", ")}`},r),{...e,messages:i,queryResponse:a}}var pa=10,ya=async(e,r)=>{let t=null,a=null;try{r.type!=="geometry"&&r.type!=="oid"&&r.type!=="global-id"&&(t=await fe({layer:e,field:r.name}),r.type==="string"&&(a=(await ge({layer:e,field:r.name})).uniqueValueInfos.sort((o,i)=>i.count-o.count).slice(0,pa)))}catch(o){console.error(`Error fetching statistics for field ${r.name}:`,o)}return{summaryStatistics:t,uniqueValues:a}};async function ve(e,r,t){let a=[],o=[];for(let i of e){let n=function(f){let g=r.get(f)?.layerItem;return g?[g.name&&`Name: ${g.name}`,g.title&&`Title: ${g.title}`,g.description&&`Description: ${g.description}`].filter(Boolean).join(" | "):f},{layerId:l,results:d}=i,c=t.map?.allLayers.find(f=>f.id===l),u=r.get(l)?.fieldRegistry;if(!u)continue;let m=a.find(f=>f.layerId===l);m||(m={layerId:l,layerSummary:n(l),fieldInfos:[]},a.push(m));for(let f of d){let g=u.get(f.name);if(g){if(!g.statistics){let b=ya(c,g).then(v=>{u.set(g.name,{...g,statistics:v}),g.statistics=v});o.push(b)}m.fieldInfos.push(g)}}}return await Promise.all(o),a}var wa=async(e,r)=>{try{await h({text:"Getting statistics for vector search results"},r);let t=w(r,"layersAndFieldsRegistry"),{mapView:a}=M(r),o=await ve(e.vectorSearchFieldResults,t,a);return console.log("Field statistics retrieved:",o),await h({text:"Statistics retrieved"},r),{...e,layerFieldInfo:o}}catch(t){throw await h({text:"Error during fetching statistics"},r),new Error(`Error during fetching statistics: ${t instanceof Error?t.message:String(t)}`)}},Ce=.7,ba=10,va=async(e,r)=>{try{let t=N(e.messages);await h({text:"Similarity search to find fields"},r);let a=w(r,"fieldSearch"),o=w(r,"layersAndFieldsRegistry"),i=w(r,"embeddingCache"),n=await a.searchFields({text:t,layerIds:e.vectorSearchLayerIds,minScore:Ce,topResults:ba,embeddingCache:i}),l=n.map(({layerId:c,results:u})=>{let m=u.map(f=>` - ${f.name} (${f.score.toFixed(2)})`).join(`
47
+ ${t}`},default:()=>""}),vectorSearchLayerIds:p(),vectorSearchFieldResults:p(),layerFieldInfo:p(),queryResponse:p()}),Nr=async(e,r)=>(await h({text:"Exiting Data Exploration agent"},r),e),Q=async(e,r)=>{let t=e.tool_calls??[];if(t.length===0){await h({text:`LLM did not request any tool calls: ${String(e?.content)}`},r);return}await Promise.all(t.map(async a=>await h({text:`LLM invoked ${a.name} tool with arguments: ${JSON.stringify(a.args,null,2)}`},r))),console.log("LLM response:",JSON.stringify(e.tool_calls,null,2))},qr=["mapView"];function M(e){let r=e?.configurable?.context;if(!r||typeof r!="object")throw new Error("DataExplorationAgent context missing");let t=qr.filter(a=>!(a in r));if(t.length)throw new Error(`DataExplorationAgent context missing: ${t.join(", ")}`);return r}var Ar=e=>{let r=e.map?.allLayers.filter(a=>a.type==="feature"),t=0;return r?.forEach(a=>{let o=a;o.featureEffect&&(o.featureEffect=null,t++)}),t>0?`Cleared filters from ${t} layer(s). View unchanged.`:"No active filters to clear. View unchanged."},Rr=async(e,r)=>{let{mapView:t}=M(r);return Ar(t)},Mr=y(Rr,{name:"clearFilters",description:"Clears all feature effects/filters from the map but does NOT change the current view. Use when user says 'clear filters', 'reset filters', 'remove filters', 'show all features', or wants to remove emphasis without navigating anywhere.",schema:s.object({})}),zr=async e=>{e.map?.allLayers.filter(t=>t.type==="feature")?.forEach(t=>{let a=t;a.featureEffect&&(a.featureEffect=null)});let r=e.map.initialViewProperties?.viewpoint?.targetGeometry;return r?(await e.goTo(r),"Cleared all filters and returned to home extent."):"Cleared all filters. Could not determine home extent."},Cr=async(e,r)=>{let{mapView:t}=M(r);return await zr(t)},jr=y(Cr,{name:"resetMap",description:"Clears all feature effects/filters from the map AND zooms to the home extent (initial map view). Use when user says 'reset map', 'reset the map', 'start over', or wants to both clear filters and return to the initial view.",schema:s.object({})});function se(e){return"point"in e&&e.point!==void 0}function le(e){return"layerId"in e&&e.layerId!==void 0}var Y=async(e,r)=>{if(se(e)){let{point:t}=e;return{geometry:new me({x:t.x,y:t.y,spatialReference:t.spatialReference?{wkid:t.spatialReference.wkid}:r.spatialReference})}}if(le(e)){let t=r.map?.allLayers.find(a=>a.id===e.layerId);if(!t)return{error:`Could not find geometry layer with ID: ${e.layerId}`};try{let a=await t.queryFeatures({where:e.where,returnGeometry:!0,outSpatialReference:r.spatialReference});if(!a.features.length)return{error:`No features found in geometry layer with the specified where clause: ${e.where}`};let o;if(a.features.length===1){let i=a.features[0].geometry;if(!i)return{error:"The geometry of the first feature is undefined or null."};o=i}else{let i=a.features.map(l=>l.geometry),n=X.executeMany(i);if(!n)return{error:"Failed to create a combined geometry."};o=n}return o.spatialReference||(o.spatialReference=r.spatialReference),{geometry:o}}catch(a){return{error:`Failed to query geometry: ${String(a)}`}}}return{error:"Invalid geometry configuration provided"}},Vr=async(e,r,t)=>{let a=e.map?.allLayers.find(i=>i.id===r),o=a.createQuery();o.where=t??"1=1";try{let{extent:i,count:n}=await a.queryExtent(o);return!i||n===0?{success:!1,error:`No features found for where clause: ${t}`}:(await e.goTo(i),{success:!0})}catch(i){return{success:!1,error:i instanceof Error?i.message:String(i)}}},Or=async(e,r,t,a,o)=>{let i=r.map?.allLayers.find(c=>c.id===e.layerId);if(!i)return`Could not find target layer with ID: ${e.layerId}`;let n;if(o){let c=await Y(o,r);if("error"in c)return c.error;n=c.geometry}i.featureEffect=null,i.featureEffect=new Ge({filter:new B({where:e.where,geometry:n,spatialRelationship:"intersects",distance:o?.distance,units:o?.units}),includedEffect:t,excludedEffect:a}),i.visible=!0;let l=await Vr(r,o?o.layerId:e.layerId,o?o.where:e.where),d=i.title??e.layerId;return l.success?`Applied feature effects to target layer "${i.title??e.layerId}"${o?` using geometry from layer "${o.layerId}"`:""}.`:`Applied filter to "${d}" but no features matched. ${l.error}`},Dr=["feet","kilometers","meters","miles","nautical-miles","us-nautical-miles"],j=s.enum(Dr),Pr=async({targetLayer:e,geometryLayer:r,includedEffect:t="drop-shadow(2px, 2px, 2px, gray)",excludedEffect:a="grayscale(100%) opacity(60%) blur(2px)"},o)=>{let{mapView:i}=M(o);return await Or(e,i,t,a,r)},Gr=s.object({targetLayer:s.object({layerId:s.string().describe("The layerId of the layer on which to set a feature effect."),where:s.string().describe("The SQL-92 where clause representing the features to emphasize.")}),geometryLayer:s.object({layerId:s.string().describe("The layerId of the layer containing the geometry by which to filter."),where:s.string().describe("The SQL-92 where clause representing the features from which to filter features from the targetLayer by geometry."),distance:s.number().describe("The distance by which to filter the input geometry."),units:j.describe("The units used to filter by geometry and distance.")}).optional().describe("Optional geometry-based filtering parameters for spatial queries."),includedEffect:s.string().default("drop-shadow(2px, 2px, 2px, gray)").describe("The effect applied to features that meet the filter requirements. Valid effects include: bloom, blur, brightness, contrast, drop-shadow, grayscale, hue-rotate, invert, opacity, saturate, and sepia. Prefer default unless specified."),excludedEffect:s.string().default("grayscale(100%) opacity(60%) blur(2px)").describe("The effect applied to features that do not meet the filter requirements. Valid effects include: bloom, blur, brightness, contrast, drop-shadow, grayscale, hue-rotate, invert, opacity, saturate, and sepia. Prefer default unless specified.")}),Br=y(Pr,{name:"setFeatureEffect",description:"Sets a feature effect on a given layer with given filter parameters and feature effects to emphasize certain features that meet a filter requirement. If no feature effect information is provided, then use the default effect provided.",schema:Gr}),ce=(e,r,t)=>{if(e&&typeof e!="function"){let a="getField"in t&&t.getField?.(e),o=a&&"getFieldDomain"in t&&t.getFieldDomain?t.getFieldDomain(a.name):null;if(o?.type==="coded-value"){let i=o.codedValues.find(n=>n.code===r);return i?i.name:null}}return null},Qr=(e,r,t)=>{let a=e.createQuery();return a.outFields=[r],a.where=t||"1=1",a.num=1,a},Wr=async(e,r,t,a)=>{let o=a.map?.allLayers.find(c=>c.id===e),i=Qr(o,r,t.where),n=(await o.queryFeatures(i)).features[0],l=n?n.attributes[r]:null,d=ce(r,l,o)||l;return{tool:"getAttribute",layerName:o.title??e,summary:`${r} = ${d}`,details:{fieldName:r,value:d,where:t.where}}};async function Kr({layerId:e,fieldName:r,query:t},a){let{mapView:o}=M(a),i=await Wr(e,r,t,o);return JSON.stringify(i,null,2)}var Ur=s.object({layerId:s.string().describe("The layerId of the layer containing the field from which to get a value."),fieldName:s.string().describe("The name of the field/attribute from which to get a field value."),query:s.object({where:s.string().describe("The SQL-92 where clause representing the feature from which to get an attribute value.")})}),Hr=y(Kr,{name:"getAttribute",description:"Returns an attribute value for a given feature.",schema:Ur}),be=(e,r)=>r?e.hasAllFeaturesInView:e.hasAllFeatures,Jr=async e=>{let{targetLayer:r,fieldName:t,statisticType:a,mapView:o,layersAndFieldsRegistry:i,geometryLayer:n}=e,l=o.map?.allLayers.find(S=>S.id===r.layerId);if(!l)throw new Error(`Layer '${r.layerId}' not found.`);let d=await o.whenLayerView(l),c=i.get(r.layerId)?.fieldRegistry.get(t);if(!c)throw new Error(`Field '${t}' not found.`);let u,m;if(n){let S=await Y(n,o);if("error"in S)throw new Error(S.error);if(!S.geometry)throw new Error(`No features found matching: ${n.where}`);u={geometryLayerId:n.layerId,geometryWhere:n.where,distance:n.distance,units:n.units,applied:!0},m=new B({geometry:S.geometry,distance:n.distance,units:n.units,spatialRelationship:"intersects"})}let f=be(d,!1),g=null,b=null,v=10;if(c.type!=="geometry"&&c.type!=="oid"&&c.type!=="global-id")try{g=await fe({layer:l,useFeaturesInView:f,view:f?o:void 0,field:t,sqlWhere:r.where,...m&&{filter:m},outStatisticTypes:{include:[a]}}),["string","small-integer","integer"].includes(c.type)&&(b=(await ge({layer:l,useFeaturesInView:f,view:f?o:void 0,field:t,sqlWhere:r.where,...m&&{filter:m}})).uniqueValueInfos.sort((S,q)=>q.count-S.count).slice(0,v))}catch(S){console.error("Statistics error:",S)}return{tool:"getStatistics",layerName:l.title??r.layerId,summary:`${a} = ${typeof g?.[a]=="number"?g[a]:"N/A"}`,details:{fieldName:t,statisticType:a,statistic:g?.[a]??null,summaryStatistics:g,uniqueValues:b,where:r.where,spatialFilterInfo:u}}};async function Zr({targetLayer:e,fieldName:r,statisticType:t,geometryLayer:a},o){let i=w(o,"layersAndFieldsRegistry"),{mapView:n}=M(o),l=await Jr({targetLayer:e,fieldName:r,statisticType:t,mapView:n,layersAndFieldsRegistry:i,geometryLayer:a});return JSON.stringify(l,null,2)}var Xr=s.object({targetLayer:s.object({layerId:s.string().describe("The layerId of the layer containing the field from which to get a value."),where:s.string().describe("The SQL-92 where clause representing the feature from which to get an attribute value.")}),geometryLayer:s.union([s.object({layerId:s.string().describe("The layerId of the layer containing the geometry by which to filter."),where:s.string().describe("The SQL-92 where clause representing the features from which to filter features from the targetLayer by geometry."),distance:s.number().optional().describe("The distance by which to query from the input geometry."),units:j.optional().describe("The units used to query by geometry and distance.")}),s.object({}).strict()]).optional().describe("Optional geometry-based filtering parameters for spatial queries."),fieldName:s.string().describe("The name of the field for which to get statistics. STRICTLY DO NOT use OBJECTID. Use any other field"),statisticType:s.enum(["avg","max","median","min","stddev","sum","variance","nullcount","count"]).describe("The statistic type to calculate.")}),Yr=y(Zr,{name:"getStatistics",description:'Returns one or more summary statistics for the given field. Statistic types include: count, maximum, minimum, average, median, standard deviation, variance, mode, sum, nullcount (number of features without a value for a given field), unique values. For "most common/frequent" questions: Use statisticType "count" on a categorical field. The response includes uniqueValues sorted by frequency (most common first). Statistics can be returned for number, date, and string fields. Also returns frequency analysis for string fields - unique values sorted by occurrence count (most frequent first). Use this for "most common", "most frequent", or "how many of each" questions. Only call this tool when the question requires filtering (e.g. a WHERE clause or spatial constraint) that cannot be satisfied by precomputed stats.',schema:Xr}),ea=async(e,r,t,a)=>{let o=t.map?.allLayers.find(u=>u.id===e.layerId),i=await t.whenLayerView(o),n=o.title??e.layerId,l;if(a){let u=await Y(a,t);if("error"in u)return{tool:"getTopFeatures",layerName:n,summary:"Geometry lookup failed",details:{error:u.error}};if(!u.geometry)return{tool:"getTopFeatures",layerName:n,summary:"No features found for geometry filter",details:{error:`No features found matching: ${a.where}`}};l=u.geometry}let d=e.outFields.length>2?e.outFields:["*"],c=r.groupByFields&&r.groupByFields.length>0;try{let u;if(c){let f=new Be({where:e.where||"1=1",outFields:d,orderByFields:e.orderByFields,geometry:l,spatialRelationship:l?"intersects":void 0,distance:a?.distance,units:a?.units,topFilter:new Qe({topCount:r.topCount,groupByFields:r.groupByFields,orderByFields:r.orderByFields})});u=await o.queryTopFeatures(f)}else{let f=new pe({where:e.where||"1=1",outFields:d,orderByFields:r.orderByFields,num:r.topCount,geometry:l,spatialRelationship:l?"intersects":void 0,distance:a?.distance,units:a?.units,outSpatialReference:t.spatialReference}),g=be(i,!1);try{u=g?await i.queryFeatures(f):await o.queryFeatures(f)}catch(b){console.warn("Client-side query failed, falling back to server:",b),u=await o.queryFeatures(f)}}let m=u.features.map(f=>f.attributes);return{tool:"getTopFeatures",layerName:n,summary:`Top ${r.topCount} features extracted`,details:{topCount:r.topCount,attributes:m,where:e.where,orderByFields:r.orderByFields,...c&&{groupByFields:r.groupByFields}}}}catch(u){return{tool:"getTopFeatures",layerName:n,summary:"Query failed",details:{error:u instanceof Error?u.message:String(u)}}}},ta=async({targetLayer:e,topFilter:r,geometryLayer:t},a)=>{let{mapView:o}=M(a),i=await ea(e,r,o,t);return JSON.stringify(i,null,2)},ra=s.object({targetLayer:s.object({layerId:s.string().describe("The layerId of the layer containing the field from which to get a value."),where:s.string().describe("The SQL-92 where clause representing the feature from which to get an attribute value."),orderByFields:s.array(s.string().describe("The field(s) and order for which to sort the resulting features.")),outFields:s.array(s.string().describe('The fields to include in the output that will be presented to the user. This should include identifying information about the resulting features, like a name or id, along with the values desired in the output. If unsure, choose all fields ("*").').default("*"))}),geometryLayer:s.object({layerId:s.string().describe("The layerId of the layer containing the geometry by which to filter."),where:s.string().describe("The SQL-92 where clause representing the features from which to filter features from the targetLayer by geometry."),distance:s.number().optional().describe("The distance by which to query from the input geometry."),units:j.describe("The units used to query by geometry and distance.").optional()}).optional().describe("Optional geometry-based filtering parameters for spatial queries."),topFilter:s.object({topCount:s.number().describe("Number of top features to return per group."),orderByFields:s.array(s.string().describe("Field(s) to rank by with ASC/DESC. Must be existing field names, not aggregate functions.")),groupByFields:s.array(s.string().describe("Field(s) to group results by. Returns top N per group."))})}),aa=y(ta,{name:"getTopFeatures",description:'Returns top N features ranked by an existing field value. Use for "highest", "lowest", "top N" questions where ranking is based on a field that already exists in the data (e.g., population, value, date, depth). orderByFields must be actual field names with ASC/DESC. Do NOT use aggregate functions like COUNT(), SUM(), AVG() - those require getStatistics.',schema:ra}),ne=25,oa=async(e,r,t,a)=>{let o=r.map?.allLayers.find(g=>g.id===e.layerId),i=await r.whenLayerView(o),n=o.title??e.layerId,l;if(t){let g=await Y(t,r);if("error"in g){let b={error:g.error};return le(t)?(b.geometryLayerId=t.layerId,b.geometryWhere=t.where):se(t)&&(b.point=t.point),{tool:"queryFeatures",layerName:n,summary:"Geometry lookup failed",details:b}}if(!g.geometry){let b={};return le(t)?(b.error=`No features found matching: ${t.where}`,b.geometryLayerId=t.layerId,b.geometryWhere=t.where):se(t)&&(b.error="Failed to create point geometry",b.point=t.point),{tool:"queryFeatures",layerName:n,summary:"No features found for geometry filter",details:b}}l=g.geometry}else a&&(l=r.extent.clone());let d=be(i,a??!1),c=new pe({where:e.where||"1=1",outFields:e.outFields.length?e.outFields:["*"],orderByFields:e.orderByFields,...l&&{geometry:l,spatialRelationship:"intersects"},...t?.distance&&{distance:t.distance},...t?.units&&{units:t.units},outSpatialReference:r.spatialReference}),u,m;try{u=d?await i.queryFeatureCount(c):await o.queryFeatureCount(c),u>0&&u<=ne&&(m=d?await i.queryFeatures(c):await o.queryFeatures(c),m&&m.features.forEach(g=>{let b=g.attributes;o.fields.forEach(v=>{let S=b[v.name],q=ce(v.name,S,o);q&&(b[v.name]=q)})}))}catch(g){console.warn("Client-side query failed, falling back to server:",g),u=await o.queryFeatureCount(c),u>0&&u<=ne&&(m=await o.queryFeatures(c),m&&m.features.forEach(b=>{o.fields.forEach(v=>{let S=b.attributes[v.name],q=ce(v.name,S,o);q&&(b.attributes[v.name]=q)})}))}let f=m?.features.map(g=>g.attributes);return{tool:"queryFeatures",layerName:n,summary:`${u} features found`,details:{totalCount:u,where:e.where,...f&&{attributes:f},...u>ne&&{note:`${u} features found.`}}}};async function ia({targetLayer:e,geometryFilter:r,useCurrentExtent:t},a){let{mapView:o}=M(a),i=await oa(e,o,r,t);return JSON.stringify(i,null,2)}var na=s.object({layerId:s.string().describe("The layerId of the layer containing the geometry by which to filter."),where:s.string().describe("The SQL-92 where clause representing the features from which to filter."),distance:s.number().optional().describe("The buffer distance around the geometry."),units:j.optional().describe("The units for the distance buffer.")}),sa=s.object({point:s.object({x:s.number().describe("X coordinate (longitude) from navigation result"),y:s.number().describe("Y coordinate (latitude) from navigation result"),spatialReference:s.object({wkid:s.number().describe("Spatial reference WKID (e.g., 4326 for WGS84)")}).optional().describe("Spatial reference. Defaults to map's spatial reference if not provided.")}).describe("Point coordinates from a previous navigation/geocoding result"),distance:s.number().optional().describe("Optional buffer distance around the point."),units:j.optional().describe("The units for the distance buffer.")}),la=s.object({targetLayer:s.object({layerId:s.string().describe("The layerId of the layer containing the field from which to get a value."),where:s.string().describe("SQL-92 where clause. IMPORTANT: When using geometryFilter.point for point-in-polygon queries, set this to '1=1' to return all features that intersect the point. Only add attribute filters if the user specifically requests them in addition to the spatial query."),orderByFields:s.array(s.string().describe("The field(s) and order for which to sort the resulting features.")),outFields:s.array(s.string().describe('The fields to include in the output that will be presented to the user. This should include identifying information about the resulting features, like a name or id, along with the values desired in the output. If unsure, choose all fields ("*").').default("*"))}),geometryFilter:s.union([na,sa]).optional().describe("Geometry filter for spatial queries. Use 'point' option with x/y coordinates from navigation results to find features at that location (point-in-polygon). Use 'layerId/where' option to filter by features from another layer."),useCurrentExtent:s.boolean().optional().describe("Set to true ONLY when user explicitly asks about features 'in my view', 'on my map', 'I am looking at'. Default is false (queries entire layer).")}),ca=y(ia,{name:"queryFeatures",description:"Queries features from a layer. Returns count and attributes (if \u226425 features). Use for listing features, finding features matching conditions, or spatial queries.",schema:la}),Je=[Hr,Yr,aa,ca],Ze=[Br,jr,Mr],ee=()=>{let e=new Date().getTimezoneOffset(),r=e<=0?"+":"-",t=Math.floor(Math.abs(e)/60).toString().padStart(2,"0"),a=(Math.abs(e)%60).toString().padStart(2,"0"),o=`${r}${t}:${a}`;return{userTimezone:Intl.DateTimeFormat().resolvedOptions().timeZone,userTimezoneOffset:o}},da=async(e,r)=>{await h({text:"Requesting LLM for layer filter results"},r);let t=await $("data_explore_filter_prompt");if(!r?.configurable)throw new Error("config.configurable is required for layer filter tools");let{userTimezone:a,userTimezoneOffset:o}=ee(),i={layerFieldInfo:e.layerFieldInfo,userTimezone:a,userTimezoneOffset:o},n=await C({promptText:t,modelTier:"advanced",messages:T(e.messages),inputVariables:i,tools:Ze}),l=[...e.messages,n];if(!((n.tool_calls?.length??0)>0))return await h({text:"LLM determined no filter changes needed"},r),{...e,messages:l};let d=[...l,n],c=n.content.toString();return await Q(n,r),{...e,messages:d,outputMessage:c}},ua=async(e,r)=>{await h({text:"Requesting LLM for layer query results"},r);let t=await $("data_explore_query_prompt");if(!r?.configurable)throw new Error("config.configurable is required for layer query tools");let{userTimezone:a,userTimezoneOffset:o}=ee(),i={layerFieldInfo:e.layerFieldInfo,userTimezone:a,userTimezoneOffset:o},n=await C({promptText:t,modelTier:"advanced",messages:T(e.messages),inputVariables:i,tools:Je}),l=[...e.messages,n],d=n.content.toString();return await Q(n,r),{...e,messages:l,outputMessage:d}},ha=async(e,r)=>{try{await h({text:"Requesting LLM for summary on query results"},r);let t=await $("summarize_query_response_prompt"),a={queryResponse:e.queryResponse},o=await H({promptText:t,messages:T(e.messages),inputVariables:a}),i=typeof o=="string"?o:o.content,n=new z(i);return await h({text:`Received response from LLM: ${i}`},r),{...e,outputMessage:i,messages:[...e.messages,n]}}catch(t){throw await h({text:"Error during filter LLM request"},r),new Error(`Error during filter LLM request: ${t instanceof Error?t.message:String(t)}`)}};async function ma(e,r){let t=await new R(Ze).invoke({messages:T(e.messages)},r),a=[...e.messages,...t.messages],o=t.messages.map(n=>new z({content:n.content,additional_kwargs:n.additional_kwargs}));await h({text:`Finished executing layer filter tool: ${t.messages.map(n=>n.content).join(", ")}`},r);let i=[...a,...o];return{...e,messages:i}}var fa=new R(Je);async function ga(e,r){let{messages:t}=await fa.invoke({messages:T(e.messages)},r),a=[],o=[];for(let n of t){let l=n.content,d;if(typeof l!="string"){d={tool:n.name??"unknown",layerName:"unknown",summary:"Query failed",details:{error:"Skipping non-string tool output:",raw:l}};continue}try{d=JSON.parse(l)}catch{d={tool:n.name??"unknown",layerName:"unknown",summary:"Query failed",details:{error:l}}}a.push(d),d.details&&typeof d.details=="object"&&"error"in d.details?o.push(`- ${d.tool}: Error - ${String(d.details.error)}`):o.push(`- ${d.layerName}: ${d.summary}`)}let i=[...e.messages,...t];return await h({text:`Finished executing layer query tool: ${o.join(", ")}`},r),{...e,messages:i,queryResponse:a}}var pa=10,ya=async(e,r)=>{let t=null,a=null;try{r.type!=="geometry"&&r.type!=="oid"&&r.type!=="global-id"&&(t=await fe({layer:e,field:r.name}),r.type==="string"&&(a=(await ge({layer:e,field:r.name})).uniqueValueInfos.sort((o,i)=>i.count-o.count).slice(0,pa)))}catch(o){console.error(`Error fetching statistics for field ${r.name}:`,o)}return{summaryStatistics:t,uniqueValues:a}};async function ve(e,r,t){let a=[],o=[];for(let i of e){let n=function(f){let g=r.get(f)?.layerItem;return g?[g.name&&`Name: ${g.name}`,g.title&&`Title: ${g.title}`,g.description&&`Description: ${g.description}`].filter(Boolean).join(" | "):f},{layerId:l,results:d}=i,c=t.map?.allLayers.find(f=>f.id===l),u=r.get(l)?.fieldRegistry;if(!u)continue;let m=a.find(f=>f.layerId===l);m||(m={layerId:l,layerSummary:n(l),fieldInfos:[]},a.push(m));for(let f of d){let g=u.get(f.name);if(g){if(!g.statistics){let b=ya(c,g).then(v=>{u.set(g.name,{...g,statistics:v}),g.statistics=v});o.push(b)}m.fieldInfos.push(g)}}}return await Promise.all(o),a}var wa=async(e,r)=>{try{await h({text:"Getting statistics for vector search results"},r);let t=w(r,"layersAndFieldsRegistry"),{mapView:a}=M(r),o=await ve(e.vectorSearchFieldResults,t,a);return console.log("Field statistics retrieved:",o),await h({text:"Statistics retrieved"},r),{...e,layerFieldInfo:o}}catch(t){throw await h({text:"Error during fetching statistics"},r),new Error(`Error during fetching statistics: ${t instanceof Error?t.message:String(t)}`)}},Ce=.7,ba=10,va=async(e,r)=>{try{let t=N(e.messages);await h({text:"Similarity search to find fields"},r);let a=w(r,"fieldSearch"),o=w(r,"layersAndFieldsRegistry"),i=w(r,"embeddingCache"),n=await a.searchFields({text:t,layerIds:e.vectorSearchLayerIds,minScore:Ce,topResults:ba,embeddingCache:i}),l=n.map(({layerId:c,results:u})=>{let m=u.map(f=>` - ${f.name} (${f.score.toFixed(2)})`).join(`
50
48
  `);return`${o.get(c)?.layerItem.name??c}:
51
49
  ${m}`}).join(`
52
50
  `),d;return n.length>0?d=`Vector search completed. Matching layers and fields with scores:
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import c from"./C3GRPYZJ.js";import b from"./3CF3CQKC.js";import{a as r,b as e}from"./GIZ3VXFU.js";import"./JA77AZOL.js";import"./2LSVWAZO.js";import{v as a,z as s}from"./XJBDOKVO.js";import"./2GMCG6SX.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)
2
+ import c from"./5CXPY6RU.js";import b from"./3CF3CQKC.js";import{a as r,b as e}from"./GIZ3VXFU.js";import"./JA77AZOL.js";import"./2LSVWAZO.js";import{v as a,z as s}from"./XJBDOKVO.js";import"./2GMCG6SX.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)
@@ -1,3 +1,3 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{a as h,b as g}from"./EJ4UHNLB.js";import{a as d}from"./WWTWOB2N.js";import"./2LSVWAZO.js";import{g as i,h as t,n as c,t as o,u as n,v as r,z as l}from"./XJBDOKVO.js";import"./2GMCG6SX.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(`
2
+ import{a as h,b as g}from"./2SN74N7F.js";import{a as d}from"./WWTWOB2N.js";import"./2LSVWAZO.js";import{g as i,h as t,n as c,t as o,u as n,v as r,z as l}from"./XJBDOKVO.js";import"./2GMCG6SX.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
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")
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import b from"./C3GRPYZJ.js";import a from"./3CF3CQKC.js";import{a as s,b as i}from"./GIZ3VXFU.js";import"./JA77AZOL.js";import"./2LSVWAZO.js";import{v as r,z as e}from"./XJBDOKVO.js";import"./2GMCG6SX.js";export default $arcgis.t(([,{c:a}])=>{var t=class extends r{constructor(){super(...arguments),this.agent=a}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"),i(this)}};e("arcgis-assistant-layer-filter-agent",t);return t},a,b)
2
+ import b from"./5CXPY6RU.js";import a from"./3CF3CQKC.js";import{a as s,b as i}from"./GIZ3VXFU.js";import"./JA77AZOL.js";import"./2LSVWAZO.js";import{v as r,z as e}from"./XJBDOKVO.js";import"./2GMCG6SX.js";export default $arcgis.t(([,{c:a}])=>{var t=class extends r{constructor(){super(...arguments),this.agent=a}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"),i(this)}};e("arcgis-assistant-layer-filter-agent",t);return t},a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import c from"./C3GRPYZJ.js";import b from"./3CF3CQKC.js";import{a as i,b as e}from"./GIZ3VXFU.js";import"./JA77AZOL.js";import"./2LSVWAZO.js";import{v as s,z as a}from"./XJBDOKVO.js";import"./2GMCG6SX.js";export default $arcgis.t(([,{a:r}])=>{var t=class extends s{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)}};a("arcgis-assistant-navigation-agent",t);return t},b,c)
2
+ import c from"./5CXPY6RU.js";import b from"./3CF3CQKC.js";import{a as i,b as e}from"./GIZ3VXFU.js";import"./JA77AZOL.js";import"./2LSVWAZO.js";import{v as s,z as a}from"./XJBDOKVO.js";import"./2GMCG6SX.js";export default $arcgis.t(([,{a:r}])=>{var t=class extends s{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)}};a("arcgis-assistant-navigation-agent",t);return t},b,c)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import c from"./C3GRPYZJ.js";import b from"./3CF3CQKC.js";import{a as s,b as a}from"./GIZ3VXFU.js";import"./JA77AZOL.js";import"./2LSVWAZO.js";import{v as e,z as r}from"./XJBDOKVO.js";import"./2GMCG6SX.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)
2
+ import c from"./5CXPY6RU.js";import b from"./3CF3CQKC.js";import{a as s,b as a}from"./GIZ3VXFU.js";import"./JA77AZOL.js";import"./2LSVWAZO.js";import{v as e,z as r}from"./XJBDOKVO.js";import"./2GMCG6SX.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)
package/dist/cdn/index.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
2
- import{p as e,y as s}from"./XJBDOKVO.js";import"./2GMCG6SX.js";var t=e(s,{"arcgis-assistant":[()=>import("./5G547MJD.js"),"_messages:,copyEnabled,description,entryMessage,feedbackEnabled,heading,logEnabled,messages:,orchestrator:,referenceElement,suggestedPrompts:;submitMessage;register"],"arcgis-assistant-agent":[()=>import("./7GTFRRWF.js"),"agent:,context:;;getContext"],"arcgis-assistant-data-exploration-agent":[()=>import("./D2LNTPGK.js"),"referenceElement;;getContext"],"arcgis-assistant-help-agent":[()=>import("./63NFPEL6.js"),"referenceElement;;getContext"],"arcgis-assistant-layer-filter-agent":[()=>import("./NS4LUQ6B.js"),"referenceElement;;getContext"],"arcgis-assistant-layer-query-agent":[()=>import("./I66BY7AM.js"),"referenceElement;;getContext"],"arcgis-assistant-layer-styling-agent":[()=>import("./UVDXUWJJ.js"),"referenceElement;;getContext"],"arcgis-assistant-navigation-agent":[()=>import("./EIBD7EKM.js"),"referenceElement;;getContext"],"arcgis-assistant-chat":[()=>import("./PFUFVETM.js"),"copyEnabled,feedbackEnabled,loading,loadingMessage,logEnabled,messages:,user"],"arcgis-assistant-chat-card":[()=>import("./3PHWKSJZ.js"),"_messages:,content,copyEnabled,error,feedbackEnabled,loading,loadingMessage,log:,logEnabled,message:,messageRole,user"],"arcgis-assistant-chat-card-content":[()=>import("./EM4MVN4S.js"),"content,loading,loadingMessage,type"],"arcgis-assistant-chat-entry":[()=>import("./4GEEK3VW.js"),"_messages:,awaitingResponse,entryPlaceholder,inputValue,keyboardShortcutsDisabled,messages:,status"],"arcgis-assistant-interrupt":[()=>import("./7KB4R4Z2.js"),"_messages:,message,options:,type"],"arcgis-assistant-shell":[()=>import("./FEJ3AX3C.js"),"_messages:,awaitingResponse,description,entryMessage,entryMessageClosed,heading,inputValue,loading,messages:,status,suggestedPrompts:"]});t({resourcesUrl:import.meta.url});var a=new CSSStyleSheet;a.replaceSync("@layer{:not([hydrated]):is(arcgis-assistant,arcgis-assistant-agent,arcgis-assistant-data-exploration-agent,arcgis-assistant-help-agent,arcgis-assistant-layer-filter-agent,arcgis-assistant-layer-query-agent,arcgis-assistant-layer-styling-agent,arcgis-assistant-navigation-agent,arcgis-assistant-chat,arcgis-assistant-chat-card,arcgis-assistant-chat-card-content,arcgis-assistant-chat-entry,arcgis-assistant-interrupt,arcgis-assistant-shell){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,a];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r,p,j,i=(a.importMap??={}).imports??={})=>{"utils".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,s,"@arcgis/ai-components/",".js")
2
+ import{p as e,y as s}from"./XJBDOKVO.js";import"./2GMCG6SX.js";var t=e(s,{"arcgis-assistant":[()=>import("./5G547MJD.js"),"_messages:,copyEnabled,description,entryMessage,feedbackEnabled,heading,logEnabled,messages:,orchestrator:,referenceElement,suggestedPrompts:;submitMessage;register"],"arcgis-assistant-agent":[()=>import("./7GTFRRWF.js"),"agent:,context:;;getContext"],"arcgis-assistant-data-exploration-agent":[()=>import("./AKSRKJLH.js"),"referenceElement;;getContext"],"arcgis-assistant-help-agent":[()=>import("./3WUYZHL7.js"),"referenceElement;;getContext"],"arcgis-assistant-layer-filter-agent":[()=>import("./I2X7J7HH.js"),"referenceElement;;getContext"],"arcgis-assistant-layer-query-agent":[()=>import("./KSDTJDBX.js"),"referenceElement;;getContext"],"arcgis-assistant-layer-styling-agent":[()=>import("./5BRNHSJ6.js"),"referenceElement;;getContext"],"arcgis-assistant-navigation-agent":[()=>import("./KFWTSUUZ.js"),"referenceElement;;getContext"],"arcgis-assistant-chat":[()=>import("./PFUFVETM.js"),"copyEnabled,feedbackEnabled,loading,loadingMessage,logEnabled,messages:,user"],"arcgis-assistant-chat-card":[()=>import("./GCANEOSY.js"),"_messages:,content,copyEnabled,error,feedbackEnabled,loading,loadingMessage,log:,logEnabled,message:,messageRole,user"],"arcgis-assistant-chat-card-content":[()=>import("./3LO22NV5.js"),"content,loading,loadingMessage,type"],"arcgis-assistant-chat-entry":[()=>import("./4GEEK3VW.js"),"_messages:,awaitingResponse,entryPlaceholder,inputValue,keyboardShortcutsDisabled,messages:,status"],"arcgis-assistant-interrupt":[()=>import("./7KB4R4Z2.js"),"_messages:,message,options:,type"],"arcgis-assistant-shell":[()=>import("./FEJ3AX3C.js"),"_messages:,awaitingResponse,description,entryMessage,entryMessageClosed,heading,inputValue,loading,messages:,status,suggestedPrompts:"]});t({resourcesUrl:import.meta.url});var a=new CSSStyleSheet;a.replaceSync("@layer{:not([hydrated]):is(arcgis-assistant,arcgis-assistant-agent,arcgis-assistant-data-exploration-agent,arcgis-assistant-help-agent,arcgis-assistant-layer-filter-agent,arcgis-assistant-layer-query-agent,arcgis-assistant-layer-styling-agent,arcgis-assistant-navigation-agent,arcgis-assistant-chat,arcgis-assistant-chat-card,arcgis-assistant-chat-card-content,arcgis-assistant-chat-entry,arcgis-assistant-interrupt,arcgis-assistant-shell){visibility:hidden}}");document.adoptedStyleSheets=[...document.adoptedStyleSheets,a];window.$arcgis||Object.defineProperty(window,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),((a,r,p,j,i=(a.importMap??={}).imports??={})=>{"utils".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,s,"@arcgis/ai-components/",".js")
@@ -34,7 +34,7 @@ import type { ArcgisMap as ArcgisMap } from "@arcgis/map-components/components/a
34
34
  * assistant.appendChild(dataExplorationAgent);
35
35
  * ```
36
36
  *
37
- * To learn more about this component, try out the [demo](#demo) below.
37
+ * To learn more about this component, try out the [demo](https://developers.arcgis.com/javascript/latest/references/ai-components/components/arcgis-assistant/#demos)
38
38
  *
39
39
  * @slot - This is the default slot
40
40
  * @slot [header-actions-end] - Slot for adding actions to the end of the header.