@arcgis/coding-components 4.34.0-next.128 → 4.34.0-next.129

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 (96) hide show
  1. package/dist/addons.js +1 -1
  2. package/dist/cdn/{OGCX5NIT.js → 2JJBMAY2.js} +2 -2
  3. package/dist/cdn/{JLOGYGWN.js → 2TZ4WNB2.js} +2 -2
  4. package/dist/cdn/{AH5G2UUW.js → 2Y4QWUQ5.js} +2 -2
  5. package/dist/cdn/{F7KZ4J3M.js → 3BAPPI5A.js} +1 -1
  6. package/dist/cdn/{DN4MQ6DT.js → 3OTSLDGR.js} +2 -2
  7. package/dist/cdn/{PIG62Q36.js → 3VYPPYN2.js} +2 -2
  8. package/dist/cdn/{XNX2GS3A.js → 4XLQ3TIM.js} +2 -2
  9. package/dist/cdn/{AP2U5M7T.js → 5AAZTIQL.js} +2 -2
  10. package/dist/cdn/{E2HR7G72.js → 5JFZAWYW.js} +2 -2
  11. package/dist/cdn/{G2VPV7FH.js → 6MXMTSQB.js} +2 -2
  12. package/dist/cdn/{FMXI4GWW.js → 7VY4ZFTY.js} +2 -2
  13. package/dist/cdn/{JBEVFE6N.js → BT4ACDC4.js} +2 -2
  14. package/dist/cdn/DUHD2WEC.js +8 -0
  15. package/dist/cdn/{3X4QVHVH.js → EWJPI4K3.js} +2 -2
  16. package/dist/cdn/{CGZMEBUQ.js → FDYED5F2.js} +2 -2
  17. package/dist/cdn/{CVRIP3YF.js → FLSE56KS.js} +2 -2
  18. package/dist/cdn/{ATINCT6D.js → HEQUWZSF.js} +4 -4
  19. package/dist/cdn/{2D4XLNSC.js → HV2EUOMS.js} +2 -2
  20. package/dist/cdn/{4ARGYT7I.js → IEGREDGD.js} +2 -2
  21. package/dist/cdn/{TZB44K44.js → IEGVLDQY.js} +2 -2
  22. package/dist/cdn/{JEW6O26N.js → JM3TNAV2.js} +2 -2
  23. package/dist/cdn/{OI5IWVLN.js → JVIVTV57.js} +2 -2
  24. package/dist/cdn/{M6VF2DXU.js → JZL444LG.js} +2 -2
  25. package/dist/cdn/{3WLCQZAM.js → K2A3TUUC.js} +2 -2
  26. package/dist/cdn/{Z3XY2NFB.js → KYAO2ZUR.js} +1 -1
  27. package/dist/cdn/{TWSJPG3O.js → L4PG6X53.js} +2 -2
  28. package/dist/cdn/{LWXLWCAZ.js → L5G7YF5J.js} +2 -2
  29. package/dist/cdn/{SYJQ6XKG.js → LR63OZBB.js} +2 -2
  30. package/dist/cdn/LUROZOMB.js +14 -0
  31. package/dist/cdn/{NFQLRYAL.js → NFEER5QJ.js} +2 -2
  32. package/dist/cdn/{BXLATVVK.js → OEFBH3WB.js} +2 -2
  33. package/dist/cdn/{7LDSNUR5.js → OKKIHEDD.js} +2 -2
  34. package/dist/cdn/{FXZL7KS5.js → QESHZN4W.js} +2 -2
  35. package/dist/cdn/QGSWW3NM.js +4 -0
  36. package/dist/cdn/{EITZEBGN.js → QUT4VJRY.js} +1 -1
  37. package/dist/cdn/STHV2ZWY.js +4 -0
  38. package/dist/cdn/{6RCN5HYJ.js → SWMMEXIO.js} +1 -1
  39. package/dist/cdn/{RIPEMMAE.js → T3RBCTRD.js} +2 -2
  40. package/dist/cdn/{CZEK6RSP.js → U2OPLXBP.js} +2 -2
  41. package/dist/cdn/{GNFBKT3J.js → UCTN2Y42.js} +2 -2
  42. package/dist/cdn/{BOTANQTX.js → UDSJ3U6Q.js} +2 -2
  43. package/dist/cdn/{BSLV24BJ.js → UN2TOEHW.js} +1 -1
  44. package/dist/cdn/{WA55I5X3.js → WD27FFED.js} +1 -1
  45. package/dist/cdn/{J3STVK2I.js → YHHR4A3C.js} +2 -2
  46. package/dist/cdn/assets/code-editor/sql-expr.worker.js +8187 -8181
  47. package/dist/cdn/index.js +2 -2
  48. package/dist/chunks/arcade-defaults.js +138 -104
  49. package/dist/chunks/arcade-executor.js +1 -1
  50. package/dist/chunks/arcade-mode.js +1 -1
  51. package/dist/chunks/arcade-service-accessors.js +1 -1
  52. package/dist/chunks/editor.js +1 -1
  53. package/dist/chunks/fields.js +52 -11
  54. package/dist/chunks/language-defaults-base.js +378 -243
  55. package/dist/chunks/markdown.js +1 -1
  56. package/dist/chunks/monaco-importer.js +1 -1
  57. package/dist/chunks/runtime.js +1 -1
  58. package/dist/chunks/setup-monaco.js +1 -1
  59. package/dist/chunks/sql-expr-contribution.js +1 -1
  60. package/dist/chunks/sql-expr-defaults.js +1 -1
  61. package/dist/chunks/sql-expr-mode.js +1 -1
  62. package/dist/chunks/sql-expr-service-accessors.js +1 -1
  63. package/dist/chunks/useT9n.js +1 -1
  64. package/dist/components/arcgis-arcade-coding-assistant/customElement.d.ts +0 -8
  65. package/dist/components/arcgis-arcade-coding-assistant/customElement.js +1 -1
  66. package/dist/components/arcgis-arcade-editor/customElement.d.ts +0 -71
  67. package/dist/components/arcgis-arcade-editor/customElement.js +1 -1
  68. package/dist/components/arcgis-arcade-results/customElement.d.ts +0 -14
  69. package/dist/components/arcgis-arcade-results/customElement.js +1 -1
  70. package/dist/components/arcgis-arcade-suggestions/customElement.d.ts +0 -8
  71. package/dist/components/arcgis-arcade-suggestions/customElement.js +1 -1
  72. package/dist/components/arcgis-code-editor/customElement.d.ts +0 -53
  73. package/dist/components/arcgis-code-editor/customElement.js +1 -1
  74. package/dist/components/arcgis-editor-variables/customElement.d.ts +0 -19
  75. package/dist/components/arcgis-editor-variables/customElement.js +1 -1
  76. package/dist/components/arcgis-language-api-panel/customElement.d.ts +0 -23
  77. package/dist/components/arcgis-language-api-panel/customElement.js +1 -1
  78. package/dist/components/arcgis-sql-expression-editor/customElement.d.ts +0 -28
  79. package/dist/components/arcgis-sql-expression-editor/customElement.js +1 -1
  80. package/dist/components/arcgis-sql-expression-fields/customElement.d.ts +0 -8
  81. package/dist/components/arcgis-sql-expression-fields/customElement.js +1 -1
  82. package/dist/docs/api.json +2 -2
  83. package/dist/docs/docs.json +2 -2
  84. package/dist/docs/web-types.json +1 -1
  85. package/dist/index.js +1 -1
  86. package/dist/loader.js +1 -1
  87. package/dist/monacoStyles.js +1 -1
  88. package/dist/utils/fields.d.ts +8 -1
  89. package/dist/utils/profile/editor-profile.d.ts +30 -12
  90. package/dist/utils/profile/types.d.ts +28 -1
  91. package/dist/utils/profile/utils.d.ts +5 -1
  92. package/package.json +5 -5
  93. package/dist/cdn/A2QCR3TF.js +0 -10
  94. package/dist/cdn/DCS4WKNJ.js +0 -4
  95. package/dist/cdn/F3CZQSXF.js +0 -8
  96. package/dist/cdn/WOVEEI32.js +0 -4
