@arcgis/coding-components 4.30.0-next.87 → 4.30.0-next.88

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 (72) hide show
  1. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  2. package/dist/arcgis-coding-components/index.esm.js +2 -2
  3. package/dist/arcgis-coding-components/{p-9f808f2c.js → p-053e6e93.js} +3 -3
  4. package/dist/arcgis-coding-components/{p-4f19dcba.js → p-05f0fbe3.js} +2 -2
  5. package/dist/arcgis-coding-components/{p-2c2ceb89.js → p-1bde3872.js} +2 -2
  6. package/dist/arcgis-coding-components/{p-59edc8da.js → p-1ea550b5.js} +2 -2
  7. package/dist/arcgis-coding-components/{p-3cd3ac86.js → p-23a50e40.js} +10 -10
  8. package/dist/arcgis-coding-components/{p-7e829596.entry.js → p-57bf8e0d.entry.js} +2 -2
  9. package/dist/arcgis-coding-components/{p-3d787465.js → p-6191a108.js} +1 -1
  10. package/dist/arcgis-coding-components/{p-a601cf86.js → p-6ff6c6c0.js} +2 -2
  11. package/dist/arcgis-coding-components/{p-513dd114.js → p-75d64e6f.js} +2 -2
  12. package/dist/arcgis-coding-components/{p-f5deb79d.js → p-83bf0e32.js} +1 -1
  13. package/dist/arcgis-coding-components/{p-903a5f03.js → p-888440d0.js} +2 -2
  14. package/dist/arcgis-coding-components/{p-e3eaada6.js → p-b95fad89.js} +2 -2
  15. package/dist/cjs/{arcade-defaults-d85a2324.js → arcade-defaults-4c87490b.js} +20 -15
  16. package/dist/cjs/{arcade-mode-d73130a7.js → arcade-mode-0473fc46.js} +3 -3
  17. package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +204 -113
  18. package/dist/cjs/arcgis-coding-components.cjs.js +2 -2
  19. package/dist/cjs/{css-f3bb790e.js → css-51805364.js} +1 -1
  20. package/dist/cjs/{cssMode-0f4d1959.js → cssMode-4db3375d.js} +3 -3
  21. package/dist/cjs/{html-ba1a8679.js → html-98fcc6e0.js} +3 -3
  22. package/dist/cjs/{htmlMode-9b561517.js → htmlMode-08e8d082.js} +3 -3
  23. package/dist/cjs/{index-82f03a8a.js → index-a0f77388.js} +1 -1
  24. package/dist/cjs/index.cjs.js +3 -3
  25. package/dist/cjs/{javascript-5b1823aa.js → javascript-caafa8ac.js} +4 -4
  26. package/dist/cjs/{jsonMode-ccd5f6cd.js → jsonMode-9eb31d7e.js} +3 -3
  27. package/dist/cjs/loader.cjs.js +2 -2
  28. package/dist/cjs/{tsMode-7dff2308.js → tsMode-fbfa0c20.js} +3 -3
  29. package/dist/cjs/{typescript-7f8d1b9e.js → typescript-fb309e4d.js} +3 -3
  30. package/dist/components/arcade-api.js +4 -3
  31. package/dist/components/arcade-contribution.js +1 -1
  32. package/dist/components/arcade-defaults.js +1 -1
  33. package/dist/components/arcade-mode.js +1 -1
  34. package/dist/components/arcade-results.js +2 -2
  35. package/dist/components/arcade-suggestions.js +2 -2
  36. package/dist/components/arcade-variables.js +2 -2
  37. package/dist/components/arcgis-arcade-api.js +1 -1
  38. package/dist/components/arcgis-arcade-editor.js +2 -2
  39. package/dist/components/arcgis-arcade-results.js +1 -1
  40. package/dist/components/arcgis-arcade-suggestions.js +1 -1
  41. package/dist/components/arcgis-arcade-variables.js +1 -1
  42. package/dist/components/arcgis-assets.d.ts +1 -1
  43. package/dist/components/arcgis-assets.js +1 -1
  44. package/dist/components/arcgis-code-editor.js +1 -1
  45. package/dist/components/{chunk-63RMNUHL.js → chunk-IHYYRFLQ.js} +195 -107
  46. package/dist/components/code-editor.js +2 -2
  47. package/dist/components/fields.js +1 -1
  48. package/dist/components/index.js +1 -1
  49. package/dist/components/index2.js +11 -6
  50. package/dist/components/markdown.js +1 -1
  51. package/dist/components/useT9n.js +6 -4
  52. package/dist/components/utilities.js +1 -1
  53. package/dist/esm/{arcade-defaults-ba76eccb.js → arcade-defaults-72b210ad.js} +20 -15
  54. package/dist/esm/{arcade-mode-5825602d.js → arcade-mode-2c605ffa.js} +3 -3
  55. package/dist/esm/arcgis-arcade-api_6.entry.js +204 -113
  56. package/dist/esm/arcgis-coding-components.js +3 -3
  57. package/dist/esm/{css-6763a410.js → css-db024e9d.js} +1 -1
  58. package/dist/esm/{cssMode-e1a97726.js → cssMode-d5d91343.js} +3 -3
  59. package/dist/esm/{html-2fcb5e0d.js → html-d6a9fdc6.js} +3 -3
  60. package/dist/esm/{htmlMode-02c07834.js → htmlMode-e55abc8e.js} +3 -3
  61. package/dist/esm/{index-50fbefd4.js → index-5d6d5640.js} +1 -1
  62. package/dist/esm/index.js +3 -3
  63. package/dist/esm/{javascript-d530fdb9.js → javascript-07e29cbd.js} +4 -4
  64. package/dist/esm/{jsonMode-6a65324c.js → jsonMode-d9eb7871.js} +3 -3
  65. package/dist/esm/loader.js +3 -3
  66. package/dist/esm/{tsMode-4da5912a.js → tsMode-a8ddfcae.js} +3 -3
  67. package/dist/esm/{typescript-2b4a9ded.js → typescript-4bd853ce.js} +3 -3
  68. package/dist/loader/cdn.js +1 -1
  69. package/dist/loader/index.cjs.js +1 -1
  70. package/dist/loader/index.es2017.js +1 -1
  71. package/dist/loader/index.js +1 -1
  72. package/package.json +9 -9
