@arcgis/core 4.33.0-next.20250206 → 4.33.0-next.20250207

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 (115) hide show
  1. package/arcade.js +1 -1
  2. package/assets/esri/core/workers/RemoteClient.js +1 -1
  3. package/assets/esri/core/workers/chunks/0a8e388e96af44deeabb.js +1 -0
  4. package/assets/esri/core/workers/chunks/{38cd7745b8ef1b8b6196.js → 12d6baeffd55a98a7c75.js} +1 -1
  5. package/assets/esri/core/workers/chunks/143a193fa3a6e645c8ac.js +1 -0
  6. package/assets/esri/core/workers/chunks/308ec51ff4a66f7fcb0d.js.LICENSE.txt +1 -1
  7. package/assets/esri/core/workers/chunks/{72cf9192292e5c85c6df.js → 32d3657dcae89b740f8b.js} +2 -2
  8. package/assets/esri/core/workers/chunks/{72cf9192292e5c85c6df.js.LICENSE.txt → 32d3657dcae89b740f8b.js.LICENSE.txt} +1 -1
  9. package/assets/esri/core/workers/chunks/354531dc2f0dea2ad96f.js.LICENSE.txt +1 -1
  10. package/assets/esri/core/workers/chunks/35e4af82a08b4eadbfab.js +1 -0
  11. package/assets/esri/core/workers/chunks/369a2b8484a8807bde38.js +1 -0
  12. package/assets/esri/core/workers/chunks/4040158835f9036967cd.js +2 -0
  13. package/assets/esri/core/workers/chunks/{1a2e1a414e651e988435.js.LICENSE.txt → 4040158835f9036967cd.js.LICENSE.txt} +1 -6
  14. package/assets/esri/core/workers/chunks/459af0c3d62c3ed11c19.js +1 -0
  15. package/assets/esri/core/workers/chunks/53810519ff5922b42cd2.js +1 -0
  16. package/assets/esri/core/workers/chunks/{15f850c9a1154fc57e5a.js → 5721557a1d8eab23a55b.js} +1 -1
  17. package/assets/esri/core/workers/chunks/594d923400fd74881833.js +1 -0
  18. package/assets/esri/core/workers/chunks/62a1d60ad4bf6469c4dd.js +1 -0
  19. package/assets/esri/core/workers/chunks/{81aa8cc289fd02ca4da6.js → 7058001bf66f9f3d5d45.js} +1 -1
  20. package/assets/esri/core/workers/chunks/{e8ae8a11d8439e2a66ad.js → 706f867a9034d62a8ef7.js} +1 -1
  21. package/assets/esri/core/workers/chunks/77764ca90bdd13ee2167.js.LICENSE.txt +1 -1
  22. package/assets/esri/core/workers/chunks/{1ab83753d9eec0463461.js → 7b367bb0ed9c218ca595.js} +1 -1
  23. package/assets/esri/core/workers/chunks/8191dd3d7451b2e7b95e.js +1 -0
  24. package/assets/esri/core/workers/chunks/8c32cee395da0a7b9a8e.js +1 -0
  25. package/assets/esri/core/workers/chunks/{48ecc5a74fecbb2b9c6f.js → 8d8f5f08d730270e1165.js} +1 -1
  26. package/assets/esri/core/workers/chunks/94225d92afbdb10dfedb.js +1 -0
  27. package/assets/esri/core/workers/chunks/94490937dca566fe2640.js +1 -0
  28. package/assets/esri/core/workers/chunks/{b9ce0049e27a3e1ed9f9.js → 9b2fab133786e5d47631.js} +1 -1
  29. package/assets/esri/core/workers/chunks/{28374a64790342e1b5ae.js → 9d61590c4d21c7421925.js} +1 -1
  30. package/assets/esri/core/workers/chunks/b21b152fa15896577242.js.LICENSE.txt +1 -1
  31. package/assets/esri/core/workers/chunks/{5a25cef6355fd20e44e7.js → b765670b47d209d7655a.js} +2 -2
  32. package/assets/esri/core/workers/chunks/{5a25cef6355fd20e44e7.js.LICENSE.txt → b765670b47d209d7655a.js.LICENSE.txt} +1 -1
  33. package/assets/esri/core/workers/chunks/d29c3bf29fcd7fa31f1a.js +1 -0
  34. package/assets/esri/core/workers/chunks/d339dee99c4820b63f39.js +1 -0
  35. package/assets/esri/core/workers/chunks/de1f3c4b8000c2d73013.js +1 -0
  36. package/assets/esri/core/workers/chunks/e4b3f2d5c43518b0cde7.js +1 -0
  37. package/assets/esri/core/workers/chunks/e5e3b6d00d27b5bb354f.js +1 -0
  38. package/assets/esri/core/workers/chunks/f14b318bab5efcf43419.js +1 -0
  39. package/assets/esri/core/workers/chunks/{24e47f748f0e4f815c6e.js → f32ca4381e804cc3481e.js} +1 -1
  40. package/assets/esri/core/workers/chunks/f9070edd8e0b2a57af79.js +1 -0
  41. package/assets/esri/themes/base/widgets/_ItemList.scss +6 -0
  42. package/assets/esri/themes/dark/main.css +1 -1
  43. package/assets/esri/themes/light/main.css +1 -1
  44. package/assets/esri/themes/light/view.css +1 -1
  45. package/interfaces.d.ts +58 -56
  46. package/layers/FeatureLayer.js +1 -1
  47. package/layers/SubtypeGroupLayer.js +1 -1
  48. package/layers/WCSLayer.js +1 -1
  49. package/layers/graphics/data/QueryEngineCapabilities.js +1 -1
  50. package/layers/graphics/sources/FeatureLayerSource.js +1 -1
  51. package/layers/graphics/sources/geojson/GeoJSONSourceWorker.js +1 -1
  52. package/layers/graphics/sources/support/MemorySourceWorker.js +1 -1
  53. package/layers/graphics/sources/support/clientSideDefaults.js +1 -1
  54. package/layers/graphics/sources/support/sourceUtils.js +1 -1
  55. package/layers/mixins/BlendLayer.js +1 -1
  56. package/layers/mixins/FeatureLayerBase.js +1 -1
  57. package/layers/mixins/OperationalLayer.js +1 -1
  58. package/layers/mixins/operationalLayerModuleMap.js +1 -1
  59. package/layers/support/SubtypeSublayer.js +1 -1
  60. package/layers/support/arcadeUtils.js +1 -1
  61. package/layers/support/commonProperties.js +1 -1
  62. package/layers/support/layersCreator.js +1 -1
  63. package/package.json +2 -2
  64. package/portal/support/layersLoader.js +1 -1
  65. package/portal/support/loadUtils.js +1 -1
  66. package/rest/imageService.js +1 -1
  67. package/rest/support/ImageSampleParameters.js +1 -1
  68. package/rest/support/ImageSampleResult.js +1 -1
  69. package/rest/support/ImageVolumeResult.js +1 -1
  70. package/support/TablesMixin.js +1 -1
  71. package/support/revision.js +1 -1
  72. package/symbols/cim/cimAnalyzer.js +1 -1
  73. package/symbols/cim/fitVectorMarker.js +5 -0
  74. package/symbols/support/previewCIMSymbol.js +1 -1
  75. package/views/2d/engine/webgl/TextureManager.js +1 -1
  76. package/views/2d/layers/features/schema/SourceSchema.js +1 -1
  77. package/views/2d/layers/features/sources/FeatureSource.js +1 -1
  78. package/views/2d/layers/features/sources/FeatureSourceQueryInfo.js +1 -1
  79. package/views/2d/layers/features/sources/strategies/DrillDownTileLoadStrategy.js +1 -1
  80. package/views/2d/layers/features/sources/strategies/PagedTileLoadStrategy.js +1 -1
  81. package/views/2d/layers/features/sources/strategies/ParquetLoadStrategy.js +1 -1
  82. package/views/2d/layers/features/sources/strategies/SnapshotLoadStrategy.js +1 -1
  83. package/views/2d/layers/features/sources/strategies/StreamLoadStrategy.js +1 -1
  84. package/views/3d/webgl-engine/parts/RenderView.js +1 -1
  85. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  86. package/widgets/Editor/EditorViewModel.js +1 -1
  87. package/widgets/Editor/UpdateWorkflow.js +1 -1
  88. package/widgets/Editor/VisibleElements.js +1 -1
  89. package/widgets/Editor/components/FeatureList.js +1 -1
  90. package/widgets/Editor/components/UpdateFeaturePanelContent.js +1 -1
  91. package/widgets/Editor/workflowUtils.js +1 -1
  92. package/widgets/Editor.js +1 -1
  93. package/widgets/Feature/support/arcadeFeatureUtils.js +1 -1
  94. package/widgets/Sketch.js +1 -1
  95. package/widgets/support/UtilityNetworkAssociations/UtilityNetworkAssociationsViewModel.js +1 -1
  96. package/assets/esri/core/workers/chunks/07bff9e742f3e5877f3f.js +0 -1
  97. package/assets/esri/core/workers/chunks/1a2e1a414e651e988435.js +0 -2
  98. package/assets/esri/core/workers/chunks/287362f9af132fafe4de.js +0 -1
  99. package/assets/esri/core/workers/chunks/2adc533dadcb018a9755.js +0 -1
  100. package/assets/esri/core/workers/chunks/2ea5e5e6c4660a06b516.js +0 -1
  101. package/assets/esri/core/workers/chunks/3984bf01f055fc42bfbf.js +0 -1
  102. package/assets/esri/core/workers/chunks/41cd1a5c99ab3bbd1fb4.js +0 -1
  103. package/assets/esri/core/workers/chunks/5e7f16b312077ca8c18d.js +0 -1
  104. package/assets/esri/core/workers/chunks/6ef2514a6b7bbfb8e37d.js +0 -1
  105. package/assets/esri/core/workers/chunks/82d26884127ed772cc4b.js +0 -1
  106. package/assets/esri/core/workers/chunks/918bdba41fa470cf77fd.js +0 -1
  107. package/assets/esri/core/workers/chunks/91d2bdfa6e34c10b7f50.js +0 -1
  108. package/assets/esri/core/workers/chunks/991e0f619f1f81f94d56.js +0 -1
  109. package/assets/esri/core/workers/chunks/9a27824d94df702e6e28.js +0 -1
  110. package/assets/esri/core/workers/chunks/c1fd87af3129873369fd.js +0 -1
  111. package/assets/esri/core/workers/chunks/c4c2b94e5cee7b824093.js +0 -1
  112. package/assets/esri/core/workers/chunks/c85374360ac5e169af16.js +0 -1
  113. package/assets/esri/core/workers/chunks/c94ec324ecad77c53a87.js +0 -1
  114. package/assets/esri/core/workers/chunks/d175953337fa655dc6b0.js +0 -1
  115. package/assets/esri/core/workers/chunks/e26dc0c1654316bb1558.js +0 -1
package/interfaces.d.ts CHANGED
@@ -2197,11 +2197,13 @@ declare namespace __esri {
2197
2197
  | "labeling"
2198
2198
  | "popup"
2199
2199
  | "popup-element"
2200
- | "feature-reduction-popup"
2201
- | "feature-reduction-popup-element"
2200
+ | "popup-feature-reduction"
2201
+ | "popup-element-feature-reduction"
2202
2202
  | "visualization"
2203
2203
  | "popup-voxel"
2204
- | "popup-element-voxel"): Profile;
2204
+ | "popup-element-voxel"
2205
+ | "feature-reduction-popup"
2206
+ | "feature-reduction-popup-element"): Profile;
2205
2207
  }
2206
2208
 
2207
2209
  export const arcade: arcade;
@@ -8821,7 +8823,7 @@ declare namespace __esri {
8821
8823
  *
8822
8824
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-affineTransformOperator.html#executeMany Read more...}
8823
8825
  */
8824
- executeMany(geometries: any[], transformation: Transformation): GeometryUnion[];
8826
+ executeMany(geometries: GeometryUnion[], transformation: Transformation): GeometryUnion[];
8825
8827
  }
8826
8828
 
8827
8829
  export const affineTransformOperator: affineTransformOperator;
@@ -8938,7 +8940,7 @@ declare namespace __esri {
8938
8940
  *
8939
8941
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-boundaryOperator.html#executeMany Read more...}
8940
8942
  */
8941
- executeMany(geometries: any[]): (any | nullish)[];
8943
+ executeMany(geometries: GeometryUnion[]): (GeometryUnion | nullish)[];
8942
8944
  }
8943
8945
 
8944
8946
  export const boundaryOperator: boundaryOperator;
@@ -8974,7 +8976,7 @@ declare namespace __esri {
8974
8976
  *
8975
8977
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-bufferOperator.html#executeMany Read more...}
8976
8978
  */
8977
- executeMany(geometries: any[], distances: number[], options?: bufferOperatorExecuteManyOptions): Polygon[];
8979
+ executeMany(geometries: GeometryUnion[], distances: number[], options?: bufferOperatorExecuteManyOptions): Polygon[];
8978
8980
  }
8979
8981
 
8980
8982
  export const bufferOperator: bufferOperator;
