@arcgis/coding-components 5.2.0-next.66 → 5.2.0-next.67

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 (37) hide show
  1. package/dist/cdn/{3M3HXSYK.js → 2DTC2KLA.js} +1 -1
  2. package/dist/cdn/2K6BQIBV.js +2 -0
  3. package/dist/cdn/3SD4Q5WL.js +2 -0
  4. package/dist/cdn/{NCHKS6TN.js → 4MVYWN23.js} +1 -1
  5. package/dist/cdn/{CXFUSNAU.js → 5YJBIYD3.js} +1 -1
  6. package/dist/cdn/{IXJJKEU2.js → 6U26TSWY.js} +1 -1
  7. package/dist/cdn/{2M4S2WO7.js → 6UHZIGRN.js} +1 -1
  8. package/dist/cdn/{A6XKALPK.js → 7DPMPX5S.js} +1 -1
  9. package/dist/cdn/{VWPSY3PT.js → 7JPHSXIU.js} +1 -1
  10. package/dist/cdn/{EU43G22J.js → 7MPXDKN7.js} +1 -1
  11. package/dist/cdn/{JKZNWG5A.js → AY6BWBVA.js} +1 -1
  12. package/dist/cdn/{CV23PDJE.js → BUM6RJV6.js} +1 -1
  13. package/dist/cdn/{4WEBU3KK.js → DRK65FS3.js} +1 -1
  14. package/dist/cdn/{QPABBGTN.js → GHAH7AND.js} +1 -1
  15. package/dist/cdn/{5APP7XRH.js → GRHY5JDP.js} +1 -1
  16. package/dist/cdn/{ZCFGWXGM.js → JDMYJRIV.js} +1 -1
  17. package/dist/cdn/{HSXKEPIB.js → LEA6JI7V.js} +1 -1
  18. package/dist/cdn/{HKP6ODST.js → LPH5JDNQ.js} +1 -1
  19. package/dist/cdn/{LU267FSP.js → N6XNHKTL.js} +1 -1
  20. package/dist/cdn/{OMMRUPJM.js → NEOJYPR3.js} +1 -1
  21. package/dist/cdn/{G2OQD3J7.js → NV43JN7Z.js} +1 -1
  22. package/dist/cdn/{6M6TGPVF.js → OYNYKKVF.js} +1 -1
  23. package/dist/cdn/{GGA76E6T.js → PRWIF3DU.js} +1 -1
  24. package/dist/cdn/{RJ4CU7WA.js → QT3UA4FC.js} +1 -1
  25. package/dist/cdn/{GCGTRYMH.js → RFANA4TN.js} +1 -1
  26. package/dist/cdn/{RGDZDUBZ.js → SIWYCRUS.js} +1 -1
  27. package/dist/cdn/{A43XQH6Y.js → VDGRRUMP.js} +1 -1
  28. package/dist/cdn/{DKZIYZJR.js → Z3AU6X54.js} +1 -1
  29. package/dist/cdn/assets/code-editor/sql-expr.worker.js +1 -1
  30. package/dist/cdn/index.js +1 -1
  31. package/dist/components/arcgis-arcade-editor/customElement.js +102 -98
  32. package/dist/docs/api.json +1 -1
  33. package/dist/docs/docs.json +1 -1
  34. package/dist/docs/web-types.json +1 -1
  35. package/package.json +5 -5
  36. package/dist/cdn/BNIBUH7W.js +0 -2
  37. package/dist/cdn/XK6ATIIK.js +0 -2
@@ -1,67 +1,67 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
2
  import { g as Z, c as ee } from "../../chunks/runtime.js";
3
- import { css as te, html as d, nothing as z } from "lit";
3
+ import { css as te, html as d, nothing as O } from "lit";
4
4
  import { i as se } from "../../chunks/monaco-importer.js";
5
- import { LitElement as ie, createEvent as N, safeClassMap as v } from "@arcgis/lumina";
6
- import { generateGuid as ae } from "@arcgis/toolkit/string";
7
- import { i as y, D as ne, e as K } from "../../chunks/arcade-executor.js";
8
- import { s as oe, a as re } from "../../chunks/arcade-service-accessors.js";
5
+ import { LitElement as ie, createEvent as z, safeClassMap as v } from "@arcgis/lumina";
6
+ import { getMinorVersion as ae, generateGuid as ne } from "@arcgis/toolkit/string";
7
+ import { i as E, D as oe, e as K } from "../../chunks/arcade-executor.js";
8
+ import { s as re, a as ce } from "../../chunks/arcade-service-accessors.js";
9
9
  import { b as $ } from "../../chunks/arcade-defaults.js";
10
- import { setArcadeAskAiBinding as B, arcadeAskAiCommandId as ce, arcadeQuickFixKind as le } from "../../chunks/arcade-mode.js";
11
- import { u as de } from "../../chunks/useT9n.js";
12
- import { createRef as H, ref as j } from "lit/directives/ref.js";
13
- import { load as ue } from "@arcgis/lumina/controllers";
14
- import he from "@arcgis/core/config.js";
10
+ import { setArcadeAskAiBinding as B, arcadeAskAiCommandId as le, arcadeQuickFixKind as de } from "../../chunks/arcade-mode.js";
11
+ import { u as ue } from "../../chunks/useT9n.js";
12
+ import { createRef as H, ref as V } from "lit/directives/ref.js";
13
+ import { load as he } from "@arcgis/lumina/controllers";
14
+ import ge from "@arcgis/core/config.js";
15
15
  import Q from "@arcgis/core/identity/IdentityManager.js";
16
- import { log as ge, rethrowError as u } from "@arcgis/toolkit/log";
16
+ import { log as pe, rethrowError as u } from "@arcgis/toolkit/log";
17
17
  import { watch as L } from "@arcgis/core/core/reactiveUtils.js";
18
18
  import f from "@arcgis/core/core/Accessor.js";
19
19
  import { property as c, subclass as x } from "@arcgis/core/core/accessorSupport/decorators.js";