@@ -1,14 +1,14 @@
1
1
  /*!
2
2
  * All material copyright Esri, All Rights Reserved, unless otherwise specified.
3
3
  * See https://js.arcgis.com/4.30/esri/copyright.txt for details.
4
- * v4.30.0-next.87
4
+ * v4.30.0-next.88
5
5
  */
6
6
  'use strict';
7
7
 
8
8
  Object.defineProperty(exports, '__esModule', { value: true });
9
9
 
10
- const index = require('./index-82f03a8a.js');
11
- const arcadeDefaults = require('./arcade-defaults-d85a2324.js');
10
+ const index = require('./index-a0f77388.js');
11
+ const arcadeDefaults = require('./arcade-defaults-4c87490b.js');
12
12
 
13
13
  async function colorizeCode(code) {
14
14
  return await arcadeDefaults.editor.colorize(code, "arcade", { tabSize: 2 });
@@ -2955,26 +2955,29 @@ function retrieveComponentMembers(component, isLit) {
2955
2955
  const constructor = component.constructor;
2956
2956
  const members = constructor.__registerControllers?.(component) ?? void 0;
2957
2957
  constructor.__registerControllers = void 0;
2958
- if (typeof members !== "object")
2958
+ if (typeof members !== "object") {
2959
2959
  throw new Error(
2960
2960
  "Failed to retrieve internal component meta. Make sure you have the useComponentsControllers() Rollup Plugin for Stencil Controllers configured in your Stencil config."
2961
2961
  );
2962
+ }
2962
2963
  component.manager.internals.members = members;
2963
2964
  }
2964
2965
  }
2965
2966
  var getLitProperties = (component) => component.constructor.elementProperties;
2966
2967
  function parsePropertyValue(value, type = 8 /* Any */) {
2967
2968
  const isComplex = value == null || typeof value === "object" || typeof value === "function";
2968
- if (isComplex)
2969
+ if (isComplex) {
2969
2970
  return value;
2970
- if ((type & 4 /* Boolean */) !== 0)
2971
+ }
2972
+ if ((type & 4 /* Boolean */) !== 0) {
2971
2973
  return value === "false" ? false : value === "" || !!value;
2972
- else if ((type & 2 /* Number */) !== 0)
2974
+ } else if ((type & 2 /* Number */) !== 0) {
2973
2975
  return Number.parseFloat(value);
2974
- else if ((type & 1 /* String */) !== 0)
2976
+ } else if ((type & 1 /* String */) !== 0) {
2975
2977
  return String(value);
2976
- else
2978
+ } else {
2977
2979
  return value;
2980
+ }
2978
2981
  }
2979
2982
  var makeMemberFilter = (filter) => (component) => {
2980
2983
  const members = component.manager.internals.members;
@@ -2984,12 +2987,13 @@ var getPropLikeMembers = makeMemberFilter(63 /* PropLike */);
2984
2987
  var getMemberType = (component, name) => component.manager.internals.members?.[name]?.[0];
2985
2988
  function getPropType(component, name) {
2986
2989
  const type = getMemberType(component, name);
2987
- if (type === void 0)
2990
+ if (type === void 0) {
2988
2991
  return void 0;
2989
- else if (type & 32 /* State */)
2992
+ } else if (type & 32 /* State */) {
2990
2993
  return "state";
2991
- else
2994
+ } else {
2992
2995
  return "prop";
2996
+ }
2993
2997
  }
2994
2998
 
2995
2999
  // src/types.ts
@@ -3014,14 +3018,17 @@ var ControllerInternals = class {
3014
3018
  const error = new Error(
3015
3019
  `Unable to resolve a controller from the provided value, so can't watch it's exports. ${unresolvableExports}`
3016
3020
  );
3017
- console.error(error);
3021
+ {
3022
+ console.error(error);
3023
+ }
3018
3024
  }
3019
3025
  return value;
3020
3026
  }
3021
3027
  await controller.ready;
