@arcgis/portal-components 5.2.0-next.38 → 5.2.0-next.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (76) hide show
  1. package/dist/cdn/{T6JAFB2A.js → 2C475EKD.js} +1 -1
  2. package/dist/cdn/{OU2AR22N.js → 3J46PXFF.js} +1 -1
  3. package/dist/cdn/{GNBMYDRC.js → 3MBOA5WF.js} +1 -1
  4. package/dist/cdn/{GQFWFZXP.js → 3OBIA66A.js} +1 -1
  5. package/dist/cdn/{ADC752YM.js → 3Z3ZPFGJ.js} +1 -1
  6. package/dist/cdn/{6KRP5D52.js → 5NMFQE4U.js} +1 -1
  7. package/dist/cdn/{7SB3CUTJ.js → 5VPTTFBP.js} +1 -1
  8. package/dist/cdn/{UR7W4CEV.js → 63THOLAY.js} +1 -1
  9. package/dist/cdn/{5H4VCRNA.js → 6DYBW2C6.js} +1 -1
  10. package/dist/cdn/{AX5KYSWU.js → 6RK4FBHZ.js} +1 -1
  11. package/dist/cdn/{JEXN44WM.js → 7E5GJIZV.js} +1 -1
  12. package/dist/cdn/{YNQ4WA5G.js → A4CT6D4Y.js} +1 -1
  13. package/dist/cdn/{E67OMPRM.js → AL57LV4E.js} +1 -1
  14. package/dist/cdn/{6XWNBD36.js → AXM6XCZD.js} +1 -1
  15. package/dist/cdn/{IILAKXVC.js → AYR65LXN.js} +1 -1
  16. package/dist/cdn/{7LC4ZEXB.js → BUJPYZSX.js} +1 -1
  17. package/dist/cdn/{DKBTJJMW.js → C7ZFXRPS.js} +1 -1
  18. package/dist/cdn/{QUEBM77K.js → D76KMXZD.js} +1 -1
  19. package/dist/cdn/EI6BAXCQ.js +2 -0
  20. package/dist/cdn/{YHXXIHQA.js → FXIP4QXJ.js} +1 -1
  21. package/dist/cdn/GE75KDIM.js +2 -0
  22. package/dist/cdn/{NZVLEDFZ.js → GJTJLK6T.js} +1 -1
  23. package/dist/cdn/{2XILGLOG.js → GKOXTQHB.js} +1 -1
  24. package/dist/cdn/{H6QISDOR.js → GQMPPCEL.js} +1 -1
  25. package/dist/cdn/{MM6SCKYE.js → GXJU3U7U.js} +1 -1
  26. package/dist/cdn/{VSAH76S7.js → HZ5W3DBR.js} +1 -1
  27. package/dist/cdn/{3ZYTCYNE.js → I5HSJRM3.js} +1 -1
  28. package/dist/cdn/IBP5XPD5.js +2 -0
  29. package/dist/cdn/IC65R4QE.js +2 -0
  30. package/dist/cdn/IHSJ4MKS.js +2 -0
  31. package/dist/cdn/{ULD747OT.js → IJ3CLFAU.js} +1 -1
  32. package/dist/cdn/{XNZQ5PXA.js → IWUJRI4G.js} +1 -1
  33. package/dist/cdn/{KPEWVVE5.js → IXVR3KMC.js} +1 -1
  34. package/dist/cdn/{4YGBHWHG.js → JS45DWQ3.js} +1 -1
  35. package/dist/cdn/{43IIAMZ3.js → JYIPREIH.js} +1 -1
  36. package/dist/cdn/{V7LZAIB6.js → JZKBUYPV.js} +1 -1
  37. package/dist/cdn/{G6YH7AFY.js → KM5XGRXL.js} +1 -1
  38. package/dist/cdn/{3PAHY5KA.js → KNRJ3WXR.js} +1 -1
  39. package/dist/cdn/{BUPFZ5MT.js → L4DRNGOL.js} +1 -1
  40. package/dist/cdn/{F6V7MLPY.js → L6KBBJEC.js} +1 -1
  41. package/dist/cdn/{BTYTNPSM.js → NJ2WDAJM.js} +1 -1
  42. package/dist/cdn/{XCZSPNKS.js → OT4PZJNB.js} +1 -1
  43. package/dist/cdn/{S745KWLM.js → QE4CNVDQ.js} +1 -1
  44. package/dist/cdn/{3MQIRMUM.js → QKCV7CY2.js} +1 -1
  45. package/dist/cdn/{3XVBYE54.js → RKNDXSVK.js} +1 -1
  46. package/dist/cdn/{S5XNEB7F.js → SLTFLCVR.js} +1 -1
  47. package/dist/cdn/{YCAVVVZV.js → SUPKZF5M.js} +1 -1
  48. package/dist/cdn/{Q22FWLJZ.js → TJAX7J4T.js} +1 -1
  49. package/dist/cdn/{DXCPWJU4.js → TKCE4WYE.js} +1 -1
  50. package/dist/cdn/{CFYU265G.js → TMRF4W62.js} +2 -2
  51. package/dist/cdn/UZLQALHY.js +2 -0
  52. package/dist/cdn/{RR4BIAPA.js → V4EYW3O6.js} +1 -1
  53. package/dist/cdn/{74XFARCV.js → VW7DSKPH.js} +1 -1
  54. package/dist/cdn/{25UUUQAQ.js → W2SYL7IJ.js} +1 -1
  55. package/dist/cdn/{VRXKORTR.js → W4FGRGLV.js} +1 -1
  56. package/dist/cdn/{SYJSVUUR.js → W4SAWMXS.js} +1 -1
  57. package/dist/cdn/{EZ3BR2FP.js → WBZLQZYR.js} +1 -1
  58. package/dist/cdn/{Z2ZUXONU.js → WGZZB2DJ.js} +1 -1
  59. package/dist/cdn/{2MV6L7TF.js → WO23VQK3.js} +1 -1
  60. package/dist/cdn/{HVF4Z3VA.js → WSWHK6LB.js} +1 -1
  61. package/dist/cdn/{XHM6I6YG.js → WX65MRDH.js} +1 -1
  62. package/dist/cdn/{EIOSA4DR.js → ZPIXIG3Z.js} +1 -1
  63. package/dist/cdn/{HA2J6NDT.js → ZVFNCDG5.js} +1 -1
  64. package/dist/cdn/index.js +1 -1
  65. package/dist/docs/api.json +1 -1
  66. package/dist/docs/docs.json +1 -1
  67. package/dist/docs/web-types.json +1 -1
  68. package/package.json +4 -4
  69. package/dist/cdn/7355NM43.js +0 -2
  70. package/dist/cdn/DWPIXEWQ.js +0 -2
  71. package/dist/cdn/G2YAOSMT.js +0 -2
  72. package/dist/cdn/J2KLHUBJ.js +0 -2
  73. package/dist/cdn/QUMJ5FTJ.js +0 -2
  74. package/dist/cdn/YIMNOUTF.js +0 -2
  75. /package/dist/cdn/{ZZ4DR3HN.js → JV23HJTE.js} +0 -0
  76. /package/dist/cdn/{ECNI2A4K.js → XEK22IDA.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{L as l,R as h,j as u,v as e}from"./ZZ4DR3HN.js";import"./YIMNOUTF.js";var o=class extends l{constructor(){super(...arguments),this.recognition=null,this.isListening=!1,this.status="idle",this.isSupported=!1,this.arcgisVoiceInputError=e(),this.arcgisVoiceInputInterimTranscription=e(),this.arcgisVoiceInputStart=e(),this.arcgisVoiceInputStop=e(),this.arcgisVoiceInputTranscription=e()}static{this.properties={isListening:16,status:16,isSupported:16,language:1}}async clearText(){this.status="idle"}async startListening(){if(!this.isSupported)return"not-supported";if(this.isListening)return"already-listening";if(!this.recognition)return"uninitialized";try{return this.recognition.start(),null}catch(n){return console.error("Failed to start listening",n),"unhandled"}}async stopListening(){this.isListening&&this.recognition?.stop()}connectedCallback(){super.connectedCallback(),this.initializeSpeechRecognition()}disconnectedCallback(){super.disconnectedCallback(),this.recognition&&this.recognition.stop()}initializeSpeechRecognition(){if(typeof window>"u")return;let n=window.SpeechRecognition??window.webkitSpeechRecognition;if(!n){this.isSupported=!1,this.arcgisVoiceInputError.emit({errorCode:"not-supported"});return}this.isSupported=!0;let t=new n;this.recognition=t,t.continuous=!0,t.interimResults=!0,this.language&&(t.lang=this.language),t.onstart=()=>{this.isListening=!0,this.status="listening",this.arcgisVoiceInputStart.emit()},t.onresult=s=>{let{finalTranscript:i,interimTranscript:a}=Array.from(s.results).slice(s.resultIndex).reduce((r,c)=>{let p=c[0].transcript;return c.isFinal?r.finalTranscript+=p:r.interimTranscript+=p,r},{finalTranscript:"",interimTranscript:""});i?this.arcgisVoiceInputTranscription.emit({text:i}):a&&this.arcgisVoiceInputInterimTranscription.emit({text:a})},t.onerror=s=>{this.isListening=!1,this.status="error";let i="unhandled";switch(s.error){case"no-speech":i="no-speech";break;case"service-not-allowed":case"not-allowed":i="not-allowed";break;default:i="unhandled";break}this.arcgisVoiceInputError.emit({errorCode:i})},t.onend=()=>{this.isListening=!1,this.status="idle",this.arcgisVoiceInputStop.emit()}}render(){return u`<slot></slot>`}};h("arcgis-portal-voice-input",o);export{o as ArcgisPortalVoiceInput};
2
+ import{L as l,R as h,j as u,v as e}from"./JV23HJTE.js";import"./UZLQALHY.js";var o=class extends l{constructor(){super(...arguments),this.recognition=null,this.isListening=!1,this.status="idle",this.isSupported=!1,this.arcgisVoiceInputError=e(),this.arcgisVoiceInputInterimTranscription=e(),this.arcgisVoiceInputStart=e(),this.arcgisVoiceInputStop=e(),this.arcgisVoiceInputTranscription=e()}static{this.properties={isListening:16,status:16,isSupported:16,language:1}}async clearText(){this.status="idle"}async startListening(){if(!this.isSupported)return"not-supported";if(this.isListening)return"already-listening";if(!this.recognition)return"uninitialized";try{return this.recognition.start(),null}catch(n){return console.error("Failed to start listening",n),"unhandled"}}async stopListening(){this.isListening&&this.recognition?.stop()}connectedCallback(){super.connectedCallback(),this.initializeSpeechRecognition()}disconnectedCallback(){super.disconnectedCallback(),this.recognition&&this.recognition.stop()}initializeSpeechRecognition(){if(typeof window>"u")return;let n=window.SpeechRecognition??window.webkitSpeechRecognition;if(!n){this.isSupported=!1,this.arcgisVoiceInputError.emit({errorCode:"not-supported"});return}this.isSupported=!0;let t=new n;this.recognition=t,t.continuous=!0,t.interimResults=!0,this.language&&(t.lang=this.language),t.onstart=()=>{this.isListening=!0,this.status="listening",this.arcgisVoiceInputStart.emit()},t.onresult=s=>{let{finalTranscript:i,interimTranscript:a}=Array.from(s.results).slice(s.resultIndex).reduce((r,c)=>{let p=c[0].transcript;return c.isFinal?r.finalTranscript+=p:r.interimTranscript+=p,r},{finalTranscript:"",interimTranscript:""});i?this.arcgisVoiceInputTranscription.emit({text:i}):a&&this.arcgisVoiceInputInterimTranscription.emit({text:a})},t.onerror=s=>{this.isListening=!1,this.status="error";let i="unhandled";switch(s.error){case"no-speech":i="no-speech";break;case"service-not-allowed":case"not-allowed":i="not-allowed";break;default:i="unhandled";break}this.arcgisVoiceInputError.emit({errorCode:i})},t.onend=()=>{this.isListening=!1,this.status="idle",this.arcgisVoiceInputStop.emit()}}render(){return u`<slot></slot>`}};h("arcgis-portal-voice-input",o);export{o as ArcgisPortalVoiceInput};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{i as o}from"./ZZ4DR3HN.js";var c={INITIAL:0,PENDING:1,COMPLETE:2,ERROR:3},n=Symbol(),e=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((t,s)=>{this.o=t,this.h=s})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,s,r){this.p=0,this.i=0,(this._=t).addController(this);let i=typeof s=="object"?s:{task:s,args:r};this.v=i.task,this.j=i.args,this.m=i.argsEqual??u,this.k=i.onComplete,this.A=i.onError,this.autoRun=i.autoRun??!0,"initialValue"in i&&(this.u=i.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){this.autoRun===!0&&this.S()}hostUpdated(){this.autoRun==="afterUpdate"&&this.S()}T(){if(this.j===void 0)return;let t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){let t=this.T(),s=this.O;this.O=t,t===s||t===void 0||s!==void 0&&this.m(s,t)||await this.run(t)}async run(t){let s,r;t??=this.T(),this.O=t,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let i=++this.p;this.q=new AbortController;let a=!1;try{s=await this.v(t,{signal:this.q.signal})}catch(l){a=!0,r=l}if(this.p===i){if(s===n)this.i=0;else{if(a===!1){try{this.k?.(s)}catch{}this.i=2,this.o?.(s)}else{try{this.A?.(r)}catch{}this.i=3,this.h?.(r)}this.u=s,this.l=r}this._.requestUpdate()}}abort(t){this.i===1&&this.q?.abort(t)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){switch(this.i){case 0:return t.initial?.();case 1:return t.pending?.();case 2:return t.complete?.(this.value);case 3:return t.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}},u=(h,t)=>h===t||h.length===t.length&&h.every(((s,r)=>!o(s,t[r])));export{c as a,e as b};
2
+ import{i as o}from"./JV23HJTE.js";var c={INITIAL:0,PENDING:1,COMPLETE:2,ERROR:3},n=Symbol(),e=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((t,s)=>{this.o=t,this.h=s})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,s,r){this.p=0,this.i=0,(this._=t).addController(this);let i=typeof s=="object"?s:{task:s,args:r};this.v=i.task,this.j=i.args,this.m=i.argsEqual??u,this.k=i.onComplete,this.A=i.onError,this.autoRun=i.autoRun??!0,"initialValue"in i&&(this.u=i.initialValue,this.i=2,this.O=this.T?.())}hostUpdate(){this.autoRun===!0&&this.S()}hostUpdated(){this.autoRun==="afterUpdate"&&this.S()}T(){if(this.j===void 0)return;let t=this.j();if(!Array.isArray(t))throw Error("The args function must return an array");return t}async S(){let t=this.T(),s=this.O;this.O=t,t===s||t===void 0||s!==void 0&&this.m(s,t)||await this.run(t)}async run(t){let s,r;t??=this.T(),this.O=t,this.i===1?this.q?.abort():(this.t=void 0,this.o=void 0,this.h=void 0),this.i=1,this.autoRun==="afterUpdate"?queueMicrotask((()=>this._.requestUpdate())):this._.requestUpdate();let i=++this.p;this.q=new AbortController;let a=!1;try{s=await this.v(t,{signal:this.q.signal})}catch(l){a=!0,r=l}if(this.p===i){if(s===n)this.i=0;else{if(a===!1){try{this.k?.(s)}catch{}this.i=2,this.o?.(s)}else{try{this.A?.(r)}catch{}this.i=3,this.h?.(r)}this.u=s,this.l=r}this._.requestUpdate()}}abort(t){this.i===1&&this.q?.abort(t)}get value(){return this.u}get error(){return this.l}get status(){return this.i}render(t){switch(this.i){case 0:return t.initial?.();case 1:return t.pending?.();case 2:return t.complete?.(this.value);case 3:return t.error?.(this.error);default:throw Error("Unexpected status: "+this.i)}}},u=(h,t)=>h===t||h.length===t.length&&h.every(((s,r)=>!o(s,t[r])));export{c as a,e as b};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{A as k,B as w,C as V,D as m,E as h,F as A,G as D,H as y,k as P}from"./ZZ4DR3HN.js";var b=(s,f,c)=>{let p=new Map;for(let e=f;e<=c;e++)p.set(s[e],e);return p},I=w(class extends V{constructor(s){if(super(s),s.type!==k.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,f,c){let p;c===void 0?c=f:f!==void 0&&(p=f);let e=[],n=[],o=0;for(let a of s)e[o]=p?p(a,o):o,n[o]=c(a,o),o++;return{values:n,keys:e}}render(s,f,c){return this.dt(s,f,c).values}update(s,[f,c,p]){let e=D(s),{values:n,keys:o}=this.dt(f,c,p);if(!Array.isArray(e))return this.ut=o,n;let a=this.ut??=[],u=[],v,g,t=0,l=e.length-1,r=0,i=n.length-1;for(;t<=l&&r<=i;)if(e[t]===null)t++;else if(e[l]===null)l--;else if(a[t]===o[r])u[r]=h(e[t],n[r]),t++,r++;else if(a[l]===o[i])u[i]=h(e[l],n[i]),l--,i--;else if(a[t]===o[i])u[i]=h(e[t],n[i]),m(s,u[i+1],e[t]),t++,i--;else if(a[l]===o[r])u[r]=h(e[l],n[r]),m(s,e[t],e[l]),l--,r++;else if(v===void 0&&(v=b(o,r,i),g=b(a,t,l)),v.has(a[t]))if(v.has(a[l])){let d=g.get(o[r]),x=d!==void 0?e[d]:null;if(x===null){let C=m(s,e[t]);h(C,n[r]),u[r]=C}else u[r]=h(x,n[r]),m(s,e[t],x),e[d]=null;r++}else y(e[l]),l--;else y(e[t]),t++;for(;r<=i;){let d=m(s,u[i+1]);h(d,n[r]),u[r++]=d}for(;t<=l;){let d=e[t++];d!==null&&y(d)}return this.ut=o,A(s,u),P}});export{I as a};
2
+ import{A as k,B as w,C as V,D as m,E as h,F as A,G as D,H as y,k as P}from"./JV23HJTE.js";var b=(s,f,c)=>{let p=new Map;for(let e=f;e<=c;e++)p.set(s[e],e);return p},I=w(class extends V{constructor(s){if(super(s),s.type!==k.CHILD)throw Error("repeat() can only be used in text expressions")}dt(s,f,c){let p;c===void 0?c=f:f!==void 0&&(p=f);let e=[],n=[],o=0;for(let a of s)e[o]=p?p(a,o):o,n[o]=c(a,o),o++;return{values:n,keys:e}}render(s,f,c){return this.dt(s,f,c).values}update(s,[f,c,p]){let e=D(s),{values:n,keys:o}=this.dt(f,c,p);if(!Array.isArray(e))return this.ut=o,n;let a=this.ut??=[],u=[],v,g,t=0,l=e.length-1,r=0,i=n.length-1;for(;t<=l&&r<=i;)if(e[t]===null)t++;else if(e[l]===null)l--;else if(a[t]===o[r])u[r]=h(e[t],n[r]),t++,r++;else if(a[l]===o[i])u[i]=h(e[l],n[i]),l--,i--;else if(a[t]===o[i])u[i]=h(e[t],n[i]),m(s,u[i+1],e[t]),t++,i--;else if(a[l]===o[r])u[r]=h(e[l],n[r]),m(s,e[t],e[l]),l--,r++;else if(v===void 0&&(v=b(o,r,i),g=b(a,t,l)),v.has(a[t]))if(v.has(a[l])){let d=g.get(o[r]),x=d!==void 0?e[d]:null;if(x===null){let C=m(s,e[t]);h(C,n[r]),u[r]=C}else u[r]=h(x,n[r]),m(s,e[t],x),e[d]=null;r++}else y(e[l]),l--;else y(e[t]),t++;for(;r<=i;){let d=m(s,u[i+1]);h(d,n[r]),u[r++]=d}for(;t<=l;){let d=e[t++];d!==null&&y(d)}return this.ut=o,A(s,u),P}});export{I as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import b from"./NZVLEDFZ.js";import a from"./JEXN44WM.js";import"./QUEBM77K.js";import{L as o,R as s,j as e,v as r}from"./ZZ4DR3HN.js";import"./YIMNOUTF.js";export default $arcgis.t(([,{c:n}])=>{var c=960,i=class extends o{constructor(){super(...arguments),this.options=[],this.view="",this.viewText="View",this.store=n(),this.arcgisBrowserViewChange=r()}static{this.properties={options:0,view:1,viewText:1,store:0}}renderOption(t){return e`<calcite-dropdown-item .selected=${t.value===this.view} @calciteDropdownItemSelect=${()=>{this.arcgisBrowserViewChange.emit(t.value)}} .iconStart=${t.value} icon-flip-rtl=start>${t.title}</calcite-dropdown-item>`}renderButton(){let t=this.options.find(a=>a.value===this.view),l=this.store.width||window.innerWidth;return e`<calcite-button class="button" slot=trigger scale=m appearance=outline-fill kind=neutral .iconStart=${t?.value} icon-flip-rtl=start .label=${`${this.viewText}: ${t?.title||""}`}>${l>c?t?.title:null}</calcite-button>`}render(){return e`<calcite-dropdown placement=bottom-end scale=m overlay-positioning=fixed width=s>${this.renderButton()}<calcite-dropdown-group selection-mode=single>${this.options.map(t=>this.renderOption(t))}</calcite-dropdown-group></calcite-dropdown>`}};s("arcgis-portal-browser-view",i);return i},a,b)
2
+ import b from"./GJTJLK6T.js";import a from"./7E5GJIZV.js";import"./D76KMXZD.js";import{L as o,R as s,j as e,v as r}from"./JV23HJTE.js";import"./UZLQALHY.js";export default $arcgis.t(([,{c:n}])=>{var c=960,i=class extends o{constructor(){super(...arguments),this.options=[],this.view="",this.viewText="View",this.store=n(),this.arcgisBrowserViewChange=r()}static{this.properties={options:0,view:1,viewText:1,store:0}}renderOption(t){return e`<calcite-dropdown-item .selected=${t.value===this.view} @calciteDropdownItemSelect=${()=>{this.arcgisBrowserViewChange.emit(t.value)}} .iconStart=${t.value} icon-flip-rtl=start>${t.title}</calcite-dropdown-item>`}renderButton(){let t=this.options.find(a=>a.value===this.view),l=this.store.width||window.innerWidth;return e`<calcite-button class="button" slot=trigger scale=m appearance=outline-fill kind=neutral .iconStart=${t?.value} icon-flip-rtl=start .label=${`${this.viewText}: ${t?.title||""}`}>${l>c?t?.title:null}</calcite-button>`}render(){return e`<calcite-dropdown placement=bottom-end scale=m overlay-positioning=fixed width=s>${this.renderButton()}<calcite-dropdown-group selection-mode=single>${this.options.map(t=>this.renderOption(t))}</calcite-dropdown-group></calcite-dropdown>`}};s("arcgis-portal-browser-view",i);return i},a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as y}from"./ECNI2A4K.js";import{a as v}from"./6XWNBD36.js";import{J as d,K as u,L as g,O as m,R as p,h,j as n,v as l}from"./ZZ4DR3HN.js";export default $arcgis.t(([{watch:w}])=>{var c=1440*60*1e3;function i(a){let e=typeof a=="string"?Number.parseInt(a,10):typeof a=="number"?a:(a??new Date).valueOf(),t=new Date(e);return t.setHours(0,0,0,0),t.valueOf()}function f(a){return i(a)+c-1}var b=7*c,$=h`:host{display:block}.custom-date-picker{margin-top:.5rem;margin-bottom:.5rem;margin-inline-start:1.75rem;width:12.75rem}`,D=["custom","last30","last7","never","today","yesterday"],o=class extends g{constructor(){super(...arguments),this._messages=v({name:"portal-browser",blocking:!0}),this._datePicker=d(),this.today="",this.debouncedRangeChangeHandler=y(()=>this.rangeChangeHandler(),200),this.property="created",this.range=null,this.expanded=!1,this.includeNever=!1,this.arcgisBrowserFilter=l()}static{this.properties={property:1,serverProperty:1,range:1,start:1,end:1,store:0,expanded:5,includeNever:5}}static{this.styles=$}connectedCallback(){super.connectedCallback();let e=new Date;this.today=`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`,this.attachStoreWatcher(),this.range&&(this.range!=="custom"||this.start&&this.end)&&this.arcgisBrowserFilter.emit(this.getEventDetail())}willUpdate(e){(e.has("store")||e.has("property"))&&this.attachStoreWatcher(),(e.has("range")||e.has("start")||e.has("end"))&&this.range==="custom"&&this.setDatePickerValue()}disconnectedCallback(){this.removeStoreWatcher?.(),super.disconnectedCallback()}attachStoreWatcher(){if(this.removeStoreWatcher?.(),!this.store)return;let e=w(()=>{let t=this.store?.filters?.[this.property];return{value:t?.value,additionalParams:t?.additionalParams}},()=>{let t=this.store?.filters?.[this.property];!(t?.value||t?.additionalParams)&&this.isActive()&&this.resetDatePicker()});this.removeStoreWatcher=()=>e.remove()}resetDatePicker(){this.range=null,this.start=null,this.end=null,this._datePicker.value&&(this._datePicker.value.valueAsDate=[])}getValue(){let e=i(),t=f();switch(this.range){case"yesterday":return[e-c,e-1];case"today":return[e,t];case"last7":return[e-b,t];case"last30":return[e-c*30,t];case"never":return[-1,-1];case"custom":{let r=i(this.start),s=f(this.end);return[r,s]}default:return null}}getEventDetail(){let e=this._messages?.filterDate,t=this.getValue(),r=this.serverProperty??(this.property==="modified"?"modified":"uploaded"),s=this.range?e?.[this.range]??"":"",k=e?.[this.property]??"";return{id:this.property,value:t?`(${r}:[${t[0]} TO ${t[1]}])`:"",range:this.range,start:t?new Date(t[0]):void 0,end:t?new Date(t[1]):void 0,label:this.range?k.replace("${date}",s):""}}isActive(){return!!(this.range&&(this.range!=="custom"||this.start&&this.end))}setDatePickerValue(){!this._datePicker.value||this.range!=="custom"||!this.start||!this.end||(this._datePicker.value.valueAsDate=[new Date(i(this.start)),new Date(i(this.end))])}rangeChangeHandler(){let e=this._datePicker.value?.valueAsDate,[t,r]=Array.isArray(e)?e:[];t&&r&&(this.start=t,this.end=r,this.arcgisBrowserFilter.emit(this.getEventDetail()))}renderRange(e){let t=this._messages.filterDate;return n`<calcite-tree-item data-range=${e??m} .selected=${e===this.range}>${t[e]}</calcite-tree-item>`}render(){let e=this._messages.filterDate,t=this.includeNever?D:D.filter(r=>r!=="never");return n`<arcgis-portal-browser-filter .heading=${e.title[this.property]} .expanded=${this.expanded} .active=${this.isActive()} .filterId=${this.property} @arcgisBrowserFilterRemove=${()=>{this.resetDatePicker(),this.arcgisBrowserFilter.emit(this.getEventDetail())}}><calcite-tree selection-mode=children scale=m @calciteTreeSelect=${r=>{let s=r.target.selectedItems?.[0]?.dataset.range;this.range=this.range===s?null:s,!(this.range==="custom"&&!(this.start&&this.end))&&this.arcgisBrowserFilter.emit(this.getEventDetail())}}>${t.map(r=>this.renderRange(r))}</calcite-tree>${this.range==="custom"&&n`<calcite-input-date-picker class="custom-date-picker" @calciteInputDatePickerChange=${()=>this.debouncedRangeChangeHandler()} scale=s .max=${this.today} calendars=1 layout=vertical month-style=abbreviated proximity-selection-disabled range ${u(this._datePicker)}></calcite-input-date-picker>`||""}</arcgis-portal-browser-filter>`}};p("arcgis-portal-browser-filter-date",o);return o},"core/reactiveUtils")
2
+ import{a as y}from"./XEK22IDA.js";import{a as v}from"./AXM6XCZD.js";import{J as d,K as u,L as g,O as m,R as p,h,j as n,v as l}from"./JV23HJTE.js";export default $arcgis.t(([{watch:w}])=>{var c=1440*60*1e3;function i(a){let e=typeof a=="string"?Number.parseInt(a,10):typeof a=="number"?a:(a??new Date).valueOf(),t=new Date(e);return t.setHours(0,0,0,0),t.valueOf()}function f(a){return i(a)+c-1}var b=7*c,$=h`:host{display:block}.custom-date-picker{margin-top:.5rem;margin-bottom:.5rem;margin-inline-start:1.75rem;width:12.75rem}`,D=["custom","last30","last7","never","today","yesterday"],o=class extends g{constructor(){super(...arguments),this._messages=v({name:"portal-browser",blocking:!0}),this._datePicker=d(),this.today="",this.debouncedRangeChangeHandler=y(()=>this.rangeChangeHandler(),200),this.property="created",this.range=null,this.expanded=!1,this.includeNever=!1,this.arcgisBrowserFilter=l()}static{this.properties={property:1,serverProperty:1,range:1,start:1,end:1,store:0,expanded:5,includeNever:5}}static{this.styles=$}connectedCallback(){super.connectedCallback();let e=new Date;this.today=`${e.getFullYear()}-${e.getMonth()+1}-${e.getDate()}`,this.attachStoreWatcher(),this.range&&(this.range!=="custom"||this.start&&this.end)&&this.arcgisBrowserFilter.emit(this.getEventDetail())}willUpdate(e){(e.has("store")||e.has("property"))&&this.attachStoreWatcher(),(e.has("range")||e.has("start")||e.has("end"))&&this.range==="custom"&&this.setDatePickerValue()}disconnectedCallback(){this.removeStoreWatcher?.(),super.disconnectedCallback()}attachStoreWatcher(){if(this.removeStoreWatcher?.(),!this.store)return;let e=w(()=>{let t=this.store?.filters?.[this.property];return{value:t?.value,additionalParams:t?.additionalParams}},()=>{let t=this.store?.filters?.[this.property];!(t?.value||t?.additionalParams)&&this.isActive()&&this.resetDatePicker()});this.removeStoreWatcher=()=>e.remove()}resetDatePicker(){this.range=null,this.start=null,this.end=null,this._datePicker.value&&(this._datePicker.value.valueAsDate=[])}getValue(){let e=i(),t=f();switch(this.range){case"yesterday":return[e-c,e-1];case"today":return[e,t];case"last7":return[e-b,t];case"last30":return[e-c*30,t];case"never":return[-1,-1];case"custom":{let r=i(this.start),s=f(this.end);return[r,s]}default:return null}}getEventDetail(){let e=this._messages?.filterDate,t=this.getValue(),r=this.serverProperty??(this.property==="modified"?"modified":"uploaded"),s=this.range?e?.[this.range]??"":"",k=e?.[this.property]??"";return{id:this.property,value:t?`(${r}:[${t[0]} TO ${t[1]}])`:"",range:this.range,start:t?new Date(t[0]):void 0,end:t?new Date(t[1]):void 0,label:this.range?k.replace("${date}",s):""}}isActive(){return!!(this.range&&(this.range!=="custom"||this.start&&this.end))}setDatePickerValue(){!this._datePicker.value||this.range!=="custom"||!this.start||!this.end||(this._datePicker.value.valueAsDate=[new Date(i(this.start)),new Date(i(this.end))])}rangeChangeHandler(){let e=this._datePicker.value?.valueAsDate,[t,r]=Array.isArray(e)?e:[];t&&r&&(this.start=t,this.end=r,this.arcgisBrowserFilter.emit(this.getEventDetail()))}renderRange(e){let t=this._messages.filterDate;return n`<calcite-tree-item data-range=${e??m} .selected=${e===this.range}>${t[e]}</calcite-tree-item>`}render(){let e=this._messages.filterDate,t=this.includeNever?D:D.filter(r=>r!=="never");return n`<arcgis-portal-browser-filter .heading=${e.title[this.property]} .expanded=${this.expanded} .active=${this.isActive()} .filterId=${this.property} @arcgisBrowserFilterRemove=${()=>{this.resetDatePicker(),this.arcgisBrowserFilter.emit(this.getEventDetail())}}><calcite-tree selection-mode=children scale=m @calciteTreeSelect=${r=>{let s=r.target.selectedItems?.[0]?.dataset.range;this.range=this.range===s?null:s,!(this.range==="custom"&&!(this.start&&this.end))&&this.arcgisBrowserFilter.emit(this.getEventDetail())}}>${t.map(r=>this.renderRange(r))}</calcite-tree>${this.range==="custom"&&n`<calcite-input-date-picker class="custom-date-picker" @calciteInputDatePickerChange=${()=>this.debouncedRangeChangeHandler()} scale=s .max=${this.today} calendars=1 layout=vertical month-style=abbreviated proximity-selection-disabled range ${u(this._datePicker)}></calcite-input-date-picker>`||""}</arcgis-portal-browser-filter>`}};p("arcgis-portal-browser-filter-date",o);return o},"core/reactiveUtils")
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./YIMNOUTF.js";var e=`## ArcgisKnowledge Agent - Lucene Generation for Graph Search
2
+ import"./UZLQALHY.js";var e=`## ArcgisKnowledge Agent - Lucene Generation for Graph Search
3
3
 
4
4
  You are an assistant that generates a lucene query for graph query searching.
5
5
 
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import d from"./BTYTNPSM.js";import b from"./O3KBWLGU.js";import"./4YGBHWHG.js";import a from"./JEXN44WM.js";import{a as f}from"./6XWNBD36.js";import"./G2YAOSMT.js";import"./QUEBM77K.js";import{L as n,N as c,R as l,h as e,j as s,p as o}from"./ZZ4DR3HN.js";import"./YIMNOUTF.js";export default $arcgis.t(([,,{a:d,b:h}])=>{var p=e`.banner{box-sizing:border-box;width:100%;left:0;text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-spacing-sm);font-size:var(--calcite-font-size);text-transform:uppercase;overflow-wrap:break-word}.invalid-container{background-color:#fff;color:#000;display:flex;align-items:center;justify-content:center;gap:8px}.invalid-icon{--calcite-icon-color: var(--calcite-color-status-danger)}.invalid-message{text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-spacing-sm);font-size:var(--calcite-font-size);overflow-wrap:break-word}`,r=class extends n{constructor(){super(...arguments),this.classificationModel=d(this),this.messages=f(),this._classificationDataTask=h(this),this.portalClassificationSchema=this.classificationModel.portalClassificationSchema,this.status=this.classificationModel.status,this.missingExistingClassification=!1,this.variant="full",this.autoDestroyDisabled=!1,this.validationErrors=""}static{this.properties={portalClassificationSchema:16,status:16,itemClassification:16,portalItem:0,missingExistingClassification:5,variant:1,autoDestroyDisabled:5,validationErrors:1}}static{this.styles=p}async destroy(){await this.manager.destroy()}willUpdate(a){if(a.has("portalItem")){let{portalItem:i}=this;i?.load().then(()=>{i?.id&&i?.loaded&&i?.classification&&!this.missingExistingClassification?this.classificationModel.validateClassification(this.variant==="preview"?null:i.id,i.classification,i?.portal.restUrl).catch(o(this)).then(t=>{this.validationErrors=t??""}):this.validationErrors=""}).catch(o(this))}}getStyle(){let a={};if(this.variant==="preview"&&(a.fontSize="var(--calcite-font-size-sm)",a.padding="var(--calcite-spacing-xs)"),this.itemClassification&&this.portalClassificationSchema){let i=this.itemClassification.classification,t=this.portalClassificationSchema.classificationMetadata.classificationValueProperties.find(({value:m})=>m===i);t?.backgroundColor&&(a.backgroundColor=t.backgroundColor),t?.textColor&&(a.color=t.textColor)}return a}render(){return this._classificationDataTask.render({pending:void 0,error:void 0,complete:()=>this.portalClassificationSchema&&this.portalItem?.portal.authMode!=="anonymous"?this.validationErrors&&this.variant==="full"?s`<div class="invalid-container"><calcite-icon class="invalid-icon" scale=s icon=exclamation-mark-triangle .textLabel=${this.messages.invalidclassificationerror}></calcite-icon><span class="invalid-message">${this.messages.invalidclassificationerror}</span></div>`:s`<div class="banner" style=${c(this.getStyle())}>${this.itemClassification?.banner??this.messages.notyetclassified??"Not yet classified"}</div>`:""})}};l("arcgis-portal-classification-banner",r);return r},a,b,d)
2
+ import d from"./NJ2WDAJM.js";import b from"./O3KBWLGU.js";import"./JS45DWQ3.js";import a from"./7E5GJIZV.js";import{a as f}from"./AXM6XCZD.js";import"./IBP5XPD5.js";import"./D76KMXZD.js";import{L as n,N as c,R as l,h as e,j as s,p as o}from"./JV23HJTE.js";import"./UZLQALHY.js";export default $arcgis.t(([,,{a:d,b:h}])=>{var p=e`.banner{box-sizing:border-box;width:100%;left:0;text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-spacing-sm);font-size:var(--calcite-font-size);text-transform:uppercase;overflow-wrap:break-word}.invalid-container{background-color:#fff;color:#000;display:flex;align-items:center;justify-content:center;gap:8px}.invalid-icon{--calcite-icon-color: var(--calcite-color-status-danger)}.invalid-message{text-align:center;font-family:var(--calcite-font-family);background-color:#fff;color:#000;padding:var(--calcite-spacing-sm);font-size:var(--calcite-font-size);overflow-wrap:break-word}`,r=class extends n{constructor(){super(...arguments),this.classificationModel=d(this),this.messages=f(),this._classificationDataTask=h(this),this.portalClassificationSchema=this.classificationModel.portalClassificationSchema,this.status=this.classificationModel.status,this.missingExistingClassification=!1,this.variant="full",this.autoDestroyDisabled=!1,this.validationErrors=""}static{this.properties={portalClassificationSchema:16,status:16,itemClassification:16,portalItem:0,missingExistingClassification:5,variant:1,autoDestroyDisabled:5,validationErrors:1}}static{this.styles=p}async destroy(){await this.manager.destroy()}willUpdate(a){if(a.has("portalItem")){let{portalItem:i}=this;i?.load().then(()=>{i?.id&&i?.loaded&&i?.classification&&!this.missingExistingClassification?this.classificationModel.validateClassification(this.variant==="preview"?null:i.id,i.classification,i?.portal.restUrl).catch(o(this)).then(t=>{this.validationErrors=t??""}):this.validationErrors=""}).catch(o(this))}}getStyle(){let a={};if(this.variant==="preview"&&(a.fontSize="var(--calcite-font-size-sm)",a.padding="var(--calcite-spacing-xs)"),this.itemClassification&&this.portalClassificationSchema){let i=this.itemClassification.classification,t=this.portalClassificationSchema.classificationMetadata.classificationValueProperties.find(({value:m})=>m===i);t?.backgroundColor&&(a.backgroundColor=t.backgroundColor),t?.textColor&&(a.color=t.textColor)}return a}render(){return this._classificationDataTask.render({pending:void 0,error:void 0,complete:()=>this.portalClassificationSchema&&this.portalItem?.portal.authMode!=="anonymous"?this.validationErrors&&this.variant==="full"?s`<div class="invalid-container"><calcite-icon class="invalid-icon" scale=s icon=exclamation-mark-triangle .textLabel=${this.messages.invalidclassificationerror}></calcite-icon><span class="invalid-message">${this.messages.invalidclassificationerror}</span></div>`:s`<div class="banner" style=${c(this.getStyle())}>${this.itemClassification?.banner??this.messages.notyetclassified??"Not yet classified"}</div>`:""})}};l("arcgis-portal-classification-banner",r);return r},a,b,d)
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./YIMNOUTF.js";var e=`# Navigation Tool Instructions
2
+ import"./UZLQALHY.js";var e=`# Navigation Tool Instructions
3
3
 
4
4
  CRITICAL: You are FORBIDDEN from making multiple tool calls. You MUST make exactly ONE tool call.
5
5
 
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import b from"./O3KBWLGU.js";import{b as h}from"./4YGBHWHG.js";import a from"./JEXN44WM.js";import{n as f}from"./ZZ4DR3HN.js";export default $arcgis.t(([g,{property:c,subclass:C},{a:p},{a:d,b:m}])=>{var w=Object.defineProperty,y=Object.getOwnPropertyDescriptor,e=(t,a,s,i)=>{for(var r=i>1?void 0:i?y(a,s):a,l=t.length-1,n;l>=0;l--)(n=t[l])&&(r=(i?n(a,s,r):n(r))||r);return i&&r&&w(a,s,r),r},o=class extends g{constructor(){super(...arguments),this.fetching=!1,this.status="idle",this.error=void 0,this.portalUrl=void 0,this._itemClassificationValidationErrors=new Map,this.fetchingPromise=new f}get primaryAttribute(){return this.portalClassificationSchema?.classificationMetadata.primaryAttribute}setPortalClassificationData({portalUrl:t,schema:a}){this.portalUrl=t,this.portalClassificationSchema=a,this.status="loaded",this.fetchingPromise.resolve(!0)}setFetching(t){this.fetching=t}async loadPortalClassificationData(t,{signal:a}){this.status="loading";let{result:s,error:i}=await d(t,a);if(i){i.name==="AbortError"?console.log("Request aborted."):(this.error=i,this.status="error",this.fetchingPromise.reject(i));return}else this.setPortalClassificationData({schema:s,portalUrl:t})}async validateClassification(t,a,s,i){if(!a)return"";let r=t?this._itemClassificationValidationErrors.get(t):void 0;if(r)return await r;let l=(async()=>{let{error:n}=await m(s,a,i??{});return n?n?.details.raw.messages.join(", "):""})();return t&&this._itemClassificationValidationErrors.set(t,l),t?await this._itemClassificationValidationErrors.get(t):await l}};e([c()],o.prototype,"portalClassificationSchema",2);e([c()],o.prototype,"fetching",2);e([c()],o.prototype,"status",2);e([c()],o.prototype,"error",2);e([c()],o.prototype,"portalUrl",2);e([c()],o.prototype,"_itemClassificationValidationErrors",2);o=e([C("custom.ClassificationModel")],o);var u;function P(t){return u??=new o(t),u}var A=p(P),S=t=>new h(t,{task:async([a],{signal:s})=>{if(!a)throw new Error("Portal item is required to load classification data");if(a.loaded||await a.load({signal:s}),t.itemClassification=a.classification,t.classificationModel.status==="loading"&&await t.classificationModel.fetchingPromise.promise,!t.portalItem?.portal.hasClassificationSchema){t.classificationModel.setPortalClassificationData({portalUrl:a.portal.restUrl,schema:void 0});return}(t.classificationModel.status==="idle"||t.classificationModel.status==="loaded"&&t.classificationModel.portalUrl!==a.portal.restUrl)&&await t.classificationModel.loadPortalClassificationData(a.portal.restUrl,{signal:s})},args:()=>[t.portalItem]});return{a:A,b:S}},"core/Accessor","core/accessorSupport/decorators",a,b)
2
+ import b from"./O3KBWLGU.js";import{b as h}from"./JS45DWQ3.js";import a from"./7E5GJIZV.js";import{n as f}from"./JV23HJTE.js";export default $arcgis.t(([g,{property:c,subclass:C},{a:p},{a:d,b:m}])=>{var w=Object.defineProperty,y=Object.getOwnPropertyDescriptor,e=(t,a,s,i)=>{for(var r=i>1?void 0:i?y(a,s):a,l=t.length-1,n;l>=0;l--)(n=t[l])&&(r=(i?n(a,s,r):n(r))||r);return i&&r&&w(a,s,r),r},o=class extends g{constructor(){super(...arguments),this.fetching=!1,this.status="idle",this.error=void 0,this.portalUrl=void 0,this._itemClassificationValidationErrors=new Map,this.fetchingPromise=new f}get primaryAttribute(){return this.portalClassificationSchema?.classificationMetadata.primaryAttribute}setPortalClassificationData({portalUrl:t,schema:a}){this.portalUrl=t,this.portalClassificationSchema=a,this.status="loaded",this.fetchingPromise.resolve(!0)}setFetching(t){this.fetching=t}async loadPortalClassificationData(t,{signal:a}){this.status="loading";let{result:s,error:i}=await d(t,a);if(i){i.name==="AbortError"?console.log("Request aborted."):(this.error=i,this.status="error",this.fetchingPromise.reject(i));return}else this.setPortalClassificationData({schema:s,portalUrl:t})}async validateClassification(t,a,s,i){if(!a)return"";let r=t?this._itemClassificationValidationErrors.get(t):void 0;if(r)return await r;let l=(async()=>{let{error:n}=await m(s,a,i??{});return n?n?.details.raw.messages.join(", "):""})();return t&&this._itemClassificationValidationErrors.set(t,l),t?await this._itemClassificationValidationErrors.get(t):await l}};e([c()],o.prototype,"portalClassificationSchema",2);e([c()],o.prototype,"fetching",2);e([c()],o.prototype,"status",2);e([c()],o.prototype,"error",2);e([c()],o.prototype,"portalUrl",2);e([c()],o.prototype,"_itemClassificationValidationErrors",2);o=e([C("custom.ClassificationModel")],o);var u;function P(t){return u??=new o(t),u}var A=p(P),S=t=>new h(t,{task:async([a],{signal:s})=>{if(!a)throw new Error("Portal item is required to load classification data");if(a.loaded||await a.load({signal:s}),t.itemClassification=a.classification,t.classificationModel.status==="loading"&&await t.classificationModel.fetchingPromise.promise,!t.portalItem?.portal.hasClassificationSchema){t.classificationModel.setPortalClassificationData({portalUrl:a.portal.restUrl,schema:void 0});return}(t.classificationModel.status==="idle"||t.classificationModel.status==="loaded"&&t.classificationModel.portalUrl!==a.portal.restUrl)&&await t.classificationModel.loadPortalClassificationData(a.portal.restUrl,{signal:s})},args:()=>[t.portalItem]});return{a:A,b:S}},"core/Accessor","core/accessorSupport/decorators",a,b)
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./YIMNOUTF.js";var e=`## GIS Agent Orchestrator
2
+ import"./UZLQALHY.js";var e=`## GIS Agent Orchestrator
3
3
 
4
4
  You are an orchestrator for an ArcGIS Maps SDK for JavaScript system.
5
5
 
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./YIMNOUTF.js";var e=`## Membership Bind Parameters
2
+ import"./UZLQALHY.js";var e=`## Membership Bind Parameters
3
3
 
4
4
  The current map contains a subset of entities and relationships from the database. Their membership is available to Cypher queries as lists of string identifiers through these bind parameters:
5
5
 
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./YIMNOUTF.js";var e=`## Task: Summarize Geographic Features
2
+ import"./UZLQALHY.js";var e=`## Task: Summarize Geographic Features
3
3
 
4
4
  You are given features from ArcGIS Feature layer for multiple layers:
5
5
  {queryResponse}
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as m}from"./43IIAMZ3.js";import{a as h}from"./6XWNBD36.js";import"./G2YAOSMT.js";import"./QUEBM77K.js";import{L as b,O as a,R as d,h as c,j as i,v as u}from"./ZZ4DR3HN.js";import"./YIMNOUTF.js";var g=c`.spacing-y{margin:var(--calcite-spacing-md) 0}.portal-classification-form-element-tooltip{display:flex;justify-content:space-between;align-items:center}`;function s(o,e){return o.uiElement===e}var n=class extends b{constructor(){super(...arguments),this.messages=h(),this.isRequiredErrors=new Set,this.arcgisAttributeValueChange=u()}static{this.properties={validationMsg:16,attributeKey:1,attribute:0,value:0,renderingInfo:0,isRequiredErrors:0}}static{this.styles=g}willUpdate(e){(e.has("renderingInfo")||e.has("isRequiredErrors"))&&(this.validationMsg=this._getValidationMessage())}_getValidationMessage(){if(this.renderingInfo?.attributeValidationResult)return this.renderingInfo.attributeValidationResult;if(this.isRequiredErrors.has(this.attributeKey))return this.messages.requiredfield??"This is a required field."}renderCheckbox(){return s(this.attribute,"checkbox")?i`<calcite-label class="spacing-y" .for=${this.attributeKey} layout=inline><calcite-checkbox .checked=${this.value} id=${this.attributeKey??a} @calciteCheckboxChange=${e=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.checked})} .required=${this.attribute.isRequired??!1} .status=${this.validationMsg?"invalid":"valid"}></calcite-checkbox>${this.attribute.label}</calcite-label>`:null}renderDateInput(){return s(this.attribute,"date")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-input-date-picker id=${this.attributeKey??a} .name=${this.attribute.label} @calciteInputDatePickerChange=${e=>this.isConnected&&this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.value})} overlay-positioning=fixed .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}></calcite-input-date-picker></calcite-label>`:null}renderTextInput(){if(!s(this.attribute,"text"))return null;let e=this.attribute.label,t=this.attribute.description;return i`<calcite-label .for=${this.attributeKey}><div class="portal-classification-form-element-tooltip">${e}${this.attribute.labelTooltip&&i`<div><calcite-icon scale=s icon=information .id=${`tooltip-button-${this.attribute.bannerLabel}`} text-label=${this.messages.information??"Information"??a}></calcite-icon><calcite-tooltip .referenceElement=${`tooltip-button-${this.attribute.bannerLabel}`} placement=right>${this.attribute.labelTooltip}</calcite-tooltip></div>`||""}</div><calcite-input-text id=${this.attributeKey??a} .label=${e} .name=${this.attributeKey} @calciteInputTextChange=${r=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:r.target.value})} .placeholder=${t} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}></calcite-input-text></calcite-label>`}renderSingleSelect(){return s(this.attribute,"single-select")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox selection-mode=single id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.value})} .placeholder=${this.attribute.description??this.messages.selectanoption} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} overlay-positioning=fixed validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value} data-testid=${`single-select-${this.attributeKey}`}>${this._renderSingleSelectComboboxOptions()}</calcite-combobox></calcite-label>`:null}_renderSingleSelectComboboxOptions(){if(!Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return m(this.renderingInfo?.valueExpressionResult,t=>t.label,t=>i`<calcite-combobox-item .selected=${e===t.value} .heading=${t.label} .value=${t.value} data-testid=${`single-combobox-item-${t.value}`}></calcite-combobox-item>`)}_renderComboboxOptions(){if(!Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return this.renderingInfo?.valueExpressionResult.map(t=>i`<calcite-combobox-item .selected=${e?.includes(t.value)} .heading=${t.label} .value=${t.value} data-testid=${`combobox-item-${t.value}`}></calcite-combobox-item>`)}renderMultiSelect(){return s(this.attribute,"multi-select")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>{let t=e.target.value;this.arcgisAttributeValueChange.emit({[this.attributeKey]:t?Array.isArray(t)?t:[t]:void 0})}} .placeholder=${this.attribute.description??this.messages.selectoptions} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}>${this._renderComboboxOptions()}</calcite-combobox></calcite-label>`:null}_renderGroupedComboboxOptions(){if(!this.renderingInfo?.valueExpressionResult||Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return Object.entries(this.renderingInfo?.valueExpressionResult).map(([t,r])=>i`<calcite-combobox-item .selected=${e?.includes(t)} .heading=${t} .value=${t}>${r.map(l=>i`<calcite-combobox-item .selected=${e?.includes(l.value)} .heading=${l.label} .value=${l.value} data-testid=${`grouped-combobox-item-${l.value}`}></calcite-combobox-item>`)}</calcite-combobox-item>`)}renderMultiGroupedSelectNested(){return s(this.attribute,"multi-grouped-select-nested")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>{let t=e.target.value;this.arcgisAttributeValueChange.emit({[this.attributeKey]:t?Array.isArray(t)?t:[t]:void 0})}} .placeholder=${this.attribute.description??this.messages.selectoptions} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}>${this._renderGroupedComboboxOptions()}</calcite-combobox></calcite-label>`:null}render(){switch(this.attribute.uiElement){case"checkbox":return this.renderCheckbox();case"date":return this.renderDateInput();case"multi-select":return this.renderMultiSelect();case"multi-grouped-select-nested":return this.renderMultiGroupedSelectNested();case"single-select":return this.renderSingleSelect();case"text":return this.renderTextInput();default:return i`<div>Not Implemented Yet.</div>`}}};d("arcgis-portal-classification-form-element",n);export{n as ArcgisPortalClassificationFormElement};
2
+ import{a as m}from"./JYIPREIH.js";import{a as h}from"./AXM6XCZD.js";import"./IBP5XPD5.js";import"./D76KMXZD.js";import{L as b,O as a,R as d,h as c,j as i,v as u}from"./JV23HJTE.js";import"./UZLQALHY.js";var g=c`.spacing-y{margin:var(--calcite-spacing-md) 0}.portal-classification-form-element-tooltip{display:flex;justify-content:space-between;align-items:center}`;function s(o,e){return o.uiElement===e}var n=class extends b{constructor(){super(...arguments),this.messages=h(),this.isRequiredErrors=new Set,this.arcgisAttributeValueChange=u()}static{this.properties={validationMsg:16,attributeKey:1,attribute:0,value:0,renderingInfo:0,isRequiredErrors:0}}static{this.styles=g}willUpdate(e){(e.has("renderingInfo")||e.has("isRequiredErrors"))&&(this.validationMsg=this._getValidationMessage())}_getValidationMessage(){if(this.renderingInfo?.attributeValidationResult)return this.renderingInfo.attributeValidationResult;if(this.isRequiredErrors.has(this.attributeKey))return this.messages.requiredfield??"This is a required field."}renderCheckbox(){return s(this.attribute,"checkbox")?i`<calcite-label class="spacing-y" .for=${this.attributeKey} layout=inline><calcite-checkbox .checked=${this.value} id=${this.attributeKey??a} @calciteCheckboxChange=${e=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.checked})} .required=${this.attribute.isRequired??!1} .status=${this.validationMsg?"invalid":"valid"}></calcite-checkbox>${this.attribute.label}</calcite-label>`:null}renderDateInput(){return s(this.attribute,"date")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-input-date-picker id=${this.attributeKey??a} .name=${this.attribute.label} @calciteInputDatePickerChange=${e=>this.isConnected&&this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.value})} overlay-positioning=fixed .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}></calcite-input-date-picker></calcite-label>`:null}renderTextInput(){if(!s(this.attribute,"text"))return null;let e=this.attribute.label,t=this.attribute.description;return i`<calcite-label .for=${this.attributeKey}><div class="portal-classification-form-element-tooltip">${e}${this.attribute.labelTooltip&&i`<div><calcite-icon scale=s icon=information .id=${`tooltip-button-${this.attribute.bannerLabel}`} text-label=${this.messages.information??"Information"??a}></calcite-icon><calcite-tooltip .referenceElement=${`tooltip-button-${this.attribute.bannerLabel}`} placement=right>${this.attribute.labelTooltip}</calcite-tooltip></div>`||""}</div><calcite-input-text id=${this.attributeKey??a} .label=${e} .name=${this.attributeKey} @calciteInputTextChange=${r=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:r.target.value})} .placeholder=${t} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}></calcite-input-text></calcite-label>`}renderSingleSelect(){return s(this.attribute,"single-select")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox selection-mode=single id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>this.arcgisAttributeValueChange.emit({[this.attributeKey]:e.target.value})} .placeholder=${this.attribute.description??this.messages.selectanoption} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} overlay-positioning=fixed validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value} data-testid=${`single-select-${this.attributeKey}`}>${this._renderSingleSelectComboboxOptions()}</calcite-combobox></calcite-label>`:null}_renderSingleSelectComboboxOptions(){if(!Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return m(this.renderingInfo?.valueExpressionResult,t=>t.label,t=>i`<calcite-combobox-item .selected=${e===t.value} .heading=${t.label} .value=${t.value} data-testid=${`single-combobox-item-${t.value}`}></calcite-combobox-item>`)}_renderComboboxOptions(){if(!Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return this.renderingInfo?.valueExpressionResult.map(t=>i`<calcite-combobox-item .selected=${e?.includes(t.value)} .heading=${t.label} .value=${t.value} data-testid=${`combobox-item-${t.value}`}></calcite-combobox-item>`)}renderMultiSelect(){return s(this.attribute,"multi-select")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>{let t=e.target.value;this.arcgisAttributeValueChange.emit({[this.attributeKey]:t?Array.isArray(t)?t:[t]:void 0})}} .placeholder=${this.attribute.description??this.messages.selectoptions} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}>${this._renderComboboxOptions()}</calcite-combobox></calcite-label>`:null}_renderGroupedComboboxOptions(){if(!this.renderingInfo?.valueExpressionResult||Array.isArray(this.renderingInfo?.valueExpressionResult))return;let e=this.value;return Object.entries(this.renderingInfo?.valueExpressionResult).map(([t,r])=>i`<calcite-combobox-item .selected=${e?.includes(t)} .heading=${t} .value=${t}>${r.map(l=>i`<calcite-combobox-item .selected=${e?.includes(l.value)} .heading=${l.label} .value=${l.value} data-testid=${`grouped-combobox-item-${l.value}`}></calcite-combobox-item>`)}</calcite-combobox-item>`)}renderMultiGroupedSelectNested(){return s(this.attribute,"multi-grouped-select-nested")?i`<calcite-label .for=${this.attributeKey}>${this.attribute.label}<calcite-combobox id=${this.attributeKey??a} .label=${this.attribute.label} .name=${this.attributeKey} @calciteComboboxChange=${e=>{let t=e.target.value;this.arcgisAttributeValueChange.emit({[this.attributeKey]:t?Array.isArray(t)?t:[t]:void 0})}} .placeholder=${this.attribute.description??this.messages.selectoptions} .required=${this.attribute.isRequired} .status=${this.validationMsg?"invalid":"valid"} validation-icon=exclamation-mark-triangle .validationMessage=${this.validationMsg} .value=${this.value}>${this._renderGroupedComboboxOptions()}</calcite-combobox></calcite-label>`:null}render(){switch(this.attribute.uiElement){case"checkbox":return this.renderCheckbox();case"date":return this.renderDateInput();case"multi-select":return this.renderMultiSelect();case"multi-grouped-select-nested":return this.renderMultiGroupedSelectNested();case"single-select":return this.renderSingleSelect();case"text":return this.renderTextInput();default:return i`<div>Not Implemented Yet.</div>`}}};d("arcgis-portal-classification-form-element",n);export{n as ArcgisPortalClassificationFormElement};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./YIMNOUTF.js";var e=`# ArcGIS Knowledge Graph Cypher Rules
2
+ import"./UZLQALHY.js";var e=`# ArcGIS Knowledge Graph Cypher Rules
3
3
 
4
4
  ## GOAL
5
5
 
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import b from"./WSNLUGEP.js";import{a as D}from"./2XILGLOG.js";import a from"./HMBSJR37.js";import"./6W2IHKCA.js";import{a as R}from"./ECNI2A4K.js";import{b as E}from"./G2YAOSMT.js";import"./QUEBM77K.js";import{J as M,K as g,L as S,M as v,R as k,h as A,j as d,v as u}from"./ZZ4DR3HN.js";import"./YIMNOUTF.js";export default $arcgis.t(([{a:P,d:L},{a:x,d:O}])=>{var y=["@","#","$"],F=400;function q(n,t){let a=null;for(let l of t){let r=l.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),s=new RegExp(`${r}"([^"\\n]*)"?$`,"u"),e=n.match(s);if(e){let c=e[0],o=n.length-c.length,h=e[1]??"";(!a||o>a.startIndex)&&(a={starter:l,mentionText:c,query:h,startIndex:o})}let i=new RegExp(`${r}[\\p{L}\\p{N}_-]+$`,"u"),m=n.match(i);if(m){let c=m[0],o=n.length-c.length,h=c.slice(l.length);(!a||o>a.startIndex)&&(a={starter:l,mentionText:c,query:h,startIndex:o})}}return a}var U=n=>y.includes(n)?n:"@",N=E(n=>{let t=[],a=async s=>await x({requester:async()=>await L(n.portal,s,{num:3}),key:"items",id:s}),l=async s=>await x({requester:async()=>await P(n.portal,{query:`title:${s}`,num:3}),key:"groups",id:s}),r=R(async(s,e)=>{n.isFetchingEntities=!0;let i=s.toLowerCase();switch(U(e)){case"@":let m=10;n.filteredItemsInfo={type:"user",items:t.filter(h=>h.username?.toLowerCase().includes(i)||h.fullName?.toLowerCase().includes(i)).slice(0,m)};break;case"#":let{result:c}=await a(i);n.filteredItemsInfo={type:"item",items:c?.results??[]};break;case"$":let{results:o}=await l(i);n.filteredItemsInfo={type:"group",items:o};break}(n.filteredItemsInfo?.items?.length??0)===0&&await n.closePopover(),n.isFetchingEntities=!1},F);return{fetchUsers:async()=>{try{let{users:s}=await O(n.portal);t=s??[]}catch(s){t=[],console.error("error fetching org users:",s)}},filterItems:r,getItemText:(s,e)=>{let i="";switch(U(e)){case"@":i=s.username;break;case"#":i=s.title??"";break;case"$":i=s.title??"";break}return i.trim()}}}),$=({id:n,label:t,selected:a,description:l,contentStart:r,onSelect:s})=>D(n,d`<calcite-list-item class=${v({selected:a})} .label=${t} .description=${l} .selected=${a} @pointerdown=${async e=>{e.preventDefault(),e.stopPropagation(),await s()}} ${g(e=>{a&&e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})})}>${r}</calcite-list-item>`),K=A`.selected{--calcite-list-background-color: var(--calcite-color-foreground-2)}.mentionable-list{max-height:13rem;overflow-y:auto;padding:.25rem;width:min(100vw,24rem)}.mentionable-list--loading{min-height:10rem}`,w=class extends S{constructor(){super(...arguments),this.calciteTextAreaRef=M(),this.mentionableEntityController=N(this),this.handleInput=t=>{let{bubbleNewValueChange:a,checkForMention:l}=this,r=t.target.value;this._value=r,a(this._value);let s=this.nativeTextAreaRef?.selectionStart??0;l(r,s)},this.handleKeyDown=t=>{if(!this.popoverOpen){this.arcgisUserMentionableTextAreaKeyDown.emit(t),this.arcgisMentionableTextAreaKeyDown.emit(t);return}switch(t.key){case"ArrowDown":t.preventDefault(),this.selectedItemIndex=Math.min(this.selectedItemIndex+1,this.filteredItems.length-1);break;case"ArrowUp":t.preventDefault(),this.selectedItemIndex=Math.max(this.selectedItemIndex-1,0);break;case"Enter":t.preventDefault(),this.selectItem(this.filteredItems[this.selectedItemIndex]);break;case"Escape":t.preventDefault(),this.closePopover.bind(this)();break}},this.handleClosePopover=()=>{this.popoverOpen=!1,this.currentMentionQuery="",this.selectedItemIndex=0,this.currentStarter=null},this.bubbleNewValueChange=t=>{this.arcgisUserMentionableTextAreaChange.emit(t),this.arcgisMentionableTextAreaChange.emit(t)},this.checkForMention=(t,a)=>{let l=t.substring(0,a),r=q(l,this.starters??y);if(r){let{starter:s}=r;this.currentStarter=s,this.filterMentionItems(r),this.popoverOpen=!0;return}this.handleClosePopover()},this.filterMentionItems=t=>{let{mentionText:a,query:l,starter:r,startIndex:s}=t;this.currentMentionQuery=a,this.mentionStartPosition=s;let e=l.toLowerCase();this.mentionableEntityController.filterItems(e,r),this.selectedItemIndex=0},this.popoverOpen=!1,this.currentMentionQuery="",this.mentionStartPosition=0,this.selectedItemIndex=0,this.currentStarter=null,this._value="",this.filteredItemsInfo=null,this.isFetchingEntities=!1,this.popoverPlacement="bottom-start",this.disabled=!1,this.scale="m",this.rows=3,this.starters=y,this.readOnly=!1,this.arcgisMentionableSelectedIndexChange=u(),this.arcgisMentionableTextAreaChange=u(),this.arcgisMentionableTextAreaKeyDown=u(),this.arcgisUserMentionableTextAreaChange=u(),this.arcgisUserMentionableTextAreaKeyDown=u(),this.renderItemInfo=()=>{let{filteredItemsInfo:t,selectedItemIndex:a,portal:l}=this;if(!t)return null;let{items:r,type:s}=t;switch(s){case"user":return r.map((e,i)=>$({id:e.id,label:`@${e.username}`,description:e.fullName,selected:i===a,contentStart:d`<arcgis-portal-user-avatar slot=content-start .user=${e} .portal=${l} scale=m></arcgis-portal-user-avatar>`,onSelect:async()=>await this.selectItem(e)}));case"item":return r.map((e,i)=>$({id:e.id??`item-${i}`,label:`#${e.title}`,description:e.id??void 0,selected:i===a,onSelect:async()=>await this.selectItem(e),contentStart:d`<calcite-avatar slot=content-start .fullName=${e.title??void 0} .thumbnail=${e.thumbnailUrl??void 0} scale=m></calcite-avatar>`}));case"group":return r.map((e,i)=>$({id:e.id??`group-${i}`,label:`${e.title}`,description:e.id??void 0,selected:i===a,onSelect:async()=>await this.selectItem(e),contentStart:d`<calcite-avatar slot=content-start .fullName=${e.title??void 0} .thumbnail=${e.thumbnailUrl??void 0} scale=m></calcite-avatar>`}))}}}static{this.properties={popoverOpen:16,currentMentionQuery:16,mentionStartPosition:16,selectedItemIndex:16,currentStarter:16,_value:16,filteredItemsInfo:16,isFetchingEntities:16,popoverListLabel:1,popoverPlacement:1,disabled:5,portal:0,user:0,scale:1,value:1,maxLength:9,rows:9,starters:0,placeholder:1,readOnly:5}}static{this.styles=K}get filteredItems(){return this.filteredItemsInfo?.items??[]}async closePopover(){this.handleClosePopover()}async focusTextArea(){await this.calciteTextAreaRef.value?.setFocus()}async selectItem(t){let{currentStarter:a,_value:l,mentionStartPosition:r,currentMentionQuery:s,handleClosePopover:e,calciteTextAreaRef:i,nativeTextAreaRef:m,bubbleNewValueChange:c}=this;if(!t||!a)return;let o=this.mentionableEntityController.getItemText(t,a).replaceAll('"',"").trim(),h=/\s/u.test(o)?`${a}"${o}"`:`${a}${o}`,f=(l??"").substring(0,r),p=(l??"").substring(r+s.length),I=`${f}${h} ${p}`;this._value=I,c(this._value);let b=r+h.length+1;e(),await this.updateComplete,i.value?.setFocus(),m&&(m.selectionEnd=b)}willUpdate(t){t.has("value")&&(this._value=this.value??""),t.has("selectedItemIndex")&&this.arcgisMentionableSelectedIndexChange.emit(this.selectedItemIndex)}loaded(){this.updateComplete.then(()=>{let t=this.calciteTextAreaRef.value?.shadowRoot?.querySelector("textarea");t&&(this.nativeTextAreaRef=t)}),this.mentionableEntityController.fetchUsers()}render(){let{popoverPlacement:t,scale:a,_value:l,maxLength:r,rows:s,placeholder:e,readOnly:i,popoverOpen:m,closePopover:c,handleInput:o,handleKeyDown:h,disabled:f,isFetchingEntities:p,filteredItemsInfo:I,renderItemInfo:b,popoverListLabel:C}=this,T=this.calciteTextAreaRef.value,_=I?.items??[];return d`<calcite-text-area .placeholder=${e} .value=${l} .maxLength=${r} .rows=${s} .scale=${a} .readOnly=${i} .disabled=${f} @blur=${c} @calciteTextAreaInput=${o} @keydown=${h} ${g(this.calciteTextAreaRef)}></calcite-text-area>${T&&d`<calcite-popover .open=${m} .placement=${t} class="mention-popover" .label=${C} .referenceElement=${T} trigger-disabled pointer-disabled focus-trap-disabled><div class=${v({"mentionable-list":!0,"mentionable-list--loading":p})}>${p&&d`<calcite-scrim .loading=${p}></calcite-scrim>`||""}${_.length>0&&d`<calcite-list .label=${C}>${b()}</calcite-list>`||""}</div></calcite-popover>`||""}`}};k("arcgis-portal-mentionable-text-area",w);return w},a,b)
2
+ import b from"./WSNLUGEP.js";import{a as D}from"./GKOXTQHB.js";import a from"./HMBSJR37.js";import"./6W2IHKCA.js";import{a as R}from"./XEK22IDA.js";import{b as E}from"./IBP5XPD5.js";import"./D76KMXZD.js";import{J as M,K as g,L as S,M as v,R as k,h as A,j as d,v as u}from"./JV23HJTE.js";import"./UZLQALHY.js";export default $arcgis.t(([{a:P,d:L},{a:x,d:O}])=>{var y=["@","#","$"],F=400;function q(n,t){let a=null;for(let l of t){let r=l.replace(/[.*+?^${}()|[\]\\]/gu,"\\$&"),s=new RegExp(`${r}"([^"\\n]*)"?$`,"u"),e=n.match(s);if(e){let c=e[0],o=n.length-c.length,h=e[1]??"";(!a||o>a.startIndex)&&(a={starter:l,mentionText:c,query:h,startIndex:o})}let i=new RegExp(`${r}[\\p{L}\\p{N}_-]+$`,"u"),m=n.match(i);if(m){let c=m[0],o=n.length-c.length,h=c.slice(l.length);(!a||o>a.startIndex)&&(a={starter:l,mentionText:c,query:h,startIndex:o})}}return a}var U=n=>y.includes(n)?n:"@",N=E(n=>{let t=[],a=async s=>await x({requester:async()=>await L(n.portal,s,{num:3}),key:"items",id:s}),l=async s=>await x({requester:async()=>await P(n.portal,{query:`title:${s}`,num:3}),key:"groups",id:s}),r=R(async(s,e)=>{n.isFetchingEntities=!0;let i=s.toLowerCase();switch(U(e)){case"@":let m=10;n.filteredItemsInfo={type:"user",items:t.filter(h=>h.username?.toLowerCase().includes(i)||h.fullName?.toLowerCase().includes(i)).slice(0,m)};break;case"#":let{result:c}=await a(i);n.filteredItemsInfo={type:"item",items:c?.results??[]};break;case"$":let{results:o}=await l(i);n.filteredItemsInfo={type:"group",items:o};break}(n.filteredItemsInfo?.items?.length??0)===0&&await n.closePopover(),n.isFetchingEntities=!1},F);return{fetchUsers:async()=>{try{let{users:s}=await O(n.portal);t=s??[]}catch(s){t=[],console.error("error fetching org users:",s)}},filterItems:r,getItemText:(s,e)=>{let i="";switch(U(e)){case"@":i=s.username;break;case"#":i=s.title??"";break;case"$":i=s.title??"";break}return i.trim()}}}),$=({id:n,label:t,selected:a,description:l,contentStart:r,onSelect:s})=>D(n,d`<calcite-list-item class=${v({selected:a})} .label=${t} .description=${l} .selected=${a} @pointerdown=${async e=>{e.preventDefault(),e.stopPropagation(),await s()}} ${g(e=>{a&&e&&e.scrollIntoView({block:"nearest",behavior:"smooth"})})}>${r}</calcite-list-item>`),K=A`.selected{--calcite-list-background-color: var(--calcite-color-foreground-2)}.mentionable-list{max-height:13rem;overflow-y:auto;padding:.25rem;width:min(100vw,24rem)}.mentionable-list--loading{min-height:10rem}`,w=class extends S{constructor(){super(...arguments),this.calciteTextAreaRef=M(),this.mentionableEntityController=N(this),this.handleInput=t=>{let{bubbleNewValueChange:a,checkForMention:l}=this,r=t.target.value;this._value=r,a(this._value);let s=this.nativeTextAreaRef?.selectionStart??0;l(r,s)},this.handleKeyDown=t=>{if(!this.popoverOpen){this.arcgisUserMentionableTextAreaKeyDown.emit(t),this.arcgisMentionableTextAreaKeyDown.emit(t);return}switch(t.key){case"ArrowDown":t.preventDefault(),this.selectedItemIndex=Math.min(this.selectedItemIndex+1,this.filteredItems.length-1);break;case"ArrowUp":t.preventDefault(),this.selectedItemIndex=Math.max(this.selectedItemIndex-1,0);break;case"Enter":t.preventDefault(),this.selectItem(this.filteredItems[this.selectedItemIndex]);break;case"Escape":t.preventDefault(),this.closePopover.bind(this)();break}},this.handleClosePopover=()=>{this.popoverOpen=!1,this.currentMentionQuery="",this.selectedItemIndex=0,this.currentStarter=null},this.bubbleNewValueChange=t=>{this.arcgisUserMentionableTextAreaChange.emit(t),this.arcgisMentionableTextAreaChange.emit(t)},this.checkForMention=(t,a)=>{let l=t.substring(0,a),r=q(l,this.starters??y);if(r){let{starter:s}=r;this.currentStarter=s,this.filterMentionItems(r),this.popoverOpen=!0;return}this.handleClosePopover()},this.filterMentionItems=t=>{let{mentionText:a,query:l,starter:r,startIndex:s}=t;this.currentMentionQuery=a,this.mentionStartPosition=s;let e=l.toLowerCase();this.mentionableEntityController.filterItems(e,r),this.selectedItemIndex=0},this.popoverOpen=!1,this.currentMentionQuery="",this.mentionStartPosition=0,this.selectedItemIndex=0,this.currentStarter=null,this._value="",this.filteredItemsInfo=null,this.isFetchingEntities=!1,this.popoverPlacement="bottom-start",this.disabled=!1,this.scale="m",this.rows=3,this.starters=y,this.readOnly=!1,this.arcgisMentionableSelectedIndexChange=u(),this.arcgisMentionableTextAreaChange=u(),this.arcgisMentionableTextAreaKeyDown=u(),this.arcgisUserMentionableTextAreaChange=u(),this.arcgisUserMentionableTextAreaKeyDown=u(),this.renderItemInfo=()=>{let{filteredItemsInfo:t,selectedItemIndex:a,portal:l}=this;if(!t)return null;let{items:r,type:s}=t;switch(s){case"user":return r.map((e,i)=>$({id:e.id,label:`@${e.username}`,description:e.fullName,selected:i===a,contentStart:d`<arcgis-portal-user-avatar slot=content-start .user=${e} .portal=${l} scale=m></arcgis-portal-user-avatar>`,onSelect:async()=>await this.selectItem(e)}));case"item":return r.map((e,i)=>$({id:e.id??`item-${i}`,label:`#${e.title}`,description:e.id??void 0,selected:i===a,onSelect:async()=>await this.selectItem(e),contentStart:d`<calcite-avatar slot=content-start .fullName=${e.title??void 0} .thumbnail=${e.thumbnailUrl??void 0} scale=m></calcite-avatar>`}));case"group":return r.map((e,i)=>$({id:e.id??`group-${i}`,label:`${e.title}`,description:e.id??void 0,selected:i===a,onSelect:async()=>await this.selectItem(e),contentStart:d`<calcite-avatar slot=content-start .fullName=${e.title??void 0} .thumbnail=${e.thumbnailUrl??void 0} scale=m></calcite-avatar>`}))}}}static{this.properties={popoverOpen:16,currentMentionQuery:16,mentionStartPosition:16,selectedItemIndex:16,currentStarter:16,_value:16,filteredItemsInfo:16,isFetchingEntities:16,popoverListLabel:1,popoverPlacement:1,disabled:5,portal:0,user:0,scale:1,value:1,maxLength:9,rows:9,starters:0,placeholder:1,readOnly:5}}static{this.styles=K}get filteredItems(){return this.filteredItemsInfo?.items??[]}async closePopover(){this.handleClosePopover()}async focusTextArea(){await this.calciteTextAreaRef.value?.setFocus()}async selectItem(t){let{currentStarter:a,_value:l,mentionStartPosition:r,currentMentionQuery:s,handleClosePopover:e,calciteTextAreaRef:i,nativeTextAreaRef:m,bubbleNewValueChange:c}=this;if(!t||!a)return;let o=this.mentionableEntityController.getItemText(t,a).replaceAll('"',"").trim(),h=/\s/u.test(o)?`${a}"${o}"`:`${a}${o}`,f=(l??"").substring(0,r),p=(l??"").substring(r+s.length),I=`${f}${h} ${p}`;this._value=I,c(this._value);let b=r+h.length+1;e(),await this.updateComplete,i.value?.setFocus(),m&&(m.selectionEnd=b)}willUpdate(t){t.has("value")&&(this._value=this.value??""),t.has("selectedItemIndex")&&this.arcgisMentionableSelectedIndexChange.emit(this.selectedItemIndex)}loaded(){this.updateComplete.then(()=>{let t=this.calciteTextAreaRef.value?.shadowRoot?.querySelector("textarea");t&&(this.nativeTextAreaRef=t)}),this.mentionableEntityController.fetchUsers()}render(){let{popoverPlacement:t,scale:a,_value:l,maxLength:r,rows:s,placeholder:e,readOnly:i,popoverOpen:m,closePopover:c,handleInput:o,handleKeyDown:h,disabled:f,isFetchingEntities:p,filteredItemsInfo:I,renderItemInfo:b,popoverListLabel:C}=this,T=this.calciteTextAreaRef.value,_=I?.items??[];return d`<calcite-text-area .placeholder=${e} .value=${l} .maxLength=${r} .rows=${s} .scale=${a} .readOnly=${i} .disabled=${f} @blur=${c} @calciteTextAreaInput=${o} @keydown=${h} ${g(this.calciteTextAreaRef)}></calcite-text-area>${T&&d`<calcite-popover .open=${m} .placement=${t} class="mention-popover" .label=${C} .referenceElement=${T} trigger-disabled pointer-disabled focus-trap-disabled><div class=${v({"mentionable-list":!0,"mentionable-list--loading":p})}>${p&&d`<calcite-scrim .loading=${p}></calcite-scrim>`||""}${_.length>0&&d`<calcite-list .label=${C}>${b()}</calcite-list>`||""}</div></calcite-popover>`||""}`}};k("arcgis-portal-mentionable-text-area",w);return w},a,b)
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as b,b as k}from"./6W2IHKCA.js";import{J as c,K as h,L as g,N as f,O as $,R as d,h as m,j as l}from"./ZZ4DR3HN.js";import"./YIMNOUTF.js";var E=/^#[0-9a-f]{3}$/iu,x=/^#[0-9a-f]{6}$/iu;function u(o){return I(o)||v(o)}function I(o){return o?.length===4&&E.test(o)}function v(o){return o?.length===7&&x.test(o)}function O(o){if(!u(o))return null;let t=o.replace("#","");if(t.length===3){let[e,i,r]=t.split("");return{r:Number.parseInt(`${e}${e}`,16),g:Number.parseInt(`${i}${i}`,16),b:Number.parseInt(`${r}${r}`,16)}}return{r:Number.parseInt(t.slice(0,2),16),g:Number.parseInt(t.slice(2,4),16),b:Number.parseInt(t.slice(4,6),16)}}function w(o){let t=0;for(let i=0;i<o.length;i++)t=o.charCodeAt(i)+((t<<5)-t);let e="#";for(let i=0;i<3;i++){let r=t>>i*8&255;e+=`00${r.toString(16)}`.slice(-2)}return e}function y(o){let{r:t,g:e,b:i}=o;t/=255,e/=255,i/=255;let r=Math.max(t,e,i),n=Math.min(t,e,i),s=r-n;if(s===0)return 0;let a=0;switch(r){case t:a=(e-i)/s+(e<i?6:0);break;case e:a=(i-t)/s+2;break;default:a=(t-e)/s+4;break}return Math.round(a*60)}function M(o){let t=O(o);return t?y(t):0}var T=m`:host{display:inline-block}:host([scale="s"]){height:1.5rem;width:1.5rem;font-size:.625rem}:host([scale="m"]){height:2rem;width:2rem;font-size:.75rem}:host([scale="l"]){font-size:1rem;height:2.75rem;width:2.75rem}:host([scale="xl"]){font-size:1.25rem;height:4rem;width:4rem}.icon{display:flex;color:var(--calcite-color-text-3)}.background{position:relative;display:flex;height:100%;width:100%;align-items:center;justify-content:center}.initials{position:absolute;font-weight:700;text-transform:uppercase;color:var(--calcite-color-text-2)}.thumbnail{height:100%;width:100%}.tooltip-text{margin:0;padding:0;font-size:.75rem;color:var(--calcite-color-text-2)}calcite-tooltip{pointer-events:none}`,p=class extends g{constructor(){super(...arguments),this.imageEl=c(),this.fallbackEl=c(),this.tooltipEl=c(),this.imageError=!1,this.tooltipOpen=!1,this.tooltip=!1,this.scale="m"}static{this.properties={imageError:16,tooltipOpen:16,group:0,portal:0,tooltip:5,scale:3}}static{this.styles=T}willUpdate(t){t.has("group")&&(this.imageError=!1)}updated(){let t=this.tooltipEl.value,e=this.imageEl.value||this.fallbackEl.value;t&&e&&(t.referenceElement=e)}isDarkMode(){return!!this.el.closest(".calcite-mode-dark")}getThumbnailURI(){let{group:t,portal:e}=this;if(!t)return null;if(t.thumbnailUrl)return t.thumbnailUrl;let i=t.thumbnail;if(!i)return null;if(i.startsWith("http"))return i;if(!e||!t.id)return null;let r=k(e),n=r?`?token=${r}`:"";return`${b(e)}community/groups/${t.id}/info/${i}${n}`}generateFillColor(){let{id:t,title:e}=this.group||{},i=t?`#${t.slice(Math.max(0,t.length-6))}`:"",r=t&&u(i)?i:w(e||"");if(!t&&!e||!u(r))return"var(--calcite-color-foreground-2)";let n=M(r),s=this.isDarkMode()?20:90;return`hsl(${n}, 60%, ${s}%)`}generateInitials(){let t=this.group?.title?.trim().charAt(0);return t?.match(/^\w+$/u)?t:null}getIconScale(){return this.scale==="xl"?"l":this.scale==="xs"?"s":this.scale}renderTooltip(){return!this.tooltip||!this.group?.title?null:l`<calcite-tooltip .open=${this.tooltipOpen} close-on-click placement=bottom-start offset-distance=6 offset-skidding=0 ${h(this.tooltipEl)}><p class="tooltip-text">${this.group.title}</p></calcite-tooltip>`}render(){let t=this.getThumbnailURI();if(t&&!this.imageError)return l`<img class="thumbnail" src=${t??$} alt @error=${()=>{this.imageError=!0}} @mouseenter=${()=>{this.tooltipOpen=!0}} @mouseleave=${()=>{this.tooltipOpen=!1}} @focusin=${()=>{this.tooltipOpen=!0}} @focusout=${()=>{this.tooltipOpen=!1}} ${h(this.imageEl)}>${this.renderTooltip()}`;let e=this.generateInitials();return l`<span class="background" style=${f({backgroundColor:this.generateFillColor()})} @mouseenter=${()=>{this.tooltipOpen=!0}} @mouseleave=${()=>{this.tooltipOpen=!1}} @focusin=${()=>{this.tooltipOpen=!0}} @focusout=${()=>{this.tooltipOpen=!1}} ${h(this.fallbackEl)}>${e?l`<span aria-hidden=true class="initials">${e}</span>`:l`<calcite-icon class="icon" icon=users .scale=${this.getIconScale()}></calcite-icon>`}</span>${this.renderTooltip()}`}};d("arcgis-portal-group-thumbnail",p);export{p as ArcgisPortalGroupThumbnail};
2
+ import{a as b,b as k}from"./6W2IHKCA.js";import{J as c,K as h,L as g,N as f,O as $,R as d,h as m,j as l}from"./JV23HJTE.js";import"./UZLQALHY.js";var E=/^#[0-9a-f]{3}$/iu,x=/^#[0-9a-f]{6}$/iu;function u(o){return I(o)||v(o)}function I(o){return o?.length===4&&E.test(o)}function v(o){return o?.length===7&&x.test(o)}function O(o){if(!u(o))return null;let t=o.replace("#","");if(t.length===3){let[e,i,r]=t.split("");return{r:Number.parseInt(`${e}${e}`,16),g:Number.parseInt(`${i}${i}`,16),b:Number.parseInt(`${r}${r}`,16)}}return{r:Number.parseInt(t.slice(0,2),16),g:Number.parseInt(t.slice(2,4),16),b:Number.parseInt(t.slice(4,6),16)}}function w(o){let t=0;for(let i=0;i<o.length;i++)t=o.charCodeAt(i)+((t<<5)-t);let e="#";for(let i=0;i<3;i++){let r=t>>i*8&255;e+=`00${r.toString(16)}`.slice(-2)}return e}function y(o){let{r:t,g:e,b:i}=o;t/=255,e/=255,i/=255;let r=Math.max(t,e,i),n=Math.min(t,e,i),s=r-n;if(s===0)return 0;let a=0;switch(r){case t:a=(e-i)/s+(e<i?6:0);break;case e:a=(i-t)/s+2;break;default:a=(t-e)/s+4;break}return Math.round(a*60)}function M(o){let t=O(o);return t?y(t):0}var T=m`:host{display:inline-block}:host([scale="s"]){height:1.5rem;width:1.5rem;font-size:.625rem}:host([scale="m"]){height:2rem;width:2rem;font-size:.75rem}:host([scale="l"]){font-size:1rem;height:2.75rem;width:2.75rem}:host([scale="xl"]){font-size:1.25rem;height:4rem;width:4rem}.icon{display:flex;color:var(--calcite-color-text-3)}.background{position:relative;display:flex;height:100%;width:100%;align-items:center;justify-content:center}.initials{position:absolute;font-weight:700;text-transform:uppercase;color:var(--calcite-color-text-2)}.thumbnail{height:100%;width:100%}.tooltip-text{margin:0;padding:0;font-size:.75rem;color:var(--calcite-color-text-2)}calcite-tooltip{pointer-events:none}`,p=class extends g{constructor(){super(...arguments),this.imageEl=c(),this.fallbackEl=c(),this.tooltipEl=c(),this.imageError=!1,this.tooltipOpen=!1,this.tooltip=!1,this.scale="m"}static{this.properties={imageError:16,tooltipOpen:16,group:0,portal:0,tooltip:5,scale:3}}static{this.styles=T}willUpdate(t){t.has("group")&&(this.imageError=!1)}updated(){let t=this.tooltipEl.value,e=this.imageEl.value||this.fallbackEl.value;t&&e&&(t.referenceElement=e)}isDarkMode(){return!!this.el.closest(".calcite-mode-dark")}getThumbnailURI(){let{group:t,portal:e}=this;if(!t)return null;if(t.thumbnailUrl)return t.thumbnailUrl;let i=t.thumbnail;if(!i)return null;if(i.startsWith("http"))return i;if(!e||!t.id)return null;let r=k(e),n=r?`?token=${r}`:"";return`${b(e)}community/groups/${t.id}/info/${i}${n}`}generateFillColor(){let{id:t,title:e}=this.group||{},i=t?`#${t.slice(Math.max(0,t.length-6))}`:"",r=t&&u(i)?i:w(e||"");if(!t&&!e||!u(r))return"var(--calcite-color-foreground-2)";let n=M(r),s=this.isDarkMode()?20:90;return`hsl(${n}, 60%, ${s}%)`}generateInitials(){let t=this.group?.title?.trim().charAt(0);return t?.match(/^\w+$/u)?t:null}getIconScale(){return this.scale==="xl"?"l":this.scale==="xs"?"s":this.scale}renderTooltip(){return!this.tooltip||!this.group?.title?null:l`<calcite-tooltip .open=${this.tooltipOpen} close-on-click placement=bottom-start offset-distance=6 offset-skidding=0 ${h(this.tooltipEl)}><p class="tooltip-text">${this.group.title}</p></calcite-tooltip>`}render(){let t=this.getThumbnailURI();if(t&&!this.imageError)return l`<img class="thumbnail" src=${t??$} alt @error=${()=>{this.imageError=!0}} @mouseenter=${()=>{this.tooltipOpen=!0}} @mouseleave=${()=>{this.tooltipOpen=!1}} @focusin=${()=>{this.tooltipOpen=!0}} @focusout=${()=>{this.tooltipOpen=!1}} ${h(this.imageEl)}>${this.renderTooltip()}`;let e=this.generateInitials();return l`<span class="background" style=${f({backgroundColor:this.generateFillColor()})} @mouseenter=${()=>{this.tooltipOpen=!0}} @mouseleave=${()=>{this.tooltipOpen=!1}} @focusin=${()=>{this.tooltipOpen=!0}} @focusout=${()=>{this.tooltipOpen=!1}} ${h(this.fallbackEl)}>${e?l`<span aria-hidden=true class="initials">${e}</span>`:l`<calcite-icon class="icon" icon=users .scale=${this.getIconScale()}></calcite-icon>`}</span>${this.renderTooltip()}`}};d("arcgis-portal-group-thumbnail",p);export{p as ArcgisPortalGroupThumbnail};
@@ -1,3 +1,3 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./YIMNOUTF.js";var o=`(function(){"use strict";const h=(a,r)=>{if(a.length!==r.length)throw new Error("Vectors must be the same length");let c=0,t=0,e=0;for(let n=0;n<a.length;++n){const s=a[n],l=r[n];c+=s*l,t+=s*s,e+=l*l}const i=Math.sqrt(t*e);if(i===0)return 0;const m=c/i;return Math.max(-1,Math.min(1,m))},f=(a,r,c=.6)=>{const t=[],e=[...a];for(;t.length<r&&e.length>0;){let i=-1,m=-1/0;for(let n=0;n<e.length;n++){const s=e[n].score,l=t.length===0?0:Math.max(...t.map(o=>h(e[n].vector,o.vector))),d=c*s-(1-c)*l;d>m&&(m=d,i=n)}t.push(e[i]),e.splice(i,1)}return t.map(({name:i,score:m})=>({name:i,score:m}))};let p=[];const u=new Map,v=12,y=10,M=a=>{p=a.layers.map(r=>({id:r.id,vector:r.vector}))},E=a=>{u.clear();for(const r of a.layers){const c=r.fields.map(t=>({name:t.name,vector:t.vector}));u.set(r.id,c)}};globalThis.addEventListener("message",a=>{(async()=>{const{type:r,webmapEmbeddings:c,layerIdForFieldsSearch:t=[],requestId:e,precomputedEmbedding:i,minScore:m=0,topResults:n=v}=a.data;switch(r){case"generateEmbeddings":{c&&(M(c),E(c)),globalThis.postMessage("completed");break}case"layerSearch":{if(p.length>0)try{const s=p.map(o=>({id:o.id,vector:o.vector,score:h(i,o.vector)})),d=f(s.map(o=>({name:o.id,vector:o.vector,score:o.score})),y).map(({name:o,score:b})=>({id:o,score:b}));globalThis.postMessage({requestId:e,results:d})}catch(s){globalThis.postMessage({requestId:e,results:[],error:s instanceof Error?s.message:"Calculation error"})}else globalThis.postMessage({requestId:e,results:[],error:"Layer embeddings not initialized"});break}case"fieldSearch":{if(t.length>0)try{const s=t.map(l=>{const d=u.get(l);if(!d)return{layerId:l,results:[]};const o=d.map(g=>({name:g.name,vector:g.vector,score:h(i,g.vector)})).filter(({score:g})=>g>=m),b=f(o,n);return{layerId:l,results:b}});globalThis.postMessage({requestId:e,results:s})}catch(s){globalThis.postMessage({requestId:e,results:[],error:s instanceof Error?s.message:"Field search calculation error"})}break}default:console.warn("Unknown message type:",r)}})()})})();
2
+ import"./UZLQALHY.js";var o=`(function(){"use strict";const h=(a,r)=>{if(a.length!==r.length)throw new Error("Vectors must be the same length");let c=0,t=0,e=0;for(let n=0;n<a.length;++n){const s=a[n],l=r[n];c+=s*l,t+=s*s,e+=l*l}const i=Math.sqrt(t*e);if(i===0)return 0;const m=c/i;return Math.max(-1,Math.min(1,m))},f=(a,r,c=.6)=>{const t=[],e=[...a];for(;t.length<r&&e.length>0;){let i=-1,m=-1/0;for(let n=0;n<e.length;n++){const s=e[n].score,l=t.length===0?0:Math.max(...t.map(o=>h(e[n].vector,o.vector))),d=c*s-(1-c)*l;d>m&&(m=d,i=n)}t.push(e[i]),e.splice(i,1)}return t.map(({name:i,score:m})=>({name:i,score:m}))};let p=[];const u=new Map,v=12,y=10,M=a=>{p=a.layers.map(r=>({id:r.id,vector:r.vector}))},E=a=>{u.clear();for(const r of a.layers){const c=r.fields.map(t=>({name:t.name,vector:t.vector}));u.set(r.id,c)}};globalThis.addEventListener("message",a=>{(async()=>{const{type:r,webmapEmbeddings:c,layerIdForFieldsSearch:t=[],requestId:e,precomputedEmbedding:i,minScore:m=0,topResults:n=v}=a.data;switch(r){case"generateEmbeddings":{c&&(M(c),E(c)),globalThis.postMessage("completed");break}case"layerSearch":{if(p.length>0)try{const s=p.map(o=>({id:o.id,vector:o.vector,score:h(i,o.vector)})),d=f(s.map(o=>({name:o.id,vector:o.vector,score:o.score})),y).map(({name:o,score:b})=>({id:o,score:b}));globalThis.postMessage({requestId:e,results:d})}catch(s){globalThis.postMessage({requestId:e,results:[],error:s instanceof Error?s.message:"Calculation error"})}else globalThis.postMessage({requestId:e,results:[],error:"Layer embeddings not initialized"});break}case"fieldSearch":{if(t.length>0)try{const s=t.map(l=>{const d=u.get(l);if(!d)return{layerId:l,results:[]};const o=d.map(g=>({name:g.name,vector:g.vector,score:h(i,g.vector)})).filter(({score:g})=>g>=m),b=f(o,n);return{layerId:l,results:b}});globalThis.postMessage({requestId:e,results:s})}catch(s){globalThis.postMessage({requestId:e,results:[],error:s instanceof Error?s.message:"Field search calculation error"})}break}default:console.warn("Unknown message type:",r)}})()})})();
3
3
  `,r=typeof self<"u"&&self.Blob&&new Blob(["(self.URL || self.webkitURL).revokeObjectURL(self.location.href);",o],{type:"text/javascript;charset=utf-8"});function a(t){let e;try{if(e=r&&(self.URL||self.webkitURL).createObjectURL(r),!e)throw"";let s=new Worker(e,{name:t?.name});return s.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(e)}),s}catch{return new Worker("data:text/javascript;charset=utf-8,"+encodeURIComponent(o),{name:t?.name})}}export{a as default};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import a from"./HMBSJR37.js";import"./6W2IHKCA.js";import{a as pu,b as mu,d as fu,e as hu,f as gu}from"./6AGZRMJC.js";import{a as To,b as Rl}from"./I234NUZ5.js";import{a as Ml}from"./6XWNBD36.js";import"./G2YAOSMT.js";import"./QUEBM77K.js";import{J as Io,K as vo,L as Pl,R as Ol,h as Sl,j as Dr,m as kl,v as Cl,y as El}from"./ZZ4DR3HN.js";import{$ as Ja,Aa as D,Ba as I,Ca as Qa,Da as He,Db as au,Ea as Br,Fa as Ne,Ga as kt,Ha as Je,Ia as ks,J as zl,Ja as Yl,K as it,Ka as Xl,L as jl,La as Cs,Lb as Ct,M as bs,Ma as Ya,Mb as ti,N as Ga,Na as Kr,O as Wa,Oa as Xa,Ob as Ee,P as xs,Pa as eu,Q as Va,Qa as tu,Qb as Po,R as ko,Ra as ru,S as F,Sa as nu,Sb as Os,T as Ha,Ta as Eo,U as Ll,Ua as Es,Ub as Oo,V as $,Va as ou,Vb as Ms,W as vt,Wa as Gr,Wb as _e,X as lt,Xa as Wr,Y as As,Ya as v,Z as Dl,Za as j,_ as Fl,_a as ei,a as ge,aa as ke,b as L,ba as Is,ca as Ul,da as vs,ea as ql,f as Ie,fa as $e,g as $l,ga as Fr,ha as Bl,ia as Za,ib as M,j as ae,ja as Kl,k as ye,ka as Co,la as Tt,ma as Gl,na as Wl,oa as Vl,pa as Ur,qa as Hl,ra as ut,rb as Ps,s as ws,sa as Jl,ta as St,ua as Ts,ub as su,va as Ce,wa as qr,x as Nl,xa as Zl,y as So,ya as Ss,za as Ql}from"./7SB3CUTJ.js";import"./YIMNOUTF.js";export default $arcgis.t(([AG,vG,Sp,oy,sy,wy,PG,MG,qH,Bx,Dp,zr,il,Wp,,Fp,Iy,{addressToLocations:vy},Ty,Sy,Vp,{createRenderer:ky},{getSchemesByTag:Cy,getSchemes:Ey},{getBackgroundColorTheme:Up},{createAgeRenderer:Py,createContinuousRenderer:Oy},{getSchemesByTag:yl},{createContinuousRenderer:My},{createRenderer:Ry},{getSchemesByTag:$y},{createRenderer:Ny},{getSchemesByTag:zy},{createRenderer:jy},{getSchemesByTag:Ly},{createRenderer:Dy},{getSchemesByTag:Fy},{createAgeRenderer:Uy,createContinuousRenderer:qy},{createRenderer:By},{getSchemesByTag:Ky},Gy,Hp,Jp,{formatDateOnly:Wy,convertDateFormatToIntlOptions:Ma,formatTimeOnly:Vy,formatDate:qp},Hy,Jy,Zy,Qy,Yy,Zp,,{fetchKnowledgeGraph:Bp,executeQueryStreaming:Xy,executeSearchStreaming:e_},t_,{getBindParametersFromCypherQuery:r_},,,,,,,,,,,,,,,,,,,,,,,,,qV,KV,,,,,,,,,,,,,Kx,um,{a:iu,b:lu,c:uu,d:cu,e:du}])=>{var m=v;async function ri(t,e,r){if(r===void 0)throw new Error(["Unable to dispatch a custom event without a parent run id.",'"dispatchCustomEvent" can only be called from within an existing run (e.g.,',"inside a tool or a RunnableLambda).",`
2
+ import a from"./HMBSJR37.js";import"./6W2IHKCA.js";import{a as pu,b as mu,d as fu,e as hu,f as gu}from"./6AGZRMJC.js";import{a as To,b as Rl}from"./I234NUZ5.js";import{a as Ml}from"./AXM6XCZD.js";import"./IBP5XPD5.js";import"./D76KMXZD.js";import{J as Io,K as vo,L as Pl,R as Ol,h as Sl,j as Dr,m as kl,v as Cl,y as El}from"./JV23HJTE.js";import{$ as Ja,Aa as D,Ba as I,Ca as Qa,Da as He,Db as au,Ea as Br,Fa as Ne,Ga as kt,Ha as Je,Ia as ks,J as zl,Ja as Yl,K as it,Ka as Xl,L as jl,La as Cs,Lb as Ct,M as bs,Ma as Ya,Mb as ti,N as Ga,Na as Kr,O as Wa,Oa as Xa,Ob as Ee,P as xs,Pa as eu,Q as Va,Qa as tu,Qb as Po,R as ko,Ra as ru,S as F,Sa as nu,Sb as Os,T as Ha,Ta as Eo,U as Ll,Ua as Es,Ub as Oo,V as $,Va as ou,Vb as Ms,W as vt,Wa as Gr,Wb as _e,X as lt,Xa as Wr,Y as As,Ya as v,Z as Dl,Za as j,_ as Fl,_a as ei,a as ge,aa as ke,b as L,ba as Is,ca as Ul,da as vs,ea as ql,f as Ie,fa as $e,g as $l,ga as Fr,ha as Bl,ia as Za,ib as M,j as ae,ja as Kl,k as ye,ka as Co,la as Tt,ma as Gl,na as Wl,oa as Vl,pa as Ur,qa as Hl,ra as ut,rb as Ps,s as ws,sa as Jl,ta as St,ua as Ts,ub as su,va as Ce,wa as qr,x as Nl,xa as Zl,y as So,ya as Ss,za as Ql}from"./5VPTTFBP.js";import"./UZLQALHY.js";export default $arcgis.t(([AG,vG,Sp,oy,sy,wy,PG,MG,qH,Bx,Dp,zr,il,Wp,,Fp,Iy,{addressToLocations:vy},Ty,Sy,Vp,{createRenderer:ky},{getSchemesByTag:Cy,getSchemes:Ey},{getBackgroundColorTheme:Up},{createAgeRenderer:Py,createContinuousRenderer:Oy},{getSchemesByTag:yl},{createContinuousRenderer:My},{createRenderer:Ry},{getSchemesByTag:$y},{createRenderer:Ny},{getSchemesByTag:zy},{createRenderer:jy},{getSchemesByTag:Ly},{createRenderer:Dy},{getSchemesByTag:Fy},{createAgeRenderer:Uy,createContinuousRenderer:qy},{createRenderer:By},{getSchemesByTag:Ky},Gy,Hp,Jp,{formatDateOnly:Wy,convertDateFormatToIntlOptions:Ma,formatTimeOnly:Vy,formatDate:qp},Hy,Jy,Zy,Qy,Yy,Zp,,{fetchKnowledgeGraph:Bp,executeQueryStreaming:Xy,executeSearchStreaming:e_},t_,{getBindParametersFromCypherQuery:r_},,,,,,,,,,,,,,,,,,,,,,,,,qV,KV,,,,,,,,,,,,,Kx,um,{a:iu,b:lu,c:uu,d:cu,e:du}])=>{var m=v;async function ri(t,e,r){if(r===void 0)throw new Error(["Unable to dispatch a custom event without a parent run id.",'"dispatchCustomEvent" can only be called from within an existing run (e.g.,',"inside a tool or a RunnableLambda).",`
3
3
 
4
4
  If you continue to see this error, please import from "@langchain/core/callbacks/dispatch/web"`,"and explicitly pass in a config parameter.",`
5
5
 
@@ -100,7 +100,7 @@ Title: {title}
100
100
  Description: {description}`,Np=`Name: {name}
101
101
  Alias: {alias}
102
102
  Description: {description}`,zp=v.object({schemaVersion:v.literal(Op),modified:v.number().int().nonnegative(),embeddings:v.object({modelProvider:v.literal(Mp),model:v.literal(Rp),dimensions:v.literal(ho),templates:v.object({layer:v.string().default($p),field:v.string().default(Np)})}),layers:v.array(v.object({id:v.string().min(1),name:v.string().min(1),title:v.string().catch(""),description:v.string().catch(""),vector:v.array(v.number()).length(ho,{message:`Layer vector must be exactly ${ho} dimensions`}),fields:v.array(v.object({name:v.string().min(1),alias:v.string().catch(""),description:v.string().catch(""),vector:v.array(v.number()).length(ho,{message:`Field vector must be exactly ${ho} dimensions`})}))})).default([])});var yy=(t,e)=>{let r=ou.fromTemplate(t);return Gr.fromMessages([r,...e])};var ps=async t=>{let{promptText:e,modelTier:r="default",temperature:n=0,messages:o,inputVariables:s,schema:a,config:i}=t,u=yy(e,o??[]),l=(await al({modelTier:r,temperature:n,config:i})).withStructuredOutput(a);return await u.pipe(l).invoke(s??{},i)};var _y=m.object({name:m.string(),description:m.string(),valueType:m.string(),alias:m.string()}),mG=m.object({fields:m.array(_y)});var fG=m.object({title:m.string(),description:m.string(),name:m.string().nullable()});var Lp=t=>Array.isArray(t)&&t.every(ko),by=t=>typeof t=="object"&&t!=null&&"messages"in t&&Lp(t.messages),xy=t=>typeof t=="object"&&t!=null&&"lg_tool_call"in t,xt=class extends au{tools;handleToolErrors=!0;trace=!1;constructor(t,e){let{name:r,tags:n,handleToolErrors:o}=e??{};super({name:r,tags:n,func:(s,a)=>this.run(s,a)}),this.tools=t,this.handleToolErrors=o??this.handleToolErrors}async runTool(t,e,r){let n=this.tools.find(o=>o.name===t.name);try{if(n===void 0)throw new Error(`Tool "${t.name}" not found.`);let o={...t,type:"tool_call"},s={...e,state:r,toolCallId:t.id??"",config:e,context:e.context,store:e.store??null,writer:e.writer??e.configurable?.writer??null},a=await n.invoke(o,s);return ko(a)&&a.getType()==="tool"||ye(a)?a:new F({status:"success",name:n.name,content:typeof a=="string"?a:JSON.stringify(a),tool_call_id:t.id})}catch(o){if(!this.handleToolErrors||So(o))throw o;return new F({status:"error",content:`Error: ${o.message}
103
- Please fix your mistakes.`,name:t.name,tool_call_id:t.id??""})}}async run(t,e){let r;if(xy(t)){let{lg_tool_call:s,...a}=t;r=[await this.runTool(s,e,a)]}else{let s;if(Lp(t))s=t;else if(by(t))s=t.messages;else throw new Error("ToolNode only accepts BaseMessage[] or { messages: BaseMessage[] } as input.");let a=new Set(s.filter(u=>u.getType()==="tool").map(u=>u.tool_call_id)),i;for(let u=s.length-1;u>=0;u-=1){let l=s[u];if(vt(l)){i=l;break}}if(i==null||!vt(i))throw new Error("ToolNode only accepts AIMessages as input.");r=await Promise.all(i.tool_calls?.filter(u=>u.id==null||!a.has(u.id)).map(u=>this.runTool(u,e,t))??[])}if(!r.some(ye))return Array.isArray(t)?r:{messages:r};let n=[],o=null;for(let s of r)ye(s)?s.graph===ae.PARENT&&Array.isArray(s.goto)&&s.goto.every(a=>$l(a))?o?o.goto.push(...s.goto):o=new ae({graph:ae.PARENT,goto:s.goto}):n.push(s):n.push(Array.isArray(t)?[s]:{messages:[s]});return o&&n.push(o),n}};var h2=M.Root({llmInputMessages:M({reducer:(t,e)=>Po([],e),default:()=>[]})});var ms=(t,e)=>e??t,n_=M.Root({...Oa(),intent:M({reducer:ms}),vectorSearchLayerResults:M({reducer:ms,default:()=>[]}),vectorSearchFieldResults:M({reducer:ms}),navigationInternalState:M({reducer:ms,default:()=>({toolCallMessage:void 0})})});async function o_(t,e){let r=zr.getDefault().helperServices,n=r.geocode.find(c=>c.name==="ArcGIS World Geocoding Service")??r.geocode[0];if(!n)throw new Error("No geocoding service found in helperServices.");let o=n.url,s=`${il.assetsPath?.endsWith("/")?il.assetsPath:`${il.assetsPath}/`}esri/images/search/search-symbol-32.png`,a=(await vy(o,{address:{SingleLine:t},outFields:["Match_addr"]}))?.[0];if(!a?.extent||!a.location)throw new Error(`Could not find location for: ${t}`);let i=new Ty({url:s,width:24,height:24}),u=new Iy({geometry:a.location,symbol:i});e.graphics.removeAll(),e.graphics.add(u),await e.goTo(a.extent);let l={address:a.address??"",location:a.location?a.location.toJSON():null,extent:a.extent?a.extent.toJSON():null};return{text:`Successfully zoomed to ${t}.`,sharedStatePatch:{lastResolvedLocation:{value:l}}}}var s_=["mapView"];function at(t){let e=t?.configurable?.context;if(!e||typeof e!="object")throw new Error("NavigationAgent context missing");let r=s_.filter(n=>!(n in e));if(r.length)throw new Error(`NavigationAgent context missing: ${r.join(", ")}`);return e}async function a_({address:t},e){let{mapView:r}=at(e);return await o_(t,r)}var i_=m.object({address:m.string().describe("The full address or place name to locate.")}),l_=j(a_,{name:"goToAddress",description:"Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",schema:i_});async function u_(t,e){let r=e.map.bookmarks;if(!r||r.length===0)throw new Error("No bookmarks found in the map.");let n=r.find(s=>s.name===t);if(!n)throw new Error(`Bookmark with name "${t}" not found.`);let o=n.viewpoint;if(!o)throw new Error(`Bookmark with name "${t}" does not have a valid viewpoint.`);return await e.goTo(o),{text:`Navigated to bookmark: ${t}`}}async function c_({bookmarkName:t},e){let{mapView:r}=at(e);return await Promise.resolve(u_(t,r))}var d_=v.object({bookmarkName:v.string().describe("The name of the bookmark to navigate to.")}),p_=j(c_,{name:"goToBookmark",description:"Go to the extent of the bookmark with the given name.",schema:d_});async function m_(t,e,r){let n=r.map?.allLayers.find(a=>a.id===t);if(!n)return{text:`Error: Layer with id ${t} not found`};let o=e?.trim()?e:"1=1",s=n.createQuery();s.where=o;try{let{extent:a,count:i}=await n.queryExtent(s);if(i===0)return{text:`No features found in ${n.title} matching: ${o}`,where:o};if(a)await r.goTo(a);else return{text:`Error: Unable to determine extent for ${n.title}`,where:o};let u={layerId:t,layerTitle:n.title??t,where:o,count:i};return{text:`Successfully zoomed to ${i} feature(s) in ${n.title} matching: ${o}`,where:o,sharedStatePatch:{lastNavigatedFeatures:{value:u}}}}catch(a){return console.error("Error in goToFeatures:",a),{text:`Error: ${a instanceof Error?a.message:"Unknown error"}`,where:o}}}async function f_({layerId:t,where:e},r){let{mapView:n}=at(r);return await m_(t,e,n)}var h_=v.object({layerId:v.string().describe("The layerId of the layer to zoom to."),where:v.string().describe("ArcGIS SQL-92 WHERE expression used for `query.where` on the selected layer. Use only fields from that layer and return a boolean filter expression (for example comparisons, LIKE, IN, BETWEEN, IS NULL, AND/OR/NOT). Do NOT include subqueries/nested SELECT, JOIN, GROUP BY, HAVING, ORDER BY, or semicolons.")}),g_=j(f_,{name:"goToFeatures",description:"Go to the features that match the given filter related to the given layerId.",schema:h_});async function y_(t){let e=new Sy({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}}).expand(.7);return await t.goTo(e),{text:"Successfully zoomed to world extent"}}async function __(t,e){let{mapView:r}=at(e);return await y_(r)}var w_=v.object({}),b_=j(__,{name:"goToFullExtent",description:"Zooms the map to the full world extent using Esri's Geocoding Service.",schema:w_});async function x_(t){let e=t.map.initialViewProperties?.viewpoint?.targetGeometry;if(e)await t.goTo(e);else throw new Error("Initial extent is undefined");return{text:"Successfully zoomed to home extent"}}async function A_(t,e){let{mapView:r}=at(e);return await x_(r)}var I_=m.object({}),v_=j(A_,{name:"goToHomeExtent",description:"Go to the initial web map view extent",schema:I_});async function T_(t,e){await e.when();let r=e.map?.allLayers.find(o=>o.id===t);if(!r)return console.warn(`[goToLayer] No matching FeatureLayer found for: ${t}`),{text:`Could not find layer for: ${t}`};let n;return(r.type==="link-chart"||r.type==="knowledge-graph-sublayer")&&e.map?.activeLinkChartLayer?n=e.map.diagramNodesExtent:n=r.fullExtent,n?(await e.goTo(n),r.visible=!0,{text:`Successfully zoomed to: ${r.title??""}`}):{text:"Layer has no defined extent. Cannot zoom to layer."}}async function S_({layerId:t},e){let{mapView:r}=at(e);return await T_(t,r)}var k_=v.object({layerId:v.string().describe("The id of the layer to navigate to")}),C_=j(S_,{name:"goToLayer",description:"Zooms the map view to the full extent of the top matching layer.",schema:k_});async function E_(t,e){return await e.goTo({scale:t}),{text:`Successfully zoomed to: ${t}`}}async function P_({scale:t},e){let{mapView:r}=at(e);return await E_(t,r)}var O_=m.object({scale:m.number().describe("The map scale of the view to go to.")}),M_=j(P_,{name:"goToScale",description:"Go to the specified view scale.",schema:O_});async function R_(t,e,r){let n={target:new Vp({longitude:t.longitude,latitude:t.latitude,spatialReference:{wkid:4326}})};return r?.zoom!==void 0&&(n.zoom=r.zoom),r?.scale!==void 0&&(n.scale=r.scale),await e.goTo(n),{text:`Successfully navigated to: ${[`(${t.latitude}\xB0, ${t.longitude}\xB0)`,r?.zoom!==void 0?`zoom ${r.zoom}`:"",r?.scale!==void 0?`scale 1:${r.scale}`:""].filter(Boolean).join(", ")}`}}async function $_({center:t,zoom:e,scale:r},n){let{mapView:o}=at(n);return await R_(t,o,{zoom:e,scale:r})}var N_=m.object({center:m.object({longitude:m.number().describe("The longitude (x-coordinate) of the point to navigate to."),latitude:m.number().describe("The latitude (y-coordinate) of the point to navigate to.")}),zoom:m.number().optional().describe("The zoom level. Higher values = more zoomed in."),scale:m.number().optional().describe("The map scale. Alternative to zoom. Smaller numbers = more zoomed in.")}),z_=j($_,{name:"goToViewpoint",description:"Go to the specified viewpoint. This can contain a combination of scale, center, zoom, etc.",schema:N_});async function j_(t,e){return await e.goTo({zoom:t}),{text:`Successfully zoomed to: ${t}`}}async function L_({zoom:t},e){let{mapView:r}=at(e);return await j_(t,r)}var D_=m.object({zoom:m.number().min(1).max(20).describe("The zoom level of the view to go to.")}),F_=j(L_,{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:D_}),Kp=Object.assign({"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_lc_context.md":()=>import("./ULD747OT.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_map_context.md":()=>import("./S745KWLM.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_cypher_query_prompt.md":()=>import("./S5XNEB7F.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_lucene_generation_prompt.md":()=>import("./3PAHY5KA.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_summarize_result_prompt.md":()=>import("./EZ3BR2FP.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_tool_prompt.md":()=>import("./SYJSVUUR.js").then(t=>t.default),"../agents/dataExploration/prompts/data_explore_filter_prompt.md":()=>import("./DKBTJJMW.js").then(t=>t.default),"../agents/dataExploration/prompts/data_explore_query_prompt.md":()=>import("./VRXKORTR.js").then(t=>t.default),"../agents/dataExploration/prompts/summarize_query_response_prompt.md":()=>import("./3MQIRMUM.js").then(t=>t.default),"../agents/help/prompts/help_prompt.md":()=>import("./25UUUQAQ.js").then(t=>t.default),"../agents/layerStyling/prompts/layer_styling_prompt.md":()=>import("./GQFWFZXP.js").then(t=>t.default),"../agents/navigation/prompts/navigation_intent_prompt.md":()=>import("./UR7W4CEV.js").then(t=>t.default),"../agents/navigation/prompts/navigation_tool_prompt.md":()=>import("./F6V7MLPY.js").then(t=>t.default)});async function At(t){let e=Object.entries(Kp).find(([r])=>r.endsWith(`/${t}.md`));if(!e)throw new Error(`Prompt not found: ${t}
103
+ Please fix your mistakes.`,name:t.name,tool_call_id:t.id??""})}}async run(t,e){let r;if(xy(t)){let{lg_tool_call:s,...a}=t;r=[await this.runTool(s,e,a)]}else{let s;if(Lp(t))s=t;else if(by(t))s=t.messages;else throw new Error("ToolNode only accepts BaseMessage[] or { messages: BaseMessage[] } as input.");let a=new Set(s.filter(u=>u.getType()==="tool").map(u=>u.tool_call_id)),i;for(let u=s.length-1;u>=0;u-=1){let l=s[u];if(vt(l)){i=l;break}}if(i==null||!vt(i))throw new Error("ToolNode only accepts AIMessages as input.");r=await Promise.all(i.tool_calls?.filter(u=>u.id==null||!a.has(u.id)).map(u=>this.runTool(u,e,t))??[])}if(!r.some(ye))return Array.isArray(t)?r:{messages:r};let n=[],o=null;for(let s of r)ye(s)?s.graph===ae.PARENT&&Array.isArray(s.goto)&&s.goto.every(a=>$l(a))?o?o.goto.push(...s.goto):o=new ae({graph:ae.PARENT,goto:s.goto}):n.push(s):n.push(Array.isArray(t)?[s]:{messages:[s]});return o&&n.push(o),n}};var h2=M.Root({llmInputMessages:M({reducer:(t,e)=>Po([],e),default:()=>[]})});var ms=(t,e)=>e??t,n_=M.Root({...Oa(),intent:M({reducer:ms}),vectorSearchLayerResults:M({reducer:ms,default:()=>[]}),vectorSearchFieldResults:M({reducer:ms}),navigationInternalState:M({reducer:ms,default:()=>({toolCallMessage:void 0})})});async function o_(t,e){let r=zr.getDefault().helperServices,n=r.geocode.find(c=>c.name==="ArcGIS World Geocoding Service")??r.geocode[0];if(!n)throw new Error("No geocoding service found in helperServices.");let o=n.url,s=`${il.assetsPath?.endsWith("/")?il.assetsPath:`${il.assetsPath}/`}esri/images/search/search-symbol-32.png`,a=(await vy(o,{address:{SingleLine:t},outFields:["Match_addr"]}))?.[0];if(!a?.extent||!a.location)throw new Error(`Could not find location for: ${t}`);let i=new Ty({url:s,width:24,height:24}),u=new Iy({geometry:a.location,symbol:i});e.graphics.removeAll(),e.graphics.add(u),await e.goTo(a.extent);let l={address:a.address??"",location:a.location?a.location.toJSON():null,extent:a.extent?a.extent.toJSON():null};return{text:`Successfully zoomed to ${t}.`,sharedStatePatch:{lastResolvedLocation:{value:l}}}}var s_=["mapView"];function at(t){let e=t?.configurable?.context;if(!e||typeof e!="object")throw new Error("NavigationAgent context missing");let r=s_.filter(n=>!(n in e));if(r.length)throw new Error(`NavigationAgent context missing: ${r.join(", ")}`);return e}async function a_({address:t},e){let{mapView:r}=at(e);return await o_(t,r)}var i_=m.object({address:m.string().describe("The full address or place name to locate.")}),l_=j(a_,{name:"goToAddress",description:"Geocodes an address using Esri's World Geocoding Service and zooms the map to that location.",schema:i_});async function u_(t,e){let r=e.map.bookmarks;if(!r||r.length===0)throw new Error("No bookmarks found in the map.");let n=r.find(s=>s.name===t);if(!n)throw new Error(`Bookmark with name "${t}" not found.`);let o=n.viewpoint;if(!o)throw new Error(`Bookmark with name "${t}" does not have a valid viewpoint.`);return await e.goTo(o),{text:`Navigated to bookmark: ${t}`}}async function c_({bookmarkName:t},e){let{mapView:r}=at(e);return await Promise.resolve(u_(t,r))}var d_=v.object({bookmarkName:v.string().describe("The name of the bookmark to navigate to.")}),p_=j(c_,{name:"goToBookmark",description:"Go to the extent of the bookmark with the given name.",schema:d_});async function m_(t,e,r){let n=r.map?.allLayers.find(a=>a.id===t);if(!n)return{text:`Error: Layer with id ${t} not found`};let o=e?.trim()?e:"1=1",s=n.createQuery();s.where=o;try{let{extent:a,count:i}=await n.queryExtent(s);if(i===0)return{text:`No features found in ${n.title} matching: ${o}`,where:o};if(a)await r.goTo(a);else return{text:`Error: Unable to determine extent for ${n.title}`,where:o};let u={layerId:t,layerTitle:n.title??t,where:o,count:i};return{text:`Successfully zoomed to ${i} feature(s) in ${n.title} matching: ${o}`,where:o,sharedStatePatch:{lastNavigatedFeatures:{value:u}}}}catch(a){return console.error("Error in goToFeatures:",a),{text:`Error: ${a instanceof Error?a.message:"Unknown error"}`,where:o}}}async function f_({layerId:t,where:e},r){let{mapView:n}=at(r);return await m_(t,e,n)}var h_=v.object({layerId:v.string().describe("The layerId of the layer to zoom to."),where:v.string().describe("ArcGIS SQL-92 WHERE expression used for `query.where` on the selected layer. Use only fields from that layer and return a boolean filter expression (for example comparisons, LIKE, IN, BETWEEN, IS NULL, AND/OR/NOT). Do NOT include subqueries/nested SELECT, JOIN, GROUP BY, HAVING, ORDER BY, or semicolons.")}),g_=j(f_,{name:"goToFeatures",description:"Go to the features that match the given filter related to the given layerId.",schema:h_});async function y_(t){let e=new Sy({xmin:-180,ymin:-90,xmax:180,ymax:90,spatialReference:{wkid:4326}}).expand(.7);return await t.goTo(e),{text:"Successfully zoomed to world extent"}}async function __(t,e){let{mapView:r}=at(e);return await y_(r)}var w_=v.object({}),b_=j(__,{name:"goToFullExtent",description:"Zooms the map to the full world extent using Esri's Geocoding Service.",schema:w_});async function x_(t){let e=t.map.initialViewProperties?.viewpoint?.targetGeometry;if(e)await t.goTo(e);else throw new Error("Initial extent is undefined");return{text:"Successfully zoomed to home extent"}}async function A_(t,e){let{mapView:r}=at(e);return await x_(r)}var I_=m.object({}),v_=j(A_,{name:"goToHomeExtent",description:"Go to the initial web map view extent",schema:I_});async function T_(t,e){await e.when();let r=e.map?.allLayers.find(o=>o.id===t);if(!r)return console.warn(`[goToLayer] No matching FeatureLayer found for: ${t}`),{text:`Could not find layer for: ${t}`};let n;return(r.type==="link-chart"||r.type==="knowledge-graph-sublayer")&&e.map?.activeLinkChartLayer?n=e.map.diagramNodesExtent:n=r.fullExtent,n?(await e.goTo(n),r.visible=!0,{text:`Successfully zoomed to: ${r.title??""}`}):{text:"Layer has no defined extent. Cannot zoom to layer."}}async function S_({layerId:t},e){let{mapView:r}=at(e);return await T_(t,r)}var k_=v.object({layerId:v.string().describe("The id of the layer to navigate to")}),C_=j(S_,{name:"goToLayer",description:"Zooms the map view to the full extent of the top matching layer.",schema:k_});async function E_(t,e){return await e.goTo({scale:t}),{text:`Successfully zoomed to: ${t}`}}async function P_({scale:t},e){let{mapView:r}=at(e);return await E_(t,r)}var O_=m.object({scale:m.number().describe("The map scale of the view to go to.")}),M_=j(P_,{name:"goToScale",description:"Go to the specified view scale.",schema:O_});async function R_(t,e,r){let n={target:new Vp({longitude:t.longitude,latitude:t.latitude,spatialReference:{wkid:4326}})};return r?.zoom!==void 0&&(n.zoom=r.zoom),r?.scale!==void 0&&(n.scale=r.scale),await e.goTo(n),{text:`Successfully navigated to: ${[`(${t.latitude}\xB0, ${t.longitude}\xB0)`,r?.zoom!==void 0?`zoom ${r.zoom}`:"",r?.scale!==void 0?`scale 1:${r.scale}`:""].filter(Boolean).join(", ")}`}}async function $_({center:t,zoom:e,scale:r},n){let{mapView:o}=at(n);return await R_(t,o,{zoom:e,scale:r})}var N_=m.object({center:m.object({longitude:m.number().describe("The longitude (x-coordinate) of the point to navigate to."),latitude:m.number().describe("The latitude (y-coordinate) of the point to navigate to.")}),zoom:m.number().optional().describe("The zoom level. Higher values = more zoomed in."),scale:m.number().optional().describe("The map scale. Alternative to zoom. Smaller numbers = more zoomed in.")}),z_=j($_,{name:"goToViewpoint",description:"Go to the specified viewpoint. This can contain a combination of scale, center, zoom, etc.",schema:N_});async function j_(t,e){return await e.goTo({zoom:t}),{text:`Successfully zoomed to: ${t}`}}async function L_({zoom:t},e){let{mapView:r}=at(e);return await j_(t,r)}var D_=m.object({zoom:m.number().min(1).max(20).describe("The zoom level of the view to go to.")}),F_=j(L_,{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:D_}),Kp=Object.assign({"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_lc_context.md":()=>import("./IJ3CLFAU.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_current_map_context.md":()=>import("./QE4CNVDQ.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_cypher_query_prompt.md":()=>import("./SLTFLCVR.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_lucene_generation_prompt.md":()=>import("./KNRJ3WXR.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_summarize_result_prompt.md":()=>import("./WBZLQZYR.js").then(t=>t.default),"../agents/arcgisKnowledge/prompts/arcgis_knowledge_tool_prompt.md":()=>import("./W4SAWMXS.js").then(t=>t.default),"../agents/dataExploration/prompts/data_explore_filter_prompt.md":()=>import("./C7ZFXRPS.js").then(t=>t.default),"../agents/dataExploration/prompts/data_explore_query_prompt.md":()=>import("./W4FGRGLV.js").then(t=>t.default),"../agents/dataExploration/prompts/summarize_query_response_prompt.md":()=>import("./QKCV7CY2.js").then(t=>t.default),"../agents/help/prompts/help_prompt.md":()=>import("./W2SYL7IJ.js").then(t=>t.default),"../agents/layerStyling/prompts/layer_styling_prompt.md":()=>import("./3OBIA66A.js").then(t=>t.default),"../agents/navigation/prompts/navigation_intent_prompt.md":()=>import("./63THOLAY.js").then(t=>t.default),"../agents/navigation/prompts/navigation_tool_prompt.md":()=>import("./L6KBBJEC.js").then(t=>t.default)});async function At(t){let e=Object.entries(Kp).find(([r])=>r.endsWith(`/${t}.md`));if(!e)throw new Error(`Prompt not found: ${t}
104
104
  Available prompts:
105
105
  ${Object.keys(Kp).join(`
106
106
  `)}`);return await e[1]()}var wo=(t,e)=>{let r=t?.configurable?.services?.[e];if(r==null)throw new Error(`${e} missing in config.configurable.services`);return r};async function U_(t){let{fields:e,layer:r,view:n,styleName:o,colorSchemeTags:s}=t,a;return s?a=Cy({basemapTheme:await Up(n),geometryType:r.geometryType,includedTags:s,numColors:Math.min(e.length,8)})[0]:a=Ey({basemapTheme:await Up(n),geometryType:r.geometryType,numColors:Math.min(e.length,8)}).primaryScheme,{layer:r,view:n,attributes:e.map(i=>({field:i,label:r.fields.find(u=>u.name===i)?.alias??""})).slice(0,8),outlineOptimizationEnabled:!0,sizeOptimizationEnabled:!0,includeSizeVariable:o.includes("Size"),pieChartScheme:a}}async function q_(t){return await ky(t)}async function B_({arcgisMap:t,arcgisMapView:e,layerId:r,fields:n,colorSchemes:o,includeSize:s}){let a=e,i=t?.allLayers.find(l=>l.id===r);if(!i)return`Could not find layer for id: ${r}`;let u={styleName:s?"chart-size":"chart",fields:n,layer:i,view:a,colorSchemeTags:o};try{let l=await U_(u),c=await q_(l);return i.renderer=c.renderer,i.visible=!0,`Chart renderer applied to layer: ${i.title??i.id} using fields ${n.join(", ")}`}catch(l){return`Error applying chart renderer: ${l instanceof Error?l.message:String(l)}`}}var K_=["mapView"];function Ve(t){let e=t?.configurable?.context;if(!e||typeof e!="object")throw new Error("LayerStylingAgent context missing");let r=K_.filter(n=>!(n in e));if(r.length)throw new Error(`LayerStylingAgent context missing: ${r.join(", ")}`);return e}async function G_({layerId:t,fields:e,colorSchemes:r,includeSize:n},o){let{mapView:s}=Ve(o);return await ve({type:"show-legend",data:{layerIds:[t]}},o),await B_({arcgisMap:s.map,arcgisMapView:s,layerId:t,fields:e,colorSchemes:r,includeSize:n})}var W_=m.object({layerId:m.string().describe("The id of the layer to apply the chart renderer to"),fields:m.array(m.string()).describe("The fields to use for the chart renderer (multiple numeric fields)"),colorSchemes:m.array(m.string()).optional().describe("Optional color scheme tags to use"),includeSize:m.boolean().optional().describe("Whether to vary the chart size (chart-size)")}),V_=j(G_,{name:"chart",description:`Label: Charts
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
+ var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(b,a)=>()=>{try{return a||b((a={exports:{}}).exports,a),a.exports}catch(c){throw a=0,c}},n=(b,a)=>{for(var c in a)e(b,c,{get:a[c],enumerable:!0})},l=(b,a,c,f)=>{if(a&&typeof a=="object"||typeof a=="function")for(let d of i(a))!k.call(b,d)&&d!==c&&e(b,d,{get:()=>a[d],enumerable:!(f=h(a,d))||f.enumerable});return b};var o=(b,a,c)=>(c=b!=null?g(j(b)):{},l(a||!b||!b.__esModule?e(c,"default",{value:b,enumerable:!0}):c,b));export{m as a,n as b,o as c};
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./YIMNOUTF.js";var e=`This Feature Layer is part of a Feature Service. The Feature Layer contains various fields, each with its own name, type, and description.
2
+ import"./UZLQALHY.js";var e=`This Feature Layer is part of a Feature Service. The Feature Layer contains various fields, each with its own name, type, and description.
3
3
  The Feature Layer is a collection of geographic features that represent real-world entities. Each feature in the layer has attributes that provide additional information about the feature. The layer may include point, line, or polygon geometries, depending on the type of data it represents.
4
4
  The geometry type for this layer is {layerGeometryType}.
5
5
 
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./YIMNOUTF.js";var e=`You are a knowledgeable GIS expert.
2
+ import"./UZLQALHY.js";var e=`You are a knowledgeable GIS expert.
3
3
 
4
4
  You are given a Feature Service description and title.
5
5
 
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./YIMNOUTF.js";var e=`## Who you are
2
+ import"./UZLQALHY.js";var e=`## Who you are
3
3
 
4
4
  You are a map assistant embedded inside a GIS application. You have no knowledge of history, science, people, events, cooking, or anything outside of this map and its data. You only know what is described in the Map Context below.
5
5
 
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./YIMNOUTF.js";var e=`# ArcGIS JavaScript SDK FeatureLayerView Query Assistant
2
+ import"./UZLQALHY.js";var e=`# ArcGIS JavaScript SDK FeatureLayerView Query Assistant
3
3
 
4
4
  You are a GIS assistant that generates query parameters for the ArcGIS JavaScript SDK FeatureLayerView \`queryFeatures()\` method.
5
5
 
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./YIMNOUTF.js";var e=`# ArcgisKnowledge Tool Instructions
2
+ import"./UZLQALHY.js";var e=`# ArcgisKnowledge Tool Instructions
3
3
 
4
4
  You are an assistant that helps users answer questions and perform operations on their knowledge graph, map or link chart. You have been assigned the task below, which must be achieved by calling a single tool.
5
5
 
@@ -1,5 +1,5 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./YIMNOUTF.js";var e=`# ArcGIS Knowledge Agent \u2014 Action Summary
2
+ import"./UZLQALHY.js";var e=`# ArcGIS Knowledge Agent \u2014 Action Summary
3
3
 
4
4
  You are a Knowledge Graph assistant that has executed tool calls to answer a user request.
5
5
 
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{c as m}from"./G2YAOSMT.js";import"./QUEBM77K.js";import{J as d,K as p,L as u,M as s,O as o,R as h,h as n,j as a,v as c}from"./ZZ4DR3HN.js";import"./YIMNOUTF.js";var v=n`.coord-field{margin-bottom:var(--calcite-spacing-sm)}.coord-label{display:block;margin-bottom:var(--calcite-spacing-sm);font-size:14px}.coordinate-input{width:100%;block-size:var(--calcite-spacing-xxxl);box-sizing:border-box;padding-inline:var(--calcite-spacing-md);font-size:14px;color:var(--calcite-color-text-3);outline-color:var(--calcite-color-brand)}.coordinate-input--error{border:1px solid var(--calcite-color-status-danger)}.coord-error-message{position:relative;max-width:100%;margin:var(--calcite-spacing-sm) 0;display:flex;font-size:14px;padding:6px 7px;background-color:var(--calcite-color-foreground-1);border:1px solid var(--calcite-color-status-danger);box-shadow:0 1px 2px #00000054}.coord-error-message:before{pointer-events:none;content:"";position:absolute;left:11px;top:-16px;width:0;height:0;border:8px solid transparent;border-bottom-color:var(--calcite-color-status-danger)}.coord-error-message:after{position:absolute;pointer-events:none;content:"";left:11px;top:-15px;width:0;height:0;border:8px solid transparent;border-bottom-color:var(--calcite-color-foreground-1)}.is-rtl .coord-error-message:before,.is-rtl .coord-error-message:after{left:initial;right:11px}.coord-error-message calcite-icon{color:var(--calcite-color-status-danger)}.coord-error-message__text{margin-left:var(--calcite-spacing-sm);margin-right:var(--calcite-spacing-sm);line-height:var(--calcite-spacing-xl)}`,l=class extends u{constructor(){super(...arguments),this._direction=m(),this.inputEl=d(),this.isInvalid=!1,this.currentError="",this.inputValue="",this.label="",this.value="",this.errorMessage="",this.min=-180,this.max=180,this.validateRelated=()=>!0,this.relatedErrorMessage="",this.inputId="",this.arcgisCoordChange=c()}static{this.properties={isInvalid:16,currentError:16,inputValue:16,label:1,value:1,errorMessage:1,min:9,max:9,validateRelated:0,relatedErrorMessage:1,inputId:1}}static{this.styles=v}checkRelatedField(){return!this.inputValue||!this.isInvalid||!this.validate(this.inputValue)?"":this.inputValue}isValid(){return!this.isInvalid}setFocus(){this.inputEl.value?.focus()}willUpdate(t){t.has("value")&&this.validate(t.get("value"))}isValidCoord(t,r,i){if(!t?.match(/^-?[0-9]*(\.|,)?[0-9]+$/u))return!1;let e=this.parseNumber(t);return e>=r&&e<=i}validate(t){if(this.isInvalid=!this.isValidCoord(t,this.min,this.max),this.isInvalid)return this.currentError=this.errorMessage,!1;let r=this.parseNumber(t);return this.isInvalid=!this.validateRelated(r),this.isInvalid?(this.currentError=this.relatedErrorMessage,!1):!0}parseNumber(t){let r=`-${Array.from({length:10},(e,g)=>g.toString()).join("")}`,i=t.replace(",",".");return i=Array.from(i).filter(e=>r.includes(e)||e===".").join(""),parseFloat(i)}render(){return a`<div class=${s({"coord-field":!0,"is-rtl":this._direction==="rtl"})}><label class="coord-label" for=${this.inputId??o}>${this.label}</label><calcite-input-number number-button-type=none id=${this.inputId??o} class=${s({"coordinate-input":!0})} .value=${`${this.parseNumber(this.value)}`} @calciteInputNumberChange=${t=>{this.inputValue=t.target.value,this.validate(this.inputValue)&&this.arcgisCoordChange.emit(this.inputValue)}} .status=${this.isInvalid?"invalid":"valid"} ${p(this.inputEl)}></calcite-input-number>${this.isInvalid&&a`<div class="coord-error-message"><calcite-icon icon=exclamation-mark-triangle scale=s></calcite-icon><div class="coord-error-message__text">${this.currentError}</div></div>`||""}</div>`}};h("arcgis-portal-extent-picker-coord-field",l);export{l as ArcgisPortalExtentPickerCoordField};
2
+ import{c as m}from"./IBP5XPD5.js";import"./D76KMXZD.js";import{J as d,K as p,L as u,M as s,O as o,R as h,h as n,j as a,v as c}from"./JV23HJTE.js";import"./UZLQALHY.js";var v=n`.coord-field{margin-bottom:var(--calcite-spacing-sm)}.coord-label{display:block;margin-bottom:var(--calcite-spacing-sm);font-size:14px}.coordinate-input{width:100%;block-size:var(--calcite-spacing-xxxl);box-sizing:border-box;padding-inline:var(--calcite-spacing-md);font-size:14px;color:var(--calcite-color-text-3);outline-color:var(--calcite-color-brand)}.coordinate-input--error{border:1px solid var(--calcite-color-status-danger)}.coord-error-message{position:relative;max-width:100%;margin:var(--calcite-spacing-sm) 0;display:flex;font-size:14px;padding:6px 7px;background-color:var(--calcite-color-foreground-1);border:1px solid var(--calcite-color-status-danger);box-shadow:0 1px 2px #00000054}.coord-error-message:before{pointer-events:none;content:"";position:absolute;left:11px;top:-16px;width:0;height:0;border:8px solid transparent;border-bottom-color:var(--calcite-color-status-danger)}.coord-error-message:after{position:absolute;pointer-events:none;content:"";left:11px;top:-15px;width:0;height:0;border:8px solid transparent;border-bottom-color:var(--calcite-color-foreground-1)}.is-rtl .coord-error-message:before,.is-rtl .coord-error-message:after{left:initial;right:11px}.coord-error-message calcite-icon{color:var(--calcite-color-status-danger)}.coord-error-message__text{margin-left:var(--calcite-spacing-sm);margin-right:var(--calcite-spacing-sm);line-height:var(--calcite-spacing-xl)}`,l=class extends u{constructor(){super(...arguments),this._direction=m(),this.inputEl=d(),this.isInvalid=!1,this.currentError="",this.inputValue="",this.label="",this.value="",this.errorMessage="",this.min=-180,this.max=180,this.validateRelated=()=>!0,this.relatedErrorMessage="",this.inputId="",this.arcgisCoordChange=c()}static{this.properties={isInvalid:16,currentError:16,inputValue:16,label:1,value:1,errorMessage:1,min:9,max:9,validateRelated:0,relatedErrorMessage:1,inputId:1}}static{this.styles=v}checkRelatedField(){return!this.inputValue||!this.isInvalid||!this.validate(this.inputValue)?"":this.inputValue}isValid(){return!this.isInvalid}setFocus(){this.inputEl.value?.focus()}willUpdate(t){t.has("value")&&this.validate(t.get("value"))}isValidCoord(t,r,i){if(!t?.match(/^-?[0-9]*(\.|,)?[0-9]+$/u))return!1;let e=this.parseNumber(t);return e>=r&&e<=i}validate(t){if(this.isInvalid=!this.isValidCoord(t,this.min,this.max),this.isInvalid)return this.currentError=this.errorMessage,!1;let r=this.parseNumber(t);return this.isInvalid=!this.validateRelated(r),this.isInvalid?(this.currentError=this.relatedErrorMessage,!1):!0}parseNumber(t){let r=`-${Array.from({length:10},(e,g)=>g.toString()).join("")}`,i=t.replace(",",".");return i=Array.from(i).filter(e=>r.includes(e)||e===".").join(""),parseFloat(i)}render(){return a`<div class=${s({"coord-field":!0,"is-rtl":this._direction==="rtl"})}><label class="coord-label" for=${this.inputId??o}>${this.label}</label><calcite-input-number number-button-type=none id=${this.inputId??o} class=${s({"coordinate-input":!0})} .value=${`${this.parseNumber(this.value)}`} @calciteInputNumberChange=${t=>{this.inputValue=t.target.value,this.validate(this.inputValue)&&this.arcgisCoordChange.emit(this.inputValue)}} .status=${this.isInvalid?"invalid":"valid"} ${p(this.inputEl)}></calcite-input-number>${this.isInvalid&&a`<div class="coord-error-message"><calcite-icon icon=exclamation-mark-triangle scale=s></calcite-icon><div class="coord-error-message__text">${this.currentError}</div></div>`||""}</div>`}};h("arcgis-portal-extent-picker-coord-field",l);export{l as ArcgisPortalExtentPickerCoordField};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as g}from"./2XILGLOG.js";import{d as b}from"./U3FVMN32.js";import{a as m}from"./6XWNBD36.js";import{a as f}from"./NWIIOJEG.js";import{L as p,R as u,h,j as s,v as r}from"./ZZ4DR3HN.js";var w=h`:host{display:flex;align-items:center}.status-list{display:flex;align-items:center;max-width:100%}.status-chip{max-width:100%;--calcite-color-foreground-2: var(--calcite-color-foreground-1)}.chip-group{max-width:100%;min-width:0}.status-chip__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.popover-content{max-width:28rem;padding:.75rem}.clear-button{margin-inline-start:.25rem}`,o=class extends p{constructor(){super(...arguments),this._messages=m({name:"portal-browser",blocking:!0}),this.inBounds=[],this.outOfBounds=[],this.filters={},this.hiddenFilterIds=[],this.arcgisBrowserFilterClear=r(),this.arcgisBrowserFilterRemove=r()}static{this.properties={inBounds:16,outOfBounds:16,filters:0,hiddenFilterIds:0,componentWidth:9,browserWidth:9}}static{this.styles=w}connectedCallback(){super.connectedCallback(),this.processValidFilters()}willUpdate(t){(t.has("filters")||t.has("hiddenFilterIds")||t.has("componentWidth")||t.has("browserWidth"))&&this.processValidFilters()}isFilterValid(t){return this.hiddenFilterIds.includes(t.id)?!1:t.id==="collaborations"&&"additionalParams"in t?!!(t.additionalParams&&t.label):!!(t.value&&t.label)}processValidFilters(){let t=Object.values(this.filters).filter(this.isFilterValid.bind(this)),i=this.componentWidth??0;if((this.browserWidth??window.innerWidth)<f.sm){this.inBounds=t,this.outOfBounds=[];return}let a=Math.max(i-460,0),e=0,n=[],c=[];t.forEach(l=>{let d=b({text:l.label});!i||e+d<=a?(n.push(l),e+=d):c.push(l)}),this.inBounds=n,this.outOfBounds=c}renderChip(t){return g(t.id,s`<calcite-chip class="status-chip" scale=s .label=${t.label} .value=${t.id} closable appearance=outline @calciteChipClose=${()=>{this.arcgisBrowserFilterRemove.emit(t.id)}}><span class="status-chip__label">${t.label}</span></calcite-chip>`)}render(){let t=this._messages.filterStatus,i=this.outOfBounds.length>0,a=this.inBounds.length+this.outOfBounds.length;return a?s`<div class="status-list"><calcite-chip-group class="chip-group" .label=${t.filters} scale=s>${this.inBounds.map(e=>this.renderChip(e))}${i&&s`<calcite-button id=popover-button round kind=neutral appearance=outline scale=s>+ ${this.outOfBounds.length}</calcite-button>`||""}</calcite-chip-group>${i&&s`<calcite-popover .label=${t.additional} reference-element=popover-button placement=bottom-end><div class="popover-content"><calcite-chip-group .label=${t.additional} scale=s>${this.outOfBounds.map(e=>this.renderChip(e))}</calcite-chip-group></div></calcite-popover>`||""}${a>1&&s`<calcite-button class="clear-button" scale=s appearance=transparent kind=brand @click=${()=>this.arcgisBrowserFilterClear.emit(null)}>${t.clearAllFilters}</calcite-button>`||""}</div>`:null}};u("arcgis-portal-browser-filter-status",o);export{o as a};
2
+ import{a as g}from"./GKOXTQHB.js";import{d as b}from"./U3FVMN32.js";import{a as m}from"./AXM6XCZD.js";import{a as f}from"./NWIIOJEG.js";import{L as p,R as u,h,j as s,v as r}from"./JV23HJTE.js";var w=h`:host{display:flex;align-items:center}.status-list{display:flex;align-items:center;max-width:100%}.status-chip{max-width:100%;--calcite-color-foreground-2: var(--calcite-color-foreground-1)}.chip-group{max-width:100%;min-width:0}.status-chip__label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.popover-content{max-width:28rem;padding:.75rem}.clear-button{margin-inline-start:.25rem}`,o=class extends p{constructor(){super(...arguments),this._messages=m({name:"portal-browser",blocking:!0}),this.inBounds=[],this.outOfBounds=[],this.filters={},this.hiddenFilterIds=[],this.arcgisBrowserFilterClear=r(),this.arcgisBrowserFilterRemove=r()}static{this.properties={inBounds:16,outOfBounds:16,filters:0,hiddenFilterIds:0,componentWidth:9,browserWidth:9}}static{this.styles=w}connectedCallback(){super.connectedCallback(),this.processValidFilters()}willUpdate(t){(t.has("filters")||t.has("hiddenFilterIds")||t.has("componentWidth")||t.has("browserWidth"))&&this.processValidFilters()}isFilterValid(t){return this.hiddenFilterIds.includes(t.id)?!1:t.id==="collaborations"&&"additionalParams"in t?!!(t.additionalParams&&t.label):!!(t.value&&t.label)}processValidFilters(){let t=Object.values(this.filters).filter(this.isFilterValid.bind(this)),i=this.componentWidth??0;if((this.browserWidth??window.innerWidth)<f.sm){this.inBounds=t,this.outOfBounds=[];return}let a=Math.max(i-460,0),e=0,n=[],c=[];t.forEach(l=>{let d=b({text:l.label});!i||e+d<=a?(n.push(l),e+=d):c.push(l)}),this.inBounds=n,this.outOfBounds=c}renderChip(t){return g(t.id,s`<calcite-chip class="status-chip" scale=s .label=${t.label} .value=${t.id} closable appearance=outline @calciteChipClose=${()=>{this.arcgisBrowserFilterRemove.emit(t.id)}}><span class="status-chip__label">${t.label}</span></calcite-chip>`)}render(){let t=this._messages.filterStatus,i=this.outOfBounds.length>0,a=this.inBounds.length+this.outOfBounds.length;return a?s`<div class="status-list"><calcite-chip-group class="chip-group" .label=${t.filters} scale=s>${this.inBounds.map(e=>this.renderChip(e))}${i&&s`<calcite-button id=popover-button round kind=neutral appearance=outline scale=s>+ ${this.outOfBounds.length}</calcite-button>`||""}</calcite-chip-group>${i&&s`<calcite-popover .label=${t.additional} reference-element=popover-button placement=bottom-end><div class="popover-content"><calcite-chip-group .label=${t.additional} scale=s>${this.outOfBounds.map(e=>this.renderChip(e))}</calcite-chip-group></div></calcite-popover>`||""}${a>1&&s`<calcite-button class="clear-button" scale=s appearance=transparent kind=brand @click=${()=>this.arcgisBrowserFilterClear.emit(null)}>${t.clearAllFilters}</calcite-button>`||""}</div>`:null}};u("arcgis-portal-browser-filter-status",o);export{o as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{a as p}from"./NWIIOJEG.js";import{J as r,K as i,L as a,M as l,R as c,h as e,j as o}from"./ZZ4DR3HN.js";var d=e`:host{display:block}.filters-shell{display:block}.filters-shell__top{padding:0}.filters-shell__top--padded{padding:0 1rem 1rem}`,t=class extends a{constructor(){super(...arguments),this._accordionRef=r()}static{this.properties={store:0}}static{this.styles=d}updated(){this.store&&this._accordionRef.value&&(this.store.filterElement=this._accordionRef.value)}render(){let s=this.store,n=!!s?.panel||(s?.width??0)<p.sm;return o`<div class="filters-shell" .inert=${!!s?.preview}><div class=${l({"filters-shell__top":!0,"filters-shell__top--padded":n})}><slot name=top></slot></div><slot name=primary></slot><slot name=title></slot><calcite-accordion appearance=transparent icon-type=chevron icon-position=start scale=m ${i(this._accordionRef)}><slot></slot></calcite-accordion><slot name=bottom></slot></div>`}};c("arcgis-portal-browser-filters",t);export{t as a};
2
+ import{a as p}from"./NWIIOJEG.js";import{J as r,K as i,L as a,M as l,R as c,h as e,j as o}from"./JV23HJTE.js";var d=e`:host{display:block}.filters-shell{display:block}.filters-shell__top{padding:0}.filters-shell__top--padded{padding:0 1rem 1rem}`,t=class extends a{constructor(){super(...arguments),this._accordionRef=r()}static{this.properties={store:0}}static{this.styles=d}updated(){this.store&&this._accordionRef.value&&(this.store.filterElement=this._accordionRef.value)}render(){let s=this.store,n=!!s?.panel||(s?.width??0)<p.sm;return o`<div class="filters-shell" .inert=${!!s?.preview}><div class=${l({"filters-shell__top":!0,"filters-shell__top--padded":n})}><slot name=top></slot></div><slot name=primary></slot><slot name=title></slot><calcite-accordion appearance=transparent icon-type=chevron icon-position=start scale=m ${i(this._accordionRef)}><slot></slot></calcite-accordion><slot name=bottom></slot></div>`}};c("arcgis-portal-browser-filters",t);export{t as a};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{A as n,B as o,C as a,k as r,l as s}from"./ZZ4DR3HN.js";var i=class extends a{constructor(t){if(super(t),this.it=s,t.type!==n.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===s||t==null)return this._t=void 0,this.it=t;if(t===r)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 e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};i.directiveName="unsafeHTML",i.resultType=1;var f=o(i);export{f as a};
2
+ import{A as n,B as o,C as a,k as r,l as s}from"./JV23HJTE.js";var i=class extends a{constructor(t){if(super(t),this.it=s,t.type!==n.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===s||t==null)return this._t=void 0,this.it=t;if(t===r)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 e=[t];return e.raw=e,this._t={_$litType$:this.constructor.resultType,strings:e,values:[]}}};i.directiveName="unsafeHTML",i.resultType=1;var f=o(i);export{f as a};