@@ -9033,7 +9035,7 @@ declare namespace __esri {
9033
9035
  *
9034
9036
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-clipOperator.html#executeMany Read more...}
9035
9037
  */
9036
- executeMany(geometries: any[], extent: Extent): (GeometryUnion | nullish)[];
9038
+ executeMany(geometries: GeometryUnion[], extent: Extent): (GeometryUnion | nullish)[];
9037
9039
  }
9038
9040
 
9039
9041
  export const clipOperator: clipOperator;
@@ -9090,7 +9092,7 @@ declare namespace __esri {
9090
9092
  *
9091
9093
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-convexHullOperator.html#executeMany Read more...}
9092
9094
  */
9093
- executeMany(geometries: any[], options?: convexHullOperatorExecuteManyOptions): (GeometryUnion | nullish)[];
9095
+ executeMany(geometries: GeometryUnion[], options?: convexHullOperatorExecuteManyOptions): (GeometryUnion | nullish)[];
9094
9096
  /**
9095
9097
  * Checks if a geometry is convex.
9096
9098
  *
@@ -9187,7 +9189,7 @@ declare namespace __esri {
9187
9189
  *
9188
9190
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-densifyOperator.html#executeMany Read more...}
9189
9191
  */
9190
- executeMany(geometries: any[], maxSegmentLength: number, options?: densifyOperatorExecuteManyOptions): GeometryUnion[];
9192
+ executeMany(geometries: GeometryUnion[], maxSegmentLength: number, options?: densifyOperatorExecuteManyOptions): GeometryUnion[];
9191
9193
  }
9192
9194
 
9193
9195
  export const densifyOperator: densifyOperator;
@@ -9228,7 +9230,7 @@ declare namespace __esri {
9228
9230
  *
9229
9231
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-differenceOperator.html#executeMany Read more...}
9230
9232
  */
9231
- executeMany(geometries: any[], subtractor: any): (any | nullish)[];
9233
+ executeMany(geometries: GeometryUnion[], subtractor: GeometryUnion): (GeometryUnion | nullish)[];
9232
9234
  }
9233
9235
 
9234
9236
  export const differenceOperator: differenceOperator;
@@ -9379,7 +9381,7 @@ declare namespace __esri {
9379
9381
  *
9380
9382
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-generalizeOperator.html#executeMany Read more...}
9381
9383
  */
9382
- executeMany(geometries: any[], maxDeviation: number, options?: generalizeOperatorExecuteManyOptions): GeometryUnion[];
9384
+ executeMany(geometries: GeometryUnion[], maxDeviation: number, options?: generalizeOperatorExecuteManyOptions): GeometryUnion[];
9383
9385
  }
9384
9386
 
9385
9387
  export const generalizeOperator: generalizeOperator;
@@ -9427,7 +9429,7 @@ declare namespace __esri {
9427
9429
  *
9428
9430
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-geodesicBufferOperator.html#executeMany Read more...}
9429
9431
  */
9430
- executeMany(geometries: any[], distances: number[], options?: geodesicBufferOperatorExecuteManyOptions): Polygon[];
9432
+ executeMany(geometries: GeometryUnion[], distances: number[], options?: geodesicBufferOperatorExecuteManyOptions): Polygon[];
9431
9433
  /**
9432
9434
  * Indicates if all dependencies of this module have been loaded.
9433
9435
  *
@@ -9615,7 +9617,7 @@ declare namespace __esri {
9615
9617
  *
9616
9618
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-geodeticDensifyOperator.html#executeMany Read more...}
9617
9619
  */
9618
- executeMany(geometries: any[], maxSegmentLength: number, options?: geodeticDensifyOperatorExecuteManyOptions): (GeometryUnion | nullish)[];
9620
+ executeMany(geometries: GeometryUnion[], maxSegmentLength: number, options?: geodeticDensifyOperatorExecuteManyOptions): (GeometryUnion | nullish)[];
9619
9621
  /**
9620
9622
  * Indicates if all dependencies of this module have been loaded.
9621
9623
  *
@@ -9744,7 +9746,7 @@ declare namespace __esri {
9744
9746
  *
9745
9747
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-graphicBufferOperator.html#executeMany Read more...}
9746
9748
  */
9747
- executeMany(geometries: any[], distances: number[], joins: "round" | "miter" | "bevel", caps: "round" | "butt" | "square", options?: graphicBufferOperatorExecuteManyOptions): Polygon[];
9749
+ executeMany(geometries: GeometryUnion[], distances: number[], joins: "round" | "miter" | "bevel", caps: "round" | "butt" | "square", options?: graphicBufferOperatorExecuteManyOptions): Polygon[];
9748
9750
  }
9749
9751
 
9750
9752
  export const graphicBufferOperator: graphicBufferOperator;
@@ -9771,7 +9773,7 @@ declare namespace __esri {
9771
9773
  *
9772
9774
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-integrateOperator.html#executeMany Read more...}
9773
9775
  */
9774
- executeMany(geometries: any[]): any[];
9776
+ executeMany(geometries: GeometryUnion[]): GeometryUnion[];
9775
9777
  }
9776
9778
 
9777
9779
  export const integrateOperator: integrateOperator;
@@ -9808,7 +9810,7 @@ declare namespace __esri {
9808
9810
  *
9809
9811
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-intersectionOperator.html#executeMany Read more...}
9810
9812
  */
9811
- executeMany(geometries: any[], intersector: any): any[];
9813
+ executeMany(geometries: GeometryUnion[], intersector: GeometryUnion): GeometryUnion[];
9812
9814
  }
9813
9815
 
9814
9816
  export const intersectionOperator: intersectionOperator;
@@ -9890,7 +9892,7 @@ declare namespace __esri {
9890
9892
  *
9891
9893
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-labelPointOperator.html#executeMany Read more...}
9892
9894
  */
9893
- executeMany(geometries: any[]): Point[];
9895
+ executeMany(geometries: GeometryUnion[]): Point[];
9894
9896
  }
9895
9897
 
9896
9898
  export const labelPointOperator: labelPointOperator;
@@ -9934,7 +9936,7 @@ declare namespace __esri {
9934
9936
  *
9935
9937
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-linesToPolygonsOperator.html#executeMany Read more...}
9936
9938
  */
9937
- executeMany(geometries: any[]): Polygon[];
9939
+ executeMany(geometries: GeometryUnion[]): Polygon[];
9938
9940
  }
9939
9941
 
9940
9942
  export const linesToPolygonsOperator: linesToPolygonsOperator;
@@ -9955,7 +9957,7 @@ declare namespace __esri {
9955
9957
  *
9956
9958
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-locateBetweenOperator.html#executeMany Read more...}
9957
9959
  */
9958
- executeMany(geometries: any[], startM: number, endM: number): (GeometryUnion | nullish)[];
9960
+ executeMany(geometries: GeometryUnion[], startM: number, endM: number): (GeometryUnion | nullish)[];
9959
9961
  }
9960
9962
 
9961
9963
  export const locateBetweenOperator: locateBetweenOperator;
@@ -9984,7 +9986,7 @@ declare namespace __esri {
9984
9986
  *
9985
9987
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-minimumBoundingCircleOperator.html#executeMany Read more...}
9986
9988
  */
9987
- executeMany(geometries: any[], options?: minimumBoundingCircleOperatorExecuteManyOptions): Polygon[];
9989
+ executeMany(geometries: GeometryUnion[], options?: minimumBoundingCircleOperatorExecuteManyOptions): Polygon[];
9988
9990
  }
9989
9991
 
9990
9992
  export const minimumBoundingCircleOperator: minimumBoundingCircleOperator;
@@ -10009,7 +10011,7 @@ declare namespace __esri {
10009
10011
  *
10010
10012
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-multiPartToSinglePartOperator.html#executeMany Read more...}
10011
10013
  */
10012
- executeMany(geometries: any[], options?: multiPartToSinglePartOperatorExecuteManyOptions): GeometryUnion[];
10014
+ executeMany(geometries: GeometryUnion[], options?: multiPartToSinglePartOperatorExecuteManyOptions): GeometryUnion[];
10013
10015
  }
10014
10016
 
10015
10017
  export const multiPartToSinglePartOperator: multiPartToSinglePartOperator;
@@ -10119,7 +10121,7 @@ declare namespace __esri {
10119
10121
  *
10120
10122
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-polygonOverlayOperator.html#executeMany Read more...}
10121
10123
  */
10122
- executeMany(geometries: any[], options?: polygonOverlayOperatorExecuteManyOptions): Polygon[];
10124
+ executeMany(geometries: GeometryUnion[], options?: polygonOverlayOperatorExecuteManyOptions): Polygon[];
10123
10125
  }
10124
10126
 
10125
10127
  export const polygonOverlayOperator: polygonOverlayOperator;
@@ -10209,7 +10211,7 @@ declare namespace __esri {
10209
10211
  *
10210
10212
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#execute Read more...}
10211
10213
  */
10212
- execute(geometry: any, outSpatialReference: SpatialReference, options?: projectOperatorExecuteOptions): any;
10214
+ execute(geometry: GeometryUnion, outSpatialReference: SpatialReference, options?: projectOperatorExecuteOptions): GeometryUnion;
10213
10215
  /**
10214
10216
  * Projects an array of geometries to the specified output spatial reference.
10215
10217
  *
@@ -10221,7 +10223,7 @@ declare namespace __esri {
10221
10223
  *
10222
10224
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-projectOperator.html#executeMany Read more...}
10223
10225
  */
10224
- executeMany(geometries: any[], outSpatialReference: SpatialReference, options?: projectOperatorExecuteManyOptions): any[];
10226
+ executeMany(geometries: GeometryUnion[], outSpatialReference: SpatialReference, options?: projectOperatorExecuteManyOptions): GeometryUnion[];
10225
10227
  /**
10226
10228
  * Indicates if all dependencies of this module have been loaded.
10227
10229
  *
@@ -10391,7 +10393,7 @@ declare namespace __esri {
10391
10393
  *
10392
10394
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-shapePreservingProjectOperator.html#execute Read more...}
10393
10395
  */
10394
- execute(geometry: any, outSpatialReference: SpatialReference, options?: shapePreservingProjectOperatorExecuteOptions): any;
10396
+ execute(geometry: GeometryUnion, outSpatialReference: SpatialReference, options?: shapePreservingProjectOperatorExecuteOptions): GeometryUnion;
10395
10397
  /**
10396
10398
  * Performs the shape preserving project operation on multiple geometries.
10397
10399
  *
@@ -10405,7 +10407,7 @@ declare namespace __esri {
10405
10407
  *
10406
10408
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-shapePreservingProjectOperator.html#executeMany Read more...}
10407
10409
  */
10408
- executeMany(geometries: any[], outSpatialReference: SpatialReference, options?: shapePreservingProjectOperatorExecuteManyOptions): any[];
10410
+ executeMany(geometries: GeometryUnion[], outSpatialReference: SpatialReference, options?: shapePreservingProjectOperatorExecuteManyOptions): GeometryUnion[];
10409
10411
  /**
10410
10412
  * Indicates if all dependencies of this module have been loaded.
10411
10413
  *
@@ -10458,7 +10460,7 @@ declare namespace __esri {
10458
10460
  *
10459
10461
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-geometry-operators-simplifyOperator.html#executeMany Read more...}
10460
10462
  */
10461
- executeMany(geometries: any[]): (any | nullish)[];
10463
+ executeMany(geometries: GeometryUnion[]): (GeometryUnion | nullish)[];
10462
10464
  /**
10463
10465
  * Indicates if the given geometry is topologically simple.
10464
10466
  *
@@ -31517,8 +31519,8 @@ declare namespace __esri {
31517
31519
  | "labeling"
31518
31520
  | "popup"
31519
31521
  | "popup-element"
31520
- | "feature-reduction-popup"
31521
- | "feature-reduction-popup-element"
31522
+ | "popup-feature-reduction"
31523
+ | "popup-element-feature-reduction"
31522
31524
  | "visualization"
31523
31525
  | "popup-voxel"
31524
31526
  | "popup-element-voxel";
@@ -70407,8 +70409,8 @@ declare namespace __esri {
70407
70409
  *
70408
70410
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageIdentifyParameters.html#mosaicRule Read more...}
70409
70411
  */
70410
- get mosaicRule(): MosaicRule;
70411
- set mosaicRule(value: MosaicRuleProperties);
70412
+ get mosaicRule(): MosaicRule | nullish;
70413
+ set mosaicRule(value: MosaicRuleProperties | nullish);
70412
70414
  /**
70413
70415
  * Specifies the pixel level being identified on the x and y axis.
70414
70416
  *
@@ -70476,7 +70478,7 @@ declare namespace __esri {
70476
70478
  *
70477
70479
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageIdentifyParameters.html#mosaicRule Read more...}
70478
70480
  */
70479
- mosaicRule?: MosaicRuleProperties;
70481
+ mosaicRule?: MosaicRuleProperties | nullish;
70480
70482
  /**
70481
70483
  * Specifies the pixel level being identified on the x and y axis.
70482
70484
  *
@@ -70595,8 +70597,8 @@ declare namespace __esri {
70595
70597
  *
70596
70598
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageIdentifyResult.html#location Read more...}
70597
70599
  */
70598
- get location(): Point | nullish;
70599
- set location(value: PointProperties | nullish);
70600
+ get location(): Point;
70601
+ set location(value: PointProperties);
70600
70602
  /**
70601
70603
  * Converts an instance of this class to its [ArcGIS portal JSON](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm) representation.
70602
70604
  *
@@ -70633,7 +70635,7 @@ declare namespace __esri {
70633
70635
  *
70634
70636
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageIdentifyResult.html#location Read more...}
70635
70637
  */
70636
- location?: PointProperties | nullish;
70638
+ location?: PointProperties;
70637
70639
  /**
70638
70640
  * The identify property name.
70639
70641
  *
@@ -71023,8 +71025,8 @@ declare namespace __esri {
71023
71025
  *
71024
71026
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImagePixelLocationParameters.html#geometries Read more...}
71025
71027
  */
71026
- get geometries(): Point[] | nullish;
71027
- set geometries(value: PointProperties[] | nullish);
71028
+ get geometries(): Point[];
71029
+ set geometries(value: PointProperties[]);
71028
71030
  /**
71029
71031
  * Converts an instance of this class to its [ArcGIS portal JSON](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm) representation.
71030
71032
  *
@@ -71049,7 +71051,7 @@ declare namespace __esri {
71049
71051
  *
71050
71052
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImagePixelLocationParameters.html#geometries Read more...}
71051
71053
  */
71052
- geometries?: PointProperties[] | nullish;
71054
+ geometries?: PointProperties[];
71053
71055
  /**
71054
71056
  * The rasterId of a raster catalog in the image service.
71055
71057
  *
@@ -71196,7 +71198,7 @@ declare namespace __esri {
71196
71198
  *
71197
71199
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageSample.html#locationId Read more...}
71198
71200
  */
71199
- locationId: number | nullish;
71201
+ locationId: number;
71200
71202
  /**
71201
71203
  * The pixel value associated with the sampled location.
71202
71204
  *
@@ -71214,7 +71216,7 @@ declare namespace __esri {
71214
71216
  *
71215
71217
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageSample.html#resolution Read more...}
71216
71218
  */
71217
- resolution: number | nullish;
71219
+ resolution: number;
71218
71220
  /**
71219
71221
  * The {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#getSamples getSamples}
71220
71222
  * method on {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html ImageryLayer} returns
@@ -71228,8 +71230,8 @@ declare namespace __esri {
71228
71230
  *
71229
71231
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageSample.html#location Read more...}
71230
71232
  */
71231
- get location(): Point | nullish;
71232
- set location(value: PointProperties | nullish);
71233
+ get location(): Point;
71234
+ set location(value: PointProperties);
71233
71235
  /**
71234
71236
  * Converts an instance of this class to its [ArcGIS portal JSON](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm) representation.
71235
71237
  *
@@ -71260,13 +71262,13 @@ declare namespace __esri {
71260
71262
  *
71261
71263
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageSample.html#location Read more...}
71262
71264
  */
71263
- location?: PointProperties | nullish;
71265
+ location?: PointProperties;
71264
71266
  /**
71265
71267
  * The location id.
71266
71268
  *
71267
71269
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageSample.html#locationId Read more...}
71268
71270
  */
71269
- locationId?: number | nullish;
71271
+ locationId?: number;
71270
71272
  /**
71271
71273
  * The pixel value associated with the sampled location.
71272
71274
  *
@@ -71284,7 +71286,7 @@ declare namespace __esri {
71284
71286
  *
71285
71287
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageSample.html#resolution Read more...}
71286
71288
  */
71287
- resolution?: number | nullish;
71289
+ resolution?: number;
71288
71290
  }
