@arcgis/coding-components 5.0.0-next.94 → 5.0.0-next.96

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 (138) hide show
  1. package/dist/addons.js +26 -25
  2. package/dist/cdn/23PDSGPR.js +14 -0
  3. package/dist/cdn/{W3I4P6B2.js → 2IHT4EHN.js} +1 -1
  4. package/dist/cdn/{B5GJ3P5G.js → 2MJ3LNJG.js} +2 -2
  5. package/dist/cdn/3EIGQ66V.js +6 -0
  6. package/dist/cdn/{C7S7FIMX.js → 3TJXZ4VM.js} +2 -2
  7. package/dist/cdn/{A5WEEHGM.js → 4XOVY2PR.js} +2 -2
  8. package/dist/cdn/{KLR2TH2U.js → 74HYZGLA.js} +2 -2
  9. package/dist/cdn/{UYCZT4PR.js → 7MZAZXK6.js} +2 -2
  10. package/dist/cdn/{24A2GMXS.js → ALOCWFFI.js} +2 -2
  11. package/dist/cdn/{R5L3UDPZ.js → ATN3CPT7.js} +2 -2
  12. package/dist/cdn/{UYYBSWI5.js → CFWTHL36.js} +2 -2
  13. package/dist/cdn/{NCWCEJ4H.js → CL75QVV7.js} +1 -1
  14. package/dist/cdn/CZVOOL7Z.js +4 -0
  15. package/dist/cdn/{FL7A5ZFN.js → DHGFCLAZ.js} +2 -2
  16. package/dist/cdn/{YAFEASDQ.js → E2DG62ZU.js} +3 -3
  17. package/dist/cdn/{RDOPAVSY.js → EGHYNAYE.js} +1 -1
  18. package/dist/cdn/{WZBQ3LI4.js → FKCQQTH6.js} +2 -2
  19. package/dist/cdn/{IOYAZ7XQ.js → H7K3SILV.js} +2 -2
  20. package/dist/cdn/{6HA5DFLF.js → HQT5JM76.js} +1 -1
  21. package/dist/cdn/{JSQ46V4B.js → JHGOFJEK.js} +2 -2
  22. package/dist/cdn/{YGMFTUQQ.js → JP6SZ4AZ.js} +1 -1
  23. package/dist/cdn/K7DUQYV7.js +4 -0
  24. package/dist/cdn/{KMR6BDYB.js → KJ5IPWOF.js} +2 -2
  25. package/dist/cdn/KNRXKMFC.js +4 -0
  26. package/dist/cdn/KPDZ6444.js +4 -0
  27. package/dist/cdn/{TTNKFUSY.js → LKJPHOMR.js} +2 -2
  28. package/dist/cdn/LTDEFINS.js +4 -0
  29. package/dist/cdn/{45RYMSYG.js → MY2WCV66.js} +2 -2
  30. package/dist/cdn/{CL5UX33P.js → MYCHXXED.js} +2 -2
  31. package/dist/cdn/{2YVIARN5.js → N4YKPCZU.js} +2 -2
  32. package/dist/cdn/P5LNJNN6.js +4 -0
  33. package/dist/cdn/{V6ZXLVEU.js → PWKEJCJP.js} +2 -2
  34. package/dist/cdn/QLFIDEKK.js +6 -0
  35. package/dist/cdn/QSIYBJ46.js +4 -0
  36. package/dist/cdn/{FQGB2RRB.js → RRLS2TOQ.js} +2 -2
  37. package/dist/cdn/TBXTOKU6.js +4 -0
  38. package/dist/cdn/{5WHTEHPM.js → TWGO77FS.js} +2 -2
  39. package/dist/cdn/{CBWWEN4S.js → TZB4YFKZ.js} +1 -1
  40. package/dist/cdn/UGKWIQHT.js +4 -0
  41. package/dist/cdn/{Z3ZSRJMV.js → VD3QVBSU.js} +2 -2
  42. package/dist/cdn/{UHQMWHSA.js → VOUYQ4DG.js} +1 -1
  43. package/dist/cdn/{JUKZO7ZY.js → WOSGVDYX.js} +2 -2
  44. package/dist/cdn/{IKQMRUER.js → WQXADMUM.js} +2 -2
  45. package/dist/cdn/WVCBT3G6.js +4 -0
  46. package/dist/cdn/{H2A4L7G6.js → WXP3C3JC.js} +2 -2
  47. package/dist/cdn/{SNLDOFIP.js → XCK3XVPS.js} +2 -2
  48. package/dist/cdn/{NVZTZU3Q.js → XYPRW4OO.js} +2 -2
  49. package/dist/cdn/{E5NOGZC7.js → ZI2PMS6G.js} +2 -2
  50. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ar.json +1 -1
  51. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.bg.json +1 -1
  52. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.bs.json +1 -1
  53. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ca.json +1 -1
  54. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.cs.json +1 -1
  55. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.da.json +1 -1
  56. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.de.json +1 -1
  57. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.el.json +1 -1
  58. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.es.json +1 -1
  59. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.et.json +1 -1
  60. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.fi.json +1 -1
  61. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.fr.json +1 -1
  62. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.he.json +1 -1
  63. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.hr.json +1 -1
  64. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.hu.json +1 -1
  65. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.id.json +1 -1
  66. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.it.json +1 -1
  67. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ja.json +1 -1
  68. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ko.json +1 -1
  69. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.lt.json +1 -1
  70. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.lv.json +1 -1
  71. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.nl.json +1 -1
  72. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.no.json +1 -1
  73. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.pl.json +1 -1
  74. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.pt-BR.json +1 -1
  75. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.pt-PT.json +1 -1
  76. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ro.json +1 -1
  77. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.ru.json +1 -1
  78. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.sk.json +1 -1
  79. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.sl.json +1 -1
  80. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.sr.json +1 -1
  81. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.sv.json +1 -1
  82. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.th.json +1 -1
  83. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.tr.json +1 -1
  84. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.uk.json +1 -1
  85. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.vi.json +1 -1
  86. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.zh-CN.json +1 -1
  87. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.zh-HK.json +1 -1
  88. package/dist/cdn/assets/arcade-coding-assistant/t9n/messages.zh-TW.json +1 -1
  89. package/dist/cdn/assets/code-editor/sql-expr.worker.js +760 -758
  90. package/dist/cdn/index.js +2 -2
  91. package/dist/chunks/arcade-contribution.js +1 -1
  92. package/dist/chunks/arcade-defaults.js +1 -1
  93. package/dist/chunks/arcade-executor.js +1 -1
  94. package/dist/chunks/arcade-mode.js +55 -54
  95. package/dist/chunks/arcade-service-accessors.js +1 -1
  96. package/dist/chunks/colorize.js +1 -1
  97. package/dist/chunks/editor.js +1 -1
  98. package/dist/chunks/fields.js +1 -1
  99. package/dist/chunks/language-defaults-base.js +203 -202
  100. package/dist/chunks/markdown.js +1 -1
  101. package/dist/chunks/monaco-importer.js +1 -1
  102. package/dist/chunks/monaco-theme.js +1 -1
  103. package/dist/chunks/runtime.js +1 -1
  104. package/dist/chunks/sql-expr-defaults.js +1 -1
  105. package/dist/chunks/sql-expr-mode.js +67 -66
  106. package/dist/chunks/sql-expr-service-accessors.js +1 -1
  107. package/dist/chunks/useT9n.js +1 -1
  108. package/dist/chunks/utilities.js +1 -1
  109. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +5 -5
  110. package/dist/components/arcgis-arcade-editor/customElement.js +67 -65
  111. package/dist/components/arcgis-arcade-results/customElement.js +1 -1
  112. package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
  113. package/dist/components/arcgis-code-editor/customElement.js +1 -1
  114. package/dist/components/arcgis-code-viewer/customElement.js +15 -14
  115. package/dist/components/arcgis-editor-variables/customElement.js +10 -9
  116. package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
  117. package/dist/components/arcgis-sql-expression-editor/customElement.js +22 -21
  118. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  119. package/dist/docs/api.json +2 -2
  120. package/dist/docs/docs.json +2 -2
  121. package/dist/docs/web-types.json +1 -1
  122. package/dist/index.js +1 -1
  123. package/dist/loader.js +1 -1
  124. package/dist/monacoStyles.js +1 -1
  125. package/package.json +5 -5
  126. package/dist/cdn/3OHWJOMD.js +0 -4
  127. package/dist/cdn/6ROKBSGI.js +0 -4
  128. package/dist/cdn/75OSZZJF.js +0 -4
  129. package/dist/cdn/A6DSFADQ.js +0 -4
  130. package/dist/cdn/APXINRPI.js +0 -4
  131. package/dist/cdn/BQJBSDM2.js +0 -4
  132. package/dist/cdn/BQNN5XLA.js +0 -6
  133. package/dist/cdn/CUL2JAK4.js +0 -14
  134. package/dist/cdn/FNP2QIRS.js +0 -4
  135. package/dist/cdn/GNLRKAD5.js +0 -6
  136. package/dist/cdn/M5VQUFXO.js +0 -4
  137. package/dist/cdn/X2UROQYS.js +0 -4
  138. package/dist/cdn/XQ7S4CXK.js +0 -4
package/dist/addons.js CHANGED
@@ -1,8 +1,9 @@
1
- import { html as b } from "lit";
1
+ import { html as w } from "lit";
2
+ import { log as o } from "@arcgis/toolkit/log";
2
3
  /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
4
  See https://js.arcgis.com/5.0/esri/copyright.txt for details.
