@arcgis/coding-components 5.0.0-next.71 → 5.0.0-next.73

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 (84) hide show
  1. package/dist/addons.js +1 -1
  2. package/dist/cdn/{EQJTQWVC.js → 22625RKF.js} +2 -2
  3. package/dist/cdn/{3UASBQYO.js → 2OXEX7EB.js} +1 -1
  4. package/dist/cdn/{S2OEJMW5.js → 34HTM3CX.js} +1 -1
  5. package/dist/cdn/{6UH33ZVX.js → 3FQNGZUI.js} +2 -2
  6. package/dist/cdn/{CVPKNBUR.js → 3N3GHK4I.js} +2 -2
  7. package/dist/cdn/{D7FGQR4N.js → 4DEF34DK.js} +2 -2
  8. package/dist/cdn/{EUXP26II.js → 4FWQQNVE.js} +2 -2
  9. package/dist/cdn/{SDTPIHTY.js → 4OFH6ZSH.js} +1 -1
  10. package/dist/cdn/{A3OMQYX3.js → 4RJKC3HS.js} +2 -2
  11. package/dist/cdn/{32J5RVCM.js → 4WDT32NF.js} +2 -2
  12. package/dist/cdn/{BDKZSD7U.js → 7GZAS4ZJ.js} +2 -2
  13. package/dist/cdn/{HLEJZHNK.js → 7RBKOBAS.js} +2 -2
  14. package/dist/cdn/{XDHDJ4EF.js → 7ZI5BJUK.js} +2 -2
  15. package/dist/cdn/{OR3SUJRK.js → AKDW4ZJJ.js} +1 -1
  16. package/dist/cdn/{5ZJI4JCH.js → CDRQFRBN.js} +2 -2
  17. package/dist/cdn/{Z5Q76TEO.js → ERC24CX5.js} +2 -2
  18. package/dist/cdn/{QKSDT45E.js → FQA6EBLW.js} +1 -1
  19. package/dist/cdn/{7OWHKGQD.js → FXGUQKEZ.js} +1 -1
  20. package/dist/cdn/{WJEO4T5D.js → GTDT3VZG.js} +2 -2
  21. package/dist/cdn/{RGSWY2ZC.js → HGZGNBLI.js} +2 -2
  22. package/dist/cdn/{OPIJAIAO.js → I4P6QFGD.js} +2 -2
  23. package/dist/cdn/{IRZITBCC.js → IHU246HK.js} +2 -2
  24. package/dist/cdn/{ASULWHRK.js → JERGWAQK.js} +3 -3
  25. package/dist/cdn/{4LZFLUL5.js → JHP4J2TD.js} +1 -1
  26. package/dist/cdn/{SKRSEP2B.js → KK4FO5CH.js} +2 -2
  27. package/dist/cdn/{ESYWKACR.js → KKMKBW3J.js} +2 -2
  28. package/dist/cdn/{5LJ3WHGE.js → KQBQ3FU5.js} +2 -2
  29. package/dist/cdn/{OACXBAI5.js → KUICCVMR.js} +2 -2
  30. package/dist/cdn/{NFCSEAGI.js → LJSOLRST.js} +2 -2
  31. package/dist/cdn/MFEGWXET.js +4 -0
  32. package/dist/cdn/{PYEUQ7AA.js → MLKMOADF.js} +2 -2
  33. package/dist/cdn/{N5KWAXQA.js → MUO4ZHKB.js} +2 -2
  34. package/dist/cdn/{WKOC4GPI.js → PMNTUV3G.js} +2 -2
  35. package/dist/cdn/{DMQVFE74.js → Q6GF7R6P.js} +2 -2
  36. package/dist/cdn/{2AW45PBJ.js → R4WVCEDC.js} +2 -2
  37. package/dist/cdn/{5SLDBXVI.js → RDFI2EC4.js} +2 -2
  38. package/dist/cdn/{EO33VB6Q.js → RKGBDCEI.js} +2 -2
  39. package/dist/cdn/{2BQ54CBQ.js → RSFRE4FJ.js} +2 -2
  40. package/dist/cdn/{LGW3O274.js → RW5V7UG7.js} +2 -2
  41. package/dist/cdn/{IV6Y5N7R.js → U5PEMACN.js} +2 -2
  42. package/dist/cdn/{ABARZFLC.js → U5VUPDSC.js} +2 -2
  43. package/dist/cdn/{LXKPFW2H.js → U6W5P5XI.js} +2 -2
  44. package/dist/cdn/{GNP74Y64.js → URLWLKSB.js} +2 -2
  45. package/dist/cdn/{EO2UGMVW.js → XCMHLKAZ.js} +2 -2
  46. package/dist/cdn/{WRKNSDBG.js → YQTQZQ2J.js} +2 -2
  47. package/dist/cdn/{HPZJ5RKW.js → Z4SSLGVN.js} +1 -1
  48. package/dist/cdn/{JNNAY45A.js → ZRT2WZLK.js} +2 -2
  49. package/dist/cdn/index.js +2 -2
  50. package/dist/chunks/arcade-contribution.js +1 -1
  51. package/dist/chunks/arcade-defaults.js +1 -1
  52. package/dist/chunks/arcade-executor.js +1 -1
  53. package/dist/chunks/arcade-mode.js +1 -1
  54. package/dist/chunks/arcade-service-accessors.js +1 -1
  55. package/dist/chunks/colorize.js +1 -1
  56. package/dist/chunks/editor.js +1 -1
  57. package/dist/chunks/fields.js +1 -1
  58. package/dist/chunks/language-defaults-base.js +1 -1
  59. package/dist/chunks/markdown.js +1 -1
  60. package/dist/chunks/monaco-importer.js +1 -1
  61. package/dist/chunks/runtime.js +1 -1
  62. package/dist/chunks/sql-expr-defaults.js +1 -1
  63. package/dist/chunks/sql-expr-mode.js +1 -1
  64. package/dist/chunks/sql-expr-service-accessors.js +1 -1
  65. package/dist/chunks/useT9n.js +1 -1
  66. package/dist/chunks/utilities.js +1 -1
  67. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
  68. package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
  69. package/dist/components/arcgis-arcade-results/customElement.js +1 -1
  70. package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
  71. package/dist/components/arcgis-code-editor/customElement.js +1 -1
  72. package/dist/components/arcgis-code-viewer/customElement.js +1 -1
  73. package/dist/components/arcgis-editor-variables/customElement.js +1 -1
  74. package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
  75. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
  76. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  77. package/dist/docs/api.json +2 -2
  78. package/dist/docs/docs.json +2 -2
  79. package/dist/docs/web-types.json +1 -1
  80. package/dist/index.js +1 -1
  81. package/dist/loader.js +1 -1
  82. package/dist/monacoStyles.js +1 -1
  83. package/package.json +5 -5
  84. package/dist/cdn/G5Y6EUH6.js +0 -4
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.71 */
4
- import{h as P,j as O}from"./QKSDT45E.js";import{a as b,b as x,c as m,d as u,e as y,f as E,l as f,n as C}from"./LXKPFW2H.js";var w=e=>(...i)=>{let t=u(),o=new e(...i),r=o.exports;m(t.at(-1));let s=o.component.manager;s.W(o,r),o.watchExports(s.W.bind(s,o)),y(o);let a=[o.component,...t].reverse();return f(a,n=>n===void 0?void 0:N(o,n,r),r)},N=(e,{host:i,key:t,isReactive:o},r)=>{let s=i,a=s[t]!==e.exports,n=s[t]!==r,c=r!==e.exports;if(a&&!n&&c&&(s[t]=e.exports),i===e.component){if(o){let p=e.component.manager;n&&p.W(e,s[t]),e.onUpdate(h=>{if(h.has(t)){let g=s[t];g!==e.exports&&p.W(e,g)}})}e.O=o?void 0:t}let d=e.component.constructor.elementProperties.get(t)?.readOnly;e.watchExports(()=>{s[t]!==e.exports&&(d?E(()=>{s[t]=e.exports}):s[t]=e.exports)})};var L=e=>M(void 0,e);var v=class extends C{constructor(i,t){super(i);let o=this.exports;try{x(this.component);let r=t(this.component,this),s=this.exports!==o;if(b(r)){s||this.setProvisionalExports(r);let a=r.then(n=>{this.exports=n,super.catchUpLifecycle()}).catch(n=>{this.P.reject(n),console.error(n)});this.onLoad(async()=>await a)}else(!s||r!==void 0)&&(this.exports=r),queueMicrotask(()=>super.catchUpLifecycle())}catch(r){this.P.reject(r),console.error(r)}}catchUpLifecycle(){}},M=w(v);var G=L;var $=e=>(i={})=>L((t,o)=>{let r=P(t.el),s={_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0},a=t;o.onLifecycle(()=>O(t.el,()=>e("./assets"),({t9nLocale:c,t9nStrings:l,lang:d})=>{let p={...l,_lang:d,_t9nLocale:c,_loading:!1};o.exports=p;let h=l.componentLabel;typeof h=="string"&&"label"in t&&t.label==null&&(t.label??=h),n(a.messageOverrides)},i.name));let n=c=>{let l=o.exports,d=l._original??l,p=_(d,c);c&&(p._original=d),o.exports=p};return"messageOverrides"in a&&o.onUpdate(c=>{c.has("messageOverrides")&&n(a.messageOverrides)}),i.blocking?(o.setProvisionalExports(s,!1),o.ready):s}),_=(e,i)=>{if(!i)return e;let t={...e};return Object.entries(i).forEach(([o,r])=>{e[o]!==void 0&&(typeof r=="object"?t[o]=_(e[o],r):t[o]=r??e[o])}),t};export{G as a,$ as b};
3
+ v5.0.0-next.73 */
4
+ import{h as P,j as O}from"./FQA6EBLW.js";import{a as b,b as x,c as m,d as u,e as y,f as E,l as f,n as C}from"./U6W5P5XI.js";var w=e=>(...i)=>{let t=u(),o=new e(...i),r=o.exports;m(t.at(-1));let s=o.component.manager;s.W(o,r),o.watchExports(s.W.bind(s,o)),y(o);let a=[o.component,...t].reverse();return f(a,n=>n===void 0?void 0:N(o,n,r),r)},N=(e,{host:i,key:t,isReactive:o},r)=>{let s=i,a=s[t]!==e.exports,n=s[t]!==r,c=r!==e.exports;if(a&&!n&&c&&(s[t]=e.exports),i===e.component){if(o){let p=e.component.manager;n&&p.W(e,s[t]),e.onUpdate(h=>{if(h.has(t)){let g=s[t];g!==e.exports&&p.W(e,g)}})}e.O=o?void 0:t}let d=e.component.constructor.elementProperties.get(t)?.readOnly;e.watchExports(()=>{s[t]!==e.exports&&(d?E(()=>{s[t]=e.exports}):s[t]=e.exports)})};var L=e=>M(void 0,e);var v=class extends C{constructor(i,t){super(i);let o=this.exports;try{x(this.component);let r=t(this.component,this),s=this.exports!==o;if(b(r)){s||this.setProvisionalExports(r);let a=r.then(n=>{this.exports=n,super.catchUpLifecycle()}).catch(n=>{this.P.reject(n),console.error(n)});this.onLoad(async()=>await a)}else(!s||r!==void 0)&&(this.exports=r),queueMicrotask(()=>super.catchUpLifecycle())}catch(r){this.P.reject(r),console.error(r)}}catchUpLifecycle(){}},M=w(v);var G=L;var $=e=>(i={})=>L((t,o)=>{let r=P(t.el),s={_lang:r.lang,_t9nLocale:r.t9nLocale,_loading:!0},a=t;o.onLifecycle(()=>O(t.el,()=>e("./assets"),({t9nLocale:c,t9nStrings:l,lang:d})=>{let p={...l,_lang:d,_t9nLocale:c,_loading:!1};o.exports=p;let h=l.componentLabel;typeof h=="string"&&"label"in t&&t.label==null&&(t.label??=h),n(a.messageOverrides)},i.name));let n=c=>{let l=o.exports,d=l._original??l,p=_(d,c);c&&(p._original=d),o.exports=p};return"messageOverrides"in a&&o.onUpdate(c=>{c.has("messageOverrides")&&n(a.messageOverrides)}),i.blocking?(o.setProvisionalExports(s,!1),o.ready):s}),_=(e,i)=>{if(!i)return e;let t={...e};return Object.entries(i).forEach(([o,r])=>{e[o]!==void 0&&(typeof r=="object"?t[o]=_(e[o],r):t[o]=r??e[o])}),t};export{G as a,$ as b};
@@ -1,6 +1,6 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.71 */
3
+ v5.0.0-next.73 */
4
4
  function M(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var R=M();function se(r){R=r}var _={exec:()=>null};function p(r,e=""){let n=typeof r=="string"?r:r.source,s={replace:(t,i)=>{let l=typeof i=="string"?i:i.source;return l=l.replace(x.caret,"$1"),n=n.replace(t,l),s},getRegex:()=>new RegExp(n,e)};return s}var fe=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),x={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] +\S/,listReplaceTask:/^\[[ xX]\] +/,listTaskCheckbox:/\[[ xX]\]/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:r=>new RegExp(`^( {0,3}${r})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}#`),htmlBeginRegex:r=>new RegExp(`^ {0,${Math.min(3,r-1)}}<(?:[a-z].*>|!--)`,"i")},xe=/^(?:[ \t]*(?:\n|$))+/,be=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,we=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,P=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,me=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,H=/(?:[*+-]|\d{1,9}[.)])/,le=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,ie=p(le).replace(/bull/g,H).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),ye=p(le).replace(/bull/g,H).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),N=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,$e=/^[^\n]+/,O=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Re=p(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",O).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Se=p(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,H).getRegex(),B="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",j=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Te=p("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))","i").replace("comment",j).replace("tag",B).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),ae=p(N).replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",B).getRegex(),ze=p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",ae).getRegex(),G={blockquote:ze,code:be,def:Re,fences:we,heading:me,hr:P,html:Te,lheading:ie,list:Se,newline:xe,paragraph:ae,table:_,text:$e},V=p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3} )[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",B).getRegex(),Ae={...G,lheading:ye,table:V,paragraph:p(N).replace("hr",P).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",V).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",B).getRegex()},_e={...G,html:p(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",j).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:_,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:p(N).replace("hr",P).replace("heading",` *#{1,6} *[^
5
5
  ]`).replace("lheading",ie).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},Pe=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ie=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,oe=/^( {2,}|\\)\n(?!\s*$)/,Le=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,E=/[\p{P}\p{S}]/u,X=/[\s\p{P}\p{S}]/u,ce=/[^\s\p{P}\p{S}]/u,Ce=p(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,X).getRegex(),he=/(?!~)[\p{P}\p{S}]/u,qe=/(?!~)[\s\p{P}\p{S}]/u,Be=/(?:[^\s\p{P}\p{S}]|~)/u,Ee=p(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",fe?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),pe=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,ve=p(pe,"u").replace(/punct/g,E).getRegex(),Ze=p(pe,"u").replace(/punct/g,he).getRegex(),ue="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",Qe=p(ue,"gu").replace(/notPunctSpace/g,ce).replace(/punctSpace/g,X).replace(/punct/g,E).getRegex(),De=p(ue,"gu").replace(/notPunctSpace/g,Be).replace(/punctSpace/g,qe).replace(/punct/g,he).getRegex(),Me=p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,ce).replace(/punctSpace/g,X).replace(/punct/g,E).getRegex(),He=p(/\\(punct)/,"gu").replace(/punct/g,E).getRegex(),Ne=p(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Oe=p(j).replace("(?:-->|$)","-->").getRegex(),je=p("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Oe).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),L=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,Ge=p(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",L).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),ge=p(/^!?\[(label)\]\[(ref)\]/).replace("label",L).replace("ref",O).getRegex(),ke=p(/^!?\[(ref)\](?:\[\])?/).replace("ref",O).getRegex(),Xe=p("reflink|nolink(?!\\()","g").replace("reflink",ge).replace("nolink",ke).getRegex(),Y=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,F={_backpedal:_,anyPunctuation:He,autolink:Ne,blockSkip:Ee,br:oe,code:Ie,del:_,emStrongLDelim:ve,emStrongRDelimAst:Qe,emStrongRDelimUnd:Me,escape:Pe,link:Ge,nolink:ke,punctuation:Ce,reflink:ge,reflinkSearch:Xe,tag:je,text:Le,url:_},Fe={...F,link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",L).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",L).getRegex()},Z={...F,emStrongRDelimAst:De,emStrongLDelim:Ze,url:p(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",Y).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:p(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",Y).getRegex()},We={...Z,br:p(oe).replace("{2,}","*").getRegex(),text:p(Z.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},I={normal:G,gfm:Ae,pedantic:_e},T={normal:F,gfm:Z,breaks:We,pedantic:Fe},Ue={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},ee=r=>Ue[r];function y(r,e){if(e){if(x.escapeTest.test(r))return r.replace(x.escapeReplace,ee)}else if(x.escapeTestNoEncode.test(r))return r.replace(x.escapeReplaceNoEncode,ee);return r}function te(r){try{r=encodeURI(r).replace(x.percentDecode,"%")}catch{return null}return r}function ne(r,e){let n=r.replace(x.findPipe,(i,l,o)=>{let a=!1,h=l;for(;--h>=0&&o[h]==="\\";)a=!a;return a?"|":" |"}),s=n.split(x.splitPipe),t=0;if(s[0].trim()||s.shift(),s.length>0&&!s.at(-1)?.trim()&&s.pop(),e)if(s.length>e)s.splice(e);else for(;s.length<e;)s.push("");for(;t<s.length;t++)s[t]=s[t].trim().replace(x.slashPipe,"|");return s}function z(r,e,n){let s=r.length;if(s===0)return"";let t=0;for(;t<s&&r.charAt(s-t-1)===e;)t++;return r.slice(0,s-t)}function Je(r,e){if(r.indexOf(e[1])===-1)return-1;let n=0;for(let s=0;s<r.length;s++)if(r[s]==="\\")s++;else if(r[s]===e[0])n++;else if(r[s]===e[1]&&(n--,n<0))return s;return n>0?-2:-1}function re(r,e,n,s,t){let i=e.href,l=e.title||null,o=r[1].replace(t.other.outputLinkReplace,"$1");s.state.inLink=!0;let a={type:r[0].charAt(0)==="!"?"image":"link",raw:n,href:i,title:l,text:o,tokens:s.inlineTokens(o)};return s.state.inLink=!1,a}function Ke(r,e,n){let s=r.match(n.other.indentCodeCompensation);if(s===null)return e;let t=s[1];return e.split(`
6
6
  `).map(i=>{let l=i.match(n.other.beginningSpace);if(l===null)return i;let[o]=l;return o.length>=t.length?i.slice(t.length):i}).join(`
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.71 */
4
- import{a as T}from"./7OWHKGQD.js";import{a as f}from"./ASULWHRK.js";import{a as m,b as o,c as E,g as L}from"./4LZFLUL5.js";import"./HLEJZHNK.js";import{a as w}from"./HPZJ5RKW.js";import{Gl as F,Kl as x,Nl as p,Sl as g,kk as $}from"./5LJ3WHGE.js";import"./3UASBQYO.js";$();var P=["<=",">=","==","!=","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","=","+=","-=","*=","**=","/=","%="],W={wordPattern:/(-?\d*\.\d\w*)|([^`~!#%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>\/\?\s]+)/gu,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]}],autoCloseBefore:";:.,=}])` \n ",folding:{markers:{start:/^\s*\/\/\s*#?region\b/u,end:/^\s*\/\/\s*#?endregion\b/u}},indentationRules:{decreaseIndentPattern:/^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/u,increaseIndentPattern:/^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/u}},V={defaultToken:"invalid",tokenPostfix:".arcgis",ignoreCase:!0,keywords:L,operators:P,constants:["true","false","null"],symbols:/[=><!~?:&|+\-*\/\^%]+/u,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/u,digits:/\d+(_+\d+)*/u,octaldigits:/[0-7]+(_+[0-7]+)*/u,binarydigits:/[0-1]+(_+[0-1]+)*/u,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/u,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/u,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/u,tokenizer:{root:[[/[{}]/u,"delimiter.bracket"],{include:"common"}],common:[[/import(?=\s)/u,{token:"keyword",next:"@import"}],[/for(?=\s)/u,{token:"keyword",next:"@forLoopInit"}],[/[a-z_$][\w$]*/u,{cases:{"@constants":"constant","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/u,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/u,"@brackets"],[/[<>](?!@symbols)/u,"@brackets"],[/@symbols/u,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/u,"number"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/u,"number"],[/0[xX](@hexdigits)/u,"number"],[/0[oO]?(@octaldigits)/u,"number"],[/0[bB](@binarydigits)/u,"number"],[/(@digits)/u,"number"],[/[;,.]/u,"delimiter"],[/"([^"\\]|\\.)*$/u,"string.invalid"],[/'([^'\\]|\\.)*$/u,"string.invalid"],[/"/u,"string","@string_double"],[/'/u,"string","@string_single"],[/`/u,"string","@string_backtick"]],import:[[/import(?=\s)/u,{token:"keyword"}],{include:"@whitespace"},[/[a-z_$][\w$]*/u,"identifier"],{include:"@whitespace"},[/from/u,{token:"keyword",next:"@popall"}]],forLoopInit:[{include:"@whitespace"},[/\(/u,{token:"@brackets",next:"@forLoopVar"}],[/.*/u,"","@pop"]],forLoopVar:[{include:"@whitespace"},[/var(?=\s)/u,"keyword","@forLoopVarName"],[/[a-z_$][\w$]*/u,"identifier","@forLoopCheckInOf"],[/\)/u,{token:"@brackets",next:"@popall"}]],forLoopVarName:[{include:"@whitespace"},[/[a-z_$][\w$]*/u,"identifier","@forLoopCheckInOf"],[/\)/u,{token:"@brackets",next:"@popall"}]],forLoopCheckInOf:[{include:"@whitespace"},[/in(?=\s)/u,"keyword","@popall"],[/of(?=\s)/u,"keyword","@popall"],[/[a-z_$][\w$]*/u,"identifier"],[/\)/u,{token:"@brackets",next:"@popall"}]],whitespace:[[/[ \t\r\n]+/u,""],[/\/\*/u,"comment","@comment"],[/\/\/.*$/u,"comment"]],comment:[[/[^\/*]+/u,"comment"],[/\*\//u,"comment","@pop"],[/[\/*]/u,"comment"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/u,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/u,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/u,["regexp.escape.control","regexp.escape.control"]],[/[()]/u,"regexp.escape.control"],[/@regexpctl/u,"regexp.escape.control"],[/[^\\\/]/u,"regexp"],[/@regexpesc/u,"regexp.escape"],[/\\\./u,"regexp.invalid"],[/(\/)([gimsuy]*)/u,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/u,"regexp.escape.control"],[/\^/u,"regexp.invalid"],[/@regexpesc/u,"regexp.escape"],[/[^\]]/u,"regexp"],[/\]/u,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/"/u,"string","@pop"]],string_single:[[/[^\\']+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/'/u,"string","@pop"]],string_backtick:[[/\$\{/u,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/`/u,"string","@pop"]],bracketCounting:[[/\{/u,"delimiter.bracket","@bracketCounting"],[/\}/u,"delimiter.bracket","@pop"],{include:"common"}]}},b=class{constructor(e,n,{defaults:a,diagnosticsService:d}){this._languageId=e,this._worker=n,this._disposables=[],this._modelListeners=new Map,this._diagnosticsService=d,this._defaults=a,f().then(c=>{let u=s=>{let r=s.getLanguageId();if(r!==this._languageId)return;let i=T(()=>{this._doValidate(s,r).catch(A=>{throw A})}),S=s.onDidChangeContent(i),D=s.onDidChangeAttached(i);this._modelListeners.set(s.uri.toString(),[S,D]),this._doValidate(s,r).catch(console.error)},l=s=>{let r=s.uri.toString();c.setModelMarkers(s,this._languageId,[]);let i=this._modelListeners.get(r);if(i){for(;i.length;)i.pop()?.dispose();this._modelListeners.delete(r)}};this._disposables.push(c.onDidCreateModel(u)),this._disposables.push(c.onWillDisposeModel(s=>{l(s)})),this._disposables.push(c.onDidChangeModelLanguage(s=>{l(s.model),u(s.model)})),this._disposables.push(a.onDidChange(()=>{c.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&(l(s),u(s))})})),this._disposables.push(a.onModelContextDidChange(s=>{c.getModels().forEach(r=>{r.getLanguageId()===this._languageId&&r.uri.toString()===s&&this._doValidate(r,this._languageId).catch(console.error)})})),this._disposables.push({dispose:()=>{this._modelListeners.forEach(s=>s.forEach(r=>r.dispose())),this._modelListeners.clear()}}),c.getModels().forEach(u)})}dispose(){this._disposables.forEach(e=>e.dispose()),this._disposables=[]}async _doValidate(e,n){if(e.isAttachedToEditor())try{let a=await f(),d=await this._worker(e.uri),c=this._defaults.getApiContextForModel(e.uri),u=await d.doValidation(e.uri.toString(),c),l=u.map(s=>K(e.uri,s));this._diagnosticsService.fireDiagnosticsChange(e.uri,u),a.setModelMarkers(e,n,l)}catch(a){console.error(a)}}};function R(t){switch(t){case m.Error:return p.Error;case m.Warning:return p.Warning;case m.Information:return p.Info;case m.Hint:return p.Hint;default:return p.Info}}function K(t,e){return{severity:R(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message}}function N(t){return{character:t.column-1,line:t.lineNumber-1}}function h(t){return new x(t.start.line+1,t.start.character+1,t.end.line+1,t.end.character+1)}function z(t){return{range:h(t.range),text:t.newText}}function O(t){return typeof t.insert<"u"&&typeof t.replace<"u"}function H(t){let e=g.CompletionItemKind;switch(t){case o.Text:return e.Text;case o.Method:return e.Method;case o.Function:return e.Function;case o.Constructor:return e.Constructor;case o.Field:return e.Field;case o.Variable:return e.Variable;case o.Class:return e.Class;case o.Interface:return e.Interface;case o.Module:return e.Module;case o.Property:return e.Property;case o.Unit:return e.Unit;case o.Value:return e.Value;case o.Enum:return e.Enum;case o.Keyword:return e.Keyword;case o.Snippet:return e.Snippet;case o.Color:return e.Color;case o.File:return e.File;case o.Reference:return e.Reference;case o.Folder:return e.Folder;case o.EnumMember:return e.EnumMember;case o.Constant:return e.Constant;case o.Struct:return e.Struct;case o.Event:return e.Event;case o.Operator:return e.Operator;case o.TypeParameter:return e.TypeParameter;default:return e.Property}}var C=class{constructor(e,n){this._worker=e,this._defaults=n,this.triggerCharacters=[".","("]}async provideCompletionItems(e,n){let a=await this._worker(e.uri),d=this._defaults.getApiContextForModel(e.uri),c=await a.doComplete(e.uri.toString(),N(n),d),u=e.getWordUntilPosition(n),l=new x(n.lineNumber,u.startColumn,n.lineNumber,u.endColumn),s=c.items.map(r=>{let i={label:r.label,insertText:r.insertText||r.label,sortText:r.sortText,filterText:r.filterText,detail:r.detail,range:l,kind:H(r.kind)};return r.textEdit&&(O(r.textEdit)?i.range={insert:h(r.textEdit.insert),replace:h(r.textEdit.replace)}:i.range=h(r.textEdit.range),i.insertText=r.textEdit.newText),r.additionalTextEdits&&(i.additionalTextEdits=r.additionalTextEdits.map(z)),r.insertTextFormat===E.Snippet&&(i.insertTextRules=g.CompletionItemInsertTextRule.InsertAsSnippet),r.documentation&&(typeof r.documentation=="string"?i.documentation=r.documentation:i.documentation={supportThemeIcons:!1,value:r.documentation.value,supportHtml:!0}),i});return{incomplete:c.isIncomplete,suggestions:s}}},y=class{constructor(e,n){this._worker=e,this._defaults=n}async provideDocumentFormattingEdits(e){let n=await this._worker(e.uri),a=this._defaults.getApiContextForModel(e.uri.toString());return(await n.doFormat(e.uri.toString(),a)).map(d=>({range:h(d.range),text:d.newText}))}},_=new w,k=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this.stopWorker())}dispose(){this._configChangeListener.dispose(),this.stopWorker()}stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null,_=new w),this._client=null}static async waitForWorker(){return await _.promise}async _getClientProxy(){let e=await f();if(!this._client){let{languageId:n}=this._defaults;this._worker=e.createWebWorker({moduleId:"ArcadeWorker",label:n,createData:{languageId:n},host:this._defaults.workerHost}),_.resolve(this._worker),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...e){let n=await this._getClientProxy();return await this._worker?.withSyncedResources(e),n}},I;async function J(...t){return await k.waitForWorker(),await new Promise((e,n)=>{if(!I){n(new Error("Arcade not registered!"));return}e(I(...t))})}var v=class{constructor(){this._onDiagnosticsChange=new F}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,n){this._onDiagnosticsChange.fire({uri:e,diagnostics:n})}},M=new v;function ee(){return M}function te(t){let e=new k(t),n=async(...a)=>await e.getLanguageServiceWorker(...a);I=n,g.setMonarchTokensProvider(t.languageId,V),g.setLanguageConfiguration(t.languageId,W),g.registerCompletionItemProvider(t.languageId,new C(n,t)),g.registerDocumentFormattingEditProvider(t.languageId,new y(n,t)),new b(t.languageId,n,{defaults:t,diagnosticsService:M})}export{ee as getArcadeDiagnosticService,J as getArcadeWorker,te as setupMode};
3
+ v5.0.0-next.73 */
4
+ import{a as T}from"./FXGUQKEZ.js";import{a as f}from"./JERGWAQK.js";import{a as m,b as o,c as E,g as L}from"./JHP4J2TD.js";import"./7RBKOBAS.js";import{a as w}from"./Z4SSLGVN.js";import{Gl as F,Kl as x,Nl as p,Sl as g,kk as $}from"./KQBQ3FU5.js";import"./2OXEX7EB.js";$();var P=["<=",">=","==","!=","+","-","*","/","%","++","--","<<",">>",">>>","&","|","^","!","~","&&","||","=","+=","-=","*=","**=","/=","%="],W={wordPattern:/(-?\d*\.\d\w*)|([^`~!#%\^&\*\(\)\-=\+\[\{\]\}\\\|;:'",\.<>\/\?\s]+)/gu,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]}],autoCloseBefore:";:.,=}])` \n ",folding:{markers:{start:/^\s*\/\/\s*#?region\b/u,end:/^\s*\/\/\s*#?endregion\b/u}},indentationRules:{decreaseIndentPattern:/^((?!.*?\/\*).*\*\/)?\s*[\}\]\)].*$/u,increaseIndentPattern:/^((?!\/\/).)*(\{[^}"'`]*|\([^)"'`]*|\[[^\]"'`]*)$/u}},V={defaultToken:"invalid",tokenPostfix:".arcgis",ignoreCase:!0,keywords:L,operators:P,constants:["true","false","null"],symbols:/[=><!~?:&|+\-*\/\^%]+/u,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/u,digits:/\d+(_+\d+)*/u,octaldigits:/[0-7]+(_+[0-7]+)*/u,binarydigits:/[0-1]+(_+[0-1]+)*/u,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/u,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/u,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/u,tokenizer:{root:[[/[{}]/u,"delimiter.bracket"],{include:"common"}],common:[[/import(?=\s)/u,{token:"keyword",next:"@import"}],[/for(?=\s)/u,{token:"keyword",next:"@forLoopInit"}],[/[a-z_$][\w$]*/u,{cases:{"@constants":"constant","@keywords":"keyword","@default":"identifier"}}],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([gimsuy]*)(\s*)(\.|;|\/|,|\)|\]|\}|$))/u,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/u,"@brackets"],[/[<>](?!@symbols)/u,"@brackets"],[/@symbols/u,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/u,"number"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/u,"number"],[/0[xX](@hexdigits)/u,"number"],[/0[oO]?(@octaldigits)/u,"number"],[/0[bB](@binarydigits)/u,"number"],[/(@digits)/u,"number"],[/[;,.]/u,"delimiter"],[/"([^"\\]|\\.)*$/u,"string.invalid"],[/'([^'\\]|\\.)*$/u,"string.invalid"],[/"/u,"string","@string_double"],[/'/u,"string","@string_single"],[/`/u,"string","@string_backtick"]],import:[[/import(?=\s)/u,{token:"keyword"}],{include:"@whitespace"},[/[a-z_$][\w$]*/u,"identifier"],{include:"@whitespace"},[/from/u,{token:"keyword",next:"@popall"}]],forLoopInit:[{include:"@whitespace"},[/\(/u,{token:"@brackets",next:"@forLoopVar"}],[/.*/u,"","@pop"]],forLoopVar:[{include:"@whitespace"},[/var(?=\s)/u,"keyword","@forLoopVarName"],[/[a-z_$][\w$]*/u,"identifier","@forLoopCheckInOf"],[/\)/u,{token:"@brackets",next:"@popall"}]],forLoopVarName:[{include:"@whitespace"},[/[a-z_$][\w$]*/u,"identifier","@forLoopCheckInOf"],[/\)/u,{token:"@brackets",next:"@popall"}]],forLoopCheckInOf:[{include:"@whitespace"},[/in(?=\s)/u,"keyword","@popall"],[/of(?=\s)/u,"keyword","@popall"],[/[a-z_$][\w$]*/u,"identifier"],[/\)/u,{token:"@brackets",next:"@popall"}]],whitespace:[[/[ \t\r\n]+/u,""],[/\/\*/u,"comment","@comment"],[/\/\/.*$/u,"comment"]],comment:[[/[^\/*]+/u,"comment"],[/\*\//u,"comment","@pop"],[/[\/*]/u,"comment"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/u,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/u,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/u,["regexp.escape.control","regexp.escape.control"]],[/[()]/u,"regexp.escape.control"],[/@regexpctl/u,"regexp.escape.control"],[/[^\\\/]/u,"regexp"],[/@regexpesc/u,"regexp.escape"],[/\\\./u,"regexp.invalid"],[/(\/)([gimsuy]*)/u,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/u,"regexp.escape.control"],[/\^/u,"regexp.invalid"],[/@regexpesc/u,"regexp.escape"],[/[^\]]/u,"regexp"],[/\]/u,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/"/u,"string","@pop"]],string_single:[[/[^\\']+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/'/u,"string","@pop"]],string_backtick:[[/\$\{/u,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/u,"string"],[/@escapes/u,"string.escape"],[/\\./u,"string.escape.invalid"],[/`/u,"string","@pop"]],bracketCounting:[[/\{/u,"delimiter.bracket","@bracketCounting"],[/\}/u,"delimiter.bracket","@pop"],{include:"common"}]}},b=class{constructor(e,n,{defaults:a,diagnosticsService:d}){this._languageId=e,this._worker=n,this._disposables=[],this._modelListeners=new Map,this._diagnosticsService=d,this._defaults=a,f().then(c=>{let u=s=>{let r=s.getLanguageId();if(r!==this._languageId)return;let i=T(()=>{this._doValidate(s,r).catch(A=>{throw A})}),S=s.onDidChangeContent(i),D=s.onDidChangeAttached(i);this._modelListeners.set(s.uri.toString(),[S,D]),this._doValidate(s,r).catch(console.error)},l=s=>{let r=s.uri.toString();c.setModelMarkers(s,this._languageId,[]);let i=this._modelListeners.get(r);if(i){for(;i.length;)i.pop()?.dispose();this._modelListeners.delete(r)}};this._disposables.push(c.onDidCreateModel(u)),this._disposables.push(c.onWillDisposeModel(s=>{l(s)})),this._disposables.push(c.onDidChangeModelLanguage(s=>{l(s.model),u(s.model)})),this._disposables.push(a.onDidChange(()=>{c.getModels().forEach(s=>{s.getLanguageId()===this._languageId&&(l(s),u(s))})})),this._disposables.push(a.onModelContextDidChange(s=>{c.getModels().forEach(r=>{r.getLanguageId()===this._languageId&&r.uri.toString()===s&&this._doValidate(r,this._languageId).catch(console.error)})})),this._disposables.push({dispose:()=>{this._modelListeners.forEach(s=>s.forEach(r=>r.dispose())),this._modelListeners.clear()}}),c.getModels().forEach(u)})}dispose(){this._disposables.forEach(e=>e.dispose()),this._disposables=[]}async _doValidate(e,n){if(e.isAttachedToEditor())try{let a=await f(),d=await this._worker(e.uri),c=this._defaults.getApiContextForModel(e.uri),u=await d.doValidation(e.uri.toString(),c),l=u.map(s=>K(e.uri,s));this._diagnosticsService.fireDiagnosticsChange(e.uri,u),a.setModelMarkers(e,n,l)}catch(a){console.error(a)}}};function R(t){switch(t){case m.Error:return p.Error;case m.Warning:return p.Warning;case m.Information:return p.Info;case m.Hint:return p.Hint;default:return p.Info}}function K(t,e){return{severity:R(e.severity),startLineNumber:e.range.start.line+1,startColumn:e.range.start.character+1,endLineNumber:e.range.end.line+1,endColumn:e.range.end.character+1,message:e.message}}function N(t){return{character:t.column-1,line:t.lineNumber-1}}function h(t){return new x(t.start.line+1,t.start.character+1,t.end.line+1,t.end.character+1)}function z(t){return{range:h(t.range),text:t.newText}}function O(t){return typeof t.insert<"u"&&typeof t.replace<"u"}function H(t){let e=g.CompletionItemKind;switch(t){case o.Text:return e.Text;case o.Method:return e.Method;case o.Function:return e.Function;case o.Constructor:return e.Constructor;case o.Field:return e.Field;case o.Variable:return e.Variable;case o.Class:return e.Class;case o.Interface:return e.Interface;case o.Module:return e.Module;case o.Property:return e.Property;case o.Unit:return e.Unit;case o.Value:return e.Value;case o.Enum:return e.Enum;case o.Keyword:return e.Keyword;case o.Snippet:return e.Snippet;case o.Color:return e.Color;case o.File:return e.File;case o.Reference:return e.Reference;case o.Folder:return e.Folder;case o.EnumMember:return e.EnumMember;case o.Constant:return e.Constant;case o.Struct:return e.Struct;case o.Event:return e.Event;case o.Operator:return e.Operator;case o.TypeParameter:return e.TypeParameter;default:return e.Property}}var C=class{constructor(e,n){this._worker=e,this._defaults=n,this.triggerCharacters=[".","("]}async provideCompletionItems(e,n){let a=await this._worker(e.uri),d=this._defaults.getApiContextForModel(e.uri),c=await a.doComplete(e.uri.toString(),N(n),d),u=e.getWordUntilPosition(n),l=new x(n.lineNumber,u.startColumn,n.lineNumber,u.endColumn),s=c.items.map(r=>{let i={label:r.label,insertText:r.insertText||r.label,sortText:r.sortText,filterText:r.filterText,detail:r.detail,range:l,kind:H(r.kind)};return r.textEdit&&(O(r.textEdit)?i.range={insert:h(r.textEdit.insert),replace:h(r.textEdit.replace)}:i.range=h(r.textEdit.range),i.insertText=r.textEdit.newText),r.additionalTextEdits&&(i.additionalTextEdits=r.additionalTextEdits.map(z)),r.insertTextFormat===E.Snippet&&(i.insertTextRules=g.CompletionItemInsertTextRule.InsertAsSnippet),r.documentation&&(typeof r.documentation=="string"?i.documentation=r.documentation:i.documentation={supportThemeIcons:!1,value:r.documentation.value,supportHtml:!0}),i});return{incomplete:c.isIncomplete,suggestions:s}}},y=class{constructor(e,n){this._worker=e,this._defaults=n}async provideDocumentFormattingEdits(e){let n=await this._worker(e.uri),a=this._defaults.getApiContextForModel(e.uri.toString());return(await n.doFormat(e.uri.toString(),a)).map(d=>({range:h(d.range),text:d.newText}))}},_=new w,k=class{constructor(e){this._defaults=e,this._worker=null,this._client=null,this._configChangeListener=this._defaults.onDidChange(()=>this.stopWorker())}dispose(){this._configChangeListener.dispose(),this.stopWorker()}stopWorker(){this._worker&&(this._worker.dispose(),this._worker=null,_=new w),this._client=null}static async waitForWorker(){return await _.promise}async _getClientProxy(){let e=await f();if(!this._client){let{languageId:n}=this._defaults;this._worker=e.createWebWorker({moduleId:"ArcadeWorker",label:n,createData:{languageId:n},host:this._defaults.workerHost}),_.resolve(this._worker),this._client=this._worker.getProxy()}return await this._client}async getLanguageServiceWorker(...e){let n=await this._getClientProxy();return await this._worker?.withSyncedResources(e),n}},I;async function J(...t){return await k.waitForWorker(),await new Promise((e,n)=>{if(!I){n(new Error("Arcade not registered!"));return}e(I(...t))})}var v=class{constructor(){this._onDiagnosticsChange=new F}get onDiagnosticsChange(){return this._onDiagnosticsChange.event}fireDiagnosticsChange(e,n){this._onDiagnosticsChange.fire({uri:e,diagnostics:n})}},M=new v;function ee(){return M}function te(t){let e=new k(t),n=async(...a)=>await e.getLanguageServiceWorker(...a);I=n,g.setMonarchTokensProvider(t.languageId,V),g.setLanguageConfiguration(t.languageId,W),g.registerCompletionItemProvider(t.languageId,new C(n,t)),g.registerDocumentFormattingEditProvider(t.languageId,new y(n,t)),new b(t.languageId,n,{defaults:t,diagnosticsService:M})}export{ee as getArcadeDiagnosticService,J as getArcadeWorker,te as setupMode};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.71 */
4
- import a from"./S2OEJMW5.js";import{a as T}from"./EO33VB6Q.js";import"./XDHDJ4EF.js";import"./7OWHKGQD.js";import{d as C}from"./SDTPIHTY.js";import"./QKSDT45E.js";import{D as m,E as p,F as k,G as v,H as x,J as P,g as w,i as t,m as b,o as d,s as r}from"./LXKPFW2H.js";import"./HPZJ5RKW.js";import"./3UASBQYO.js";export default $arcgis.t(([{b:o,c:y,d:g,e:M,f:L,g:F}])=>{var D=w`:host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}.ltr-container{direction:ltr}calcite-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.color-info{color:var(--calcite-color-status-info)}.color-error{color:var(--calcite-color-status-danger)}.color-success{color:var(--calcite-color-status-success)}[class*=result-value-]{font-size:var(--calcite-font-size--2);line-height:1.25rem;background-color:var(--calcite-color-foreground-1);margin:var(--calcite-spacing-md)}.console-logs-container{background-color:var(--calcite-color-foreground-1);padding:0 var(--calcite-spacing-md);font-family:var(--calcite-code-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal)}.result-value-table{table{display:block;max-width:fit-content;overflow-x:auto;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}}.tree-item-label,.number-value,.string-value,.boolean-value{font-family:var(--calcite-code-family)}.tree-item-label,.value-type{color:var(--calcite-color-text-2);font-weight:var(--calcite-font-weight-normal)}.dictionary-property{color:var(--arcgis-editor-identifier)}.number-value{color:var(--arcgis-editor-number)}.string-value{color:var(--arcgis-editor-string);white-space:pre-wrap}.constant-value{color:var(--arcgis-editor-constant)}.date-value{color:var(--arcgis-editor-date)}}`,l={lines:!0,selectionMode:"none",scale:"s",oncalciteTreeSelect:e=>e.currentTarget.selectedItems.forEach(a=>a.selected=!1)},h={onClick:e=>{let a=e.currentTarget;a.expanded=!a.expanded}},n=({name:e})=>t`<span class="dictionary-property">${e}</span><span>:&nbsp;</span>`,O=({value:e,subtree:a=!1})=>t`<calcite-tree slot=${(a?"children":void 0)??x} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item class="string-value">${JSON.stringify(e.castAsJson(),void 0,2)}</calcite-tree-item></calcite-tree>`,_=({value:e,subtree:a=!1})=>t`<calcite-tree slot=${(a?"children":void 0)??x} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item><div class="tree-item-label">${n({name:"type"})}${e.type}</div></calcite-tree-item><calcite-tree-item><div class="tree-item-label">${n({name:"value"})}<span class="string-value">${JSON.stringify(e,void 0,2)}</span></div></calcite-tree-item></calcite-tree>`,f=({arcadeResult:e})=>{switch(e.type){case"unknown":case"null":return t`<span class="constant-value">${e.type}</span>`;case"text":return t`<span class="string-value">${d(e.value)}</span>`;case"number":return t`<span class="number-value">${e.value.toString()}</span>`;case"boolean":return t`<span class="constant-value">${e.value.toString()}</span>`;case"date":return t`<span class="date-value">${M(e)}</span>`;case"dateOnly":return t`<span class="string-value">${d(L(e))}</span>`;case"time":return t`<span class="string-value">${d(F(e))}</span>`;default:return null}},z=({arcadeResult:e,t9nStrings:a})=>{let s=e.value??[],c=Math.max(s.length-o,0);return t`<span>${`${e.type}(${s.length??0})`}</span>${c>0?t`<span>&nbsp;${r(a.showingfirstitemsformat,{count:o.toString()})}</span>`:null}`},I=({value:e,subtree:a,t9nStrings:s})=>{let c=e.geometry?.();return t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.keys().map(i=>{let u=g(e.field(i));return e.arcadeDeclaredClass==="esri.arcade.Feature"&&u.type==="geometry"?null:R({arcadeResult:u,name:i,t9nStrings:s})})}${c?R({arcadeResult:{type:"geometry",value:c},name:"geometry",t9nStrings:s}):null}</calcite-tree>`},j=({arcadeResult:e,t9nStrings:a})=>t`<div class="value-type"><span>${e.type}:</span>${e.features.length>=y?t`<span>&nbsp;${r(a.showingfirstitemsformat,{count:y.toString()})}</span>`:null}</div>`,N=({items:e,subtree:a,t9nStrings:s})=>t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.map((c,i)=>{let u=g(c);return R({arcadeResult:u,name:i,expanded:!a,t9nStrings:s})})}</calcite-tree>`,R=({arcadeResult:e,name:a,expanded:s,t9nStrings:c})=>{switch(e.type){case"null":case"unknown":case"text":case"number":case"date":case"dateOnly":case"time":case"boolean":return t`<calcite-tree-item><div class="tree-item-label">${n({name:a})}${f({arcadeResult:e})}</div></calcite-tree-item>`;case"array":{let i=(e.value??[]).slice(0,o);return t`<calcite-tree-item .expanded=${s} @click=${h.onClick}><div class="tree-item-label">${n({name:a})}${z({arcadeResult:e,t9nStrings:c})}</div>${N({items:i,subtree:!0,t9nStrings:c})}</calcite-tree-item>`}case"geometry":return t`<calcite-tree-item .expanded=${s} @click=${h.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${_({value:e.value,subtree:!0})}</calcite-tree-item>`;case"attachment":return t`<calcite-tree-item .expanded=${s} @click=${h.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${O({value:e.value,subtree:!0})}</calcite-tree-item>`;case"feature":case"dictionary":case"portal":return t`<calcite-tree-item .expanded=${s} @click=${h.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${I({value:e.value,subtree:!0,t9nStrings:c})}</calcite-tree-item>`;default:return null}},A=({arcadeResult:e})=>{let a=C(e.value.fields);return t`<table><thead><tr>${a.map(s=>t`<th>${s.name}</th>`)}</tr></thead><tbody>${e.features.map(s=>t`<tr>${a.map(c=>{try{let i=g(s.field(c.name));return t`<td>${f({arcadeResult:i})}</td>`}catch{return t`<td></td>`}})}</tr>`)}</tbody></table>`},$={onClick:e=>{let a=e.currentTarget;a.expanded=!a.expanded}},S=class extends k{constructor(){super(...arguments),this.messages=T(),this.outputRef=m(),this.consoleRef=m(),this.logRef=m(),this.openedResultPanel="output",this.arcgisClose=b({bubbles:!1}),this.arcgisOpenedResultPanelChange=b({bubbles:!1})}static{this.properties={consoleLogs:0,loading:5,openedResultPanel:3,result:0}}static{this.styles=D}loaded(){this.openedResultPanel&&(this.openedResultPanel==="output"&&this.outputRef.value?this.outputRef.value.setFocus():this.openedResultPanel==="console"&&this.consoleRef.value?this.consoleRef.value.setFocus():this.openedResultPanel==="log"&&this.logRef.value&&this.logRef.value.setFocus())}updateResultPanel(a){this.openedResultPanel=a,this.arcgisOpenedResultPanelChange.emit(a)}_switchResultPanel(a){let s=a.currentTarget.dataset.panelName;s&&this.updateResultPanel(s)}_emitClose(){this.arcgisClose.emit()}renderConsolePanel(){return this.openedResultPanel!=="console"?null:this.loading&&!this.consoleLogs?.length?t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`:t`<div class="console-logs-container ltr-container">${this.consoleLogs?.length?this.consoleLogs.map(a=>t`<p>${a}</p>`):t`<p>${this.messages.consolemessage}</p>`}</div>`}renderLogPanel(){if(this.openedResultPanel!=="log")return null;if(this.loading)return t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;let a=this.result?.type==="error"?"color-error":"color-success";return t`<calcite-list label=results>${this.result?t`<calcite-list-item .label=${r(this.messages.lastexecutionformat,{timeStamp:new Intl.DateTimeFormat(this.messages._t9nLocale,{dateStyle:"medium",timeStyle:"medium"}).format(this.result.timeStamp)})}><calcite-icon slot=content-start icon=information scale=s class=${v(a)}></calcite-icon></calcite-list-item><calcite-list-item .label=${r(this.messages.compilationtimeformat,{time:new Intl.NumberFormat(this.messages._t9nLocale,{style:"unit",unit:"millisecond",maximumFractionDigits:2}).format(this.result.compilationTime??0)})}><calcite-icon slot=content-start icon=information scale=s class=${v(a)}></calcite-icon></calcite-list-item><calcite-list-item .label=${r(this.messages.executiontimeformat,{time:new Intl.NumberFormat(this.messages._t9nLocale,{style:"unit",unit:"millisecond",maximumFractionDigits:2}).format(this.result.executionTime??0)})}><calcite-icon slot=content-start icon=information scale=s class=${v(a)}></calcite-icon></calcite-list-item>`:t`<calcite-list-item .label=${this.messages.runscriptmessage}><calcite-icon slot=content-start icon=information scale=s class="color-info"></calcite-icon></calcite-list-item>`}</calcite-list>`}renderOutputPanel(){if(this.openedResultPanel!=="output")return null;if(this.loading)return t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;switch(this.result?.type){case"error":return t`<div class="result-value-simple flex-adjustable">${r(this.messages.executionerrorformat,{message:this.result.value})}</div>`;case"null":case"unknown":return t`<div class="result-value-simple ltr-container">${f({arcadeResult:this.result})}</div>`;case"text":case"number":case"date":case"dateOnly":case"time":case"boolean":return t`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}:&nbsp;</span>${f({arcadeResult:this.result})}</div>`;case"array":{let a=(this.result.value??[]).slice(0,o);return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${$.onClick}><div class="tree-item-label">${z({arcadeResult:this.result,t9nStrings:this.messages})}</div>${N({items:a,subtree:!0,t9nStrings:this.messages})}</calcite-tree-item></calcite-tree></div>`}case"geometry":return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${$.onClick}><div class="tree-item-label">${this.result.type}</div>${_({value:this.result.value,subtree:!0})}</calcite-tree-item></calcite-tree></div>`;case"attachment":return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${$.onClick}><div class="tree-item-label">${this.result.type}</div>${O({value:this.result.value,subtree:!0})}</calcite-tree-item></calcite-tree></div>`;case"feature":case"dictionary":case"portal":return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${$.onClick}><div class="tree-item-label">${this.result.type}</div>${I({value:this.result.value,subtree:!0,t9nStrings:this.messages})}</calcite-tree-item></calcite-tree></div>`;case"featureSet":return t`<div class="result-value-table ltr-container">${j({arcadeResult:this.result,t9nStrings:this.messages})}${A({arcadeResult:this.result})}</div>`;case"knowledgeGraph":return t`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}:&nbsp;</span><span class="string-value">${this.result.value.url}</span></div>`;default:return t`<div class="result-value-simple flex-adjustable ltr-container">${this.messages.runscriptmessage}</div>`}}render(){return t`<header class="flex-row"><calcite-action-bar class="flex-adjustable" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .active=${this.openedResultPanel==="output"} .text=${this.messages.output??""} text-enabled scale=s icon=list-show-all icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=output ${p(this.outputRef)}></calcite-action><calcite-action .active=${this.openedResultPanel==="console"} .text=${this.messages.console??""} text-enabled scale=s icon=console icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=console ${p(this.consoleRef)}></calcite-action><calcite-action .active=${this.openedResultPanel==="log"} .text=${this.messages.log??""} text-enabled scale=s icon=list icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=log ${p(this.logRef)}></calcite-action></calcite-action-group></calcite-action-bar><calcite-action scale=s icon=x .text=${this.messages.close??""} @click=${this._emitClose}></calcite-action></header><article class="flex-adjustable">${this.loading?t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`:t`<div class="flex-column y-scrollable-container">${this.renderOutputPanel()}${this.renderConsolePanel()}${this.renderLogPanel()}</div>`}</article>`}};P("arcgis-arcade-results",S);return S},a)
3
+ v5.0.0-next.73 */
4
+ import a from"./34HTM3CX.js";import{a as T}from"./RKGBDCEI.js";import"./7ZI5BJUK.js";import"./FXGUQKEZ.js";import{d as C}from"./4OFH6ZSH.js";import"./FQA6EBLW.js";import{D as m,E as p,F as k,G as v,H as x,J as P,g as w,i as t,m as b,o as d,s as r}from"./U6W5P5XI.js";import"./Z4SSLGVN.js";import"./2OXEX7EB.js";export default $arcgis.t(([{b:o,c:y,d:g,e:M,f:L,g:F}])=>{var D=w`:host{display:flex;flex-direction:column;width:100%;background-color:var(--calcite-color-foreground-1);color:var(--calcite-color-text-2);.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.y-scrollable-container{overflow-y:auto;block-size:100%;background-color:var(--calcite-color-foreground-1)}header{border-bottom:1px solid var(--calcite-color-border-3);flex:0 0 auto}.ltr-container{direction:ltr}calcite-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1)}.color-info{color:var(--calcite-color-status-info)}.color-error{color:var(--calcite-color-status-danger)}.color-success{color:var(--calcite-color-status-success)}[class*=result-value-]{font-size:var(--calcite-font-size--2);line-height:1.25rem;background-color:var(--calcite-color-foreground-1);margin:var(--calcite-spacing-md)}.console-logs-container{background-color:var(--calcite-color-foreground-1);padding:0 var(--calcite-spacing-md);font-family:var(--calcite-code-family);font-size:var(--calcite-font-size--2);font-weight:var(--calcite-font-weight-normal)}.result-value-table{table{display:block;max-width:fit-content;overflow-x:auto;border-spacing:0;border-collapse:collapse;text-align:start;white-space:nowrap;thead{background-color:var(--calcite-color-foreground-2)}tr{border-top:1px solid var(--calcite-color-border-3);border-bottom:1px solid var(--calcite-color-border-3)}th,td{border-inline-start:1px solid var(--calcite-color-border-3);border-inline-end:1px solid var(--calcite-color-border-3);text-align:start;padding:var(--calcite-spacing-xxs);.string-value{white-space:pre}}th{font-weight:var(--calcite-font-weight-medium)}}}.tree-item-label,.number-value,.string-value,.boolean-value{font-family:var(--calcite-code-family)}.tree-item-label,.value-type{color:var(--calcite-color-text-2);font-weight:var(--calcite-font-weight-normal)}.dictionary-property{color:var(--arcgis-editor-identifier)}.number-value{color:var(--arcgis-editor-number)}.string-value{color:var(--arcgis-editor-string);white-space:pre-wrap}.constant-value{color:var(--arcgis-editor-constant)}.date-value{color:var(--arcgis-editor-date)}}`,l={lines:!0,selectionMode:"none",scale:"s",oncalciteTreeSelect:e=>e.currentTarget.selectedItems.forEach(a=>a.selected=!1)},h={onClick:e=>{let a=e.currentTarget;a.expanded=!a.expanded}},n=({name:e})=>t`<span class="dictionary-property">${e}</span><span>:&nbsp;</span>`,O=({value:e,subtree:a=!1})=>t`<calcite-tree slot=${(a?"children":void 0)??x} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item class="string-value">${JSON.stringify(e.castAsJson(),void 0,2)}</calcite-tree-item></calcite-tree>`,_=({value:e,subtree:a=!1})=>t`<calcite-tree slot=${(a?"children":void 0)??x} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item><div class="tree-item-label">${n({name:"type"})}${e.type}</div></calcite-tree-item><calcite-tree-item><div class="tree-item-label">${n({name:"value"})}<span class="string-value">${JSON.stringify(e,void 0,2)}</span></div></calcite-tree-item></calcite-tree>`,f=({arcadeResult:e})=>{switch(e.type){case"unknown":case"null":return t`<span class="constant-value">${e.type}</span>`;case"text":return t`<span class="string-value">${d(e.value)}</span>`;case"number":return t`<span class="number-value">${e.value.toString()}</span>`;case"boolean":return t`<span class="constant-value">${e.value.toString()}</span>`;case"date":return t`<span class="date-value">${M(e)}</span>`;case"dateOnly":return t`<span class="string-value">${d(L(e))}</span>`;case"time":return t`<span class="string-value">${d(F(e))}</span>`;default:return null}},z=({arcadeResult:e,t9nStrings:a})=>{let s=e.value??[],c=Math.max(s.length-o,0);return t`<span>${`${e.type}(${s.length??0})`}</span>${c>0?t`<span>&nbsp;${r(a.showingfirstitemsformat,{count:o.toString()})}</span>`:null}`},I=({value:e,subtree:a,t9nStrings:s})=>{let c=e.geometry?.();return t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.keys().map(i=>{let u=g(e.field(i));return e.arcadeDeclaredClass==="esri.arcade.Feature"&&u.type==="geometry"?null:R({arcadeResult:u,name:i,t9nStrings:s})})}${c?R({arcadeResult:{type:"geometry",value:c},name:"geometry",t9nStrings:s}):null}</calcite-tree>`},j=({arcadeResult:e,t9nStrings:a})=>t`<div class="value-type"><span>${e.type}:</span>${e.features.length>=y?t`<span>&nbsp;${r(a.showingfirstitemsformat,{count:y.toString()})}</span>`:null}</div>`,N=({items:e,subtree:a,t9nStrings:s})=>t`<calcite-tree slot=${"children"} .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}>${e.map((c,i)=>{let u=g(c);return R({arcadeResult:u,name:i,expanded:!a,t9nStrings:s})})}</calcite-tree>`,R=({arcadeResult:e,name:a,expanded:s,t9nStrings:c})=>{switch(e.type){case"null":case"unknown":case"text":case"number":case"date":case"dateOnly":case"time":case"boolean":return t`<calcite-tree-item><div class="tree-item-label">${n({name:a})}${f({arcadeResult:e})}</div></calcite-tree-item>`;case"array":{let i=(e.value??[]).slice(0,o);return t`<calcite-tree-item .expanded=${s} @click=${h.onClick}><div class="tree-item-label">${n({name:a})}${z({arcadeResult:e,t9nStrings:c})}</div>${N({items:i,subtree:!0,t9nStrings:c})}</calcite-tree-item>`}case"geometry":return t`<calcite-tree-item .expanded=${s} @click=${h.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${_({value:e.value,subtree:!0})}</calcite-tree-item>`;case"attachment":return t`<calcite-tree-item .expanded=${s} @click=${h.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${O({value:e.value,subtree:!0})}</calcite-tree-item>`;case"feature":case"dictionary":case"portal":return t`<calcite-tree-item .expanded=${s} @click=${h.onClick}><div class="tree-item-label">${n({name:a})}<span>${e.type}</span></div>${I({value:e.value,subtree:!0,t9nStrings:c})}</calcite-tree-item>`;default:return null}},A=({arcadeResult:e})=>{let a=C(e.value.fields);return t`<table><thead><tr>${a.map(s=>t`<th>${s.name}</th>`)}</tr></thead><tbody>${e.features.map(s=>t`<tr>${a.map(c=>{try{let i=g(s.field(c.name));return t`<td>${f({arcadeResult:i})}</td>`}catch{return t`<td></td>`}})}</tr>`)}</tbody></table>`},$={onClick:e=>{let a=e.currentTarget;a.expanded=!a.expanded}},S=class extends k{constructor(){super(...arguments),this.messages=T(),this.outputRef=m(),this.consoleRef=m(),this.logRef=m(),this.openedResultPanel="output",this.arcgisClose=b({bubbles:!1}),this.arcgisOpenedResultPanelChange=b({bubbles:!1})}static{this.properties={consoleLogs:0,loading:5,openedResultPanel:3,result:0}}static{this.styles=D}loaded(){this.openedResultPanel&&(this.openedResultPanel==="output"&&this.outputRef.value?this.outputRef.value.setFocus():this.openedResultPanel==="console"&&this.consoleRef.value?this.consoleRef.value.setFocus():this.openedResultPanel==="log"&&this.logRef.value&&this.logRef.value.setFocus())}updateResultPanel(a){this.openedResultPanel=a,this.arcgisOpenedResultPanelChange.emit(a)}_switchResultPanel(a){let s=a.currentTarget.dataset.panelName;s&&this.updateResultPanel(s)}_emitClose(){this.arcgisClose.emit()}renderConsolePanel(){return this.openedResultPanel!=="console"?null:this.loading&&!this.consoleLogs?.length?t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`:t`<div class="console-logs-container ltr-container">${this.consoleLogs?.length?this.consoleLogs.map(a=>t`<p>${a}</p>`):t`<p>${this.messages.consolemessage}</p>`}</div>`}renderLogPanel(){if(this.openedResultPanel!=="log")return null;if(this.loading)return t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;let a=this.result?.type==="error"?"color-error":"color-success";return t`<calcite-list label=results>${this.result?t`<calcite-list-item .label=${r(this.messages.lastexecutionformat,{timeStamp:new Intl.DateTimeFormat(this.messages._t9nLocale,{dateStyle:"medium",timeStyle:"medium"}).format(this.result.timeStamp)})}><calcite-icon slot=content-start icon=information scale=s class=${v(a)}></calcite-icon></calcite-list-item><calcite-list-item .label=${r(this.messages.compilationtimeformat,{time:new Intl.NumberFormat(this.messages._t9nLocale,{style:"unit",unit:"millisecond",maximumFractionDigits:2}).format(this.result.compilationTime??0)})}><calcite-icon slot=content-start icon=information scale=s class=${v(a)}></calcite-icon></calcite-list-item><calcite-list-item .label=${r(this.messages.executiontimeformat,{time:new Intl.NumberFormat(this.messages._t9nLocale,{style:"unit",unit:"millisecond",maximumFractionDigits:2}).format(this.result.executionTime??0)})}><calcite-icon slot=content-start icon=information scale=s class=${v(a)}></calcite-icon></calcite-list-item>`:t`<calcite-list-item .label=${this.messages.runscriptmessage}><calcite-icon slot=content-start icon=information scale=s class="color-info"></calcite-icon></calcite-list-item>`}</calcite-list>`}renderOutputPanel(){if(this.openedResultPanel!=="output")return null;if(this.loading)return t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`;switch(this.result?.type){case"error":return t`<div class="result-value-simple flex-adjustable">${r(this.messages.executionerrorformat,{message:this.result.value})}</div>`;case"null":case"unknown":return t`<div class="result-value-simple ltr-container">${f({arcadeResult:this.result})}</div>`;case"text":case"number":case"date":case"dateOnly":case"time":case"boolean":return t`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}:&nbsp;</span>${f({arcadeResult:this.result})}</div>`;case"array":{let a=(this.result.value??[]).slice(0,o);return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${$.onClick}><div class="tree-item-label">${z({arcadeResult:this.result,t9nStrings:this.messages})}</div>${N({items:a,subtree:!0,t9nStrings:this.messages})}</calcite-tree-item></calcite-tree></div>`}case"geometry":return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${$.onClick}><div class="tree-item-label">${this.result.type}</div>${_({value:this.result.value,subtree:!0})}</calcite-tree-item></calcite-tree></div>`;case"attachment":return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${$.onClick}><div class="tree-item-label">${this.result.type}</div>${O({value:this.result.value,subtree:!0})}</calcite-tree-item></calcite-tree></div>`;case"feature":case"dictionary":case"portal":return t`<div class="result-value-simple ltr-container"><calcite-tree .lines=${l.lines} .selectionMode=${l.selectionMode} .scale=${l.scale} @calciteTreeSelect=${l.oncalciteTreeSelect}><calcite-tree-item expanded @click=${$.onClick}><div class="tree-item-label">${this.result.type}</div>${I({value:this.result.value,subtree:!0,t9nStrings:this.messages})}</calcite-tree-item></calcite-tree></div>`;case"featureSet":return t`<div class="result-value-table ltr-container">${j({arcadeResult:this.result,t9nStrings:this.messages})}${A({arcadeResult:this.result})}</div>`;case"knowledgeGraph":return t`<div class="result-value-simple ltr-container"><span class="value-type">${this.result.type}:&nbsp;</span><span class="string-value">${this.result.value.url}</span></div>`;default:return t`<div class="result-value-simple flex-adjustable ltr-container">${this.messages.runscriptmessage}</div>`}}render(){return t`<header class="flex-row"><calcite-action-bar class="flex-adjustable" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .active=${this.openedResultPanel==="output"} .text=${this.messages.output??""} text-enabled scale=s icon=list-show-all icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=output ${p(this.outputRef)}></calcite-action><calcite-action .active=${this.openedResultPanel==="console"} .text=${this.messages.console??""} text-enabled scale=s icon=console icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=console ${p(this.consoleRef)}></calcite-action><calcite-action .active=${this.openedResultPanel==="log"} .text=${this.messages.log??""} text-enabled scale=s icon=list icon-flip-rtl @click=${this._switchResultPanel} data-panel-name=log ${p(this.logRef)}></calcite-action></calcite-action-group></calcite-action-bar><calcite-action scale=s icon=x .text=${this.messages.close??""} @click=${this._emitClose}></calcite-action></header><article class="flex-adjustable">${this.loading?t`<calcite-loader scale=s type=indeterminate label></calcite-loader>`:t`<div class="flex-column y-scrollable-container">${this.renderOutputPanel()}${this.renderConsolePanel()}${this.renderLogPanel()}</div>`}</article>`}};P("arcgis-arcade-results",S);return S},a)
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.71 */
3
+ v5.0.0-next.73 */
4
4
  function x(t){return N(t)||v(t)}function E(t){return C(t).filter(e=>e.nodeType===Node.TEXT_NODE).map(e=>e.textContent).join("").trim()}function v(t){return E(t).length>0}function C(t){return t.currentTarget.assignedNodes({flatten:!0})}function N(t){return y(t).length>0}function y(t,e){return L(t.target,e)}function L(t,e){let n=t.assignedElements({flatten:!0});return e?n.filter(o=>o.matches(e)):n}var T=(t,e)=>{let n=t;for(;n;){if(n===e)return!0;if(!n.parentNode)return!1;n.parentNode instanceof ShadowRoot?n=n.parentNode.host:n=n.parentNode}return!1},f=(t,e,n)=>{let o=A(e).subscribe;return o(s=>{s.some(r=>T(t,r.target))&&n()})},u={},A=t=>{let e=t.join(","),n=u[e];if(n!==void 0)return n;let o=new Set,s=new MutationObserver(r=>o.forEach(l=>l(r)));globalThis.document&&s.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0});let c={subscribe:r=>(o.add(r),()=>{o.delete(r),o.size===0&&(s.disconnect(),u[e]=void 0)})};return u[e]=c,c},h=(t,e)=>{let n=t;for(;n;){let o=n.closest?.(e);if(o)return o;let s=n.getRootNode?.();if(s===globalThis.document)return;n=s.host}};function M(t){let e=h(t,".calcite-mode-dark, .calcite-mode-light, .calcite-mode-auto");return e?.classList.contains("calcite-mode-dark")||e?.classList.contains("calcite-mode-auto")&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}var g=(t,e,n)=>h(t,`[${e}]`)?.getAttribute(e)??n,P=async t=>{t!=null&&(m(t)?await t.setFocus():t.focus())},m=t=>typeof t.setFocus=="function",F=(t,e)=>{if(t?.shadowRoot){if(t.hasAttribute("hydrated")||t.hasAttribute("calcite-hydrated")){i(t,e);return}Promise.resolve(t.componentOnReady?.()).then(()=>i(t,e))}},w=t=>t.nodeType===Node.ELEMENT_NODE,i=(t,e="")=>{if(!w(t))return!1;if(t.matches(e))return m(t)&&setTimeout(()=>void t.setFocus(),0),!0;for(let o of t.children)if(i(o,e))return!0;let n=t.shadowRoot;if(n){for(let o of n.children)if(i(o,e))return!0}return!1};var S="ar,bg,bs,ca,cs,da,de,el,en,es,et,fi,fr,he,hr,hu,id,it,ja,ko,lt,lv,nl,nb,no,pl,pt-BR,pt-PT,ro,ru,sk,sl,sr,sv,th,tr,uk,vi,zh-CN,zh-HK,zh-TW".split(","),$=new Set(S),a="en",k={pt:"pt-PT",nb:"no",nn:"no",zh:"zh-CN"},z=async(t,e,n="")=>{let o=`${e}/${n}`,s=`${o}${t}.json`;return d[s]??(d[s]=p(t,o)),await d[s]},d={},p=async(t,e)=>{let n=`${e}${t}.json`;try{let o=await fetch(n);if(o.ok)return await o.json()}catch(o){return console.error(o),{}}return t===a?{}:await p(a,e)},O=t=>{let e=g(t,"lang",globalThis.navigator?.language||a);return{lang:e,t9nLocale:b(e)}},b=t=>{let[e,n]=t.split("-"),o=e.toLowerCase(),s=o;return n&&(s=`${o}-${n.toUpperCase()}`),s=k[s]??s,$.has(s)?s:n?b(o):a},D=(t,e,n,o)=>{let s,c=()=>j(t,e(),o).then(r=>{(s?.lang!==r.lang||s.t9nLocale!==r.t9nLocale||s.t9nStrings!==r.t9nStrings)&&n(r),s=r}).catch(console.error);return queueMicrotask(c),f(t,["lang"],c)},j=async(t,e,n=t.localName.split("-").slice(1).join("-"))=>{let{lang:o,t9nLocale:s}=O(t),c=`${e}/${n}/t9n`,l=n===null?{}:await z(s,c,"messages.");return{lang:o,t9nLocale:s,t9nStrings:l}};export{x as a,f as b,M as c,P as d,F as e,$ as f,z as g,O as h,b as i,D as j};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.71 */
