@arcgis/core 5.1.0-next.72 → 5.1.0-next.73

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 (104) hide show
  1. package/assets/esri/core/workers/RemoteClient.js +1 -1
  2. package/assets/esri/core/workers/chunks/{b801631b58e6fc6cec8a.js → 0ae360bf253adee46737.js} +1 -1
  3. package/assets/esri/core/workers/chunks/{b495f14d90abe8d1a558.js → 12e575a6d2b008b8fc2b.js} +1 -1
  4. package/assets/esri/core/workers/chunks/{61ef14e42bc09b787d89.js → 13e60f19f436b8d683ae.js} +1 -1
  5. package/assets/esri/core/workers/chunks/{7e6ccf9f3e756186e93e.js → 29e76256e3e867e80520.js} +1 -1
  6. package/assets/esri/core/workers/chunks/{bea70be8e38b8c83ccd2.js → 30f04dc001eaf838d64c.js} +1 -1
  7. package/assets/esri/core/workers/chunks/{628f56c09838eb9c573b.js → 422824e407b550170c8c.js} +1 -1
  8. package/assets/esri/core/workers/chunks/{68b47a5a50e0b5fffca2.js → 5c663d5f98bdfa29151b.js} +1 -1
  9. package/assets/esri/core/workers/chunks/{ae0a572cbbdd9815ee2e.js → 62b3e933f548ce354b99.js} +1 -1
  10. package/assets/esri/core/workers/chunks/{6f9ea461c268c421f9c9.js → 7951d93f5f15aa76f49c.js} +1 -1
  11. package/assets/esri/core/workers/chunks/{b79058f5bda6fcac22f8.js → 80ace1c7203c5059525d.js} +1 -1
  12. package/assets/esri/core/workers/chunks/{b92794def31592a6a25f.js → 8d75f6f27c1c17c33992.js} +1 -1
  13. package/assets/esri/core/workers/chunks/95d82c619dcbec2e1050.js +1 -0
  14. package/assets/esri/core/workers/chunks/9eb4ae556950e1d0124d.js +2 -0
  15. package/assets/esri/core/workers/chunks/{02876e434dc91c42b2f4.js → a78bc340a794fd332667.js} +1 -1
  16. package/assets/esri/core/workers/chunks/{1edd39c7c4acdc591d10.js → a809b811121099a87a98.js} +1 -1
  17. package/assets/esri/core/workers/chunks/abdf146b35e179b5b245.js +1 -0
  18. package/assets/esri/core/workers/chunks/{d2aa75816e84b1e7fd25.js → afc0baf86ece710ef867.js} +1 -1
  19. package/assets/esri/core/workers/chunks/b6cadb8a579241adcb86.js +1 -0
  20. package/assets/esri/core/workers/chunks/{3cd9bd20e75ba4d5b294.js → b9848bdbaf3d9ac93d54.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{b475f5492c6e3fd4cca8.js → bef27a25fbc4a6e19ec0.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{a65d576e90179a2b5400.js → c5507480344176fad241.js} +1 -1
  23. package/assets/esri/core/workers/chunks/c70df6ed190f9ebcf6aa.js +1 -0
  24. package/assets/esri/core/workers/chunks/cd7159600ce132e32d04.js +1 -0
  25. package/assets/esri/core/workers/chunks/{dec6d41d614105e6fd93.js → cfe246adb5e6cb6f0cfc.js} +1 -1
  26. package/assets/esri/core/workers/chunks/{91a0227a64a944af3286.js → d17fcfc502f0e0fa6523.js} +2 -2
  27. package/assets/esri/core/workers/chunks/d65b1234867f7d773d50.js +2 -0
  28. package/assets/esri/core/workers/chunks/{aa1a3a849aba84cf585b.js → e1bc9ad767e08dc18bbc.js} +1 -1
  29. package/assets/esri/core/workers/chunks/e25a684eb9f025bdcc01.js +1 -0
  30. package/assets/esri/core/workers/chunks/e272411e2c9378aa8496.js +1312 -0
  31. package/assets/esri/core/workers/chunks/{0d96e39380fd84cea9ba.js → f207b3be0714cc50030a.js} +1 -1
  32. package/assets/esri/core/workers/chunks/f53805c7a84203305b2c.js +1 -0
  33. package/assets/esri/core/workers/chunks/{c1838822b096d5f36a8b.js → f5c57ff48ca505ed701d.js} +1 -1
  34. package/chunks/GlobalIllumination.glsl.js +186 -116
  35. package/chunks/GlobalIlluminationBlur.glsl.js +81 -61
  36. package/chunks/GlobalIlluminationUpscale.glsl.js +66 -0
  37. package/config.js +1 -1
  38. package/form/elements/FieldElement.d.ts +3 -2
  39. package/form/elements/inputs/Input.d.ts +1 -1
  40. package/form/elements/inputs/MultipleChoiceInput.d.ts +65 -0
  41. package/form/elements/inputs/MultipleChoiceInput.js +2 -0
  42. package/form/elements/inputs/inputUtils.js +1 -1
  43. package/form/elements/inputs/multipleChoice/Choice.d.ts +30 -0
  44. package/form/elements/inputs/multipleChoice/Choice.js +2 -0
  45. package/form/elements/inputs/multipleChoice/OtherChoice.d.ts +28 -0
  46. package/form/elements/inputs/multipleChoice/OtherChoice.js +2 -0
  47. package/form/elements/inputs.d.ts +11 -2
  48. package/form/elements/inputs.js +1 -1
  49. package/form/support/formUtils.js +1 -1
  50. package/interfaces.d.ts +28 -0
  51. package/kernel.js +1 -1
  52. package/layers/Lyr3DWasmPerSceneView.js +1 -1
  53. package/package.json +2 -2
  54. package/support/revision.js +1 -1
  55. package/third-party-notices.txt +7 -29
  56. package/views/2d/engine/webgl/shaders/sources/shaderRepository.js +1 -1
  57. package/views/3d/environment/EnvironmentManager.js +1 -1
  58. package/views/3d/layers/I3SMeshView3D.js +1 -1
  59. package/views/3d/layers/IntegratedMesh3DTilesLayerView3D.js +1 -1
  60. package/views/3d/support/orientedBoundingBox.js +1 -1
  61. package/views/3d/terrain/TerrainRenderer.js +1 -1
  62. package/views/3d/webgl-engine/collections/Component/Material/ComponentMaterial.js +1 -1
  63. package/views/3d/webgl-engine/core/shaderLibrary/shading/GlobalIlluminationWeights.glsl.js +21 -0
  64. package/views/3d/webgl-engine/core/shaderLibrary/shading/ReadGlobalIllumination.glsl.js +11 -7
  65. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.glsl.js +2 -0
  66. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIllumination.js +1 -1
  67. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlur.glsl.js +2 -0
  68. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationBlurTechnique.js +1 -1
  69. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationTechnique.js +1 -1
  70. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscale.glsl.js +2 -0
  71. package/views/3d/webgl-engine/effects/globalIllumination/GlobalIlluminationUpscaleTechnique.js +2 -0
  72. package/views/3d/webgl-engine/effects/glow/GlowRenderNode.js +1 -1
  73. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  74. package/views/3d/webgl-engine/lib/RenderFeature.js +1 -1
  75. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  76. package/views/3d/webgl-engine/materials/DefaultMaterial.js +1 -1
  77. package/views/interactive/sketch/SketchOptions.d.ts +3 -1
  78. package/views/interactive/sketch/SketchTooltipOptions.d.ts +6 -0
  79. package/views/support/Scheduler.js +1 -1
  80. package/widgets/BatchAttributeForm/BatchAttributeFormViewModel.js +1 -1
  81. package/widgets/BatchAttributeForm/batchAttributeFormUtils.js +1 -1
  82. package/widgets/BatchAttributeForm/inputs/SingleFeatureInputAdapter.js +2 -0
  83. package/widgets/BatchAttributeForm/inputs/TextElementInput.d.ts +28 -4
  84. package/widgets/BatchAttributeForm/inputs/TextElementInput.js +1 -1
  85. package/widgets/BatchAttributeForm/templates/AttachmentElementTemplate.js +2 -0
  86. package/widgets/BatchAttributeForm/templates/support/createBatchFormTemplate.js +1 -1
  87. package/widgets/BatchAttributeForm/templates/support/hashElementTemplate.js +1 -1
  88. package/widgets/BatchAttributeForm/templates/support/templateUtils.js +1 -1
  89. package/widgets/Search/support/layerSearchUtils.js +1 -1
  90. package/widgets/support/widgetUtils.js +1 -1
  91. package/assets/esri/core/workers/chunks/85edbb072a2ce6c1bb30.js +0 -2
  92. package/assets/esri/core/workers/chunks/943cf0653a2b7de16a4f.js +0 -1
  93. package/assets/esri/core/workers/chunks/a37fc886227365f7ecd5.js +0 -1
  94. package/assets/esri/core/workers/chunks/d0c3ab70f390cd579fed.js +0 -1
  95. package/assets/esri/core/workers/chunks/d4a9eb4470cc6a1f67fc.js +0 -2
  96. package/assets/esri/core/workers/chunks/dca595fdd5e1a571e441.js +0 -1
  97. package/assets/esri/core/workers/chunks/de583214195eff13cb00.js +0 -1140
  98. package/assets/esri/core/workers/chunks/df8143b72ef94806c992.js +0 -1
  99. package/assets/esri/core/workers/chunks/ef013a77950c1902de11.js +0 -1
  100. package/views/3d/webgl-engine/core/shaderLibrary/shading/EncodingColor.glsl.js +0 -7
  101. package/views/3d/webgl-engine/shaders/GlobalIllumination.glsl.js +0 -2
  102. package/views/3d/webgl-engine/shaders/GlobalIlluminationBlur.glsl.js +0 -2
  103. /package/assets/esri/core/workers/chunks/{85edbb072a2ce6c1bb30.js.LICENSE.txt → 9eb4ae556950e1d0124d.js.LICENSE.txt} +0 -0
  104. /package/assets/esri/core/workers/chunks/{d4a9eb4470cc6a1f67fc.js.LICENSE.txt → d65b1234867f7d773d50.js.LICENSE.txt} +0 -0
@@ -0,0 +1,65 @@
1
+ import type Input from "./Input.js";
2
+ import type Choice from "./multipleChoice/Choice.js";
3
+ import type OtherChoice from "./multipleChoice/OtherChoice.js";
4
+ import type { ChoiceProperties } from "./multipleChoice/Choice.js";
5
+ import type { OtherChoiceProperties } from "./multipleChoice/OtherChoice.js";
6
+
7
+ export interface MultipleChoiceInputProperties extends Partial<Pick<MultipleChoiceInput, "choiceDelimeter" | "includeOtherChoice" | "maxSelectedChoices" | "minSelectedChoices">> {
8
+ /** An array of available choices. */
9
+ choices?: ChoiceProperties[] | null;
10
+ /** The configuration for the `other` choice when [includeOtherChoice](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/MultipleChoiceInput/#includeOtherChoice) is `true`. */
11
+ otherChoice?: OtherChoiceProperties | null;
12
+ }
13
+
14
+ /**
15
+ * The `MultipleChoiceInput` class defines the desired user interface for a multiple choice group input. This [FieldElement.input](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/#input) is used in [field elements](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/) that are set within a [feature layer's](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/#formTemplate) or [FeatureForm's](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/#formTemplate) `formTemplate`. This is displayed within the [Editor](https://developers.arcgis.com/javascript/latest/references/core/widgets/Editor/) widget.
16
+ *
17
+ * @since 5.1
18
+ * @see [FieldElement](https://developers.arcgis.com/javascript/latest/references/core/form/elements/FieldElement/)
19
+ * @example
20
+ * // Creates a new multiple choice input for a field element within a form
21
+ * const multipleChoiceInput = new MultipleChoiceInput({
22
+ * includeOtherChoice: true,
23
+ * otherChoice: {
24
+ * fieldName: "other",
25
+ * label: "Other",
26
+ * hint: "Provide additional details"
27
+ * },
28
+ * minSelectedChoices: 1,
29
+ * maxSelectedChoices: 3,
30
+ * choices: [
31
+ * { label: "Option 1", value: "option1" },
32
+ * { label: "Option 2", value: "option2" },
33
+ * { label: "Option 3", value: "option3" }
34
+ * ]
35
+ * });
36
+ */
37
+ export default class MultipleChoiceInput extends Input {
38
+ constructor(properties?: MultipleChoiceInputProperties);
39
+ /**
40
+ * Defines the delimiter used to separate multiple selected choice values.
41
+ *
42
+ * @default ","
43
+ */
44
+ accessor choiceDelimeter: string;
45
+ /** An array of available choices. */
46
+ get choices(): Choice[] | null | undefined;
47
+ set choices(value: ChoiceProperties[] | null | undefined);
48
+ /** Indicates whether an additional `other` choice should be displayed. */
49
+ accessor includeOtherChoice: boolean | null | undefined;
50
+ /** The maximum number of choices allowed. */
51
+ accessor maxSelectedChoices: number | null | undefined;
52
+ /** The minimum number of choices required. */
53
+ accessor minSelectedChoices: number | null | undefined;
54
+ /** The configuration for the `other` choice when [includeOtherChoice](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/MultipleChoiceInput/#includeOtherChoice) is `true`. */
55
+ get otherChoice(): OtherChoice | null | undefined;
56
+ set otherChoice(value: OtherChoiceProperties | null | undefined);
57
+ /** The type of form element input. */
58
+ get type(): "multiple-choice";
59
+ /**
60
+ * Creates a deep clone of the `MultipleChoiceInput` class.
61
+ *
62
+ * @returns A deep clone of the `MultipleChoiceInput` instance.
63
+ */
64
+ clone(): MultipleChoiceInput;
65
+ }
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import{property as t,subclass as o}from"../../../core/accessorSupport/decorators.js";import i from"./Input.js";import c from"./multipleChoice/Choice.js";import r from"./multipleChoice/OtherChoice.js";var h;let s=h=class extends i{constructor(e){super(e),this.choiceDelimeter=",",this.choices=null,this.includeOtherChoice=null,this.maxSelectedChoices=null,this.minSelectedChoices=null,this.otherChoice=null,this.type="multiple-choice"}clone(){return new h({choiceDelimeter:this.choiceDelimeter,choices:this.choices?.map(e=>e.clone())??null,includeOtherChoice:this.includeOtherChoice,maxSelectedChoices:this.maxSelectedChoices,minSelectedChoices:this.minSelectedChoices,otherChoice:this.otherChoice?.clone()??null})}};e([t({type:String,json:{write:!0}})],s.prototype,"choiceDelimeter",void 0),e([t({type:[c],json:{write:{isRequired:!0}}})],s.prototype,"choices",void 0),e([t({type:Boolean,json:{write:!0}})],s.prototype,"includeOtherChoice",void 0),e([t({type:Number,json:{write:!0}})],s.prototype,"maxSelectedChoices",void 0),e([t({type:Number,json:{write:!0}})],s.prototype,"minSelectedChoices",void 0),e([t({type:r,json:{write:!0}})],s.prototype,"otherChoice",void 0),e([t({type:["multiple-choice"],json:{read:!1,write:!0}})],s.prototype,"type",void 0),s=h=e([o("esri.form.elements.inputs.MultipleChoiceInput")],s);const l=s;export{l as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- function t(t){return"barcode-scanner"===t.type}function e(t){return"combo-box"===t.type}function n(t){return"date-picker"===t.type}function r(t){return"datetime-picker"===t.type}function u(t){return"timestampoffset-picker"===t.type}function i(t){return"radio-buttons"===t.type}function o(t){return"switch"===t.type}function c(t){return"text-area"===t.type}function p(t){return"text-box"===t.type}function f(t){return"time-picker"===t.type}export{t as isBarcodeScannerInput,e as isComboBoxInput,n as isDatePickerInput,u as isDateTimeOffsetPickerInput,r as isDateTimePickerInput,i as isRadioButtonsInput,o as isSwitchInput,c as isTextAreaInput,p as isTextBoxInput,f as isTimePickerInput};
2
+ function t(t){return"barcode-scanner"===t.type}function e(t){return"combo-box"===t.type}function n(t){return"date-picker"===t.type}function r(t){return"datetime-picker"===t.type}function u(t){return"multiple-choice"===t.type}function i(t){return"timestampoffset-picker"===t.type}function c(t){return"radio-buttons"===t.type}function o(t){return"switch"===t.type}function p(t){return"text-area"===t.type}function f(t){return"text-box"===t.type}function y(t){return"time-picker"===t.type}export{t as isBarcodeScannerInput,e as isComboBoxInput,n as isDatePickerInput,i as isDateTimeOffsetPickerInput,r as isDateTimePickerInput,u as isMultipleChoiceInput,c as isRadioButtonsInput,o as isSwitchInput,p as isTextAreaInput,f as isTextBoxInput,y as isTimePickerInput};
@@ -0,0 +1,30 @@
1
+ import type { JSONSupport } from "../../../../core/JSONSupport.js";
2
+
3
+ export interface ChoiceProperties extends Partial<Pick<Choice, "label" | "value">> {}
4
+
5
+ /**
6
+ * Defines a choice in a [MultipleChoiceInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/MultipleChoiceInput/).
7
+ *
8
+ * @since 5.1
9
+ */
10
+ export default class Choice extends JSONSupport {
11
+ constructor(properties?: ChoiceProperties);
12
+ /**
13
+ * The label shown for the choice.
14
+ *
15
+ * @default ""
16
+ */
17
+ accessor label: string;
18
+ /**
19
+ * The stored value for the choice.
20
+ *
21
+ * @default ""
22
+ */
23
+ accessor value: string;
24
+ /**
25
+ * Creates a deep clone of the `Choice` class.
26
+ *
27
+ * @returns A deep clone of the `Choice` instance.
28
+ */
29
+ clone(): Choice;
30
+ }
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as e}from"tslib";import{JSONSupport as t}from"../../../../core/JSONSupport.js";import{property as o,subclass as r}from"../../../../core/accessorSupport/decorators.js";var s;let l=s=class extends t{constructor(e){super(e),this.label="",this.value=""}clone(){return new s({label:this.label,value:this.value})}};e([o({type:String,json:{write:!0}})],l.prototype,"label",void 0),e([o({type:String,json:{write:!0}})],l.prototype,"value",void 0),l=s=e([r("esri.form.elements.inputs.multipleChoice.Choice")],l);const i=l;export{i as default};
@@ -0,0 +1,28 @@
1
+ import type { JSONSupport } from "../../../../core/JSONSupport.js";
2
+
3
+ export interface OtherChoiceProperties extends Partial<Pick<OtherChoice, "fieldName" | "hint" | "label">> {}
4
+
5
+ /**
6
+ * Defines the configuration for the `other` choice in a [MultipleChoiceInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/MultipleChoiceInput/).
7
+ *
8
+ * @since 5.1
9
+ */
10
+ export default class OtherChoice extends JSONSupport {
11
+ constructor(properties?: OtherChoiceProperties);
12
+ /**
13
+ * The name of the field used to store the `other` choice value.
14
+ *
15
+ * @default ""
16
+ */
17
+ accessor fieldName: string;
18
+ /** A string representing placeholder text when 'Other' choice is selected. */
19
+ accessor hint: string | null | undefined;
20
+ /** The label used for the `other` choice. */
21
+ accessor label: string | null | undefined;
22
+ /**
23
+ * Creates a deep clone of the `OtherChoice` class.
24
+ *
25
+ * @returns A deep clone of the `OtherChoice` instance.
26
+ */
27
+ clone(): OtherChoice;
28
+ }
@@ -0,0 +1,2 @@
1
+ /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
+ import{__decorate as t}from"tslib";import{JSONSupport as e}from"../../../../core/JSONSupport.js";import{property as o,subclass as i}from"../../../../core/accessorSupport/decorators.js";var r;let s=r=class extends e{constructor(t){super(t),this.fieldName="",this.hint=null,this.label=null}clone(){return new r({fieldName:this.fieldName,hint:this.hint,label:this.label})}};t([o({type:String,json:{write:!0}})],s.prototype,"fieldName",void 0),t([o({type:String,json:{write:!0}})],s.prototype,"hint",void 0),t([o({type:String,json:{write:!0}})],s.prototype,"label",void 0),s=r=t([i("esri.form.elements.inputs.multipleChoice.OtherChoice")],s);const l=s;export{l as default};
@@ -9,6 +9,7 @@
9
9
  * import DatePickerInput from "@arcgis/core/form/elements/inputs/DatePickerInput.js";
10
10
  * import DateTimeOffsetPickerInput from "@arcgis/core/form/elements/inputs/DateTimeOffsetPickerInput.js";
11
11
  * import DateTimePickerInput from "@arcgis/core/form/elements/inputs/DateTimePickerInput.js";
12
+ * import MultipleChoiceInput from "@arcgis/core/form/elements/inputs/MultipleChoiceInput.js";
12
13
  * import RadioButtonsInput from "@arcgis/core/form/elements/inputs/RadioButtonsInput.js";
13
14
  * import SwitchInput from "@arcgis/core/form/elements/inputs/SwitchInput.js";
14
15
  * import TextAreaInput from "@arcgis/core/form/elements/inputs/TextAreaInput.js";
@@ -19,7 +20,7 @@
19
20
  * You can use this module to import them on a single line:
20
21
  *
21
22
  * ```js
22
- * import { BarcodeScannerInput, ComboBoxInput, DatePickerInput, DateTimeOffsetPickerInput, DateTimePickerInput, RadioButtonsInput, SwitchInput, TextAreaInput, TextBoxInput, TimePickerInput } from "@arcgis/core/form/elements/inputs.js";
23
+ * import { BarcodeScannerInput, ComboBoxInput, DatePickerInput, DateTimeOffsetPickerInput, DateTimePickerInput, MultipleChoiceInput, RadioButtonsInput, SwitchInput, TextAreaInput, TextBoxInput, TimePickerInput } from "@arcgis/core/form/elements/inputs.js";
23
24
  * ```
24
25
  *
25
26
  * This module also allows you to implement [type guards](https://basarat.gitbook.io/typescript/type-system/typeguard)
@@ -47,6 +48,7 @@
47
48
  * @see [DatePickerInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/DatePickerInput/)
48
49
  * @see [DateTimeOffsetPickerInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/DateTimeOffsetPickerInput/)
49
50
  * @see [DateTimePickerInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/DateTimePickerInput/)
51
+ * @see [MultipleChoiceInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/MultipleChoiceInput/)
50
52
  * @see [RadioButtonsInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/RadioButtonsInput/)
51
53
  * @see [SwitchInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/SwitchInput/)
52
54
  * @see [TextAreaInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/TextAreaInput/)
@@ -58,6 +60,7 @@ import type ComboBoxInputClass from "./inputs/ComboBoxInput.js";
58
60
  import type DatePickerInputClass from "./inputs/DatePickerInput.js";
59
61
  import type DateTimeOffsetPickerInputClass from "./inputs/DateTimeOffsetPickerInput.js";
60
62
  import type DateTimePickerInputClass from "./inputs/DateTimePickerInput.js";
63
+ import type MultipleChoiceInputClass from "./inputs/MultipleChoiceInput.js";
61
64
  import type RadioButtonsInputClass from "./inputs/RadioButtonsInput.js";
62
65
  import type SwitchInputClass from "./inputs/SwitchInput.js";
63
66
  import type TextAreaInputClass from "./inputs/TextAreaInput.js";
@@ -65,7 +68,7 @@ import type TextBoxInputClass from "./inputs/TextBoxInput.js";
65
68
  import type TimePickerInputClass from "./inputs/TimePickerInput.js";
66
69
 
67
70
  /** Form element input types. */
68
- export type Input = BarcodeScannerInputClass | ComboBoxInputClass | DatePickerInputClass | DateTimeOffsetPickerInputClass | DateTimePickerInputClass | RadioButtonsInputClass | SwitchInputClass | TextAreaInputClass | TextBoxInputClass | TimePickerInputClass;
71
+ export type Input = BarcodeScannerInputClass | ComboBoxInputClass | DatePickerInputClass | DateTimeOffsetPickerInputClass | DateTimePickerInputClass | MultipleChoiceInputClass | RadioButtonsInputClass | SwitchInputClass | TextAreaInputClass | TextBoxInputClass | TimePickerInputClass;
69
72
 
70
73
  /** The `BarcodeScannerInput` class defines the desired user interface is a barcode or QR code scanner. If this type is used in an ArcGIS Maps SDK for JavaScript web application, it will default to the [TextBoxInput](https://developers.arcgis.com/javascript/latest/references/core/form/elements/inputs/TextBoxInput/) type as the API does not support bar code scanning as an input type. */
71
74
  export const BarcodeScannerInput: typeof BarcodeScannerInputClass;
@@ -97,6 +100,12 @@ export const DateTimePickerInput: typeof DateTimePickerInputClass;
97
100
  /** The `DateTimePickerInput` class defines the desired user interface for editing date (including time) fields in a form. */
98
101
  export type DateTimePickerInput = DateTimePickerInputClass;
99
102
 
103
+ /** The `MultipleChoiceInput` class defines the desired user interface for a multiple choice group. */
104
+ export const MultipleChoiceInput: typeof MultipleChoiceInputClass;
105
+
106
+ /** The `MultipleChoiceInput` class defines the desired user interface for a multiple choice group. */
107
+ export type MultipleChoiceInput = MultipleChoiceInputClass;
108
+
100
109
  /** The `RadioButtonsInput` class defines the desired user interface for a radio button group. */
101
110
  export const RadioButtonsInput: typeof RadioButtonsInputClass;
102
111
 
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import t from"./inputs/BarcodeScannerInput.js";import p from"./inputs/ComboBoxInput.js";import i from"./inputs/DatePickerInput.js";import o from"./inputs/DateTimeOffsetPickerInput.js";import r from"./inputs/DateTimePickerInput.js";import e from"./inputs/Input.js";import m from"./inputs/RadioButtonsInput.js";import s from"./inputs/SwitchInput.js";import n from"./inputs/TextAreaInput.js";import u from"./inputs/TextBoxInput.js";import a from"./inputs/TimePickerInput.js";const c=t,f=p,j=i,I=o,k=r,x=m,b=s,d=n,T=u,B=a,P={base:e,key:"type",typeMap:{"barcode-scanner":c,"combo-box":f,"date-picker":j,"datetime-picker":k,"timestampoffset-picker":I,"radio-buttons":x,switch:b,"text-area":d,"text-box":T,"time-picker":B}};export{c as BarcodeScannerInput,f as ComboBoxInput,j as DatePickerInput,I as DateTimeOffsetPickerInput,k as DateTimePickerInput,x as RadioButtonsInput,b as SwitchInput,d as TextAreaInput,T as TextBoxInput,B as TimePickerInput,P as types};
2
+ import t from"./inputs/BarcodeScannerInput.js";import p from"./inputs/ComboBoxInput.js";import i from"./inputs/DatePickerInput.js";import o from"./inputs/DateTimeOffsetPickerInput.js";import e from"./inputs/DateTimePickerInput.js";import r from"./inputs/Input.js";import m from"./inputs/MultipleChoiceInput.js";import s from"./inputs/RadioButtonsInput.js";import n from"./inputs/SwitchInput.js";import u from"./inputs/TextAreaInput.js";import c from"./inputs/TextBoxInput.js";import a from"./inputs/TimePickerInput.js";const f=t,j=p,I=i,k=o,x=e,b=m,d=s,T=n,h=u,l=c,B=a,P={base:r,key:"type",typeMap:{"barcode-scanner":f,"combo-box":j,"date-picker":I,"datetime-picker":x,"multiple-choice":b,"timestampoffset-picker":k,"radio-buttons":d,switch:T,"text-area":h,"text-box":l,"time-picker":B}};export{f as BarcodeScannerInput,j as ComboBoxInput,I as DatePickerInput,k as DateTimeOffsetPickerInput,x as DateTimePickerInput,b as MultipleChoiceInput,d as RadioButtonsInput,T as SwitchInput,h as TextAreaInput,l as TextBoxInput,B as TimePickerInput,P as types};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{ensureOneOfType as t}from"../../core/accessorSupport/ensureType.js";import e from"../elements/AttachmentElement.js";import o from"../elements/Element.js";import p from"../elements/FieldElement.js";import r from"../elements/RelationshipElement.js";import i from"../elements/TextElement.js";import n from"../elements/UtilityNetworkAssociationsElement.js";const s=t=>"field"===t.type,u=t=>"group"===t.type,m=t=>"text"===t.type,y=t=>"relationship"===t.type,l=t=>"utilityNetworkAssociations"===t.type;function a(t){return f(t)||c(t)}function f(t){return"text-area"===t.type}function c(t){return"text-box"===t.type}function h(t){return{typesWithGroup:{base:o,key:"type",typeMap:{attachment:e,field:p,group:t,relationship:r,text:i,utilityNetworkAssociations:n}},typesWithoutGroup:{base:o,key:"type",typeMap:{attachment:e,field:p,relationship:r,text:i,utilityNetworkAssociations:n}}}}function x(t,e,o=!0){if(!t)return null;const p=o?e.typesWithGroup.typeMap:e.typesWithoutGroup.typeMap;return t.filter(t=>p[t.type]).map(t=>p[t.type].fromJSON(t))}function G(t,e,o=!0){if(!t)return null;const p=o?e.typesWithGroup.typeMap:e.typesWithoutGroup.typeMap;return t.filter(t=>p[t.type]).map(t=>t.toJSON())}function W(e,o,p=!0){return e?e.map(e=>t(p?o.typesWithGroup:o.typesWithoutGroup,e)):null}export{h as buildTypeMaps,W as ensureType,x as fromJSON,s as isFieldElement,u as isGroupElement,y as isRelationshipElement,f as isTextAreaInput,c as isTextBoxInput,m as isTextElement,a as isTextInput,l as isUtilityNetworkAssociationsElement,G as toJSON};
2
+ import{ensureOneOfType as t}from"../../core/accessorSupport/ensureType.js";import e from"../elements/AttachmentElement.js";import o from"../elements/Element.js";import p from"../elements/FieldElement.js";import r from"../elements/RelationshipElement.js";import i from"../elements/TextElement.js";import n from"../elements/UtilityNetworkAssociationsElement.js";const s=t=>"field"===t.type,u=t=>"group"===t.type,m=t=>"text"===t.type,y=t=>"attachment"===t.type,l=t=>"relationship"===t.type,a=t=>"utilityNetworkAssociations"===t.type;function f(t){return c(t)||h(t)}function c(t){return"text-area"===t.type}function h(t){return"text-box"===t.type}function x(t){return{typesWithGroup:{base:o,key:"type",typeMap:{attachment:e,field:p,group:t,relationship:r,text:i,utilityNetworkAssociations:n}},typesWithoutGroup:{base:o,key:"type",typeMap:{attachment:e,field:p,relationship:r,text:i,utilityNetworkAssociations:n}}}}function G(t,e,o=!0){if(!t)return null;const p=o?e.typesWithGroup.typeMap:e.typesWithoutGroup.typeMap;return t.filter(t=>p[t.type]).map(t=>p[t.type].fromJSON(t))}function W(t,e,o=!0){if(!t)return null;const p=o?e.typesWithGroup.typeMap:e.typesWithoutGroup.typeMap;return t.filter(t=>p[t.type]).map(t=>t.toJSON())}function j(e,o,p=!0){return e?e.map(e=>t(p?o.typesWithGroup:o.typesWithoutGroup,e)):null}export{x as buildTypeMaps,j as ensureType,G as fromJSON,y as isAttachmentElement,s as isFieldElement,u as isGroupElement,l as isRelationshipElement,c as isTextAreaInput,h as isTextBoxInput,m as isTextElement,f as isTextInput,a as isUtilityNetworkAssociationsElement,W as toJSON};
package/interfaces.d.ts CHANGED
@@ -2082,6 +2082,9 @@ declare namespace __esri {
2082
2082
  /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
2083
2083
  export type inputsDateTimePickerInput = import("./form/elements/inputs.js").DateTimePickerInput;
2084
2084
 
2085
+ /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
2086
+ export type inputsMultipleChoiceInput = import("./form/elements/inputs.js").MultipleChoiceInput;
2087
+
2085
2088
  /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
2086
2089
  export type inputsRadioButtonsInput = import("./form/elements/inputs.js").RadioButtonsInput;
2087
2090
 
@@ -2122,6 +2125,10 @@ declare namespace __esri {
2122
2125
  /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
2123
2126
  export type DateTimePickerInput = import("./form/elements/inputs.js").DateTimePickerInput;
2124
2127
 
2128
+ export const MultipleChoiceInput: import("./form/elements/inputs.js").MultipleChoiceInput;
2129
+ /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
2130
+ export type MultipleChoiceInput = import("./form/elements/inputs.js").MultipleChoiceInput;
2131
+
2125
2132
  export const RadioButtonsInput: import("./form/elements/inputs.js").RadioButtonsInput;
2126
2133
  /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
2127
2134
  export type RadioButtonsInput = import("./form/elements/inputs.js").RadioButtonsInput;
@@ -2178,6 +2185,13 @@ declare namespace __esri {
2178
2185
  export type DateTimePickerInput = import("./form/elements/inputs/DateTimePickerInput.js").default;
2179
2186
  export const DateTimePickerInput: typeof import("./form/elements/inputs/DateTimePickerInput.js").default;
2180
2187
 
2188
+ /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
2189
+ export type MultipleChoiceInputProperties = import("./form/elements/inputs/MultipleChoiceInput.js").MultipleChoiceInputProperties;
2190
+
2191
+ /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
2192
+ export type MultipleChoiceInput = import("./form/elements/inputs/MultipleChoiceInput.js").default;
2193
+ export const MultipleChoiceInput: typeof import("./form/elements/inputs/MultipleChoiceInput.js").default;
2194
+
2181
2195
  /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
2182
2196
  export type RadioButtonsInputProperties = import("./form/elements/inputs/RadioButtonsInput.js").RadioButtonsInputProperties;
2183
2197
 
@@ -2262,6 +2276,20 @@ declare namespace __esri {
2262
2276
  export type VideoInput = import("./form/elements/inputs/attachments/VideoInput.js").default;
2263
2277
  export const VideoInput: typeof import("./form/elements/inputs/attachments/VideoInput.js").default;
2264
2278
 
2279
+ /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
2280
+ export type MultipleChoiceInputChoiceProperties = import("./form/elements/inputs/multipleChoice/Choice.js").ChoiceProperties;
2281
+
2282
+ /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
2283
+ export type MultipleChoiceInputChoice = import("./form/elements/inputs/multipleChoice/Choice.js").default;
2284
+ export const MultipleChoiceInputChoice: typeof import("./form/elements/inputs/multipleChoice/Choice.js").default;
2285
+
2286
+ /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
2287
+ export type MultipleChoiceOtherChoiceProperties = import("./form/elements/inputs/multipleChoice/OtherChoice.js").OtherChoiceProperties;
2288
+
2289
+ /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
2290
+ export type MultipleChoiceOtherChoice = import("./form/elements/inputs/multipleChoice/OtherChoice.js").default;
2291
+ export const MultipleChoiceOtherChoice: typeof import("./form/elements/inputs/multipleChoice/OtherChoice.js").default;
2292
+
2265
2293
  /** @deprecated since 5.0. Refactor using \@arcgis/codemod */
2266
2294
  export type CircleProperties = import("./geometry/Circle.js").CircleProperties;
2267
2295
 
package/kernel.js CHANGED
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.1";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.1.0-next.72",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
2
+ import has from"./core/has.js";import{addQueryParameter as o}from"./core/urlUtils.js";export{buildDate,commitHash as revision}from"./support/revision.js";Symbol.dispose??=Symbol("Symbol.dispose"),Symbol.asyncDispose??=Symbol("Symbol.asyncDispose");const e="5.1";let s,r=e;function i(o){s=o}function t(e){const r=s?.findCredential(e);return r?.token?o(e,"token",r.token):e}r="5.1.0-next.73",has("host-webworker")||globalThis.$arcgis||Object.defineProperty(globalThis,"$arcgis",{configurable:!1,enumerable:!0,writable:!1,value:{}}),has("host-webworker");export{t as addTokenParameter,r as fullVersion,s as id,i as setId,e as version};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import i from"../request.js";import{has}from"../applications/Components/baUtils.js";import t from"../core/Accessor.js";import s from"../core/Error.js";import r from"../core/Logger.js";import{createAbortError as a,isAborted as n,isAbortError as o}from"../core/promiseUtils.js";import{watch as l}from"../core/reactiveUtils.js";import{addFrameTask as d}from"../core/scheduling.js";import{property as h,subclass as _}from"../core/accessorSupport/decorators.js";import y from"../geometry/SpatialReference.js";import{isGeographic as c}from"../geometry/support/spatialReferenceUtils.js";import u from"../geometry/support/WKIDUnitConversion.js";import{wasmFailedToInit as m,elevQueriesFull as g,elevQueriesGenericFail as w,invalidLayerView as p}from"./ILyr3DWasmPerSceneView.js";import{Lyr3DWorkerHandle as b}from"./Lyr3DWorkerHandle.js";import{getVCSFromHeightModelInfo as f}from"./support/tiles3DUtils.js";import{loadLyr3DMainWASM as v}from"../libs/lyr3d/Lyr3DModule.js";import{getElevationOffsetInMeters as D}from"../support/elevationInfoUtils.js";import{makeScheduleFunction as M}from"../views/3d/layers/support/makeScheduleFunction.js";const L=3857,k=32662,R=4326,S=5773,C=115700;let W=class extends t{constructor(e){super(e),this._lyr3DMainPromise=null,this._lyr3DMain=null,this._layers=new Map,this._viewSR=null,this._lyr3DBusyCount=0,this._lyr3DInternalMemoryBytes=0,this._isTerrainReady=!1,this._hasLayerThatReplacesTerrain=!1,this._elevationQueries=new Map,this._debugFlags=new Set,this._debugLevel=0,this._wasmNotLoaded="method requiring WASM was called when WASM isn't loaded",this._pulseTaskHandle=null,this._cameraElevationDirty=!0,this._debugFlags.add(0),this._debugFlags.add(1),this._debugFlags.add(2)}_debugLog(e,i,t,s=!0){if(this._debugFlags.has(e)&&this._debugLevel>=i){const e=s?`[js] ${t}`:`${t}`;0===i||1===i?r.getLogger(this).error(e):2===i&&r.getLogger(this).warn(e),r.getLogger(this).info(e)}}get lyr3DInternalMemoryBytes(){return this._lyr3DInternalMemoryBytes}initialize(){this._debugLevel>2&&(r.getLogger(this).level="info"),this._debugLog(0,3,"Lyr3DWasmPerSceneView.initialize()"),this.addHandles([l(()=>this.view.state?.contentCamera,()=>this._updateWasmCamera()),l(()=>this.view.state?.contentCamera.relativeElevation,()=>{this._cameraElevationDirty=!0,this._markAllLayerViewsUpdating()})]),this._pulseTaskHandle=d({preRender:()=>this._pulseTask()})}destroy(){this._debugLog(0,3,"Lyr3DWasmPerSceneView.destroy()"),this._lyr3DMain&&(this._layers.forEach(e=>{e.abortController.abort()}),this._elevationQueries.forEach((e,i)=>{this._lyr3DMain.cancel_elevation_query(i),e.rejectCallback(a())}),this._elevationQueries.clear(),this._lyr3DMain.uninitialize_lyr3d_wasm(),this._lyr3DMain=null);const e=this._workerHandle;e&&e.destroyWasm().then(()=>{this._workerHandle?.destroy(),this._workerHandle=null}),this._pulseTaskHandle?.remove(),this._pulseTaskHandle=null}addLayerView(e){return this._lyr3DMain?this._addLayerView(e):(this._debugLog(0,1,"Lyr3DWasmPerSceneView.add3DTilesLayerView() called when WASM wasn't initialized"),{wasmLayerId:m})}removeLayerView(e){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),0;this._doRemoveLayerView(e);const i=this._layers.size;return 0===i&&(this._debugLog(0,3,"Lyr3DWasmPerSceneView.remove3DTilesLayerView() no Lyr3D layers left after removing a layer, destroying"),this.destroy()),i}getValidLayerViewCount(){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),0;let e=0;return this._layers.forEach(i=>{i.layerView.wasmLayerId>=0&&++e}),e}setEnabled(e,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const t=this._layers.get(e.wasmLayerId);if(t){this._lyr3DMain.set_enabled(e.wasmLayerId,i),t.needMemoryUsageUpdate=!0;const s=this._isUpdating(t);t.needFrame=!0,s||t.layerView.updatingFlagChanged()}}setLayerOffset(e,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);this._layers.get(e.wasmLayerId)&&this._lyr3DMain.set_carto_offset_z(e.wasmLayerId,i)}getAttributionText(){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),[];return this._lyr3DMain.get_current_attribution_text().split("|")}onRenderableEvicted(e,i,t){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);this._layers.get(e.wasmLayerId)&&this._lyr3DMain.on_renderable_evicted(e.wasmLayerId,i,t)}setMeshModifications(e,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const t=this._layers.get(e.wasmLayerId);if(t){const s=this._lyr3DMain._malloc(8*i.length),r=new Float64Array(this._lyr3DMain.HEAPF64.buffer,s,i.length);for(let e=0;e<i.length;++e)r[e]=i[e];this._lyr3DMain.set_mesh_modification_polygons(e.wasmLayerId,s,i.length),this._lyr3DMain._free(s);const a=this._isUpdating(t);t.needFrame=!0,a||t.layerView.updatingFlagChanged()}}isUpdating(e){if(!this._lyr3DMain&&this._lyr3DMainPromise)return!0;const i=this._layers.get(e);return!!i&&(i.outstandingJobCount>0||i.outstandingRenderableCount>0||i.needFrame||this._lyr3DBusyCount>0)}initializeWasm(e,i){return this._lyr3DMain?Promise.resolve():this.view.renderSpatialReference?(this._debugLog(0,3,"Lyr3DWasmPerSceneView.initializeWasm()"),this._lyr3DMainPromise||(this._lyr3DMainPromise=v().then(t=>{this._lyr3DMain=t,this._lyr3DMainPromise=null;const s=this._lyr3DMain.addFunction(this._onNewJob.bind(this),"v"),r=this._lyr3DMain.addFunction(this._onNewRenderable.bind(this),"v"),a=this._lyr3DMain.addFunction(this._freeRenderables.bind(this),"viii"),n=this._lyr3DMain.addFunction(this._setRenderableVisibility.bind(this),"viiii"),o=this._lyr3DMain.addFunction(this._onWasmError.bind(this),"viiii"),l=this._lyr3DMain.addFunction(this._onElevQueryComplete.bind(this),"vi");if(!this.view.renderSpatialReference)return void(this._lyr3DMain=null);this._viewSR=this.view.renderSpatialReference?.toJSON();const d="global"===this.view.viewingMode?5:3;if(5===d)this._viewSR.wkid=this._viewSR.latestWkid=R,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=S;else if(this.view.renderSpatialReference?.isWebMercator)this._viewSR.wkid=this._viewSR.latestWkid=L,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=S;else if(this.view.renderSpatialReference?.wkid===k)this._viewSR.wkid=this._viewSR.latestWkid=R,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=S;else if(!this._viewSR.latestVcsWkid&&!this._viewSR.vcsWkid){const e=f(this.view.heightModelInfo);if(e)this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=e;else{const e=this.view.heightModelInfo?.heightModel,i=!e||"gravity-related-height"===e;this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=i?S:C}}const h=has("esri-lyr3D-max-concurrent-requests")??16;return this._lyr3DMain.initialize_lyr3d_wasm(o,s,r,a,n,l,e,i,d,this._cleanUpSR(this._makeSRWasmSerializable(this._viewSR)),Math.max(this._debugLevel,0),h)?(this._workerHandle=new b(M(this.view.resourceController)),this._workerHandle.promise?this._workerHandle.promise:void 0):(this._lyr3DMain=null,void this._debugLog(0,0,"Lyr3d Main WASM failed to initialize",!1))}).catch(e=>{this._debugLog(0,0,`Lyr3d WASM failed to download error = ${e}`,!1)})),this._lyr3DMainPromise):Promise.reject()}get isTerrainReady(){return this._isTerrainReady}setLodPixelThreshold(e,i){this._lyr3DMain?.set_lod_pixel_threshold(i);const t=this._layers.get(e.wasmLayerId);t&&(t.needFrame=!0)}setMaximumGaussianSplatCount(e){this._lyr3DMain.set_maximum_splat_count(e),this._layers.forEach(e=>{"gaussian-splat-3d"===e.layerView.type&&(e.needFrame=!0)})}queryElevation(e,i,t){if(!this._lyr3DMain)return Promise.reject(this._wasmNotLoaded);if(0===i.coordinates.length)return Promise.reject("no coordinates for elevation query");const s="global"===this.view.viewingMode?y.WGS84:this._viewSR.wkid===L?y.WebMercator:y.PlateCarree,r=i.projectSync(s);r&&(i=r);const a=2*i.coordinates.length,n=this._lyr3DMain._malloc(8*a),o=new Float64Array(this._lyr3DMain.HEAPF64.buffer,n,a);for(let y=0;y<i.coordinates.length;++y){const e=i.coordinates[y];o[2*y]=e.x,o[2*y+1]=e.y}const l=t?.maxGeometricError??0,d=this._lyr3DMain.create_elevation_query(e.wasmLayerId,l,n,a);if(this._lyr3DMain._free(n),d===g)return Promise.reject("max mesh elevation query limit exceeded");if(d===w)return Promise.reject("elevation query failed");const h={descriptor:i,signal:t?.signal,resolveCallback:null,rejectCallback:null},_=new Promise((e,i)=>{h.resolveCallback=e,h.rejectCallback=i});return this._elevationQueries.set(d,h),_}_checkForAbortedElevationQueries(){const e=[];this._elevationQueries.forEach((i,t)=>{n(i.signal)&&(this._lyr3DMain.cancel_elevation_query(t),i.rejectCallback(a()),e.push(t))});for(let i=0;i<e.length;++i)this._elevationQueries.delete(e[i])}_pulseTask(){if(this._lyr3DMain){if(this._cameraElevationDirty){const e=this.view.state?.contentCamera.relativeElevation;this._lyr3DMain.set_camera_elevation(e)}this._checkForAbortedElevationQueries();let e=0,i=0;this._layers.forEach(t=>{e+=t.layerView.usedMemory,i+=t.layerView.cachedMemory}),e/=1048576,i/=1048576;const t=this.view.resourceController.memoryController,s=t.usedMemory*t.maxMemory-e-this._lyr3DInternalMemoryBytes/1048576;this._lyr3DBusyCount=this._lyr3DMain.frame_pulse(t.memoryFactor,e,i,s,t.maxMemory),this._lyr3DInternalMemoryBytes=this._lyr3DMain.get_index_memory_bytes(),this._layers.forEach(e=>{this._cameraElevationDirty||(e.needFrame=!1),e.layerView.updatingFlagChanged()}),this._hasLayerThatReplacesTerrain&&!this._isTerrainReady&&(this._isTerrainReady=this._lyr3DMain.is_terrain_ready(),this._isTerrainReady&&this.notifyChange("isTerrainReady")),this._cameraElevationDirty=!1}}_isUpdating(e){return e.outstandingJobCount>0||e.outstandingRenderableCount>0||e.needFrame||this._lyr3DBusyCount>0}_incrementJobCount(e,i){if(i.isForElevationQuery)return;const t=this._isUpdating(e);e.outstandingJobCount+=1,t||e.layerView.updatingFlagChanged()}_decrementJobCount(e,i){if(i.isForElevationQuery)return;const t=this._isUpdating(e);e.outstandingJobCount-=1;t!==this._isUpdating(e)&&e.layerView.updatingFlagChanged()}_incrementRenderableCount(e){const i=this._isUpdating(e);e.outstandingRenderableCount+=1,i||e.layerView.updatingFlagChanged()}_decrementRenderableCount(e){const i=this._isUpdating(e);e.outstandingRenderableCount-=1;i!==this._isUpdating(e)&&e.layerView.updatingFlagChanged()}_onJobFailed(e,i,t){i.error.length&&this._debugLog(1,1,i.error,!1),this._lyr3DMain&&this._lyr3DMain.on_job_failed(t.jobId,t.desc),this._decrementJobCount(e,t)}_onJobSucceeded(e,i,t){if(this._lyr3DMain){if(e.layerView.destroyed)return void this._lyr3DMain.on_job_failed(t.jobId,t.desc);const s=i.data.byteLength,r=this._lyr3DMain._malloc(s);new Uint8Array(this._lyr3DMain.HEAPU8.buffer,r,s).set(i.data),this._lyr3DMain.on_job_completed(t.jobId,i.jobDescJson,r,s),this._lyr3DMain._free(r)}this._decrementJobCount(e,t)}_getRequestPromises(e,t,s,r){const a=[];for(const n of e){const e=new URL(n);if("integrated-mesh-3dtiles"===r.type){if(e.origin===s.origin&&e.pathname===s.pathname){if(r.rootTileset){a.push(Promise.resolve(r.rootTileset.slice()));continue}}else r.session&&e.searchParams.set("session",r.session)}a.push(i(e.toString(),t).then(e=>e.data))}return a}_getInitialPromise(e,i,t,s,r,a,n){const l=this._getRequestPromises(e.urls,i,t,s);return Promise.all(l).then(e=>(r.inputs=e,this._workerHandle.invoke(r,a))).then(e=>e).catch(i=>{let t=1;return o(i)?this._debugLog(1,2,`job ${e.jobId} was cancelled.`):n&&400===i.details?.httpStatus?(t=3,this._debugLog(1,2,"Session expired, trying to create new Session.")):this._debugLog(1,1,`job ${e.jobId} failed with error ${i}.`),{status:t,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[],inputs:[]}})}async _onNewJob(){const e=this._lyr3DMain.get_next_job(),i=this._layers.get(e.layerId);if(!i)return;this._incrementJobCount(i,e);const t=i.abortController.signal,s=i.layerView.layer,r="integrated-mesh-3dtiles"===s.type?s.key:null,a="integrated-mesh-3dtiles"===s.type?s.session:null,n={responseType:"array-buffer",signal:t,query:{...i.customParameters,token:i.apiKey,key:r}},l={id:e.jobId,inputs:[],jobDescJson:e.desc.slice(),isMissingResourceCase:!1},d=new URL(s.url),h=r=>{if(1===r.status)this._onJobFailed(i,r,e);else if(0===r.status)this._onJobSucceeded(i,r,e);else if(2===r.status){const a=this._getRequestPromises(r.missingInputUrls,n,d,s);Promise.all(a).then(e=>{l.jobDescJson=r.jobDescJson,r.originalInputs?l.inputs=r.originalInputs:l.inputs=[],l.isMissingResourceCase=!0;for(const i of e)l.inputs.push(i);return this._workerHandle.invoke(l,t)}).then(t=>{1===t.status?this._onJobFailed(i,t,e):0===t.status&&this._onJobSucceeded(i,t,e)}).catch(t=>{this._decrementJobCount(i,e),o(t)?this._debugLog(1,2,`job ${e.jobId} was cancelled.`):this._debugLog(1,1,`job ${e.jobId} failed with error ${t}.`),this._lyr3DMain&&this._lyr3DMain.on_job_failed(e.jobId,e.desc)})}};try{const i=await this._getInitialPromise(e,n,d,s,l,t,a);if(3===i.status&&"integrated-mesh-3dtiles"===s.type){a===s.session&&null!==s.session&&await s.requestRootAndSession(t);h(await this._getInitialPromise(e,n,d,s,l,t,s.session))}else h(i)}catch(_){_&&this._debugLog(1,1,_.toString(),!1),this._lyr3DMain&&this._lyr3DMain.on_job_failed(e.jobId,e.desc),this._decrementJobCount(i,e)}}_onNewRenderable(){const e=this._lyr3DMain.get_next_renderable(),{meshData:i}=e;i.data&&i.data.byteLength>0&&(i.data=i.data.slice());const t=this._layers.get(e.layerId);t&&(this._incrementRenderableCount(t),t.layerView.createRenderable(e).then(i=>{const s=i.numGaussians??0;this._lyr3DMain?.on_renderable_created(!0,e.layerId,e.handle,i.memUsageBytes,s),this._decrementRenderableCount(t)}).catch(i=>{o(i)||this._debugLog(2,1,`createRenderable failed with error ${i}.`),this._lyr3DMain?.on_renderable_created(!1,e.layerId,e.handle,0,0),this._decrementRenderableCount(t)}))}_freeRenderables(e,i,t){if(t<1)return;const s=this._layers.get(e);if(!s)return;const r=s.layerView,a=[],n=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,i,t);for(let o=0;o<t;++o)a.push(n[o]);for(let o=0;o<t;++o)r.freeRenderable(a[o])}_setRenderableVisibility(e,i,t,s){if(s<1)return;const r=this._layers.get(e);if(!r)return;const a=r.layerView,n=[],o=[],l=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,i,s),d=new Uint8Array(this._lyr3DMain.HEAPU8.buffer,t,s);for(let h=0;h<s;++h)n.push(l[h]),o.push(!!(1&d[h]));a.setRenderableVisibility(n,o,s)}_onWasmError(e,i,t,s){this._lyr3DMain&&this._debugLog(t,s,this._lyr3DMain.UTF8ToString(e,i),!1)}_onElevQueryComplete(e){const i=this._elevationQueries.get(e),t=this._lyr3DMain.get_elevation_query_result(e);if(i)if(t.succeeded&&t.zs){const s=t.zs.slice(),r=i.descriptor.clone();for(let e=0;e<s.length;++e)r.coordinates[e].z=s[e];this._debugLog(2,3,`Success EQ ${e}, number points ${s.length}.`),i.resolveCallback(r),this._elevationQueries.delete(e)}else i.rejectCallback(new s("elevation-query:error",t?.error??"Elevation query failed")),this._elevationQueries.delete(e);else this._debugLog(2,1,`_onElevQueryComplete called for unknown queryId ${e}.`)}_doRemoveLayerView(e){const i=this._layers.get(e.wasmLayerId);return!!i&&(i.abortController.abort(),this._lyr3DMain.remove_layer(e.wasmLayerId),this._is3DTilesIMLayerView(e)&&e.layer.replacesTerrain&&(this._hasLayerThatReplacesTerrain=!1,this._isTerrainReady=!1,this.notifyChange("isTerrainReady")),this._layers.delete(e.wasmLayerId),!0)}_is3DTilesIMLayerView(e){return"integrated-mesh-3dtiles"===e.layer.type}_isGaussianSplatLayerView(e){return"gaussian-splat"===e.layer.type}_isGaussianSplatLayer(e){return"gaussian-splat"===e.type}_toWasmQuality(e){switch(e){case"low":return 1;case"medium":return 2;case"high":return 3}}_addLayerView(e){const i=e.layer;if(!i.url||!i.rootTilesetJSON)return{wasmLayerId:p};const t="integrated-mesh-3dtiles"===i.type?0:2,s=this._lyr3DMain.validate_root_tileset(JSON.stringify(i.rootTilesetJSON),t);if(0!==s.errorCode)return{wasmLayerId:p,check:s};const a=this._lyr3DMain.get_next_layer_id(),n=new AbortController;this._layers.set(a,{layerView:e,abortController:n,needMemoryUsageUpdate:!1,outstandingJobCount:0,outstandingRenderableCount:0,customParameters:i.customParameters,apiKey:i.apiKey,needFrame:!0});const o=D(i.elevationInfo),l=this._toWasmQuality(this.view?.qualityProfile),d=e=>r.getLogger(this).error("add-spatial-reference-error","Error when adding SR:",e);let h=!1;if(this._isGaussianSplatLayerView(e)&&this._isGaussianSplatLayer(i)){let t=i.spatialReference;if(e.useEsriCrs&&i.esriCrsSpatialReference){t=i.esriCrsSpatialReference;const s=c(t);let r=1,a=1;!s&&t.wkid&&-1!==t.wkid&&(r=u.values[u[t.wkid]],a=e.metersPerVCSUnit),this._workerHandle.addSpatialReferenceInfo(this._cleanUpSR(this._makeSRWasmSerializable(t)),s,r,a).catch(d),t.vcsWkid&&this._viewSR.vcsWkid&&this._viewSR.vcsWkid!==t.vcsWkid&&this._workerHandle.addSpatialReferenceInfo(this._cleanUpSR(this._makeSRWasmSerializable(this._viewSR)),!1,1,1).catch(d)}h=this._lyr3DMain.add_gaussian_splat_layer(l,i.url,a,o)}else this._is3DTilesIMLayerView(e)&&(h=this._lyr3DMain.add_3dtiles_layer(l,i.url,a,o,e.layer.replacesTerrain),h&&e.layer.replacesTerrain&&(this._hasLayerThatReplacesTerrain=!0,this._isTerrainReady=!1,this.notifyChange("isTerrainReady")));return h?(this._updateWasmCamera(),e.updatingFlagChanged(),{wasmLayerId:a}):(this._layers.delete(a),{wasmLayerId:p})}_updateWasmCamera(){const e=this.view.state?.contentCamera;if(!e||!this._lyr3DMain)return;const{eye:i,center:t,up:s,near:r,far:a,fovY:n}=e,o=[e.viewport[2],e.viewport[3]],l=e.width/e.height;this._lyr3DMain.set_camera_parameters({eye:i,center:t,up:s,near:r,far:a,fov:n,aspectRatio:l,viewport:o}),this._markAllLayerViewsUpdating()}_markAllLayerViewsUpdating(){this._layers.forEach(e=>{const i=this._isUpdating(e);e.needFrame=!0,i||e.layerView.updatingFlagChanged()})}_makeSRWasmSerializable(e){return{wkid:e?.wkid??-1,latestWkid:e?.latestWkid??-1,vcsWkid:e?.vcsWkid??-1,latestVcsWkid:e?.latestVcsWkid??-1,wkt:e?.wkt??""}}_cleanUpSR(e){return-1===e?.wkid&&e.latestWkid&&-1!==e.latestWkid?e.wkid=e.latestWkid:-1===e?.latestWkid&&e.wkid&&-1!==e.wkid&&(e.latestWkid=e.wkid),-1===e?.vcsWkid&&e.latestVcsWkid&&-1!==e.latestVcsWkid?e.vcsWkid=e.latestVcsWkid:-1===e?.latestVcsWkid&&e.vcsWkid&&-1!==e.vcsWkid&&(e.latestVcsWkid=e.vcsWkid),e}};e([h({constructOnly:!0})],W.prototype,"view",void 0),e([h({readOnly:!0})],W.prototype,"isTerrainReady",null),W=e([_("esri.layers.Lyr3DWasmPerSceneView")],W);const V=W;export{V as default};
2
+ import{__decorate as e}from"tslib";import i from"../request.js";import{has}from"../applications/Components/baUtils.js";import t from"../core/Accessor.js";import s from"../core/Error.js";import r from"../core/Logger.js";import{someMap as a}from"../core/MapUtils.js";import{createAbortError as n,isAborted as o,isAbortError as l}from"../core/promiseUtils.js";import{watch as d}from"../core/reactiveUtils.js";import{property as h,subclass as _}from"../core/accessorSupport/decorators.js";import y from"../geometry/SpatialReference.js";import{isGeographic as u}from"../geometry/support/spatialReferenceUtils.js";import c from"../geometry/support/WKIDUnitConversion.js";import{wasmFailedToInit as g,elevQueriesFull as m,elevQueriesGenericFail as p,invalidLayerView as w}from"./ILyr3DWasmPerSceneView.js";import{Lyr3DWorkerHandle as b}from"./Lyr3DWorkerHandle.js";import{getVCSFromHeightModelInfo as f}from"./support/tiles3DUtils.js";import{loadLyr3DMainWASM as v}from"../libs/lyr3d/Lyr3DModule.js";import{getElevationOffsetInMeters as D}from"../support/elevationInfoUtils.js";import{makeScheduleFunction as M}from"../views/3d/layers/support/makeScheduleFunction.js";import{TaskPriority as L}from"../views/support/Scheduler.js";import{Yield as k}from"../views/support/Yield.js";const R=3857,C=32662,S=4326,W=5773,V=115700;let j=class extends t{constructor(e){super(e),this._lyr3DMainPromise=null,this._lyr3DMain=null,this._layers=new Map,this._viewSR=null,this._lyr3DBusyCount=0,this._lyr3DInternalMemoryBytes=0,this._isTerrainReady=!1,this._hasLayerThatReplacesTerrain=!1,this._elevationQueries=new Map,this._pendingJobCompleted=new Array,this._pendingJobFailed=new Array,this._pendingRenderableCreated=new Array,this._debugFlags=new Set,this._debugLevel=0,this._wasmNotLoaded="method requiring WASM was called when WASM isn't loaded",this._pulseTaskHandle=null,this._cameraDirty=!0,this._cameraElevationDirty=!0,this._debugFlags.add(0),this._debugFlags.add(1),this._debugFlags.add(2)}_debugLog(e,i,t,s=!0){if(this._debugFlags.has(e)&&this._debugLevel>=i){const e=s?`[js] ${t}`:`${t}`;0===i||1===i?r.getLogger(this).error(e):2===i&&r.getLogger(this).warn(e),r.getLogger(this).info(e)}}get lyr3DInternalMemoryBytes(){return this._lyr3DInternalMemoryBytes}initialize(){this._debugLevel>2&&(r.getLogger(this).level="info"),this._debugLog(0,3,"Lyr3DWasmPerSceneView.initialize()"),this.addHandles([d(()=>this.view.state?.contentCamera,()=>this._updateWasmCamera()),d(()=>this.view.state?.contentCamera.relativeElevation,()=>{this._cameraElevationDirty=!0,this._markAllLayerViewsUpdating()})]),this._pulseTaskHandle=this.view.resourceController.scheduler.registerTask(L.LYR3D,this)}destroy(){this._debugLog(0,3,"Lyr3DWasmPerSceneView.destroy()"),this._lyr3DMain&&(this._layers.forEach(e=>{e.abortController.abort()}),this._elevationQueries.forEach((e,i)=>{this._lyr3DMain.cancel_elevation_query(i),e.rejectCallback(n())}),this._elevationQueries.clear(),this._lyr3DMain.uninitialize_lyr3d_wasm(),this._lyr3DMain=null),this._pendingJobCompleted.length=0,this._pendingJobFailed.length=0,this._pendingRenderableCreated.length=0;const e=this._workerHandle;e&&e.destroyWasm().then(()=>{this._workerHandle?.destroy(),this._workerHandle=null}),this._pulseTaskHandle?.remove(),this._pulseTaskHandle=null}get readyToRun(){return this._hasPendingPulseWork()}runTask(e){return this._pulseTask(e),k}_hasPendingPulseWork(){return!!this._lyr3DMain&&(this._cameraDirty||this._cameraElevationDirty||this._pendingJobCompleted.length>0||this._pendingJobFailed.length>0||this._pendingRenderableCreated.length>0||this._elevationQueries.size>0||a(this._layers,e=>this._isUpdating(e)))}addLayerView(e){return this._lyr3DMain?this._addLayerView(e):(this._debugLog(0,1,"Lyr3DWasmPerSceneView.add3DTilesLayerView() called when WASM wasn't initialized"),{wasmLayerId:g})}removeLayerView(e){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),0;this._doRemoveLayerView(e);const i=this._layers.size;return 0===i&&(this._debugLog(0,3,"Lyr3DWasmPerSceneView.remove3DTilesLayerView() no Lyr3D layers left after removing a layer, destroying"),this.destroy()),i}getValidLayerViewCount(){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),0;let e=0;return this._layers.forEach(i=>{i.layerView.wasmLayerId>=0&&++e}),e}setEnabled(e,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const t=this._layers.get(e.wasmLayerId);if(t){this._lyr3DMain.set_enabled(e.wasmLayerId,i),t.needMemoryUsageUpdate=!0;const s=this._isUpdating(t);t.needFrame=!0,s||t.layerView.updatingFlagChanged()}}setLayerOffset(e,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const t=this._layers.get(e.wasmLayerId);t&&(this._lyr3DMain.set_carto_offset_z(e.wasmLayerId,i),t.needFrame=!0,t.layerView.updatingFlagChanged())}getAttributionText(){if(!this._lyr3DMain)return this._debugLog(0,1,this._wasmNotLoaded),[];return this._lyr3DMain.get_current_attribution_text().split("|")}onRenderableEvicted(e,i,t){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);this._layers.get(e.wasmLayerId)&&this._lyr3DMain.on_renderable_evicted(e.wasmLayerId,i,t)}setMeshModifications(e,i){if(!this._lyr3DMain)return void this._debugLog(0,1,this._wasmNotLoaded);const t=this._layers.get(e.wasmLayerId);if(t){const s=this._lyr3DMain._malloc(8*i.length),r=new Float64Array(this._lyr3DMain.HEAPF64.buffer,s,i.length);for(let e=0;e<i.length;++e)r[e]=i[e];this._lyr3DMain.set_mesh_modification_polygons(e.wasmLayerId,s,i.length),this._lyr3DMain._free(s);const a=this._isUpdating(t);t.needFrame=!0,a||t.layerView.updatingFlagChanged()}}isUpdating(e){if(!this._lyr3DMain&&this._lyr3DMainPromise)return!0;const i=this._layers.get(e);return!!i&&(i.outstandingJobCount>0||i.outstandingRenderableCount>0||i.needFrame||this._lyr3DBusyCount>0)}initializeWasm(e,i){return this._lyr3DMain?Promise.resolve():this.view.renderSpatialReference?(this._debugLog(0,3,"Lyr3DWasmPerSceneView.initializeWasm()"),this._lyr3DMainPromise||(this._lyr3DMainPromise=v().then(t=>{this._lyr3DMain=t,this._lyr3DMainPromise=null;const s=this._lyr3DMain.addFunction(this._onNewJob.bind(this),"v"),r=this._lyr3DMain.addFunction(this._onNewRenderable.bind(this),"v"),a=this._lyr3DMain.addFunction(this._freeRenderables.bind(this),"viii"),n=this._lyr3DMain.addFunction(this._setRenderableVisibility.bind(this),"viiii"),o=this._lyr3DMain.addFunction(this._onWasmError.bind(this),"viiii"),l=this._lyr3DMain.addFunction(this._onElevQueryComplete.bind(this),"vi");if(!this.view.renderSpatialReference)return void(this._lyr3DMain=null);this._viewSR=this.view.renderSpatialReference?.toJSON();const d="global"===this.view.viewingMode?5:3;if(5===d)this._viewSR.wkid=this._viewSR.latestWkid=S,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=W;else if(this.view.renderSpatialReference?.isWebMercator)this._viewSR.wkid=this._viewSR.latestWkid=R,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=W;else if(this.view.renderSpatialReference?.wkid===C)this._viewSR.wkid=this._viewSR.latestWkid=S,this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=W;else if(!this._viewSR.latestVcsWkid&&!this._viewSR.vcsWkid){const e=f(this.view.heightModelInfo);if(e)this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=e;else{const e=this.view.heightModelInfo?.heightModel,i=!e||"gravity-related-height"===e;this._viewSR.vcsWkid=this._viewSR.latestVcsWkid=i?W:V}}const h=has("esri-lyr3D-max-concurrent-requests")??16;return this._lyr3DMain.initialize_lyr3d_wasm(o,s,r,a,n,l,e,i,d,this._cleanUpSR(this._makeSRWasmSerializable(this._viewSR)),Math.max(this._debugLevel,0),h)?(this._workerHandle=new b(M(this.view.resourceController)),this._workerHandle.promise?this._workerHandle.promise:void 0):(this._lyr3DMain=null,void this._debugLog(0,0,"Lyr3d Main WASM failed to initialize",!1))}).catch(e=>{this._debugLog(0,0,`Lyr3d WASM failed to download error = ${e}`,!1)})),this._lyr3DMainPromise):Promise.reject()}get isTerrainReady(){return this._isTerrainReady}setLodPixelThreshold(e,i){this._lyr3DMain?.set_lod_pixel_threshold(i);const t=this._layers.get(e.wasmLayerId);t&&(t.needFrame=!0,t.layerView.updatingFlagChanged())}setMaximumGaussianSplatCount(e){this._lyr3DMain.set_maximum_splat_count(e),this._layers.forEach(e=>{"gaussian-splat-3d"===e.layerView.type&&(e.needFrame=!0,e.layerView.updatingFlagChanged())})}queryElevation(e,i,t){if(!this._lyr3DMain)return Promise.reject(this._wasmNotLoaded);if(0===i.coordinates.length)return Promise.reject("no coordinates for elevation query");const s="global"===this.view.viewingMode?y.WGS84:this._viewSR.wkid===R?y.WebMercator:y.PlateCarree,r=i.projectSync(s);r&&(i=r);const a=2*i.coordinates.length,n=this._lyr3DMain._malloc(8*a),o=new Float64Array(this._lyr3DMain.HEAPF64.buffer,n,a);for(let y=0;y<i.coordinates.length;++y){const e=i.coordinates[y];o[2*y]=e.x,o[2*y+1]=e.y}const l=t?.maxGeometricError??0,d=this._lyr3DMain.create_elevation_query(e.wasmLayerId,l,n,a);if(this._lyr3DMain._free(n),d===m)return Promise.reject("max mesh elevation query limit exceeded");if(d===p)return Promise.reject("elevation query failed");const h={descriptor:i,signal:t?.signal,resolveCallback:null,rejectCallback:null},_=new Promise((e,i)=>{h.resolveCallback=e,h.rejectCallback=i});return this._elevationQueries.set(d,h),_}_checkForAbortedElevationQueries(){const e=[];this._elevationQueries.forEach((i,t)=>{o(i.signal)&&(this._lyr3DMain.cancel_elevation_query(t),i.rejectCallback(n()),e.push(t))});for(let i=0;i<e.length;++i)this._elevationQueries.delete(e[i])}_pulseTask(e){const i=this._lyr3DMain;if(i){if(this._cameraDirty){const e=this.view.state?.contentCamera;if(e){const{eye:t,center:s,up:r,near:a,far:n,fovY:o}=e,l=[e.viewport[2],e.viewport[3]],d={eye:t,center:s,up:r,near:a,far:n,fov:o,aspectRatio:e.width/e.height,viewport:l};i.set_camera_parameters(d),this._cameraDirty=!1}}if(this._cameraElevationDirty){const e=this.view.state?.contentCamera.relativeElevation;i.set_camera_elevation(e)}this._checkForAbortedElevationQueries();let t=0,s=0;this._layers.forEach(e=>{t+=e.layerView.usedMemory,s+=e.layerView.cachedMemory}),t/=1048576,s/=1048576;const r=this.view.resourceController.memoryController,a=r.usedMemory*r.maxMemory-t-this._lyr3DInternalMemoryBytes/1048576;this._lyr3DBusyCount=this._lyr3DMain.frame_pulse(r.memoryFactor,t,s,a,r.maxMemory),this._lyr3DInternalMemoryBytes=this._lyr3DMain.get_index_memory_bytes(),this._layers.forEach(e=>{this._cameraElevationDirty||(e.needFrame=!1),e.layerView.updatingFlagChanged()}),this._hasLayerThatReplacesTerrain&&!this._isTerrainReady&&(this._isTerrainReady=this._lyr3DMain.is_terrain_ready(),this._isTerrainReady&&this.notifyChange("isTerrainReady")),this._flushPendingWasmCalls(e),this._cameraElevationDirty=!1}}_isUpdating(e){return e.outstandingJobCount>0||e.outstandingRenderableCount>0||e.needFrame||this._cameraDirty||this._lyr3DBusyCount>0}_incrementJobCount(e,i){if(i.isForElevationQuery)return;const t=this._isUpdating(e);e.outstandingJobCount+=1,t||e.layerView.updatingFlagChanged()}_decrementJobCount(e,i){if(i.isForElevationQuery)return;const t=this._isUpdating(e);e.outstandingJobCount-=1;t!==this._isUpdating(e)&&e.layerView.updatingFlagChanged()}_incrementRenderableCount(e){const i=this._isUpdating(e);e.outstandingRenderableCount+=1,i||e.layerView.updatingFlagChanged()}_decrementRenderableCount(e){const i=this._isUpdating(e);e.outstandingRenderableCount-=1;i!==this._isUpdating(e)&&e.layerView.updatingFlagChanged()}_flushPendingWasmCalls(e){this._lyr3DMain&&(this._flushPendingCalls(this._pendingJobFailed,e),this._flushPendingCalls(this._pendingJobCompleted,e),this._flushPendingCalls(this._pendingRenderableCreated,e))}_flushPendingCalls(e,i){for(;!i.done&&e.length>0;){e.shift()(this._lyr3DMain),i.madeProgress()}}_onJobFailed(e,i,t){i.error.length&&this._debugLog(1,1,i.error,!1),this._lyr3DMain&&!e.layerView.destroyed&&this._pendingJobFailed.push(e=>e.on_job_failed(t.jobId,t.desc)),this._decrementJobCount(e,t)}_onJobSucceeded(e,i,t){if(this._lyr3DMain){if(e.layerView.destroyed)return void this._pendingJobFailed.push(e=>e.on_job_failed(t.jobId,t.desc));const{data:s}=i,r=e=>{const r=s.byteLength,a=e._malloc(r);try{new Uint8Array(e.HEAPU8.buffer,a,r).set(s),e.on_job_completed(t.jobId,i.jobDescJson,a,r)}finally{e._free(a)}};this._pendingJobCompleted.push(r)}this._decrementJobCount(e,t)}_getRequestPromises(e,t,s,r){const a=[];for(const n of e){const e=new URL(n);if("integrated-mesh-3dtiles"===r.type){if(e.origin===s.origin&&e.pathname===s.pathname){if(r.rootTileset){a.push(Promise.resolve(r.rootTileset.slice()));continue}}else r.session&&e.searchParams.set("session",r.session)}a.push(i(e.toString(),t).then(e=>e.data))}return a}_getInitialPromise(e,i,t,s,r,a,n){const o=this._getRequestPromises(e.urls,i,t,s);return Promise.all(o).then(e=>(r.inputs=e,this._workerHandle.invoke(r,a))).then(e=>e).catch(i=>{let t=1;return l(i)?this._debugLog(1,2,`job ${e.jobId} was cancelled.`):n&&400===i.details?.httpStatus?(t=3,this._debugLog(1,2,"Session expired, trying to create new Session.")):this._debugLog(1,1,`job ${e.jobId} failed with error ${i}.`),{status:t,error:"",jobDescJson:"",data:new Uint8Array(0),missingInputUrls:[],inputs:[]}})}async _onNewJob(){const e=this._lyr3DMain.get_next_job(),i=this._layers.get(e.layerId);if(!i)return;this._incrementJobCount(i,e);const t=i.abortController.signal,s=i.layerView.layer,r="integrated-mesh-3dtiles"===s.type?s.key:null,a="integrated-mesh-3dtiles"===s.type?s.session:null,n={responseType:"array-buffer",signal:t,query:{...i.customParameters,token:i.apiKey,key:r}},o={id:e.jobId,inputs:[],jobDescJson:e.desc.slice(),isMissingResourceCase:!1},d=new URL(s.url),h=r=>{if(1===r.status)this._onJobFailed(i,r,e);else if(0===r.status)this._onJobSucceeded(i,r,e);else if(2===r.status){const a=this._getRequestPromises(r.missingInputUrls,n,d,s);Promise.all(a).then(e=>{o.jobDescJson=r.jobDescJson,r.originalInputs?o.inputs=r.originalInputs:o.inputs=[],o.isMissingResourceCase=!0;for(const i of e)o.inputs.push(i);return this._workerHandle.invoke(o,t)}).then(t=>{1===t.status?this._onJobFailed(i,t,e):0===t.status&&this._onJobSucceeded(i,t,e)}).catch(t=>{this._decrementJobCount(i,e),l(t)?this._debugLog(1,2,`job ${e.jobId} was cancelled.`):this._debugLog(1,1,`job ${e.jobId} failed with error ${t}.`),this._lyr3DMain&&this._pendingJobFailed.push(i=>i.on_job_failed(e.jobId,e.desc))})}};try{const i=await this._getInitialPromise(e,n,d,s,o,t,a);if(3===i.status&&"integrated-mesh-3dtiles"===s.type){a===s.session&&null!==s.session&&await s.requestRootAndSession(t);h(await this._getInitialPromise(e,n,d,s,o,t,s.session))}else h(i)}catch(_){_&&this._debugLog(1,1,_.toString(),!1),this._lyr3DMain&&this._pendingJobFailed.push(i=>i.on_job_failed(e.jobId,e.desc)),this._decrementJobCount(i,e)}}_onNewRenderable(){const e=this._lyr3DMain.get_next_renderable(),{meshData:i}=e;i.data&&i.data.byteLength>0&&(i.data=i.data.slice());const t=this._layers.get(e.layerId);t&&(this._incrementRenderableCount(t),t.layerView.createRenderable(e).then(i=>{const s=i.numGaussians??0;if(this._lyr3DMain&&!t.layerView.destroyed){const{layerId:t,handle:r}=e,{memUsageBytes:a}=i;this._pendingRenderableCreated.push(e=>e.on_renderable_created(!0,t,r,a,s))}this._decrementRenderableCount(t)}).catch(i=>{if(l(i)||this._debugLog(2,1,`createRenderable failed with error ${i}.`),this._lyr3DMain&&!t.layerView.destroyed){const{layerId:i,handle:t}=e;this._pendingRenderableCreated.push(e=>e.on_renderable_created(!1,i,t,0,0))}this._decrementRenderableCount(t)}))}_freeRenderables(e,i,t){if(t<1)return;const s=this._layers.get(e);if(!s)return;const r=s.layerView,a=[],n=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,i,t);for(let o=0;o<t;++o)a.push(n[o]);for(let o=0;o<t;++o)r.freeRenderable(a[o])}_setRenderableVisibility(e,i,t,s){if(s<1)return;const r=this._layers.get(e);if(!r)return;const a=r.layerView,n=[],o=[],l=new Uint32Array(this._lyr3DMain.HEAPU32.buffer,i,s),d=new Uint8Array(this._lyr3DMain.HEAPU8.buffer,t,s);for(let h=0;h<s;++h)n.push(l[h]),o.push(!!(1&d[h]));a.setRenderableVisibility(n,o,s)}_onWasmError(e,i,t,s){this._lyr3DMain&&this._debugLog(t,s,this._lyr3DMain.UTF8ToString(e,i),!1)}_onElevQueryComplete(e){const i=this._elevationQueries.get(e),t=this._lyr3DMain.get_elevation_query_result(e);if(i)if(t.succeeded&&t.zs){const s=t.zs.slice(),r=i.descriptor.clone();for(let e=0;e<s.length;++e)r.coordinates[e].z=s[e];this._debugLog(2,3,`Success EQ ${e}, number points ${s.length}.`),i.resolveCallback(r),this._elevationQueries.delete(e)}else i.rejectCallback(new s("elevation-query:error",t?.error??"Elevation query failed")),this._elevationQueries.delete(e);else this._debugLog(2,1,`_onElevQueryComplete called for unknown queryId ${e}.`)}_doRemoveLayerView(e){const i=this._layers.get(e.wasmLayerId);return!!i&&(i.abortController.abort(),this._lyr3DMain.remove_layer(e.wasmLayerId),this._is3DTilesIMLayerView(e)&&e.layer.replacesTerrain&&(this._hasLayerThatReplacesTerrain=!1,this._isTerrainReady=!1,this.notifyChange("isTerrainReady")),this._layers.delete(e.wasmLayerId),!0)}_is3DTilesIMLayerView(e){return"integrated-mesh-3dtiles"===e.layer.type}_isGaussianSplatLayerView(e){return"gaussian-splat"===e.layer.type}_isGaussianSplatLayer(e){return"gaussian-splat"===e.type}_toWasmQuality(e){switch(e){case"low":return 1;case"medium":return 2;case"high":return 3}}_addLayerView(e){const i=e.layer;if(!i.url||!i.rootTilesetJSON)return{wasmLayerId:w};const t="integrated-mesh-3dtiles"===i.type?0:2,s=this._lyr3DMain.validate_root_tileset(JSON.stringify(i.rootTilesetJSON),t);if(0!==s.errorCode)return{wasmLayerId:w,check:s};const a=this._lyr3DMain.get_next_layer_id(),n=new AbortController;this._layers.set(a,{layerView:e,abortController:n,needMemoryUsageUpdate:!1,outstandingJobCount:0,outstandingRenderableCount:0,customParameters:i.customParameters,apiKey:i.apiKey,needFrame:!0});const o=D(i.elevationInfo),l=this._toWasmQuality(this.view?.qualityProfile),d=e=>r.getLogger(this).error("add-spatial-reference-error","Error when adding SR:",e);let h=!1;if(this._isGaussianSplatLayerView(e)&&this._isGaussianSplatLayer(i)){let t=i.spatialReference;if(e.useEsriCrs&&i.esriCrsSpatialReference){t=i.esriCrsSpatialReference;const s=u(t);let r=1,a=1;!s&&t.wkid&&-1!==t.wkid&&(r=c.values[c[t.wkid]],a=e.metersPerVCSUnit),this._workerHandle.addSpatialReferenceInfo(this._cleanUpSR(this._makeSRWasmSerializable(t)),s,r,a).catch(d),t.vcsWkid&&this._viewSR.vcsWkid&&this._viewSR.vcsWkid!==t.vcsWkid&&this._workerHandle.addSpatialReferenceInfo(this._cleanUpSR(this._makeSRWasmSerializable(this._viewSR)),!1,1,1).catch(d)}h=this._lyr3DMain.add_gaussian_splat_layer(l,i.url,a,o)}else this._is3DTilesIMLayerView(e)&&(h=this._lyr3DMain.add_3dtiles_layer(l,i.url,a,o,e.layer.replacesTerrain),h&&e.layer.replacesTerrain&&(this._hasLayerThatReplacesTerrain=!0,this._isTerrainReady=!1,this.notifyChange("isTerrainReady")));return h?(this._updateWasmCamera(),e.updatingFlagChanged(),{wasmLayerId:a}):(this._layers.delete(a),{wasmLayerId:w})}_updateWasmCamera(){const e=this.view.state?.contentCamera;e&&this._lyr3DMain&&(this._cameraDirty=!0,this._markAllLayerViewsUpdating())}_markAllLayerViewsUpdating(){this._layers.forEach(e=>{const i=this._isUpdating(e);e.needFrame=!0,i||e.layerView.updatingFlagChanged()})}_makeSRWasmSerializable(e){return{wkid:e?.wkid??-1,latestWkid:e?.latestWkid??-1,vcsWkid:e?.vcsWkid??-1,latestVcsWkid:e?.latestVcsWkid??-1,wkt:e?.wkt??""}}_cleanUpSR(e){return-1===e?.wkid&&e.latestWkid&&-1!==e.latestWkid?e.wkid=e.latestWkid:-1===e?.latestWkid&&e.wkid&&-1!==e.wkid&&(e.latestWkid=e.wkid),-1===e?.vcsWkid&&e.latestVcsWkid&&-1!==e.latestVcsWkid?e.vcsWkid=e.latestVcsWkid:-1===e?.latestVcsWkid&&e.vcsWkid&&-1!==e.vcsWkid&&(e.latestVcsWkid=e.vcsWkid),e}};e([h({constructOnly:!0})],j.prototype,"view",void 0),e([h({readOnly:!0})],j.prototype,"isTerrainReady",null),j=e([_("esri.layers.Lyr3DWasmPerSceneView")],j);const I=j;export{I as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arcgis/core",
3
- "version": "5.1.0-next.72",
3
+ "version": "5.1.0-next.73",
4
4
  "homepage": "https://js.arcgis.com",
5
5
  "description": "ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API",
6
6
  "keywords": [
@@ -19,7 +19,7 @@
19
19
  "license": "SEE LICENSE IN LICENSE.md",
20
20
  "dependencies": {
21
21
  "@amcharts/amcharts5": "~5.17.1",
22
- "@arcgis/toolkit": "^5.1.0-next.73",
22
+ "@arcgis/toolkit": "^5.1.0-next.76",
23
23
  "@esri/arcgis-html-sanitizer": "~4.1.0",
24
24
  "@esri/calcite-components": "^5.1.0-next.30",
25
25
  "@vaadin/grid": "~25.1.0",
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/5.1/LICENSE.txt */
2
- const b="20260415",c="e4e8ab06cf7d673c0c5194d4b97bf8b34a172204";export{b as buildDate,c as commitHash};
2
+ const c="20260416",a="e792f51d17d07aeae1d71a01c6cc0c06991a4f3b";export{c as buildDate,a as commitHash};
@@ -1841,8 +1841,14 @@ SOFTWARE.
1841
1841
  -----------------------------------------------------------------
1842
1842
 
1843
1843
  langchainjs/
1844
+ langgraphjs/
1845
+ langchain/openai
1846
+ langchain/core
1844
1847
 
1845
- https://github.com/langchain-ai/langchainjs/
1848
+ https://github.com/langchain-ai/langchainjs
1849
+ https://github.com/langchain-ai/langgraphjs
1850
+ https://github.com/langchain-ai/langchainjs/blob/main/libs/providers/langchain-openai
1851
+ https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-core
1846
1852
 
1847
1853
  MIT License
1848
1854
 
@@ -1868,34 +1874,6 @@ SOFTWARE.
1868
1874
 
1869
1875
  -----------------------------------------------------------------
1870
1876
 
1871
- langgraphjs/
1872
-
1873
- https://github.com/langchain-ai/langgraphjs
1874
-
1875
- The MIT License
1876
-
1877
- Copyright (c) 2024 LangChain
1878
-
1879
- Permission is hereby granted, free of charge, to any person obtaining a copy
1880
- of this software and associated documentation files (the "Software"), to deal
1881
- in the Software without restriction, including without limitation the rights
1882
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1883
- copies of the Software, and to permit persons to whom the Software is
1884
- furnished to do so, subject to the following conditions:
1885
-
1886
- The above copyright notice and this permission notice shall be included in
1887
- all copies or substantial portions of the Software.
1888
-
1889
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1890
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1891
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1892
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1893
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1894
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
1895
- THE SOFTWARE.
1896
-
1897
- -----------------------------------------------------------------
1898
-
1899
1877
  zod/
1900
1878
 
1901
1879
  https://github.com/colinhacks/zod