20
- import { A as W } from "../../chunks/ArcadeDebuggerPreviewTabsState.js";
21
- import { r as pe } from "../../chunks/utilities.js";
22
- import { Range as V, KeyCode as be, Uri as _e } from "monaco-editor";
23
- const me = te`:host{height:100%}calcite-tooltip:not([calcite-hydrated])>*{display:none}.main-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm)}calcite-action-group calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action-group calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}.bottom-action-bar.is-collapsed{border-bottom:0}.bottom-action-bar{display:flex;.bottom-action-bar__actions{flex:1 1 auto;min-inline-size:0}}`, G = "https://services6.arcgis.com/HXHga6CfMLMBOlBX/ArcGIS/rest/services/survey123_6e349a50b4504ca6b6107216d568db5f_form/FeatureServer/0", h = (t, e) => {
24
- ge(t, "Arcade Assistant", e);
20
+ import { A as j } from "../../chunks/ArcadeDebuggerPreviewTabsState.js";
21
+ import { r as be } from "../../chunks/utilities.js";
22
+ import { Range as W, KeyCode as _e, Uri as me } from "monaco-editor";
23
+ const fe = te`:host{height:100%}calcite-tooltip:not([calcite-hydrated])>*{display:none}.main-action-bar{calcite-action-group{padding-inline-end:var(--calcite-spacing-sm)}calcite-action-group calcite-action{padding-inline-end:var(--calcite-spacing-sm)}calcite-action-group calcite-action:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}calcite-action-group:last-child{border-inline-end-width:0px}calcite-action-group:not(:first-child){padding-inline-start:var(--calcite-spacing-sm)}}.bottom-action-bar.is-collapsed{border-bottom:0}.bottom-action-bar{display:flex;.bottom-action-bar__actions{flex:1 1 auto;min-inline-size:0}}`, G = "https://services6.arcgis.com/HXHga6CfMLMBOlBX/ArcGIS/rest/services/survey123_6e349a50b4504ca6b6107216d568db5f_form/FeatureServer/0", h = (t, e) => {
24
+ pe(t, "Arcade Assistant", e);
25
25
  }, X = [
26
26
  "orgAiAssistantsEnabled",
27
27
  "betaAppsAllowed",
28
28
  "serviceUrlAvailable",
29
29
  "userHasUseAiAssistantsPrivilege"
30
- ], fe = X, q = (t, e) => e.every((s) => t[s] === !0), xe = (t) => {
30
+ ], xe = X, q = (t, e) => e.every((s) => t[s] === !0), Se = (t) => {
31
31
  const { aiAssistantsEnabled: e } = t;
32
32
  return e === void 0 ? (h("warn", "`areAiAssistantsEnabled` is not defined in the organizations settings."), !1) : e;
33
- }, Se = async (t) => (await Q.getCredential(t, { oAuthPopupConfirmation: !1 })).token, Ae = async (t) => {
33
+ }, Ae = async (t) => (await Q.getCredential(t, { oAuthPopupConfirmation: !1 })).token, Pe = async (t) => {
34
34
  try {
35
35
  return !!await Q.checkSignInStatus(t);
36
36
  } catch {
37
37
  return h("warn", "User is not signed in."), !1;
38
38
  }
39
39
  };
40
- async function Pe({
40
+ async function ve({
41
41
  portalUrl: t
42
42
  }) {
43
43
  t && h(
44
44
  "warn",
45
45
  "The arcadeAssistant property is deprecated. Set esriConfig.portalUrl instead of arcadeAssistant.portalUrl."
46
46
  );
47
- const e = t || he.portalUrl;
47
+ const e = t || ge.portalUrl;
48
48
  if (!e)
49
49
  return h("warn", "Arcade Assistant initialization failed. Reason: missing portal url."), { shouldRender: !1 };
50
50
  const s = e.replace(/\/sharing\/rest(\/.*)?$/iu, "").replace(/\/$/u, "");
51
- if (!await Ae(s))
51
+ if (!await Pe(s))
52
52
  return { shouldRender: !1 };
53
- const a = await Se(e), r = `${s}/sharing/rest/portals/self?f=json&token=${a}`, n = `${s}/sharing/rest/portals/self/settings?f=json&token=${a}`, o = `${s}/sharing/rest/portals/self/signinSettings?f=json&token=${a}`, b = await Promise.allSettled([
54
- fetch(r, { credentials: "include" }).then((P) => P.json()),
53
+ const a = await Ae(e), o = `${s}/sharing/rest/portals/self?f=json&token=${a}`, n = `${s}/sharing/rest/portals/self/settings?f=json&token=${a}`, r = `${s}/sharing/rest/portals/self/signinSettings?f=json&token=${a}`, b = await Promise.allSettled([
54
+ fetch(o, { credentials: "include" }).then((P) => P.json()),
55
55
  fetch(n, { credentials: "include" }).then((P) => P.json()),
56
- fetch(o, { credentials: "include" }).then((P) => P.json())
56
+ fetch(r, { credentials: "include" }).then((P) => P.json())
57
57
  ]), [S, R, I] = b, A = S.status === "fulfilled" ? S.value : (h("warn", `Failed to fetch selfUrl. Reason: ${S.reason}.`), {}), T = R.status === "fulfilled" ? R.value : (h("warn", `Failed to fetch settingsUrl. Reason: ${R.reason}.`), {}), J = I.status === "fulfilled" ? I.value : (h("warn", `Failed to fetch signinSettingsUrl. Reason: ${I.reason}.`), {});
58
- if (A.isPortal)
58
+ if (A.isPortal && !$e(A.enterpriseVersion))
59
59
  return { shouldRender: !1 };
60
60
  const M = A.helpBase || "";
61
61
  if (!T)
62
62
  return h("warn", "Settings response is not available."), { shouldRender: !1 };
63
63
  const k = {
64
- orgAiAssistantsEnabled: xe(T),
64
+ orgAiAssistantsEnabled: Se(T),
65
65
  betaAppsAllowed: J.blockBetaApps !== !0,
66
66
  serviceUrlAvailable: !!A?.helperServices?.aiAssistantServices?.url,
67
67
  userHasUseAiAssistantsPrivilege: A?.user?.privileges?.includes("portal:user:useAIAssistants") === !0
@@ -70,15 +70,15 @@ async function Pe({
70
70
  "warn",
71
71
  "Arcade Assistant is blocked by the organization settings. To enable it, do not block beta apps in the organization settings."
72
72
  ), k.userHasUseAiAssistantsPrivilege || h("warn", "User does not have the required privileges to use AI Assistants.");
73
- const F = q(k, fe), U = q(k, X), O = A?.helperServices?.aiAssistantServices?.url;
74
- return O ? {
73
+ const F = q(k, xe), U = q(k, X), N = A?.helperServices?.aiAssistantServices?.url;
74
+ return N ? {
75
75
  shouldRender: !0,
76
76
  portalUrl: e,
77
77
  availableFeatures: {
78
78
  codeActions: F,
79
79
  prompting: U
80
80
  },
81
- serviceUrl: O,
81
+ serviceUrl: N,
82
82
  helpBase: M,
83
83
  feedbackServiceUrl: G
84
84
  } : {
@@ -92,10 +92,14 @@ async function Pe({
92
92
  feedbackServiceUrl: G
93
93
  };
94
94
  }
95
- var ve = Object.defineProperty, $e = Object.getOwnPropertyDescriptor, m = (t, e, s, i) => {
96
- for (var a = i > 1 ? void 0 : i ? $e(e, s) : e, r = t.length - 1, n; r >= 0; r--)
97
- (n = t[r]) && (a = (i ? n(e, s, a) : n(a)) || a);
98
- return i && a && ve(e, s, a), a;
95
+ function $e(t) {
96
+ const e = ae(t), [s, i = "0"] = e.split("."), a = Number.parseInt(s, 10), o = Number.parseInt(i, 10);
97
+ return Number.isNaN(a) || Number.isNaN(o) ? !1 : a > 12 || a === 12 && o >= 2;
98
+ }
99
+ var Ee = Object.defineProperty, ye = Object.getOwnPropertyDescriptor, m = (t, e, s, i) => {
100
+ for (var a = i > 1 ? void 0 : i ? ye(e, s) : e, o = t.length - 1, n; o >= 0; o--)
101
+ (n = t[o]) && (a = (i ? n(e, s, a) : n(a)) || a);
102
+ return i && a && Ee(e, s, a), a;
99
103
  };
100
104
  const Y = 100;
101
105
  let g = class extends f {
@@ -171,13 +175,13 @@ let C = class extends f {
171
175
  const i = this.nodes.get(t);
172
176
  if (!i || i.status === "loading" || i.status === "loaded")
173
177
  return;
174
- const a = this.generation, r = i.requestId + 1;
175
- i.requestId = r, i.status = "loading", i.errorMessage = "", i.schemaValue = void 0, i.collectionItems = [], e().then((n) => {
176
- const o = this.nodes.get(t);
177
- !o || this.generation !== a || o.requestId !== r || (s(o, n), o.status = "loaded");
178
+ const a = this.generation, o = i.requestId + 1;
179
+ i.requestId = o, i.status = "loading", i.errorMessage = "", i.schemaValue = void 0, i.collectionItems = [], e().then((n) => {
180
+ const r = this.nodes.get(t);
181
+ !r || this.generation !== a || r.requestId !== o || (s(r, n), r.status = "loaded");
178
182
  }).catch(() => {
179
183
  const n = this.nodes.get(t);
180
- !n || this.generation !== a || n.requestId !== r || (n.status = "error");
184
+ !n || this.generation !== a || n.requestId !== o || (n.status = "error");
181
185
  });
182
186
  }
183
187
  destroyNodes() {
@@ -189,10 +193,10 @@ let C = class extends f {
189
193
  C = m([
190
194
  x("ArcadeDebuggerLazyTreeState")
191
195
  ], C);
192
- var ye = Object.defineProperty, Ee = Object.getOwnPropertyDescriptor, l = (t, e, s, i) => {
193
- for (var a = i > 1 ? void 0 : i ? Ee(e, s) : e, r = t.length - 1, n; r >= 0; r--)
194
- (n = t[r]) && (a = (i ? n(e, s, a) : n(a)) || a);
195
- return i && a && ye(e, s, a), a;
196
+ var De = Object.defineProperty, we = Object.getOwnPropertyDescriptor, l = (t, e, s, i) => {
197
+ for (var a = i > 1 ? void 0 : i ? we(e, s) : e, o = t.length - 1, n; o >= 0; o--)
198
+ (n = t[o]) && (a = (i ? n(e, s, a) : n(a)) || a);
199
+ return i && a && De(e, s, a), a;
196
200
  };
197
201
  let _ = class extends f {
198
202
  constructor(t) {
@@ -238,7 +242,7 @@ l([
238
242
  _ = l([
239
243
  x("ArcadeDebuggerExecutionModel")
240
244
  ], _);
241
- let E = class extends f {
245
+ let y = class extends f {
242
246
  constructor(t) {
243
247
  super(t), this.editorBreakpoints = [], this.executionBreakpoints = [];
244
248
  }
@@ -258,13 +262,13 @@ let E = class extends f {
258
262
  };
259
263
  l([
260
264
  c()
261
- ], E.prototype, "editorBreakpoints", 2);
265
+ ], y.prototype, "editorBreakpoints", 2);
262
266
  l([
263
267
  c()
264
- ], E.prototype, "executionBreakpoints", 2);
265
- E = l([
268
+ ], y.prototype, "executionBreakpoints", 2);
269
+ y = l([
266
270
  x("ArcadeDebuggerSessionModel")
267
- ], E);
271
+ ], y);
268
272
  let D = class extends f {
269
273
  constructor(t) {
270
274
  super(t), this.openedPanel = "output", this.showPanel = !1;
@@ -307,7 +311,7 @@ w = l([
307
311
  ], w);
308
312
  let p = class extends f {
309
313
  constructor(t) {
310
- super(t), this.execution = new _(), this.lazyTreeState = new C(), this.pausedFrame = new w(), this.previewTabsState = new W(), this.session = new E(), this.ui = new D();
314
+ super(t), this.execution = new _(), this.lazyTreeState = new C(), this.pausedFrame = new w(), this.previewTabsState = new j(), this.session = new y(), this.ui = new D();
311
315
  }
312
316
  get editorBreakpoints() {
313
317
  return this.session.editorBreakpoints;
@@ -391,7 +395,7 @@ let p = class extends f {
391
395
  this.execution.mode = "debug", this.execution.result = { resultType: "debug", result: t }, this.execution.phase = "completed", this.ui.openedPanel = "output", this.pausedFrame.reset(), this.resetTransientDebuggerState();
392
396
  }
393
397
  completeRun(t, e = {}) {
394
- this.execution.mode = "run", !e.useDebugRenderer && y(t) ? this.execution.result = { resultType: "run", result: t } : e.useDebugRenderer && !y(t) && (this.execution.result = { resultType: "debug", result: t }), this.execution.phase = "completed", this.pausedFrame.reset(), this.ui.openedPanel = "output", this.resetTransientDebuggerState();
398
+ this.execution.mode = "run", !e.useDebugRenderer && E(t) ? this.execution.result = { resultType: "run", result: t } : e.useDebugRenderer && !E(t) && (this.execution.result = { resultType: "debug", result: t }), this.execution.phase = "completed", this.pausedFrame.reset(), this.ui.openedPanel = "output", this.resetTransientDebuggerState();
395
399
  }
396
400
  continueDebug() {
397
401
  const t = this.pausedFrame.pausedState?.continue;
@@ -459,7 +463,7 @@ let p = class extends f {
459
463
  this.pausedLine = void 0, this.lazyTreeState.reset(), this.previewTabsState.clear();
460
464
  }
461
465
  replaceTransientDebuggerState() {
462
- this.pausedLine = void 0, this.lazyTreeState = new C(), this.previewTabsState = new W();
466
+ this.pausedLine = void 0, this.lazyTreeState = new C(), this.previewTabsState = new j();
463
467
  }
464
468
  };
465
469
  l([
@@ -486,15 +490,15 @@ l([
486
490
  p = l([
487
491
  x("ArcadeDebuggerStore")
488
492
  ], p);
489
- const De = {
493
+ const ke = {
490
494
  glyphMargin: !0,
491
495
  lineNumbersMinChars: 1
492
496
  };
493
- class we extends ie {
497
+ class Be extends ie {
494
498
  constructor() {
495
- super(...arguments), this._codeEditorElt = H(), this._arcadeAssistantElt = H(), this._componentReadyDefer = Promise.withResolvers(), this._disposables = [], this._editorProfilePromise = Promise.resolve(void 0), this._debuggerState = new p(), this.messages = de(), this._modelId = ae(), this._openArcadeHelp = () => {
496
- window.open(ne, "Arcade Help");
497
- }, this._decorations = void 0, this._monacoEditor = ue(se), this._editorOptions = {}, this._toggleSidePanel = (e) => {
499
+ super(...arguments), this._codeEditorElt = H(), this._arcadeAssistantElt = H(), this._componentReadyDefer = Promise.withResolvers(), this._disposables = [], this._editorProfilePromise = Promise.resolve(void 0), this._debuggerState = new p(), this.messages = ue(), this._modelId = ne(), this._openArcadeHelp = () => {
500
+ window.open(oe, "Arcade Help");
501
+ }, this._decorations = void 0, this._monacoEditor = he(se), this._editorOptions = {}, this._toggleSidePanel = (e) => {
498
502
  e.currentTarget instanceof HTMLElement && this._setOpenedSidePanel(e.currentTarget.dataset.panelName ?? "none");
499
503
  }, this._closeSidePanel = () => {
500
504
  this._setOpenedSidePanel("none");
@@ -503,7 +507,7 @@ class we extends ie {
503
507
  if (!e)
504
508
  return;
505
509
  const s = this._debuggerState.editorBreakpoints.map((i) => ({
506
- range: new V(i, 1, i, 1),
510
+ range: new W(i, 1, i, 1),
507
511
  options: {
508
512
  isWholeLine: !0,
509
513
  glyphMarginClassName: "arcgis-code-editor__breakpoint-glyph",
@@ -514,13 +518,13 @@ class we extends ie {
514
518
  this._decorations?.clear(), this._decorations = e.createDecorationsCollection(s);
515
519
  }, this._clearDebuggerDecorations = () => {
516
520
  this._decorations?.clear(), this._decorations = void 0, this._debuggerPausedLineDecoration?.clear(), this._debuggerPausedLineDecoration = void 0;
517
- }, this._debuggerPausedLineDecoration = void 0, this._preparingArcade = !1, this._arcadeAssistantRemoteState = { shouldRender: !1 }, this._diagnostics = [], this.enableDebugger = !1, this.hideDocumentationActions = !1, this.hideSideBar = !1, this.openedSidePanel = "none", this.script = "", this.sideActionBarExpanded = !1, this.disableAssistant = !1, this.arcgisDiagnosticsChange = N({ bubbles: !1 }), this.arcgisScriptChange = N({ bubbles: !1 });
521
+ }, this._debuggerPausedLineDecoration = void 0, this._preparingArcade = !1, this._arcadeAssistantRemoteState = { shouldRender: !1 }, this._diagnostics = [], this.enableDebugger = !1, this.hideDocumentationActions = !1, this.hideSideBar = !1, this.openedSidePanel = "none", this.script = "", this.sideActionBarExpanded = !1, this.disableAssistant = !1, this.arcgisDiagnosticsChange = z({ bubbles: !1 }), this.arcgisScriptChange = z({ bubbles: !1 });
518
522
  }
519
523
  static {
520
524
  this.properties = { _apiLibrary: 16, _editorProfile: 16, _preparingArcade: 16, _arcadeAssistantRemoteState: 16, _diagnostics: 16, editorInstance: 32, editorOptions: 0, enableDebugger: 5, hideDocumentationActions: 5, hideSideBar: 5, messageOverrides: 0, openedSidePanel: 3, profile: 0, script: 1, sideActionBarExpanded: 7, snippets: 0, suggestions: 0, testData: 0, customPanels: 0, disableAssistant: 5, arcadeAssistant: 0, externalExecutor: 0 };
521
525
  }
522
526
  static {
523
- this.styles = [me];
527
+ this.styles = [fe];
524
528
  }
525
529
  get _canExecute() {
526
530
  return !!(this.testData || this.externalExecutor);
@@ -533,7 +537,7 @@ class we extends ie {
533
537
  }
534
538
  get editorOptions() {
535
539
  return {
536
- ...De,
540
+ ...ke,
537
541
  ...this._editorOptions
538
542
  };
539
543
  }
@@ -548,7 +552,7 @@ class we extends ie {
548
552
  return { type: "error", value: "Missing editor profile", error: null };
549
553
  await this._componentReadyDefer.promise;
550
554
  const s = this._codeEditorElt.value?.value, i = await K(e.definition, s, this.testData, { mode: "run" });
551
- return y(i) ? i : { type: "error", value: "Unexpected debug result", error: null };
555
+ return E(i) ? i : { type: "error", value: "Unexpected debug result", error: null };
552
556
  }
553
557
  async setFocus() {
554
558
  await this._componentReadyDefer.promise, await this._codeEditorElt.value?.setFocus();
@@ -563,7 +567,7 @@ class we extends ie {
563
567
  }
564
568
  async load() {
565
569
  const e = Z("./assets");
566
- oe(e), await this._updateDataModelDeps(), this.manager.onLifecycle(() => (this.hasUpdated && this._connectMonacoCustomizations().catch(u(this)), () => {
570
+ re(e), await this._updateDataModelDeps(), this.manager.onLifecycle(() => (this.hasUpdated && this._connectMonacoCustomizations().catch(u(this)), () => {
567
571
  for (this._askAiBindingKey && (B(this._askAiBindingKey, void 0), this._askAiBindingKey = void 0); this._disposables.length; )
568
572
  this._disposables.pop()?.dispose();
569
573
  this._abortExternalExecution(), this._connectMonacoCustomizationsPromise = void 0, this._executeScriptAction = void 0, this._clearDebuggerDecorations(), this._debuggerState.disconnect();
@@ -586,15 +590,15 @@ class we extends ie {
586
590
  this._connectMonacoCustomizationsPromise = (async () => {
587
591
  if (!this.isConnected)
588
592
  return;
589
- const e = await re();
590
- this._disposables.push(e.onDiagnosticsChange((o) => {
591
- this._preparingArcade || (this._diagnostics = o.diagnostics, this.arcgisDiagnosticsChange.emit(o.diagnostics));
593
+ const e = await ce();
594
+ this._disposables.push(e.onDiagnosticsChange((r) => {
595
+ this._preparingArcade || (this._diagnostics = r.diagnostics, this.arcgisDiagnosticsChange.emit(r.diagnostics));
592
596
  })), this._canExecute && !this._executeScriptAction && this._addExecuteScriptAction(), this._syncAskAiAction();
593
597
  const s = L(() => this._debuggerState.editorBreakpoints, () => this._updateBreakpointsDecorations(), { sync: !0 }), i = L(() => this._debuggerState.debuggerLine, () => this._updateDebuggerPausedLineDecoration(), { sync: !0 }), a = L(() => this._debuggerState.consoleLogs.length, () => this.requestUpdate(), { sync: !0 });
594
598
  this._disposables.push({ dispose: () => s.remove() }, { dispose: () => i.remove() }, { dispose: () => a.remove() });
595
- const r = this.editorInstance?.onMouseDown((o) => this._onEditorMouseDown(o));
596
- r && this._disposables.push(r);
597
- const n = this.editorInstance?.onDidChangeModelContent((o) => this._onEditorModelContentChange(o));
599
+ const o = this.editorInstance?.onMouseDown((r) => this._onEditorMouseDown(r));
600
+ o && this._disposables.push(o);
601
+ const n = this.editorInstance?.onDidChangeModelContent((r) => this._onEditorModelContentChange(r));
598
602
  n && this._disposables.push(n), this._updateBreakpointsDecorations(), this._updateDebuggerPausedLineDecoration();
599
603
  })();
600
604
  try {
@@ -612,7 +616,7 @@ class we extends ie {
612
616
  _onEditorModelContentChange(e) {
613
617
  if (!this.enableDebugger || !this._debuggerState.editorBreakpoints.length || e.isFlush)
614
618
  return;
615
- const s = pe(this._debuggerState.editorBreakpoints, e.changes);
619
+ const s = be(this._debuggerState.editorBreakpoints, e.changes);
616
620
  s.length === this._debuggerState.editorBreakpoints.length && s.every((i, a) => i === this._debuggerState.editorBreakpoints[a]) || this._debuggerState.setBreakpoints(s);
617
621
  }
618
622
  _updateDebuggerPausedLineDecoration() {
@@ -623,7 +627,7 @@ class we extends ie {
623
627
  const s = this._debuggerState.debuggerLine;
624
628
  s != null ? this._debuggerPausedLineDecoration = e.createDecorationsCollection([
625
629
  {
626
- range: new V(s, 1, s, 1),
630
+ range: new W(s, 1, s, 1),
627
631
  options: {
628
632
  isWholeLine: !0,
629
633
  className: "arcgis-code-editor__debugger-paused-line",
@@ -666,26 +670,26 @@ class we extends ie {
666
670
  return { type: "error", value: "Missing external executor", error: null };
667
671
  const a = new AbortController();
668
672
  this._abortExternalExecution(), this._externalExecutionAbortController = a;
669
- const r = i.console ?? (() => {
673
+ const o = i.console ?? (() => {
670
674
  });
671
675
  try {
672
676
  if (e === "debug") {
673
- const { breakpoints: n, onDebugPause: o } = i;
674
- if (!n || !o)
677
+ const { breakpoints: n, onDebugPause: r } = i;
678
+ if (!n || !r)
675
679
  throw new Error("Missing debug execution options");
676
680
  return await this.externalExecutor.execute({
677
681
  mode: "debug",
678
682
  script: s,
679
- console: r,
683
+ console: o,
680
684
  signal: a.signal,
681
685
  breakpoints: n,
682
- onDebugPause: o
686
+ onDebugPause: r
683
687
  });
684
688
  }
685
689
  return await this.externalExecutor.execute({
686
690
  mode: "run",
687
691
  script: s,
688
- console: r,
692
+ console: o,
689
693
  signal: a.signal
690
694
  });
691
695
  } catch (n) {
@@ -727,34 +731,34 @@ class we extends ie {
727
731
  const a = e === "debug" ? this._debuggerState.startDebug() : this._debuggerState.startRun();
728
732
  setTimeout(() => {
729
733
  (async () => {
730
- const r = this._codeEditorElt.value?.value ?? this.script, n = {
734
+ const o = this._codeEditorElt.value?.value ?? this.script, n = {
731
735
  mode: e,
732
736
  console: (b) => this._debuggerState.addConsoleLog(b),
733
737
  breakpoints: e === "debug" ? this._debuggerState.debuggerBreakpoints : void 0
734
738
  };
735
739
  e === "debug" && (n.onDebugPause = this._handleDebugPause.bind(this, a));
736
- let o;
740
+ let r;
737
741
  if (i)
738
- o = await this._executeWithExternalExecutor(e, r, n);
742
+ r = await this._executeWithExternalExecutor(e, o, n);
739
743
  else if (s) {
740
744
  const b = await this._editorProfilePromise;
741
745
  if (!b) {
742
746
  this._debuggerState.fail({ type: "error", value: "Missing editor profile", error: null });
743
747
  return;
744
748
  }
745
- o = await K(b.definition, r, s, n);
749
+ r = await K(b.definition, o, s, n);
746
750
  } else
747
751
  return;
748
752
  if (a === this._debuggerState.sessionId) {
749
753
  if (e === "debug") {
750
- if (y(o)) {
751
- this._debuggerState.fail(o);
754
+ if (E(r)) {
755
+ this._debuggerState.fail(r);
752
756
  return;
753
757
  }
754
- this._debuggerState.completeDebug(o);
758
+ this._debuggerState.completeDebug(r);
755
759
  return;
756
760
  }
757
- y(o) ? this._debuggerState.completeRun(o) : i ? this._debuggerState.completeRun(o, { useDebugRenderer: !0 }) : this._debuggerState.fail({ type: "error", value: "Unexpected debug result", error: null });
761
+ E(r) ? this._debuggerState.completeRun(r) : i ? this._debuggerState.completeRun(r, { useDebugRenderer: !0 }) : this._debuggerState.fail({ type: "error", value: "Unexpected debug result", error: null });
758
762
  }
759
763
  })();
760
764
  }, 0);
@@ -789,7 +793,7 @@ class we extends ie {
789
793
  // An unique identifier for the action.
790
794
  id: "run-script",
791
795
  label: "Run Arcade Expression",
792
- keybindings: [be.F5],
796
+ keybindings: [_e.F5],
793
797
  contextMenuGroupId: "code",
794
798
  contextMenuOrder: 1,
795
799
  run: () => {
@@ -799,7 +803,7 @@ class we extends ie {
799
803
  e && (this._executeScriptAction = e, this._disposables.push(e));
800
804
  }
801
805
  _getAskAiBindingKey() {
802
- return _e.parse(this._modelId).toString();
806
+ return me.parse(this._modelId).toString();
803
807
  }
804
808
  _canRenderAskAiCodeActions() {
805
809
  const e = this._arcadeAssistantRemoteState;
@@ -818,7 +822,7 @@ class we extends ie {
818
822
  return [
819
823
  {
820
824
  title: s,
821
- kind: le,
825
+ kind: de,
822
826
  diagnostics: e.markers,
823
827
  isPreferred: !1,
824
828
  // isAI adds the sparkle and adds it to the hover menu, but it changes the
@@ -826,7 +830,7 @@ class we extends ie {
826
830
  // The sparkle doesn't explain what it does, and imo will cause confusion, thus we are opting to not use it for now.
827
831
  isAI: !1,
828
832
  command: {
829
- id: ce,
833
+ id: le,
830
834
  title: s,
831
835
  arguments: [i, this.messages.askarcadeassistantprompt ?? "Fix the errors in my script"]
832
836
  }
@@ -856,7 +860,7 @@ class we extends ie {
856
860
  }
857
861
  async _updateArcadeAssistantRemoteState() {
858
862
  const e = this.arcadeAssistant;
859
- this.disableAssistant ? this._arcadeAssistantRemoteState = { shouldRender: !1 } : this._arcadeAssistantRemoteState = await Pe(e ?? {}), this._syncAskAiAction();
863
+ this.disableAssistant ? this._arcadeAssistantRemoteState = { shouldRender: !1 } : this._arcadeAssistantRemoteState = await ve(e ?? {}), this._syncAskAiAction();
860
864
  }
861
865
  renderMainActionBar() {
862
866
  return this._usesBottomExecutionDrawer || !this._canExecute ? null : d`<calcite-action-bar class="main-action-bar" layout=horizontal scale=s expanded expand-disabled slot=top-action-bar><calcite-action-group scale=s><calcite-action .text=${this.messages.run ?? ""} text-enabled icon=play scale=s .loading=${this._preparingArcade} @click=${() => {
@@ -864,10 +868,10 @@ class we extends ie {
864
868
  }}></calcite-action>${this._debuggerState.result ? d`<calcite-action .text=${this.messages.lastresults ?? ""} .active=${this._debuggerState.showPanel} text-enabled icon=access-string-results icon-flip-rtl scale=s @click=${this._toggleShowExecutionPanel}></calcite-action>` : null}</calcite-action-group></calcite-action-bar>`;
865
869
  }
866
870
  renderMainPanel() {
867
- return d`<arcgis-code-editor slot=editor .editorOptions=${this.editorOptions} .language=${$.languageId} .value=${this.script ?? ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${j(this._codeEditorElt)}></arcgis-code-editor>`;
871
+ return d`<arcgis-code-editor slot=editor .editorOptions=${this.editorOptions} .language=${$.languageId} .value=${this.script ?? ""} .modelId=${this._modelId} @arcgisValueChange=${this._onCodeEditorValueChange} ${V(this._codeEditorElt)}></arcgis-code-editor>`;
868
872
  }
869
- renderAction({ id: e, label: s, icon: i, active: a, panelName: r, iconFlipRtl: n = !1, onClick: o = this._toggleSidePanel }) {
870
- return d`<calcite-action id=${e ?? z} .text=${s} .textEnabled=${this.sideActionBarExpanded} .icon=${i} .active=${a} @click=${o} data-panel-name=${r ?? z} .iconFlipRtl=${n}></calcite-action>${!this.sideActionBarExpanded && d`<calcite-tooltip .referenceElement=${e}><span>${s}</span></calcite-tooltip>` || ""}`;
873
+ renderAction({ id: e, label: s, icon: i, active: a, panelName: o, iconFlipRtl: n = !1, onClick: r = this._toggleSidePanel }) {
874
+ return d`<calcite-action id=${e ?? O} .text=${s} .textEnabled=${this.sideActionBarExpanded} .icon=${i} .active=${a} @click=${r} data-panel-name=${o ?? O} .iconFlipRtl=${n}></calcite-action>${!this.sideActionBarExpanded && d`<calcite-tooltip .referenceElement=${e}><span>${s}</span></calcite-tooltip>` || ""}`;
871
875
  }
872
876
  renderSideActionBar() {
873
877
  return this.hideSideBar ? null : d`<calcite-action-bar slot=side-action-bar class="side-action-bar" .expanded=${this.sideActionBarExpanded} position=end @calciteActionBarToggle=${this._toggleSideActionBarExpanded}><calcite-action-group>${this.renderAction({
@@ -917,7 +921,7 @@ class we extends ie {
917
921
  return d`<arcgis-language-api-panel slot=side-panel class=${v(e === "api" ? "" : "hidden")} .loading=${this._preparingArcade} .apiLibrary=${this._apiLibrary} .hideDocumentationActions=${this.hideDocumentationActions} @arcgisInternalItemSelected=${this._insertAsSnippet} @arcgisInternalClosePanel=${this._closeSidePanel} data-panel-name=none .closed=${e !== "api"}></arcgis-language-api-panel><arcgis-editor-variables slot=side-panel class=${v(e === "variables" ? "" : "hidden")} .loading=${this._preparingArcade} .modelId=${this._modelId} @arcgisInternalItemSelected=${this._insertAsText} @arcgisInternalClosePanel=${this._closeSidePanel} data-panel-name=none .variable=${this._editorProfile} .closed=${e !== "variables"} .messageOverrides=${{
918
922
  profileempty: this.messages.profileempty,
919
923
  profilevariables: this.messages.profilevariables
920
- }}></arcgis-editor-variables>${this.suggestions?.length && d`<arcgis-arcade-suggestions slot=side-panel class=${v(e === "suggestions" ? "" : "hidden")} .closed=${e !== "suggestions"} .suggestions=${this.suggestions} @arcgisInternalItemSelected=${this._insertAsText} @arcgisInternalClosePanel=${this._closeSidePanel} data-panel-name=none></arcgis-arcade-suggestions>` || ""}${s?.shouldRender && d`<arcgis-arcade-coding-assistant slot=side-panel class=${v(e === "arcade-assistant" ? "" : "hidden")} .closed=${e !== "arcade-assistant"} .insertText=${this._insertText.bind(this)} .closePanel=${this._closeSidePanel} .portalUrl=${s.portalUrl} .serviceUrl=${"serviceUrl" in s ? s.serviceUrl : void 0} .helpBase=${s.helpBase} .promptingEnabled=${this._canPromptWithArcadeAssistant()} .feedbackServiceUrl=${s.feedbackServiceUrl} .editorRef=${this.el} .appVersion=${this.arcadeAssistant?.appVersion} .disableQuestionAnswerLogging=${this.arcadeAssistant?.disableQuestionAnswerLogging} .diagnostics=${this._diagnostics} ${j(this._arcadeAssistantElt)}></arcgis-arcade-coding-assistant>` || ""}${this.customPanels?.map((i) => d`<calcite-flow slot=side-panel class=${v(e === i.id ? "" : "hidden")}>${i?.useFlows ? i.renderer?.({
924
+ }}></arcgis-editor-variables>${this.suggestions?.length && d`<arcgis-arcade-suggestions slot=side-panel class=${v(e === "suggestions" ? "" : "hidden")} .closed=${e !== "suggestions"} .suggestions=${this.suggestions} @arcgisInternalItemSelected=${this._insertAsText} @arcgisInternalClosePanel=${this._closeSidePanel} data-panel-name=none></arcgis-arcade-suggestions>` || ""}${s?.shouldRender && d`<arcgis-arcade-coding-assistant slot=side-panel class=${v(e === "arcade-assistant" ? "" : "hidden")} .closed=${e !== "arcade-assistant"} .insertText=${this._insertText.bind(this)} .closePanel=${this._closeSidePanel} .portalUrl=${s.portalUrl} .serviceUrl=${"serviceUrl" in s ? s.serviceUrl : void 0} .helpBase=${s.helpBase} .promptingEnabled=${this._canPromptWithArcadeAssistant()} .feedbackServiceUrl=${s.feedbackServiceUrl} .editorRef=${this.el} .appVersion=${this.arcadeAssistant?.appVersion} .disableQuestionAnswerLogging=${this.arcadeAssistant?.disableQuestionAnswerLogging} .diagnostics=${this._diagnostics} ${V(this._arcadeAssistantElt)}></arcgis-arcade-coding-assistant>` || ""}${this.customPanels?.map((i) => d`<calcite-flow slot=side-panel class=${v(e === i.id ? "" : "hidden")}>${i?.useFlows ? i.renderer?.({
921
925
  closePanel: this._toggleSidePanel,
922
926
  insertText: this._insertText.bind(this),
923
927
  closed: e !== i.id,
@@ -940,17 +944,17 @@ class we extends ie {
940
944
  return d`<arcgis-arcade-results slot=results-panel .openedResultPanel=${e} .loading=${this._debuggerState.isExecuting} .result=${this._debuggerState.runResult} .consoleLogs=${this._debuggerState.consoleLogs} @arcgisInternalOpenedResultPanelChange=${this._onResultPanelChange} @arcgisInternalClosePanel=${this._onExecutionPanelClose}></arcgis-arcade-results>`;
941
945
  }
942
946
  renderBottomExecutionBody() {
943
- const { showPanel: e, openedPanel: s, debugResult: i, isExecuting: a, mode: r } = this._debuggerState;
947
+ const { showPanel: e, openedPanel: s, debugResult: i, isExecuting: a, mode: o } = this._debuggerState;
944
948
  if (!e)
945
949
  return null;
946
950
  const n = s === "debug-console" ? "output" : s;
947
- return this.enableDebugger && s === "debug-console" ? d`<arcgis-arcade-debugger-console slot=results-panel .modelId=${this._modelId} .debuggerStore=${this._debuggerState}></arcgis-arcade-debugger-console>` : s === "output" && (r === "debug" || i) ? d`<arcgis-arcade-debugger-output .outputTitle=${this.messages.output} slot=results-panel .debuggerStore=${this._debuggerState} .result=${i}></arcgis-arcade-debugger-output>` : d`<arcgis-arcade-results slot=results-panel class="bottom-results" .openedResultPanel=${n} .loading=${s === "console" && this._debuggerState.isPaused ? !1 : a} .result=${this._debuggerState.runResult} .consoleLogs=${this._debuggerState.consoleLogs} hide-header @arcgisInternalOpenedResultPanelChange=${this._onResultPanelChange}></arcgis-arcade-results>`;
951
+ return this.enableDebugger && s === "debug-console" ? d`<arcgis-arcade-debugger-console slot=results-panel .modelId=${this._modelId} .debuggerStore=${this._debuggerState}></arcgis-arcade-debugger-console>` : s === "output" && (o === "debug" || i) ? d`<arcgis-arcade-debugger-output .outputTitle=${this.messages.output} slot=results-panel .debuggerStore=${this._debuggerState} .result=${i}></arcgis-arcade-debugger-output>` : d`<arcgis-arcade-results slot=results-panel class="bottom-results" .openedResultPanel=${n} .loading=${s === "console" && this._debuggerState.isPaused ? !1 : a} .result=${this._debuggerState.runResult} .consoleLogs=${this._debuggerState.consoleLogs} hide-header @arcgisInternalOpenedResultPanelChange=${this._onResultPanelChange}></arcgis-arcade-results>`;
948
952
  }
949
953
  renderBottomActionBar() {
950
954
  if (!this._usesBottomExecutionDrawer)
951
955
  return null;
952
- const { showPanel: e, hasExecuted: s, openedPanel: i, isDebugging: a, isPaused: r, isExecuting: n } = this._debuggerState, o = this.messages.continue ?? "Continue", b = this.messages.reset ?? "Reset", S = this.messages.stop ?? "Stop";
953
- return d`<div slot=bottom-action-bar class=${`main-action-bar bottom-action-bar ${e ? "" : "is-collapsed"}`}><calcite-action-bar class="bottom-action-bar__actions" layout=horizontal scale=s expand-disabled expanded><calcite-action-group scale=s>${this.enableDebugger && a ? d`<calcite-action id=debugger-continue-action .text=${o} icon=forward scale=s .disabled=${!r} @click=${this._continueDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-continue-action placement=top><span>${o}</span></calcite-tooltip><calcite-action id=debugger-reset-action .text=${b} icon=reset scale=s @click=${this._resetDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-reset-action placement=top><span>${b}</span></calcite-tooltip><calcite-action id=debugger-stop-action .text=${S} icon=circle-stop scale=s @click=${this._stopDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-stop-action placement=top><span>${S}</span></calcite-tooltip>` : d`<calcite-action .text=${this.messages.run ?? ""} text-enabled icon=play scale=s .loading=${this._preparingArcade || n} @click=${() => {
956
+ const { showPanel: e, hasExecuted: s, openedPanel: i, isDebugging: a, isPaused: o, isExecuting: n } = this._debuggerState, r = this.messages.continue ?? "Continue", b = this.messages.reset ?? "Reset", S = this.messages.stop ?? "Stop";
957
+ return d`<div slot=bottom-action-bar class=${`main-action-bar bottom-action-bar ${e ? "" : "is-collapsed"}`}><calcite-action-bar class="bottom-action-bar__actions" layout=horizontal scale=s expand-disabled expanded><calcite-action-group scale=s>${this.enableDebugger && a ? d`<calcite-action id=debugger-continue-action .text=${r} icon=forward scale=s .disabled=${!o} @click=${this._continueDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-continue-action placement=top><span>${r}</span></calcite-tooltip><calcite-action id=debugger-reset-action .text=${b} icon=reset scale=s @click=${this._resetDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-reset-action placement=top><span>${b}</span></calcite-tooltip><calcite-action id=debugger-stop-action .text=${S} icon=circle-stop scale=s @click=${this._stopDebugSession}></calcite-action><calcite-tooltip reference-element=debugger-stop-action placement=top><span>${S}</span></calcite-tooltip>` : d`<calcite-action .text=${this.messages.run ?? ""} text-enabled icon=play scale=s .loading=${this._preparingArcade || n} @click=${() => {
954
958
  this._executeScript("run").catch(u(this));
955
959
  }}></calcite-action>${this.enableDebugger && d`<calcite-action .disabled=${this._debuggerState.editorBreakpoints.length === 0} .text=${this.messages.runanddebug ?? "Run and Debug"} text-enabled icon=debug-script scale=s .loading=${this._preparingArcade || n} @click=${() => {
956
960
  this._executeScript("debug").catch(u(this));
@@ -960,7 +964,7 @@ class we extends ie {
960
964
  return d`<arcgis-code-editor-shell>${this.renderMainActionBar()}${this.renderMainPanel()}${this.renderBottomActionBar()}${this.renderResultsPanel()}${this.renderSidePanel()}${this.renderSideActionBar()}</arcgis-code-editor-shell>`;
961
965
  }
962
966
  }
963
- ee("arcgis-arcade-editor", we);
967
+ ee("arcgis-arcade-editor", Be);
964
968
  export {
965
- we as ArcgisArcadeEditor
969
+ Be as ArcgisArcadeEditor
966
970
  };