4
- v5.0.0-next.94 */
5
- const m = [
5
+ v5.0.0-next.96 */
6
+ const A = [
6
7
  "popup",
7
8
  "popup-element",
8
9
  "visualization",
@@ -10,43 +11,43 @@ const m = [
10
11
  "aggregate-field",
11
12
  "popup-feature-reduction",
12
13
  "popup-voxel"
13
- ], w = (e) => {
14
- const s = m.includes(e);
15
- return s || console.warn(`Profile "${e}" is not supported by the Arcade Coding Assistant.`), s;
16
- }, A = (e) => {
14
+ ], r = "Arcade Coding Assistant", v = (e) => {
15
+ const s = A.includes(e);
16
+ return s || o("warn", r, `Profile "${e}" is not supported.`), s;
17
+ }, T = (e) => {
17
18
  const { aiAssistantsEnabled: s } = e;
18
- return s === void 0 ? (console.warn("areAiAssistantsEnabled is not defined in the organizations settings."), !1) : !!s;
19
- }, v = () => typeof globalThis < "u" && "$arcgis" in globalThis && typeof globalThis.$arcgis == "object" && "import" in globalThis.$arcgis && !("forceESM" in globalThis.$arcgis), T = async (e) => v() ? (await (await globalThis.$arcgis.import("@arcgis/core/identity/IdentityManager.js")).getCredential(e))?.token || "" : (await (await import("@arcgis/core/identity/IdentityManager.js")).default.getCredential(e)).token || "";
20
- async function E({ portalUrl: e, profileId: s, feedbackServiceUrl: n, appVersion: o, panelName: r }) {
19
+ return s === void 0 ? (o("warn", r, "`areAiAssistantsEnabled` is not defined in the organization's settings."), !1) : !!s;
20
+ }, k = () => typeof globalThis < "u" && "$arcgis" in globalThis && typeof globalThis.$arcgis == "object" && "import" in globalThis.$arcgis && !("forceESM" in globalThis.$arcgis), E = async (e) => k() ? (await (await globalThis.$arcgis.import("@arcgis/core/identity/IdentityManager.js")).getCredential(e))?.token || "" : (await (await import("@arcgis/core/identity/IdentityManager.js")).default.getCredential(e)).token || "";
21
+ async function y({ portalUrl: e, profileId: s, feedbackServiceUrl: n, appVersion: c, panelName: l }) {
21
22
  if (!customElements.get("arcgis-arcade-coding-assistant"))
22
23
  throw new Error("arcgis-arcade-coding-assistant component is not registered. Please ensure the component is imported from @arcgis/coding-components.");
23
- const i = await T(e), c = `${e}/sharing/rest/portals/self?f=json&token=${i}`, l = `${e}/sharing/rest/portals/self/settings?f=json&token=${i}`, [a, d] = await Promise.all([
24
- fetch(c, { credentials: "include" }).then((t) => t.json()),
25
- fetch(l, { credentials: "include" }).then((t) => t.json())
26
- ]), g = a?.helperServices?.aiAssistantServices?.url, p = a.helpBase, u = A(d);
24
+ const i = await E(e), d = `${e}/sharing/rest/portals/self?f=json&token=${i}`, g = `${e}/sharing/rest/portals/self/settings?f=json&token=${i}`, [a, p] = await Promise.all([
25
+ fetch(d, { credentials: "include" }).then((t) => t.json()),
26
+ fetch(g, { credentials: "include" }).then((t) => t.json())
27
+ ]), f = a?.helperServices?.aiAssistantServices?.url, u = a.helpBase, h = T(p);
27
28
  return {
28
- enabled: w(s),
29
+ enabled: v(s),
29
30
  id: "arcade-assistant",
30
- name: r,
31
+ name: l,
31
32
  icon: "effects",
32
33
  useFlows: !0,
33
34
  location: "sidebar",
34
- renderer: ({ closePanel: t, insertText: f, closed: h, editorRef: $ }) => b`
35
+ renderer: ({ closePanel: t, insertText: $, closed: m, editorRef: b }) => w`
35
36
  <arcgis-arcade-coding-assistant
36
37
  .portalUrl=${e}
37
- .serviceUrl=${g}
38
+ .serviceUrl=${f}
38
39
  .feedbackServiceUrl=${n}
39
40
  .closePanel=${t}
40
- .insertText=${f}
41
- .closed=${h}
42
- .editorRef=${$}
43
- .appVersion=${o}
44
- .helpBase=${p}
45
- ?assistants-enabled=${u}
41
+ .insertText=${$}
42
+ .closed=${m}
43
+ .editorRef=${b}
44
+ .appVersion=${c}
45
+ .helpBase=${u}
46
+ ?assistants-enabled=${h}
46
47
  ></arcgis-arcade-coding-assistant>
47
48
  `
48
49
  };
49
50
  }
50
51
  export {
51
- E as useArcadeAssistant
52
+ y as useArcadeAssistant
52
53
  };
@@ -0,0 +1,14 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.96 */
4
+ import{a as X,b as Y,c as Z,d as f,e as y}from"./HQT5JM76.js";import{b as Q}from"./WXP3C3JC.js";import{a as ee}from"./E2DG62ZU.js";import{b as S,c as v,d as F,e as J}from"./EGHYNAYE.js";import{i as H}from"./KNRXKMFC.js";import{L as z,r as B,t as $}from"./QLFIDEKK.js";import{c as u}from"./WVCBT3G6.js";import{Gl as A,Pl as L}from"./MY2WCV66.js";export default $arcgis.t(([T,me,be,ge,we,{getDeclaredVoxelMembers:Ce,getDeclaredPixelMembers:De}])=>{var j=t=>t!==void 0,x=t=>t!==null;function pe(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&typeof t.declaredClass=="string"&&t.declaredClass.startsWith("esri.layers.")&&M(t)&&"queryFeatures"in t&&typeof t.queryFeatures=="function"}function ce(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&typeof t.declaredClass=="string"&&(t.declaredClass==="esri.Map"||t.declaredClass==="esri.WebMap"||t.declaredClass==="esri.WebScene")}function Se(t){return!!t&&typeof t=="object"&&"loadAll"in t&&typeof t.loadAll=="function"}function ue(t){return!!t&&typeof t=="object"&&"portalItem"in t&&t.portalItem!=null}function he(t){return!!t&&typeof t=="object"&&"portalItem"in t&&t.portalItem!=null}function M(t){return!!t&&typeof t=="object"&&"fields"in t&&Array.isArray(t.fields)}function V(t){return!!t&&typeof t=="object"&&"url"in t&&typeof t.url=="string"}function ve(t){return V(t)&&/\/(?:featureserver|mapserver)(?:\/|$)/iu.test(t.url??"")}function de(t){return V(t)||M(t)||he(t)}function rt(t){return de(t)&&"type"in t&&t.type==="voxel"}function st(t){return de(t)&&"type"in t&&(t.type==="imagery"||t.type==="imagery-tile")}function nt(t){return V(t)||M(t)||he(t)}function ot(t){return ue(t)||ce(t)||ve(t)}function te(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.Subtype"}function E(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.CodedValueDomain"}function Fe(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.InheritedDomain"}function at(t){return!!t&&typeof t=="object"&&"id"in t&&typeof t.id=="string"&&"definitions"in t&&typeof t.definitions=="object"&&!Array.isArray(t.definitions)}function d(t){return!!t&&typeof t=="object"&&"title"in t&&typeof t.title=="string"}function xe(t){return!!t&&typeof t=="object"&&"url"in t&&typeof t.url=="string"}function fe(t){return!!t&&typeof t=="object"&&"layerId"in t&&typeof t.layerId=="number"}function N(t){return!!t&&typeof t=="object"&&"typeIdField"in t&&"types"in t}function ie(t){return!!t&&typeof t=="object"&&"getFieldDomain"in t&&typeof t.getFieldDomain=="function"}function _(t){return!!t&&typeof t=="object"&&"subtypeField"in t}function Te(t){return _(t)&&"subtypes"in t}function Ie(t){return!!t&&typeof t=="object"&&"portalItem"in t}function Pe(t){return fe(t)&&"relationships"in t&&"url"in t&&Array.isArray(t.relationships)&&typeof t.url=="string"}function Me(t){return!!t&&typeof t=="object"&&"isTable"in t&&typeof t.isTable=="boolean"}function Ve(t){if(t&&typeof t=="object"){if(Me(t))return t.isTable||"type"in t&&t.type==="table";if("geometryType"in t)return t.geometryType===""||t.geometryType==="esriGeometryNull"||t.geometryType===null}return!1}function $e(t){return!Ve(t)}function Ae(t){return!!t&&typeof t=="object"&&"load"in t&&typeof t.load=="function"}function Le(t){return!!t&&typeof t=="object"&&"type"in t&&t.type==="voxel"}function re(t){return!!t&&typeof t=="object"&&"type"in t&&typeof t.type=="string"&&["imagery","imagery-tile"].includes(t.type)}async function ye(t){if(!t)return null;let e;return M(t)?e=t:e=new T(t),Ae(e)&&await e.load(),e}async function je(t){t+="/layers";let e=await me(t,{responseType:"json",query:{f:"json"}}),i=t.endsWith("MapServer/layers")?"data":"query",r=se(e.data?.layers,i),s=se(e.data?.tables,i);return{layers:r,tables:s}}function se(t,e){return t?t.filter(i=>{switch(i.type){case"Feature Layer":case"Oriented Imagery Layer":case"Catalog Layer":case"Table":return(i.capabilities?i.capabilities.toLowerCase().split(",").map(r=>r.trim()):[]).includes(e);default:return!1}}):[]}async function Ee(t,e){let i=new T({url:`${t.url}/${e.relatedTableId}`});return await i.load(),i}function O(t){return(e,i)=>{if(e.type==="oid")return-1;if(i.type==="oid")return 1;if(_(t)){if(e.name===t.subtypeField)return-1;if(i.name===t.subtypeField)return 1}if(N(t)){if(e.name===t.typeIdField)return-1;if(i.name===t.typeIdField)return 1}return e.name.localeCompare(i.name,"en",{sensitivity:"base"})}}function ne(t,e){return t?.every(i=>i.domains?.[e.name]?.type==="inherited")??!1}var Ne=/^[a-z_$][a-z0-9_$]*$/giu;function K(t,e=!0){return t.match(Ne)?`${e?".":""}${t}`:`["${t}"]`}function _e(t,e){return t?`${t}${K(e)}`:e}function oe(t){return Ie(t)?t.portalItem:null}function lt(t,e,i=!1){let r=e,s=[],o=[];return f(t).forEach(n=>{r&&(r+=`
5
+
6
+ `),r+=`**${n.name}** (${n.alias})
7
+ ${n.type}`,n.description&&(r+=`
8
+ '${n.description}`);let h=Z(n),c=K(n.name,!1),p=y(n);if(s.push({name:n.name,description:p,type:h,completion:{label:n.name,detail:p,insertText:c,insertTextMode:F.asIs,insertTextFormat:v.PlainText,kind:S.Field}}),i){if(!n.alias||n.alias.toLowerCase()===n.name.toLowerCase())return;let D=`**${n.alias}**
9
+ ${n.type}`;n.description&&(D+=`
10
+ '${n.description}`),o.push({name:n.alias,description:n.name,type:h,completion:{label:n.alias,detail:n.name,insertText:c,insertTextMode:F.asIs,insertTextFormat:v.PlainText,kind:S.Field,documentation:{kind:"markdown",value:D}}})}}),[[...s,...o],r]}function pt(t,e){let i=e,r=[];return t.forEach(s=>{i&&(i+=`
11
+
12
+ `),i+=`**${s.name}**
13
+ ${s.type}`,s.name&&(i+=`
14
+ '${s.name}`),r.push({name:s.name,description:s.name,type:"array",completion:{label:s.name,detail:s.name,insertText:K(s.name,!1),insertTextMode:F.asIs,insertTextFormat:v.PlainText,kind:S.Field}})}),[r,i]}var I=class{constructor(e,i,r){this._profile=e,this._label=i,this.description=r,this.filterDescription=!1}getLabel(){return this._label==null?"":typeof this._label=="string"?B(this._label):$(this._profile?.intlStrings[this._label.code],this._label.formatValues)}getDescription(){return this.description==null?"":typeof this.description=="string"?this.description:$(this._profile?.intlStrings[this.description.code],this.description.formatValues)}passFilter(e){return!e||e.test(this.getLabel())?!0:this.filterDescription&&e.test(this.getDescription())}},m=class extends I{constructor(e){super(e.profile,e.label,e.description??e.declaration?.description),this.declaration=e.declaration??{},this.name=e.declaration?.name??"",this.snippet=e.snippet??"",this.nonInteractive=e.nonInteractive??!1,this.filterDescription=e.filterDescription??!1,this.icon=e.icon}},a=class extends m{constructor(e){super(e),this.type="text",this.isCollection=!1,this.type=e.declaration?.type??"text"}getDescription(){return this.description==null?this._profile?.intlStrings[this.type.toLowerCase()]??"":super.getDescription()}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration}}},G=class extends m{constructor(e){super(e),this.type="array",this.isCollection=!1,this.elementType=e.declaration?.elementType??{type:"number",name:"number"}}getDescription(){return this.description==null?this._profile?.intlStrings[this.type.toLowerCase()]??"":super.getDescription()}toProfileVariableDefinition(){return{type:this.type,elementType:this.elementType,name:"",...this.declaration}}},b=class extends m{constructor(e,i){super(i),this.owner=e,this.isCollection=!0,this._loaded=!0,this.variables=[]}get breadcrumb(){if(this.owner){let e=this.owner.breadcrumb;return e?`${e} / ${this.name}`:this.name}return this.name}get loaded(){return this._loaded}get informationUrl(){return null}get informationType(){return""}},l=class extends I{constructor(e,i,r=[],s=!1){super(e,i),this.variables=r,this.isHeader=s,this.type="group",this.isCollection=!0}passFilter(){return!0}},g=class t extends b{constructor(e,i){super(e,i),this.type="dictionary",this.dictionaryVariables=[],this.loadPropertyDeclarations(i.declaration?.properties),this.snippet&&this.dictionaryVariables.length&&(this.variables=[new l(this._profile,this.snippet,this.dictionaryVariables)])}async loadSource(){}loadPropertyDeclarations(e){this.dictionaryVariables=this.createVariableInstances(e),this.variables=this.dictionaryVariables}createVariableInstances(e){if(!Array.isArray(e))return[];let i=[];return e.forEach(r=>{let s=this.createVariableInstance(r);s&&i.push(s)}),i}createVariableInstance(e){let i=_e(this.snippet,e.name);switch(e.type){case"number":case"text":case"boolean":case"date":case"dateOnly":case"time":case"geometry":case"knowledgeGraph":return new a({profile:this._profile,declaration:e,label:i,snippet:i});case"pixel":return new k(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"voxel":return new U(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"feature":return new W(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"featureSet":return new C(this,{profile:this._profile,declaration:e,label:i,snippet:i},[new a({profile:this._profile,label:i,description:"",snippet:i})]);case"featureSetCollection":return new R(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"dictionary":return new t(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"array":return new G({profile:this._profile,declaration:e,label:i,snippet:i});default:return u("error","Editor profile","Invalid profile variable",{detail:{declaration:e}}),null}}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration,properties:this.dictionaryVariables.map(e=>e.toProfileVariableDefinition())}}},P=class extends b{constructor(e,i,r){super(e,i),this.relationshipsProperties=r,this._source=null,this._loaded=!1,this._definition=i.declaration?.definition}get title(){return d(this._source)?this._source.title??"":""}get url(){return xe(this._source)?this._source.url??"":""}get informationUrl(){return!this.loaded||!this.url?null:fe(this._source)?`${this.url}/${this._source.layerId}`:this.url}get informationType(){return this._profile?.intlStrings.layer??"layer"}async loadSource(){return x(this._loadPromise)&&j(this._loadPromise)?await this._loadPromise:(this._loadPromise=this._loadSource(),await this._loadPromise)}_getValueSnippet(e){return["feature","voxel","pixel"].includes(this.type)?_e(this.snippet,e.name):e.name}_getSubtypeOrDomainNameSnippet(e){return this.type!=="feature"?null:_(this._source)&&e.name===this._source.subtypeField?`SubtypeName(${this.snippet})`:`DomainName(${this.snippet}, "${e.name}")`}_getFieldProperty(e,i){let r=this._getDomainDictionary(e);if(r)return r;let s=this._getValueSnippet(e);return new a({profile:this._profile,label:s,description:y(e),snippet:s,icon:X(e,i),filterDescription:!0})}_getMemberProperty(e){let i=this._getValueSnippet(e);return new a({profile:this._profile,label:i,description:e.name,snippet:i,icon:Y(e),filterDescription:!0})}_getDomainDictionary(e){return ie(this._source)?_(this._source)&&this._source.subtypeField?this._getSubtypeDomainDictionary(e):N(this._source)&&this._source.typeIdField?this._getFeatureTypeDomainDictionary(e):this._getFieldDomainDictionary(e):null}_getSubtypeDomainDictionary(e){if(!_(this._source))return null;if(!Te(this._source))return e.name===this._source.subtypeField?null:this._getFieldDomainDictionary(e);if(e.name===this._source.subtypeField){let s=this._createDomainDictionary(e);return s.icon="subtype",s.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.subtypes,e)),s}if(ne(this._source.subtypes,e))return this._getFieldDomainDictionary(e);let i=this._getDomainValuesGroup(this._source.subtypes,e);if(!i)return null;let r=this._createDomainDictionary(e);return r.variables.push(i),r}_getFeatureTypeDomainDictionary(e){if(!N(this._source))return null;if(e.name===this._source.typeIdField){let s=this._createDomainDictionary(e);return s.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.types,e)),s}if(ne(this._source.types,e))return this._getFieldDomainDictionary(e);let i=this._getDomainValuesGroup(this._source.types,e);if(!i)return null;let r=this._createDomainDictionary(e);return r.variables.push(i),r}_getFieldDomainDictionary(e){if(!ie(this._source))return null;let i=this._source.getFieldDomain(e.name);if(!E(i))return null;let r=this._getCodedValueDomainGroup(i,{code:"domainvalues"}),s=this._createDomainDictionary(e);return s.variables.push(r),s}_getTypeOrSubtypeDomainGroup(e,i){if(E(i.domain))return this._getCodedValueDomainGroup(i.domain,{code:"subtypes"});let r=e?.map(s=>{let o=te(s)?s.code:s.id;return new a({profile:this._profile,label:`${o}`,description:s.name,snippet:`"${o}"`})})??[];return new l(this._profile,{code:"subtypes"},r)}_getCodedValueDomainGroup(e,i){let r=e.codedValues.map(s=>new a({profile:this._profile,label:`${s.code}`,description:s.name,snippet:`"${s.code}"`,filterDescription:!0}));return new l(this._profile,i,r)}_getDomainValuesGroup(e,i){let r=[];return!e||e.length===0||(e.forEach(s=>{let o=s.domains?.[i.name];if(!o||Fe(o)||!E(o))return;let n=y(i),h=this._getCodedValueDomainGroup(o,{code:"domainvaluesfortypeformat",formatValues:{fieldName:n,typeName:s.name}}),c=te(s)?s.code:s.id,p=`${c}`,D=`"${c}""`,q=new g(this,{profile:this._profile,label:p,snippet:D,description:s.name,declaration:{name:n}});q.variables=[h],r.push(q)}),!r.length)?null:new l(this._profile,{code:"domainvaluesbysubtypes"},r)}_createDomainDictionary(e){let i=this._getValueSnippet(e),r=y(e),s=new g(this,{profile:this._profile,label:i,description:r,snippet:i,icon:"form-dropdown",declaration:{name:e.name}}),o=new l(this._profile,r,[new a({profile:this._profile,label:i,description:"",snippet:i})]);s.variables=[o];let n=this._getSubtypeOrDomainNameSnippet(e);return n&&o.variables.push(new a({profile:this._profile,label:n,description:"",snippet:n})),s}async _getRelationshipsProperty(){if(!this.relationshipsProperties?.exposeRelationships||!this._profile?.supportFeatureSetFunctions)return null;let e=this._source;if(!Pe(e))return null;let i=new l(this._profile,{code:"relationships"}),r=await Promise.all(e.relationships?.map(async s=>{let o=await Ee(e,s);if(!pe(o)||s.relatedTableId===this.relationshipsProperties?.sourceTableId)return null;let n=`FeatureSetByRelationshipName(${this.snippet}, "${s.name}")`;return new C(this,{profile:this._profile,declaration:{definition:o},label:o.title,description:"",nonInteractive:!0},[new a({profile:this._profile,label:n,description:"",snippet:n})],{exposeRelationships:!0,sourceTableId:e.layerId})})??[]);return i.variables=r.filter(x),i.variables.length?i:null}},w=class extends P{constructor(e,i,r,s={exposeRelationships:!0}){super(e,i,s),this.type=r}get title(){return d(this._source)?this._source.title??"":{code:this.type}}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration}}},W=class extends w{constructor(e,i){super(e,i,"feature",{exposeRelationships:!0}),this.type="feature"}async _loadSource(){if(this.loaded)return this._source;try{if(this._source=await ye(this._definition),!this._source)throw new Error("Invalid definition");let e=d(this._source)?this._source.title??"":"";this.variables.push(new l(this._profile,e,[new a({profile:this._profile,label:this.snippet,description:"",snippet:this.snippet})]));let i=new l(this._profile,{code:"values"});if(this.variables.push(i),$e(this._source)){let o=`Geometry(${this.snippet})`,n=new a({profile:this._profile,declaration:{name:o},label:o,description:"Geometry",snippet:o,icon:"shapes",filterDescription:!0});i.variables.push(n)}let r=this._source;f(this._source.fields).map(o=>r.fields.find(n=>n.name===o.name)).sort(O(r)).forEach(o=>{i.variables.push(this._getFieldProperty(o))});let s=await this._getRelationshipsProperty();s&&this.variables.push(s)}catch(e){u("error","FeatureVariable","Error with definition",{detail:{error:e,definition:this._definition}}),this._source=null}finally{this._loaded=!0}return this._source}},U=class extends w{constructor(e,i){super(e,i,"voxel",{exposeRelationships:!1}),this.type="voxel",this._source=null}async _loadSource(){if(this.loaded)return this._source;try{if(!Le(this._definition))throw new Error("Invalid definition - not a VoxelLayer");if(await this._definition.load(),this._source=this._definition,!this._source)throw new Error("Invalid definition");let e=d(this._source)?this._source.title??"":"";this.variables.push(new l(this._profile,e,[new a({profile:this._profile,label:this.snippet,description:"",snippet:this.snippet})]));let i=new l(this._profile,{code:"values"});this.variables.push(i);let r=await Ce(this._source),s=this._source;f(this._source.fields).map(o=>s.fields.find(n=>n.name===o.name)).sort(O(s)).forEach(o=>{i.variables.push(this._getFieldProperty(o,r))})}catch(e){u("error",this.type,"Error with definition",{detail:{error:e,definition:this._definition}}),this._source=null}finally{this._loaded=!0}return this._source}},k=class extends w{constructor(e,i){super(e,i,"pixel",{exposeRelationships:!1}),this.type="pixel",this._source=null}async _loadSource(){if(this.loaded)return this._source;try{if(!re(this._definition))throw new Error("Invalid definition - not an ImageryLayer");if(await this._definition.load(),this._source=this._definition,!this._source)throw new Error("Invalid definition");let e=d(this._source)?this._source.title??"":"";this.variables.push(new l(this._profile,e,[new a({profile:this._profile,label:this.snippet,description:"",snippet:this.snippet})]));let i=new l(this._profile,{code:"values"});if(this.variables.push(i),!re(this._source))throw new Error("Invalid definition - not an ImageryLayer");(await De(this._source)).forEach(r=>{i.variables.push(this._getMemberProperty(r))})}catch(e){u("error",this.type,"Error with definition",{detail:{error:e,definition:this._definition}}),this._source=null}finally{this._loaded=!0}return this._source}},C=class extends P{constructor(e,i,r=[],s){super(e,i,s),this.featureSetSnippets=r,this.type="featureSet"}get title(){return d(this._source)?this._source.title??"":{code:"featureset"}}async _loadSource(){if(this.loaded)return this._source;try{if(this._source=await ye(this._definition),!this._source)throw new Error("Invalid definition");this.variables.push(new l(this._profile,this.title,this.featureSetSnippets,!0));let e=new l(this._profile,{code:"fields"});this.variables.push(e),e.variables=f(this._source.fields).sort(O(this._source)).map(r=>this._getFieldProperty(r));let i=await this._getRelationshipsProperty();i&&this.variables.push(i)}catch(e){u("error",this.type,"Error with definition",{detail:{error:e,definition:this._definition}}),this._source=null}finally{this._loaded=!0}return this._source}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration,definition:this._definition}}},R=class extends b{constructor(e,i){super(e,i),this.type="featureSetCollection",this._featureSetCollections=null,this._loaded=!1,this._definition=i.declaration?.definition}get informationUrl(){return!this.loaded||!this._featureSetCollections?null:typeof this._featureSetCollections.source!="string"?Q(oe(this._featureSetCollections.source)):null}get informationType(){if(!this.loaded||!this._featureSetCollections)return"";if(typeof this._featureSetCollections.source=="string")return this._profile?.intlStrings.featureservice??"featureservice";switch(this._featureSetCollections.source.declaredClass){case"esri.WebMap":return this._profile?.intlStrings.webmap??"webmap";case"esri.WebScene":return this._profile?.intlStrings.webscene??"webscene";default:return this._profile?.intlStrings.map??"map"}}async loadSource(){return x(this._loadPromise)&&j(this._loadPromise)?await this._loadPromise:(this._loadPromise=this._loadSource(),await this._loadPromise)}async _loadSource(){if(this.loaded)return this._featureSetCollections;try{if(this._featureSetCollections=await this._featureSetCollectionsFromDefinition(),!this._featureSetCollections)throw new Error("Invalid definition");let e=typeof this._featureSetCollections.source=="string"?{code:this._featureSetCollections.source.endsWith("FeatureServer")?"featureservice":"mapservice"}:{code:"webmapformat",formatValues:{webMapTitle:oe(this._featureSetCollections.source)?.title||"Untitled map"}},i=new l(this._profile,e,[new a({profile:this._profile,label:this.snippet,description:"",snippet:this.snippet})]),r=new l(this._profile,{code:"layers"},this._featureSetCollections.layers),s=new l(this._profile,{code:"tables"},this._featureSetCollections.tables);this.variables.push(i,r,s)}catch(e){u("error",this.type,"Error with definition",{detail:{error:e,definition:this._definition}}),this._featureSetCollections=null}finally{this._loaded=!0}return this._featureSetCollections}async _featureSetCollectionsFromDefinition(){return this._definition?ce(this._definition)?await this._featureSetCollectionFromMap(this._definition):V(this._definition)?await this._featureSetCollectionFromUrl(this._definition.url):ue(this._definition)?await this._featureSetCollectionFromPortalItem(this._definition.portalItem):null:null}async _featureSetCollectionFromMap(e){return Se(e)&&await e.loadAll(),await Promise.all(e.allTables.map(async i=>await i.load())),{layers:this._convertWebMapLayersToVariables(e.allLayers),tables:this._convertWebMapLayersToVariables(e.allTables),source:e}}async _featureSetCollectionFromPortalItem(e){let i=new be(e);switch(await i.load(),i.type){case"Web Map":{let r=new ge({portalItem:i});return await this._featureSetCollectionFromMap(r)}case"Web Scene":{let r=new we({portalItem:i});return await this._featureSetCollectionFromMap(r)}case"Feature Service":return await this._featureSetCollectionFromUrl(i.url);default:return u("error",this.type,"Unsupported portal item",{detail:{definition:e}}),null}}async _featureSetCollectionFromUrl(e){let i=e?.replace(/\/featureserver\/[0-9]*/iu,"/FeatureServer");if(i=i?.replace(/\/mapserver\/[0-9]*/iu,"/MapServer"),i=i?.split("?")[0],!i)return null;let r=await je(i),s=Promise.all(r.layers.map(async c=>{let p=new T({url:`${i}/${c.id}`});return await p.load(),this._createFeatureSetVariable(p)})),o=Promise.all(r.tables.map(async c=>{let p=new T({url:`${i}/${c.id}`});return await p.load(),this._createFeatureSetVariable(p)})),[n,h]=await Promise.all([s,o]);return{layers:n,tables:h,source:i}}_convertWebMapLayersToVariables(e){let i=[];return e.toArray().reverse().forEach(r=>{if(pe(r)){i.push(this._createFeatureSetVariable(r,!0));return}}),i}_createFeatureSetVariable(e,i=!1){return new C(this,{profile:this._profile,declaration:{name:e.title??"",definition:e},label:i?e.title:e.sourceJSON.name??e.title,description:"",nonInteractive:!0},this._makeFeatureSetSnippets(e,i))}_makeFeatureSetSnippets(e,i=!1){if(!this._profile?.supportFeatureSetFunctions)return[];if(i){let r=`FeatureSetById(${this.snippet}, "${e.id}")`,s=`FeatureSetByName(${this.snippet}, "${e.title}")`;return[new a({profile:this._profile,label:r,description:"",snippet:r}),new a({profile:this._profile,label:s,description:"",snippet:s})]}else{let r=`FeatureSetById(${this.snippet}, "${e.layerId}")`;return[new a({profile:this._profile,label:r,description:"",snippet:r})]}}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration,definition:this._definition}}},ae=class extends g{constructor(e,i,r="en"){super(void 0,{profile:null,declaration:{properties:[]}}),this.definition=e,this.intlStrings=i,this.locale=r,this.variables=[],this._profile=this,this.loadPropertyDeclarations(e?.variables)}get supportFeatureSetFunctions(){return this.definition?.bundles?.includes("data-access")??!1}toEditorProfileDefinition(){return{...this.definition,variables:this.dictionaryVariables.map(e=>e.toProfileVariableDefinition())}}},Ge={locale:"en"},le=class{constructor(e,i){this.languageId=e,this._apiConfig=i,this._onDidChange=new A,this._modelToProfileMap=new Map,this._modelToApiContextMap=new Map,this._localeToApiLibraryPromiseMap=new Map,this._onModelContextDidChange=new A,this._onDidModelContextChangeTimeout=-1,this.workerHost={getApiLibrary:async r=>await this.getApiLibrary(r)},ee().then(r=>{r.onWillDisposeModel(s=>{this.disposeForModel(s.uri)})})}_fireModelContextDidChange(e){this._onDidModelContextChangeTimeout===-1&&(this._onDidModelContextChangeTimeout=window.setTimeout(()=>{this._onDidModelContextChangeTimeout=-1,this._onModelContextDidChange.fire(e)},0))}_getApiKey(e){return L.isUri(e)||(e=L.parse(e)),e.toString()}get onDidChange(){return this._onDidChange.event}disposeForModel(e){let i=this._getApiKey(e);this._modelToProfileMap.delete(i),this._modelToApiContextMap.delete(i)&&this._fireModelContextDidChange(i)}getEditorProfileForModel(e){return this._modelToProfileMap.get(this._getApiKey(e))}getApiContextForModel(e){return this._modelToApiContextMap.get(this._getApiKey(e))??Ge}updateApiContextForModel(e,i){let r=this._getApiKey(e),s=this._modelToApiContextMap.get(r)??{};this._modelToApiContextMap.set(r,{...s,...i}),this._fireModelContextDidChange(r)}get onModelContextDidChange(){return this._onModelContextDidChange.event}async getApiLibraryForModel(e){let i=this.getApiContextForModel(e),r=this.getApiLibrary(i.locale??"en");return(await J(r,i)).categories}async fetchApiLibrary(e){try{let{apiPath:i,apiPrefix:r}=this._apiConfig,s=z(`${i}/${r}${e}.json`),o=await fetch(s);return o.ok?await o.json():[]}catch{return[]}}async getApiLibrary(e){let i=H(e);return this._localeToApiLibraryPromiseMap.has(i)||this._localeToApiLibraryPromiseMap.set(i,this.fetchApiLibrary(i)),await this._localeToApiLibraryPromiseMap.get(i)??[]}};return{a:pe,b:de,c:rt,d:st,e:nt,f:ot,g:at,h:lt,i:pt,j:ae,k:le}},"layers/FeatureLayer","request","portal/PortalItem","WebMap","WebScene","applications/Components/arcadeEditorUtils")
@@ -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.94 */
3
+ v5.0.0-next.96 */
4
4
  var g=Object.create;var e=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var j=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var m=(a=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});var n=(a,b)=>()=>(a&&(b=a(a=0)),b);var o=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports),p=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0})},l=(a,b,c,f)=>{if(b&&typeof b=="object"||typeof b=="function")for(let d of i(b))!k.call(a,d)&&d!==c&&e(a,d,{get:()=>b[d],enumerable:!(f=h(b,d))||f.enumerable});return a};var q=(a,b,c)=>(c=a!=null?g(j(a)):{},l(b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c,a));export{m as a,n as b,o as c,p as d,q as e};
