@arcgis/coding-components 4.30.0-next.1 → 4.30.0-next.101

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 (191) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +2 -4
  3. package/dist/arcgis-coding-components/arcgis-coding-components.css +1 -1
  4. package/dist/arcgis-coding-components/arcgis-coding-components.esm.js +2 -2
  5. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ar.json +25 -0
  6. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bg.json +25 -0
  7. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.bs.json +25 -0
  8. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ca.json +25 -0
  9. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.cs.json +25 -0
  10. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.da.json +25 -0
  11. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.de.json +25 -0
  12. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.el.json +25 -0
  13. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.en.json +25 -0
  14. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.es.json +25 -0
  15. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.et.json +25 -0
  16. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fi.json +25 -0
  17. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.fr.json +25 -0
  18. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.he.json +25 -0
  19. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hr.json +25 -0
  20. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.hu.json +25 -0
  21. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.id.json +25 -0
  22. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.it.json +25 -0
  23. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ja.json +25 -0
  24. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ko.json +25 -0
  25. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lt.json +25 -0
  26. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.lv.json +25 -0
  27. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nb.json +25 -0
  28. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.nl.json +25 -0
  29. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pl.json +25 -0
  30. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-BR.json +25 -0
  31. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.pt-PT.json +25 -0
  32. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ro.json +25 -0
  33. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.ru.json +25 -0
  34. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sk.json +25 -0
  35. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sl.json +25 -0
  36. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sr.json +25 -0
  37. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.sv.json +25 -0
  38. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.th.json +25 -0
  39. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.tr.json +25 -0
  40. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.uk.json +25 -0
  41. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.vi.json +25 -0
  42. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-CN.json +25 -0
  43. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-HK.json +25 -0
  44. package/dist/arcgis-coding-components/assets/arcade-language/api/arcade-api.t9n.zh-TW.json +25 -0
  45. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ar.json +2 -0
  46. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bg.json +2 -0
  47. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.bs.json +2 -0
  48. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ca.json +2 -0
  49. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.cs.json +2 -0
  50. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.da.json +2 -0
  51. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.de.json +2 -0
  52. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.el.json +2 -0
  53. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.en.json +2 -0
  54. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.es.json +2 -0
  55. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.et.json +2 -0
  56. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fi.json +2 -0
  57. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.fr.json +2 -0
  58. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.he.json +2 -0
  59. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.hr.json +2 -0
  60. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.hu.json +2 -0
  61. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.id.json +2 -0
  62. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.it.json +2 -0
  63. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ja.json +2 -0
  64. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ko.json +2 -0
  65. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.lt.json +2 -0
  66. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.lv.json +2 -0
  67. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nb.json +2 -0
  68. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.nl.json +2 -0
  69. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pl.json +2 -0
  70. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-BR.json +2 -0
  71. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.pt-PT.json +2 -0
  72. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ro.json +2 -0
  73. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.ru.json +2 -0
  74. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sk.json +2 -0
  75. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sl.json +2 -0
  76. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sr.json +2 -0
  77. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.sv.json +2 -0
  78. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.th.json +2 -0
  79. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.tr.json +2 -0
  80. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.uk.json +2 -0
  81. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.vi.json +2 -0
  82. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-CN.json +2 -0
  83. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-HK.json +2 -0
  84. package/dist/arcgis-coding-components/assets/arcade-language/t9n/profile.t9n.zh-TW.json +2 -0
  85. package/dist/arcgis-coding-components/assets/code-editor/arcade.worker.js +2 -2
  86. package/dist/arcgis-coding-components/assets/code-editor/css.worker.js +1 -1
  87. package/dist/arcgis-coding-components/assets/code-editor/editor.worker.js +1 -1
  88. package/dist/arcgis-coding-components/assets/code-editor/html.worker.js +1 -1
  89. package/dist/arcgis-coding-components/assets/code-editor/json.worker.js +1 -1
  90. package/dist/arcgis-coding-components/assets/code-editor/ts.worker.js +1 -1
  91. package/dist/arcgis-coding-components/index.esm.js +2 -2
  92. package/dist/arcgis-coding-components/{p-2c66cecd.js → p-0f5ea6a1.js} +2 -2
  93. package/dist/arcgis-coding-components/p-2d2b6eae.js +6 -0
  94. package/dist/arcgis-coding-components/p-31eb70a4.js +6 -0
  95. package/dist/arcgis-coding-components/{p-01d806ab.js → p-4bab7731.js} +3 -3
  96. package/dist/arcgis-coding-components/{p-0ecfaaf8.js → p-5105798e.js} +2 -2
  97. package/dist/arcgis-coding-components/p-55e2b096.js +7 -0
  98. package/dist/arcgis-coding-components/p-5a2d1bbd.entry.js +6 -0
  99. package/dist/arcgis-coding-components/{p-3162633c.js → p-76488b50.js} +1 -1
  100. package/dist/arcgis-coding-components/{p-4aab897b.js → p-7787a74a.js} +3 -3
  101. package/dist/arcgis-coding-components/{p-5050b8e6.js → p-8f50109f.js} +2 -2
  102. package/dist/arcgis-coding-components/{p-9556a8c6.js → p-c8a959eb.js} +3 -3
  103. package/dist/arcgis-coding-components/{p-c5c082c2.js → p-fc9f6d89.js} +3 -3
  104. package/dist/arcgis-coding-components/p-fee904e7.js +68 -0
  105. package/dist/cjs/app-globals-bb91d518.js +10 -0
  106. package/dist/cjs/{arcade-defaults-337189cc.js → arcade-defaults-4898d970.js} +760 -295
  107. package/dist/cjs/{arcade-mode-3b9ec201.js → arcade-mode-6490aec6.js} +76 -82
  108. package/dist/cjs/arcgis-arcade-api_6.cjs.entry.js +1677 -315
  109. package/dist/cjs/arcgis-coding-components.cjs.js +14 -12
  110. package/dist/cjs/{css-9d93d685.js → css-aabfc91d.js} +1 -1
  111. package/dist/cjs/{cssMode-cf97e01f.js → cssMode-3a27637c.js} +3 -3
  112. package/dist/cjs/{html-9bbb2b9f.js → html-a8ccb23b.js} +3 -3
  113. package/dist/cjs/{htmlMode-29fbfd01.js → htmlMode-8e2f185d.js} +3 -3
  114. package/dist/cjs/index-a3fb2965.js +1303 -0
  115. package/dist/cjs/index.cjs.js +3 -3
  116. package/dist/cjs/{javascript-ea7308ab.js → javascript-abb50119.js} +4 -4
  117. package/dist/cjs/{jsonMode-25c548e6.js → jsonMode-a2d6e8f7.js} +3 -3
  118. package/dist/cjs/loader.cjs.js +6 -4
  119. package/dist/cjs/{tsMode-c54b0496.js → tsMode-67ff84f3.js} +3 -3
  120. package/dist/cjs/{typescript-89d35abd.js → typescript-24e83bb2.js} +3 -3
  121. package/dist/components/arcade-api.js +25 -34
  122. package/dist/components/arcade-contribution.js +72 -13
  123. package/dist/components/arcade-defaults.js +175 -168
  124. package/dist/components/arcade-mode.js +44 -50
  125. package/dist/components/arcade-results.js +49 -61
  126. package/dist/components/arcade-suggestions.js +25 -34
  127. package/dist/components/arcade-variables.js +24 -37
  128. package/dist/components/arcgis-arcade-api.js +1 -1
  129. package/dist/components/arcgis-arcade-editor.js +68 -165
  130. package/dist/components/arcgis-arcade-results.js +1 -1
  131. package/dist/components/arcgis-arcade-suggestions.js +1 -1
  132. package/dist/components/arcgis-arcade-variables.js +1 -1
  133. package/dist/components/arcgis-assets.d.ts +35 -0
  134. package/dist/components/arcgis-assets.js +3 -3
  135. package/dist/components/arcgis-code-editor.js +1 -1
  136. package/dist/components/chunk-IHYYRFLQ.js +1363 -0
  137. package/dist/components/code-editor.js +75 -82
  138. package/dist/components/fields.js +45 -45
  139. package/dist/components/index.d.ts +3 -18
  140. package/dist/components/index.js +2 -2
  141. package/dist/components/index2.js +394 -3
  142. package/dist/components/markdown.js +13 -27
  143. package/dist/components/useT9n.js +37 -0
  144. package/dist/components/utilities.js +3 -3
  145. package/dist/esm/app-globals-6786f5f7.js +8 -0
  146. package/dist/esm/{arcade-defaults-80ab7068.js → arcade-defaults-a8fc1923.js} +743 -281
  147. package/dist/esm/{arcade-mode-145e7a14.js → arcade-mode-6fe947ed.js} +76 -82
  148. package/dist/esm/arcgis-arcade-api_6.entry.js +1677 -315
  149. package/dist/esm/arcgis-coding-components.js +15 -13
  150. package/dist/esm/{css-d2e6a792.js → css-0813d5f7.js} +1 -1
  151. package/dist/esm/{cssMode-6d9545da.js → cssMode-cd23aebd.js} +3 -3
  152. package/dist/esm/{html-0af5dfb9.js → html-0575e99e.js} +3 -3
  153. package/dist/esm/{htmlMode-7006edc4.js → htmlMode-cb330b8f.js} +3 -3
  154. package/dist/esm/index-87f79540.js +1272 -0
  155. package/dist/esm/index.js +3 -3
  156. package/dist/esm/{javascript-89b3eeb2.js → javascript-b65b7062.js} +4 -4
  157. package/dist/esm/{jsonMode-a3501a18.js → jsonMode-e0567430.js} +3 -3
  158. package/dist/esm/loader.js +7 -5
  159. package/dist/esm/{tsMode-29dad6cb.js → tsMode-9c8bd51b.js} +3 -3
  160. package/dist/esm/{typescript-6f3a39e0.js → typescript-044e2911.js} +3 -3
  161. package/dist/loader/cdn.js +1 -1
  162. package/dist/loader/index.cjs.js +1 -1
  163. package/dist/loader/index.es2017.js +1 -1
  164. package/dist/loader/index.js +1 -1
  165. package/dist/types/components/arcade-api/arcade-api.d.ts +6 -7
  166. package/dist/types/components/arcade-editor/arcade-editor.d.ts +21 -15
  167. package/dist/types/components/arcade-results/arcade-results.d.ts +6 -9
  168. package/dist/types/components/arcade-suggestions/arcade-suggestions.d.ts +7 -8
  169. package/dist/types/components/arcade-variables/arcade-variables.d.ts +6 -8
  170. package/dist/types/components/code-editor/code-editor.d.ts +25 -15
  171. package/dist/types/components.d.ts +57 -35
  172. package/dist/types/controllers/useT9n.d.ts +1 -0
  173. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stencil.config.d.ts +3 -0
  174. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/arcade-editor.stories.d.ts +34 -0
  175. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/arcade-editor/editorContext.d.ts +15 -0
  176. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/internal/code-editor/code-editor.stories.d.ts +6 -0
  177. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/stories/reference/stories/arcade-editor.stories.d.ts +9 -0
  178. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-inline-url-importer.d.ts +9 -0
  179. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/sass-json-importer.d.ts +19 -0
  180. package/dist/types/data/actions-runner-1/_work/arcgis-web-components/arcgis-web-components/packages/coding-packages/coding-components/.stencil/support/stencil-monaco-plugins.d.ts +6 -0
  181. package/dist/types/utils/arcade-monaco/arcade-language-features.d.ts +1 -1
  182. package/dist/types/utils/profile/editor-profile.d.ts +1 -1
  183. package/dist/types/utils/profile/types.d.ts +40 -13
  184. package/dist/types/utils/profile/utils.d.ts +6 -5
  185. package/package.json +24 -24
  186. package/dist/arcgis-coding-components/p-0f15d754.entry.js +0 -6
  187. package/dist/arcgis-coding-components/p-26cb350b.js +0 -6
  188. package/dist/arcgis-coding-components/p-68bd0d31.js +0 -7
  189. package/dist/arcgis-coding-components/p-bad6d07f.js +0 -68
  190. package/dist/cjs/index-b66d3898.js +0 -1958
  191. package/dist/esm/index-a2b632a0.js +0 -1927
@@ -1,9 +1,9 @@
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.1
4
+ * v4.30.0-next.101
5
5
  */
6
- import { g as getAssetPath } from './index-a2b632a0.js';
6
+ import { g as getAssetPath } from './index-87f79540.js';
7
7
 
8
8
  /**
9
9
  * Returns the last element of an array.
@@ -6101,6 +6101,7 @@ const uiMap = new KeyCodeStrMap();
6101
6101
  const userSettingsUSMap = new KeyCodeStrMap();
6102
6102
  const userSettingsGeneralMap = new KeyCodeStrMap();
6103
6103
  const EVENT_KEY_CODE_MAP = new Array(230);
6104
+ const NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE = {};
6104
6105
  const scanCodeIntToStr = [];
6105
6106
  const scanCodeStrToInt = Object.create(null);
6106
6107
  const scanCodeLowerCaseStrToInt = Object.create(null);
@@ -6389,6 +6390,9 @@ for (let i = 0; i <= 132 /* KeyCode.MAX_VALUE */; i++) {
6389
6390
  if (eventKeyCode) {
6390
6391
  EVENT_KEY_CODE_MAP[eventKeyCode] = keyCode;
6391
6392
  }
6393
+ if (vkey) {
6394
+ NATIVE_WINDOWS_KEY_CODE_TO_KEY_CODE[vkey] = keyCode;
6395
+ }
6392
6396
  }
6393
6397
  // Manually added due to the exclusion above (due to duplication with NumpadEnter)