3
+ v5.0.0-next.73 */
4
4
  var n=(e,o=100)=>{let t;return(...c)=>{let i=()=>{clearTimeout(t),e(...c)};clearTimeout(t),t=setTimeout(i,o)}};export{n as a};
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.71 */
4
- import h from"./N5KWAXQA.js";import e from"./LGW3O274.js";import d from"./JNNAY45A.js";import{a as O,c as u,d as k}from"./SKRSEP2B.js";import{a as b}from"./XDHDJ4EF.js";import"./GNP74Y64.js";import c from"./6UH33ZVX.js";import a from"./EQJTQWVC.js";import{a as N}from"./7OWHKGQD.js";import"./SDTPIHTY.js";import"./WKOC4GPI.js";import{a as C}from"./ASULWHRK.js";import"./4LZFLUL5.js";import"./HLEJZHNK.js";import{a as T,b as y,c as E}from"./QKSDT45E.js";import{F as f,J as v,K as S,g,h as _,i as l}from"./LXKPFW2H.js";import"./HPZJ5RKW.js";import"./5LJ3WHGE.js";import"./3UASBQYO.js";export default $arcgis.t(([,,,{a:w},{a:c,b:p}])=>{var L=Symbol(),h=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((t,e)=>{this.o=t,this.h=e})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,e,s){this.p=0,this.i=0,(this._=t).addController(this);let i=typeof e=="object"?e:{task:e,args:s};this.v=i.task,this.j=i.args,this.m=i.argsEqual??M,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(),e=this.O;this.O=t,t===e||t===void 0||e!==void 0&&this.m(e,t)||await this.run(t)}async run(t){let e,s;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 o=!1;try{e=await this.v(t,{signal:this.q.signal})}catch(d){o=!0,s=d}if(this.p===i){if(e===L)this.i=0;else{if(o===!1){try{this.k?.(e)}catch{}this.i=2,this.o?.(e)}else{try{this.A?.(s)}catch{}this.i=3,this.h?.(s)}this.u=e,this.l=s}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)}}},M=(n,t)=>n===t||n.length===t.length&&n.every(((e,s)=>!_(e,t[s])));var A=g`pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);white-space:pre-line;code{font-size:var(--calcite-font-size--2);font-family:var(--calcite-font-family-code)}}:host([round]){pre{border-radius:var(--calcite-corner-radius-round)}}`,m=class extends f{constructor(){super(...arguments),this._monacoEditor=b(C),this.#e=Promise.withResolvers(),this.#t="",this._slotContentObservers=[],this._onDefaultSlotChange=async t=>{T(t)||(this._codeFromSlot="");let e=t.target instanceof HTMLSlotElement?t.target:null,s=e?this._computeSlotText(e):"";e&&this._observeAssignedSlotNodes(e),s!==this._codeFromSlot&&(this._codeFromSlot=s),this.#e.resolve()},this._colorizeTask=new h(this,{task:async([t,e],{signal:s})=>{if(await this.#e.promise,s.aborted)return this.#t;if(await c(e),s.aborted)return this.#t;let i=await O(t,e);return s.aborted?this.#t:(this.#t=i,i)},args:()=>[this._codeFromSlot,this.language]}),this._codeFromSlot="",this.language="arcade",this.round=!1}static{this.properties={_codeFromSlot:16,language:1,round:7}}static{this.styles=A}#e;#t;async load(){w(S("./assets")),await p(this.language),await c(this.language),this._applyColorizeStyles(u()),this.manager.onLifecycle(()=>(this._themeObserver=y(this.el,["class"],()=>this.updateTheme()),this._themeChangedListener=k(()=>{this._applyColorizeStyles(u())}),this.updateTheme(),()=>{this._themeObserver?.(),this._themeObserver=void 0,this._themeChangedListener?.dispose(),this._themeChangedListener=void 0}))}loaded(){this.el.hasChildNodes()||this.#e.resolve()}willUpdate(t){t.has("language")&&p(this.language).then(()=>c(this.language)).catch(e=>console.error(e))}disconnectedCallback(){super.disconnectedCallback(),this._disposeSlotObservers()}_disposeSlotObservers(){this._slotContentObservers.length&&(this._slotContentObservers.forEach(t=>t.disconnect()),this._slotContentObservers=[])}_observeAssignedSlotNodes(t){this._disposeSlotObservers();let e=t.assignedNodes({flatten:!0});if(!e.length)return;let s=new Set;for(let r of e)r.nodeType===Node.ELEMENT_NODE?s.add(r):r.nodeType===Node.TEXT_NODE&&r.parentElement&&s.add(r.parentElement);let i={characterData:!0,childList:!0,subtree:!0},o=N(()=>{let r=this._computeSlotText(t);r!==this._codeFromSlot&&(this._codeFromSlot=r)},100),d=r=>{if(r.some(a=>a.type==="childList")){let a=this._computeSlotText(t);a!==this._codeFromSlot&&(this._codeFromSlot=a);return}o()};s.forEach(r=>{let a=new MutationObserver(d);a.observe(r,i),this._slotContentObservers.push(a)})}_computeSlotText(t){let e=t.assignedNodes({flatten:!0}).filter(s=>s.nodeType!==Node.COMMENT_NODE);if(this.language==="html"&&e.length){let s=e.find(o=>o.nodeType===Node.ELEMENT_NODE&&o.tagName==="TEMPLATE");if(s)return(s.innerHTML??"").trim();let i=e.map(o=>o.nodeType===Node.ELEMENT_NODE?o.outerHTML:o.nodeType===Node.TEXT_NODE?o.textContent??"":"").join("").trim();return i}return e.map(s=>s.textContent??"").join("").trim()}updateTheme(){let t=E(this.el)==="light"?"vs":"vs-dark";t!==this._currentTheme&&(this._currentTheme=t,this._monacoEditor.setTheme(t))}_applyColorizeStyles(t){if(!this._colorizeSheet){this._colorizeSheet=new CSSStyleSheet;let e=this.renderRoot;e.adoptedStyleSheets=[...e.adoptedStyleSheets,this._colorizeSheet]}this._colorizeSheet.replaceSync(t)}render(){return l`<div><slot @slotchange=${this._onDefaultSlotChange} style="display:none" aria-hidden=true></slot><pre class="arcgis-code-viewer" aria-label=${`${this.language} code snippet`}>${this._colorizeTask.render({error:()=>null,pending:()=>l`<code class=${`language-${this.language}`}></code>`,complete:t=>l`<code class=${`language-${this.language}`} .innerHTML=${t??""}></code>`})}</pre></div>`}};v("arcgis-code-viewer",m);return m},a,c,d,e,h)
3
+ v5.0.0-next.73 */
4
+ import h from"./MUO4ZHKB.js";import e from"./RW5V7UG7.js";import d from"./ZRT2WZLK.js";import{a as O,c as u,d as k}from"./KK4FO5CH.js";import{a as b}from"./7ZI5BJUK.js";import"./URLWLKSB.js";import c from"./3FQNGZUI.js";import a from"./22625RKF.js";import{a as N}from"./FXGUQKEZ.js";import"./4OFH6ZSH.js";import"./PMNTUV3G.js";import{a as C}from"./JERGWAQK.js";import"./JHP4J2TD.js";import"./7RBKOBAS.js";import{a as T,b as y,c as E}from"./FQA6EBLW.js";import{F as f,J as v,K as S,g,h as _,i as l}from"./U6W5P5XI.js";import"./Z4SSLGVN.js";import"./KQBQ3FU5.js";import"./2OXEX7EB.js";export default $arcgis.t(([,,,{a:w},{a:c,b:p}])=>{var L=Symbol(),h=class{get taskComplete(){return this.t||(this.i===1?this.t=new Promise(((t,e)=>{this.o=t,this.h=e})):this.i===3?this.t=Promise.reject(this.l):this.t=Promise.resolve(this.u)),this.t}constructor(t,e,s){this.p=0,this.i=0,(this._=t).addController(this);let i=typeof e=="object"?e:{task:e,args:s};this.v=i.task,this.j=i.args,this.m=i.argsEqual??M,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(),e=this.O;this.O=t,t===e||t===void 0||e!==void 0&&this.m(e,t)||await this.run(t)}async run(t){let e,s;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 o=!1;try{e=await this.v(t,{signal:this.q.signal})}catch(d){o=!0,s=d}if(this.p===i){if(e===L)this.i=0;else{if(o===!1){try{this.k?.(e)}catch{}this.i=2,this.o?.(e)}else{try{this.A?.(s)}catch{}this.i=3,this.h?.(s)}this.u=e,this.l=s}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)}}},M=(n,t)=>n===t||n.length===t.length&&n.every(((e,s)=>!_(e,t[s])));var A=g`pre{direction:ltr;overflow-x:auto;background-color:var(--calcite-color-foreground-2);padding:var(--calcite-spacing-sm);white-space:pre-line;code{font-size:var(--calcite-font-size--2);font-family:var(--calcite-font-family-code)}}:host([round]){pre{border-radius:var(--calcite-corner-radius-round)}}`,m=class extends f{constructor(){super(...arguments),this._monacoEditor=b(C),this.#e=Promise.withResolvers(),this.#t="",this._slotContentObservers=[],this._onDefaultSlotChange=async t=>{T(t)||(this._codeFromSlot="");let e=t.target instanceof HTMLSlotElement?t.target:null,s=e?this._computeSlotText(e):"";e&&this._observeAssignedSlotNodes(e),s!==this._codeFromSlot&&(this._codeFromSlot=s),this.#e.resolve()},this._colorizeTask=new h(this,{task:async([t,e],{signal:s})=>{if(await this.#e.promise,s.aborted)return this.#t;if(await c(e),s.aborted)return this.#t;let i=await O(t,e);return s.aborted?this.#t:(this.#t=i,i)},args:()=>[this._codeFromSlot,this.language]}),this._codeFromSlot="",this.language="arcade",this.round=!1}static{this.properties={_codeFromSlot:16,language:1,round:7}}static{this.styles=A}#e;#t;async load(){w(S("./assets")),await p(this.language),await c(this.language),this._applyColorizeStyles(u()),this.manager.onLifecycle(()=>(this._themeObserver=y(this.el,["class"],()=>this.updateTheme()),this._themeChangedListener=k(()=>{this._applyColorizeStyles(u())}),this.updateTheme(),()=>{this._themeObserver?.(),this._themeObserver=void 0,this._themeChangedListener?.dispose(),this._themeChangedListener=void 0}))}loaded(){this.el.hasChildNodes()||this.#e.resolve()}willUpdate(t){t.has("language")&&p(this.language).then(()=>c(this.language)).catch(e=>console.error(e))}disconnectedCallback(){super.disconnectedCallback(),this._disposeSlotObservers()}_disposeSlotObservers(){this._slotContentObservers.length&&(this._slotContentObservers.forEach(t=>t.disconnect()),this._slotContentObservers=[])}_observeAssignedSlotNodes(t){this._disposeSlotObservers();let e=t.assignedNodes({flatten:!0});if(!e.length)return;let s=new Set;for(let r of e)r.nodeType===Node.ELEMENT_NODE?s.add(r):r.nodeType===Node.TEXT_NODE&&r.parentElement&&s.add(r.parentElement);let i={characterData:!0,childList:!0,subtree:!0},o=N(()=>{let r=this._computeSlotText(t);r!==this._codeFromSlot&&(this._codeFromSlot=r)},100),d=r=>{if(r.some(a=>a.type==="childList")){let a=this._computeSlotText(t);a!==this._codeFromSlot&&(this._codeFromSlot=a);return}o()};s.forEach(r=>{let a=new MutationObserver(d);a.observe(r,i),this._slotContentObservers.push(a)})}_computeSlotText(t){let e=t.assignedNodes({flatten:!0}).filter(s=>s.nodeType!==Node.COMMENT_NODE);if(this.language==="html"&&e.length){let s=e.find(o=>o.nodeType===Node.ELEMENT_NODE&&o.tagName==="TEMPLATE");if(s)return(s.innerHTML??"").trim();let i=e.map(o=>o.nodeType===Node.ELEMENT_NODE?o.outerHTML:o.nodeType===Node.TEXT_NODE?o.textContent??"":"").join("").trim();return i}return e.map(s=>s.textContent??"").join("").trim()}updateTheme(){let t=E(this.el)==="light"?"vs":"vs-dark";t!==this._currentTheme&&(this._currentTheme=t,this._monacoEditor.setTheme(t))}_applyColorizeStyles(t){if(!this._colorizeSheet){this._colorizeSheet=new CSSStyleSheet;let e=this.renderRoot;e.adoptedStyleSheets=[...e.adoptedStyleSheets,this._colorizeSheet]}this._colorizeSheet.replaceSync(t)}render(){return l`<div><slot @slotchange=${this._onDefaultSlotChange} style="display:none" aria-hidden=true></slot><pre class="arcgis-code-viewer" aria-label=${`${this.language} code snippet`}>${this._colorizeTask.render({error:()=>null,pending:()=>l`<code class=${`language-${this.language}`}></code>`,complete:t=>l`<code class=${`language-${this.language}`} .innerHTML=${t??""}></code>`})}</pre></div>`}};v("arcgis-code-viewer",m);return m},a,c,d,e,h)
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.71 */
4
- import{A,B as D,C as y,j as P,v as k,w,x as V,y as m,z as h}from"./LXKPFW2H.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};
3
+ v5.0.0-next.73 */
4
+ import{A,B as D,C as y,j as P,v as k,w,x as V,y as m,z as h}from"./U6W5P5XI.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,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.71 */
4
- import d from"./LGW3O274.js";import{a as T}from"./2BQ54CBQ.js";import c from"./JNNAY45A.js";import b from"./S2OEJMW5.js";import{a as B}from"./EO33VB6Q.js";import"./XDHDJ4EF.js";import a from"./EQJTQWVC.js";import"./SDTPIHTY.js";import"./WKOC4GPI.js";import"./ASULWHRK.js";import"./4LZFLUL5.js";import"./HLEJZHNK.js";import"./QKSDT45E.js";import{D as R,E as y,F as D,G as n,J as C,K as k,g as S,i,k as _,m,r as E,t as w}from"./LXKPFW2H.js";import{a as P}from"./HPZJ5RKW.js";import{Hl as I,kk as z}from"./5LJ3WHGE.js";import"./3UASBQYO.js";export default $arcgis.t(([N,,{a:L,h:f},o,{a:M,b:F}])=>{z();var O=S`@layer{arcgis-arcade-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border)!important;box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%;.sticky{position:sticky;top:0;z-index:10}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);text-align:center}.main-action-bar{border-bottom:var(--arcgis-coding-components-border)!important;flex:0 0 auto;calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}arcgis-arcade-results{border-top:var(--arcgis-coding-components-border)!important;box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}calcite-flow{[slot=footer]{word-break:break-word}}.hidden{display:none}}}`,H="https://services6.arcgis.com/HXHga6CfMLMBOlBX/ArcGIS/rest/services/survey123_6e349a50b4504ca6b6107216d568db5f_form/FeatureServer/0",V=s=>{let{aiAssistantsEnabled:e}=s;return e===void 0?(console.warn("areAiAssistantsEnabled is not defined in the organizations settings."),!1):e},G=s=>!(!s||!("id"in s)),q=async s=>(await N.getCredential(s)).token;async function K({portalUrl:s,profile:e}){if(!G(e))return console.warn("Arcade assistant addon initialization failed: unsupported profile."),{shouldRender:!1};let t=s.replace(/\/sharing\/rest(\/.*)?$/iu,"").replace(/\/$/u,""),a=await q(s),r=`${t}/sharing/rest/portals/self?f=json&token=${a}`,l=`${t}/sharing/rest/portals/self/settings?f=json&token=${a}`,d=`${t}/sharing/rest/portals/self/signinSettings?f=json&token=${a}`,h=await Promise.allSettled([fetch(r,{credentials:"include"}).then(c=>c.json()),fetch(l,{credentials:"include"}).then(c=>c.json()),fetch(d,{credentials:"include"}).then(c=>c.json())]),[p,g,u]=h,x=p.status==="fulfilled"?p.value:(console.warn("Failed to fetch selfUrl",p.reason),{}),A=g.status==="fulfilled"?g.value:(console.warn("Failed to fetch settingsUrl",g.reason),{}),U=u.status==="fulfilled"?u.value:(console.warn("Failed to fetch signinSettingsUrl",u.reason),{}),$=x?.helperServices?.aiAssistantServices?.url;if(!$)return console.warn("Arcade Assistant service URL is not available in the portal self response."),{shouldRender:!1};let j=x.helpBase||"";if(!A)return console.warn("Arcade Assistant settings response is not available."),{shouldRender:!1};let v=V(A);return U.blockBetaApps===!0&&(console.warn("Arcade Assistant is blocked by the organization settings. To enable it, do not block beta apps in the organization settings."),v=!1),{shouldRender:!0,serviceUrl:$,helpBase:j,assistantsEnabled:v,feedbackServiceUrl:H}}var b=class extends D{constructor(){super(...arguments),this._codeEditorElt=R(),this._componentReadyDefer=new P,this._disposables=[],this._editorProfilePromise=Promise.resolve(void 0),this.messages=B(),this._modelId=E(),this._openArcadeHelp=()=>void window.open(L,"Arcade Help"),this._toggleSidePanel=e=>{if(!e.target)return;let t=e.target?.dataset.panelName??"none";this.openedSidePanel=t===this.openedSidePanel?"none":t,this.openedSidePanel==="none"&&this._codeEditorElt.value?.setFocus().catch(console.error)},this._consoleLogs=[],this._executingScript=!1,this._preparingArcade=!1,this._resultPanel="output",this._showExecutionPanel=!1,this._arcadeAssistantRemoteState={shouldRender:!1},this.hideDocumentationActions=!1,this.hideSideBar=!1,this.openedSidePanel="none",this.script="",this.sideActionBarExpanded=!1,this.arcgisDiagnosticsChange=m({bubbles:!1}),this.arcgisScriptChange=m({bubbles:!1})}static{this.properties={_apiLibrary:16,_consoleLogs:16,_editorProfile:16,_executingScript:16,_executionResult:16,_preparingArcade:16,_resultPanel:16,_showExecutionPanel:16,_arcadeAssistantRemoteState:16,editorInstance:32,editorOptions:0,hideDocumentationActions:5,hideSideBar:5,openedSidePanel:2,profile:0,script:1,sideActionBarExpanded:7,snippets:0,suggestions:0,testData:0,customPanels:0,arcadeAssistant:0}}static{this.shadowRootOptions=w}static{this.styles=[O,T]}get editorInstance(){return this._codeEditorElt.value?.editorInstance}async getEditorInstance(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.editorInstance}async getScript(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.value}async getTestResult(){if(!this.testData)return{type:"error",value:"Missing test data",error:null};let e=await this._editorProfilePromise;if(!e)return{type:"error",value:"Missing editor profile",error:null};await this._componentReadyDefer.promise;let t=this._codeEditorElt.value?.value;return await f(e.definition,t,this.testData)}async setFocus(){await this._componentReadyDefer.promise,await this._codeEditorElt.value?.setFocus()}async load(){let e=k("./assets");M(e),await this._updateDataModelDeps(),await this._updateArcadeAssistantRemoteState()}willUpdate(e){(e.has("messages")||e.has("profile"))&&this.hasUpdated&&this._updateDataModelDeps(),e.has("testData")&&this._testDataChanged(),e.has("snippets")&&o.updateApiContextForModel(this._modelId,{snippets:this.snippets}),e.has("arcadeAssistant")&&this._updateArcadeAssistantRemoteState()}async loaded(){this._componentReadyDefer.resolve(),await this._updateApiLibrary();let e=await F();this._disposables.push(e.onDiagnosticsChange(t=>!this._preparingArcade&&this.arcgisDiagnosticsChange.emit(t.diagnostics))),this.testData&&this._addExecuteScriptAction()}disconnectedCallback(){for(super.disconnectedCallback();this._disposables.length;)this._disposables.pop()?.dispose()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}_testDataChanged(){!this.testData&&this._executeScriptAction&&(this._disposeSafely(this._executeScriptAction),this._executeScriptAction=void 0),this.testData&&!this._executeScriptAction&&this._addExecuteScriptAction(),this._showExecutionPanel&&this._executeScript().catch(console.error)}async _updateEditorProfile(){this._preparingArcade=!0;try{await o.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale,snippets:this.snippets}),this._editorProfile=o.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._editorProfilePromise=Promise.resolve(this._editorProfile),this._preparingArcade=!1}}async _updateApiLibrary(){this._apiLibrary=await o.getApiLibraryForModel(this._modelId)}async _executeScript(){let e=this.testData;if(!this._codeEditorElt.value||!e)return;let t=await this._editorProfilePromise;if(!t){this._executionResult={type:"error",value:"Missing editor profile",error:null};return}this._showExecutionPanel=!0,this._executingScript=!0,this._consoleLogs=[],setTimeout(()=>void(async()=>{let a=this._codeEditorElt.value?.value;this._executionResult=await f(t.definition,a,e,r=>setTimeout(()=>this._consoleLogs=[...this._consoleLogs,r],0)),this._executingScript=!1})(),0)}_toggleShowExecutionPanel(){this._showExecutionPanel=!this._showExecutionPanel}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}_onCodeEditorValueChange(e){e.stopPropagation(),this.script=e.detail,this.arcgisScriptChange.emit(e.detail)}_insertAsSnippet(e){this._codeEditorElt.value?.insertSnippet(e.detail).catch(console.error)}_insertAsText(e){this._insertText(e.detail)}_insertText(e){this._codeEditorElt.value?.insertText(e).catch(console.error)}_onResultPanelChange(e){this._resultPanel=e.detail}_onExecutionPanelClose(){this._showExecutionPanel=!1}_addExecuteScriptAction(){let e=this.editorInstance?.addAction({id:"run-script",label:"Run Arcade Expression",keybindings:[I.F5],contextMenuGroupId:"code",contextMenuOrder:1,run:()=>{this.testData&&this._executeScript().catch(console.error)}});e&&(this._executeScriptAction=e,this._disposables.push(e))}_disposeSafely(e){let t=this._disposables.indexOf(e);t!==-1&&this._disposables.splice(t,1),e.dispose()}async _updateArcadeAssistantRemoteState(){this.arcadeAssistant&&(this._arcadeAssistantRemoteState=await K({...this.arcadeAssistant,profile:this.profile}))}renderMainActionBar(){return this.testData?i`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .text=${this.messages.run??""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${()=>void this._executeScript().catch(console.error)}></calcite-action>${this._executionResult?i`<calcite-action .text=${this.messages.lastresults??""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>`:null}</calcite-action-group></calcite-action-bar>`:null}renderMainPanel(){return i`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${o.languageId} .value=${this.script??""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${y(this._codeEditorElt)}></arcgis-code-editor>`}renderAction({id:e,label:t,icon:a,active:r,panelName:l,iconFlipRtl:d=!1,onClick:h=this._toggleSidePanel}){return i`<calcite-action id=${e??_} .text=${t} .textEnabled=${this.sideActionBarExpanded} .icon=${a} .active=${r} @click=${h} data-panel-name=${l??_} .iconFlipRtl=${d}></calcite-action>${!this.sideActionBarExpanded&&i`<calcite-tooltip .referenceElement=${e}><span>${t}</span></calcite-tooltip>`||""}`}renderSideActionBar(){return this.hideSideBar?null:i`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${!!this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({id:"profile-variables-action",label:this.messages.profilevariables??"",icon:"profile-variables",active:this.openedSidePanel==="variables",panelName:"variables"})}${this.renderAction({id:"function-action",label:this.messages.constantsandfunctions??"",icon:"function",active:this.openedSidePanel==="api",panelName:"api"})}${this.suggestions?.length?this.renderAction({id:"suggestions-action",label:this.messages.suggestions??"",icon:"lightbulb",active:this.openedSidePanel==="suggestions",panelName:"suggestions"}):null}${this._arcadeAssistantRemoteState.shouldRender&&this.renderAction({id:"arcade-assistant-action",label:this.messages.arcadeassistant??"Arcade assistant",icon:"effects",active:this.openedSidePanel==="arcade-assistant",panelName:"arcade-assistant"})||""}${this.customPanels?.map(e=>e.enabled===!1?null:this.renderAction({id:e.id,label:e.name,icon:e.icon,active:this.openedSidePanel===e.id,panelName:e.id}))}${this.hideDocumentationActions?null:this.renderAction({id:"developer-website-action",label:this.messages.help??"",icon:"question",active:!1,panelName:"none",iconFlipRtl:this.messages._lang==="ar",onClick:this._openArcadeHelp})}</calcite-action-group></calcite-action-bar>`}renderSidePanel(){if(this.hideSideBar)return null;let{openedSidePanel:e}=this;return i`<arcgis-language-api-panel class=${n(e==="api"&&"code-editor-side-panel flex-panel border-inline-start")} .loading=${this._preparingArcade} .apiLibrary=${this._apiLibrary} .hideDocumentationActions=${this.hideDocumentationActions} @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${this._toggleSidePanel} data-panel-name=none .closed=${e!=="api"}></arcgis-language-api-panel><arcgis-editor-variables class=${n(e==="variables"&&"code-editor-side-panel flex-panel border-inline-start")} .loading=${this._preparingArcade} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none .variable=${this._editorProfile} .closed=${e!=="variables"}></arcgis-editor-variables>${this.suggestions?.length&&i`<arcgis-arcade-suggestions class=${n(e==="suggestions"&&"code-editor-side-panel flex-panel border-inline-start")} .closed=${e!=="suggestions"} .suggestions=${this.suggestions} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none></arcgis-arcade-suggestions>`||""}${this.arcadeAssistant&&this._arcadeAssistantRemoteState.shouldRender&&i`<arcgis-arcade-coding-assistant class=${n(e==="arcade-assistant"&&"code-editor-side-panel flex-panel border-inline-start")} .closed=${e!=="arcade-assistant"} .insertText=${this._insertText.bind(this)} .closePanel=${this._toggleSidePanel} .portalUrl=${this.arcadeAssistant.portalUrl} .serviceUrl=${this._arcadeAssistantRemoteState.serviceUrl} .helpBase=${this._arcadeAssistantRemoteState.helpBase} .assistantsEnabled=${this._arcadeAssistantRemoteState.assistantsEnabled} .feedbackServiceUrl=${this._arcadeAssistantRemoteState.feedbackServiceUrl} .editorRef=${this.el} .appVersion=${this.arcadeAssistant.appVersion}></arcgis-arcade-coding-assistant>`||""}${this.customPanels?.map(t=>i`<calcite-flow class=${n(e===t.id?"code-editor-side-panel flex-panel border-inline-start":"hidden")}>${t?.useFlows?t.renderer?.({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this),closed:e!==t.id,editorRef:this.el}):i`<calcite-flow-item .heading=${t.name} heading-level=2 closable .closed=${e!==t.id} @calciteFlowItemClose=${this._toggleSidePanel} .description=${t.description}>${t.renderer?.({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this),closed:e!==t.id,editorRef:this.el})}</calcite-flow-item>`}</calcite-flow>`)}`}renderResultsPanel(){return this._showExecutionPanel?i`<arcgis-arcade-results class="flex-adjustable" .openedResultPanel=${this._resultPanel} .loading=${this._executingScript} .result=${this._executionResult} .consoleLogs=${this._consoleLogs} @arcgisOpenedResultPanelChange=${this._onResultPanelChange} @arcgisClose=${this._onExecutionPanelClose}></arcgis-arcade-results>`:null}render(){return i`${this.renderMainActionBar()}<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable">${this.renderMainPanel()}${this.renderResultsPanel()}</div>${this.renderSidePanel()}${this.renderSideActionBar()}</div>`}};C("arcgis-arcade-editor",b);return b},"identity/IdentityManager",a,b,c,d)
3
+ v5.0.0-next.73 */
4
+ import d from"./RW5V7UG7.js";import{a as T}from"./RSFRE4FJ.js";import c from"./ZRT2WZLK.js";import b from"./34HTM3CX.js";import{a as B}from"./RKGBDCEI.js";import"./7ZI5BJUK.js";import a from"./22625RKF.js";import"./4OFH6ZSH.js";import"./PMNTUV3G.js";import"./JERGWAQK.js";import"./JHP4J2TD.js";import"./7RBKOBAS.js";import"./FQA6EBLW.js";import{D as R,E as y,F as D,G as n,J as C,K as k,g as S,i,k as _,m,r as E,t as w}from"./U6W5P5XI.js";import{a as P}from"./Z4SSLGVN.js";import{Hl as I,kk as z}from"./KQBQ3FU5.js";import"./2OXEX7EB.js";export default $arcgis.t(([N,,{a:L,h:f},o,{a:M,b:F}])=>{z();var O=S`@layer{arcgis-arcade-editor{display:flex;flex-direction:column;position:relative;overflow:hidden;border:var(--arcgis-coding-components-border)!important;box-sizing:border-box;background-color:var(--arcgis-coding-components-background-color);height:100%;.sticky{position:sticky;top:0;z-index:10}.notice-container{margin:var(--calcite-spacing-xxs);padding:var(--calcite-spacing-sm);background-color:var(--calcite-color-foreground-1);text-align:center}.main-action-bar{border-bottom:var(--arcgis-coding-components-border)!important;flex:0 0 auto;calcite-action-group{padding-inline-end:var(--calcite-spacing-sm);calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}arcgis-arcade-results{border-top:var(--arcgis-coding-components-border)!important;box-sizing:border-box;max-height:50%;min-height:50%;margin-bottom:-1px}calcite-flow{[slot=footer]{word-break:break-word}}.hidden{display:none}}}`,H="https://services6.arcgis.com/HXHga6CfMLMBOlBX/ArcGIS/rest/services/survey123_6e349a50b4504ca6b6107216d568db5f_form/FeatureServer/0",V=s=>{let{aiAssistantsEnabled:e}=s;return e===void 0?(console.warn("areAiAssistantsEnabled is not defined in the organizations settings."),!1):e},G=s=>!(!s||!("id"in s)),q=async s=>(await N.getCredential(s)).token;async function K({portalUrl:s,profile:e}){if(!G(e))return console.warn("Arcade assistant addon initialization failed: unsupported profile."),{shouldRender:!1};let t=s.replace(/\/sharing\/rest(\/.*)?$/iu,"").replace(/\/$/u,""),a=await q(s),r=`${t}/sharing/rest/portals/self?f=json&token=${a}`,l=`${t}/sharing/rest/portals/self/settings?f=json&token=${a}`,d=`${t}/sharing/rest/portals/self/signinSettings?f=json&token=${a}`,h=await Promise.allSettled([fetch(r,{credentials:"include"}).then(c=>c.json()),fetch(l,{credentials:"include"}).then(c=>c.json()),fetch(d,{credentials:"include"}).then(c=>c.json())]),[p,g,u]=h,x=p.status==="fulfilled"?p.value:(console.warn("Failed to fetch selfUrl",p.reason),{}),A=g.status==="fulfilled"?g.value:(console.warn("Failed to fetch settingsUrl",g.reason),{}),U=u.status==="fulfilled"?u.value:(console.warn("Failed to fetch signinSettingsUrl",u.reason),{}),$=x?.helperServices?.aiAssistantServices?.url;if(!$)return console.warn("Arcade Assistant service URL is not available in the portal self response."),{shouldRender:!1};let j=x.helpBase||"";if(!A)return console.warn("Arcade Assistant settings response is not available."),{shouldRender:!1};let v=V(A);return U.blockBetaApps===!0&&(console.warn("Arcade Assistant is blocked by the organization settings. To enable it, do not block beta apps in the organization settings."),v=!1),{shouldRender:!0,serviceUrl:$,helpBase:j,assistantsEnabled:v,feedbackServiceUrl:H}}var b=class extends D{constructor(){super(...arguments),this._codeEditorElt=R(),this._componentReadyDefer=new P,this._disposables=[],this._editorProfilePromise=Promise.resolve(void 0),this.messages=B(),this._modelId=E(),this._openArcadeHelp=()=>void window.open(L,"Arcade Help"),this._toggleSidePanel=e=>{if(!e.target)return;let t=e.target?.dataset.panelName??"none";this.openedSidePanel=t===this.openedSidePanel?"none":t,this.openedSidePanel==="none"&&this._codeEditorElt.value?.setFocus().catch(console.error)},this._consoleLogs=[],this._executingScript=!1,this._preparingArcade=!1,this._resultPanel="output",this._showExecutionPanel=!1,this._arcadeAssistantRemoteState={shouldRender:!1},this.hideDocumentationActions=!1,this.hideSideBar=!1,this.openedSidePanel="none",this.script="",this.sideActionBarExpanded=!1,this.arcgisDiagnosticsChange=m({bubbles:!1}),this.arcgisScriptChange=m({bubbles:!1})}static{this.properties={_apiLibrary:16,_consoleLogs:16,_editorProfile:16,_executingScript:16,_executionResult:16,_preparingArcade:16,_resultPanel:16,_showExecutionPanel:16,_arcadeAssistantRemoteState:16,editorInstance:32,editorOptions:0,hideDocumentationActions:5,hideSideBar:5,openedSidePanel:2,profile:0,script:1,sideActionBarExpanded:7,snippets:0,suggestions:0,testData:0,customPanels:0,arcadeAssistant:0}}static{this.shadowRootOptions=w}static{this.styles=[O,T]}get editorInstance(){return this._codeEditorElt.value?.editorInstance}async getEditorInstance(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.editorInstance}async getScript(){return await this._componentReadyDefer.promise,this._codeEditorElt.value?.value}async getTestResult(){if(!this.testData)return{type:"error",value:"Missing test data",error:null};let e=await this._editorProfilePromise;if(!e)return{type:"error",value:"Missing editor profile",error:null};await this._componentReadyDefer.promise;let t=this._codeEditorElt.value?.value;return await f(e.definition,t,this.testData)}async setFocus(){await this._componentReadyDefer.promise,await this._codeEditorElt.value?.setFocus()}async load(){let e=k("./assets");M(e),await this._updateDataModelDeps(),await this._updateArcadeAssistantRemoteState()}willUpdate(e){(e.has("messages")||e.has("profile"))&&this.hasUpdated&&this._updateDataModelDeps(),e.has("testData")&&this._testDataChanged(),e.has("snippets")&&o.updateApiContextForModel(this._modelId,{snippets:this.snippets}),e.has("arcadeAssistant")&&this._updateArcadeAssistantRemoteState()}async loaded(){this._componentReadyDefer.resolve(),await this._updateApiLibrary();let e=await F();this._disposables.push(e.onDiagnosticsChange(t=>!this._preparingArcade&&this.arcgisDiagnosticsChange.emit(t.diagnostics))),this.testData&&this._addExecuteScriptAction()}disconnectedCallback(){for(super.disconnectedCallback();this._disposables.length;)this._disposables.pop()?.dispose()}async _updateDataModelDeps(){await this._updateEditorProfile(),await this._updateApiLibrary()}_testDataChanged(){!this.testData&&this._executeScriptAction&&(this._disposeSafely(this._executeScriptAction),this._executeScriptAction=void 0),this.testData&&!this._executeScriptAction&&this._addExecuteScriptAction(),this._showExecutionPanel&&this._executeScript().catch(console.error)}async _updateEditorProfile(){this._preparingArcade=!0;try{await o.setProfileForModel(this._modelId,this.profile,{locale:this.messages._t9nLocale,snippets:this.snippets}),this._editorProfile=o.getEditorProfileForModel(this._modelId)}catch{this._editorProfile=void 0}finally{this._editorProfilePromise=Promise.resolve(this._editorProfile),this._preparingArcade=!1}}async _updateApiLibrary(){this._apiLibrary=await o.getApiLibraryForModel(this._modelId)}async _executeScript(){let e=this.testData;if(!this._codeEditorElt.value||!e)return;let t=await this._editorProfilePromise;if(!t){this._executionResult={type:"error",value:"Missing editor profile",error:null};return}this._showExecutionPanel=!0,this._executingScript=!0,this._consoleLogs=[],setTimeout(()=>void(async()=>{let a=this._codeEditorElt.value?.value;this._executionResult=await f(t.definition,a,e,r=>setTimeout(()=>this._consoleLogs=[...this._consoleLogs,r],0)),this._executingScript=!1})(),0)}_toggleShowExecutionPanel(){this._showExecutionPanel=!this._showExecutionPanel}_toggleSideActionBarExpanded(){this.sideActionBarExpanded=!this.sideActionBarExpanded}_onCodeEditorValueChange(e){e.stopPropagation(),this.script=e.detail,this.arcgisScriptChange.emit(e.detail)}_insertAsSnippet(e){this._codeEditorElt.value?.insertSnippet(e.detail).catch(console.error)}_insertAsText(e){this._insertText(e.detail)}_insertText(e){this._codeEditorElt.value?.insertText(e).catch(console.error)}_onResultPanelChange(e){this._resultPanel=e.detail}_onExecutionPanelClose(){this._showExecutionPanel=!1}_addExecuteScriptAction(){let e=this.editorInstance?.addAction({id:"run-script",label:"Run Arcade Expression",keybindings:[I.F5],contextMenuGroupId:"code",contextMenuOrder:1,run:()=>{this.testData&&this._executeScript().catch(console.error)}});e&&(this._executeScriptAction=e,this._disposables.push(e))}_disposeSafely(e){let t=this._disposables.indexOf(e);t!==-1&&this._disposables.splice(t,1),e.dispose()}async _updateArcadeAssistantRemoteState(){this.arcadeAssistant&&(this._arcadeAssistantRemoteState=await K({...this.arcadeAssistant,profile:this.profile}))}renderMainActionBar(){return this.testData?i`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled><calcite-action-group scale=s><calcite-action .text=${this.messages.run??""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${()=>void this._executeScript().catch(console.error)}></calcite-action>${this._executionResult?i`<calcite-action .text=${this.messages.lastresults??""} .active=${this._showExecutionPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>`:null}</calcite-action-group></calcite-action-bar>`:null}renderMainPanel(){return i`<arcgis-code-editor class="flex-adjustable" .editorOptions=${this.editorOptions} .language=${o.languageId} .value=${this.script??""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${y(this._codeEditorElt)}></arcgis-code-editor>`}renderAction({id:e,label:t,icon:a,active:r,panelName:l,iconFlipRtl:d=!1,onClick:h=this._toggleSidePanel}){return i`<calcite-action id=${e??_} .text=${t} .textEnabled=${this.sideActionBarExpanded} .icon=${a} .active=${r} @click=${h} data-panel-name=${l??_} .iconFlipRtl=${d}></calcite-action>${!this.sideActionBarExpanded&&i`<calcite-tooltip .referenceElement=${e}><span>${t}</span></calcite-tooltip>`||""}`}renderSideActionBar(){return this.hideSideBar?null:i`<calcite-action-bar class="side-action-bar border-inline-start" .expanded=${!!this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({id:"profile-variables-action",label:this.messages.profilevariables??"",icon:"profile-variables",active:this.openedSidePanel==="variables",panelName:"variables"})}${this.renderAction({id:"function-action",label:this.messages.constantsandfunctions??"",icon:"function",active:this.openedSidePanel==="api",panelName:"api"})}${this.suggestions?.length?this.renderAction({id:"suggestions-action",label:this.messages.suggestions??"",icon:"lightbulb",active:this.openedSidePanel==="suggestions",panelName:"suggestions"}):null}${this._arcadeAssistantRemoteState.shouldRender&&this.renderAction({id:"arcade-assistant-action",label:this.messages.arcadeassistant??"Arcade assistant",icon:"effects",active:this.openedSidePanel==="arcade-assistant",panelName:"arcade-assistant"})||""}${this.customPanels?.map(e=>e.enabled===!1?null:this.renderAction({id:e.id,label:e.name,icon:e.icon,active:this.openedSidePanel===e.id,panelName:e.id}))}${this.hideDocumentationActions?null:this.renderAction({id:"developer-website-action",label:this.messages.help??"",icon:"question",active:!1,panelName:"none",iconFlipRtl:this.messages._lang==="ar",onClick:this._openArcadeHelp})}</calcite-action-group></calcite-action-bar>`}renderSidePanel(){if(this.hideSideBar)return null;let{openedSidePanel:e}=this;return i`<arcgis-language-api-panel class=${n(e==="api"&&"code-editor-side-panel flex-panel border-inline-start")} .loading=${this._preparingArcade} .apiLibrary=${this._apiLibrary} .hideDocumentationActions=${this.hideDocumentationActions} @arcgisItemSelected=${this._insertAsSnippet} @arcgisClose=${this._toggleSidePanel} data-panel-name=none .closed=${e!=="api"}></arcgis-language-api-panel><arcgis-editor-variables class=${n(e==="variables"&&"code-editor-side-panel flex-panel border-inline-start")} .loading=${this._preparingArcade} .modelId=${this._modelId} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none .variable=${this._editorProfile} .closed=${e!=="variables"}></arcgis-editor-variables>${this.suggestions?.length&&i`<arcgis-arcade-suggestions class=${n(e==="suggestions"&&"code-editor-side-panel flex-panel border-inline-start")} .closed=${e!=="suggestions"} .suggestions=${this.suggestions} @arcgisItemSelected=${this._insertAsText} @arcgisClose=${this._toggleSidePanel} data-panel-name=none></arcgis-arcade-suggestions>`||""}${this.arcadeAssistant&&this._arcadeAssistantRemoteState.shouldRender&&i`<arcgis-arcade-coding-assistant class=${n(e==="arcade-assistant"&&"code-editor-side-panel flex-panel border-inline-start")} .closed=${e!=="arcade-assistant"} .insertText=${this._insertText.bind(this)} .closePanel=${this._toggleSidePanel} .portalUrl=${this.arcadeAssistant.portalUrl} .serviceUrl=${this._arcadeAssistantRemoteState.serviceUrl} .helpBase=${this._arcadeAssistantRemoteState.helpBase} .assistantsEnabled=${this._arcadeAssistantRemoteState.assistantsEnabled} .feedbackServiceUrl=${this._arcadeAssistantRemoteState.feedbackServiceUrl} .editorRef=${this.el} .appVersion=${this.arcadeAssistant.appVersion}></arcgis-arcade-coding-assistant>`||""}${this.customPanels?.map(t=>i`<calcite-flow class=${n(e===t.id?"code-editor-side-panel flex-panel border-inline-start":"hidden")}>${t?.useFlows?t.renderer?.({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this),closed:e!==t.id,editorRef:this.el}):i`<calcite-flow-item .heading=${t.name} heading-level=2 closable .closed=${e!==t.id} @calciteFlowItemClose=${this._toggleSidePanel} .description=${t.description}>${t.renderer?.({closePanel:this._toggleSidePanel,insertText:this._insertText.bind(this),closed:e!==t.id,editorRef:this.el})}</calcite-flow-item>`}</calcite-flow>`)}`}renderResultsPanel(){return this._showExecutionPanel?i`<arcgis-arcade-results class="flex-adjustable" .openedResultPanel=${this._resultPanel} .loading=${this._executingScript} .result=${this._executionResult} .consoleLogs=${this._consoleLogs} @arcgisOpenedResultPanelChange=${this._onResultPanelChange} @arcgisClose=${this._onExecutionPanelClose}></arcgis-arcade-results>`:null}render(){return i`${this.renderMainActionBar()}<div class="flex-row flex-adjustable"><div class="flex-column flex-adjustable">${this.renderMainPanel()}${this.renderResultsPanel()}</div>${this.renderSidePanel()}${this.renderSideActionBar()}</div>`}};C("arcgis-arcade-editor",b);return b},"identity/IdentityManager",a,b,c,d)
@@ -1,4 +1,4 @@
1
1
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
2
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.71 */
4
- import{Fl as a,Gl as b,Hl as c,Il as d,Jl as e,Kl as f,Ll as g,Ml as h,Nl as i,Ol as j,Pl as k,Ql as l,Rl as m,Sl as n}from"./5LJ3WHGE.js";import"./3UASBQYO.js";export{a as CancellationTokenSource,b as Emitter,c as KeyCode,d as KeyMod,i as MarkerSeverity,j as MarkerTag,e as Position,f as Range,g as Selection,h as SelectionDirection,l as Token,k as Uri,m as editor,n as languages};
3
+ v5.0.0-next.73 */
4
+ import{Fl as a,Gl as b,Hl as c,Il as d,Jl as e,Kl as f,Ll as g,Ml as h,Nl as i,Ol as j,Pl as k,Ql as l,Rl as m,Sl as n}from"./KQBQ3FU5.js";import"./2OXEX7EB.js";export{a as CancellationTokenSource,b as Emitter,c as KeyCode,d as KeyMod,i as MarkerSeverity,j as MarkerTag,e as Position,f as Range,g as Selection,h as SelectionDirection,l as Token,k as Uri,m as editor,n as languages};