@@ -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.94 */
4
- import"./W3I4P6B2.js";var e={wordPattern:/(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,comments:{blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},t={defaultToken:"",tokenPostfix:".css",ws:`[
3
+ v5.0.0-next.96 */
4
+ import"./2IHT4EHN.js";var e={wordPattern:/(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,comments:{blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}",notIn:["string","comment"]},{open:"[",close:"]",notIn:["string","comment"]},{open:"(",close:")",notIn:["string","comment"]},{open:'"',close:'"',notIn:["string","comment"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*\\/\\*\\s*#region\\b\\s*(.*?)\\s*\\*\\/"),end:new RegExp("^\\s*\\/\\*\\s*#endregion\\b.*\\*\\/")}}},t={defaultToken:"",tokenPostfix:".css",ws:`[
5
5
  \r\f]*`,identifier:"-?-?([a-zA-Z]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))([\\w\\-]|(\\\\(([0-9a-fA-F]{1,6}\\s?)|[^[0-9a-fA-F])))*",brackets:[{open:"{",close:"}",token:"delimiter.bracket"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],tokenizer:{root:[{include:"@selector"}],selector:[{include:"@comments"},{include:"@import"},{include:"@strings"},["[@](keyframes|-webkit-keyframes|-moz-keyframes|-o-keyframes)",{token:"keyword",next:"@keyframedeclaration"}],["[@](page|content|font-face|-moz-document)",{token:"keyword"}],["[@](charset|namespace)",{token:"keyword",next:"@declarationbody"}],["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@selectorname"},["[\\*]","tag"],["[>\\+,]","delimiter"],["\\[",{token:"delimiter.bracket",next:"@selectorattribute"}],["{",{token:"delimiter.bracket",next:"@selectorbody"}]],selectorbody:[{include:"@comments"},["[*_]?@identifier@ws:(?=(\\s|\\d|[^{;}]*[;}]))","attribute.name","@rulevalue"],["}",{token:"delimiter.bracket",next:"@pop"}]],selectorname:[["(\\.|#(?=[^{])|%|(@identifier)|:)+","tag"]],selectorattribute:[{include:"@term"},["]",{token:"delimiter.bracket",next:"@pop"}]],term:[{include:"@comments"},["(url-prefix)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],["(url)(\\()",["attribute.value",{token:"delimiter.parenthesis",next:"@urldeclaration"}]],{include:"@functioninvocation"},{include:"@numbers"},{include:"@name"},{include:"@strings"},["([<>=\\+\\-\\*\\/\\^\\|\\~,])","delimiter"],[",","delimiter"]],rulevalue:[{include:"@comments"},{include:"@strings"},{include:"@term"},["!important","keyword"],[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],warndebug:[["[@](warn|debug)",{token:"keyword",next:"@declarationbody"}]],import:[["[@](import)",{token:"keyword",next:"@declarationbody"}]],urldeclaration:[{include:"@strings"},[`[^)\r
6
6
  ]+`,"string"],["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],parenthizedterm:[{include:"@term"},["\\)",{token:"delimiter.parenthesis",next:"@pop"}]],declarationbody:[{include:"@term"},[";","delimiter","@pop"],["(?=})",{token:"",next:"@pop"}]],comments:[["\\/\\*","comment","@comment"],["\\/\\/+.*","comment"]],comment:[["\\*\\/","comment","@pop"],[/[^*/]+/,"comment"],[/./,"comment"]],name:[["@identifier","attribute.value"]],numbers:[["-?(\\d*\\.)?\\d+([eE][\\-+]?\\d+)?",{token:"attribute.value.number",next:"@units"}],["#[0-9a-fA-F_]+(?!\\w)","attribute.value.hex"]],units:[["(em|ex|ch|rem|fr|vmin|vmax|vw|vh|vm|cm|mm|in|px|pt|pc|deg|grad|rad|turn|s|ms|Hz|kHz|%)?","attribute.value.unit","@pop"]],keyframedeclaration:[["@identifier","attribute.value"],["{",{token:"delimiter.bracket",switchTo:"@keyframebody"}]],keyframebody:[{include:"@term"},["{",{token:"delimiter.bracket",next:"@selectorbody"}],["}",{token:"delimiter.bracket",next:"@pop"}]],functioninvocation:[["@identifier\\(",{token:"attribute.value",next:"@functionarguments"}]],functionarguments:[["\\$@identifier@ws:","attribute.name"],["[,]","delimiter"],{include:"@term"},["\\)",{token:"attribute.value",next:"@pop"}]],strings:[['~?"',{token:"string",next:"@stringenddoublequote"}],["~?'",{token:"string",next:"@stringendquote"}]],stringenddoublequote:[["\\\\.","string"],['"',{token:"string",next:"@pop"}],[/[^\\"]+/,"string"],[".","string"]],stringendquote:[["\\\\.","string"],["'",{token:"string",next:"@pop"}],[/[^\\']+/,"string"],[".","string"]]}};export{e as conf,t as language};
@@ -0,0 +1,6 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.96 */
4
+ import{a as I}from"./XCK3XVPS.js";import d from"./RRLS2TOQ.js";import{a as B}from"./CFWTHL36.js";import"./TBXTOKU6.js";import a from"./23PDSGPR.js";import"./JP6SZ4AZ.js";import{d as G}from"./HQT5JM76.js";import{c as j,d as Q}from"./WXP3C3JC.js";import"./E2DG62ZU.js";import"./EGHYNAYE.js";import"./7MZAZXK6.js";import"./KNRXKMFC.js";import{E as V,F as D,G as H,I as C,K as L,h as N,j as c,k as q,l as A,s as _,w as F,x as O,y as z}from"./QLFIDEKK.js";import{c as b}from"./WVCBT3G6.js";import"./MY2WCV66.js";import"./2IHT4EHN.js";export default $arcgis.t(([pe,W,ue,me,he,{getDeclaredVoxelMembers:ge,getDeclaredPixelMembers:be},{a:J},S])=>{var $=class extends z{constructor(e){if(super(e),this.it=A,e.type!==F.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===A||e==null)return this._t=void 0,this.it=e;if(e===q)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;let t=[e];return t.raw=t,this._t={_$litType$:this.constructor.resultType,strings:t,values:[]}}};$.directiveName="unsafeHTML",$.resultType=1;var k=O($);var fe=N`:host(:not([closed])){container-type:size;--calcite-block-border-color: var(--calcite-color-transparent);flex:1 0 auto;border-inline-start:var(--arcgis-coding-components-border);box-sizing:border-box;max-width:var(--arcgis-coding-components-code-editor-side-panel-max-w);width:var(--arcgis-coding-components-code-editor-side-panel-w);.submission-actions-wrapper{display:flex;flex-direction:column;width:100%;gap:.75rem}.submission-actions{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between}@container (max-width: 380px){.hidden-below-380{display:none}}@container (min-width: 380px){.hidden-above-380{display:none}}.gaps{display:flex;gap:.25rem}.align-inline-end{margin-inline-start:auto}.action .error-display{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between}.context-popover p{padding:0 .5rem;font-size:var(--calcite-font-size-sm)}.feedback-content{padding:1rem;display:flex;flex-direction:column;gap:.75rem;max-height:30vh;overflow-y:auto}.feedback-sheet{--calcite-sheet-height: auto;--calcite-sheet-max-height: 100%;--calcite-sheet-min-height: auto}calcite-chip[slot=header-actions-end]{align-self:center;margin-inline-end:.5rem}calcite-flow-item calcite-shell{background:transparent}calcite-block{width:100%;max-width:100%;align-self:flex-end;background-color:transparent;margin-block:0}calcite-sheet{--calcite-sheet-scrim-background: rgba(200, 200, 200, .5)}.type-suggestion{--calcite-color-foreground-1: var(--calcite-color-foreground-current);--calcite-color-text-3: var(--calcite-color-text-2);--calcite-icon-color: var(--calcite-color-brand)}.type-history{--calcite-icon-color: var(--calcite-color-text-2)}.type-response{--calcite-icon-color: var(--calcite-color-brand);--calcite-font-family: monospace}.block-response{align-self:flex-start;margin-block-end:4rem;border-block-end:0;--calcite-block-text-color: var(--calcite-color-brand)}calcite-list-item calcite-button{margin-inline-end:.25rem}.type-docs{--calcite-color-foreground-1: var(--calcite-color-foreground-3);--calcite-icon-color: var(--calcite-color-text-1)}.type-error{--calcite-icon-color: var(--calcite-color-status-danger);--calcite-font-family: monospace;border:1px solid var(--calcite-color-status-danger)}#thumbs-up{margin-inline-start:auto;--calcite-icon-color: var(--calcite-color-border-input)}#thumbs-down{--calcite-icon-color: var(--calcite-color-border-input)}calcite-flow-item calcite-shell calcite-notice{margin-block:1rem}.no-space-block,.no-space-block[open]{margin:0}calcite-block[open]:last-of-type{border-block-end:0}.text-area-wrapper{display:flex;border-radius:var(--calcite-corner-radius-round);margin:.75rem;overflow:hidden;--calcite-color-border-input: transparent;position:sticky;box-shadow:var(--calcite-shadow-sm);flex:none}calcite-text-area{height:auto;min-height:5.75rem;overflow:hidden;border-radius:var(--calcite-corner-radius-round) var(--calcite-corner-radius-round) 0 0;--calcite-font-weight-normal: 500;font-weight:500;line-height:1.2}.standalone-list{margin:1rem;width:calc(100% - 2rem)}.result-disclaimer{display:block;width:24rem;max-width:90%;margin:1rem auto;text-align:center;line-height:1.125rem;font-size:.875rem;font-style:italic}calcite-flow{height:100%}calcite-popover calcite-list{--calcite-list-background-color: transparent;--calcite-input-border-color: transparent}calcite-popover calcite-list calcite-filter{--calcite-spacing-sm: 0}.contained-popover-or-tooltip{--calcite-popover-max-size-x: 100%;--calcite-tooltip-max-size-x: 100%}.break-spaces{white-space:break-spaces}.feedback-button-container{margin-inline-start:auto;gap:0}.info-heading{font-size:var(--calcite-font-size-1);color:var(--calcite-color-text-1)}.unstyled-h3{margin:unset;font-size:var(--calcite-font-size-md)}.unstyled-shell{position:unset;inset:unset;display:unset;block-size:unset;inline-size:unset}.suggestion-button{font-weight:var(--calcite-font-weight-medium)}.info-block{max-width:450px}#result-block{calcite-card-group{--calcite-card-group-gap: 1.25rem}calcite-card{--calcite-card-corner-radius: var(--calcite-corner-radius-round);--calcite-card-border-color: transparent;width:100%}.positioned-code-content{display:flex;flex-direction:row;gap:.5rem;padding:.5rem}calcite-card [slot=heading] calcite-chip{margin-block-start:.25rem}.code-response-wrapper{position:relative;background:var(--calcite-color-foreground-2);border-radius:var(--calcite-corner-radius-round);margin-top:-1.5rem}.prior-prompt{display:flex;flex-direction:row;padding:0;overflow-y:hidden;overflow-x:auto;margin:.25rem 0 .75rem;align-items:center;max-width:100%;span{overflow-x:auto;overflow-y:hidden}}.copy-feedback{display:none}.copy-prompt-button{align-self:flex-start;margin-inline-start:auto}.response-secondary-action-button[data-copied]+.copy-feedback,.copy-prompt-button[data-copied]+.copy-feedback{display:block;span{padding:.75rem 1rem;font-size:var(--calcite-font-size--2);line-height:1.375;color:var(--calcite-color-text--2);font-weight:var(--calcite-font-weight-medium)}}.copy-prompt-button[data-copied]~.copy-tooltip,.response-secondary-action-button[data-copied]~.copy-tooltip{display:none}code{white-space:pre;font-size:12px;margin:0;overflow-x:auto;font-family:Fira Mono,Consolas,Menlo,monospace;display:block;max-height:12rem;position:relative;padding:.5rem}.code-collapse{margin-inline-start:auto}.response-secondary-action-button{margin-left:.5rem}.add-to-editor-button{--calcite-internal-button-border-color: unset}}.collapsible-code{padding:.5rem}.collapsible-code summary{cursor:pointer;font-weight:500;color:var(--calcite-color-brand);outline:none;padding:.25rem 0}.collapsible-code[open] summary{color:var(--calcite-color-text-2)}.collapsible-error{padding:.5rem}.collapsible-error summary{cursor:pointer;font-weight:500;color:var(--calcite-color-status-danger);outline:none;padding:.25rem 0}.collapsible-error[open] summary{color:var(--calcite-color-text-2)}.response-error-container{padding:.5rem;background:color-mix(in srgb,var(--calcite-color-status-warning) 10%,transparent);border-radius:var(--calcite-corner-radius-round);margin:1rem 0;font-size:var(--calcite-font-size--2);--calcite-input-message-icon-color: var(--calcite-color-status-warning)}.response-error-chip{--calcite-internal-chip-background-color: var(--calcite-color-status-warning);--calcite-chip-icon-color: var(--calcite-color-foreground-1);--calcite-chip-border-color: var(--calcite-color-transparent)}.feedback-actions{gap:unset}.contained{max-width:100%;max-height:100%;max-width:100cqi;max-height:75cqb;overflow-y:auto}}:host([closed]){display:none}`,f=class extends Error{constructor({message:e,code:t,subCode:a,details:o,source:r}){super(e),this.name="ArcadeAssistantError",this.code=t,this.subCode=a,this.details=o,this.source=r}};function Y(i){if(!i)return;let e=i.indexOf('{"error":');if(e!==-1)try{let t=i.slice(e),a=JSON.parse(t);if(a&&typeof a=="object"&&a.error)return a.error}catch{return}}async function ve(i){let{baseUrl:e,skillId:t,message:a,authToken:o,previousConversationId:r,context:l}=i,u=t?`${e}/skills/${t}/chat`:`${e}/chat`,n=[],s={message:a,context:l};r&&(s.conversation_id=r);let d;try{d=await W(u,{method:"post",headers:{"Content-Type":"application/json",token:o},body:JSON.stringify(s),responseType:"json"})}catch(h){let g=h,w=g.details?.rawResponse||g.message||String(h),v=Y(w);throw v?new f(v):h}let p=d.data;n.push(p);let x=p.conversationId,re=p.inquiryId,M=p.sequenceNumber;async function ne(){let h=0,g=25;for(;h<g;){await new Promise(y=>setTimeout(y,1e3));let w=ye(x,M,re),v;try{v=await W(u,{method:"post",headers:{"Content-Type":"application/json",token:o},body:JSON.stringify(w),responseType:"json"})}catch(y){let P=y,de=P.details?.rawResponse||P.message||String(y),U=Y(de);throw U?new f(U):y}let m=v.data;if(m.context?.kind==="ArcgisErrorAsContext"&&m.context.error)throw new f({message:m.context.error.message||"ArcGIS Assistant error",code:m.context.error.code,subCode:m.context.error.subCode,details:m.context.error.details,source:"polling-response"});if(n.push(m),M=m.sequenceNumber,h++,!m.hasMore)break}if(h===g)throw new f({message:"Request timed out",code:"TIMEOUT",source:"polling"})}let le=120*1e3;return await Promise.race([ne(),new Promise((h,g)=>setTimeout(()=>g(new f({message:"Request timed out",code:"TIMEOUT",source:"hard-timeout"})),le))]),n}function ye(i,e,t){return{conversationId:i,inquiryId:t,ackSequenceNumber:e}}function $e(i){return i.message.match(/Error in prompt shield/u)?"I'm having trouble with this request. Try again by rephrasing the question.":i.code==="TIMEOUT"?"I'm having trouble with this request. Try again by re-asking the same question or rephrasing it.":i.message}var ke=i=>{let e=i.value.length,t=72,a=180,o=i.offsetWidth,r=Math.max(1,Math.floor(o/8)),l=Math.ceil(e/r),u=t+(l-2)*24;i.style.setProperty("--calcite-text-area-min-height",`${Math.min(u,a)}px`)};function xe({messages:i}){return c`<calcite-chip slot=header-actions-end scale=s appearance=outline-fill .label=${i.beta??"Beta"}>${i.beta??"Beta"}</calcite-chip>`}function we({popoverContent:i}){return c`<calcite-action icon=information slot=header-actions-end id=legal-disclaimer text></calcite-action><calcite-popover reference-element=legal-disclaimer label=legal-disclaimer placement=bottom auto-close focus-trap-disabled><div class="contained">${i}</div></calcite-popover>`}function oe({errorMessage:i,slot:e}){return c`<div class="error-display"><calcite-input-message id=error-message status=invalid icon=exclamation-mark-triangle scale=m slot=${e??C}>${i}</calcite-input-message></div>`}function Ae({active:i,setActive:e,messages:t}){return c`<calcite-alert slot=alerts .open=${i} placement=bottom kind=success icon=check-circle-f auto-close @calciteAlertClose=${()=>e(!1)} .label=${t.expressionapplied??"Expression applied"}><div slot=message>${t.expressionapplied??"Expression applied to editor."}</div></calcite-alert>`}function Ce({context:i,messages:e}){return i?c`<div class="gaps">${i.profileId&&c`<calcite-popover auto-close placement=top .label=${(e.profilecontextlabel??"Profile context: {profileId}").replace("{profileId}",i.profileId)} reference-element=profile-context-button class="context-popover contained-popover-or-tooltip"><p>${(e.profilecontextlabel??"Profile context: {profileId}").replace("{profileId}",i.profileId)}</p></calcite-popover><calcite-button round kind=neutral icon-start=map-information id=profile-context-button></calcite-button>`||""}${i.layerName&&c`<calcite-popover auto-close placement=top .label=${(e.layercontextlabel??"Layer context: {layerName}").replace("{layerName}",i.layerName)} reference-element=layer-context-button class="context-popover contained-popover-or-tooltip"><p>${(e.layercontextlabel??"Layer context: {layerName}").replace("{layerName}",i.layerName)}</p></calcite-popover><calcite-button round kind=neutral icon-start=layers id=layer-context-button></calcite-button>`||""}</div>`:null}function Se({isDisabled:i,isReadOnly:e,setQuestion:t,setIsViewingResult:a,textAreaRef:o,question:r,errorMessage:l,setErrorMessage:u,submitQuestion:n,messages:s,mode:d,context:p}){return c`<div class="text-area-wrapper"><calcite-text-area resize=vertical .readOnly=${i||e} class="styled-text-area" .placeholder=${s.askaquestion??`Specify the calculation or logic you need in an Arcade expression. (e.g., 'Return "Yes" if value > 10')`} .value=${r} @calciteTextAreaInput=${x=>{ke(x.target),t(x.target.value)}} ${D(o)}><div class="submission-actions-wrapper" slot=footer-start>${l&&oe({errorMessage:l,slot:"footer-start"})||""}<div class="submission-actions">${Ce({context:p,messages:s})}<div class="align-inline-end gaps"><calcite-button round kind=neutral .hidden=${d!=="refine"} icon-start=arrow-left icon-flip-rtl=both appearance=solid .disabled=${i} @click=${async()=>{a(!1),t("")}} .label=${s.startover??"Start Over"} class="hidden-above-380" id=small-start-over-button></calcite-button><calcite-tooltip reference-element=small-start-over-button placement=top-start class="hidden-above-380">${s.startover??"Start Over"}</calcite-tooltip><calcite-button round kind=neutral .hidden=${d!=="refine"} icon-start=arrow-left icon-flip-rtl=both appearance=solid .disabled=${i} @click=${async()=>{a(!1),t("")}} class="hidden-below-380">${s.startover??"Start Over"}</calcite-button><calcite-button round icon-end=effects appearance=solid .loading=${i} .disabled=${i} @click=${async()=>{u(r?"":s.enteraprompt??"Please enter a prompt"),await n()}}>${d==="prompt"?s.ask??"Generate":s.refine??"Refine"}</calcite-button></div></div></div></calcite-text-area></div>`}var Ie="https://www.esri.com/en-us/privacy/privacy-statements/privacy-statement",Te="https://www.esri.com/en-us/privacy/privacy-statements/privacy-supplement";function Ee({setOpen:i,messages:e,feedback:t,setFeedback:a,onSubmit:o}){return t.active?c`<calcite-sheet class="feedback-sheet" .label=${e.feedback??"Feedback"} slot=sheets display-mode=float position=block-end .open=${t.active} @calciteSheetClose=${()=>i(!1)}><calcite-panel .heading=${e.providefeedback??"Provide feedback"} .description=${e.experiencehelps??"Your experience helps guide future improvements"}><div class="feedback-content"><calcite-label>${e.experiencehelpful??"Was the assistant helpful?"}<calcite-segmented-control scale=l .disabled=${t.submitting}><calcite-segmented-control-item icon-start=thumbs-up .checked=${t.value==="good"} @click=${()=>a({...t,value:"good"})}></calcite-segmented-control-item><calcite-segmented-control-item icon-start=thumbs-down .checked=${t.value==="bad"} @click=${()=>a({...t,value:"bad"})}></calcite-segmented-control-item></calcite-segmented-control></calcite-label><calcite-label>${e.describeexperience??"Describe your experience"}<calcite-text-area resize=vertical .value=${t.text} @calciteTextAreaInput=${r=>a({...t,text:r.target.value})} .disabled=${t.submitting}></calcite-text-area></calcite-label><calcite-label layout=inline scale=s><calcite-checkbox scale=l .checked=${t.termsAccepted} @calciteCheckboxChange=${r=>{a({...t,termsAccepted:r.target.checked})}} .disabled=${t.submitting}></calcite-checkbox><span>${k((e.agreement??"I agree to the {EsriPrivacyStatement} (and {Supplement}).").replace("{EsriPrivacyStatement}",`<calcite-link href=${Ie} target="_blank">${e.esriprivacystatement??"Esri Privacy Statement"}</calcite-link>`).replace("{Supplement}",`<calcite-link href=${Te} target="_blank">${e.supplement??"Supplement"}</calcite-link>`))}</span></calcite-label></div><calcite-button slot=footer width=full @click=${o} .disabled=${!t.termsAccepted||t.submitting} .loading=${t.submitting}>${e.submitfeedback??"Submit Feedback"}</calcite-button></calcite-panel></calcite-sheet>`:null}function K({assistantsEnabled:i,messages:e,slot:t,assistantHelpUrl:a,helpTopicUrl:o}){return c`<calcite-block .label=${e.assistantinformation??"Assistant information"} slot=${t??C} expanded class="info-block"><calcite-chip .label=${e.new??"New"} kind=brand>${e.new??"New"}</calcite-chip><h1 class="info-heading">${e.introducing??"Introducing Arcade Assistant (beta)"}</h1><p>${e.capabilities??"The assistant uses artificial intelligence to generate Arcade expressions."}</p>${i?c`<p>${e.keepinmind??"Keep in mind the following:"}<ul><li>${e.beconsise??"Be concise, but also clear in your request"}</li><li>${e.avoidambiguity??"Avoid ambiguity and vagueness"}</li><li>${e.moredetails??"you do not need to use exact field names in your instructions, but more detail is generally better"}</li></ul>${k((e.seedocumentation??"Please see the {documentation} for more information, including limitations and additional resources.").replace("{documentation}",`<calcite-link href=${o} target="_blank">${e.documentation??"documentation"}</calcite-link>`))}</p>`:c`<p>${k(e.useofassistant?.replace("{aiassistants}",`<strong>${e.aiassistants??"Ai Assistants"}</strong>`))}<calcite-link .href=${a} target=_blank icon-end=launch2>${e.configureassistants??"Configure Assistants"}</calcite-link></p>`}</calcite-block>`}function Re({messages:i,onProceed:e,onExit:t,helpTopicUrl:a}){return c`<calcite-dialog close-disabled placement=top .heading=${i.welcome??"Welcome to the new assistant experience"} slot=dialogs open width-scale=m id=welcome-dialog><h3 class="unstyled-h3">${i.beforeyougetstarted??"Before you get started be aware:"}</h3><ul><li>${i.maybeincorrect??"AI generated code may occasionally be incorrect or biased. Review carefully."}</li><li>${k((i.pleasereadhelp??"Read the Arcade Assistant (beta) {helpTopic} to get started and learn details on security, privacy and limitations.").replace("{helpTopic}",`<calcite-link href=${a} target="_blank">${i.helptopic??"help topic"}</calcite-link>`))}</li></ul><calcite-button id=welcome-proceed slot=footer-end @click=${e}>${i.proceed??"Proceed"}</calcite-button><calcite-button id=welcome-decline slot=footer-start @click=${t} kind=neutral>${i.exit??"Exit"}</calcite-button></calcite-dialog>`}function Me({messages:i,suggestions:e,onSuggestionClick:t}){return c`<calcite-block .heading=${i.promptsuggestions} expanded collapsible id=suggestion-block><calcite-chip-group class="suggestions" .label=${i.promptsuggestions??"Prompt Suggestions"}>${I(e,a=>a,a=>c`<calcite-button round appearance=outline-fill kind=neutral .label=${i.promptsuggestion} class="suggestion-button" @click=${()=>t?.(a)}>${a}</calcite-button>`)}</calcite-chip-group></calcite-block>`}var X=200;function Z({hidden:i=!1,expanded:e=!1,messages:t,cards:a,heading:o,collapsible:r=!1,showEffectsIcon:l=!1,onCopyCode:u,standalone:n}){return c`<calcite-block .hidden=${i} id=result-block .heading=${o??t.besteffort??"Here is the assistant's best effort"} .expanded=${e} .collapsible=${r}>${l&&c`<calcite-chip .label=${t.assistantresponses??"Assistant responses"} slot=content-start icon=effects scale=m class="suggestion-chips"></calcite-chip>`||""}<calcite-card-group .label=${t.assistantresponses??"Assistant responses"}>${I(a,s=>s.conversationId,s=>c`<calcite-card><div slot=heading><div class="prior-prompt"><span>${s.priorPrompt.length>X?`${s.priorPrompt.slice(0,X)}...`:s.priorPrompt}</span><calcite-action icon=duplicate scale=s slot=actions-end class="copy-prompt-button" text .id=${`copy-prompt-${s.conversationId}-${n?"standalone":"list"}`} @click=${d=>{let p=d.currentTarget;navigator.clipboard.writeText(s.priorPrompt).then(()=>{p.setAttribute("data-copied","true"),setTimeout(()=>p.removeAttribute("data-copied"),1500)})}}></calcite-action><calcite-popover .referenceElement=${`copy-prompt-${s.conversationId}-${n?"standalone":"list"}`} placement=top-start class="copy-feedback" .label=${t.copiedsuccessfully??"copied successfully"} open trigger-disabled><span>${t.copiedsuccessfully??"copied successfully"}</span></calcite-popover><calcite-tooltip .referenceElement=${`copy-prompt-${s.conversationId}-${n?"standalone":"list"}`} placement=top-start class="copy-tooltip">${t.copyprompttoclipboard??"Copy prompt to clipboard"}</calcite-tooltip></div>${s.message&&n&&c`<div class="response-error-container">${oe({errorMessage:s.message})}</div>`||""}</div><div><div class="code-response-wrapper"><div class="positioned-code-content"><calcite-chip-group .label=${t.responsecontext??"Response Context"} scale=s>${s.message&&!n&&c`<calcite-tooltip .referenceElement=${`response-chip-${s.conversationId}-error`} placement=top-start>${s.message}</calcite-tooltip><calcite-chip .id=${`response-chip-${s.conversationId}-error`} .label=${t.error??"Error"} scale=s appearance=outline icon=exclamation-mark-triangle-f class="response-error-chip"></calcite-chip>`||""}${s.chips?.map(d=>{let p=_();return c`${d.tooltip&&c`<calcite-tooltip .referenceElement=${`response-chip-${d.conversationId}-${p}`} placement=top-start class="contained-popover-or-tooltip">${d.tooltip}</calcite-tooltip>`||""}<calcite-chip .label=${d.label} .scale=${d.scale??"s"} .appearance=${d.appearance??"outline"} .icon=${d.icon} .id=${`response-chip-${d.conversationId}-${p}`}>${d.label}</calcite-chip>`})}</calcite-chip-group></div><details class="collapsible-code" open><summary>Code response</summary><arcgis-code-viewer language=arcade round>${s.code}</arcgis-code-viewer></details></div></div><div slot=footer-start class="feedback-actions"><calcite-button class="add-to-editor-button hidden-above-380" @click=${()=>s.onAddToEditor("add")} scale=s icon-start=plus round .label=${t.addtoeditor??"Add to editor"} .id=${`add-to-editor-button-${s.conversationId}-${n?"standalone":"list"}`}></calcite-button><calcite-tooltip class="hidden-above-380" .referenceElement=${`add-to-editor-button-${s.conversationId}-${n?"standalone":"list"}`} placement=top-start>${t.addtoeditor??"Add to editor"}</calcite-tooltip><calcite-button class="add-to-editor-button hidden-below-380" @click=${()=>s.onAddToEditor("add")} scale=s icon-start=plus round>${t.addtoeditor??"Add to editor"}</calcite-button><calcite-button round icon-start=file-code kind=neutral scale=s @click=${()=>s.onAddToEditor("replace")} class="response-secondary-action-button" .id=${`replace-${s.conversationId}-${n?"standalone":"list"}`}></calcite-button><calcite-tooltip .referenceElement=${`replace-${s.conversationId}-${n?"standalone":"list"}`} placement=top-start><span>${t.replaceineditor??"Replace all code in editor"}</span></calcite-tooltip><calcite-button round icon-start=copy-to-clipboard kind=neutral scale=s @click=${d=>{let p=d.currentTarget;u(s.code).then(()=>{p.setAttribute("data-copied","true"),setTimeout(()=>p.removeAttribute("data-copied"),1500)})}} class="response-secondary-action-button" .id=${`copy-response-${s.conversationId}-${n?"standalone":"list"}`}></calcite-button><calcite-popover .referenceElement=${`copy-response-${s.conversationId}-${n?"standalone":"list"}`} placement=top-start class="copy-feedback" .label=${t.copiedsuccessfully??"copied successfully"} open trigger-disabled><span>${t.copiedsuccessfully??"copied successfully"}</span></calcite-popover><calcite-tooltip .referenceElement=${`copy-response-${s.conversationId}-${n?"standalone":"list"}`} placement=top-start class="copy-tooltip">${t.copytoclipboard??"Copy code to clipboard"}</calcite-tooltip></div><div slot=footer-end class="feedback-actions"><calcite-action .text=${t.thumbsup??"Thumbs up"} scale=s icon=thumbs-up @click=${s.onThumbsUp} .id=${`thumbs-up-${s.conversationId}-${n?"standalone":"list"}`}></calcite-action><calcite-tooltip .referenceElement=${`thumbs-up-${s.conversationId}-${n?"standalone":"list"}`} placement=top-start><span>${t.helpful??"Helpful"}</span></calcite-tooltip><calcite-action .text=${t.thumbsdown??"Thumbs down"} scale=s icon=thumbs-down @click=${s.onThumbsDown} .id=${`thumbs-down-${s.conversationId}-${n?"standalone":"list"}`}></calcite-action><calcite-tooltip .referenceElement=${`thumbs-down-${s.conversationId}-${n?"standalone":"list"}`} placement=top-start><span>${t.unhelpful??"Unhelpful"}</span></calcite-tooltip></div></calcite-card>`)}</calcite-card-group></calcite-block>`}var ee=i=>i.type==="featureSet",Pe=i=>G(i).map(e=>({alias:e.alias,name:e.name,type:e.type,...e.domain?{domain:e.domain}:{}})),E=i=>i?{fields:Pe(i)}:{};async function te(i){let e=await i.loadSource();return{name:i.name,type:"featureSet",...E(e?.fields)}}async function ce(i){switch(i.type){case"feature":{let e=await i.loadSource();return{name:i.name,type:i.type,...E(e?.fields)}}case"featureSet":{let e=await i.loadSource();return{name:i.name,type:"featureSet",...E(e?.fields)}}case"featureSetCollection":{let e=await i.loadSource(),t=e?.layers.filter(ee)??[],a=e?.tables.filter(ee)??[],o=await Promise.all(t.map(te)),r=await Promise.all(a.map(te));return{name:i.name,type:"featureSetCollection",layers:o,tables:r}}case"dictionary":{let e=await Promise.all(i.dictionaryVariables.map(ce));return{name:i.name,type:"dictionary",attributes:e}}case"pixel":{let e=await i.loadSource();if(!e)return{name:i.name,type:"pixel"};let t=await be(e);return{name:i.name,type:"pixel",members:t.map(ie)}}case"voxel":{let e=await i.loadSource();if(!e)return{name:i.name,type:"voxel"};let t=await ge(e);return{name:i.name,type:"voxel",members:t.map(ie)}}case"array":return{name:i.name,type:"array",elementType:i.elementType.type};case"number":case"text":case"boolean":case"date":case"knowledgeGraph":case"dateOnly":case"geometry":case"time":return{name:i.name,type:i.type}}}function ie(i){return i.type==="array"?{name:i.name,type:"array",elementType:i.elementType.type}:{name:i.name,type:i.type}}async function Ue(i){return{variables:await Promise.all(i.variables.map(ce))}}var Ne="arcade_generation",qe="ArcadeCodeRequest",T="visualization",_e="ArcadeAssistant",Fe=["your_comments","user_evaluation","question","answer","useragent","_source","version","context","extras"],ae=[],se=!0,R=class extends H{constructor(){super(...arguments),this.textAreaRef=V(),this.messages=B(),this._feedbackService=void 0,this.handleFeedbackButton=(e,t)=>{this.feedback={active:!0,value:e,item:t,termsAccepted:!1,text:"",submitting:!1}},this.handleFeedbackSheetClose=()=>{this.feedback={active:!1}},this.handleFeedbackSubmit=async()=>{if(!this.feedback.active)return;this.feedback={...this.feedback,submitting:!0};let e=await this.ensureFeedbackService();if(!e){this.handleFeedbackSheetClose();return}let t=this.getModel(),a=t?await this.getProfileAndMetadata(t.uri):void 0,o=me.applicationName;!o&&!this.appVersion&&b("warn",this,"esriConfig.applicationName is not set. Consider setting it to help identify the application version in feedback.");let r={user_evaluation:this.feedback.value,your_comments:this.feedback.text||void 0,question:this.feedback.item?.question??"",answer:encodeURIComponent(this.feedback.item?.formattedScript??""),useragent:navigator.userAgent,_source:_e,version:this.appVersion||o||"NOT_SET",context:a?JSON.stringify(a):"",extras:a?.profileId??"",conversation_id:this.feedback.item?.conversationId??"",privacy_statement:this.feedback.termsAccepted?"I_agree":""};try{await e.applyEdits({addFeatures:[new he({attributes:r})]})}catch(l){b("error",this,"Error submitting feedback.",{detail:{error:l}})}this.handleFeedbackSheetClose()},this.handleClose=e=>{this.closed=!0,this.closePanel?.(e)},this.setQuestion=e=>{this.question=e},this.onSuggestionClick=e=>{this.textAreaRef.value&&(this.textAreaRef.value.value=e,this.textAreaRef.value.setFocus(),this.setQuestion(e))},this.isViewingResult=!1,this.confirmationActive=!1,this.isSubmitting=!1,this.errorMessage=void 0,this.question="",this.history=[],this.feedback={active:!1},this.splashActive=!0,this.context=void 0,this.historyCards=[],this.helpBase="",this.assistantsEnabled=!1,this.closed=!1}static{this.properties={isViewingResult:16,confirmationActive:16,isSubmitting:16,errorMessage:16,question:16,history:16,feedback:16,splashActive:16,context:16,historyCards:16,closePanel:0,insertText:0,helpBase:1,assistantsEnabled:5,layer:[1,{type:Object}],portalUrl:1,serviceUrl:1,closed:7,editorRef:0,feedbackServiceUrl:1,appVersion:1}}static{this.styles=fe}get disclaimerComment(){return`// ${this.messages.disclaimercomment}
5
+ // ${this.messages.disclaimerpt2??"AI-generated content may be inaccurate. Review before using."}`}get assistantHelpUrl(){return`${this.helpBase??"https://doc.arcgis.com/en/arcgis-online/"}administer/configure-assistants.htm`}get assistantOverviewDocUrl(){return`${this.helpBase??"https://doc.arcgis.com/en/arcgis-online/"}create-maps/understand-arcade-assistant.htm`}get usingTheAssitantDocUrl(){return`${this.helpBase??"https://doc.arcgis.com/en/arcgis-online/"}create-maps/use-arcade-assistant.htm`}async destroy(){}load(){let e=async()=>{let t=this.getModel();if(!t){this.context=void 0;return}let a=await this.getProfileAndMetadata(t.uri);this.context=a};e().catch(t=>{b("error",this,"Error setting initial context.",{detail:{error:t}})}),this.manager.onLifecycle(()=>({remove:S.onModelContextDidChange(async()=>{e().catch(t=>{b("error",this,"Error setting context.",{detail:{error:t}})})}).dispose}))}willUpdate(e){(e.has("history")||e.has("messages"))&&(this.historyCards=this.getHistoryCards())}connectedCallback(){super.connectedCallback(),this.history=ae,this.splashActive=se}disconnectedCallback(){super.disconnectedCallback(),ae=this.history,se=this.splashActive,this.copySuccessTimer&&(clearTimeout(this.copySuccessTimer),this.copySuccessTimer=void 0)}getHistoryCards(){return this.history.reduce((e,t)=>(!t.script||(e.push({priorPrompt:t.question,code:t.formattedScript||t.error||"",chips:[{label:t.profile??T,icon:"map-information",appearance:"outline",scale:"s",conversationId:t.conversationId??"",tooltip:(this.messages.profilecontextlabel??"Profile context: {profileName}").replace("{profileName}",t.profile??T)},...t.layerName?[{label:(this.messages.numlayers??"{numLayers} {layerOrLayers}").replace("{numLayers}","1").replace("{layerOrLayers}",this.messages.numlayerssingular??"layer"),icon:"layer",appearance:"outline",scale:"s",conversationId:t.conversationId??"",tooltip:(this.messages.layercontextlabel??"Layer context: {layerName}").replace("{layerName}",t.layerName??"No layer")}]:[]],onAddToEditor:a=>{j(this.editorRef.editorInstance,t.formattedScript??"",a,this.disclaimerComment)},onThumbsUp:()=>this.handleFeedbackButton("good",t),onThumbsDown:()=>this.handleFeedbackButton("bad",t),conversationId:t.conversationId??"",message:t.message}),this.isViewingResult),e),[])}setFeedbackState(e){this.feedback=e}async ensureFeedbackService(){if(this._feedbackService)return this._feedbackService;if(!this.feedbackServiceUrl)return;let e=new ue({url:this.feedbackServiceUrl});await e.load();let t=Fe.filter(a=>!e.fields.some(o=>o.name===a));if(t.length>0){b("error",this,`Missing the following fields in feedback service: ${t.join(", ")}. Feedback will not be logged.`);return}return this._feedbackService=e,e}getModel(){return this.editorRef.editorInstance?.getModel()}async submitQuestion(){if(this.question){this.isSubmitting=!0;try{let e=await this.getToken(),t=this.getModel();if(!t)return;let{profileId:a,metadata:o,layerName:r}=await this.getProfileAndMetadata(t.uri),l=(await ve({baseUrl:this.serviceUrl,skillId:Ne,message:this.question,authToken:e,context:{kind:qe,context:{profile_id:a,metadata:[o]}}})).find(u=>u.context?.kind==="ArcadeCodeResponse");if(!l)return;l.context?.kind==="ArcadeCodeResponse"&&(this.history=[{script:l?.context?.arcadeCode?.code,formattedScript:Q(l?.context?.arcadeCode?.code??""),error:void 0,question:this.question,profile:a,conversationId:l.conversationId,layerName:r??void 0,...l.message?{message:l.message}:{}},...this.history],this.isViewingResult=!0,this.errorMessage=void 0)}catch(e){e instanceof Error&&e.name==="ArcadeAssistantError"?this.errorMessage=$e(e)||this.messages.erroroccurred||"An error occurred.":this.errorMessage=this.messages.erroroccurred||"An error occurred.",b("error",this,"Error submitting question",{detail:{error:e}})}finally{this.isSubmitting=!1}}}async getToken(){let{token:e}=await pe.getCredential(this.portalUrl);return e}async getProfileAndMetadata(e){let t=T,a=S.getEditorProfileForModel(e);a?.loaded||await a?.loadSource();let o=this.editorRef.profile;o&&"id"in o&&(t=o.id);let r=a?.definition?.variables?.find(n=>n.type==="feature"),l=a?await Ue(a):{variables:[]},u;return J(r?.definition)&&(u=r.definition.title),{profileId:t,metadata:l,layerName:u}}onCopyCode(e){let t=e?`${this.disclaimerComment}
6
+ ${e}`:"";return navigator.clipboard.writeText(t)}render(){return this.closed?null:this.assistantsEnabled?c`<calcite-flow><calcite-flow-item closable heading-level=2 .heading=${this.messages.arcadeassistant??"Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${this.splashActive&&c`<calcite-scrim></calcite-scrim>`||""}${xe({messages:this.messages})}${we({popoverContent:K({assistantsEnabled:this.assistantsEnabled,messages:this.messages,assistantHelpUrl:this.assistantHelpUrl,helpTopicUrl:this.usingTheAssitantDocUrl})})}<calcite-shell class="unstyled-shell">${this.splashActive&&Re({messages:this.messages,onProceed:()=>{this.splashActive=!1},helpTopicUrl:this.assistantOverviewDocUrl,onExit:e=>this.closePanel?.(e)})||""}${Ae({active:this.confirmationActive,setActive:e=>this.confirmationActive=e,messages:this.messages})}${Se({isDisabled:this.isSubmitting,isReadOnly:!1,setQuestion:this.setQuestion,setIsViewingResult:e=>this.isViewingResult=e,mode:this.isViewingResult?"refine":"prompt",textAreaRef:this.textAreaRef,question:this.question,errorMessage:this.errorMessage,setErrorMessage:e=>this.errorMessage=e,submitQuestion:this.submitQuestion.bind(this),messages:this.messages,context:this.context})}<calcite-block-group label="interactive blocks">${!this.isViewingResult&&!this.isSubmitting&&Me({messages:this.messages,suggestions:[this.messages.prompsuggestion1??"",this.messages.prompsuggestion2??""],onSuggestionClick:this.onSuggestionClick})||""}<calcite-block .hidden=${!this.isSubmitting} .heading=${this.messages.generatingresponse??"Generating response..."}></calcite-block>${Z({expanded:this.isViewingResult,messages:this.messages,collapsible:!0,showEffectsIcon:!0,cards:this.historyCards.length?[this.historyCards[0]]:[],heading:this.messages.besteffort??"Here's the assistant's best effort",hidden:this.isSubmitting||!this.isViewingResult,onCopyCode:this.onCopyCode.bind(this),standalone:!0})}${Z({expanded:!this.isViewingResult,messages:this.messages,collapsible:!0,cards:this.isViewingResult?this.historyCards.slice(1):this.historyCards,heading:this.messages.recentprompts??"Recent prompts",hidden:this.isSubmitting||this.history.length===0,onCopyCode:this.onCopyCode.bind(this)})}</calcite-block-group>${this.feedback.active?Ee({setOpen:this.handleFeedbackSheetClose,messages:this.messages,onSubmit:this.handleFeedbackSubmit,feedback:this.feedback,setFeedback:this.setFeedbackState.bind(this)}):null}</calcite-shell></calcite-flow-item></calcite-flow>`:c`<calcite-flow><calcite-flow-item .selected=${!this.isViewingResult} closable heading-level=2 .heading=${this.messages.arcadeassistant??"Arcade assistant"} @calciteFlowItemClose=${this.handleClose}>${K({slot:"content-top",messages:this.messages,assistantsEnabled:this.assistantsEnabled,assistantHelpUrl:this.assistantHelpUrl,helpTopicUrl:this.usingTheAssitantDocUrl})}</calcite-flow-item></calcite-flow>`}};L("arcgis-arcade-coding-assistant",R);return R},"identity/IdentityManager","request","layers/FeatureLayer","config","Graphic","applications/Components/arcadeEditorUtils",a,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.94 */
4
- import c from"./JUKZO7ZY.js";import b from"./FQGB2RRB.js";import{a as u}from"./UHQMWHSA.js";import{a as m}from"./2YVIARN5.js";import a from"./KMR6BDYB.js";import{a as t}from"./YAFEASDQ.js";import{Pl as d,Sl as s,kk as k}from"./45RYMSYG.js";export default $arcgis.t(([a,n,{c:c}])=>{k();var w=["arcade","arcgis-sql-expression"],i=new Set,p=new Map;function f(e){let r=p.get(e);return r||(r=Promise.withResolvers(),p.set(e,r)),r}function l(e){f(e).resolve()}function A(e){return w.includes(e)?f(e).promise:Promise.resolve()}function h(e,r){return()=>{i.has(e)||i.add(e),r()}}async function R(e){i.has(e)||(await t()).createModel("",e,d.parse("")).dispose()}x();function x(){t().then(e=>{["light","dark"].forEach(r=>{let g=r==="light"?"vs":"vs-dark",o=u[`${r}-theme`];e.defineTheme(g,{base:g,inherit:!0,rules:[{token:"comment.arcgis",foreground:o.comment},{token:"constant.arcgis",foreground:o.constant},{token:"keyword.arcgis",foreground:o.keyword},{token:"identifier.arcgis",foreground:o.identifier},{token:"number.arcgis",foreground:o.number},{token:"string.arcgis",foreground:o.string},{token:"operator.arcgis",foreground:o.operator},{token:"predefined.arcgis",foreground:o.predefined},{token:"date.arcgis",foreground:o.date}],colors:{}})})})}s.register({id:a.languageId,aliases:["EsiSqlExpression","sql-expression"],extensions:[".sql-expression"],mimetypes:["application/sql-expression"]});s.onLanguage(a.languageId,h(a.languageId,()=>{m().then(e=>{e.setupMode(a),l(a.languageId)}).catch(e=>{throw e})}));s.register({id:n.languageId,aliases:["Arcade","arcade"],extensions:[".arc"],mimetypes:["application/arcade"]});s.onLanguage(n.languageId,h(n.languageId,()=>{c().then(e=>{e.setupMode(n),l(n.languageId)}).catch(e=>{throw e})}));return{a:A,b:R}},a,b,c)
3
+ v5.0.0-next.96 */
4
+ import c from"./WOSGVDYX.js";import b from"./RRLS2TOQ.js";import{a as u}from"./VOUYQ4DG.js";import{a as m}from"./N4YKPCZU.js";import a from"./KJ5IPWOF.js";import{a as t}from"./E2DG62ZU.js";import{Pl as d,Sl as s,kk as k}from"./MY2WCV66.js";export default $arcgis.t(([a,n,{c:c}])=>{k();var w=["arcade","arcgis-sql-expression"],i=new Set,p=new Map;function f(e){let r=p.get(e);return r||(r=Promise.withResolvers(),p.set(e,r)),r}function l(e){f(e).resolve()}function A(e){return w.includes(e)?f(e).promise:Promise.resolve()}function h(e,r){return()=>{i.has(e)||i.add(e),r()}}async function R(e){i.has(e)||(await t()).createModel("",e,d.parse("")).dispose()}x();function x(){t().then(e=>{["light","dark"].forEach(r=>{let g=r==="light"?"vs":"vs-dark",o=u[`${r}-theme`];e.defineTheme(g,{base:g,inherit:!0,rules:[{token:"comment.arcgis",foreground:o.comment},{token:"constant.arcgis",foreground:o.constant},{token:"keyword.arcgis",foreground:o.keyword},{token:"identifier.arcgis",foreground:o.identifier},{token:"number.arcgis",foreground:o.number},{token:"string.arcgis",foreground:o.string},{token:"operator.arcgis",foreground:o.operator},{token:"predefined.arcgis",foreground:o.predefined},{token:"date.arcgis",foreground:o.date}],colors:{}})})})}s.register({id:a.languageId,aliases:["EsiSqlExpression","sql-expression"],extensions:[".sql-expression"],mimetypes:["application/sql-expression"]});s.onLanguage(a.languageId,h(a.languageId,()=>{m().then(e=>{e.setupMode(a),l(a.languageId)}).catch(e=>{throw e})}));s.register({id:n.languageId,aliases:["Arcade","arcade"],extensions:[".arc"],mimetypes:["application/arcade"]});s.onLanguage(n.languageId,h(n.languageId,()=>{c().then(e=>{e.setupMode(n),l(n.languageId)}).catch(e=>{throw e})}));return{a:A,b:R}},a,b,c)
@@ -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.94 */
4
- import{h as o}from"./GNLRKAD5.js";var i=o`@layer{arcgis-arcade-editor,arcgis-sql-expression-editor{--arcgis-coding-components-border: 1px solid var(--calcite-color-border-3);--arcgis-coding-components-background-color: var(--calcite-color-foreground-1);--arcgis-coding-components-side-action-bar-max-w: 25%;--arcgis-coding-components-code-editor-side-panel-w: 600px;--arcgis-coding-components-code-editor-side-panel-max-w: 45%;.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-panel{flex:1 0 auto}.position-relative{position:relative}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.border-inline-start{border-inline-start:var(--arcgis-coding-components-border)!important;box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border)!important;box-sizing:border-box}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.code-editor-side-panel{max-width:var(--arcgis-coding-components-code-editor-side-panel-max-w);width:var(--arcgis-coding-components-code-editor-side-panel-w)}.code-editor-side-panel calcite-flow{height:100%}}}`;export{i as a};
3
+ v5.0.0-next.96 */
4
+ import{h as o}from"./QLFIDEKK.js";var i=o`@layer{arcgis-arcade-editor,arcgis-sql-expression-editor{--arcgis-coding-components-border: 1px solid var(--calcite-color-border-3);--arcgis-coding-components-background-color: var(--calcite-color-foreground-1);--arcgis-coding-components-side-action-bar-max-w: 25%;--arcgis-coding-components-code-editor-side-panel-w: 600px;--arcgis-coding-components-code-editor-side-panel-max-w: 45%;.flex-adjustable{flex:1 1 auto;overflow:hidden}.flex-panel{flex:1 0 auto}.position-relative{position:relative}.flex-row{display:flex;flex-direction:row;overflow:hidden}.flex-column{display:flex;flex-direction:column;overflow:hidden}.border-inline-start{border-inline-start:var(--arcgis-coding-components-border)!important;box-sizing:border-box}.border-inline-end{border-inline-end:var(--arcgis-coding-components-border)!important;box-sizing:border-box}.side-action-bar{max-width:var(--arcgis-coding-components-side-action-bar-max-w)}.code-editor-side-panel{max-width:var(--arcgis-coding-components-code-editor-side-panel-max-w);width:var(--arcgis-coding-components-code-editor-side-panel-w)}.code-editor-side-panel calcite-flow{height:100%}}}`;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.94 */
4
- import{a}from"./SNLDOFIP.js";import{a as m}from"./UYYBSWI5.js";import"./FNP2QIRS.js";import c from"./KMR6BDYB.js";import b from"./CUL2JAK4.js";import"./6HA5DFLF.js";import"./H2A4L7G6.js";import"./YAFEASDQ.js";import"./RDOPAVSY.js";import"./UYCZT4PR.js";import"./X2UROQYS.js";import{G as n,K as d,h as r,j as i,n as s}from"./GNLRKAD5.js";import"./XQ7S4CXK.js";import"./45RYMSYG.js";import"./W3I4P6B2.js";export default $arcgis.t(([,h])=>{var g=r`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`,c=class extends n{constructor(){super(...arguments),this.messages=m(),this._filterValue="",this._flowItemRenderers=[],this._mutationCounter=1,this.loading=!1,this.arcgisClose=s({bubbles:!1}),this.arcgisFieldSelected=s({bubbles:!1})}static{this.properties={_filterValue:16,_flowItemRenderers:16,_mutationCounter:16,loading:5,modelId:1}}static{this.styles=g}willUpdate(t){t.has("modelId")&&(this._flowItemRenderers=[])}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect()}_handleSelectField(t){if(t.target instanceof HTMLElement)switch(t.target.tagName.toLowerCase()){case"calcite-list-item":{let e=t.target.value;this.arcgisFieldSelected.emit(e??"");break}case"calcite-action":t.stopPropagation();break}}_handleSelectDomain(t){let e=t.target.value;this.arcgisFieldSelected.emit(e?`'${e}'`:"")}_emitClose(){this.arcgisClose.emit()}render(){let t=h.getFeatureLayerForModel(this.modelId??"");return this.loading||!this.modelId||!t?i`<calcite-block .heading=${this.messages.availablefields??""}></calcite-block>`:i`<calcite-flow><calcite-flow-item heading-level=2 .heading=${this.messages.availablefields??""} closable @calciteFlowItemClose=${this._emitClose}><calcite-list label=fields filter-enabled>${a(t.fields,e=>e.name,e=>i`<calcite-list-item @click=${this._handleSelectField} .label=${e.name} .description=${e.alias??""} .value=${e.name}>${e.domain&&i`<calcite-action slot=actions-end text=open icon=chevron-right @click=${()=>{let o=e.domain;o?.type==="coded-value"&&(this._flowItemRenderers=[...this._flowItemRenderers,()=>i`<calcite-flow-item closable heading-level=2 .heading=${this.messages.domainvalues??""} .description=${e.name} @calciteFlowItemClose=${this._emitClose}><calcite-list label=domains>${a(o.codedValues,l=>l.code,l=>i`<calcite-list-item @click=${this._handleSelectDomain} .label=${l.name} .description=${String(l.code)} .value=${String(l.code)}></calcite-list-item>`)}</calcite-list></calcite-flow-item>`])}}></calcite-action>`||""}</calcite-list-item>`)}</calcite-list></calcite-flow-item>${this._flowItemRenderers.map(e=>e())}</calcite-flow>`}};d("arcgis-sql-expression-fields",c);return c},b,c)
3
+ v5.0.0-next.96 */
4
+ import{a}from"./XCK3XVPS.js";import{a as m}from"./CFWTHL36.js";import"./TBXTOKU6.js";import c from"./KJ5IPWOF.js";import b from"./23PDSGPR.js";import"./HQT5JM76.js";import"./WXP3C3JC.js";import"./E2DG62ZU.js";import"./EGHYNAYE.js";import"./7MZAZXK6.js";import"./KNRXKMFC.js";import{G as n,K as d,h as r,j as i,n as s}from"./QLFIDEKK.js";import"./WVCBT3G6.js";import"./MY2WCV66.js";import"./2IHT4EHN.js";export default $arcgis.t(([,h])=>{var g=r`:host{calcite-flow{height:100%}calcite-list-item-group{background-color:var(--calcite-color-foreground-2)}}`,c=class extends n{constructor(){super(...arguments),this.messages=m(),this._filterValue="",this._flowItemRenderers=[],this._mutationCounter=1,this.loading=!1,this.arcgisClose=s({bubbles:!1}),this.arcgisFieldSelected=s({bubbles:!1})}static{this.properties={_filterValue:16,_flowItemRenderers:16,_mutationCounter:16,loading:5,modelId:1}}static{this.styles=g}willUpdate(t){t.has("modelId")&&(this._flowItemRenderers=[])}disconnectedCallback(){super.disconnectedCallback(),this._flowObserver?.disconnect()}_handleSelectField(t){if(t.target instanceof HTMLElement)switch(t.target.tagName.toLowerCase()){case"calcite-list-item":{let e=t.target.value;this.arcgisFieldSelected.emit(e??"");break}case"calcite-action":t.stopPropagation();break}}_handleSelectDomain(t){let e=t.target.value;this.arcgisFieldSelected.emit(e?`'${e}'`:"")}_emitClose(){this.arcgisClose.emit()}render(){let t=h.getFeatureLayerForModel(this.modelId??"");return this.loading||!this.modelId||!t?i`<calcite-block .heading=${this.messages.availablefields??""}></calcite-block>`:i`<calcite-flow><calcite-flow-item heading-level=2 .heading=${this.messages.availablefields??""} closable @calciteFlowItemClose=${this._emitClose}><calcite-list label=fields filter-enabled>${a(t.fields,e=>e.name,e=>i`<calcite-list-item @click=${this._handleSelectField} .label=${e.name} .description=${e.alias??""} .value=${e.name}>${e.domain&&i`<calcite-action slot=actions-end text=open icon=chevron-right @click=${()=>{let o=e.domain;o?.type==="coded-value"&&(this._flowItemRenderers=[...this._flowItemRenderers,()=>i`<calcite-flow-item closable heading-level=2 .heading=${this.messages.domainvalues??""} .description=${e.name} @calciteFlowItemClose=${this._emitClose}><calcite-list label=domains>${a(o.codedValues,l=>l.code,l=>i`<calcite-list-item @click=${this._handleSelectDomain} .label=${l.name} .description=${String(l.code)} .value=${String(l.code)}></calcite-list-item>`)}</calcite-list></calcite-flow-item>`])}}></calcite-action>`||""}</calcite-list-item>`)}</calcite-list></calcite-flow-item>${this._flowItemRenderers.map(e=>e())}</calcite-flow>`}};d("arcgis-sql-expression-fields",c);return c},b,c)
@@ -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.94 */
4
- import{Tl as o}from"./45RYMSYG.js";var d=Object.defineProperty,O=Object.getOwnPropertyDescriptor,m=Object.getOwnPropertyNames,y=Object.prototype.hasOwnProperty,h=(e,i,t,s)=>{if(i&&typeof i=="object"||typeof i=="function")for(let r of m(i))!y.call(e,r)&&r!==t&&d(e,r,{get:()=>i[r],enumerable:!(s=O(i,r))||s.enumerable});return e},E=(e,i,t)=>(h(e,i,"default"),t&&h(t,i,"default")),L="5.4.5",n={};E(n,o);var u=(e=>(e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ESNext=99]="ESNext",e))(u||{}),l=(e=>(e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React",e[e.ReactNative=3]="ReactNative",e[e.ReactJSX=4]="ReactJSX",e[e.ReactJSXDev=5]="ReactJSXDev",e))(l||{}),_=(e=>(e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed",e))(_||{}),c=(e=>(e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest",e))(c||{}),g=(e=>(e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs",e))(g||{}),p=class{constructor(e,i,t,s,r){this._onDidChange=new n.Emitter,this._onDidExtraLibsChange=new n.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(i),this.setWorkerOptions(t),this.setInlayHintsOptions(s),this.setModeConfiguration(r),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,i){let t;if(typeof i>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=i,this._extraLibs[t]&&this._extraLibs[t].content===e)return{dispose:()=>{}};let s=1;return this._removedExtraLibs[t]&&(s=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(s=this._extraLibs[t].version+1),this._extraLibs[t]={content:e,version:s},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let r=this._extraLibs[t];r&&r.version===s&&(delete this._extraLibs[t],this._removedExtraLibs[t]=s,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(let i in this._extraLibs)this._removedExtraLibs[i]=this._extraLibs[i].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(let i of e){let t=i.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,s=i.content,r=1;this._removedExtraLibs[t]&&(r=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:s,version:r}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}},x=L,b={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},v=new p({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},b),f=new p({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},b),C=()=>a().then(e=>e.getTypeScriptWorker()),D=()=>a().then(e=>e.getJavaScriptWorker());n.languages.typescript={ModuleKind:u,JsxEmit:l,NewLineKind:_,ScriptTarget:c,ModuleResolutionKind:g,typescriptVersion:x,typescriptDefaults:v,javascriptDefaults:f,getTypeScriptWorker:C,getJavaScriptWorker:D};function a(){return import("./Z3ZSRJMV.js")}n.languages.onLanguage("typescript",()=>a().then(e=>e.setupTypeScript(v)));n.languages.onLanguage("javascript",()=>a().then(e=>e.setupJavaScript(f)));export{v as a};
3
+ v5.0.0-next.96 */
4
+ import{Tl as o}from"./MY2WCV66.js";var d=Object.defineProperty,O=Object.getOwnPropertyDescriptor,m=Object.getOwnPropertyNames,y=Object.prototype.hasOwnProperty,h=(e,i,t,s)=>{if(i&&typeof i=="object"||typeof i=="function")for(let r of m(i))!y.call(e,r)&&r!==t&&d(e,r,{get:()=>i[r],enumerable:!(s=O(i,r))||s.enumerable});return e},E=(e,i,t)=>(h(e,i,"default"),t&&h(t,i,"default")),L="5.4.5",n={};E(n,o);var u=(e=>(e[e.None=0]="None",e[e.CommonJS=1]="CommonJS",e[e.AMD=2]="AMD",e[e.UMD=3]="UMD",e[e.System=4]="System",e[e.ES2015=5]="ES2015",e[e.ESNext=99]="ESNext",e))(u||{}),l=(e=>(e[e.None=0]="None",e[e.Preserve=1]="Preserve",e[e.React=2]="React",e[e.ReactNative=3]="ReactNative",e[e.ReactJSX=4]="ReactJSX",e[e.ReactJSXDev=5]="ReactJSXDev",e))(l||{}),_=(e=>(e[e.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",e[e.LineFeed=1]="LineFeed",e))(_||{}),c=(e=>(e[e.ES3=0]="ES3",e[e.ES5=1]="ES5",e[e.ES2015=2]="ES2015",e[e.ES2016=3]="ES2016",e[e.ES2017=4]="ES2017",e[e.ES2018=5]="ES2018",e[e.ES2019=6]="ES2019",e[e.ES2020=7]="ES2020",e[e.ESNext=99]="ESNext",e[e.JSON=100]="JSON",e[e.Latest=99]="Latest",e))(c||{}),g=(e=>(e[e.Classic=1]="Classic",e[e.NodeJs=2]="NodeJs",e))(g||{}),p=class{constructor(e,i,t,s,r){this._onDidChange=new n.Emitter,this._onDidExtraLibsChange=new n.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(i),this.setWorkerOptions(t),this.setInlayHintsOptions(s),this.setModeConfiguration(r),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,i){let t;if(typeof i>"u"?t=`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t=i,this._extraLibs[t]&&this._extraLibs[t].content===e)return{dispose:()=>{}};let s=1;return this._removedExtraLibs[t]&&(s=this._removedExtraLibs[t]+1),this._extraLibs[t]&&(s=this._extraLibs[t].version+1),this._extraLibs[t]={content:e,version:s},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let r=this._extraLibs[t];r&&r.version===s&&(delete this._extraLibs[t],this._removedExtraLibs[t]=s,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(let i in this._extraLibs)this._removedExtraLibs[i]=this._extraLibs[i].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(let i of e){let t=i.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,s=i.content,r=1;this._removedExtraLibs[t]&&(r=this._removedExtraLibs[t]+1),this._extraLibs[t]={content:s,version:r}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){this._onDidExtraLibsChangeTimeout===-1&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}},x=L,b={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},v=new p({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},b),f=new p({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},b),C=()=>a().then(e=>e.getTypeScriptWorker()),D=()=>a().then(e=>e.getJavaScriptWorker());n.languages.typescript={ModuleKind:u,JsxEmit:l,NewLineKind:_,ScriptTarget:c,ModuleResolutionKind:g,typescriptVersion:x,typescriptDefaults:v,javascriptDefaults:f,getTypeScriptWorker:C,getJavaScriptWorker:D};function a(){return import("./VD3QVBSU.js")}n.languages.onLanguage("typescript",()=>a().then(e=>e.setupTypeScript(v)));n.languages.onLanguage("javascript",()=>a().then(e=>e.setupJavaScript(f)));export{v 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.94 */
4
- import{a,b}from"./R5L3UDPZ.js";import"./45RYMSYG.js";import"./W3I4P6B2.js";export{a as conf,b as language};
3
+ v5.0.0-next.96 */
4
+ import{a,b}from"./ATN3CPT7.js";import"./MY2WCV66.js";import"./2IHT4EHN.js";export{a as conf,b as language};
@@ -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.94 */
4
- import{Tl as s}from"./45RYMSYG.js";var c=Object.defineProperty,p=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,l=Object.prototype.hasOwnProperty,a=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of g(e))!l.call(t,n)&&n!==o&&c(t,n,{get:()=>e[n],enumerable:!(i=p(e,n))||i.enumerable});return t},d=(t,e,o)=>(a(t,e,"default"),o&&a(o,e,"default")),r={};d(r,s);var m={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:r.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:r.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:r.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:r.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},x={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<","</",">>",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/#?[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};export{m as a,x as b};
3
+ v5.0.0-next.96 */
4
+ import{Tl as s}from"./MY2WCV66.js";var c=Object.defineProperty,p=Object.getOwnPropertyDescriptor,g=Object.getOwnPropertyNames,l=Object.prototype.hasOwnProperty,a=(t,e,o,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of g(e))!l.call(t,n)&&n!==o&&c(t,n,{get:()=>e[n],enumerable:!(i=p(e,n))||i.enumerable});return t},d=(t,e,o)=>(a(t,e,"default"),o&&a(o,e,"default")),r={};d(r,s);var m={wordPattern:/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],onEnterRules:[{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,afterText:/^\s*\*\/$/,action:{indentAction:r.languages.IndentAction.IndentOutdent,appendText:" * "}},{beforeText:/^\s*\/\*\*(?!\/)([^\*]|\*(?!\/))*$/,action:{indentAction:r.languages.IndentAction.None,appendText:" * "}},{beforeText:/^(\t|(\ \ ))*\ \*(\ ([^\*]|\*(?!\/))*)?$/,action:{indentAction:r.languages.IndentAction.None,appendText:"* "}},{beforeText:/^(\t|(\ \ ))*\ \*\/\s*$/,action:{indentAction:r.languages.IndentAction.None,removeText:1}}],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]},{open:"`",close:"`",notIn:["string","comment"]},{open:"/**",close:" */",notIn:["string"]}],folding:{markers:{start:new RegExp("^\\s*//\\s*#?region\\b"),end:new RegExp("^\\s*//\\s*#?endregion\\b")}}},x={defaultToken:"invalid",tokenPostfix:".ts",keywords:["abstract","any","as","asserts","bigint","boolean","break","case","catch","class","continue","const","constructor","debugger","declare","default","delete","do","else","enum","export","extends","false","finally","for","from","function","get","if","implements","import","in","infer","instanceof","interface","is","keyof","let","module","namespace","never","new","null","number","object","out","package","private","protected","public","override","readonly","require","global","return","satisfies","set","static","string","super","switch","symbol","this","throw","true","try","type","typeof","undefined","unique","unknown","var","void","while","with","yield","async","await","of"],operators:["<=",">=","==","!=","===","!==","=>","+","-","**","*","/","%","++","--","<<","</",">>",">>>","&","|","^","!","~","&&","||","??","?",":","=","+=","-=","*=","**=","/=","%=","<<=",">>=",">>>=","&=","|=","^=","@"],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,digits:/\d+(_+\d+)*/,octaldigits:/[0-7]+(_+[0-7]+)*/,binarydigits:/[0-1]+(_+[0-1]+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/[{}]/,"delimiter.bracket"],{include:"common"}],common:[[/#?[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w\$]*/,"type.identifier"],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/([dgimsuy]*)(\s*)(\.|;|,|\)|\]|\}|$))/,{token:"regexp",bracket:"@open",next:"@regexp"}],[/[()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/!(?=([^=]|$))/,"delimiter"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/(@digits)[eE]([\-+]?(@digits))?/,"number.float"],[/(@digits)\.(@digits)([eE][\-+]?(@digits))?/,"number.float"],[/0[xX](@hexdigits)n?/,"number.hex"],[/0[oO]?(@octaldigits)n?/,"number.octal"],[/0[bB](@binarydigits)n?/,"number.binary"],[/(@digits)n?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string","@string_double"],[/'/,"string","@string_single"],[/`/,"string","@string_backtick"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@jsdoc"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[\/*]/,"comment"]],jsdoc:[[/[^\/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[\/*]/,"comment.doc"]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["regexp.escape.control","regexp.escape.control","regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,["regexp.escape.control",{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["regexp.escape.control","regexp.escape.control"]],[/[()]/,"regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],[/(\/)([dgimsuy]*)/,[{token:"regexp",bracket:"@close",next:"@pop"},"keyword.other"]]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,{token:"regexp.escape.control",next:"@pop",bracket:"@close"}]],string_double:[[/[^\\"]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,"string","@pop"]],string_single:[[/[^\\']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/'/,"string","@pop"]],string_backtick:[[/\$\{/,{token:"delimiter.bracket",next:"@bracketCounting"}],[/[^\\`$]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/`/,"string","@pop"]],bracketCounting:[[/\{/,"delimiter.bracket","@bracketCounting"],[/\}/,"delimiter.bracket","@pop"],{include:"common"}]}};export{m as a,x as b};
@@ -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.94 */
4
- import{b as r}from"./FNP2QIRS.js";import{L as o}from"./GNLRKAD5.js";var s=r(o);export{s as a};
3
+ v5.0.0-next.96 */
4
+ import{b as r}from"./TBXTOKU6.js";import{L as o}from"./QLFIDEKK.js";var s=r(o);export{s 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.94 */
3
+ v5.0.0-next.96 */
4
4
  export default $arcgis.t(([{createArcadeExecutor:m}])=>{var E="https://developers.arcgis.com/arcade/",B=100,C=100;function v(e){return!!e&&typeof e=="object"&&"declaredRootClass"in e&&typeof e.declaredRootClass=="string"&&e.declaredRootClass==="esri.arcade.featureset.support.FeatureSet"}function g(e){return!!e&&typeof e=="object"&&"arcadeDeclaredClass"in e&&typeof e.arcadeDeclaredClass=="string"&&e.arcadeDeclaredClass==="esri.arcade.Feature"}function b(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass==="esri.arcade.Dictionary"}function w(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass.startsWith("esri.geometry.")}function R(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass.startsWith("esri.rest.knowledgeGraph.KnowledgeGraph")}function j(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass==="esri.arcade.Portal"}function D(e){return!!e&&typeof e=="object"&&"declaredClass"in e&&typeof e.declaredClass=="string"&&e.declaredClass==="esri.arcade.Attachment"}function h(e){return!!e&&typeof e=="object"&&"declaredRootClass"in e&&typeof e.declaredRootClass=="string"&&e.declaredRootClass==="esri.arcade.arcadedate"}function A(e){return!!e&&typeof e=="object"&&"declaredRootClass"in e&&typeof e.declaredRootClass=="string"&&e.declaredRootClass==="esri.core.sql.dateonly"}function x(e){return!!e&&typeof e=="object"&&"declaredRootClass"in e&&typeof e.declaredRootClass=="string"&&e.declaredRootClass==="esri.core.sql.timeonly"}function F(e){return!!e&&typeof e=="object"&&"arcadeDeclaredClass"in e&&typeof e.arcadeDeclaredClass=="string"&&e.arcadeDeclaredClass==="esri.arcade.Pixel"}function S(e){return!!e&&typeof e=="object"&&"length"in e&&typeof e.length=="function"&&"get"in e&&typeof e.get=="function"&&"toArray"in e&&typeof e.toArray=="function"&&"_elements"in e&&Array.isArray(e._elements)}function Z(e){return e==null?{type:"null"}:Array.isArray(e)?{type:"array",value:e}:S(e)?{type:"array",value:e.toArray()}:e instanceof Date?{type:"date",value:e}:typeof e=="string"?{type:"text",value:e}:typeof e=="number"?{type:"number",value:e}:typeof e=="boolean"?{type:"boolean",value:e}:typeof e!="object"?{type:"unknown"}:h(e)?{type:"date",value:e}:A(e)?{type:"dateOnly",value:e}:x(e)?{type:"time",value:e}:D(e)?{type:"attachment",value:e}:j(e)?{type:"portal",value:e}:v(e)?{type:"featureSet",value:e,features:[],iterator:null}:g(e)?{type:"feature",value:e}:F(e)?{type:"pixel",value:e}:b(e)?{type:"dictionary",value:e}:w(e)?{type:"geometry",value:e}:R(e)?{type:"knowledgeGraph",value:e}:{type:"unknown"}}function G(e,r="en"){return e.value instanceof Date?new Intl.DateTimeFormat(r,{dateStyle:"medium",timeStyle:"long"}).format(e.value):e.value.toDateTime().setLocale(r).toFormat(e.value.isUnknownTimeZone?"FF":"FF ZZZZZ")}function I(e){return e.value.toString()}function O(e){return e.value.toString()}async function T(e,r="system"){let a=Z(e);return a.type!=="featureSet"||(await a.value.load(),a.iterator=a.value.iterator({aborted:!1}),a.features=await a.iterator.nextBatchAsArcadeFeatures(C,r)??[]),a}async function P(e,r,a,s){let l=new Date;s??=()=>{};try{let o=performance.now(),n=await m(r??"",{variables:e?.variables??[]}),c=performance.now(),{profileVariableInstances:d,spatialReference:u,timeZone:i,services:y}=a,p={spatialReference:u,timeZone:i,rawOutput:!0,console:s,services:y},f=await n.executeAsync(d,p),t=await T(f,i);return t.timeStamp=l,t.compilationTime=c-o,t.executionTime=performance.now()-c,t}catch(o){let n="Unknown Error";return o instanceof Error&&(n=o.message),{type:"error",value:n,error:o,timeStamp:l,compilationTime:0,executionTime:0}}}return{a:E,b:B,c:C,d:Z,e:G,f:I,g:O,h:P}},"arcade")
@@ -0,0 +1,4 @@
1
+ /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
+ See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
+ v5.0.0-next.96 */
4
+ import h from"./3TJXZ4VM.js";import e from"./WOSGVDYX.js";import d from"./RRLS2TOQ.js";import"./VOUYQ4DG.js";import{a as k,c as u,d as L}from"./WQXADMUM.js";import{a as w}from"./TBXTOKU6.js";import"./N4YKPCZU.js";import c from"./KJ5IPWOF.js";import a from"./23PDSGPR.js";import{a as N}from"./JP6SZ4AZ.js";import"./HQT5JM76.js";import"./WXP3C3JC.js";import{a as C}from"./E2DG62ZU.js";import"./EGHYNAYE.js";import"./7MZAZXK6.js";import{a as E,b as y,c as b}from"./KNRXKMFC.js";import{G as v,K as S,L as T,h as g,i as _,j as l}from"./QLFIDEKK.js";import{d as f}from"./WVCBT3G6.js";import"./MY2WCV66.js";import"./2IHT4EHN.js";export default $arcgis.t(([,,,{a:O},{a:c,b:p}])=>{var M=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??A,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===M)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)}}},A=(n,t)=>n===t||n.length===t.length&&n.every(((e,s)=>!_(e,t[s])));var q=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 v{constructor(){super(...arguments),this._monacoEditor=w(C),this.#e=Promise.withResolvers(),this.#t="",this._slotContentObservers=[],this._onDefaultSlotChange=async t=>{E(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 k(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=q}#e;#t;async load(){O(T("./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=L(()=>{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(f(this))}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=b(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>`}};S("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.94 */
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"./45RYMSYG.js";import"./W3I4P6B2.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.96 */
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"./MY2WCV66.js";import"./2IHT4EHN.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};