@arcgis/core 6.0.0-next.15 → 6.0.0-next.16

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 (337) hide show
  1. package/analysis/LineOfSightAnalysis.d.ts +49 -32
  2. package/analysis/LineOfSightAnalysisObserver.d.ts +19 -3
  3. package/analysis/LineOfSightAnalysisTarget.d.ts +19 -3
  4. package/analysis/Viewshed.d.ts +23 -3
  5. package/analysis/ViewshedAnalysis.d.ts +33 -13
  6. package/arcade/geometry/operatorsWorkerConnection.js +1 -1
  7. package/assets/esri/core/workers/RemoteClient.js +1 -1
  8. package/assets/esri/core/workers/chunks/00d66e3fba5ab4d2aa3c.js +1 -0
  9. package/assets/esri/core/workers/chunks/{d994bcf0a65d1c07160f.js → 0320cbd825f9a4222042.js} +1 -1
  10. package/assets/esri/core/workers/chunks/14d5d219e7fe017f23f0.js +1 -0
  11. package/assets/esri/core/workers/chunks/164e74d586297946a717.js +1 -0
  12. package/assets/esri/core/workers/chunks/{1bca39e0e651426bdbb5.js → 1b1d3f6916d2cb751435.js} +1 -1
  13. package/assets/esri/core/workers/chunks/{ed6e9d7f71bfd2691717.js → 1c77de1e79860f8d2228.js} +1 -1
  14. package/assets/esri/core/workers/chunks/1e40a26dcce4d1dadc28.js +1 -0
  15. package/assets/esri/core/workers/chunks/237a1f68a0efbfe5b77c.js +1 -0
  16. package/assets/esri/core/workers/chunks/23c43f09c4a4749516e1.js +1 -0
  17. package/assets/esri/core/workers/chunks/{3418877328f4f0830300.js → 24dac4970526a4e0ae63.js} +1 -1
  18. package/assets/esri/core/workers/chunks/26ceb0ff8d93dbb9b84f.js +1 -0
  19. package/assets/esri/core/workers/chunks/2acf2952cef69e382a35.js +1 -0
  20. package/assets/esri/core/workers/chunks/{481589c3eddad6e026ad.js → 369780276b2755361f7d.js} +1 -1
  21. package/assets/esri/core/workers/chunks/{4df6cb1bee5d0720a43e.js → 36cbd614454581aaf334.js} +1 -1
  22. package/assets/esri/core/workers/chunks/{1e0d2715d603f48a7e0b.js → 370aad23df597db80d65.js} +1 -1
  23. package/assets/esri/core/workers/chunks/3baa4a9c52f41bfd6abb.js +1 -0
  24. package/assets/esri/core/workers/chunks/42d44c7d532df5ee70e9.js +1 -0
  25. package/assets/esri/core/workers/chunks/42e985a576d7aaeed0cf.js +1 -0
  26. package/assets/esri/core/workers/chunks/{6400446b7615b97c3521.js → 45f826554499c38968c6.js} +1 -1
  27. package/assets/esri/core/workers/chunks/48cc58890fddbcf69cef.js +1 -0
  28. package/assets/esri/core/workers/chunks/494bd434fee9032e1d02.js +1 -0
  29. package/assets/esri/core/workers/chunks/{33e4ff228a8c81b99022.js → 4abd3753cd9b80e4d937.js} +1 -1
  30. package/assets/esri/core/workers/chunks/4bbe1f28f5f16a6bef05.js +1 -0
  31. package/assets/esri/core/workers/chunks/4c389472b8cdb0c55154.js +1 -0
  32. package/assets/esri/core/workers/chunks/4e4f747de424941a0bfa.js +1 -0
  33. package/assets/esri/core/workers/chunks/5529831dd891382c79df.js +1 -0
  34. package/assets/esri/core/workers/chunks/576248e9ae2654569420.js +1 -0
  35. package/assets/esri/core/workers/chunks/5acb422fe3cf693d9d4f.js +1 -0
  36. package/assets/esri/core/workers/chunks/{aeaaff7a4b1a99540f52.js → 5cb26bbaa08114aec5ce.js} +1 -1
  37. package/assets/esri/core/workers/chunks/661c6324529dd17b297e.js +1 -0
  38. package/assets/esri/core/workers/chunks/68dd1fd2025c7125ead1.js +1 -0
  39. package/assets/esri/core/workers/chunks/{89e76de5ae3328d821a4.js → 69f6d5997b8ff1326e39.js} +1 -1
  40. package/assets/esri/core/workers/chunks/6a8dd8b18b0b825b0c1b.js +1 -0
  41. package/assets/esri/core/workers/chunks/{a40b6d8b5c73e06e14d4.js → 6c255c029d67423e4dac.js} +1 -1
  42. package/assets/esri/core/workers/chunks/7446d0dfebf93e86c098.js +1 -0
  43. package/assets/esri/core/workers/chunks/{688f2dbf784e66082308.js → 74c866e0b66e61751861.js} +1 -1
  44. package/assets/esri/core/workers/chunks/{3ffda5bf0b91700dc308.js → 78643f116677950ea29a.js} +1 -1
  45. package/assets/esri/core/workers/chunks/{916b363c342b61ba5461.js → 787c1a8bda7d745633f2.js} +1 -1
  46. package/assets/esri/core/workers/chunks/7b5f3c79e0605c32b267.js +1 -0
  47. package/assets/esri/core/workers/chunks/7bbfe9ff352afc566367.js +1 -0
  48. package/assets/esri/core/workers/chunks/{ac5a6603f7fa78d3e4c8.js → 7e8611cb709f105946f5.js} +1 -1
  49. package/assets/esri/core/workers/chunks/{05cd33d41d91f8d09633.js → 7fb7493f483cd9878bfa.js} +1 -1
  50. package/assets/esri/core/workers/chunks/{acfa03c65ba3ca6c5685.js → 8715661a838361d4211a.js} +1 -1
  51. package/assets/esri/core/workers/chunks/{601e1d020b8115497944.js → 8a485130781b49dbf608.js} +1 -1
  52. package/assets/esri/core/workers/chunks/{0ccab50877b24f862d6e.js → 8ac2098ecdc40ad41055.js} +1 -1
  53. package/assets/esri/core/workers/chunks/{a655ebdb4bf0660615a2.js → 8b4e9fd88c0c313416d4.js} +1 -1
  54. package/assets/esri/core/workers/chunks/{4e544de61f07ca660236.js → 8c12269d26f5a4c753cb.js} +1 -1
  55. package/assets/esri/core/workers/chunks/91dd65cf877c8f2e01a7.js +1 -0
  56. package/assets/esri/core/workers/chunks/{46b4fb6a7fe4877b0efc.js → 94baa354e50c03b82b25.js} +2 -2
  57. package/assets/esri/core/workers/chunks/950d4578dc450467404c.js +1 -0
  58. package/assets/esri/core/workers/chunks/{68be3fb88ca61f82fb90.js → 95dbbddac6581b9d671f.js} +1 -1
  59. package/assets/esri/core/workers/chunks/98be2f621801e230aa01.js +1 -0
  60. package/assets/esri/core/workers/chunks/9b051745d24d1f43480b.js +1 -0
  61. package/assets/esri/core/workers/chunks/9d61740ef8bdcc162be1.js +1 -0
  62. package/assets/esri/core/workers/chunks/{eb04e1717a1002cda3ab.js → 9f06ec95bdf0d0b52b41.js} +1 -1
  63. package/assets/esri/core/workers/chunks/{fafb92ca2c5e4b0b2c23.js → a09d2e1e2540921e4717.js} +1 -1
  64. package/assets/esri/core/workers/chunks/{3b3e519f15ed52c83f0c.js → a49fe94933b65b4b64f8.js} +1 -1
  65. package/assets/esri/core/workers/chunks/{1819c45655c836b9a8d7.js → a4d3944700f1cc240176.js} +1 -1
  66. package/assets/esri/core/workers/chunks/{90bdf86f553e2742d67c.js → a7bd5ba4d7d97411fd33.js} +1 -1
  67. package/assets/esri/core/workers/chunks/{900181f68449d8f82eeb.js → aa1ac7954e4f0fefe15b.js} +1 -1
  68. package/assets/esri/core/workers/chunks/ac24b4370dc7194a3107.js +1 -0
  69. package/assets/esri/core/workers/chunks/{b8337492e2b753aefac4.js → ace41659a5ca0e5abfc3.js} +1 -1
  70. package/assets/esri/core/workers/chunks/{3c0ed15b544df6fb0903.js → b48952e1fb4cb7360dd0.js} +1 -1
  71. package/assets/esri/core/workers/chunks/b5e7475cc5fbf31289d3.js +1 -0
  72. package/assets/esri/core/workers/chunks/{f3da30d7300b92bd8bb0.js → befa32b9e7b3fbdd431e.js} +1 -1
  73. package/assets/esri/core/workers/chunks/{0f617980c7dd9ad0444f.js → bf35927979fc5e7e0478.js} +1 -1
  74. package/assets/esri/core/workers/chunks/c4ddac23bd649d24f3f2.js +1 -0
  75. package/assets/esri/core/workers/chunks/{4e6f40cbdb8c508e6df1.js → c5a9e77977e867a75ff2.js} +1 -1
  76. package/assets/esri/core/workers/chunks/{25f19fc929f25ddd628c.js → c79934cd6883307203f8.js} +1 -1
  77. package/assets/esri/core/workers/chunks/cddc3e285f763ccf33c2.js +1 -0
  78. package/assets/esri/core/workers/chunks/d08ff41e2a9bcd58b64a.js +1 -0
  79. package/assets/esri/core/workers/chunks/d311ff96a5a2791d8cfc.js +1 -0
  80. package/assets/esri/core/workers/chunks/d62afb71f4ece4283994.js +1 -0
  81. package/assets/esri/core/workers/chunks/dc1761cba0454fda3cf9.js +1 -0
  82. package/assets/esri/core/workers/chunks/{4ac1d3e49e242e373a92.js → e0650b1408197d3ac862.js} +1 -1
  83. package/assets/esri/core/workers/chunks/{3ff6d1ed3c0f1285f3e7.js → e0d9dc97985561320bd4.js} +1 -1
  84. package/assets/esri/core/workers/chunks/eaddffcc7004101fc230.js +1 -0
  85. package/assets/esri/core/workers/chunks/eb2652ec48faa78de3c5.js +1 -0
  86. package/assets/esri/core/workers/chunks/eca44e53bcee9b08d70a.js +1 -0
  87. package/assets/esri/core/workers/chunks/f00458654c7c34c369ef.js +1 -0
  88. package/assets/esri/core/workers/chunks/f3cd610084e3f4d8656b.js +1 -0
  89. package/assets/esri/core/workers/chunks/f47fe4433b05fca5c3ad.js +1 -0
  90. package/assets/esri/core/workers/chunks/f7bfa3d33b05b250ce33.js +1 -0
  91. package/assets/esri/core/workers/chunks/f91bc1cb1014e05be763.js +1 -0
  92. package/assets/esri/core/workers/chunks/{ae31fd416bbb41a81392.js → f9c5aa0bbf23e780fecc.js} +1 -1
  93. package/assets/esri/core/workers/chunks/f9ff27cfcf0538ac5e26.js +1 -0
  94. package/assets/esri/core/workers/chunks/{19676b2c5f8b0a5ee680.js → facd1ff23203fed67686.js} +1 -1
  95. package/assets/esri/core/workers/chunks/{40a584cb952e94326e9e.js → fcb86d24fc7e0666b564.js} +1 -1
  96. package/chunks/Distance2DCalculator-DjIp2uQi.js +1 -1
  97. package/chunks/Envelope.js +1 -1
  98. package/chunks/MultiPathImpl.js +1 -1
  99. package/chunks/OperatorGeodeticArea.js +1 -1
  100. package/chunks/OperatorShapePreservingLength.js +1 -1
  101. package/chunks/OperatorShapePreservingProject.js +1 -1
  102. package/chunks/UnitFactory.js +1 -1
  103. package/chunks/basis_encoder.js +1 -1
  104. package/chunks/basis_transcoder.js +1 -1
  105. package/chunks/index.js +1 -1
  106. package/chunks/lclayout.js +1 -1
  107. package/config.d.ts +2 -0
  108. package/config.js +1 -1
  109. package/core/accessorSupport/DefaultsStore.js +1 -1
  110. package/core/accessorSupport/MultiOriginStore.js +1 -1
  111. package/core/accessorSupport/Store.js +1 -1
  112. package/core/accessorSupport/decorators/reader.js +1 -1
  113. package/core/accessorSupport/decorators/writer.js +1 -1
  114. package/core/workers/WorkerOwner.js +1 -1
  115. package/core/workers/workerFactory.js +1 -1
  116. package/core/workers/workers.js +2 -2
  117. package/core/workers.d.ts +9 -0
  118. package/form/elements/inputs/DynamicChoiceInput.d.ts +4 -2
  119. package/geometry/Mesh.js +1 -1
  120. package/geometry/operators/gx/operatorAlphaShape.js +1 -1
  121. package/geometry/operators/gx/operatorOffset.js +1 -1
  122. package/geometry/operators/gx/operatorPolygonSlicer.js +1 -1
  123. package/geometry/operators/support/jsonConverter.js +1 -1
  124. package/geometry/support/curves/bezierCurveUtils.js +1 -1
  125. package/geometry/support/curves/ellipticArc7Utils.js +1 -1
  126. package/geometry/support/meshUtils/merge.js +1 -1
  127. package/geometry/support/meshUtils/rotate.js +1 -1
  128. package/geometry/support/polygonExtentClipping.js +1 -1
  129. package/identity/Credential.js +1 -1
  130. package/kernel.js +1 -1
  131. package/layers/AnnotationFeatureLayer.d.ts +2 -2
  132. package/layers/AnnotationFeatureLayer.js +1 -1
  133. package/layers/CatalogLayer.d.ts +2 -2
  134. package/layers/CatalogLayer.js +1 -1
  135. package/layers/DimensionFeatureLayer.d.ts +2 -2
  136. package/layers/DimensionFeatureLayer.js +1 -1
  137. package/layers/FeatureLayer.d.ts +4 -4
  138. package/layers/FeatureLayer.js +1 -1
  139. package/layers/ImageryTileLayer.js +1 -1
  140. package/layers/LineOfSightLayer.d.ts +10 -8
  141. package/layers/SceneLayer.js +1 -1
  142. package/layers/SubtypeGroupLayer.d.ts +2 -2
  143. package/layers/SubtypeGroupLayer.js +1 -1
  144. package/layers/ViewshedLayer.d.ts +1 -1
  145. package/layers/VoxelLayer.js +1 -1
  146. package/layers/WMSLayer.js +1 -1
  147. package/layers/geospatialPDF/GeospatialPDFFrame.js +1 -1
  148. package/layers/geospatialPDF/GeospatialPDFLayerWorker.js +9 -9
  149. package/layers/geospatialPDF/GeospatialPDFWorkerClient.js +1 -1
  150. package/layers/geospatialPDF/LGIDictMapFrame.js +1 -1
  151. package/layers/geospatialPDF/ViewportMeasureFrame.js +1 -1
  152. package/layers/geospatialPDF/geospatialPDFParserUtils.js +1 -1
  153. package/layers/graphics/controllers/I3SOnDemandController.js +1 -1
  154. package/layers/graphics/data/QueryEngineResult.js +1 -1
  155. package/layers/graphics/sources/connections/WebSocketConnection.js +1 -1
  156. package/layers/graphics/sources/parquet/FileProvider.js +1 -1
  157. package/layers/graphics/sources/support/ParquetSourceWorker.js +1 -1
  158. package/layers/mixins/{FeatureLayerReload.d.ts → ReloadableLayer.d.ts} +5 -3
  159. package/layers/mixins/ReloadableLayer.js +2 -0
  160. package/layers/raster/datasets/BaseRaster.js +1 -1
  161. package/layers/raster/datasets/GeospatialPDFRaster.js +1 -1
  162. package/layers/raster/datasets/ImageAuxRaster.js +2 -2
  163. package/layers/raster/datasets/ImageServerRaster.js +1 -1
  164. package/layers/raster/datasets/InMemoryRaster.js +1 -1
  165. package/layers/raster/datasets/MRFRaster.js +1 -1
  166. package/layers/raster/datasets/TIFFRaster.js +1 -1
  167. package/layers/raster/datasets/WCSRaster.js +1 -1
  168. package/layers/raster/formats/ImageCanvasDecoder.js +1 -1
  169. package/layers/raster/formats/RasterCodec.js +1 -1
  170. package/layers/raster/formats/TiffDecoder.js +1 -1
  171. package/layers/raster/formats/Zlib.js +1 -1
  172. package/layers/raster/functions/stretchUtils.js +1 -1
  173. package/layers/raster/functions/vectorFieldUtils.js +1 -1
  174. package/layers/support/FieldsIndex.js +1 -1
  175. package/layers/support/RasterWorker.js +1 -1
  176. package/layers/support/featureReductionProperties.js +1 -1
  177. package/layers/support/kmlUtils.js +1 -1
  178. package/layers/video/VideoController.js +10 -10
  179. package/libs/maquette/projection.js +1 -1
  180. package/networks/UtilityNetworkTraceAnalysis.js +1 -1
  181. package/package.json +5 -5
  182. package/popup/FeatureModel.js +1 -1
  183. package/popup/FeaturesModel.js +1 -1
  184. package/portal/Portal.js +1 -1
  185. package/request/process.js +1 -1
  186. package/request/types.d.ts +7 -0
  187. package/rest/knowledgeGraphService.js +1 -1
  188. package/rest/networks/trace.js +1 -1
  189. package/rest/query/executeQuery.js +1 -1
  190. package/smartMapping/raster/renderers/shadedRelief.js +1 -1
  191. package/smartMapping/renderers/univariateColorSize.js +1 -1
  192. package/smartMapping/statistics/support/statsWorker.js +1 -1
  193. package/smartMapping/statistics/support/utils.js +1 -1
  194. package/smartMapping/support/clusterUtils.js +1 -1
  195. package/statistics/utils.js +1 -1
  196. package/symbols/cim/CIMCursor.js +1 -1
  197. package/symbols/cim/CIMSymbolDrawHelper.js +1 -1
  198. package/symbols/cim/cimAnalyzer.js +1 -1
  199. package/symbols/support/ElevationInfo.d.ts +4 -3
  200. package/undoredo/support/Services.js +1 -1
  201. package/views/2d/engine/vectorTiles/buckets/SymbolBucket.js +2 -2
  202. package/views/2d/engine/webgl/shaderGraph/techniques/labels/LabelMeshWriter.js +1 -1
  203. package/views/2d/grid/GridView2D.js +1 -1
  204. package/views/2d/layers/FeatureLikeLayerView2D.js +1 -1
  205. package/views/2d/layers/features/sources/strategies/FeatureHybridTileLoadStrategy.js +1 -1
  206. package/views/2d/layers/features/sources/strategies/FeaturePagedTileLoadStrategy.js +1 -1
  207. package/views/2d/layers/features/sources/strategies/FeatureSnapshotLoadStrategy.js +1 -1
  208. package/views/2d/viewpointUtils.js +1 -1
  209. package/views/3d/analysis/AreaMeasurement/support/MeasurementData.js +1 -1
  210. package/views/3d/analysis/LineOfSight/LineOfSightController.js +1 -1
  211. package/views/3d/analysis/LineOfSight/types.d.ts +14 -3
  212. package/views/3d/analysis/LineOfSightAnalysisView3D.d.ts +39 -13
  213. package/views/3d/analysis/Viewshed/ViewshedEditTool.js +1 -1
  214. package/views/3d/analysis/Viewshed/types.d.ts +7 -0
  215. package/views/3d/analysis/ViewshedAnalysisView3D.d.ts +43 -15
  216. package/views/3d/input/handlers/KeyboardNavigation.js +1 -1
  217. package/views/3d/interactive/editingTools/draw/DrawGraphicTool3D.js +1 -1
  218. package/views/3d/interactive/editingTools/reshape/ReshapeOperation.js +1 -1
  219. package/views/3d/interactive/editingTools/transform/ExtentTransformTool.js +1 -1
  220. package/views/3d/interactive/editingTools/transform/ScaleRotateTransform.js +1 -1
  221. package/views/3d/interactive/measurementTools/directLineMeasurement3D/DirectLineMeasurement3DTool.js +1 -1
  222. package/views/3d/interactive/visualElements/ExtendedLineVisualElement.js +1 -1
  223. package/views/3d/interactive/visualElements/OutlineVisualElement.js +1 -1
  224. package/views/3d/layers/graphics/Graphics3DCore.js +1 -1
  225. package/views/3d/layers/graphics/Graphics3DElevationAlignment.js +1 -1
  226. package/views/3d/layers/graphics/Graphics3DGraphic.js +1 -1
  227. package/views/3d/layers/graphics/Graphics3DIconSymbolLayer.js +1 -1
  228. package/views/3d/layers/graphics/Graphics3DPathSymbolLayer.js +1 -1
  229. package/views/3d/layers/graphics/SpatialIndex2D.js +1 -1
  230. package/views/3d/layers/i3s/I3SNode.js +1 -1
  231. package/views/3d/layers/i3s/I3SUtil.js +1 -1
  232. package/views/3d/layers/i3s/I3SViewportQueries.js +1 -1
  233. package/views/3d/layers/i3s/LayerElevationProvider.js +1 -1
  234. package/views/3d/layers/support/FeatureTileFetcher3D.js +1 -1
  235. package/views/3d/layers/support/FeatureTileFetcher3DDebugger.js +1 -1
  236. package/views/3d/layers/support/ImageHighlightHelper3D.js +1 -1
  237. package/views/3d/layers/support/StageLayerElevationProvider.js +1 -1
  238. package/views/3d/state/helpers/SceneIntersectionHelper.js +1 -1
  239. package/views/3d/support/elevationUpdateExtentUtils.js +1 -1
  240. package/views/3d/support/elevationUpdateUtils.js +1 -1
  241. package/views/3d/support/pointsOfInterest/Focus.js +1 -1
  242. package/views/3d/support/sphereExtentUtils.js +2 -0
  243. package/views/3d/terrain/OverlayFramebufferObject.js +1 -1
  244. package/views/3d/terrain/OverlayRenderer.js +1 -1
  245. package/views/3d/terrain/PatchRenderData.js +1 -1
  246. package/views/3d/webgl-engine/lib/BindParameters.js +1 -1
  247. package/views/3d/webgl-engine/lib/ManagedTexture.js +1 -1
  248. package/views/3d/webgl-engine/lib/Renderer.js +1 -1
  249. package/views/3d/webgl-engine/lib/ViewshedShadowMap.js +1 -1
  250. package/views/3d/webgl-engine/materials/internal/MaterialUtil.js +1 -1
  251. package/views/3d/webgl-engine/materials/renderers/PerBufferData.js +1 -1
  252. package/views/SceneView.js +1 -1
  253. package/views/ToolViewManager.js +1 -1
  254. package/views/draw/DrawOperation.js +1 -1
  255. package/views/draw/support/InteractiveHandle.js +1 -1
  256. package/views/draw/support/Reshape.js +1 -1
  257. package/views/draw/support/createUtils.js +1 -1
  258. package/views/draw/support/editingSessionUtils.js +1 -1
  259. package/views/draw/support/managers/InteractiveHandleManager.js +1 -1
  260. package/views/interactive/SegmentLabels.js +1 -1
  261. package/views/interactive/editGeometry/EditGeometry.js +1 -1
  262. package/views/interactive/editGeometry/EditGeometryOperations.js +1 -1
  263. package/views/interactive/editGeometry/operations/SetAllVertexPositions.js +1 -1
  264. package/views/interactive/editGeometry/operations/UndoGroup.js +1 -1
  265. package/views/interactive/options/TooltipOptions.d.ts +2 -0
  266. package/views/interactive/sketch/SketchTooltipOptions.d.ts +2 -0
  267. package/views/interactive/sketch/constraintUtils.js +1 -1
  268. package/views/interactive/snapping/SnappingDragPipelineStep.js +1 -1
  269. package/views/interactive/tooltip/components/TooltipEditableField.js +1 -1
  270. package/views/layers/LayerView.js +1 -1
  271. package/views/layers/LineOfSightLayerView.d.ts +35 -13
  272. package/views/layers/SketchLayerView.d.ts +1 -0
  273. package/views/layers/ViewshedLayerView.d.ts +36 -12
  274. package/views/webgl/Program.js +1 -1
  275. package/views/webgl/Texture.js +1 -1
  276. package/widgets/BasemapToggle/BasemapToggleViewModel.js +1 -1
  277. package/widgets/Directions.js +1 -1
  278. package/widgets/Editor/CreateFeaturesWorkflow.js +1 -1
  279. package/widgets/Editor/legacy/CreateFeaturesWorkflow.js +1 -1
  280. package/widgets/ElevationProfile/support/chartUtils.js +1 -1
  281. package/widgets/FeatureTable/support/FeatureStore.js +1 -1
  282. package/widgets/FeatureTable/support/GroupColumnTemplate.js +1 -1
  283. package/widgets/FeatureTable/support/TableTemplate.js +1 -1
  284. package/widgets/Print.js +1 -1
  285. package/widgets/Slice.js +1 -1
  286. package/widgets/UtilityNetworkTraceAnalysis/UtilityNetworkTraceAnalysisViewModel.js +1 -1
  287. package/widgets/support/SelectionList/SelectionListViewModel.js +1 -1
  288. package/widgets/support/SelectionList.js +1 -1
  289. package/widgets/support/componentsUtils.js +1 -1
  290. package/assets/esri/core/workers/chunks/024b44c0c8876627f904.js +0 -1
  291. package/assets/esri/core/workers/chunks/02c5d027bdaee67869cf.js +0 -1
  292. package/assets/esri/core/workers/chunks/03261b9451e293a0fac8.js +0 -1
  293. package/assets/esri/core/workers/chunks/0c8c01097847617261b9.js +0 -1
  294. package/assets/esri/core/workers/chunks/0d931c7579b6409a696d.js +0 -1
  295. package/assets/esri/core/workers/chunks/12c154342fff876f2f1e.js +0 -1
  296. package/assets/esri/core/workers/chunks/1e11d2e97d17685b878a.js +0 -1
  297. package/assets/esri/core/workers/chunks/1f339247b68b061ab0a4.js +0 -1
  298. package/assets/esri/core/workers/chunks/21ddb26526bcb2b122c3.js +0 -1
  299. package/assets/esri/core/workers/chunks/2eae542fe7f0f6576ac1.js +0 -1
  300. package/assets/esri/core/workers/chunks/444e5f214abce3d607cd.js +0 -1
  301. package/assets/esri/core/workers/chunks/46a7da93a63663878583.js +0 -1
  302. package/assets/esri/core/workers/chunks/4a1e23e021bac37a88ab.js +0 -1
  303. package/assets/esri/core/workers/chunks/4c4117e28ea358a32088.js +0 -1
  304. package/assets/esri/core/workers/chunks/54b18559280a7d2a8d93.js +0 -1
  305. package/assets/esri/core/workers/chunks/59b216b60464611742d4.js +0 -1
  306. package/assets/esri/core/workers/chunks/62ac588f7dd1d24d0c9d.js +0 -1
  307. package/assets/esri/core/workers/chunks/62c8c9ad09e0166207fd.js +0 -1
  308. package/assets/esri/core/workers/chunks/62d6e101e9bd9557a410.js +0 -1
  309. package/assets/esri/core/workers/chunks/6558488ea96620439f34.js +0 -1
  310. package/assets/esri/core/workers/chunks/665e31c494d2af505acc.js +0 -1
  311. package/assets/esri/core/workers/chunks/6f4e6022a52de0c54aab.js +0 -1
  312. package/assets/esri/core/workers/chunks/7267b17de212207142c9.js +0 -1
  313. package/assets/esri/core/workers/chunks/7ef182e24cad50815b4e.js +0 -1
  314. package/assets/esri/core/workers/chunks/8293600f94553afc8c38.js +0 -1
  315. package/assets/esri/core/workers/chunks/8431ca60ad33d594e323.js +0 -1
  316. package/assets/esri/core/workers/chunks/876f7633c15f1e31078d.js +0 -1
  317. package/assets/esri/core/workers/chunks/8ca9648eacb894283513.js +0 -1
  318. package/assets/esri/core/workers/chunks/91ebb2ccab1889eb7e81.js +0 -1
  319. package/assets/esri/core/workers/chunks/94e427040edb469d58ad.js +0 -1
  320. package/assets/esri/core/workers/chunks/9ce91a909eccc4dfe388.js +0 -1
  321. package/assets/esri/core/workers/chunks/9e1a3b6a08c96dcefdde.js +0 -1
  322. package/assets/esri/core/workers/chunks/9e3e442a9874ed23a043.js +0 -1
  323. package/assets/esri/core/workers/chunks/ad76f7ab2f3e6d5a5b3c.js +0 -1
  324. package/assets/esri/core/workers/chunks/aff32980d91dab07dfb7.js +0 -1
  325. package/assets/esri/core/workers/chunks/bbf993dba74850bbf9d7.js +0 -1
  326. package/assets/esri/core/workers/chunks/d8f1cefcad02d7353d4b.js +0 -1
  327. package/assets/esri/core/workers/chunks/d938987344bce83cc660.js +0 -1
  328. package/assets/esri/core/workers/chunks/ddf0671976648f621269.js +0 -1
  329. package/assets/esri/core/workers/chunks/de02f60258e6985ef676.js +0 -1
  330. package/assets/esri/core/workers/chunks/e10b57aefcc89671116e.js +0 -1
  331. package/assets/esri/core/workers/chunks/e65dfa19f030ec298437.js +0 -1
  332. package/assets/esri/core/workers/chunks/ed8786fed345718ed684.js +0 -1
  333. package/assets/esri/core/workers/chunks/f122c18af10e56f9ec2b.js +0 -1
  334. package/assets/esri/core/workers/chunks/f92364afaefbac7e8f77.js +0 -1
  335. package/assets/esri/core/workers/chunks/fd9663952d5a94f3a83f.js +0 -1
  336. package/assets/esri/core/workers/chunks/fe9879ecd69ac4329291.js +0 -1
  337. package/layers/mixins/FeatureLayerReload.js +0 -2
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../request.js";import n from"../core/Collection.js";import r from"../core/Error.js";import{getOrCreateMapValue as i}from"../core/MapUtils.js";import{MultiOriginJSONSupportMixin as a}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as o}from"../core/promiseUtils.js";import{hasSamePortal as s}from"../core/urlUtils.js";import{property as c,subclass as l}from"../core/accessorSupport/decorators.js";import u from"./Layer.js";import d from"./catalog/CatalogDynamicGroupLayer.js";import f from"./catalog/CatalogFootprintLayer.js";import p from"./graphics/sources/FeatureLayerSource.js";import{APIKeyMixin as m}from"./mixins/APIKeyMixin.js";import{ArcGISService as h}from"./mixins/ArcGISService.js";import{BlendLayer as g}from"./mixins/BlendLayer.js";import{CustomParametersMixin as _}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as v}from"./mixins/DisplayFilteredLayer.js";import{EditBusLayer as y}from"./mixins/EditBusLayer.js";import{FeatureLayerBase as b}from"./mixins/FeatureLayerBase.js";import{FeatureLayerReload as x}from"./mixins/FeatureLayerReload.js";import{OperationalLayer as S}from"./mixins/OperationalLayer.js";import{OrderedLayer as C}from"./mixins/OrderedLayer.js";import{PortalLayer as w}from"./mixins/PortalLayer.js";import{RefreshableLayer as T}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as E}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as D}from"./mixins/TemporalLayer.js";import{legendEnabled as O,id as k}from"./support/commonProperties.js";import{ensureLayerCredential as A,applyEdits as j,getFeatureType as M,hasDataChanged as N,validateBinsQuery as P}from"./support/featureLayerUtils.js";import F from"./support/FeatureType.js";import{defineFieldProperties as I}from"./support/fieldProperties.js";import{serviceSupportsSpatialReference as L}from"./support/versionUtils.js";import R from"../portal/Portal.js";import z from"../portal/PortalItem.js";import{normalizeArcGISOnlineOrgDomain as B}from"../portal/support/urlUtils.js";import V from"../rest/support/Query.js";const H=I();function U(e){return typeof e==`object`&&!!e&&`itemId`in e&&`portalUrl`in e}function W(e){return typeof e==`object`&&!!e&&`url`in e}function G(e){if(e==null)return!0;let t=Object.keys(e);return!t.length||t.length===1&&t[0]===`id`}function K(e,t,n,r){let i=e.write({},r);G(i)||(t[n]=i)}let q=class extends x(v(b(y(g(C(D(E(T(h(S(w(a(_(m(u))))))))))))))){constructor(e){super(e),this.legendEnabled=!0,this._portals=new Map,this._layerToFootprint=new WeakMap,this.drawOrderField=`cd_draworder`,this.dynamicGroupLayer=new d({parent:this}),this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.floorInfo=null,this.footprintLayer=new f({parent:this}),this.itemNameField=`cd_itemname`,this.itemSourceField=`cd_itemsource`,this.itemTypeField=`cd_itemtype`,this.layers=new n([this.dynamicGroupLayer,this.footprintLayer]),this.maxScaleField=`cd_maxscale`,this.minScaleField=`cd_minscale`,this.orderBy=null,this.outFields=null,this.supportedPortalItemTypes=[`Feature Service`],this.supportedSourceTypes=new Set([`Catalog Layer`]),this.source=new p({layer:this,supportedSourceTypes:this.supportedSourceTypes}),this.type=`catalog`,this.typeIdField=null,this.types=null}load(e){let t=e==null?null:e.signal,n=this.loadFromPortal({supportedTypes:this.supportedPortalItemTypes},e).catch(o).then(async()=>{let{url:e,source:n}=this;if(!e)throw new r(`catalog-layer:missing-url`,`Catalog layer must be created with a url`);if(this.layerId==null){let n=await this._fetchFirstValidLayerId(t);if(n!=null)this.layerId=n;else throw new r(`catalog-layer:missing-layerId`,`There is no Catalog Layer in the service`,{service:e})}await n.load({signal:t}),this._initLayerProperties(),this._verifyFields()}).then(()=>A(this,`load`,e));return this.addResolvingPromise(n),Promise.resolve(this)}destroy(){this.footprintLayer.destroy(),this.dynamicGroupLayer.destroy();for(let e of this._portals.values())e.destroy();this._portals.clear()}get createQueryVersion(){return this.commitProperty(`definitionExpression`),this.commitProperty(`timeExtent`),this.commitProperty(`timeOffset`),this.commitProperty(`geometryType`),this.commitProperty(`capabilities`),(this._get(`createQueryVersion`)??0)+1}get editingEnabled(){return this.loaded&&this.capabilities!=null&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return!1}async applyEdits(e,t){return j(this,e,t)}async createLayerFromFootprint(e){let t=await this._createLayer(e);return this._configureLayer(t,e),this._layerToFootprint.set(t,e),t}createFootprintFromLayer(e){return this._layerToFootprint.get(e)?.clone()}createQuery(){let e=new V,t=this.capabilities?.query;e.returnGeometry=!0,t&&(e.compactGeometryEnabled=t.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=t.supportsDefaultSpatialReference),e.outFields=[`*`];let{timeOffset:n,timeExtent:r}=this;return e.timeExtent=n!=null&&r!=null?r.offset(-n.value,n.unit):r||null,e.where=this.definitionExpression||`1=1`,e}getFeatureType(e){return M(this.types,this.typeIdField,e)}getFieldDomain(e,t){let n=t?.feature,r=this.getFeatureType(n);if(r){let t=r.domains&&r.domains[e];if(t&&t.type!==`inherited`)return t}return this.getField(e)?.domain}async reloadFromService(e){await this.source.reload({signal:e}),this._initLayerProperties(),this._verifyFields()}async hasDataChanged(){return N(this)}async queryFeatures(e,t){let n=await this.load(),r=await n.source.queryFeatures(V.from(e)??n.createQuery(),t),i=n.footprintLayer.graphicOrigin;if(r?.features)for(let e of r.features)e.layer=e.sourceLayer=n.footprintLayer,e.origin=i;return r}async queryObjectIds(e,t){return(await this.load()).source.queryObjectIds(V.from(e)??this.createQuery(),t)}async queryFeatureCount(e,t){return(await this.load()).source.queryFeatureCount(V.from(e)??this.createQuery(),t)}async queryExtent(e,t){return(await this.load()).source.queryExtent(V.from(e)??this.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&L(this,e)}read(e,t){if(super.read(e,t),e){let{footprintLayer:n,dynamicGroupLayer:r}=e;n&&this.footprintLayer.read(n,t),r&&this.dynamicGroupLayer.read(r,t)}}async queryAttributeBins(e,t){let{source:n,capabilities:r}=await this.load();P(e,r,`CatalogLayer`);let i=await import(`../rest/support/AttributeBinsQuery.js`),a=await n.queryAttributeBins(i.default.from(e),t);if(a.features)for(let e of a.features)e.layer=e.sourceLayer=this.footprintLayer;return a}_initLayerProperties(){let{portalItem:e,source:t}=this,{sourceJSON:n}=t;n&&(this.sourceJSON=n,this.read(n,{origin:`service`,portalItem:e,portal:e?.portal,url:this.parsedUrl}))}_verifyFields(){let e=[this.itemNameField,this.itemSourceField,this.itemTypeField,this.minScaleField,this.maxScaleField],t=e.filter(e=>!this.fieldsIndex.has(e));if(t.length)throw new r(`catalog-layer:missing-fields`,`There are missing fields to operate properly`,{requiredFields:e,missingFields:t})}async _fetchFirstValidLayerId(e){let{data:n}=await t(this.url,{query:{f:`json`,...this.customParameters,token:this.apiKey},responseType:`json`,signal:e});if(this.applyPreferredHost(n),Array.isArray(n?.layers))return n.layers.find(({type:e})=>e?this.supportedSourceTypes.has(e):!1)?.id}async _createLayer(e){let t=e.getAttribute(this.itemSourceField);if(!t)throw new r(`catalog-layer:item-source-missing`,`The footprint is missing the "${this.itemSourceField}" attribute`);let n=JSON.parse(t);if(U(n)){let{itemId:e,portalUrl:t}=n,r=B(t),a=this.portalItem?.portal,o=R.getDefault(),c,l=!0;a&&s(t,a.url)?c=a:s(t,o.url)?c=o:(c=i(this._portals,r,()=>new R({url:r})),l=!1);let d=await u.fromPortalItem(new z({id:e,portal:c}));return l||await J(d),d}if(W(n))return u.fromArcGISServerUrl({url:n.url});let{default:a}=await import(`./UnsupportedLayer.js`);return new a}_configureLayer(e,t){let n=t.getAttribute(this.itemNameField);n&&(e.title=n);let r=t.getAttribute(this.maxScaleField);r!=null&&`maxScale`in e&&(e.maxScale=r);let i=t.getAttribute(this.minScaleField);i!=null&&`minScale`in e&&(e.minScale=i)}};e([c(O)],q.prototype,`legendEnabled`,void 0),e([c({readOnly:!0})],q.prototype,`createQueryVersion`,null),e([c({readOnly:!0})],q.prototype,`drawOrderField`,void 0),e([c({type:d,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:K}}})],q.prototype,`dynamicGroupLayer`,void 0),e([c({readOnly:!0})],q.prototype,`editingEnabled`,null),e([c({readOnly:!0})],q.prototype,`effectiveEditingEnabled`,null),e([c({json:{origins:{"web-scene":{name:`layerDefinition.elevationInfo`,read:!1,write:!1}}}})],q.prototype,`elevationInfo`,void 0),e([c({...H.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],q.prototype,`fields`,void 0),e([c(H.fieldsIndex)],q.prototype,`fieldsIndex`,void 0),e([c({json:{origins:{"web-scene":{name:`layerDefinition.floorInfo`,read:!1,write:!1}}}})],q.prototype,`floorInfo`,void 0),e([c({type:f,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:K}}})],q.prototype,`footprintLayer`,void 0),e([c(k)],q.prototype,`id`,void 0),e([c({readOnly:!0})],q.prototype,`itemNameField`,void 0),e([c({readOnly:!0})],q.prototype,`itemSourceField`,void 0),e([c({readOnly:!0})],q.prototype,`itemTypeField`,void 0),e([c({readOnly:!0})],q.prototype,`layers`,void 0),e([c({type:[`show`,`hide`,`hide-children`]})],q.prototype,`listMode`,void 0),e([c({readOnly:!0})],q.prototype,`maxScaleField`,void 0),e([c({readOnly:!0})],q.prototype,`minScaleField`,void 0),e([c({value:`CatalogLayer`,type:[`CatalogLayer`]})],q.prototype,`operationalLayerType`,void 0),e([c({json:{origins:{"web-scene":{name:`layerDefinition.orderBy`,write:!0,read:!0}}}})],q.prototype,`orderBy`,void 0),e([c(H.outFields)],q.prototype,`outFields`,void 0),e([c({readOnly:!0})],q.prototype,`source`,void 0),e([c({json:{read:!1}})],q.prototype,`type`,void 0),e([c({type:String})],q.prototype,`typeIdField`,void 0),e([c({type:[F]})],q.prototype,`types`,void 0),q=e([l(`esri.layers.CatalogLayer`)],q);async function J(e){if(`portalItem`in e&&e.portalItem){try{await e.load()}catch{}e.portalItem=null,e.type===`group`&&await Promise.allSettled([...e.layers.map(e=>J(e)),...e.tables.map(e=>J(e))])}}const Y=q;export{Y as default};
2
+ import{__decorate as e}from"tslib";import t from"../request.js";import n from"../core/Collection.js";import r from"../core/Error.js";import{getOrCreateMapValue as i}from"../core/MapUtils.js";import{MultiOriginJSONSupportMixin as a}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as o}from"../core/promiseUtils.js";import{hasSamePortal as s}from"../core/urlUtils.js";import{property as c,subclass as l}from"../core/accessorSupport/decorators.js";import u from"./Layer.js";import d from"./catalog/CatalogDynamicGroupLayer.js";import f from"./catalog/CatalogFootprintLayer.js";import p from"./graphics/sources/FeatureLayerSource.js";import{APIKeyMixin as m}from"./mixins/APIKeyMixin.js";import{ArcGISService as h}from"./mixins/ArcGISService.js";import{BlendLayer as g}from"./mixins/BlendLayer.js";import{CustomParametersMixin as _}from"./mixins/CustomParametersMixin.js";import{DisplayFilteredLayer as v}from"./mixins/DisplayFilteredLayer.js";import{EditBusLayer as y}from"./mixins/EditBusLayer.js";import{FeatureLayerBase as b}from"./mixins/FeatureLayerBase.js";import{OperationalLayer as x}from"./mixins/OperationalLayer.js";import{OrderedLayer as S}from"./mixins/OrderedLayer.js";import{PortalLayer as C}from"./mixins/PortalLayer.js";import{RefreshableLayer as w}from"./mixins/RefreshableLayer.js";import{ReloadableLayer as T}from"./mixins/ReloadableLayer.js";import{ScaleRangeLayer as E}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as D}from"./mixins/TemporalLayer.js";import{legendEnabled as O,id as k}from"./support/commonProperties.js";import{ensureLayerCredential as A,applyEdits as j,getFeatureType as M,hasDataChanged as N,validateBinsQuery as P}from"./support/featureLayerUtils.js";import F from"./support/FeatureType.js";import{defineFieldProperties as I}from"./support/fieldProperties.js";import{serviceSupportsSpatialReference as L}from"./support/versionUtils.js";import R from"../portal/Portal.js";import z from"../portal/PortalItem.js";import{normalizeArcGISOnlineOrgDomain as B}from"../portal/support/urlUtils.js";import V from"../rest/support/Query.js";const H=I();function U(e){return typeof e==`object`&&!!e&&`itemId`in e&&`portalUrl`in e}function W(e){return typeof e==`object`&&!!e&&`url`in e}function G(e){if(e==null)return!0;let t=Object.keys(e);return!t.length||t.length===1&&t[0]===`id`}function K(e,t,n,r){let i=e.write({},r);G(i)||(t[n]=i)}let q=class extends T(v(b(y(g(S(D(E(w(h(x(C(a(_(m(u))))))))))))))){constructor(e){super(e),this.legendEnabled=!0,this._portals=new Map,this._layerToFootprint=new WeakMap,this.drawOrderField=`cd_draworder`,this.dynamicGroupLayer=new d({parent:this}),this.elevationInfo=null,this.fields=null,this.fieldsIndex=null,this.floorInfo=null,this.footprintLayer=new f({parent:this}),this.itemNameField=`cd_itemname`,this.itemSourceField=`cd_itemsource`,this.itemTypeField=`cd_itemtype`,this.layers=new n([this.dynamicGroupLayer,this.footprintLayer]),this.maxScaleField=`cd_maxscale`,this.minScaleField=`cd_minscale`,this.orderBy=null,this.outFields=null,this.supportedPortalItemTypes=[`Feature Service`],this.supportedSourceTypes=new Set([`Catalog Layer`]),this.source=new p({layer:this,supportedSourceTypes:this.supportedSourceTypes}),this.type=`catalog`,this.typeIdField=null,this.types=null}load(e){let t=e==null?null:e.signal,n=this.loadFromPortal({supportedTypes:this.supportedPortalItemTypes},e).catch(o).then(async()=>{let{url:e,source:n}=this;if(!e)throw new r(`catalog-layer:missing-url`,`Catalog layer must be created with a url`);if(this.layerId==null){let n=await this._fetchFirstValidLayerId(t);if(n!=null)this.layerId=n;else throw new r(`catalog-layer:missing-layerId`,`There is no Catalog Layer in the service`,{service:e})}await n.load({signal:t}),this._initLayerProperties(),this._verifyFields()}).then(()=>A(this,`load`,e));return this.addResolvingPromise(n),Promise.resolve(this)}destroy(){this.footprintLayer.destroy(),this.dynamicGroupLayer.destroy();for(let e of this._portals.values())e.destroy();this._portals.clear()}get createQueryVersion(){return this.commitProperty(`definitionExpression`),this.commitProperty(`timeExtent`),this.commitProperty(`timeOffset`),this.commitProperty(`geometryType`),this.commitProperty(`capabilities`),(this._get(`createQueryVersion`)??0)+1}get editingEnabled(){return this.loaded&&this.capabilities!=null&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}get effectiveEditingEnabled(){return!1}async applyEdits(e,t){return j(this,e,t)}async createLayerFromFootprint(e){let t=await this._createLayer(e);return this._configureLayer(t,e),this._layerToFootprint.set(t,e),t}createFootprintFromLayer(e){return this._layerToFootprint.get(e)?.clone()}createQuery(){let e=new V,t=this.capabilities?.query;e.returnGeometry=!0,t&&(e.compactGeometryEnabled=t.supportsCompactGeometry,e.defaultSpatialReferenceEnabled=t.supportsDefaultSpatialReference),e.outFields=[`*`];let{timeOffset:n,timeExtent:r}=this;return e.timeExtent=n!=null&&r!=null?r.offset(-n.value,n.unit):r||null,e.where=this.definitionExpression||`1=1`,e}getFeatureType(e){return M(this.types,this.typeIdField,e)}getFieldDomain(e,t){let n=t?.feature,r=this.getFeatureType(n);if(r){let t=r.domains&&r.domains[e];if(t&&t.type!==`inherited`)return t}return this.getField(e)?.domain}async reloadFromService(e){await this.source.reload({signal:e}),this._initLayerProperties(),this._verifyFields()}async hasDataChanged(){return N(this)}async queryFeatures(e,t){let n=await this.load(),r=await n.source.queryFeatures(V.from(e)??n.createQuery(),t),i=n.footprintLayer.graphicOrigin;if(r?.features)for(let e of r.features)e.layer=e.sourceLayer=n.footprintLayer,e.origin=i;return r}async queryObjectIds(e,t){return(await this.load()).source.queryObjectIds(V.from(e)??this.createQuery(),t)}async queryFeatureCount(e,t){return(await this.load()).source.queryFeatureCount(V.from(e)??this.createQuery(),t)}async queryExtent(e,t){return(await this.load()).source.queryExtent(V.from(e)??this.createQuery(),t)}serviceSupportsSpatialReference(e){return this.loaded&&L(this,e)}read(e,t){if(super.read(e,t),e){let{footprintLayer:n,dynamicGroupLayer:r}=e;n&&this.footprintLayer.read(n,t),r&&this.dynamicGroupLayer.read(r,t)}}async queryAttributeBins(e,t){let{source:n,capabilities:r}=await this.load();P(e,r,`CatalogLayer`);let i=await import(`../rest/support/AttributeBinsQuery.js`),a=await n.queryAttributeBins(i.default.from(e),t);if(a.features)for(let e of a.features)e.layer=e.sourceLayer=this.footprintLayer;return a}_initLayerProperties(){let{portalItem:e,source:t}=this,{sourceJSON:n}=t;n&&(this.sourceJSON=n,this.read(n,{origin:`service`,portalItem:e,portal:e?.portal,url:this.parsedUrl}))}_verifyFields(){let e=[this.itemNameField,this.itemSourceField,this.itemTypeField,this.minScaleField,this.maxScaleField],t=e.filter(e=>!this.fieldsIndex.has(e));if(t.length)throw new r(`catalog-layer:missing-fields`,`There are missing fields to operate properly`,{requiredFields:e,missingFields:t})}async _fetchFirstValidLayerId(e){let{data:n}=await t(this.url,{query:{f:`json`,...this.customParameters,token:this.apiKey},responseType:`json`,signal:e});if(this.applyPreferredHost(n),Array.isArray(n?.layers))return n.layers.find(({type:e})=>e?this.supportedSourceTypes.has(e):!1)?.id}async _createLayer(e){let t=e.getAttribute(this.itemSourceField);if(!t)throw new r(`catalog-layer:item-source-missing`,`The footprint is missing the "${this.itemSourceField}" attribute`);let n=JSON.parse(t);if(U(n)){let{itemId:e,portalUrl:t}=n,r=B(t),a=this.portalItem?.portal,o=R.getDefault(),c,l=!0;a&&s(t,a.url)?c=a:s(t,o.url)?c=o:(c=i(this._portals,r,()=>new R({url:r})),l=!1);let d=await u.fromPortalItem(new z({id:e,portal:c}));return l||await J(d),d}if(W(n))return u.fromArcGISServerUrl({url:n.url});let{default:a}=await import(`./UnsupportedLayer.js`);return new a}_configureLayer(e,t){let n=t.getAttribute(this.itemNameField);n&&(e.title=n);let r=t.getAttribute(this.maxScaleField);r!=null&&`maxScale`in e&&(e.maxScale=r);let i=t.getAttribute(this.minScaleField);i!=null&&`minScale`in e&&(e.minScale=i)}};e([c(O)],q.prototype,`legendEnabled`,void 0),e([c({readOnly:!0})],q.prototype,`createQueryVersion`,null),e([c({readOnly:!0})],q.prototype,`drawOrderField`,void 0),e([c({type:d,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:K}}})],q.prototype,`dynamicGroupLayer`,void 0),e([c({readOnly:!0})],q.prototype,`editingEnabled`,null),e([c({readOnly:!0})],q.prototype,`effectiveEditingEnabled`,null),e([c({json:{origins:{"web-scene":{name:`layerDefinition.elevationInfo`,read:!1,write:!1}}}})],q.prototype,`elevationInfo`,void 0),e([c({...H.fields,readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],q.prototype,`fields`,void 0),e([c(H.fieldsIndex)],q.prototype,`fieldsIndex`,void 0),e([c({json:{origins:{"web-scene":{name:`layerDefinition.floorInfo`,read:!1,write:!1}}}})],q.prototype,`floorInfo`,void 0),e([c({type:f,readOnly:!0,json:{read:!1,write:{ignoreOrigin:!0,writer:K}}})],q.prototype,`footprintLayer`,void 0),e([c(k)],q.prototype,`id`,void 0),e([c({readOnly:!0})],q.prototype,`itemNameField`,void 0),e([c({readOnly:!0})],q.prototype,`itemSourceField`,void 0),e([c({readOnly:!0})],q.prototype,`itemTypeField`,void 0),e([c({readOnly:!0})],q.prototype,`layers`,void 0),e([c({type:[`show`,`hide`,`hide-children`]})],q.prototype,`listMode`,void 0),e([c({readOnly:!0})],q.prototype,`maxScaleField`,void 0),e([c({readOnly:!0})],q.prototype,`minScaleField`,void 0),e([c({value:`CatalogLayer`,type:[`CatalogLayer`]})],q.prototype,`operationalLayerType`,void 0),e([c({json:{origins:{"web-scene":{name:`layerDefinition.orderBy`,write:!0,read:!0}}}})],q.prototype,`orderBy`,void 0),e([c(H.outFields)],q.prototype,`outFields`,void 0),e([c({readOnly:!0})],q.prototype,`source`,void 0),e([c({json:{read:!1}})],q.prototype,`type`,void 0),e([c({type:String})],q.prototype,`typeIdField`,void 0),e([c({type:[F]})],q.prototype,`types`,void 0),q=e([l(`esri.layers.CatalogLayer`)],q);async function J(e){if(`portalItem`in e&&e.portalItem){try{await e.load()}catch{}e.portalItem=null,e.type===`group`&&await Promise.allSettled([...e.layers.map(e=>J(e)),...e.tables.map(e=>J(e))])}}const Y=q;export{Y as default};
@@ -14,10 +14,10 @@ import type { BlendLayer, BlendLayerProperties } from "./mixins/BlendLayer.js";
14
14
  import type { CustomParametersMixin, CustomParametersMixinProperties } from "./mixins/CustomParametersMixin.js";
15
15
  import type { EditBusLayerEvents } from "./mixins/EditBusLayer.js";
16
16
  import type { FeatureLayerBase, FeatureLayerBaseProperties } from "./mixins/FeatureLayerBase.js";
17
- import type { FeatureLayerReload } from "./mixins/FeatureLayerReload.js";
18
17
  import type { OperationalLayer, OperationalLayerProperties } from "./mixins/OperationalLayer.js";
19
18
  import type { PortalLayer, PortalLayerProperties } from "./mixins/PortalLayer.js";
20
19
  import type { RefreshableLayer, RefreshableLayerEvents, RefreshableLayerProperties } from "./mixins/RefreshableLayer.js";
20
+ import type { ReloadableLayer } from "./mixins/ReloadableLayer.js";
21
21
  import type { ScaleRangeLayer, ScaleRangeLayerProperties } from "./mixins/ScaleRangeLayer.js";
22
22
  import type { TemporalLayer, TemporalLayerProperties } from "./mixins/TemporalLayer.js";
23
23
  import type { PortalItemProperties } from "../portal/PortalItem.js";
@@ -381,4 +381,4 @@ export default class DimensionFeatureLayer extends DimensionFeatureLayerSupercla
381
381
  */
382
382
  saveAs(portalItem: PortalItemProperties, options?: LayerSaveAsOptions): Promise<PortalItem>;
383
383
  }
384
- declare const DimensionFeatureLayerSuperclass: typeof Layer & typeof ClonableMixin & typeof APIKeyMixin & typeof CustomParametersMixin & typeof MultiOriginJSONSupportMixin & typeof PortalLayer & typeof OperationalLayer & typeof RefreshableLayer & typeof ScaleRangeLayer & typeof TemporalLayer & typeof BlendLayer & typeof FeatureLayerBase & typeof FeatureLayerReload
384
+ declare const DimensionFeatureLayerSuperclass: typeof Layer & typeof ClonableMixin & typeof APIKeyMixin & typeof CustomParametersMixin & typeof MultiOriginJSONSupportMixin & typeof PortalLayer & typeof OperationalLayer & typeof RefreshableLayer & typeof ScaleRangeLayer & typeof TemporalLayer & typeof BlendLayer & typeof FeatureLayerBase & typeof ReloadableLayer
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__addDisposableResource as e,__disposeResources as t,__decorate as n}from"tslib";import r from"../PopupTemplate.js";import i from"../request.js";import{ClonableMixin as a}from"../core/Clonable.js";import o from"../core/Error.js";import{disposable as s,makeHandle as c}from"../core/handleUtils.js";import{MultiOriginJSONSupportMixin as l}from"../core/MultiOriginJSONSupport.js";import{debounce as u,throwIfAbortError as d,whenOrAbort as f,onAbort as p}from"../core/promiseUtils.js";import{property as m,subclass as h}from"../core/accessorSupport/decorators.js";import g from"../geometry/SpatialReference.js";import _ from"../graphic/DimensionFeatureGraphicOrigin.js";import v from"./Layer.js";import{APIKeyMixin as y}from"./mixins/APIKeyMixin.js";import{ArcGISService as b}from"./mixins/ArcGISService.js";import{BlendLayer as x}from"./mixins/BlendLayer.js";import{CustomParametersMixin as S}from"./mixins/CustomParametersMixin.js";import{DataElementMixin as C}from"./mixins/DataElementMixin.js";import{FeatureLayerBase as w}from"./mixins/FeatureLayerBase.js";import{FeatureLayerReload as T}from"./mixins/FeatureLayerReload.js";import{OperationalLayer as E}from"./mixins/OperationalLayer.js";import{PortalLayer as D}from"./mixins/PortalLayer.js";import{RefreshableLayer as O}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as k}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as A}from"./mixins/TemporalLayer.js";import{parse as j,cleanTitle as M,titleFromUrlAndName as N}from"./support/arcgisLayerUrl.js";import{barrierWeight as P,id as F,popupEnabled as I}from"./support/commonProperties.js";import{ensureLayerCredential as L,createQuery as R,getFieldDomain as z,hasDataChanged as B}from"./support/featureLayerUtils.js";import{defineFieldProperties as V}from"./support/fieldProperties.js";import{fixTimeInfoFields as H}from"./support/fieldUtils.js";import{serviceSupportsSpatialReference as U}from"./support/versionUtils.js";import W from"../rest/support/Query.js";import{createPopupTemplate as G}from"../support/popupUtils.js";import{reader as K}from"../core/accessorSupport/decorators/reader.js";const q=`dimension-feature-layer`,J=V();let Y=class extends T(C(w(x(A(k(O(b(E(D(l(S(y(a(v)))))))))))))){constructor(e){super(e),this.barrierWeight=`high`,this.fields=null,this.fieldsIndex=null,this.graphicOrigin=new _(this),this.operationalLayerType=`ArcGISDimensionLayer`,this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.referenceScale=0,this.source=null,this.styleCollection=null,this.sublayerTitleMode=`item-title`,this.supportedPortalItemTypes=[`Feature Service`],this.supportedSourceTypes=new Set([`Dimension Layer`]),this.symbolFields=[`STYLEID`,`BEGINX`,`BEGINY`,`ENDX`,`ENDY`,`DIMDISPLAY`,`EXTDISPLAY`,`MARKERDISPLAY`,`DIMX`,`DIMY`,`TEXTX`,`TEXTY`,`DIMLENGTH`,`DIMTYPE`,`EXTANGLE`,`TEXTANGLE`,`USECUSTOMLENGTH`,`CUSTOMLENGTH `],this.type=`dimension-feature`,this._debouncedSaveOperations=u(async(e,t,n)=>{let{save:r,saveAs:i}=await import(`./save/featureLayerUtils.js`);switch(e){case 0:return r(this,t);case 1:return i(this,n,t)}})}destroy(){this.source?.destroy()}load(e){let t=e?.signal,n=this.loadFromPortal({supportedTypes:this.supportedPortalItemTypes},e).catch(d).then(async()=>{if(this.url&&this.layerId==null&&/FeatureServer|MapServer\/*$/i.test(this.url)){let e=await this._fetchFirstValidLayerId(t);e!=null&&(this.layerId=e)}if(!this.url)throw new o(`${q}:missing-url`,`DimensionFeatureLayer must be created with a url`);return Promise.all([this.loadDataElement(e).then(()=>{if(!this.styleCollection)throw new o(`${q}:missing-style-collection`,`Invalid service with no style collection`)}),this.initLayerProperties(await this.createGraphicsSource(t))])}).then(()=>L(this,`load`,e));return this.addResolvingPromise(n),Promise.resolve(this)}get editingEnabled(){return this._isOverridden(`editingEnabled`)?this._get(`editingEnabled`):this.loaded&&this.capabilities!=null&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome(`editingEnabled`,e)}get effectiveEditingEnabled(){return!1}get defaultPopupTemplate(){return this.createPopupTemplate()}readTitleFromService(e,t){let{url:n}=this,r=t.name||j(n)?.title;switch(this.sublayerTitleMode){case`item-title`:if(n)return N(n,r);break;case`item-title-and-service-name`:{let e=this.portalItem?.title;if(e&&e!==r)return e=M(e),r?`${e} - ${M(r)}`:e;break}}return r?M(r):void 0}readTitleFromPortalItem(e){return this.sublayerTitleMode===`item-title`?e:void 0}createPopupTemplate(e){return G(this,e)}async createGraphicsSource(n){let r={stack:[],error:void 0,hasError:!1};try{let{default:t}=await f(import(`./graphics/sources/FeatureLayerSource.js`),n),i=new t({layer:this,supportedSourceTypes:this.supportedSourceTypes});return e(r,s(p(n,()=>i.cancelLoad())??c()),!1),await i.load({signal:n}),i}catch(e){r.error=e,r.hasError=!0}finally{t(r)}}createQuery(){let e=R(this);return e.where=this.definitionExpression||`1=1`,e}getFieldDomain(e,t){return z(this,e,t,this.getField(e)?.domain??null)}async queryFeatures(e,t){let n=await this.load(),r=await n.source.queryFeatures(W.from(e)??n.createQuery(),t),i=this.graphicOrigin;if(r?.features)for(let e of r.features)e.layer=e.sourceLayer=n,e.origin=i;return r}async queryObjectIds(e,t){let n=await this.load();return n.source.queryObjectIds(W.from(e)??n.createQuery(),t)}async queryFeatureCount(e,t){let n=await this.load();return n.source.queryFeatureCount(W.from(e)??n.createQuery(),t)}async queryExtent(e,t){let n=await this.load();return n.source.queryExtent(W.from(e)??n.createQuery(),t)}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}serviceSupportsSpatialReference(e){return this.loaded&&U(this,e)}async initLayerProperties(e){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(),H(this.timeInfo,this.fieldsIndex)}async reloadFromService(e){let t=this.source;await Promise.all([t.reload({signal:e}),this.loadDataElement({signal:e})]),await this.initLayerProperties(t)}async hasDataChanged(){return B(this)}_verifySource(){if(this.version&&this.version<10.8)throw new o(q+`:unsupported-version`,`The feature service must be version 10.8 or above.`);let e=[`DIMLENGTH`,`BEGINX`,`BEGINY`,`ENDX`,`ENDY`,`DIMX`,`DIMY`,`TEXTX`,`TEXTY`,`DIMTYPE`,`EXTANGLE`,`STYLEID`,`USECUSTOMLENGTH`,`CUSTOMLENGTH`,`DIMDISPLAY`,`EXTDISPLAY`,`MARKERDISPLAY`,`TEXTANGLE`],t=e.filter(e=>!this.fieldsIndex.has(e));if(t.length)throw new o(q+`:missing-fields`,`There are missing fields to operate properly`,{requiredFields:e,missingFields:t})}_fetchFirstValidLayerId(e){return i(this.url??``,{query:{f:`json`,...this.customParameters,token:this.apiKey},responseType:`json`,signal:e}).then(e=>{let t=e.data;return t?(this.applyPreferredHost(t),[...t.layers||[],...t.tables||[]].find(({type:e})=>!e||this.supportedSourceTypes.has(e))?.id):void 0})}};n([m({type:g,json:{origins:{service:{read:{source:`sourceSpatialReference`}}}}})],Y.prototype,`attributeSpatialReference`,void 0),n([m(P)],Y.prototype,`barrierWeight`,void 0),n([m({nonNullable:!0,json:{name:`enableEditing`,write:!0}})],Y.prototype,`editingEnabled`,null),n([m({readOnly:!0})],Y.prototype,`effectiveEditingEnabled`,null),n([m({...J.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Y.prototype,`fields`,void 0),n([m(J.fieldsIndex)],Y.prototype,`fieldsIndex`,void 0),n([m({readOnly:!0,clonable:!1})],Y.prototype,`graphicOrigin`,void 0),n([m(F)],Y.prototype,`id`,void 0),n([m({type:[`show`,`hide`],json:{origins:{"portal-item":{read:!1,write:!1}}}})],Y.prototype,`listMode`,void 0),n([m({type:[`ArcGISDimensionLayer`],json:{origins:{"portal-item":{name:`layerType`,write:{enabled:!0,ignoreOrigin:!0,isRequired:!0}}}}})],Y.prototype,`operationalLayerType`,void 0),n([m(J.outFields)],Y.prototype,`outFields`,void 0),n([m(I)],Y.prototype,`popupEnabled`,void 0),n([m({type:r,json:{name:`popupInfo`,write:!0}})],Y.prototype,`popupTemplate`,void 0),n([m({readOnly:!0})],Y.prototype,`defaultPopupTemplate`,null),n([m({readOnly:!0})],Y.prototype,`referenceScale`,void 0),n([m({clonable:!1,readOnly:!0})],Y.prototype,`source`,void 0),n([m()],Y.prototype,`styleCollection`,void 0),n([m({type:String})],Y.prototype,`sublayerTitleMode`,void 0),n([m({readOnly:!0})],Y.prototype,`symbolFields`,void 0),n([K(`service`,`title`,[`name`])],Y.prototype,`readTitleFromService`,null),n([K(`portal-item`,`title`)],Y.prototype,`readTitleFromPortalItem`,null),n([m({json:{read:!1},value:`dimension-feature`,readOnly:!0})],Y.prototype,`type`,void 0),Y=n([h(`esri.layers.DimensionFeatureLayer`)],Y);const X=Y;export{X as default};
2
+ import{__addDisposableResource as e,__disposeResources as t,__decorate as n}from"tslib";import r from"../PopupTemplate.js";import i from"../request.js";import{ClonableMixin as a}from"../core/Clonable.js";import o from"../core/Error.js";import{disposable as s,makeHandle as c}from"../core/handleUtils.js";import{MultiOriginJSONSupportMixin as l}from"../core/MultiOriginJSONSupport.js";import{debounce as u,throwIfAbortError as d,whenOrAbort as f,onAbort as p}from"../core/promiseUtils.js";import{property as m,subclass as h}from"../core/accessorSupport/decorators.js";import g from"../geometry/SpatialReference.js";import _ from"../graphic/DimensionFeatureGraphicOrigin.js";import v from"./Layer.js";import{APIKeyMixin as y}from"./mixins/APIKeyMixin.js";import{ArcGISService as b}from"./mixins/ArcGISService.js";import{BlendLayer as x}from"./mixins/BlendLayer.js";import{CustomParametersMixin as S}from"./mixins/CustomParametersMixin.js";import{DataElementMixin as C}from"./mixins/DataElementMixin.js";import{FeatureLayerBase as w}from"./mixins/FeatureLayerBase.js";import{OperationalLayer as T}from"./mixins/OperationalLayer.js";import{PortalLayer as E}from"./mixins/PortalLayer.js";import{RefreshableLayer as D}from"./mixins/RefreshableLayer.js";import{ReloadableLayer as O}from"./mixins/ReloadableLayer.js";import{ScaleRangeLayer as k}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as A}from"./mixins/TemporalLayer.js";import{parse as j,cleanTitle as M,titleFromUrlAndName as N}from"./support/arcgisLayerUrl.js";import{barrierWeight as P,id as F,popupEnabled as I}from"./support/commonProperties.js";import{ensureLayerCredential as L,createQuery as R,getFieldDomain as z,hasDataChanged as B}from"./support/featureLayerUtils.js";import{defineFieldProperties as V}from"./support/fieldProperties.js";import{fixTimeInfoFields as H}from"./support/fieldUtils.js";import{serviceSupportsSpatialReference as U}from"./support/versionUtils.js";import W from"../rest/support/Query.js";import{createPopupTemplate as G}from"../support/popupUtils.js";import{reader as K}from"../core/accessorSupport/decorators/reader.js";const q=`dimension-feature-layer`,J=V();let Y=class extends O(C(w(x(A(k(D(b(T(E(l(S(y(a(v)))))))))))))){constructor(e){super(e),this.barrierWeight=`high`,this.fields=null,this.fieldsIndex=null,this.graphicOrigin=new _(this),this.operationalLayerType=`ArcGISDimensionLayer`,this.outFields=null,this.popupEnabled=!0,this.popupTemplate=null,this.referenceScale=0,this.source=null,this.styleCollection=null,this.sublayerTitleMode=`item-title`,this.supportedPortalItemTypes=[`Feature Service`],this.supportedSourceTypes=new Set([`Dimension Layer`]),this.symbolFields=[`STYLEID`,`BEGINX`,`BEGINY`,`ENDX`,`ENDY`,`DIMDISPLAY`,`EXTDISPLAY`,`MARKERDISPLAY`,`DIMX`,`DIMY`,`TEXTX`,`TEXTY`,`DIMLENGTH`,`DIMTYPE`,`EXTANGLE`,`TEXTANGLE`,`USECUSTOMLENGTH`,`CUSTOMLENGTH `],this.type=`dimension-feature`,this._debouncedSaveOperations=u(async(e,t,n)=>{let{save:r,saveAs:i}=await import(`./save/featureLayerUtils.js`);switch(e){case 0:return r(this,t);case 1:return i(this,n,t)}})}destroy(){this.source?.destroy()}load(e){let t=e?.signal,n=this.loadFromPortal({supportedTypes:this.supportedPortalItemTypes},e).catch(d).then(async()=>{if(this.url&&this.layerId==null&&/FeatureServer|MapServer\/*$/i.test(this.url)){let e=await this._fetchFirstValidLayerId(t);e!=null&&(this.layerId=e)}if(!this.url)throw new o(`${q}:missing-url`,`DimensionFeatureLayer must be created with a url`);return Promise.all([this.loadDataElement(e).then(()=>{if(!this.styleCollection)throw new o(`${q}:missing-style-collection`,`Invalid service with no style collection`)}),this.initLayerProperties(await this.createGraphicsSource(t))])}).then(()=>L(this,`load`,e));return this.addResolvingPromise(n),Promise.resolve(this)}get editingEnabled(){return this._isOverridden(`editingEnabled`)?this._get(`editingEnabled`):this.loaded&&this.capabilities!=null&&this.capabilities.operations.supportsEditing&&this.userHasEditingPrivileges}set editingEnabled(e){this._overrideIfSome(`editingEnabled`,e)}get effectiveEditingEnabled(){return!1}get defaultPopupTemplate(){return this.createPopupTemplate()}readTitleFromService(e,t){let{url:n}=this,r=t.name||j(n)?.title;switch(this.sublayerTitleMode){case`item-title`:if(n)return N(n,r);break;case`item-title-and-service-name`:{let e=this.portalItem?.title;if(e&&e!==r)return e=M(e),r?`${e} - ${M(r)}`:e;break}}return r?M(r):void 0}readTitleFromPortalItem(e){return this.sublayerTitleMode===`item-title`?e:void 0}createPopupTemplate(e){return G(this,e)}async createGraphicsSource(n){let r={stack:[],error:void 0,hasError:!1};try{let{default:t}=await f(import(`./graphics/sources/FeatureLayerSource.js`),n),i=new t({layer:this,supportedSourceTypes:this.supportedSourceTypes});return e(r,s(p(n,()=>i.cancelLoad())??c()),!1),await i.load({signal:n}),i}catch(e){r.error=e,r.hasError=!0}finally{t(r)}}createQuery(){let e=R(this);return e.where=this.definitionExpression||`1=1`,e}getFieldDomain(e,t){return z(this,e,t,this.getField(e)?.domain??null)}async queryFeatures(e,t){let n=await this.load(),r=await n.source.queryFeatures(W.from(e)??n.createQuery(),t),i=this.graphicOrigin;if(r?.features)for(let e of r.features)e.layer=e.sourceLayer=n,e.origin=i;return r}async queryObjectIds(e,t){let n=await this.load();return n.source.queryObjectIds(W.from(e)??n.createQuery(),t)}async queryFeatureCount(e,t){let n=await this.load();return n.source.queryFeatureCount(W.from(e)??n.createQuery(),t)}async queryExtent(e,t){let n=await this.load();return n.source.queryExtent(W.from(e)??n.createQuery(),t)}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}serviceSupportsSpatialReference(e){return this.loaded&&U(this,e)}async initLayerProperties(e){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(),H(this.timeInfo,this.fieldsIndex)}async reloadFromService(e){let t=this.source;await Promise.all([t.reload({signal:e}),this.loadDataElement({signal:e})]),await this.initLayerProperties(t)}async hasDataChanged(){return B(this)}_verifySource(){if(this.version&&this.version<10.8)throw new o(q+`:unsupported-version`,`The feature service must be version 10.8 or above.`);let e=[`DIMLENGTH`,`BEGINX`,`BEGINY`,`ENDX`,`ENDY`,`DIMX`,`DIMY`,`TEXTX`,`TEXTY`,`DIMTYPE`,`EXTANGLE`,`STYLEID`,`USECUSTOMLENGTH`,`CUSTOMLENGTH`,`DIMDISPLAY`,`EXTDISPLAY`,`MARKERDISPLAY`,`TEXTANGLE`],t=e.filter(e=>!this.fieldsIndex.has(e));if(t.length)throw new o(q+`:missing-fields`,`There are missing fields to operate properly`,{requiredFields:e,missingFields:t})}_fetchFirstValidLayerId(e){return i(this.url??``,{query:{f:`json`,...this.customParameters,token:this.apiKey},responseType:`json`,signal:e}).then(e=>{let t=e.data;return t?(this.applyPreferredHost(t),[...t.layers||[],...t.tables||[]].find(({type:e})=>!e||this.supportedSourceTypes.has(e))?.id):void 0})}};n([m({type:g,json:{origins:{service:{read:{source:`sourceSpatialReference`}}}}})],Y.prototype,`attributeSpatialReference`,void 0),n([m(P)],Y.prototype,`barrierWeight`,void 0),n([m({nonNullable:!0,json:{name:`enableEditing`,write:!0}})],Y.prototype,`editingEnabled`,null),n([m({readOnly:!0})],Y.prototype,`effectiveEditingEnabled`,null),n([m({...J.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Y.prototype,`fields`,void 0),n([m(J.fieldsIndex)],Y.prototype,`fieldsIndex`,void 0),n([m({readOnly:!0,clonable:!1})],Y.prototype,`graphicOrigin`,void 0),n([m(F)],Y.prototype,`id`,void 0),n([m({type:[`show`,`hide`],json:{origins:{"portal-item":{read:!1,write:!1}}}})],Y.prototype,`listMode`,void 0),n([m({type:[`ArcGISDimensionLayer`],json:{origins:{"portal-item":{name:`layerType`,write:{enabled:!0,ignoreOrigin:!0,isRequired:!0}}}}})],Y.prototype,`operationalLayerType`,void 0),n([m(J.outFields)],Y.prototype,`outFields`,void 0),n([m(I)],Y.prototype,`popupEnabled`,void 0),n([m({type:r,json:{name:`popupInfo`,write:!0}})],Y.prototype,`popupTemplate`,void 0),n([m({readOnly:!0})],Y.prototype,`defaultPopupTemplate`,null),n([m({readOnly:!0})],Y.prototype,`referenceScale`,void 0),n([m({clonable:!1,readOnly:!0})],Y.prototype,`source`,void 0),n([m()],Y.prototype,`styleCollection`,void 0),n([m({type:String})],Y.prototype,`sublayerTitleMode`,void 0),n([m({readOnly:!0})],Y.prototype,`symbolFields`,void 0),n([K(`service`,`title`,[`name`])],Y.prototype,`readTitleFromService`,null),n([K(`portal-item`,`title`)],Y.prototype,`readTitleFromPortalItem`,null),n([m({json:{read:!1},value:`dimension-feature`,readOnly:!0})],Y.prototype,`type`,void 0),Y=n([h(`esri.layers.DimensionFeatureLayer`)],Y);const X=Y;export{X as default};
@@ -32,13 +32,13 @@ import type { DisplayFilteredLayer, DisplayFilteredLayerProperties } from "./mix
32
32
  import type { EditBusLayer, EditBusLayerEvents } from "./mixins/EditBusLayer.js";
33
33
  import type { FeatureEffectLayer, FeatureEffectLayerProperties } from "./mixins/FeatureEffectLayer.js";
34
34
  import type { FeatureLayerBase, FeatureLayerBaseProperties } from "./mixins/FeatureLayerBase.js";
35
- import type { FeatureLayerReload } from "./mixins/FeatureLayerReload.js";
36
35
  import type { FeatureReductionLayer, FeatureReductionLayerProperties } from "./mixins/FeatureReductionLayer.js";
37
36
  import type { OperationalLayer, OperationalLayerProperties } from "./mixins/OperationalLayer.js";
38
37
  import type { OrderedLayer, OrderedLayerProperties } from "./mixins/OrderedLayer.js";
39
38
  import type { PortalLayer, PortalLayerProperties } from "./mixins/PortalLayer.js";
40
39
  import type { PublishableLayer, PublishableLayerProperties } from "./mixins/PublishableLayer.js";
41
40
  import type { RefreshableLayerEvents, RefreshableLayer, RefreshableLayerProperties } from "./mixins/RefreshableLayer.js";
41
+ import type { ReloadableLayer } from "./mixins/ReloadableLayer.js";
42
42
  import type { ScaleRangeLayer, ScaleRangeLayerProperties } from "./mixins/ScaleRangeLayer.js";
43
43
  import type { TemporalLayer, TemporalLayerProperties } from "./mixins/TemporalLayer.js";
44
44
  import type { TrackableLayer, TrackableLayerProperties } from "./mixins/TrackableLayer.js";
@@ -257,7 +257,7 @@ export interface FeatureLayerProperties extends LayerProperties, APIKeyMixinProp
257
257
  * The [template](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/) used in an associated layer's [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/). All of the properties and field configurations set on the layer's [Feature Form](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature-form/) are handled via the [FormTemplate](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/).
258
258
  *
259
259
  * @since 4.16
260
- * @see [Sample - Update Feature Attributes](https://developers.arcgis.com/javascript/latest/sample-code/editing-groupedfeatureform/)
260
+ * @see [Sample - Edit features with dynamic choices ](https://developers.arcgis.com/javascript/latest/sample-code/editor-dynamic-choices/)
261
261
  * @example
262
262
  * // Create the Field Elements to pass into the template
263
263
  * const fieldElement1 = new FieldElement({
@@ -1026,7 +1026,7 @@ export abstract class __FeatureLayerSansType extends FeatureLayerSuperclass {
1026
1026
  * The [template](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/) used in an associated layer's [FeatureForm](https://developers.arcgis.com/javascript/latest/references/core/widgets/FeatureForm/). All of the properties and field configurations set on the layer's [Feature Form](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-feature-form/) are handled via the [FormTemplate](https://developers.arcgis.com/javascript/latest/references/core/form/FormTemplate/).
1027
1027
  *
1028
1028
  * @since 4.16
1029
- * @see [Sample - Update Feature Attributes](https://developers.arcgis.com/javascript/latest/sample-code/editing-groupedfeatureform/)
1029
+ * @see [Sample - Edit features with dynamic choices ](https://developers.arcgis.com/javascript/latest/sample-code/editor-dynamic-choices/)
1030
1030
  * @example
1031
1031
  * // Create the Field Elements to pass into the template
1032
1032
  * const fieldElement1 = new FieldElement({
@@ -2166,4 +2166,4 @@ export abstract class __FeatureLayerSansType extends FeatureLayerSuperclass {
2166
2166
  */
2167
2167
  updateAttachment(feature: Graphic, attachmentId: number, attachment: HTMLFormElement | FormData, options?: AttachmentEditOptions): Promise<FeatureEditResult>;
2168
2168
  }
2169
- declare const FeatureLayerSuperclass: typeof Layer & typeof ClonableMixin & typeof APIKeyMixin & typeof CustomParametersMixin & typeof MultiOriginJSONSupportMixin & typeof PortalLayer & typeof OperationalLayer & typeof RefreshableLayer & typeof ScaleRangeLayer & typeof TrackableLayer & typeof DataSeriesLayer & typeof TemporalLayer & typeof OrderedLayer & typeof BlendLayer & typeof DisplayFilteredLayer & typeof EditBusLayer & typeof PublishableLayer & typeof FeatureEffectLayer & typeof FeatureReductionLayer & typeof FeatureLayerBase & typeof FeatureLayerReload
2169
+ declare const FeatureLayerSuperclass: typeof Layer & typeof ClonableMixin & typeof APIKeyMixin & typeof CustomParametersMixin & typeof MultiOriginJSONSupportMixin & typeof PortalLayer & typeof OperationalLayer & typeof RefreshableLayer & typeof ScaleRangeLayer & typeof TrackableLayer & typeof DataSeriesLayer & typeof TemporalLayer & typeof OrderedLayer & typeof BlendLayer & typeof DisplayFilteredLayer & typeof EditBusLayer & typeof PublishableLayer & typeof FeatureEffectLayer & typeof FeatureReductionLayer & typeof FeatureLayerBase & typeof ReloadableLayer
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__addDisposableResource as e,__disposeResources as t,__decorate as n}from"tslib";import r from"../PopupTemplate.js";import i from"../request.js";import{ClonableMixin as a}from"../core/Clonable.js";import o from"../core/Collection.js";import s from"../core/Error.js";import{disposable as ee,makeHandle as te}from"../core/handleUtils.js";import{clone as c}from"../core/lang.js";import ne from"../core/Logger.js";import{destroyMaybe as re}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as ie}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as l}from"../core/object.js";import{debounce as ae,throwIfAbortError as oe,whenOrAbort as se,onAbort as ce}from"../core/promiseUtils.js";import{sqlAnd as le}from"../core/sql.js";import{property as u,subclass as ue}from"../core/accessorSupport/decorators.js";import{excludeTables as d}from"../core/accessorSupport/layerContainerType.js";import de from"../form/FormTemplate.js";import fe from"../geometry/SpatialReference.js";import pe from"../graphic/FeatureGraphicOrigin.js";import me from"./Layer.js";import{MemorySource as f}from"./graphics/sources/MemorySource.js";import{APIKeyMixin as he}from"./mixins/APIKeyMixin.js";import{ArcGISService as p}from"./mixins/ArcGISService.js";import{BlendLayer as m}from"./mixins/BlendLayer.js";import{CustomParametersMixin as h}from"./mixins/CustomParametersMixin.js";import{DataSeriesLayer as g}from"./mixins/DataSeriesLayer.js";import{DisplayFilteredLayer as _}from"./mixins/DisplayFilteredLayer.js";import{EditBusLayer as v}from"./mixins/EditBusLayer.js";import{FeatureEffectLayer as y}from"./mixins/FeatureEffectLayer.js";import{FeatureLayerBase as b}from"./mixins/FeatureLayerBase.js";import{FeatureLayerReload as x}from"./mixins/FeatureLayerReload.js";import{FeatureReductionLayer as S}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as C}from"./mixins/OperationalLayer.js";import{OrderedLayer as w}from"./mixins/OrderedLayer.js";import{PortalLayer as T}from"./mixins/PortalLayer.js";import{PublishableLayer as E}from"./mixins/PublishableLayer.js";import{RefreshableLayer as D}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as O}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as k}from"./mixins/TemporalLayer.js";import{TrackableLayer as A}from"./mixins/TrackableLayer.js";import{titleFromUrlAndName as j,parse as M,cleanTitle as N}from"./support/arcgisLayerUrl.js";import{attributeTableTemplate as P,id as F,labelsVisible as I,opacityDrawingInfo as L,legendEnabled as R,listMode as ge,popupEnabled as _e,screenSizePerspectiveEnabled as ve}from"./support/commonProperties.js";import{ensureLayerCredential as ye,computeEffectiveEditingEnabled as be,readGlobalIdField as xe,readObjectIdField as Se,createDefaultRenderer as Ce,addAttachment as we,updateAttachment as Te,applyEdits as Ee,uploadAssets as De,createQuery as Oe,deleteAttachments as ke,fetchRecomputedExtents as Ae,getFeatureType as je,getFieldDomain as Me,queryAttachments as Ne,queryObjectIds as Pe,queryFeatureCount as Fe,queryExtent as Ie,queryRelatedFeatures as Le,queryRelatedFeaturesCount as Re,validateBinsQuery as ze,hasDataChanged as Be,geometryTypeKebabDict as z}from"./support/featureLayerUtils.js";import B from"./support/FeatureTemplate.js";import V from"./support/FeatureType.js";import Ve from"./support/FieldConfiguration.js";import{popupTemplateWithFieldConfigurations as He,fieldConfigurationsFromPopupTemplate as Ue,fieldConfigurationsFromFields as We}from"./support/fieldConfigUtils.js";import{defineFieldProperties as Ge}from"./support/fieldProperties.js";import{fixRendererFields as H,fixTimeInfoFields as Ke}from"./support/fieldUtils.js";import qe from"./support/LabelClass.js";import{reader as U}from"./support/labelingInfo.js";import{getFeatureLayerCapabilities as Je}from"./support/serviceCapabilitiesUtils.js";import W from"./support/SymbolLayerDrawing.js";import Ye from"./support/TitleCreator.js";import{serviceSupportsSpatialReference as Xe}from"./support/versionUtils.js";import{read as Ze}from"../renderers/support/jsonUtils.js";import{loadStyleRenderer as Qe}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as $e,rendererTypes as et}from"../renderers/support/typeUtils.js";import tt from"../rest/layerSources/DynamicDataLayer.js";import nt from"../rest/support/FeatureSet.js";import G from"../rest/support/Query.js";import{isNumber as rt}from"../support/guards.js";import{createPopupTemplate as it}from"../support/popupUtils.js";import{symbolTypes as at}from"../symbols/support/typeUtils.js";import{opacityToTransparency as ot}from"../webdoc/support/opacityUtils.js";import{addLayerUnsupportedError as K}from"../webdoc/support/unsupportedErrors.js";import{reader as q}from"../core/accessorSupport/decorators/reader.js";import{writer as J}from"../core/accessorSupport/decorators/writer.js";const Y=`FeatureLayer`;function X(e){return e&&e instanceof o}const Z=Ge();function Q(e,t,n){let r=!!n?.writeLayerSchema;return{enabled:r,ignoreOrigin:r}}let $=class extends x(b(S(y(E(v(_(m(w(k(g(A(O(D(p(C(T(ie(h(he(a(me))))))))))))))))))))){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.graphicOrigin=new pe(this),this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.symbolLayerDrawing=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=fe.WGS84,this.subtypeCode=null,this.subtypeField=null,this.subtypes=null,this.supportedPortalItemTypes=[`Feature Service`,`Feature Collection`,`Scene Service`],this.supportedSourceTypes=new Set([`Feature Layer`,`Oriented Imagery Layer`,`Table`,`Catalog Layer`]),this.templates=null,this.title=null,this.sublayerTitleMode=`item-title`,this.type=`feature`,this.typeIdField=null,this.types=null,this.visible=!0,this._debouncedSaveOperations=ae(async(e,t,n)=>{let{save:r,saveAs:i}=await import(`./save/featureLayerUtils.js`);switch(e){case 0:return r(this,t);case 1:return i(this,n,t)}})}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return typeof e==`string`?{url:e,...t}:e}load(e){let t=e==null?null:e.signal;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then(e=>this.initLayerProperties(e))),Promise.resolve(this);let n=this.loadFromPortal({supportedTypes:this.supportedPortalItemTypes},e).catch(oe).then(async()=>{if(this.url&&this.layerId==null&&/FeatureServer|MapServer\/*$/i.test(this.url)){let e=await this._fetchFirstValidLayerId(t);e!=null&&(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(()=>ye(this,`load`,e));return this.addResolvingPromise(n),Promise.resolve(this)}get _titleCreator(){let e=this._get(`_titleCreator`);return re(e),new Ye({fieldsIndex:this.fieldsIndex,objectIdField:this.objectIdField,fields:this.fields,displayField:this.displayField,effectivePopupTemplate:this.popupTemplate??this.defaultPopupTemplate})}readCapabilities(e,t){return t=t.layerDefinition||t,Je(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?!1: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,n){return this._readEditingEnabled(t,!0,n)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,n,r){this._writeEditingEnabled(e,t,!0,r)}get effectiveEditingEnabled(){return be(this)}get featureTitleFields(){return[...this._titleCreator.requiredFields]}set fieldConfigurations(e){if(this._hasMemorySource()||(this._override(`fieldConfigurations`,e),!this.loaded))return;let t=He(this,e);t&&this._set(`popupTemplate`,t)}get fieldConfigurations(){if(!this._hasMemorySource())return this._isOverridden(`fieldConfigurations`)?this._get(`fieldConfigurations`):Ue(this)||null}readIsTable(e,t){return t=t?.layerDefinition??t,t.type===`Table`||!t.geometryType}writeIsTable(e,t,n,r){r?.writeLayerSchema&&l(n,e?`Table`:`Feature Layer`,t)}readSymbolLayerDrawing(e,t){let n=t.layerDefinition?.drawingInfo,r=n?.renderer,i=n?.symbolLayerDrawing;return r&&i?new W(i):null}readGlobalIdField(e,t){return xe(t.layerDefinition||t)}readObjectIdField(e,t){return Se(t.layerDefinition||t)}writePopupTemplate(e,t,n,r){e&&(t[n]=e.toJSON({...r,writeFieldFormat:!r?.writeLayerSchema}))}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){H(e,this.fieldsIndex),this._set(`renderer`,e)}readRenderer(e,t,n){t=t.layerDefinition||t;let r=t.drawingInfo?.renderer;if(r){let e=Ze(r,t,n)??void 0;return e||ne.getLogger(this).error(`Failed to create renderer`,{rendererDefinition:t.drawingInfo.renderer,layer:this,context:n}),e}return Ce(t,n)}get source(){return this._get(`source`)}set source(e){e||=null;let t=this._get(`source`);t!==e&&((Array.isArray(e)||e instanceof o)&&(e=new f({layer:this,items:e})),X(t)&&this._resetMemorySource(t),X(e)&&this._initMemorySource(e),this._set(`source`,e))}readSource(e,t){let n=nt.fromJSON(t.featureSet);return new f({layer:this,items:n?.features??[]})}readTemplates(e,t){let n=t.editFieldsInfo,r=n?.creatorField,i=n?.editorField;return e=e?.map(e=>B.fromJSON(e)),this._fixTemplates(e,r),this._fixTemplates(e,i),e}readTitle(e,t){let n=t.layerDefinition?.name??t.name,r=t.title||t.layerDefinition?.title;if(n){if(this.sublayerTitleMode===`item-title`)return this.url?j(this.url,n):n;let e=n;if(!e&&this.url){let t=M(this.url);t!=null&&(e=t.title)}if(!e)return;let t=this.portalItem?.title;return this.sublayerTitleMode===`item-title-and-service-name`&&t&&t!==e&&(e=t+` - `+e),N(e)}if(this.sublayerTitleMode===`item-title`&&r)return r}readTitleFromWebMap(e,t){return t.title||t.layerDefinition?.name}readTypeIdField(e,t){t=t.layerDefinition||t;let n=t.typeIdField;if(n&&t.fields){n=n.toLowerCase();let e=t.fields.find(e=>e.name.toLowerCase()===n);e&&(n=e.name)}return n}readTypes(e,t){t=t.layerDefinition||t,e=t.types;let n=t.editFieldsInfo,r=n?.creatorField,i=n?.editorField;return e?.map(e=>(e=V.fromJSON(e),this._fixTemplates(e.templates,r),this._fixTemplates(e.templates,i),e))}readVisible(e,t){if(t.layerDefinition?.defaultVisibility!=null)return!!t.layerDefinition.defaultVisibility;if(t.visibility!=null)return!!t.visibility}async addAttachment(e,t,n){let r=await we(this,e,t,Y,n);return this.lastEditsEventDate=new Date,r}async updateAttachment(e,t,n,r){let i=await Te(this,e,t,n,Y,r);return this.lastEditsEventDate=new Date,i}async applyEdits(e,t){return Ee(this,e,t)}async uploadAssets(e,t){return De(this,e,t)}createFieldConfigurations(){return We(this)}createPopupTemplate(e){return it(this,e)}async createGraphicsSource(n){let r={stack:[],error:void 0,hasError:!1};try{if(this._hasMemorySource()&&this.source)return this.source.load({signal:n});let{default:t}=await se(import(`./graphics/sources/FeatureLayerSource.js`),n),i=new t({layer:this,supportedSourceTypes:this.supportedSourceTypes});return e(r,ee(ce(n,()=>i.cancelLoad())??te()),!1),await i.load({signal:n}),i}catch(e){r.error=e,r.hasError=!0}finally{t(r)}}createQuery(){let e=Oe(this);e.dynamicDataSource=this.dynamicDataSource;let t=this.subtypeCode==null?null:`${this.subtypeField} = ${this.subtypeCode}`;return e.where=le(this.definitionExpression,t)||`1=1`,e}async deleteAttachments(e,t,n){let r=await ke(this,e,t,Y,n);return this.lastEditsEventDate=new Date,r}async fetchRecomputedExtents(e){return Ae(this,e,Y)}async getFeatureTitle(e,t){return this._titleCreator.getTitle(this,e,t)}async getFeatureTitles(e,t){return this._titleCreator.getTitles(this,e,t)}getFeatureType(e){return je(this.types,this.typeIdField,e)}getFieldAlias(e){let t=this.getField(e);if(t)return this.getFieldConfiguration(t.name)?.alias||t.alias}getFieldConfiguration(e){return e=e.toLowerCase(),this.fieldConfigurations?.find(t=>t.name.toLowerCase()===e)}getFieldDomain(e,t){return Me(this,e,t,this.getField(e)?.domain??null)}async queryAttachments(e,t){return Ne(this,e,t,Y)}async queryFeatures(e,t){let n=await this.load(),r=await n.source.queryFeatures(G.from(e)??n.createQuery(),t),i=this.graphicOrigin;if(r?.features)for(let e of r.features)e.layer=e.sourceLayer=n,e.origin=i;return r}async queryObjectIds(e,t){return await Pe(this,e,t,Y)}async queryFeatureCount(e,t){return Fe(this,e,t,Y)}async queryExtent(e,t){return Ie(this,e,t,Y)}async queryRelatedFeatures(e,t){return Le(this,e,t,Y)}async queryRelatedFeaturesCount(e,t){return Re(this,e,t,Y)}async queryPivot(e,t){let{source:n,capabilities:r}=await this.load();if(!n.queryPivot||!r?.operations?.supportsQueryPivot)throw new s(Y,`Layer source does not support queryPivot capability`);let i=await import(`../rest/support/PivotQuery.js`),a=await n.queryPivot(i.default.from(e),t),o=this.graphicOrigin;if(a?.features)for(let e of a.features)e.layer=e.sourceLayer=this,e.origin=o;return a}async queryTopFeatures(e,t){let{source:n,capabilities:r}=await this.load();if(!n.queryTopFeatures||!r?.query?.supportsTopFeaturesQuery)throw new s(Y,`Layer source does not support queryTopFeatures capability`);let i=await import(`../rest/support/TopFeaturesQuery.js`),a=await n.queryTopFeatures(i.default.from(e),t),o=this.graphicOrigin;if(a?.features)for(let e of a.features)e.layer=e.sourceLayer=this,e.origin=o;return a}async queryAttributeBins(e,t){let{source:n,capabilities:r}=await this.load();if(!n.queryAttributeBins)throw new s(Y,`Layer source does not support queryAttributeBins capability`);ze(e,r,Y);let i=await import(`../rest/support/AttributeBinsQuery.js`),a=await n.queryAttributeBins(i.default.from(e),t),o=this.graphicOrigin;if(a.features)for(let e of a.features)e.layer=e.sourceLayer=this,e.origin=o;return a}async queryTopObjectIds(e,t){let{source:n,capabilities:r}=await this.load();if(!n.queryTopObjectIds||!r?.query.supportsTopFeaturesQuery)throw new s(Y,`Layer source does not support queryTopObjectIds capability`);let i=await import(`../rest/support/TopFeaturesQuery.js`);return(await n.queryTopObjectIds(i.default.from(e),t)).filter(rt)}async queryTopFeaturesExtent(e,t){let{source:n,capabilities:r}=await this.load();if(!n.queryTopExtents||!r?.query?.supportsTopFeaturesQuery)throw new s(Y,`Layer source does not support queryTopExtents capability`);let i=await import(`../rest/support/TopFeaturesQuery.js`);return n.queryTopExtents(i.default.from(e),t)}async queryTopFeatureCount(e,t){let{source:n,capabilities:r}=await this.load();if(!n.queryTopCount||!r?.query?.supportsTopFeaturesQuery)throw new s(Y,`Layer source does not support queryFeatureCount capability`);let i=await import(`../rest/support/TopFeaturesQuery.js`);return n.queryTopCount(i.default.from(e),t)}read(e,t){let n=e.featureCollection;if((n||e.type===`Feature Collection`)&&(this.resourceInfo=e),n){let{layers:e,showLegend:r}=n;e?.length===1&&(super.read(e[0],t),r!=null&&super.read({showLegend:r},t))}super.read(e,t),X(this.source)&&t?.origin===`service`&&([`objectIdField`,`fields`,`timeInfo`,`dateFieldsTimeZone`,`uniqueIdFields`].forEach(e=>{this.revertToOrigin(e,`service`)}),this.spatialReference||this.revertToOrigin(`spatialReference`,`service`))}write(e,t){t={...t,origin:t?.origin??void 0,writeLayerSchema:t?.writeLayerSchema??this._hasMemorySource()};let{origin:n,layerContainerType:r}=t;if(this.dynamicDataSource)return K(t,this,`a dynamic data source cannot be written to web scenes, web maps and feature service items`),null;if(this.isTable){if((n===`web-map`||n===`web-scene`)&&r!==`tables`)return K(t,this,`a table source can only be written to tables`),null;if(this._hasMemorySource())return K(t,this,`an in-memory table source cannot be written to web scenes and web maps`),null}else if(this.loaded&&(n===`web-map`||n===`web-scene`)&&r===`tables`)return K(t,this,`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(Y,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return this.loaded?this.source?.type===`memory`||Xe(this,e):!1}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}_readEditingEnabled(e,t,n){let r=e.layerDefinition?.capabilities;if(r||(r=e.capabilities,t&&n?.origin===`web-map`&&!this._hasMemorySource()&&r))return this._hasEditingCapability(r)}_hasEditingCapability(e){return e.toLowerCase().split(`,`).map(e=>e.trim()).includes(`editing`)}_writeEditingEnabled(e,t,n,r){if(!e){let e=this.capabilities?.operations?.supportsSync?`Query,Sync`:`Query`;l(`layerDefinition.capabilities`,e,t),n&&!r?.writeLayerSchema&&(t.capabilities=e)}}_fetchFirstValidLayerId(e){return i(this.url??``,{query:{f:`json`,...this.customParameters,token:this.apiKey},responseType:`json`,signal:e}).then(e=>{let t=e.data;if(t)return this.applyPreferredHost(t),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(),H(this.renderer,this.fieldsIndex),Ke(this.timeInfo,this.fieldsIndex),this._hasMemorySource()&&this.geometryType===`mesh`&&(this.capabilities.query.supportsReturnMesh=!0),Qe(this,{origin:`service`})}canReload(){return super.canReload()&&!this._hasMemorySource()}async reloadFromService(e){let t=this.source;await t.reload({signal:e}),await this.initLayerProperties(t)}async hasDataChanged(){return Be(this)}async fetchPublishingStatus(){let e=this.source;return e?.fetchPublishingStatus?e.fetchPublishingStatus():`unavailable`}_verifyFields(){let e=this.parsedUrl?.path??`undefined`;this.objectIdField||console.log(`FeatureLayer: 'objectIdField' property is not defined (url: `+e+`)`),!this.isTable&&!this._hasMemorySource()&&e.search(/\/FeatureServer\//i)===-1&&!this.fields?.some(e=>e.type===`geometry`)&&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=>{let n=e.prototype?.attributes;n&&t&&delete n[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[...e.layers||[],...e.tables||[]].find(({type:e})=>!e||this.supportedSourceTypes.has(e))?.id}};n([u({clonable:!1,readOnly:!0})],$.prototype,`_titleCreator`,null),n([u(P)],$.prototype,`attributeTableTemplate`,void 0),n([q(`service`,`capabilities`)],$.prototype,`readCapabilities`,null),n([u({json:{origins:{"web-scene":{write:!1}},write:!0}})],$.prototype,`charts`,void 0),n([u({readOnly:!0})],$.prototype,`createQueryVersion`,null),n([u({json:{read:{source:`layerDefinition.copyrightText`}}})],$.prototype,`copyright`,void 0),n([u({json:{read:{source:`layerDefinition.displayField`}}})],$.prototype,`displayField`,void 0),n([u({types:at,readOnly:!0})],$.prototype,`defaultSymbol`,void 0),n([u({type:tt})],$.prototype,`dynamicDataSource`,void 0),n([u({type:Boolean})],$.prototype,`editingEnabled`,null),n([q([`portal-item`,`web-scene`],`editingEnabled`,[`layerDefinition.capabilities`])],$.prototype,`readEditingEnabled`,null),n([q(`web-map`,`editingEnabled`,[`capabilities`,`layerDefinition.capabilities`])],$.prototype,`readEditingEnabledFromWebMap`,null),n([J([`portal-item`,`web-scene`],`editingEnabled`,{"layerDefinition.capabilities":{type:String}})],$.prototype,`writeEditingEnabled`,null),n([J(`web-map`,`editingEnabled`,{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],$.prototype,`writeEditingEnabledToWebMap`,null),n([u({readOnly:!0})],$.prototype,`effectiveEditingEnabled`,null),n([u({clonable:!1,readOnly:!0})],$.prototype,`featureTitleFields`,null),n([u({type:[Ve],json:{name:`layerDefinition.fieldConfigurations`,write:{overridePolicy(e,t,n){return{enabled:!n?.writeLayerSchema,ignoreOrigin:this.originIdOf(t)===1}}}}})],$.prototype,`fieldConfigurations`,null),n([u({...Z.fields,json:{read:{source:`layerDefinition.fields`},origins:{service:{name:`fields`},"web-map":{write:{target:`layerDefinition.fields`,overridePolicy:Q}}}}})],$.prototype,`fields`,void 0),n([u(Z.fieldsIndex)],$.prototype,`fieldsIndex`,void 0),n([u({type:de,json:{name:`formInfo`,write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],$.prototype,`formTemplate`,void 0),n([u({json:{read:{source:`layerDefinition.extent`}}})],$.prototype,`fullExtent`,void 0),n([u({json:{origins:{"web-map":{write:{target:`layerDefinition.geometryType`,overridePolicy:Q,writer(e,t,n){let r=e?z.toJSON(e):null;r&&l(n,r,t)}}}},read:{source:`layerDefinition.geometryType`,reader:z.read}}})],$.prototype,`geometryType`,void 0),n([u({readOnly:!0,clonable:!1})],$.prototype,`graphicOrigin`,void 0),n([u({json:{read:{source:`layerDefinition.hasM`}}})],$.prototype,`hasM`,void 0),n([u({json:{read:{source:`layerDefinition.hasZ`}}})],$.prototype,`hasZ`,void 0),n([u(F)],$.prototype,`id`,void 0),n([u({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],$.prototype,`infoFor3D`,void 0),n([u({json:{origins:{"web-map":{write:{target:`layerDefinition.type`}}}}})],$.prototype,`isTable`,void 0),n([q(`service`,`isTable`,[`type`,`geometryType`]),q(`isTable`,[`layerDefinition.type`,`layerDefinition.geometryType`])],$.prototype,`readIsTable`,null),n([J(`web-map`,`isTable`)],$.prototype,`writeIsTable`,null),n([u(I)],$.prototype,`labelsVisible`,void 0),n([u({type:[qe],json:{origins:{service:{name:`drawingInfo.labelingInfo`,read:U,write:!1}},name:`layerDefinition.drawingInfo.labelingInfo`,read:U,write:{layerContainerTypes:d}}})],$.prototype,`labelingInfo`,void 0),n([u({type:W,json:{name:`layerDefinition.drawingInfo.symbolLayerDrawing`,write:!0,origins:{"web-scene":{write:!1}}}})],$.prototype,`symbolLayerDrawing`,void 0),n([q([`portal-item`,`web-map`],`symbolLayerDrawing`,[`layerDefinition.drawingInfo.renderer`,`layerDefinition.drawingInfo.symbolLayerDrawing`])],$.prototype,`readSymbolLayerDrawing`,null),n([u((()=>{let e=c(L);return e.json.origins[`portal-item`]={write:{target:`layerDefinition.drawingInfo.transparency`,writer(e,t,n){l(n,ot(e),t)}}},e})())],$.prototype,`opacity`,void 0),n([u(R)],$.prototype,`legendEnabled`,void 0),n([u({type:[`show`,`hide`],json:(()=>{let e=c(ge.json);return e.origins[`portal-item`]={read:!1,write:!1},e})()})],$.prototype,`listMode`,void 0),n([q(`globalIdField`,[`layerDefinition.globalIdField`,`layerDefinition.fields`])],$.prototype,`readGlobalIdField`,null),n([u({json:{origins:{"web-map":{write:{target:`layerDefinition.objectIdField`,overridePolicy:Q}}}}})],$.prototype,`objectIdField`,void 0),n([q(`objectIdField`,[`layerDefinition.objectIdField`,`layerDefinition.fields`])],$.prototype,`readObjectIdField`,null),n([u({type:[`ArcGISFeatureLayer`],json:{write:{target:`layerType`,ignoreOrigin:!0,layerContainerTypes:d}}})],$.prototype,`operationalLayerType`,void 0),n([u(Z.outFields)],$.prototype,`outFields`,void 0),n([u({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],$.prototype,`path`,void 0),n([u(_e)],$.prototype,`popupEnabled`,void 0),n([u({type:r,json:{name:`popupInfo`,write:!0}})],$.prototype,`popupTemplate`,void 0),n([J(`popupTemplate`)],$.prototype,`writePopupTemplate`,null),n([u({readOnly:!0})],$.prototype,`defaultPopupTemplate`,null),n([u({types:et,json:{origins:{service:{write:{target:`drawingInfo.renderer`,enabled:!1}},"web-scene":{types:$e,name:`layerDefinition.drawingInfo.renderer`,write:{layerContainerTypes:d,overridePolicy(e,t,n){return{ignoreOrigin:n?.writeLayerSchema,layerContainerTypes:d}}}}},write:{target:`layerDefinition.drawingInfo.renderer`,overridePolicy(e,t,n){return{ignoreOrigin:n?.writeLayerSchema,layerContainerTypes:d}}}}})],$.prototype,`renderer`,null),n([q(`service`,`renderer`,[`drawingInfo.renderer`,`defaultSymbol`]),q(`renderer`,[`layerDefinition.drawingInfo.renderer`,`layerDefinition.defaultSymbol`])],$.prototype,`readRenderer`,null),n([u()],$.prototype,`resourceInfo`,void 0),n([u((()=>{let e=c(ve);return e.json.origins[`portal-item`]={read:!1,write:!1},e})())],$.prototype,`screenSizePerspectiveEnabled`,void 0),n([u({clonable:!1})],$.prototype,`source`,null),n([q(`portal-item`,`source`,[`featureSet`]),q(`web-map`,`source`,[`featureSet`])],$.prototype,`readSource`,null),n([u({json:{read:{source:`layerDefinition.extent.spatialReference`}}})],$.prototype,`spatialReference`,void 0),n([u({type:Number})],$.prototype,`subtypeCode`,void 0),n([u({readOnly:!1})],$.prototype,`subtypeField`,void 0),n([u({readOnly:!1})],$.prototype,`subtypes`,void 0),n([u({type:[B]})],$.prototype,`templates`,void 0),n([q(`templates`,[`editFieldsInfo`,`creatorField`,`editorField`,`templates`])],$.prototype,`readTemplates`,null),n([u()],$.prototype,`title`,void 0),n([q(`service`,`title`,[`name`]),q(`portal-item`,`title`,[`layerDefinition.title`,`layerDefinition.name`,`title`])],$.prototype,`readTitle`,null),n([q(`web-map`,`title`,[`layerDefinition.name`,`title`])],$.prototype,`readTitleFromWebMap`,null),n([u({type:String})],$.prototype,`sublayerTitleMode`,void 0),n([u({json:{read:!1}})],$.prototype,`type`,void 0),n([u({type:String})],$.prototype,`typeIdField`,void 0),n([q(`service`,`typeIdField`),q(`typeIdField`,[`layerDefinition.typeIdField`])],$.prototype,`readTypeIdField`,null),n([u({type:[V]})],$.prototype,`types`,void 0),n([q(`service`,`types`,[`types`]),q(`types`,[`layerDefinition.types`])],$.prototype,`readTypes`,null),n([u({type:Boolean,json:{origins:{"portal-item":{write:{target:`layerDefinition.defaultVisibility`,layerContainerTypes:d}}}}})],$.prototype,`visible`,void 0),n([q(`portal-item`,`visible`,[`visibility`,`layerDefinition.defaultVisibility`])],$.prototype,`readVisible`,null),$=n([ue(`esri.layers.FeatureLayer`)],$);export{$ as default};
2
+ import{__addDisposableResource as e,__disposeResources as t,__decorate as n}from"tslib";import r from"../PopupTemplate.js";import i from"../request.js";import{ClonableMixin as a}from"../core/Clonable.js";import o from"../core/Collection.js";import s from"../core/Error.js";import{disposable as ee,makeHandle as te}from"../core/handleUtils.js";import{clone as c}from"../core/lang.js";import ne from"../core/Logger.js";import{destroyMaybe as re}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as ie}from"../core/MultiOriginJSONSupport.js";import{setDeepValue as l}from"../core/object.js";import{debounce as ae,throwIfAbortError as oe,whenOrAbort as se,onAbort as ce}from"../core/promiseUtils.js";import{sqlAnd as le}from"../core/sql.js";import{property as u,subclass as ue}from"../core/accessorSupport/decorators.js";import{excludeTables as d}from"../core/accessorSupport/layerContainerType.js";import de from"../form/FormTemplate.js";import fe from"../geometry/SpatialReference.js";import pe from"../graphic/FeatureGraphicOrigin.js";import me from"./Layer.js";import{MemorySource as f}from"./graphics/sources/MemorySource.js";import{APIKeyMixin as he}from"./mixins/APIKeyMixin.js";import{ArcGISService as p}from"./mixins/ArcGISService.js";import{BlendLayer as m}from"./mixins/BlendLayer.js";import{CustomParametersMixin as h}from"./mixins/CustomParametersMixin.js";import{DataSeriesLayer as g}from"./mixins/DataSeriesLayer.js";import{DisplayFilteredLayer as _}from"./mixins/DisplayFilteredLayer.js";import{EditBusLayer as v}from"./mixins/EditBusLayer.js";import{FeatureEffectLayer as y}from"./mixins/FeatureEffectLayer.js";import{FeatureLayerBase as b}from"./mixins/FeatureLayerBase.js";import{FeatureReductionLayer as x}from"./mixins/FeatureReductionLayer.js";import{OperationalLayer as S}from"./mixins/OperationalLayer.js";import{OrderedLayer as C}from"./mixins/OrderedLayer.js";import{PortalLayer as w}from"./mixins/PortalLayer.js";import{PublishableLayer as T}from"./mixins/PublishableLayer.js";import{RefreshableLayer as E}from"./mixins/RefreshableLayer.js";import{ReloadableLayer as D}from"./mixins/ReloadableLayer.js";import{ScaleRangeLayer as O}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as k}from"./mixins/TemporalLayer.js";import{TrackableLayer as A}from"./mixins/TrackableLayer.js";import{titleFromUrlAndName as j,parse as M,cleanTitle as N}from"./support/arcgisLayerUrl.js";import{attributeTableTemplate as P,id as F,labelsVisible as I,opacityDrawingInfo as L,legendEnabled as R,listMode as ge,popupEnabled as _e,screenSizePerspectiveEnabled as ve}from"./support/commonProperties.js";import{ensureLayerCredential as ye,computeEffectiveEditingEnabled as be,readGlobalIdField as xe,readObjectIdField as Se,createDefaultRenderer as Ce,addAttachment as we,updateAttachment as Te,applyEdits as Ee,uploadAssets as De,createQuery as Oe,deleteAttachments as ke,fetchRecomputedExtents as Ae,getFeatureType as je,getFieldDomain as Me,queryAttachments as Ne,queryObjectIds as Pe,queryFeatureCount as Fe,queryExtent as Ie,queryRelatedFeatures as Le,queryRelatedFeaturesCount as Re,validateBinsQuery as ze,hasDataChanged as Be,geometryTypeKebabDict as z}from"./support/featureLayerUtils.js";import B from"./support/FeatureTemplate.js";import V from"./support/FeatureType.js";import Ve from"./support/FieldConfiguration.js";import{popupTemplateWithFieldConfigurations as He,fieldConfigurationsFromPopupTemplate as Ue,fieldConfigurationsFromFields as We}from"./support/fieldConfigUtils.js";import{defineFieldProperties as Ge}from"./support/fieldProperties.js";import{fixRendererFields as H,fixTimeInfoFields as Ke}from"./support/fieldUtils.js";import qe from"./support/LabelClass.js";import{reader as U}from"./support/labelingInfo.js";import{getFeatureLayerCapabilities as Je}from"./support/serviceCapabilitiesUtils.js";import W from"./support/SymbolLayerDrawing.js";import Ye from"./support/TitleCreator.js";import{serviceSupportsSpatialReference as Xe}from"./support/versionUtils.js";import{read as Ze}from"../renderers/support/jsonUtils.js";import{loadStyleRenderer as Qe}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as $e,rendererTypes as et}from"../renderers/support/typeUtils.js";import tt from"../rest/layerSources/DynamicDataLayer.js";import nt from"../rest/support/FeatureSet.js";import G from"../rest/support/Query.js";import{isNumber as rt}from"../support/guards.js";import{createPopupTemplate as it}from"../support/popupUtils.js";import{symbolTypes as at}from"../symbols/support/typeUtils.js";import{opacityToTransparency as ot}from"../webdoc/support/opacityUtils.js";import{addLayerUnsupportedError as K}from"../webdoc/support/unsupportedErrors.js";import{reader as q}from"../core/accessorSupport/decorators/reader.js";import{writer as J}from"../core/accessorSupport/decorators/writer.js";const Y=`FeatureLayer`;function X(e){return e&&e instanceof o}const Z=Ge();function Q(e,t,n){let r=!!n?.writeLayerSchema;return{enabled:r,ignoreOrigin:r}}let $=class extends D(b(x(y(T(v(_(m(C(k(g(A(O(E(p(S(w(ie(h(he(a(me))))))))))))))))))))){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.graphicOrigin=new pe(this),this.hasM=void 0,this.hasZ=void 0,this.infoFor3D=null,this.isTable=!1,this.labelsVisible=!0,this.labelingInfo=null,this.symbolLayerDrawing=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=fe.WGS84,this.subtypeCode=null,this.subtypeField=null,this.subtypes=null,this.supportedPortalItemTypes=[`Feature Service`,`Feature Collection`,`Scene Service`],this.supportedSourceTypes=new Set([`Feature Layer`,`Oriented Imagery Layer`,`Table`,`Catalog Layer`]),this.templates=null,this.title=null,this.sublayerTitleMode=`item-title`,this.type=`feature`,this.typeIdField=null,this.types=null,this.visible=!0,this._debouncedSaveOperations=ae(async(e,t,n)=>{let{save:r,saveAs:i}=await import(`./save/featureLayerUtils.js`);switch(e){case 0:return r(this,t);case 1:return i(this,n,t)}})}destroy(){this.source?.destroy()}normalizeCtorArgs(e,t){return typeof e==`string`?{url:e,...t}:e}load(e){let t=e==null?null:e.signal;if(this.portalItem?.loaded&&this.source)return this.addResolvingPromise(this.createGraphicsSource(t).then(e=>this.initLayerProperties(e))),Promise.resolve(this);let n=this.loadFromPortal({supportedTypes:this.supportedPortalItemTypes},e).catch(oe).then(async()=>{if(this.url&&this.layerId==null&&/FeatureServer|MapServer\/*$/i.test(this.url)){let e=await this._fetchFirstValidLayerId(t);e!=null&&(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(()=>ye(this,`load`,e));return this.addResolvingPromise(n),Promise.resolve(this)}get _titleCreator(){let e=this._get(`_titleCreator`);return re(e),new Ye({fieldsIndex:this.fieldsIndex,objectIdField:this.objectIdField,fields:this.fields,displayField:this.displayField,effectivePopupTemplate:this.popupTemplate??this.defaultPopupTemplate})}readCapabilities(e,t){return t=t.layerDefinition||t,Je(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?!1: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,n){return this._readEditingEnabled(t,!0,n)}writeEditingEnabled(e,t){this._writeEditingEnabled(e,t,!1)}writeEditingEnabledToWebMap(e,t,n,r){this._writeEditingEnabled(e,t,!0,r)}get effectiveEditingEnabled(){return be(this)}get featureTitleFields(){return[...this._titleCreator.requiredFields]}set fieldConfigurations(e){if(this._hasMemorySource()||(this._override(`fieldConfigurations`,e),!this.loaded))return;let t=He(this,e);t&&this._set(`popupTemplate`,t)}get fieldConfigurations(){if(!this._hasMemorySource())return this._isOverridden(`fieldConfigurations`)?this._get(`fieldConfigurations`):Ue(this)||null}readIsTable(e,t){return t=t?.layerDefinition??t,t.type===`Table`||!t.geometryType}writeIsTable(e,t,n,r){r?.writeLayerSchema&&l(n,e?`Table`:`Feature Layer`,t)}readSymbolLayerDrawing(e,t){let n=t.layerDefinition?.drawingInfo,r=n?.renderer,i=n?.symbolLayerDrawing;return r&&i?new W(i):null}readGlobalIdField(e,t){return xe(t.layerDefinition||t)}readObjectIdField(e,t){return Se(t.layerDefinition||t)}writePopupTemplate(e,t,n,r){e&&(t[n]=e.toJSON({...r,writeFieldFormat:!r?.writeLayerSchema}))}get defaultPopupTemplate(){return this.createPopupTemplate()}set renderer(e){H(e,this.fieldsIndex),this._set(`renderer`,e)}readRenderer(e,t,n){t=t.layerDefinition||t;let r=t.drawingInfo?.renderer;if(r){let e=Ze(r,t,n)??void 0;return e||ne.getLogger(this).error(`Failed to create renderer`,{rendererDefinition:t.drawingInfo.renderer,layer:this,context:n}),e}return Ce(t,n)}get source(){return this._get(`source`)}set source(e){e||=null;let t=this._get(`source`);t!==e&&((Array.isArray(e)||e instanceof o)&&(e=new f({layer:this,items:e})),X(t)&&this._resetMemorySource(t),X(e)&&this._initMemorySource(e),this._set(`source`,e))}readSource(e,t){let n=nt.fromJSON(t.featureSet);return new f({layer:this,items:n?.features??[]})}readTemplates(e,t){let n=t.editFieldsInfo,r=n?.creatorField,i=n?.editorField;return e=e?.map(e=>B.fromJSON(e)),this._fixTemplates(e,r),this._fixTemplates(e,i),e}readTitle(e,t){let n=t.layerDefinition?.name??t.name,r=t.title||t.layerDefinition?.title;if(n){if(this.sublayerTitleMode===`item-title`)return this.url?j(this.url,n):n;let e=n;if(!e&&this.url){let t=M(this.url);t!=null&&(e=t.title)}if(!e)return;let t=this.portalItem?.title;return this.sublayerTitleMode===`item-title-and-service-name`&&t&&t!==e&&(e=t+` - `+e),N(e)}if(this.sublayerTitleMode===`item-title`&&r)return r}readTitleFromWebMap(e,t){return t.title||t.layerDefinition?.name}readTypeIdField(e,t){t=t.layerDefinition||t;let n=t.typeIdField;if(n&&t.fields){n=n.toLowerCase();let e=t.fields.find(e=>e.name.toLowerCase()===n);e&&(n=e.name)}return n}readTypes(e,t){t=t.layerDefinition||t,e=t.types;let n=t.editFieldsInfo,r=n?.creatorField,i=n?.editorField;return e?.map(e=>(e=V.fromJSON(e),this._fixTemplates(e.templates,r),this._fixTemplates(e.templates,i),e))}readVisible(e,t){if(t.layerDefinition?.defaultVisibility!=null)return!!t.layerDefinition.defaultVisibility;if(t.visibility!=null)return!!t.visibility}async addAttachment(e,t,n){let r=await we(this,e,t,Y,n);return this.lastEditsEventDate=new Date,r}async updateAttachment(e,t,n,r){let i=await Te(this,e,t,n,Y,r);return this.lastEditsEventDate=new Date,i}async applyEdits(e,t){return Ee(this,e,t)}async uploadAssets(e,t){return De(this,e,t)}createFieldConfigurations(){return We(this)}createPopupTemplate(e){return it(this,e)}async createGraphicsSource(n){let r={stack:[],error:void 0,hasError:!1};try{if(this._hasMemorySource()&&this.source)return this.source.load({signal:n});let{default:t}=await se(import(`./graphics/sources/FeatureLayerSource.js`),n),i=new t({layer:this,supportedSourceTypes:this.supportedSourceTypes});return e(r,ee(ce(n,()=>i.cancelLoad())??te()),!1),await i.load({signal:n}),i}catch(e){r.error=e,r.hasError=!0}finally{t(r)}}createQuery(){let e=Oe(this);e.dynamicDataSource=this.dynamicDataSource;let t=this.subtypeCode==null?null:`${this.subtypeField} = ${this.subtypeCode}`;return e.where=le(this.definitionExpression,t)||`1=1`,e}async deleteAttachments(e,t,n){let r=await ke(this,e,t,Y,n);return this.lastEditsEventDate=new Date,r}async fetchRecomputedExtents(e){return Ae(this,e,Y)}async getFeatureTitle(e,t){return this._titleCreator.getTitle(this,e,t)}async getFeatureTitles(e,t){return this._titleCreator.getTitles(this,e,t)}getFeatureType(e){return je(this.types,this.typeIdField,e)}getFieldAlias(e){let t=this.getField(e);if(t)return this.getFieldConfiguration(t.name)?.alias||t.alias}getFieldConfiguration(e){return e=e.toLowerCase(),this.fieldConfigurations?.find(t=>t.name.toLowerCase()===e)}getFieldDomain(e,t){return Me(this,e,t,this.getField(e)?.domain??null)}async queryAttachments(e,t){return Ne(this,e,t,Y)}async queryFeatures(e,t){let n=await this.load(),r=await n.source.queryFeatures(G.from(e)??n.createQuery(),t),i=this.graphicOrigin;if(r?.features)for(let e of r.features)e.layer=e.sourceLayer=n,e.origin=i;return r}async queryObjectIds(e,t){return await Pe(this,e,t,Y)}async queryFeatureCount(e,t){return Fe(this,e,t,Y)}async queryExtent(e,t){return Ie(this,e,t,Y)}async queryRelatedFeatures(e,t){return Le(this,e,t,Y)}async queryRelatedFeaturesCount(e,t){return Re(this,e,t,Y)}async queryPivot(e,t){let{source:n,capabilities:r}=await this.load();if(!n.queryPivot||!r?.operations?.supportsQueryPivot)throw new s(Y,`Layer source does not support queryPivot capability`);let i=await import(`../rest/support/PivotQuery.js`),a=await n.queryPivot(i.default.from(e),t),o=this.graphicOrigin;if(a?.features)for(let e of a.features)e.layer=e.sourceLayer=this,e.origin=o;return a}async queryTopFeatures(e,t){let{source:n,capabilities:r}=await this.load();if(!n.queryTopFeatures||!r?.query?.supportsTopFeaturesQuery)throw new s(Y,`Layer source does not support queryTopFeatures capability`);let i=await import(`../rest/support/TopFeaturesQuery.js`),a=await n.queryTopFeatures(i.default.from(e),t),o=this.graphicOrigin;if(a?.features)for(let e of a.features)e.layer=e.sourceLayer=this,e.origin=o;return a}async queryAttributeBins(e,t){let{source:n,capabilities:r}=await this.load();if(!n.queryAttributeBins)throw new s(Y,`Layer source does not support queryAttributeBins capability`);ze(e,r,Y);let i=await import(`../rest/support/AttributeBinsQuery.js`),a=await n.queryAttributeBins(i.default.from(e),t),o=this.graphicOrigin;if(a.features)for(let e of a.features)e.layer=e.sourceLayer=this,e.origin=o;return a}async queryTopObjectIds(e,t){let{source:n,capabilities:r}=await this.load();if(!n.queryTopObjectIds||!r?.query.supportsTopFeaturesQuery)throw new s(Y,`Layer source does not support queryTopObjectIds capability`);let i=await import(`../rest/support/TopFeaturesQuery.js`);return(await n.queryTopObjectIds(i.default.from(e),t)).filter(rt)}async queryTopFeaturesExtent(e,t){let{source:n,capabilities:r}=await this.load();if(!n.queryTopExtents||!r?.query?.supportsTopFeaturesQuery)throw new s(Y,`Layer source does not support queryTopExtents capability`);let i=await import(`../rest/support/TopFeaturesQuery.js`);return n.queryTopExtents(i.default.from(e),t)}async queryTopFeatureCount(e,t){let{source:n,capabilities:r}=await this.load();if(!n.queryTopCount||!r?.query?.supportsTopFeaturesQuery)throw new s(Y,`Layer source does not support queryFeatureCount capability`);let i=await import(`../rest/support/TopFeaturesQuery.js`);return n.queryTopCount(i.default.from(e),t)}read(e,t){let n=e.featureCollection;if((n||e.type===`Feature Collection`)&&(this.resourceInfo=e),n){let{layers:e,showLegend:r}=n;e?.length===1&&(super.read(e[0],t),r!=null&&super.read({showLegend:r},t))}super.read(e,t),X(this.source)&&t?.origin===`service`&&([`objectIdField`,`fields`,`timeInfo`,`dateFieldsTimeZone`,`uniqueIdFields`].forEach(e=>{this.revertToOrigin(e,`service`)}),this.spatialReference||this.revertToOrigin(`spatialReference`,`service`))}write(e,t){t={...t,origin:t?.origin??void 0,writeLayerSchema:t?.writeLayerSchema??this._hasMemorySource()};let{origin:n,layerContainerType:r}=t;if(this.dynamicDataSource)return K(t,this,`a dynamic data source cannot be written to web scenes, web maps and feature service items`),null;if(this.isTable){if((n===`web-map`||n===`web-scene`)&&r!==`tables`)return K(t,this,`a table source can only be written to tables`),null;if(this._hasMemorySource())return K(t,this,`an in-memory table source cannot be written to web scenes and web maps`),null}else if(this.loaded&&(n===`web-map`||n===`web-scene`)&&r===`tables`)return K(t,this,`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(Y,`FeatureLayer (title: ${this.title}, id: ${this.id}) created using in-memory source cannot be cloned`);return super.clone()}serviceSupportsSpatialReference(e){return this.loaded?this.source?.type===`memory`||Xe(this,e):!1}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}_readEditingEnabled(e,t,n){let r=e.layerDefinition?.capabilities;if(r||(r=e.capabilities,t&&n?.origin===`web-map`&&!this._hasMemorySource()&&r))return this._hasEditingCapability(r)}_hasEditingCapability(e){return e.toLowerCase().split(`,`).map(e=>e.trim()).includes(`editing`)}_writeEditingEnabled(e,t,n,r){if(!e){let e=this.capabilities?.operations?.supportsSync?`Query,Sync`:`Query`;l(`layerDefinition.capabilities`,e,t),n&&!r?.writeLayerSchema&&(t.capabilities=e)}}_fetchFirstValidLayerId(e){return i(this.url??``,{query:{f:`json`,...this.customParameters,token:this.apiKey},responseType:`json`,signal:e}).then(e=>{let t=e.data;if(t)return this.applyPreferredHost(t),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(),H(this.renderer,this.fieldsIndex),Ke(this.timeInfo,this.fieldsIndex),this._hasMemorySource()&&this.geometryType===`mesh`&&(this.capabilities.query.supportsReturnMesh=!0),Qe(this,{origin:`service`})}canReload(){return super.canReload()&&!this._hasMemorySource()}async reloadFromService(e){let t=this.source;await t.reload({signal:e}),await this.initLayerProperties(t)}async hasDataChanged(){return Be(this)}async fetchPublishingStatus(){let e=this.source;return e?.fetchPublishingStatus?e.fetchPublishingStatus():`unavailable`}_verifyFields(){let e=this.parsedUrl?.path??`undefined`;this.objectIdField||console.log(`FeatureLayer: 'objectIdField' property is not defined (url: `+e+`)`),this.isTable||this._hasMemorySource()||e.search(/\/FeatureServer\//i)!==-1||this.fields?.some(e=>e.type===`geometry`)||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=>{let n=e.prototype?.attributes;n&&t&&delete n[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[...e.layers||[],...e.tables||[]].find(({type:e})=>!e||this.supportedSourceTypes.has(e))?.id}};n([u({clonable:!1,readOnly:!0})],$.prototype,`_titleCreator`,null),n([u(P)],$.prototype,`attributeTableTemplate`,void 0),n([q(`service`,`capabilities`)],$.prototype,`readCapabilities`,null),n([u({json:{origins:{"web-scene":{write:!1}},write:!0}})],$.prototype,`charts`,void 0),n([u({readOnly:!0})],$.prototype,`createQueryVersion`,null),n([u({json:{read:{source:`layerDefinition.copyrightText`}}})],$.prototype,`copyright`,void 0),n([u({json:{read:{source:`layerDefinition.displayField`}}})],$.prototype,`displayField`,void 0),n([u({types:at,readOnly:!0})],$.prototype,`defaultSymbol`,void 0),n([u({type:tt})],$.prototype,`dynamicDataSource`,void 0),n([u({type:Boolean})],$.prototype,`editingEnabled`,null),n([q([`portal-item`,`web-scene`],`editingEnabled`,[`layerDefinition.capabilities`])],$.prototype,`readEditingEnabled`,null),n([q(`web-map`,`editingEnabled`,[`capabilities`,`layerDefinition.capabilities`])],$.prototype,`readEditingEnabledFromWebMap`,null),n([J([`portal-item`,`web-scene`],`editingEnabled`,{"layerDefinition.capabilities":{type:String}})],$.prototype,`writeEditingEnabled`,null),n([J(`web-map`,`editingEnabled`,{capabilities:{type:String},"layerDefinition.capabilities":{type:String}})],$.prototype,`writeEditingEnabledToWebMap`,null),n([u({readOnly:!0})],$.prototype,`effectiveEditingEnabled`,null),n([u({clonable:!1,readOnly:!0})],$.prototype,`featureTitleFields`,null),n([u({type:[Ve],json:{name:`layerDefinition.fieldConfigurations`,write:{overridePolicy(e,t,n){return{enabled:!n?.writeLayerSchema,ignoreOrigin:this.originIdOf(t)===1}}}}})],$.prototype,`fieldConfigurations`,null),n([u({...Z.fields,json:{read:{source:`layerDefinition.fields`},origins:{service:{name:`fields`},"web-map":{write:{target:`layerDefinition.fields`,overridePolicy:Q}}}}})],$.prototype,`fields`,void 0),n([u(Z.fieldsIndex)],$.prototype,`fieldsIndex`,void 0),n([u({type:de,json:{name:`formInfo`,write:!0,origins:{"web-scene":{read:!1,write:!1}}}})],$.prototype,`formTemplate`,void 0),n([u({json:{read:{source:`layerDefinition.extent`}}})],$.prototype,`fullExtent`,void 0),n([u({json:{origins:{"web-map":{write:{target:`layerDefinition.geometryType`,overridePolicy:Q,writer(e,t,n){let r=e?z.toJSON(e):null;r&&l(n,r,t)}}}},read:{source:`layerDefinition.geometryType`,reader:z.read}}})],$.prototype,`geometryType`,void 0),n([u({readOnly:!0,clonable:!1})],$.prototype,`graphicOrigin`,void 0),n([u({json:{read:{source:`layerDefinition.hasM`}}})],$.prototype,`hasM`,void 0),n([u({json:{read:{source:`layerDefinition.hasZ`}}})],$.prototype,`hasZ`,void 0),n([u(F)],$.prototype,`id`,void 0),n([u({readOnly:!0,json:{origins:{service:{read:!0}},read:!1}})],$.prototype,`infoFor3D`,void 0),n([u({json:{origins:{"web-map":{write:{target:`layerDefinition.type`}}}}})],$.prototype,`isTable`,void 0),n([q(`service`,`isTable`,[`type`,`geometryType`]),q(`isTable`,[`layerDefinition.type`,`layerDefinition.geometryType`])],$.prototype,`readIsTable`,null),n([J(`web-map`,`isTable`)],$.prototype,`writeIsTable`,null),n([u(I)],$.prototype,`labelsVisible`,void 0),n([u({type:[qe],json:{origins:{service:{name:`drawingInfo.labelingInfo`,read:U,write:!1}},name:`layerDefinition.drawingInfo.labelingInfo`,read:U,write:{layerContainerTypes:d}}})],$.prototype,`labelingInfo`,void 0),n([u({type:W,json:{name:`layerDefinition.drawingInfo.symbolLayerDrawing`,write:!0,origins:{"web-scene":{write:!1}}}})],$.prototype,`symbolLayerDrawing`,void 0),n([q([`portal-item`,`web-map`],`symbolLayerDrawing`,[`layerDefinition.drawingInfo.renderer`,`layerDefinition.drawingInfo.symbolLayerDrawing`])],$.prototype,`readSymbolLayerDrawing`,null),n([u((()=>{let e=c(L);return e.json.origins[`portal-item`]={write:{target:`layerDefinition.drawingInfo.transparency`,writer(e,t,n){l(n,ot(e),t)}}},e})())],$.prototype,`opacity`,void 0),n([u(R)],$.prototype,`legendEnabled`,void 0),n([u({type:[`show`,`hide`],json:(()=>{let e=c(ge.json);return e.origins[`portal-item`]={read:!1,write:!1},e})()})],$.prototype,`listMode`,void 0),n([q(`globalIdField`,[`layerDefinition.globalIdField`,`layerDefinition.fields`])],$.prototype,`readGlobalIdField`,null),n([u({json:{origins:{"web-map":{write:{target:`layerDefinition.objectIdField`,overridePolicy:Q}}}}})],$.prototype,`objectIdField`,void 0),n([q(`objectIdField`,[`layerDefinition.objectIdField`,`layerDefinition.fields`])],$.prototype,`readObjectIdField`,null),n([u({type:[`ArcGISFeatureLayer`],json:{write:{target:`layerType`,ignoreOrigin:!0,layerContainerTypes:d}}})],$.prototype,`operationalLayerType`,void 0),n([u(Z.outFields)],$.prototype,`outFields`,void 0),n([u({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],$.prototype,`path`,void 0),n([u(_e)],$.prototype,`popupEnabled`,void 0),n([u({type:r,json:{name:`popupInfo`,write:!0}})],$.prototype,`popupTemplate`,void 0),n([J(`popupTemplate`)],$.prototype,`writePopupTemplate`,null),n([u({readOnly:!0})],$.prototype,`defaultPopupTemplate`,null),n([u({types:et,json:{origins:{service:{write:{target:`drawingInfo.renderer`,enabled:!1}},"web-scene":{types:$e,name:`layerDefinition.drawingInfo.renderer`,write:{layerContainerTypes:d,overridePolicy(e,t,n){return{ignoreOrigin:n?.writeLayerSchema,layerContainerTypes:d}}}}},write:{target:`layerDefinition.drawingInfo.renderer`,overridePolicy(e,t,n){return{ignoreOrigin:n?.writeLayerSchema,layerContainerTypes:d}}}}})],$.prototype,`renderer`,null),n([q(`service`,`renderer`,[`drawingInfo.renderer`,`defaultSymbol`]),q(`renderer`,[`layerDefinition.drawingInfo.renderer`,`layerDefinition.defaultSymbol`])],$.prototype,`readRenderer`,null),n([u()],$.prototype,`resourceInfo`,void 0),n([u((()=>{let e=c(ve);return e.json.origins[`portal-item`]={read:!1,write:!1},e})())],$.prototype,`screenSizePerspectiveEnabled`,void 0),n([u({clonable:!1})],$.prototype,`source`,null),n([q(`portal-item`,`source`,[`featureSet`]),q(`web-map`,`source`,[`featureSet`])],$.prototype,`readSource`,null),n([u({json:{read:{source:`layerDefinition.extent.spatialReference`}}})],$.prototype,`spatialReference`,void 0),n([u({type:Number})],$.prototype,`subtypeCode`,void 0),n([u({readOnly:!1})],$.prototype,`subtypeField`,void 0),n([u({readOnly:!1})],$.prototype,`subtypes`,void 0),n([u({type:[B]})],$.prototype,`templates`,void 0),n([q(`templates`,[`editFieldsInfo`,`creatorField`,`editorField`,`templates`])],$.prototype,`readTemplates`,null),n([u()],$.prototype,`title`,void 0),n([q(`service`,`title`,[`name`]),q(`portal-item`,`title`,[`layerDefinition.title`,`layerDefinition.name`,`title`])],$.prototype,`readTitle`,null),n([q(`web-map`,`title`,[`layerDefinition.name`,`title`])],$.prototype,`readTitleFromWebMap`,null),n([u({type:String})],$.prototype,`sublayerTitleMode`,void 0),n([u({json:{read:!1}})],$.prototype,`type`,void 0),n([u({type:String})],$.prototype,`typeIdField`,void 0),n([q(`service`,`typeIdField`),q(`typeIdField`,[`layerDefinition.typeIdField`])],$.prototype,`readTypeIdField`,null),n([u({type:[V]})],$.prototype,`types`,void 0),n([q(`service`,`types`,[`types`]),q(`types`,[`layerDefinition.types`])],$.prototype,`readTypes`,null),n([u({type:Boolean,json:{origins:{"portal-item":{write:{target:`layerDefinition.defaultVisibility`,layerContainerTypes:d}}}}})],$.prototype,`visible`,void 0),n([q(`portal-item`,`visible`,[`visibility`,`layerDefinition.defaultVisibility`])],$.prototype,`readVisible`,null),$=n([ue(`esri.layers.FeatureLayer`)],$);export{$ as default};
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as n}from"../core/Clonable.js";import r from"../core/Error.js";import i from"../core/Logger.js";import{removeMaybe as a}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as o}from"../core/MultiOriginJSONSupport.js";import{debounce as s,throwIfAbortError as ee}from"../core/promiseUtils.js";import{watch as c}from"../core/reactiveUtils.js";import{property as l,subclass as u}from"../core/accessorSupport/decorators.js";import{ensureClass as d}from"../core/accessorSupport/ensureType.js";import f from"../graphic/ImageryTileGraphicOrigin.js";import p from"./Layer.js";import{ArcGISService as m}from"./mixins/ArcGISService.js";import{BlendLayer as h}from"./mixins/BlendLayer.js";import{CustomParametersMixin as te}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as g}from"./mixins/OperationalLayer.js";import{PortalLayer as _}from"./mixins/PortalLayer.js";import{RasterJobHandlerMixin as v}from"./mixins/RasterJobHandlerMixin.js";import{RasterPresetRendererMixin as y}from"./mixins/RasterPresetRendererMixin.js";import{RefreshableLayer as b}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as x}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as S}from"./mixins/TemporalLayer.js";import{TiledImagery as C}from"./mixins/TiledImagery.js";import{isFunctionRaster as w,getPrimaryRasters as T}from"./raster/datasets/datasetUtils.js";import E from"./raster/datasets/FunctionRaster.js";import D from"./raster/datasets/RasterFactory.js";import{getPrimaryRasterUrls as O,create as k}from"./raster/functions/rasterFunctionHelper.js";import{legendEnabled as A,screenSizePerspectiveEnabled as j}from"./support/commonProperties.js";import M from"./support/Field.js";import{getServicePixelValueField as N,getRawServicePixelValueField as P,getRasterAttributeTableFields as F,getMagnitudeField as I,getDirectionField as L,getMultidimensionalFields as R,commonRasterFieldNames as z,setDefaultRasterFieldFormats as B}from"./support/rasterFieldUtils.js";import V from"./support/RasterFunction.js";import{getRasterJobHandler as H,releaseRasterJobHandler as U}from"./support/rasterJobHelper.js";import W from"./support/TileInfo.js";import{logInvalidElevationInfoWarning as G,elevationModeUnsupportedMessage as K,featureExpressionUnsupportedMessage as q}from"../support/elevationInfoUtils.js";import{createPopupTemplate as J}from"../support/popupUtils.js";import Y from"../symbols/support/ElevationInfo.js";import{addLayerUnsupportedError as X}from"../webdoc/support/unsupportedErrors.js";let Z=class extends h(x(g(_(y(te(C(v(S(m(b(o(n(p))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.charts=null,this.graphicOrigin=new f(this),this.legendEnabled=!0,this.isReference=null,this.listMode=`show`,this.sourceJSON=null,this.version=null,this.type=`imagery-tile`,this.operationalLayerType=`ArcGISTiledImageServiceLayer`,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.fields=null,this.source=void 0,this._debouncedSaveOperations=s(async(e,t,n)=>{let{save:r,saveAs:i}=await import(`./save/imageryUtils.js`);switch(e){case 0:return r(this,t);case 1:return i(this,n,t)}})}normalizeCtorArgs(e,t){return typeof e==`string`?{url:e,...t}:e}load(e){let t=e==null?null:e.signal;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:[`Image Service`]},e).catch(ee).then(()=>this._openRaster(t))),Promise.resolve(this)}destroy(){super.destroy(),this._releaseWorkerHandle=a(this._releaseWorkerHandle)}set elevationInfo(e){e?.mode!==`relative-to-scene`&&this._set(`elevationInfo`,e),this._validateElevationInfo(e)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){let e=[N(`Pixel Value`),P(`Raw Pixel Value`)],t=this.raster?.rasterInfo??this.serviceRasterInfo,n=t?.attributeTable;if(n){let t=F(n);e.push(...t)}let r=t?.dataType,i=t?.multidimensionalInfo;if((r===`vector-magdir`||r===`vector-uv`)&&i!=null){let t=i.variables[0].unit?.trim(),n=I(t),r=L();e.push(n,r)}if(i){let t=R(i);e.push(...t)}return e}get renderer(){return super.renderer}set renderer(e){super.renderer=e}createPopupTemplate(e){let{rasterFields:t}=this,n=e?.visibleFieldNames??new Set(t.map(({name:e})=>e).filter(e=>e!==z.rawServicePixelValue)),r=J({fields:t,title:this.title},{...e,visibleFieldNames:n}),{rasterInfo:i}=this.raster;return r?.fieldInfos&&i&&B(r.fieldInfos,i),r}async generateRasterInfo(e,t){let n=d(V,e);if(await this.load(),!n||n.functionName?.toLowerCase()===`none`)return this.serviceRasterInfo;try{let{rasterInfo:e}=await this._openFunctionRaster(n,t);return e}catch(e){throw e instanceof r?e:new r(`imagery-tile-layer`,`the given raster function is not supported`)}}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}supportsExportMapTiles(){let e=this._primaryRasters[0]??this.raster,t=e?.datasetFormat===`RasterTileServer`,n=!!this.sourceJSON?.exportTilesAllowed,r=this.sourceJSON?.datasetFormat?.toLowerCase(),i=!/\/tiledimageservices[^.]*\.arcgis\.com/i.test(this.url)&&e?.tileType===`Raster`&&(r===`cache/jpegplus`||r===`cache/jpegpng`),a=e?.tileType===`Map`||i;return t&&n&&a}supportsWrite(){let e=this._primaryRasters[0]??this.raster;return!!(this.loaded?e.datasetFormat===`RasterTileServer`&&(e.tileType===`Raster`||e.tileType===`Map`):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))}write(e,t){return this.supportsWrite()?super.write(e,t):(X(t,this),null)}async hasDataChanged(){try{let e=this._primaryRasters[0]??this.raster,{dataChanged:t,updates:n}=await e.refresh();return t&&(this.serviceRasterInfo!==e.rasterInfo&&this._set(`serviceRasterInfo`,e.rasterInfo),e.sourceJSON&&this.sourceJSON!==e.sourceJSON&&(this.sourceJSON=e.sourceJSON),n&&this.read(n,{origin:`service`,url:this.parsedUrl,ignoreDefaults:!0})),t}catch{return!1}}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=w(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{let{url:t,rasterFunction:n,source:i}=this;if(!(t||i))throw new r(`imagery-tile-layer:open`,`missing url or source parameter`);i?await this._openFromSource(i,e):n?await this._openFromUrlWithRasterFunction(t,n,e):await this._openFromUrl(t,e)}let n=this.raster.rasterInfo;if(!n)throw new r(`imagery-tile-layer:load`,`cannot load resources on `+this.url);if(this._set(`serviceRasterInfo`,t?n:this._primaryRasters[0].rasterInfo),this._set(`spatialReference`,n.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,this.sourceJSON!=null){let e=this.raster.tileType===`Map`&&this.sourceJSON.minLOD!=null&&this.sourceJSON.maxLOD!=null?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:`service`})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:`service`});this.title||=this.raster.datasetName,this.raster.tileType===`Map`&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles(c(()=>this.customParameters,e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)}))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=T(e),this.url||=this._primaryRasters[0].url}async _openFromUrlWithRasterFunction(e,t,n){let i=[e];t&&O(t.toJSON(),i);let a;i.some(e=>$(e))&&(a=await H(),this._releaseWorkerHandle={remove:()=>U()});let o=await Promise.all(i.map(e=>D.open({url:e,rasterInfo:i.length===1?this.serviceRasterInfo:void 0,sourceJSON:i.length===1?this.sourceJSON:void 0,ioConfig:{sampling:`closest`,...this.ioConfig,customFetchParameters:this.customParameters},rasterJobHandler:a,signal:n}))),s=o.findIndex(e=>e==null);if(s>-1)throw new r(`imagery-tile-layer:open`,`cannot open raster: ${i[s]}`);return this._primaryRasters=o,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){let n;$(e)&&(n=await H(),this._releaseWorkerHandle={remove:()=>U()});let i=await D.open({url:e,rasterInfo:this.serviceRasterInfo,sourceJSON:this.sourceJSON,ioConfig:{sampling:`closest`,...this.ioConfig,customFetchParameters:this.customParameters},rasterJobHandler:n,signal:t});if(i==null)throw new r(`imagery-tile-layer:open`,`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,t){let n=`the tiled imagery data source is not supported`,i=e.type?.toLowerCase()===`coverage`?`CovJSON`:e.extent&&e.pixelBlock?`MEMORY`:null;if(!i)throw new r(`imagery-tile-layer:open`,n);i===`MEMORY`&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});let a=await D.open({url:``,source:e,datasetFormat:i,ioConfig:{sampling:`closest`,...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(a==null)throw new r(`imagery-tile-layer:open`,n);this._primaryRasters=[a],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=a}async _openFunctionRaster(e,t){let n={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach(e=>n[e.url]=e);let r=k(e.functionDefinition?.toJSON()??e.toJSON(),n),i=new E({rasterFunction:r});return await i.open(t),i}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof r&&i.getLogger(this).error(`imagery-tile-layer:open`,e.message),i.getLogger(this).warn(`imagery-tile-layer:open`,`the raster function cannot be applied and is removed`),this._set(`rasterFunction`,null),this.raster=this._primaryRasters[0]}}_validateElevationInfo(e){G(i.getLogger(this),K(`ImageryTile layers`,`relative-to-scene`,e)),G(i.getLogger(this),q(`ImageryTile layers`,e))}};e([l({clonable:!1})],Z.prototype,`_primaryRasters`,void 0),e([l({clonable:!1})],Z.prototype,`_releaseWorkerHandle`,void 0),e([l({json:{origins:{"web-scene":{write:!1}},write:!0}})],Z.prototype,`charts`,void 0),e([l({type:Y,value:null,json:{name:`layerDefinition.elevationInfo`,write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],Z.prototype,`elevationInfo`,null),e([l({type:W})],Z.prototype,`tileInfo`,void 0),e([l({readOnly:!0,clonable:!1})],Z.prototype,`graphicOrigin`,void 0),e([l(A)],Z.prototype,`legendEnabled`,void 0),e([l({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Z.prototype,`isReference`,void 0),e([l({type:[`show`,`hide`]})],Z.prototype,`listMode`,void 0),e([l({json:{read:!0,write:!0}})],Z.prototype,`blendMode`,void 0),e([l({type:V,json:{name:`renderingRule`,write:!0}})],Z.prototype,`rasterFunction`,void 0),e([l()],Z.prototype,`sourceJSON`,void 0),e([l({readOnly:!0,json:{origins:{service:{read:{source:`currentVersion`}}}}})],Z.prototype,`version`,void 0),e([l({readOnly:!0,json:{read:!1}})],Z.prototype,`type`,void 0),e([l({type:[`ArcGISTiledImageServiceLayer`]})],Z.prototype,`operationalLayerType`,void 0),e([l({type:Boolean,value:!0,json:{read:{source:`disablePopup`,reader(e,t){return!t.disablePopup}},write:{target:`disablePopup`,overridePolicy(){return{enabled:!this.loaded||this.raster.tileType===`Raster`}},writer(e,t,n){t[n]=!e}}}})],Z.prototype,`popupEnabled`,void 0),e([l({type:t,json:{read:{source:`popupInfo`},write:{target:`popupInfo`,overridePolicy(){return{enabled:!this.loaded||this.raster.tileType===`Raster`}}}}})],Z.prototype,`popupTemplate`,void 0),e([l({readOnly:!0})],Z.prototype,`defaultPopupTemplate`,null),e([l(j)],Z.prototype,`screenSizePerspectiveEnabled`,void 0),e([l({readOnly:!0,type:[M]})],Z.prototype,`fields`,void 0),e([l({readOnly:!0,type:[M]})],Z.prototype,`rasterFields`,null),e([l({constructOnly:!0})],Z.prototype,`source`,void 0),Z=e([u(`esri.layers.ImageryTileLayer`)],Z);const Q=Z;function $(e){return/\.(png|gif|bmp)$/i.test(e)}export{Q as default};
2
+ import{__decorate as e}from"tslib";import t from"../PopupTemplate.js";import{ClonableMixin as n}from"../core/Clonable.js";import r from"../core/Error.js";import i from"../core/Logger.js";import{removeMaybe as a}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as o}from"../core/MultiOriginJSONSupport.js";import{debounce as s,throwIfAbortError as ee}from"../core/promiseUtils.js";import{watch as c}from"../core/reactiveUtils.js";import{property as l,subclass as u}from"../core/accessorSupport/decorators.js";import{ensureClass as d}from"../core/accessorSupport/ensureType.js";import f from"../graphic/ImageryTileGraphicOrigin.js";import p from"./Layer.js";import{ArcGISService as m}from"./mixins/ArcGISService.js";import{BlendLayer as h}from"./mixins/BlendLayer.js";import{CustomParametersMixin as te}from"./mixins/CustomParametersMixin.js";import{OperationalLayer as g}from"./mixins/OperationalLayer.js";import{PortalLayer as _}from"./mixins/PortalLayer.js";import{RasterJobHandlerMixin as v}from"./mixins/RasterJobHandlerMixin.js";import{RasterPresetRendererMixin as y}from"./mixins/RasterPresetRendererMixin.js";import{RefreshableLayer as b}from"./mixins/RefreshableLayer.js";import{ScaleRangeLayer as x}from"./mixins/ScaleRangeLayer.js";import{TemporalLayer as S}from"./mixins/TemporalLayer.js";import{TiledImagery as C}from"./mixins/TiledImagery.js";import{isFunctionRaster as w,getPrimaryRasters as T}from"./raster/datasets/datasetUtils.js";import E from"./raster/datasets/FunctionRaster.js";import D from"./raster/datasets/RasterFactory.js";import{getPrimaryRasterUrls as O,create as k}from"./raster/functions/rasterFunctionHelper.js";import{legendEnabled as A,screenSizePerspectiveEnabled as j}from"./support/commonProperties.js";import M from"./support/Field.js";import{getServicePixelValueField as N,getRawServicePixelValueField as P,getRasterAttributeTableFields as F,getMagnitudeField as I,getDirectionField as L,getMultidimensionalFields as R,commonRasterFieldNames as z,setDefaultRasterFieldFormats as B}from"./support/rasterFieldUtils.js";import V from"./support/RasterFunction.js";import{getRasterJobHandler as H,releaseRasterJobHandler as U}from"./support/rasterJobHelper.js";import W from"./support/TileInfo.js";import{logInvalidElevationInfoWarning as G,elevationModeUnsupportedMessage as K,featureExpressionUnsupportedMessage as q}from"../support/elevationInfoUtils.js";import{createPopupTemplate as J}from"../support/popupUtils.js";import Y from"../symbols/support/ElevationInfo.js";import{addLayerUnsupportedError as X}from"../webdoc/support/unsupportedErrors.js";let Z=class extends h(x(g(_(y(te(C(v(S(m(b(o(n(p))))))))))))){constructor(...e){super(...e),this._primaryRasters=[],this.charts=null,this.graphicOrigin=new f(this),this.legendEnabled=!0,this.isReference=null,this.listMode=`show`,this.sourceJSON=null,this.version=null,this.type=`imagery-tile`,this.operationalLayerType=`ArcGISTiledImageServiceLayer`,this.popupEnabled=!0,this.popupTemplate=null,this.screenSizePerspectiveEnabled=!0,this.fields=null,this.source=void 0,this._debouncedSaveOperations=s(async(e,t,n)=>{let{save:r,saveAs:i}=await import(`./save/imageryUtils.js`);switch(e){case 0:return r(this,t);case 1:return i(this,n,t)}})}normalizeCtorArgs(e,t){return typeof e==`string`?{url:e,...t}:e}load(e){let t=e==null?null:e.signal;return this.addResolvingPromise(this.loadFromPortal({supportedTypes:[`Image Service`]},e).catch(ee).then(()=>this._openRaster(t))),Promise.resolve(this)}destroy(){super.destroy(),this._releaseWorkerHandle=a(this._releaseWorkerHandle)}set elevationInfo(e){e?.mode!==`relative-to-scene`&&this._set(`elevationInfo`,e),this._validateElevationInfo(e)}get defaultPopupTemplate(){return this.createPopupTemplate()}get rasterFields(){let e=[N(`Pixel Value`),P(`Raw Pixel Value`)],t=this.raster?.rasterInfo??this.serviceRasterInfo,n=t?.attributeTable;if(n){let t=F(n);e.push(...t)}let r=t?.dataType,i=t?.multidimensionalInfo;if((r===`vector-magdir`||r===`vector-uv`)&&i!=null){let t=i.variables[0].unit?.trim(),n=I(t),r=L();e.push(n,r)}if(i){let t=R(i);e.push(...t)}return e}get renderer(){return super.renderer}set renderer(e){super.renderer=e}createPopupTemplate(e){let{rasterFields:t}=this,n=e?.visibleFieldNames??new Set(t.map(({name:e})=>e).filter(e=>e!==z.rawServicePixelValue)),r=J({fields:t,title:this.title},{...e,visibleFieldNames:n}),{rasterInfo:i}=this.raster;return r?.fieldInfos&&i&&B(r.fieldInfos,i),r}async generateRasterInfo(e,t){let n=d(V,e);if(await this.load(),!n||n.functionName?.toLowerCase()===`none`)return this.serviceRasterInfo;try{let{rasterInfo:e}=await this._openFunctionRaster(n,t);return e}catch(e){throw e instanceof r?e:new r(`imagery-tile-layer`,`the given raster function is not supported`)}}async save(e){return this._debouncedSaveOperations(0,e)}async saveAs(e,t){return this._debouncedSaveOperations(1,t,e)}supportsExportMapTiles(){let e=this._primaryRasters[0]??this.raster,t=e?.datasetFormat===`RasterTileServer`,n=!!this.sourceJSON?.exportTilesAllowed,r=this.sourceJSON?.datasetFormat?.toLowerCase(),i=!/\/tiledimageservices[^.]*\.arcgis\.com/i.test(this.url)&&e?.tileType===`Raster`&&(r===`cache/jpegplus`||r===`cache/jpegpng`),a=e?.tileType===`Map`||i;return t&&n&&a}supportsWrite(){let e=this._primaryRasters[0]??this.raster;return!!(this.loaded?e.datasetFormat===`RasterTileServer`&&(e.tileType===`Raster`||e.tileType===`Map`):this.url&&/\/ImageServer(\/|\/?$)/i.test(this.url))}write(e,t){return this.supportsWrite()?super.write(e,t):(X(t,this),null)}async hasDataChanged(){try{let e=this._primaryRasters[0]??this.raster,{dataChanged:t,updates:n}=await e.refresh();return t&&(this.serviceRasterInfo!==e.rasterInfo&&this._set(`serviceRasterInfo`,e.rasterInfo),e.sourceJSON&&this.sourceJSON!==e.sourceJSON&&(this.sourceJSON=e.sourceJSON),n&&this.read(n,{origin:`service`,url:this.parsedUrl,ignoreDefaults:!0})),t}catch{return!1}}async _openRaster(e){let t=!1;if(this.raster)await this._openFromRaster(this.raster,e),t=w(this.raster),!t&&this.rasterFunction&&(this._primaryRasters=[this.raster],await this._initializeWithFunctionRaster(this.rasterFunction));else{let{url:t,rasterFunction:n,source:i}=this;if(!(t||i))throw new r(`imagery-tile-layer:open`,`missing url or source parameter`);i?await this._openFromSource(i,e):n?await this._openFromUrlWithRasterFunction(t,n,e):await this._openFromUrl(t,e)}let n=this.raster.rasterInfo;if(!n)throw new r(`imagery-tile-layer:load`,`cannot load resources on `+this.url);if(this._set(`serviceRasterInfo`,t?n:this._primaryRasters[0].rasterInfo),this._set(`spatialReference`,n.spatialReference),this.sourceJSON=this.sourceJSON||this.raster.sourceJSON,this.sourceJSON!=null){let e=this.raster.tileType===`Map`&&this.sourceJSON.minLOD!=null&&this.sourceJSON.maxLOD!=null?this.sourceJSON:{...this.sourceJSON,minScale:0,maxScale:0};this.read(e,{origin:`service`})}else this.read({tileInfo:this.serviceRasterInfo?.storageInfo.tileInfo.toJSON()},{origin:`service`});this.title||=this.raster.datasetName,this.raster.tileType===`Map`&&(this.popupEnabled=!1),this._configDefaultSettings(),this.addHandles(c(()=>this.customParameters,e=>{this.raster&&(this.raster.ioConfig.customFetchParameters=e)}))}async _openFromRaster(e,t){e.rasterInfo||await e.open({signal:t}),this._primaryRasters=T(e),this.url||=this._primaryRasters[0].url}async _openFromUrlWithRasterFunction(e,t,n){let i=[e];t&&O(t.toJSON(),i);let a;i.some(e=>$(e,this.ioConfig))&&(a=await H(),this._releaseWorkerHandle={remove:()=>U()});let o=await Promise.all(i.map(e=>D.open({url:e,rasterInfo:i.length===1?this.serviceRasterInfo:void 0,sourceJSON:i.length===1?this.sourceJSON:void 0,ioConfig:{sampling:`closest`,...this.ioConfig,customFetchParameters:this.customParameters},rasterJobHandler:a,signal:n}))),s=o.findIndex(e=>e==null);if(s>-1)throw new r(`imagery-tile-layer:open`,`cannot open raster: ${i[s]}`);return this._primaryRasters=o,this._initializeWithFunctionRaster(t)}async _openFromUrl(e,t){let n;$(e,this.ioConfig)&&(n=await H(),this._releaseWorkerHandle={remove:()=>U()});let i=await D.open({url:e,rasterInfo:this.serviceRasterInfo,sourceJSON:this.sourceJSON,ioConfig:{sampling:`closest`,...this.ioConfig,customFetchParameters:this.customParameters},rasterJobHandler:n,signal:t});if(i==null)throw new r(`imagery-tile-layer:open`,`cannot open raster: ${e}`);this._primaryRasters=[i],this.raster=i}async _openFromSource(e,t){let n=`the tiled imagery data source is not supported`,i=e.type?.toLowerCase()===`coverage`?`CovJSON`:e.extent&&e.pixelBlock?`MEMORY`:null;if(!i)throw new r(`imagery-tile-layer:open`,n);i===`MEMORY`&&(e={...e,pixelBlock:void 0,pixelBlocks:[e.pixelBlock]});let a=await D.open({url:``,source:e,datasetFormat:i,ioConfig:{sampling:`closest`,...this.ioConfig,customFetchParameters:this.customParameters},signal:t});if(a==null)throw new r(`imagery-tile-layer:open`,n);this._primaryRasters=[a],this.rasterFunction?await this._initializeWithFunctionRaster(this.rasterFunction):this.raster=a}async _openFunctionRaster(e,t){let n={raster:this._primaryRasters[0]};this._primaryRasters.length>1&&this._primaryRasters.forEach(e=>n[e.url]=e);let r=k(e.functionDefinition?.toJSON()??e.toJSON(),n),i=new E({rasterFunction:r});return await i.open(t),i}async _initializeWithFunctionRaster(e,t){try{this.raster=await this._openFunctionRaster(e,t)}catch(e){e instanceof r&&i.getLogger(this).error(`imagery-tile-layer:open`,e.message),i.getLogger(this).warn(`imagery-tile-layer:open`,`the raster function cannot be applied and is removed`),this._set(`rasterFunction`,null),this.raster=this._primaryRasters[0]}}_validateElevationInfo(e){G(i.getLogger(this),K(`ImageryTile layers`,`relative-to-scene`,e)),G(i.getLogger(this),q(`ImageryTile layers`,e))}};e([l({clonable:!1})],Z.prototype,`_primaryRasters`,void 0),e([l({clonable:!1})],Z.prototype,`_releaseWorkerHandle`,void 0),e([l({json:{origins:{"web-scene":{write:!1}},write:!0}})],Z.prototype,`charts`,void 0),e([l({type:Y,value:null,json:{name:`layerDefinition.elevationInfo`,write:!0,origins:{"portal-item":{read:!1,write:!1},"web-map":{read:!1,write:!1}}}})],Z.prototype,`elevationInfo`,null),e([l({type:W})],Z.prototype,`tileInfo`,void 0),e([l({readOnly:!0,clonable:!1})],Z.prototype,`graphicOrigin`,void 0),e([l(A)],Z.prototype,`legendEnabled`,void 0),e([l({type:Boolean,json:{read:!1,write:{enabled:!0,overridePolicy:()=>({enabled:!1})}}})],Z.prototype,`isReference`,void 0),e([l({type:[`show`,`hide`]})],Z.prototype,`listMode`,void 0),e([l({json:{read:!0,write:!0}})],Z.prototype,`blendMode`,void 0),e([l({type:V,json:{name:`renderingRule`,write:!0}})],Z.prototype,`rasterFunction`,void 0),e([l()],Z.prototype,`sourceJSON`,void 0),e([l({readOnly:!0,json:{origins:{service:{read:{source:`currentVersion`}}}}})],Z.prototype,`version`,void 0),e([l({readOnly:!0,json:{read:!1}})],Z.prototype,`type`,void 0),e([l({type:[`ArcGISTiledImageServiceLayer`]})],Z.prototype,`operationalLayerType`,void 0),e([l({type:Boolean,value:!0,json:{read:{source:`disablePopup`,reader(e,t){return!t.disablePopup}},write:{target:`disablePopup`,overridePolicy(){return{enabled:!this.loaded||this.raster.tileType===`Raster`}},writer(e,t,n){t[n]=!e}}}})],Z.prototype,`popupEnabled`,void 0),e([l({type:t,json:{read:{source:`popupInfo`},write:{target:`popupInfo`,overridePolicy(){return{enabled:!this.loaded||this.raster.tileType===`Raster`}}}}})],Z.prototype,`popupTemplate`,void 0),e([l({readOnly:!0})],Z.prototype,`defaultPopupTemplate`,null),e([l(j)],Z.prototype,`screenSizePerspectiveEnabled`,void 0),e([l({readOnly:!0,type:[M]})],Z.prototype,`fields`,void 0),e([l({readOnly:!0,type:[M]})],Z.prototype,`rasterFields`,null),e([l({constructOnly:!0})],Z.prototype,`source`,void 0),Z=e([u(`esri.layers.ImageryTileLayer`)],Z);const Q=Z;function $(e,t){let{tileGeneration:n}=t??{};return n===`immediate`||/\.(png|gif|bmp)$/i.test(e)}export{Q as default};
@@ -101,16 +101,17 @@ export interface LineOfSightLayerProperties extends LayerProperties, Operational
101
101
  * abortController.abort();
102
102
  * ```
103
103
  *
104
- * If the [observer position](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysisObserver/#position) or
105
- * [target position](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysisTarget/#position) have [z-values](https://developers.arcgis.com/javascript/latest/references/core/geometry/Point/#hasZ)
106
- * then these will be treated as absolute values, otherwise the points will be aligned to the ground.
107
- *
108
104
  * > [!WARNING]
109
105
  * >
110
- * > **Known Limitations**
111
- * >
112
- * > This layer is only supported in a 3D [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
113
- * > The results of the tool vary depending on the zoom level, as changes in zoom level affect the level of detail (LOD) of the scene geometry.
106
+ * > **Things to consider:**
107
+ * > * This layer is only supported in a 3D [SceneView](https://developers.arcgis.com/javascript/latest/references/core/views/SceneView/).
108
+ * > * The results of the tool vary depending on the zoom level, as changes in zoom level affect the level of detail (LOD) of the scene geometry.
109
+ * > * Snapping, tooltips, display units, and input units used during interactive placement and editing are inherited from
110
+ * [ViewOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/).
111
+ * > * Snapping is enabled by default. This can be temporarily disabled by holding the `CTRL` key.
112
+ * > * Layer types currently supported for snapping are: [FeatureLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/FeatureLayer/), [GraphicsLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GraphicsLayer/) (except Mesh geometries),
113
+ * > [GeoJSONLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/GeoJSONLayer/), [WFSLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/WFSLayer/), [CSVLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/CSVLayer/),
114
+ * > [3D Object SceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/SceneLayer/), and [BuildingSceneLayer](https://developers.arcgis.com/javascript/latest/references/core/layers/BuildingSceneLayer/).
114
115
  *
115
116
  * @since 4.24
116
117
  * @see [LineOfSightLayerView](https://developers.arcgis.com/javascript/latest/references/core/views/layers/LineOfSightLayerView/)
@@ -118,6 +119,7 @@ export interface LineOfSightLayerProperties extends LayerProperties, Operational
118
119
  * @see [LineOfSightAnalysisTarget](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysisTarget/)
119
120
  * @see [LineOfSightAnalysisObserver](https://developers.arcgis.com/javascript/latest/references/core/analysis/LineOfSightAnalysisObserver/)
120
121
  * @see [LineOfSightAnalysisView3D](https://developers.arcgis.com/javascript/latest/references/core/views/3d/analysis/LineOfSightAnalysisView3D/)
122
+ * @see [ViewOptions](https://developers.arcgis.com/javascript/latest/references/core/views/interactive/options/ViewOptions/)
121
123
  * @see [Line Of Sight component](https://developers.arcgis.com/javascript/latest/references/map-components/components/arcgis-line-of-sight/)
122
124
  */
123
125
  export default class LineOfSightLayer extends LineOfSightLayerSuperclass {
@@ -1,2 +1,2 @@
1
1
  /* COPYRIGHT Esri - https://js.arcgis.com/6.0/LICENSE.txt */
2
- import{__decorate as e}from"tslib";import t from"../Graphic.js";import n from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import i from"../core/Collection.js";import a from"../core/Error.js";import{abortHandle as o}from"../core/handleUtils.js";import s from"../core/Logger.js";import{destroyMaybe as c}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as l}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as u,throwIfAborted as d,isAbortError as f,throwIfNotAbortError as p}from"../core/promiseUtils.js";import{whenOnce as m}from"../core/reactiveUtils.js";import{property as h,subclass as g}from"../core/accessorSupport/decorators.js";import{getProperties as _}from"../core/accessorSupport/utils.js";import v from"../geometry/Point.js";import{projectAsync as y}from"../geometry/projectionUtils.js";import b from"../graphic/SceneGraphicOrigin.js";import x from"./Layer.js";import{NoModelError as ee,MultipleModelsError as S}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as C}from"./mixins/APIKeyMixin.js";import{ArcGISService as w}from"./mixins/ArcGISService.js";import{CustomParametersMixin as te}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as ne}from"./mixins/EditBusLayer.js";import{OperationalLayer as re}from"./mixins/OperationalLayer.js";import{PortalLayer as ie}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as ae}from"./mixins/ScaleRangeLayer.js";import{SceneService as oe}from"./mixins/SceneService.js";import{useViewTimeProperty as se}from"./mixins/TemporalLayer.js";import{isHostedAgolService as T}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as ce}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as le}from"./support/capabilities.js";import{elevationInfo as E,labelsVisible as D,legendEnabled as O,popupEnabled as k,attributeTableTemplate as A,screenSizePerspectiveEnabled as j,timeInfo as M}from"./support/commonProperties.js";import{getFieldDomain as N,computeEffectiveEditingEnabled as P,getGlobalIdToObjectIdMap as F}from"./support/featureLayerUtils.js";import I from"./support/FeatureReductionSelection.js";import{defineFieldProperties as L}from"./support/fieldProperties.js";import R from"./support/FieldsIndex.js";import{fixRendererFields as z,fixTimeInfoFields as B,unpackFieldNames as V}from"./support/fieldUtils.js";import{I3SNodePageDefinition as H,I3SMaterialDefinition as U,I3STextureSetDefinition as W,I3SGeometryDefinition as ue}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as de,isFileSupported as fe}from"./support/infoFor3D.js";import pe from"./support/LabelClass.js";import{reader as G}from"./support/labelingInfo.js";import me from"./support/LayerFloorInfo.js";import{layersLoaderMap as he}from"./support/layersLoader.js";import{getMeshTransformForMetersToSpatialReference as ge}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as _e}from"./support/RangeInfo.js";import ve from"./support/SceneFilter.js";import{cacheIsOutOfSync as K}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ye}from"./support/sceneLayerStatistics.js";import{SceneServiceTimeInfo as be}from"./support/SceneServiceTimeInfo.js";import xe from"./support/TimeInfo.js";import{loadStyleRenderer as Se}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as Ce}from"../renderers/support/typeUtils.js";import we from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as q,elevationModeUnsupportedMessage as Te,featureExpressionUnsupportedMessage as Ee}from"../support/elevationInfoUtils.js";import{createPopupTemplate as De}from"../support/popupUtils.js";import{extractZipFiles as Oe}from"../support/zipUtils.js";import J from"../time/TimeExtent.js";import ke from"../time/TimeInterval.js";import{queryAttributesFromCachedAttributesId as Ae}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as je,getFetchPopupTemplate as Me}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Ne}from"../webdoc/support/opacityUtils.js";import{reader as Y}from"../core/accessorSupport/decorators/reader.js";const X=new Set([`3DObject`,`Point`]),Z=L();let Q=class extends ne(oe(w(re(ie(ae(l(te(C(r(x)))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType=`ArcGISSceneServiceLayer`,this.type=`scene`,this.fields=null,this.graphicOrigin=new b(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new i,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0,this.serviceTimeInfo=null}normalizeCtorArgs(e,t){return typeof e==`string`?{url:e,...t}:e}destroy(){this._set(`renderer`,null),this.associatedLayer=c(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let n=this.getField(e)?.domain??null;return this.associatedLayer?N(this.associatedLayer,e,t,n):n}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new R(this.fields)}readNodePages(e,t,n){return t.layerType===`Point`&&(e=t.pointNodePages),typeof e!=`object`||!e?null:H.fromJSON(e,n)}set elevationInfo(e){this._set(`elevationInfo`,e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return this.associatedLayer!=null&&P(this.associatedLayer)}get geometryType(){return Pe[this.profile]||`mesh`}set renderer(e){z(e,this.fieldsIndex),this._set(`renderer`,e)}readCachedDrawingInfo(e){return(typeof e!=`object`||!e)&&(e={}),e.color??(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e??=le;let{query:t,queryRelated:n,editing:{supportsGlobalId:r,supportsRollbackOnFailure:i,supportsUploadWithItemId:a,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:s},data:{supportsZ:c,supportsM:l,isVersioned:u,supportsAttachment:d},operations:{supportsEditing:f,supportsAdd:p,supportsUpdate:m,supportsDelete:h,supportsQuery:g,supportsQueryAttachments:_,supportsAsyncConvert3D:v},attachment:y}=e,b=e.operations.supportsChangeTracking,x=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:n,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:s,supportsRollbackOnFailure:i,supportsGeometryUpdate:x&&o,supportsUploadWithItemId:a},data:{supportsAttachment:d,supportsZ:c,supportsM:l,isVersioned:u,queryFormats:e.data.queryFormats,sourceFormats:e.data.sourceFormats},operations:{supportsQuery:g,supportsQueryAttachments:_,supportsEditing:f&&b,supportsAdd:x&&p&&b,supportsDelete:x&&h&&b,supportsUpdate:m&&b,supportsAsyncConvert3D:v},attachment:y}}get editingEnabled(){return this._isOverridden(`editingEnabled`)?this._get(`editingEnabled`):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome(`editingEnabled`,e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>(t.type===`esriFieldTypeOID`&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>(t.type===`esriFieldTypeGlobalID`&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){let n=t.store.profile;return n!=null&&$[n]?$[n]:(s.getLogger(this).error(`Unknown or missing profile`,{profile:n,layer:this}),`mesh-pyramids`)}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override(`useViewTime`,e)}get timeInfo(){let e=this.associatedLayer?.timeInfo;if(e==null)return null;let t=e.clone();return B(t,this.fieldsIndex),t}set timeInfo(e){B(e,this.fieldsIndex),this._override(`timeInfo`,e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override(`timeExtent`,e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override(`timeOffset`,e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override(`datesInUnknownTimezone`,e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){let t=e?.signal;await this.loadFromPortal({supportedTypes:[`Scene Service`]},e).catch(u),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await Se(this,{origin:`service`},t),z(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){this.filter!=null&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){s.getLogger(this).error(`#_loadFilterGeometries()`,this,`Failed to load filter geometries. Geometry filter will not be applied for this layer.`,{error:e}),this.filter=null}}createQuery(){let e=new we;this.geometryType===`mesh`?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0);let{timeOffset:t,timeExtent:n}=this;return e.timeExtent=t!=null&&n!=null?n.offset(-t.value,t.unit):n||null,e.where=this.definitionExpression||`1=1`,e.sqlFormat=`standard`,e.outFields=[`*`],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(let t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryModels(e,t){let[n,{queryModels:r}]=await Promise.all([this._getAssociatedLayerForQuery(),import(`./scene/modelQuerySupport.js`)]);return r(this,n,e,t)}async queryModel(e,t){let[n,{queryModel:r}]=await Promise.all([this._getAssociatedLayerForQuery(),import(`./scene/modelQuerySupport.js`)]);return r(this,n,e,t)}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){let n=V(this.fieldsIndex,await je(this,Me(this)));return Ae(this.parsedUrl?.path??``,this.attributeStorageInfo??[],e,t,n,this.apiKey,this.customParameters)}async queryCachedFeature(e,n){let r=await this.queryCachedAttributes(e,[n]);if(!r||r.length===0)throw new a(`scenelayer:feature-not-in-cached-data`,`Feature not found in cached data`);let i=new t;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i.origin=this.graphicOrigin,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryAttachments(e,t))}getFieldUsageInfo(e){let t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(s.getLogger(this).error(`#getFieldUsageInfo()`,`Unavailable until layer is loaded`),t)}createPopupTemplate(e){return De(this,e)}_getAssociatedLayerForQuery(){let e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});try{await this.associatedLayer.load()}catch(e){throw new a(`scenelayer:query-not-available`,`SceneLayer associated feature layer could not be loaded`,{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return this.statisticsInfo!=null&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:`scene`},e)}async save(){return this._debouncedSaveOperations(0,{getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:`scene`})}async applyEdits(e,t){let{applyEdits:n}=await import(`./graphics/editingSupport.js`),r=t;await this.load();let i=this.associatedLayer;if(!i)throw new a(`${this.type}-layer:not-editable`,`Service is not editable`);await i.load();let{globalIdField:o}=i,s=!!i.infoFor3D,c=r?.globalIdUsed??!0;if(s&&o==null)throw new a(`${this.type}-layer:not-editable`,`Valid globalIdField expected on editable SceneLayer`);if(s&&!c)throw new a(`${this.type}-layer:globalid-required`,`globalIdUsed must not be false for SceneLayer editing as globalIds are required.`);return T(i.url)&&s&&e.deleteFeatures!=null&&o!=null&&(r={...r,globalIdToObjectId:await F(i,e.deleteFeatures,o)}),n(this,i.source,e,r)}async uploadAssets(e,t){if(await this.load(),this.associatedLayer==null)throw new a(`${this.type}-layer:not-editable`,`Service is not editable`);return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};let n=e=>{throw s.getLogger(this).error(`.convertMesh()`,e.message),e};await this.load(t),this.infoFor3D||n(new a(`invalid:layer`,`SceneLayer has no capability for mesh conversion`));let r=await this.extractAndFilterFiles(e);d(t);let i=r.reduce((e,t)=>de(this.infoFor3D,t)?e+1:e,0);i===0&&n(new ee),i>1&&n(new S);let o=this.spatialReference,c=t.origin,l=await y(c??t.defaultOrigin??new v({x:0,y:0,z:0,spatialReference:o}),o,t),u=o.isGeographic?`local`:`georeferenced`,{createWithExternalSource:f}=await import(`../geometry/support/meshUtils.js`);d(t);let p=f(l,{type:`client`,files:r},{vertexSpace:u,transform:ge(o),unitConversionDisabled:!0}),[m]=await this.uploadAssets([p],{...t,useAssetOrigin:!c});return m}async extractAndFilterFiles(e){await this.load();let t=this.infoFor3D;return t?(await Oe(e)).filter(e=>fe(t,e)):e}validateLayer(e){if(e.layerType&&!X.has(e.layerType))throw new a(`scenelayer:layer-type-not-supported`,`SceneLayer does not support this layer type`,{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a(`layer:service-version-not-supported`,`Service version is not supported.`,{serviceVersion:this.version.versionString,supportedVersions:`1.x, 2.x`});if(this.version.major>2)throw new a(`layer:service-version-too-new`,`Service version is too new.`,{serviceVersion:this.version.versionString,supportedVersions:`1.x, 2.x`});t(this.normalReferenceFrame,this.spatialReference);function t(e,t){let n=!1,r=!1;if(e==null)n=!0,r=!0;else{let i=t&&t.isGeographic;switch(e){case`east-north-up`:case`earth-centered`:n=!0,r=i;break;case`vertex-reference-frame`:n=!0,r=!i;break;default:n=!1}}if(!n)throw new a(`scenelayer:unsupported-normal-reference-frame`,`Normal reference frame is invalid.`);if(!r)throw new a(`scenelayer:incompatible-normal-reference-frame`,`Normal reference frame is incompatible with layer spatial reference.`)}}get isUsedAsGroundLayer(){return!1}_getTypeKeywords(){let e=[];if(this.profile===`points`)e.push(`Point`);else if(this.profile===`mesh-pyramids`)e.push(`3DObject`);else throw new a(`scenelayer:unknown-profile`,`SceneLayer:save() encountered an unknown SceneLayer profile: `+this.profile);return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(let e of this.fields){let t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),n=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),r={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||n,supportsLayerQuery:n};this._fieldUsageInfo[e.name]=r}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(let t of this.associatedLayer.fields){let n=this.getField(t.name);n?(!n.domain&&t.domain&&(n.domain=t.domain.clone()),n.editable=t.editable,n.nullable=t.nullable,n.length=t.length):(e||=this.fields?this.fields.slice():[],e.push(t.clone()))}e&&this._set(`fields`,e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;let e=[`popupTemplate`,`popupEnabled`,`attributeTableTemplate`],t=_(this);for(let n=0;n<e.length;n++){let r=e[n],i=this.originIdOf(r),a=this.associatedLayer.originIdOf(r);i<a&&(a===2||a===3)&&t.setAtOrigin(r,this.associatedLayer[r],a)}}_applyAssociatedLayerExtentOverride(){let e=this.associatedLayer?.getAtOrigin(`fullExtent`,`service`);this.associatedLayer?.infoFor3D!=null&&e&&T(this.associatedLayer?.url)&&K(this)&&_(this).setAtOrigin(`fullExtent`,e.clone(),2)}_applyAssociatedLayerPrivileges(){let e=this.associatedLayer;e&&(this._set(`userHasEditingPrivileges`,e.userHasEditingPrivileges),this._set(`userHasFullEditingPrivileges`,e.userHasFullEditingPrivileges),this._set(`userHasUpdateItemPrivileges`,e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if([`mesh-pyramids`,`points`].includes(this.profile))try{let{serverUrl:t,layerId:n,portalItem:r}=await ce(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),i=await he.FeatureLayer();this.associatedLayer=new i({url:t,customParameters:this.customParameters,apiKey:this.apiKey,layerId:n,portalItem:r}),await this.associatedLayer.load()}catch(e){f(e)||this._logWarningOnPopupEnabled().catch(()=>{})}}async _logWarningOnPopupEnabled(){let e=new AbortController;this.addHandles(o(e));try{await m(()=>this.popupEnabled&&this.popupTemplate!=null,e.signal)}catch(e){p(e);return}let t=`this SceneLayer: ${this.title}`;this.attributeStorageInfo==null?s.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):s.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){let e=this.elevationInfo;this.profile===`mesh-pyramids`&&q(s.getLogger(this),Te(`Mesh scene layers`,`relative-to-scene`,e)),q(s.getLogger(this),Ee(`Scene layers`,e))}async fetchStatistics(e,t){return await ye({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:`scenelayer`,fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??``,customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}async loadTimeInfoFromService(e){let{serviceTimeInfo:t}=this;if(t==null)return;let{startTimeField:n,endTimeField:r}=t;if(n==null&&r==null||K({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;let i=async t=>{let r=null;try{r=(await this.fetchStatistics(t,e))?.stats}catch{}if(r==null)return null;let{minTimeStr:i,min:a,maxTimeStr:o,max:s}=r,c=t===n?i??a:o??s;return c==null?null:new Date(c)},[a,o]=await Promise.all([i(n),i(r)]);if(n!=null&&a==null||r!=null&&o==null)return;let s=new J({start:a,end:o});this.setAtOrigin(`timeInfo`,new xe({endField:r,startField:n,fullTimeExtent:s}),`service`)}};e([h({types:{key:`type`,base:null,typeMap:{selection:I}},json:{origins:{"web-scene":{name:`layerDefinition.featureReduction`,write:{allowNull:!0}},"portal-item":{name:`layerDefinition.featureReduction`,write:{allowNull:!0}}}}})],Q.prototype,`featureReduction`,void 0),e([h({type:[_e],json:{read:!1,origins:{"web-scene":{name:`layerDefinition.rangeInfos`,write:!0},"portal-item":{name:`layerDefinition.rangeInfos`,write:!0}}},clonable:!1})],Q.prototype,`rangeInfos`,void 0),e([h({json:{read:!1}})],Q.prototype,`associatedLayer`,void 0),e([h({type:[`show`,`hide`]})],Q.prototype,`listMode`,void 0),e([h({type:[`ArcGISSceneServiceLayer`]})],Q.prototype,`operationalLayerType`,void 0),e([h({json:{read:!1},readOnly:!0})],Q.prototype,`type`,void 0),e([h({...Z.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`fields`,void 0),e([h()],Q.prototype,`types`,null),e([h()],Q.prototype,`typeIdField`,null),e([h()],Q.prototype,`templates`,null),e([h()],Q.prototype,`formTemplate`,null),e([h({readOnly:!0})],Q.prototype,`graphicOrigin`,void 0),e([h({readOnly:!0,clonable:!1})],Q.prototype,`fieldsIndex`,null),e([h({type:me,json:{read:{source:`layerDefinition.floorInfo`},write:{target:`layerDefinition.floorInfo`}}})],Q.prototype,`floorInfo`,void 0),e([h(Z.outFields)],Q.prototype,`outFields`,void 0),e([h({type:H,readOnly:!0,json:{read:!1},clonable:!1})],Q.prototype,`nodePages`,void 0),e([Y(`service`,`nodePages`,[`nodePages`,`pointNodePages`])],Q.prototype,`readNodePages`,null),e([h({type:[U],readOnly:!0,clonable:!1})],Q.prototype,`materialDefinitions`,void 0),e([h({type:[W],readOnly:!0,clonable:!1})],Q.prototype,`textureSetDefinitions`,void 0),e([h({type:[ue],readOnly:!0,clonable:!1})],Q.prototype,`geometryDefinitions`,void 0),e([h({readOnly:!0})],Q.prototype,`serviceUpdateTimeStamp`,void 0),e([h({readOnly:!0})],Q.prototype,`attributeStorageInfo`,void 0),e([h({readOnly:!0})],Q.prototype,`statisticsInfo`,void 0),e([h({type:i.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:`layerDefinition.excludeObjectIds`,write:{enabled:!0}}})],Q.prototype,`excludeObjectIds`,void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:`layerDefinition.definitionExpression`,write:{enabled:!0,allowNull:!0}}})],Q.prototype,`definitionExpression`,void 0),e([h({type:ve,json:{name:`layerDefinition.polygonFilter`,write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Q.prototype,`filter`,void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Q.prototype,`path`,void 0),e([h(E)],Q.prototype,`elevationInfo`,null),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`effectiveCapabilities`,null),e([h({readOnly:!0})],Q.prototype,`effectiveEditingEnabled`,null),e([h({type:String})],Q.prototype,`geometryType`,null),e([h(D)],Q.prototype,`labelsVisible`,void 0),e([h({type:[pe],json:{origins:{service:{name:`drawingInfo.labelingInfo`,read:{reader:G},write:!1}},name:`layerDefinition.drawingInfo.labelingInfo`,read:{reader:G},write:!0}})],Q.prototype,`labelingInfo`,void 0),e([h(O)],Q.prototype,`legendEnabled`,void 0),e([h({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:[`opacity`,`layerDefinition.drawingInfo.transparency`],reader(e,t){if(typeof e==`number`&&e>=0&&e<=1)return e;let n=t.layerDefinition?.drawingInfo?.transparency;return n===void 0?void 0:Ne(n)}}},"portal-item":{write:!0},service:{read:!1}}}})],Q.prototype,`opacity`,void 0),e([h({type:[`Low`,`High`],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`priority`,void 0),e([h({type:[`Labels`],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`semantic`,void 0),e([h({types:Ce,json:{origins:{service:{read:{source:`drawingInfo.renderer`}}},name:`layerDefinition.drawingInfo.renderer`,write:!0},value:null})],Q.prototype,`renderer`,null),e([h({json:{read:!1}})],Q.prototype,`cachedDrawingInfo`,void 0),e([Y(`service`,`cachedDrawingInfo`)],Q.prototype,`readCachedDrawingInfo`,null),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`capabilities`,null),e([h({type:Boolean,json:{read:!1}})],Q.prototype,`editingEnabled`,null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Q.prototype,`infoFor3D`,null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Q.prototype,`relationships`,null),e([h(k)],Q.prototype,`popupEnabled`,void 0),e([h({type:n,json:{name:`popupInfo`,write:!0}})],Q.prototype,`popupTemplate`,void 0),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`defaultPopupTemplate`,null),e([h(A)],Q.prototype,`attributeTableTemplate`,void 0),e([h({type:String,json:{read:!1}})],Q.prototype,`objectIdField`,void 0),e([Y(`service`,`objectIdField`,[`objectIdField`,`fields`])],Q.prototype,`readObjectIdField`,null),e([h({type:String,json:{read:!1}})],Q.prototype,`globalIdField`,void 0),e([Y(`service`,`globalIdField`,[`globalIdField`,`fields`])],Q.prototype,`readGlobalIdField`,null),e([h({readOnly:!0,type:String,json:{read:!1}})],Q.prototype,`displayField`,null),e([h({type:String,json:{read:!1}})],Q.prototype,`profile`,void 0),e([Y(`service`,`profile`,[`store.profile`])],Q.prototype,`readProfile`,null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:`store.normalReferenceFrame`}}},read:!1}})],Q.prototype,`normalReferenceFrame`,void 0),e([h(j)],Q.prototype,`screenSizePerspectiveEnabled`,void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`serviceItemId`,void 0),e([h(se)],Q.prototype,`useViewTime`,null),e([h(M({disableServiceOrigin:!0,webDocumentOrigin:`web-scene`}))],Q.prototype,`timeInfo`,null),e([h({type:J,json:{read:!1,write:!1}})],Q.prototype,`timeExtent`,null),e([h({type:ke,json:{read:!1,write:!1}})],Q.prototype,`timeOffset`,null),e([h({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],Q.prototype,`datesInUnknownTimezone`,null),e([h({type:be,readOnly:!0,json:{read:{source:`timeInfo`}},clonable:!1})],Q.prototype,`serviceTimeInfo`,void 0),e([h()],Q.prototype,`isUsedAsGroundLayer`,null),Q=e([g(`esri.layers.SceneLayer`)],Q);const $={"mesh-pyramids":`mesh-pyramids`,meshpyramids:`mesh-pyramids`,"features-meshes":`mesh-pyramids`,points:`points`,"features-points":`points`,lines:`lines`,"features-lines":`lines`,polygons:`polygons`,"features-polygons":`polygons`},Pe={"mesh-pyramids":`mesh`,points:`point`},Fe=Q;export{Fe as default};
2
+ import{__decorate as e}from"tslib";import t from"../Graphic.js";import n from"../PopupTemplate.js";import{ClonableMixin as r}from"../core/Clonable.js";import i from"../core/Collection.js";import a from"../core/Error.js";import{abortHandle as o}from"../core/handleUtils.js";import s from"../core/Logger.js";import{destroyMaybe as c}from"../core/maybe.js";import{MultiOriginJSONSupportMixin as l}from"../core/MultiOriginJSONSupport.js";import{throwIfAbortError as u,throwIfAborted as d,isAbortError as f,throwIfNotAbortError as p}from"../core/promiseUtils.js";import{whenOnce as m}from"../core/reactiveUtils.js";import{property as h,subclass as g}from"../core/accessorSupport/decorators.js";import{getProperties as _}from"../core/accessorSupport/utils.js";import v from"../geometry/Point.js";import{projectAsync as y}from"../geometry/projectionUtils.js";import b from"../graphic/SceneGraphicOrigin.js";import x from"./Layer.js";import{NoModelError as ee,MultipleModelsError as S}from"./graphics/sources/support/uploadAssetErrors.js";import{APIKeyMixin as C}from"./mixins/APIKeyMixin.js";import{ArcGISService as w}from"./mixins/ArcGISService.js";import{CustomParametersMixin as te}from"./mixins/CustomParametersMixin.js";import{EditBusLayer as ne}from"./mixins/EditBusLayer.js";import{OperationalLayer as re}from"./mixins/OperationalLayer.js";import{PortalLayer as ie}from"./mixins/PortalLayer.js";import{ScaleRangeLayer as ae}from"./mixins/ScaleRangeLayer.js";import{SceneService as oe}from"./mixins/SceneService.js";import{useViewTimeProperty as se}from"./mixins/TemporalLayer.js";import{isHostedAgolService as T}from"./support/arcgisLayerUrl.js";import{findAssociatedFeatureService as ce}from"./support/associatedFeatureServiceUtils.js";import{zeroCapabilities as le}from"./support/capabilities.js";import{elevationInfo as E,labelsVisible as D,legendEnabled as O,popupEnabled as k,attributeTableTemplate as A,screenSizePerspectiveEnabled as j,timeInfo as M}from"./support/commonProperties.js";import{getFieldDomain as N,computeEffectiveEditingEnabled as P,getGlobalIdToObjectIdMap as F}from"./support/featureLayerUtils.js";import I from"./support/FeatureReductionSelection.js";import{defineFieldProperties as L}from"./support/fieldProperties.js";import R from"./support/FieldsIndex.js";import{fixRendererFields as z,fixTimeInfoFields as B,unpackFieldNames as V}from"./support/fieldUtils.js";import{I3SNodePageDefinition as H,I3SMaterialDefinition as U,I3STextureSetDefinition as W,I3SGeometryDefinition as ue}from"./support/I3SLayerDefinitions.js";import{isFileEditFormat as de,isFileSupported as fe}from"./support/infoFor3D.js";import pe from"./support/LabelClass.js";import{reader as G}from"./support/labelingInfo.js";import me from"./support/LayerFloorInfo.js";import{layersLoaderMap as he}from"./support/layersLoader.js";import{getMeshTransformForMetersToSpatialReference as ge}from"./support/meshSpatialReferenceScaleUtils.js";import{RangeInfo as _e}from"./support/RangeInfo.js";import ve from"./support/SceneFilter.js";import{cacheIsOutOfSync as K}from"./support/sceneLayerCacheUtils.js";import{fetchStatistics as ye}from"./support/sceneLayerStatistics.js";import{SceneServiceTimeInfo as be}from"./support/SceneServiceTimeInfo.js";import xe from"./support/TimeInfo.js";import{loadStyleRenderer as Se}from"../renderers/support/styleUtils.js";import{webSceneRendererTypes as Ce}from"../renderers/support/typeUtils.js";import we from"../rest/support/Query.js";import{logInvalidElevationInfoWarning as q,elevationModeUnsupportedMessage as Te,featureExpressionUnsupportedMessage as Ee}from"../support/elevationInfoUtils.js";import{createPopupTemplate as De}from"../support/popupUtils.js";import{extractZipFiles as Oe}from"../support/zipUtils.js";import J from"../time/TimeExtent.js";import ke from"../time/TimeInterval.js";import{queryAttributesFromCachedAttributesId as Ae}from"../views/3d/layers/i3s/I3SUtil.js";import{getRequiredFields as je,getFetchPopupTemplate as Me}from"../views/layers/support/popupUtils.js";import{transparencyToOpacity as Ne}from"../webdoc/support/opacityUtils.js";import{reader as Y}from"../core/accessorSupport/decorators/reader.js";const X=new Set([`3DObject`,`Point`]),Z=L();let Q=class extends ne(oe(w(re(ie(ae(l(te(C(r(x)))))))))){constructor(...e){super(...e),this.featureReduction=null,this.rangeInfos=null,this.operationalLayerType=`ArcGISSceneServiceLayer`,this.type=`scene`,this.fields=null,this.graphicOrigin=new b(this),this.floorInfo=null,this.outFields=null,this.nodePages=null,this.materialDefinitions=null,this.textureSetDefinitions=null,this.geometryDefinitions=null,this.serviceUpdateTimeStamp=null,this.excludeObjectIds=new i,this.definitionExpression=null,this.filter=null,this.path=null,this.labelsVisible=!0,this.labelingInfo=null,this.legendEnabled=!0,this.priority=null,this.semantic=null,this.cachedDrawingInfo={color:!1},this.popupEnabled=!0,this.popupTemplate=null,this.attributeTableTemplate=null,this.objectIdField=null,this.globalIdField=null,this._fieldUsageInfo={},this.screenSizePerspectiveEnabled=!0,this.serviceItemId=void 0,this.serviceTimeInfo=null}normalizeCtorArgs(e,t){return typeof e==`string`?{url:e,...t}:e}destroy(){this._set(`renderer`,null),this.associatedLayer=c(this.associatedLayer)}getField(e){return this.fieldsIndex.get(e)}getFieldDomain(e,t){let n=this.getField(e)?.domain??null;return this.associatedLayer?N(this.associatedLayer,e,t,n):n}getFeatureType(e){return e&&this.associatedLayer?this.associatedLayer.getFeatureType(e):null}get types(){return this.associatedLayer?.types??[]}get typeIdField(){return this.associatedLayer?.typeIdField??null}get templates(){return this.associatedLayer?.templates??null}get formTemplate(){return this.associatedLayer?.formTemplate??null}get fieldsIndex(){return new R(this.fields)}readNodePages(e,t,n){return t.layerType===`Point`&&(e=t.pointNodePages),typeof e!=`object`||!e?null:H.fromJSON(e,n)}set elevationInfo(e){this._set(`elevationInfo`,e),this.loaded&&this._validateElevationInfo()}get effectiveCapabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.effectiveCapabilities)}get effectiveEditingEnabled(){return this.associatedLayer!=null&&P(this.associatedLayer)}get geometryType(){return Pe[this.profile]||`mesh`}set renderer(e){z(e,this.fieldsIndex),this._set(`renderer`,e)}readCachedDrawingInfo(e){return typeof e==`object`&&e||(e={}),e.color??(e.color=!1),e}get capabilities(){return this._capabilitiesFromAssociatedFeatureLayer(this.associatedLayer?.capabilities)}_capabilitiesFromAssociatedFeatureLayer(e){e??=le;let{query:t,queryRelated:n,editing:{supportsGlobalId:r,supportsRollbackOnFailure:i,supportsUploadWithItemId:a,supportsGeometryUpdate:o,supportsReturnServiceEditsInSourceSpatialReference:s},data:{supportsZ:c,supportsM:l,isVersioned:u,supportsAttachment:d},operations:{supportsEditing:f,supportsAdd:p,supportsUpdate:m,supportsDelete:h,supportsQuery:g,supportsQueryAttachments:_,supportsAsyncConvert3D:v},attachment:y}=e,b=e.operations.supportsChangeTracking,x=!!this.associatedLayer?.infoFor3D;return{query:t,queryRelated:n,editing:{supportsGlobalId:r,supportsReturnServiceEditsInSourceSpatialReference:s,supportsRollbackOnFailure:i,supportsGeometryUpdate:x&&o,supportsUploadWithItemId:a},data:{supportsAttachment:d,supportsZ:c,supportsM:l,isVersioned:u,queryFormats:e.data.queryFormats,sourceFormats:e.data.sourceFormats},operations:{supportsQuery:g,supportsQueryAttachments:_,supportsEditing:f&&b,supportsAdd:x&&p&&b,supportsDelete:x&&h&&b,supportsUpdate:m&&b,supportsAsyncConvert3D:v},attachment:y}}get editingEnabled(){return this._isOverridden(`editingEnabled`)?this._get(`editingEnabled`):this.associatedLayer?.editingEnabled??!1}set editingEnabled(e){this._overrideIfSome(`editingEnabled`,e)}get infoFor3D(){return this.associatedLayer?.infoFor3D??null}get relationships(){return this.associatedLayer?.relationships}get defaultPopupTemplate(){return this.associatedLayer||this.attributeStorageInfo?this.createPopupTemplate():null}readObjectIdField(e,t){return!e&&t.fields&&t.fields.some(t=>(t.type===`esriFieldTypeOID`&&(e=t.name),!!e)),e||void 0}readGlobalIdField(e,t){return!e&&t.fields&&t.fields.some(t=>(t.type===`esriFieldTypeGlobalID`&&(e=t.name),!!e)),e||void 0}get displayField(){return this.associatedLayer?.displayField??null}readProfile(e,t){let n=t.store.profile;return n!=null&&$[n]?$[n]:(s.getLogger(this).error(`Unknown or missing profile`,{profile:n,layer:this}),`mesh-pyramids`)}get useViewTime(){return this.associatedLayer?.useViewTime??!0}set useViewTime(e){this._override(`useViewTime`,e)}get timeInfo(){let e=this.associatedLayer?.timeInfo;if(e==null)return null;let t=e.clone();return B(t,this.fieldsIndex),t}set timeInfo(e){B(e,this.fieldsIndex),this._override(`timeInfo`,e)}get timeExtent(){return this.associatedLayer?.timeExtent}set timeExtent(e){this._override(`timeExtent`,e)}get timeOffset(){return this.associatedLayer?.timeOffset}set timeOffset(e){this._override(`timeOffset`,e)}get datesInUnknownTimezone(){return this.associatedLayer?.datesInUnknownTimezone??!1}set datesInUnknownTimezone(e){this._override(`datesInUnknownTimezone`,e)}load(e){return this.addResolvingPromise(this._load(e)),Promise.resolve(this)}async _load(e){let t=e?.signal;await this.loadFromPortal({supportedTypes:[`Scene Service`]},e).catch(u),await this._fetchService(t),await Promise.all([this._fetchIndexAndUpdateExtent(this.nodePages,t),this._setAssociatedFeatureLayer(t),this._loadFilterGeometries()]),this._validateElevationInfo(),this._applyAssociatedLayerOverrides(),this._populateFieldUsageInfo(),await this.loadTimeInfoFromService(e),await Se(this,{origin:`service`},t),z(this.renderer,this.fieldsIndex),await this.finishLoadEditablePortalLayer(e)}async beforeSave(){this.filter!=null&&(this.filter=this.filter.clone(),await this.load())}async _loadFilterGeometries(){if(this.filter)try{await this.filter.loadGeometries(this.spatialReference)}catch(e){s.getLogger(this).error(`#_loadFilterGeometries()`,this,`Failed to load filter geometries. Geometry filter will not be applied for this layer.`,{error:e}),this.filter=null}}createQuery(){let e=new we;this.geometryType===`mesh`?this.capabilities.query.supportsReturnMesh&&(e.returnGeometry=!0):(e.returnGeometry=!0,e.returnZ=!0);let{timeOffset:t,timeExtent:n}=this;return e.timeExtent=t!=null&&n!=null?n.offset(-t.value,t.unit):n||null,e.where=this.definitionExpression||`1=1`,e.sqlFormat=`standard`,e.outFields=[`*`],e}queryExtent(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryExtent(e||this.createQuery(),t))}queryFeatureCount(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryFeatureCount(e||this.createQuery(),t))}queryFeatures(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryFeatures(e||this.createQuery(),t)).then(e=>{if(e?.features)for(let t of e.features)t.layer=this,t.sourceLayer=this,t.origin=this.graphicOrigin;return e})}async queryModels(e,t){let[n,{queryModels:r}]=await Promise.all([this._getAssociatedLayerForQuery(),import(`./scene/modelQuerySupport.js`)]);return r(this,n,e,t)}async queryModel(e,t){let[n,{queryModel:r}]=await Promise.all([this._getAssociatedLayerForQuery(),import(`./scene/modelQuerySupport.js`)]);return r(this,n,e,t)}async queryRelatedFeatures(e,t){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});return this.associatedLayer.queryRelatedFeatures(e,t)}async queryRelatedFeaturesCount(e,t){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});return this.associatedLayer.queryRelatedFeaturesCount(e,t)}async queryCachedAttributes(e,t){let n=V(this.fieldsIndex,await je(this,Me(this)));return Ae(this.parsedUrl?.path??``,this.attributeStorageInfo??[],e,t,n,this.apiKey,this.customParameters)}async queryCachedFeature(e,n){let r=await this.queryCachedAttributes(e,[n]);if(!r||r.length===0)throw new a(`scenelayer:feature-not-in-cached-data`,`Feature not found in cached data`);let i=new t;return i.attributes=r[0],i.layer=this,i.sourceLayer=this,i.origin=this.graphicOrigin,i}queryObjectIds(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryObjectIds(e||this.createQuery(),t))}queryAttachments(e,t){return this._getAssociatedLayerForQuery().then(n=>n.queryAttachments(e,t))}getFieldUsageInfo(e){let t={supportsLabelingInfo:!1,supportsRenderer:!1,supportsPopupTemplate:!1,supportsLayerQuery:!1};return this.loaded?this._fieldUsageInfo[e]||t:(s.getLogger(this).error(`#getFieldUsageInfo()`,`Unavailable until layer is loaded`),t)}createPopupTemplate(e){return De(this,e)}_getAssociatedLayerForQuery(){let e=this.associatedLayer;return e?.loaded?Promise.resolve(e):this._loadAssociatedLayerForQuery()}async _loadAssociatedLayerForQuery(){if(await this.load(),!this.associatedLayer)throw new a(`scenelayer:query-not-available`,`SceneLayer queries are not available without an associated feature layer`,{layer:this});try{await this.associatedLayer.load()}catch(e){throw new a(`scenelayer:query-not-available`,`SceneLayer associated feature layer could not be loaded`,{layer:this,error:e})}return this.associatedLayer}hasCachedStatistics(e){return this.statisticsInfo!=null&&this.statisticsInfo.some(t=>t.name===e)}async queryCachedStatistics(e,t){return await this.load(t),await this.fetchStatistics(e,t)}async saveAs(e,t){return this._debouncedSaveOperations(1,{...t,getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:`scene`},e)}async save(){return this._debouncedSaveOperations(0,{getTypeKeywords:()=>this._getTypeKeywords(),portalItemLayerType:`scene`})}async applyEdits(e,t){let{applyEdits:n}=await import(`./graphics/editingSupport.js`),r=t;await this.load();let i=this.associatedLayer;if(!i)throw new a(`${this.type}-layer:not-editable`,`Service is not editable`);await i.load();let{globalIdField:o}=i,s=!!i.infoFor3D,c=r?.globalIdUsed??!0;if(s&&o==null)throw new a(`${this.type}-layer:not-editable`,`Valid globalIdField expected on editable SceneLayer`);if(s&&!c)throw new a(`${this.type}-layer:globalid-required`,`globalIdUsed must not be false for SceneLayer editing as globalIds are required.`);return T(i.url)&&s&&e.deleteFeatures!=null&&o!=null&&(r={...r,globalIdToObjectId:await F(i,e.deleteFeatures,o)}),n(this,i.source,e,r)}async uploadAssets(e,t){if(await this.load(),this.associatedLayer==null)throw new a(`${this.type}-layer:not-editable`,`Service is not editable`);return await this.associatedLayer.load(),this.associatedLayer.uploadAssets(e,t)}async convertMesh(e,t){t??={};let n=e=>{throw s.getLogger(this).error(`.convertMesh()`,e.message),e};await this.load(t),this.infoFor3D||n(new a(`invalid:layer`,`SceneLayer has no capability for mesh conversion`));let r=await this.extractAndFilterFiles(e);d(t);let i=r.reduce((e,t)=>de(this.infoFor3D,t)?e+1:e,0);i===0&&n(new ee),i>1&&n(new S);let o=this.spatialReference,c=t.origin,l=await y(c??t.defaultOrigin??new v({x:0,y:0,z:0,spatialReference:o}),o,t),u=o.isGeographic?`local`:`georeferenced`,{createWithExternalSource:f}=await import(`../geometry/support/meshUtils.js`);d(t);let p=f(l,{type:`client`,files:r},{vertexSpace:u,transform:ge(o),unitConversionDisabled:!0}),[m]=await this.uploadAssets([p],{...t,useAssetOrigin:!c});return m}async extractAndFilterFiles(e){await this.load();let t=this.infoFor3D;return t?(await Oe(e)).filter(e=>fe(t,e)):e}validateLayer(e){if(e.layerType&&!X.has(e.layerType))throw new a(`scenelayer:layer-type-not-supported`,`SceneLayer does not support this layer type`,{layerType:e.layerType});if(isNaN(this.version.major)||isNaN(this.version.minor))throw new a(`layer:service-version-not-supported`,`Service version is not supported.`,{serviceVersion:this.version.versionString,supportedVersions:`1.x, 2.x`});if(this.version.major>2)throw new a(`layer:service-version-too-new`,`Service version is too new.`,{serviceVersion:this.version.versionString,supportedVersions:`1.x, 2.x`});t(this.normalReferenceFrame,this.spatialReference);function t(e,t){let n=!1,r=!1;if(e==null)n=!0,r=!0;else{let i=t&&t.isGeographic;switch(e){case`east-north-up`:case`earth-centered`:n=!0,r=i;break;case`vertex-reference-frame`:n=!0,r=!i;break;default:n=!1}}if(!n)throw new a(`scenelayer:unsupported-normal-reference-frame`,`Normal reference frame is invalid.`);if(!r)throw new a(`scenelayer:incompatible-normal-reference-frame`,`Normal reference frame is incompatible with layer spatial reference.`)}}get isUsedAsGroundLayer(){return!1}_getTypeKeywords(){let e=[];if(this.profile===`points`)e.push(`Point`);else if(this.profile===`mesh-pyramids`)e.push(`3DObject`);else throw new a(`scenelayer:unknown-profile`,`SceneLayer:save() encountered an unknown SceneLayer profile: `+this.profile);return e}_populateFieldUsageInfo(){if(this._fieldUsageInfo={},this.fields)for(let e of this.fields){let t=!!this.attributeStorageInfo?.some(t=>t.name===e.name),n=!!this.associatedLayer?.fields?.some(t=>t&&e.name===t.name),r={supportsLabelingInfo:t,supportsRenderer:t,supportsPopupTemplate:t||n,supportsLayerQuery:n};this._fieldUsageInfo[e.name]=r}}_applyAssociatedLayerOverrides(){this._applyAssociatedLayerFieldsOverrides(),this._applyAssociatedLayerPropertyOverrides(),this._applyAssociatedLayerExtentOverride(),this._applyAssociatedLayerPrivileges()}_applyAssociatedLayerFieldsOverrides(){if(!this.associatedLayer?.fields)return;let e=null;for(let t of this.associatedLayer.fields){let n=this.getField(t.name);n?(!n.domain&&t.domain&&(n.domain=t.domain.clone()),n.editable=t.editable,n.nullable=t.nullable,n.length=t.length):(e||=this.fields?this.fields.slice():[],e.push(t.clone()))}e&&this._set(`fields`,e)}_applyAssociatedLayerPropertyOverrides(){if(!this.associatedLayer)return;let e=[`popupTemplate`,`popupEnabled`,`attributeTableTemplate`],t=_(this);for(let n=0;n<e.length;n++){let r=e[n],i=this.originIdOf(r),a=this.associatedLayer.originIdOf(r);i<a&&(a===2||a===3)&&t.setAtOrigin(r,this.associatedLayer[r],a)}}_applyAssociatedLayerExtentOverride(){let e=this.associatedLayer?.getAtOrigin(`fullExtent`,`service`);this.associatedLayer?.infoFor3D!=null&&e&&T(this.associatedLayer?.url)&&K(this)&&_(this).setAtOrigin(`fullExtent`,e.clone(),2)}_applyAssociatedLayerPrivileges(){let e=this.associatedLayer;e&&(this._set(`userHasEditingPrivileges`,e.userHasEditingPrivileges),this._set(`userHasFullEditingPrivileges`,e.userHasFullEditingPrivileges),this._set(`userHasUpdateItemPrivileges`,e.userHasUpdateItemPrivileges))}async _setAssociatedFeatureLayer(e){if([`mesh-pyramids`,`points`].includes(this.profile))try{let{serverUrl:t,layerId:n,portalItem:r}=await ce(`${this.url}/layers/${this.layerId}`,{sceneLayerItem:this.portalItem,customParameters:this.customParameters,apiKey:this.apiKey,signal:e}),i=await he.FeatureLayer();this.associatedLayer=new i({url:t,customParameters:this.customParameters,apiKey:this.apiKey,layerId:n,portalItem:r}),await this.associatedLayer.load()}catch(e){f(e)||this._logWarningOnPopupEnabled().catch(()=>{})}}async _logWarningOnPopupEnabled(){let e=new AbortController;this.addHandles(o(e));try{await m(()=>this.popupEnabled&&this.popupTemplate!=null,e.signal)}catch(e){p(e);return}let t=`this SceneLayer: ${this.title}`;this.attributeStorageInfo==null?s.getLogger(this).warn(`Associated FeatureLayer could not be loaded and no binary attributes found. Popups will not work on ${t}`):s.getLogger(this).info(`Associated FeatureLayer could not be loaded. Falling back to binary attributes for Popups on ${t}`)}_validateElevationInfo(){let e=this.elevationInfo;this.profile===`mesh-pyramids`&&q(s.getLogger(this),Te(`Mesh scene layers`,`relative-to-scene`,e)),q(s.getLogger(this),Ee(`Scene layers`,e))}async fetchStatistics(e,t){return await ye({fieldName:e,statisticsInfo:this.statisticsInfo,errorContext:`scenelayer`,fieldsIndex:this.fieldsIndex,path:this.parsedUrl?.path??``,customParameters:this.customParameters,apiKey:this.apiKey,signal:t?.signal})}async loadTimeInfoFromService(e){let{serviceTimeInfo:t}=this;if(t==null)return;let{startTimeField:n,endTimeField:r}=t;if(n==null&&r==null||K({associatedLayer:this.associatedLayer,serviceUpdateTimeStamp:this.serviceUpdateTimeStamp}))return;let i=async t=>{let r=null;try{r=(await this.fetchStatistics(t,e))?.stats}catch{}if(r==null)return null;let{minTimeStr:i,min:a,maxTimeStr:o,max:s}=r,c=t===n?i??a:o??s;return c==null?null:new Date(c)},[a,o]=await Promise.all([i(n),i(r)]);if(n!=null&&a==null||r!=null&&o==null)return;let s=new J({start:a,end:o});this.setAtOrigin(`timeInfo`,new xe({endField:r,startField:n,fullTimeExtent:s}),`service`)}};e([h({types:{key:`type`,base:null,typeMap:{selection:I}},json:{origins:{"web-scene":{name:`layerDefinition.featureReduction`,write:{allowNull:!0}},"portal-item":{name:`layerDefinition.featureReduction`,write:{allowNull:!0}}}}})],Q.prototype,`featureReduction`,void 0),e([h({type:[_e],json:{read:!1,origins:{"web-scene":{name:`layerDefinition.rangeInfos`,write:!0},"portal-item":{name:`layerDefinition.rangeInfos`,write:!0}}},clonable:!1})],Q.prototype,`rangeInfos`,void 0),e([h({json:{read:!1}})],Q.prototype,`associatedLayer`,void 0),e([h({type:[`show`,`hide`]})],Q.prototype,`listMode`,void 0),e([h({type:[`ArcGISSceneServiceLayer`]})],Q.prototype,`operationalLayerType`,void 0),e([h({json:{read:!1},readOnly:!0})],Q.prototype,`type`,void 0),e([h({...Z.fields,readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`fields`,void 0),e([h()],Q.prototype,`types`,null),e([h()],Q.prototype,`typeIdField`,null),e([h()],Q.prototype,`templates`,null),e([h()],Q.prototype,`formTemplate`,null),e([h({readOnly:!0})],Q.prototype,`graphicOrigin`,void 0),e([h({readOnly:!0,clonable:!1})],Q.prototype,`fieldsIndex`,null),e([h({type:me,json:{read:{source:`layerDefinition.floorInfo`},write:{target:`layerDefinition.floorInfo`}}})],Q.prototype,`floorInfo`,void 0),e([h(Z.outFields)],Q.prototype,`outFields`,void 0),e([h({type:H,readOnly:!0,json:{read:!1},clonable:!1})],Q.prototype,`nodePages`,void 0),e([Y(`service`,`nodePages`,[`nodePages`,`pointNodePages`])],Q.prototype,`readNodePages`,null),e([h({type:[U],readOnly:!0,clonable:!1})],Q.prototype,`materialDefinitions`,void 0),e([h({type:[W],readOnly:!0,clonable:!1})],Q.prototype,`textureSetDefinitions`,void 0),e([h({type:[ue],readOnly:!0,clonable:!1})],Q.prototype,`geometryDefinitions`,void 0),e([h({readOnly:!0})],Q.prototype,`serviceUpdateTimeStamp`,void 0),e([h({readOnly:!0})],Q.prototype,`attributeStorageInfo`,void 0),e([h({readOnly:!0})],Q.prototype,`statisticsInfo`,void 0),e([h({type:i.ofType(Number),nonNullable:!0,json:{origins:{service:{read:!1,write:!1}},name:`layerDefinition.excludeObjectIds`,write:{enabled:!0}}})],Q.prototype,`excludeObjectIds`,void 0),e([h({type:String,json:{origins:{service:{read:!1,write:!1}},name:`layerDefinition.definitionExpression`,write:{enabled:!0,allowNull:!0}}})],Q.prototype,`definitionExpression`,void 0),e([h({type:ve,json:{name:`layerDefinition.polygonFilter`,write:{enabled:!0,allowNull:!0},origins:{service:{read:!1,write:!1}}}})],Q.prototype,`filter`,void 0),e([h({type:String,json:{origins:{"web-scene":{read:!0,write:!0}},read:!1}})],Q.prototype,`path`,void 0),e([h(E)],Q.prototype,`elevationInfo`,null),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`effectiveCapabilities`,null),e([h({readOnly:!0})],Q.prototype,`effectiveEditingEnabled`,null),e([h({type:String})],Q.prototype,`geometryType`,null),e([h(D)],Q.prototype,`labelsVisible`,void 0),e([h({type:[pe],json:{origins:{service:{name:`drawingInfo.labelingInfo`,read:{reader:G},write:!1}},name:`layerDefinition.drawingInfo.labelingInfo`,read:{reader:G},write:!0}})],Q.prototype,`labelingInfo`,void 0),e([h(O)],Q.prototype,`legendEnabled`,void 0),e([h({type:Number,json:{origins:{"web-document":{default:1,write:{enabled:!0,target:{opacity:{type:Number},"layerDefinition.drawingInfo.transparency":{type:Number}}},read:{source:[`opacity`,`layerDefinition.drawingInfo.transparency`],reader(e,t){if(typeof e==`number`&&e>=0&&e<=1)return e;let n=t.layerDefinition?.drawingInfo?.transparency;return n===void 0?void 0:Ne(n)}}},"portal-item":{write:!0},service:{read:!1}}}})],Q.prototype,`opacity`,void 0),e([h({type:[`Low`,`High`],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`priority`,void 0),e([h({type:[`Labels`],readOnly:!0,json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`semantic`,void 0),e([h({types:Ce,json:{origins:{service:{read:{source:`drawingInfo.renderer`}}},name:`layerDefinition.drawingInfo.renderer`,write:!0},value:null})],Q.prototype,`renderer`,null),e([h({json:{read:!1}})],Q.prototype,`cachedDrawingInfo`,void 0),e([Y(`service`,`cachedDrawingInfo`)],Q.prototype,`readCachedDrawingInfo`,null),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`capabilities`,null),e([h({type:Boolean,json:{read:!1}})],Q.prototype,`editingEnabled`,null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Q.prototype,`infoFor3D`,null),e([h({readOnly:!0,json:{write:!1,read:!1}})],Q.prototype,`relationships`,null),e([h(k)],Q.prototype,`popupEnabled`,void 0),e([h({type:n,json:{name:`popupInfo`,write:!0}})],Q.prototype,`popupTemplate`,void 0),e([h({readOnly:!0,json:{read:!1}})],Q.prototype,`defaultPopupTemplate`,null),e([h(A)],Q.prototype,`attributeTableTemplate`,void 0),e([h({type:String,json:{read:!1}})],Q.prototype,`objectIdField`,void 0),e([Y(`service`,`objectIdField`,[`objectIdField`,`fields`])],Q.prototype,`readObjectIdField`,null),e([h({type:String,json:{read:!1}})],Q.prototype,`globalIdField`,void 0),e([Y(`service`,`globalIdField`,[`globalIdField`,`fields`])],Q.prototype,`readGlobalIdField`,null),e([h({readOnly:!0,type:String,json:{read:!1}})],Q.prototype,`displayField`,null),e([h({type:String,json:{read:!1}})],Q.prototype,`profile`,void 0),e([Y(`service`,`profile`,[`store.profile`])],Q.prototype,`readProfile`,null),e([h({readOnly:!0,type:String,json:{origins:{service:{read:{source:`store.normalReferenceFrame`}}},read:!1}})],Q.prototype,`normalReferenceFrame`,void 0),e([h(j)],Q.prototype,`screenSizePerspectiveEnabled`,void 0),e([h({json:{read:!1,origins:{service:{read:!0}}}})],Q.prototype,`serviceItemId`,void 0),e([h(se)],Q.prototype,`useViewTime`,null),e([h(M({disableServiceOrigin:!0,webDocumentOrigin:`web-scene`}))],Q.prototype,`timeInfo`,null),e([h({type:J,json:{read:!1,write:!1}})],Q.prototype,`timeExtent`,null),e([h({type:ke,json:{read:!1,write:!1}})],Q.prototype,`timeOffset`,null),e([h({type:Boolean,nonNullable:!0,json:{read:!1,write:!1}})],Q.prototype,`datesInUnknownTimezone`,null),e([h({type:be,readOnly:!0,json:{read:{source:`timeInfo`}},clonable:!1})],Q.prototype,`serviceTimeInfo`,void 0),e([h()],Q.prototype,`isUsedAsGroundLayer`,null),Q=e([g(`esri.layers.SceneLayer`)],Q);const $={"mesh-pyramids":`mesh-pyramids`,meshpyramids:`mesh-pyramids`,"features-meshes":`mesh-pyramids`,points:`points`,"features-points":`points`,lines:`lines`,"features-lines":`lines`,polygons:`polygons`,"features-polygons":`polygons`},Pe={"mesh-pyramids":`mesh`,points:`point`},Fe=Q;export{Fe as default};
@@ -19,10 +19,10 @@ import type { CustomParametersMixin, CustomParametersMixinProperties } from "./m
19
19
  import type { DisplayFilteredLayer, DisplayFilteredLayerProperties } from "./mixins/DisplayFilteredLayer.js";
20
20
  import type { EditBusLayer, EditBusLayerEvents } from "./mixins/EditBusLayer.js";
21
21
  import type { FeatureLayerBase, FeatureLayerBaseProperties } from "./mixins/FeatureLayerBase.js";
22
- import type { FeatureLayerReload } from "./mixins/FeatureLayerReload.js";
23
22
  import type { OperationalLayer, OperationalLayerProperties } from "./mixins/OperationalLayer.js";
24
23
  import type { PortalLayer, PortalLayerProperties } from "./mixins/PortalLayer.js";
25
24
  import type { RefreshableLayerEvents, RefreshableLayer, RefreshableLayerProperties } from "./mixins/RefreshableLayer.js";
25
+ import type { ReloadableLayer } from "./mixins/ReloadableLayer.js";
26
26
  import type { ScaleRangeLayer, ScaleRangeLayerProperties } from "./mixins/ScaleRangeLayer.js";
27
27
  import type { TemporalLayer, TemporalLayerProperties } from "./mixins/TemporalLayer.js";
28
28
  import type { PortalItemProperties } from "../portal/PortalItem.js";
@@ -880,4 +880,4 @@ export default class SubtypeGroupLayer extends SubtypeGroupLayerSuperclass {
880
880
  */
881
881
  updateAttachment(feature: Graphic, attachmentId: number, attachment: HTMLFormElement | FormData, options?: AttachmentEditOptions): Promise<FeatureEditResult>;
882
882
  }
883
- declare const SubtypeGroupLayerSuperclass: typeof Layer & typeof ClonableMixin & typeof APIKeyMixin & typeof CustomParametersMixin & typeof MultiOriginJSONSupportMixin & typeof PortalLayer & typeof OperationalLayer & typeof RefreshableLayer & typeof ScaleRangeLayer & typeof TemporalLayer & typeof BlendLayer & typeof EditBusLayer & typeof DisplayFilteredLayer & typeof FeatureLayerBase & typeof FeatureLayerReload
883
+ declare const SubtypeGroupLayerSuperclass: typeof Layer & typeof ClonableMixin & typeof APIKeyMixin & typeof CustomParametersMixin & typeof MultiOriginJSONSupportMixin & typeof PortalLayer & typeof OperationalLayer & typeof RefreshableLayer & typeof ScaleRangeLayer & typeof TemporalLayer & typeof BlendLayer & typeof EditBusLayer & typeof DisplayFilteredLayer & typeof FeatureLayerBase & typeof ReloadableLayer