71289
71291
 
71290
71292
  export interface ImageSampleParameters extends Accessor, JSONSupport {
@@ -71358,8 +71360,8 @@ declare namespace __esri {
71358
71360
  *
71359
71361
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageSampleParameters.html#locations Read more...}
71360
71362
  */
71361
- get locations(): Point[];
71362
- set locations(value: PointProperties[]);
71363
+ get locations(): Point[] | nullish;
71364
+ set locations(value: PointProperties[] | nullish);
71363
71365
  /**
71364
71366
  * Specifies the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-MosaicRule.html mosaic rule} defining the image sort order and selection.
71365
71367
  *
@@ -71422,7 +71424,7 @@ declare namespace __esri {
71422
71424
  *
71423
71425
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageSampleParameters.html#locations Read more...}
71424
71426
  */
71425
- locations?: PointProperties[];
71427
+ locations?: PointProperties[] | nullish;
71426
71428
  /**
71427
71429
  * Specifies the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-support-MosaicRule.html mosaic rule} defining the image sort order and selection.
71428
71430
  *
@@ -71491,8 +71493,8 @@ declare namespace __esri {
71491
71493
  *
71492
71494
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageSampleResult.html#samples Read more...}
71493
71495
  */
71494
- get samples(): ImageSample[] | nullish;
71495
- set samples(value: ImageSampleProperties[] | nullish);
71496
+ get samples(): ImageSample[];
71497
+ set samples(value: ImageSampleProperties[]);
71496
71498
  /**
71497
71499
  * Converts an instance of this class to its [ArcGIS portal JSON](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm) representation.
71498
71500
  *
@@ -71517,7 +71519,7 @@ declare namespace __esri {
71517
71519
  *
71518
71520
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageSampleResult.html#samples Read more...}
71519
71521
  */
71520
- samples?: ImageSampleProperties[] | nullish;
71522
+ samples?: ImageSampleProperties[];
71521
71523
  }
71522
71524
 
71523
71525
  export class ImageToMapMultirayParameters extends JSONSupport {
@@ -71526,7 +71528,7 @@ declare namespace __esri {
71526
71528
  *
71527
71529
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageToMapMultirayParameters.html#rasterIds Read more...}
71528
71530
  */
71529
- rasterIds: number[] | nullish;
71531
+ rasterIds: number[];
71530
71532
  /**
71531
71533
  * Input parameters for the {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-layers-ImageryLayer.html#imageToMapMultiray ImageryLayer.imageToMapMultiray()}
71532
71534
  * or {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-imageService.html#imageToMapMultiray imageService.imageToMapMultiray()} methods.
@@ -71598,7 +71600,7 @@ declare namespace __esri {
71598
71600
  *
71599
71601
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageToMapMultirayParameters.html#rasterIds Read more...}
71600
71602
  */
71601
- rasterIds?: number[] | nullish;
71603
+ rasterIds?: number[];
71602
71604
  }
71603
71605
 
71604
71606
  export class ImageToMapParameters extends JSONSupport {
@@ -72064,8 +72066,8 @@ declare namespace __esri {
72064
72066
  *
72065
72067
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageVolumeResult.html#volumes Read more...}
72066
72068
  */
72067
- get volumes(): ImageVolume[] | nullish;
72068
- set volumes(value: ImageVolumeProperties[] | nullish);
72069
+ get volumes(): ImageVolume[];
72070
+ set volumes(value: ImageVolumeProperties[]);
72069
72071
  /**
72070
72072
  * Converts an instance of this class to its [ArcGIS portal JSON](https://developers.arcgis.com/documentation/common-data-types/geometry-objects.htm) representation.
72071
72073
  *
@@ -72090,7 +72092,7 @@ declare namespace __esri {
72090
72092
  *
72091
72093
  * {@link https://developers.arcgis.com/javascript/latest/api-reference/esri-rest-support-ImageVolumeResult.html#volumes Read more...}
72092
72094
  */
72093
- volumes?: ImageVolumeProperties[] | nullish;
72095
+ volumes?: ImageVolumeProperties[];
72094
72096
  }
72095
72097
 
72096
72098
  export interface JobInfo extends Accessor, JSONSupport {
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import t from"../PopupTemplate.js";import r from"../request.js";import i from"../core/Clonable.js";import o from"../core/Collection.js";import s from"../core/Error.js";import{clone as a}from"../core/lang.js";import n from"../core/Logger.js";import{MultiOriginJSONMixin as l}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as p}from"../core/object.js";import{debounce as u,throwIfAbortError as d,whenOrAbort as y}from"../core/promiseUtils.js";import{sqlAnd as c}from"../core/sql.js";import{urlToObject as m,join as f}from"../core/urlUtils.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import{cast as b}from"../core/accessorSupport/decorators/cast.js";import{reader as g}from"../core/accessorSupport/decorators/reader.js";import{subclass as w}from"../core/accessorSupport/decorators/subclass.js";import{writer as v}from"../core/accessorSupport/decorators/writer.js";import{excludeTables as j}from"../core/accessorSupport/layerContainerType.js";import S from"../form/FormTemplate.js";import F from"../geometry/SpatialReference.js";import T from"./Layer.js";import{MemorySource as I}from"./graphics/sources/MemorySource.js";import{APIKeyMixin as E}from"./mixins/APIKeyMixin.js";import{ArcGISService as D}from"./mixins/ArcGISService.js";import{BlendLayer as L}from"./mixins/BlendLayer.js";import{CustomParametersMixin as x}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as _}from"./mixins/DisplayFilteredLayer.js";import{EditBusLayer as P}from"./mixins/EditBusLayer.js";import{FeatureEffectLayer as M}from"./mixins/FeatureEffectLayer.js";import{FeatureLayerBase as q}from"./mixins/FeatureLayerBase.js";import{FeatureReductionLayer as C}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as O}from"./mixins/OperationalLayer.js";import{OrderedLayer as A}from"./mixins/OrderedLayer.js";import{PortalLayer as V}from"./mixins/PortalLayer.js";import{PublishableLayer as Q}from"./mixins/PublishableLayer.js";import{RefreshableLayer as R}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as U}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as B}from"./mixins/TemporalLayer.js";import{TrackableLayer as N}from"./mixins/TrackableLayer.js";import{titleFromUrlAndName as $,parse as G,cleanTitle as J}from"./support/arcgisLayerUrl.js";import{attributeTableTemplate as W,id as Z,labelsVisible as k,opacityDrawingInfo as z,legendEnabled as H,listMode as K,popupEnabled as X,screenSizePerspectiveEnabled as Y}from"./support/commonProperties.js";import{ensureLayerCredential as ee,computeEffectiveEditingEnabled as te,readGlobalIdField as re,readObjectIdField as ie,createDefaultRenderer as oe,addAttachment as se,updateAttachment as ae,applyEdits as ne,uploadAssets as le,createQuery as pe,deleteAttachments as ue,fetchRecomputedExtents as de,getFeatureType as ye,computeDomainFromSubtypes as ce,getFeatureSubtype as me,computeDomainFromTypes as fe,queryAttachments as he,queryObjectIds as be,queryFeatureCount as ge,queryExtent as we,queryRelatedFeatures as ve,queryRelatedFeaturesCount as je,validateBinsQuery as Se,hasDataChanged as Fe,geometryTypeKebabDict as Te}from"./support/featureLayerUtils.js";import Ie from"./support/FeatureTemplate.js";import Ee from"./support/FeatureType.js";import{defineFieldProperties as De}from"./support/fieldProperties.js";import{fixRendererFields as Le,fixTimeInfoFields as xe}from"./support/fieldUtils.js";import _e from"./support/LabelClass.js";import{reader as Pe}from"./support/labelingInfo.js";import{getFeatureLayerCapabilities as Me}from"./support/serviceCapabilitiesUtils.js";import qe from"./support/TimeInfo.js";import{serviceSupportsSpatialReference as Ce}from"./support/versionUtils.js";import{DataLayerSource as Oe}from"./support/source/DataLayerSource.js";import{read as Ae}from"../renderers/support/jsonUtils.js";import{loadStyleRenderer as Ve}from"../renderers/support/styleUtils.js";import{rendererTypes as Qe,webSceneRendererTypes as Re}from"../renderers/support/typeUtils.js";import Ue from"../rest/support/FeatureSet.js";import Be from"../rest/support/Query.js";import{isNumber as Ne}from"../support/guards.js";import{createPopupTemplate as $e}from"../support/popupUtils.js";import{symbolTypes as Ge}from"../symbols/support/typeUtils.js";import{SaveOperationType as Je}from"../webdoc/interfaces.js";import{opacityToTransparency as We}from"../webdoc/support/opacityUtils.js";const Ze="FeatureLayer";function ke(e,t){return new s("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function ze(e){return e&&e instanceof o}const He=De();function Ke(e,t,r){const i=!!r?.writeLayerSchema;return{enabled:i,ignoreOrigin:i}}let Xe=class extends(q(C(M(Q(P(_(L(A(B(N(U(R(D(O(V(l(x(E(i.ClonableMixin(T)))))))))))))))))))){constructor(...e){super(...e),this.attributeTableTemplate=null,this.charts=null,this.copyright=null,this.displayField=null,this.dynamicDataSource=null,this.fields=null,this.fieldsIndex=null,this.formTemplate=null,this.fullExtent=null,this.geometryType=null,this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.resourceInfo=null,this.screenSizePerspectiveEnabled=!0,this.spatialReference=F.WGS84,this.subtypeCode=null,this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.type="feature",this.typeIdField=null,this.types=null,this.visible=!0,this._debouncedSaveOperations=u((async(e,t,r)=>{const{save:i,saveAs:o}=await import("./save/featureLayerUtils.js");switch(e){case Je.SAVE:return i(this,t);case Je.SAVE_AS:return o(this,r,t)}}))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then((e=>this.initLayerProperties(e)))),Promise.resolve(this);const r=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},e).catch(d).then((async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new s("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.initLayerProperties(await this.createGraphicsSource(t))})).then((()=>ee(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}readCapabilities(e,t){return t=t.layerDefinition||t,Me(t,this.url)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return!(this.loaded&&!this.capabilities?.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,r){return this._readEditingEnabled(t,!0,r)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,r,i){this._writeEditingEnabled(e,t,!0,i)}get effectiveEditingEnabled(){return te(this)}readIsTable(e,t){return"Table"===(t=t?.layerDefinition??t).type||!t.geometryType}writeIsTable(e,t,r,i){i?.writeLayerSchema&&p(r,e?"Table":"Feature Layer",t)}readGlobalIdField(e,t){return re(t.layerDefinition||t)}readObjectIdField(e,t){return ie(t.layerDefinition||t)}get parsedUrl(){const e=m(this.url);return null!=e&&(null!=this.dynamicDataSource?e.path=f(e.path,"dynamicLayer"):null!=this.layerId&&(e.path=f(e.path,this.layerId.toString()))),e}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){Le(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){t=t.layerDefinition||t;const i=t.drawingInfo?.renderer;if(i){const e=Ae(i,t,r)??void 0;return e||n.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),e}return oe(t,r)}set source(e){const t=this._get("source");t!==e&&(ze(t)&&this._resetMemorySource(t),ze(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof o?new I({layer:this,items:e}):e:null}readSource(e,t){const r=Ue.fromJSON(t.featureSet);return new I({layer:this,items:r?.features??[]})}readTemplates(e,t){const r=t.editFieldsInfo,i=r?.creatorField,o=r?.editorField;return e=e?.map((e=>Ie.fromJSON(e))),this._fixTemplates(e,i),this._fixTemplates(e,o),e}readTitle(e,t){const r=t.layerDefinition?.name??t.name,i=t.title||t.layerDefinition?.title;if(r){const e=this.portalItem?.title;if("item-title"===this.sublayerTitleMode)return this.url?$(this.url,r):r;let t=r;if(!t&&this.url){const e=G(this.url);null!=e&&(t=e.title)}if(!t)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==t&&(t=e+" - "+t),J(t)}if("item-title"===this.sublayerTitleMode&&i)return i}readTitleFromWebMap(e,t){return t.title||t.layerDefinition?.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}readTypes(e,t){e=(t=t.layerDefinition||t).types;const r=t.editFieldsInfo,i=r?.creatorField,o=r?.editorField;return e?.map((e=>(e=Ee.fromJSON(e),this._fixTemplates(e.templates,i),this._fixTemplates(e.templates,o),e)))}readVisible(e,t){return null!=t.layerDefinition?.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}async addAttachment(e,t){const r=await se(this,e,t,Ze);return this.lastEditsEventDate=new Date,r}async updateAttachment(e,t,r){const i=await ae(this,e,t,r,Ze);return this.lastEditsEventDate=new Date,i}async applyEdits(e,t){return ne(this,e,t)}async uploadAssets(e,t){return le(this,e,t)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return $e(this,e)}async createGraphicsSource(e){if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:t}=await y(import("./graphics/sources/FeatureLayerSource.js"),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=pe(this);e.dynamicDataSource=this.dynamicDataSource;const t=null!=this.subtypeCode?`${this.subtypeField} = ${this.subtypeCode}`:null,r=c(this.definitionExpression,t);return e.where=r||"1=1",e}async deleteAttachments(e,t){const r=await ue(this,e,t,Ze);return this.lastEditsEventDate=new Date,r}async fetchRecomputedExtents(e){return de(this,e,Ze)}getFeatureType(e){return ye(this.types,this.typeIdField,e)}getFieldDomain(e,t){const r=t?.feature,i=!!this.subtypes?.length;if(i&&!t?.excludeImpliedDomains){const t=ce(this,e);if(t)return t}const o=i&&me(this,r);if(o){const t=o?.domains?.[e];return"inherited"===t?.type?this._getLayerDomain(e):t}const s=this.getFeatureType(r),a=this._getLayerDomain(e);if(s){const t=s.domains&&s.domains[e];if(t&&"inherited"!==t?.type)return t}if(a)return a;if(!t?.excludeImpliedDomains){const t=fe(this,e);if(t)return t}return null}async queryAttachments(e,t){return he(this,e,t,Ze)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(Be.from(e)??r.createQuery(),t);if(i?.features)for(const o of i.features)o.layer=o.sourceLayer=r;return i}async queryObjectIds(e,t){return(await be(this,e,t,Ze)).filter(Ne)}async queryFeatureCount(e,t){return ge(this,e,t,Ze)}async queryExtent(e,t){return we(this,e,t,Ze)}async queryRelatedFeatures(e,t){return ve(this,e,t,Ze)}async queryRelatedFeaturesCount(e,t){return je(this,e,t,Ze)}async queryTopFeatures(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopFeatures||!i?.query?.supportsTopFeaturesQuery)throw new s(Ze,"Layer source does not support queryTopFeatures capability");const o=await import("../rest/support/TopFeaturesQuery.js"),a=await r.queryTopFeatures(o.default.from(e),t);if(a?.features)for(const s of a.features)s.layer=s.sourceLayer=this;return a}async queryAttributeBins(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryAttributeBins||!i?.operations?.supportsQueryBins)throw new s(Ze,"Layer source does not support queryAttributeBins capability");Se(e,i,Ze);const o=await import("../rest/support/AttributeBinsQuery.js"),a=await r.queryAttributeBins(o.default.from(e),t);if(a.features)for(const s of a.features)s.layer=s.sourceLayer=this;return a}async queryTopObjectIds(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopObjectIds||!i?.query.supportsTopFeaturesQuery)throw new s(Ze,"Layer source does not support queryTopObjectIds capability");const o=await import("../rest/support/TopFeaturesQuery.js");return(await r.queryTopObjectIds(o.default.from(e),t)).filter(Ne)}async queryTopFeaturesExtent(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopExtents||!i?.query?.supportsTopFeaturesQuery)throw new s(Ze,"Layer source does not support queryTopExtents capability");const o=await import("../rest/support/TopFeaturesQuery.js");return r.queryTopExtents(o.default.from(e),t)}async queryTopFeatureCount(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopCount||!i?.query?.supportsTopFeaturesQuery)throw new s(Ze,"Layer source does not support queryFeatureCount capability");const o=await import("../rest/support/TopFeaturesQuery.js");return r.queryTopCount(o.default.from(e),t)}read(e,t){const r=e.featureCollection;if((r||"Feature Collection"===e.type)&&(this.resourceInfo=e),r){const e=r.layers;e&&1===e.length&&(super.read(e[0],t),null!=r.showLegend&&super.read({showLegend:r.showLegend},t))}super.read(e,t),t&&"service"===t.origin&&(this.revert(["objectIdField","fields","timeInfo","dateFieldsTimeZone"],"service"),this.spatialReference||this.revert(["spatialReference"],"service"))}write(e,t){t={...t,origin:t?.origin??void 0,writeLayerSchema:t?.writeLayerSchema??this._hasMemorySource()};const{origin:r,layerContainerType:i,messages:o}=t;if(this.dynamicDataSource)return o?.push(ke(this,"using a dynamic data source cannot be written to web scenes, web maps and feature service items")),null;if(this.isTable){if(("web-map"===r||"web-scene"===r)&&"tables"!==i)return o?.push(ke(this,`a table source can only be written to tables, not ${i}`)),null;if(this._hasMemorySource())return o?.push(ke(this,"using an in-memory table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&("web-map"===r||"web-scene"===r)&&"tables"===i)return o?.push(ke(this,"using a non-table source cannot be written to tables in web maps or web scenes")),null;return super.write(e,t)}clone(){if(this._hasMemorySource())throw new s(Ze,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source?.type||Ce(this,e))}async save(e){return this._debouncedSaveOperations(Je.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Je.SAVE_AS,t,e)}_readEditingEnabled(e,t,r){let i=e.layerDefinition?.capabilities;return i?this._hasEditingCapability(i):(i=e.capabilities,t&&"web-map"===r?.origin&&!this._hasMemorySource()&&i?this._hasEditingCapability(i):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map((e=>e.trim())).includes("editing")}_writeEditingEnabled(e,t,r,i){if(!e){const e=this.capabilities?.operations?.supportsSync?"Query,Sync":"Query";p("layerDefinition.capabilities",e,t),r&&!i?.writeLayerSchema&&(t.capabilities=e)}}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}_fetchFirstValidLayerId(e){return r(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then((e=>{const t=e.data;if(t)return this.findFirstValidLayerId(t)}))}async initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),this._verifyFields(),Le(this.renderer,this.fieldsIndex),xe(this.timeInfo,this.fieldsIndex),this._hasMemorySource()&&"mesh"===this.geometryType&&(this.capabilities.query.supportsReturnMesh=!0),Ve(this,{origin:"service"})}async hasDataChanged(){return Fe(this)}async fetchPublishingStatus(){const e=this.source;return e?.fetchPublishingStatus?e.fetchPublishingStatus():"unavailable"}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,t){e&&e.forEach((e=>{const r=e.prototype?.attributes;r&&t&&delete r[t]}))}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new s("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new s("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach((e=>{e.layer=this,e.sourceLayer=this})),this.addHandles([e.on("after-add",(e=>{e.item.layer=this,e.item.sourceLayer=this})),e.on("after-remove",(e=>{e.item.layer=null,e.item.sourceLayer=null}))],"fl-source")}_resetMemorySource(e){e.forEach((e=>{e.layer=null,e.sourceLayer=null})),this.removeHandles("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}findFirstValidLayerId(e){return Array.isArray(e.layers)&&e.layers.length>0?e.layers[0].id:Array.isArray(e.tables)&&e.tables.length>0?e.tables[0].id:void 0}};e([h(W)],Xe.prototype,"attributeTableTemplate",void 0),e([g("service","capabilities")],Xe.prototype,"readCapabilities",null),e([h({json:{origins:{"web-scene":{write:!1}},write:!0}})],Xe.prototype,"charts",void 0),e([h({readOnly:!0})],Xe.prototype,"createQueryVersion",null),e([h({json:{read:{source:"layerDefinition.copyrightText"}}})],Xe.prototype,"copyright",void 0),e([h({json:{read:{source:"layerDefinition.displayField"}}})],Xe.prototype,"displayField",void 0),e([h({types:Ge,readOnly:!0})],Xe.prototype,"defaultSymbol",void 0),e([h({type:Oe})],Xe.prototype,"dynamicDataSource",void 0),e([h({type:Boolean})],Xe.prototype,"editingEnabled",null),e([g(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],Xe.prototype,"readEditingEnabled",null),e([g("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],Xe.prototype,"readEditingEnabledFromWebMap",null),e([v(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],Xe.prototype,"writeEditingEnabled",null),e([v("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],Xe.prototype,"writeEditingEnabledToWebMap",null),e([h({readOnly:!0})],Xe.prototype,"effectiveEditingEnabled",null),e([h({...He.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:Ke}}}}})],Xe.prototype,"fields",void 0),e([h(He.fieldsIndex)],Xe.prototype,"fieldsIndex",void 0),e([h({type:S,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],Xe.prototype,"formTemplate",void 0),e([h({json:{read:{source:"layerDefinition.extent"}}})],Xe.prototype,"fullExtent",void 0),e([h({json:{origins:{"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:Ke,writer(e,t,r){const i=e?Te.toJSON(e):null;i&&p(r,i,t)}}}},read:{source:"layerDefinition.geometryType",reader:Te.read}}})],Xe.prototype,"geometryType",void 0),e([h({json:{read:{source:"layerDefinition.hasM"}}})],Xe.prototype,"hasM",void 0),e([h({json:{read:{source:"layerDefinition.hasZ"}}})],Xe.prototype,"hasZ",void 0),e([h(Z)],Xe.prototype,"id",void 0),e([h({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Xe.prototype,"infoFor3D",void 0),e([h({json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],Xe.prototype,"isTable",void 0),e([g("service","isTable",["type","geometryType"]),g("isTable",["layerDefinition.type","layerDefinition.geometryType"])],Xe.prototype,"readIsTable",null),e([v("web-map","isTable")],Xe.prototype,"writeIsTable",null),e([h(k)],Xe.prototype,"labelsVisible",void 0),e([h({type:[_e],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:Pe,write:!1},"web-scene":{name:"layerDefinition.drawingInfo.labelingInfo",read:Pe,write:{enabled:!0,layerContainerTypes:j}}},name:"layerDefinition.drawingInfo.labelingInfo",read:Pe,write:!0}})],Xe.prototype,"labelingInfo",void 0),e([h((()=>{const e=a(z);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,t,r){p(r,We(e),t)}}},e})())],Xe.prototype,"opacity",void 0),e([h(H)],Xe.prototype,"legendEnabled",void 0),e([h({type:["show","hide"],json:(()=>{const e=a(K.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],Xe.prototype,"listMode",void 0),e([g("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],Xe.prototype,"readGlobalIdField",null),e([h({json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:Ke}}}}})],Xe.prototype,"objectIdField",void 0),e([g("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],Xe.prototype,"readObjectIdField",null),e([h({value:"ArcGISFeatureLayer",type:["ArcGISFeatureLayer"]})],Xe.prototype,"operationalLayerType",void 0),e([h(He.outFields)],Xe.prototype,"outFields",void 0),e([h({readOnly:!0})],Xe.prototype,"parsedUrl",null),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Xe.prototype,"path",void 0),e([h(X)],Xe.prototype,"popupEnabled",void 0),e([h({type:t,json:{name:"popupInfo",write:!0}})],Xe.prototype,"popupTemplate",void 0),e([h({readOnly:!0})],Xe.prototype,"defaultPopupTemplate",null),e([h({types:Qe,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:Re,name:"layerDefinition.drawingInfo.renderer",write:{layerContainerTypes:j,overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema})}}})],Xe.prototype,"renderer",null),e([g("service","renderer",["drawingInfo.renderer","defaultSymbol"]),g("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],Xe.prototype,"readRenderer",null),e([h()],Xe.prototype,"resourceInfo",void 0),e([h((()=>{const e=a(Y);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],Xe.prototype,"screenSizePerspectiveEnabled",void 0),e([h({clonable:!1})],Xe.prototype,"source",null),e([b("source")],Xe.prototype,"castSource",null),e([g("portal-item","source",["featureSet"]),g("web-map","source",["featureSet"])],Xe.prototype,"readSource",null),e([h({json:{read:{source:"layerDefinition.extent.spatialReference"}}})],Xe.prototype,"spatialReference",void 0),e([h({type:Number})],Xe.prototype,"subtypeCode",void 0),e([h({type:[Ie]})],Xe.prototype,"templates",void 0),e([g("templates",["editFieldsInfo","creatorField","editorField","templates"])],Xe.prototype,"readTemplates",null),e([h({type:qe})],Xe.prototype,"timeInfo",void 0),e([h()],Xe.prototype,"title",void 0),e([g("service","title",["name"]),g("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],Xe.prototype,"readTitle",null),e([g("web-map","title",["layerDefinition.name","title"])],Xe.prototype,"readTitleFromWebMap",null),e([h({type:String})],Xe.prototype,"sublayerTitleMode",void 0),e([h({json:{read:!1}})],Xe.prototype,"type",void 0),e([h({type:String})],Xe.prototype,"typeIdField",void 0),e([g("service","typeIdField"),g("typeIdField",["layerDefinition.typeIdField"])],Xe.prototype,"readTypeIdField",null),e([h({type:[Ee]})],Xe.prototype,"types",void 0),e([g("service","types",["types"]),g("types",["layerDefinition.types"])],Xe.prototype,"readTypes",null),e([h({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],Xe.prototype,"visible",void 0),e([g("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],Xe.prototype,"readVisible",null),Xe=e([w("esri.layers.FeatureLayer")],Xe);const Ye=Xe;export{Ye as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import t from"../PopupTemplate.js";import r from"../request.js";import i from"../core/Clonable.js";import o from"../core/Collection.js";import s from"../core/Error.js";import{clone as a}from"../core/lang.js";import n from"../core/Logger.js";import{MultiOriginJSONMixin as l}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as p}from"../core/object.js";import{debounce as u,throwIfAbortError as d,whenOrAbort as y}from"../core/promiseUtils.js";import{sqlAnd as c}from"../core/sql.js";import{urlToObject as m,join as f}from"../core/urlUtils.js";import{property as h}from"../core/accessorSupport/decorators/property.js";import{cast as b}from"../core/accessorSupport/decorators/cast.js";import{reader as g}from"../core/accessorSupport/decorators/reader.js";import{subclass as w}from"../core/accessorSupport/decorators/subclass.js";import{writer as v}from"../core/accessorSupport/decorators/writer.js";import{excludeTables as j}from"../core/accessorSupport/layerContainerType.js";import S from"../form/FormTemplate.js";import T from"../geometry/SpatialReference.js";import F from"./Layer.js";import{MemorySource as I}from"./graphics/sources/MemorySource.js";import{APIKeyMixin as E}from"./mixins/APIKeyMixin.js";import{ArcGISService as D}from"./mixins/ArcGISService.js";import{BlendLayer as L}from"./mixins/BlendLayer.js";import{CustomParametersMixin as x}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as _}from"./mixins/DisplayFilteredLayer.js";import{EditBusLayer as P}from"./mixins/EditBusLayer.js";import{FeatureEffectLayer as M}from"./mixins/FeatureEffectLayer.js";import{FeatureLayerBase as q}from"./mixins/FeatureLayerBase.js";import{FeatureReductionLayer as C}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as O}from"./mixins/OperationalLayer.js";import{OrderedLayer as A}from"./mixins/OrderedLayer.js";import{PortalLayer as V}from"./mixins/PortalLayer.js";import{PublishableLayer as Q}from"./mixins/PublishableLayer.js";import{RefreshableLayer as R}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as U}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as B}from"./mixins/TemporalLayer.js";import{TrackableLayer as N}from"./mixins/TrackableLayer.js";import{titleFromUrlAndName as $,parse as G,cleanTitle as J}from"./support/arcgisLayerUrl.js";import{attributeTableTemplate as W,id as Z,labelsVisible as k,opacityDrawingInfo as z,legendEnabled as H,listMode as K,popupEnabled as X,screenSizePerspectiveEnabled as Y}from"./support/commonProperties.js";import{ensureLayerCredential as ee,computeEffectiveEditingEnabled as te,readGlobalIdField as re,readObjectIdField as ie,createDefaultRenderer as oe,addAttachment as se,updateAttachment as ae,applyEdits as ne,uploadAssets as le,createQuery as pe,deleteAttachments as ue,fetchRecomputedExtents as de,getFeatureType as ye,computeDomainFromSubtypes as ce,getFeatureSubtype as me,computeDomainFromTypes as fe,queryAttachments as he,queryObjectIds as be,queryFeatureCount as ge,queryExtent as we,queryRelatedFeatures as ve,queryRelatedFeaturesCount as je,validateBinsQuery as Se,hasDataChanged as Te,geometryTypeKebabDict as Fe}from"./support/featureLayerUtils.js";import Ie from"./support/FeatureTemplate.js";import Ee from"./support/FeatureType.js";import{defineFieldProperties as De}from"./support/fieldProperties.js";import{fixRendererFields as Le,fixTimeInfoFields as xe}from"./support/fieldUtils.js";import _e from"./support/LabelClass.js";import{reader as Pe}from"./support/labelingInfo.js";import{getFeatureLayerCapabilities as Me}from"./support/serviceCapabilitiesUtils.js";import qe from"./support/TimeInfo.js";import{serviceSupportsSpatialReference as Ce}from"./support/versionUtils.js";import{DataLayerSource as Oe}from"./support/source/DataLayerSource.js";import{read as Ae}from"../renderers/support/jsonUtils.js";import{loadStyleRenderer as Ve}from"../renderers/support/styleUtils.js";import{rendererTypes as Qe,webSceneRendererTypes as Re}from"../renderers/support/typeUtils.js";import Ue from"../rest/support/FeatureSet.js";import Be from"../rest/support/Query.js";import{isNumber as Ne}from"../support/guards.js";import{createPopupTemplate as $e}from"../support/popupUtils.js";import{symbolTypes as Ge}from"../symbols/support/typeUtils.js";import{SaveOperationType as Je}from"../webdoc/interfaces.js";import{opacityToTransparency as We}from"../webdoc/support/opacityUtils.js";const Ze="FeatureLayer";function ke(e,t){return new s("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${t}`,{layer:e})}function ze(e){return e&&e instanceof o}const He=De();function Ke(e,t,r){const i=!!r?.writeLayerSchema;return{enabled:i,ignoreOrigin:i}}let Xe=class extends(q(C(M(Q(P(_(L(A(B(N(U(R(D(O(V(l(x(E(i.ClonableMixin(F)))))))))))))))))))){constructor(...e){super(...e),this.attributeTableTemplate=null,this.charts=null,this.copyright=null,this.displayField=null,this.dynamicDataSource=null,this.fields=null,this.fieldsIndex=null,this.formTemplate=null,this.fullExtent=null,this.geometryType=null,this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.objectIdField=null,this.operationalLayerType="ArcGISFeatureLayer",this.outFields=null,this.path=null,this.popupEnabled=!0,this.popupTemplate=null,this.resourceInfo=null,this.screenSizePerspectiveEnabled=!0,this.spatialReference=T.WGS84,this.subtypeCode=null,this.supportedSourceTypes=new Set(["Feature Layer","Oriented Imagery Layer","Table","Catalog Layer"]),this.templates=null,this.timeInfo=null,this.title=null,this.sublayerTitleMode="item-title",this.type="feature",this.typeIdField=null,this.types=null,this.visible=!0,this._debouncedSaveOperations=u((async(e,t,r)=>{const{save:i,saveAs:o}=await import("./save/featureLayerUtils.js");switch(e){case Je.SAVE:return i(this,t);case Je.SAVE_AS:return o(this,r,t)}}))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return"string"==typeof e?{url:e,...t}:e}load(e){const t=null!=e?e.signal:null;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then((e=>this.initLayerProperties(e)))),Promise.resolve(this);const r=this.loadFromPortal({supportedTypes:["Feature Service","Feature Collection","Scene Service"]},e).catch(d).then((async()=>{if(this.url&&null==this.layerId&&/FeatureServer|MapServer\/*$/i.test(this.url)){const e=await this._fetchFirstValidLayerId(t);null!=e&&(this.layerId=e)}if(!this.url&&!this._hasMemorySource())throw new s("feature-layer:missing-url-or-source","Feature layer must be created with either a url or a source");return this.initLayerProperties(await this.createGraphicsSource(t))})).then((()=>ee(this,"load",e)));return this.addResolvingPromise(r),Promise.resolve(this)}readCapabilities(e,t){return t=t.layerDefinition||t,Me(t,this.url)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("dynamicDataSource"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return!(this.loaded&&!this.capabilities?.operations.supportsEditing)&&(this._isOverridden("editingEnabled")?this._get("editingEnabled"):this._hasMemorySource()||this.userHasEditingPrivileges)}set editingEnabled(e){this._overrideIfSome("editingEnabled",e)}readEditingEnabled(e,t){return this._readEditingEnabled(t,!1)}readEditingEnabledFromWebMap(e,t,r){return this._readEditingEnabled(t,!0,r)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,r,i){this._writeEditingEnabled(e,t,!0,i)}get effectiveEditingEnabled(){return te(this)}readIsTable(e,t){return"Table"===(t=t?.layerDefinition??t).type||!t.geometryType}writeIsTable(e,t,r,i){i?.writeLayerSchema&&p(r,e?"Table":"Feature Layer",t)}readGlobalIdField(e,t){return re(t.layerDefinition||t)}readObjectIdField(e,t){return ie(t.layerDefinition||t)}get parsedUrl(){const e=m(this.url);return null!=e&&(null!=this.dynamicDataSource?e.path=f(e.path,"dynamicLayer"):null!=this.layerId&&(e.path=f(e.path,this.layerId.toString()))),e}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){Le(e,this.fieldsIndex),this._set("renderer",e)}readRenderer(e,t,r){t=t.layerDefinition||t;const i=t.drawingInfo?.renderer;if(i){const e=Ae(i,t,r)??void 0;return e||n.getLogger(this).error("Failed to create renderer",{rendererDefinition:t.drawingInfo.renderer,layer:this,context:r}),e}return oe(t,r)}set source(e){const t=this._get("source");t!==e&&(ze(t)&&this._resetMemorySource(t),ze(e)&&this._initMemorySource(e),this._set("source",e))}castSource(e){return e?Array.isArray(e)||e instanceof o?new I({layer:this,items:e}):e:null}readSource(e,t){const r=Ue.fromJSON(t.featureSet);return new I({layer:this,items:r?.features??[]})}readTemplates(e,t){const r=t.editFieldsInfo,i=r?.creatorField,o=r?.editorField;return e=e?.map((e=>Ie.fromJSON(e))),this._fixTemplates(e,i),this._fixTemplates(e,o),e}readTitle(e,t){const r=t.layerDefinition?.name??t.name,i=t.title||t.layerDefinition?.title;if(r){const e=this.portalItem?.title;if("item-title"===this.sublayerTitleMode)return this.url?$(this.url,r):r;let t=r;if(!t&&this.url){const e=G(this.url);null!=e&&(t=e.title)}if(!t)return;return"item-title-and-service-name"===this.sublayerTitleMode&&e&&e!==t&&(t=e+" - "+t),J(t)}if("item-title"===this.sublayerTitleMode&&i)return i}readTitleFromWebMap(e,t){return t.title||t.layerDefinition?.name}readTypeIdField(e,t){let r=(t=t.layerDefinition||t).typeIdField;if(r&&t.fields){r=r.toLowerCase();const e=t.fields.find((e=>e.name.toLowerCase()===r));e&&(r=e.name)}return r}readTypes(e,t){e=(t=t.layerDefinition||t).types;const r=t.editFieldsInfo,i=r?.creatorField,o=r?.editorField;return e?.map((e=>(e=Ee.fromJSON(e),this._fixTemplates(e.templates,i),this._fixTemplates(e.templates,o),e)))}readVisible(e,t){return null!=t.layerDefinition?.defaultVisibility?!!t.layerDefinition.defaultVisibility:null!=t.visibility?!!t.visibility:void 0}async addAttachment(e,t){const r=await se(this,e,t,Ze);return this.lastEditsEventDate=new Date,r}async updateAttachment(e,t,r){const i=await ae(this,e,t,r,Ze);return this.lastEditsEventDate=new Date,i}async applyEdits(e,t){return ne(this,e,t)}async uploadAssets(e,t){return le(this,e,t)}on(e,t){return super.on(e,t)}createPopupTemplate(e){return $e(this,e)}async createGraphicsSource(e){if(this._hasMemorySource()&&this.source)return this.source.load({signal:e});const{default:t}=await y(import("./graphics/sources/FeatureLayerSource.js"),e);return new t({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=pe(this);e.dynamicDataSource=this.dynamicDataSource;const t=null!=this.subtypeCode?`${this.subtypeField} = ${this.subtypeCode}`:null,r=c(this.definitionExpression,t);return e.where=r||"1=1",e}async deleteAttachments(e,t){const r=await ue(this,e,t,Ze);return this.lastEditsEventDate=new Date,r}async fetchRecomputedExtents(e){return de(this,e,Ze)}getFeatureType(e){return ye(this.types,this.typeIdField,e)}getFieldDomain(e,t){const r=t?.feature,i=!!this.subtypes?.length;if(i&&!t?.excludeImpliedDomains){const t=ce(this,e);if(t)return t}const o=i&&me(this,r);if(o){const t=o?.domains?.[e];return"inherited"===t?.type?this._getLayerDomain(e):t}const s=this.getFeatureType(r),a=this._getLayerDomain(e);if(s){const t=s.domains&&s.domains[e];if(t&&"inherited"!==t?.type)return t}if(a)return a;if(!t?.excludeImpliedDomains){const t=fe(this,e);if(t)return t}return null}async queryAttachments(e,t){return he(this,e,t,Ze)}async queryFeatures(e,t){const r=await this.load(),i=await r.source.queryFeatures(Be.from(e)??r.createQuery(),t);if(i?.features)for(const o of i.features)o.layer=o.sourceLayer=r;return i}async queryObjectIds(e,t){return(await be(this,e,t,Ze)).filter(Ne)}async queryFeatureCount(e,t){return ge(this,e,t,Ze)}async queryExtent(e,t){return we(this,e,t,Ze)}async queryRelatedFeatures(e,t){return ve(this,e,t,Ze)}async queryRelatedFeaturesCount(e,t){return je(this,e,t,Ze)}async queryTopFeatures(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopFeatures||!i?.query?.supportsTopFeaturesQuery)throw new s(Ze,"Layer source does not support queryTopFeatures capability");const o=await import("../rest/support/TopFeaturesQuery.js"),a=await r.queryTopFeatures(o.default.from(e),t);if(a?.features)for(const s of a.features)s.layer=s.sourceLayer=this;return a}async queryAttributeBins(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryAttributeBins||!i?.operations?.supportsQueryBins)throw new s(Ze,"Layer source does not support queryAttributeBins capability");Se(e,i,Ze);const o=await import("../rest/support/AttributeBinsQuery.js"),a=await r.queryAttributeBins(o.default.from(e),t);if(a.features)for(const s of a.features)s.layer=s.sourceLayer=this;return a}async queryTopObjectIds(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopObjectIds||!i?.query.supportsTopFeaturesQuery)throw new s(Ze,"Layer source does not support queryTopObjectIds capability");const o=await import("../rest/support/TopFeaturesQuery.js");return(await r.queryTopObjectIds(o.default.from(e),t)).filter(Ne)}async queryTopFeaturesExtent(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopExtents||!i?.query?.supportsTopFeaturesQuery)throw new s(Ze,"Layer source does not support queryTopExtents capability");const o=await import("../rest/support/TopFeaturesQuery.js");return r.queryTopExtents(o.default.from(e),t)}async queryTopFeatureCount(e,t){const{source:r,capabilities:i}=await this.load();if(!r.queryTopCount||!i?.query?.supportsTopFeaturesQuery)throw new s(Ze,"Layer source does not support queryFeatureCount capability");const o=await import("../rest/support/TopFeaturesQuery.js");return r.queryTopCount(o.default.from(e),t)}read(e,t){const r=e.featureCollection;if((r||"Feature Collection"===e.type)&&(this.resourceInfo=e),r){const e=r.layers;e&&1===e.length&&(super.read(e[0],t),null!=r.showLegend&&super.read({showLegend:r.showLegend},t))}super.read(e,t),t&&"service"===t.origin&&(this.revert(["objectIdField","fields","timeInfo","dateFieldsTimeZone"],"service"),this.spatialReference||this.revert(["spatialReference"],"service"))}write(e,t){t={...t,origin:t?.origin??void 0,writeLayerSchema:t?.writeLayerSchema??this._hasMemorySource()};const{origin:r,layerContainerType:i,messages:o}=t;if(this.dynamicDataSource)return o?.push(ke(this,"using a dynamic data source cannot be written to web scenes, web maps and feature service items")),null;if(this.isTable){if(("web-map"===r||"web-scene"===r)&&"tables"!==i)return o?.push(ke(this,`a table source can only be written to tables, not ${i}`)),null;if(this._hasMemorySource())return o?.push(ke(this,"using an in-memory table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&("web-map"===r||"web-scene"===r)&&"tables"===i)return o?.push(ke(this,"using a non-table source cannot be written to tables in web maps or web scenes")),null;return super.write(e,t)}clone(){if(this._hasMemorySource())throw new s(Ze,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return!!this.loaded&&("memory"===this.source?.type||Ce(this,e))}async save(e){return this._debouncedSaveOperations(Je.SAVE,e)}async saveAs(e,t){return this._debouncedSaveOperations(Je.SAVE_AS,t,e)}_readEditingEnabled(e,t,r){let i=e.layerDefinition?.capabilities;return i?this._hasEditingCapability(i):(i=e.capabilities,t&&"web-map"===r?.origin&&!this._hasMemorySource()&&i?this._hasEditingCapability(i):void 0)}_hasEditingCapability(e){return e.toLowerCase().split(",").map((e=>e.trim())).includes("editing")}_writeEditingEnabled(e,t,r,i){if(!e){const e=this.capabilities?.operations?.supportsSync?"Query,Sync":"Query";p("layerDefinition.capabilities",e,t),r&&!i?.writeLayerSchema&&(t.capabilities=e)}}_getLayerDomain(e){const t=this.fieldsIndex.get(e);return t?t.domain:null}_fetchFirstValidLayerId(e){return r(this.url??"",{query:{f:"json",...this.customParameters,token:this.apiKey},responseType:"json",signal:e}).then((e=>{const t=e.data;if(t)return this.findFirstValidLayerId(t)}))}async initLayerProperties(e){return this._set("source",e),e.sourceJSON&&(this.sourceJSON=e.sourceJSON,this.read(e.sourceJSON,{origin:"service",portalItem:this.portalItem,portal:this.portalItem?.portal,url:this.parsedUrl})),this._verifySource(),this._verifyFields(),Le(this.renderer,this.fieldsIndex),xe(this.timeInfo,this.fieldsIndex),this._hasMemorySource()&&"mesh"===this.geometryType&&(this.capabilities.query.supportsReturnMesh=!0),Ve(this,{origin:"service"})}async hasDataChanged(){return Te(this)}async fetchPublishingStatus(){const e=this.source;return e?.fetchPublishingStatus?e.fetchPublishingStatus():"unavailable"}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("FeatureLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||this._hasMemorySource()||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("FeatureLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_fixTemplates(e,t){e&&e.forEach((e=>{const r=e.prototype?.attributes;r&&t&&delete r[t]}))}_verifySource(){if(this._hasMemorySource()){if(this.url)throw new s("feature-layer:mixed-source-and-url","FeatureLayer cannot be created with both an in-memory source and a url")}else if(!this.url)throw new s("feature-layer:source-or-url-required","FeatureLayer requires either a url, a valid portal item or a source")}_initMemorySource(e){e.forEach((e=>{e.layer=this,e.sourceLayer=this})),this.addHandles([e.on("after-add",(e=>{e.item.layer=this,e.item.sourceLayer=this})),e.on("after-remove",(e=>{e.item.layer=null,e.item.sourceLayer=null}))],"fl-source")}_resetMemorySource(e){e.forEach((e=>{e.layer=null,e.sourceLayer=null})),this.removeHandles("fl-source")}_hasMemorySource(){return!(this.url||!this.source)}findFirstValidLayerId(e){return Array.isArray(e.layers)&&e.layers.length>0?e.layers[0].id:Array.isArray(e.tables)&&e.tables.length>0?e.tables[0].id:void 0}};e([h(W)],Xe.prototype,"attributeTableTemplate",void 0),e([g("service","capabilities")],Xe.prototype,"readCapabilities",null),e([h({json:{origins:{"web-scene":{write:!1}},write:!0}})],Xe.prototype,"charts",void 0),e([h({readOnly:!0})],Xe.prototype,"createQueryVersion",null),e([h({json:{read:{source:"layerDefinition.copyrightText"}}})],Xe.prototype,"copyright",void 0),e([h({json:{read:{source:"layerDefinition.displayField"}}})],Xe.prototype,"displayField",void 0),e([h({types:Ge,readOnly:!0})],Xe.prototype,"defaultSymbol",void 0),e([h({type:Oe})],Xe.prototype,"dynamicDataSource",void 0),e([h({type:Boolean})],Xe.prototype,"editingEnabled",null),e([g(["portal-item","web-scene"],"editingEnabled",["layerDefinition.capabilities"])],Xe.prototype,"readEditingEnabled",null),e([g("web-map","editingEnabled",["capabilities","layerDefinition.capabilities"])],Xe.prototype,"readEditingEnabledFromWebMap",null),e([v(["portal-item","web-scene"],"editingEnabled",{"layerDefinition.capabilities":{type:String}})],Xe.prototype,"writeEditingEnabled",null),e([v("web-map","editingEnabled",{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],Xe.prototype,"writeEditingEnabledToWebMap",null),e([h({readOnly:!0})],Xe.prototype,"effectiveEditingEnabled",null),e([h({...He.fields,json:{read:{source:"layerDefinition.fields"},origins:{service:{name:"fields"},"web-map":{write:{target:"layerDefinition.fields",overridePolicy:Ke}}}}})],Xe.prototype,"fields",void 0),e([h(He.fieldsIndex)],Xe.prototype,"fieldsIndex",void 0),e([h({type:S,json:{name:"formInfo",write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],Xe.prototype,"formTemplate",void 0),e([h({json:{read:{source:"layerDefinition.extent"}}})],Xe.prototype,"fullExtent",void 0),e([h({json:{origins:{"web-map":{write:{target:"layerDefinition.geometryType",overridePolicy:Ke,writer(e,t,r){const i=e?Fe.toJSON(e):null;i&&p(r,i,t)}}}},read:{source:"layerDefinition.geometryType",reader:Fe.read}}})],Xe.prototype,"geometryType",void 0),e([h({json:{read:{source:"layerDefinition.hasM"}}})],Xe.prototype,"hasM",void 0),e([h({json:{read:{source:"layerDefinition.hasZ"}}})],Xe.prototype,"hasZ",void 0),e([h(Z)],Xe.prototype,"id",void 0),e([h({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],Xe.prototype,"infoFor3D",void 0),e([h({json:{origins:{"web-map":{write:{target:"layerDefinition.type"}}}}})],Xe.prototype,"isTable",void 0),e([g("service","isTable",["type","geometryType"]),g("isTable",["layerDefinition.type","layerDefinition.geometryType"])],Xe.prototype,"readIsTable",null),e([v("web-map","isTable")],Xe.prototype,"writeIsTable",null),e([h(k)],Xe.prototype,"labelsVisible",void 0),e([h({type:[_e],json:{origins:{service:{name:"drawingInfo.labelingInfo",read:Pe,write:!1},"web-scene":{name:"layerDefinition.drawingInfo.labelingInfo",read:Pe,write:{enabled:!0,layerContainerTypes:j}}},name:"layerDefinition.drawingInfo.labelingInfo",read:Pe,write:!0}})],Xe.prototype,"labelingInfo",void 0),e([h((()=>{const e=a(z);return e.json.origins["portal-item"]={write:{target:"layerDefinition.drawingInfo.transparency",writer(e,t,r){p(r,We(e),t)}}},e})())],Xe.prototype,"opacity",void 0),e([h(H)],Xe.prototype,"legendEnabled",void 0),e([h({type:["show","hide"],json:(()=>{const e=a(K.json);return e.origins["portal-item"]={read:!1,write:!1},e})()})],Xe.prototype,"listMode",void 0),e([g("globalIdField",["layerDefinition.globalIdField","layerDefinition.fields"])],Xe.prototype,"readGlobalIdField",null),e([h({json:{origins:{"web-map":{write:{target:"layerDefinition.objectIdField",overridePolicy:Ke}}}}})],Xe.prototype,"objectIdField",void 0),e([g("objectIdField",["layerDefinition.objectIdField","layerDefinition.fields"])],Xe.prototype,"readObjectIdField",null),e([h({type:["ArcGISFeatureLayer"],json:{write:{target:"layerType",ignoreOrigin:!0,layerContainerTypes:j}}})],Xe.prototype,"operationalLayerType",void 0),e([h(He.outFields)],Xe.prototype,"outFields",void 0),e([h({readOnly:!0})],Xe.prototype,"parsedUrl",null),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Xe.prototype,"path",void 0),e([h(X)],Xe.prototype,"popupEnabled",void 0),e([h({type:t,json:{name:"popupInfo",write:!0}})],Xe.prototype,"popupTemplate",void 0),e([h({readOnly:!0})],Xe.prototype,"defaultPopupTemplate",null),e([h({types:Qe,json:{origins:{service:{write:{target:"drawingInfo.renderer",enabled:!1}},"web-scene":{types:Re,name:"layerDefinition.drawingInfo.renderer",write:{layerContainerTypes:j,overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema})}}},write:{target:"layerDefinition.drawingInfo.renderer",overridePolicy:(e,t,r)=>({ignoreOrigin:r?.writeLayerSchema})}}})],Xe.prototype,"renderer",null),e([g("service","renderer",["drawingInfo.renderer","defaultSymbol"]),g("renderer",["layerDefinition.drawingInfo.renderer","layerDefinition.defaultSymbol"])],Xe.prototype,"readRenderer",null),e([h()],Xe.prototype,"resourceInfo",void 0),e([h((()=>{const e=a(Y);return e.json.origins["portal-item"]={read:!1,write:!1},e})())],Xe.prototype,"screenSizePerspectiveEnabled",void 0),e([h({clonable:!1})],Xe.prototype,"source",null),e([b("source")],Xe.prototype,"castSource",null),e([g("portal-item","source",["featureSet"]),g("web-map","source",["featureSet"])],Xe.prototype,"readSource",null),e([h({json:{read:{source:"layerDefinition.extent.spatialReference"}}})],Xe.prototype,"spatialReference",void 0),e([h({type:Number})],Xe.prototype,"subtypeCode",void 0),e([h({type:[Ie]})],Xe.prototype,"templates",void 0),e([g("templates",["editFieldsInfo","creatorField","editorField","templates"])],Xe.prototype,"readTemplates",null),e([h({type:qe})],Xe.prototype,"timeInfo",void 0),e([h()],Xe.prototype,"title",void 0),e([g("service","title",["name"]),g("portal-item","title",["layerDefinition.title","layerDefinition.name","title"])],Xe.prototype,"readTitle",null),e([g("web-map","title",["layerDefinition.name","title"])],Xe.prototype,"readTitleFromWebMap",null),e([h({type:String})],Xe.prototype,"sublayerTitleMode",void 0),e([h({json:{read:!1}})],Xe.prototype,"type",void 0),e([h({type:String})],Xe.prototype,"typeIdField",void 0),e([g("service","typeIdField"),g("typeIdField",["layerDefinition.typeIdField"])],Xe.prototype,"readTypeIdField",null),e([h({type:[Ee]})],Xe.prototype,"types",void 0),e([g("service","types",["types"]),g("types",["layerDefinition.types"])],Xe.prototype,"readTypes",null),e([h({type:Boolean,json:{origins:{"portal-item":{write:{target:"layerDefinition.defaultVisibility"}}}}})],Xe.prototype,"visible",void 0),e([g("portal-item","visible",["visibility","layerDefinition.defaultVisibility"])],Xe.prototype,"readVisible",null),Xe=e([w("esri.layers.FeatureLayer")],Xe);const Ye=Xe;export{Ye as default};
@@ -2,4 +2,4 @@
2
2
  All material copyright ESRI, All Rights Reserved, unless otherwise specified.
3
3
  See https://js.arcgis.com/4.33/esri/copyright.txt for details.
4
4
  */
5
- import{_ as e}from"../chunks/tslib.es6.js";import r from"../core/Clonable.js";import t from"../core/Collection.js";import s from"../core/Error.js";import{loadAll as i}from"../core/loadAll.js";import{MultiOriginJSONMixin as o}from"../core/MultiOriginJSONSupport.js";import{debounce as a,throwIfAbortError as n,whenOrAbort as u}from"../core/promiseUtils.js";import{watch as l,sync as p}from"../core/reactiveUtils.js";import{sqlAnd as y}from"../core/sql.js";import{urlToObject as d,join as c}from"../core/urlUtils.js";import{property as m}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{reader as h}from"../core/accessorSupport/decorators/reader.js";import{subclass as f}from"../core/accessorSupport/decorators/subclass.js";import b from"./Layer.js";import{APIKeyMixin as g}from"./mixins/APIKeyMixin.js";import{ArcGISService as S}from"./mixins/ArcGISService.js";import{BlendLayer as w}from"./mixins/BlendLayer.js";import{CustomParametersMixin as j}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as v}from"./mixins/DisplayFilteredLayer.js";import{EditBusLayer as L}from"./mixins/EditBusLayer.js";import{FeatureLayerBase as F}from"./mixins/FeatureLayerBase.js";import{OperationalLayer as x}from"./mixins/OperationalLayer.js";import{PortalLayer as E}from"./mixins/PortalLayer.js";import{RefreshableLayer as _}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as C}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as I}from"./mixins/TemporalLayer.js";import{titleFromUrlAndName as P}from"./support/arcgisLayerUrl.js";import{id as O}from"./support/commonProperties.js";import{ensureLayerCredential as A,computeEffectiveEditingEnabled as T,addAttachment as U,updateAttachment as G,applyEdits as q,createQuery as D,deleteAttachments as $,fetchRecomputedExtents as M,computeDomainFromSubtypes as R,getFeatureSubtype as V,queryAttachments as k,queryObjectIds as N,queryFeatureCount as Q,queryExtent as H,queryRelatedFeatures as J,queryRelatedFeaturesCount as B,hasDataChanged as z}from"./support/featureLayerUtils.js";import{defineFieldProperties as K}from"./support/fieldProperties.js";import{fixTimeInfoFields as Z}from"./support/fieldUtils.js";import{getSymbolWithColorSupport as W,createSimpleRenderersWithUniqueColors as X}from"./support/subtypeGroupLayerUtils.js";import Y from"./support/SubtypeSublayer.js";import ee from"./support/TimeInfo.js";import{serviceSupportsSpatialReference as re}from"./support/versionUtils.js";import te from"../rest/support/Query.js";import{isNumber as se}from"../support/guards.js";import{SaveOperationType as ie}from"../webdoc/interfaces.js";const oe="SubtypeGroupLayer",ae="esri.layers.SubtypeGroupLayer";function ne(e,r){return new s("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${r}`,{layer:e})}const ue=K();let le=class extends(F(v(L(w(I(C(_(S(x(E(o(j(g(r.ClonableMixin(b))))))))))))))){constructor(...e){super(...e),this._sublayerLookup=new Map,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.sublayers=new(t.ofType(Y)),this.useUniqueColorsForSublayers=!0,this.supportedSourceTypes=new Set(["Feature Layer"]),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this._debouncedSaveOperations=a((async(e,r,t)=>{const{save:s,saveAs:i}=await import("./save/featureLayerUtils.js");switch(e){case ie.SAVE:return s(this,r);case ie.SAVE_AS:return i(this,t,r)}})),this.addHandles(l((()=>this.sublayers),((e,r)=>this._handleSublayersChange(e,r)),p))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null,t=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(n).then((async()=>{if(!this.url)throw new s("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(null==this.layerId)throw new s("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");return this._initLayerProperties(await this.createGraphicsSource(r))})).then((()=>A(this,"load",e)));return this.addResolvingPromise(t),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return T(this)}get parsedUrl(){const e=d(this.url);return null!=e&&null!=this.layerId&&(e.path=c(e.path,this.layerId.toString())),e}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:r}){return this.url?P(this.url,r):r}async addAttachment(e,r){const t=await U(this,e,r,oe);return this.lastEditsEventDate=new Date,t}async updateAttachment(e,r,t){const s=await G(this,e,r,t,oe);return this.lastEditsEventDate=new Date,s}async applyEdits(e,r){return q(this,e,r)}on(e,r){return super.on(e,r)}async createGraphicsSource(e){const{default:r}=await u(import("./graphics/sources/FeatureLayerSource.js"),e);return new r({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=D(this),r=this.sublayers.map((e=>e.subtypeCode));return e.where=y(`${this.subtypeField} IN (${r.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,r){const t=await $(this,e,r,oe);return this.lastEditsEventDate=new Date,t}async fetchRecomputedExtents(e){return M(this,e,oe)}findSublayerForFeature(e){const r=this.fieldsIndex.get(this.subtypeField),t=e.attributes[r.name];return this.findSublayerForSubtypeCode(t)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,r){if(!r?.excludeImpliedDomains){const r=R(this,e);if(r)return r}const t=V(this,r?.feature);if(t){const r=t.domains?.[e];return"inherited"===r?.type?this._getLayerDomain(e):r}return this._getLayerDomain(e)}loadAll(){return i(this,(e=>{e(this.sublayers)}))}async queryAttachments(e,r){return k(this,e,r,oe)}async queryFeatures(e,r){const t=await this.load(),s=te.from(e)??t.createQuery(),i=s.outFields??[];i.includes(this.subtypeField)||(i.push(this.subtypeField),s.outFields=i);const o=await t.source.queryFeatures(s,r);if(o?.features)for(const a of o.features)a.layer=a.sourceLayer=this.findSublayerForFeature(a);return o}async queryObjectIds(e,r){return(await N(this,e,r,oe)).filter(se)}async queryFeatureCount(e,r){return Q(this,e,r,oe)}async queryExtent(e,r){return H(this,e,r,oe)}async queryRelatedFeatures(e,r){return J(this,e,r,oe)}async queryRelatedFeaturesCount(e,r){return B(this,e,r,oe)}async save(e){return this._debouncedSaveOperations(ie.SAVE,e)}async saveAs(e,r){return this._debouncedSaveOperations(ie.SAVE_AS,r,e)}write(e,r){const{origin:t,layerContainerType:i,messages:o}=r;if(this.isTable){if("web-scene"===t||"web-map"===t&&"tables"!==i)return o?.push(ne(this,"using a table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===t&&"tables"===i)return o?.push(ne(this,"using a non-table source cannot be written to tables in web maps")),null;return this.sublayers?.length?super.write(e,r):(o?.push(new s("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&re(this,e)}_getLayerDomain(e){const r=this.fieldsIndex.get(e);return r?r.domain:null}async _initLayerProperties(e){this._set("source",e);const{sourceJSON:r}=e;if(r&&(this.sourceJSON=r,this.read(r,{origin:"service",url:this.parsedUrl})),!this.subtypes?.length)throw new s("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),Z(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return z(this)}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,r){r&&(r.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach((e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),e.on("after-remove",(({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)}))],"sublayers-owner"))}};e([m({readOnly:!0})],le.prototype,"createQueryVersion",null),e([m({readOnly:!0})],le.prototype,"editingEnabled",null),e([m({readOnly:!0})],le.prototype,"effectiveEditingEnabled",null),e([m({...ue.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],le.prototype,"fields",void 0),e([m(ue.fieldsIndex)],le.prototype,"fieldsIndex",void 0),e([m(O)],le.prototype,"id",void 0),e([m({type:["show","hide","hide-children"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],le.prototype,"listMode",void 0),e([m({value:"SubtypeGroupLayer",type:["SubtypeGroupLayer"],json:{origins:{"portal-item":{name:"layerType",write:{enabled:!0,ignoreOrigin:!0}}}}})],le.prototype,"operationalLayerType",void 0),e([m(ue.outFields)],le.prototype,"outFields",void 0),e([m({readOnly:!0})],le.prototype,"parsedUrl",null),e([m({clonable:!1})],le.prototype,"source",null),e([m({type:t.ofType(Y),json:{origins:{service:{read:{source:"subtypes",reader(e,r,s){let i=null;if(this.useUniqueColorsForSublayers){const t=W(r,s);i=t?X(e.length,t):null}const o=e.map((({code:e},t)=>{const o=new Y({subtypeCode:e});o.read(r,s);const a=i?.[t];return a&&o.read({drawingInfo:{renderer:a.toJSON()}},s),o}));return new(t.ofType(Y))(o)}}}},name:"layers",write:{ignoreOrigin:!0}}})],le.prototype,"sublayers",void 0),e([m()],le.prototype,"useUniqueColorsForSublayers",void 0),e([m({type:ee})],le.prototype,"timeInfo",void 0),e([m({json:{origins:{"portal-item":{write:{enabled:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],le.prototype,"title",void 0),e([h("service","title",["name"])],le.prototype,"readTitleFromService",null),e([m({json:{read:!1}})],le.prototype,"type",void 0),le=e([f(ae)],le);const pe=le;export{pe as default};
5
+ import{_ as e}from"../chunks/tslib.es6.js";import r from"../core/Clonable.js";import t from"../core/Collection.js";import s from"../core/Error.js";import{loadAll as i}from"../core/loadAll.js";import{MultiOriginJSONMixin as o}from"../core/MultiOriginJSONSupport.js";import{debounce as a,throwIfAbortError as n,whenOrAbort as u}from"../core/promiseUtils.js";import{watch as l,sync as p}from"../core/reactiveUtils.js";import{sqlAnd as y}from"../core/sql.js";import{urlToObject as d,join as c}from"../core/urlUtils.js";import{property as m}from"../core/accessorSupport/decorators/property.js";import"../core/has.js";import"../core/Logger.js";import"../core/RandomLCG.js";import{reader as h}from"../core/accessorSupport/decorators/reader.js";import{subclass as f}from"../core/accessorSupport/decorators/subclass.js";import b from"./Layer.js";import{APIKeyMixin as g}from"./mixins/APIKeyMixin.js";import{ArcGISService as S}from"./mixins/ArcGISService.js";import{BlendLayer as w}from"./mixins/BlendLayer.js";import{CustomParametersMixin as j}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as v}from"./mixins/DisplayFilteredLayer.js";import{EditBusLayer as L}from"./mixins/EditBusLayer.js";import{FeatureLayerBase as F}from"./mixins/FeatureLayerBase.js";import{OperationalLayer as x}from"./mixins/OperationalLayer.js";import{PortalLayer as E}from"./mixins/PortalLayer.js";import{RefreshableLayer as T}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as _}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as C}from"./mixins/TemporalLayer.js";import{titleFromUrlAndName as I}from"./support/arcgisLayerUrl.js";import{id as P}from"./support/commonProperties.js";import{ensureLayerCredential as O,computeEffectiveEditingEnabled as G,addAttachment as A,updateAttachment as U,applyEdits as q,createQuery as D,deleteAttachments as R,fetchRecomputedExtents as $,computeDomainFromSubtypes as M,getFeatureSubtype as V,queryAttachments as k,queryObjectIds as N,queryFeatureCount as Q,queryExtent as H,queryRelatedFeatures as J,queryRelatedFeaturesCount as B,hasDataChanged as z}from"./support/featureLayerUtils.js";import{defineFieldProperties as K}from"./support/fieldProperties.js";import{fixTimeInfoFields as Z}from"./support/fieldUtils.js";import{getSymbolWithColorSupport as W,createSimpleRenderersWithUniqueColors as X}from"./support/subtypeGroupLayerUtils.js";import Y from"./support/SubtypeSublayer.js";import ee from"./support/TimeInfo.js";import{serviceSupportsSpatialReference as re}from"./support/versionUtils.js";import te from"../rest/support/Query.js";import{isNumber as se}from"../support/guards.js";import{SaveOperationType as ie}from"../webdoc/interfaces.js";const oe="SubtypeGroupLayer",ae="esri.layers.SubtypeGroupLayer";function ne(e,r){return new s("layer:unsupported",`Layer (${e.title}, ${e.id}) of type '${e.declaredClass}' ${r}`,{layer:e})}function ue(e,r){const t=[];for(const s of e){const e=new Y;e.read(s,r),t.push(e)}return t}const le=K();function pe(){return{name:"layerType",read:{enabled:!0},write:{enabled:!0,ignoreOrigin:!0,isRequired:!0}}}let ye=class extends(F(v(L(w(C(_(T(S(x(E(o(j(g(r.ClonableMixin(b))))))))))))))){constructor(...e){super(...e),this._sublayerLookup=new Map,this.fields=null,this.fieldsIndex=null,this.outFields=null,this.sublayers=new(t.ofType(Y)),this.useUniqueColorsForSublayers=!0,this.supportedSourceTypes=new Set(["Feature Layer","Table"]),this.timeInfo=null,this.title="Layer",this.type="subtype-group",this._debouncedSaveOperations=a((async(e,r,t)=>{const{save:s,saveAs:i}=await import("./save/featureLayerUtils.js");switch(e){case ie.SAVE:return s(this,r);case ie.SAVE_AS:return i(this,t,r)}})),this.addHandles(l((()=>this.sublayers),((e,r)=>this._handleSublayersChange(e,r)),p))}destroy(){this.source?.destroy()}normalizeCtorArgs(e,r){return"string"==typeof e?{url:e,...r}:e}load(e){const r=null!=e?e.signal:null,t=this.loadFromPortal({supportedTypes:["Feature Service"]},e).catch(n).then((async()=>{if(!this.url)throw new s("subtype-grouplayer:missing-url-or-source","SubtypeGroupLayer must be created with either a url or a portal item");if(null==this.layerId)throw new s("subtype-grouplayer:missing-layerid","layerId is required for a SubtypeGroupLayer created with url");return this._initLayerProperties(await this.createGraphicsSource(r))})).then((()=>O(this,"load",e)));return this.addResolvingPromise(t),Promise.resolve(this)}get createQueryVersion(){return this.commitProperty("definitionExpression"),this.commitProperty("timeExtent"),this.commitProperty("timeOffset"),this.commitProperty("geometryType"),this.commitProperty("gdbVersion"),this.commitProperty("historicMoment"),this.commitProperty("returnZ"),this.commitProperty("capabilities"),this.commitProperty("returnM"),(this._get("createQueryVersion")??0)+1}get editingEnabled(){return this.loaded&&null!=this.capabilities&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return G(this)}get operationalLayerType(){return this.isTable?"SubtypeGroupTable":"SubtypeGroupLayer"}get parsedUrl(){const e=d(this.url);return null!=e&&null!=this.layerId&&(e.path=c(e.path,this.layerId.toString())),e}set source(e){this._get("source")!==e&&this._set("source",e)}readTitleFromService(e,{name:r}){return this.url?I(this.url,r):r}async addAttachment(e,r){const t=await A(this,e,r,oe);return this.lastEditsEventDate=new Date,t}async updateAttachment(e,r,t){const s=await U(this,e,r,t,oe);return this.lastEditsEventDate=new Date,s}async applyEdits(e,r){return q(this,e,r)}on(e,r){return super.on(e,r)}async createGraphicsSource(e){const{default:r}=await u(import("./graphics/sources/FeatureLayerSource.js"),e);return new r({layer:this,supportedSourceTypes:this.supportedSourceTypes}).load({signal:e})}createQuery(){const e=D(this),r=this.sublayers.map((e=>e.subtypeCode));return e.where=y(`${this.subtypeField} IN (${r.join(",")})`,this.definitionExpression),e}async deleteAttachments(e,r){const t=await R(this,e,r,oe);return this.lastEditsEventDate=new Date,t}async fetchRecomputedExtents(e){return $(this,e,oe)}findSublayerForFeature(e){const r=this.fieldsIndex.get(this.subtypeField),t=e.attributes[r.name];return this.findSublayerForSubtypeCode(t)}findSublayerForSubtypeCode(e){return this._sublayerLookup.get(e)}getFieldDomain(e,r){if(!r?.excludeImpliedDomains){const r=M(this,e);if(r)return r}const t=V(this,r?.feature);if(t){const r=t.domains?.[e];return"inherited"===r?.type?this._getLayerDomain(e):r}return this._getLayerDomain(e)}loadAll(){return i(this,(e=>{e(this.sublayers)}))}async queryAttachments(e,r){return k(this,e,r,oe)}async queryFeatures(e,r){const t=await this.load(),s=te.from(e)??t.createQuery(),i=s.outFields??[];i.includes(this.subtypeField)||(i.push(this.subtypeField),s.outFields=i);const o=await t.source.queryFeatures(s,r);if(o?.features)for(const a of o.features)a.layer=a.sourceLayer=this.findSublayerForFeature(a);return o}async queryObjectIds(e,r){return(await N(this,e,r,oe)).filter(se)}async queryFeatureCount(e,r){return Q(this,e,r,oe)}async queryExtent(e,r){return H(this,e,r,oe)}async queryRelatedFeatures(e,r){return J(this,e,r,oe)}async queryRelatedFeaturesCount(e,r){return B(this,e,r,oe)}async save(e){return this._debouncedSaveOperations(ie.SAVE,e)}async saveAs(e,r){return this._debouncedSaveOperations(ie.SAVE_AS,r,e)}write(e,r){const{origin:t,layerContainerType:i,messages:o}=r;if(this.isTable){if("web-scene"===t||"web-map"===t&&"tables"!==i)return o?.push(ne(this,"using a table source cannot be written to web scenes and web maps")),null}else if(this.loaded&&"web-map"===t&&"tables"===i)return o?.push(ne(this,"using a non-table source cannot be written to tables in web maps")),null;return this.sublayers?.length?super.write(e,r):(o?.push(new s("web-document-write:invalid-property",`Layer (${this.title}, ${this.id}) of type '${this.declaredClass}' has invalid value for 'sublayers' property. 'sublayers' collection should contain at least one sublayer`,{layer:this})),null)}serviceSupportsSpatialReference(e){return!!this.loaded&&re(this,e)}_getLayerDomain(e){const r=this.fieldsIndex.get(e);return r?r.domain:null}async _initLayerProperties(e){this._set("source",e);const{sourceJSON:r}=e;if(r&&(this.sourceJSON=r,this.read(r,{origin:"service",url:this.parsedUrl})),!this.subtypes?.length)throw new s("subtype-grouplayer:missing-subtypes","SubtypeGroupLayer must be created using a layer with subtypes");this._verifyFields(),Z(this.timeInfo,this.fieldsIndex)}async hasDataChanged(){return z(this)}_verifyFields(){const e=this.parsedUrl?.path??"undefined";this.objectIdField||console.log("SubtypeGroupLayer: 'objectIdField' property is not defined (url: "+e+")"),this.isTable||-1!==e.search(/\/FeatureServer\//i)||this.fields?.some((e=>"geometry"===e.type))||console.log("SubtypeGroupLayer: unable to find field of type 'geometry' in the layer 'fields' list. If you are using a map service layer, features will not have geometry (url: "+e+")")}_handleSublayersChange(e,r){r&&(r.forEach((e=>{e.parent=null})),this.removeHandles("sublayers-owner"),this._sublayerLookup.clear()),e&&(e.forEach((e=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),this.addHandles([e.on("after-add",(({item:e})=>{e.parent=this,this._sublayerLookup.set(e.subtypeCode,e)})),e.on("after-remove",(({item:e})=>{e.parent=null,this._sublayerLookup.delete(e.subtypeCode)}))],"sublayers-owner"))}};e([m({readOnly:!0})],ye.prototype,"createQueryVersion",null),e([m({readOnly:!0})],ye.prototype,"editingEnabled",null),e([m({readOnly:!0})],ye.prototype,"effectiveEditingEnabled",null),e([m({...le.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],ye.prototype,"fields",void 0),e([m(le.fieldsIndex)],ye.prototype,"fieldsIndex",void 0),e([m(P)],ye.prototype,"id",void 0),e([m({type:["show","hide","hide-children"],json:{origins:{"portal-item":{read:!1,write:!1}}}})],ye.prototype,"listMode",void 0),e([m({type:["SubtypeGroupLayer","SubtypeGroupTable"],json:{...pe(),origins:{"web-document":pe(),"portal-item":pe()}}})],ye.prototype,"operationalLayerType",null),e([m(le.outFields)],ye.prototype,"outFields",void 0),e([m({readOnly:!0})],ye.prototype,"parsedUrl",null),e([m({clonable:!1})],ye.prototype,"source",null),e([m({type:t.ofType(Y),json:{origins:{service:{read:{source:"subtypes",reader(e,r,s){let i=null;if(this.useUniqueColorsForSublayers){const t=W(r,s);i=t?X(e.length,t):null}const o=e.map((({code:e},t)=>{const o=new Y({subtypeCode:e});o.read(r,s);const a=i?.[t];return a&&o.read({drawingInfo:{renderer:a.toJSON()}},s),o}));return new(t.ofType(Y))(o)}}}},read:{source:["layers","tables"],reader(e,r,s){let i;return"SubtypeGroupLayer"===r.layerType&&r.layers?.length?i=ue(r.layers,s):"SubtypeGroupTable"===r.layerType&&r.tables?.length&&(i=ue(r.tables,s)),new(t.ofType(Y))(i)}},write:{ignoreOrigin:!0,writer(e,r,t,s){const i=[];for(const o of e){const e=o.write({},s);i.push(e)}this.isTable?r.tables=i:r.layers=i}}}})],ye.prototype,"sublayers",void 0),e([m()],ye.prototype,"useUniqueColorsForSublayers",void 0),e([m({type:ee})],ye.prototype,"timeInfo",void 0),e([m({json:{origins:{"portal-item":{write:{enabled:!0,ignoreOrigin:!0,writerEnsuresNonNull:!0}}}}})],ye.prototype,"title",void 0),e([h("service","title",["name"])],ye.prototype,"readTitleFromService",null),e([m({json:{read:!1}})],ye.prototype,"type",void 0),ye=e([f(ae)],ye);const de=ye;export{de as default};