@@ -1,12 +1,19 @@
1
1
  /// <reference types="@arcgis/core/interfaces.d.ts" />
2
2
  import { ApiValueVariableType } from '@arcgis/languages-api-utils';
3
+ /**
4
+ * The set of calcite icons we use in the arcade editor to represent field and variable types.
5
+ */
6
+ type EditorIcons = "calendar" | "clock" | "cube" | "date-time" | "double-float-set" | "key" | "number" | "string-set" | "string" | "time-zone";
3
7
  /**
4
8
  * Returns an icon name for the field type
5
9
  */
6
- export declare function fieldTypeToIconName(field: __esri.Field): string;
10
+ export declare function fieldTypeToIconName(field: __esri.Field, members?: __esri.ProfileVariable[]): EditorIcons;
11
+ /** Returns the icon name for an \@arcgis/core profile variable */
12
+ export declare function memberToIconName(member: __esri.ProfileVariable): EditorIcons;
7
13
  /**
8
14
  * Returns the ApiValueVariable type for the given field.
9
15
  */
10
16
  export declare function fieldTypeToApiValueVarType(field: __esri.Field): ApiValueVariableType;
11
17
  export declare function supportedFields(fields: __esri.Field[] | null | undefined): __esri.Field[];
12
18
  export declare function fieldAlias(field: __esri.Field): string;