3022
3028
  if (typeof watchExports === "function") {
3023
- if (controller.watchExports === void 0)
3029
+ if (controller.watchExports === void 0) {
3024
3030
  throw new Error(`The controller must implement watchExports method to support watching exports`);
3031
+ }
3025
3032
  const unsubscribe = controller.watchExports(
3026
3033
  (exports) => watchExports(exports, unsubscribe)
3027
3034
  );
@@ -3030,21 +3037,25 @@ var ControllerInternals = class {
3030
3037
  };
3031
3038
  this.useRef = async (value) => {
3032
3039
  const controller = this.useRefSync(value);
3033
- if (controller === void 0)
3040
+ if (controller === void 0) {
3034
3041
  throw new Error(`Unable to resolve a controller from the provided value. ${unresolvableExports}`);
3042
+ }
3035
3043
  await controller.ready;
3036
3044
  return controller;
3037
3045
  };
3038
3046
  this.useRefSync = (value) => {
3039
3047
  const ambientChildController = this.retrieveAmbientChildController();
3040
- if (ambientChildController !== void 0)
3048
+ if (ambientChildController !== void 0) {
3041
3049
  return ambientChildController;
3050
+ }
3042
3051
  const component = Controller.internals.retrieveComponent();
3043
3052
  const controller = component.manager.internals.resolveExports(value);
3044
- if (controller !== void 0)
3053
+ if (controller !== void 0) {
3045
3054
  return controller;
3046
- if (isController(value))
3055
+ }
3056
+ if (isController(value)) {
3047
3057
  return value;
3058
+ }
3048
3059
  return void 0;
3049
3060
  };
3050
3061
  this.shouldBypassSetter = false;
@@ -3062,16 +3073,18 @@ var ControllerInternals = class {
3062
3073
  * improve DX (avoids the need to pass "this" explicitly for each controller)
3063
3074
  */
3064
3075
  setAmbientComponent(component) {
3065
- if (this._ambientComponent === component)
3076
+ if (this._ambientComponent === component) {
3066
3077
  return;
3078
+ }
3067
3079
  this._ambientComponent = component;
3068
3080
  queueMicrotask(() => {
3069
- if (this._ambientComponent === component)
3081
+ if (this._ambientComponent === component) {
3070
3082
  this._ambientComponent = void 0;
3083
+ }
3071
3084
  });
3072
3085
  }
3073
3086
  retrieveComponent(name) {
3074
- if (this._ambientComponent === void 0)
3087
+ if (this._ambientComponent === void 0) {
3075
3088
  throw new Error(
3076
3089
  [
3077
3090
  `Unable to find out which component ${name || "this"} controller `,
@@ -3087,6 +3100,7 @@ var ControllerInternals = class {
3087
3100
  "You might also have multiple instances of Controllers loaded"
3088
3101
  ].join("\n")
3089
3102
  );
3103
+ }
3090
3104
  return this._ambientComponent;
3091
3105
  }
3092
3106
  /*
@@ -3111,12 +3125,14 @@ var ControllerInternals = class {
3111
3125
  * controller exports, rather than the controller itself
3112
3126
  */
3113
3127
  setAmbientChildController(controller) {
3114
- if (this._ambientChildController === controller)
3128
+ if (this._ambientChildController === controller) {
3115
3129
  return;
3130
+ }
3116
3131
  this._ambientChildController = controller;
3117
3132
  queueMicrotask(() => {
3118
- if (this._ambientChildController === controller)
3133
+ if (this._ambientChildController === controller) {
3119
3134
  this._ambientChildController = void 0;
3135
+ }
3120
3136
  });
3121
3137
  }
3122
3138
  retrieveAmbientChildController() {
@@ -3170,12 +3186,14 @@ var _Controller = class _Controller {
3170
3186
  });
3171
3187
  this.component.addController(this);
3172
3188
  _Controller.internals.setParentController(this);
3173
- if ("hostDestroy" in this)
3189
+ if ("hostDestroy" in this) {
3174
3190
  this.component.manager.ensureHasDestroy();
3191
+ }
3175
3192
  const manager = this.component.manager;
3176
3193
  const isInControllerManager = manager === void 0;
3177
- if (!isInControllerManager)
3194
+ if (!isInControllerManager) {
3178
3195
  queueMicrotask(() => this.catchUpLifecycle());
3196
+ }
3179
3197
  }
3180
3198
  /**
3181
3199
  * If controller is being added dynamically, after the component
@@ -3184,15 +3202,18 @@ var _Controller = class _Controller {
3184
3202
  catchUpLifecycle() {
3185
3203
  const { manager } = this.component;
3186
3204
  const connectedWillStillHappen = !manager.connectedCalled;
3187
- if (!connectedWillStillHappen && !this.connectedCalled)
3205
+ if (!connectedWillStillHappen && !this.connectedCalled) {
3188
3206
  this.triggerConnected();
3207
+ }
3189
3208
  const loadWillStillHappen = !manager.willLoadCalled;
3190
- if (loadWillStillHappen)
3209
+ if (loadWillStillHappen) {
3191
3210
  return;
3211
+ }
3192
3212
  this.triggerLoad().then(() => {
3193
3213
  const loadedWillStillHappen = !manager.didLoadCalled;
3194
- if (loadedWillStillHappen)
3214
+ if (loadedWillStillHappen) {
3195
3215
  return;
3216
+ }
3196
3217
  this.triggerLoaded();
3197
3218
  }).catch(console.error);
3198
3219
  }
@@ -3207,8 +3228,9 @@ var _Controller = class _Controller {
3207
3228
  set exports(exports) {
3208
3229
  if (this._exports !== exports) {
3209
3230
  this._exports = exports;
3210
- if (this.connectedCalled)
3231
+ if (this.connectedCalled) {
3211
3232
  this.component.requestUpdate();
3233
+ }
3212
3234
  this._exportWatchers.forEach(arcadeDefaults.safeCall);
3213
3235
  }
3214
3236
  this._ready.resolve(exports);
@@ -3364,10 +3386,11 @@ var _Controller = class _Controller {
3364
3386
  watch(property, callback) {
3365
3387
  var _a2;
3366
3388
  const type = getMemberType(this.component, property);
3367
- if (type === void 0)
3389
+ if (type === void 0) {
3368
3390
  throw new Error(
3369
3391
  `Trying to watch a non-@property, non-@state property "${property}". Either convert it into a @state() or use get/set syntax`
3370
3392
  );
3393
+ }
3371
3394
  const internals = this.component.manager.internals;
3372
3395
  (_a2 = internals.allWatchers)[property] ?? (_a2[property] = []);
3373
3396
  const watchers = internals.allWatchers[property];
@@ -3376,13 +3399,15 @@ var _Controller = class _Controller {
3376
3399
  watchers.push(safeCallback);
3377
3400
  return () => {
3378
3401
  const index = watchers.indexOf(safeCallback);
3379
- if (index !== -1)
3402
+ if (index !== -1) {
3380
3403
  watchers.splice(index, 1);
3404
+ }
3381
3405
  };
3382
3406
  }
3383
3407
  controllerRemoved() {
3384
- if (this.component.el.isConnected)
3408
+ if (this.component.el.isConnected) {
3385
3409
  this.triggerDisconnected();
3410
+ }
3386
3411
  this.triggerDestroy();
3387
3412
  }
3388
3413
  // Register a lifecycle callback
@@ -3410,68 +3435,80 @@ var _Controller = class _Controller {
3410
3435
  }
3411
3436
  onLifecycle(callback) {
3412
3437
  this._callbacks.hostLifecycle.push(callback);
3413
- if (this.connectedCalled && this.component.el.isConnected)
3438
+ if (this.connectedCalled && this.component.el.isConnected) {
3414
3439
  this._callLifecycle(callback);
3440
+ }
3415
3441
  }
3416
3442
  // Call each lifecycle hook
3417
3443
  triggerConnected() {
3418
3444
  const genericController = this;
3419
- if (genericController.hostConnected)
3445
+ if (genericController.hostConnected) {
3420
3446
  arcadeDefaults.safeCall(genericController.hostConnected, genericController);
3447
+ }
3421
3448
  this._callbacks.hostConnected.forEach(arcadeDefaults.safeCall);
3422
3449
  this.triggerLifecycle();
3423
3450
  this.connectedCalled = true;
3424
3451
  }
3425
3452
  triggerDisconnected() {
3426
3453
  const genericController = this;
3427
- if (genericController.hostDisconnected)
3454
+ if (genericController.hostDisconnected) {
3428
3455
  arcadeDefaults.safeCall(genericController.hostDisconnected, genericController);
3456
+ }
3429
3457
  this._callbacks.hostDisconnected.forEach(arcadeDefaults.safeCall);
3430
3458
  this._lifecycleDisconnected.forEach(arcadeDefaults.safeCall);
3431
3459
  this._lifecycleDisconnected = [];
3432
3460
  }
3433
3461
  async triggerLoad() {
3434
- if (this.willLoadCalled)
3462
+ if (this.willLoadCalled) {
3435
3463
  return;
3464
+ }
3436
3465
  this.willLoadCalled = true;
3437
3466
  const genericController = this;
3438
- if (genericController.hostLoad)
3467
+ if (genericController.hostLoad) {
3439
3468
  await arcadeDefaults.safeAsyncCall(genericController.hostLoad, genericController);
3440
- if (this._callbacks.hostLoad.length > 0)
3469
+ }
3470
+ if (this._callbacks.hostLoad.length > 0) {
3441
3471
  await Promise.allSettled(this._callbacks.hostLoad.map(arcadeDefaults.safeAsyncCall));
3472
+ }
3442
3473
  this._ready.resolve(this._exports);
3443
3474
  }
3444
3475
  triggerLoaded() {
3445
- if (this.didLoadCalled)
3476
+ if (this.didLoadCalled) {
3446
3477
  return;
3478
+ }
3447
3479
  const genericController = this;
3448
- if (genericController.hostLoaded)
3480
+ if (genericController.hostLoaded) {
3449
3481
  arcadeDefaults.safeCall(genericController.hostLoaded, genericController);
3482
+ }
3450
3483
  this._callbacks.hostLoaded.forEach(arcadeDefaults.safeCall);
3451
3484
  this.didLoadCalled = true;
3452
3485
  }
3453
3486
  triggerUpdate() {
3454
3487
  const genericController = this;
3455
- if (genericController.hostUpdate)
3488
+ if (genericController.hostUpdate) {
3456
3489
  arcadeDefaults.safeCall(genericController.hostUpdate, genericController);
3490
+ }
3457
3491
  this._callbacks.hostUpdate.forEach(arcadeDefaults.safeCall);
3458
3492
  }
3459
3493
  triggerUpdated() {
3460
3494
  const genericController = this;
3461
- if (genericController.hostUpdated)
3495
+ if (genericController.hostUpdated) {
3462
3496
  arcadeDefaults.safeCall(genericController.hostUpdated, genericController);
3497
+ }
3463
3498
  this._callbacks.hostUpdated.forEach(arcadeDefaults.safeCall);
3464
3499
  }
3465
3500
  triggerDestroy() {
3466
3501
  const genericController = this;
3467
- if (genericController.hostDestroy)
3502
+ if (genericController.hostDestroy) {
3468
3503
  arcadeDefaults.safeCall(genericController.hostDestroy, genericController);
3504
+ }
3469
3505
  this._callbacks.hostDestroy.forEach(arcadeDefaults.safeCall);
3470
3506
  }
3471
3507
  triggerLifecycle() {
3472
3508
  const genericController = this;
3473
- if (genericController.hostLifecycle)
3509
+ if (genericController.hostLifecycle) {
3474
3510
  this._callLifecycle(() => genericController.hostLifecycle());
3511
+ }
3475
3512
  this._callbacks.hostLifecycle.forEach((callback) => this._callLifecycle(callback));
3476
3513
  }
3477
3514
  _callLifecycle(callback) {
@@ -3479,10 +3516,11 @@ var _Controller = class _Controller {
3479
3516
  const cleanupRaw = arcadeDefaults.safeCall(callback);
3480
3517
  const cleanup = Array.isArray(cleanupRaw) ? cleanupRaw : [cleanupRaw];
3481
3518
  cleanup.forEach((cleanup2) => {
3482
- if (typeof cleanup2 === "function")
3519
+ if (typeof cleanup2 === "function") {
3483
3520
  this._lifecycleDisconnected.push(cleanup2);
3484
- else if (typeof cleanup2 === "object" && typeof cleanup2.remove === "function")
3521
+ } else if (typeof cleanup2 === "object" && typeof cleanup2.remove === "function") {
3485
3522
  this._lifecycleDisconnected.push(cleanup2.remove);
3523
+ }
3486
3524
  });
3487
3525
  }
3488
3526
  };
@@ -3506,14 +3544,17 @@ var GenericController = class extends Controller {
3506
3544
  }
3507
3545
  };
3508
3546
  function makeProvisionalValue(base) {
3509
- if (typeof base !== "object" && typeof base !== "function" || base === null)
3547
+ if (typeof base !== "object" && typeof base !== "function" || base === null) {
3510
3548
  return base;
3549
+ }
3511
3550
  const proxy2 = new Proxy(base, {
3512
3551
  get(target, prop, receiver) {
3513
- if (cyclical.has(prop) && prop in target && target[prop] === proxy2)
3552
+ if (cyclical.has(prop) && prop in target && target[prop] === proxy2) {
3514
3553
  return void 0;
3515
- if (prop in target || prop in Promise.prototype || typeof prop === "symbol")
3554
+ }
3555
+ if (prop in target || prop in Promise.prototype || typeof prop === "symbol") {
3516
3556
  return typeof target === "function" ? target[prop] : Reflect.get(target, prop, receiver);
3557
+ }
3517
3558
  console.error(`Trying to access "${prop.toString()}" on the controller before it's loaded. ${accessBeforeLoad}`);
3518
3559
  return void 0;
3519
3560
  },
@@ -3527,19 +3568,21 @@ function makeProvisionalValue(base) {
3527
3568
  var cyclical = /* @__PURE__ */ new Set(["exports", "_exports"]);
3528
3569
  var accessBeforeLoad = "" ;
3529
3570
  function toControllerHost(component) {
3530
- if ("addController" in component)
3571
+ if ("addController" in component) {
3531
3572
  return component;
3532
- else
3573
+ } else {
3533
3574
  throw new Error(
3534
3575
  "Component does not implement ControllerHost. This might be because you forgot to add 'manager: Controller<this> = useControllerManager(this);' in your component, or you tried to use some controller before that line"
3535
3576
  );
3577
+ }
3536
3578
  }
3537
3579
  var ignoreSet = (_, value) => value;
3538
3580
  function trackPropertyKey(object, onResolved, defaultValue) {
3539
3581
  const keys = Object.keys(object);
3540
3582
  const keyCount = keys.length;
3541
- if (keyTrackMap === void 0)
3583
+ if (keyTrackMap === void 0) {
3542
3584
  queueMicrotask(keyTrackResolve);
3585
+ }
3543
3586
  keyTrackMap ?? (keyTrackMap = /* @__PURE__ */ new Map());
3544
3587
  let pendingTrackers = keyTrackMap.get(object);
3545
3588
  if (pendingTrackers === void 0) {
@@ -3554,12 +3597,13 @@ function trackPropertyKey(object, onResolved, defaultValue) {
3554
3597
  pendingTrackers.callbacks.push((keys2) => {
3555
3598
  const callback = (key2) => arcadeDefaults.safeCall(onResolved, null, key2);
3556
3599
  const key = keys2[keyCount];
3557
- if (key === void 0)
3600
+ if (key === void 0) {
3558
3601
  callback(void 0);
3559
- else if (object[key] === defaultValue)
3602
+ } else if (object[key] === defaultValue) {
3560
3603
  callback(key);
3561
- else
3604
+ } else {
3562
3605
  callback(void 0);
3606
+ }
3563
3607
  });
3564
3608
  return defaultValue;
3565
3609
  }
@@ -3590,10 +3634,12 @@ var ComponentInternals = class {
3590
3634
  let leftToResolve = candidateHosts.length + 1;
3591
3635
  const resolved = (resolution) => {
3592
3636
  leftToResolve -= 1;
3593
- if (resolution !== void 0)
3637
+ if (resolution !== void 0) {
3594
3638
  leftToResolve = 0;
3595
- if (leftToResolve === 0)
3639
+ }
3640
+ if (leftToResolve === 0) {
3596
3641
  onResolved(resolution);
3642
+ }
3597
3643
  };
3598
3644
  candidateHosts.forEach(
3599
3645
  (host) => this.component.manager.trackPropertyKey(
@@ -3623,10 +3669,12 @@ var ComponentInternals = class {
3623
3669
  return defaultValue;
3624
3670
  };
3625
3671
  this.trackPropKey = (onResolved, defaultValue) => {
3626
- if (this._trackedValue !== nothing && this._trackedValue !== defaultValue)
3672
+ if (this._trackedValue !== nothing && this._trackedValue !== defaultValue) {
3627
3673
  this._firePropertyTrackers(void 0, void 0, void 0);
3628
- if (this._keyTrackers.length === 0)
3674
+ }
3675
+ if (this._keyTrackers.length === 0) {
3629
3676
  queueMicrotask(() => this._firePropertyTrackers(void 0, void 0, void 0));
3677
+ }
3630
3678
  this._trackedValue = defaultValue;
3631
3679
  this._keyTrackers.push(
3632
3680
  (key, value, previousValue) => arcadeDefaults.safeCall(onResolved, void 0, defaultValue === value ? key : void 0, previousValue)
@@ -3667,43 +3715,50 @@ var ComponentInternals = class {
3667
3715
  const component = this.component;
3668
3716
  const classPrototype = component.constructor.prototype;
3669
3717
  this._getSetProxy(classPrototype, property, hasGetter, hasSetter, "class");
3670
- if (component.manager.isLit)
3718
+ if (component.manager.isLit) {
3671
3719
  return;
3720
+ }
3672
3721
  const htmlPrototype = component.el.constructor.prototype;
3673
- if (classPrototype !== htmlPrototype)
3722
+ if (classPrototype !== htmlPrototype) {
3674
3723
  this._getSetProxy(htmlPrototype, property, hasGetter, hasSetter, "html");
3724
+ }
3675
3725
  }
3676
3726
  _getSetProxy(prototype, name, hasGetter, hasSetter, type) {
3677
3727
  const component = this.component;
3678
3728
  const propType = getMemberType(component, name);
3679
3729
  const descriptor = Object.getOwnPropertyDescriptor(prototype, name);
3680
3730
  const tolerateNotFound = type === "html";
3681
- if (descriptor?.set === void 0 || descriptor.get === void 0)
3682
- if (descriptor !== void 0 && "value" in descriptor)
3731
+ if (descriptor?.set === void 0 || descriptor.get === void 0) {
3732
+ if (descriptor !== void 0 && "value" in descriptor) {
3683
3733
  throw new Error(
3684
3734
  `getSet() should only be used on @Prop/@property/@State/@state properties. For internal component properties, use regular get/set syntax. Tried to use it on "${name}" in ${component.el.tagName}`
3685
3735
  );
3686
- else if (tolerateNotFound)
3736
+ } else if (tolerateNotFound) {
3687
3737
  return;
3688
- else
3738
+ } else {
3689
3739
  throw new Error(`Unable to find "${name}" property on the ${component.el.tagName} component`);
3740
+ }
3741
+ }
3690
3742
  const { get: originalGet, set: originalSet } = descriptor;
3691
3743
  const isGetterAlreadyOverwritten = customAccessor in originalGet;
3692
3744
  const isSetterAlreadyOverwritten = customAccessor in originalSet;
3693
3745
  const shouldOverwriteGet = !isGetterAlreadyOverwritten && hasGetter;
3694
3746
  const shouldOverwriteSet = !isSetterAlreadyOverwritten && hasSetter;
3695
- if (!shouldOverwriteGet && !shouldOverwriteSet)
3747
+ if (!shouldOverwriteGet && !shouldOverwriteSet) {
3696
3748
  return;
3749
+ }
3697
3750
  const finalGetter = shouldOverwriteGet ? function getter() {
3698
3751
  let value = originalGet.call(this);
3699
3752
  const component2 = Controller.internals.elementToInstance.get(this);
3700
- if (Controller.internals.shouldBypassGetter || component2 === void 0)
3753
+ if (Controller.internals.shouldBypassGetter || component2 === void 0) {
3701
3754
  return value;
3755
+ }
3702
3756
  const internals = component2.manager.internals;
3703
3757
  value = internals.accessorGetter[name](value, name);
3704
3758
  const getters = internals.getters[name] ?? emptyArray;
3705
- for (let i = 0; i < getters.length; i++)
3759
+ for (let i = 0; i < getters.length; i++) {
3706
3760
  value = getters[i](value, name);
3761
+ }
3707
3762
  return value;
3708
3763
  } : originalGet;
3709
3764
  const finalSetter = shouldOverwriteSet ? function setter(rawNewValue) {
@@ -3715,27 +3770,32 @@ var ComponentInternals = class {
3715
3770
  }
3716
3771
  let newValue = component2.manager.isLit ? rawNewValue : parsePropertyValue(rawNewValue, propType);
3717
3772
  const internals = component2.manager.internals;
3718
- if (newValue === oldValue)
3773
+ if (newValue === oldValue) {
3719
3774
  originalSet.call(this, rawNewValue);
3720
- else {
3775
+ } else {
3721
3776
  const setters = Controller.internals.shouldBypassSetter ? emptyArray : internals.setters[name] ?? emptyArray;
3722
3777
  for (let i = 0; i < setters.length; i++) {
3723
3778
  newValue = setters[i](newValue, oldValue, name);
3724
- if (newValue === oldValue)
3779
+ if (newValue === oldValue) {
3725
3780
  break;
3781
+ }
3726
3782
  }
3727
3783
  newValue = internals.accessorSetter[name](newValue, oldValue, name);
3728
3784
  originalSet.call(this, newValue);
3729
- if (newValue !== oldValue)
3785
+ if (newValue !== oldValue) {
3730
3786
  internals.enabledWatchers[name]?.forEach((watcher) => watcher(newValue, oldValue, name));
3787
+ }
3731
3788
  }
3732
- if (internals._keyTrackers.length > 0)
3789
+ if (internals._keyTrackers.length > 0) {
3733
3790
  internals?._firePropertyTrackers(name, rawNewValue, oldValue);
3791
+ }
3734
3792
  } : originalSet;
3735
- if (shouldOverwriteGet)
3793
+ if (shouldOverwriteGet) {
3736
3794
  Object.defineProperty(finalGetter, customAccessor, { value: true });
3737
- if (shouldOverwriteSet)
3795
+ }
3796
+ if (shouldOverwriteSet) {
3738
3797
  Object.defineProperty(finalSetter, customAccessor, { value: true });
3798
+ }
3739
3799
  Object.defineProperty(prototype, name, {
3740
3800
  ...descriptor,
3741
3801
  get: finalGetter,
@@ -3747,14 +3807,16 @@ var ComponentInternals = class {
3747
3807
  * controller.use
3748
3808
  */
3749
3809
  markExports(controller, exports) {
3750
- if (typeof exports === "object" && exports !== null || typeof exports === "function")
3810
+ if (typeof exports === "object" && exports !== null || typeof exports === "function") {
3751
3811
  this._exports.set(exports, controller);
3812
+ }
3752
3813
  }
3753
3814
  resolveExports(exports) {
3754
- if (typeof exports === "object" && exports !== null || typeof exports === "function")
3815
+ if (typeof exports === "object" && exports !== null || typeof exports === "function") {
3755
3816
  return this._exports.get(exports);
3756
- else
3817
+ } else {
3757
3818
  return void 0;
3819
+ }
3758
3820
  }
3759
3821
  };
3760
3822
  var emptyArray = [];
@@ -3767,8 +3829,9 @@ var ControllerManager = class extends GenericController {
3767
3829
  const controllers = /* @__PURE__ */ new Set();
3768
3830
  function addController(controller) {
3769
3831
  controllers.add(controller);
3770
- if (isLit && !(controllerSymbol in controller) && component.el.isConnected)
3832
+ if (isLit && !(controllerSymbol in controller) && component.el.isConnected) {
3771
3833
  controller.hostConnected?.();
3834
+ }
3772
3835
  }
3773
3836
  function removeController(controller) {
3774
3837
  void controllers.delete(controller);
@@ -3830,21 +3893,24 @@ var ControllerManager = class extends GenericController {
3830
3893
  */
3831
3894
  this.trackKey = this.internals.trackKey;
3832
3895
  this._readonlySetter = (newValue, oldValue, property) => {
3833
- if (Controller.internals.shouldBypassReadonly)
3896
+ if (Controller.internals.shouldBypassReadonly) {
3834
3897
  return newValue;
3898
+ }
3835
3899
  const component = this.component;
3836
3900
  const isProp = getPropType(component, property) === "prop";
3837
3901
  if (isProp) {
3838
3902
  if (this.isLit) {
3839
3903
  const details = getLitProperties(component).get(property);
3840
- if (details && details?.attribute !== false)
3904
+ if (details && details?.attribute !== false) {
3841
3905
  component.el.setAttribute(
3842
3906
  typeof details.attribute === "string" ? details.attribute : arcadeDefaults.camelToKebab(property),
3843
3907
  // Not using converter.toAttribute to keep this unlikely case simpler
3844
3908
  String(oldValue)
3845
3909
  );
3846
- } else
3910
+ }
3911
+ } else {
3847
3912
  component.requestUpdate();
3913
+ }
3848
3914
  }
3849
3915
  throw new Error(
3850
3916
  `Cannot assign to read-only property "${property}" of ${component.el.tagName.toLowerCase()}. Trying to assign "${String(
@@ -3866,13 +3932,15 @@ var ControllerManager = class extends GenericController {
3866
3932
  this._controllers = controllers;
3867
3933
  this.exports = void 0;
3868
3934
  this.hasDestroy = "autoDestroyDisabled" in this.component && typeof this.component.destroy === "function";
3869
- if (this.hasDestroy)
3935
+ if (this.hasDestroy) {
3870
3936
  this.watch("autoDestroyDisabled", () => this._autoDestroyDisabledWatcher());
3937
+ }
3871
3938
  this._bindLifecycleMethods();
3872
- if (!isLit)
3939
+ if (!isLit) {
3873
3940
  Object.defineProperty(component, "updateComplete", {
3874
3941
  get: async () => await this._updatePromise.promise
3875
3942
  });
3943
+ }
3876
3944
  const members = getPropLikeMembers(component);
3877
3945
  const internals = component.manager.internals;
3878
3946
  members.forEach((name) => {
@@ -3902,7 +3970,7 @@ var ControllerManager = class extends GenericController {
3902
3970
  const hostDisconnected = this._disconnectedCallback.bind(this);
3903
3971
  const hostUpdate = this._update.bind(this);
3904
3972
  const hostUpdated = this._updated.bind(this);
3905
- if (isLit)
3973
+ if (isLit) {
3906
3974
  component.constructor.prototype.addController.call(component, {
3907
3975
  // Lit will call these callbacks
3908
3976
  hostConnected,
@@ -3910,7 +3978,7 @@ var ControllerManager = class extends GenericController {
3910
3978
  hostUpdate,
3911
3979
  hostUpdated
3912
3980
  });
3913
- else {
3981
+ } else {
3914
3982
  component.connectedCallback = hostConnected;
3915
3983
  component.disconnectedCallback = hostDisconnected;
3916
3984
  component.componentWillLoad = this._load.bind(this);
@@ -3918,16 +3986,18 @@ var ControllerManager = class extends GenericController {
3918
3986
  component.componentWillUpdate = hostUpdate;
3919
3987
  component.componentDidUpdate = hostUpdated;
3920
3988
  }
3921
- if (this.hasDestroy)
3989
+ if (this.hasDestroy) {
3922
3990
  component.destroy = this.destroy.bind(this);
3991
+ }
3923
3992
  }
3924
3993
  /**
3925
3994
  * Throws an error if component does not implement destroy() lifecycle, but
3926
3995
  * tries to use it.
3927
3996
  */
3928
3997
  ensureHasDestroy() {
3929
- if (!this.hasDestroy)
3998
+ if (!this.hasDestroy) {
3930
3999
  throw new Error(destroyErrorMessage);
4000
+ }
3931
4001
  }
3932
4002
  /**
3933
4003
  * Private because this is not supposed to be called by Component directly.
@@ -3942,8 +4012,9 @@ var ControllerManager = class extends GenericController {
3942
4012
  `The ${tagName} component has already been destroyed. It can not be used again. If you meant to disconnect and reconnect a component without automatic destroy, set the autoDestroyDisabled prop.`
3943
4013
  );
3944
4014
  }
3945
- if (this._autoDestroyTimeout !== void 0)
4015
+ if (this._autoDestroyTimeout !== void 0) {
3946
4016
  clearTimeout(this._autoDestroyTimeout);
4017
+ }
3947
4018
  this.internals.enabledWatchers = this.internals.allWatchers;
3948
4019
  keyTrackResolve();
3949
4020
  this._controllers.forEach(
@@ -3952,23 +4023,26 @@ var ControllerManager = class extends GenericController {
3952
4023
  this._originalLifecycles.connectedCallback?.call(this.component);
3953
4024
  }
3954
4025
  _disconnectedCallback() {
3955
- if (this.destroyed)
4026
+ if (this.destroyed) {
3956
4027
  return;
4028
+ }
3957
4029
  this._controllers.forEach(
3958
4030
  (controller) => "triggerDisconnected" in controller ? controller.triggerDisconnected() : arcadeDefaults.safeCall(controller.hostDisconnected, controller)
3959
4031
  );
3960
4032
  this._originalLifecycles.disconnectedCallback?.call(this.component);
3961
- if (this.hasDestroy)
4033
+ if (this.hasDestroy) {
3962
4034
  this._autoDestroyDisabledWatcher();
4035
+ }
3963
4036
  }
3964
4037
  async _load() {
3965
4038
  const integrations = this.internals.reactiveUtilsIntegrations;
3966
4039
  if (integrations.size > 0) {
3967
4040
  for (const controller of integrations) {
3968
- if ("triggerLoad" in controller)
4041
+ if ("triggerLoad" in controller) {
3969
4042
  await controller.triggerLoad();
3970
- else
4043
+ } else {
3971
4044
  await arcadeDefaults.safeAsyncCall(controller.hostLoad, controller);
4045
+ }
3972
4046
  }
3973
4047
  }
3974
4048
  await Promise.allSettled(
@@ -4004,8 +4078,9 @@ var ControllerManager = class extends GenericController {
4004
4078
  }
4005
4079
  async destroy() {
4006
4080
  this.ensureHasDestroy();
4007
- if (this.destroyed)
4081
+ if (this.destroyed) {
4008
4082
  return;
4083
+ }
4009
4084
  if (this.component.el.isConnected) {
4010
4085
  this.hasDestroy = false;
4011
4086
  try {
@@ -4024,10 +4099,13 @@ var ControllerManager = class extends GenericController {
4024
4099
  }
4025
4100
  _autoDestroyDisabledWatcher() {
4026
4101
  if (!this.component.el.isConnected && !this.component.autoDestroyDisabled) {
4027
- if (this._autoDestroyTimeout !== void 0)
4102
+ if (this._autoDestroyTimeout !== void 0) {
4028
4103
  clearTimeout(this._autoDestroyTimeout);
4104
+ }
4029
4105
  const destroy = () => void this.destroy().catch(console.error);
4030
- this._autoDestroyTimeout = arcadeDefaults.devToolsAwareTimeout(destroy, autoDestroyOnDisconnectTimeout);
4106
+ {
4107
+ this._autoDestroyTimeout = arcadeDefaults.devToolsAwareTimeout(destroy, autoDestroyOnDisconnectTimeout);
4108
+ }
4031
4109
  }
4032
4110
  }
4033
4111
  // REFACTOR: replace this with a readonly:true option in @property()
@@ -4078,10 +4156,11 @@ var ControllerManager = class extends GenericController {
4078
4156
  getSet(defaultValue, getSet) {
4079
4157
  return this.component.manager.trackPropKey((name) => {
4080
4158
  var _a2;
4081
- if (name === void 0)
4159
+ if (name === void 0) {
4082
4160
  throw new Error(
4083
4161
  "Unable to resolve get/set's prop name. Make sure you are using it like @Prop() someProp = this.manager.getSet(defaultValue,{get,set})"
4084
4162
  );
4163
+ }
4085
4164
  if (getSet.set === this._readonlySetter) {
4086
4165
  (_a2 = this.internals).readonlyProps ?? (_a2.readonlyProps = /* @__PURE__ */ new Set());
4087
4166
  this.internals.readonlyProps.add(name);
@@ -4092,20 +4171,22 @@ var ControllerManager = class extends GenericController {
4092
4171
  const initialSet = getSet.initialSet ?? true;
4093
4172
  if (value != null && value !== defaultValue && typeof getSet.set === "function" && initialSet && !isStencilHotReload) {
4094
4173
  const newValue = getSet.set(value, defaultValue, name);
4095
- if (newValue !== value)
4096
- if (this.isLit)
4174
+ if (newValue !== value) {
4175
+ if (this.isLit) {
4097
4176
  genericComponent[name] = newValue;
4098
- else {
4177
+ } else {
4099
4178
  let firstConnected = true;
4100
4179
  this.onConnected(() => {
4101
- if (!firstConnected)
4180
+ if (!firstConnected) {
4102
4181
  return;
4182
+ }
4103
4183
  firstConnected = true;
4104
4184
  this.bypassSetter(() => {
4105
4185
  genericComponent[name] = newValue;
4106
4186
  });
4107
4187
  });
4108
4188
  }
4189
+ }
4109
4190
  }
4110
4191
  this.genericGetSet(name, getSet);
4111
4192
  }, defaultValue);
@@ -4142,29 +4223,34 @@ function setProxy(controller, { host, key, type }, initialExports) {
4142
4223
  const controllerValueChanged = genericHost[key] !== controller.exports;
4143
4224
  const hostValueChanged = genericHost[key] !== initialExports;
4144
4225
  const controllerUpdatedExports = initialExports !== controller.exports;
4145
- if (controllerValueChanged && !hostValueChanged && controllerUpdatedExports)
4226
+ if (controllerValueChanged && !hostValueChanged && controllerUpdatedExports) {
4146
4227
  genericHost[key] = controller.exports;
4228
+ }
4147
4229
  const isProxyExportsOnComponent = host === controller.component;
4148
4230
  if (isProxyExportsOnComponent && type === "prop") {
4149
4231
  const internals = controller.component.manager.internals;
4150
- if (hostValueChanged)
4232
+ if (hostValueChanged) {
4151
4233
  internals.markExports(controller, genericHost[key]);
4234
+ }
4152
4235
  controller.component.manager.watch(key, (value) => {
4153
- if (value !== controller.exports)
4236
+ if (value !== controller.exports) {
4154
4237
  internals.markExports(controller, value);
4238
+ }
4155
4239
  });
4156
4240
  }
4157
4241
  controller.watchExports(() => {
4158
- if (genericHost[key] === controller.exports)
4242
+ if (genericHost[key] === controller.exports) {
4159
4243
  return;
4244
+ }
4160
4245
  const manager = controller.component.manager;
4161
4246
  const isReadOnly = manager.internals.readonlyProps?.has(key) === true;
4162
- if (isReadOnly)
4247
+ if (isReadOnly) {
4163
4248
  manager.bypassReadonly(() => {
4164
4249
  genericHost[key] = controller.exports;
4165
4250
  });
4166
- else
4251
+ } else {
4167
4252
  genericHost[key] = controller.exports;
4253
+ }
4168
4254
  });
4169
4255
  }
4170
4256
 
@@ -4179,8 +4265,9 @@ var FunctionalController = class extends Controller {
4179
4265
  const value = constructor(this.component, this);
4180
4266
  const constructorChangedExports = this.exports !== originalExports;
4181
4267
  if (value instanceof Promise) {
4182
- if (!constructorChangedExports)
4268
+ if (!constructorChangedExports) {
4183
4269
  this.setProvisionalExports(value);
4270
+ }
4184
4271
  const resolved = value.then((result) => {
4185
4272
  this.exports = result;
4186
4273
  super.catchUpLifecycle();
@@ -4190,8 +4277,9 @@ var FunctionalController = class extends Controller {
4190
4277
  });
4191
4278
  this.onLoad(async () => await resolved);
4192
4279
  } else {
4193
- if (!constructorChangedExports || value !== void 0)
4280
+ if (!constructorChangedExports || value !== void 0) {
4194
4281
  this.exports = value;
4282
+ }
4195
4283
  queueMicrotask(() => super.catchUpLifecycle());
4196
4284
  }
4197
4285
  } catch (error) {
@@ -4216,14 +4304,16 @@ var makeT9nController = (getAssetPath) => ({ blocking = false, name } = {}) => (
4216
4304
  ({ t9nLocale, t9nStrings, lang }) => {
4217
4305
  controller.exports = { ...t9nStrings, _lang: lang, _t9nLocale: t9nLocale };
4218
4306
  const label = t9nStrings.componentLabel ?? t9nStrings.widgetLabel;
4219
- if (typeof label === "string" && "label" in component && component.label == null)
4307
+ if (typeof label === "string" && "label" in component && component.label == null) {
4220
4308
  component.label ?? (component.label = label);
4309
+ }
4221
4310
  },
4222
4311
  name
4223
4312
  )
4224
4313
  );
4225
- if (blocking)
4314
+ if (blocking) {
4226
4315
  return controller.ready;
4316
+ }
4227
4317
  const locale = arcadeDefaults.getElementLocales(component.el);
4228
4318
  return { _lang: locale.lang, _t9nLocale: locale.t9nLocale };
4229
4319
  })
@@ -4376,7 +4466,7 @@ async function getArcadeWorker(uri) {
4376
4466
  * @returns arcade mode module
4377
4467
  */
4378
4468
  async function getMode() {
4379
- return await Promise.resolve().then(function () { return require('./arcade-mode-d73130a7.js'); });
4469
+ return await Promise.resolve().then(function () { return require('./arcade-mode-0473fc46.js'); });
4380
4470
  }
4381
4471
  // Register the language in Monaco
4382
4472
  arcadeDefaults.languages.register({
@@ -4493,8 +4583,9 @@ const ArcgisArcadeApi = class {
4493
4583
  }
4494
4584
  catch (e) {
4495
4585
  console.error("Could not load api library", e);
4496
- if (e instanceof Error)
4586
+ if (e instanceof Error) {
4497
4587
  console.error(e.stack);
4588
+ }
4498
4589
  this._apiLibrary = undefined;
4499
4590
  }
4500
4591
  finally {