6394
6398
  IMMUTABLE_KEY_CODE_TO_CODE[3 /* KeyCode.Enter */] = 46 /* ScanCode.Enter */;
@@ -20619,7 +20623,7 @@ class DragAndDropObserver extends Disposable {
20619
20623
  }
20620
20624
  }
20621
20625
  const H_REGEX = /(?<tag>[\w\-]+)?(?:#(?<id>[\w\-]+))?(?<class>(?:\.(?:[\w\-]+))*)(?:@(?<name>(?:[\w\_])+))?/;
20622
- function h$1(tag, ...args) {
20626
+ function h(tag, ...args) {
20623
20627
  let attributes;
20624
20628
  let children;
20625
20629
  if (Array.isArray(args[0])) {
@@ -21850,6 +21854,7 @@ CharacterPairSupport.DEFAULT_AUTOCLOSE_BEFORE_LANGUAGE_DEFINED_BRACKETS = '\'"`;
21850
21854
  * Licensed under the MIT License. See License.txt in the project root for license information.
21851
21855
  *--------------------------------------------------------------------------------------------*/
21852
21856
  const hasBuffer = (typeof Buffer !== 'undefined');
21857
+ new Lazy(() => new Uint8Array(256));
21853
21858
  let textDecoder;
21854
21859
  class VSBuffer {
21855
21860
  /**
@@ -22760,6 +22765,12 @@ Registry.add(Extensions$7.JSONContribution, jsonContributionRegistry);
22760
22765
  const Extensions$6 = {
22761
22766
  Configuration: 'base.contributions.configuration'
22762
22767
  };
22768
+ const allSettings = { properties: {}, patternProperties: {} };
22769
+ const applicationSettings = { properties: {}, patternProperties: {} };
22770
+ const machineSettings = { properties: {}, patternProperties: {} };
22771
+ const machineOverridableSettings = { properties: {}, patternProperties: {} };
22772
+ const windowSettings = { properties: {}, patternProperties: {} };
22773
+ const resourceSettings = { properties: {}, patternProperties: {} };
22763
22774
  const resourceLanguageSettingsSchemaId = 'vscode://schemas/settings/resourceLanguage';
22764
22775
  const contributionRegistry = Registry.as(Extensions$7.JSONContribution);
22765
22776
  class ConfigurationRegistry {
@@ -22932,18 +22943,25 @@ class ConfigurationRegistry {
22932
22943
  register(configuration);
22933
22944
  }
22934
22945
  updateSchema(key, property) {
22946
+ allSettings.properties[key] = property;
22935
22947
  switch (property.scope) {
22936
22948
  case 1 /* ConfigurationScope.APPLICATION */:
22949
+ applicationSettings.properties[key] = property;
22937
22950
  break;
22938
22951
  case 2 /* ConfigurationScope.MACHINE */:
22952
+ machineSettings.properties[key] = property;
22939
22953
  break;
22940
22954
  case 6 /* ConfigurationScope.MACHINE_OVERRIDABLE */:
22955
+ machineOverridableSettings.properties[key] = property;
22941
22956
  break;
22942
22957
  case 3 /* ConfigurationScope.WINDOW */:
22958
+ windowSettings.properties[key] = property;
22943
22959
  break;
22944
22960
  case 4 /* ConfigurationScope.RESOURCE */:
22961
+ resourceSettings.properties[key] = property;
22945
22962
  break;
22946
22963
  case 5 /* ConfigurationScope.LANGUAGE_OVERRIDABLE */:
22964
+ resourceSettings.properties[key] = property;
22947
22965
  this.resourceLanguageSettingsSchema.properties[key] = property;
22948
22966
  break;
22949
22967
  }
@@ -22958,15 +22976,27 @@ class ConfigurationRegistry {
22958
22976
  $ref: resourceLanguageSettingsSchemaId,
22959
22977
  };
22960
22978
  this.updatePropertyDefaultValue(overrideIdentifierProperty, resourceLanguagePropertiesSchema);
22979
+ allSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
22980
+ applicationSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
22981
+ machineSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
22982
+ machineOverridableSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
22983
+ windowSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
22984
+ resourceSettings.properties[overrideIdentifierProperty] = resourceLanguagePropertiesSchema;
22961
22985
  }
22962
22986
  }
22963
22987
  registerOverridePropertyPatternKey() {
22964
- ({
22988
+ const resourceLanguagePropertiesSchema = {
22965
22989
  type: 'object',
22966
22990
  description: localize('overrideSettings.defaultDescription', "Configure editor settings to be overridden for a language."),
22967
22991
  errorMessage: localize('overrideSettings.errorMessage', "This setting does not support per-language configuration."),
22968
22992
  $ref: resourceLanguageSettingsSchemaId,
22969
- });
22993
+ };
22994
+ allSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
22995
+ applicationSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
22996
+ machineSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
22997
+ machineOverridableSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
22998
+ windowSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
22999
+ resourceSettings.patternProperties[OVERRIDE_PROPERTY_PATTERN] = resourceLanguagePropertiesSchema;
22970
23000
  this._onDidSchemaChange.fire();
22971
23001
  }
22972
23002
  updatePropertyDefaultValue(key, property) {
@@ -60172,6 +60202,34 @@ class ExtUri {
60172
60202
  * ```
60173
60203
  */
60174
60204
  const extUri = new ExtUri(() => false);
60205
+ /**
60206
+ * BIASED utility that _mostly_ ignored the case of urs paths. ONLY use this util if you
60207
+ * understand what you are doing.
60208
+ *
60209
+ * This utility is INCOMPATIBLE with `uri.toString()`-usages and both CANNOT be used interchanged.
60210
+ *
60211
+ * When dealing with uris from files or documents, `extUri` (the unbiased friend)is sufficient
60212
+ * because those uris come from a "trustworthy source". When creating unknown uris it's always
60213
+ * better to use `IUriIdentityService` which exposes an `IExtUri`-instance which knows when path
60214
+ * casing matters.
60215
+ */
60216
+ new ExtUri(uri => {
60217
+ // A file scheme resource is in the same platform as code, so ignore case for non linux platforms
60218
+ // Resource can be from another platform. Lowering the case as an hack. Should come from File system provider
60219
+ return uri.scheme === Schemas.file ? !isLinux : true;
60220
+ });
60221
+ /**
60222
+ * BIASED utility that always ignores the casing of uris paths. ONLY use this util if you
60223
+ * understand what you are doing.
60224
+ *
60225
+ * This utility is INCOMPATIBLE with `uri.toString()`-usages and both CANNOT be used interchanged.
60226
+ *
60227
+ * When dealing with uris from files or documents, `extUri` (the unbiased friend)is sufficient
60228
+ * because those uris come from a "trustworthy source". When creating unknown uris it's always
60229
+ * better to use `IUriIdentityService` which exposes an `IExtUri`-instance which knows when path
60230
+ * casing matters.
60231
+ */
60232
+ new ExtUri(_ => true);
60175
60233
  const isEqual = extUri.isEqual.bind(extUri);
60176
60234
  extUri.isEqualOrParent.bind(extUri);
60177
60235
  extUri.getComparisonKey.bind(extUri);
@@ -105014,6 +105072,20 @@ const intlFileNameCollatorBaseNumeric = new Lazy(() => {
105014
105072
  collatorIsNumeric: collator.resolvedOptions().numeric
105015
105073
  };
105016
105074
  });
105075
+ // A collator with numeric sorting enabled.
105076
+ new Lazy(() => {
105077
+ const collator = new Intl.Collator(undefined, { numeric: true });
105078
+ return {
105079
+ collator
105080
+ };
105081
+ });
105082
+ // A collator with numeric sorting enabled, and sensitivity to accents and diacritics but not case.
105083
+ new Lazy(() => {
105084
+ const collator = new Intl.Collator(undefined, { numeric: true, sensitivity: 'accent' });
105085
+ return {
105086
+ collator
105087
+ };
105088
+ });
105017
105089
  /** Compares filenames without distinguishing the name from the extension. Disambiguates by unicode comparison. */
105018
105090
  function compareFileNames(one, other, caseSensitive = false) {
105019
105091
  const a = one || '';
@@ -113875,15 +113947,15 @@ class LinesLayout {
113875
113947
  }
113876
113948
  class MovedBlockOverlayWidget extends ViewZoneOverlayWidget {
113877
113949
  constructor(_editor, _viewZone, _move, _kind, _diffModel) {
113878
- const root = h$1('div.diff-hidden-lines-widget');
113950
+ const root = h('div.diff-hidden-lines-widget');
113879
113951
  super(_editor, _viewZone, root.root);
113880
113952
  this._editor = _editor;
113881
113953
  this._move = _move;
113882
113954
  this._kind = _kind;
113883
113955
  this._diffModel = _diffModel;
113884
- this._nodes = h$1('div.diff-moved-code-block', { style: { marginRight: '4px' } }, [
113885
- h$1('div.text-content@textContent'),
113886
- h$1('div.action-bar@actionBar'),
113956
+ this._nodes = h('div.diff-moved-code-block', { style: { marginRight: '4px' } }, [
113957
+ h('div.text-content@textContent'),
113958
+ h('div.action-bar@actionBar'),
113887
113959
  ]);
113888
113960
  root.root.appendChild(this._nodes.root);
113889
113961
  const editorLayout = observableFromEvent(this._editor.onDidLayoutChange, () => this._editor.getLayoutInfo());
@@ -114082,7 +114154,7 @@ class RevertButton {
114082
114154
  this._diffs = _diffs;
114083
114155
  this._selection = _selection;
114084
114156
  this._id = `revertButton${RevertButton.counter++}`;
114085
- this._domNode = h$1('div.revertButton', {
114157
+ this._domNode = h('div.revertButton', {
114086
114158
  title: this._selection
114087
114159
  ? localize('revertSelectedChanges', 'Revert Selected Changes')
114088
114160
  : localize('revertChange', 'Revert Change')
@@ -114555,7 +114627,7 @@ HideUnchangedRegionsFeature = __decorate$1B([
114555
114627
  ], HideUnchangedRegionsFeature);
114556
114628
  class CollapsedCodeOverlayWidget extends ViewZoneOverlayWidget {
114557
114629
  constructor(_editor, _viewZone, _unchangedRegion, _unchangedRegionRange, _hide, _modifiedOutlineSource, _revealModifiedHiddenLine, _options) {
114558
- const root = h$1('div.diff-hidden-lines-widget');
114630
+ const root = h('div.diff-hidden-lines-widget');
114559
114631
  super(_editor, _viewZone, root.root);
114560
114632
  this._editor = _editor;
114561
114633
  this._unchangedRegion = _unchangedRegion;
@@ -114564,13 +114636,13 @@ class CollapsedCodeOverlayWidget extends ViewZoneOverlayWidget {
114564
114636
  this._modifiedOutlineSource = _modifiedOutlineSource;
114565
114637
  this._revealModifiedHiddenLine = _revealModifiedHiddenLine;
114566
114638
  this._options = _options;
114567
- this._nodes = h$1('div.diff-hidden-lines', [
114568
- h$1('div.top@top', { title: localize('diff.hiddenLines.top', 'Click or drag to show more above') }),
114569
- h$1('div.center@content', { style: { display: 'flex' } }, [
114570
- h$1('div@first', { style: { display: 'flex', justifyContent: 'center', alignItems: 'center', flexShrink: '0' } }, [$$d('a', { title: localize('showUnchangedRegion', 'Show Unchanged Region'), role: 'button', onclick: () => { this._unchangedRegion.showAll(undefined); } }, ...renderLabelWithIcons('$(unfold)'))]),
114571
- h$1('div@others', { style: { display: 'flex', justifyContent: 'center', alignItems: 'center' } }),
114639
+ this._nodes = h('div.diff-hidden-lines', [
114640
+ h('div.top@top', { title: localize('diff.hiddenLines.top', 'Click or drag to show more above') }),
114641
+ h('div.center@content', { style: { display: 'flex' } }, [
114642
+ h('div@first', { style: { display: 'flex', justifyContent: 'center', alignItems: 'center', flexShrink: '0' } }, [$$d('a', { title: localize('showUnchangedRegion', 'Show Unchanged Region'), role: 'button', onclick: () => { this._unchangedRegion.showAll(undefined); } }, ...renderLabelWithIcons('$(unfold)'))]),
114643
+ h('div@others', { style: { display: 'flex', justifyContent: 'center', alignItems: 'center' } }),
114572
114644
  ]),
114573
- h$1('div.bottom@bottom', { title: localize('diff.bottom', 'Click or drag to show more below'), role: 'button' }),
114645
+ h('div.bottom@bottom', { title: localize('diff.bottom', 'Click or drag to show more below'), role: 'button' }),
114574
114646
  ]);
114575
114647
  root.root.appendChild(this._nodes.root);
114576
114648
  const layoutInfo = observableFromEvent(this._editor.onDidLayoutChange, () => this._editor.getLayoutInfo());
@@ -114695,7 +114767,7 @@ class CollapsedCodeOverlayWidget extends ViewZoneOverlayWidget {
114695
114767
  for (let i = 0; i < items.length; i++) {
114696
114768
  const item = items[i];
114697
114769
  const icon = SymbolKinds.toIcon(item.kind);
114698
- const divItem = h$1('div.breadcrumb-item', {
114770
+ const divItem = h('div.breadcrumb-item', {
114699
114771
  style: { display: 'flex', alignItems: 'center' },
114700
114772
  }, [
114701
114773
  renderIcon(icon),
@@ -116112,7 +116184,7 @@ let OverviewRulerPart = OverviewRulerPart_1 = class OverviewRulerPart extends Di
116112
116184
  const viewportDomElement = createFastDomNode(document.createElement('div'));
116113
116185
  viewportDomElement.setClassName('diffViewport');
116114
116186
  viewportDomElement.setPosition('absolute');
116115
- const diffOverviewRoot = h$1('div.diffOverview', {
116187
+ const diffOverviewRoot = h('div.diffOverview', {
116116
116188
  style: { position: 'absolute', top: '0px', width: OverviewRulerPart_1.ENTIRE_DIFF_OVERVIEW_WIDTH + 'px' }
116117
116189
  }).root;
116118
116190
  this._register(appendRemoveOnDispose(diffOverviewRoot, viewportDomElement.domNode));
@@ -116592,11 +116664,11 @@ let DiffEditorWidget = class DiffEditorWidget extends DelegatingEditor {
116592
116664
  this._parentInstantiationService = _parentInstantiationService;
116593
116665
  this._audioCueService = _audioCueService;
116594
116666
  this._editorProgressService = _editorProgressService;
116595
- this.elements = h$1('div.monaco-diff-editor.side-by-side', { style: { position: 'relative', height: '100%' } }, [
116596
- h$1('div.noModificationsOverlay@overlay', { style: { position: 'absolute', height: '100%', visibility: 'hidden', } }, [$$d('span', {}, 'No Changes')]),
116597
- h$1('div.editor.original@original', { style: { position: 'absolute', height: '100%' } }),
116598
- h$1('div.editor.modified@modified', { style: { position: 'absolute', height: '100%' } }),
116599
- h$1('div.accessibleDiffViewer@accessibleDiffViewer', { style: { position: 'absolute', height: '100%' } }),
116667
+ this.elements = h('div.monaco-diff-editor.side-by-side', { style: { position: 'relative', height: '100%' } }, [
116668
+ h('div.noModificationsOverlay@overlay', { style: { position: 'absolute', height: '100%', visibility: 'hidden', } }, [$$d('span', {}, 'No Changes')]),
116669
+ h('div.editor.original@original', { style: { position: 'absolute', height: '100%' } }),
116670
+ h('div.editor.modified@modified', { style: { position: 'absolute', height: '100%' } }),
116671
+ h('div.accessibleDiffViewer@accessibleDiffViewer', { style: { position: 'absolute', height: '100%' } }),
116600
116672
  ]);
116601
116673
  this._diffModel = observableValue(this, undefined);
116602
116674
  this._shouldDisposeDiffModel = false;
@@ -117730,8 +117802,8 @@ let DiffEditorItemTemplate = class DiffEditorItemTemplate extends Disposable {
117730
117802
  return { maxScroll: scroll2, width: this._originalWidth.read(reader) };
117731
117803
  }
117732
117804
  });
117733
- this._elements = h$1('div.multiDiffEntry', [
117734
- h$1('div.content', {
117805
+ this._elements = h('div.multiDiffEntry', [
117806
+ h('div.content', {
117735
117807
  style: {
117736
117808
  display: 'flex',
117737
117809
  flexDirection: 'column',
@@ -117739,19 +117811,19 @@ let DiffEditorItemTemplate = class DiffEditorItemTemplate extends Disposable {
117739
117811
  overflow: 'hidden',
117740
117812
  }
117741
117813
  }, [
117742
- h$1('div.header@header', [
117743
- h$1('div.collapse-button@collapseButton'),
117744
- h$1('div.title.show-file-icons@title', []),
117745
- h$1('div.actions@actions'),
117814
+ h('div.header@header', [
117815
+ h('div.collapse-button@collapseButton'),
117816
+ h('div.title.show-file-icons@title', []),
117817
+ h('div.actions@actions'),
117746
117818
  ]),
117747
- h$1('div.editorParent', {
117819
+ h('div.editorParent', {
117748
117820
  style: {
117749
117821
  flex: '1',
117750
117822
  display: 'flex',
117751
117823
  flexDirection: 'column',
117752
117824
  }
117753
117825
  }, [
117754
- h$1('div.editorContainer@editor', { style: { flex: '1' } }),
117826
+ h('div.editorContainer@editor', { style: { flex: '1' } }),
117755
117827
  ])
117756
117828
  ])
117757
117829
  ]);
@@ -117952,17 +118024,17 @@ let MultiDiffEditorWidgetImpl = class MultiDiffEditorWidgetImpl extends Disposab
117952
118024
  this._workbenchUIElementFactory = _workbenchUIElementFactory;
117953
118025
  this._parentContextKeyService = _parentContextKeyService;
117954
118026
  this._parentInstantiationService = _parentInstantiationService;
117955
- this._elements = h$1('div', {
118027
+ this._elements = h('div', {
117956
118028
  style: {
117957
118029
  overflowY: 'hidden',
117958
118030
  }
117959
118031
  }, [
117960
- h$1('div@content', {
118032
+ h('div@content', {
117961
118033
  style: {
117962
118034
  overflow: 'hidden',
117963
118035
  }
117964
118036
  }),
117965
- h$1('div.monaco-editor@overflowWidgetsDomNode', {}),
118037
+ h('div.monaco-editor@overflowWidgetsDomNode', {}),
117966
118038
  ]);
117967
118039
  this._sizeObserver = this._register(new ObservableElementSizeObserver(this._element, undefined));
117968
118040
  this._objectPool = this._register(new ObjectPool((data) => {
@@ -120522,7 +120594,7 @@ registerLanguage({
120522
120594
  mimetypes: ["text/css"],
120523
120595
  loader: () => {
120524
120596
  {
120525
- return import('./css-d2e6a792.js');
120597
+ return import('./css-0813d5f7.js');
120526
120598
  }
120527
120599
  }
120528
120600
  });
@@ -120540,7 +120612,7 @@ registerLanguage({
120540
120612
  mimetypes: ["text/html", "text/x-jshtm", "text/template", "text/ng-template"],
120541
120613
  loader: () => {
120542
120614
  {
120543
- return import('./html-0af5dfb9.js');
120615
+ return import('./html-0575e99e.js');
120544
120616
  }
120545
120617
  }
120546
120618
  });
@@ -120560,7 +120632,7 @@ registerLanguage({
120560
120632
  mimetypes: ["text/javascript"],
120561
120633
  loader: () => {
120562
120634
  {
120563
- return import('./javascript-89b3eeb2.js');
120635
+ return import('./javascript-b65b7062.js');
120564
120636
  }
120565
120637
  }
120566
120638
  });
@@ -120578,7 +120650,7 @@ registerLanguage({
120578
120650
  mimetypes: ["text/typescript"],
120579
120651
  loader: () => {
120580
120652
  {
120581
- return import('./typescript-6f3a39e0.js');
120653
+ return import('./typescript-044e2911.js');
120582
120654
  }
120583
120655
  }
120584
120656
  });
@@ -120699,7 +120771,7 @@ var lessDefaults = new LanguageServiceDefaultsImpl$3("less", optionsDefault$1, m
120699
120771
  monaco_editor_core_exports$3.languages.css = { cssDefaults, lessDefaults, scssDefaults };
120700
120772
  function getMode$3() {
120701
120773
  {
120702
- return import('./cssMode-6d9545da.js');
120774
+ return import('./cssMode-cd23aebd.js');
120703
120775
  }
120704
120776
  }
120705
120777
  monaco_editor_core_exports$3.languages.onLanguage("less", () => {
@@ -120824,7 +120896,7 @@ monaco_editor_core_exports$2.languages.html = {
120824
120896
  };
120825
120897
  function getMode$2() {
120826
120898
  {
120827
- return import('./htmlMode-7006edc4.js');
120899
+ return import('./htmlMode-cb330b8f.js');
120828
120900
  }
120829
120901
  }
120830
120902
  function registerHTMLLanguageService(languageId, options = optionsDefault, modeConfiguration = getConfigurationDefault(languageId)) {
@@ -120926,7 +120998,7 @@ var jsonDefaults = new LanguageServiceDefaultsImpl$1("json", diagnosticDefault,
120926
120998
  monaco_editor_core_exports$1.languages.json = { jsonDefaults };
120927
120999
  function getMode$1() {
120928
121000
  {
120929
- return import('./jsonMode-a3501a18.js');
121001
+ return import('./jsonMode-e0567430.js');
120930
121002
  }
120931
121003
  }
120932
121004
  monaco_editor_core_exports$1.languages.register({
@@ -121195,7 +121267,7 @@ monaco_editor_core_exports.languages.typescript = {
121195
121267
  };
121196
121268
  function getMode() {
121197
121269
  {
121198
- return import('./tsMode-29dad6cb.js');
121270
+ return import('./tsMode-9c8bd51b.js');
121199
121271
  }
121200
121272
  }
121201
121273
  monaco_editor_core_exports.languages.onLanguage("typescript", () => {
@@ -132853,8 +132925,8 @@ let InlineSuggestionHintsContentWidget = InlineSuggestionHintsContentWidget_1 =
132853
132925
  this.id = `InlineSuggestionHintsContentWidget${InlineSuggestionHintsContentWidget_1.id++}`;
132854
132926
  this.allowEditorOverflow = true;
132855
132927
  this.suppressMouseDown = false;
132856
- this.nodes = h$1('div.inlineSuggestionsHints', { className: this.withBorder ? '.withBorder' : '' }, [
132857
- h$1('div@toolBar'),
132928
+ this.nodes = h('div.inlineSuggestionsHints', { className: this.withBorder ? '.withBorder' : '' }, [
132929
+ h('div@toolBar'),
132858
132930
  ]);
132859
132931
  this.previousAction = this.createCommandAction(showPreviousInlineSuggestionActionId, localize('previous', 'Previous'), ThemeIcon.asClassName(inlineSuggestionHintsPreviousIcon));
132860
132932
  this.availableSuggestionCountAction = new Action('inlineSuggestionHints.availableSuggestionCount', '', undefined, false);
@@ -132990,7 +133062,7 @@ class StatusBarViewItem$1 extends MenuEntryActionViewItem {
132990
133062
  return super.updateLabel();
132991
133063
  }
132992
133064
  if (this.label) {
132993
- const div = h$1('div.keybinding').root;
133065
+ const div = h('div.keybinding').root;
132994
133066
  const k = new KeybindingLabel(div, OS, { disableTitle: true, ...unthemedKeybindingLabelOptions });
132995
133067
  k.set(kb);
132996
133068
  this.label.textContent = this._action.label;
@@ -166644,21 +166716,13 @@ registerEditorAction(ToggleHighContrast);
166644
166716
 
166645
166717
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
166646
166718
 
166647
- function createCommonjsModule(fn, basedir, module) {
166648
- return module = {
166649
- path: basedir,
166650
- exports: {},
166651
- require: function (path, base) {
166652
- return commonjsRequire();
166653
- }
166654
- }, fn(module, module.exports), module.exports;
166719
+ function commonjsRequire (path) {
166720
+ throw new Error('Could not dynamically require "' + path + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.');
166655
166721
  }
166656
166722
 
166657
- function commonjsRequire () {
166658
- throw new Error('Dynamic requires are not currently supported by @rollup/plugin-commonjs');
166659
- }
166723
+ var main = {exports: {}};
166660
166724
 
166661
- var main = createCommonjsModule(function (module, exports) {
166725
+ (function (module, exports) {
166662
166726
  (function (factory) {
166663
166727
  {
166664
166728
  var v = factory(commonjsRequire, exports);
@@ -168923,101 +168987,80 @@ var main = createCommonjsModule(function (module, exports) {
168923
168987
  Is.typedArray = typedArray;
168924
168988
  })(Is || (Is = {}));
168925
168989
  });
168926
- });
168990
+ }(main, main.exports));
168927
168991
 
168928
- const isAMD = "define" in window && typeof window.define === "function" && "amd" in window.define;
168992
+ // src/index.ts
168993
+ var isAMD = typeof window !== "undefined" && "$arcgis" in window && typeof window.$arcgis === "object" && "import" in window.$arcgis;
168929
168994
  function isDefaultModule(module) {
168930
- return module.default !== undefined;
168931
- }
168932
- async function requireModule(modulePath) {
168933
- return await new Promise((resolve) => window.require([modulePath], (moduleDefault) => {
168934
- resolve(moduleDefault);
168935
- }));
168995
+ return module.default !== void 0;
168936
168996
  }
168937
168997
  async function importLayersFeatureLayer() {
168938
- if (isAMD) {
168939
- return await requireModule("esri/layers/FeatureLayer");
168940
- }
168941
- const module = await import('@arcgis/core/layers/FeatureLayer.js');
168942
- return isDefaultModule(module) ? module.default : module;
168998
+ if (isAMD) {
168999
+ return await window.$arcgis.import("esri/layers/FeatureLayer");
169000
+ }
169001
+ const module = await import('@arcgis/core/layers/FeatureLayer.js');
169002
+ return isDefaultModule(module) ? module.default : module;
169003
+ }
169004
+ async function newLayersFeatureLayer(properties) {
169005
+ const ModConstructor = await importLayersFeatureLayer();
169006
+ return new ModConstructor(properties);
168943
169007
  }
168944
169008
  async function importPortalPortalItem() {
168945
- if (isAMD) {
168946
- return await requireModule("esri/portal/PortalItem");
168947
- }
168948
- const module = await import('@arcgis/core/portal/PortalItem.js');
168949
- return isDefaultModule(module) ? module.default : module;
169009
+ if (isAMD) {
169010
+ return await window.$arcgis.import("esri/portal/PortalItem");
169011
+ }
169012
+ const module = await import('@arcgis/core/portal/PortalItem.js');
169013
+ return isDefaultModule(module) ? module.default : module;
168950
169014
  }
168951
169015
  async function newPortalPortalItem(properties) {
168952
- const ModConstructor = await importPortalPortalItem();
168953
- return new ModConstructor(properties);
169016
+ const ModConstructor = await importPortalPortalItem();
169017
+ return new ModConstructor(properties);
168954
169018
  }
168955
169019
  async function importWebMap() {
168956
- if (isAMD) {
168957
- return await requireModule("esri/WebMap");
168958
- }
168959
- const module = await import('@arcgis/core/WebMap.js');
168960
- return isDefaultModule(module) ? module.default : module;
169020
+ if (isAMD) {
169021
+ return await window.$arcgis.import("esri/WebMap");
169022
+ }
169023
+ const module = await import('@arcgis/core/WebMap.js');
169024
+ return isDefaultModule(module) ? module.default : module;
168961
169025
  }
168962
169026
  async function newWebMap(properties) {
168963
- const ModConstructor = await importWebMap();
168964
- return new ModConstructor(properties);
169027
+ const ModConstructor = await importWebMap();
169028
+ return new ModConstructor(properties);
168965
169029
  }
168966
169030
  async function importWebScene() {
168967
- if (isAMD) {
168968
- return await requireModule("esri/WebScene");
168969
- }
168970
- const module = await import('@arcgis/core/WebScene.js');
168971
- return isDefaultModule(module) ? module.default : module;
169031
+ if (isAMD) {
169032
+ return await window.$arcgis.import("esri/WebScene");
169033
+ }
169034
+ const module = await import('@arcgis/core/WebScene.js');
169035
+ return isDefaultModule(module) ? module.default : module;
168972
169036
  }
168973
169037
  async function newWebScene(properties) {
168974
- const ModConstructor = await importWebScene();
168975
- return new ModConstructor(properties);
169038
+ const ModConstructor = await importWebScene();
169039
+ return new ModConstructor(properties);
168976
169040
  }
168977
169041
  async function importArcade() {
168978
- if (isAMD) {
168979
- return await requireModule("esri/arcade");
168980
- }
168981
- const module = await import('@arcgis/core/arcade.js');
168982
- return isDefaultModule(module) ? module.default : module;
169042
+ if (isAMD) {
169043
+ return await window.$arcgis.import("esri/arcade");
169044
+ }
169045
+ const module = await import('@arcgis/core/arcade.js');
169046
+ return isDefaultModule(module) ? module.default : module;
168983
169047
  }
168984
169048
  async function importRequest() {
168985
- if (isAMD) {
168986
- return await requireModule("esri/request");
168987
- }
168988
- const module = await import('@arcgis/core/request.js');
168989
- return isDefaultModule(module) ? module.default : module;
169049
+ if (isAMD) {
169050
+ return await window.$arcgis.import("esri/request");
169051
+ }
169052
+ const module = await import('@arcgis/core/request.js');
169053
+ return isDefaultModule(module) ? module.default : module;
168990
169054
  }
168991
169055
 
168992
- //#region core adapter fix
168993
- async function newFeatureLayer(definition) {
168994
- const FeatureLayer = await importLayersFeatureLayer();
168995
- // Fix title for the layer. Instead of defaulting to the map viewer style.
168996
- return new FeatureLayer({ ...definition, sublayerTitleMode: "service-name" });
168997
- }
168998
- //#endregion
168999
169056
  //#region Type Guards
169000
- function isSupportedLayerInstance(item) {
169001
- return (!!item &&
169002
- typeof item === "object" &&
169003
- "declaredClass" in item &&
169004
- typeof item.declaredClass === "string" &&
169005
- item.declaredClass.startsWith("esri.layers."));
169006
- }
169007
- function isFeatureSetInstance(item) {
169008
- return (!!item &&
169009
- typeof item === "object" &&
169010
- "declaredClass" in item &&
169011
- typeof item.declaredClass === "string" &&
169012
- item.declaredClass === "esri.rest.support.FeatureSet");
169013
- }
169014
- function isQueryableLayerInstance(item) {
169057
+ function isFeatureLayerLikeInstance(item) {
169015
169058
  return (!!item &&
169016
169059
  typeof item === "object" &&
169017
169060
  "declaredClass" in item &&
169018
169061
  typeof item.declaredClass === "string" &&
169019
169062
  item.declaredClass.startsWith("esri.layers.") &&
169020
- "fields" in item &&
169063
+ isFieldsDefinition(item) &&
169021
169064
  "queryFeatures" in item &&
169022
169065
  typeof item.queryFeatures === "function");
169023
169066
  }
@@ -169040,7 +169083,18 @@ function isMapInstance(item) {
169040
169083
  typeof item === "object" &&
169041
169084
  "declaredClass" in item &&
169042
169085
  typeof item.declaredClass === "string" &&
169043
- (item.declaredClass === "esri.WebMap" || item.declaredClass === "esri.WebScene"));
169086
+ (item.declaredClass === "esri.Map" ||
169087
+ item.declaredClass === "esri.WebMap" ||
169088
+ item.declaredClass === "esri.WebScene"));
169089
+ }
169090
+ function isWebMapInstance(item) {
169091
+ return item.declaredClass === "esri.WebMap";
169092
+ }
169093
+ function isWebSceneInstance(item) {
169094
+ return item.declaredClass === "esri.WebScene";
169095
+ }
169096
+ function isLoadableMapInstance(item) {
169097
+ return item.declaredClass === "esri.WebMap" || item.declaredClass === "esri.WebScene";
169044
169098
  }
169045
169099
  function isPortalItemDefinition(item) {
169046
169100
  return !!item && typeof item === "object" && "portalItem" in item && item.portalItem != null;
@@ -169049,10 +169103,13 @@ function isFeatureLayerItemDefinition(item) {
169049
169103
  return !!item && typeof item === "object" && "portalItem" in item && item.portalItem != null;
169050
169104
  }
169051
169105
  function isFieldsDefinition(item) {
169052
- return (!!item && typeof item === "object" && "fields" in item && Array.isArray(item.fields) && !("declaredClass" in item));
169106
+ return !!item && typeof item === "object" && "fields" in item && Array.isArray(item.fields);
169053
169107
  }
169054
169108
  function isUrlDefinition(item) {
169055
- return (!!item && typeof item === "object" && "url" in item && typeof item.url === "string" && !("declaredClass" in item));
169109
+ return !!item && typeof item === "object" && "url" in item && typeof item.url === "string";
169110
+ }
169111
+ function isSupportedServiceUrlDefinition(item) {
169112
+ return isUrlDefinition(item) && /\/(?:featureserver|mapserver)(?:\/|$)/iu.test(item.url);
169056
169113
  }
169057
169114
  function isSubtypeInstance(item) {
169058
169115
  return (!!item &&
@@ -169122,11 +169179,11 @@ async function supportedSourceFromDefinition(definition) {
169122
169179
  return null;
169123
169180
  }
169124
169181
  let source = null;
169125
- if (isSupportedLayerInstance(definition) || isFeatureSetInstance(definition) || isFieldsDefinition(definition)) {
169182
+ if (isFieldsDefinition(definition)) {
169126
169183
  source = definition;
169127
169184
  }
169128
169185
  else {
169129
- source = await newFeatureLayer(definition);
169186
+ source = await newLayersFeatureLayer(definition);
169130
169187
  }
169131
169188
  if (isLoadableSource(source)) {
169132
169189
  await source.load();
@@ -169137,32 +169194,428 @@ async function serviceMetaData(url) {
169137
169194
  url += "/layers";
169138
169195
  const request = await importRequest();
169139
169196
  const response = await request(url, { responseType: "json", query: { f: "json" } });
169140
- const data = {
169141
- layers: response.data?.layers ?? [],
169142
- tables: response.data?.tables ?? []
169143
- };
169144
169197
  const queryCapability = url.endsWith("MapServer/layers") ? "data" : "query";
169145
- const layers = filterFeatureLayerInfos(data.layers, queryCapability);
169146
- const tables = filterFeatureLayerInfos(data.tables, queryCapability);
169198
+ const layers = getSupportedLayerInfos(response.data?.layers, queryCapability);
169199
+ const tables = getSupportedLayerInfos(response.data?.tables, queryCapability);
169147
169200
  return { layers, tables };
169148
169201
  }
169149
- function filterFeatureLayerInfos(layers, queryCapability) {
169202
+ function getSupportedLayerInfos(layers, queryCapability) {
169203
+ if (!layers) {
169204
+ return [];
169205
+ }
169150
169206
  return layers.filter((layer) => {
169151
- if (layer.type !== "Feature Layer" && layer.type !== "Table") {
169152
- return false;
169207
+ switch (layer.type) {
169208
+ case "Feature Layer":
169209
+ case "Oriented Imagery Layer":
169210
+ case "Catalog Layer":
169211
+ case "Table": {
169212
+ const capabilities = layer.capabilities
169213
+ ? layer.capabilities
169214
+ .toLowerCase()
169215
+ .split(",")
169216
+ .map((value) => value.trim())
169217
+ : [];
169218
+ return capabilities.includes(queryCapability);
169219
+ }
169220
+ default:
169221
+ return false;
169153
169222
  }
169154
- const capabilities = layer.capabilities
169155
- ? layer.capabilities
169156
- .toLowerCase()
169157
- .split(",")
169158
- .map((value) => value.trim())
169159
- : [];
169160
- return capabilities.includes(queryCapability);
169161
169223
  });
169162
169224
  }
169163
169225
  //#endregion
169164
169226
 
169165
- var h=class{constructor(){this.resolve=()=>{},this.reject=()=>{},this.promise=new Promise((t,n)=>{this.resolve=t,this.reject=n;});}};function S(e,t){let n=e;for(;n;){if(n===t)return !0;if(!n.parentNode)return !1;n.parentNode instanceof ShadowRoot?n=n.parentNode.host:n=n.parentNode;}return !1}function x(e,t,n=()=>{}){if(!t||t.length<=0)return;let r=new MutationObserver(o=>{for(let s of o)S(e,s.target)&&n();});return r.observe(document.documentElement,{attributes:!0,attributeFilter:t,subtree:!0}),r}function T(e,t){let n=e;for(;n;){let r=n.closest(t);if(r)return r;let o=n.getRootNode();if(o===document)return null;n=o.host;}return null}function k(e){let t=T(e,":is(.calcite-mode-light, .calcite-mode-dark)");return t&&t.classList.contains("calcite-mode-dark")?"dark":"light"}function f(e,t,n){return T(e,`[${t}]`)?.getAttribute(t)??n}function M(e){return e.nodeType===Node.ELEMENT_NODE}function R(e){return "setFocus"in e&&typeof e.setFocus=="function"}function d(e,t=""){if(!M(e))return !1;if(e.matches(t))return R(e)&&setTimeout(()=>e.setFocus(),0),!0;for(let r of e.children)if(d(r,t))return !0;let n=e.shadowRoot;if(n){for(let r of n.children)if(d(r,t))return !0}return !1}function W(e,t){if(!e?.shadowRoot)return;if(e.hasAttribute("hydrated")||e.hasAttribute("calcite-hydrated")){d(e,t);return}let n=new MutationObserver(()=>{n.disconnect(),d(e,t);});n.observe(e,{attributes:!0,attributeFilter:["hydrated","calcite-hydrated"]});}function c(e){let t="";for(let n=0;n<e;n++)t+=((1+Math.random())*65536|0).toString(16).substring(1);return t}function U(){return [c(2),c(1),c(1),c(1),c(3)].join("-")}var E=new Set(["ar","bg","bs","ca","cs","da","de","el","en","es","et","fi","fr","he","hr","hu","id","it","ja","ko","lt","lv","nl","nb","pl","pt-BR","pt-PT","ro","ru","sk","sl","sr","sv","th","tr","uk","vi","zh-CN","zh-HK","zh-TW"]),a=new Map;async function v(e,t,n=""){let r=`${t}/${n}${e}.json`;if(a.has(r))return a.get(r);try{let o=await fetch(r);if(o.ok){let i=await o.json();return a.set(r,i),i}if(e==="en"){a.set(r,void 0);return}let s=await v("en",t,n);return a.set(r,s),s}catch{a.set(r,void 0);return}}function _(e){let t=f(e,"lang",navigator.language||"en");if(E.has(t))return {lang:t,t9nLocale:t};let n=t.slice(0,2);return {lang:t,t9nLocale:E.has(n)?n:"en"}}var p=new WeakMap,m=new WeakMap,C=new WeakMap;async function B(e,t,n){m.set(e,t),p.set(e,x(e._hostElement,["lang"],()=>{b(e,n).catch(console.error);})),await b(e,n);}function q(e){p.get(e)?.disconnect(),p.delete(e),m.delete(e);}async function b(e,t){let{lang:n,t9nLocale:r}=_(e._hostElement);if(n===e._lang&&r===e._t9nLocale||(n!==e._lang&&(e._lang=n),r===e._t9nLocale))return;let o=C.get(e);if(!o){let s=m.get(e)??"",i=e._hostElement.tagName.toLowerCase().replace("arcgis-",""),l=`${s}/${i}/t9n`,u=`${i}.t9n.`;o=await v(r,l,u);}r!==e._t9nLocale&&(e._t9nLocale=r,e._t9nStrings=o,await t?.call(e));}var N='"',w="'";function L(e,t){return new Array(t+1).join(e)}function D(e){let t=N,n=w;e.includes(t)&&!e.includes(n)&&(n=N,t=w);let o=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${n})+)`,"gu");e=e.replace(o,(i,l,u,g)=>l+u+L(n,g.length/2));let s=new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${t}+)`,"gu");return e=e.replace(s,(i,l,u,g)=>l+u+L(`\\${t}`,g.length)),t+e+t}function K(e){let t=e?e.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu,"\\$&"):"^.*$";return new RegExp(t,"i")}function Z(e,t={}){return (e??"").replace(/\{(.*?)\}/gu,(n,r)=>t[r]??n)}function G(e){return `\u200E${e??""}\u200E`}function ee(e){return e!==null}function te(e){return e!==void 0}function re(e,t=100){let n;return (...r)=>{let o=()=>{clearTimeout(n),e(...r);};clearTimeout(n),n=setTimeout(o,t);}}function se(e,t,n=!1){if(!e||!t)return !1;let r=new URL(e),o=new URL(t);return !n&&r.protocol!==o.protocol||r.host==null||o.host==null?!1:r.host.toLowerCase()===o.host.toLowerCase()&&r.port===o.port}function ie(e){try{return new URL(e),!0}catch{return !1}}
169227
+ // src/array-utils.ts
169228
+
169229
+ // src/deferred.ts
169230
+ var Deferred = class {
169231
+ /**
169232
+ * Resolves the promise.
169233
+ * @param value The value to resolve the promise with.
169234
+ */
169235
+ resolve(_value) {
169236
+ }
169237
+ /**
169238
+ * Rejects the promise.
169239
+ */
169240
+ reject(_error) {
169241
+ }
169242
+ /**
169243
+ * Creates a new deferred promise.
169244
+ */
169245
+ constructor() {
169246
+ this.promise = new Promise((resolve, reject) => {
169247
+ this.resolve = resolve;
169248
+ this.reject = reject;
169249
+ });
169250
+ }
169251
+ };
169252
+
169253
+ // src/dom.ts
169254
+ function inTargetElement(element, targetElement) {
169255
+ let currentElement = element;
169256
+ while (currentElement) {
169257
+ if (currentElement === targetElement) {
169258
+ return true;
169259
+ }
169260
+ if (!currentElement.parentNode) {
169261
+ return false;
169262
+ }
169263
+ if (currentElement.parentNode instanceof ShadowRoot) {
169264
+ currentElement = currentElement.parentNode.host;
169265
+ } else {
169266
+ currentElement = currentElement.parentNode;
169267
+ }
169268
+ }
169269
+ return false;
169270
+ }
169271
+ function observeAncestorsMutation(element, attributeFilter, callback) {
169272
+ const { subscribe } = observe(attributeFilter);
169273
+ return subscribe((mutations) => {
169274
+ const matched = mutations.some((mutation) => inTargetElement(element, mutation.target));
169275
+ if (matched) {
169276
+ callback();
169277
+ }
169278
+ });
169279
+ }
169280
+ var observers = {};
169281
+ function observe(attributeFilter) {
169282
+ const attributes = attributeFilter.join(",");
169283
+ const previousObserver = observers[attributes];
169284
+ if (previousObserver !== void 0) {
169285
+ return previousObserver;
169286
+ }
169287
+ const subscribers = /* @__PURE__ */ new Set();
169288
+ const mutationObserver = new MutationObserver((mutations) => subscribers.forEach((callback) => callback(mutations)));
169289
+ mutationObserver.observe(document.documentElement, {
169290
+ attributes: true,
169291
+ attributeFilter,
169292
+ subtree: true
169293
+ });
169294
+ const observer = {
169295
+ subscribe(callback) {
169296
+ subscribers.add(callback);
169297
+ return {
169298
+ remove: () => {
169299
+ subscribers.delete(callback);
169300
+ if (subscribers.size === 0) {
169301
+ mutationObserver.disconnect();
169302
+ observers[attributes] = void 0;
169303
+ }
169304
+ }
169305
+ };
169306
+ }
169307
+ };
169308
+ observers[attributes] = observer;
169309
+ return observer;
169310
+ }
169311
+ function closestElement(base, selector) {
169312
+ let currentElement = base;
169313
+ while (currentElement) {
169314
+ const element = currentElement.closest(selector);
169315
+ if (element) {
169316
+ return element;
169317
+ }
169318
+ const rootElement = currentElement.getRootNode();
169319
+ if (rootElement === document) {
169320
+ return null;
169321
+ }
169322
+ currentElement = rootElement.host;
169323
+ }
169324
+ return null;
169325
+ }
169326
+ function getElementTheme(base) {
169327
+ const themeElt = closestElement(base, ":is(.calcite-mode-light, .calcite-mode-dark)");
169328
+ return themeElt && themeElt.classList.contains("calcite-mode-dark") ? "dark" : "light";
169329
+ }
169330
+ function getElementAttribute(el, prop, fallbackValue) {
169331
+ const closest = closestElement(el, `[${prop}]`);
169332
+ return closest?.getAttribute(prop) ?? fallbackValue;
169333
+ }
169334
+ function isElement(ref) {
169335
+ return ref.nodeType === Node.ELEMENT_NODE;
169336
+ }
169337
+ function isHTMLWithSetFocus(ref) {
169338
+ return "setFocus" in ref && typeof ref.setFocus === "function";
169339
+ }
169340
+ function setFocus(ref, selector = "") {
169341
+ if (!isElement(ref)) {
169342
+ return false;
169343
+ }
169344
+ if (ref.matches(selector)) {
169345
+ if (isHTMLWithSetFocus(ref)) {
169346
+ setTimeout(() => ref.setFocus(), 0);
169347
+ }
169348
+ return true;
169349
+ }
169350
+ for (const child of ref.children) {
169351
+ if (setFocus(child, selector)) {
169352
+ return true;
169353
+ }
169354
+ }
169355
+ const shadowRoot = ref.shadowRoot;
169356
+ if (shadowRoot) {
169357
+ for (const child of shadowRoot.children) {
169358
+ if (setFocus(child, selector)) {
169359
+ return true;
169360
+ }
169361
+ }
169362
+ }
169363
+ return false;
169364
+ }
169365
+ function setFocusOnElement(ref, selector) {
169366
+ if (!ref?.shadowRoot) {
169367
+ return;
169368
+ }
169369
+ if (ref.hasAttribute("hydrated") || ref.hasAttribute("calcite-hydrated")) {
169370
+ setFocus(ref, selector);
169371
+ return;
169372
+ }
169373
+ const mutationObserver = new MutationObserver(() => {
169374
+ mutationObserver.disconnect();
169375
+ setFocus(ref, selector);
169376
+ });
169377
+ mutationObserver.observe(ref, {
169378
+ attributes: true,
169379
+ attributeFilter: ["hydrated", "calcite-hydrated"]
169380
+ });
169381
+ }
169382
+
169383
+ // src/errors.ts
169384
+ function safeCall(callback, thisContext, ...rest) {
169385
+ try {
169386
+ return callback?.call(thisContext, ...rest);
169387
+ } catch (error) {
169388
+ console.error(error, callback);
169389
+ }
169390
+ return void 0;
169391
+ }
169392
+ async function safeAsyncCall(callback, thisContext, ...rest) {
169393
+ try {
169394
+ const result = callback?.call(thisContext, ...rest);
169395
+ return result instanceof Promise ? await result : result;
169396
+ } catch (error) {
169397
+ console.error(error, callback);
169398
+ }
169399
+ return void 0;
169400
+ }
169401
+
169402
+ // src/guid.ts
169403
+ function gen(count) {
169404
+ let out = "";
169405
+ for (let i = 0; i < count; i++) {
169406
+ out += ((1 + Math.random()) * 65536 | 0).toString(16).substring(1);
169407
+ }
169408
+ return out;
169409
+ }
169410
+ function generateGuid() {
169411
+ return [gen(2), gen(1), gen(1), gen(1), gen(3)].join("-");
169412
+ }
169413
+ var camelToKebab = (string) => string.replace(upperBeforeLower, (upper, remainder) => `${remainder === 0 ? "" : "-"}${upper.toLowerCase()}`);
169414
+ var upperBeforeLower = /[A-Z]+(?![a-z])|[A-Z]/gu;
169415
+ var capitalize = (string) => string.charAt(0).toUpperCase() + string.slice(1);
169416
+ var camelToHuman = (string) => capitalize(string.replace(upperBeforeLower, (upper, remainder) => `${remainder === 0 ? "" : " "}${upper}`));
169417
+
169418
+ // src/intl.ts
169419
+ var supportedLocales = /* @__PURE__ */ new Set([
169420
+ "ar",
169421
+ "bg",
169422
+ "bs",
169423
+ "ca",
169424
+ "cs",
169425
+ "da",
169426
+ "de",
169427
+ "el",
169428
+ "en",
169429
+ "es",
169430
+ "et",
169431
+ "fi",
169432
+ "fr",
169433
+ "he",
169434
+ "hr",
169435
+ "hu",
169436
+ "id",
169437
+ "it",
169438
+ "ja",
169439
+ "ko",
169440
+ "lt",
169441
+ "lv",
169442
+ "nl",
169443
+ "nb",
169444
+ "pl",
169445
+ "pt-BR",
169446
+ "pt-PT",
169447
+ "ro",
169448
+ "ru",
169449
+ "sk",
169450
+ "sl",
169451
+ "sr",
169452
+ "sv",
169453
+ "th",
169454
+ "tr",
169455
+ "uk",
169456
+ "vi",
169457
+ "zh-CN",
169458
+ "zh-HK",
169459
+ "zh-TW"
169460
+ ]);
169461
+ var defaultLocale = "en";
169462
+ async function fetchT9NStringsBundle(locale, assetsPath, prefix = "") {
169463
+ const path = `${assetsPath}/${prefix}`;
169464
+ const filePath = `${path}${locale}.json`;
169465
+ t9nStringsCache[filePath] ?? (t9nStringsCache[filePath] = fetchBundle(locale, path));
169466
+ return await t9nStringsCache[filePath];
169467
+ }
169468
+ var t9nStringsCache = {};
169469
+ async function fetchBundle(locale, path) {
169470
+ const filePath = `${path}${locale}.json`;
169471
+ try {
169472
+ const response = await fetch(filePath);
169473
+ if (response.ok) {
169474
+ return await response.json();
169475
+ }
169476
+ } catch (error) {
169477
+ console.error(error);
169478
+ return fallbackBundle;
169479
+ }
169480
+ if (locale === defaultLocale) {
169481
+ return fallbackBundle;
169482
+ }
169483
+ return await fetchBundle(defaultLocale, path);
169484
+ }
169485
+ var fallbackBundle = new Proxy(
169486
+ {},
169487
+ {
169488
+ get: (_target, property) => camelToHuman(property.toString())
169489
+ }
169490
+ );
169491
+ function getElementLocales(element) {
169492
+ const lang = getElementAttribute(element, "lang", navigator.language || defaultLocale);
169493
+ if (supportedLocales.has(lang)) {
169494
+ return { lang, t9nLocale: lang };
169495
+ }
169496
+ const rootCode = lang.slice(0, 2);
169497
+ return { lang, t9nLocale: supportedLocales.has(rootCode) ? rootCode : defaultLocale };
169498
+ }
169499
+ function startLocaleObserver(element, assetsPath, onUpdated, assetName) {
169500
+ let result = void 0;
169501
+ const callback = () => void updateComponentLocateState(element, assetsPath, assetName).then((newResult) => {
169502
+ if (result?.lang !== newResult.lang || result.t9nLocale !== newResult.t9nLocale || result.t9nStrings !== newResult.t9nStrings) {
169503
+ onUpdated(newResult);
169504
+ }
169505
+ result = newResult;
169506
+ }).catch(console.error);
169507
+ callback();
169508
+ return observeAncestorsMutation(element, ["lang"], callback);
169509
+ }
169510
+ async function updateComponentLocateState(element, assetsPath, assetName = element.tagName.toLowerCase().replace("arcgis-", "")) {
169511
+ const { lang, t9nLocale } = getElementLocales(element);
169512
+ const t9nAssetsPath = `${assetsPath}/${assetName}/t9n`;
169513
+ const prefix = `${assetName}.t9n.`;
169514
+ const t9nStrings = await fetchT9NStringsBundle(t9nLocale, t9nAssetsPath, prefix);
169515
+ return { lang, t9nLocale, t9nStrings };
169516
+ }
169517
+
169518
+ // src/strings.ts
169519
+ var doubleQuote = '"';
169520
+ var singleQuote = "'";
169521
+ function repeatString(value, n) {
169522
+ return new Array(n + 1).join(value);
169523
+ }
169524
+ function quoteString(value) {
169525
+ let quote = doubleQuote;
169526
+ let alternateQuote = singleQuote;
169527
+ const avoidEscape = value.includes(quote) && !value.includes(alternateQuote);
169528
+ if (avoidEscape) {
169529
+ alternateQuote = doubleQuote;
169530
+ quote = singleQuote;
169531
+ }
169532
+ const alternateEscape = new RegExp(`(^|[^\\\\])((?:\\\\{2})*)((?:\\\\${alternateQuote})+)`, "gu");
169533
+ value = value.replace(
169534
+ alternateEscape,
169535
+ (_, boundaryChar, leadingEscapedSlashes, escapedQuoteChars) => (
169536
+ // We divide the escapedQuoteChars by 2 since there are 2 characters in each escaped part ('\\"'.length === 2)
169537
+ boundaryChar + leadingEscapedSlashes + repeatString(alternateQuote, escapedQuoteChars.length / 2)
169538
+ )
169539
+ );
169540
+ const quoteEscape = new RegExp(`(^|[^\\\\])((?:\\\\{2})*)(${quote}+)`, "gu");
169541
+ value = value.replace(
169542
+ quoteEscape,
169543
+ (_, boundaryChar, leadingEscapedSlashes, quoteChars) => boundaryChar + leadingEscapedSlashes + repeatString(`\\${quote}`, quoteChars.length)
169544
+ );
169545
+ return quote + value + quote;
169546
+ }
169547
+ function createFilterExpression(filterWord) {
169548
+ const sanitizedWord = filterWord ? filterWord.replaceAll(/[-[\]/{}()*+?.\\^$|]/gu, "\\$&") : "^.*$";
169549
+ return new RegExp(sanitizedWord, "i");
169550
+ }
169551
+ function setValuesInString(message, values = {}) {
169552
+ return (message ?? "").replace(/\{(?<valueName>.*?)\}/gu, (match, valueName) => values[valueName] ?? match);
169553
+ }
169554
+ function addLTRMark(value) {
169555
+ return `\u200E${value ?? ""}\u200E`;
169556
+ }
169557
+
169558
+ // src/timeouts.ts
169559
+ function devToolsAwareTimeout(callback, timeout) {
169560
+ const interval = timeout > longTimeoutThreshold ? longTimeoutInterval : timeout / shortTimeoutIntervals;
169561
+ let elapsed = 0;
169562
+ const reference = setInterval(() => {
169563
+ elapsed += interval;
169564
+ if (elapsed >= timeout) {
169565
+ clearInterval(reference);
169566
+ callback();
169567
+ }
169568
+ }, interval);
169569
+ return reference;
169570
+ }
169571
+ var longTimeoutThreshold = 4e3;
169572
+ var longTimeoutInterval = 2e3;
169573
+ var shortTimeoutIntervals = 4;
169574
+
169575
+ // src/type-guards.ts
169576
+ function isNotNull(item) {
169577
+ return item !== null;
169578
+ }
169579
+ function isNotUndefined(item) {
169580
+ return item !== void 0;
169581
+ }
169582
+
169583
+ // src/ui.ts
169584
+ function debounce(func, waitFor = 100) {
169585
+ let timeout;
169586
+ return (...args) => {
169587
+ const later = () => {
169588
+ clearTimeout(timeout);
169589
+ func(...args);
169590
+ };
169591
+ clearTimeout(timeout);
169592
+ timeout = setTimeout(later, waitFor);
169593
+ };
169594
+ }
169595
+
169596
+ // src/url.ts
169597
+ function hasSameOrigin(url1, url2, ignoreProtocol = false) {
169598
+ if (!url1 || !url2) {
169599
+ return false;
169600
+ }
169601
+ const url1Obj = new URL(url1);
169602
+ const url2Obj = new URL(url2);
169603
+ if (!ignoreProtocol && url1Obj.protocol !== url2Obj.protocol) {
169604
+ return false;
169605
+ }
169606
+ if (url1Obj.host == null || url2Obj.host == null) {
169607
+ return false;
169608
+ }
169609
+ return url1Obj.host.toLowerCase() === url2Obj.host.toLowerCase() && url1Obj.port === url2Obj.port;
169610
+ }
169611
+ function isURL(url) {
169612
+ try {
169613
+ new URL(url);
169614
+ return true;
169615
+ } catch (e) {
169616
+ return false;
169617
+ }
169618
+ }
169166
169619
 
169167
169620
  /**
169168
169621
  * Filters a collection of items by the given keys and filter word.
@@ -169175,7 +169628,7 @@ function filterCollection(collection, keys, filterWord, beforeFilteringFn) {
169175
169628
  if (!_keys.length) {
169176
169629
  return [];
169177
169630
  }
169178
- const filterExpression = K(filterWord);
169631
+ const filterExpression = createFilterExpression(filterWord);
169179
169632
  return collection.filter((item) => {
169180
169633
  if (beforeFilteringFn) {
169181
169634
  const res = beforeFilteringFn(item);
@@ -169285,7 +169738,7 @@ function fieldAlias(field) {
169285
169738
  //#endregion
169286
169739
  //#region Support functions
169287
169740
  async function getRelatedFeatureLayer(layer, relationship) {
169288
- const relatedFeatureLayer = await newFeatureLayer({ url: `${layer.url}/${relationship.relatedTableId}` });
169741
+ const relatedFeatureLayer = await newLayersFeatureLayer({ url: `${layer.url}/${relationship.relatedTableId}` });
169289
169742
  await relatedFeatureLayer.load();
169290
169743
  return relatedFeatureLayer;
169291
169744
  }
@@ -169341,9 +169794,15 @@ function assembleMemberExpression(obj, prop) {
169341
169794
  }
169342
169795
  return `${obj}${getMemberExpressionProperty(prop)}`;
169343
169796
  }
169797
+ function getMapPortalItem(map) {
169798
+ if (isWebMapInstance(map) || isWebSceneInstance(map)) {
169799
+ return map.portalItem;
169800
+ }
169801
+ return null;
169802
+ }
169344
169803
  //#endregion
169345
169804
  //#region Editor Profile to Language Service Profile functions
169346
- async function variablesToLSVariable(editorVariables, kind = main.CompletionItemKind.Variable) {
169805
+ async function variablesToLSVariable(editorVariables, kind = main.exports.CompletionItemKind.Variable) {
169347
169806
  return await Promise.all(editorVariables.map(async (editorVariable) => {
169348
169807
  switch (editorVariable.type) {
169349
169808
  case "dictionary":
@@ -169366,11 +169825,11 @@ function variableToLSVariable(editorVariable, kind) {
169366
169825
  label: name,
169367
169826
  detail: name,
169368
169827
  insertText: name,
169369
- insertTextMode: main.InsertTextMode.asIs,
169370
- insertTextFormat: main.InsertTextFormat.PlainText,
169828
+ insertTextMode: main.exports.InsertTextMode.asIs,
169829
+ insertTextFormat: main.exports.InsertTextFormat.PlainText,
169371
169830
  kind,
169372
- documentation: { kind: "markdown", value: description }
169373
- }
169831
+ documentation: { kind: "markdown", value: description },
169832
+ },
169374
169833
  };
169375
169834
  }
169376
169835
  async function featureToLSFeature(editorFeature, kind) {
@@ -169382,16 +169841,16 @@ async function featureToLSFeature(editorFeature, kind) {
169382
169841
  label: name,
169383
169842
  detail: name,
169384
169843
  insertText: name,
169385
- insertTextMode: main.InsertTextMode.asIs,
169386
- insertTextFormat: main.InsertTextFormat.PlainText,
169387
- kind
169844
+ insertTextMode: main.exports.InsertTextMode.asIs,
169845
+ insertTextFormat: main.exports.InsertTextFormat.PlainText,
169846
+ kind,
169388
169847
  };
169389
169848
  const result = {
169390
169849
  name,
169391
169850
  description,
169392
169851
  type: "dictionary",
169393
169852
  properties: [],
169394
- completion: resultCompletion
169853
+ completion: resultCompletion,
169395
169854
  };
169396
169855
  // No source definition, then it will be a feature without any known fields
169397
169856
  if (!source) {
@@ -169426,11 +169885,11 @@ async function featureToLSFeature(editorFeature, kind) {
169426
169885
  label: field.name,
169427
169886
  detail: description,
169428
169887
  insertText,
169429
- insertTextMode: main.InsertTextMode.asIs,
169430
- insertTextFormat: main.InsertTextFormat.PlainText,
169431
- kind: main.CompletionItemKind.Field,
169432
- documentation: { kind: "markdown", value: fieldCompletionDescription }
169433
- }
169888
+ insertTextMode: main.exports.InsertTextMode.asIs,
169889
+ insertTextFormat: main.exports.InsertTextFormat.PlainText,
169890
+ kind: main.exports.CompletionItemKind.Field,
169891
+ documentation: { kind: "markdown", value: fieldCompletionDescription },
169892
+ },
169434
169893
  });
169435
169894
  if (!field.alias || field.alias.toLowerCase() === field.name.toLowerCase()) {
169436
169895
  return;
@@ -169448,11 +169907,11 @@ async function featureToLSFeature(editorFeature, kind) {
169448
169907
  label: field.alias,
169449
169908
  detail: field.name,
169450
169909
  insertText,
169451
- insertTextMode: main.InsertTextMode.asIs,
169452
- insertTextFormat: main.InsertTextFormat.PlainText,
169453
- kind: main.CompletionItemKind.Field,
169454
- documentation: { kind: "markdown", value: aliasCompletionDescription }
169455
- }
169910
+ insertTextMode: main.exports.InsertTextMode.asIs,
169911
+ insertTextFormat: main.exports.InsertTextFormat.PlainText,
169912
+ kind: main.exports.CompletionItemKind.Field,
169913
+ documentation: { kind: "markdown", value: aliasCompletionDescription },
169914
+ },
169456
169915
  });
169457
169916
  });
169458
169917
  result.properties = [...fieldProfileValues, ...aliasProfileValues];
@@ -169477,16 +169936,16 @@ async function dictionaryToLSDictionary(editorDictionary, kind) {
169477
169936
  name,
169478
169937
  description,
169479
169938
  type: "dictionary",
169480
- properties: await variablesToLSVariable(variables, main.CompletionItemKind.Field),
169939
+ properties: await variablesToLSVariable(variables, main.exports.CompletionItemKind.Field),
169481
169940
  completion: {
169482
169941
  label: name,
169483
169942
  detail: name,
169484
169943
  insertText: name,
169485
- insertTextMode: main.InsertTextMode.asIs,
169486
- insertTextFormat: main.InsertTextFormat.PlainText,
169944
+ insertTextMode: main.exports.InsertTextMode.asIs,
169945
+ insertTextFormat: main.exports.InsertTextFormat.PlainText,
169487
169946
  kind,
169488
- documentation: { kind: "markdown", value: completionDescription }
169489
- }
169947
+ documentation: { kind: "markdown", value: completionDescription },
169948
+ },
169490
169949
  };
169491
169950
  }
169492
169951
  /**
@@ -169513,9 +169972,9 @@ class ProfileItemBase {
169513
169972
  // If the component is under RTL, the string is messed up.
169514
169973
  // It is converted from $feature to feature$, This is not acceptable since the label
169515
169974
  // represents a variable name. We are adding in front of the $ sign a right to left mark.
169516
- return G(this._label);
169975
+ return addLTRMark(this._label);
169517
169976
  }
169518
- return Z(this._profile?.intlStrings[this._label.code], this._label.formatValues);
169977
+ return setValuesInString(this._profile?.intlStrings[this._label.code], this._label.formatValues);
169519
169978
  }
169520
169979
  /**
169521
169980
  * Returns the description string.
@@ -169527,7 +169986,7 @@ class ProfileItemBase {
169527
169986
  if (typeof this.description === "string") {
169528
169987
  return this.description;
169529
169988
  }
169530
- return Z(this._profile?.intlStrings[this.description.code], this.description.formatValues);
169989
+ return setValuesInString(this._profile?.intlStrings[this.description.code], this.description.formatValues);
169531
169990
  }
169532
169991
  /**
169533
169992
  * Returns true if the item pass the filter test
@@ -169704,28 +170163,28 @@ class DictionaryVariable extends CollectionBasedVariable {
169704
170163
  return new FeatureVariable(this, { profile: this._profile, declaration, label: snippet, snippet });
169705
170164
  case "featureSet":
169706
170165
  return new FeatureSetVariable(this, { profile: this._profile, declaration, label: snippet, snippet }, [
169707
- new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })
170166
+ new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet }),
169708
170167
  ]);
169709
170168
  case "featureSetCollection":
169710
170169
  return new FeatureSetCollectionVariable(this, {
169711
170170
  profile: this._profile,
169712
170171
  declaration,
169713
170172
  label: snippet,
169714
- snippet
170173
+ snippet,
169715
170174
  });
169716
170175
  case "dictionary":
169717
170176
  return new DictionaryVariable(this, {
169718
170177
  profile: this._profile,
169719
170178
  declaration,
169720
170179
  label: snippet,
169721
- snippet
170180
+ snippet,
169722
170181
  });
169723
170182
  case "array":
169724
170183
  return new ArrayVariable({
169725
170184
  profile: this._profile,
169726
170185
  declaration,
169727
170186
  label: snippet,
169728
- snippet
170187
+ snippet,
169729
170188
  });
169730
170189
  default:
169731
170190
  console.error("Editor profile: Invalid profile variable", declaration);
@@ -169737,7 +170196,7 @@ class DictionaryVariable extends CollectionBasedVariable {
169737
170196
  type: this.type,
169738
170197
  name: "",
169739
170198
  ...this.declaration,
169740
- properties: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition())
170199
+ properties: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition()),
169741
170200
  };
169742
170201
  }
169743
170202
  }
@@ -169768,7 +170227,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169768
170227
  return this._profile?.intlStrings.layer ?? "layer";
169769
170228
  }
169770
170229
  async loadSource() {
169771
- if (ee(this._loadPromise) && te(this._loadPromise)) {
170230
+ if (isNotNull(this._loadPromise) && isNotUndefined(this._loadPromise)) {
169772
170231
  return await this._loadPromise;
169773
170232
  }
169774
170233
  this._loadPromise = this._loadSource();
@@ -169803,7 +170262,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169803
170262
  description: fieldAlias(field),
169804
170263
  snippet: valueSnippet,
169805
170264
  icon: fieldTypeToIconName(field),
169806
- filterDescription: true
170265
+ filterDescription: true,
169807
170266
  });
169808
170267
  }
169809
170268
  _getDomainDictionary(field) {
@@ -169842,6 +170301,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169842
170301
  // Sepcial case for the subtype field
169843
170302
  if (field.name === this._source.subtypeField) {
169844
170303
  const domainDictionary = this._createDomainDictionary(field);
170304
+ domainDictionary.icon = "subtype";
169845
170305
  domainDictionary.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.subtypes, field));
169846
170306
  return domainDictionary;
169847
170307
  }
@@ -169896,7 +170356,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169896
170356
  return null;
169897
170357
  }
169898
170358
  const domainValuesGroup = this._getCodedValueDomainGroup(fieldDomain, {
169899
- code: "domainvalues"
170359
+ code: "domainvalues",
169900
170360
  });
169901
170361
  const domainDictionary = this._createDomainDictionary(field);
169902
170362
  domainDictionary.variables.push(domainValuesGroup);
@@ -169914,7 +170374,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169914
170374
  profile: this._profile,
169915
170375
  label: `${label}`,
169916
170376
  description: t.name,
169917
- snippet: `"${label}"`
170377
+ snippet: `"${label}"`,
169918
170378
  });
169919
170379
  }) ?? [];
169920
170380
  return new GroupOfVariables(this._profile, { code: "subtypes" }, values);
@@ -169925,7 +170385,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169925
170385
  label: `${v.code}`,
169926
170386
  description: v.name,
169927
170387
  snippet: `"${v.code}"`,
169928
- filterDescription: true
170388
+ filterDescription: true,
169929
170389
  }));
169930
170390
  return new GroupOfVariables(this._profile, label, values);
169931
170391
  }
@@ -169951,8 +170411,8 @@ class SourceBasedVariable extends CollectionBasedVariable {
169951
170411
  code: "domainvaluesfortypeformat",
169952
170412
  formatValues: {
169953
170413
  fieldName: alias,
169954
- typeName: type.name
169955
- }
170414
+ typeName: type.name,
170415
+ },
169956
170416
  });
169957
170417
  const id = isSubtypeInstance(type) ? type.code : type.id;
169958
170418
  const label = `${id}`;
@@ -169962,7 +170422,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169962
170422
  label,
169963
170423
  snippet,
169964
170424
  description: type.name,
169965
- declaration: { name: alias }
170425
+ declaration: { name: alias },
169966
170426
  });
169967
170427
  subtypeDictionary.variables = [domainValuesGroup];
169968
170428
  variables.push(subtypeDictionary);
@@ -169984,7 +170444,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
169984
170444
  description: alias,
169985
170445
  snippet: valueSnippet,
169986
170446
  icon: "form-dropdown",
169987
- declaration: { name: field.name }
170447
+ declaration: { name: field.name },
169988
170448
  });
169989
170449
  // Add the header group
169990
170450
  const headerGroup = new GroupOfVariables(this._profile, alias, [
@@ -169992,8 +170452,8 @@ class SourceBasedVariable extends CollectionBasedVariable {
169992
170452
  profile: this._profile,
169993
170453
  label: valueSnippet,
169994
170454
  description: "",
169995
- snippet: valueSnippet
169996
- })
170455
+ snippet: valueSnippet,
170456
+ }),
169997
170457
  ]);
169998
170458
  domainDictionary.variables = [headerGroup];
169999
170459
  // Add the SubtypeName or DomainName snippet if available
@@ -170003,7 +170463,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
170003
170463
  profile: this._profile,
170004
170464
  label: subtypeOrDomainNameSnippet,
170005
170465
  description: "",
170006
- snippet: subtypeOrDomainNameSnippet
170466
+ snippet: subtypeOrDomainNameSnippet,
170007
170467
  }));
170008
170468
  }
170009
170469
  return domainDictionary;
@@ -170020,7 +170480,7 @@ class SourceBasedVariable extends CollectionBasedVariable {
170020
170480
  const relationshipsGroup = new GroupOfVariables(this._profile, { code: "relationships" });
170021
170481
  const relationshipItems = await Promise.all(source.relationships.map(async (relationship) => {
170022
170482
  const relatedLayer = await getRelatedFeatureLayer(source, relationship);
170023
- if (!isQueryableLayerInstance(relatedLayer)) {
170483
+ if (!isFeatureLayerLikeInstance(relatedLayer)) {
170024
170484
  return null;
170025
170485
  }
170026
170486
  if (relationship.relatedTableId === this.relationshipsProperties?.sourceTableId) {
@@ -170033,10 +170493,10 @@ class SourceBasedVariable extends CollectionBasedVariable {
170033
170493
  declaration: { definition: relatedLayer },
170034
170494
  label: relatedLayer.title,
170035
170495
  description: "",
170036
- nonInteractive: true
170496
+ nonInteractive: true,
170037
170497
  }, [new ValueVariable({ profile: this._profile, label: snippet, description: "", snippet })], { exposeRelationships: true, sourceTableId: source.layerId });
170038
170498
  }));
170039
- relationshipsGroup.variables = relationshipItems.filter(ee);
170499
+ relationshipsGroup.variables = relationshipItems.filter(isNotNull);
170040
170500
  if (!relationshipsGroup.variables.length) {
170041
170501
  return null;
170042
170502
  }
@@ -170049,8 +170509,8 @@ class FeatureVariable extends SourceBasedVariable {
170049
170509
  this.type = "feature";
170050
170510
  }
170051
170511
  get title() {
170052
- if (isSupportedLayerInstance(this._source)) {
170053
- return this._source.title;
170512
+ if (isTitleCapableSource(this._source)) {
170513
+ return this._source.title ?? "";
170054
170514
  }
170055
170515
  return { code: "feature" };
170056
170516
  }
@@ -170064,14 +170524,14 @@ class FeatureVariable extends SourceBasedVariable {
170064
170524
  throw new Error("Invalid definition");
170065
170525
  }
170066
170526
  // The title group and snippet
170067
- const title = isSupportedLayerInstance(this._source) ? this._source.title : "";
170527
+ const title = isTitleCapableSource(this._source) ? this._source.title ?? "" : "";
170068
170528
  this.variables.push(new GroupOfVariables(this._profile, title, [
170069
170529
  new ValueVariable({
170070
170530
  profile: this._profile,
170071
170531
  label: this.snippet,
170072
170532
  description: "",
170073
- snippet: this.snippet
170074
- })
170533
+ snippet: this.snippet,
170534
+ }),
170075
170535
  ]));
170076
170536
  // The collection of feature attribute values
170077
170537
  const valuesGroup = new GroupOfVariables(this._profile, { code: "values" });
@@ -170086,7 +170546,7 @@ class FeatureVariable extends SourceBasedVariable {
170086
170546
  description: "Geometry",
170087
170547
  snippet,
170088
170548
  icon: "shapes",
170089
- filterDescription: true
170549
+ filterDescription: true,
170090
170550
  });
170091
170551
  valuesGroup.variables.push(geometryProperty);
170092
170552
  }
@@ -170099,8 +170559,8 @@ class FeatureVariable extends SourceBasedVariable {
170099
170559
  this.variables.push(relationshipsGroup);
170100
170560
  }
170101
170561
  }
170102
- catch (e) {
170103
- console.error("Loading issue", e, this);
170562
+ catch (error) {
170563
+ console.error("Error with definition", error, this._definition);
170104
170564
  this._source = null;
170105
170565
  }
170106
170566
  finally {
@@ -170122,8 +170582,8 @@ class FeatureSetVariable extends SourceBasedVariable {
170122
170582
  this.type = "featureSet";
170123
170583
  }
170124
170584
  get title() {
170125
- if (isSupportedLayerInstance(this._source)) {
170126
- return this._source.title;
170585
+ if (isTitleCapableSource(this._source)) {
170586
+ return this._source.title ?? "";
170127
170587
  }
170128
170588
  return { code: "featureset" };
170129
170589
  }
@@ -170150,8 +170610,8 @@ class FeatureSetVariable extends SourceBasedVariable {
170150
170610
  this.variables.push(relationshipsGroup);
170151
170611
  }
170152
170612
  }
170153
- catch (e) {
170154
- console.error("Loading issue", e, this);
170613
+ catch (error) {
170614
+ console.error("Error with definition", error, this._definition);
170155
170615
  this._source = null;
170156
170616
  }
170157
170617
  finally {
@@ -170176,7 +170636,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170176
170636
  return null;
170177
170637
  }
170178
170638
  if (typeof this._featureSetCollections.source !== "string") {
170179
- return portalItemPageUrl(this._featureSetCollections.source.portalItem);
170639
+ return portalItemPageUrl(getMapPortalItem(this._featureSetCollections.source));
170180
170640
  }
170181
170641
  // const firstLayer = this._featureSetCollection.layers[0] ?? this._featureSetCollection.tables[0];
170182
170642
  // if (!firstLayer) {
@@ -170188,13 +170648,19 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170188
170648
  if (!this.loaded || !this._featureSetCollections) {
170189
170649
  return "";
170190
170650
  }
170191
- if (typeof this._featureSetCollections.source !== "string") {
170651
+ if (typeof this._featureSetCollections.source === "string") {
170652
+ return this._profile?.intlStrings.featureservice ?? "featureservice";
170653
+ }
170654
+ if (isWebSceneInstance(this._featureSetCollections.source)) {
170655
+ return this._profile?.intlStrings.webscene ?? "webscene";
170656
+ }
170657
+ if (isWebMapInstance(this._featureSetCollections.source)) {
170192
170658
  return this._profile?.intlStrings.webmap ?? "webmap";
170193
170659
  }
170194
- return this._profile?.intlStrings.featureservice ?? "featureservice";
170660
+ return this._profile?.intlStrings.map ?? "map";
170195
170661
  }
170196
170662
  async loadSource() {
170197
- if (ee(this._loadPromise) && te(this._loadPromise)) {
170663
+ if (isNotNull(this._loadPromise) && isNotUndefined(this._loadPromise)) {
170198
170664
  return await this._loadPromise;
170199
170665
  }
170200
170666
  this._loadPromise = this._loadSource();
@@ -170215,24 +170681,24 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170215
170681
  : {
170216
170682
  code: "webmapformat",
170217
170683
  formatValues: {
170218
- webMapTitle: this._featureSetCollections.source.portalItem?.title || "Untitled map"
170219
- }
170684
+ webMapTitle: getMapPortalItem(this._featureSetCollections.source)?.title || "Untitled map",
170685
+ },
170220
170686
  };
170221
170687
  const headerGroup = new GroupOfVariables(this._profile, groupLabel, [
170222
170688
  new ValueVariable({
170223
170689
  profile: this._profile,
170224
170690
  label: this.snippet,
170225
170691
  description: "",
170226
- snippet: this.snippet
170227
- })
170692
+ snippet: this.snippet,
170693
+ }),
170228
170694
  ]);
170229
170695
  // Creates the groups for the layer and tables
170230
170696
  const layersGroup = new GroupOfVariables(this._profile, { code: "layers" }, this._featureSetCollections.layers);
170231
170697
  const tablesGroup = new GroupOfVariables(this._profile, { code: "tables" }, this._featureSetCollections.tables);
170232
170698
  this.variables.push(headerGroup, layersGroup, tablesGroup);
170233
170699
  }
170234
- catch (e) {
170235
- console.error("Loading issue", e, this);
170700
+ catch (error) {
170701
+ console.error("Error with definition", error, this._definition);
170236
170702
  this._featureSetCollections = null;
170237
170703
  }
170238
170704
  finally {
@@ -170247,7 +170713,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170247
170713
  if (isMapInstance(this._definition)) {
170248
170714
  return await this._featureSetCollectionFromMap(this._definition);
170249
170715
  }
170250
- if (isSupportedLayerInstance(this._definition)) {
170716
+ if (isUrlDefinition(this._definition)) {
170251
170717
  return await this._featureSetCollectionFromUrl(this._definition.url);
170252
170718
  }
170253
170719
  if (isPortalItemDefinition(this._definition)) {
@@ -170255,21 +170721,19 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170255
170721
  // or Feature Service
170256
170722
  return await this._featureSetCollectionFromPortalItem(this._definition.portalItem);
170257
170723
  }
170258
- if (isUrlDefinition(this._definition)) {
170259
- // Assume that the url is pointing to a feature server
170260
- return await this._featureSetCollectionFromUrl(this._definition.url);
170261
- }
170262
170724
  return null;
170263
170725
  }
170264
170726
  async _featureSetCollectionFromMap(map) {
170265
- // Make sure the map is loaded
170266
- await map.loadAll();
170727
+ if (isLoadableMapInstance(map)) {
170728
+ // Make sure the map is loaded
170729
+ await map.loadAll();
170730
+ }
170267
170731
  // Until jsapi fix a bug we have to load the table separately
170268
170732
  await Promise.all(map.tables.map(async (t) => (await t.load())));
170269
170733
  return {
170270
170734
  layers: this._convertWebMapLayersToVariables(map.layers),
170271
170735
  tables: this._convertWebMapLayersToVariables(map.tables, true),
170272
- source: map
170736
+ source: map,
170273
170737
  };
170274
170738
  }
170275
170739
  async _featureSetCollectionFromPortalItem(definition) {
@@ -170300,12 +170764,12 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170300
170764
  }
170301
170765
  const metadata = await serviceMetaData(processedUrl);
170302
170766
  const layersPromise = Promise.all(metadata.layers.map(async (layerInfo) => {
170303
- const featureLayer = await newFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
170767
+ const featureLayer = await newLayersFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
170304
170768
  await featureLayer.load();
170305
170769
  return this._createFeatureSetVariable(featureLayer);
170306
170770
  }));
170307
170771
  const tablesPromise = Promise.all(metadata.tables.map(async (layerInfo) => {
170308
- const table = await newFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
170772
+ const table = await newLayersFeatureLayer({ url: `${processedUrl}/${layerInfo.id}` });
170309
170773
  await table.load();
170310
170774
  return this._createFeatureSetVariable(table);
170311
170775
  }));
@@ -170318,7 +170782,7 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170318
170782
  .toArray()
170319
170783
  .reverse()
170320
170784
  .forEach((layer) => {
170321
- if (isQueryableLayerInstance(layer)) {
170785
+ if (isFeatureLayerLikeInstance(layer)) {
170322
170786
  layerVariables.push(this._createFeatureSetVariable(layer, true));
170323
170787
  return;
170324
170788
  }
@@ -170331,29 +170795,31 @@ class FeatureSetCollectionVariable extends CollectionBasedVariable {
170331
170795
  });
170332
170796
  return layerVariables;
170333
170797
  }
170334
- _createFeatureSetVariable(featureLayer, isFromWebMap = false) {
170798
+ _createFeatureSetVariable(featureLayerLike, isFromWebMap = false) {
170335
170799
  return new FeatureSetVariable(this, {
170336
170800
  profile: this._profile,
170337
- declaration: { name: featureLayer.title, definition: featureLayer },
170338
- label: featureLayer.title,
170801
+ declaration: { name: featureLayerLike.title, definition: featureLayerLike },
170802
+ label: isFromWebMap
170803
+ ? featureLayerLike.title
170804
+ : featureLayerLike.sourceJSON.name ?? featureLayerLike.title,
170339
170805
  description: "",
170340
- nonInteractive: true
170341
- }, this._makeFeatureSetSnippets(featureLayer, isFromWebMap));
170806
+ nonInteractive: true,
170807
+ }, this._makeFeatureSetSnippets(featureLayerLike, isFromWebMap));
170342
170808
  }
170343
- _makeFeatureSetSnippets(featureLayer, isFromWebMap = false) {
170809
+ _makeFeatureSetSnippets(featureLayerLike, isFromWebMap = false) {
170344
170810
  if (!this._profile?.supportFeatureSetFunctions) {
170345
170811
  return [];
170346
170812
  }
170347
170813
  if (isFromWebMap) {
170348
- const snippetById = `FeatureSetById(${this.snippet}, "${featureLayer.id}")`;
170349
- const snippetByName = `FeatureSetByName(${this.snippet}, "${featureLayer.title}")`;
170814
+ const snippetById = `FeatureSetById(${this.snippet}, "${featureLayerLike.id}")`;
170815
+ const snippetByName = `FeatureSetByName(${this.snippet}, "${featureLayerLike.title}")`;
170350
170816
  return [
170351
170817
  new ValueVariable({ profile: this._profile, label: snippetById, description: "", snippet: snippetById }),
170352
- new ValueVariable({ profile: this._profile, label: snippetByName, description: "", snippet: snippetByName })
170818
+ new ValueVariable({ profile: this._profile, label: snippetByName, description: "", snippet: snippetByName }),
170353
170819
  ];
170354
170820
  }
170355
170821
  else {
170356
- const snippetById = `FeatureSetById(${this.snippet}, "${featureLayer.layerId}")`;
170822
+ const snippetById = `FeatureSetById(${this.snippet}, "${featureLayerLike.layerId}")`;
170357
170823
  return [new ValueVariable({ profile: this._profile, label: snippetById, description: "", snippet: snippetById })];
170358
170824
  }
170359
170825
  }
@@ -170374,7 +170840,7 @@ class EditorProfile extends DictionaryVariable {
170374
170840
  // Delay the load of the variable declarations so we have a `this`
170375
170841
  super(undefined, {
170376
170842
  profile: null,
170377
- declaration: { properties: [] }
170843
+ declaration: { properties: [] },
170378
170844
  });
170379
170845
  this.definition = definition;
170380
170846
  this.intlStrings = intlStrings;
@@ -170406,28 +170872,20 @@ class EditorProfile extends DictionaryVariable {
170406
170872
  toEditorProfileDefinition() {
170407
170873
  return {
170408
170874
  ...this.definition,
170409
- variables: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition())
170875
+ variables: this.dictionaryVariables.map((variable) => variable.toProfileVariableDefinition()),
170410
170876
  };
170411
170877
  }
170412
170878
  }
170413
170879
  //#endregion
170414
170880
 
170415
170881
  function isFeatureDefinition(item) {
170416
- return (isSupportedLayerInstance(item) ||
170417
- isFeatureSetInstance(item) ||
170418
- isUrlDefinition(item) ||
170419
- isFieldsDefinition(item) ||
170420
- isFeatureLayerItemDefinition(item));
170882
+ return isUrlDefinition(item) || isFieldsDefinition(item) || isFeatureLayerItemDefinition(item);
170421
170883
  }
170422
170884
  function isFeatureSetDefinition(item) {
170423
- return (isQueryableLayerInstance(item) ||
170424
- isFeatureSetInstance(item) ||
170425
- isUrlDefinition(item) ||
170426
- isFieldsDefinition(item) ||
170427
- isFeatureLayerItemDefinition(item));
170885
+ return isUrlDefinition(item) || isFieldsDefinition(item) || isFeatureLayerItemDefinition(item);
170428
170886
  }
170429
170887
  function isFeatureSetCollectionDefinition(item) {
170430
- return isPortalItemDefinition(item) || isMapInstance(item) || isFeatureSetDefinition(item);
170888
+ return isPortalItemDefinition(item) || isMapInstance(item) || isSupportedServiceUrlDefinition(item);
170431
170889
  }
170432
170890
  /**
170433
170891
  * Get a PredefinedProfile for a locale. If not already loaded then fetch it.
@@ -170439,7 +170897,7 @@ async function getSdkPredefinedProfiles(locale = "en") {
170439
170897
  if (profiles) {
170440
170898
  return profiles;
170441
170899
  }
170442
- if (!E.has(locale)) {
170900
+ if (!supportedLocales.has(locale)) {
170443
170901
  return await getSdkPredefinedProfiles("en");
170444
170902
  }
170445
170903
  try {
@@ -170477,7 +170935,7 @@ function isExtendedPredefinedProfileDefinition(item) {
170477
170935
  return !!item && typeof item === "object" && "additionalVariables" in item && Array.isArray(item.additionalVariables);
170478
170936
  }
170479
170937
  function convertApiVariables(variables) {
170480
- return variables.map(convertApiVariable);
170938
+ return variables?.map(convertApiVariable);
170481
170939
  }
170482
170940
  function convertApiVariable(variable) {
170483
170941
  switch (variable.type) {
@@ -170485,13 +170943,13 @@ function convertApiVariable(variable) {
170485
170943
  return {
170486
170944
  ...variable,
170487
170945
  type: variable.type,
170488
- properties: convertApiVariables(variable.properties)
170946
+ properties: convertApiVariables(variable.properties),
170489
170947
  };
170490
170948
  case "array": {
170491
170949
  return {
170492
170950
  ...variable,
170493
170951
  type: variable.type,
170494
- elementType: { type: "number", name: "number" }
170952
+ elementType: { type: "number", name: "number" },
170495
170953
  };
170496
170954
  }
170497
170955
  default:
@@ -170509,43 +170967,47 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
170509
170967
  const editorProfile = {
170510
170968
  bundles: [...sdkPredefinedProfile.bundles],
170511
170969
  variables: [],
170512
- hiddenApiItems: predefinedProfile.hiddenApiItems?.map((s) => s.toLowerCase())
170970
+ hiddenApiItems: predefinedProfile.hiddenApiItems?.map((s) => s.toLowerCase()),
170513
170971
  };
170514
170972
  // Merge the SDK variables' definitions/properties with the predefined profile definitions.
170515
- sdkPredefinedProfile.variables.forEach((sdkVariable) => {
170973
+ sdkPredefinedProfile.variables.forEach((predefinedVariable) => {
170516
170974
  // Don't include disabled variables
170517
- if (predefinedProfile.disabledVariables?.includes(sdkVariable.name)) {
170975
+ if (predefinedProfile.disabledVariables?.includes(predefinedVariable.name)) {
170518
170976
  return;
170519
170977
  }
170520
- // Try to get a definition from the predefined profile.
170521
- const definition = predefinedProfile.definitions[sdkVariable.name];
170978
+ // Try to get a definition from the predefined profile, for the variable that needs one.
170979
+ const definition = predefinedProfile.definitions[predefinedVariable.name];
170522
170980
  // Note: Something is weird with TS. The sdkVariables are being casted to the wrong type
170523
170981
  // despite the type checking from the switch statement.
170524
- switch (sdkVariable.type) {
170525
- case "dictionary":
170982
+ switch (predefinedVariable.type) {
170983
+ case "dictionary": {
170526
170984
  // For dictionary, we support properties overrride
170527
170985
  return editorProfile.variables.push(convertApiVariable({
170528
- ...sdkVariable,
170529
- type: sdkVariable.type,
170530
- properties: Array.isArray(definition) ? [...definition] : sdkVariable.properties
170986
+ ...predefinedVariable,
170987
+ type: predefinedVariable.type,
170988
+ properties: Array.isArray(definition) ? [...definition] : predefinedVariable.properties,
170531
170989
  }));
170990
+ }
170532
170991
  case "feature":
170533
- if (isFeatureDefinition(definition)) {
170534
- return editorProfile.variables.push({ ...sdkVariable, type: sdkVariable.type, definition });
170992
+ // If the definition is not valid, then we don't include it.
170993
+ if (!isFeatureDefinition(definition)) {
170994
+ return;
170535
170995
  }
170536
- return editorProfile.variables.push({ ...sdkVariable, type: sdkVariable.type });
170996
+ return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
170537
170997
  case "featureSet":
170538
- if (isFeatureSetDefinition(definition)) {
170539
- return editorProfile.variables.push({ ...sdkVariable, type: sdkVariable.type, definition });
170998
+ // If the definition is not valid, then we don't include it.
170999
+ if (!isFeatureSetDefinition(definition)) {
171000
+ return;
170540
171001
  }
170541
- return editorProfile.variables.push({ ...sdkVariable, type: sdkVariable.type });
171002
+ return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
170542
171003
  case "featureSetCollection":
170543
- if (isFeatureSetCollectionDefinition(definition)) {
170544
- return editorProfile.variables.push({ ...sdkVariable, type: sdkVariable.type, definition });
171004
+ // If the definition is not valid, then we don't include it.
171005
+ if (!isFeatureSetCollectionDefinition(definition)) {
171006
+ return;
170545
171007
  }
170546
- return editorProfile.variables.push({ ...sdkVariable, type: sdkVariable.type });
171008
+ return editorProfile.variables.push({ ...predefinedVariable, type: predefinedVariable.type, definition });
170547
171009
  default:
170548
- return editorProfile.variables.push(convertApiVariable(sdkVariable));
171010
+ return editorProfile.variables.push(convertApiVariable(predefinedVariable));
170549
171011
  }
170550
171012
  });
170551
171013
  if (isExtendedPredefinedProfileDefinition(predefinedProfile)) {
@@ -170556,7 +171018,7 @@ async function convertToEditorProfileDefinition(predefinedProfile, locale = "en"
170556
171018
 
170557
171019
  const arcadeLanguageId = "arcade";
170558
171020
  const defaultContext = {
170559
- locale: "en"
171021
+ locale: "en",
170560
171022
  };
170561
171023
  class ArcadeLanguageServiceDefaults {
170562
171024
  constructor() {
@@ -170610,7 +171072,7 @@ class ArcadeLanguageServiceDefaults {
170610
171072
  if (isPredefinedProfile(definition)) {
170611
171073
  definition = await convertToEditorProfileDefinition(definition, apiContext.locale);
170612
171074
  }
170613
- const intlStrings = await v(apiContext.locale, getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
171075
+ const intlStrings = await fetchT9NStringsBundle(apiContext.locale, getAssetPath("./assets/arcade-language/t9n"), "profile.t9n.");
170614
171076
  if (!intlStrings) {
170615
171077
  throw new Error(`Failed to load the language bundle for ${apiContext.locale}`);
170616
171078
  }
@@ -170622,7 +171084,7 @@ class ArcadeLanguageServiceDefaults {
170622
171084
  this.updateApiContextForModel(modelId, {
170623
171085
  locale: apiContext.locale,
170624
171086
  profile: apiProfile,
170625
- snippets: apiContext.snippets
171087
+ snippets: apiContext.snippets,
170626
171088
  });
170627
171089
  }
170628
171090
  /**
@@ -170689,7 +171151,7 @@ class ArcadeLanguageServiceDefaults {
170689
171151
  }
170690
171152
  const arcadeDefaults = new ArcadeLanguageServiceDefaults();
170691
171153
  const arcade = {
170692
- setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults)
171154
+ setProfileForModel: arcadeDefaults.setProfileForModel.bind(arcadeDefaults),
170693
171155
  };
170694
171156
 
170695
- export { B, D, Emitter as E, G, IStandaloneThemeService as I, KeyCode as K, MarkerSeverity as M, Range as R, StandaloneServices as S, Uri as U, W, Z, arcade as a, commonjsGlobal as b, createCommonjsModule as c, importRequest as d, editor as e, arcadeDefaults as f, generateTokensCSSForColorMap as g, filterCollection as h, ie as i, importArcade as j, h as k, languages as l, U as m, k as n, supportedFields as o, K as p, q, KeyMod as r, se as s, monaco_editor_core_star as t, typescriptDefaults as u, main as v, re as w, x };
171157
+ export { KeyMod as A, monaco_editor_core_star as B, typescriptDefaults as C, Deferred as D, main as E, debounce as F, Emitter as G, IStandaloneThemeService as I, KeyCode as K, MarkerSeverity as M, Range as R, StandaloneServices as S, Uri as U, arcade as a, camelToKebab as b, commonjsGlobal as c, safeAsyncCall as d, editor as e, devToolsAwareTimeout as f, generateTokensCSSForColorMap as g, startLocaleObserver as h, getElementLocales as i, isURL as j, hasSameOrigin as k, importRequest as l, languages as m, arcadeDefaults as n, setFocusOnElement as o, filterCollection as p, addLTRMark as q, importArcade as r, safeCall as s, generateGuid as t, getElementTheme as u, setValuesInString as v, quoteString as w, supportedFields as x, createFilterExpression as y, observeAncestorsMutation as z };