19
+ export {};
@@ -26,8 +26,9 @@ interface IFeatureSetCollections {
26
26
  * converts fields to profile values and calculates the feature completion description all in one iteration
27
27
  */
28
28
  export declare function fieldsToProfileValues(fields: __esri.Field[], initialFeatureCompletionDescription: string, includeAliases?: boolean): [ApiValueVariable[], string];
29
+ export declare function membersToProfileValues(members: __esri.ProfileVariable[], initialCompletionDescription: string): [ApiValueVariable[], string];
29
30
  type ProfileItemType = ApiVariableType | "group";
30
- export type EditorVariable = ArrayVariable | DictionaryVariable | FeatureSetCollectionVariable | FeatureSetVariable | FeatureVariable | ValueVariable;
31
+ export type EditorVariable = ArrayVariable | DictionaryVariable | FeatureSetCollectionVariable | FeatureSetVariable | FeatureVariable | PixelVariable | ValueVariable | VoxelVariable;
31
32
  interface ConstructorProperties<T> {
32
33
  profile?: EditorProfile | null;
33
34
  declaration?: Partial<T>;
@@ -167,21 +168,22 @@ interface IRelationshipsProperties {
167
168
  exposeRelationships: boolean;
168
169
  sourceTableId?: number | null;
169
170
  }
170
- declare abstract class SourceBasedVariable extends CollectionBasedVariable {
171
+ declare abstract class SourceBasedVariable<SupportedSource = types.SupportedSource> extends CollectionBasedVariable {
171
172
  private relationshipsProperties?;
172
173
  protected _definition?: types.FeatureDefinition | types.FeatureSetDefinition;
173
- protected _source: types.SupportedSource | null;
174
- protected _loadPromise?: Promise<types.SupportedSource | null>;
175
- constructor(owner: CollectionBasedVariable | undefined, props: ConstructorProperties<types.IProfileFeature | types.IProfileFeatureSet>, relationshipsProperties?: IRelationshipsProperties | undefined);
174
+ protected _source: SupportedSource | null;
175
+ protected _loadPromise?: Promise<SupportedSource | null>;
176
+ constructor(owner: CollectionBasedVariable | undefined, props: ConstructorProperties<types.IProfileFeature | types.IProfileFeatureSet | types.IProfilePixel | types.IProfileVoxel>, relationshipsProperties?: IRelationshipsProperties | undefined);
176
177
  get title(): types.IIntlString | string;
177
178
  get url(): string;
178
179
  get informationUrl(): string | null;
179
180
  get informationType(): string;
180
- loadSource(): Promise<types.SupportedSource | null>;
181
- protected abstract _loadSource(): Promise<types.SupportedSource | null>;
181
+ loadSource(): Promise<SupportedSource | null>;
182
+ protected abstract _loadSource(): Promise<SupportedSource | null>;
182
183
  private _getValueSnippet;
183
184
  private _getSubtypeOrDomainNameSnippet;
184
- protected _getFieldProperty(field: __esri.Field): EditorVariable;
185
+ protected _getFieldProperty(field: __esri.Field, members?: __esri.ProfileVariable[]): EditorVariable;
186
+ protected _getMemberProperty(member: __esri.ProfileVariable): EditorVariable;
185
187
  private _getDomainDictionary;
186
188
  private _getSubtypeDomainDictionary;
187
189
  private _getFeatureTypeDomainDictionary;
@@ -192,13 +194,29 @@ declare abstract class SourceBasedVariable extends CollectionBasedVariable {
192
194
  protected _createDomainDictionary(field: __esri.Field): DictionaryVariable;
193
195
  protected _getRelationshipsProperty(): Promise<GroupOfVariables | null>;
194
196
  }
195
- export declare class FeatureVariable extends SourceBasedVariable {
196
- type: "feature";
197
- constructor(owner: CollectionBasedVariable | undefined, props: ConstructorProperties<types.IProfileFeature>);
197
+ declare abstract class FeatureLikeVariable<T = types.SupportedSource> extends SourceBasedVariable<T> {
198
+ type: types.IFeatureLikeProfile["type"];
199
+ constructor(owner: CollectionBasedVariable | undefined, props: ConstructorProperties<types.IFeatureLikeProfile>, type: types.IFeatureLikeProfile["type"], relationshipOptions?: IRelationshipsProperties);
198
200
  get title(): types.IIntlString | string;
199
- protected _loadSource(): Promise<types.SupportedSource | null>;
200
201
  toProfileVariableDefinition(): types.IProfileVariable;
201
202
  }
203
+ export declare class FeatureVariable extends FeatureLikeVariable {
204
+ type: "feature";
205
+ constructor(owner: CollectionBasedVariable | undefined, props: ConstructorProperties<types.IFeatureLikeProfile>);
206
+ protected _loadSource(): Promise<types.SupportedSource | null>;
207
+ }
208
+ export declare class VoxelVariable extends FeatureLikeVariable<types.SupportedVoxelSource> {
209
+ type: "voxel";
210
+ _source: types.SupportedVoxelSource | null;
211
+ constructor(owner: CollectionBasedVariable | undefined, props: ConstructorProperties<types.IProfileVoxel>);
212
+ protected _loadSource(): Promise<types.SupportedVoxelSource | null>;
213
+ }
214
+ export declare class PixelVariable extends FeatureLikeVariable<types.SupportedPixelSource> {
215
+ type: "pixel";
216
+ _source: types.SupportedPixelSource | null;
217
+ constructor(owner: CollectionBasedVariable | undefined, props: ConstructorProperties<types.IProfilePixel>);
218
+ protected _loadSource(): Promise<types.SupportedPixelSource | null>;
219
+ }
202
220
  export declare class FeatureSetVariable extends SourceBasedVariable {
203
221
  private featureSetSnippets;
204
222
  type: "featureSet";
@@ -1,5 +1,8 @@
1
1
  /// <reference types="@arcgis/core/interfaces.d.ts" />
2
2
  import { BundleType, ApiItem, ApiVariableType, ProfileId } from '@arcgis/languages-api-utils';
3
+ import { default as VoxelLayer } from '@arcgis/core/layers/VoxelLayer';
4
+ import { default as ImageryLayer } from '@arcgis/core/layers/ImageryLayer';
5
+ import { default as ImageryTileLayer } from '@arcgis/core/layers/ImageryTileLayer';
3
6
  declare const profileStrings: (value: {
4
7
  layer: string;
5
8
  featureservice: string;
@@ -118,7 +121,7 @@ export type ProfileVariableValueType = "boolean" | "date" | "dateOnly" | "geomet
118
121
  /**
119
122
  * The supported profile variable types.
120
123
  */
121
- export type IProfileVariable = IProfileArray | IProfileDictionary | IProfileFeature | IProfileFeatureSet | IProfileFeatureSetCollection | IProfileValue | IProfileVoxel;
124
+ export type IProfileVariable = IProfileArray | IProfileDictionary | IProfileFeature | IProfileFeatureSet | IProfileFeatureSetCollection | IProfilePixel | IProfileValue | IProfileVoxel;
122
125
  /**
123
126
  * Properties common to all profile variables.
124
127
  */
@@ -205,6 +208,18 @@ export interface IProfileVoxel extends IProfileVariableBase {
205
208
  */
206
209
  definition?: VoxelDefinition;
207
210
  }
211
+ /**
212
+ * Pixel profile variable declaration.
213
+ * Pixel contains values that can be accessed by a name (aka field name or attribute name).
214
+ */
215
+ export interface IProfilePixel extends IProfileVariableBase {
216
+ readonly type: "pixel";
217
+ /**
218
+ * Describes how the editor will find the definition for the feature.
219
+ */
220
+ definition?: PixelDefinition;
221
+ }
222
+ export type IFeatureLikeProfile = IProfileFeature | IProfilePixel | IProfileVoxel;
208
223
  /**
209
224
  * Describes a portal item.
210
225
  */
@@ -265,6 +280,10 @@ export type FeatureDefinition = IFeatureLayerItemDefinition | IFieldsDefinition
265
280
  * VoxelDefinition represents various ways a Voxel variable could be defined.
266
281
  */
267
282
  export type VoxelDefinition = __esri.VoxelLayer | IFeatureLayerItemDefinition | IUrlDefinition;
283
+ /**
284
+ * PixelDefinition represents various ways a Pixel variable could be defined.
285
+ */
286
+ export type PixelDefinition = __esri.ImageryLayer | __esri.ImageryTileLayer | IFeatureLayerItemDefinition | IUrlDefinition;
268
287
  /**
269
288
  * FeatureSetDefinition represents the various ways a FeatureSet variable could be defined.
270
289
  * See FeatureDefinition for more details.
@@ -299,6 +318,14 @@ export type IndexedProfileStrings = ProfileStrings & Record<string, string | und
299
318
  * Describe the support source for some of the editor variables.
300
319
  */
301
320
  export type SupportedSource = IFieldsDefinition;
321
+ /**
322
+ * Describe the supported source for pixel variables
323
+ */
324
+ export type SupportedPixelSource = ImageryLayer | ImageryTileLayer;
325
+ /**
326
+ * Describe the supported source for voxel variables
327
+ */
328
+ export type SupportedVoxelSource = VoxelLayer;
302
329
  /**
303
330
  * Layer that supports title.
304
331
  */
@@ -1,5 +1,5 @@
1
1
  /// <reference types="@arcgis/core/interfaces.d.ts" />
2
- import { FeatureDefinition, FeatureSetCollectionDefinition, FeatureSetDefinition } from './types';
2
+ import { FeatureDefinition, FeatureSetCollectionDefinition, FeatureSetDefinition, VoxelDefinition, PixelDefinition } from './types';
3
3
  import type * as types from "./types";
4
4
  export declare function isFeatureLayerLikeInstance(item: unknown): item is types.IFeatureLayerLikeInstance;
5
5
  export declare function isGroupLayerCapable(item: unknown): item is types.IGroupLayerCapable;
@@ -11,6 +11,8 @@ export declare function isFieldsDefinition(item: unknown): item is types.IFields
11
11
  export declare function isUrlDefinition(item: unknown): item is types.IUrlDefinition;
12
12
  export declare function isSupportedServiceUrlDefinition(item: unknown): item is types.IUrlDefinition;
13
13
  export declare function isFeatureDefinition(item: unknown): item is FeatureDefinition;
14
+ export declare function isVoxelDefinition(item: unknown): item is VoxelDefinition;
15
+ export declare function isPixelDefinition(item: unknown): item is PixelDefinition;
14
16
  export declare function isFeatureSetDefinition(item: unknown): item is FeatureSetDefinition;
15
17
  export declare function isFeatureSetCollectionDefinition(item: unknown): item is FeatureSetCollectionDefinition;
16
18
  export declare function isSubtypeInstance(item: unknown): item is __esri.Subtype;
@@ -32,6 +34,8 @@ export declare function isTableCapableLayer(item: unknown): item is types.ITable
32
34
  */
33
35
  export declare function isGeometryLikeLayer(item: unknown): item is types.IGeometryCapableSource;
34
36
  export declare function isLoadableSource(item: unknown): item is types.ILoadableSource;
37
+ export declare function isVoxelLayer(item: unknown): item is __esri.VoxelLayer;
38
+ export declare function isImageryLayer(item: unknown): item is __esri.ImageryLayer | __esri.ImageryTileLayer;
35
39
  export declare function supportedSourceFromDefinition(definition: types.FeatureDefinition | types.FeatureSetDefinition | null | undefined): Promise<types.SupportedSource | null>;
36
40
  export declare function serviceMetaData(url: string): Promise<{
37
41
  layers: types.LayerInfo[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/coding-components",
3
- "version": "4.34.0-next.128",
3
+ "version": "4.34.0-next.129",
4
4
  "description": "Contains components for editing code in different languages. The currently supported languages are html, css, json, TypeScript, JavaScript, and Arcade.",
5
5
  "keywords": [
6
6
  "ArcGIS",
@@ -42,10 +42,10 @@
42
42
  ],
43
43
  "license": "SEE LICENSE IN LICENSE.md",
44
44
  "dependencies": {
45
- "@arcgis/arcade-languageservice": "4.34.0-next.128",
46
- "@arcgis/languages-api-utils": "4.34.0-next.128",
47
- "@arcgis/lumina": "4.34.0-next.128",
48
- "@arcgis/toolkit": "4.34.0-next.128",
45
+ "@arcgis/arcade-languageservice": "4.34.0-next.129",
46
+ "@arcgis/languages-api-utils": "4.34.0-next.129",
47
+ "@arcgis/lumina": "4.34.0-next.129",
48
+ "@arcgis/toolkit": "4.34.0-next.129",
49
49
  "lit": "^3.3.0",
50
50
  "monaco-editor": "^0.52.0",
51
51
  "tslib": "^2.8.1",
@@ -1,10 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.34/esri/copyright.txt for details.
3
- v4.34.0-next.128 */
4
- import{a as B,b as z,c as g,d as h}from"./DCS4WKNJ.js";import{b as x,c as P,d as I,e as R,h as q,k as K}from"./ATINCT6D.js";import{h as O}from"./F7KZ4J3M.js";import{E as k}from"./DN4MQ6DT.js";import{f as U,h as M}from"./WA55I5X3.js";import{Gl as $,Pl as V}from"./FMXI4GWW.js";export default $arcgis.t(([C,ce,ue,he,de])=>{var A=t=>t!==void 0,w=t=>t!==null;function te(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&typeof t.declaredClass=="string"&&t.declaredClass.startsWith("esri.layers.")&&v(t)&&"queryFeatures"in t&&typeof t.queryFeatures=="function"}function ie(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&typeof t.declaredClass=="string"&&(t.declaredClass==="esri.Map"||t.declaredClass==="esri.WebMap"||t.declaredClass==="esri.WebScene")}function fe(t){return!!t&&typeof t=="object"&&"loadAll"in t&&typeof t.loadAll=="function"}function re(t){return!!t&&typeof t=="object"&&"portalItem"in t&&t.portalItem!=null}function se(t){return!!t&&typeof t=="object"&&"portalItem"in t&&t.portalItem!=null}function v(t){return!!t&&typeof t=="object"&&"fields"in t&&Array.isArray(t.fields)}function T(t){return!!t&&typeof t=="object"&&"url"in t&&typeof t.url=="string"}function ye(t){return T(t)&&/\/(?:featureserver|mapserver)(?:\/|$)/iu.test(t.url??"")}function qe(t){return T(t)||v(t)||se(t)}function Ke(t){return T(t)||v(t)||se(t)}function Be(t){return re(t)||ie(t)||ye(t)}function H(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.Subtype"}function L(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.CodedValueDomain"}function _e(t){return!!t&&typeof t=="object"&&"declaredClass"in t&&t.declaredClass==="esri.layers.support.InheritedDomain"}function ze(t){return!!t&&typeof t=="object"&&"id"in t&&typeof t.id=="string"&&"definitions"in t&&typeof t.definitions=="object"&&!Array.isArray(t.definitions)}function D(t){return!!t&&typeof t=="object"&&"title"in t&&typeof t.title=="string"}function me(t){return!!t&&typeof t=="object"&&"url"in t&&typeof t.url=="string"}function oe(t){return!!t&&typeof t=="object"&&"layerId"in t&&typeof t.layerId=="number"}function j(t){return!!t&&typeof t=="object"&&"typeIdField"in t&&"types"in t}function X(t){return!!t&&typeof t=="object"&&"getFieldDomain"in t&&typeof t.getFieldDomain=="function"}function d(t){return!!t&&typeof t=="object"&&"subtypeField"in t}function be(t){return d(t)&&"subtypes"in t}function ge(t){return!!t&&typeof t=="object"&&"portalItem"in t}function we(t){return oe(t)&&"relationships"in t&&"url"in t&&Array.isArray(t.relationships)&&typeof t.url=="string"}function Ce(t){return!!t&&typeof t=="object"&&"isTable"in t&&typeof t.isTable=="boolean"}function De(t){if(t&&typeof t=="object"){if(Ce(t))return t.isTable||"type"in t&&t.type==="table";if("geometryType"in t)return t.geometryType===""||t.geometryType==="esriGeometryNull"||t.geometryType===null}return!1}function Se(t){return!De(t)}function Fe(t){return!!t&&typeof t=="object"&&"load"in t&&typeof t.load=="function"}async function ne(t){if(!t)return null;let e;return v(t)?e=t:e=new C(t),Fe(e)&&await e.load(),e}async function ve(t){t+="/layers";let e=await ce(t,{responseType:"json",query:{f:"json"}}),i=t.endsWith("MapServer/layers")?"data":"query",r=Y(e.data?.layers,i),s=Y(e.data?.tables,i);return{layers:r,tables:s}}function Y(t,e){return t?t.filter(i=>{switch(i.type){case"Feature Layer":case"Oriented Imagery Layer":case"Catalog Layer":case"Table":return(i.capabilities?i.capabilities.toLowerCase().split(",").map(r=>r.trim()):[]).includes(e);default:return!1}}):[]}async function Te(t,e){let i=new C({url:`${t.url}/${e.relatedTableId}`});return await i.load(),i}function ae(t){return(e,i)=>{if(e.type==="oid")return-1;if(i.type==="oid")return 1;if(d(t)){if(e.name===t.subtypeField)return-1;if(i.name===t.subtypeField)return 1}if(j(t)){if(e.name===t.typeIdField)return-1;if(i.name===t.typeIdField)return 1}return e.name.localeCompare(i.name,"en",{sensitivity:"base"})}}function Z(t,e){return t?.every(i=>i.domains?.[e.name]?.type==="inherited")??!1}var Me=/^[a-z_$][a-z0-9_$]*$/giu;function le(t,e=!0){return t.match(Me)?`${e?".":""}${t}`:`["${t}"]`}function pe(t,e){return t?`${t}${le(e)}`:e}function J(t){return ge(t)?t.portalItem:null}function He(t,e,i=!1){let r=e,s=[],n=[];return g(t).forEach(o=>{r&&(r+=`
5
-
6
- `),r+=`**${o.name}** (${o.alias})
7
- ${o.type}`,o.description&&(r+=`
8
- '${o.description}`);let u=z(o),c=le(o.name,!1),p=h(o);if(s.push({name:o.name,description:p,type:u,completion:{label:o.name,detail:p,insertText:c,insertTextMode:I.asIs,insertTextFormat:P.PlainText,kind:x.Field}}),i){if(!o.alias||o.alias.toLowerCase()===o.name.toLowerCase())return;let b=`**${o.alias}**
9
- ${o.type}`;o.description&&(b+=`
10
- '${o.description}`),n.push({name:o.alias,description:o.name,type:u,completion:{label:o.alias,detail:o.name,insertText:c,insertTextMode:I.asIs,insertTextFormat:P.PlainText,kind:x.Field,documentation:{kind:"markdown",value:b}}})}}),[[...s,...n],r]}var S=class{constructor(e,i,r){this._profile=e,this._label=i,this.description=r,this.filterDescription=!1}getLabel(){return this._label==null?"":typeof this._label=="string"?U(this._label):M(this._profile?.intlStrings[this._label.code],this._label.formatValues)}getDescription(){return this.description==null?"":typeof this.description=="string"?this.description:M(this._profile?.intlStrings[this.description.code],this.description.formatValues)}passFilter(e){return!e||e.test(this.getLabel())?!0:this.filterDescription&&e.test(this.getDescription())}},f=class extends S{constructor(e){super(e.profile,e.label,e.description??e.declaration?.description),this.declaration=e.declaration??{},this.name=e.declaration?.name??"",this.snippet=e.snippet??"",this.nonInteractive=e.nonInteractive??!1,this.filterDescription=e.filterDescription??!1,this.icon=e.icon}},a=class extends f{constructor(e){super(e),this.type="text",this.isCollection=!1,this.type=e.declaration?.type??"text"}getDescription(){return this.description==null?this._profile?.intlStrings[this.type.toLowerCase()]??"":super.getDescription()}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration}}},N=class extends f{constructor(e){super(e),this.type="array",this.isCollection=!1,this.elementType=e.declaration?.elementType??{type:"number",name:"number"}}getDescription(){return this.description==null?this._profile?.intlStrings[this.type.toLowerCase()]??"":super.getDescription()}toProfileVariableDefinition(){return{type:this.type,elementType:this.elementType,name:"",...this.declaration}}},y=class extends f{constructor(e,i){super(i),this.owner=e,this.isCollection=!0,this._loaded=!0,this.variables=[]}get breadcrumb(){if(this.owner){let e=this.owner.breadcrumb;return e?`${e} / ${this.name}`:this.name}return this.name}get loaded(){return this._loaded}get informationUrl(){return null}get informationType(){return""}},l=class extends S{constructor(e,i,r=[],s=!1){super(e,i),this.variables=r,this.isHeader=s,this.type="group",this.isCollection=!0}passFilter(){return!0}},_=class t extends y{constructor(e,i){super(e,i),this.type="dictionary",this.dictionaryVariables=[],this.loadPropertyDeclarations(i.declaration?.properties),this.snippet&&this.dictionaryVariables.length&&(this.variables=[new l(this._profile,this.snippet,this.dictionaryVariables)])}async loadSource(){}loadPropertyDeclarations(e){this.dictionaryVariables=this.createVariableInstances(e),this.variables=this.dictionaryVariables}createVariableInstances(e){if(!Array.isArray(e))return[];let i=[];return e.forEach(r=>{let s=this.createVariableInstance(r);s&&i.push(s)}),i}createVariableInstance(e){let i=pe(this.snippet,e.name);switch(e.type){case"number":case"text":case"boolean":case"date":case"dateOnly":case"time":case"geometry":case"knowledgeGraph":return new a({profile:this._profile,declaration:e,label:i,snippet:i});case"feature":return new E(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"featureSet":return new m(this,{profile:this._profile,declaration:e,label:i,snippet:i},[new a({profile:this._profile,label:i,description:"",snippet:i})]);case"featureSetCollection":return new G(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"dictionary":return new t(this,{profile:this._profile,declaration:e,label:i,snippet:i});case"array":return new N({profile:this._profile,declaration:e,label:i,snippet:i});default:return console.error("Editor profile: Invalid profile variable",e),null}}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration,properties:this.dictionaryVariables.map(e=>e.toProfileVariableDefinition())}}},F=class extends y{constructor(e,i,r){super(e,i),this.relationshipsProperties=r,this._source=null,this._loaded=!1,this._definition=i.declaration?.definition}get title(){return D(this._source)?this._source.title??"":""}get url(){return me(this._source)?this._source.url??"":""}get informationUrl(){return!this.loaded||!this.url?null:oe(this._source)?`${this.url}/${this._source.layerId}`:this.url}get informationType(){return this._profile?.intlStrings.layer??"layer"}async loadSource(){return w(this._loadPromise)&&A(this._loadPromise)?await this._loadPromise:(this._loadPromise=this._loadSource(),await this._loadPromise)}_getValueSnippet(e){return this.type==="feature"?pe(this.snippet,e.name):e.name}_getSubtypeOrDomainNameSnippet(e){return this.type!=="feature"?null:d(this._source)&&e.name===this._source.subtypeField?`SubtypeName(${this.snippet})`:`DomainName(${this.snippet}, "${e.name}")`}_getFieldProperty(e){let i=this._getDomainDictionary(e);if(i)return i;let r=this._getValueSnippet(e);return new a({profile:this._profile,label:r,description:h(e),snippet:r,icon:B(e),filterDescription:!0})}_getDomainDictionary(e){return X(this._source)?d(this._source)&&this._source.subtypeField?this._getSubtypeDomainDictionary(e):j(this._source)&&this._source.typeIdField?this._getFeatureTypeDomainDictionary(e):this._getFieldDomainDictionary(e):null}_getSubtypeDomainDictionary(e){if(!d(this._source))return null;if(!be(this._source))return e.name===this._source.subtypeField?null:this._getFieldDomainDictionary(e);if(e.name===this._source.subtypeField){let s=this._createDomainDictionary(e);return s.icon="subtype",s.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.subtypes,e)),s}if(Z(this._source.subtypes,e))return this._getFieldDomainDictionary(e);let i=this._getDomainValuesGroup(this._source.subtypes,e);if(!i)return null;let r=this._createDomainDictionary(e);return r.variables.push(i),r}_getFeatureTypeDomainDictionary(e){if(!j(this._source))return null;if(e.name===this._source.typeIdField){let s=this._createDomainDictionary(e);return s.variables.push(this._getTypeOrSubtypeDomainGroup(this._source.types,e)),s}if(Z(this._source.types,e))return this._getFieldDomainDictionary(e);let i=this._getDomainValuesGroup(this._source.types,e);if(!i)return null;let r=this._createDomainDictionary(e);return r.variables.push(i),r}_getFieldDomainDictionary(e){if(!X(this._source))return null;let i=this._source.getFieldDomain(e.name);if(!L(i))return null;let r=this._getCodedValueDomainGroup(i,{code:"domainvalues"}),s=this._createDomainDictionary(e);return s.variables.push(r),s}_getTypeOrSubtypeDomainGroup(e,i){if(L(i.domain))return this._getCodedValueDomainGroup(i.domain,{code:"subtypes"});let r=e?.map(s=>{let n=H(s)?s.code:s.id;return new a({profile:this._profile,label:`${n}`,description:s.name,snippet:`"${n}"`})})??[];return new l(this._profile,{code:"subtypes"},r)}_getCodedValueDomainGroup(e,i){let r=e.codedValues.map(s=>new a({profile:this._profile,label:`${s.code}`,description:s.name,snippet:`"${s.code}"`,filterDescription:!0}));return new l(this._profile,i,r)}_getDomainValuesGroup(e,i){let r=[];return!e||e.length===0||(e.forEach(s=>{let n=s.domains?.[i.name];if(!n||_e(n)||!L(n))return;let o=h(i),u=this._getCodedValueDomainGroup(n,{code:"domainvaluesfortypeformat",formatValues:{fieldName:o,typeName:s.name}}),c=H(s)?s.code:s.id,p=`${c}`,b=`"${c}""`,W=new _(this,{profile:this._profile,label:p,snippet:b,description:s.name,declaration:{name:o}});W.variables=[u],r.push(W)}),!r.length)?null:new l(this._profile,{code:"domainvaluesbysubtypes"},r)}_createDomainDictionary(e){let i=this._getValueSnippet(e),r=h(e),s=new _(this,{profile:this._profile,label:i,description:r,snippet:i,icon:"form-dropdown",declaration:{name:e.name}}),n=new l(this._profile,r,[new a({profile:this._profile,label:i,description:"",snippet:i})]);s.variables=[n];let o=this._getSubtypeOrDomainNameSnippet(e);return o&&n.variables.push(new a({profile:this._profile,label:o,description:"",snippet:o})),s}async _getRelationshipsProperty(){if(!this.relationshipsProperties?.exposeRelationships||!this._profile?.supportFeatureSetFunctions)return null;let e=this._source;if(!we(e))return null;let i=new l(this._profile,{code:"relationships"}),r=await Promise.all(e.relationships?.map(async s=>{let n=await Te(e,s);if(!te(n)||s.relatedTableId===this.relationshipsProperties?.sourceTableId)return null;let o=`FeatureSetByRelationshipName(${this.snippet}, "${s.name}")`;return new m(this,{profile:this._profile,declaration:{definition:n},label:n.title,description:"",nonInteractive:!0},[new a({profile:this._profile,label:o,description:"",snippet:o})],{exposeRelationships:!0,sourceTableId:e.layerId})})??[]);return i.variables=r.filter(w),i.variables.length?i:null}},E=class extends F{constructor(e,i){super(e,i,{exposeRelationships:!0}),this.type="feature"}get title(){return D(this._source)?this._source.title??"":{code:"feature"}}async _loadSource(){if(this.loaded)return this._source;try{if(this._source=await ne(this._definition),!this._source)throw new Error("Invalid definition");let e=D(this._source)?this._source.title??"":"";this.variables.push(new l(this._profile,e,[new a({profile:this._profile,label:this.snippet,description:"",snippet:this.snippet})]));let i=new l(this._profile,{code:"values"});if(this.variables.push(i),Se(this._source)){let s=`Geometry(${this.snippet})`,n=new a({profile:this._profile,declaration:{name:s},label:s,description:"Geometry",snippet:s,icon:"shapes",filterDescription:!0});i.variables.push(n)}g(this._source.fields).sort(ae(this._source)).forEach(s=>{i.variables.push(this._getFieldProperty(s))});let r=await this._getRelationshipsProperty();r&&this.variables.push(r)}catch(e){console.error("Error with definition",e,this._definition),this._source=null}finally{this._loaded=!0}return this._source}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration,definition:this._definition}}},m=class extends F{constructor(e,i,r=[],s){super(e,i,s),this.featureSetSnippets=r,this.type="featureSet"}get title(){return D(this._source)?this._source.title??"":{code:"featureset"}}async _loadSource(){if(this.loaded)return this._source;try{if(this._source=await ne(this._definition),!this._source)throw new Error("Invalid definition");this.variables.push(new l(this._profile,this.title,this.featureSetSnippets,!0));let e=new l(this._profile,{code:"fields"});this.variables.push(e),e.variables=g(this._source.fields).sort(ae(this._source)).map(r=>this._getFieldProperty(r));let i=await this._getRelationshipsProperty();i&&this.variables.push(i)}catch(e){console.error("Error with definition",e,this._definition),this._source=null}finally{this._loaded=!0}return this._source}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration,definition:this._definition}}},G=class extends y{constructor(e,i){super(e,i),this.type="featureSetCollection",this._featureSetCollections=null,this._loaded=!1,this._definition=i.declaration?.definition}get informationUrl(){return!this.loaded||!this._featureSetCollections?null:typeof this._featureSetCollections.source!="string"?q(J(this._featureSetCollections.source)):null}get informationType(){if(!this.loaded||!this._featureSetCollections)return"";if(typeof this._featureSetCollections.source=="string")return this._profile?.intlStrings.featureservice??"featureservice";switch(this._featureSetCollections.source.declaredClass){case"esri.WebMap":return this._profile?.intlStrings.webmap??"webmap";case"esri.WebScene":return this._profile?.intlStrings.webscene??"webscene";default:return this._profile?.intlStrings.map??"map"}}async loadSource(){return w(this._loadPromise)&&A(this._loadPromise)?await this._loadPromise:(this._loadPromise=this._loadSource(),await this._loadPromise)}async _loadSource(){if(this.loaded)return this._featureSetCollections;try{if(this._featureSetCollections=await this._featureSetCollectionsFromDefinition(),!this._featureSetCollections)throw new Error("Invalid definition");let e=typeof this._featureSetCollections.source=="string"?{code:this._featureSetCollections.source.endsWith("FeatureServer")?"featureservice":"mapservice"}:{code:"webmapformat",formatValues:{webMapTitle:J(this._featureSetCollections.source)?.title||"Untitled map"}},i=new l(this._profile,e,[new a({profile:this._profile,label:this.snippet,description:"",snippet:this.snippet})]),r=new l(this._profile,{code:"layers"},this._featureSetCollections.layers),s=new l(this._profile,{code:"tables"},this._featureSetCollections.tables);this.variables.push(i,r,s)}catch(e){console.error("Error with definition",e,this._definition),this._featureSetCollections=null}finally{this._loaded=!0}return this._featureSetCollections}async _featureSetCollectionsFromDefinition(){return this._definition?ie(this._definition)?await this._featureSetCollectionFromMap(this._definition):T(this._definition)?await this._featureSetCollectionFromUrl(this._definition.url):re(this._definition)?await this._featureSetCollectionFromPortalItem(this._definition.portalItem):null:null}async _featureSetCollectionFromMap(e){return fe(e)&&await e.loadAll(),await Promise.all(e.allTables.map(async i=>await i.load())),{layers:this._convertWebMapLayersToVariables(e.allLayers),tables:this._convertWebMapLayersToVariables(e.allTables),source:e}}async _featureSetCollectionFromPortalItem(e){let i=new ue(e);switch(await i.load(),i.type){case"Web Map":{let r=new he({portalItem:i});return await this._featureSetCollectionFromMap(r)}case"Web Scene":{let r=new de({portalItem:i});return await this._featureSetCollectionFromMap(r)}case"Feature Service":return await this._featureSetCollectionFromUrl(i.url);default:return console.error("Unsupported portal item",e),null}}async _featureSetCollectionFromUrl(e){let i=e?.replace(/\/featureserver\/[0-9]*/iu,"/FeatureServer");if(i=i?.replace(/\/mapserver\/[0-9]*/iu,"/MapServer"),i=i?.split("?")[0],!i)return null;let r=await ve(i),s=Promise.all(r.layers.map(async c=>{let p=new C({url:`${i}/${c.id}`});return await p.load(),this._createFeatureSetVariable(p)})),n=Promise.all(r.tables.map(async c=>{let p=new C({url:`${i}/${c.id}`});return await p.load(),this._createFeatureSetVariable(p)})),[o,u]=await Promise.all([s,n]);return{layers:o,tables:u,source:i}}_convertWebMapLayersToVariables(e){let i=[];return e.toArray().reverse().forEach(r=>{if(te(r)){i.push(this._createFeatureSetVariable(r,!0));return}}),i}_createFeatureSetVariable(e,i=!1){return new m(this,{profile:this._profile,declaration:{name:e.title??"",definition:e},label:i?e.title:e.sourceJSON.name??e.title,description:"",nonInteractive:!0},this._makeFeatureSetSnippets(e,i))}_makeFeatureSetSnippets(e,i=!1){if(!this._profile?.supportFeatureSetFunctions)return[];if(i){let r=`FeatureSetById(${this.snippet}, "${e.id}")`,s=`FeatureSetByName(${this.snippet}, "${e.title}")`;return[new a({profile:this._profile,label:r,description:"",snippet:r}),new a({profile:this._profile,label:s,description:"",snippet:s})]}else{let r=`FeatureSetById(${this.snippet}, "${e.layerId}")`;return[new a({profile:this._profile,label:r,description:"",snippet:r})]}}toProfileVariableDefinition(){return{type:this.type,name:"",...this.declaration,definition:this._definition}}},Q=class extends _{constructor(e,i,r="en"){super(void 0,{profile:null,declaration:{properties:[]}}),this.definition=e,this.intlStrings=i,this.locale=r,this.variables=[],this._profile=this,this.loadPropertyDeclarations(e?.variables)}get supportFeatureSetFunctions(){return this.definition?.bundles?.includes("data-access")??!1}toEditorProfileDefinition(){return{...this.definition,variables:this.dictionaryVariables.map(e=>e.toProfileVariableDefinition())}}},xe={locale:"en"},ee=class{constructor(e,i){this.languageId=e,this._apiConfig=i,this._onDidChange=new $,this._modelToProfileMap=new Map,this._modelToApiContextMap=new Map,this._localeToApiLibraryPromiseMap=new Map,this._onModelContextDidChange=new $,this._onDidModelContextChangeTimeout=-1,this.workerHost={getApiLibrary:async r=>await this.getApiLibrary(r)},K().then(r=>{r.onWillDisposeModel(s=>{this.disposeForModel(s.uri)})})}_fireModelContextDidChange(e){this._onDidModelContextChangeTimeout===-1&&(this._onDidModelContextChangeTimeout=window.setTimeout(()=>{this._onDidModelContextChangeTimeout=-1,this._onModelContextDidChange.fire(e)},0))}_getApiKey(e){return V.isUri(e)||(e=V.parse(e)),e.toString()}get onDidChange(){return this._onDidChange.event}disposeForModel(e){let i=this._getApiKey(e);this._modelToProfileMap.delete(i),this._modelToApiContextMap.delete(i)&&this._fireModelContextDidChange(i)}getEditorProfileForModel(e){return this._modelToProfileMap.get(this._getApiKey(e))}getApiContextForModel(e){return this._modelToApiContextMap.get(this._getApiKey(e))??xe}updateApiContextForModel(e,i){let r=this._getApiKey(e),s=this._modelToApiContextMap.get(r)??{};this._modelToApiContextMap.set(r,{...s,...i}),this._fireModelContextDidChange(r)}get onModelContextDidChange(){return this._onModelContextDidChange.event}async getApiLibraryForModel(e){let i=this.getApiContextForModel(e),r=this.getApiLibrary(i.locale??"en");return(await R(r,i)).categories}async fetchApiLibrary(e){try{let{apiPath:i,apiPrefix:r}=this._apiConfig,s=k(`${i}/${r}${e}.json`),n=await fetch(s);return n.ok?await n.json():[]}catch{return[]}}async getApiLibrary(e){let i=O(e);return this._localeToApiLibraryPromiseMap.has(i)||this._localeToApiLibraryPromiseMap.set(i,this.fetchApiLibrary(i)),await this._localeToApiLibraryPromiseMap.get(i)??[]}};return{a:te,b:qe,c:Ke,d:Be,e:ze,f:He,g:Q,h:ee}},"layers/FeatureLayer","request","portal/PortalItem","WebMap","WebScene")
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.34/esri/copyright.txt for details.
3
- v4.34.0-next.128 */
4
- function a(e){switch(e.type){case"oid":return"key";case"small-integer":case"big-integer":case"integer":case"single":case"double":case"long":return"number";case"global-id":case"guid":return"key";case"string":return"string";case"date":return"date-time";case"date-only":return"calendar";case"time-only":return"clock";case"timestamp-offset":return"time-zone";default:return"cube"}}function s(e){switch(e.type){case"small-integer":case"integer":case"big-integer":case"single":case"double":case"long":case"oid":return"number";case"global-id":case"guid":case"string":return"text";case"date":return"date";case"date-only":return"dateOnly";case"time-only":return"time";default:return"text"}}function n(e){return(e??[]).filter(t=>{switch(t.type){case"string":case"small-integer":case"integer":case"big-integer":case"single":case"double":case"long":case"date":case"date-only":case"time-only":case"timestamp-offset":case"oid":case"guid":case"global-id":return!0;default:return!1}})}function r(e){return e.alias||e.name}export{a,s as b,n as c,r as d};
@@ -1,8 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.34/esri/copyright.txt for details.
3
- v4.34.0-next.128 */
4
- import a from"./A2QCR3TF.js";import{b as f,c,d as p}from"./ATINCT6D.js";import{e as h,f as x}from"./F7KZ4J3M.js";import{E as u}from"./DN4MQ6DT.js";export default $arcgis.t(([{b:g,c:T,d:v,e:y,f:M,g:F,h:A}])=>{async function I(e){let{apiVersion:i,bundles:t,hiddenApiItems:a}=e.toEditorProfileDefinition(),n=await P(e.dictionaryVariables);return{apiVersion:i,bundles:t,variables:n,hiddenApiItems:a?.map(r=>r.toLowerCase())}}async function P(e,i=f.Variable){return await Promise.all(e.map(async t=>{switch(t.type){case"dictionary":return await C(t,i);case"feature":return await L(t,i);default:return V(t,i)}}))}function V(e,i){let{name:t,type:a}=e,n=e.getDescription();return{name:t,description:n,type:a,completion:{label:t,detail:t,insertText:t,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:i,documentation:{kind:"markdown",value:n}}}}async function L(e,i){let t=await e.loadSource(),{name:a}=e,n=e.getDescription(),r={label:a,detail:a,insertText:a,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:i},s={name:a,description:n,type:"dictionary",properties:[],completion:r};if(!t)return s;let[o,l]=M(t.fields,n,!0);return s.properties=o,r.documentation={kind:"markdown",value:l},s}async function C(e,i){let{name:t,dictionaryVariables:a}=e,n=e.getDescription(),r=a.reduce((s,o)=>{s!==""&&(s+=`
5
-
6
- `),s+=`**${o.name}**
7
- ${o.type}`;let l=o.getDescription();return l&&(s+=`
8
- ${l}`),s},n);return{name:t,description:n,type:"dictionary",properties:await P(a,f.Field),completion:{label:t,detail:t,insertText:t,insertTextMode:p.asIs,insertTextFormat:c.PlainText,kind:i,documentation:{kind:"markdown",value:r}}}}async function m(e="en"){let i=k.get(e);if(i)return i;if(!h.has(e))return await m("en");try{let t=await fetch(u(`./assets/arcade-language/profiles/arcade-profiles.t9n.${e}.json`));return t.ok?D(e,await t.json()):e==="en"?null:await m("en")}catch{return null}}var k=new Map;function D(e,i){let t=new Map;return i.forEach(a=>{t.set(a.id,a)}),k.set(e,t),t}async function E(e,i="en"){return(await m(i))?.get(e)??null}function $(e){return!!e&&typeof e=="object"&&"additionalVariables"in e&&Array.isArray(e.additionalVariables)}function S(e){return e?.map(b)}function b(e){switch(e.type){case"dictionary":return{...e,type:e.type,properties:S(e.properties)};case"array":return{...e,type:e.type,elementType:{type:"number",name:"number"}};default:return{...e,type:e.type}}}async function j(e,i="en"){if(!y(e))return;let t=await E(e.id,i);if(!t)return;let a={bundles:[...t.bundles],variables:[],hiddenApiItems:e.hiddenApiItems?.map(n=>n.toLowerCase())};return t.variables.forEach(n=>{if(e.disabledVariables?.includes(n.name))return;let r=e.definitions[n.name];switch(n.type){case"dictionary":return a.variables.push(b({...n,type:n.type,properties:Array.isArray(r)?[...r]:n.properties}));case"feature":case"voxel":return g(r)?a.variables.push({...n,type:"feature",definition:r}):void 0;case"featureSet":return T(r)?a.variables.push({...n,type:n.type,definition:r}):void 0;case"featureSetCollection":return v(r)?a.variables.push({...n,type:n.type,definition:r}):void 0;default:return a.variables.push(b(n))}}),$(e)&&a.variables.push(...e.additionalVariables??[]),a}var w=class extends A{constructor(){super("arcade",{apiPath:"./assets/arcade-language/api",apiPrefix:"arcade-api.t9n."})}async setProfileForModel(i,t,a={locale:"en"}){y(t)&&(t=await j(t,a.locale));let n=await x(a.locale,u("./assets/editor-profile/t9n"),"messages.");if(!n)throw new Error(`Failed to load the language bundle for ${a.locale}`);this.disposeForModel(i);let r=this._getApiKey(i),s=new F(t,n);this._modelToProfileMap.set(r,s);let o=await I(s);this.updateApiContextForModel(i,{locale:a.locale,profile:o,snippets:a.snippets})}},d=new w,z={setProfileForModel:d.setProfileForModel.bind(d),getApiLibraryForModel:d.getApiLibraryForModel.bind(d)};return d},a)
@@ -1,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/4.34/esri/copyright.txt for details.
3
- v4.34.0-next.128 */
4
- import c from"./OGCX5NIT.js";import"./NFQLRYAL.js";import b from"./M6VF2DXU.js";import a from"./A2QCR3TF.js";import"./EITZEBGN.js";import"./DCS4WKNJ.js";import"./ATINCT6D.js";import"./2D4XLNSC.js";import"./F7KZ4J3M.js";import"./DN4MQ6DT.js";import"./WA55I5X3.js";import"./FMXI4GWW.js";import"./Z3XY2NFB.js";export default $arcgis.t(([,,{a:a,b:b,c:c}])=>{return{getSqlExprDiagnosticService:b,getSqlExprWorker:a,setupMode:c}},a,b,c)